@redneckz/wildless-cms-uni-blocks 0.14.81 → 0.14.83

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 (111) hide show
  1. package/bundle/bundle.umd.js +4 -4
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
  4. package/bundle/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
  5. package/bundle/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
  6. package/bundle/hooks/useActiveRoute.d.ts +3 -2
  7. package/dist/components/Calculator/CreditCalculatorForm.js +1 -1
  8. package/dist/components/Calculator/RefinancingCalculatorForm.js +2 -2
  9. package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js +11 -18
  10. package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
  11. package/dist/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
  12. package/dist/components/StickyBottomMenu/StickyBottomMenuBurger.js +8 -0
  13. package/dist/components/StickyBottomMenu/StickyBottomMenuBurger.js.map +1 -0
  14. package/dist/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
  15. package/dist/components/StickyBottomMenu/StickyBottomMenuItem.js +15 -0
  16. package/dist/components/StickyBottomMenu/StickyBottomMenuItem.js.map +1 -0
  17. package/dist/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
  18. package/dist/hooks/useActiveRoute.d.ts +3 -2
  19. package/dist/hooks/useActiveRoute.js.map +1 -1
  20. package/lib/components/Calculator/CreditCalculatorForm.js +1 -1
  21. package/lib/components/Calculator/RefinancingCalculatorForm.js +2 -2
  22. package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js +12 -19
  23. package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
  24. package/lib/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
  25. package/lib/components/StickyBottomMenu/StickyBottomMenuBurger.js +6 -0
  26. package/lib/components/StickyBottomMenu/StickyBottomMenuBurger.js.map +1 -0
  27. package/lib/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
  28. package/lib/components/StickyBottomMenu/StickyBottomMenuItem.js +13 -0
  29. package/lib/components/StickyBottomMenu/StickyBottomMenuItem.js.map +1 -0
  30. package/lib/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
  31. package/lib/hooks/useActiveRoute.d.ts +3 -2
  32. package/lib/hooks/useActiveRoute.js.map +1 -1
  33. package/mobile/bundle/bundle.umd.js +18 -39
  34. package/mobile/bundle/bundle.umd.min.js +1 -1
  35. package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
  36. package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
  37. package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
  38. package/mobile/bundle/hooks/useActiveRoute.d.ts +3 -2
  39. package/mobile/dist/components/Calculator/CreditCalculatorForm.js +1 -1
  40. package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js +2 -2
  41. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js +11 -18
  42. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
  43. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
  44. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuBurger.js +8 -0
  45. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuBurger.js.map +1 -0
  46. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
  47. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuItem.js +15 -0
  48. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuItem.js.map +1 -0
  49. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
  50. package/mobile/dist/hooks/useActiveRoute.d.ts +3 -2
  51. package/mobile/dist/hooks/useActiveRoute.js.map +1 -1
  52. package/mobile/lib/components/Calculator/CreditCalculatorForm.js +1 -1
  53. package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js +2 -2
  54. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js +12 -19
  55. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
  56. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
  57. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuBurger.js +6 -0
  58. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuBurger.js.map +1 -0
  59. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
  60. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuItem.js +13 -0
  61. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuItem.js.map +1 -0
  62. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
  63. package/mobile/lib/hooks/useActiveRoute.d.ts +3 -2
  64. package/mobile/lib/hooks/useActiveRoute.js.map +1 -1
  65. package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +1 -1
  66. package/mobile/src/components/Calculator/RefinancingCalculatorForm.tsx +2 -2
  67. package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.tsx +28 -23
  68. package/mobile/src/components/StickyBottomMenu/StickyBottomMenuBurger.tsx +21 -0
  69. package/mobile/src/components/StickyBottomMenu/StickyBottomMenuItem.tsx +42 -0
  70. package/mobile/src/components/StickyBottomMenu/StickyBottomMenuProps.tsx +1 -5
  71. package/mobile/src/hooks/useActiveRoute.ts +3 -4
  72. package/package.json +1 -1
  73. package/src/components/Calculator/CreditCalculatorForm.tsx +1 -1
  74. package/src/components/Calculator/RefinancingCalculatorForm.tsx +2 -2
  75. package/src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx +28 -23
  76. package/src/components/StickyBottomMenu/StickyBottomMenuBurger.tsx +21 -0
  77. package/src/components/StickyBottomMenu/StickyBottomMenuItem.tsx +42 -0
  78. package/src/components/StickyBottomMenu/StickyBottomMenuProps.tsx +1 -5
  79. package/src/hooks/useActiveRoute.ts +3 -4
  80. package/bundle/components/StickyBottomMenu/RenderItem.d.ts +0 -8
  81. package/bundle/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
  82. package/dist/components/StickyBottomMenu/RenderItem.d.ts +0 -8
  83. package/dist/components/StickyBottomMenu/RenderItem.js +0 -25
  84. package/dist/components/StickyBottomMenu/RenderItem.js.map +0 -1
  85. package/dist/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
  86. package/dist/components/StickyBottomMenu/RenderMenuItems.js +0 -11
  87. package/dist/components/StickyBottomMenu/RenderMenuItems.js.map +0 -1
  88. package/lib/components/StickyBottomMenu/RenderItem.d.ts +0 -8
  89. package/lib/components/StickyBottomMenu/RenderItem.js +0 -23
  90. package/lib/components/StickyBottomMenu/RenderItem.js.map +0 -1
  91. package/lib/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
  92. package/lib/components/StickyBottomMenu/RenderMenuItems.js +0 -9
  93. package/lib/components/StickyBottomMenu/RenderMenuItems.js.map +0 -1
  94. package/mobile/bundle/components/StickyBottomMenu/RenderItem.d.ts +0 -8
  95. package/mobile/bundle/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
  96. package/mobile/dist/components/StickyBottomMenu/RenderItem.d.ts +0 -8
  97. package/mobile/dist/components/StickyBottomMenu/RenderItem.js +0 -25
  98. package/mobile/dist/components/StickyBottomMenu/RenderItem.js.map +0 -1
  99. package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
  100. package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.js +0 -11
  101. package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.js.map +0 -1
  102. package/mobile/lib/components/StickyBottomMenu/RenderItem.d.ts +0 -8
  103. package/mobile/lib/components/StickyBottomMenu/RenderItem.js +0 -23
  104. package/mobile/lib/components/StickyBottomMenu/RenderItem.js.map +0 -1
  105. package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
  106. package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.js +0 -9
  107. package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.js.map +0 -1
  108. package/mobile/src/components/StickyBottomMenu/RenderItem.tsx +0 -51
  109. package/mobile/src/components/StickyBottomMenu/RenderMenuItems.tsx +0 -21
  110. package/src/components/StickyBottomMenu/RenderItem.tsx +0 -51
  111. package/src/components/StickyBottomMenu/RenderMenuItems.tsx +0 -21
@@ -0,0 +1,6 @@
1
+ interface StickyBottomMenuBurgerProps {
2
+ isActive?: boolean;
3
+ onClick?: () => void;
4
+ }
5
+ export declare const StickyBottomMenuBurger: import("@redneckz/uni-jsx").UNIComponent<StickyBottomMenuBurgerProps, any, any>;
6
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { MenuItem } from './StickyBottomMenuContent';
2
+ interface StickyBottomMenuItemProps {
3
+ isActive?: boolean;
4
+ item?: MenuItem;
5
+ onClick?: () => void;
6
+ }
7
+ export declare const StickyBottomMenuItem: import("@redneckz/uni-jsx").UNIComponent<StickyBottomMenuItemProps, any, any>;
8
+ export {};
@@ -1,8 +1,5 @@
1
1
  import { type UniBlockProps } from '../../model/JSXBlock';
2
2
  import { type MenuItem, type StickyBottomMenuContent } from './StickyBottomMenuContent';
3
- export interface MenuItemProps extends MenuItem {
4
- isActive?: boolean;
5
- }
6
3
  export interface StickyBottomMenuProps extends StickyBottomMenuContent, UniBlockProps {
7
- menuItems?: MenuItemProps[];
4
+ menuItems?: MenuItem[];
8
5
  }
@@ -1,2 +1,3 @@
1
- import { type TopMenuItemProps } from '../services/sitemap/SitemapData';
2
- export declare function useActiveRoute(items?: TopMenuItemProps[] | undefined): [number, TopMenuItemProps];
1
+ export declare function useActiveRoute<T extends {
2
+ href?: string;
3
+ }>(items?: T[] | undefined): [number, T];
@@ -48,7 +48,7 @@ exports.CreditCalculatorForm = (0, uni_jsx_1.JSX)(({ className, sourceBookDir, b
48
48
  value: calculatorParams.monthsValue,
49
49
  }), renderCreditParamsForm({ ...calculatorParams, ...paramsViewSettings }, field), (0, jsx_runtime_1.jsx)("div", { className: "sm:hidden", children: paymentTypeElement })] }), (0, jsx_runtime_1.jsx)("div", { className: "border-b border-main-divider md:hidden" }), (0, renderRate_1.renderRate)({
50
50
  rate: calculatorParams.rate,
51
- }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2xl sm:w-96", children: [(0, jsx_runtime_1.jsx)(CalculatorValueBlock_1.CalculatorValueBlock, { title: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0435\u0436", value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), (0, jsx_runtime_1.jsx)("div", { className: "hidden sm:block", children: paymentTypeElement }), (0, renderButtonsSection_1.renderButtonsSection)(buttons, { isVertical: true }), (0, renderFootnote_1.renderFootnote)(footnote)] })] }));
51
+ }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2xl sm:w-96", children: [(0, jsx_runtime_1.jsx)(CalculatorValueBlock_1.CalculatorValueBlock, { title: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0451\u0436", value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), (0, jsx_runtime_1.jsx)("div", { className: "hidden sm:block", children: paymentTypeElement }), (0, renderButtonsSection_1.renderButtonsSection)(buttons, { isVertical: true }), (0, renderFootnote_1.renderFootnote)(footnote)] })] }));
52
52
  });
53
53
  const renderCreditParamsForm = (params, field) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-y-2xl", children: [params.isShowSalaryClient ? ((0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { text: `Получаю зарплату на счёт\nв Россельхозбанке`, ...field('isSalaryClient'), value: params.isSalaryClient, className: "whitespace-pre-line sm:whitespace-normal" })) : null, params.isShowStateEmployee ? ((0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { 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", ...field('isStateEmployee'), value: params.isStateEmployee })) : null, params.isShowPensionClient ? ((0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", ...field('isPensionClient'), value: params.isPensionClient })) : null, params.isShowInsurance ? ((0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { 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", ...field('isInsurance'), value: params.isInsurance })) : null] }));
54
54
  //# sourceMappingURL=CreditCalculatorForm.js.map
@@ -41,7 +41,7 @@ exports.RefinancingCalculatorForm = (0, uni_jsx_1.JSX)(({ className, sourceBookD
41
41
  ...field('moneyValue'),
42
42
  value: calculatorParams.moneyValue,
43
43
  }), (0, renderWantedSumInput_1.renderWantedSumInput)({
44
- title: 'Ежемесячный платеж в других банках, ₽',
44
+ title: 'Ежемесячный платёж в других банках, ₽',
45
45
  step: 500,
46
46
  min: calculatorParams.minSumOld,
47
47
  max: calculatorParams.maxSumOld,
@@ -65,7 +65,7 @@ exports.RefinancingCalculatorForm = (0, uni_jsx_1.JSX)(({ className, sourceBookD
65
65
  : null, (0, jsx_runtime_1.jsx)("div", { className: "sm:hidden pt-1 pb-4 border-b border-main-divider", children: paymentTypeElement })] }), (0, renderRate_1.renderRate)({
66
66
  rate: calculatorParams.rate,
67
67
  fractionDigits: 1,
68
- }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2xl mt-2 sm:w-96 sm:mt-0", children: [(0, jsx_runtime_1.jsx)(CalculatorValueBlock_1.CalculatorValueBlock, { title: 'Ежемесячный платеж', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), calculatorParams.benefit > 0 ? ((0, jsx_runtime_1.jsx)(CalculatorValueBlock_1.CalculatorValueBlock, { title: 'Выгода в месяц', value: calculatorParams.benefit, postfix: "\u20BD" })) : null, (0, jsx_runtime_1.jsx)("div", { className: "hidden sm:block", children: paymentTypeElement }), (0, renderButtonsSection_1.renderButtonsSection)(buttons, { isVertical: true }), (0, renderFootnote_1.renderFootnote)(footnote)] })] }));
68
+ }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2xl mt-2 sm:w-96 sm:mt-0", children: [(0, jsx_runtime_1.jsx)(CalculatorValueBlock_1.CalculatorValueBlock, { title: 'Ежемесячный платёж', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), calculatorParams.benefit > 0 ? ((0, jsx_runtime_1.jsx)(CalculatorValueBlock_1.CalculatorValueBlock, { title: 'Выгода в месяц', value: calculatorParams.benefit, postfix: "\u20BD" })) : null, (0, jsx_runtime_1.jsx)("div", { className: "hidden sm:block", children: paymentTypeElement }), (0, renderButtonsSection_1.renderButtonsSection)(buttons, { isVertical: true }), (0, renderFootnote_1.renderFootnote)(footnote)] })] }));
69
69
  });
70
70
  const renderCreditParamsForm = (params, field) => ((0, jsx_runtime_1.jsxs)("div", { className: "space-y-lg sm:space-y-s", children: [params.isShowSalaryClient ? ((0, jsx_runtime_1.jsx)(Checkbox_1.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", ...field('isSalaryClient'), value: params.isSalaryClient })) : null, params.isShowInsurance ? ((0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { 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", ...field('isInsurance'), value: params.isInsurance })) : null, (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u0443\u044E \u0441\u0443\u043C\u043C\u0443", ...field('isExtraMoney'), value: params.isExtraMoney })] }));
71
71
  //# sourceMappingURL=RefinancingCalculatorForm.js.map
@@ -2,30 +2,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
2
2
  exports.StickyBottomMenu = void 0;
3
3
  const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
4
  const uni_jsx_1 = require("@redneckz/uni-jsx");
5
- const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
5
+ const useActiveRoute_1 = require("../../hooks/useActiveRoute");
6
6
  const useSWRResource_1 = require("../../hooks/useSWRResource");
7
7
  const ProjectSettings_1 = require("../../ProjectSettings");
8
8
  const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
9
- const RenderMenuItems_1 = require("./RenderMenuItems");
9
+ const StickyBottomMenuBurger_1 = require("./StickyBottomMenuBurger");
10
+ const StickyBottomMenuItem_1 = require("./StickyBottomMenuItem");
10
11
  const useBurgerMenuDialog_1 = require("./useBurgerMenuDialog");
12
+ const EMPTY_MENU = [];
11
13
  exports.StickyBottomMenu = (0, uni_jsx_1.JSX)(({ ...rest }) => {
12
- const { menuItems = [] } = (0, useSWRResource_1.useSWRResource)(ProjectSettings_1.projectSettings.STICKY_MOBILE_MENU || 'sticky-mobile-menu', { fallback: rest.options?.page?.fallback, folderName: 'portal-resources', setBasePath: true });
13
- const [isBurgerMenuDialogOpen, { toggle }] = (0, useBurgerMenuDialog_1.useBurgerMenuDialog)();
14
- const burgerMenu = {
15
- title: 'Меню',
16
- icon: {
17
- icon: 'BurgerIcon',
18
- iconVersion: isBurgerMenuDialogOpen ? 'color' : 'black',
19
- },
20
- isActive: isBurgerMenuDialogOpen,
21
- };
14
+ const [isBurgerMenuDialogOpen, { toggle, close }] = (0, useBurgerMenuDialog_1.useBurgerMenuDialog)();
15
+ const { menuItems = EMPTY_MENU } = (0, useSWRResource_1.useSWRResource)(ProjectSettings_1.projectSettings.STICKY_MOBILE_MENU || 'sticky-mobile-menu', { fallback: rest.options?.page?.fallback, folderName: 'portal-resources', setBasePath: true });
16
+ const [, activeItem] = (0, useActiveRoute_1.useActiveRoute)(menuItems);
22
17
  const middleIdx = Math.floor(menuItems.length / 2);
23
- const menuItemsWithButton = (0, hooks_1.useMemo)(() => [
24
- ...menuItems.slice(0, middleIdx),
25
- burgerMenu,
26
- ...menuItems.slice(middleIdx),
27
- ], [menuItems, middleIdx, burgerMenu]);
18
+ const leftItems = menuItems.slice(0, middleIdx);
19
+ const rightItems = menuItems.slice(middleIdx);
28
20
  /* Attribute [data-component] need for correct render in wcms editor. Do not remove. */
29
- return ((0, jsx_runtime_1.jsx)("div", { className: "w-full mb-5", "data-component": "sticky-bottom-menu-container", children: (0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: "@container-normal fixed w-full h-[74px] bottom-0 left-0 my-0 mx-auto bg-transparent z-[100]", padding: "p-0", children: (0, jsx_runtime_1.jsx)(RenderMenuItems_1.RenderMenuItems, { menuItems: menuItemsWithButton, onClick: toggle }) }) }));
21
+ return ((0, jsx_runtime_1.jsx)("div", { className: "w-full mb-5", "data-component": "sticky-bottom-menu-container", children: (0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: "@container-normal fixed w-full h-[74px] bottom-0 left-0 my-0 mx-auto bg-transparent z-[100]", padding: "p-0", children: (0, jsx_runtime_1.jsxs)("div", { className: "ml-auto container bg-white flex justify-center shadow-blue-gray", children: [leftItems.map(renderMenuItem(activeItem, close)), (0, jsx_runtime_1.jsx)(StickyBottomMenuBurger_1.StickyBottomMenuBurger, { isActive: isBurgerMenuDialogOpen, onClick: toggle }), rightItems.map(renderMenuItem(activeItem, close))] }) }) }));
30
22
  });
23
+ const renderMenuItem = (activeItem, close) => (_, i) => ((0, jsx_runtime_1.jsx)(StickyBottomMenuItem_1.StickyBottomMenuItem, { isActive: _ === activeItem, item: _, onClick: close }, _.href || String(i)));
31
24
  //# sourceMappingURL=StickyBottomMenu.mobile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StickyBottomMenu.mobile.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAsD;AACtD,+DAA4D;AAC5D,2DAAwD;AACxD,4DAAyD;AACzD,uDAAoD;AAEpD,+DAA4D;AAE/C,QAAA,gBAAgB,GAAG,IAAA,aAAG,EAAwB,CAAC,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACzE,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,IAAA,+BAAc,EACvC,iCAAe,CAAC,kBAAkB,IAAI,oBAAoB,EAC1D,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,IAAI,EAAE,CAC9F,CAAC;IAEF,MAAM,CAAC,sBAAsB,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,IAAA,yCAAmB,GAAE,CAAC;IAEnE,MAAM,UAAU,GAAG;QACjB,KAAK,EAAE,MAAM;QACb,IAAI,EAAE;YACJ,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,sBAAsB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO;SACxD;QACD,QAAQ,EAAE,sBAAsB;KACjC,CAAC;IACF,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACnD,MAAM,mBAAmB,GAAG,IAAA,eAAO,EACjC,GAAG,EAAE,CACH;QACE,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC;QAChC,UAAU;QACV,GAAG,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC;KACX,EACtB,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,CACnC,CAAC;IAEF,uFAAuF;IACvF,OAAO,CACL,gCAAK,SAAS,EAAC,aAAa,oBAAgB,8BAA8B,YACxE,uBAAC,2BAAY,IACX,SAAS,EAAC,6FAA6F,EACvG,OAAO,EAAC,KAAK,YAEb,uBAAC,iCAAe,IAAC,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,GAAI,GACvD,GACX,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"StickyBottomMenu.mobile.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,+DAA4D;AAC5D,+DAA4D;AAC5D,2DAAwD;AACxD,4DAAyD;AACzD,qEAAkE;AAElE,iEAA8D;AAE9D,+DAA4D;AAE5D,MAAM,UAAU,GAAG,EAAE,CAAC;AAET,QAAA,gBAAgB,GAAG,IAAA,aAAG,EAAwB,CAAC,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACzE,MAAM,CAAC,sBAAsB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,IAAA,yCAAmB,GAAE,CAAC;IAE1E,MAAM,EAAE,SAAS,GAAG,UAAU,EAAE,GAAG,IAAA,+BAAc,EAC/C,iCAAe,CAAC,kBAAkB,IAAI,oBAAoB,EAC1D,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,IAAI,EAAE,CAC9F,CAAC;IAEF,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG,IAAA,+BAAc,EAAC,SAAS,CAAC,CAAC;IAEjD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACnD,MAAM,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IAChD,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAE9C,uFAAuF;IACvF,OAAO,CACL,gCAAK,SAAS,EAAC,aAAa,oBAAgB,8BAA8B,YACxE,uBAAC,2BAAY,IACX,SAAS,EAAC,6FAA6F,EACvG,OAAO,EAAC,KAAK,YAEb,iCAAK,SAAS,EAAC,iEAAiE,aAC7E,SAAS,CAAC,GAAG,CAAC,cAAc,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,EACjD,uBAAC,+CAAsB,IAAC,QAAQ,EAAE,sBAAsB,EAAE,OAAO,EAAE,MAAM,GAAI,EAC5E,UAAU,CAAC,GAAG,CAAC,cAAc,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,IAC9C,GACO,GACX,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,cAAc,GAAG,CAAC,UAAoB,EAAE,KAAiB,EAAE,EAAE,CAAC,CAAC,CAAW,EAAE,CAAS,EAAE,EAAE,CAC7F,CACE,uBAAC,2CAAoB,IAEnB,QAAQ,EAAE,CAAC,KAAK,UAAU,EAC1B,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,KAAK,IAHT,CAAC,CAAC,IAAI,IAAI,MAAM,CAAC,CAAC,CAAC,CAIxB,CACH,CAAC"}
@@ -0,0 +1,6 @@
1
+ interface StickyBottomMenuBurgerProps {
2
+ isActive?: boolean;
3
+ onClick?: () => void;
4
+ }
5
+ export declare const StickyBottomMenuBurger: import("@redneckz/uni-jsx").UNIComponent<StickyBottomMenuBurgerProps, any, any>;
6
+ export {};
@@ -0,0 +1,8 @@
1
+ Object.defineProperty(exports, "__esModule", { value: true });
2
+ exports.StickyBottomMenuBurger = void 0;
3
+ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
+ const uni_jsx_1 = require("@redneckz/uni-jsx");
5
+ const Icon_1 = require("../../ui-kit/Icon/Icon");
6
+ const style_1 = require("../../utils/style");
7
+ exports.StickyBottomMenuBurger = (0, uni_jsx_1.JSX)(({ isActive, onClick }) => ((0, jsx_runtime_1.jsxs)("button", { className: (0, style_1.style)(isActive ? 'text-primary-main' : 'text-primary-text', `w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer`), onClick: onClick, children: [(0, jsx_runtime_1.jsx)(Icon_1.Icon, { className: "w-6 h-6", name: "BurgerIcon", iconVersion: isActive ? 'color' : 'black' }), "\u041C\u0435\u043D\u044E"] })));
8
+ //# sourceMappingURL=StickyBottomMenuBurger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StickyBottomMenuBurger.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/StickyBottomMenuBurger.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iDAA8C;AAC9C,6CAA0C;AAO7B,QAAA,sBAAsB,GAAG,IAAA,aAAG,EAA8B,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAChG,oCACE,SAAS,EAAE,IAAA,aAAK,EACd,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,EACpD,2EAA2E,CAC5E,EACD,OAAO,EAAE,OAAO,aAEhB,uBAAC,WAAI,IAAC,SAAS,EAAC,SAAS,EAAC,IAAI,EAAC,YAAY,EAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,GAAI,gCAElF,CACV,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { MenuItem } from './StickyBottomMenuContent';
2
+ interface StickyBottomMenuItemProps {
3
+ isActive?: boolean;
4
+ item?: MenuItem;
5
+ onClick?: () => void;
6
+ }
7
+ export declare const StickyBottomMenuItem: import("@redneckz/uni-jsx").UNIComponent<StickyBottomMenuItemProps, any, any>;
8
+ export {};
@@ -0,0 +1,15 @@
1
+ Object.defineProperty(exports, "__esModule", { value: true });
2
+ exports.StickyBottomMenuItem = void 0;
3
+ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
+ const uni_jsx_1 = require("@redneckz/uni-jsx");
5
+ const useLink_1 = require("../../hooks/useLink");
6
+ const ProjectSettings_1 = require("../../ProjectSettings");
7
+ const Icon_1 = require("../../ui-kit/Icon/Icon");
8
+ const style_1 = require("../../utils/style");
9
+ exports.StickyBottomMenuItem = (0, uni_jsx_1.JSX)(({ isActive, item, onClick }) => {
10
+ const isAnotherPortal = !ProjectSettings_1.projectSettings?.BASE_PATH || !item?.href?.startsWith(ProjectSettings_1.projectSettings.BASE_PATH);
11
+ const link = (0, useLink_1.useLink)({ isRemote: isAnotherPortal });
12
+ const { href, onClick: handleClick } = link({ href: item?.href, onClick });
13
+ return ((0, jsx_runtime_1.jsxs)("a", { className: (0, style_1.style)(isActive ? 'text-primary-main' : 'text-primary-text', `w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer`), href: href, target: "_self", title: item?.title || '', onClick: handleClick, children: [(0, jsx_runtime_1.jsx)(Icon_1.Icon, { className: "w-6 h-6", name: item?.icon?.icon, iconVersion: isActive ? 'color' : 'black' }), item?.title || ''] }));
14
+ });
15
+ //# sourceMappingURL=StickyBottomMenuItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StickyBottomMenuItem.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/StickyBottomMenuItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iDAA8C;AAC9C,2DAAwD;AACxD,iDAA8C;AAC9C,6CAA0C;AAS7B,QAAA,oBAAoB,GAAG,IAAA,aAAG,EACrC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAC9B,MAAM,eAAe,GACnB,CAAC,iCAAe,EAAE,SAAS,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,iCAAe,CAAC,SAAS,CAAC,CAAC;IAEpF,MAAM,IAAI,GAAG,IAAA,iBAAO,EAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;IACpD,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IAE3E,OAAO,CACL,+BACE,SAAS,EAAE,IAAA,aAAK,EACd,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,EACpD,2EAA2E,CAC5E,EACD,IAAI,EAAE,IAAI,EACV,MAAM,EAAC,OAAO,EACd,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,EAAE,EACxB,OAAO,EAAE,WAAW,aAEpB,uBAAC,WAAI,IACH,SAAS,EAAC,SAAS,EACnB,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EACtB,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,GACzC,EACD,IAAI,EAAE,KAAK,IAAI,EAAE,IAChB,CACL,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -1,8 +1,5 @@
1
1
  import { type UniBlockProps } from '../../model/JSXBlock';
2
2
  import { type MenuItem, type StickyBottomMenuContent } from './StickyBottomMenuContent';
3
- export interface MenuItemProps extends MenuItem {
4
- isActive?: boolean;
5
- }
6
3
  export interface StickyBottomMenuProps extends StickyBottomMenuContent, UniBlockProps {
7
- menuItems?: MenuItemProps[];
4
+ menuItems?: MenuItem[];
8
5
  }
@@ -1,2 +1,3 @@
1
- import { type TopMenuItemProps } from '../services/sitemap/SitemapData';
2
- export declare function useActiveRoute(items?: TopMenuItemProps[] | undefined): [number, TopMenuItemProps];
1
+ export declare function useActiveRoute<T extends {
2
+ href?: string;
3
+ }>(items?: T[] | undefined): [number, T];
@@ -1 +1 @@
1
- {"version":3,"file":"useActiveRoute.js","sourceRoot":"","sources":["../../src/hooks/useActiveRoute.ts"],"names":[],"mappings":";;AAAA,0EAAuE;AAEvE,2CAAwC;AAExC,SAAgB,cAAc,CAC5B,QAAwC,EAAE;IAE1C,MAAM,MAAM,GAAG,IAAA,qBAAS,GAAE,CAAC;IAC3B,MAAM,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,IAAA,iCAAe,EAAC,MAAM,CAAC,CAAC,CAAC;IAE7D,OAAO,CAAC,WAAW,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;AAC3C,CAAC;AAPD,wCAOC"}
1
+ {"version":3,"file":"useActiveRoute.js","sourceRoot":"","sources":["../../src/hooks/useActiveRoute.ts"],"names":[],"mappings":";;AAAA,0EAAuE;AACvE,2CAAwC;AAExC,SAAgB,cAAc,CAC5B,QAAyB,EAAE;IAE3B,MAAM,MAAM,GAAG,IAAA,qBAAS,GAAE,CAAC;IAC3B,MAAM,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,IAAA,iCAAe,EAAC,MAAM,CAAC,CAAC,CAAC;IAE7D,OAAO,CAAC,WAAW,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;AAC3C,CAAC;AAPD,wCAOC"}
@@ -46,7 +46,7 @@ export const CreditCalculatorForm = JSX(({ className, sourceBookDir, buttons, fo
46
46
  value: calculatorParams.monthsValue,
47
47
  }), renderCreditParamsForm({ ...calculatorParams, ...paramsViewSettings }, field), _jsx("div", { className: "sm:hidden", children: paymentTypeElement })] }), _jsx("div", { className: "border-b border-main-divider md:hidden" }), renderRate({
48
48
  rate: calculatorParams.rate,
49
- }), _jsxs("div", { className: "flex flex-col gap-2xl sm:w-96", children: [_jsx(CalculatorValueBlock, { title: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0435\u0436", value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), _jsx("div", { className: "hidden sm:block", children: paymentTypeElement }), renderButtonsSection(buttons, { isVertical: true }), renderFootnote(footnote)] })] }));
49
+ }), _jsxs("div", { className: "flex flex-col gap-2xl sm:w-96", children: [_jsx(CalculatorValueBlock, { title: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0451\u0436", value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), _jsx("div", { className: "hidden sm:block", children: paymentTypeElement }), renderButtonsSection(buttons, { isVertical: true }), renderFootnote(footnote)] })] }));
50
50
  });
51
51
  const renderCreditParamsForm = (params, field) => (_jsxs("div", { className: "flex flex-col gap-y-2xl", children: [params.isShowSalaryClient ? (_jsx(Checkbox, { text: `Получаю зарплату на счёт\nв Россельхозбанке`, ...field('isSalaryClient'), value: params.isSalaryClient, className: "whitespace-pre-line sm:whitespace-normal" })) : null, params.isShowStateEmployee ? (_jsx(Checkbox, { 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", ...field('isStateEmployee'), value: params.isStateEmployee })) : null, params.isShowPensionClient ? (_jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", ...field('isPensionClient'), value: params.isPensionClient })) : null, params.isShowInsurance ? (_jsx(Checkbox, { 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", ...field('isInsurance'), value: params.isInsurance })) : null] }));
52
52
  //# sourceMappingURL=CreditCalculatorForm.js.map
@@ -39,7 +39,7 @@ export const RefinancingCalculatorForm = JSX(({ className, sourceBookDir, button
39
39
  ...field('moneyValue'),
40
40
  value: calculatorParams.moneyValue,
41
41
  }), renderWantedSumInput({
42
- title: 'Ежемесячный платеж в других банках, ₽',
42
+ title: 'Ежемесячный платёж в других банках, ₽',
43
43
  step: 500,
44
44
  min: calculatorParams.minSumOld,
45
45
  max: calculatorParams.maxSumOld,
@@ -63,7 +63,7 @@ export const RefinancingCalculatorForm = JSX(({ className, sourceBookDir, button
63
63
  : null, _jsx("div", { className: "sm:hidden pt-1 pb-4 border-b border-main-divider", children: paymentTypeElement })] }), renderRate({
64
64
  rate: calculatorParams.rate,
65
65
  fractionDigits: 1,
66
- }), _jsxs("div", { className: "flex flex-col gap-2xl mt-2 sm:w-96 sm:mt-0", children: [_jsx(CalculatorValueBlock, { title: 'Ежемесячный платеж', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), calculatorParams.benefit > 0 ? (_jsx(CalculatorValueBlock, { title: 'Выгода в месяц', value: calculatorParams.benefit, postfix: "\u20BD" })) : null, _jsx("div", { className: "hidden sm:block", children: paymentTypeElement }), renderButtonsSection(buttons, { isVertical: true }), renderFootnote(footnote)] })] }));
66
+ }), _jsxs("div", { className: "flex flex-col gap-2xl mt-2 sm:w-96 sm:mt-0", children: [_jsx(CalculatorValueBlock, { title: 'Ежемесячный платёж', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), calculatorParams.benefit > 0 ? (_jsx(CalculatorValueBlock, { title: 'Выгода в месяц', value: calculatorParams.benefit, postfix: "\u20BD" })) : null, _jsx("div", { className: "hidden sm:block", children: paymentTypeElement }), renderButtonsSection(buttons, { isVertical: true }), renderFootnote(footnote)] })] }));
67
67
  });
68
68
  const renderCreditParamsForm = (params, field) => (_jsxs("div", { className: "space-y-lg sm:space-y-s", children: [params.isShowSalaryClient ? (_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", ...field('isSalaryClient'), value: params.isSalaryClient })) : null, params.isShowInsurance ? (_jsx(Checkbox, { 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", ...field('isInsurance'), value: params.isInsurance })) : null, _jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u0443\u044E \u0441\u0443\u043C\u043C\u0443", ...field('isExtraMoney'), value: params.isExtraMoney })] }));
69
69
  //# sourceMappingURL=RefinancingCalculatorForm.js.map
@@ -1,29 +1,22 @@
1
- import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
- import { useMemo } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { useActiveRoute } from '../../hooks/useActiveRoute.js';
4
4
  import { useSWRResource } from '../../hooks/useSWRResource.js';
5
5
  import { projectSettings } from '../../ProjectSettings.js';
6
6
  import { BlockWrapper } from '../../ui-kit/BlockWrapper.js';
7
- import { RenderMenuItems } from './RenderMenuItems.js';
7
+ import { StickyBottomMenuBurger } from './StickyBottomMenuBurger.js';
8
+ import { StickyBottomMenuItem } from './StickyBottomMenuItem.js';
8
9
  import { useBurgerMenuDialog } from './useBurgerMenuDialog.js';
10
+ const EMPTY_MENU = [];
9
11
  export const StickyBottomMenu = JSX(({ ...rest }) => {
10
- const { menuItems = [] } = useSWRResource(projectSettings.STICKY_MOBILE_MENU || 'sticky-mobile-menu', { fallback: rest.options?.page?.fallback, folderName: 'portal-resources', setBasePath: true });
11
- const [isBurgerMenuDialogOpen, { toggle }] = useBurgerMenuDialog();
12
- const burgerMenu = {
13
- title: 'Меню',
14
- icon: {
15
- icon: 'BurgerIcon',
16
- iconVersion: isBurgerMenuDialogOpen ? 'color' : 'black',
17
- },
18
- isActive: isBurgerMenuDialogOpen,
19
- };
12
+ const [isBurgerMenuDialogOpen, { toggle, close }] = useBurgerMenuDialog();
13
+ const { menuItems = EMPTY_MENU } = useSWRResource(projectSettings.STICKY_MOBILE_MENU || 'sticky-mobile-menu', { fallback: rest.options?.page?.fallback, folderName: 'portal-resources', setBasePath: true });
14
+ const [, activeItem] = useActiveRoute(menuItems);
20
15
  const middleIdx = Math.floor(menuItems.length / 2);
21
- const menuItemsWithButton = useMemo(() => [
22
- ...menuItems.slice(0, middleIdx),
23
- burgerMenu,
24
- ...menuItems.slice(middleIdx),
25
- ], [menuItems, middleIdx, burgerMenu]);
16
+ const leftItems = menuItems.slice(0, middleIdx);
17
+ const rightItems = menuItems.slice(middleIdx);
26
18
  /* Attribute [data-component] need for correct render in wcms editor. Do not remove. */
27
- return (_jsx("div", { className: "w-full mb-5", "data-component": "sticky-bottom-menu-container", children: _jsx(BlockWrapper, { className: "@container-normal fixed w-full h-[74px] bottom-0 left-0 my-0 mx-auto bg-transparent z-[100]", padding: "p-0", children: _jsx(RenderMenuItems, { menuItems: menuItemsWithButton, onClick: toggle }) }) }));
19
+ return (_jsx("div", { className: "w-full mb-5", "data-component": "sticky-bottom-menu-container", children: _jsx(BlockWrapper, { className: "@container-normal fixed w-full h-[74px] bottom-0 left-0 my-0 mx-auto bg-transparent z-[100]", padding: "p-0", children: _jsxs("div", { className: "ml-auto container bg-white flex justify-center shadow-blue-gray", children: [leftItems.map(renderMenuItem(activeItem, close)), _jsx(StickyBottomMenuBurger, { isActive: isBurgerMenuDialogOpen, onClick: toggle }), rightItems.map(renderMenuItem(activeItem, close))] }) }) }));
28
20
  });
21
+ const renderMenuItem = (activeItem, close) => (_, i) => (_jsx(StickyBottomMenuItem, { isActive: _ === activeItem, item: _, onClick: close }, _.href || String(i)));
29
22
  //# sourceMappingURL=StickyBottomMenu.mobile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StickyBottomMenu.mobile.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAwB,CAAC,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACzE,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,cAAc,CACvC,eAAe,CAAC,kBAAkB,IAAI,oBAAoB,EAC1D,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,IAAI,EAAE,CAC9F,CAAC;IAEF,MAAM,CAAC,sBAAsB,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,mBAAmB,EAAE,CAAC;IAEnE,MAAM,UAAU,GAAG;QACjB,KAAK,EAAE,MAAM;QACb,IAAI,EAAE;YACJ,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,sBAAsB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO;SACxD;QACD,QAAQ,EAAE,sBAAsB;KACjC,CAAC;IACF,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACnD,MAAM,mBAAmB,GAAG,OAAO,CACjC,GAAG,EAAE,CACH;QACE,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC;QAChC,UAAU;QACV,GAAG,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC;KACX,EACtB,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,CACnC,CAAC;IAEF,uFAAuF;IACvF,OAAO,CACL,cAAK,SAAS,EAAC,aAAa,oBAAgB,8BAA8B,YACxE,KAAC,YAAY,IACX,SAAS,EAAC,6FAA6F,EACvG,OAAO,EAAC,KAAK,YAEb,KAAC,eAAe,IAAC,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,GAAI,GACvD,GACX,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"StickyBottomMenu.mobile.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,UAAU,GAAG,EAAE,CAAC;AAEtB,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAwB,CAAC,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACzE,MAAM,CAAC,sBAAsB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,mBAAmB,EAAE,CAAC;IAE1E,MAAM,EAAE,SAAS,GAAG,UAAU,EAAE,GAAG,cAAc,CAC/C,eAAe,CAAC,kBAAkB,IAAI,oBAAoB,EAC1D,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,IAAI,EAAE,CAC9F,CAAC;IAEF,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAEjD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACnD,MAAM,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IAChD,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAE9C,uFAAuF;IACvF,OAAO,CACL,cAAK,SAAS,EAAC,aAAa,oBAAgB,8BAA8B,YACxE,KAAC,YAAY,IACX,SAAS,EAAC,6FAA6F,EACvG,OAAO,EAAC,KAAK,YAEb,eAAK,SAAS,EAAC,iEAAiE,aAC7E,SAAS,CAAC,GAAG,CAAC,cAAc,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,EACjD,KAAC,sBAAsB,IAAC,QAAQ,EAAE,sBAAsB,EAAE,OAAO,EAAE,MAAM,GAAI,EAC5E,UAAU,CAAC,GAAG,CAAC,cAAc,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,IAC9C,GACO,GACX,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,cAAc,GAAG,CAAC,UAAoB,EAAE,KAAiB,EAAE,EAAE,CAAC,CAAC,CAAW,EAAE,CAAS,EAAE,EAAE,CAC7F,CACE,KAAC,oBAAoB,IAEnB,QAAQ,EAAE,CAAC,KAAK,UAAU,EAC1B,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,KAAK,IAHT,CAAC,CAAC,IAAI,IAAI,MAAM,CAAC,CAAC,CAAC,CAIxB,CACH,CAAC"}
@@ -0,0 +1,6 @@
1
+ interface StickyBottomMenuBurgerProps {
2
+ isActive?: boolean;
3
+ onClick?: () => void;
4
+ }
5
+ export declare const StickyBottomMenuBurger: import("@redneckz/uni-jsx").UNIComponent<StickyBottomMenuBurgerProps, any, any>;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { JSX } from '@redneckz/uni-jsx';
3
+ import { Icon } from '../../ui-kit/Icon/Icon.js';
4
+ import { style } from '../../utils/style.js';
5
+ export const StickyBottomMenuBurger = JSX(({ isActive, onClick }) => (_jsxs("button", { className: style(isActive ? 'text-primary-main' : 'text-primary-text', `w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer`), onClick: onClick, children: [_jsx(Icon, { className: "w-6 h-6", name: "BurgerIcon", iconVersion: isActive ? 'color' : 'black' }), "\u041C\u0435\u043D\u044E"] })));
6
+ //# sourceMappingURL=StickyBottomMenuBurger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StickyBottomMenuBurger.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/StickyBottomMenuBurger.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAO1C,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAA8B,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAChG,kBACE,SAAS,EAAE,KAAK,CACd,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,EACpD,2EAA2E,CAC5E,EACD,OAAO,EAAE,OAAO,aAEhB,KAAC,IAAI,IAAC,SAAS,EAAC,SAAS,EAAC,IAAI,EAAC,YAAY,EAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,GAAI,gCAElF,CACV,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { MenuItem } from './StickyBottomMenuContent';
2
+ interface StickyBottomMenuItemProps {
3
+ isActive?: boolean;
4
+ item?: MenuItem;
5
+ onClick?: () => void;
6
+ }
7
+ export declare const StickyBottomMenuItem: import("@redneckz/uni-jsx").UNIComponent<StickyBottomMenuItemProps, any, any>;
8
+ export {};
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { JSX } from '@redneckz/uni-jsx';
3
+ import { useLink } from '../../hooks/useLink.js';
4
+ import { projectSettings } from '../../ProjectSettings.js';
5
+ import { Icon } from '../../ui-kit/Icon/Icon.js';
6
+ import { style } from '../../utils/style.js';
7
+ export const StickyBottomMenuItem = JSX(({ isActive, item, onClick }) => {
8
+ const isAnotherPortal = !projectSettings?.BASE_PATH || !item?.href?.startsWith(projectSettings.BASE_PATH);
9
+ const link = useLink({ isRemote: isAnotherPortal });
10
+ const { href, onClick: handleClick } = link({ href: item?.href, onClick });
11
+ return (_jsxs("a", { className: style(isActive ? 'text-primary-main' : 'text-primary-text', `w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer`), href: href, target: "_self", title: item?.title || '', onClick: handleClick, children: [_jsx(Icon, { className: "w-6 h-6", name: item?.icon?.icon, iconVersion: isActive ? 'color' : 'black' }), item?.title || ''] }));
12
+ });
13
+ //# sourceMappingURL=StickyBottomMenuItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StickyBottomMenuItem.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/StickyBottomMenuItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAS1C,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CACrC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAC9B,MAAM,eAAe,GACnB,CAAC,eAAe,EAAE,SAAS,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;IAEpF,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;IACpD,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IAE3E,OAAO,CACL,aACE,SAAS,EAAE,KAAK,CACd,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,EACpD,2EAA2E,CAC5E,EACD,IAAI,EAAE,IAAI,EACV,MAAM,EAAC,OAAO,EACd,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,EAAE,EACxB,OAAO,EAAE,WAAW,aAEpB,KAAC,IAAI,IACH,SAAS,EAAC,SAAS,EACnB,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EACtB,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,GACzC,EACD,IAAI,EAAE,KAAK,IAAI,EAAE,IAChB,CACL,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -1,8 +1,5 @@
1
1
  import { type UniBlockProps } from '../../model/JSXBlock';
2
2
  import { type MenuItem, type StickyBottomMenuContent } from './StickyBottomMenuContent';
3
- export interface MenuItemProps extends MenuItem {
4
- isActive?: boolean;
5
- }
6
3
  export interface StickyBottomMenuProps extends StickyBottomMenuContent, UniBlockProps {
7
- menuItems?: MenuItemProps[];
4
+ menuItems?: MenuItem[];
8
5
  }
@@ -1,2 +1,3 @@
1
- import { type TopMenuItemProps } from '../services/sitemap/SitemapData';
2
- export declare function useActiveRoute(items?: TopMenuItemProps[] | undefined): [number, TopMenuItemProps];
1
+ export declare function useActiveRoute<T extends {
2
+ href?: string;
3
+ }>(items?: T[] | undefined): [number, T];
@@ -1 +1 @@
1
- {"version":3,"file":"useActiveRoute.js","sourceRoot":"","sources":["../../src/hooks/useActiveRoute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAEvE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,UAAU,cAAc,CAC5B,QAAwC,EAAE;IAE1C,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC;IAE7D,OAAO,CAAC,WAAW,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;AAC3C,CAAC"}
1
+ {"version":3,"file":"useActiveRoute.js","sourceRoot":"","sources":["../../src/hooks/useActiveRoute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,UAAU,cAAc,CAC5B,QAAyB,EAAE;IAE3B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC;IAE7D,OAAO,CAAC,WAAW,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;AAC3C,CAAC"}
@@ -2518,7 +2518,7 @@
2518
2518
  value: calculatorParams.monthsValue,
2519
2519
  }), renderCreditParamsForm$1({ ...calculatorParams, ...paramsViewSettings }, field), jsx("div", { className: "sm:hidden", children: paymentTypeElement })] }), jsx("div", { className: "border-b border-main-divider md:hidden" }), renderRate({
2520
2520
  rate: calculatorParams.rate,
2521
- }), jsxs("div", { className: "flex flex-col gap-2xl sm:w-96", children: [jsx(CalculatorValueBlock, { title: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0435\u0436", value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), jsx("div", { className: "hidden sm:block", children: paymentTypeElement }), renderButtonsSection(buttons, { isVertical: true }), renderFootnote(footnote)] })] }));
2521
+ }), jsxs("div", { className: "flex flex-col gap-2xl sm:w-96", children: [jsx(CalculatorValueBlock, { title: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0451\u0436", value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), jsx("div", { className: "hidden sm:block", children: paymentTypeElement }), renderButtonsSection(buttons, { isVertical: true }), renderFootnote(footnote)] })] }));
2522
2522
  });
2523
2523
  const renderCreditParamsForm$1 = (params, field) => (jsxs("div", { className: "flex flex-col gap-y-2xl", children: [params.isShowSalaryClient ? (jsx(Checkbox, { text: `Получаю зарплату на счёт\nв Россельхозбанке`, ...field('isSalaryClient'), value: params.isSalaryClient, className: "whitespace-pre-line sm:whitespace-normal" })) : null, params.isShowStateEmployee ? (jsx(Checkbox, { 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", ...field('isStateEmployee'), value: params.isStateEmployee })) : null, params.isShowPensionClient ? (jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", ...field('isPensionClient'), value: params.isPensionClient })) : null, params.isShowInsurance ? (jsx(Checkbox, { 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", ...field('isInsurance'), value: params.isInsurance })) : null] }));
2524
2524
 
@@ -2725,7 +2725,7 @@
2725
2725
  ...field('moneyValue'),
2726
2726
  value: calculatorParams.moneyValue,
2727
2727
  }), renderWantedSumInput({
2728
- title: 'Ежемесячный платеж в других банках, ₽',
2728
+ title: 'Ежемесячный платёж в других банках, ₽',
2729
2729
  step: 500,
2730
2730
  min: calculatorParams.minSumOld,
2731
2731
  max: calculatorParams.maxSumOld,
@@ -2749,7 +2749,7 @@
2749
2749
  : null, jsx("div", { className: "sm:hidden pt-1 pb-4 border-b border-main-divider", children: paymentTypeElement })] }), renderRate({
2750
2750
  rate: calculatorParams.rate,
2751
2751
  fractionDigits: 1,
2752
- }), jsxs("div", { className: "flex flex-col gap-2xl mt-2 sm:w-96 sm:mt-0", children: [jsx(CalculatorValueBlock, { title: 'Ежемесячный платеж', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), calculatorParams.benefit > 0 ? (jsx(CalculatorValueBlock, { title: 'Выгода в месяц', value: calculatorParams.benefit, postfix: "\u20BD" })) : null, jsx("div", { className: "hidden sm:block", children: paymentTypeElement }), renderButtonsSection(buttons, { isVertical: true }), renderFootnote(footnote)] })] }));
2752
+ }), jsxs("div", { className: "flex flex-col gap-2xl mt-2 sm:w-96 sm:mt-0", children: [jsx(CalculatorValueBlock, { title: 'Ежемесячный платёж', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), calculatorParams.benefit > 0 ? (jsx(CalculatorValueBlock, { title: 'Выгода в месяц', value: calculatorParams.benefit, postfix: "\u20BD" })) : null, jsx("div", { className: "hidden sm:block", children: paymentTypeElement }), renderButtonsSection(buttons, { isVertical: true }), renderFootnote(footnote)] })] }));
2753
2753
  });
2754
2754
  const renderCreditParamsForm = (params, field) => (jsxs("div", { className: "space-y-lg sm:space-y-s", children: [params.isShowSalaryClient ? (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", ...field('isSalaryClient'), value: params.isSalaryClient })) : null, params.isShowInsurance ? (jsx(Checkbox, { 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", ...field('isInsurance'), value: params.isInsurance })) : null, jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u0443\u044E \u0441\u0443\u043C\u043C\u0443", ...field('isExtraMoney'), value: params.isExtraMoney })] }));
2755
2755
 
@@ -4557,26 +4557,13 @@
4557
4557
  return [activeIndex, items[activeIndex]];
4558
4558
  }
4559
4559
 
4560
- const RenderItem = JSX(({ isActive, item, onClick }) => {
4561
- const isAnotherPortal = projectSettings?.BASE_PATH
4562
- ? !item?.href?.startsWith(projectSettings?.BASE_PATH)
4563
- : true;
4564
- const link = useLink({ isRemote: isAnotherPortal });
4565
- const { href, target, onClick: handleClick, } = link({
4566
- href: item?.href || '',
4567
- target: '_self',
4568
- });
4569
- const isActiveItem = item?.icon?.icon === 'BurgerIcon' ? item.isActive : isActive;
4570
- const iconVersion = isActiveItem ? 'color' : 'black';
4571
- return (jsxs("a", { className: style(isActiveItem ? 'text-primary-main' : 'text-primary-text', `w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer`), onClick: () => (item?.icon?.icon === 'BurgerIcon' && onClick ? onClick() : handleClick()), href: href, target: target, children: [jsx(Img, { className: "w-6 h-6", image: {
4572
- icon: item?.icon?.icon,
4573
- iconVersion: iconVersion,
4574
- } }), item?.title || ''] }));
4575
- });
4560
+ const StickyBottomMenuBurger = JSX(({ isActive, onClick }) => (jsxs("button", { className: style(isActive ? 'text-primary-main' : 'text-primary-text', `w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer`), onClick: onClick, children: [jsx(Icon, { className: "w-6 h-6", name: "BurgerIcon", iconVersion: isActive ? 'color' : 'black' }), "\u041C\u0435\u043D\u044E"] })));
4576
4561
 
4577
- const RenderMenuItems = JSX(({ menuItems, onClick }) => {
4578
- const [activeIndex] = useActiveRoute(menuItems);
4579
- return (jsx("div", { className: "ml-auto container bg-white flex justify-center shadow-blue-gray", children: menuItems.map((_, i) => (jsx(RenderItem, { isActive: i === activeIndex, item: _, onClick: onClick }, String(i)))) }));
4562
+ const StickyBottomMenuItem = JSX(({ isActive, item, onClick }) => {
4563
+ const isAnotherPortal = !projectSettings?.BASE_PATH || !item?.href?.startsWith(projectSettings.BASE_PATH);
4564
+ const link = useLink({ isRemote: isAnotherPortal });
4565
+ const { href, onClick: handleClick } = link({ href: item?.href, onClick });
4566
+ return (jsxs("a", { className: style(isActive ? 'text-primary-main' : 'text-primary-text', `w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer`), href: href, target: "_self", title: item?.title || '', onClick: handleClick, children: [jsx(Icon, { className: "w-6 h-6", name: item?.icon?.icon, iconVersion: isActive ? 'color' : 'black' }), item?.title || ''] }));
4580
4567
  });
4581
4568
 
4582
4569
  const isDialogOpen = (id, dialogs) => dialogs.find((item) => item.id === id, id);
@@ -4968,26 +4955,18 @@
4968
4955
  return [Boolean(isBurgerMenuOpen), { open, close, toggle }];
4969
4956
  };
4970
4957
 
4958
+ const EMPTY_MENU = [];
4971
4959
  const StickyBottomMenu = JSX(({ ...rest }) => {
4972
- const { menuItems = [] } = useSWRResource(projectSettings.STICKY_MOBILE_MENU || 'sticky-mobile-menu', { fallback: rest.options?.page?.fallback, folderName: 'portal-resources', setBasePath: true });
4973
- const [isBurgerMenuDialogOpen, { toggle }] = useBurgerMenuDialog();
4974
- const burgerMenu = {
4975
- title: 'Меню',
4976
- icon: {
4977
- icon: 'BurgerIcon',
4978
- iconVersion: isBurgerMenuDialogOpen ? 'color' : 'black',
4979
- },
4980
- isActive: isBurgerMenuDialogOpen,
4981
- };
4960
+ const [isBurgerMenuDialogOpen, { toggle, close }] = useBurgerMenuDialog();
4961
+ const { menuItems = EMPTY_MENU } = useSWRResource(projectSettings.STICKY_MOBILE_MENU || 'sticky-mobile-menu', { fallback: rest.options?.page?.fallback, folderName: 'portal-resources', setBasePath: true });
4962
+ const [, activeItem] = useActiveRoute(menuItems);
4982
4963
  const middleIdx = Math.floor(menuItems.length / 2);
4983
- const menuItemsWithButton = useMemo(() => [
4984
- ...menuItems.slice(0, middleIdx),
4985
- burgerMenu,
4986
- ...menuItems.slice(middleIdx),
4987
- ], [menuItems, middleIdx, burgerMenu]);
4964
+ const leftItems = menuItems.slice(0, middleIdx);
4965
+ const rightItems = menuItems.slice(middleIdx);
4988
4966
  /* Attribute [data-component] need for correct render in wcms editor. Do not remove. */
4989
- return (jsx("div", { className: "w-full mb-5", "data-component": "sticky-bottom-menu-container", children: jsx(BlockWrapper, { className: "@container-normal fixed w-full h-[74px] bottom-0 left-0 my-0 mx-auto bg-transparent z-[100]", padding: "p-0", children: jsx(RenderMenuItems, { menuItems: menuItemsWithButton, onClick: toggle }) }) }));
4967
+ return (jsx("div", { className: "w-full mb-5", "data-component": "sticky-bottom-menu-container", children: jsx(BlockWrapper, { className: "@container-normal fixed w-full h-[74px] bottom-0 left-0 my-0 mx-auto bg-transparent z-[100]", padding: "p-0", children: jsxs("div", { className: "ml-auto container bg-white flex justify-center shadow-blue-gray", children: [leftItems.map(renderMenuItem(activeItem, close)), jsx(StickyBottomMenuBurger, { isActive: isBurgerMenuDialogOpen, onClick: toggle }), rightItems.map(renderMenuItem(activeItem, close))] }) }) }));
4990
4968
  });
4969
+ const renderMenuItem = (activeItem, close) => (_, i) => (jsx(StickyBottomMenuItem, { isActive: _ === activeItem, item: _, onClick: close }, _.href || String(i)));
4991
4970
 
4992
4971
  const scrollButtonStyle = 'hidden sm:flex absolute z-40 top-0';
4993
4972
  const ScrollableTabsControl = JSX(({ className, items = [], value, onChange, tabsType }) => {
@@ -5420,7 +5399,7 @@
5420
5399
 
5421
5400
  const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
5422
5401
 
5423
- const packageVersion = "0.14.80";
5402
+ const packageVersion = "0.14.82";
5424
5403
 
5425
5404
  exports.Blocks = Blocks;
5426
5405
  exports.ContentPage = ContentPage;