pb-sxp-ui 1.16.1 → 1.16.2

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.
@@ -10,9 +10,11 @@ const NineCommodity = (_a) => {
10
10
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
11
11
  const { sxpParameter } = useSxpDataSource();
12
12
  const [products] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [{}, {}, {}, {}, {}, {}, {}, {}, {}]);
13
+ if (!(products === null || products === void 0 ? void 0 : products.length) || (products === null || products === void 0 ? void 0 : products.length) < 1)
14
+ return null;
13
15
  return (React.createElement("div", { className: styles.nineProduct },
14
16
  React.createElement("div", { className: styles.gridContainer }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
15
- var _a, _b, _c, _d, _e, _f;
17
+ var _a, _b, _c, _d, _e, _f, _g, _h;
16
18
  if (itemIndex < 9) {
17
19
  return (React.createElement(React.Fragment, { key: itemIndex }, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement("div", { className: styles.gridItem, role: 'listitem' },
18
20
  React.createElement("div", { className: styles.gridBox },
@@ -28,7 +30,7 @@ const NineCommodity = (_a) => {
28
30
  display: 'block'
29
31
  }, isActive: isActive }),
30
32
  React.createElement("div", { className: styles.buttonWrapper, "aria-label": (_f = (_e = item === null || item === void 0 ? void 0 : item.bindCta) === null || _e === void 0 ? void 0 : _e.enTitle) !== null && _f !== void 0 ? _f : 'Shop Now', dangerouslySetInnerHTML: {
31
- __html: setFontForText("item?.bindCta?.enTitle ?? 'Shop Now', ctaTempStyles?.ctaTitle")
33
+ __html: setFontForText((_h = (_g = item === null || item === void 0 ? void 0 : item.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
32
34
  } })))))));
33
35
  }
34
36
  else {
@@ -12,9 +12,11 @@ const NineCommodity = (_a) => {
12
12
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
13
13
  const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
14
14
  const [products] = (0, react_1.useState)((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [{}, {}, {}, {}, {}, {}, {}, {}, {}]);
15
+ if (!(products === null || products === void 0 ? void 0 : products.length) || (products === null || products === void 0 ? void 0 : products.length) < 1)
16
+ return null;
15
17
  return (react_1.default.createElement("div", { className: index_module_less_1.default.nineProduct },
16
18
  react_1.default.createElement("div", { className: index_module_less_1.default.gridContainer }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
17
- var _a, _b, _c, _d, _e, _f;
19
+ var _a, _b, _c, _d, _e, _f, _g, _h;
18
20
  if (itemIndex < 9) {
19
21
  return (react_1.default.createElement(react_1.default.Fragment, { key: itemIndex }, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (react_1.default.createElement("div", { className: index_module_less_1.default.gridItem, role: 'listitem' },
20
22
  react_1.default.createElement("div", { className: index_module_less_1.default.gridBox },
@@ -30,7 +32,7 @@ const NineCommodity = (_a) => {
30
32
  display: 'block'
31
33
  }, isActive: isActive }),
32
34
  react_1.default.createElement("div", { className: index_module_less_1.default.buttonWrapper, "aria-label": (_f = (_e = item === null || item === void 0 ? void 0 : item.bindCta) === null || _e === void 0 ? void 0 : _e.enTitle) !== null && _f !== void 0 ? _f : 'Shop Now', dangerouslySetInnerHTML: {
33
- __html: (0, tool_1.setFontForText)("item?.bindCta?.enTitle ?? 'Shop Now', ctaTempStyles?.ctaTitle")
35
+ __html: (0, tool_1.setFontForText)((_h = (_g = item === null || item === void 0 ? void 0 : item.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
34
36
  } })))))));
35
37
  }
36
38
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.16.1",
3
+ "version": "1.16.2",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",