@redneckz/wildless-cms-uni-blocks 0.14.311 → 0.14.313

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 (80) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +12 -12
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/CarouselCard/constants.d.ts +0 -1
  5. package/bundle/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +2 -1
  6. package/bundle/ui-kit/RichText/RichTextProps.d.ts +1 -1
  7. package/dist/components/CarouselCard/constants.d.ts +0 -1
  8. package/dist/components/CarouselCard/constants.js +1 -5
  9. package/dist/components/CarouselCard/constants.js.map +1 -1
  10. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +5 -4
  11. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  12. package/dist/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +2 -1
  13. package/dist/components/GrantSupport/GrantSupport.js +2 -1
  14. package/dist/components/GrantSupport/GrantSupport.js.map +1 -1
  15. package/dist/hooks/useAspects/aspects/getAspectsWithInclude.js +1 -1
  16. package/dist/hooks/useAspects/aspects/getAspectsWithInclude.js.map +1 -1
  17. package/dist/ui-kit/BaseProductTile/BaseProductTile.js +1 -1
  18. package/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  19. package/dist/ui-kit/RichText/RichTextProps.d.ts +1 -1
  20. package/lib/common.css +1 -1
  21. package/lib/components/CarouselCard/constants.d.ts +0 -1
  22. package/lib/components/CarouselCard/constants.js +0 -4
  23. package/lib/components/CarouselCard/constants.js.map +1 -1
  24. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +5 -4
  25. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  26. package/lib/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +2 -1
  27. package/lib/components/GrantSupport/GrantSupport.js +2 -1
  28. package/lib/components/GrantSupport/GrantSupport.js.map +1 -1
  29. package/lib/hooks/useAspects/aspects/getAspectsWithInclude.js +1 -1
  30. package/lib/hooks/useAspects/aspects/getAspectsWithInclude.js.map +1 -1
  31. package/lib/ui-kit/BaseProductTile/BaseProductTile.js +1 -1
  32. package/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  33. package/lib/ui-kit/RichText/RichTextProps.d.ts +1 -1
  34. package/mobile/bundle/bundle.umd.js +7 -7
  35. package/mobile/bundle/bundle.umd.min.js +1 -1
  36. package/mobile/bundle/components/CarouselCard/constants.d.ts +0 -1
  37. package/mobile/bundle/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +2 -1
  38. package/mobile/bundle/ui-kit/RichText/RichTextProps.d.ts +1 -1
  39. package/mobile/dist/components/CarouselCard/constants.d.ts +0 -1
  40. package/mobile/dist/components/CarouselCard/constants.js +1 -5
  41. package/mobile/dist/components/CarouselCard/constants.js.map +1 -1
  42. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +5 -4
  43. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  44. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +2 -1
  45. package/mobile/dist/components/GrantSupport/GrantSupport.js +2 -1
  46. package/mobile/dist/components/GrantSupport/GrantSupport.js.map +1 -1
  47. package/mobile/dist/hooks/useAspects/aspects/getAspectsWithInclude.js +1 -1
  48. package/mobile/dist/hooks/useAspects/aspects/getAspectsWithInclude.js.map +1 -1
  49. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js +1 -1
  50. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  51. package/mobile/dist/ui-kit/RichText/RichTextProps.d.ts +1 -1
  52. package/mobile/lib/common.css +1 -1
  53. package/mobile/lib/components/CarouselCard/constants.d.ts +0 -1
  54. package/mobile/lib/components/CarouselCard/constants.js +0 -4
  55. package/mobile/lib/components/CarouselCard/constants.js.map +1 -1
  56. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +5 -4
  57. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  58. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +2 -1
  59. package/mobile/lib/components/GrantSupport/GrantSupport.js +2 -1
  60. package/mobile/lib/components/GrantSupport/GrantSupport.js.map +1 -1
  61. package/mobile/lib/hooks/useAspects/aspects/getAspectsWithInclude.js +1 -1
  62. package/mobile/lib/hooks/useAspects/aspects/getAspectsWithInclude.js.map +1 -1
  63. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js +1 -1
  64. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  65. package/mobile/lib/ui-kit/RichText/RichTextProps.d.ts +1 -1
  66. package/mobile/src/components/CarouselCard/constants.ts +0 -5
  67. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +7 -2
  68. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCardContent.ts +3 -1
  69. package/mobile/src/components/GrantSupport/GrantSupport.tsx +2 -1
  70. package/mobile/src/hooks/useAspects/aspects/getAspectsWithInclude.tsx +1 -1
  71. package/mobile/src/ui-kit/BaseProductTile/BaseProductTile.tsx +5 -1
  72. package/mobile/src/ui-kit/RichText/RichTextProps.ts +1 -1
  73. package/package.json +2 -2
  74. package/src/components/CarouselCard/constants.ts +0 -5
  75. package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +7 -2
  76. package/src/components/CarouselTariffsCard/CarouselTariffsCardContent.ts +3 -1
  77. package/src/components/GrantSupport/GrantSupport.tsx +2 -1
  78. package/src/hooks/useAspects/aspects/getAspectsWithInclude.tsx +1 -1
  79. package/src/ui-kit/BaseProductTile/BaseProductTile.tsx +5 -1
  80. package/src/ui-kit/RichText/RichTextProps.ts +1 -1
@@ -687,7 +687,7 @@
687
687
  const img = image?.src ? jsx(Img, { image: image }) : null;
688
688
  const headline = (jsx(Headline, { title: title, description: description, headlineVersion: headlineVersion, align: align, isEmbedded: true }));
689
689
  const filteredBenefits = benefits?.filter((_) => _?.type === 'rte' || 'label' in _ || 'description' in _);
690
- return (jsx(BaseTile, { className: className, padding: padding, defaultPadding: defaultPadding, ...(isFullWidthTitle ? { title: headline } : { insetTitle: headline }), ...leftOrRightImage(img, directionRight), isImageSecondary: isImageSecondary, imageAlign: imageAlign, isImageAlwaysOnRight: isImageAlwaysOnRight, buttons: renderButtonsSection(buttons), backwardButton: backwardButton, ...rest, children: jsxs("div", { className: "flex flex-col sm:gap-xl gap-4xl", children: [filteredBenefits?.length ? (jsx(BenefitsList, { benefitsVersion: benefitsVersion, isTabularBenefits: isTabularBenefits, benefits: filteredBenefits })) : null, __html ? jsx(RichText, { __html: __html }) : null, items?.length ? (jsx(List, { items: items, isDotted: isDotted, listItemSize: LIST_SIZE[headlineVersion] })) : null, children, priceList?.length ? jsx(PriceList, { priceList: priceList }) : null, renderTags(tags)] }) }));
690
+ return (jsx(BaseTile, { className: className, padding: padding, defaultPadding: defaultPadding, ...(isFullWidthTitle ? { title: headline } : { insetTitle: headline }), ...leftOrRightImage(img, directionRight), isImageSecondary: isImageSecondary, imageAlign: imageAlign, isImageAlwaysOnRight: isImageAlwaysOnRight, buttons: renderButtonsSection(buttons), backwardButton: backwardButton, ...rest, children: jsxs("div", { className: "flex flex-col sm:gap-xl gap-4xl", children: [filteredBenefits?.length ? (jsx(BenefitsList, { benefitsVersion: benefitsVersion, isTabularBenefits: isTabularBenefits, benefits: filteredBenefits })) : null, __html ? (jsx("div", { className: "min-w-max @sm:min-w-fit", children: jsx(RichText, { __html: __html }) })) : null, items?.length ? (jsx(List, { items: items, isDotted: isDotted, listItemSize: LIST_SIZE[headlineVersion] })) : null, children, priceList?.length ? jsx(PriceList, { priceList: priceList }) : null, renderTags(tags)] }) }));
691
691
  });
692
692
  const leftOrRightImage = (img, directionRight) => directionRight ? { rightImage: img } : { leftImage: img };
693
693
  const renderTags = (tags) => (tags?.length ? jsx(Tags, { tags: tags }) : null);
@@ -3436,7 +3436,7 @@
3436
3436
  return (jsxs("div", { className: "py-lg border-b border-main-divider", children: [title ? (jsx("div", { className: "opacity-80", children: jsx(Text, { size: "text-m", color: "text-secondary-text", children: title }) })) : null, description ? (jsx("div", { className: "mt-2xs", children: jsx(Text, { size: "text-xl", color: "text-primary-text", children: description }) })) : null, buttons?.length ? (jsx("div", { className: "text-primary-main", children: renderButtonsSection(buttons) })) : null] }, String(i)));
3437
3437
  };
3438
3438
 
3439
- const CarouselTariffsCard = JSX(({ className = '', title, align = 'text-center', icon, button, visibleCellsCount = 1, cardCells = [], options, ...rest }) => {
3439
+ const CarouselTariffsCard = JSX(({ className = '', title, align = 'text-center', icon, button, visibleCellsCount = 1, cardCells = [], options, data, ...rest }) => {
3440
3440
  const cellsNode = cardCells.map(renderCardInfo);
3441
3441
  const [visibleCells, hiddenCells] = visibleCellsCount > 0
3442
3442
  ? [cellsNode.slice(0, visibleCellsCount), cellsNode.slice(visibleCellsCount)]
@@ -3447,13 +3447,13 @@
3447
3447
  setIsVisible(event.isUnfolded);
3448
3448
  }
3449
3449
  }), []);
3450
- return (jsxs(BlockWrapper, { className: style('flex flex-col', className), defaultPadding: "p-2xl", ...rest, children: [isIcon(icon) ? (jsx("div", { className: "self-center", children: jsx(Img, { image: icon }) })) : null, title ? (jsx(Heading, { className: style('pt-xs', align), headingType: "h5", title: title })) : null, button?.text ? jsx(LinkButton, { className: "w-full mt-m mb-lg", ...button }) : null, hiddenCells.length ? (jsx(Foldable, { renderFoldableSection: () => (jsxs("div", { children: [visibleCells, jsx(FoldableSection, { isUnfolded: isVisible, children: hiddenCells })] })), renderFoldButton: cardCells.length > 1 ? renderFoldButton$3(isVisible, options?.parent) : null })) : (jsx("div", { children: visibleCells }))] }));
3450
+ return (jsxs(BlockWrapper, { className: style('flex flex-col', className), defaultPadding: "p-2xl", ...rest, children: [isIcon(icon) ? (jsx("div", { className: "self-center", children: jsx(Img, { image: icon }) })) : null, title ? (jsx(Heading, { className: style('pt-xs', align), headingType: "h5", title: title })) : null, button?.text ? jsx(LinkButton, { className: "w-full mt-m mb-lg", ...button }) : null, hiddenCells.length ? (jsx(Foldable, { renderFoldableSection: () => (jsxs("div", { children: [visibleCells, jsx(FoldableSection, { isUnfolded: isVisible, children: hiddenCells })] })), renderFoldButton: cardCells.length > 1 ? renderFoldButton$3(isVisible, options?.parent, data) : null })) : (jsx("div", { children: visibleCells }))] }));
3451
3451
  });
3452
- const renderFoldButton$3 = (isUnfolded, parent) => () => (jsxs("button", { className: "w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center", onClick: () => {
3452
+ const renderFoldButton$3 = (isUnfolded, parent, data) => () => (jsxs("button", { className: "w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center", onClick: () => {
3453
3453
  if (parent !== undefined) {
3454
3454
  defaultEventBus.fire('fold', { type: 'fold', isUnfolded: !isUnfolded, parent });
3455
3455
  }
3456
- }, type: "button", children: [jsx("div", { children: isUnfolded ? 'Скрыть' : 'Подробнее о тарифе' }), jsx(Icon, { className: "text-primary-text", name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16" })] }));
3456
+ }, type: "button", ...(isUnfolded ? getAspectsAttributes(data) : {}), children: [jsx("div", { children: isUnfolded ? 'Скрыть' : 'Подробнее о тарифе' }), jsx(Icon, { className: "text-primary-text", name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16" })] }));
3457
3457
 
3458
3458
  const gradientStyle = 'bg-gradient-to-r from-main-gradient-start to-main-gradient-end';
3459
3459
  const borderStyle = 'border-gray border-solid border';
@@ -4201,6 +4201,11 @@
4201
4201
  const renderMonthNames = (item, colSize) => item.month?.map((_, i) => (jsx("div", { style: { flexBasis: `${colSize}%` }, children: _.text }, `monthName-${i}`)));
4202
4202
  const renderMonthImages = (item) => item.month?.map((_) => _.image?.src ? (jsx("div", { className: "h-52 border-r pr-s border-main-divider last:border-r-0", children: jsx(Img, { image: _.image, className: "flex" }) }, `monthImage-${_.image.src}`)) : null);
4203
4203
 
4204
+ const getAspectsWithInclude = (data, include) => data?.map(({ aspectName, params }) => ({
4205
+ aspectName,
4206
+ params: aspectName === 'mindboxEvent' ? { ...params, eventJson: include } : params,
4207
+ }));
4208
+
4204
4209
  const GrantSupport = UniBlock(({ className, title, button, regionSource, data, ...rest }) => {
4205
4210
  const [region, setRegion] = useState({ key: '' });
4206
4211
  const regions = regionSource?.regions ?? [];
@@ -4210,7 +4215,7 @@
4210
4215
  });
4211
4216
  const regionHref = regions?.find((_) => _.name === region.key)?.href;
4212
4217
  const buttonText = button?.text ? button.text : 'Перейти';
4213
- return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container max-w-[978px] space-y-m", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "@xl:text-center" }) : null, regions ? (jsx(SelectControl, { label: "\u0412\u0430\u0448 \u0440\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ name = '' }) => ({ key: name, text: name })), value: region, onChange: setRegion })) : null, regionHref ? (jsx("div", { className: "text-center", children: jsx(LinkButton, { href: regionHref, target: "_blank", className: style('p-m w-full @xl:w-auto', buttonStyle), data: data, children: buttonText }) })) : null] }) }));
4218
+ return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container max-w-[978px] space-y-m", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "@xl:text-center" }) : null, regions ? (jsx(SelectControl, { label: "\u0412\u0430\u0448 \u0440\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ name = '' }) => ({ key: name, text: name })), value: region, onChange: setRegion })) : null, regionHref ? (jsx("div", { className: "text-center", children: jsx(LinkButton, { href: regionHref, target: "_blank", className: style('p-m w-full @xl:w-auto', buttonStyle), data: getAspectsWithInclude(data, region?.key), children: buttonText }) })) : null] }) }));
4214
4219
  });
4215
4220
 
4216
4221
  const isHrefActive = (router) => ({ href }) => !href ? false : withoutQuery(getRouterHref(href, router)).startsWith(withoutQuery(href));
@@ -4236,11 +4241,6 @@
4236
4241
  ? 'text-primary-main'
4237
4242
  : style(flat ? 'text-primary-text' : 'text-secondary-text', 'hover:text-primary-main'), 'group-data-transparent:text-white group-data-transparent:hover:text-primary-hover');
4238
4243
 
4239
- const getAspectsWithInclude = (data, include) => data?.map(({ aspectName, params }) => ({
4240
- aspectName,
4241
- params: aspectName === 'mindboxEvent' ? { ...params, eventValueText: include } : params,
4242
- }));
4243
-
4244
4244
  const groupBy = (list, keyGetter) => {
4245
4245
  const result = new Map();
4246
4246
  for (const item of list) {
@@ -6191,7 +6191,7 @@
6191
6191
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6192
6192
  });
6193
6193
 
6194
- const packageVersion = "0.14.310";
6194
+ const packageVersion = "0.14.312";
6195
6195
 
6196
6196
  exports.Blocks = Blocks;
6197
6197
  exports.ContentPage = ContentPage;