@redneckz/wildless-cms-uni-blocks 0.6.34 → 0.6.35

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 (97) hide show
  1. package/bundle/bundle.umd.js +55 -20
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/Calculator/constants.d.ts +3 -0
  4. package/bundle/components/Calculator/useDepositCalculatorParams.d.ts +22 -0
  5. package/bundle/components/Header/HeaderSecondaryMenu.d.ts +1 -0
  6. package/bundle/services/sitemap/SitemapProps.d.ts +1 -2
  7. package/dist/components/Calculator/DepositCalculatorForm.js +13 -11
  8. package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  9. package/dist/components/Calculator/constants.d.ts +3 -0
  10. package/dist/components/Calculator/constants.js +10 -1
  11. package/dist/components/Calculator/constants.js.map +1 -1
  12. package/dist/components/Calculator/useDepositCalculatorParams.d.ts +22 -0
  13. package/dist/components/Calculator/useDepositCalculatorParams.js +28 -0
  14. package/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -0
  15. package/dist/components/Header/Header.js +2 -2
  16. package/dist/components/Header/Header.js.map +1 -1
  17. package/dist/components/Header/HeaderSecondaryMenu.d.ts +1 -0
  18. package/dist/components/Header/HeaderSecondaryMenu.js +2 -2
  19. package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  20. package/dist/components/OtherProductsItem/OtherProductsItem.js +1 -1
  21. package/dist/components/OtherProductsItem/OtherProductsItem.js.map +1 -1
  22. package/dist/components/VerticalLayout/VerticalLayout.js +5 -3
  23. package/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
  24. package/dist/services/sitemap/SitemapProps.d.ts +1 -2
  25. package/lib/components/Calculator/DepositCalculatorForm.js +14 -12
  26. package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  27. package/lib/components/Calculator/constants.d.ts +3 -0
  28. package/lib/components/Calculator/constants.js +9 -0
  29. package/lib/components/Calculator/constants.js.map +1 -1
  30. package/lib/components/Calculator/useDepositCalculatorParams.d.ts +22 -0
  31. package/lib/components/Calculator/useDepositCalculatorParams.js +25 -0
  32. package/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -0
  33. package/lib/components/Header/Header.js +2 -2
  34. package/lib/components/Header/Header.js.map +1 -1
  35. package/lib/components/Header/HeaderSecondaryMenu.d.ts +1 -0
  36. package/lib/components/Header/HeaderSecondaryMenu.js +2 -2
  37. package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  38. package/lib/components/OtherProductsItem/OtherProductsItem.js +1 -1
  39. package/lib/components/OtherProductsItem/OtherProductsItem.js.map +1 -1
  40. package/lib/components/VerticalLayout/VerticalLayout.js +5 -3
  41. package/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
  42. package/lib/services/sitemap/SitemapProps.d.ts +1 -2
  43. package/mobile/bundle/bundle.umd.js +1 -1
  44. package/mobile/bundle/bundle.umd.min.js +1 -1
  45. package/mobile/bundle/components/Calculator/constants.d.ts +3 -0
  46. package/mobile/bundle/components/Calculator/useDepositCalculatorParams.d.ts +22 -0
  47. package/mobile/bundle/components/Header/HeaderSecondaryMenu.d.ts +1 -0
  48. package/mobile/bundle/services/sitemap/SitemapProps.d.ts +1 -2
  49. package/mobile/dist/components/Calculator/DepositCalculatorForm.js +13 -11
  50. package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  51. package/mobile/dist/components/Calculator/constants.d.ts +3 -0
  52. package/mobile/dist/components/Calculator/constants.js +10 -1
  53. package/mobile/dist/components/Calculator/constants.js.map +1 -1
  54. package/mobile/dist/components/Calculator/useDepositCalculatorParams.d.ts +22 -0
  55. package/mobile/dist/components/Calculator/useDepositCalculatorParams.js +28 -0
  56. package/mobile/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -0
  57. package/mobile/dist/components/Header/HeaderSecondaryMenu.d.ts +1 -0
  58. package/mobile/dist/components/Header/HeaderSecondaryMenu.js +2 -2
  59. package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  60. package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js +1 -1
  61. package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js.map +1 -1
  62. package/mobile/dist/components/VerticalLayout/VerticalLayout.js +5 -3
  63. package/mobile/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
  64. package/mobile/dist/services/sitemap/SitemapProps.d.ts +1 -2
  65. package/mobile/lib/components/Calculator/DepositCalculatorForm.js +14 -12
  66. package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  67. package/mobile/lib/components/Calculator/constants.d.ts +3 -0
  68. package/mobile/lib/components/Calculator/constants.js +9 -0
  69. package/mobile/lib/components/Calculator/constants.js.map +1 -1
  70. package/mobile/lib/components/Calculator/useDepositCalculatorParams.d.ts +22 -0
  71. package/mobile/lib/components/Calculator/useDepositCalculatorParams.js +25 -0
  72. package/mobile/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -0
  73. package/mobile/lib/components/Header/HeaderSecondaryMenu.d.ts +1 -0
  74. package/mobile/lib/components/Header/HeaderSecondaryMenu.js +2 -2
  75. package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  76. package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js +1 -1
  77. package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js.map +1 -1
  78. package/mobile/lib/components/VerticalLayout/VerticalLayout.js +5 -3
  79. package/mobile/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
  80. package/mobile/lib/services/sitemap/SitemapProps.d.ts +1 -2
  81. package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +17 -22
  82. package/mobile/src/components/Calculator/constants.ts +11 -0
  83. package/mobile/src/components/Calculator/useDepositCalculatorParams.ts +64 -0
  84. package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +12 -9
  85. package/mobile/src/components/OtherProductsItem/OtherProductsItem.tsx +1 -1
  86. package/mobile/src/components/VerticalLayout/VerticalLayout.tsx +5 -3
  87. package/mobile/src/services/sitemap/SitemapProps.ts +1 -2
  88. package/package.json +1 -1
  89. package/src/components/Calculator/Calculator.fixture.tsx +0 -5
  90. package/src/components/Calculator/DepositCalculatorForm.tsx +17 -22
  91. package/src/components/Calculator/constants.ts +11 -0
  92. package/src/components/Calculator/useDepositCalculatorParams.ts +64 -0
  93. package/src/components/Header/Header.tsx +2 -1
  94. package/src/components/Header/HeaderSecondaryMenu.tsx +12 -9
  95. package/src/components/OtherProductsItem/OtherProductsItem.tsx +1 -1
  96. package/src/components/VerticalLayout/VerticalLayout.tsx +5 -3
  97. package/src/services/sitemap/SitemapProps.ts +1 -2
@@ -909,8 +909,17 @@
909
909
  travelBonusRate: 0.015,
910
910
  restBonusRate: 0.01,
911
911
  };
912
+ const DEFAULT_DEPOSIT_CALCULATOR_PARAMS = {
913
+ minSum: 50000,
914
+ maxSum: 5000000,
915
+ minMonths: 2,
916
+ maxMonths: 120,
917
+ rate: 5.9,
918
+ isMonthlyInterestPayment: true,
919
+ };
912
920
  const CREDIT_CALC_DEFAULT_DIR = 'credit-calculator-data';
913
921
  const BONUS_CALC_DEFAULT_DIR = 'bonus-calculator-data';
922
+ const DEPOSIT_CALC_DEFAULT_DIR = 'deposit-calculator-data';
914
923
 
915
924
  const Rate = JSX(({ rate, title = 'Ставка', unit, rateBlockClassName }) => (jsxs("div", { children: [jsx("div", { className: "text-l-light text-secondary-text", children: title }), jsxs("div", { className: "flex justify-start", children: [jsx("span", { className: `block gradient-color-text font-mohave text-title-huge pr-6 -mt-4 ${rateBlockClassName}`, children: String(rate).replace('.', ',') }), unit ? jsx("span", { className: "gradient-color-text text-[65px] leading-[75px]", children: unit }) : ''] })] })));
916
925
 
@@ -1182,6 +1191,29 @@
1182
1191
  return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма кредита, ₽', { ...calculatorParams, step: 500 }, setMoneyValue), renderMonthsInput('Срок кредита, месяцев', calculatorParams, setMonthsValue), jsxs("div", { className: "mt-7", children: [jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443 \u043D\u0430 \u0441\u0447\u0451\u0442 \u0432 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0435", checked: isSalaryClient, onChange: toggleIsSalaryClient }), jsx(Checkbox, { className: "mt-3", text: "\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u0432 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", checked: isStateEmployee, onChange: toggleIsStateEmployee }), jsx(Checkbox, { className: "mt-3", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsurance, onChange: toggleIsInsurance })] })] }), jsx(Rate, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", rate: calculatorParams.finalRate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-full max-w-[350px]", children: [jsx(CalculatorValueBlock, { title: isAnnuity ? 'Ежемесячный платеж' : 'Платёж в первый месяц', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), jsx(RadioButtonGroup, { items: paymentTypeItems, checkedItem: isAnnuity ? ANNUITY : DIFFERENTIAL, onChange: (text) => toggleIsAnnuity(text === ANNUITY) }), renderButtonSection(buttons), renderFootnote(footnote)] })] }));
1183
1192
  });
1184
1193
 
1194
+ const useDepositCalculatorParams = (userInputParams, sourceBookDir) => {
1195
+ const { isMonthlyInterestPayment, moneyValue } = userInputParams;
1196
+ const data = useCalculatorParams(sourceBookDir || DEPOSIT_CALC_DEFAULT_DIR);
1197
+ const depositCalculatorSourceBookParams = data?.rows.find((_) => isMonthlyInterestPayment === _.isMonthlyInterestPayment) ||
1198
+ DEFAULT_DEPOSIT_CALCULATOR_PARAMS;
1199
+ const { rate } = depositCalculatorSourceBookParams;
1200
+ const income = getDepositIncome(rate, userInputParams);
1201
+ const finalSum = moneyValue + income;
1202
+ return { ...depositCalculatorSourceBookParams, ...userInputParams, income, finalSum };
1203
+ };
1204
+ const getDepositIncome = (rate, userInputParams) => {
1205
+ const { isMonthlyInterestPayment, moneyValue, monthsValue } = userInputParams;
1206
+ if (isMonthlyInterestPayment) {
1207
+ return Math.round(moneyValue * Math.pow((1200 + rate) / 1200, monthsValue) - moneyValue);
1208
+ }
1209
+ else {
1210
+ /*
1211
+ Приблизительный расчёт, не учитывающий разницу в количестве дней в месяцах. Месяц принят за 30 дней, год за 365 дней.
1212
+ */
1213
+ return Math.round((moneyValue * rate * 30 * monthsValue) / 365 / 100);
1214
+ }
1215
+ };
1216
+
1185
1217
  const EVERY_MONTH = 'everyMonth';
1186
1218
  const AT_END_TERM = 'atEndTerm';
1187
1219
  const depositTypeItems = [
@@ -1194,21 +1226,22 @@
1194
1226
  text: 'В конце срока',
1195
1227
  },
1196
1228
  ];
1197
- const DepositCalculatorForm = JSX(({ className = '', rate, buttons, footnote }) => {
1229
+ const DepositCalculatorForm = JSX(({ className = '', sourceBookDir, buttons, footnote }) => {
1198
1230
  const [moneyValue, setMoneyValue] = useState(DEFAULT_SUM);
1199
1231
  const [monthsValue, setMonthsValue] = useState(DEFAULT_MONTHS);
1200
- const [isEveryMonth, toggleIsEveryMonth] = useState(false);
1201
- const income = 948841;
1202
- const finallySum = 1218841;
1232
+ const [isMonthlyInterestPayment, toggleIsMonthlyInterestPayment] = useState(false);
1233
+ const userInputParams = {
1234
+ moneyValue,
1235
+ monthsValue,
1236
+ isMonthlyInterestPayment,
1237
+ };
1238
+ const calculatorParams = useDepositCalculatorParams(userInputParams, sourceBookDir);
1239
+ const { income, finalSum, rate } = calculatorParams;
1203
1240
  return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма вклада, ₽', {
1204
- moneyValue,
1205
- minSum: DEFAULT_MIN_SUM,
1206
- maxSum: DEFAULT_MAX_SUM,
1241
+ ...calculatorParams,
1207
1242
  }, setMoneyValue), renderMonthsInput('Срок вклада, месяцев', {
1208
- minMonths: DEFAULT_MIN_MONTHS,
1209
- maxMonths: DEFAULT_MAX_MONTHS,
1210
- monthsValue,
1211
- }, setMonthsValue)] }), jsx(Rate, { rate: rate || 1, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-full max-w-[350px]", children: [(jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u043F\u043E \u0432\u043A\u043B\u0430\u0434\u0443", value: income, postfix: "\u20BD", prefix: "+" })) , (jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finallySum, postfix: "\u20BD" })) , jsx(RadioButtonGroup, { items: depositTypeItems, checkedItem: isEveryMonth ? EVERY_MONTH : AT_END_TERM, onChange: (text) => toggleIsEveryMonth(text === EVERY_MONTH) }), renderButtonSection(buttons), renderFootnote(footnote)] })] }));
1243
+ ...calculatorParams,
1244
+ }, setMonthsValue)] }), jsx(Rate, { rate: rate || 1, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-full max-w-[350px]", children: [income ? (jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u043F\u043E \u0432\u043A\u043B\u0430\u0434\u0443", value: income, postfix: "\u20BD", prefix: "+" })) : null, finalSum ? (jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finalSum, postfix: "\u20BD" })) : null, jsx(RadioButtonGroup, { items: depositTypeItems, checkedItem: isMonthlyInterestPayment ? EVERY_MONTH : AT_END_TERM, onChange: (text) => toggleIsMonthlyInterestPayment(text === EVERY_MONTH) }), renderButtonSection(buttons), renderFootnote(footnote)] })] }));
1212
1245
  });
1213
1246
 
1214
1247
  const EmbeddableCalcBlocks = {
@@ -2065,9 +2098,9 @@
2065
2098
  'bg-white': 'black',
2066
2099
  transparent: 'white',
2067
2100
  };
2068
- const HeaderSecondaryMenu = JSX(({ className, defaultLocation = 'Москва', bgColor = 'bg-white' }) => {
2101
+ const HeaderSecondaryMenu = JSX(({ className, officesLink, defaultLocation = 'Москва', bgColor = 'bg-white' }) => {
2069
2102
  const [city, getCity] = useGeolocation(defaultLocation);
2070
- return (jsxs("div", { className: `flex items-center ${className || ''}`, children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: city, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: getCity, bgColor: bgColor }), jsx(TopItem, { className: "mr-7", flat: true, href: "#", text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ariaLabel: "\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u0441\u0435\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043E\u0444\u0438\u0441\u043E\u0432 \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u0432", bgColor: bgColor }), jsx(HeaderSecondaryMenuButton, { className: `mr-5 group ${COLORS_MAP[bgColor]}`, ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", children: jsx(ImgInner, { image: { icon: 'LoupeIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0 pointer-events-none", asSVG: true }) }), jsx(HeaderSecondaryMenuButton, { className: `${LINKS_COLORS_MAP[bgColor]} group min-w-[32px] min-h-[32px]`, ariaLabel: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438", children: jsx(ImgInner, { image: { icon: 'GridIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full bg-main-divider/20 rounded-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0", asSVG: true }) })] }));
2103
+ return (jsxs("div", { className: `flex items-center ${className || ''}`, children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: city, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: getCity, bgColor: bgColor }), officesLink ? (jsx(TopItem, { className: "mr-7", flat: true, href: officesLink, text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ariaLabel: "\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u0441\u0435\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043E\u0444\u0438\u0441\u043E\u0432 \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u0432", bgColor: bgColor })) : null, jsx(HeaderSecondaryMenuButton, { className: `mr-5 group ${COLORS_MAP[bgColor]}`, ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", children: jsx(ImgInner, { image: { icon: 'LoupeIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0 pointer-events-none", asSVG: true }) }), jsx(HeaderSecondaryMenuButton, { className: `${LINKS_COLORS_MAP[bgColor]} group min-w-[32px] min-h-[32px]`, ariaLabel: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438", children: jsx(ImgInner, { image: { icon: 'GridIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full bg-main-divider/20 rounded-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0", asSVG: true }) })] }));
2071
2104
  });
2072
2105
 
2073
2106
  const maxBy = (discriminator) => (list) => list.reduceRight((a, b) => (discriminator(a) > discriminator(b) ? a : b));
@@ -2150,10 +2183,10 @@
2150
2183
  };
2151
2184
  const Header = JSX(({ bgColor = 'bg-white', className = '', showSubMenu = true, ...rest }) => {
2152
2185
  const router = useRouter();
2153
- const { topItems, logo, defaultLocation } = useSWRResource(projectSettings.SITEMAP || 'sitemap', rest.options?.page?.fallback);
2186
+ const { topItems, logo, defaultLocation, officesLink } = useSWRResource(projectSettings.SITEMAP || 'sitemap', rest.options?.page?.fallback);
2154
2187
  const activeTopItem = showSubMenu ? getActiveItem(topItems, router) : null;
2155
2188
  const topMenu = topItems?.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, "aria-label": _.text, bgColor: bgColor, ..._ }, String(i))));
2156
- return (jsx(BlockWrapper, { tag: "header", className: `pt-6 px-20 ${bgColor} ${className} ${showSubMenu && activeTopItem?.items?.length ? 'pb-4' : 'pb-5'}`, ...rest, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8", bgColor: bgColor, logo: logo }), topMenu, jsx(HeaderSecondaryMenu, { className: "ml-auto", defaultLocation: defaultLocation, bgColor: bgColor })] }), jsx("div", { className: `mt-6 h-[1px] ${BORDER_COLORS[bgColor]}` }), showSubMenu && activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { subItems: activeTopItem.items, bgColor: bgColor })) : null] }) }));
2189
+ return (jsx(BlockWrapper, { tag: "header", className: `pt-6 px-20 ${bgColor} ${className} ${showSubMenu && activeTopItem?.items?.length ? 'pb-4' : 'pb-5'}`, ...rest, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8", bgColor: bgColor, logo: logo }), topMenu, jsx(HeaderSecondaryMenu, { className: "ml-auto", defaultLocation: defaultLocation, officesLink: officesLink, bgColor: bgColor })] }), jsx("div", { className: `mt-6 h-[1px] ${BORDER_COLORS[bgColor]}` }), showSubMenu && activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { subItems: activeTopItem.items, bgColor: bgColor })) : null] }) }));
2157
2190
  });
2158
2191
  const getActiveItem = (topItems, router) => {
2159
2192
  const [firstPortal] = topItems || [];
@@ -2822,7 +2855,7 @@
2822
2855
  const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
2823
2856
  const OtherProductsItem = JSX(({ className, label = '', isUnfolded: unfoldedByDefault, ...rest }) => {
2824
2857
  const { colorPalette } = getParentBlockContent(rest.options, {});
2825
- return (jsx("div", { className: `border-0 border-b border-solid border-main-divider ${className}`, children: jsx(Foldable, { unfoldedByDefault: unfoldedByDefault, renderFoldableSection: ({ isUnfolded }) => (jsx("div", { className: "box-border", children: jsx(FoldableSection, { className: "grid grid-cols-12 gap-1 border-box", isUnfolded: isUnfolded, children: renderChildren(rest) }) })), renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(DefaultFoldButton, { label: label, icon: icons[Number(isUnfolded)], dataTheme: rest.options?.page?.colorPalette || colorPalette, onClick: onToggle })) }) }));
2858
+ return (jsx("div", { className: `border-0 border-b border-solid border-main-divider ${className}`, children: jsx(Foldable, { unfoldedByDefault: unfoldedByDefault, renderFoldableSection: ({ isUnfolded }) => (jsx("div", { className: "box-border", children: jsx(FoldableSection, { className: "grid grid-cols-12 gap-1 border-box", isUnfolded: isUnfolded, children: renderChildren(rest) }) })), renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(DefaultFoldButton, { label: label, icon: icons[Number(isUnfolded)], dataTheme: colorPalette || rest.options?.page?.colorPalette, onClick: onToggle })) }) }));
2826
2859
  });
2827
2860
  OtherProductsItem.childrenTypes = []; // All types of blocks are suitable
2828
2861
 
@@ -3583,13 +3616,15 @@
3583
3616
  primary: 'bg-white',
3584
3617
  secondary: 'bg-primary-main',
3585
3618
  };
3586
- const VerticalLayout = JSX(({ className = '', gap = '', align = 'left', version = 'transparent', ...rest }) => (jsx(BlockWrapper, { className: [
3619
+ const VerticalLayout = JSX(({ className = '', gap = '', align, version = 'transparent', ...rest }) => (jsx(BlockWrapper, { className: [
3587
3620
  'flex flex-col',
3588
3621
  gapStyleMap[gap],
3589
- alignStyle[align],
3622
+ align && alignStyle[align],
3590
3623
  backgroundStyleMap[version],
3591
3624
  className,
3592
- ].join(' '), ...rest, children: renderChildren(rest) })));
3625
+ ]
3626
+ .filter(Boolean)
3627
+ .join(' '), ...rest, children: renderChildren(rest) })));
3593
3628
  VerticalLayout.childrenTypes = {
3594
3629
  exclude: ['VerticalLayout'],
3595
3630
  };
@@ -3720,7 +3755,7 @@
3720
3755
  return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
3721
3756
  }
3722
3757
 
3723
- const packageVersion = "0.6.34";
3758
+ const packageVersion = "0.6.35";
3724
3759
 
3725
3760
  exports.Blocks = Blocks;
3726
3761
  exports.ContentPage = ContentPage;