@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.
- package/bundle/bundle.umd.js +4 -4
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
- package/bundle/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
- package/bundle/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
- package/bundle/hooks/useActiveRoute.d.ts +3 -2
- package/dist/components/Calculator/CreditCalculatorForm.js +1 -1
- package/dist/components/Calculator/RefinancingCalculatorForm.js +2 -2
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js +11 -18
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
- package/dist/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenuBurger.js +8 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenuBurger.js.map +1 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenuItem.js +15 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenuItem.js.map +1 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
- package/dist/hooks/useActiveRoute.d.ts +3 -2
- package/dist/hooks/useActiveRoute.js.map +1 -1
- package/lib/components/Calculator/CreditCalculatorForm.js +1 -1
- package/lib/components/Calculator/RefinancingCalculatorForm.js +2 -2
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js +12 -19
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
- package/lib/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenuBurger.js +6 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenuBurger.js.map +1 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenuItem.js +13 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenuItem.js.map +1 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
- package/lib/hooks/useActiveRoute.d.ts +3 -2
- package/lib/hooks/useActiveRoute.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +18 -39
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
- package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
- package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
- package/mobile/bundle/hooks/useActiveRoute.d.ts +3 -2
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js +1 -1
- package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js +2 -2
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js +11 -18
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuBurger.js +8 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuBurger.js.map +1 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuItem.js +15 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuItem.js.map +1 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
- package/mobile/dist/hooks/useActiveRoute.d.ts +3 -2
- package/mobile/dist/hooks/useActiveRoute.js.map +1 -1
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js +1 -1
- package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js +2 -2
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js +12 -19
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuBurger.js +6 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuBurger.js.map +1 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuItem.js +13 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuItem.js.map +1 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
- package/mobile/lib/hooks/useActiveRoute.d.ts +3 -2
- package/mobile/lib/hooks/useActiveRoute.js.map +1 -1
- package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +1 -1
- package/mobile/src/components/Calculator/RefinancingCalculatorForm.tsx +2 -2
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.tsx +28 -23
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenuBurger.tsx +21 -0
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenuItem.tsx +42 -0
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenuProps.tsx +1 -5
- package/mobile/src/hooks/useActiveRoute.ts +3 -4
- package/package.json +1 -1
- package/src/components/Calculator/CreditCalculatorForm.tsx +1 -1
- package/src/components/Calculator/RefinancingCalculatorForm.tsx +2 -2
- package/src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx +28 -23
- package/src/components/StickyBottomMenu/StickyBottomMenuBurger.tsx +21 -0
- package/src/components/StickyBottomMenu/StickyBottomMenuItem.tsx +42 -0
- package/src/components/StickyBottomMenu/StickyBottomMenuProps.tsx +1 -5
- package/src/hooks/useActiveRoute.ts +3 -4
- package/bundle/components/StickyBottomMenu/RenderItem.d.ts +0 -8
- package/bundle/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
- package/dist/components/StickyBottomMenu/RenderItem.d.ts +0 -8
- package/dist/components/StickyBottomMenu/RenderItem.js +0 -25
- package/dist/components/StickyBottomMenu/RenderItem.js.map +0 -1
- package/dist/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
- package/dist/components/StickyBottomMenu/RenderMenuItems.js +0 -11
- package/dist/components/StickyBottomMenu/RenderMenuItems.js.map +0 -1
- package/lib/components/StickyBottomMenu/RenderItem.d.ts +0 -8
- package/lib/components/StickyBottomMenu/RenderItem.js +0 -23
- package/lib/components/StickyBottomMenu/RenderItem.js.map +0 -1
- package/lib/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
- package/lib/components/StickyBottomMenu/RenderMenuItems.js +0 -9
- package/lib/components/StickyBottomMenu/RenderMenuItems.js.map +0 -1
- package/mobile/bundle/components/StickyBottomMenu/RenderItem.d.ts +0 -8
- package/mobile/bundle/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
- package/mobile/dist/components/StickyBottomMenu/RenderItem.d.ts +0 -8
- package/mobile/dist/components/StickyBottomMenu/RenderItem.js +0 -25
- package/mobile/dist/components/StickyBottomMenu/RenderItem.js.map +0 -1
- package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
- package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.js +0 -11
- package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.js.map +0 -1
- package/mobile/lib/components/StickyBottomMenu/RenderItem.d.ts +0 -8
- package/mobile/lib/components/StickyBottomMenu/RenderItem.js +0 -23
- package/mobile/lib/components/StickyBottomMenu/RenderItem.js.map +0 -1
- package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
- package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.js +0 -9
- package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.js.map +0 -1
- package/mobile/src/components/StickyBottomMenu/RenderItem.tsx +0 -51
- package/mobile/src/components/StickyBottomMenu/RenderMenuItems.tsx +0 -21
- package/src/components/StickyBottomMenu/RenderItem.tsx +0 -51
- package/src/components/StickyBottomMenu/RenderMenuItems.tsx +0 -21
|
@@ -67,7 +67,7 @@ export const RefinancingCalculatorForm = JSX<RefinancingCalculatorProp>(
|
|
|
67
67
|
value: calculatorParams.moneyValue,
|
|
68
68
|
})}
|
|
69
69
|
{renderWantedSumInput({
|
|
70
|
-
title: 'Ежемесячный
|
|
70
|
+
title: 'Ежемесячный платёж в других банках, ₽',
|
|
71
71
|
step: 500,
|
|
72
72
|
min: calculatorParams.minSumOld,
|
|
73
73
|
max: calculatorParams.maxSumOld,
|
|
@@ -102,7 +102,7 @@ export const RefinancingCalculatorForm = JSX<RefinancingCalculatorProp>(
|
|
|
102
102
|
})}
|
|
103
103
|
<div className="flex flex-col gap-2xl mt-2 sm:w-96 sm:mt-0">
|
|
104
104
|
<CalculatorValueBlock
|
|
105
|
-
title={'Ежемесячный
|
|
105
|
+
title={'Ежемесячный платёж'}
|
|
106
106
|
value={calculatorParams.monthlyPayment}
|
|
107
107
|
postfix="₽"
|
|
108
108
|
/>
|
|
@@ -1,38 +1,29 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { useActiveRoute } from '../../hooks/useActiveRoute';
|
|
3
3
|
import { useSWRResource } from '../../hooks/useSWRResource';
|
|
4
4
|
import { projectSettings } from '../../ProjectSettings';
|
|
5
5
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
6
|
+
import { StickyBottomMenuBurger } from './StickyBottomMenuBurger';
|
|
7
|
+
import type { MenuItem } from './StickyBottomMenuContent';
|
|
8
|
+
import { StickyBottomMenuItem } from './StickyBottomMenuItem';
|
|
9
|
+
import { type StickyBottomMenuProps } from './StickyBottomMenuProps';
|
|
8
10
|
import { useBurgerMenuDialog } from './useBurgerMenuDialog';
|
|
9
11
|
|
|
12
|
+
const EMPTY_MENU = [];
|
|
13
|
+
|
|
10
14
|
export const StickyBottomMenu = JSX<StickyBottomMenuProps>(({ ...rest }) => {
|
|
11
|
-
const {
|
|
15
|
+
const [isBurgerMenuDialogOpen, { toggle, close }] = useBurgerMenuDialog();
|
|
16
|
+
|
|
17
|
+
const { menuItems = EMPTY_MENU } = useSWRResource<StickyBottomMenuProps>(
|
|
12
18
|
projectSettings.STICKY_MOBILE_MENU || 'sticky-mobile-menu',
|
|
13
19
|
{ fallback: rest.options?.page?.fallback, folderName: 'portal-resources', setBasePath: true },
|
|
14
20
|
);
|
|
15
21
|
|
|
16
|
-
const [
|
|
22
|
+
const [, activeItem] = useActiveRoute(menuItems);
|
|
17
23
|
|
|
18
|
-
const burgerMenu = {
|
|
19
|
-
title: 'Меню',
|
|
20
|
-
icon: {
|
|
21
|
-
icon: 'BurgerIcon',
|
|
22
|
-
iconVersion: isBurgerMenuDialogOpen ? 'color' : 'black',
|
|
23
|
-
},
|
|
24
|
-
isActive: isBurgerMenuDialogOpen,
|
|
25
|
-
};
|
|
26
24
|
const middleIdx = Math.floor(menuItems.length / 2);
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
[
|
|
30
|
-
...menuItems.slice(0, middleIdx),
|
|
31
|
-
burgerMenu,
|
|
32
|
-
...menuItems.slice(middleIdx),
|
|
33
|
-
] as MenuItemProps[],
|
|
34
|
-
[menuItems, middleIdx, burgerMenu],
|
|
35
|
-
);
|
|
25
|
+
const leftItems = menuItems.slice(0, middleIdx);
|
|
26
|
+
const rightItems = menuItems.slice(middleIdx);
|
|
36
27
|
|
|
37
28
|
/* Attribute [data-component] need for correct render in wcms editor. Do not remove. */
|
|
38
29
|
return (
|
|
@@ -41,8 +32,22 @@ export const StickyBottomMenu = JSX<StickyBottomMenuProps>(({ ...rest }) => {
|
|
|
41
32
|
className="@container-normal fixed w-full h-[74px] bottom-0 left-0 my-0 mx-auto bg-transparent z-[100]"
|
|
42
33
|
padding="p-0"
|
|
43
34
|
>
|
|
44
|
-
<
|
|
35
|
+
<div className="ml-auto container bg-white flex justify-center shadow-blue-gray">
|
|
36
|
+
{leftItems.map(renderMenuItem(activeItem, close))}
|
|
37
|
+
<StickyBottomMenuBurger isActive={isBurgerMenuDialogOpen} onClick={toggle} />
|
|
38
|
+
{rightItems.map(renderMenuItem(activeItem, close))}
|
|
39
|
+
</div>
|
|
45
40
|
</BlockWrapper>
|
|
46
41
|
</div>
|
|
47
42
|
);
|
|
48
43
|
});
|
|
44
|
+
|
|
45
|
+
const renderMenuItem = (activeItem: MenuItem, close: () => void) => (_: MenuItem, i: number) =>
|
|
46
|
+
(
|
|
47
|
+
<StickyBottomMenuItem
|
|
48
|
+
key={_.href || String(i)}
|
|
49
|
+
isActive={_ === activeItem}
|
|
50
|
+
item={_}
|
|
51
|
+
onClick={close}
|
|
52
|
+
/>
|
|
53
|
+
);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
3
|
+
import { style } from '../../utils/style';
|
|
4
|
+
|
|
5
|
+
interface StickyBottomMenuBurgerProps {
|
|
6
|
+
isActive?: boolean;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const StickyBottomMenuBurger = JSX<StickyBottomMenuBurgerProps>(({ isActive, onClick }) => (
|
|
11
|
+
<button
|
|
12
|
+
className={style(
|
|
13
|
+
isActive ? 'text-primary-main' : 'text-primary-text',
|
|
14
|
+
`w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer`,
|
|
15
|
+
)}
|
|
16
|
+
onClick={onClick}
|
|
17
|
+
>
|
|
18
|
+
<Icon className="w-6 h-6" name="BurgerIcon" iconVersion={isActive ? 'color' : 'black'} />
|
|
19
|
+
Меню
|
|
20
|
+
</button>
|
|
21
|
+
));
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useLink } from '../../hooks/useLink';
|
|
3
|
+
import { projectSettings } from '../../ProjectSettings';
|
|
4
|
+
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
5
|
+
import { style } from '../../utils/style';
|
|
6
|
+
import type { MenuItem } from './StickyBottomMenuContent';
|
|
7
|
+
|
|
8
|
+
interface StickyBottomMenuItemProps {
|
|
9
|
+
isActive?: boolean;
|
|
10
|
+
item?: MenuItem;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const StickyBottomMenuItem = JSX<StickyBottomMenuItemProps>(
|
|
15
|
+
({ isActive, item, onClick }) => {
|
|
16
|
+
const isAnotherPortal =
|
|
17
|
+
!projectSettings?.BASE_PATH || !item?.href?.startsWith(projectSettings.BASE_PATH);
|
|
18
|
+
|
|
19
|
+
const link = useLink({ isRemote: isAnotherPortal });
|
|
20
|
+
const { href, onClick: handleClick } = link({ href: item?.href, onClick });
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<a
|
|
24
|
+
className={style(
|
|
25
|
+
isActive ? 'text-primary-main' : 'text-primary-text',
|
|
26
|
+
`w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer`,
|
|
27
|
+
)}
|
|
28
|
+
href={href}
|
|
29
|
+
target="_self"
|
|
30
|
+
title={item?.title || ''}
|
|
31
|
+
onClick={handleClick}
|
|
32
|
+
>
|
|
33
|
+
<Icon
|
|
34
|
+
className="w-6 h-6"
|
|
35
|
+
name={item?.icon?.icon}
|
|
36
|
+
iconVersion={isActive ? 'color' : 'black'}
|
|
37
|
+
/>
|
|
38
|
+
{item?.title || ''}
|
|
39
|
+
</a>
|
|
40
|
+
);
|
|
41
|
+
},
|
|
42
|
+
);
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { type UniBlockProps } from '../../model/JSXBlock';
|
|
2
2
|
import { type MenuItem, type StickyBottomMenuContent } from './StickyBottomMenuContent';
|
|
3
3
|
|
|
4
|
-
export interface MenuItemProps extends MenuItem {
|
|
5
|
-
isActive?: boolean;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
4
|
export interface StickyBottomMenuProps extends StickyBottomMenuContent, UniBlockProps {
|
|
9
|
-
menuItems?:
|
|
5
|
+
menuItems?: MenuItem[];
|
|
10
6
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { isTopItemActive } from '../components/Header/isTopItemActive';
|
|
2
|
-
import { type TopMenuItemProps } from '../services/sitemap/SitemapData';
|
|
3
2
|
import { useRouter } from './useRouter';
|
|
4
3
|
|
|
5
|
-
export function useActiveRoute(
|
|
6
|
-
items:
|
|
7
|
-
): [number,
|
|
4
|
+
export function useActiveRoute<T extends { href?: string }>(
|
|
5
|
+
items: T[] | undefined = [],
|
|
6
|
+
): [number, T] {
|
|
8
7
|
const router = useRouter();
|
|
9
8
|
const activeIndex = items.findIndex(isTopItemActive(router));
|
|
10
9
|
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type MenuItemProps } from './StickyBottomMenuProps';
|
|
2
|
-
interface RenderItemProps {
|
|
3
|
-
isActive?: boolean;
|
|
4
|
-
item?: MenuItemProps;
|
|
5
|
-
onClick?: () => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const RenderItem: import("@redneckz/uni-jsx").UNIComponent<RenderItemProps, any, any>;
|
|
8
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type MenuItemProps } from './StickyBottomMenuProps';
|
|
2
|
-
interface RenderMenuItems {
|
|
3
|
-
menuItems: MenuItemProps[];
|
|
4
|
-
onClick?: () => void;
|
|
5
|
-
}
|
|
6
|
-
export declare const RenderMenuItems: import("@redneckz/uni-jsx").UNIComponent<RenderMenuItems, any, any>;
|
|
7
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type MenuItemProps } from './StickyBottomMenuProps';
|
|
2
|
-
interface RenderItemProps {
|
|
3
|
-
isActive?: boolean;
|
|
4
|
-
item?: MenuItemProps;
|
|
5
|
-
onClick?: () => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const RenderItem: import("@redneckz/uni-jsx").UNIComponent<RenderItemProps, any, any>;
|
|
8
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.RenderItem = 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 Img_1 = require("../../ui-kit/Img/Img");
|
|
8
|
-
const style_1 = require("../../utils/style");
|
|
9
|
-
exports.RenderItem = (0, uni_jsx_1.JSX)(({ isActive, item, onClick }) => {
|
|
10
|
-
const isAnotherPortal = ProjectSettings_1.projectSettings?.BASE_PATH
|
|
11
|
-
? !item?.href?.startsWith(ProjectSettings_1.projectSettings?.BASE_PATH)
|
|
12
|
-
: true;
|
|
13
|
-
const link = (0, useLink_1.useLink)({ isRemote: isAnotherPortal });
|
|
14
|
-
const { href, target, onClick: handleClick, } = link({
|
|
15
|
-
href: item?.href || '',
|
|
16
|
-
target: '_self',
|
|
17
|
-
});
|
|
18
|
-
const isActiveItem = item?.icon?.icon === 'BurgerIcon' ? item.isActive : isActive;
|
|
19
|
-
const iconVersion = isActiveItem ? 'color' : 'black';
|
|
20
|
-
return ((0, jsx_runtime_1.jsxs)("a", { className: (0, style_1.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: [(0, jsx_runtime_1.jsx)(Img_1.Img, { className: "w-6 h-6", image: {
|
|
21
|
-
icon: item?.icon?.icon,
|
|
22
|
-
iconVersion: iconVersion,
|
|
23
|
-
} }), item?.title || ''] }));
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=RenderItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RenderItem.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/RenderItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iDAA8C;AAC9C,2DAAwD;AACxD,8CAA2C;AAC3C,6CAA0C;AAS7B,QAAA,UAAU,GAAG,IAAA,aAAG,EAAkB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAC7E,MAAM,eAAe,GAAG,iCAAe,EAAE,SAAS;QAChD,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,iCAAe,EAAE,SAAS,CAAC;QACrD,CAAC,CAAC,IAAI,CAAC;IAET,MAAM,IAAI,GAAG,IAAA,iBAAO,EAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;IACpD,MAAM,EACJ,IAAI,EACJ,MAAM,EACN,OAAO,EAAE,WAAW,GACrB,GAAG,IAAI,CAAC;QACP,IAAI,EAAE,IAAI,EAAE,IAAI,IAAI,EAAE;QACtB,MAAM,EAAE,OAAO;KAChB,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,IAAI,EAAE,IAAI,EAAE,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAClF,MAAM,WAAW,GAAG,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IAErD,OAAO,CACL,+BACE,SAAS,EAAE,IAAA,aAAK,EACd,YAAY,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,EACxD,2EAA2E,CAC5E,EACD,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,KAAK,YAAY,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,EACzF,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,aAEd,uBAAC,SAAG,IACF,SAAS,EAAC,SAAS,EACnB,KAAK,EAAE;oBACL,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;oBACtB,WAAW,EAAE,WAAW;iBACzB,GACD,EACD,IAAI,EAAE,KAAK,IAAI,EAAE,IAChB,CACL,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type MenuItemProps } from './StickyBottomMenuProps';
|
|
2
|
-
interface RenderMenuItems {
|
|
3
|
-
menuItems: MenuItemProps[];
|
|
4
|
-
onClick?: () => void;
|
|
5
|
-
}
|
|
6
|
-
export declare const RenderMenuItems: import("@redneckz/uni-jsx").UNIComponent<RenderMenuItems, any, any>;
|
|
7
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.RenderMenuItems = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const useActiveRoute_1 = require("../../hooks/useActiveRoute");
|
|
6
|
-
const RenderItem_1 = require("./RenderItem");
|
|
7
|
-
exports.RenderMenuItems = (0, uni_jsx_1.JSX)(({ menuItems, onClick }) => {
|
|
8
|
-
const [activeIndex] = (0, useActiveRoute_1.useActiveRoute)(menuItems);
|
|
9
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: "ml-auto container bg-white flex justify-center shadow-blue-gray", children: menuItems.map((_, i) => ((0, jsx_runtime_1.jsx)(RenderItem_1.RenderItem, { isActive: i === activeIndex, item: _, onClick: onClick }, String(i)))) }));
|
|
10
|
-
});
|
|
11
|
-
//# sourceMappingURL=RenderMenuItems.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RenderMenuItems.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/RenderMenuItems.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,+DAA4D;AAC5D,6CAA0C;AAQ7B,QAAA,eAAe,GAAG,IAAA,aAAG,EAAkB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE;IAC7E,MAAM,CAAC,WAAW,CAAC,GAAG,IAAA,+BAAc,EAAC,SAAS,CAAC,CAAC;IAEhD,OAAO,CACL,gCAAK,SAAS,EAAC,iEAAiE,YAC7E,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACvB,uBAAC,uBAAU,IAAiB,QAAQ,EAAE,CAAC,KAAK,WAAW,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,IAAjE,MAAM,CAAC,CAAC,CAAC,CAA4D,CACvF,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type MenuItemProps } from './StickyBottomMenuProps';
|
|
2
|
-
interface RenderItemProps {
|
|
3
|
-
isActive?: boolean;
|
|
4
|
-
item?: MenuItemProps;
|
|
5
|
-
onClick?: () => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const RenderItem: import("@redneckz/uni-jsx").UNIComponent<RenderItemProps, any, any>;
|
|
8
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
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 { Img } from '../../ui-kit/Img/Img.js';
|
|
6
|
-
import { style } from '../../utils/style.js';
|
|
7
|
-
export const RenderItem = JSX(({ isActive, item, onClick }) => {
|
|
8
|
-
const isAnotherPortal = projectSettings?.BASE_PATH
|
|
9
|
-
? !item?.href?.startsWith(projectSettings?.BASE_PATH)
|
|
10
|
-
: true;
|
|
11
|
-
const link = useLink({ isRemote: isAnotherPortal });
|
|
12
|
-
const { href, target, onClick: handleClick, } = link({
|
|
13
|
-
href: item?.href || '',
|
|
14
|
-
target: '_self',
|
|
15
|
-
});
|
|
16
|
-
const isActiveItem = item?.icon?.icon === 'BurgerIcon' ? item.isActive : isActive;
|
|
17
|
-
const iconVersion = isActiveItem ? 'color' : 'black';
|
|
18
|
-
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: {
|
|
19
|
-
icon: item?.icon?.icon,
|
|
20
|
-
iconVersion: iconVersion,
|
|
21
|
-
} }), item?.title || ''] }));
|
|
22
|
-
});
|
|
23
|
-
//# sourceMappingURL=RenderItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RenderItem.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/RenderItem.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,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAS1C,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAkB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAC7E,MAAM,eAAe,GAAG,eAAe,EAAE,SAAS;QAChD,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,eAAe,EAAE,SAAS,CAAC;QACrD,CAAC,CAAC,IAAI,CAAC;IAET,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;IACpD,MAAM,EACJ,IAAI,EACJ,MAAM,EACN,OAAO,EAAE,WAAW,GACrB,GAAG,IAAI,CAAC;QACP,IAAI,EAAE,IAAI,EAAE,IAAI,IAAI,EAAE;QACtB,MAAM,EAAE,OAAO;KAChB,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,IAAI,EAAE,IAAI,EAAE,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAClF,MAAM,WAAW,GAAG,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IAErD,OAAO,CACL,aACE,SAAS,EAAE,KAAK,CACd,YAAY,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,EACxD,2EAA2E,CAC5E,EACD,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,KAAK,YAAY,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,EACzF,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,aAEd,KAAC,GAAG,IACF,SAAS,EAAC,SAAS,EACnB,KAAK,EAAE;oBACL,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;oBACtB,WAAW,EAAE,WAAW;iBACzB,GACD,EACD,IAAI,EAAE,KAAK,IAAI,EAAE,IAChB,CACL,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type MenuItemProps } from './StickyBottomMenuProps';
|
|
2
|
-
interface RenderMenuItems {
|
|
3
|
-
menuItems: MenuItemProps[];
|
|
4
|
-
onClick?: () => void;
|
|
5
|
-
}
|
|
6
|
-
export declare const RenderMenuItems: import("@redneckz/uni-jsx").UNIComponent<RenderMenuItems, any, any>;
|
|
7
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import { useActiveRoute } from '../../hooks/useActiveRoute.js';
|
|
4
|
-
import { RenderItem } from './RenderItem.js';
|
|
5
|
-
export const RenderMenuItems = JSX(({ menuItems, onClick }) => {
|
|
6
|
-
const [activeIndex] = useActiveRoute(menuItems);
|
|
7
|
-
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)))) }));
|
|
8
|
-
});
|
|
9
|
-
//# sourceMappingURL=RenderMenuItems.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RenderMenuItems.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/RenderMenuItems.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAQ1C,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAkB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE;IAC7E,MAAM,CAAC,WAAW,CAAC,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAEhD,OAAO,CACL,cAAK,SAAS,EAAC,iEAAiE,YAC7E,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACvB,KAAC,UAAU,IAAiB,QAAQ,EAAE,CAAC,KAAK,WAAW,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,IAAjE,MAAM,CAAC,CAAC,CAAC,CAA4D,CACvF,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type MenuItemProps } from './StickyBottomMenuProps';
|
|
2
|
-
interface RenderItemProps {
|
|
3
|
-
isActive?: boolean;
|
|
4
|
-
item?: MenuItemProps;
|
|
5
|
-
onClick?: () => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const RenderItem: import("@redneckz/uni-jsx").UNIComponent<RenderItemProps, any, any>;
|
|
8
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type MenuItemProps } from './StickyBottomMenuProps';
|
|
2
|
-
interface RenderMenuItems {
|
|
3
|
-
menuItems: MenuItemProps[];
|
|
4
|
-
onClick?: () => void;
|
|
5
|
-
}
|
|
6
|
-
export declare const RenderMenuItems: import("@redneckz/uni-jsx").UNIComponent<RenderMenuItems, any, any>;
|
|
7
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type MenuItemProps } from './StickyBottomMenuProps';
|
|
2
|
-
interface RenderItemProps {
|
|
3
|
-
isActive?: boolean;
|
|
4
|
-
item?: MenuItemProps;
|
|
5
|
-
onClick?: () => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const RenderItem: import("@redneckz/uni-jsx").UNIComponent<RenderItemProps, any, any>;
|
|
8
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.RenderItem = 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 Img_1 = require("../../ui-kit/Img/Img");
|
|
8
|
-
const style_1 = require("../../utils/style");
|
|
9
|
-
exports.RenderItem = (0, uni_jsx_1.JSX)(({ isActive, item, onClick }) => {
|
|
10
|
-
const isAnotherPortal = ProjectSettings_1.projectSettings?.BASE_PATH
|
|
11
|
-
? !item?.href?.startsWith(ProjectSettings_1.projectSettings?.BASE_PATH)
|
|
12
|
-
: true;
|
|
13
|
-
const link = (0, useLink_1.useLink)({ isRemote: isAnotherPortal });
|
|
14
|
-
const { href, target, onClick: handleClick, } = link({
|
|
15
|
-
href: item?.href || '',
|
|
16
|
-
target: '_self',
|
|
17
|
-
});
|
|
18
|
-
const isActiveItem = item?.icon?.icon === 'BurgerIcon' ? item.isActive : isActive;
|
|
19
|
-
const iconVersion = isActiveItem ? 'color' : 'black';
|
|
20
|
-
return ((0, jsx_runtime_1.jsxs)("a", { className: (0, style_1.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: [(0, jsx_runtime_1.jsx)(Img_1.Img, { className: "w-6 h-6", image: {
|
|
21
|
-
icon: item?.icon?.icon,
|
|
22
|
-
iconVersion: iconVersion,
|
|
23
|
-
} }), item?.title || ''] }));
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=RenderItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RenderItem.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/RenderItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iDAA8C;AAC9C,2DAAwD;AACxD,8CAA2C;AAC3C,6CAA0C;AAS7B,QAAA,UAAU,GAAG,IAAA,aAAG,EAAkB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAC7E,MAAM,eAAe,GAAG,iCAAe,EAAE,SAAS;QAChD,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,iCAAe,EAAE,SAAS,CAAC;QACrD,CAAC,CAAC,IAAI,CAAC;IAET,MAAM,IAAI,GAAG,IAAA,iBAAO,EAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;IACpD,MAAM,EACJ,IAAI,EACJ,MAAM,EACN,OAAO,EAAE,WAAW,GACrB,GAAG,IAAI,CAAC;QACP,IAAI,EAAE,IAAI,EAAE,IAAI,IAAI,EAAE;QACtB,MAAM,EAAE,OAAO;KAChB,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,IAAI,EAAE,IAAI,EAAE,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAClF,MAAM,WAAW,GAAG,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IAErD,OAAO,CACL,+BACE,SAAS,EAAE,IAAA,aAAK,EACd,YAAY,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,EACxD,2EAA2E,CAC5E,EACD,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,KAAK,YAAY,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,EACzF,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,aAEd,uBAAC,SAAG,IACF,SAAS,EAAC,SAAS,EACnB,KAAK,EAAE;oBACL,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;oBACtB,WAAW,EAAE,WAAW;iBACzB,GACD,EACD,IAAI,EAAE,KAAK,IAAI,EAAE,IAChB,CACL,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type MenuItemProps } from './StickyBottomMenuProps';
|
|
2
|
-
interface RenderMenuItems {
|
|
3
|
-
menuItems: MenuItemProps[];
|
|
4
|
-
onClick?: () => void;
|
|
5
|
-
}
|
|
6
|
-
export declare const RenderMenuItems: import("@redneckz/uni-jsx").UNIComponent<RenderMenuItems, any, any>;
|
|
7
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.RenderMenuItems = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const useActiveRoute_1 = require("../../hooks/useActiveRoute");
|
|
6
|
-
const RenderItem_1 = require("./RenderItem");
|
|
7
|
-
exports.RenderMenuItems = (0, uni_jsx_1.JSX)(({ menuItems, onClick }) => {
|
|
8
|
-
const [activeIndex] = (0, useActiveRoute_1.useActiveRoute)(menuItems);
|
|
9
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: "ml-auto container bg-white flex justify-center shadow-blue-gray", children: menuItems.map((_, i) => ((0, jsx_runtime_1.jsx)(RenderItem_1.RenderItem, { isActive: i === activeIndex, item: _, onClick: onClick }, String(i)))) }));
|
|
10
|
-
});
|
|
11
|
-
//# sourceMappingURL=RenderMenuItems.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RenderMenuItems.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/RenderMenuItems.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,+DAA4D;AAC5D,6CAA0C;AAQ7B,QAAA,eAAe,GAAG,IAAA,aAAG,EAAkB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE;IAC7E,MAAM,CAAC,WAAW,CAAC,GAAG,IAAA,+BAAc,EAAC,SAAS,CAAC,CAAC;IAEhD,OAAO,CACL,gCAAK,SAAS,EAAC,iEAAiE,YAC7E,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACvB,uBAAC,uBAAU,IAAiB,QAAQ,EAAE,CAAC,KAAK,WAAW,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,IAAjE,MAAM,CAAC,CAAC,CAAC,CAA4D,CACvF,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type MenuItemProps } from './StickyBottomMenuProps';
|
|
2
|
-
interface RenderItemProps {
|
|
3
|
-
isActive?: boolean;
|
|
4
|
-
item?: MenuItemProps;
|
|
5
|
-
onClick?: () => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const RenderItem: import("@redneckz/uni-jsx").UNIComponent<RenderItemProps, any, any>;
|
|
8
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
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 { Img } from '../../ui-kit/Img/Img.js';
|
|
6
|
-
import { style } from '../../utils/style.js';
|
|
7
|
-
export const RenderItem = JSX(({ isActive, item, onClick }) => {
|
|
8
|
-
const isAnotherPortal = projectSettings?.BASE_PATH
|
|
9
|
-
? !item?.href?.startsWith(projectSettings?.BASE_PATH)
|
|
10
|
-
: true;
|
|
11
|
-
const link = useLink({ isRemote: isAnotherPortal });
|
|
12
|
-
const { href, target, onClick: handleClick, } = link({
|
|
13
|
-
href: item?.href || '',
|
|
14
|
-
target: '_self',
|
|
15
|
-
});
|
|
16
|
-
const isActiveItem = item?.icon?.icon === 'BurgerIcon' ? item.isActive : isActive;
|
|
17
|
-
const iconVersion = isActiveItem ? 'color' : 'black';
|
|
18
|
-
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: {
|
|
19
|
-
icon: item?.icon?.icon,
|
|
20
|
-
iconVersion: iconVersion,
|
|
21
|
-
} }), item?.title || ''] }));
|
|
22
|
-
});
|
|
23
|
-
//# sourceMappingURL=RenderItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RenderItem.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/RenderItem.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,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAS1C,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAkB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAC7E,MAAM,eAAe,GAAG,eAAe,EAAE,SAAS;QAChD,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,eAAe,EAAE,SAAS,CAAC;QACrD,CAAC,CAAC,IAAI,CAAC;IAET,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;IACpD,MAAM,EACJ,IAAI,EACJ,MAAM,EACN,OAAO,EAAE,WAAW,GACrB,GAAG,IAAI,CAAC;QACP,IAAI,EAAE,IAAI,EAAE,IAAI,IAAI,EAAE;QACtB,MAAM,EAAE,OAAO;KAChB,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,IAAI,EAAE,IAAI,EAAE,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAClF,MAAM,WAAW,GAAG,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IAErD,OAAO,CACL,aACE,SAAS,EAAE,KAAK,CACd,YAAY,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,EACxD,2EAA2E,CAC5E,EACD,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,KAAK,YAAY,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,EACzF,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,aAEd,KAAC,GAAG,IACF,SAAS,EAAC,SAAS,EACnB,KAAK,EAAE;oBACL,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;oBACtB,WAAW,EAAE,WAAW;iBACzB,GACD,EACD,IAAI,EAAE,KAAK,IAAI,EAAE,IAChB,CACL,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type MenuItemProps } from './StickyBottomMenuProps';
|
|
2
|
-
interface RenderMenuItems {
|
|
3
|
-
menuItems: MenuItemProps[];
|
|
4
|
-
onClick?: () => void;
|
|
5
|
-
}
|
|
6
|
-
export declare const RenderMenuItems: import("@redneckz/uni-jsx").UNIComponent<RenderMenuItems, any, any>;
|
|
7
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import { useActiveRoute } from '../../hooks/useActiveRoute.js';
|
|
4
|
-
import { RenderItem } from './RenderItem.js';
|
|
5
|
-
export const RenderMenuItems = JSX(({ menuItems, onClick }) => {
|
|
6
|
-
const [activeIndex] = useActiveRoute(menuItems);
|
|
7
|
-
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)))) }));
|
|
8
|
-
});
|
|
9
|
-
//# sourceMappingURL=RenderMenuItems.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RenderMenuItems.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/RenderMenuItems.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAQ1C,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAkB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE;IAC7E,MAAM,CAAC,WAAW,CAAC,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAEhD,OAAO,CACL,cAAK,SAAS,EAAC,iEAAiE,YAC7E,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACvB,KAAC,UAAU,IAAiB,QAAQ,EAAE,CAAC,KAAK,WAAW,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,IAAjE,MAAM,CAAC,CAAC,CAAC,CAA4D,CACvF,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useLink } from '../../hooks/useLink';
|
|
3
|
-
import { projectSettings } from '../../ProjectSettings';
|
|
4
|
-
import { Img } from '../../ui-kit/Img/Img';
|
|
5
|
-
import { style } from '../../utils/style';
|
|
6
|
-
import { type MenuItemProps } from './StickyBottomMenuProps';
|
|
7
|
-
|
|
8
|
-
interface RenderItemProps {
|
|
9
|
-
isActive?: boolean;
|
|
10
|
-
item?: MenuItemProps;
|
|
11
|
-
onClick?: () => void;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const RenderItem = JSX<RenderItemProps>(({ isActive, item, onClick }) => {
|
|
15
|
-
const isAnotherPortal = projectSettings?.BASE_PATH
|
|
16
|
-
? !item?.href?.startsWith(projectSettings?.BASE_PATH)
|
|
17
|
-
: true;
|
|
18
|
-
|
|
19
|
-
const link = useLink({ isRemote: isAnotherPortal });
|
|
20
|
-
const {
|
|
21
|
-
href,
|
|
22
|
-
target,
|
|
23
|
-
onClick: handleClick,
|
|
24
|
-
} = link({
|
|
25
|
-
href: item?.href || '',
|
|
26
|
-
target: '_self',
|
|
27
|
-
});
|
|
28
|
-
const isActiveItem = item?.icon?.icon === 'BurgerIcon' ? item.isActive : isActive;
|
|
29
|
-
const iconVersion = isActiveItem ? 'color' : 'black';
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<a
|
|
33
|
-
className={style(
|
|
34
|
-
isActiveItem ? 'text-primary-main' : 'text-primary-text',
|
|
35
|
-
`w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer`,
|
|
36
|
-
)}
|
|
37
|
-
onClick={() => (item?.icon?.icon === 'BurgerIcon' && onClick ? onClick() : handleClick())}
|
|
38
|
-
href={href}
|
|
39
|
-
target={target}
|
|
40
|
-
>
|
|
41
|
-
<Img
|
|
42
|
-
className="w-6 h-6"
|
|
43
|
-
image={{
|
|
44
|
-
icon: item?.icon?.icon,
|
|
45
|
-
iconVersion: iconVersion,
|
|
46
|
-
}}
|
|
47
|
-
/>
|
|
48
|
-
{item?.title || ''}
|
|
49
|
-
</a>
|
|
50
|
-
);
|
|
51
|
-
});
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useActiveRoute } from '../../hooks/useActiveRoute';
|
|
3
|
-
import { RenderItem } from './RenderItem';
|
|
4
|
-
import { type MenuItemProps } from './StickyBottomMenuProps';
|
|
5
|
-
|
|
6
|
-
interface RenderMenuItems {
|
|
7
|
-
menuItems: MenuItemProps[];
|
|
8
|
-
onClick?: () => void;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const RenderMenuItems = JSX<RenderMenuItems>(({ menuItems, onClick }) => {
|
|
12
|
-
const [activeIndex] = useActiveRoute(menuItems);
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<div className="ml-auto container bg-white flex justify-center shadow-blue-gray">
|
|
16
|
-
{menuItems.map((_, i) => (
|
|
17
|
-
<RenderItem key={String(i)} isActive={i === activeIndex} item={_} onClick={onClick} />
|
|
18
|
-
))}
|
|
19
|
-
</div>
|
|
20
|
-
);
|
|
21
|
-
});
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useLink } from '../../hooks/useLink';
|
|
3
|
-
import { projectSettings } from '../../ProjectSettings';
|
|
4
|
-
import { Img } from '../../ui-kit/Img/Img';
|
|
5
|
-
import { style } from '../../utils/style';
|
|
6
|
-
import { type MenuItemProps } from './StickyBottomMenuProps';
|
|
7
|
-
|
|
8
|
-
interface RenderItemProps {
|
|
9
|
-
isActive?: boolean;
|
|
10
|
-
item?: MenuItemProps;
|
|
11
|
-
onClick?: () => void;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const RenderItem = JSX<RenderItemProps>(({ isActive, item, onClick }) => {
|
|
15
|
-
const isAnotherPortal = projectSettings?.BASE_PATH
|
|
16
|
-
? !item?.href?.startsWith(projectSettings?.BASE_PATH)
|
|
17
|
-
: true;
|
|
18
|
-
|
|
19
|
-
const link = useLink({ isRemote: isAnotherPortal });
|
|
20
|
-
const {
|
|
21
|
-
href,
|
|
22
|
-
target,
|
|
23
|
-
onClick: handleClick,
|
|
24
|
-
} = link({
|
|
25
|
-
href: item?.href || '',
|
|
26
|
-
target: '_self',
|
|
27
|
-
});
|
|
28
|
-
const isActiveItem = item?.icon?.icon === 'BurgerIcon' ? item.isActive : isActive;
|
|
29
|
-
const iconVersion = isActiveItem ? 'color' : 'black';
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<a
|
|
33
|
-
className={style(
|
|
34
|
-
isActiveItem ? 'text-primary-main' : 'text-primary-text',
|
|
35
|
-
`w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer`,
|
|
36
|
-
)}
|
|
37
|
-
onClick={() => (item?.icon?.icon === 'BurgerIcon' && onClick ? onClick() : handleClick())}
|
|
38
|
-
href={href}
|
|
39
|
-
target={target}
|
|
40
|
-
>
|
|
41
|
-
<Img
|
|
42
|
-
className="w-6 h-6"
|
|
43
|
-
image={{
|
|
44
|
-
icon: item?.icon?.icon,
|
|
45
|
-
iconVersion: iconVersion,
|
|
46
|
-
}}
|
|
47
|
-
/>
|
|
48
|
-
{item?.title || ''}
|
|
49
|
-
</a>
|
|
50
|
-
);
|
|
51
|
-
});
|