pb-sxp-ui 1.0.60 → 1.0.62

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 (33) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +111 -111
  3. package/dist/index.cjs +40 -24
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.js +40 -24
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.min.cjs +3 -3
  8. package/dist/index.min.cjs.map +1 -1
  9. package/dist/index.min.js +3 -3
  10. package/dist/index.min.js.map +1 -1
  11. package/dist/pb-ui.js +43 -27
  12. package/dist/pb-ui.js.map +1 -1
  13. package/dist/pb-ui.min.js +3 -3
  14. package/dist/pb-ui.min.js.map +1 -1
  15. package/es/core/components/SxpPageRender/Tagbar.js +7 -5
  16. package/es/core/components/SxpPageRender/index.js +4 -1
  17. package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
  18. package/es/core/context/SxpDataSourceProvider.js +15 -2
  19. package/es/core/utils/event.d.ts +2 -1
  20. package/es/core/utils/event.js +1 -0
  21. package/es/materials/sxp/popup/CommodityDetail/index.js +4 -4
  22. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
  23. package/es/materials/sxp/template/components/EventProvider.js +2 -3
  24. package/lib/core/components/SxpPageRender/Tagbar.js +7 -5
  25. package/lib/core/components/SxpPageRender/index.js +4 -1
  26. package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
  27. package/lib/core/context/SxpDataSourceProvider.js +15 -2
  28. package/lib/core/utils/event.d.ts +2 -1
  29. package/lib/core/utils/event.js +1 -0
  30. package/lib/materials/sxp/popup/CommodityDetail/index.js +4 -4
  31. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
  32. package/lib/materials/sxp/template/components/EventProvider.js +2 -3
  33. package/package.json +115 -115
@@ -1,22 +1,24 @@
1
1
  import React, { memo, useMemo, useState } from 'react';
2
2
  import { useSxpDataSource } from '../../../core/hooks';
3
+ import SXP_EVENT_BUS, { SXP_EVENT_TYPE } from '../../../core/utils/event';
3
4
  const DEFAULT_TAG = 'FOR U';
4
5
  const Tagbar = ({ tagList = [], setActiveIndex }) => {
5
6
  const [selectTag, setSelectTag] = useState(DEFAULT_TAG);
6
- const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef } = useSxpDataSource();
7
+ const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef, waterFallData } = useSxpDataSource();
7
8
  const realTagList = useMemo(() => {
8
9
  return [DEFAULT_TAG, ...tagList];
9
10
  }, [tagList]);
10
11
  const handleSelectTag = (tag) => () => {
11
12
  if (tag === selectTag)
12
13
  return;
13
- let hashTag;
14
+ let themeTag;
14
15
  if (tag !== DEFAULT_TAG) {
15
- hashTag = tag;
16
+ themeTag = tag;
16
17
  }
17
18
  setLoading === null || setLoading === void 0 ? void 0 : setLoading(true);
18
- getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({ hashTag }).then((res) => {
19
+ getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({ themeTag }).then((res) => {
19
20
  var _a, _b, _c, _d;
21
+ SXP_EVENT_BUS.emit(SXP_EVENT_TYPE.CHANGE_THEME_TAG, themeTag);
20
22
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList((_a = res === null || res === void 0 ? void 0 : res.recList) !== null && _a !== void 0 ? _a : []);
21
23
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList((_b = res === null || res === void 0 ? void 0 : res.recList) !== null && _b !== void 0 ? _b : []);
22
24
  setActiveIndex === null || setActiveIndex === void 0 ? void 0 : setActiveIndex(0);
@@ -27,7 +29,7 @@ const Tagbar = ({ tagList = [], setActiveIndex }) => {
27
29
  });
28
30
  setSelectTag(tag);
29
31
  };
30
- if (tagList.length <= 0)
32
+ if (waterFallData || tagList.length <= 0)
31
33
  return null;
32
34
  return (React.createElement("div", { className: 'clc-sxp-tagbar' },
33
35
  React.createElement("ul", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
@@ -172,9 +172,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
172
172
  }
173
173
  if (tagList.length > 0) {
174
174
  minusHeight += 45;
175
+ if (waterFallData) {
176
+ minusHeight -= 45;
177
+ }
175
178
  }
176
179
  return containerHeight - minusHeight;
177
- }, [globalConfig, containerHeight, tagList]);
180
+ }, [globalConfig, containerHeight, tagList, waterFallData]);
178
181
  const renderLogo = useMemo(() => {
179
182
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
180
183
  return (React.createElement("div", { className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } },
@@ -35,6 +35,7 @@ export interface ISxpDataSourceContext {
35
35
  'itemFilter.itemId'?: string;
36
36
  'itemFilter.itemType'?: 'VIDEO' | 'PRODUCT' | null | undefined;
37
37
  traceInfo?: string;
38
+ themeTag?: string;
38
39
  }) => Promise<RecommendVideoResultType | undefined>;
39
40
  utmVal?: string;
40
41
  bffEventReport?: (body: {
@@ -4,6 +4,7 @@ import qs from 'qs';
4
4
  import { storeAndLoadFeSessionId } from '../utils/sessionStore';
5
5
  import { storeAndLoadFeUserId } from '../utils/localStore';
6
6
  import { useIconLink } from '../components/SxpPageRender/useIconLink';
7
+ import SXP_EVENT_BUS, { SXP_EVENT_TYPE } from '../utils/event';
7
8
  export const SxpDataSourceContext = createContext({
8
9
  rtcList: [],
9
10
  tagList: []
@@ -27,6 +28,16 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
27
28
  const [cacheActiveIndex, setCacheActiveIndex] = useState(0);
28
29
  const [isFromHashtag, setIsFromHashtag] = useState(false);
29
30
  const [videoRef, setVideoRef] = useState(null);
31
+ const themeTag = useRef();
32
+ useEffect(() => {
33
+ const handleChangeThemeTag = (tag) => {
34
+ themeTag.current = tag;
35
+ };
36
+ SXP_EVENT_BUS.on(SXP_EVENT_TYPE.CHANGE_THEME_TAG, handleChangeThemeTag);
37
+ return () => {
38
+ SXP_EVENT_BUS.off(SXP_EVENT_TYPE.CHANGE_THEME_TAG, handleChangeThemeTag);
39
+ };
40
+ }, []);
30
41
  useEffect(() => {
31
42
  setOpenHashtag(isOpenHashTag);
32
43
  }, [isOpenHashTag]);
@@ -64,7 +75,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
64
75
  'itemFilter.itemId': query === null || query === void 0 ? void 0 : query['itemFilter.itemId'],
65
76
  'itemFilter.itemType': query === null || query === void 0 ? void 0 : query['itemFilter.itemType'],
66
77
  hashTag: query === null || query === void 0 ? void 0 : query.hashTag,
67
- traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo
78
+ traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo,
79
+ themeTag: query === null || query === void 0 ? void 0 : query.themeTag
68
80
  };
69
81
  if (utmVal) {
70
82
  const val = (_e = (_d = (_c = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _c === void 0 ? void 0 : _c.filter((val) => {
@@ -89,7 +101,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
89
101
  const data = yield getRecommendVideos({
90
102
  hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
91
103
  'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
92
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType
104
+ 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
105
+ themeTag: themeTag.current
93
106
  });
94
107
  setRtcList(rtcList.concat((_f = data === null || data === void 0 ? void 0 : data.recList) !== null && _f !== void 0 ? _f : []));
95
108
  setCacheRtcList(cacheRtcList.concat((_g = data === null || data === void 0 ? void 0 : data.recList) !== null && _g !== void 0 ? _g : []));
@@ -2,6 +2,7 @@ import EventEmitter from 'eventemitter3';
2
2
  declare const SXP_EVENT_BUS: EventEmitter<string | symbol, any>;
3
3
  export declare enum SXP_EVENT_TYPE {
4
4
  PAGE_DID_SHOW = "pageDidShow",
5
- PAGE_DID_HIDE = "pageDidHide"
5
+ PAGE_DID_HIDE = "pageDidHide",
6
+ CHANGE_THEME_TAG = "changeThemeTag"
6
7
  }
7
8
  export default SXP_EVENT_BUS;
@@ -4,5 +4,6 @@ export var SXP_EVENT_TYPE;
4
4
  (function (SXP_EVENT_TYPE) {
5
5
  SXP_EVENT_TYPE["PAGE_DID_SHOW"] = "pageDidShow";
6
6
  SXP_EVENT_TYPE["PAGE_DID_HIDE"] = "pageDidHide";
7
+ SXP_EVENT_TYPE["CHANGE_THEME_TAG"] = "changeThemeTag";
7
8
  })(SXP_EVENT_TYPE || (SXP_EVENT_TYPE = {}));
8
9
  export default SXP_EVENT_BUS;
@@ -66,10 +66,10 @@ const CommodityDetail = (_a) => {
66
66
  React.createElement("div", { className: 'pb-commondity-content-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.title) }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
67
67
  React.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText),
68
68
  React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
69
- React.createElement(ExpandableText, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
70
- bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
71
- collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
72
- necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
69
+ React.createElement(ExpandableText, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
70
+ bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
71
+ collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
72
+ necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
73
73
  18-karat gold, this necklace is embellished with hand-set diamonds.`, maxStr: 79, className: 'pb-commondity-content-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info }))));
74
74
  };
75
75
  const renderBtn = () => {
@@ -91,7 +91,7 @@ const CommodityDetailDiroNew = (_a) => {
91
91
  const productInfoText = ({ isPost }) => {
92
92
  return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
93
93
  React.createElement(ExpandableText, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
94
- `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
94
+ `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
95
95
  Made in Italy` })));
96
96
  };
97
97
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
@@ -22,7 +22,7 @@ const EventProvider = (_a) => {
22
22
  }
23
23
  }, [isOnScreen, ref, rec, ctaEvent, index]);
24
24
  const handleClick = throttle(() => {
25
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
25
+ var _a, _b, _c, _d, _e, _f, _g, _h;
26
26
  const item = (_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) !== null && _b !== void 0 ? _b : rec === null || rec === void 0 ? void 0 : rec.video;
27
27
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
28
28
  eventSubject: 'clickCta',
@@ -34,8 +34,7 @@ const EventProvider = (_a) => {
34
34
  const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
35
35
  const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
36
36
  jumpToWeb(rec, product, cta, index);
37
- window.location.href = (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindProduct) === null || _h === void 0 ? void 0 : _h.link;
38
- window.location.href = window.getJointUtmLink((_k = (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.bindProduct) === null || _k === void 0 ? void 0 : _k.link);
37
+ window.location.href = window.getJointUtmLink((_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindProduct) === null || _h === void 0 ? void 0 : _h.link);
39
38
  }
40
39
  }
41
40
  else {
@@ -3,23 +3,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importStar(require("react"));
5
5
  const hooks_1 = require("../../../core/hooks");
6
+ const event_1 = tslib_1.__importStar(require("../../../core/utils/event"));
6
7
  const DEFAULT_TAG = 'FOR U';
7
8
  const Tagbar = ({ tagList = [], setActiveIndex }) => {
8
9
  const [selectTag, setSelectTag] = (0, react_1.useState)(DEFAULT_TAG);
9
- const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef } = (0, hooks_1.useSxpDataSource)();
10
+ const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef, waterFallData } = (0, hooks_1.useSxpDataSource)();
10
11
  const realTagList = (0, react_1.useMemo)(() => {
11
12
  return [DEFAULT_TAG, ...tagList];
12
13
  }, [tagList]);
13
14
  const handleSelectTag = (tag) => () => {
14
15
  if (tag === selectTag)
15
16
  return;
16
- let hashTag;
17
+ let themeTag;
17
18
  if (tag !== DEFAULT_TAG) {
18
- hashTag = tag;
19
+ themeTag = tag;
19
20
  }
20
21
  setLoading === null || setLoading === void 0 ? void 0 : setLoading(true);
21
- getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({ hashTag }).then((res) => {
22
+ getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({ themeTag }).then((res) => {
22
23
  var _a, _b, _c, _d;
24
+ event_1.default.emit(event_1.SXP_EVENT_TYPE.CHANGE_THEME_TAG, themeTag);
23
25
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList((_a = res === null || res === void 0 ? void 0 : res.recList) !== null && _a !== void 0 ? _a : []);
24
26
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList((_b = res === null || res === void 0 ? void 0 : res.recList) !== null && _b !== void 0 ? _b : []);
25
27
  setActiveIndex === null || setActiveIndex === void 0 ? void 0 : setActiveIndex(0);
@@ -30,7 +32,7 @@ const Tagbar = ({ tagList = [], setActiveIndex }) => {
30
32
  });
31
33
  setSelectTag(tag);
32
34
  };
33
- if (tagList.length <= 0)
35
+ if (waterFallData || tagList.length <= 0)
34
36
  return null;
35
37
  return (react_1.default.createElement("div", { className: 'clc-sxp-tagbar' },
36
38
  react_1.default.createElement("ul", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
@@ -175,9 +175,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
175
175
  }
176
176
  if (tagList.length > 0) {
177
177
  minusHeight += 45;
178
+ if (waterFallData) {
179
+ minusHeight -= 45;
180
+ }
178
181
  }
179
182
  return containerHeight - minusHeight;
180
- }, [globalConfig, containerHeight, tagList]);
183
+ }, [globalConfig, containerHeight, tagList, waterFallData]);
181
184
  const renderLogo = (0, react_1.useMemo)(() => {
182
185
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
183
186
  return (react_1.default.createElement("div", { className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } },
@@ -35,6 +35,7 @@ export interface ISxpDataSourceContext {
35
35
  'itemFilter.itemId'?: string;
36
36
  'itemFilter.itemType'?: 'VIDEO' | 'PRODUCT' | null | undefined;
37
37
  traceInfo?: string;
38
+ themeTag?: string;
38
39
  }) => Promise<RecommendVideoResultType | undefined>;
39
40
  utmVal?: string;
40
41
  bffEventReport?: (body: {
@@ -7,6 +7,7 @@ const qs_1 = tslib_1.__importDefault(require("qs"));
7
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
+ const event_1 = tslib_1.__importStar(require("../utils/event"));
10
11
  exports.SxpDataSourceContext = (0, react_1.createContext)({
11
12
  rtcList: [],
12
13
  tagList: []
@@ -30,6 +31,16 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
30
31
  const [cacheActiveIndex, setCacheActiveIndex] = (0, react_1.useState)(0);
31
32
  const [isFromHashtag, setIsFromHashtag] = (0, react_1.useState)(false);
32
33
  const [videoRef, setVideoRef] = (0, react_1.useState)(null);
34
+ const themeTag = (0, react_1.useRef)();
35
+ (0, react_1.useEffect)(() => {
36
+ const handleChangeThemeTag = (tag) => {
37
+ themeTag.current = tag;
38
+ };
39
+ event_1.default.on(event_1.SXP_EVENT_TYPE.CHANGE_THEME_TAG, handleChangeThemeTag);
40
+ return () => {
41
+ event_1.default.off(event_1.SXP_EVENT_TYPE.CHANGE_THEME_TAG, handleChangeThemeTag);
42
+ };
43
+ }, []);
33
44
  (0, react_1.useEffect)(() => {
34
45
  setOpenHashtag(isOpenHashTag);
35
46
  }, [isOpenHashTag]);
@@ -67,7 +78,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
67
78
  'itemFilter.itemId': query === null || query === void 0 ? void 0 : query['itemFilter.itemId'],
68
79
  'itemFilter.itemType': query === null || query === void 0 ? void 0 : query['itemFilter.itemType'],
69
80
  hashTag: query === null || query === void 0 ? void 0 : query.hashTag,
70
- traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo
81
+ traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo,
82
+ themeTag: query === null || query === void 0 ? void 0 : query.themeTag
71
83
  };
72
84
  if (utmVal) {
73
85
  const val = (_e = (_d = (_c = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _c === void 0 ? void 0 : _c.filter((val) => {
@@ -92,7 +104,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
92
104
  const data = yield getRecommendVideos({
93
105
  hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
94
106
  'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
95
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType
107
+ 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
108
+ themeTag: themeTag.current
96
109
  });
97
110
  setRtcList(rtcList.concat((_f = data === null || data === void 0 ? void 0 : data.recList) !== null && _f !== void 0 ? _f : []));
98
111
  setCacheRtcList(cacheRtcList.concat((_g = data === null || data === void 0 ? void 0 : data.recList) !== null && _g !== void 0 ? _g : []));
@@ -2,6 +2,7 @@ import EventEmitter from 'eventemitter3';
2
2
  declare const SXP_EVENT_BUS: EventEmitter<string | symbol, any>;
3
3
  export declare enum SXP_EVENT_TYPE {
4
4
  PAGE_DID_SHOW = "pageDidShow",
5
- PAGE_DID_HIDE = "pageDidHide"
5
+ PAGE_DID_HIDE = "pageDidHide",
6
+ CHANGE_THEME_TAG = "changeThemeTag"
6
7
  }
7
8
  export default SXP_EVENT_BUS;
@@ -8,5 +8,6 @@ var SXP_EVENT_TYPE;
8
8
  (function (SXP_EVENT_TYPE) {
9
9
  SXP_EVENT_TYPE["PAGE_DID_SHOW"] = "pageDidShow";
10
10
  SXP_EVENT_TYPE["PAGE_DID_HIDE"] = "pageDidHide";
11
+ SXP_EVENT_TYPE["CHANGE_THEME_TAG"] = "changeThemeTag";
11
12
  })(SXP_EVENT_TYPE || (exports.SXP_EVENT_TYPE = SXP_EVENT_TYPE = {}));
12
13
  exports.default = SXP_EVENT_BUS;
@@ -68,10 +68,10 @@ const CommodityDetail = (_a) => {
68
68
  react_1.default.createElement("div", { className: 'pb-commondity-content-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.title) }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
69
69
  react_1.default.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText),
70
70
  react_1.default.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
71
- react_1.default.createElement(ExpandableText_1.default, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
72
- bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
73
- collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
74
- necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
71
+ react_1.default.createElement(ExpandableText_1.default, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
72
+ bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
73
+ collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
74
+ necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
75
75
  18-karat gold, this necklace is embellished with hand-set diamonds.`, maxStr: 79, className: 'pb-commondity-content-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info }))));
76
76
  };
77
77
  const renderBtn = () => {
@@ -93,7 +93,7 @@ const CommodityDetailDiroNew = (_a) => {
93
93
  const productInfoText = ({ isPost }) => {
94
94
  return (react_1.default.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
95
95
  react_1.default.createElement(ExpandableText_1.default, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
96
- `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
96
+ `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
97
97
  Made in Italy` })));
98
98
  };
99
99
  return (react_1.default.createElement("div", { className: 'pb-commondityDiroNew' },
@@ -24,7 +24,7 @@ const EventProvider = (_a) => {
24
24
  }
25
25
  }, [isOnScreen, ref, rec, ctaEvent, index]);
26
26
  const handleClick = (0, lodash_1.throttle)(() => {
27
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
27
+ var _a, _b, _c, _d, _e, _f, _g, _h;
28
28
  const item = (_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) !== null && _b !== void 0 ? _b : rec === null || rec === void 0 ? void 0 : rec.video;
29
29
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
30
30
  eventSubject: 'clickCta',
@@ -36,8 +36,7 @@ const EventProvider = (_a) => {
36
36
  const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
37
37
  const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
38
38
  jumpToWeb(rec, product, cta, index);
39
- window.location.href = (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindProduct) === null || _h === void 0 ? void 0 : _h.link;
40
- window.location.href = window.getJointUtmLink((_k = (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.bindProduct) === null || _k === void 0 ? void 0 : _k.link);
39
+ window.location.href = window.getJointUtmLink((_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindProduct) === null || _h === void 0 ? void 0 : _h.link);
41
40
  }
42
41
  }
43
42
  else {
package/package.json CHANGED
@@ -1,115 +1,115 @@
1
- {
2
- "name": "pb-sxp-ui",
3
- "version": "1.0.60",
4
- "description": "React enterprise-class UI components",
5
- "main": "dist/index.cjs",
6
- "module": "dist/index.js",
7
- "unpkg": "dist/pb-ui.min.js",
8
- "typings": "es/index.d.ts",
9
- "type": "module",
10
- "scripts": {
11
- "prebuild": "rimraf lib && rimraf es && rimraf dist",
12
- "build": "tsc --build tsconfig.es.json && tsc --build tsconfig.cjs.json",
13
- "postbuild": "tsc-alias -p tsconfig.es.json && tsc-alias -p tsconfig.cjs.json",
14
- "package": "npm run build && cross-env NODE_ENV=production rollup -c --configPlugin typescript",
15
- "start": "npm run build && cross-env NODE_ENV=development rollup -w -c",
16
- "lint": "eslint .",
17
- "lint:fix": "eslint --fix .",
18
- "dev": "rollup -w -c",
19
- "dev:package": "npm run build && rollup -w -c",
20
- "pub": "zx ./scripts/publish.mjs"
21
- },
22
- "files": [
23
- "dist",
24
- "lib",
25
- "es",
26
- "package.json",
27
- "README.md"
28
- ],
29
- "keywords": [
30
- "antd",
31
- "react",
32
- "react-component",
33
- "ui",
34
- "component",
35
- "components"
36
- ],
37
- "author": "frontend@chatlabs.cn",
38
- "license": "MIT",
39
- "dependencies": {
40
- "@ant-design/pro-components": "^2.6.35",
41
- "@emotion/css": "^11.11.2",
42
- "antd": "^5.15.3",
43
- "eslint": "^8.48.0",
44
- "eventemitter3": "^5.0.1",
45
- "hls.js": "^1.5.8",
46
- "less": "^4.2.0",
47
- "lodash": "^4.17.21",
48
- "pako": "^2.1.0",
49
- "qs": "^6.11.2",
50
- "swiper": "^11.0.3",
51
- "uuid": "^9.0.1"
52
- },
53
- "devDependencies": {
54
- "@babel/core": "^7.22.11",
55
- "@babel/plugin-transform-runtime": "^7.22.10",
56
- "@babel/preset-env": "^7.22.10",
57
- "@rollup/plugin-alias": "^5.0.0",
58
- "@rollup/plugin-babel": "^6.0.3",
59
- "@rollup/plugin-commonjs": "^25.0.4",
60
- "@rollup/plugin-eslint": "^9.0.4",
61
- "@rollup/plugin-image": "^3.0.2",
62
- "@rollup/plugin-json": "^6.0.0",
63
- "@rollup/plugin-node-resolve": "^15.2.0",
64
- "@rollup/plugin-typescript": "^11.1.2",
65
- "@rollup/plugin-url": "^8.0.1",
66
- "@svgr/rollup": "^8.1.0",
67
- "@types/crypto-js": "^4.1.3",
68
- "@types/lodash": "^4.14.198",
69
- "@types/node": "^20.5.3",
70
- "@types/pako": "^2.0.3",
71
- "@types/qs": "^6.9.8",
72
- "@types/react": "^18.2.21",
73
- "@types/react-dom": "^18.2.14",
74
- "@types/uuid": "^9.0.7",
75
- "@typescript-eslint/eslint-plugin": "^6.6.0",
76
- "@typescript-eslint/parser": "^6.6.0",
77
- "autoprefixer": "^10.4.15",
78
- "cross-env": "^7.0.3",
79
- "cssnano": "^6.0.1",
80
- "esbuild": "^0.19.2",
81
- "eslint-config-standard": "^17.1.0",
82
- "eslint-config-standard-react": "^13.0.0",
83
- "eslint-plugin-import": "^2.28.1",
84
- "eslint-plugin-n": "^16.0.2",
85
- "eslint-plugin-promise": "^6.1.1",
86
- "eslint-plugin-react": "^7.33.2",
87
- "eslint-plugin-react-hooks": "^4.6.0",
88
- "eslint-plugin-unused-imports": "^3.0.0",
89
- "postcss": "^8.4.28",
90
- "querystring": "^0.2.1",
91
- "react": "^18.2.0",
92
- "react-dom": "^18.2.0",
93
- "rimraf": "^5.0.1",
94
- "rollup": "^3.28.1",
95
- "rollup-plugin-esbuild": "^5.0.0",
96
- "rollup-plugin-postcss": "^4.0.2",
97
- "rollup-plugin-terser": "^7.0.2",
98
- "tsc-alias": "^1.8.7",
99
- "tslib": "^2.6.2",
100
- "typescript": "^5.1.6",
101
- "zx": "^7.2.3"
102
- },
103
- "peerDependencies": {
104
- "react": ">=16.9.0",
105
- "react-dom": ">=16.9.0"
106
- },
107
- "browserslist": [
108
- "defaults",
109
- "not ie < 8",
110
- "last 2 versions",
111
- "> 1%",
112
- "iOS 7",
113
- "last 3 iOS versions"
114
- ]
115
- }
1
+ {
2
+ "name": "pb-sxp-ui",
3
+ "version": "1.0.62",
4
+ "description": "React enterprise-class UI components",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.js",
7
+ "unpkg": "dist/pb-ui.min.js",
8
+ "typings": "es/index.d.ts",
9
+ "type": "module",
10
+ "scripts": {
11
+ "prebuild": "rimraf lib && rimraf es && rimraf dist",
12
+ "build": "tsc --build tsconfig.es.json && tsc --build tsconfig.cjs.json",
13
+ "postbuild": "tsc-alias -p tsconfig.es.json && tsc-alias -p tsconfig.cjs.json",
14
+ "package": "npm run build && cross-env NODE_ENV=production rollup -c --configPlugin typescript",
15
+ "start": "npm run build && cross-env NODE_ENV=development rollup -w -c",
16
+ "lint": "eslint .",
17
+ "lint:fix": "eslint --fix .",
18
+ "dev": "rollup -w -c",
19
+ "dev:package": "npm run build && rollup -w -c",
20
+ "pub": "zx ./scripts/publish.mjs"
21
+ },
22
+ "files": [
23
+ "dist",
24
+ "lib",
25
+ "es",
26
+ "package.json",
27
+ "README.md"
28
+ ],
29
+ "keywords": [
30
+ "antd",
31
+ "react",
32
+ "react-component",
33
+ "ui",
34
+ "component",
35
+ "components"
36
+ ],
37
+ "author": "frontend@chatlabs.cn",
38
+ "license": "MIT",
39
+ "dependencies": {
40
+ "@ant-design/pro-components": "^2.6.35",
41
+ "@emotion/css": "^11.11.2",
42
+ "antd": "^5.15.3",
43
+ "eslint": "^8.48.0",
44
+ "eventemitter3": "^5.0.1",
45
+ "hls.js": "^1.5.8",
46
+ "less": "^4.2.0",
47
+ "lodash": "^4.17.21",
48
+ "pako": "^2.1.0",
49
+ "qs": "^6.11.2",
50
+ "swiper": "^11.0.3",
51
+ "uuid": "^9.0.1"
52
+ },
53
+ "devDependencies": {
54
+ "@babel/core": "^7.22.11",
55
+ "@babel/plugin-transform-runtime": "^7.22.10",
56
+ "@babel/preset-env": "^7.22.10",
57
+ "@rollup/plugin-alias": "^5.0.0",
58
+ "@rollup/plugin-babel": "^6.0.3",
59
+ "@rollup/plugin-commonjs": "^25.0.4",
60
+ "@rollup/plugin-eslint": "^9.0.4",
61
+ "@rollup/plugin-image": "^3.0.2",
62
+ "@rollup/plugin-json": "^6.0.0",
63
+ "@rollup/plugin-node-resolve": "^15.2.0",
64
+ "@rollup/plugin-typescript": "^11.1.2",
65
+ "@rollup/plugin-url": "^8.0.1",
66
+ "@svgr/rollup": "^8.1.0",
67
+ "@types/crypto-js": "^4.1.3",
68
+ "@types/lodash": "^4.14.198",
69
+ "@types/node": "^20.5.3",
70
+ "@types/pako": "^2.0.3",
71
+ "@types/qs": "^6.9.8",
72
+ "@types/react": "^18.2.21",
73
+ "@types/react-dom": "^18.2.14",
74
+ "@types/uuid": "^9.0.7",
75
+ "@typescript-eslint/eslint-plugin": "^6.6.0",
76
+ "@typescript-eslint/parser": "^6.6.0",
77
+ "autoprefixer": "^10.4.15",
78
+ "cross-env": "^7.0.3",
79
+ "cssnano": "^6.0.1",
80
+ "esbuild": "^0.19.2",
81
+ "eslint-config-standard": "^17.1.0",
82
+ "eslint-config-standard-react": "^13.0.0",
83
+ "eslint-plugin-import": "^2.28.1",
84
+ "eslint-plugin-n": "^16.0.2",
85
+ "eslint-plugin-promise": "^6.1.1",
86
+ "eslint-plugin-react": "^7.33.2",
87
+ "eslint-plugin-react-hooks": "^4.6.0",
88
+ "eslint-plugin-unused-imports": "^3.0.0",
89
+ "postcss": "^8.4.28",
90
+ "querystring": "^0.2.1",
91
+ "react": "^18.2.0",
92
+ "react-dom": "^18.2.0",
93
+ "rimraf": "^5.0.1",
94
+ "rollup": "^3.28.1",
95
+ "rollup-plugin-esbuild": "^5.0.0",
96
+ "rollup-plugin-postcss": "^4.0.2",
97
+ "rollup-plugin-terser": "^7.0.2",
98
+ "tsc-alias": "^1.8.7",
99
+ "tslib": "^2.6.2",
100
+ "typescript": "^5.1.6",
101
+ "zx": "^7.2.3"
102
+ },
103
+ "peerDependencies": {
104
+ "react": ">=16.9.0",
105
+ "react-dom": ">=16.9.0"
106
+ },
107
+ "browserslist": [
108
+ "defaults",
109
+ "not ie < 8",
110
+ "last 2 versions",
111
+ "> 1%",
112
+ "iOS 7",
113
+ "last 3 iOS versions"
114
+ ]
115
+ }