pb-sxp-ui 1.0.80 → 1.0.81

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 (76) hide show
  1. package/dist/index.cjs +321 -85
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +93 -0
  4. package/dist/index.js +322 -86
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +3 -3
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +3 -3
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +321 -85
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +3 -3
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/Pagebuilder/type.d.ts +7 -0
  15. package/es/core/components/Consent/index.d.ts +13 -0
  16. package/es/core/components/Consent/index.js +60 -0
  17. package/es/core/components/SxpPageCore/index.js +2 -2
  18. package/es/core/components/SxpPageRender/Tagbar.js +15 -1
  19. package/es/core/components/SxpPageRender/WaterFall/List.d.ts +1 -1
  20. package/es/core/components/SxpPageRender/WaterFall/List.js +15 -9
  21. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +1 -1
  22. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +18 -12
  23. package/es/core/components/SxpPageRender/WaterFall/index.js +7 -2
  24. package/es/core/components/SxpPageRender/index.d.ts +2 -1
  25. package/es/core/components/SxpPageRender/index.js +30 -10
  26. package/es/core/components/SxpPageRender/typing.d.ts +1 -0
  27. package/es/core/context/EditorDataProvider.d.ts +9 -0
  28. package/es/core/context/EditorDataProvider.js +13 -3
  29. package/es/core/context/SxpDataSourceProvider.d.ts +10 -0
  30. package/es/core/context/SxpDataSourceProvider.js +37 -21
  31. package/es/core/hooks/useEventReport.d.ts +1 -0
  32. package/es/core/hooks/useEventReport.js +13 -1
  33. package/es/core/utils/localStore.d.ts +1 -0
  34. package/es/core/utils/localStore.js +1 -0
  35. package/es/materials/sxp/Consent/index.d.ts +12 -0
  36. package/es/materials/sxp/Consent/index.js +5 -0
  37. package/es/materials/sxp/Consent/material.d.ts +2 -0
  38. package/es/materials/sxp/Consent/material.js +20 -0
  39. package/es/materials/sxp/Consent/settingRender.d.ts +31 -0
  40. package/es/materials/sxp/Consent/settingRender.js +39 -0
  41. package/es/materials/sxp/HashTag/index.d.ts +1 -1
  42. package/es/materials/sxp/HashTag/settingRender.js +1 -1
  43. package/es/materials/sxp/index.d.ts +1 -0
  44. package/es/materials/sxp/index.js +1 -0
  45. package/lib/core/Pagebuilder/type.d.ts +7 -0
  46. package/lib/core/components/Consent/index.d.ts +13 -0
  47. package/lib/core/components/Consent/index.js +63 -0
  48. package/lib/core/components/SxpPageCore/index.js +2 -2
  49. package/lib/core/components/SxpPageRender/Tagbar.js +15 -1
  50. package/lib/core/components/SxpPageRender/WaterFall/List.d.ts +1 -1
  51. package/lib/core/components/SxpPageRender/WaterFall/List.js +15 -9
  52. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +1 -1
  53. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +18 -12
  54. package/lib/core/components/SxpPageRender/WaterFall/index.js +7 -2
  55. package/lib/core/components/SxpPageRender/index.d.ts +2 -1
  56. package/lib/core/components/SxpPageRender/index.js +30 -10
  57. package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
  58. package/lib/core/context/EditorDataProvider.d.ts +9 -0
  59. package/lib/core/context/EditorDataProvider.js +13 -3
  60. package/lib/core/context/SxpDataSourceProvider.d.ts +10 -0
  61. package/lib/core/context/SxpDataSourceProvider.js +36 -20
  62. package/lib/core/hooks/useEventReport.d.ts +1 -0
  63. package/lib/core/hooks/useEventReport.js +13 -1
  64. package/lib/core/utils/localStore.d.ts +1 -0
  65. package/lib/core/utils/localStore.js +2 -1
  66. package/lib/materials/sxp/Consent/index.d.ts +12 -0
  67. package/lib/materials/sxp/Consent/index.js +8 -0
  68. package/lib/materials/sxp/Consent/material.d.ts +2 -0
  69. package/lib/materials/sxp/Consent/material.js +24 -0
  70. package/lib/materials/sxp/Consent/settingRender.d.ts +31 -0
  71. package/lib/materials/sxp/Consent/settingRender.js +41 -0
  72. package/lib/materials/sxp/HashTag/index.d.ts +1 -1
  73. package/lib/materials/sxp/HashTag/settingRender.js +1 -1
  74. package/lib/materials/sxp/index.d.ts +1 -0
  75. package/lib/materials/sxp/index.js +1 -0
  76. package/package.json +1 -1
@@ -6,6 +6,7 @@ const hooks_1 = require("../../../../core/hooks");
6
6
  require("./WaterfallList.less");
7
7
  const preview_json_1 = tslib_1.__importDefault(require("./preview.json"));
8
8
  const FormatImage_1 = tslib_1.__importDefault(require("../FormatImage"));
9
+ const css_1 = require("@emotion/css");
9
10
  const WaterfallFlowItem = (props) => {
10
11
  const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
11
12
  const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = (0, hooks_1.useSxpDataSource)();
@@ -142,8 +143,8 @@ const WaterfallFlowItem = (props) => {
142
143
  react_1.default.createElement("div", { className: 'waterFallList-content-listItem-info-price', hidden: !priceText, style: textStyles.price }, priceText))));
143
144
  };
144
145
  function WaterfallList(_a) {
145
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
146
- var { reportTagsView } = _a, props = tslib_1.__rest(_a, ["reportTagsView"]);
146
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
147
+ var { reportTagsView, showBanner } = _a, props = tslib_1.__rest(_a, ["reportTagsView", "showBanner"]);
147
148
  const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = (0, hooks_1.useSxpDataSource)();
148
149
  const scrollParent = (0, react_1.useRef)(null);
149
150
  const [scrollTop, setScrollTop] = (0, react_1.useState)(0);
@@ -314,24 +315,29 @@ function WaterfallList(_a) {
314
315
  return (react_1.default.createElement(react_1.default.Fragment, null, isLoadingData ? (react_1.default.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
315
316
  react_1.default.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (react_1.default.createElement("div", { className: 'waterFallList', ref: waterfallFlowDom },
316
317
  react_1.default.createElement("div", { className: 'waterFallList-scroll', ref: scrollParent },
317
- react_1.default.createElement("div", { className: 'waterFallList-info', style: (_b = props === null || props === void 0 ? void 0 : props.textStyles) === null || _b === void 0 ? void 0 : _b.hashTagDesc }, (_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.info),
318
- react_1.default.createElement("div", { hidden: !((_d = data === null || data === void 0 ? void 0 : data.tag) === null || _d === void 0 ? void 0 : _d.link), className: 'waterFallList-collection', style: Object.assign({}, (_e = props === null || props === void 0 ? void 0 : props.textStyles) === null || _e === void 0 ? void 0 : _e.hashTagLink), onClick: handleClickLink }, ((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.linkTitle) || 'Shop the collection'),
318
+ showBanner && ((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.picture) && (react_1.default.createElement(FormatImage_1.default, { className: (0, css_1.css)({
319
+ width: '100%',
320
+ objectFit: 'cover',
321
+ marginBottom: '20px'
322
+ }), src: (_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.picture })),
323
+ react_1.default.createElement("div", { className: 'waterFallList-info', style: (_d = props === null || props === void 0 ? void 0 : props.textStyles) === null || _d === void 0 ? void 0 : _d.hashTagDesc }, (_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.info),
324
+ react_1.default.createElement("div", { hidden: !((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.link), className: 'waterFallList-collection', style: Object.assign({}, (_g = props === null || props === void 0 ? void 0 : props.textStyles) === null || _g === void 0 ? void 0 : _g.hashTagLink), onClick: handleClickLink }, ((_h = data === null || data === void 0 ? void 0 : data.tag) === null || _h === void 0 ? void 0 : _h.linkTitle) || 'Shop the collection'),
319
325
  react_1.default.createElement("div", { className: 'waterFallList-content' }, list === null || list === void 0 ? void 0 :
320
326
  list.map((item, ind) => {
321
327
  var _a;
322
328
  return (react_1.default.createElement(WaterfallFlowItem, Object.assign({ key: ind, index: ind, rec: item, list: list, showBorder: scrollTop + ((_a = scrollParent === null || scrollParent === void 0 ? void 0 : scrollParent.current) === null || _a === void 0 ? void 0 : _a.clientHeight), style: styleList[ind], sizeChange: onSizeChange, unitWidth: unitWidth, reportTagsView: reportTagsView }, props)));
323
329
  }),
324
- react_1.default.createElement("div", { hidden: !((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link), style: {
330
+ react_1.default.createElement("div", { hidden: !((_j = data === null || data === void 0 ? void 0 : data.tag) === null || _j === void 0 ? void 0 : _j.link), style: {
325
331
  position: 'absolute',
326
332
  width: '100%',
327
- transform: `translate(0px,${(_m = ((_j = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current[((_h = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current) === null || _h === void 0 ? void 0 : _h.length) - 1]) === null || _j === void 0 ? void 0 : _j.top) +
328
- ((_l = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current[((_k = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current) === null || _k === void 0 ? void 0 : _k.length) - 1]) === null || _l === void 0 ? void 0 : _l.height)) !== null && _m !== void 0 ? _m : 0}px)`,
329
- height: ((_o = data === null || data === void 0 ? void 0 : data.tag) === null || _o === void 0 ? void 0 : _o.link)
330
- ? ((_p = buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) === null || _p === void 0 ? void 0 : _p.offsetHeight) || ((_q = props === null || props === void 0 ? void 0 : props.buttonBgStyle) === null || _q === void 0 ? void 0 : _q.height) || '100px'
333
+ transform: `translate(0px,${(_p = ((_l = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current[((_k = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current) === null || _k === void 0 ? void 0 : _k.length) - 1]) === null || _l === void 0 ? void 0 : _l.top) +
334
+ ((_o = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current[((_m = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current) === null || _m === void 0 ? void 0 : _m.length) - 1]) === null || _o === void 0 ? void 0 : _o.height)) !== null && _p !== void 0 ? _p : 0}px)`,
335
+ height: ((_q = data === null || data === void 0 ? void 0 : data.tag) === null || _q === void 0 ? void 0 : _q.link)
336
+ ? ((_r = buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) === null || _r === void 0 ? void 0 : _r.offsetHeight) || ((_s = props === null || props === void 0 ? void 0 : props.buttonBgStyle) === null || _s === void 0 ? void 0 : _s.height) || '100px'
331
337
  : 0
332
338
  } }))),
333
- react_1.default.createElement("div", { className: 'waterFallList-bottom', hidden: !((_r = data === null || data === void 0 ? void 0 : data.tag) === null || _r === void 0 ? void 0 : _r.link), style: props === null || props === void 0 ? void 0 : props.buttonBgStyle }),
334
- react_1.default.createElement("div", { ref: buttonRef, hidden: !((_s = data === null || data === void 0 ? void 0 : data.tag) === null || _s === void 0 ? void 0 : _s.link), className: 'waterFallList-btn-wrap', style: Object.assign(Object.assign({}, props === null || props === void 0 ? void 0 : props.buttonBgStyle), { height: 'auto', backgroundColor: 'transparent' }) },
335
- react_1.default.createElement("button", { className: 'waterFallList-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_t = data === null || data === void 0 ? void 0 : data.tag) === null || _t === void 0 ? void 0 : _t.linkTitle) || 'Shop the collection'))))));
339
+ react_1.default.createElement("div", { className: 'waterFallList-bottom', hidden: !((_t = data === null || data === void 0 ? void 0 : data.tag) === null || _t === void 0 ? void 0 : _t.link), style: props === null || props === void 0 ? void 0 : props.buttonBgStyle }),
340
+ react_1.default.createElement("div", { ref: buttonRef, hidden: !((_u = data === null || data === void 0 ? void 0 : data.tag) === null || _u === void 0 ? void 0 : _u.link), className: 'waterFallList-btn-wrap', style: Object.assign(Object.assign({}, props === null || props === void 0 ? void 0 : props.buttonBgStyle), { height: 'auto', backgroundColor: 'transparent' }) },
341
+ react_1.default.createElement("button", { className: 'waterFallList-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_v = data === null || data === void 0 ? void 0 : data.tag) === null || _v === void 0 ? void 0 : _v.linkTitle) || 'Shop the collection'))))));
336
342
  }
337
343
  exports.default = WaterfallList;
@@ -10,9 +10,11 @@ const WaterfallList_1 = tslib_1.__importDefault(require("./WaterfallList"));
10
10
  const left_png_1 = tslib_1.__importDefault(require("./left.png"));
11
11
  const List_1 = tslib_1.__importDefault(require("./List"));
12
12
  const hooks_1 = require("../../../../core/hooks");
13
+ const useEventReport_1 = require("../../../../core/hooks/useEventReport");
13
14
  const WaterFall = (props) => {
14
15
  var _a;
15
- const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport } = (0, hooks_1.useSxpDataSource)();
16
+ const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag } = (0, hooks_1.useSxpDataSource)();
17
+ const { backMainFeed } = (0, useEventReport_1.useEventReport)();
16
18
  const ref = (0, react_1.useRef)(null);
17
19
  const modalEleRef = (0, react_1.useRef)(null);
18
20
  const [viewTime, setViewTime] = (0, react_1.useState)();
@@ -33,6 +35,9 @@ const WaterFall = (props) => {
33
35
  if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
34
36
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
35
37
  }
38
+ if (!(themeTag === null || themeTag === void 0 ? void 0 : themeTag.current)) {
39
+ backMainFeed('branch', themeTag === null || themeTag === void 0 ? void 0 : themeTag.current, waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag);
40
+ }
36
41
  reportTagsView();
37
42
  setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData(undefined);
38
43
  setIsFromHashtag === null || setIsFromHashtag === void 0 ? void 0 : setIsFromHashtag(false);
@@ -100,6 +105,6 @@ const WaterFall = (props) => {
100
105
  display: openHashtag ? 'block' : 'none'
101
106
  } },
102
107
  react_1.default.createElement(Navbar_1.default, { icon: left_png_1.default, styles: { top: '32px' }, textStyle: (_a = props === null || props === void 0 ? void 0 : props.textStyles) === null || _a === void 0 ? void 0 : _a.hashTagTitle, onClose: handleClose }),
103
- (props === null || props === void 0 ? void 0 : props.isWaterfallFlow) === true || (props === null || props === void 0 ? void 0 : props.isWaterfallFlow) === undefined ? (react_1.default.createElement(List_1.default, Object.assign({ reportTagsView: reportTagsView }, props))) : (react_1.default.createElement(WaterfallList_1.default, Object.assign({ reportTagsView: reportTagsView }, props)))), modalEleRef.current);
108
+ (props === null || props === void 0 ? void 0 : props.openFixedSize) === true || (props === null || props === void 0 ? void 0 : props.openFixedSize) === undefined ? (react_1.default.createElement(List_1.default, Object.assign({ reportTagsView: reportTagsView }, props))) : (react_1.default.createElement(WaterfallList_1.default, Object.assign({ reportTagsView: reportTagsView }, props)))), modalEleRef.current);
104
109
  };
105
110
  exports.default = (0, react_1.memo)(WaterFall);
@@ -34,6 +34,7 @@ export interface ISxpPageRenderProps {
34
34
  likeIconYPosit?: string;
35
35
  likeIconXPosit?: string;
36
36
  swipeTipOffset?: number;
37
+ consent?: any[];
37
38
  };
38
39
  descStyle?: CSSProperties;
39
40
  tipText?: {
@@ -68,7 +69,7 @@ export interface ISxpPageRenderProps {
68
69
  ctaType?: string;
69
70
  _schema?: any;
70
71
  hashTagStyle?: CSSProperties;
71
- licenseUrl?: String;
72
+ licenseUrl?: string;
72
73
  }
73
74
  declare const SxpPageRender: FC<ISxpPageRenderProps>;
74
75
  export default SxpPageRender;
@@ -31,11 +31,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
31
31
  const viewImageStartTime = (0, react_1.useRef)(0);
32
32
  const [isInit, setIsInit] = (0, react_1.useState)(false);
33
33
  const [isMuted, setIsMuted] = (0, react_1.useState)(true);
34
- const curTime = (0, react_1.useRef)();
35
34
  const viewTime = (0, react_1.useRef)();
36
35
  const [isLoadMore, setIsLoadMore] = (0, react_1.useState)(false);
37
36
  const [isShowMore, setIsShowMore] = (0, react_1.useState)(false);
38
- const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport } = (0, hooks_1.useSxpDataSource)();
37
+ const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink } = (0, hooks_1.useSxpDataSource)();
38
+ const { backMainFeed } = (0, useEventReport_1.useEventReport)();
39
39
  const [videoRef, setVideoRef] = (0, react_1.useState)(null);
40
40
  const playerRef = (0, react_1.useRef)();
41
41
  const { productView } = (0, useEventReport_1.useEventReport)();
@@ -46,17 +46,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
46
46
  if (data.length <= 0) {
47
47
  return;
48
48
  }
49
- initTime();
49
+ (0, sessionStore_1.refreshFeSessionId)();
50
+ const now = new Date();
51
+ viewTime.current = now;
52
+ if (isInit) {
53
+ h5EnterLink === null || h5EnterLink === void 0 ? void 0 : h5EnterLink();
54
+ }
50
55
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
51
56
  eventName: 'PageView'
52
57
  });
53
58
  setIsInit(true);
54
- }, [data.length, bffFbReport]);
55
- const initTime = () => {
56
- curTime.current = new Date();
57
- viewTime.current = new Date();
58
- (0, sessionStore_1.refreshFeSessionId)();
59
- };
59
+ }, [data.length, bffFbReport, h5EnterLink, isInit]);
60
60
  const firstRef = (0, react_1.useRef)();
61
61
  (0, react_1.useEffect)(() => {
62
62
  var _a, _b, _c, _d;
@@ -149,13 +149,33 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
149
149
  handleH5EnterLink();
150
150
  handleViewImageStartEvent(activeIndex);
151
151
  event_1.default.emit(event_1.SXP_EVENT_TYPE.PAGE_DID_SHOW, item);
152
+ backMainFeed('external');
152
153
  }
153
154
  };
154
155
  document.addEventListener('visibilitychange', visibleChange);
155
156
  return () => {
156
157
  document.removeEventListener('visibilitychange', visibleChange);
157
158
  };
158
- }, [activeIndex, bffEventReport, curTime, data, handleH5EnterLink, popupDetailData, isFromHashtag, tempMap]);
159
+ }, [
160
+ activeIndex,
161
+ bffEventReport,
162
+ data,
163
+ handleH5EnterLink,
164
+ popupDetailData,
165
+ isFromHashtag,
166
+ tempMap,
167
+ curTime,
168
+ backMainFeed
169
+ ]);
170
+ (0, react_1.useEffect)(() => {
171
+ const initTime = () => {
172
+ backMainFeed('external');
173
+ };
174
+ window.addEventListener('pageshow', initTime);
175
+ return () => {
176
+ window.removeEventListener('pageshow', initTime);
177
+ };
178
+ }, []);
159
179
  const tagHeight = (0, react_1.useMemo)(() => {
160
180
  let h = 0;
161
181
  if (tagList.length > 0) {
@@ -3,6 +3,7 @@ export type TagType = {
3
3
  link: string;
4
4
  linkTitle: string;
5
5
  linkType: string;
6
+ picture?: string;
6
7
  };
7
8
  export type RecItemType = {
8
9
  position: string;
@@ -7,10 +7,19 @@ interface IEditorDataContext {
7
7
  placeholderImage: string;
8
8
  hashTagSize: number;
9
9
  loadingImage: string;
10
+ industry?: string;
11
+ privacyContent?: string;
12
+ privacyNecessity?: boolean;
13
+ privacyPolicyTitle?: string;
14
+ privacyPolicyUrl?: string;
15
+ privacyTitle?: string;
16
+ template?: any | null;
10
17
  };
11
18
  appDomain?: string;
12
19
  openHashtag?: boolean;
13
20
  setOpenHashtag?: React.Dispatch<React.SetStateAction<boolean>>;
21
+ openConsent?: boolean;
22
+ setOpenConsent?: React.Dispatch<React.SetStateAction<boolean>>;
14
23
  }
15
24
  interface IEditorProviderProps {
16
25
  data?: any;
@@ -5,8 +5,9 @@ const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
6
  const EditorDataContext = (0, react_1.createContext)({});
7
7
  const EditorDataProvider = ({ children, data }) => {
8
- var _a, _b, _c, _d, _e, _f;
8
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
9
9
  const [openHashtag, setOpenHashtag] = (0, react_1.useState)(false);
10
+ const [openConsent, setOpenConsent] = (0, react_1.useState)(false);
10
11
  return (react_1.default.createElement(EditorDataContext.Provider, { value: {
11
12
  sxpPrameter: {
12
13
  bottomImage: (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.bottom_image,
@@ -14,11 +15,20 @@ const EditorDataProvider = ({ children, data }) => {
14
15
  personalizedRecommend: (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.personalized_recommend,
15
16
  placeholderImage: (_d = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _d === void 0 ? void 0 : _d.placeholder_image,
16
17
  hashTagSize: (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size,
17
- loadingImage: (_f = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _f === void 0 ? void 0 : _f.loading_image
18
+ loadingImage: (_f = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _f === void 0 ? void 0 : _f.loading_image,
19
+ privacyContent: (_g = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _g === void 0 ? void 0 : _g.privacy_context,
20
+ privacyNecessity: (_h = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _h === void 0 ? void 0 : _h.privacy_necessity,
21
+ privacyPolicyTitle: (_j = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _j === void 0 ? void 0 : _j.privacy_policy_title,
22
+ privacyPolicyUrl: (_k = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _k === void 0 ? void 0 : _k.privacy_policy_url,
23
+ privacyTitle: (_l = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _l === void 0 ? void 0 : _l.privacy_title,
24
+ template: (_m = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _m === void 0 ? void 0 : _m.template,
25
+ industry: (_o = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _o === void 0 ? void 0 : _o.industry
18
26
  },
19
27
  appDomain: data === null || data === void 0 ? void 0 : data.appDomain,
20
28
  openHashtag,
21
- setOpenHashtag
29
+ setOpenHashtag,
30
+ openConsent,
31
+ setOpenConsent
22
32
  } }, children));
23
33
  };
24
34
  function useEditorDataProvider() {
@@ -1,6 +1,7 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { DataSource, PageData } from '../Pagebuilder/type';
3
3
  import { ProductInfoType, RecItemType, RecommendVideoResultType, VideoInfoType } from '../components/SxpPageRender/typing';
4
+ import { ISxpPageRenderProps } from '../components/SxpPageRender';
4
5
  export interface IWaterFallDataType {
5
6
  hashTag: string;
6
7
  itemId?: string;
@@ -62,6 +63,8 @@ export interface ISxpDataSourceContext {
62
63
  loadingImage?: string;
63
64
  isOpenHashTag?: boolean;
64
65
  tagList: string[];
66
+ isAgreePolicy?: boolean;
67
+ setIsAgreePolicy?: React.Dispatch<React.SetStateAction<boolean>>;
65
68
  setLoading?: React.Dispatch<React.SetStateAction<boolean>>;
66
69
  videoRef?: any;
67
70
  setVideoRef?: React.Dispatch<React.SetStateAction<any>>;
@@ -71,6 +74,9 @@ export interface ISxpDataSourceContext {
71
74
  eventSourceUrl?: string;
72
75
  externalId?: string;
73
76
  }) => Promise<any> | undefined | boolean;
77
+ curTime?: any;
78
+ h5EnterLink?: () => void;
79
+ themeTag?: any;
74
80
  }
75
81
  export declare const SxpDataSourceContext: React.Context<ISxpDataSourceContext>;
76
82
  export interface SxpDataSourceProviderProps {
@@ -103,6 +109,10 @@ export interface SxpDataSourceProviderProps {
103
109
  isOpenHashTag?: boolean;
104
110
  enabledMetaConversionApi?: boolean;
105
111
  isShowTag?: boolean;
112
+ consentWidth?: number;
113
+ consentHeight?: number;
114
+ isOpenConsent?: boolean;
115
+ globalConfig?: ISxpPageRenderProps['globalConfig'];
106
116
  }
107
117
  declare const _default: React.NamedExoticComponent<SxpDataSourceProviderProps>;
108
118
  export default _default;
@@ -8,6 +8,7 @@ const sessionStore_1 = require("../utils/sessionStore");
8
8
  const localStore_1 = require("../utils/localStore");
9
9
  const useIconLink_1 = require("../components/SxpPageRender/useIconLink");
10
10
  const event_1 = tslib_1.__importStar(require("../utils/event"));
11
+ const Consent_1 = tslib_1.__importDefault(require("../components/Consent"));
11
12
  exports.SxpDataSourceContext = (0, react_1.createContext)({
12
13
  rtcList: [],
13
14
  tagList: []
@@ -17,13 +18,15 @@ var DataSourceType;
17
18
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
18
19
  })(DataSourceType || (DataSourceType = {}));
19
20
  const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
20
- const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, isShowTag = true }) => {
21
+ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isShowTag = true, isOpenConsent = false, globalConfig }) => {
22
+ var _a, _b, _c, _d, _e, _f, _g;
21
23
  const [rtcList, setRtcList] = (0, react_1.useState)([]);
22
24
  const [tagList, setTagList] = (0, react_1.useState)([]);
23
25
  const [loading, setLoading] = (0, react_1.useState)(false);
24
26
  const [curReqInfo, setCurReqInfo] = (0, react_1.useState)({ rtc: '', requestId: '' });
25
27
  const swiperRef = (0, react_1.useRef)(null);
26
28
  const isInit = (0, react_1.useRef)(false);
29
+ const [isAgreePolicy, setIsAgreePolicy] = (0, react_1.useState)(() => !!window.localStorage.getItem(localStore_1.AGREE_POLICY));
27
30
  const [popupDetailData, setPopupDetailData] = (0, react_1.useState)();
28
31
  const [waterFallData, setWaterFallData] = (0, react_1.useState)();
29
32
  const [openHashtag, setOpenHashtag] = (0, react_1.useState)(isOpenHashTag);
@@ -32,6 +35,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
32
35
  const [isFromHashtag, setIsFromHashtag] = (0, react_1.useState)(false);
33
36
  const [videoRef, setVideoRef] = (0, react_1.useState)(null);
34
37
  const themeTag = (0, react_1.useRef)();
38
+ const curTime = (0, react_1.useRef)();
35
39
  (0, react_1.useEffect)(() => {
36
40
  const handleChangeThemeTag = (tag) => {
37
41
  themeTag.current = tag;
@@ -71,10 +75,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
71
75
  .catch((err) => Promise.reject(err));
72
76
  }, [bffDataSource]);
73
77
  const getRecommendVideos = (0, react_1.useCallback)((query) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
74
- var _a, _b, _c, _d, _e;
78
+ var _h, _j, _k, _l, _m;
75
79
  query = {
76
- maxSize: (_a = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _a !== void 0 ? _a : maxSize,
77
- defaultSize: (_b = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _b !== void 0 ? _b : defaultSize,
80
+ maxSize: (_h = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _h !== void 0 ? _h : maxSize,
81
+ defaultSize: (_j = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _j !== void 0 ? _j : defaultSize,
78
82
  'itemFilter.itemId': query === null || query === void 0 ? void 0 : query['itemFilter.itemId'],
79
83
  'itemFilter.itemType': query === null || query === void 0 ? void 0 : query['itemFilter.itemType'],
80
84
  hashTag: query === null || query === void 0 ? void 0 : query.hashTag,
@@ -82,10 +86,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
82
86
  themeTag: query === null || query === void 0 ? void 0 : query.themeTag
83
87
  };
84
88
  if (utmVal) {
85
- const val = (_e = (_d = (_c = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _c === void 0 ? void 0 : _c.filter((val) => {
89
+ const val = (_m = (_l = (_k = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _k === void 0 ? void 0 : _k.filter((val) => {
86
90
  const key = val.split('=')[0];
87
91
  return UTM_KEYS.includes(key);
88
- })) === null || _d === void 0 ? void 0 : _d.join('&')) !== null && _e !== void 0 ? _e : '';
92
+ })) === null || _l === void 0 ? void 0 : _l.join('&')) !== null && _m !== void 0 ? _m : '';
89
93
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
90
94
  }
91
95
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
@@ -97,7 +101,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
97
101
  return result === null || result === void 0 ? void 0 : result.data;
98
102
  }), [bffFetch, utmVal, maxSize, defaultSize]);
99
103
  const loadVideos = (0, react_1.useCallback)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
100
- var _f, _g;
104
+ var _o, _p;
101
105
  if (rtcList.length <= 0) {
102
106
  return;
103
107
  }
@@ -107,8 +111,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
107
111
  'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
108
112
  themeTag: themeTag.current
109
113
  });
110
- setRtcList(rtcList.concat((_f = data === null || data === void 0 ? void 0 : data.recList) !== null && _f !== void 0 ? _f : []));
111
- setCacheRtcList(cacheRtcList.concat((_g = data === null || data === void 0 ? void 0 : data.recList) !== null && _g !== void 0 ? _g : []));
114
+ setRtcList(rtcList.concat((_o = data === null || data === void 0 ? void 0 : data.recList) !== null && _o !== void 0 ? _o : []));
115
+ setCacheRtcList(cacheRtcList.concat((_p = data === null || data === void 0 ? void 0 : data.recList) !== null && _p !== void 0 ? _p : []));
112
116
  }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
113
117
  const bffEventReport = (0, react_1.useCallback)(({ userInfo, eventInfo }) => {
114
118
  if (!enableReportEvent) {
@@ -166,16 +170,16 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
166
170
  return res === null || res === void 0 ? void 0 : res.success;
167
171
  }), [bffFetch]);
168
172
  const bffGetTagList = (0, react_1.useCallback)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
169
- var _h, _j, _k, _l, _m;
173
+ var _q, _r, _s, _t, _u;
170
174
  if (!utmVal || !isShowTag)
171
175
  return;
172
176
  try {
173
- const val = (_k = (_j = (_h = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _h === void 0 ? void 0 : _h.filter((val) => {
177
+ const val = (_s = (_r = (_q = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _q === void 0 ? void 0 : _q.filter((val) => {
174
178
  const key = val.split('=')[0];
175
179
  return UTM_KEYS.includes(key);
176
- })) === null || _j === void 0 ? void 0 : _j.join('&')) !== null && _k !== void 0 ? _k : '';
180
+ })) === null || _r === void 0 ? void 0 : _r.join('&')) !== null && _s !== void 0 ? _s : '';
177
181
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
178
- setTagList((_m = (_l = result === null || result === void 0 ? void 0 : result.data) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []);
182
+ setTagList((_u = (_t = result === null || result === void 0 ? void 0 : result.data) === null || _t === void 0 ? void 0 : _t.tags) !== null && _u !== void 0 ? _u : []);
179
183
  }
180
184
  catch (e) {
181
185
  console.log('e', e);
@@ -199,7 +203,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
199
203
  eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : '', fromKName })
200
204
  });
201
205
  }, [bffEventReport, isFromHashtag]);
202
- (0, react_1.useEffect)(() => {
206
+ const h5EnterLink = (0, react_1.useCallback)(() => {
203
207
  var _a, _b;
204
208
  const queryString = location.search.slice(1);
205
209
  const params = qs_1.default.parse(queryString.replace(/\+/g, '%2B'));
@@ -207,6 +211,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
207
211
  params[key] = params[key].replace(/%2B/g, '+');
208
212
  }
209
213
  const getVal = (key) => { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ''; };
214
+ const time = new Date();
215
+ curTime.current = time;
210
216
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
211
217
  eventInfo: {
212
218
  eventSubject: 'h5LinkEnterFeed',
@@ -216,14 +222,19 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
216
222
  utmCampaign: getVal('utm_campaign'),
217
223
  utmId: getVal('utm_id'),
218
224
  utmContent: getVal('utm_content'),
219
- enterTime: `${Date.now()}`,
225
+ enterTime: Math.floor(time / 1000) + '',
220
226
  requestId: null,
221
227
  enterUrl: (_b = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.href) !== null && _b !== void 0 ? _b : '',
222
- clSource: getVal('cl_sourc')
228
+ clSource: getVal('cl_source')
223
229
  }
224
230
  });
231
+ }, [bffEventReport]);
232
+ (0, react_1.useEffect)(() => {
233
+ h5EnterLink();
225
234
  }, []);
226
235
  (0, react_1.useEffect)(() => {
236
+ if (!isAgreePolicy)
237
+ return;
227
238
  setLoading(true);
228
239
  bffGetTagList();
229
240
  getRecommendVideos()
@@ -242,7 +253,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
242
253
  setLoading(false);
243
254
  isInit.current = true;
244
255
  });
245
- }, []);
256
+ }, [isAgreePolicy]);
246
257
  (0, react_1.useEffect)(() => {
247
258
  if (!isInit.current)
248
259
  return;
@@ -294,13 +305,18 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
294
305
  setLoading,
295
306
  videoRef,
296
307
  setVideoRef,
297
- bffFbReport
298
- } }, render({
308
+ bffFbReport,
309
+ isAgreePolicy,
310
+ setIsAgreePolicy,
311
+ curTime,
312
+ h5EnterLink,
313
+ themeTag
314
+ } }, (((_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.privacy_necessity) && !isAgreePolicy) || isOpenConsent ? (react_1.default.createElement(Consent_1.default, Object.assign({}, (_g = (_f = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.item) === null || _g === void 0 ? void 0 : _g.props))) : (render({
299
315
  rtcList,
300
316
  mutateLike: bffMutateLike,
301
317
  mutateUnlike: bffMutateUnlike,
302
318
  submitForm: bffSubmitForm,
303
319
  tagList
304
- })));
320
+ }))));
305
321
  };
306
322
  exports.default = (0, react_1.memo)(SxpDataSourceProvider);
@@ -2,4 +2,5 @@ import { RecItemType } from '../components/SxpPageRender/typing';
2
2
  export declare function useEventReport(): {
3
3
  jumpToWeb: (data?: RecItemType, product?: RecItemType['product'], cta?: RecItemType['cta'], position?: number) => void;
4
4
  productView: (data?: RecItemType, product?: RecItemType['product'], cta?: RecItemType['cta'], viewTime?: any, position?: number) => void;
5
+ backMainFeed: (lastFeed?: 'theme' | 'branch' | 'external', themeTag?: string, hashTag?: string) => void;
5
6
  };
@@ -69,9 +69,21 @@ function useEventReport() {
69
69
  }
70
70
  });
71
71
  }, [bffEventReport, popupDetailData]);
72
+ const backMainFeed = (0, react_1.useCallback)((lastFeed, themeTag, hashTag) => {
73
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
74
+ eventInfo: {
75
+ lastFeed,
76
+ themeTags: themeTag ? `[${themeTag}]` : '',
77
+ hashTags: hashTag ? `[${hashTag}]` : '',
78
+ eventSubject: 'backMainFeed',
79
+ eventDescription: 'back Main Feed'
80
+ }
81
+ });
82
+ }, [bffEventReport]);
72
83
  return {
73
84
  jumpToWeb,
74
- productView
85
+ productView,
86
+ backMainFeed
75
87
  };
76
88
  }
77
89
  exports.useEventReport = useEventReport;
@@ -1,5 +1,6 @@
1
1
  export declare const FAKE_USER_KEY = "SXP_FAKE_USER_ID";
2
2
  export declare const FAKE_USER_STATE = "FAKE_USER_STATE";
3
+ export declare const AGREE_POLICY = "AGREE_POLICY";
3
4
  export declare const storeAndLoadFeUserId: () => string;
4
5
  export declare const removeFeUserId: () => void;
5
6
  export declare const getFeUserId: () => boolean;
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFeUserId = exports.removeFeUserId = exports.storeAndLoadFeUserId = exports.FAKE_USER_STATE = exports.FAKE_USER_KEY = void 0;
3
+ exports.getFeUserId = exports.removeFeUserId = exports.storeAndLoadFeUserId = exports.AGREE_POLICY = exports.FAKE_USER_STATE = exports.FAKE_USER_KEY = void 0;
4
4
  const lodash_1 = require("lodash");
5
5
  const tool_1 = require("./tool");
6
6
  exports.FAKE_USER_KEY = 'SXP_FAKE_USER_ID';
7
7
  exports.FAKE_USER_STATE = 'FAKE_USER_STATE';
8
+ exports.AGREE_POLICY = 'AGREE_POLICY';
8
9
  const storeAndLoadFeUserId = () => {
9
10
  let fakeUserId = window.localStorage.getItem(exports.FAKE_USER_KEY);
10
11
  if ((0, lodash_1.isEmpty)(fakeUserId)) {
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export interface IConsentProps {
3
+ width?: number;
4
+ height?: number;
5
+ privacy_title?: string;
6
+ privacy_context?: string;
7
+ privacy_policy_url?: string;
8
+ privacy_policy_title?: string;
9
+ privacy_necessity?: boolean;
10
+ }
11
+ declare const _default: React.NamedExoticComponent<IConsentProps>;
12
+ export default _default;
@@ -0,0 +1,8 @@
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 Consent = (props) => {
6
+ return react_1.default.createElement(Consent, Object.assign({}, props));
7
+ };
8
+ exports.default = (0, react_1.memo)(Consent);
@@ -0,0 +1,2 @@
1
+ declare const Consent: import("../../../core/create").MaterialComponet<import(".").IConsentProps>;
2
+ export { Consent };
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Consent = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const settingRender_1 = tslib_1.__importDefault(require("./settingRender"));
6
+ const _1 = tslib_1.__importDefault(require("."));
7
+ const create_1 = require("../../../core/create");
8
+ const Consent = (0, create_1.createMaterial)(_1.default, {
9
+ displayName: 'Consent',
10
+ icon: '',
11
+ category: 'base',
12
+ type: 'Consent',
13
+ related: {
14
+ settingRender: settingRender_1.default
15
+ },
16
+ defaulSetting: {
17
+ props: {},
18
+ style: {}
19
+ },
20
+ w: 100,
21
+ h: 40,
22
+ sort: 1
23
+ });
24
+ exports.Consent = Consent;
@@ -0,0 +1,31 @@
1
+ declare const _default: {
2
+ title: string;
3
+ child: ({
4
+ type: string;
5
+ label: string;
6
+ name: string[];
7
+ extra: string;
8
+ child?: undefined;
9
+ } | {
10
+ type: string;
11
+ label: string;
12
+ name: string[];
13
+ extra?: undefined;
14
+ child?: undefined;
15
+ } | {
16
+ type: string;
17
+ label: string;
18
+ child: ({
19
+ type: string;
20
+ name: string[];
21
+ addonBefore?: undefined;
22
+ } | {
23
+ type: string;
24
+ name: string[];
25
+ addonBefore: string;
26
+ })[];
27
+ extra: string;
28
+ name?: undefined;
29
+ })[];
30
+ }[];
31
+ export default _default;