pb-sxp-ui 1.0.16 → 1.0.17

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 (416) hide show
  1. package/package.json +1 -1
  2. package/dist/index.cjs +0 -13065
  3. package/dist/index.cjs.map +0 -1
  4. package/dist/index.css +0 -1683
  5. package/dist/index.js +0 -13033
  6. package/dist/index.js.map +0 -1
  7. package/dist/index.min.cjs +0 -7
  8. package/dist/index.min.cjs.map +0 -1
  9. package/dist/index.min.js +0 -7
  10. package/dist/index.min.js.map +0 -1
  11. package/dist/pb-ui.js +0 -13061
  12. package/dist/pb-ui.js.map +0 -1
  13. package/dist/pb-ui.min.js +0 -7
  14. package/dist/pb-ui.min.js.map +0 -1
  15. package/es/core/Pagebuilder/PagebuilderClass.d.ts +0 -15
  16. package/es/core/Pagebuilder/PagebuilderClass.js +0 -42
  17. package/es/core/Pagebuilder/index.d.ts +0 -3
  18. package/es/core/Pagebuilder/index.js +0 -96
  19. package/es/core/Pagebuilder/type.d.ts +0 -55
  20. package/es/core/Pagebuilder/type.js +0 -1
  21. package/es/core/components/SxpPageCore/index.d.ts +0 -12
  22. package/es/core/components/SxpPageCore/index.js +0 -26
  23. package/es/core/components/SxpPageRender/ExpandableText.d.ts +0 -14
  24. package/es/core/components/SxpPageRender/ExpandableText.js +0 -42
  25. package/es/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +0 -6
  26. package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +0 -19
  27. package/es/core/components/SxpPageRender/Hashtag/index.d.ts +0 -12
  28. package/es/core/components/SxpPageRender/Hashtag/index.js +0 -40
  29. package/es/core/components/SxpPageRender/LikeButton/index.d.ts +0 -11
  30. package/es/core/components/SxpPageRender/LikeButton/index.js +0 -58
  31. package/es/core/components/SxpPageRender/Modal/index.d.ts +0 -11
  32. package/es/core/components/SxpPageRender/Modal/index.js +0 -48
  33. package/es/core/components/SxpPageRender/Navbar.d.ts +0 -9
  34. package/es/core/components/SxpPageRender/Navbar.js +0 -10
  35. package/es/core/components/SxpPageRender/Nudge/index.d.ts +0 -24
  36. package/es/core/components/SxpPageRender/Nudge/index.js +0 -13
  37. package/es/core/components/SxpPageRender/PictureGroup/Picture.d.ts +0 -8
  38. package/es/core/components/SxpPageRender/PictureGroup/Picture.js +0 -51
  39. package/es/core/components/SxpPageRender/PictureGroup/index.d.ts +0 -13
  40. package/es/core/components/SxpPageRender/PictureGroup/index.js +0 -28
  41. package/es/core/components/SxpPageRender/Popup/index.d.ts +0 -3
  42. package/es/core/components/SxpPageRender/Popup/index.js +0 -62
  43. package/es/core/components/SxpPageRender/RenderCard.d.ts +0 -11
  44. package/es/core/components/SxpPageRender/RenderCard.js +0 -43
  45. package/es/core/components/SxpPageRender/ToggleButton/index.d.ts +0 -10
  46. package/es/core/components/SxpPageRender/ToggleButton/index.js +0 -13
  47. package/es/core/components/SxpPageRender/VideoWidget/index.d.ts +0 -12
  48. package/es/core/components/SxpPageRender/VideoWidget/index.js +0 -219
  49. package/es/core/components/SxpPageRender/WaterFall/List.d.ts +0 -4
  50. package/es/core/components/SxpPageRender/WaterFall/List.js +0 -183
  51. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +0 -4
  52. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +0 -319
  53. package/es/core/components/SxpPageRender/WaterFall/index.d.ts +0 -7
  54. package/es/core/components/SxpPageRender/WaterFall/index.js +0 -101
  55. package/es/core/components/SxpPageRender/WaterFall/preview.json +0 -1242
  56. package/es/core/components/SxpPageRender/fakeData.d.ts +0 -130
  57. package/es/core/components/SxpPageRender/fakeData.js +0 -899
  58. package/es/core/components/SxpPageRender/index.d.ts +0 -57
  59. package/es/core/components/SxpPageRender/index.js +0 -378
  60. package/es/core/components/SxpPageRender/typing.d.ts +0 -66
  61. package/es/core/components/SxpPageRender/typing.js +0 -1
  62. package/es/core/components/SxpPageRender/useIconLink.d.ts +0 -1
  63. package/es/core/components/SxpPageRender/useIconLink.js +0 -13
  64. package/es/core/context/DataSourceProvider.d.ts +0 -17
  65. package/es/core/context/DataSourceProvider.js +0 -45
  66. package/es/core/context/EditorContext.d.ts +0 -83
  67. package/es/core/context/EditorContext.js +0 -147
  68. package/es/core/context/EditorDataProvider.d.ts +0 -20
  69. package/es/core/context/EditorDataProvider.js +0 -23
  70. package/es/core/context/SxpDataSourceProvider.d.ts +0 -94
  71. package/es/core/context/SxpDataSourceProvider.js +0 -208
  72. package/es/core/create.d.ts +0 -37
  73. package/es/core/create.js +0 -4
  74. package/es/core/hoc/withBindDataSource.d.ts +0 -6
  75. package/es/core/hoc/withBindDataSource.js +0 -61
  76. package/es/core/hooks/index.d.ts +0 -4
  77. package/es/core/hooks/index.js +0 -4
  78. package/es/core/hooks/useCurrentNode.d.ts +0 -10
  79. package/es/core/hooks/useCurrentNode.js +0 -11
  80. package/es/core/hooks/useDataSource.d.ts +0 -2
  81. package/es/core/hooks/useDataSource.js +0 -6
  82. package/es/core/hooks/useEditor.d.ts +0 -1
  83. package/es/core/hooks/useEditor.js +0 -5
  84. package/es/core/hooks/useEventReport.d.ts +0 -5
  85. package/es/core/hooks/useEventReport.js +0 -73
  86. package/es/core/hooks/useOnScreen.d.ts +0 -2
  87. package/es/core/hooks/useOnScreen.js +0 -19
  88. package/es/core/hooks/useSxpDataSource.d.ts +0 -1
  89. package/es/core/hooks/useSxpDataSource.js +0 -5
  90. package/es/core/index.d.ts +0 -3
  91. package/es/core/index.js +0 -1
  92. package/es/core/schema.d.ts +0 -58
  93. package/es/core/schema.js +0 -1
  94. package/es/core/utils/event.d.ts +0 -7
  95. package/es/core/utils/event.js +0 -8
  96. package/es/core/utils/getDataByDS.d.ts +0 -6
  97. package/es/core/utils/getDataByDS.js +0 -39
  98. package/es/core/utils/getSxpTokenInfo.d.ts +0 -2
  99. package/es/core/utils/getSxpTokenInfo.js +0 -26
  100. package/es/core/utils/localStore.d.ts +0 -5
  101. package/es/core/utils/localStore.js +0 -22
  102. package/es/core/utils/materials.d.ts +0 -11
  103. package/es/core/utils/materials.js +0 -31
  104. package/es/core/utils/sessionStore.d.ts +0 -3
  105. package/es/core/utils/sessionStore.js +0 -26
  106. package/es/core/utils/tool.d.ts +0 -5
  107. package/es/core/utils/tool.js +0 -48
  108. package/es/core/utils/unzip.d.ts +0 -1
  109. package/es/core/utils/unzip.js +0 -10
  110. package/es/index.d.ts +0 -11
  111. package/es/index.js +0 -13
  112. package/es/materials/index.d.ts +0 -1
  113. package/es/materials/index.js +0 -1
  114. package/es/materials/sxp/HashTag/index.d.ts +0 -14
  115. package/es/materials/sxp/HashTag/index.js +0 -6
  116. package/es/materials/sxp/HashTag/material.d.ts +0 -2
  117. package/es/materials/sxp/HashTag/material.js +0 -52
  118. package/es/materials/sxp/HashTag/settingRender.d.ts +0 -125
  119. package/es/materials/sxp/HashTag/settingRender.js +0 -157
  120. package/es/materials/sxp/defaultSetting.d.ts +0 -11
  121. package/es/materials/sxp/defaultSetting.js +0 -7
  122. package/es/materials/sxp/index.d.ts +0 -3
  123. package/es/materials/sxp/index.js +0 -3
  124. package/es/materials/sxp/popup/AppointForm/index.d.ts +0 -18
  125. package/es/materials/sxp/popup/AppointForm/index.js +0 -76
  126. package/es/materials/sxp/popup/AppointForm/interactionRender.d.ts +0 -8
  127. package/es/materials/sxp/popup/AppointForm/interactionRender.js +0 -11
  128. package/es/materials/sxp/popup/AppointForm/material.d.ts +0 -2
  129. package/es/materials/sxp/popup/AppointForm/material.js +0 -35
  130. package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +0 -68
  131. package/es/materials/sxp/popup/AppointForm/settingRender.js +0 -93
  132. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +0 -34
  133. package/es/materials/sxp/popup/CommodityDetail/index.js +0 -110
  134. package/es/materials/sxp/popup/CommodityDetail/material.d.ts +0 -2
  135. package/es/materials/sxp/popup/CommodityDetail/material.js +0 -51
  136. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +0 -137
  137. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +0 -171
  138. package/es/materials/sxp/popup/CommodityDetailDiro/index.d.ts +0 -19
  139. package/es/materials/sxp/popup/CommodityDetailDiro/index.js +0 -163
  140. package/es/materials/sxp/popup/CommodityDetailDiro/material.d.ts +0 -2
  141. package/es/materials/sxp/popup/CommodityDetailDiro/material.js +0 -16
  142. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +0 -35
  143. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +0 -134
  144. package/es/materials/sxp/popup/CommodityDetailDiroNew/material.d.ts +0 -2
  145. package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +0 -61
  146. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +0 -137
  147. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +0 -175
  148. package/es/materials/sxp/popup/Prompt/index.d.ts +0 -11
  149. package/es/materials/sxp/popup/Prompt/index.js +0 -20
  150. package/es/materials/sxp/popup/Prompt/interactionRender.d.ts +0 -8
  151. package/es/materials/sxp/popup/Prompt/interactionRender.js +0 -11
  152. package/es/materials/sxp/popup/Prompt/material.d.ts +0 -2
  153. package/es/materials/sxp/popup/Prompt/material.js +0 -28
  154. package/es/materials/sxp/popup/Prompt/settingRender.d.ts +0 -12
  155. package/es/materials/sxp/popup/Prompt/settingRender.js +0 -18
  156. package/es/materials/sxp/popup/index.d.ts +0 -4
  157. package/es/materials/sxp/popup/index.js +0 -4
  158. package/es/materials/sxp/template/Appoint/index.d.ts +0 -15
  159. package/es/materials/sxp/template/Appoint/index.js +0 -16
  160. package/es/materials/sxp/template/Appoint/interactionRender.d.ts +0 -8
  161. package/es/materials/sxp/template/Appoint/interactionRender.js +0 -11
  162. package/es/materials/sxp/template/Appoint/material.d.ts +0 -2
  163. package/es/materials/sxp/template/Appoint/material.js +0 -46
  164. package/es/materials/sxp/template/Commodity/index.d.ts +0 -15
  165. package/es/materials/sxp/template/Commodity/index.js +0 -27
  166. package/es/materials/sxp/template/Commodity/interactionRender.d.ts +0 -8
  167. package/es/materials/sxp/template/Commodity/interactionRender.js +0 -11
  168. package/es/materials/sxp/template/Commodity/material.d.ts +0 -2
  169. package/es/materials/sxp/template/Commodity/material.js +0 -52
  170. package/es/materials/sxp/template/CommodityDiro/index.d.ts +0 -15
  171. package/es/materials/sxp/template/CommodityDiro/index.js +0 -27
  172. package/es/materials/sxp/template/CommodityDiro/interactionRender.d.ts +0 -8
  173. package/es/materials/sxp/template/CommodityDiro/interactionRender.js +0 -11
  174. package/es/materials/sxp/template/CommodityDiro/material.d.ts +0 -2
  175. package/es/materials/sxp/template/CommodityDiro/material.js +0 -52
  176. package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +0 -15
  177. package/es/materials/sxp/template/CommodityDiroNew/index.js +0 -27
  178. package/es/materials/sxp/template/CommodityDiroNew/interactionRender.d.ts +0 -8
  179. package/es/materials/sxp/template/CommodityDiroNew/interactionRender.js +0 -11
  180. package/es/materials/sxp/template/CommodityDiroNew/material.d.ts +0 -2
  181. package/es/materials/sxp/template/CommodityDiroNew/material.js +0 -53
  182. package/es/materials/sxp/template/Link/index.d.ts +0 -14
  183. package/es/materials/sxp/template/Link/index.js +0 -32
  184. package/es/materials/sxp/template/Link/material.d.ts +0 -2
  185. package/es/materials/sxp/template/Link/material.js +0 -44
  186. package/es/materials/sxp/template/MultiCommodity/index.d.ts +0 -16
  187. package/es/materials/sxp/template/MultiCommodity/index.js +0 -52
  188. package/es/materials/sxp/template/MultiCommodity/interactionRender.d.ts +0 -8
  189. package/es/materials/sxp/template/MultiCommodity/interactionRender.js +0 -11
  190. package/es/materials/sxp/template/MultiCommodity/material.d.ts +0 -2
  191. package/es/materials/sxp/template/MultiCommodity/material.js +0 -52
  192. package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +0 -16
  193. package/es/materials/sxp/template/MultiCommodityDiro/index.js +0 -51
  194. package/es/materials/sxp/template/MultiCommodityDiro/interactionRender.d.ts +0 -8
  195. package/es/materials/sxp/template/MultiCommodityDiro/interactionRender.js +0 -11
  196. package/es/materials/sxp/template/MultiCommodityDiro/material.d.ts +0 -2
  197. package/es/materials/sxp/template/MultiCommodityDiro/material.js +0 -52
  198. package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +0 -16
  199. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +0 -52
  200. package/es/materials/sxp/template/MultiCommodityDiroNew/interactionRender.d.ts +0 -8
  201. package/es/materials/sxp/template/MultiCommodityDiroNew/interactionRender.js +0 -11
  202. package/es/materials/sxp/template/MultiCommodityDiroNew/material.d.ts +0 -2
  203. package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +0 -53
  204. package/es/materials/sxp/template/components/EventProvider.d.ts +0 -13
  205. package/es/materials/sxp/template/components/EventProvider.js +0 -47
  206. package/es/materials/sxp/template/components/Img.d.ts +0 -10
  207. package/es/materials/sxp/template/components/Img.js +0 -19
  208. package/es/materials/sxp/template/components/Scroll.d.ts +0 -10
  209. package/es/materials/sxp/template/components/Scroll.js +0 -10
  210. package/es/materials/sxp/template/components/settingRender.d.ts +0 -129
  211. package/es/materials/sxp/template/components/settingRender.js +0 -219
  212. package/es/materials/sxp/template/components/typing.d.ts +0 -6
  213. package/es/materials/sxp/template/components/typing.js +0 -1
  214. package/es/materials/sxp/template/index.d.ts +0 -8
  215. package/es/materials/sxp/template/index.js +0 -8
  216. package/lib/core/Pagebuilder/PagebuilderClass.d.ts +0 -15
  217. package/lib/core/Pagebuilder/PagebuilderClass.js +0 -45
  218. package/lib/core/Pagebuilder/index.d.ts +0 -3
  219. package/lib/core/Pagebuilder/index.js +0 -99
  220. package/lib/core/Pagebuilder/type.d.ts +0 -55
  221. package/lib/core/Pagebuilder/type.js +0 -2
  222. package/lib/core/components/SxpPageCore/index.d.ts +0 -12
  223. package/lib/core/components/SxpPageCore/index.js +0 -29
  224. package/lib/core/components/SxpPageRender/ExpandableText.d.ts +0 -14
  225. package/lib/core/components/SxpPageRender/ExpandableText.js +0 -45
  226. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +0 -6
  227. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +0 -22
  228. package/lib/core/components/SxpPageRender/Hashtag/index.d.ts +0 -12
  229. package/lib/core/components/SxpPageRender/Hashtag/index.js +0 -43
  230. package/lib/core/components/SxpPageRender/LikeButton/index.d.ts +0 -11
  231. package/lib/core/components/SxpPageRender/LikeButton/index.js +0 -60
  232. package/lib/core/components/SxpPageRender/Modal/index.d.ts +0 -11
  233. package/lib/core/components/SxpPageRender/Modal/index.js +0 -51
  234. package/lib/core/components/SxpPageRender/Navbar.d.ts +0 -9
  235. package/lib/core/components/SxpPageRender/Navbar.js +0 -13
  236. package/lib/core/components/SxpPageRender/Nudge/index.d.ts +0 -24
  237. package/lib/core/components/SxpPageRender/Nudge/index.js +0 -16
  238. package/lib/core/components/SxpPageRender/PictureGroup/Picture.d.ts +0 -8
  239. package/lib/core/components/SxpPageRender/PictureGroup/Picture.js +0 -54
  240. package/lib/core/components/SxpPageRender/PictureGroup/index.d.ts +0 -13
  241. package/lib/core/components/SxpPageRender/PictureGroup/index.js +0 -31
  242. package/lib/core/components/SxpPageRender/Popup/index.d.ts +0 -3
  243. package/lib/core/components/SxpPageRender/Popup/index.js +0 -65
  244. package/lib/core/components/SxpPageRender/RenderCard.d.ts +0 -11
  245. package/lib/core/components/SxpPageRender/RenderCard.js +0 -46
  246. package/lib/core/components/SxpPageRender/ToggleButton/index.d.ts +0 -10
  247. package/lib/core/components/SxpPageRender/ToggleButton/index.js +0 -16
  248. package/lib/core/components/SxpPageRender/VideoWidget/index.d.ts +0 -12
  249. package/lib/core/components/SxpPageRender/VideoWidget/index.js +0 -222
  250. package/lib/core/components/SxpPageRender/WaterFall/List.d.ts +0 -4
  251. package/lib/core/components/SxpPageRender/WaterFall/List.js +0 -186
  252. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +0 -4
  253. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +0 -322
  254. package/lib/core/components/SxpPageRender/WaterFall/index.d.ts +0 -7
  255. package/lib/core/components/SxpPageRender/WaterFall/index.js +0 -104
  256. package/lib/core/components/SxpPageRender/WaterFall/preview.json +0 -1242
  257. package/lib/core/components/SxpPageRender/fakeData.d.ts +0 -130
  258. package/lib/core/components/SxpPageRender/fakeData.js +0 -902
  259. package/lib/core/components/SxpPageRender/index.d.ts +0 -57
  260. package/lib/core/components/SxpPageRender/index.js +0 -381
  261. package/lib/core/components/SxpPageRender/typing.d.ts +0 -66
  262. package/lib/core/components/SxpPageRender/typing.js +0 -2
  263. package/lib/core/components/SxpPageRender/useIconLink.d.ts +0 -1
  264. package/lib/core/components/SxpPageRender/useIconLink.js +0 -17
  265. package/lib/core/context/DataSourceProvider.d.ts +0 -17
  266. package/lib/core/context/DataSourceProvider.js +0 -48
  267. package/lib/core/context/EditorContext.d.ts +0 -83
  268. package/lib/core/context/EditorContext.js +0 -151
  269. package/lib/core/context/EditorDataProvider.d.ts +0 -20
  270. package/lib/core/context/EditorDataProvider.js +0 -28
  271. package/lib/core/context/SxpDataSourceProvider.d.ts +0 -94
  272. package/lib/core/context/SxpDataSourceProvider.js +0 -211
  273. package/lib/core/create.d.ts +0 -37
  274. package/lib/core/create.js +0 -8
  275. package/lib/core/hoc/withBindDataSource.d.ts +0 -6
  276. package/lib/core/hoc/withBindDataSource.js +0 -63
  277. package/lib/core/hooks/index.d.ts +0 -4
  278. package/lib/core/hooks/index.js +0 -7
  279. package/lib/core/hooks/useCurrentNode.d.ts +0 -10
  280. package/lib/core/hooks/useCurrentNode.js +0 -14
  281. package/lib/core/hooks/useDataSource.d.ts +0 -2
  282. package/lib/core/hooks/useDataSource.js +0 -9
  283. package/lib/core/hooks/useEditor.d.ts +0 -1
  284. package/lib/core/hooks/useEditor.js +0 -9
  285. package/lib/core/hooks/useEventReport.d.ts +0 -5
  286. package/lib/core/hooks/useEventReport.js +0 -77
  287. package/lib/core/hooks/useOnScreen.d.ts +0 -2
  288. package/lib/core/hooks/useOnScreen.js +0 -22
  289. package/lib/core/hooks/useSxpDataSource.d.ts +0 -1
  290. package/lib/core/hooks/useSxpDataSource.js +0 -9
  291. package/lib/core/index.d.ts +0 -3
  292. package/lib/core/index.js +0 -5
  293. package/lib/core/schema.d.ts +0 -58
  294. package/lib/core/schema.js +0 -2
  295. package/lib/core/utils/event.d.ts +0 -7
  296. package/lib/core/utils/event.js +0 -12
  297. package/lib/core/utils/getDataByDS.d.ts +0 -6
  298. package/lib/core/utils/getDataByDS.js +0 -41
  299. package/lib/core/utils/getSxpTokenInfo.d.ts +0 -2
  300. package/lib/core/utils/getSxpTokenInfo.js +0 -30
  301. package/lib/core/utils/localStore.d.ts +0 -5
  302. package/lib/core/utils/localStore.js +0 -28
  303. package/lib/core/utils/materials.d.ts +0 -11
  304. package/lib/core/utils/materials.js +0 -37
  305. package/lib/core/utils/sessionStore.d.ts +0 -3
  306. package/lib/core/utils/sessionStore.js +0 -32
  307. package/lib/core/utils/tool.d.ts +0 -5
  308. package/lib/core/utils/tool.js +0 -54
  309. package/lib/core/utils/unzip.d.ts +0 -1
  310. package/lib/core/utils/unzip.js +0 -15
  311. package/lib/index.d.ts +0 -11
  312. package/lib/index.js +0 -22
  313. package/lib/materials/index.d.ts +0 -1
  314. package/lib/materials/index.js +0 -4
  315. package/lib/materials/sxp/HashTag/index.d.ts +0 -14
  316. package/lib/materials/sxp/HashTag/index.js +0 -9
  317. package/lib/materials/sxp/HashTag/material.d.ts +0 -2
  318. package/lib/materials/sxp/HashTag/material.js +0 -56
  319. package/lib/materials/sxp/HashTag/settingRender.d.ts +0 -125
  320. package/lib/materials/sxp/HashTag/settingRender.js +0 -159
  321. package/lib/materials/sxp/defaultSetting.d.ts +0 -11
  322. package/lib/materials/sxp/defaultSetting.js +0 -10
  323. package/lib/materials/sxp/index.d.ts +0 -3
  324. package/lib/materials/sxp/index.js +0 -6
  325. package/lib/materials/sxp/popup/AppointForm/index.d.ts +0 -18
  326. package/lib/materials/sxp/popup/AppointForm/index.js +0 -78
  327. package/lib/materials/sxp/popup/AppointForm/interactionRender.d.ts +0 -8
  328. package/lib/materials/sxp/popup/AppointForm/interactionRender.js +0 -13
  329. package/lib/materials/sxp/popup/AppointForm/material.d.ts +0 -2
  330. package/lib/materials/sxp/popup/AppointForm/material.js +0 -39
  331. package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +0 -68
  332. package/lib/materials/sxp/popup/AppointForm/settingRender.js +0 -95
  333. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +0 -34
  334. package/lib/materials/sxp/popup/CommodityDetail/index.js +0 -112
  335. package/lib/materials/sxp/popup/CommodityDetail/material.d.ts +0 -2
  336. package/lib/materials/sxp/popup/CommodityDetail/material.js +0 -55
  337. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +0 -137
  338. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +0 -173
  339. package/lib/materials/sxp/popup/CommodityDetailDiro/index.d.ts +0 -19
  340. package/lib/materials/sxp/popup/CommodityDetailDiro/index.js +0 -165
  341. package/lib/materials/sxp/popup/CommodityDetailDiro/material.d.ts +0 -2
  342. package/lib/materials/sxp/popup/CommodityDetailDiro/material.js +0 -20
  343. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +0 -35
  344. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +0 -136
  345. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.d.ts +0 -2
  346. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +0 -65
  347. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +0 -137
  348. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +0 -177
  349. package/lib/materials/sxp/popup/Prompt/index.d.ts +0 -11
  350. package/lib/materials/sxp/popup/Prompt/index.js +0 -22
  351. package/lib/materials/sxp/popup/Prompt/interactionRender.d.ts +0 -8
  352. package/lib/materials/sxp/popup/Prompt/interactionRender.js +0 -13
  353. package/lib/materials/sxp/popup/Prompt/material.d.ts +0 -2
  354. package/lib/materials/sxp/popup/Prompt/material.js +0 -32
  355. package/lib/materials/sxp/popup/Prompt/settingRender.d.ts +0 -12
  356. package/lib/materials/sxp/popup/Prompt/settingRender.js +0 -20
  357. package/lib/materials/sxp/popup/index.d.ts +0 -4
  358. package/lib/materials/sxp/popup/index.js +0 -7
  359. package/lib/materials/sxp/template/Appoint/index.d.ts +0 -15
  360. package/lib/materials/sxp/template/Appoint/index.js +0 -18
  361. package/lib/materials/sxp/template/Appoint/interactionRender.d.ts +0 -8
  362. package/lib/materials/sxp/template/Appoint/interactionRender.js +0 -13
  363. package/lib/materials/sxp/template/Appoint/material.d.ts +0 -2
  364. package/lib/materials/sxp/template/Appoint/material.js +0 -50
  365. package/lib/materials/sxp/template/Commodity/index.d.ts +0 -15
  366. package/lib/materials/sxp/template/Commodity/index.js +0 -29
  367. package/lib/materials/sxp/template/Commodity/interactionRender.d.ts +0 -8
  368. package/lib/materials/sxp/template/Commodity/interactionRender.js +0 -13
  369. package/lib/materials/sxp/template/Commodity/material.d.ts +0 -2
  370. package/lib/materials/sxp/template/Commodity/material.js +0 -56
  371. package/lib/materials/sxp/template/CommodityDiro/index.d.ts +0 -15
  372. package/lib/materials/sxp/template/CommodityDiro/index.js +0 -29
  373. package/lib/materials/sxp/template/CommodityDiro/interactionRender.d.ts +0 -8
  374. package/lib/materials/sxp/template/CommodityDiro/interactionRender.js +0 -13
  375. package/lib/materials/sxp/template/CommodityDiro/material.d.ts +0 -2
  376. package/lib/materials/sxp/template/CommodityDiro/material.js +0 -56
  377. package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +0 -15
  378. package/lib/materials/sxp/template/CommodityDiroNew/index.js +0 -29
  379. package/lib/materials/sxp/template/CommodityDiroNew/interactionRender.d.ts +0 -8
  380. package/lib/materials/sxp/template/CommodityDiroNew/interactionRender.js +0 -13
  381. package/lib/materials/sxp/template/CommodityDiroNew/material.d.ts +0 -2
  382. package/lib/materials/sxp/template/CommodityDiroNew/material.js +0 -57
  383. package/lib/materials/sxp/template/Link/index.d.ts +0 -14
  384. package/lib/materials/sxp/template/Link/index.js +0 -34
  385. package/lib/materials/sxp/template/Link/material.d.ts +0 -2
  386. package/lib/materials/sxp/template/Link/material.js +0 -48
  387. package/lib/materials/sxp/template/MultiCommodity/index.d.ts +0 -16
  388. package/lib/materials/sxp/template/MultiCommodity/index.js +0 -54
  389. package/lib/materials/sxp/template/MultiCommodity/interactionRender.d.ts +0 -8
  390. package/lib/materials/sxp/template/MultiCommodity/interactionRender.js +0 -13
  391. package/lib/materials/sxp/template/MultiCommodity/material.d.ts +0 -2
  392. package/lib/materials/sxp/template/MultiCommodity/material.js +0 -56
  393. package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +0 -16
  394. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +0 -53
  395. package/lib/materials/sxp/template/MultiCommodityDiro/interactionRender.d.ts +0 -8
  396. package/lib/materials/sxp/template/MultiCommodityDiro/interactionRender.js +0 -13
  397. package/lib/materials/sxp/template/MultiCommodityDiro/material.d.ts +0 -2
  398. package/lib/materials/sxp/template/MultiCommodityDiro/material.js +0 -56
  399. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +0 -16
  400. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +0 -54
  401. package/lib/materials/sxp/template/MultiCommodityDiroNew/interactionRender.d.ts +0 -8
  402. package/lib/materials/sxp/template/MultiCommodityDiroNew/interactionRender.js +0 -13
  403. package/lib/materials/sxp/template/MultiCommodityDiroNew/material.d.ts +0 -2
  404. package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +0 -57
  405. package/lib/materials/sxp/template/components/EventProvider.d.ts +0 -13
  406. package/lib/materials/sxp/template/components/EventProvider.js +0 -49
  407. package/lib/materials/sxp/template/components/Img.d.ts +0 -10
  408. package/lib/materials/sxp/template/components/Img.js +0 -22
  409. package/lib/materials/sxp/template/components/Scroll.d.ts +0 -10
  410. package/lib/materials/sxp/template/components/Scroll.js +0 -13
  411. package/lib/materials/sxp/template/components/settingRender.d.ts +0 -129
  412. package/lib/materials/sxp/template/components/settingRender.js +0 -221
  413. package/lib/materials/sxp/template/components/typing.d.ts +0 -6
  414. package/lib/materials/sxp/template/components/typing.js +0 -2
  415. package/lib/materials/sxp/template/index.d.ts +0 -8
  416. package/lib/materials/sxp/template/index.js +0 -11
@@ -1,99 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Pagebuilder = void 0;
4
- const tslib_1 = require("tslib");
5
- const lodash_1 = require("lodash");
6
- const getDataByDS_1 = tslib_1.__importDefault(require("../utils/getDataByDS"));
7
- const getSxpTokenInfo_1 = require("../utils/getSxpTokenInfo");
8
- const tool_1 = require("../utils/tool");
9
- const unzip_1 = require("../utils/unzip");
10
- const PagebuilderClass_1 = tslib_1.__importDefault(require("./PagebuilderClass"));
11
- let builder = null;
12
- const Pagebuilder = {
13
- init: ({ appId, tenantId, env = 'live', apiUrl }) => {
14
- if (!builder) {
15
- builder = new PagebuilderClass_1.default();
16
- }
17
- if (apiUrl) {
18
- builder.setApiUrl(apiUrl);
19
- }
20
- builder.setAppId(appId);
21
- builder.setTenantId(tenantId);
22
- builder.setEnv(env);
23
- },
24
- getDetail: (path) => {
25
- if (!builder)
26
- return;
27
- const tenantId = builder.getTenantId();
28
- const appId = builder.getAppId();
29
- const apiUrl = builder.getApiUrl();
30
- return fetch(`${apiUrl}/storefront/v1/page?path=` + path, {
31
- method: 'get',
32
- headers: {
33
- 'x-tenant-id': tenantId || '',
34
- 'x-app-id': appId || ''
35
- }
36
- }).then((res) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
37
- var _a, _b;
38
- const result = yield res.json();
39
- const decodeData = (0, unzip_1.unzip)((_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.data);
40
- if (decodeData) {
41
- const { $store: __STORE__ } = yield (0, getDataByDS_1.default)(apiUrl, (_b = decodeData === null || decodeData === void 0 ? void 0 : decodeData.dataSource) !== null && _b !== void 0 ? _b : []);
42
- result.data.data = decodeData;
43
- Object.assign(result.data.data, { __STORE__ });
44
- }
45
- return result;
46
- }));
47
- },
48
- getSxpDetailByPageId: (id) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
49
- if (!builder)
50
- return;
51
- const tenantId = builder.getTenantId();
52
- const appId = builder.getAppId();
53
- const apiUrl = builder.getApiUrl();
54
- return fetch(`${apiUrl}/storefront/v1/page?id=` + id, {
55
- method: 'get',
56
- headers: {
57
- 'x-tenant-id': tenantId || '',
58
- 'x-app-id': appId || ''
59
- }
60
- }).then((res) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
61
- var _a;
62
- const result = yield res.json();
63
- if (!result.success) {
64
- return undefined;
65
- }
66
- const decodeData = (0, unzip_1.unzip)((_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.data);
67
- result.data.data = decodeData;
68
- return result.data;
69
- }));
70
- }),
71
- getSxpRecommendVideoData: (dataId) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
72
- if (!builder)
73
- return;
74
- const tokenData = yield (0, getSxpTokenInfo_1.getSxpTokenInfo)(builder, dataId);
75
- const request_id = (0, tool_1.uuid)(0, 0);
76
- let fake_session_id = window.localStorage.getItem('SXP_FAKE_SESSION_ID');
77
- if ((0, lodash_1.isEmpty)(fake_session_id)) {
78
- fake_session_id = (0, tool_1.uuid)(36, 62);
79
- window.localStorage.setItem('SXP_FAKE_SESSION_ID', fake_session_id);
80
- }
81
- const recommendVideoRes = yield fetch('https://dev-sxp-be.chatlabs.net/platform/open/rec/v1.2', {
82
- method: 'POST',
83
- headers: {
84
- 'Content-Type': 'application/json',
85
- token: tokenData.token,
86
- channel: tokenData.channel,
87
- userId: tokenData.userId
88
- },
89
- body: JSON.stringify({
90
- productUserId: fake_session_id,
91
- channel: tokenData.channel,
92
- maxRecs: 10,
93
- requestId: request_id
94
- })
95
- }).then((res) => res.json());
96
- return (recommendVideoRes === null || recommendVideoRes === void 0 ? void 0 : recommendVideoRes.data) || null;
97
- })
98
- };
99
- exports.Pagebuilder = Pagebuilder;
@@ -1,55 +0,0 @@
1
- interface initParams {
2
- appId: string;
3
- tenantId: string;
4
- apiUrl?: string;
5
- env?: 'dev' | 'staging' | 'live';
6
- }
7
- export interface PageData {
8
- id: string;
9
- name: string;
10
- data: any;
11
- page_type: PageType;
12
- seo_parameter: SeoParameter;
13
- utm_parameter: UtmParameter;
14
- data_sources: Array<DataSource>;
15
- sxp_parameter?: {
16
- bottom_image: string;
17
- default_recommend: number;
18
- personalized_recommend: number;
19
- placeholder_image: string;
20
- hash_tag_size: number;
21
- loading_image: string;
22
- };
23
- }
24
- export interface DataSource {
25
- type: number;
26
- url: string;
27
- headers: Record<string, string>;
28
- queries: Record<string, string>;
29
- }
30
- export interface PageType {
31
- id: string;
32
- name: string;
33
- path: string;
34
- operator_name: string;
35
- create_time: string;
36
- update_time: string;
37
- path_type: number;
38
- }
39
- export interface SeoParameter {
40
- title: string;
41
- description: string;
42
- key_word: string;
43
- }
44
- export interface UtmParameter {
45
- utm_source: string;
46
- utm_medium: string;
47
- utm_campaign: string;
48
- }
49
- interface PagebuilderProps {
50
- init: (e: initParams) => void;
51
- getDetail: (path: string) => Promise<any> | any;
52
- getSxpRecommendVideoData: (dataId: string) => Promise<any> | any;
53
- getSxpDetailByPageId: (id: string) => Promise<PageData | undefined>;
54
- }
55
- export default PagebuilderProps;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { PageData } from '../../../core/Pagebuilder/type';
3
- export interface ISxpPageCoreProps {
4
- data?: PageData;
5
- maxSize?: number;
6
- defaultSize?: number;
7
- hashTagSize?: number;
8
- loadingImage?: string;
9
- appDomain?: string;
10
- }
11
- declare const _default: React.NamedExoticComponent<ISxpPageCoreProps>;
12
- export default _default;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const react_1 = tslib_1.__importStar(require("react"));
5
- const SxpPageRender_1 = tslib_1.__importDefault(require("../SxpPageRender"));
6
- const Popup_1 = tslib_1.__importDefault(require("../SxpPageRender/Popup"));
7
- const _materials_ = tslib_1.__importStar(require("../../../materials"));
8
- const core_1 = require("../../../core");
9
- const SxpDataSourceProvider_1 = tslib_1.__importDefault(require("../../../core/context/SxpDataSourceProvider"));
10
- const RESOLVER = {};
11
- Object.values(_materials_).forEach((v) => {
12
- RESOLVER[v.extend.type] = v;
13
- });
14
- const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain }) => {
15
- var _a, _b, _c, _d, _e, _f;
16
- const utmVal = (0, react_1.useMemo)(() => {
17
- var _a;
18
- const searchParams = (location === null || location === void 0 ? void 0 : location.search) ? (_a = location === null || location === void 0 ? void 0 : location.search) === null || _a === void 0 ? void 0 : _a.replace('?', '') : '';
19
- return searchParams;
20
- }, []);
21
- return (react_1.default.createElement(core_1.EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
22
- react_1.default.createElement(SxpDataSourceProvider_1.default, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, render: ({ rtcList }) => {
23
- var _a;
24
- return (react_1.default.createElement(react_1.default.Fragment, null,
25
- react_1.default.createElement(SxpPageRender_1.default, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { data: rtcList, resolver: RESOLVER })),
26
- react_1.default.createElement(Popup_1.default, null)));
27
- } })));
28
- };
29
- exports.default = (0, react_1.memo)(SxpPageCore);
@@ -1,14 +0,0 @@
1
- import React, { CSSProperties } from 'react';
2
- interface IExpandableTextProps {
3
- maxStr?: number;
4
- text: string;
5
- style?: CSSProperties;
6
- className?: React.HTMLAttributes<HTMLParagraphElement>['className'];
7
- onClick?: () => void;
8
- foldText?: string;
9
- unfoldText?: string;
10
- isPost?: boolean;
11
- onChange?: (bool: boolean) => void;
12
- }
13
- declare const _default: React.NamedExoticComponent<IExpandableTextProps>;
14
- export default _default;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const react_1 = tslib_1.__importStar(require("react"));
5
- const limitTextLastWholeWord = (originalText = '', limit) => {
6
- const chineseRegex = /[\u4e00-\u9fa5]+/;
7
- if (chineseRegex.test(originalText)) {
8
- return originalText.slice(0, 54);
9
- }
10
- const words = originalText.split(' ');
11
- const newWords = [];
12
- for (let i = 0; i < words.length; i++) {
13
- newWords.push(words[i]);
14
- const tempText = newWords.join(' ');
15
- if (tempText.length >= limit)
16
- break;
17
- }
18
- const _words = newWords.length > 1 && newWords.length < words.length ? newWords.slice(0, newWords.length - 1) : newWords;
19
- return _words.join(' ') + ' ';
20
- };
21
- const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldText, unfoldText, isPost, onChange }) => {
22
- const [isShowMore, setIsShowMore] = (0, react_1.useState)(false);
23
- const [isShow, setIsShow] = (0, react_1.useState)(false);
24
- const lineClamp = Number((style === null || style === void 0 ? void 0 : style.lineClamp) || 2);
25
- const multiRow = (0, react_1.useRef)(null);
26
- const handleClick = (0, react_1.useCallback)(() => {
27
- setIsShowMore(!isShowMore);
28
- }, [isShowMore, onChange]);
29
- const renderText = (0, react_1.useMemo)(() => {
30
- return !isShowMore && text.length > maxStr ? limitTextLastWholeWord(text, maxStr) + '...' : text;
31
- }, [text, maxStr, isShowMore]);
32
- (0, react_1.useEffect)(() => {
33
- }, [multiRow, text, lineClamp, style, isPost]);
34
- return (react_1.default.createElement("div", { className: className, style: Object.assign({}, style), hidden: !text || text === '' },
35
- react_1.default.createElement("div", { ref: multiRow, style: {
36
- overflow: 'hidden',
37
- WebkitLineClamp: !isPost || isShowMore ? '' : lineClamp,
38
- textOverflow: 'ellipsis',
39
- display: '-webkit-box',
40
- WebkitBoxOrient: 'vertical',
41
- wordBreak: 'break-word'
42
- }, dangerouslySetInnerHTML: { __html: text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>') } }),
43
- text && isPost && (react_1.default.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer' }, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick }, isShowMore ? unfoldText || 'show less' : foldText || 'show more'))));
44
- };
45
- exports.default = (0, react_1.memo)(ExpandableText);
@@ -1,6 +0,0 @@
1
- import { FC } from 'react';
2
- interface IProps {
3
- imageUrl?: string;
4
- }
5
- declare const FingerSwipeTip: FC<IProps>;
6
- export default FingerSwipeTip;
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const react_1 = tslib_1.__importStar(require("react"));
5
- const useIconLink_1 = require("../useIconLink");
6
- const hooks_1 = require("../../../../core/hooks");
7
- const FingerSwipeTip = ({ imageUrl }) => {
8
- const [show, setShow] = (0, react_1.useState)(true);
9
- const { schema: { sxpPageConf } } = (0, hooks_1.useEditor)();
10
- (0, react_1.useEffect)(() => {
11
- setTimeout(() => {
12
- setShow(false);
13
- }, 2000);
14
- }, []);
15
- const FINGER_SWIPE_ICON = (0, useIconLink_1.useIconLink)('/pb_static/finger-swipe-tip.29dc3a48a3c746c906ea..png');
16
- const animationCls = (0, react_1.useMemo)(() => {
17
- return show ? 'pb-fadeIn' : 'pb-fadeOut';
18
- }, [show]);
19
- return (react_1.default.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}` },
20
- react_1.default.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON })));
21
- };
22
- exports.default = FingerSwipeTip;
@@ -1,12 +0,0 @@
1
- import React, { CSSProperties } from 'react';
2
- import { RecItemType } from '../typing';
3
- interface IHashtagProps {
4
- tags: string[];
5
- itemId: string;
6
- itemType: 'VIDEO' | 'PRODUCT' | null;
7
- index: number;
8
- rec: RecItemType;
9
- hashTagStyle?: CSSProperties;
10
- }
11
- declare const _default: React.NamedExoticComponent<IHashtagProps>;
12
- export default _default;
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const react_1 = tslib_1.__importStar(require("react"));
5
- const react_2 = require("swiper/react");
6
- const hooks_1 = require("../../../../core/hooks");
7
- const Scroll_1 = tslib_1.__importDefault(require("../../../../materials/sxp/template/components/Scroll"));
8
- const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
9
- const [isShowMore, setIsShowMore] = (0, react_1.useState)(false);
10
- const { setWaterFallData, setOpenHashtag, setCacheActiveIndex, waterFallData, setIsFromHashtag } = (0, hooks_1.useSxpDataSource)();
11
- const handleClickTag = (data) => {
12
- if (!waterFallData) {
13
- setCacheActiveIndex === null || setCacheActiveIndex === void 0 ? void 0 : setCacheActiveIndex(index);
14
- }
15
- else {
16
- setIsFromHashtag === null || setIsFromHashtag === void 0 ? void 0 : setIsFromHashtag(true);
17
- }
18
- if (itemType) {
19
- setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData({
20
- hashTag: data,
21
- itemId,
22
- itemType,
23
- rec
24
- });
25
- }
26
- else {
27
- setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData({
28
- hashTag: data,
29
- rec
30
- });
31
- }
32
- setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
33
- };
34
- const renderExpandButton = (0, react_1.useMemo)(() => {
35
- if (tags.length <= 6) {
36
- return null;
37
- }
38
- return (react_1.default.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
39
- }, [isShowMore, tags]);
40
- return (react_1.default.createElement("div", { className: 'clc-sxp-bottom-hashtag' },
41
- react_1.default.createElement(Scroll_1.default, null, tags === null || tags === void 0 ? void 0 : tags.map((item, index) => (react_1.default.createElement(react_2.SwiperSlide, { key: index, hidden: !isShowMore ? index >= 6 : false, className: 'clc-sxp-bottom-hashtag-item', style: hashTagStyle, onClick: () => handleClickTag(item) }, `#${item}`))))));
42
- };
43
- exports.default = (0, react_1.memo)(Hashtag);
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { RecItemType } from '../typing';
3
- interface ILikeProps extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
4
- activeIcon?: string;
5
- unActicveIcon?: string;
6
- active?: boolean;
7
- recData: RecItemType;
8
- position: number;
9
- }
10
- declare const _default: React.NamedExoticComponent<ILikeProps>;
11
- export default _default;
@@ -1,60 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const react_1 = tslib_1.__importStar(require("react"));
5
- const lodash_1 = require("lodash");
6
- const useIconLink_1 = require("../useIconLink");
7
- const hooks_1 = require("../../../../core/hooks");
8
- const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
9
- const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
10
- const LikeButton = (_a) => {
11
- var { active, activeIcon, unActicveIcon, recData, position } = _a, props = tslib_1.__rest(_a, ["active", "activeIcon", "unActicveIcon", "recData", "position"]);
12
- const { mutateLike, mutateUnlike, bffEventReport } = (0, hooks_1.useSxpDataSource)();
13
- const [state, setState] = (0, react_1.useState)(active);
14
- const likeIcon = (0, useIconLink_1.useIconLink)(defaultLikeIconPath);
15
- const unlikeIcon = (0, useIconLink_1.useIconLink)(defaultUnLikeIconPath);
16
- const handleClick = (0, lodash_1.debounce)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
17
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
18
- if (state) {
19
- setState(false);
20
- const result = (_d = (yield (mutateUnlike === null || mutateUnlike === void 0 ? void 0 : mutateUnlike({ videoItemId: (_c = (_b = recData.video) === null || _b === void 0 ? void 0 : _b.itemId) !== null && _c !== void 0 ? _c : '' })))) !== null && _d !== void 0 ? _d : false;
21
- bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
22
- eventInfo: {
23
- eventSubject: 'favoriteContentCanceled',
24
- eventDescription: 'This content was unfavorite by the user',
25
- contentId: (_f = (_e = recData.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
26
- contentName: (_h = (_g = recData.video) === null || _g === void 0 ? void 0 : _g.title) !== null && _h !== void 0 ? _h : '',
27
- contentTags: JSON.stringify((_k = (_j = recData.video) === null || _j === void 0 ? void 0 : _j.tags) !== null && _k !== void 0 ? _k : []),
28
- position: position + '',
29
- contentFormat: ((_l = recData.video) === null || _l === void 0 ? void 0 : _l.url) ? 'video' : 'image',
30
- traceInfo: (_m = recData.video) === null || _m === void 0 ? void 0 : _m.traceInfo
31
- }
32
- });
33
- if (!result) {
34
- setState(true);
35
- }
36
- }
37
- else {
38
- setState(true);
39
- const result = (_o = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _o !== void 0 ? _o : false;
40
- bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
41
- eventInfo: {
42
- eventSubject: 'favoriteContent',
43
- eventDescription: 'This content was favorite by the user',
44
- contentId: (_q = (_p = recData.video) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : '',
45
- contentName: (_s = (_r = recData.video) === null || _r === void 0 ? void 0 : _r.title) !== null && _s !== void 0 ? _s : '',
46
- contentTags: JSON.stringify((_u = (_t = recData.video) === null || _t === void 0 ? void 0 : _t.tags) !== null && _u !== void 0 ? _u : []),
47
- position: position + '',
48
- contentFormat: ((_v = recData.video) === null || _v === void 0 ? void 0 : _v.url) ? 'video' : 'image',
49
- traceInfo: (_w = recData.video) === null || _w === void 0 ? void 0 : _w.traceInfo
50
- }
51
- });
52
- if (!result) {
53
- setState(false);
54
- }
55
- }
56
- }), 200);
57
- return (react_1.default.createElement("button", Object.assign({}, props, { onClick: handleClick }),
58
- react_1.default.createElement("img", { style: { width: '100%', height: '100%', objectFit: 'contain' }, src: state ? activeIcon || likeIcon : unActicveIcon || unlikeIcon, alt: 'icon' })));
59
- };
60
- exports.default = (0, react_1.memo)(LikeButton);
@@ -1,11 +0,0 @@
1
- import React, { CSSProperties } from 'react';
2
- import { IPopupType } from '../../../../core/context/EditorContext';
3
- interface IModalProps {
4
- visible?: boolean;
5
- popup?: IPopupType;
6
- padding?: number | string;
7
- modalStyle?: CSSProperties;
8
- onClose?: () => void;
9
- }
10
- declare const _default: React.NamedExoticComponent<React.PropsWithChildren<IModalProps>>;
11
- export default _default;
@@ -1,51 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const lodash_1 = require("lodash");
5
- const react_1 = tslib_1.__importStar(require("react"));
6
- const ReactDOM = tslib_1.__importStar(require("react-dom"));
7
- const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8
- const Modal = ({ visible, onClose, children, modalStyle, padding, popup }) => {
9
- var _a;
10
- const [isShow, setIsShow] = (0, react_1.useState)(false);
11
- const modalEleRef = (0, react_1.useRef)(null);
12
- (0, react_1.useEffect)(() => {
13
- const parentNode = document.getElementById('sxp-render');
14
- const node = document.getElementById('pb-modal');
15
- if (node) {
16
- modalEleRef.current = node;
17
- }
18
- else {
19
- modalEleRef.current = document.createElement('div');
20
- modalEleRef.current.setAttribute('id', 'pb-modal');
21
- parentNode === null || parentNode === void 0 ? void 0 : parentNode.appendChild(modalEleRef.current);
22
- }
23
- }, []);
24
- const isOpen = (0, react_1.useMemo)(() => {
25
- return ((popup === null || popup === void 0 ? void 0 : popup.id) && (popup === null || popup === void 0 ? void 0 : popup.id) !== '') || visible;
26
- }, [visible, popup]);
27
- (0, react_1.useEffect)(() => {
28
- if (isOpen) {
29
- setIsShow(true);
30
- }
31
- else {
32
- setTimeout(() => {
33
- setIsShow(false);
34
- }, popup === null || popup === void 0 ? void 0 : popup.duration);
35
- }
36
- }, [isOpen, popup]);
37
- if (!modalEleRef.current)
38
- return null;
39
- const handleClose = (0, lodash_1.debounce)(() => {
40
- onClose === null || onClose === void 0 ? void 0 : onClose();
41
- }, 300);
42
- return ReactDOM.createPortal(react_1.default.createElement(react_1.default.Fragment, null, isShow && (react_1.default.createElement("div", { className: 'modal-bg', style: Object.assign({ display: 'flex', backgroundColor: isOpen ? 'rgba(0, 0, 0, 0.7)' : 'rgba(0, 0, 0, 0)' }, modalStyle), onClick: handleClose },
43
- react_1.default.createElement("div", { className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, style: { padding, animationDuration: ((_a = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _a !== void 0 ? _a : 0) / 1000 + 's' }, onClick: (e) => {
44
- e.stopPropagation();
45
- e.preventDefault();
46
- } },
47
- react_1.default.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
48
- react_1.default.createElement("img", { src: closeIcon, alt: 'close', className: 'modal-icon' })),
49
- children)))), modalEleRef.current);
50
- };
51
- exports.default = (0, react_1.memo)(Modal);
@@ -1,9 +0,0 @@
1
- import React, { CSSProperties } from 'react';
2
- interface INavbarProps {
3
- icon?: string;
4
- styles?: CSSProperties;
5
- textStyle?: CSSProperties;
6
- onClose?: () => void;
7
- }
8
- declare const _default: React.NamedExoticComponent<INavbarProps>;
9
- export default _default;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const react_1 = tslib_1.__importStar(require("react"));
5
- const hooks_1 = require("../../../core/hooks");
6
- const Navbar = ({ icon, styles, textStyle, onClose }) => {
7
- var _a;
8
- const { waterFallData, setOpenHashtag } = (0, hooks_1.useSxpDataSource)();
9
- return (react_1.default.createElement("div", { className: 'clc-sxp-nav', style: styles },
10
- react_1.default.createElement("img", { className: 'clc-sxp-nav-left', src: icon, alt: '', onClick: onClose }),
11
- react_1.default.createElement("div", { className: 'clc-sxp-nav-title', style: textStyle }, `#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : '标题'}`)));
12
- };
13
- exports.default = (0, react_1.memo)(Navbar);
@@ -1,24 +0,0 @@
1
- import { FC } from 'react';
2
- interface IProps {
3
- nudge?: {
4
- isOpen: boolean;
5
- icon?: string;
6
- backgroundColor: string;
7
- content?: string;
8
- marginBottom: number;
9
- borderRadius: number;
10
- size: {
11
- height: number;
12
- width: number;
13
- };
14
- textStyle: {
15
- color: string;
16
- fontFamily: string;
17
- fontSize: number;
18
- fontStyle: string;
19
- textAlign: string;
20
- };
21
- };
22
- }
23
- declare const Nudge: FC<IProps>;
24
- export default Nudge;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const react_1 = tslib_1.__importDefault(require("react"));
5
- const Nudge = ({ nudge }) => {
6
- return (react_1.default.createElement(react_1.default.Fragment, null, (nudge === null || nudge === void 0 ? void 0 : nudge.isOpen) && (react_1.default.createElement("div", { className: 'clc-sxp-bottom-nudge', style: {
7
- marginBottom: nudge === null || nudge === void 0 ? void 0 : nudge.marginBottom,
8
- width: nudge === null || nudge === void 0 ? void 0 : nudge.size.width,
9
- height: nudge === null || nudge === void 0 ? void 0 : nudge.size.height,
10
- backgroundColor: nudge === null || nudge === void 0 ? void 0 : nudge.backgroundColor,
11
- borderRadius: nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius
12
- } },
13
- (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? react_1.default.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover' } }) : null,
14
- react_1.default.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, nudge === null || nudge === void 0 ? void 0 : nudge.content)))));
15
- };
16
- exports.default = Nudge;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- interface IPictureProps {
3
- src: string;
4
- height: number;
5
- width: number;
6
- }
7
- declare const Picture: (props: IPictureProps) => React.JSX.Element;
8
- export default Picture;
@@ -1,54 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const react_1 = tslib_1.__importStar(require("react"));
5
- const hooks_1 = require("../../../../core/hooks");
6
- const Picture = (props) => {
7
- const { src, height, width } = props;
8
- const [blur, setBlur] = (0, react_1.useState)(false);
9
- const imgDom = (0, react_1.useRef)(null);
10
- const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
11
- const getAvifToPng = (0, react_1.useCallback)((src) => {
12
- return src;
13
- return src.indexOf('avif') !== -1 ? `${src}?imageMogr2/format/webm` : src;
14
- }, []);
15
- (0, react_1.useEffect)(() => {
16
- if (imgDom.current === null || src === '') {
17
- return;
18
- }
19
- const img = new Image();
20
- img.src = src;
21
- img.onload = () => {
22
- const aspectRatio = img.height / img.width;
23
- const targetAspectRatio = 16 / 9;
24
- const tolerance = 0.05;
25
- if (Math.abs(aspectRatio - targetAspectRatio) > tolerance) {
26
- setBlur(true);
27
- }
28
- };
29
- imgDom.current.src = getAvifToPng(src);
30
- }, [src, getAvifToPng]);
31
- return (react_1.default.createElement("div", { style: {
32
- overflow: 'hidden',
33
- height,
34
- width: '100%',
35
- position: 'relative'
36
- } },
37
- react_1.default.createElement("img", { ref: imgDom, loading: 'lazy', src: src ? getAvifToPng(src) : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image, style: {
38
- height: '100%',
39
- width: '100%',
40
- objectFit: 'cover',
41
- filter: blur ? 'blur(10px)' : 'none',
42
- transform: blur ? 'scale(1.2)' : 'none'
43
- } }),
44
- blur && (react_1.default.createElement("img", { ref: imgDom, src: getAvifToPng(src), loading: 'lazy', style: {
45
- width: '100%',
46
- objectFit: 'contain',
47
- position: 'absolute',
48
- top: '50%',
49
- transform: 'translateY(-50%)',
50
- left: 0,
51
- right: 0
52
- } }))));
53
- };
54
- exports.default = Picture;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { RecItemType } from '../typing';
3
- interface IPictureGroupProps {
4
- imgUrls?: string[];
5
- width: number;
6
- height: number;
7
- rec: RecItemType;
8
- index: number;
9
- onReportViewImageEnd: (rec: RecItemType) => void;
10
- onViewImageStartEvent: (index: number) => void;
11
- }
12
- declare const _default: React.NamedExoticComponent<IPictureGroupProps>;
13
- export default _default;