@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
|
@@ -6,13 +6,18 @@ import { Button } from '../Button/Button.js';
|
|
|
6
6
|
import { Dialog } from '../DialogManager/Dialog.js';
|
|
7
7
|
import { useDialogManager } from '../DialogManager/useDialogManager.js';
|
|
8
8
|
import { Img } from '../Img/Img.js';
|
|
9
|
-
export const ResponseTypeDialog = JSX(function ({ responseType }) {
|
|
9
|
+
export const ResponseTypeDialog = JSX(function ({ responseType, typeForm, }) {
|
|
10
10
|
const responseOK = responseType === 'OK';
|
|
11
11
|
const statusIcon = responseOK ? 'ResponseOKIcon' : 'ResponseFailIcon';
|
|
12
12
|
const { close } = useDialogManager();
|
|
13
13
|
const handleClose = useCallback(() => {
|
|
14
14
|
close();
|
|
15
15
|
}, []);
|
|
16
|
-
|
|
16
|
+
const responseOKDescription = typeForm === 'ANTIFRAUD'
|
|
17
|
+
? `Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы
|
|
18
|
+
можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка
|
|
19
|
+
не звонят с использованием мессенджеров.`
|
|
20
|
+
: 'Совсем скоро мы с вами свяжемся';
|
|
21
|
+
return (_jsx(Dialog, { className: "my-6xl max-w-lg w-full min-h-fit mx-auto ", children: _jsxs("div", { className: "flex flex-col gap-lg items-center rounded-md space-x-m", children: [_jsx(Img, { image: { icon: statusIcon, iconVersion: 'normal' }, width: "136", height: "136" }), _jsx(Headline, { className: "w-full", title: responseOK ? 'Ваша заявка отправлена' : 'Не удалось отправить заявку', description: responseOK ? responseOKDescription : 'Пожалуйста, повторите позднее', headlineVersion: "XS", isEmbedded: true }), _jsx(Button, { type: "button", onClick: handleClose, children: "\u0425\u043E\u0440\u043E\u0448\u043E" })] }) }));
|
|
17
22
|
});
|
|
18
23
|
//# sourceMappingURL=ResponseTypeDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseTypeDialog.js","sourceRoot":"","sources":["../../../src/ui-kit/ResponseTypeDialog/ResponseTypeDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"ResponseTypeDialog.js","sourceRoot":"","sources":["../../../src/ui-kit/ResponseTypeDialog/ResponseTypeDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9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O,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,OAAO,EAAE,gBAAgB,EAAsB,MAAM,mCAAmC,CAAC;AACzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"useResponseTypeDialog.js","sourceRoot":"","sources":["../../../src/ui-kit/ResponseTypeDialog/useResponseTypeDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAsB,MAAM,mCAAmC,CAAC;AACzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAO1D,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAA8B,EAAE,EAAE;IACtE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAE3C,OAAO;QACL,IAAI,EAAE,CAAC,UAAyB,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,KAAC,kBAAkB,OAAK,KAAK,GAAI,EAAE,OAAO,CAAC;QACvF,KAAK;KACN,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -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 {};
|
|
@@ -12,13 +12,13 @@ const DEFAULT_GAP = 14;
|
|
|
12
12
|
and get rid of a clipping effect caused by overflow: hidden.
|
|
13
13
|
*/
|
|
14
14
|
const DEFAULT_PADDING = 16;
|
|
15
|
-
export const SwipeListControl = JSX(({ className, version, gap = DEFAULT_GAP, padding = DEFAULT_PADDING, visibleItemCount = 1, listType = 'horizontal-list', snapAlign, minHeight, showArrows, hasBlur, arrowsPadded, showDots, children, onVisibleIndicesChange, }) => {
|
|
15
|
+
export const SwipeListControl = JSX(({ className, version, gap = DEFAULT_GAP, padding = DEFAULT_PADDING, visibleItemCount = 1, listType = 'horizontal-list', snapAlign, minHeight, showArrows, hasBlur, arrowsPadded, showDots, children, onVisibleIndicesChange, navButtons, }) => {
|
|
16
16
|
const itemCount = Array.isArray(children) ? children.length : 0;
|
|
17
17
|
const [containerRef, scroll] = useSwipeListScroll({
|
|
18
18
|
itemCount,
|
|
19
19
|
onVisibleIndicesChange,
|
|
20
20
|
});
|
|
21
21
|
const [activeIndex] = scroll.visibleIndicesRange;
|
|
22
|
-
return (_jsxs("div", { className: style(className, listType === 'vertical-list' ? 'relative h-full' : ''), children: [_jsx(SwipeListContainer, { containerRef: containerRef, activeIndex: activeIndex, visibleItemCount: visibleItemCount, gap: gap, padding: padding, listType: listType, snapAlign: snapAlign, minHeight: minHeight, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: children }), _jsx(SwipeListScrollButtons, { className: style(!showArrows && 'hidden lg:block'), scroll: scroll, hasBlur: hasBlur, arrowsPadded: arrowsPadded }), _jsx(SwipeListDots, { className: style(!showDots && 'lg:hidden'),
|
|
22
|
+
return (_jsxs("div", { className: style(className, listType === 'vertical-list' ? 'relative h-full' : ''), children: [_jsx(SwipeListContainer, { containerRef: containerRef, activeIndex: activeIndex, visibleItemCount: visibleItemCount, gap: gap, padding: padding, listType: listType, snapAlign: snapAlign, minHeight: minHeight, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: children }), _jsx(SwipeListScrollButtons, { className: style(!showArrows && 'hidden lg:block'), scroll: scroll, hasBlur: hasBlur, arrowsPadded: arrowsPadded, isBottom: Boolean(navButtons?.length) }), _jsx(SwipeListDots, { className: style(!showDots && 'lg:hidden'), activeIndex: activeIndex, dotCount: itemCount, listType: listType, version: version, navButtons: navButtons, containerRef: containerRef, containerScroll: scroll })] }));
|
|
23
23
|
});
|
|
24
24
|
//# sourceMappingURL=SwipeListControl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwipeListControl.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListControl.tsx"],"names":[],"mappings":";AAA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AAS,EAAE,KAAK,CAAC,SAAS,EAAE,QAAQ,KAAK,eAAe,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC,aACrF,KAAC,kBAAkB,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,KAAC,sBAAsB,IACrB,SAAS,EAAE,KAAK,CAAC,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,KAAC,aAAa,IACZ,SAAS,EAAE,KAAK,CAAC,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 {};
|
|
@@ -1,27 +1,43 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
import { useCallback, useEffect } from '@redneckz/uni-jsx/lib/hooks';
|
|
4
|
+
import { useMobileMode } from '../../hooks/useMobileMode.js';
|
|
3
5
|
import { style } from '../../utils/style.js';
|
|
6
|
+
import { renderDotButton } from './renderDotButton.js';
|
|
7
|
+
import { renderNavButton } from './renderNavButton.js';
|
|
8
|
+
import { SwipeListContainer } from './SwipeListContainer.js';
|
|
9
|
+
import { useSwipeListScroll } from './useSwipeListScroll.js';
|
|
4
10
|
const containerStyles = {
|
|
5
11
|
'horizontal-list': 'mx-auto mt-lg w-fit',
|
|
6
12
|
'vertical-list': 'absolute flex-col justify-center h-full top-0 left-4',
|
|
7
13
|
};
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
export const SwipeListDots = JSX(({ className = '', activeIndex = 0, dotCount = 0, listType = 'horizontal-list', version, navButtons = [], containerRef, containerScroll, }) => {
|
|
15
|
+
const isMobileMode = useMobileMode();
|
|
16
|
+
const [navRef, navScroll] = useSwipeListScroll({
|
|
17
|
+
itemCount: navButtons.length,
|
|
18
|
+
});
|
|
19
|
+
const scrollOption = getOptions(Boolean(navButtons?.length));
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (navButtons?.length && activeIndex >= 0 && navRef?.current) {
|
|
22
|
+
navScroll.scrollTo(activeIndex, scrollOption);
|
|
23
|
+
}
|
|
24
|
+
}, [activeIndex]);
|
|
25
|
+
const onChangeActiveIndex = useCallback((idx) => {
|
|
16
26
|
if (idx !== activeIndex && containerRef?.current) {
|
|
17
|
-
|
|
18
|
-
behavior: 'smooth',
|
|
19
|
-
block: 'nearest',
|
|
20
|
-
});
|
|
27
|
+
containerScroll?.scrollTo(idx, scrollOption);
|
|
21
28
|
}
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
}, [containerRef?.current]);
|
|
30
|
+
if (navButtons?.length && !isMobileMode) {
|
|
31
|
+
return (_jsx(SwipeListContainer, { containerRef: navRef, snapAlign: "snap-start", itemClassName: "h-36 flex items-stretch w-screen", gap: 8, children: navButtons.map(renderNavButton({ activeIndex, onClick: onChangeActiveIndex })) }));
|
|
32
|
+
}
|
|
33
|
+
else if (dotCount) {
|
|
34
|
+
return (_jsx("div", { className: style('flex gap-xs', containerStyles[listType], version ? 'group' : '', className, { 'pb-xl': navButtons?.length && isMobileMode }), "data-ver": version, children: Array.from({ length: dotCount })
|
|
35
|
+
.fill(null)
|
|
36
|
+
.map(renderDotButton({ activeIndex, onClick: onChangeActiveIndex, listType })) }));
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
});
|
|
40
|
+
const getOptions = (isAuto = false) => ({
|
|
41
|
+
behavior: isAuto ? 'auto' : 'smooth',
|
|
26
42
|
});
|
|
27
43
|
//# sourceMappingURL=SwipeListDots.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwipeListDots.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListDots.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;
|
|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CAAC,CAAC;IAC7D,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;CACrC,CAAC,CAAC"}
|
|
@@ -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>;
|
|
@@ -2,11 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
import { style } from '../../utils/style.js';
|
|
4
4
|
import { ScrollLeftButton, ScrollRightButton } from '../LinkButton/ArrowButton.js';
|
|
5
|
-
const scrollButtonStyle = 'absolute top-[calc(50%-24px)] z-40';
|
|
6
5
|
const blurBaseStyle = 'absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none';
|
|
7
|
-
export const SwipeListScrollButtons = JSX(({ className, scroll, hasBlur, arrowsPadded }) => {
|
|
6
|
+
export const SwipeListScrollButtons = JSX(({ className, scroll, hasBlur, arrowsPadded, isBottom }) => {
|
|
8
7
|
const { canScrollLeft, canScrollRight, scrollLeft, scrollRight } = scroll;
|
|
9
|
-
|
|
8
|
+
const isArrowPadded = arrowsPadded && !isBottom;
|
|
9
|
+
return (_jsxs("div", { className: className, children: [hasBlur ? renderBlur(scroll) : null, canScrollLeft ? (_jsx(ScrollLeftButton, { className: style(buttonStyle(isBottom), isArrowPadded ? 'left-1' : 'left-0'), onClick: scrollLeft })) : null, canScrollRight ? (_jsx(ScrollRightButton, { className: style(buttonStyle(isBottom), isArrowPadded ? 'right-1' : 'right-0'), onClick: scrollRight })) : null] }));
|
|
10
10
|
});
|
|
11
11
|
const renderBlur = (scroll) => (_jsxs("div", { children: [scroll.canScrollLeft ? (_jsx("div", { className: style(blurBaseStyle, 'left-0 bg-opacity-from-white group-data-secondary:bg-none') })) : null, scroll.canScrollRight ? (_jsx("div", { className: style(blurBaseStyle, 'right-0 bg-opacity-to-white group-data-secondary:bg-none') })) : null] }));
|
|
12
|
+
const buttonStyle = (isBottom = false) => style('absolute z-40', isBottom ? 'bottom-[56px]' : 'top-[calc(50%-24px)]');
|
|
12
13
|
//# sourceMappingURL=SwipeListScrollButtons.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwipeListScrollButtons.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListScrollButtons.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAIhF,MAAM,
|
|
1
|
+
{"version":3,"file":"SwipeListScrollButtons.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListScrollButtons.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAIhF,MAAM,aAAa,GAAG,wEAAwE,CAAC;AAS/F,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CACvC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAE;IACzD,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;IAC1E,MAAM,aAAa,GAAG,YAAY,IAAI,CAA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time";
|
|
2
|
+
import { style } from '../../utils/style.js';
|
|
3
|
+
const activeDotStyles = {
|
|
4
|
+
'horizontal-list': 'w-6',
|
|
5
|
+
'vertical-list': 'h-6',
|
|
6
|
+
};
|
|
7
|
+
const dotStyle = 'cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white';
|
|
8
|
+
const inactiveDotStyle = 'w-2 h-2 opacity-30';
|
|
9
|
+
export const renderDotButton = ({ activeIndex, onClick, listType = 'horizontal-list' }) => (_, idx) => (_jsx("div", { className: style(dotStyle, idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle), role: "button", "aria-hidden": true, onClick: () => onClick(idx) }, String(idx)));
|
|
10
|
+
//# sourceMappingURL=renderDotButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderDotButton.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/renderDotButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAI1C,MAAM,eAAe,GAAyC;IAC5D,iBAAiB,EAAE,KAAK;IACxB,eAAe,EAAE,KAAK;CACvB,CAAC;AAEF,MAAM,QAAQ,GACZ,yGAAyG,CAAC;AAE5G,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAE9C,MAAM,CAAC,MAAM,eAAe,GAC1B,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,GAAG,iBAAiB,EAAW,EAAE,EAAE,CACpE,CAAC,CAAM,EAAE,GAAW,EAAE,EAAE,CACtB,CACE,cAEE,SAAS,EAAE,KAAK,CACd,QAAQ,EACR,GAAG,KAAK,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,gBAAgB,CACnE,EACD,IAAI,EAAC,QAAQ,uBAEb,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,IAPtB,MAAM,CAAC,GAAG,CAAC,CAQhB,CACH,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { style } from '../../utils/style.js';
|
|
3
|
+
export const renderNavButton = ({ activeIndex, onClick }) => (nav, i) => {
|
|
4
|
+
const isActive = i === activeIndex;
|
|
5
|
+
const btnClassName = isActive
|
|
6
|
+
? 'min-w-[350px] bg-white shadow-dark-blue border-none p-6'
|
|
7
|
+
: 'min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur';
|
|
8
|
+
const btnTitleClassName = isActive
|
|
9
|
+
? 'text-primary-text text-h6 py-xs'
|
|
10
|
+
: 'text-l pb-2xs text-secondary-text group-data-secondary:text-white';
|
|
11
|
+
const btnDescClassName = isActive ? 'text-l' : 'text-m group-data-secondary:text-white/80';
|
|
12
|
+
return (_jsxs("button", { type: "button", onClick: () => onClick(i), "aria-label": nav?.title, className: style('max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap', btnClassName), children: [_jsx("div", { className: btnTitleClassName, children: nav?.title }), _jsx("div", { className: style('text-secondary-text font-light', btnDescClassName), children: nav?.description })] }, String(i)));
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=renderNavButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderNavButton.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/renderNavButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C,MAAM,CAAC,MAAM,eAAe,GAC1B,CAAC,EAAE,WAAW,EAAE,OAAO,EAAW,EAAE,EAAE,CACtC,CAAC,GAAkB,EAAE,CAAS,EAAE,EAAE;IAChC,MAAM,QAAQ,GAAG,CAAC,KAAK,WAAW,CAAC;IACnC,MAAM,YAAY,GAAG,QAAQ;QAC3B,CAAC,CAAC,yDAAyD;QAC3D,CAAC,CAAC,2EAA2E,CAAC;IAChF,MAAM,iBAAiB,GAAG,QAAQ;QAChC,CAAC,CAAC,iCAAiC;QACnC,CAAC,CAAC,mEAAmE,CAAC;IACxE,MAAM,gBAAgB,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,2CAA2C,CAAC;IAE3F,OAAO,CACL,kBACE,IAAI,EAAC,QAAQ,EAEb,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,gBACb,GAAG,EAAE,KAAK,EACtB,SAAS,EAAE,KAAK,CACd,iKAAiK,EACjK,YAAY,CACb,aAED,cAAK,SAAS,EAAE,iBAAiB,YAAG,GAAG,EAAE,KAAK,GAAO,EACrD,cAAK,SAAS,EAAE,KAAK,CAAC,gCAAgC,EAAE,gBAAgB,CAAC,YACtE,GAAG,EAAE,WAAW,GACb,KAXD,MAAM,CAAC,CAAC,CAAC,CAYP,CACV,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -11,7 +11,7 @@ export const useSwipeListScroll = ({ itemCount, onVisibleIndicesChange, }) => {
|
|
|
11
11
|
const handleVisibleIndicesChange = useCallback((indices) => {
|
|
12
12
|
setVisibleIndices((prevIndices) => areArraysEqual(prevIndices, indices) ? prevIndices : indices);
|
|
13
13
|
onVisibleIndicesChange && onVisibleIndicesChange(indices);
|
|
14
|
-
}, [
|
|
14
|
+
}, [onVisibleIndicesChange]);
|
|
15
15
|
const [minIndex, maxIndex] = visibleIndices.length
|
|
16
16
|
? [minBy()(visibleIndices), maxBy()(visibleIndices)]
|
|
17
17
|
: [-1, -1];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSwipeListScroll.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/useSwipeListScroll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,6BAA6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