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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/README.md +2 -2
  2. package/dist/index.cjs +938 -389
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.css +24 -18
  5. package/dist/index.js +938 -389
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.min.cjs +3 -5
  8. package/dist/index.min.cjs.map +1 -1
  9. package/dist/index.min.js +3 -5
  10. package/dist/index.min.js.map +1 -1
  11. package/dist/pb-ui.js +938 -389
  12. package/dist/pb-ui.js.map +1 -1
  13. package/dist/pb-ui.min.js +3 -5
  14. package/dist/pb-ui.min.js.map +1 -1
  15. package/es/core/components/SxpPageCore/index.d.ts +1 -0
  16. package/es/core/components/SxpPageCore/index.js +2 -2
  17. package/es/core/components/SxpPageRender/ExpandableText.d.ts +1 -0
  18. package/es/core/components/SxpPageRender/ExpandableText.js +16 -9
  19. package/es/core/components/SxpPageRender/Hashtag/index.js +1 -1
  20. package/es/core/components/SxpPageRender/Modal/index.d.ts +2 -0
  21. package/es/core/components/SxpPageRender/Modal/index.js +7 -4
  22. package/es/core/components/SxpPageRender/Nudge/index.d.ts +24 -0
  23. package/es/core/components/SxpPageRender/Nudge/index.js +13 -0
  24. package/es/core/components/SxpPageRender/PictureGroup/index.js +11 -7
  25. package/es/core/components/SxpPageRender/Popup/index.js +3 -3
  26. package/es/core/components/SxpPageRender/VideoWidget/index.js +30 -21
  27. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +4 -3
  28. package/es/core/components/SxpPageRender/index.d.ts +20 -1
  29. package/es/core/components/SxpPageRender/index.js +19 -16
  30. package/es/core/components/SxpPageRender/typing.d.ts +1 -0
  31. package/es/core/components/SxpPageRender/useIconLink.d.ts +1 -1
  32. package/es/core/components/SxpPageRender/useIconLink.js +8 -3
  33. package/es/core/context/EditorContext.d.ts +5 -0
  34. package/es/core/context/EditorContext.js +21 -3
  35. package/es/core/context/SxpDataSourceProvider.js +1 -1
  36. package/es/core/create.d.ts +1 -1
  37. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -1
  38. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
  39. package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +35 -1
  40. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
  41. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +175 -0
  42. package/es/materials/sxp/template/Appoint/index.d.ts +2 -0
  43. package/es/materials/sxp/template/Appoint/index.js +4 -18
  44. package/es/materials/sxp/template/Appoint/material.js +22 -6
  45. package/es/materials/sxp/template/Commodity/index.d.ts +2 -0
  46. package/es/materials/sxp/template/Commodity/index.js +5 -22
  47. package/es/materials/sxp/template/Commodity/material.js +31 -6
  48. package/es/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
  49. package/es/materials/sxp/template/CommodityDiro/index.js +5 -24
  50. package/es/materials/sxp/template/CommodityDiro/material.js +30 -5
  51. package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
  52. package/es/materials/sxp/template/CommodityDiroNew/index.js +5 -24
  53. package/es/materials/sxp/template/CommodityDiroNew/material.js +32 -6
  54. package/es/materials/sxp/template/Link/index.d.ts +2 -0
  55. package/es/materials/sxp/template/Link/index.js +4 -13
  56. package/es/materials/sxp/template/Link/material.js +22 -5
  57. package/es/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
  58. package/es/materials/sxp/template/MultiCommodity/index.js +8 -24
  59. package/es/materials/sxp/template/MultiCommodity/material.js +30 -5
  60. package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
  61. package/es/materials/sxp/template/MultiCommodityDiro/index.js +8 -27
  62. package/es/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
  63. package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
  64. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +8 -25
  65. package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
  66. package/es/materials/sxp/template/components/EventProvider.d.ts +2 -1
  67. package/es/materials/sxp/template/components/EventProvider.js +5 -4
  68. package/es/materials/sxp/template/components/settingRender.d.ts +108 -0
  69. package/es/materials/sxp/template/components/settingRender.js +198 -0
  70. package/es/materials/sxp/template/components/typing.d.ts +6 -0
  71. package/es/materials/sxp/template/components/typing.js +1 -0
  72. package/lib/core/components/SxpPageCore/index.d.ts +1 -0
  73. package/lib/core/components/SxpPageCore/index.js +2 -2
  74. package/lib/core/components/SxpPageRender/ExpandableText.d.ts +1 -0
  75. package/lib/core/components/SxpPageRender/ExpandableText.js +16 -9
  76. package/lib/core/components/SxpPageRender/Hashtag/index.js +1 -1
  77. package/lib/core/components/SxpPageRender/Modal/index.d.ts +2 -0
  78. package/lib/core/components/SxpPageRender/Modal/index.js +7 -4
  79. package/lib/core/components/SxpPageRender/Nudge/index.d.ts +24 -0
  80. package/lib/core/components/SxpPageRender/Nudge/index.js +16 -0
  81. package/lib/core/components/SxpPageRender/PictureGroup/index.js +10 -6
  82. package/lib/core/components/SxpPageRender/Popup/index.js +3 -3
  83. package/lib/core/components/SxpPageRender/VideoWidget/index.js +30 -21
  84. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +3 -2
  85. package/lib/core/components/SxpPageRender/index.d.ts +20 -1
  86. package/lib/core/components/SxpPageRender/index.js +19 -16
  87. package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
  88. package/lib/core/components/SxpPageRender/useIconLink.d.ts +1 -1
  89. package/lib/core/components/SxpPageRender/useIconLink.js +8 -3
  90. package/lib/core/context/EditorContext.d.ts +5 -0
  91. package/lib/core/context/EditorContext.js +21 -3
  92. package/lib/core/context/SxpDataSourceProvider.js +1 -1
  93. package/lib/core/create.d.ts +1 -1
  94. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -1
  95. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
  96. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +35 -1
  97. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
  98. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +177 -0
  99. package/lib/materials/sxp/template/Appoint/index.d.ts +2 -0
  100. package/lib/materials/sxp/template/Appoint/index.js +4 -18
  101. package/lib/materials/sxp/template/Appoint/material.js +22 -6
  102. package/lib/materials/sxp/template/Commodity/index.d.ts +2 -0
  103. package/lib/materials/sxp/template/Commodity/index.js +5 -22
  104. package/lib/materials/sxp/template/Commodity/material.js +31 -6
  105. package/lib/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
  106. package/lib/materials/sxp/template/CommodityDiro/index.js +5 -24
  107. package/lib/materials/sxp/template/CommodityDiro/material.js +30 -5
  108. package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
  109. package/lib/materials/sxp/template/CommodityDiroNew/index.js +5 -24
  110. package/lib/materials/sxp/template/CommodityDiroNew/material.js +32 -6
  111. package/lib/materials/sxp/template/Link/index.d.ts +2 -0
  112. package/lib/materials/sxp/template/Link/index.js +4 -13
  113. package/lib/materials/sxp/template/Link/material.js +22 -5
  114. package/lib/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
  115. package/lib/materials/sxp/template/MultiCommodity/index.js +7 -23
  116. package/lib/materials/sxp/template/MultiCommodity/material.js +30 -5
  117. package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
  118. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +7 -26
  119. package/lib/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
  120. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
  121. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -24
  122. package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
  123. package/lib/materials/sxp/template/components/EventProvider.d.ts +2 -1
  124. package/lib/materials/sxp/template/components/EventProvider.js +4 -3
  125. package/lib/materials/sxp/template/components/settingRender.d.ts +108 -0
  126. package/lib/materials/sxp/template/components/settingRender.js +200 -0
  127. package/lib/materials/sxp/template/components/typing.d.ts +6 -0
  128. package/lib/materials/sxp/template/components/typing.js +2 -0
  129. package/package.json +2 -1
@@ -6,6 +6,7 @@ export interface ISxpPageCoreProps {
6
6
  defaultSize?: number;
7
7
  hashTagSize?: number;
8
8
  loadingImage?: string;
9
+ appDomain?: string;
9
10
  }
10
11
  declare const _default: React.NamedExoticComponent<ISxpPageCoreProps>;
11
12
  export default _default;
@@ -8,7 +8,7 @@ const RESOLVER = {};
8
8
  Object.values(_materials_).forEach((v) => {
9
9
  RESOLVER[v.extend.type] = v;
10
10
  });
11
- const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage }) => {
11
+ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain }) => {
12
12
  var _a, _b, _c, _d, _e, _f;
13
13
  const utmVal = useMemo(() => {
14
14
  var _a;
@@ -16,7 +16,7 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
16
16
  return searchParams;
17
17
  }, []);
18
18
  return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
19
- React.createElement(SxpDataSourceProvider, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, render: ({ rtcList }) => {
19
+ React.createElement(SxpDataSourceProvider, { 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 }) => {
20
20
  var _a;
21
21
  return (React.createElement(React.Fragment, null,
22
22
  React.createElement(SxpPageRender, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { data: rtcList, resolver: RESOLVER })),
@@ -7,6 +7,7 @@ interface IExpandableTextProps {
7
7
  onClick?: () => void;
8
8
  foldText?: string;
9
9
  unfoldText?: string;
10
+ isPost?: boolean;
10
11
  }
11
12
  declare const _default: React.NamedExoticComponent<IExpandableTextProps>;
12
13
  export default _default;
@@ -15,7 +15,7 @@ const limitTextLastWholeWord = (originalText = '', limit) => {
15
15
  const _words = newWords.length > 1 && newWords.length < words.length ? newWords.slice(0, newWords.length - 1) : newWords;
16
16
  return _words.join(' ') + ' ';
17
17
  };
18
- const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldText, unfoldText }) => {
18
+ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldText, unfoldText, isPost }) => {
19
19
  const [isShowMore, setIsShowMore] = useState(true);
20
20
  const [isShow, setIsShow] = useState(false);
21
21
  const lineClamp = Number((style === null || style === void 0 ? void 0 : style.lineClamp) || 2);
@@ -27,19 +27,26 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
27
27
  return !isShowMore && text.length > maxStr ? limitTextLastWholeWord(text, maxStr) + '...' : text;
28
28
  }, [text, maxStr, isShowMore]);
29
29
  useEffect(() => {
30
- if (multiRow.current) {
30
+ if (multiRow.current && isPost) {
31
31
  setIsShowMore(true);
32
32
  setTimeout(() => {
33
+ var _a;
33
34
  setIsShow(false);
34
- const height = parseInt(getComputedStyle(multiRow.current).height);
35
- const lineHeight = parseInt(getComputedStyle(multiRow === null || multiRow === void 0 ? void 0 : multiRow.current).lineHeight);
36
- if (text && height > lineHeight * lineClamp) {
37
- setIsShowMore(false);
38
- setIsShow(true);
35
+ try {
36
+ const cs = (_a = window === null || window === void 0 ? void 0 : window.getComputedStyle) === null || _a === void 0 ? void 0 : _a.call(window, multiRow.current);
37
+ const height = parseFloat(cs === null || cs === void 0 ? void 0 : cs.height);
38
+ const lh = parseFloat(cs === null || cs === void 0 ? void 0 : cs.lineHeight);
39
+ const fs = parseFloat(cs === null || cs === void 0 ? void 0 : cs.fontSize) + 4;
40
+ const lineHeight = isNaN(lh) ? fs : lh;
41
+ if (text && height > lineHeight * lineClamp) {
42
+ setIsShowMore(false);
43
+ setIsShow(true);
44
+ }
39
45
  }
46
+ catch (_b) { }
40
47
  }, 100);
41
48
  }
42
- }, [multiRow, text, lineClamp, style]);
49
+ }, [multiRow, text, lineClamp, style, isPost]);
43
50
  return (React.createElement("div", { className: className, style: Object.assign({}, style) },
44
51
  React.createElement("div", { ref: multiRow, style: {
45
52
  overflow: 'hidden',
@@ -48,7 +55,7 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
48
55
  display: '-webkit-box',
49
56
  WebkitBoxOrient: 'vertical',
50
57
  wordBreak: 'break-word'
51
- } }, text),
58
+ }, dangerouslySetInnerHTML: { __html: text ? text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>') : React.createElement(React.Fragment, null) } }),
52
59
  isShow && text && (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer' }, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick }, isShowMore ? unfoldText || 'show less' : foldText || 'show more'))));
53
60
  };
54
61
  export default memo(ExpandableText);
@@ -4,7 +4,7 @@ import { useSxpDataSource } from '../../../../core/hooks';
4
4
  import Scroll from '../../../../materials/sxp/template/components/Scroll';
5
5
  const Hashtag = ({ tags, itemId, itemType, index, rec }) => {
6
6
  const [isShowMore, setIsShowMore] = useState(false);
7
- const { setWaterFallData, setOpenHashtag, setCacheRtcList, setCacheActiveIndex, waterFallData, setIsFromHashtag } = useSxpDataSource();
7
+ const { setWaterFallData, setOpenHashtag, setCacheActiveIndex, waterFallData, setIsFromHashtag } = useSxpDataSource();
8
8
  const handleClickTag = (data) => {
9
9
  if (!waterFallData) {
10
10
  setCacheActiveIndex === null || setCacheActiveIndex === void 0 ? void 0 : setCacheActiveIndex(index);
@@ -1,8 +1,10 @@
1
1
  import React, { CSSProperties } from 'react';
2
+ import { IPopupAniType } from '../../../../core/context/EditorContext';
2
3
  interface IModalProps {
3
4
  visible?: boolean;
4
5
  padding?: number | string;
5
6
  modalStyle?: CSSProperties;
7
+ popupAniData?: IPopupAniType;
6
8
  onClose?: () => void;
7
9
  }
8
10
  declare const _default: React.NamedExoticComponent<React.PropsWithChildren<IModalProps>>;
@@ -1,8 +1,11 @@
1
1
  import { debounce } from 'lodash';
2
2
  import React, { memo, useEffect, useRef, useState } from 'react';
3
3
  import * as ReactDOM from 'react-dom';
4
+ import { useEditor } from '../../../../core/hooks';
4
5
  const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
5
- const Modal = ({ visible, onClose, children, modalStyle, padding }) => {
6
+ const Modal = ({ visible, onClose, children, modalStyle, padding, popupAniData }) => {
7
+ const { popupAni } = useEditor();
8
+ const cssAni = popupAniData !== null && popupAniData !== void 0 ? popupAniData : popupAni;
6
9
  const [isShow, setIsShow] = useState(false);
7
10
  const modalEleRef = useRef(null);
8
11
  useEffect(() => {
@@ -24,16 +27,16 @@ const Modal = ({ visible, onClose, children, modalStyle, padding }) => {
24
27
  else {
25
28
  setTimeout(() => {
26
29
  setIsShow(false);
27
- }, 1200);
30
+ }, cssAni === null || cssAni === void 0 ? void 0 : cssAni.duration);
28
31
  }
29
- }, [visible]);
32
+ }, [visible, cssAni]);
30
33
  if (!modalEleRef.current)
31
34
  return null;
32
35
  const handleClose = debounce(() => {
33
36
  onClose === null || onClose === void 0 ? void 0 : onClose();
34
37
  }, 300);
35
38
  return ReactDOM.createPortal(React.createElement("div", { className: 'modal-bg', style: Object.assign({ display: isShow ? 'flex' : 'none', backgroundColor: visible ? 'rgba(0, 0, 0, 0.7)' : 'rgba(0, 0, 0, 0)' }, modalStyle), onClick: handleClose },
36
- React.createElement("div", { className: `modal-container ${visible ? 'modal-popIn' : 'modal-popOut'}`, style: { padding }, onClick: (e) => {
39
+ React.createElement("div", { className: `modal-container ${visible ? 'modal-popIn' : 'modal-popOut'}`, style: { padding, animationDuration: (cssAni === null || cssAni === void 0 ? void 0 : cssAni.duration) / 1000 + 's' }, onClick: (e) => {
37
40
  e.stopPropagation();
38
41
  e.preventDefault();
39
42
  } },
@@ -0,0 +1,24 @@
1
+ import { FC } from 'react';
2
+ interface IProps {
3
+ nudge?: {
4
+ isOpen: boolean;
5
+ icon?: string;
6
+ backgroundColor: string;
7
+ content?: string;
8
+ marginBottom: number;
9
+ borderRadius: number;
10
+ size: {
11
+ height: number;
12
+ width: number;
13
+ };
14
+ textStyle: {
15
+ color: string;
16
+ fontFamily: string;
17
+ fontSize: number;
18
+ fontStyle: string;
19
+ textAlign: string;
20
+ };
21
+ };
22
+ }
23
+ declare const Nudge: FC<IProps>;
24
+ export default Nudge;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ const Nudge = ({ nudge }) => {
3
+ return (React.createElement("div", { hidden: !(nudge === null || nudge === void 0 ? void 0 : nudge.isOpen), className: 'clc-sxp-bottom-nudge', style: {
4
+ marginBottom: nudge === null || nudge === void 0 ? void 0 : nudge.marginBottom,
5
+ width: nudge === null || nudge === void 0 ? void 0 : nudge.size.width,
6
+ height: nudge === null || nudge === void 0 ? void 0 : nudge.size.height,
7
+ backgroundColor: nudge === null || nudge === void 0 ? void 0 : nudge.backgroundColor,
8
+ borderRadius: nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius
9
+ } },
10
+ (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover' } }) : null,
11
+ React.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, nudge === null || nudge === void 0 ? void 0 : nudge.content)));
12
+ };
13
+ export default Nudge;
@@ -1,4 +1,4 @@
1
- import React, { memo, useEffect } from 'react';
1
+ import React, { memo, useEffect, useState } from 'react';
2
2
  import { Autoplay, Pagination } from 'swiper/modules';
3
3
  import { Swiper, SwiperSlide, useSwiperSlide } from 'swiper/react';
4
4
  import Picture from './Picture';
@@ -6,16 +6,20 @@ import { useSxpDataSource } from '../../../../core/hooks';
6
6
  const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent }) => {
7
7
  const { isActive } = useSwiperSlide();
8
8
  const { sxpParameter, openHashtag } = useSxpDataSource();
9
+ const [isLoad, setIsLoad] = useState(false);
9
10
  useEffect(() => {
10
- if (!isActive)
11
- return;
12
- if (openHashtag) {
13
- onReportViewImageEnd(rec);
11
+ if (isLoad && isActive) {
12
+ if (openHashtag) {
13
+ onReportViewImageEnd(rec);
14
+ }
15
+ else {
16
+ onViewImageStartEvent(index);
17
+ }
14
18
  }
15
19
  else {
16
- onViewImageStartEvent(index);
20
+ setIsLoad(true);
17
21
  }
18
- }, [rec, isActive, onReportViewImageEnd, openHashtag, index, onViewImageStartEvent]);
22
+ }, [rec, isActive, onReportViewImageEnd, openHashtag, index, onViewImageStartEvent, isLoad]);
19
23
  if (!isActive) {
20
24
  return React.createElement("img", { src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image, style: { width, height, objectFit: 'cover' } });
21
25
  }
@@ -4,7 +4,7 @@ import { useEditor, useSxpDataSource } from '../../../../core/hooks';
4
4
  import withBindDataSource from '../../../../core/hoc/withBindDataSource';
5
5
  import { useEventReport } from '../../../../core/hooks/useEventReport';
6
6
  const Popup = () => {
7
- const { schema, resolver, popup } = useEditor();
7
+ const { schema, resolver, popup, popupAni } = useEditor();
8
8
  const { setPopupDetailData, popupDetailData, bffEventReport } = useSxpDataSource();
9
9
  const { productView } = useEventReport();
10
10
  const [visible, setVisible] = useState(false);
@@ -27,7 +27,7 @@ const Popup = () => {
27
27
  }, [popup]);
28
28
  const handleClose = () => {
29
29
  var _a, _b, _c;
30
- if (!popup || popup === '' || !visible || new Date() - curTimeRef.current < 1200) {
30
+ if (!popup || popup === '' || !visible || new Date() - curTimeRef.current < (popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration)) {
31
31
  return;
32
32
  }
33
33
  setVisible(false);
@@ -40,7 +40,7 @@ const Popup = () => {
40
40
  setTimeout(() => {
41
41
  window === null || window === void 0 ? void 0 : window.sxpPopup('');
42
42
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(null);
43
- }, 1200);
43
+ }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
44
44
  };
45
45
  const renderPopupDetail = useMemo(() => {
46
46
  var _a, _b, _c;
@@ -16,8 +16,10 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
16
16
  videoRef.current.muted = muted;
17
17
  }, [muted]);
18
18
  const handleVideoStart = useCallback(() => {
19
- var _a;
20
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
19
+ var _a, _b;
20
+ if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.readyState) < 2)
21
+ return;
22
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.play();
21
23
  }, []);
22
24
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
23
25
  const handlePlaying = useCallback(() => {
@@ -74,37 +76,38 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
74
76
  });
75
77
  }
76
78
  setTimeout(() => {
77
- var _a;
78
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
79
+ var _a, _b;
80
+ if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.readyState) < 2)
81
+ return;
82
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.play();
79
83
  }, 0);
80
84
  }, [index, bffEventReport, data, isLoad]);
81
85
  const handleClickVideo = useCallback((type) => () => {
82
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
86
+ var _a, _b, _c, _d, _e, _f;
87
+ if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.readyState) < 2)
88
+ return;
83
89
  if (!isLoad)
84
90
  return;
85
- const item = data[index];
86
- const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
87
- const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
88
- const isPause = (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.paused;
91
+ const isPause = (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.paused;
89
92
  switch (type) {
90
93
  case 'start':
91
94
  if (!isPause)
92
95
  return;
93
- (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.play();
96
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.play();
94
97
  setIsPauseVideo(false);
95
98
  break;
96
99
  case 'pause':
97
100
  if (isPause)
98
101
  return;
99
- (_g = videoRef.current) === null || _g === void 0 ? void 0 : _g.pause();
102
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.pause();
100
103
  setIsPauseVideo(true);
101
104
  break;
102
105
  default:
103
106
  if (isPause) {
104
- (_h = videoRef.current) === null || _h === void 0 ? void 0 : _h.play();
107
+ (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
105
108
  }
106
109
  else {
107
- (_j = videoRef.current) === null || _j === void 0 ? void 0 : _j.pause();
110
+ (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
108
111
  }
109
112
  setIsPauseVideo(!isPause);
110
113
  break;
@@ -135,14 +138,16 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
135
138
  }
136
139
  }, [data, index, bffEventReport]);
137
140
  useEffect(() => {
138
- var _a, _b, _c;
141
+ var _a, _b, _c, _d, _e, _f;
139
142
  if (data.length <= 0)
140
143
  return;
141
144
  if (!videoRef.current)
142
145
  return;
146
+ const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
143
147
  setIsPauseVideo(false);
144
148
  if (!isActive) {
145
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
149
+ if (!isPause && ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.readyState) >= 2)
150
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
146
151
  return;
147
152
  }
148
153
  if (!videoRef.current.src) {
@@ -152,10 +157,12 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
152
157
  videoRef.current.setAttribute('webkit-playsinline', 'true');
153
158
  }
154
159
  else {
160
+ if (((_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.readyState) < 2)
161
+ return;
155
162
  videoRef.current.play();
156
163
  }
157
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener('canplay', handleLoadedMetadata);
158
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.addEventListener('playing', handlePlaying);
164
+ (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('canplay', handleLoadedMetadata);
165
+ (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
159
166
  return () => {
160
167
  var _a, _b;
161
168
  (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('canplay', handleLoadedMetadata);
@@ -163,15 +170,17 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
163
170
  };
164
171
  }, [data, handleLoadedMetadata, handlePlaying, isActive, isLoad, rec.video]);
165
172
  useEffect(() => {
166
- var _a, _b, _c;
167
- const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
173
+ var _a, _b, _c, _d;
174
+ if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.readyState) < 2)
175
+ return;
176
+ const isPause = (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.paused;
168
177
  if (!isActive)
169
178
  return;
170
179
  if (!isPause && openHashtag) {
171
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.pause();
180
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
172
181
  }
173
182
  else if (!openHashtag) {
174
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.play();
183
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
175
184
  }
176
185
  }, [openHashtag, isActive]);
177
186
  useEffect(() => {
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useEffect, useRef, useMemo, useCallback } from 'react';
2
- import { useSxpDataSource } from '../../../../core/hooks';
2
+ import { useEditor, useSxpDataSource } from '../../../../core/hooks';
3
3
  import './WaterfallList.less';
4
4
  const WaterfallFlowItem = (props) => {
5
5
  const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView } = props;
@@ -143,6 +143,7 @@ const WaterfallFlowItem = (props) => {
143
143
  };
144
144
  export default function WaterfallList({ reportTagsView }) {
145
145
  var _a, _b, _c, _d, _e, _f;
146
+ const { popupAni } = useEditor();
146
147
  const { waterFallData, getRecommendVideos, loadingImage } = useSxpDataSource();
147
148
  const scrollParent = useRef(null);
148
149
  const [scrollTop, setScrollTop] = useState(0);
@@ -160,7 +161,7 @@ export default function WaterfallList({ reportTagsView }) {
160
161
  const [frameInfo, setFrameInfoInfo] = useState({ width: 0 });
161
162
  const rowsNum = useMemo(() => {
162
163
  const width = frameInfo.width || 0;
163
- if (width >= 1200) {
164
+ if (width >= (popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration)) {
164
165
  return 6;
165
166
  }
166
167
  else if (width >= 768 && width <= 1199) {
@@ -169,7 +170,7 @@ export default function WaterfallList({ reportTagsView }) {
169
170
  else {
170
171
  return 2;
171
172
  }
172
- }, [frameInfo]);
173
+ }, [frameInfo, popupAni]);
173
174
  const unitWidth = useMemo(() => {
174
175
  return frameInfo.width / rowsNum - 2;
175
176
  }, [rowsNum, frameInfo]);
@@ -10,7 +10,7 @@ interface ISxpPageRenderProps {
10
10
  likeIcon?: string;
11
11
  unlikeIcon?: string;
12
12
  color?: string;
13
- productPost?: string;
13
+ productPost?: any[];
14
14
  muteIconX?: number;
15
15
  muteIconY?: number;
16
16
  likeIconX?: number;
@@ -23,6 +23,25 @@ interface ISxpPageRenderProps {
23
23
  foldText: string;
24
24
  unfoldText: string;
25
25
  };
26
+ nudge?: {
27
+ isOpen: boolean;
28
+ icon?: string;
29
+ backgroundColor: string;
30
+ content?: string;
31
+ marginBottom: number;
32
+ borderRadius: number;
33
+ size: {
34
+ height: number;
35
+ width: number;
36
+ };
37
+ textStyle: {
38
+ color: string;
39
+ fontFamily: string;
40
+ fontSize: number;
41
+ fontStyle: string;
42
+ textAlign: string;
43
+ };
44
+ };
26
45
  containerHeight?: number;
27
46
  containerWidth?: number;
28
47
  tempMap?: Record<string, any>;
@@ -7,20 +7,20 @@ import VideoWidget from './VideoWidget';
7
7
  import ToggleButton from './ToggleButton';
8
8
  import FingerSwipeTip from './FingerSwipeTip';
9
9
  import PictureGroup from './PictureGroup';
10
- import ProductInfo from './ProductInfo';
11
10
  import Hashtag from './Hashtag';
12
11
  import Navbar from './Navbar';
13
12
  import left from './left.png';
14
13
  import RenderCard from './RenderCard';
15
14
  import { useIconLink } from './useIconLink';
16
15
  import WaterFall from './WaterFall';
17
- import CommodityDetailDiroNew from '../../../materials/sxp/popup/CommodityDetailDiroNew';
16
+ import Nudge from './Nudge';
18
17
  import SXP_EVENT_BUS, { SXP_EVENT_TYPE } from '../../../core/utils/event';
19
18
  import { useEditor, useSxpDataSource } from '../../../core/hooks';
20
19
  import { refreshFeSessionId } from '../../../core/utils/sessionStore';
21
20
  import './index.less';
22
21
  import { useEventReport } from '../../../core/hooks/useEventReport';
23
- const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, _schema }) => {
22
+ import withBindDataSource from '../../../core/hoc/withBindDataSource';
23
+ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema }) => {
24
24
  var _a, _b, _c, _d;
25
25
  const { schema } = useEditor();
26
26
  const [activeIndex, setActiveIndex] = useState(0);
@@ -149,39 +149,37 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
149
149
  return null;
150
150
  }, [globalConfig]);
151
151
  const renderContent = useCallback((rec, index) => {
152
- var _a, _b;
152
+ var _a, _b, _c, _d;
153
153
  if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
154
154
  return (React.createElement(VideoWidget, { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex }));
155
155
  }
156
156
  if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
157
157
  return (React.createElement(PictureGroup, { key: rec.video.itemId, imgUrls: rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent }));
158
158
  }
159
- if (rec.product) {
160
- switch (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) {
161
- case 'CommodityDetailDiroNew':
162
- return (React.createElement(CommodityDetailDiroNew, { key: rec.product.itemId, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: { height: '100%', overflow: 'auto' } }));
163
- case 'CommodityDetail':
164
- return (React.createElement(ProductInfo, { key: rec.product.itemId, viewTime: viewTime.current, data: rec, height: height, tipText: tipText, width: containerWidth }));
165
- default:
166
- return (React.createElement(ProductInfo, { key: rec.product.itemId, viewTime: viewTime.current, data: rec, height: height, tipText: tipText, width: containerWidth }));
167
- }
159
+ if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _c === void 0 ? void 0 : _c.length) > 0) {
160
+ return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, index) => {
161
+ var _a, _b, _c, _d, _e, _f;
162
+ const Component = withBindDataSource(resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type]);
163
+ return (React.createElement(Component, Object.assign({ key: index, textStyle: (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.textStyle, bindDatas: (_d = (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.bindDatas) !== null && _d !== void 0 ? _d : [] }, (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.props, { event: ((_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: { height: '100%', overflow: 'auto' }, data: rec, height: height, width: containerWidth })));
164
+ });
168
165
  }
169
166
  return null;
170
- }, [containerWidth, data, height, isMuted, activeIndex, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost, viewTime, tipText]);
167
+ }, [containerWidth, data, height, isMuted, activeIndex, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost, viewTime, tipText, resolver, schema]);
171
168
  const renderBottom = useCallback((rec, index) => {
172
169
  var _a, _b, _c, _d, _e, _f, _g;
173
170
  if (rec.video) {
174
171
  return (React.createElement(React.Fragment, null,
175
172
  ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
176
173
  React.createElement("div", { className: 'clc-sxp-bottom' },
174
+ React.createElement(Nudge, { nudge: nudge }),
177
175
  React.createElement("div", { className: 'clc-sxp-bottom-card' },
178
176
  React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })),
179
177
  React.createElement("div", { className: 'clc-sxp-bottom-text' },
180
- React.createElement(ExpandableText, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: descStyle })),
178
+ React.createElement(ExpandableText, { isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: descStyle })),
181
179
  React.createElement(Hashtag, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.url) ? 'VIDEO' : null, rec: rec }))));
182
180
  }
183
181
  return null;
184
- }, [descStyle, activeIndex, tempMap, resolver, tipText]);
182
+ }, [descStyle, activeIndex, tempMap, resolver, tipText, nudge]);
185
183
  const renderLikeButton = useCallback((rec) => {
186
184
  var _a, _b;
187
185
  if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
@@ -257,6 +255,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
257
255
  productView(item, item.product, (_c = item === null || item === void 0 ? void 0 : item.product) === null || _c === void 0 ? void 0 : _c.bindCta, viewTime.current);
258
256
  }
259
257
  };
258
+ useEffect(() => {
259
+ const item = data[activeIndex];
260
+ if (openHashtag)
261
+ handleReportProductView(item);
262
+ }, [openHashtag, data, activeIndex]);
260
263
  const handleViewImageStartEvent = (activeIndex) => {
261
264
  var _a, _b, _c, _d, _e, _f;
262
265
  const item = data[activeIndex];
@@ -39,6 +39,7 @@ export type ProductInfoType = {
39
39
  info: string;
40
40
  currency: string;
41
41
  bindCta?: CTAInfoType;
42
+ taxInfo?: string;
42
43
  };
43
44
  export type VideoInfoType = {
44
45
  bindCtaId: string;
@@ -1 +1 @@
1
- export declare function useIconLink(path: string): string;
1
+ export declare function useIconLink(path: string, domain?: string): string;
@@ -1,8 +1,13 @@
1
1
  import { useMemo } from 'react';
2
2
  import { useSxpDataSource } from '../../../core/hooks';
3
- export function useIconLink(path) {
3
+ export function useIconLink(path, domain) {
4
4
  const { appDomain } = useSxpDataSource();
5
5
  return useMemo(() => {
6
- return appDomain ? `https://${appDomain}${path}` : `${window.location.origin}${path}`;
7
- }, [appDomain, path]);
6
+ if (domain) {
7
+ return `https://${domain}${path}`;
8
+ }
9
+ else {
10
+ return appDomain ? `https://${appDomain}${path}` : `${window.location.origin}${path}`;
11
+ }
12
+ }, [appDomain, path, domain]);
8
13
  }
@@ -15,6 +15,10 @@ export interface IPageParams {
15
15
  h5_url?: string;
16
16
  mp_rul?: string;
17
17
  }
18
+ export type IPopupAniType = {
19
+ name: string;
20
+ duration: number;
21
+ };
18
22
  export interface IEditorContext {
19
23
  resolver: Record<string, MaterialComponet>;
20
24
  currentNode: any | null;
@@ -55,6 +59,7 @@ export interface IEditorContext {
55
59
  getCurPageConf?: any;
56
60
  popup: string;
57
61
  setPopup: React.Dispatch<React.SetStateAction<string>>;
62
+ popupAni: IPopupAniType;
58
63
  }
59
64
  export interface IEditorCoreProps {
60
65
  resolver: Record<string, MaterialComponet>;
@@ -45,7 +45,11 @@ export const EditorContext = React.createContext({
45
45
  undoStack: [item],
46
46
  redoStack: [],
47
47
  popup: '',
48
- setPopup: () => { }
48
+ setPopup: () => { },
49
+ popupAni: {
50
+ name: 'none',
51
+ duration: 0
52
+ }
49
53
  });
50
54
  const EditorCore = forwardRef(({ children, resolver, isSsr, schema, enableDataSource = true, utmVal }, ref) => {
51
55
  const [currentNode, setCurrentNode] = useState(null);
@@ -64,9 +68,22 @@ const EditorCore = forwardRef(({ children, resolver, isSsr, schema, enableDataSo
64
68
  const [undoStack, setUndoStack] = useState([[item]]);
65
69
  const [redoStack, setRedoStack] = useState([]);
66
70
  const [popup, setPopup] = useState('');
71
+ const [popupAni, setPopupAni] = useState({
72
+ name: 'none',
73
+ duration: 0
74
+ });
67
75
  typeof window !== 'undefined' &&
68
- (window.sxpPopup = (type) => {
76
+ (window.sxpPopup = (type, aniType) => {
69
77
  setPopup(type);
78
+ if (aniType && (aniType === null || aniType === void 0 ? void 0 : aniType.name) !== 'none') {
79
+ setPopupAni(Object.assign(Object.assign({}, popupAni), aniType));
80
+ }
81
+ else {
82
+ setPopupAni({
83
+ name: 'none',
84
+ duration: 0
85
+ });
86
+ }
70
87
  });
71
88
  typeof window !== 'undefined' &&
72
89
  (window.getJointUtmLink = (url) => {
@@ -135,7 +152,8 @@ const EditorCore = forwardRef(({ children, resolver, isSsr, schema, enableDataSo
135
152
  setUndoStack,
136
153
  getCurPageConf,
137
154
  popup,
138
- setPopup
155
+ setPopup,
156
+ popupAni
139
157
  } },
140
158
  React.createElement(DataSourceProvider, { isSsr: isSsr, enable: enableDataSource }, children)));
141
159
  });
@@ -168,7 +168,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
168
168
  setLoading(false);
169
169
  });
170
170
  }, [getRecommendVideos]);
171
- const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif');
171
+ const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
172
172
  return (React.createElement(SxpDataSourceContext.Provider, { value: {
173
173
  rtcList,
174
174
  setRtcList,