@redneckz/wildless-cms-uni-blocks 0.14.534 → 0.14.536
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/bin/migration-scripts/0.14.530.js +38 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +94 -51
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Carousel/CarouselContent.d.ts +2 -0
- package/bundle/components/Carousel/renderCarouselCards.d.ts +2 -1
- package/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -1
- package/bundle/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
- package/bundle/ui-kit/ResponseTypeDialog/useResponseTypeDialog.d.ts +1 -0
- package/bundle/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
- package/bundle/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
- package/bundle/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
- package/bundle/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
- package/bundle/ui-kit/SwipeListControl/renderDotButton.d.ts +3 -0
- package/bundle/ui-kit/SwipeListControl/renderNavButton.d.ts +3 -0
- package/dist/components/ApplicationForm/ApplicationForm.js +1 -1
- package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/dist/components/ApplicationForm/getField.js +1 -1
- package/dist/components/ApplicationForm/getField.js.map +1 -1
- package/dist/components/Carousel/Carousel.js +8 -3
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel/CarouselContent.d.ts +2 -0
- package/dist/components/Carousel/renderCarouselCards.d.ts +2 -1
- package/dist/components/Carousel/renderCarouselCards.js +3 -1
- package/dist/components/Carousel/renderCarouselCards.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +1 -1
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -1
- package/dist/ui-kit/LinkButton/ButtonInner.js +2 -2
- package/dist/ui-kit/LinkButton/ButtonInner.js.map +1 -1
- package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
- package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +7 -2
- package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
- package/dist/ui-kit/ResponseTypeDialog/useResponseTypeDialog.d.ts +1 -0
- package/dist/ui-kit/ResponseTypeDialog/useResponseTypeDialog.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
- package/dist/ui-kit/SwipeListControl/NavButtonProp.js +2 -0
- package/dist/ui-kit/SwipeListControl/NavButtonProp.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
- package/dist/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
- package/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
- package/dist/ui-kit/SwipeListControl/SwipeListDots.js +32 -16
- package/dist/ui-kit/SwipeListControl/SwipeListDots.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
- package/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.js +4 -3
- package/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/renderDotButton.d.ts +3 -0
- package/dist/ui-kit/SwipeListControl/renderDotButton.js +13 -0
- package/dist/ui-kit/SwipeListControl/renderDotButton.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/renderNavButton.d.ts +3 -0
- package/dist/ui-kit/SwipeListControl/renderNavButton.js +17 -0
- package/dist/ui-kit/SwipeListControl/renderNavButton.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +1 -1
- package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.js +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/lib/components/ApplicationForm/getField.js +1 -1
- package/lib/components/ApplicationForm/getField.js.map +1 -1
- package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
- package/lib/components/Carousel/Carousel.fixture.mobile.d.ts +1 -0
- package/lib/components/Carousel/Carousel.js +8 -3
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/Carousel/CarouselContent.d.ts +2 -0
- package/lib/components/Carousel/renderCarouselCards.d.ts +2 -1
- package/lib/components/Carousel/renderCarouselCards.js +3 -1
- package/lib/components/Carousel/renderCarouselCards.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.js +1 -1
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -1
- package/lib/ui-kit/LinkButton/ButtonInner.js +2 -2
- package/lib/ui-kit/LinkButton/ButtonInner.js.map +1 -1
- package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
- package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +7 -2
- package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
- package/lib/ui-kit/ResponseTypeDialog/useResponseTypeDialog.d.ts +1 -0
- package/lib/ui-kit/ResponseTypeDialog/useResponseTypeDialog.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
- package/lib/ui-kit/SwipeListControl/NavButtonProp.js +2 -0
- package/lib/ui-kit/SwipeListControl/NavButtonProp.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
- package/lib/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
- package/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
- package/lib/ui-kit/SwipeListControl/SwipeListDots.js +32 -16
- package/lib/ui-kit/SwipeListControl/SwipeListDots.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
- package/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.js +4 -3
- package/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/renderDotButton.d.ts +2 -0
- package/lib/ui-kit/SwipeListControl/renderDotButton.js +10 -0
- package/lib/ui-kit/SwipeListControl/renderDotButton.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/renderNavButton.d.ts +2 -0
- package/lib/ui-kit/SwipeListControl/renderNavButton.js +14 -0
- package/lib/ui-kit/SwipeListControl/renderNavButton.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +1 -1
- package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +94 -51
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Carousel/CarouselContent.d.ts +2 -0
- package/mobile/bundle/components/Carousel/renderCarouselCards.d.ts +2 -1
- package/mobile/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -1
- package/mobile/bundle/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
- package/mobile/bundle/ui-kit/ResponseTypeDialog/useResponseTypeDialog.d.ts +1 -0
- package/mobile/bundle/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
- package/mobile/bundle/ui-kit/SwipeListControl/renderDotButton.d.ts +3 -0
- package/mobile/bundle/ui-kit/SwipeListControl/renderNavButton.d.ts +3 -0
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/getField.js +1 -1
- package/mobile/dist/components/ApplicationForm/getField.js.map +1 -1
- package/mobile/dist/components/Carousel/Carousel.js +8 -3
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/Carousel/CarouselContent.d.ts +2 -0
- package/mobile/dist/components/Carousel/renderCarouselCards.d.ts +2 -1
- package/mobile/dist/components/Carousel/renderCarouselCards.js +3 -1
- package/mobile/dist/components/Carousel/renderCarouselCards.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlock.js +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -1
- package/mobile/dist/ui-kit/LinkButton/ButtonInner.js +2 -2
- package/mobile/dist/ui-kit/LinkButton/ButtonInner.js.map +1 -1
- package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
- package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +7 -2
- package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
- package/mobile/dist/ui-kit/ResponseTypeDialog/useResponseTypeDialog.d.ts +1 -0
- package/mobile/dist/ui-kit/ResponseTypeDialog/useResponseTypeDialog.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
- package/mobile/dist/ui-kit/SwipeListControl/NavButtonProp.js +2 -0
- package/mobile/dist/ui-kit/SwipeListControl/NavButtonProp.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListDots.js +32 -16
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListDots.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.js +4 -3
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/renderDotButton.d.ts +3 -0
- package/mobile/dist/ui-kit/SwipeListControl/renderDotButton.js +13 -0
- package/mobile/dist/ui-kit/SwipeListControl/renderDotButton.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/renderNavButton.d.ts +3 -0
- package/mobile/dist/ui-kit/SwipeListControl/renderNavButton.js +17 -0
- package/mobile/dist/ui-kit/SwipeListControl/renderNavButton.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/getField.js +1 -1
- package/mobile/lib/components/ApplicationForm/getField.js.map +1 -1
- package/mobile/lib/components/Carousel/Carousel.js +8 -3
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/Carousel/CarouselContent.d.ts +2 -0
- package/mobile/lib/components/Carousel/renderCarouselCards.d.ts +2 -1
- package/mobile/lib/components/Carousel/renderCarouselCards.js +3 -1
- package/mobile/lib/components/Carousel/renderCarouselCards.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlock.js +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -1
- package/mobile/lib/ui-kit/LinkButton/ButtonInner.js +2 -2
- package/mobile/lib/ui-kit/LinkButton/ButtonInner.js.map +1 -1
- package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
- package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +7 -2
- package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
- package/mobile/lib/ui-kit/ResponseTypeDialog/useResponseTypeDialog.d.ts +1 -0
- package/mobile/lib/ui-kit/ResponseTypeDialog/useResponseTypeDialog.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
- package/mobile/lib/ui-kit/SwipeListControl/NavButtonProp.js +2 -0
- package/mobile/lib/ui-kit/SwipeListControl/NavButtonProp.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListDots.js +32 -16
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListDots.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.js +4 -3
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/renderDotButton.d.ts +3 -0
- package/mobile/lib/ui-kit/SwipeListControl/renderDotButton.js +10 -0
- package/mobile/lib/ui-kit/SwipeListControl/renderDotButton.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/renderNavButton.d.ts +3 -0
- package/mobile/lib/ui-kit/SwipeListControl/renderNavButton.js +14 -0
- package/mobile/lib/ui-kit/SwipeListControl/renderNavButton.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +5 -0
- package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +1 -1
- package/mobile/src/components/ApplicationForm/getField.tsx +1 -0
- package/mobile/src/components/Carousel/Carousel.tsx +28 -17
- package/mobile/src/components/Carousel/CarouselContent.ts +2 -0
- package/mobile/src/components/Carousel/renderCarouselCards.tsx +8 -1
- package/mobile/src/components/ProductBlock/ProductBlock.tsx +7 -2
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +3 -1
- package/mobile/src/ui-kit/LinkButton/ButtonInner.tsx +2 -2
- package/mobile/src/ui-kit/ResponseTypeDialog/ResponseTypeDialog.tsx +12 -4
- package/mobile/src/ui-kit/ResponseTypeDialog/useResponseTypeDialog.tsx +1 -0
- package/mobile/src/ui-kit/SwipeListControl/NavButtonProp.ts +11 -0
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControl.tsx +7 -1
- package/mobile/src/ui-kit/SwipeListControl/SwipeListDots.tsx +69 -46
- package/mobile/src/ui-kit/SwipeListControl/SwipeListScrollButtons.tsx +9 -5
- package/mobile/src/ui-kit/SwipeListControl/renderDotButton.tsx +29 -0
- package/mobile/src/ui-kit/SwipeListControl/renderNavButton.tsx +33 -0
- package/mobile/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +1 -1
- package/package.json +2 -2
- package/src/components/ApplicationForm/ApplicationForm.example.json +5 -0
- package/src/components/ApplicationForm/ApplicationForm.fixture.mobile.tsx +5 -0
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +5 -0
- package/src/components/ApplicationForm/ApplicationForm.tsx +1 -1
- package/src/components/ApplicationForm/getField.tsx +1 -0
- package/src/components/Carousel/Carousel.fixture.mobile.tsx +57 -0
- package/src/components/Carousel/Carousel.fixture.tsx +56 -0
- package/src/components/Carousel/Carousel.tsx +28 -17
- package/src/components/Carousel/CarouselContent.ts +2 -0
- package/src/components/Carousel/renderCarouselCards.tsx +8 -1
- package/src/components/ProductBlock/ProductBlock.tsx +7 -2
- package/src/components/ProductBlock/ProductBlockContent.ts +3 -1
- package/src/components/ProductGallery/ProductGallery.fixture.tsx +17 -84
- package/src/ui-kit/LinkButton/ButtonInner.tsx +2 -2
- package/src/ui-kit/ResponseTypeDialog/ResponseTypeDialog.tsx +12 -4
- package/src/ui-kit/ResponseTypeDialog/useResponseTypeDialog.tsx +1 -0
- package/src/ui-kit/SwipeListControl/NavButtonProp.ts +11 -0
- package/src/ui-kit/SwipeListControl/SwipeListControl.tsx +7 -1
- package/src/ui-kit/SwipeListControl/SwipeListDots.tsx +69 -46
- package/src/ui-kit/SwipeListControl/SwipeListScrollButtons.tsx +9 -5
- package/src/ui-kit/SwipeListControl/renderDotButton.tsx +29 -0
- package/src/ui-kit/SwipeListControl/renderNavButton.tsx +33 -0
- package/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +1 -1
|
@@ -14,6 +14,8 @@ export declare type CarouselContent = UniBlockContent & {
|
|
|
14
14
|
arrowsPadded?: boolean;
|
|
15
15
|
/** @title Отступы между карточками */
|
|
16
16
|
isGap?: boolean;
|
|
17
|
+
/** @title Показывать кнопки навигации */
|
|
18
|
+
isNavButtons?: boolean;
|
|
17
19
|
/** @title Не показывать контур на карточках */
|
|
18
20
|
noCardBorder?: boolean;
|
|
19
21
|
cardSize?: CardSizeMode;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
2
2
|
import { type CardSizeMode } from './CarouselContent';
|
|
3
|
-
export declare const renderCarouselCards: ({ noCardBorder, cardSize, ...rest }: UniBlockProps & {
|
|
3
|
+
export declare const renderCarouselCards: ({ noCardBorder, cardSize, isNavButtons, ...rest }: UniBlockProps & {
|
|
4
4
|
noCardBorder?: boolean | undefined;
|
|
5
5
|
cardSize?: CardSizeMode | undefined;
|
|
6
|
+
isNavButtons?: boolean | undefined;
|
|
6
7
|
}) => any[] | null;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { type AdditionalDescriptionProps } from '../../model/HeadlineType';
|
|
1
2
|
import { type BaseProductTileContent } from '../../ui-kit/BaseProductTile/BaseProductTileContent';
|
|
2
3
|
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
3
4
|
/**
|
|
4
5
|
* @title Продуктовый блок
|
|
5
6
|
*/
|
|
6
|
-
export declare type ProductBlockContent = UniBlockContent & BaseProductTileContent & {
|
|
7
|
+
export declare type ProductBlockContent = UniBlockContent & BaseProductTileContent & AdditionalDescriptionProps & {
|
|
7
8
|
/** @title Отображать кнопку возврата */
|
|
8
9
|
backwardButton?: boolean;
|
|
9
10
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type DialogOptions } from '../DialogManager/useDialogManager';
|
|
2
2
|
export interface ResponseTypeDialogProps {
|
|
3
3
|
responseType?: 'OK' | 'Fail';
|
|
4
|
+
typeForm?: string;
|
|
4
5
|
}
|
|
5
6
|
export declare const useResponseTypeDialog: (props: ResponseTypeDialogProps) => {
|
|
6
7
|
open: (options?: DialogOptions) => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type DescriptionProps, type TitleProps } from '../../model/HeadlineType';
|
|
2
|
+
import type { SwipeListControlType } from './SwipeListControlContent';
|
|
3
|
+
export interface DotProp {
|
|
4
|
+
activeIndex?: number;
|
|
5
|
+
onClick: (i: number) => void;
|
|
6
|
+
listType?: SwipeListControlType;
|
|
7
|
+
}
|
|
8
|
+
/** @title Кнопка под слайдом */
|
|
9
|
+
export declare type NavButtonProp = TitleProps & DescriptionProps;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import { type NavButtonProp } from './NavButtonProp';
|
|
2
3
|
import { type SnapAlign } from './SwipeListContainer';
|
|
3
4
|
import { type SwipeListControlContent } from './SwipeListControlContent';
|
|
4
5
|
interface SwipeListControlProps extends SwipeListControlContent {
|
|
@@ -9,6 +10,7 @@ interface SwipeListControlProps extends SwipeListControlContent {
|
|
|
9
10
|
snapAlign?: SnapAlign;
|
|
10
11
|
hasBlur?: boolean;
|
|
11
12
|
onVisibleIndicesChange?: (indices: number[]) => void;
|
|
13
|
+
navButtons?: NavButtonProp[];
|
|
12
14
|
}
|
|
13
15
|
export declare const SwipeListControl: import("@redneckz/uni-jsx").UNIComponent<SwipeListControlProps, any, any>;
|
|
14
16
|
export {};
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { type BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import { type NavButtonProp } from './NavButtonProp';
|
|
2
3
|
import { type SwipeListControlType } from './SwipeListControlContent';
|
|
4
|
+
import { type SwipeListScroll } from './useSwipeListScroll';
|
|
3
5
|
interface SwipeListDotsProps {
|
|
4
6
|
className?: string;
|
|
5
|
-
containerRef?: {
|
|
6
|
-
current: HTMLDivElement | null;
|
|
7
|
-
};
|
|
8
7
|
activeIndex?: number;
|
|
9
8
|
dotCount?: number;
|
|
10
9
|
listType?: SwipeListControlType;
|
|
11
10
|
version?: BlockVersion;
|
|
11
|
+
navButtons?: NavButtonProp[];
|
|
12
|
+
onVisibleIndicesChange?: (indices: number[]) => void;
|
|
13
|
+
containerRef?: {
|
|
14
|
+
current: HTMLDivElement | null;
|
|
15
|
+
};
|
|
16
|
+
containerScroll?: SwipeListScroll;
|
|
12
17
|
}
|
|
13
18
|
export declare const SwipeListDots: import("@redneckz/uni-jsx").UNIComponent<SwipeListDotsProps, any, any>;
|
|
14
19
|
export {};
|
|
@@ -4,5 +4,6 @@ export interface SwipeListScrollButtonsProps extends SwipeListScrollButtonsConte
|
|
|
4
4
|
className?: string;
|
|
5
5
|
scroll: SwipeListScroll;
|
|
6
6
|
hasBlur?: boolean;
|
|
7
|
+
isBottom?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare const SwipeListScrollButtons: import("@redneckz/uni-jsx").UNIComponent<SwipeListScrollButtonsProps, any, any>;
|
|
@@ -36,7 +36,7 @@ exports.ApplicationForm = (0, uni_jsx_1.JSX)(
|
|
|
36
36
|
const status = (await API.send(formatData, endpoint === 'lead')) ? 'OK' : 'Fail';
|
|
37
37
|
setResponseType(status);
|
|
38
38
|
if (status) {
|
|
39
|
-
const responseTypeDialog = (0, useResponseTypeDialog_1.useResponseTypeDialog)({ responseType: status });
|
|
39
|
+
const responseTypeDialog = (0, useResponseTypeDialog_1.useResponseTypeDialog)({ responseType: status, typeForm });
|
|
40
40
|
responseTypeDialog.open();
|
|
41
41
|
}
|
|
42
42
|
if (status === 'OK' && data) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationForm.js","sourceRoot":"","sources":["../../../src/components/ApplicationForm/ApplicationForm.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAA+E;AAC/E,6DAA0D;AAC1D,wEAAqE;AACrE,kEAA+D;AAC/D,iDAA8C;AAC9C,oGAAiG;AAEjG,iGAA8F;AAC9F,iDAA8C;AAE9C,6CAA0C;AAC1C,sEAAmE;AACnE,0DAAiE;AAMjE,yCAAsC;AACtC,mDAAgD;AAChD,+DAA4E;AAC5E,6DAA0D;AAC1D,mEAAgE;AAChE,qDAAkD;AAGlD,MAAM,GAAG,GAAG,IAAA,+BAAc,GAAE,CAAC;AAEhB,QAAA,eAAe,GAAG,IAAA,aAAG;AAChC,kDAAkD;AAClD,CAAC,EACC,SAAS,EACT,KAAK,EACL,QAAQ,GAAG,EAAE,EACb,QAAQ,GAAG,EAAE,EACb,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,IAAI,EACJ,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,EAAE,CAAe,CAAC;IACzE,MAAM,gBAAgB,GAAG,IAAA,yCAAm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C,MAAM,SAAS,GAAG,IAAI,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;QAEvD,OAAO,KAAK,CAAC,IAAI,KAAK,gBAAgB;YACpC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC;YAC9B,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,GAAG,IAAI,SAAS,CAAC,CAAC;IAC1C,CAAC,CAAC,CACL,CAAC"}
|
|
@@ -33,7 +33,7 @@ const getField =
|
|
|
33
33
|
name: ((0, jsx_runtime_1.jsx)(InputControl_1.InputControl, { label: "\u0418\u043C\u044F", ...(0, getValidation_1.getValidation)(field('name'), getObjectValidator_1.validatorObj.name, required), ...rest })),
|
|
34
34
|
middleName: ((0, jsx_runtime_1.jsx)(InputControl_1.InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') })),
|
|
35
35
|
phone: ((0, jsx_runtime_1.jsx)(InputPhoneControl_1.InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...(0, getValidation_1.getValidation)(field('phone'), getObjectValidator_1.validatorObj.phone, required) })),
|
|
36
|
-
email: ((0, jsx_runtime_1.jsx)(InputControl_1.InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...(0, getValidation_1.getValidation)(field('email'), getObjectValidator_1.validatorObj.email, required) })),
|
|
36
|
+
email: ((0, jsx_runtime_1.jsx)(InputControl_1.InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...(0, getValidation_1.getValidation)(field('email'), getObjectValidator_1.validatorObj.email, required), ...rest })),
|
|
37
37
|
fullName: ((0, jsx_runtime_1.jsx)(InputControl_1.InputControl, { label: "\u0424\u0418\u041E", ...(0, getValidation_1.getValidation)(field('fullName'), getObjectValidator_1.validatorObj.fullName, required), ...rest })),
|
|
38
38
|
inn: ((0, jsx_runtime_1.jsx)(InputControl_1.InputControl, { label: "\u0418\u041D\u041D", type: "number", ...(0, getValidation_1.getValidation)(field('inn'), getObjectValidator_1.validatorObj.inn, required) })),
|
|
39
39
|
comment: (0, jsx_runtime_1.jsx)(CommentField_1.CommentField, { field: field, input: input }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getField.js","sourceRoot":"","sources":["../../../src/components/ApplicationForm/getField.tsx"],"names":[],"mappings":";;;AACA,+EAA4E;AAC5E,iFAA8E;AAC9E,kEAA+D;AAC/D,4EAAyE;AACzE,qDAAkD;AAClD,6DAA0D;AAC1D,+CAA4C;AAE5C,iDAA8C;AAC9C,+DAA4D;AAC5D,2DAAwD;AACxD,6DAAoD;AACpD,mDAAgD;AAChD,mDAAgD;AAChD,+DAA4D;AAC5D,iEAA6D;AAC7D,yDAAsD;AACtD,+CAA4C;AAC5C,6DAA0D;AAC1D,mEAAgE;AAChE,2CAAwC;AACxC,2DAAwD;AACxD,yCAAsC;AAE/B,MAAM,QAAQ;AACnB,kDAAkD;AAClD,CAAC,KAA+B,EAAE,QAAgB,EAAE,EAAE,CAAC,CAAC,KAAe,EAAE,CAAS,EAAE,EAAE;IACpF,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACpC,MAAM,SAAS,GAAG,QAAQ,KAAK,cAAc,IAAI,QAAQ,KAAK,gBAAgB,CAAC;IAE/E,MAAM,SAAS,GAAG;QAChB,OAAO,EAAE,CACP,uBAAC,2BAAY,IACX,KAAK,EAAC,4CAAS,KACX,IAAA,6BAAa,EAAC,KAAK,CAAC,SAAS,CAAC,EAAE,iCAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,GACnE,CACH;QACD,IAAI,EAAE,CACJ,uBAAC,2BAAY,IACX,KAAK,EAAC,oBAAK,KACP,IAAA,6BAAa,EAAC,KAAK,CAAC,MAAM,CAAC,EAAE,iCAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,KACzD,IAAI,GACR,CACH;QACD,UAAU,EAAE,CACV,uBAAC,2BAAY,IAAC,KAAK,EAAC,sLAAqC,KAAK,KAAK,CAAC,YAAY,CAAC,GAAI,CACtF;QACD,KAAK,EAAE,CACL,uBAAC,qCAAiB,IAChB,KAAK,EAAC,4CAAS,KACX,IAAA,6BAAa,EAAC,KAAK,CAAC,OAAO,CAAC,EAAE,iCAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,GAC/D,CACH;QACD,KAAK,EAAE,CACL,uBAAC,2BAAY,IACX,KAAK,EAAC,mGAAmB,KACrB,IAAA,6BAAa,EAAC,KAAK,CAAC,OAAO,CAAC,EAAE,iCAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"getField.js","sourceRoot":"","sources":["../../../src/components/ApplicationForm/getField.tsx"],"names":[],"mappings":";;;AACA,+EAA4E;AAC5E,iFAA8E;AAC9E,kEAA+D;AAC/D,4EAAyE;AACzE,qDAAkD;AAClD,6DAA0D;AAC1D,+CAA4C;AAE5C,iDAA8C;AAC9C,+DAA4D;AAC5D,2DAAwD;AACxD,6DAAoD;AACpD,mDAAgD;AAChD,mDAAgD;AAChD,+DAA4D;AAC5D,iEAA6D;AAC7D,yDAAsD;AACtD,+CAA4C;AAC5C,6DAA0D;AAC1D,mEAAgE;AAChE,2CAAwC;AACxC,2DAAwD;AACxD,yCAAsC;AAE/B,MAAM,QAAQ;AACnB,kDAAkD;AAClD,CAAC,KAA+B,EAAE,QAAgB,EAAE,EAAE,CAAC,CAAC,KAAe,EAAE,CAAS,EAAE,EAAE;IACpF,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACpC,MAAM,SA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AAC;AACX,CAAC,CAAC;AApHS,QAAA,QAAQ,YAoHjB;AAEJ,SAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,KAAK,GAIN;IACC,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAC5B,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IAE/C,OAAO,CAAC,SAAS,IAAI,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC;AACnF,CAAC;AAXD,sCAWC"}
|
|
@@ -8,9 +8,7 @@ const style_1 = require("../../utils/style");
|
|
|
8
8
|
const itemsGap_1 = require("./itemsGap");
|
|
9
9
|
const renderCarouselCards_1 = require("./renderCarouselCards");
|
|
10
10
|
const visibleItemCount_1 = require("./visibleItemCount");
|
|
11
|
-
exports.Carousel = (0, UniBlock_1.UniBlock)(({ className, visibleItemCount = visibleItemCount_1.VISIBLE_ITEM_COUNT, noCardBorder, arrowsPadded = true, isGap = true, cardSize = 'normal', ...rest }) => {
|
|
12
|
-
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)(className), defaultPadding: "p-6xl", ...rest, children: (0, jsx_runtime_1.jsx)(SwipeListControl_1.SwipeListControl, { className: (0, style_1.style)('relative max-w-full'), visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: isGap ? itemsGap_1.ITEMS_GAP : 0, padding: 0, arrowsPadded: arrowsPadded, hasBlur: true, children: (0, renderCarouselCards_1.renderCarouselCards)({ noCardBorder, cardSize, ...rest }) }) }));
|
|
13
|
-
}, {
|
|
11
|
+
exports.Carousel = (0, UniBlock_1.UniBlock)(({ className, visibleItemCount = visibleItemCount_1.VISIBLE_ITEM_COUNT, noCardBorder, arrowsPadded = true, isGap = true, cardSize = 'normal', isNavButtons = false, ...rest }) => ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)(className), defaultPadding: "p-6xl", ...rest, children: (0, jsx_runtime_1.jsx)(SwipeListControl_1.SwipeListControl, { className: (0, style_1.style)('relative max-w-full'), visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: isGap ? itemsGap_1.ITEMS_GAP : 0, padding: 0, arrowsPadded: arrowsPadded, navButtons: isNavButtons ? getNavButton(rest?.block?.blocks) : [], hasBlur: true, children: (0, renderCarouselCards_1.renderCarouselCards)({ noCardBorder, cardSize, isNavButtons, ...rest }) }) })), {
|
|
14
12
|
childrenTypes: [
|
|
15
13
|
'CarouselCard',
|
|
16
14
|
'CarouselCatalogCard',
|
|
@@ -26,4 +24,11 @@ exports.Carousel = (0, UniBlock_1.UniBlock)(({ className, visibleItemCount = vis
|
|
|
26
24
|
},
|
|
27
25
|
}),
|
|
28
26
|
});
|
|
27
|
+
const getNavButton = (blocks) => blocks?.map((_) => {
|
|
28
|
+
const content = _?.content;
|
|
29
|
+
return {
|
|
30
|
+
title: content?.title,
|
|
31
|
+
description: content?.additionalDescription || content?.description,
|
|
32
|
+
};
|
|
33
|
+
}) ?? [];
|
|
29
34
|
//# sourceMappingURL=Carousel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.js","sourceRoot":"","sources":["../../../src/components/Carousel/Carousel.tsx"],"names":[],"mappings":";;;AAAA,4DAAyD;AACzD,qFAAkF;AAClF,sDAAmD;AAEnD,6CAA0C;
|
|
1
|
+
{"version":3,"file":"Carousel.js","sourceRoot":"","sources":["../../../src/components/Carousel/Carousel.tsx"],"names":[],"mappings":";;;AAAA,4DAAyD;AACzD,qFAAkF;AAClF,sDAAmD;AAEnD,6CAA0C;AAG1C,yCAAuC;AACvC,+DAA4D;AAC5D,yDAAwD;AAI3C,QAAA,QAAQ,GAAG,IAAA,mBAAQ,EAC9B,CAAC,EACC,SAAS,EACT,gBAAgB,G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AAqB,IAAI,OAAO,EAAE,WAAW;KACpE,CAAC;AACJ,CAAC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -14,6 +14,8 @@ export declare type CarouselContent = UniBlockContent & {
|
|
|
14
14
|
arrowsPadded?: boolean;
|
|
15
15
|
/** @title Отступы между карточками */
|
|
16
16
|
isGap?: boolean;
|
|
17
|
+
/** @title Показывать кнопки навигации */
|
|
18
|
+
isNavButtons?: boolean;
|
|
17
19
|
/** @title Не показывать контур на карточках */
|
|
18
20
|
noCardBorder?: boolean;
|
|
19
21
|
cardSize?: CardSizeMode;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
2
2
|
import { type CardSizeMode } from './CarouselContent';
|
|
3
|
-
export declare const renderCarouselCards: ({ noCardBorder, cardSize, ...rest }: UniBlockProps & {
|
|
3
|
+
export declare const renderCarouselCards: ({ noCardBorder, cardSize, isNavButtons, ...rest }: UniBlockProps & {
|
|
4
4
|
noCardBorder?: boolean | undefined;
|
|
5
5
|
cardSize?: CardSizeMode | undefined;
|
|
6
|
+
isNavButtons?: boolean | undefined;
|
|
6
7
|
}) => any[] | null;
|
|
@@ -12,9 +12,10 @@ const CARD_SIZE_MAP = {
|
|
|
12
12
|
normal: 'lg:min-w-80 xl:min-w-96',
|
|
13
13
|
big: 'lg:min-w-[515px]',
|
|
14
14
|
};
|
|
15
|
-
const renderCarouselCards = ({ noCardBorder, cardSize = 'normal', ...rest }) => {
|
|
15
|
+
const renderCarouselCards = ({ noCardBorder, cardSize = 'normal', isNavButtons = false, ...rest }) => {
|
|
16
16
|
const { blocks: childBlocks } = rest.block || {};
|
|
17
17
|
const someCardsHighlighted = childBlocks?.some(isCardHighlighted);
|
|
18
|
+
const defaultPadding = isNavButtons ? { defaultPadding: 'p-6xl pb-m' } : {};
|
|
18
19
|
return (0, renderChildren_1.renderChildren)({
|
|
19
20
|
...rest,
|
|
20
21
|
renderProps: (block, options, blockIndex) => ((0, jsx_runtime_1.jsxs)("div", { className: cardWrapperStyle(block, { someCardsHighlighted }), children: [(0, renderBlock_1.renderBlock)(block, options, {
|
|
@@ -23,6 +24,7 @@ const renderCarouselCards = ({ noCardBorder, cardSize = 'normal', ...rest }) =>
|
|
|
23
24
|
showBorder: !noCardBorder,
|
|
24
25
|
cardSize,
|
|
25
26
|
}),
|
|
27
|
+
...defaultPadding,
|
|
26
28
|
blockIndex,
|
|
27
29
|
}), isCardHighlighted(block)
|
|
28
30
|
? (0, renderCardHighlight_1.renderCardHighlight)({ className: 'absolute top-0 -right-4 z-40' })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderCarouselCards.js","sourceRoot":"","sources":["../../../src/components/Carousel/renderCarouselCards.tsx"],"names":[],"mappings":";;;AACA,iEAA8D;AAC9D,uEAAoE;AAGpE,+DAA4D;AAC5D,6CAA0C;AAE1C,+DAA4D;AAE5D,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAExC,MAAM,aAAa,GAAiC;IAClD,KAAK,EAAE,aAAa;IACpB,MAAM,EAAE,yBAAyB;IACjC,GAAG,EAAE,kBAAkB;CACxB,CAAC;AAEK,MAAM,mBAAmB,GAAG,CAAC,EAClC,YAAY,EACZ,QAAQ,GAAG,QAAQ,EACnB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"renderCarouselCards.js","sourceRoot":"","sources":["../../../src/components/Carousel/renderCarouselCards.tsx"],"names":[],"mappings":";;;AACA,iEAA8D;AAC9D,uEAAoE;AAGpE,+DAA4D;AAC5D,6CAA0C;AAE1C,+DAA4D;AAE5D,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAExC,MAAM,aAAa,GAAiC;IAClD,KAAK,EAAE,aAAa;IACpB,MAAM,EAAE,yBAAyB;IACjC,GAAG,EAAE,kBAAkB;CACxB,CAAC;AAEK,MAAM,mBAAmB,GAAG,CAAC,EAClC,YAAY,EACZ,QAAQ,GAAG,QAAQ,EACnB,YAAY,GAAG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ACvB,EACE,oBAAoB,EACpB,UAAU,EACV,QAAQ,GAAG,QAAQ,GAC+D,EACpF,EAAE,CACF,IAAA,aAAK,EACH,aAAa,EACb,UAAU,EACV,aAAa,CAAC,QAAQ,CAAC,EAAE,kCAAkC;AAC3D,oBAAoB,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,QAAQ,CAAC,EAC7E,IAAA,+BAAc,EAAC,UAAU,CAAC,EAC1B,UAAU,IAAI,QAAQ,CACvB,CAAC;AAEJ,MAAM,iBAAiB,GAAG,CAAC,CAAuB,EAAE,EAAE,CACpD,CAAC,EAAE,OAAO,IAAI,gBAAgB,IAAI,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC"}
|
|
@@ -5,5 +5,5 @@ const BaseProductTile_1 = require("../../ui-kit/BaseProductTile/BaseProductTile"
|
|
|
5
5
|
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
6
6
|
const UniBlock_1 = require("../../UniBlock/UniBlock");
|
|
7
7
|
const style_1 = require("../../utils/style");
|
|
8
|
-
exports.ProductBlock = (0, UniBlock_1.UniBlock)(({ className, padding, ...rest }) => ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)('overflow-hidden flex flex-col gap-3xl box-border', className), padding: "p-0", ...rest, children: (0, jsx_runtime_1.jsx)(BaseProductTile_1.BaseProductTile, { defaultPadding:
|
|
8
|
+
exports.ProductBlock = (0, UniBlock_1.UniBlock)(({ className, padding, defaultPadding, ...rest }) => ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)('overflow-hidden flex flex-col gap-3xl box-border', className), padding: "p-0", ...rest, children: (0, jsx_runtime_1.jsx)(BaseProductTile_1.BaseProductTile, { defaultPadding: defaultPadding || 'p-6xl', padding: padding, className: "grow h-full", ...rest }) })), { childrenTypes: ['UnitBlock'] });
|
|
9
9
|
//# sourceMappingURL=ProductBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductBlock.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/ProductBlock.tsx"],"names":[],"mappings":";;;AAAA,kFAA+E;AAC/E,4DAAyD;AACzD,sDAAmD;AAEnD,6CAA0C;AAK7B,QAAA,YAAY,GAAG,IAAA,mBAAQ,EAClC,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"ProductBlock.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/ProductBlock.tsx"],"names":[],"mappings":";;;AAAA,kFAA+E;AAC/E,4DAAyD;AACzD,sDAAmD;AAEnD,6CAA0C;AAK7B,QAAA,YAAY,GAAG,IAAA,mBAAQ,EAClC,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CACnD,uBAAC,2BAAY,IACX,SAAS,EAAE,IAAA,aAAK,EAAC,kDAAkD,EAAE,SAAS,CAAC,EAC/E,OAAO,EAAC,KAAK,KACT,IAAI,YAER,uBAAC,iCAAe,IACd,cAAc,EAAE,cAAc,IAAI,OAAO,EACzC,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,aAAa,KACnB,IAAI,GACR,GACW,CAChB,EACD,EAAE,aAAa,EAAE,CAAC,WAAW,CAAC,EAAE,CACjC,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { type AdditionalDescriptionProps } from '../../model/HeadlineType';
|
|
1
2
|
import { type BaseProductTileContent } from '../../ui-kit/BaseProductTile/BaseProductTileContent';
|
|
2
3
|
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
3
4
|
/**
|
|
4
5
|
* @title Продуктовый блок
|
|
5
6
|
*/
|
|
6
|
-
export declare type ProductBlockContent = UniBlockContent & BaseProductTileContent & {
|
|
7
|
+
export declare type ProductBlockContent = UniBlockContent & BaseProductTileContent & AdditionalDescriptionProps & {
|
|
7
8
|
/** @title Отображать кнопку возврата */
|
|
8
9
|
backwardButton?: boolean;
|
|
9
10
|
};
|
|
@@ -8,9 +8,9 @@ const buttonClassNameConstants_1 = require("./buttonClassNameConstants");
|
|
|
8
8
|
exports.ButtonInner = (0, uni_jsx_1.JSX)((props) => {
|
|
9
9
|
const { text, aboveText, appendLeft, appendRight, version = 'primary' } = props;
|
|
10
10
|
const iconHideStyle = isWithText(props) ? 'hidden lg:block' : '';
|
|
11
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)(
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)(buttonStyle(props), 'flex gap-xs'), children: [appendLeft ? ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)(iconHideStyle, buttonClassNameConstants_1.iconStyleMap[version]), children: appendLeft })) : null, isWithText(props) ? ((0, jsx_runtime_1.jsxs)("div", { className: "whitespace-pre", children: [aboveText ? (0, jsx_runtime_1.jsx)("div", { className: "text-xs font-light text-left", children: aboveText }) : null, (0, jsx_runtime_1.jsx)("div", { className: `text-left ${aboveText ? 'text-s -mt-3xs' : 'text-l'}`, children: text })] })) : null, appendRight ? ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)(iconHideStyle, buttonClassNameConstants_1.iconStyleMap[version]), children: appendRight })) : null] }));
|
|
12
12
|
});
|
|
13
|
-
const
|
|
13
|
+
const buttonStyle = (props) => {
|
|
14
14
|
const { version, aboveText, rounded } = props;
|
|
15
15
|
if (version === 'link') {
|
|
16
16
|
return '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonInner.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkButton/ButtonInner.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,6CAA0C;AAC1C,yEAA0D;AAI1D,kBAAkB;AACL,QAAA,WAAW,GAAG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AS,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,QAAQ,EAAE,YAAG,IAAI,GAAO,IAChF,CACP,CAAC,CAAC,CAAC,IAAI,EACP,WAAW,CAAC,CAAC,CAAC,CACb,gCAAK,SAAS,EAAE,IAAA,aAAK,EAAC,aAAa,EAAE,uCAAY,CAAC,OAAO,CAAC,CAAC,YAAG,WAAW,GAAO,CACjF,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,CAAC,KAAwB,EAAE,EAAE;IAC/C,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAE9C,IAAI,OAAO,KAAK,MAAM,EAAE;QACtB,OAAO,EAAE,CAAC;KACX;IAED,MAAM,aAAa,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAEnE,OAAO,IAAA,aAAK,EACV,uCAAuC,EACvC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,kBAAkB,EACtD;QACE,cAAc,EAAE,OAAO;KACxB,CACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAmB,EAAE,EAAE,CACtE,OAAO,CAAC,IAAI,IAAI,SAAS,IAAI,CAAC,UAAU,CAAC,CAAC"}
|
|
@@ -8,13 +8,18 @@ const Button_1 = require("../Button/Button");
|
|
|
8
8
|
const Dialog_1 = require("../DialogManager/Dialog");
|
|
9
9
|
const useDialogManager_1 = require("../DialogManager/useDialogManager");
|
|
10
10
|
const Img_1 = require("../Img/Img");
|
|
11
|
-
exports.ResponseTypeDialog = (0, uni_jsx_1.JSX)(function ({ responseType }) {
|
|
11
|
+
exports.ResponseTypeDialog = (0, uni_jsx_1.JSX)(function ({ responseType, typeForm, }) {
|
|
12
12
|
const responseOK = responseType === 'OK';
|
|
13
13
|
const statusIcon = responseOK ? 'ResponseOKIcon' : 'ResponseFailIcon';
|
|
14
14
|
const { close } = (0, useDialogManager_1.useDialogManager)();
|
|
15
15
|
const handleClose = (0, hooks_1.useCallback)(() => {
|
|
16
16
|
close();
|
|
17
17
|
}, []);
|
|
18
|
-
|
|
18
|
+
const responseOKDescription = typeForm === 'ANTIFRAUD'
|
|
19
|
+
? `Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы
|
|
20
|
+
можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка
|
|
21
|
+
не звонят с использованием мессенджеров.`
|
|
22
|
+
: 'Совсем скоро мы с вами свяжемся';
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(Dialog_1.Dialog, { className: "my-6xl max-w-lg w-full min-h-fit mx-auto ", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-lg items-center rounded-md space-x-m", children: [(0, jsx_runtime_1.jsx)(Img_1.Img, { image: { icon: statusIcon, iconVersion: 'normal' }, width: "136", height: "136" }), (0, jsx_runtime_1.jsx)(Headline_1.Headline, { className: "w-full", title: responseOK ? 'Ваша заявка отправлена' : 'Не удалось отправить заявку', description: responseOK ? responseOKDescription : 'Пожалуйста, повторите позднее', headlineVersion: "XS", isEmbedded: true }), (0, jsx_runtime_1.jsx)(Button_1.Button, { type: "button", onClick: handleClose, children: "\u0425\u043E\u0440\u043E\u0448\u043E" })] }) }));
|
|
19
24
|
});
|
|
20
25
|
//# sourceMappingURL=ResponseTypeDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseTypeDialog.js","sourceRoot":"","sources":["../../../src/ui-kit/ResponseTypeDialog/ResponseTypeDialog.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAA0D;AAC1D,iEAA8D;AAC9D,6CAA0C;AAC1C,oDAAiD;AACjD,wEAAqE;AACrE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BAAC,eAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,WAAW,qDAEjC,IACL,GACC,CACV,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type DialogOptions } from '../DialogManager/useDialogManager';
|
|
2
2
|
export interface ResponseTypeDialogProps {
|
|
3
3
|
responseType?: 'OK' | 'Fail';
|
|
4
|
+
typeForm?: string;
|
|
4
5
|
}
|
|
5
6
|
export declare const useResponseTypeDialog: (props: ResponseTypeDialogProps) => {
|
|
6
7
|
open: (options?: DialogOptions) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResponseTypeDialog.js","sourceRoot":"","sources":["../../../src/ui-kit/ResponseTypeDialog/useResponseTypeDialog.tsx"],"names":[],"mappings":";;;AAAA,wEAAyF;AACzF,6DAA0D;
|
|
1
|
+
{"version":3,"file":"useResponseTypeDialog.js","sourceRoot":"","sources":["../../../src/ui-kit/ResponseTypeDialog/useResponseTypeDialog.tsx"],"names":[],"mappings":";;;AAAA,wEAAyF;AACzF,6DAA0D;AAOnD,MAAM,qBAAqB,GAAG,CAAC,KAA8B,EAAE,EAAE;IACtE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAA,mCAAgB,GAAE,CAAC;IAE3C,OAAO;QACL,IAAI,EAAE,CAAC,UAAyB,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,uBAAC,uCAAkB,OAAK,KAAK,GAAI,EAAE,OAAO,CAAC;QACvF,KAAK;KACN,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,qBAAqB,yBAOhC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type DescriptionProps, type TitleProps } from '../../model/HeadlineType';
|
|
2
|
+
import type { SwipeListControlType } from './SwipeListControlContent';
|
|
3
|
+
export interface DotProp {
|
|
4
|
+
activeIndex?: number;
|
|
5
|
+
onClick: (i: number) => void;
|
|
6
|
+
listType?: SwipeListControlType;
|
|
7
|
+
}
|
|
8
|
+
/** @title Кнопка под слайдом */
|
|
9
|
+
export declare type NavButtonProp = TitleProps & DescriptionProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavButtonProp.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/NavButtonProp.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import { type NavButtonProp } from './NavButtonProp';
|
|
2
3
|
import { type SnapAlign } from './SwipeListContainer';
|
|
3
4
|
import { type SwipeListControlContent } from './SwipeListControlContent';
|
|
4
5
|
interface SwipeListControlProps extends SwipeListControlContent {
|
|
@@ -9,6 +10,7 @@ interface SwipeListControlProps extends SwipeListControlContent {
|
|
|
9
10
|
snapAlign?: SnapAlign;
|
|
10
11
|
hasBlur?: boolean;
|
|
11
12
|
onVisibleIndicesChange?: (indices: number[]) => void;
|
|
13
|
+
navButtons?: NavButtonProp[];
|
|
12
14
|
}
|
|
13
15
|
export declare const SwipeListControl: import("@redneckz/uni-jsx").UNIComponent<SwipeListControlProps, any, any>;
|
|
14
16
|
export {};
|
|
@@ -14,13 +14,13 @@ const DEFAULT_GAP = 14;
|
|
|
14
14
|
and get rid of a clipping effect caused by overflow: hidden.
|
|
15
15
|
*/
|
|
16
16
|
const DEFAULT_PADDING = 16;
|
|
17
|
-
exports.SwipeListControl = (0, uni_jsx_1.JSX)(({ className, version, gap = DEFAULT_GAP, padding = DEFAULT_PADDING, visibleItemCount = 1, listType = 'horizontal-list', snapAlign, minHeight, showArrows, hasBlur, arrowsPadded, showDots, children, onVisibleIndicesChange, }) => {
|
|
17
|
+
exports.SwipeListControl = (0, uni_jsx_1.JSX)(({ className, version, gap = DEFAULT_GAP, padding = DEFAULT_PADDING, visibleItemCount = 1, listType = 'horizontal-list', snapAlign, minHeight, showArrows, hasBlur, arrowsPadded, showDots, children, onVisibleIndicesChange, navButtons, }) => {
|
|
18
18
|
const itemCount = Array.isArray(children) ? children.length : 0;
|
|
19
19
|
const [containerRef, scroll] = (0, useSwipeListScroll_1.useSwipeListScroll)({
|
|
20
20
|
itemCount,
|
|
21
21
|
onVisibleIndicesChange,
|
|
22
22
|
});
|
|
23
23
|
const [activeIndex] = scroll.visibleIndicesRange;
|
|
24
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)(className, listType === 'vertical-list' ? 'relative h-full' : ''), children: [(0, jsx_runtime_1.jsx)(SwipeListContainer_1.SwipeListContainer, { containerRef: containerRef, activeIndex: activeIndex, visibleItemCount: visibleItemCount, gap: gap, padding: padding, listType: listType, snapAlign: snapAlign, minHeight: minHeight, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: children }), (0, jsx_runtime_1.jsx)(SwipeListScrollButtons_1.SwipeListScrollButtons, { className: (0, style_1.style)(!showArrows && 'hidden lg:block'), scroll: scroll, hasBlur: hasBlur, arrowsPadded: arrowsPadded }), (0, jsx_runtime_1.jsx)(SwipeListDots_1.SwipeListDots, { className: (0, style_1.style)(!showDots && 'lg:hidden'),
|
|
24
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)(className, listType === 'vertical-list' ? 'relative h-full' : ''), children: [(0, jsx_runtime_1.jsx)(SwipeListContainer_1.SwipeListContainer, { containerRef: containerRef, activeIndex: activeIndex, visibleItemCount: visibleItemCount, gap: gap, padding: padding, listType: listType, snapAlign: snapAlign, minHeight: minHeight, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: children }), (0, jsx_runtime_1.jsx)(SwipeListScrollButtons_1.SwipeListScrollButtons, { className: (0, style_1.style)(!showArrows && 'hidden lg:block'), scroll: scroll, hasBlur: hasBlur, arrowsPadded: arrowsPadded, isBottom: Boolean(navButtons?.length) }), (0, jsx_runtime_1.jsx)(SwipeListDots_1.SwipeListDots, { className: (0, style_1.style)(!showDots && 'lg:hidden'), activeIndex: activeIndex, dotCount: itemCount, listType: listType, version: version, navButtons: navButtons, containerRef: containerRef, containerScroll: scroll })] }));
|
|
25
25
|
});
|
|
26
26
|
//# sourceMappingURL=SwipeListControl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwipeListControl.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListControl.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,6CAA0C;
|
|
1
|
+
{"version":3,"file":"SwipeListControl.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListControl.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,6CAA0C;AAE1C,6DAA0E;AAE1E,mDAAgD;AAChD,qEAAkE;AAClE,6DAA0D;AAE1D,MAAM,WAAW,GAAG,EAAE,CAAC;AAEvB;;;;GAIG;AACH,MAAM,eAAe,GAAG,EAAE,CAAC;AAad,QAAA,gBAAgB,GAAG,IAAA,aAAG,EACjC,CAAC,EACC,SAAS,EACT,OAAO,EACP,GAAG,GAAG,WAAW,EACjB,OAAO,GAAG,eAAe,EACzB,gBAAgB,GAAG,CAAC,EACpB,QAAQ,GAAG,iBAAiB,EAC5B,SAAS,EACT,SAAS,EACT,UAAU,EACV,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,sBAAsB,EACtB,UAAU,GACX,EAAE,EAAE;IACH,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAEhE,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,GAAG,IAAA,uCAAkB,EAAiB;QAChE,SAAS;QACT,sBAAsB;KACvB,CAAC,CAAC;IACH,MAAM,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC,mBAAmB,CAAC;IAEjD,OAAO,CACL,iCAAK,SAAS,EAAE,IAAA,aAAK,EAAC,SAAS,EAAE,QAAQ,KAAK,eAAe,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC,aACrF,uBAAC,uCAAkB,IACjB,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,gBAAgB,EAClC,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,sBAAsB,EAAE,MAAM,CAAC,0BAA0B,YAExD,QAAQ,GACU,EACrB,uBAAC,+CAAsB,IACrB,SAAS,EAAE,IAAA,aAAK,EAAC,CAAC,UAAU,IAAI,iBAAiB,CAAC,EAClD,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,GACrC,EACF,uBAAC,6BAAa,IACZ,SAAS,EAAE,IAAA,aAAK,EAAC,CAAC,QAAQ,IAAI,WAAW,CAAC,EAC1C,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,SAAS,EACnB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,MAAM,GACvB,IACE,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { type BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import { type NavButtonProp } from './NavButtonProp';
|
|
2
3
|
import { type SwipeListControlType } from './SwipeListControlContent';
|
|
4
|
+
import { type SwipeListScroll } from './useSwipeListScroll';
|
|
3
5
|
interface SwipeListDotsProps {
|
|
4
6
|
className?: string;
|
|
5
|
-
containerRef?: {
|
|
6
|
-
current: HTMLDivElement | null;
|
|
7
|
-
};
|
|
8
7
|
activeIndex?: number;
|
|
9
8
|
dotCount?: number;
|
|
10
9
|
listType?: SwipeListControlType;
|
|
11
10
|
version?: BlockVersion;
|
|
11
|
+
navButtons?: NavButtonProp[];
|
|
12
|
+
onVisibleIndicesChange?: (indices: number[]) => void;
|
|
13
|
+
containerRef?: {
|
|
14
|
+
current: HTMLDivElement | null;
|
|
15
|
+
};
|
|
16
|
+
containerScroll?: SwipeListScroll;
|
|
12
17
|
}
|
|
13
18
|
export declare const SwipeListDots: import("@redneckz/uni-jsx").UNIComponent<SwipeListDotsProps, any, any>;
|
|
14
19
|
export {};
|
|
@@ -2,28 +2,44 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
2
2
|
exports.SwipeListDots = 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");
|
|
6
|
+
const useMobileMode_1 = require("../../hooks/useMobileMode");
|
|
5
7
|
const style_1 = require("../../utils/style");
|
|
8
|
+
const renderDotButton_1 = require("./renderDotButton");
|
|
9
|
+
const renderNavButton_1 = require("./renderNavButton");
|
|
10
|
+
const SwipeListContainer_1 = require("./SwipeListContainer");
|
|
11
|
+
const useSwipeListScroll_1 = require("./useSwipeListScroll");
|
|
6
12
|
const containerStyles = {
|
|
7
13
|
'horizontal-list': 'mx-auto mt-lg w-fit',
|
|
8
14
|
'vertical-list': 'absolute flex-col justify-center h-full top-0 left-4',
|
|
9
15
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
exports.SwipeListDots = (0, uni_jsx_1.JSX)(({ className = '', activeIndex = 0, dotCount = 0, listType = 'horizontal-list', version, navButtons = [], containerRef, containerScroll, }) => {
|
|
17
|
+
const isMobileMode = (0, useMobileMode_1.useMobileMode)();
|
|
18
|
+
const [navRef, navScroll] = (0, useSwipeListScroll_1.useSwipeListScroll)({
|
|
19
|
+
itemCount: navButtons.length,
|
|
20
|
+
});
|
|
21
|
+
const scrollOption = getOptions(Boolean(navButtons?.length));
|
|
22
|
+
(0, hooks_1.useEffect)(() => {
|
|
23
|
+
if (navButtons?.length && activeIndex >= 0 && navRef?.current) {
|
|
24
|
+
navScroll.scrollTo(activeIndex, scrollOption);
|
|
25
|
+
}
|
|
26
|
+
}, [activeIndex]);
|
|
27
|
+
const onChangeActiveIndex = (0, hooks_1.useCallback)((idx) => {
|
|
18
28
|
if (idx !== activeIndex && containerRef?.current) {
|
|
19
|
-
|
|
20
|
-
behavior: 'smooth',
|
|
21
|
-
block: 'nearest',
|
|
22
|
-
});
|
|
29
|
+
containerScroll?.scrollTo(idx, scrollOption);
|
|
23
30
|
}
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
31
|
+
}, [containerRef?.current]);
|
|
32
|
+
if (navButtons?.length && !isMobileMode) {
|
|
33
|
+
return ((0, jsx_runtime_1.jsx)(SwipeListContainer_1.SwipeListContainer, { containerRef: navRef, snapAlign: "snap-start", itemClassName: "h-36 flex items-stretch w-screen", gap: 8, children: navButtons.map((0, renderNavButton_1.renderNavButton)({ activeIndex, onClick: onChangeActiveIndex })) }));
|
|
34
|
+
}
|
|
35
|
+
else if (dotCount) {
|
|
36
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)('flex gap-xs', containerStyles[listType], version ? 'group' : '', className, { 'pb-xl': navButtons?.length && isMobileMode }), "data-ver": version, children: Array.from({ length: dotCount })
|
|
37
|
+
.fill(null)
|
|
38
|
+
.map((0, renderDotButton_1.renderDotButton)({ activeIndex, onClick: onChangeActiveIndex, listType })) }));
|
|
39
|
+
}
|
|
40
|
+
return null;
|
|
41
|
+
});
|
|
42
|
+
const getOptions = (isAuto = false) => ({
|
|
43
|
+
behavior: isAuto ? 'auto' : 'smooth',
|
|
28
44
|
});
|
|
29
45
|
//# sourceMappingURL=SwipeListDots.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwipeListDots.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListDots.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;
|
|
1
|
+
{"version":3,"file":"SwipeListDots.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListDots.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAqE;AACrE,6DAA0D;AAE1D,6CAA0C;AAE1C,uDAAoD;AACpD,uDAAoD;AACpD,6DAA0D;AAE1D,6DAAgF;AAEhF,MAAM,eAAe,GAAyC;IAC5D,iBAAiB,EAAE,qBAAqB;IACxC,eAAe,EAAE,sDAAsD;CACxE,CAAC;AAaW,QAAA,aAAa,GAAG,IAAA,aAAG,EAC9B,CAAC,EACC,SAAS,GAAG,EAAE,EACd,WAAW,GAAG,CAAC,EACf,QAAQ,GAAG,CAAC,EACZ,QAAQ,GAAG,iBAAiB,EAC5B,OAAO,EACP,UAAU,GAAG,EAAE,EACf,YAAY,EACZ,eAAe,GAChB,EAAE,EAAE;IACH,MAAM,YAAY,GAAG,IAAA,6BAAa,GAAE,CAAC;IACrC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,uCAAkB,EAAiB;QAC7D,SAAS,EAAE,UAAU,CAAC,MAAM;KAC7B,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;IAE7D,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,UAAU,EAAE,MAAM,IAAI,WAAW,IAAI,CAAC,IAAI,MAAM,EAAE,OAAO,EAAE;YAC7D,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;SAC/C;IACH,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAElB,MAAM,mBAAmB,GAAG,IAAA,mBAA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AAC"}
|
|
@@ -4,5 +4,6 @@ export interface SwipeListScrollButtonsProps extends SwipeListScrollButtonsConte
|
|
|
4
4
|
className?: string;
|
|
5
5
|
scroll: SwipeListScroll;
|
|
6
6
|
hasBlur?: boolean;
|
|
7
|
+
isBottom?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare const SwipeListScrollButtons: import("@redneckz/uni-jsx").UNIComponent<SwipeListScrollButtonsProps, any, any>;
|
|
@@ -4,11 +4,12 @@ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const style_1 = require("../../utils/style");
|
|
6
6
|
const ArrowButton_1 = require("../LinkButton/ArrowButton");
|
|
7
|
-
const scrollButtonStyle = 'absolute top-[calc(50%-24px)] z-40';
|
|
8
7
|
const blurBaseStyle = 'absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none';
|
|
9
|
-
exports.SwipeListScrollButtons = (0, uni_jsx_1.JSX)(({ className, scroll, hasBlur, arrowsPadded }) => {
|
|
8
|
+
exports.SwipeListScrollButtons = (0, uni_jsx_1.JSX)(({ className, scroll, hasBlur, arrowsPadded, isBottom }) => {
|
|
10
9
|
const { canScrollLeft, canScrollRight, scrollLeft, scrollRight } = scroll;
|
|
11
|
-
|
|
10
|
+
const isArrowPadded = arrowsPadded && !isBottom;
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: className, children: [hasBlur ? renderBlur(scroll) : null, canScrollLeft ? ((0, jsx_runtime_1.jsx)(ArrowButton_1.ScrollLeftButton, { className: (0, style_1.style)(buttonStyle(isBottom), isArrowPadded ? 'left-1' : 'left-0'), onClick: scrollLeft })) : null, canScrollRight ? ((0, jsx_runtime_1.jsx)(ArrowButton_1.ScrollRightButton, { className: (0, style_1.style)(buttonStyle(isBottom), isArrowPadded ? 'right-1' : 'right-0'), onClick: scrollRight })) : null] }));
|
|
12
12
|
});
|
|
13
13
|
const renderBlur = (scroll) => ((0, jsx_runtime_1.jsxs)("div", { children: [scroll.canScrollLeft ? ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)(blurBaseStyle, 'left-0 bg-opacity-from-white group-data-secondary:bg-none') })) : null, scroll.canScrollRight ? ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)(blurBaseStyle, 'right-0 bg-opacity-to-white group-data-secondary:bg-none') })) : null] }));
|
|
14
|
+
const buttonStyle = (isBottom = false) => (0, style_1.style)('absolute z-40', isBottom ? 'bottom-[56px]' : 'top-[calc(50%-24px)]');
|
|
14
15
|
//# sourceMappingURL=SwipeListScrollButtons.js.map
|