@knovator/pagecreator 1.0.6 → 1.0.8
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.
- package/index.js +3 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -584,11 +584,12 @@ function LinksWidget(_ref) {
|
|
|
584
584
|
className = _ref.className,
|
|
585
585
|
itemsContainer = _ref.itemsContainer;
|
|
586
586
|
var gridClasses = "grid grid-cols-".concat(widgetData.mobilePerRow, " md:grid-cols-").concat(widgetData.tabletPerRow, " lg:grid-cols-").concat(widgetData.webPerRow);
|
|
587
|
+
var collectionItems = Array.isArray(widgetData.collectionItems) ? widgetData.collectionItems : [];
|
|
587
588
|
if (typeof itemsContainer === 'function') return itemsContainer(widgetData.itemsType === 'Image' ? widgetData.items.filter(filterItemData).map(function (item, index) {
|
|
588
589
|
return /*#__PURE__*/React.createElement(Fragment, {
|
|
589
590
|
key: index
|
|
590
591
|
}, formatItem(item));
|
|
591
|
-
}) :
|
|
592
|
+
}) : collectionItems.map(function (item, index) {
|
|
592
593
|
return /*#__PURE__*/React.createElement(Fragment, {
|
|
593
594
|
key: index
|
|
594
595
|
}, formatItem(item));
|
|
@@ -599,7 +600,7 @@ function LinksWidget(_ref) {
|
|
|
599
600
|
return /*#__PURE__*/React.createElement(Fragment, {
|
|
600
601
|
key: index
|
|
601
602
|
}, formatItem(item));
|
|
602
|
-
}) :
|
|
603
|
+
}) : collectionItems.map(function (item, index) {
|
|
603
604
|
return /*#__PURE__*/React.createElement(Fragment, {
|
|
604
605
|
key: index
|
|
605
606
|
}, formatItem(item));
|
|
@@ -703,7 +704,6 @@ function Page(_ref) {
|
|
|
703
704
|
onClick = _ref.onClick,
|
|
704
705
|
formatWidget = _ref.formatWidget,
|
|
705
706
|
hideWidgetTitles = _ref.hideWidgetTitles;
|
|
706
|
-
console.log('pageData', pageData);
|
|
707
707
|
if (!pageData) return null;
|
|
708
708
|
return /*#__PURE__*/React.createElement("div", {
|
|
709
709
|
className: "kpc_page"
|