@redneckz/wildless-cms-uni-blocks 0.13.19 → 0.13.21

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 (48) hide show
  1. package/bin/migration-scripts/0.13.14.js +1 -1
  2. package/bundle/bundle.umd.js +8 -8
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/BenefitsBlock/BenefitsBlock.js +6 -4
  5. package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  6. package/dist/components/Footer/iconsMap.js +1 -1
  7. package/dist/components/Footer/iconsMap.js.map +1 -1
  8. package/dist/hooks/useSWRResource.js +1 -1
  9. package/dist/hooks/useSWRResource.js.map +1 -1
  10. package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +1 -1
  11. package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
  12. package/lib/common.css +1 -1
  13. package/lib/components/BenefitsBlock/BenefitsBlock.js +6 -4
  14. package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  15. package/lib/components/Footer/iconsMap.js +1 -1
  16. package/lib/components/Footer/iconsMap.js.map +1 -1
  17. package/lib/hooks/useSWRResource.js +1 -1
  18. package/lib/hooks/useSWRResource.js.map +1 -1
  19. package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +1 -1
  20. package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
  21. package/mobile/bundle/bundle.umd.js +8 -8
  22. package/mobile/bundle/bundle.umd.min.js +1 -1
  23. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +6 -4
  24. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  25. package/mobile/dist/components/Footer/iconsMap.js +1 -1
  26. package/mobile/dist/components/Footer/iconsMap.js.map +1 -1
  27. package/mobile/dist/hooks/useSWRResource.js +1 -1
  28. package/mobile/dist/hooks/useSWRResource.js.map +1 -1
  29. package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +1 -1
  30. package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
  31. package/mobile/lib/common.css +1 -1
  32. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +6 -4
  33. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  34. package/mobile/lib/components/Footer/iconsMap.js +1 -1
  35. package/mobile/lib/components/Footer/iconsMap.js.map +1 -1
  36. package/mobile/lib/hooks/useSWRResource.js +1 -1
  37. package/mobile/lib/hooks/useSWRResource.js.map +1 -1
  38. package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +1 -1
  39. package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
  40. package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +25 -5
  41. package/mobile/src/components/Footer/iconsMap.ts +1 -1
  42. package/mobile/src/hooks/useSWRResource.ts +1 -0
  43. package/mobile/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +1 -1
  44. package/package.json +1 -1
  45. package/src/components/BenefitsBlock/BenefitsBlock.tsx +25 -5
  46. package/src/components/Footer/iconsMap.ts +1 -1
  47. package/src/hooks/useSWRResource.ts +1 -0
  48. package/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +1 -1
@@ -20,6 +20,6 @@ function adjustProductBlock(block) {
20
20
  }
21
21
 
22
22
  if (block.type === 'ProductBlock' && block?.content) {
23
- block.content.backwardButton = !!block.content?.backwardButton;
23
+ block.content.backwardButton = Boolean(block.content?.backwardButton?.href);
24
24
  }
25
25
  }
@@ -1136,7 +1136,7 @@
1136
1136
  const DEFAULT_FOLDER_NAME = 'wcms-resources';
1137
1137
  function useSWRResource(filename, options = {}) {
1138
1138
  const { fallback = EMPTY_VALUE$1, folderName = DEFAULT_FOLDER_NAME, setBasePath = false } = options;
1139
- const path = joinPath(setBasePath ? projectSettings.BASE_PATH : '', folderName, `${filename}.json`);
1139
+ const path = joinPath('/', setBasePath ? projectSettings.BASE_PATH : '', folderName, `${filename}.json`);
1140
1140
  const { data } = useAsyncData(filename ? path : null, fetchJSONUnsafe, {
1141
1141
  fallback,
1142
1142
  });
@@ -1305,18 +1305,18 @@
1305
1305
 
1306
1306
  const defaultIconSize = 44;
1307
1307
 
1308
- const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: [title ? jsx(Heading, { headingType: "h3", as: "h2", className: "text-center", title: title }) : null, benefitList?.length ? (jsx("div", { className: "flex flex-wrap w-full sm:justify-center mt-xl gap-5xl", role: "list", children: benefitList.map(renderBenefit) })) : null] })));
1308
+ const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: style('space-y-x', className), defaultPadding: "p-6xl", ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: "text-left sm:text-center", title: title })) : null, benefitList?.length ? (jsx("div", { className: "flex flex-wrap w-full sm:justify-center mt-xl gap-5xl", role: "list", children: benefitList.map(renderBenefit) })) : null] })));
1309
1309
  const renderBenefit = (benefit, i) => (jsxs("div", { className: "flex gap-m items-center md:basis-1/2 md:max-w-[500px]", role: "listitem", children: [benefit?.icon?.icon ? (jsx(RoundedIcon, { className: "shrink-0", defaultIconSize: defaultIconSize, iconBgVersion: benefit?.iconBgVersion || '', ...benefit?.icon })) : null, benefit?.icon?.src ? jsx(Img, { className: "shrink-0", image: benefit.icon }) : null, benefit?.label ? (jsxs("div", { className: "sm:h-full", children: [jsx(Heading, { headingType: "h6", children: benefit.label }), renderDescription$3(benefit.description)] })) : null] }, String(i)));
1310
1310
  const renderDescription$3 = (description) => {
1311
1311
  const benefitType = description?.benefitType || null;
1312
- return description && benefitType ? (jsx("div", { className: "mt-xs text-l font-light text-secondary-text group-data-secondary:text-white/80", children: benefitType === 'list'
1312
+ return description && benefitType ? (jsx("div", { className: "mt-2xs sm:mt-xs", children: benefitType === 'list'
1313
1313
  ? renderListBenefit(description)
1314
1314
  : renderTextBenefit(description) })) : null;
1315
1315
  };
1316
- const renderTextBenefit = (description) => description?.name || null;
1316
+ const renderTextBenefit = (description) => description?.name ? (jsx(Paragraph, { font: "font-light", size: "text-l", color: "text-secondary-text group-data-secondary:text-white", children: description.name })) : null;
1317
1317
  const renderListBenefit = (description) => {
1318
1318
  const listStyleType = description?.bullets ? 'list-disc pl-3xl' : '';
1319
- return description?.items && description.items.length > 0 ? (jsx("ul", { className: listStyleType, children: description.items.map((_, i) => (jsx("li", { children: _ }, `benefitListItem-${i}`))) })) : null;
1319
+ return description?.items && description.items.length > 0 ? (jsx("ul", { className: listStyleType, children: description.items.map((_, i) => (jsx(Paragraph, { font: "font-light", size: "text-l", color: "text-secondary-text group-data-secondary:text-white", children: _ }, `benefitListItem-${i}`))) })) : null;
1320
1320
  };
1321
1321
 
1322
1322
  const renderButtonsSection = (buttons, { className, buttonClassName, isVertical } = {}) => buttons?.length && buttons.some((_) => _?.text || _?.icon?.icon) ? (jsx("div", { className: style('flex', isVertical ? 'flex-col gap-xs justify-items-stretch' : 'flex-wrap gap-m', className), children: buttons.map(renderButton(buttonClassName)) })) : null;
@@ -2778,7 +2778,7 @@
2778
2778
  label: 'Youtube',
2779
2779
  },
2780
2780
  {
2781
- origins: ['rutube.com'],
2781
+ origins: ['rutube.ru'],
2782
2782
  iconMapped: { icon: 'RutubeIcon' },
2783
2783
  label: 'Rutube',
2784
2784
  },
@@ -2959,7 +2959,7 @@
2959
2959
  };
2960
2960
 
2961
2961
  const ICONS = ['ArrowDownIcon', 'ArrowUpIcon'];
2962
- const resultsGridStyle = 'lg:grid lg:grid-cols-12 gap-2xs border-box';
2962
+ const resultsGridStyle = 'space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box';
2963
2963
  const BaseFiltrationInner = JSX(({ label = '', filtrationState = {}, topItemsCount = 0, block, notFound, ...rest }) => {
2964
2964
  const blocksToRender = block?.blocks?.filter((b) => checkShouldRenderBlock(filtrationState, b.content || {})) || [];
2965
2965
  const [visibleBlocks, hiddenBlocks] = topItemsCount > 0
@@ -5313,7 +5313,7 @@
5313
5313
  return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-3xl sticky bottom-0 pointer-events-auto" }) }));
5314
5314
  }
5315
5315
 
5316
- const packageVersion = "0.13.19";
5316
+ const packageVersion = "0.13.21";
5317
5317
 
5318
5318
  exports.Blocks = Blocks;
5319
5319
  exports.ContentPage = ContentPage;