pb-sxp-ui 1.0.86 → 1.0.88

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 (61) hide show
  1. package/dist/index.cjs +113 -166
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +113 -166
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +3 -4
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +3 -4
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +113 -166
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +3 -4
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/Consent/index.js +2 -2
  14. package/es/core/components/DiyPortalPreview/VideoWidget.js +3 -3
  15. package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +1 -1
  16. package/es/core/components/SxpPageRender/FormatImage.js +2 -2
  17. package/es/core/components/SxpPageRender/LikeButton/index.js +1 -1
  18. package/es/core/components/SxpPageRender/Navbar.js +1 -1
  19. package/es/core/components/SxpPageRender/Nudge/index.js +1 -1
  20. package/es/core/components/SxpPageRender/Tagbar.js +6 -7
  21. package/es/core/components/SxpPageRender/ToggleButton/index.js +2 -2
  22. package/es/core/components/SxpPageRender/VideoWidget/index.js +3 -3
  23. package/es/core/components/SxpPageRender/WaterFall/List.js +2 -2
  24. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +17 -52
  25. package/es/core/components/SxpPageRender/WaterFall/index.js +2 -4
  26. package/es/core/components/SxpPageRender/index.js +28 -30
  27. package/es/core/context/SxpDataSourceProvider.d.ts +4 -0
  28. package/es/core/context/SxpDataSourceProvider.js +9 -3
  29. package/es/core/hooks/useEventReport.d.ts +1 -1
  30. package/es/core/hooks/useEventReport.js +13 -10
  31. package/es/materials/sxp/popup/AppointForm/index.js +1 -1
  32. package/es/materials/sxp/popup/CommodityDetail/index.js +3 -3
  33. package/es/materials/sxp/popup/CommodityDetailDiro/index.js +4 -4
  34. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +3 -3
  35. package/es/materials/sxp/popup/Prompt/index.js +2 -2
  36. package/es/materials/sxp/template/Appoint/index.js +1 -1
  37. package/lib/core/components/Consent/index.js +2 -2
  38. package/lib/core/components/DiyPortalPreview/VideoWidget.js +3 -3
  39. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +1 -1
  40. package/lib/core/components/SxpPageRender/FormatImage.js +2 -2
  41. package/lib/core/components/SxpPageRender/LikeButton/index.js +1 -1
  42. package/lib/core/components/SxpPageRender/Navbar.js +1 -1
  43. package/lib/core/components/SxpPageRender/Nudge/index.js +1 -1
  44. package/lib/core/components/SxpPageRender/Tagbar.js +7 -8
  45. package/lib/core/components/SxpPageRender/ToggleButton/index.js +2 -2
  46. package/lib/core/components/SxpPageRender/VideoWidget/index.js +3 -3
  47. package/lib/core/components/SxpPageRender/WaterFall/List.js +2 -2
  48. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +17 -52
  49. package/lib/core/components/SxpPageRender/WaterFall/index.js +2 -4
  50. package/lib/core/components/SxpPageRender/index.js +28 -30
  51. package/lib/core/context/SxpDataSourceProvider.d.ts +4 -0
  52. package/lib/core/context/SxpDataSourceProvider.js +10 -4
  53. package/lib/core/hooks/useEventReport.d.ts +1 -1
  54. package/lib/core/hooks/useEventReport.js +13 -10
  55. package/lib/materials/sxp/popup/AppointForm/index.js +1 -1
  56. package/lib/materials/sxp/popup/CommodityDetail/index.js +3 -3
  57. package/lib/materials/sxp/popup/CommodityDetailDiro/index.js +4 -4
  58. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +3 -3
  59. package/lib/materials/sxp/popup/Prompt/index.js +2 -2
  60. package/lib/materials/sxp/template/Appoint/index.js +1 -1
  61. package/package.json +1 -1
@@ -75,8 +75,8 @@ const CommodityDetail = (_a) => {
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 = () => {
78
- var _a;
79
- return (react_1.default.createElement(react_1.default.Fragment, null, (isDefault || (product === null || product === void 0 ? void 0 : product.link)) && (react_1.default.createElement("button", { onClick: handleLink, className: 'pb-commondity-btn', style: buttonStyle }, (_a = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _a !== void 0 ? _a : 'Purchase on Website'))));
78
+ var _a, _b;
79
+ return (react_1.default.createElement(react_1.default.Fragment, null, (isDefault || (product === null || product === void 0 ? void 0 : product.link)) && (react_1.default.createElement("button", { "aria-label": (_a = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _a !== void 0 ? _a : 'Purchase on Website', onClick: handleLink, className: 'pb-commondity-btn', style: buttonStyle }, (_b = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _b !== void 0 ? _b : 'Purchase on Website'))));
80
80
  };
81
81
  const getStyle = (0, react_1.useCallback)((style) => {
82
82
  if (style === null || style === void 0 ? void 0 : style.lineClamp) {
@@ -122,7 +122,7 @@ const CommodityDetail = (_a) => {
122
122
  top: 0,
123
123
  objectFit: 'cover',
124
124
  width: '100%'
125
- }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: '' }))),
125
+ }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: 'pdp image' }))),
126
126
  react_1.default.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
127
127
  renderBtn(),
128
128
  react_1.default.createElement(Modal_1.default, { visible: showModal, onClose: () => setShowModal(false) },
@@ -11,7 +11,7 @@ const arrow_png_1 = tslib_1.__importDefault(require("./arrow.png"));
11
11
  const useEventReport_1 = require("../../../../core/hooks/useEventReport");
12
12
  const FormatImage_1 = tslib_1.__importDefault(require("../../../../core/components/SxpPageRender/FormatImage"));
13
13
  const CommodityDetailDiro = (_a) => {
14
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
14
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
15
15
  var { style, isDefault, rec, viewTime, isPost, bottom_image, index } = _a, props = tslib_1.__rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "index"]);
16
16
  const [spread, setSpread] = (0, react_1.useState)(true);
17
17
  const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
@@ -151,7 +151,7 @@ const CommodityDetailDiro = (_a) => {
151
151
  top: 0,
152
152
  objectFit: 'cover',
153
153
  width: '100%'
154
- }), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
154
+ }), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: 'pdp image' }))),
155
155
  react_1.default.createElement("div", { className: 'pb-commondityDiro-content' },
156
156
  react_1.default.createElement("div", { className: 'pb-commondityDiro-content-title' }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'MEDIUM LADY D-LITE BAG'),
157
157
  react_1.default.createElement("div", { className: 'pb-commondityDiro-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === '') }, (product === null || product === void 0 ? void 0 : product.collection) || 'Gold-Tone and White Butterfly Zodiac Embroidery'),
@@ -161,12 +161,12 @@ const CommodityDetailDiro = (_a) => {
161
161
  react_1.default.createElement("div", { className: 'pb-commondityDiro-desc', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
162
162
  react_1.default.createElement("div", { className: 'pb-commondityDiro-desc-collapse', onClick: handleClickCollapse },
163
163
  react_1.default.createElement("div", { className: 'pb-commondityDiro-desc-collapse-title' }, "DESCRIPTION"),
164
- react_1.default.createElement("img", { className: `pb-commondityDiro-desc-collapse-icon ${spread ? 'pb-commondityDiro-desc-collapse-iconActive' : ''}`, src: arrow_png_1.default, alt: '' })),
164
+ react_1.default.createElement("img", { className: `pb-commondityDiro-desc-collapse-icon ${spread ? 'pb-commondityDiro-desc-collapse-iconActive' : ''}`, src: arrow_png_1.default, alt: 'arrow image' })),
165
165
  react_1.default.createElement("div", { className: 'pb-commondityDiro-desc-info', hidden: !spread }, (product === null || product === void 0 ? void 0 : product.info) ||
166
166
  'The Lady D-Lite bag combines classic elegance with House modernity. The style is fully embroidered with a gold-tone and white Butterfly Zodiac motif by Pietro Ruffo, showcasing a constellation enhanced by astrological signs and adorned with butterflies. A Christian Dior Paris signature adorns the front, while D.I.O.R. charms in pale gold-finish metal further enhance and highlight the silhouette. Featuring a wide, removable embroidered shoulder strap, the medium Lady D-Lite bag can be carried by hand or worn crossbody.')),
167
167
  (!product || (product === null || product === void 0 ? void 0 : product.link)) && (react_1.default.createElement(react_1.default.Fragment, null,
168
168
  react_1.default.createElement("div", { className: 'pb-commondityDiro-h90' }),
169
169
  react_1.default.createElement("div", { className: 'pb-commondityDiro-bottom' },
170
- react_1.default.createElement("button", { onClick: handleLink, className: 'pb-commondityDiro-bottom-btn' }, (_l = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _l !== void 0 ? _l : 'SHOP NOW')))))));
170
+ react_1.default.createElement("button", { "aria-label": (_l = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _l !== void 0 ? _l : 'SHOP NOW', onClick: handleLink, className: 'pb-commondityDiro-bottom-btn' }, (_m = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _m !== void 0 ? _m : 'SHOP NOW')))))));
171
171
  };
172
172
  exports.default = (0, react_1.memo)(CommodityDetailDiro);
@@ -12,7 +12,7 @@ const ExpandableText_1 = tslib_1.__importDefault(require("../../../../core/compo
12
12
  const useEventReport_1 = require("../../../../core/hooks/useEventReport");
13
13
  const FormatImage_1 = tslib_1.__importDefault(require("../../../../core/components/SxpPageRender/FormatImage"));
14
14
  const CommodityDetailDiroNew = (_a) => {
15
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
15
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
16
16
  var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index } = _a, props = tslib_1.__rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index"]);
17
17
  const [spread, setSpread] = (0, react_1.useState)(true);
18
18
  const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
@@ -140,7 +140,7 @@ Made in Italy` })));
140
140
  top: 0,
141
141
  objectFit: 'cover',
142
142
  width: '100%'
143
- }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: '' }))),
143
+ }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: 'pdp image' }))),
144
144
  react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content' },
145
145
  react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
146
146
  react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
@@ -149,7 +149,7 @@ Made in Italy` })));
149
149
  react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-right' },
150
150
  react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) }, priceText),
151
151
  react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo) }, (_m = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _m !== void 0 ? _m : '税费'))),
152
- (!product || (product === null || product === void 0 ? void 0 : product.link)) && (react_1.default.createElement("button", { onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle }, (_o = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _o !== void 0 ? _o : 'Shop now')),
152
+ (!product || (product === null || product === void 0 ? void 0 : product.link)) && (react_1.default.createElement("button", { "aria-label": (_o = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _o !== void 0 ? _o : 'Shop now', onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle }, (_p = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _p !== void 0 ? _p : 'Shop now')),
153
153
  productInfoText({ isPost }))),
154
154
  react_1.default.createElement(Modal_1.default, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
155
155
  };
@@ -29,8 +29,8 @@ const Prompt = (_a) => {
29
29
  };
30
30
  return (react_1.default.createElement("div", Object.assign({ className: `pb-prompt ${(0, css_1.css)(Object.assign({}, style))}` }, props),
31
31
  react_1.default.createElement("div", { className: 'pb-prompt-icon' },
32
- react_1.default.createElement("img", { width: '100%', src: iconSrc !== null && iconSrc !== void 0 ? iconSrc : success_png_1.default })),
32
+ react_1.default.createElement("img", { width: '100%', src: iconSrc !== null && iconSrc !== void 0 ? iconSrc : success_png_1.default, alt: 'success image' })),
33
33
  react_1.default.createElement("div", { className: 'pb-prompt-content' }, content),
34
- react_1.default.createElement("button", { className: 'pb-prompt-btn', style: submitButtonStyle, onClick: handleOk }, btnText)));
34
+ react_1.default.createElement("button", { "aria-label": btnText, className: 'pb-prompt-btn', style: submitButtonStyle, onClick: handleOk }, btnText)));
35
35
  };
36
36
  exports.default = (0, react_1.memo)(Prompt);
@@ -12,7 +12,7 @@ const Appoint = (_a) => {
12
12
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
13
13
  return (react_1.default.createElement(EventProvider_1.default, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: (0, css_1.css)(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props),
14
14
  react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
15
- react_1.default.createElement("img", { className: (0, css_1.css)({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: (_d = (_c = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, alt: '' })),
15
+ react_1.default.createElement("img", { className: (0, css_1.css)({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: (_d = (_c = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, alt: 'cta image' })),
16
16
  react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ overflow: 'hidden', textOverflow: 'ellipsis' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_e = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _e !== void 0 ? _e : 'Product Name')));
17
17
  };
18
18
  exports.default = (0, react_1.memo)(Appoint);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.0.86",
3
+ "version": "1.0.88",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",