@redneckz/wildless-cms-uni-blocks 0.14.291 → 0.14.293
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.293.js +40 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +210 -210
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +5 -4
- package/bundle/components/DepositFiltration/DepositFiltrationContent.d.ts +3 -2
- package/bundle/components/MortgageFiltration/MortgageFiltrationContent.d.ts +3 -2
- package/bundle/data/SitemapData.d.ts +12 -3
- package/bundle/ui-kit/BaseFiltration/BaseFiltrationContent.d.ts +28 -68
- package/bundle/ui-kit/BaseFiltration/FilteredBlocks.d.ts +8 -0
- package/bundle/ui-kit/BaseFiltration/FiltrationForm.d.ts +4 -3
- package/bundle/ui-kit/BaseFiltration/FiltrationSchemaContent.d.ts +62 -0
- package/bundle/ui-kit/BaseFiltration/renderCarouselBlocks.d.ts +6 -0
- package/bundle/ui-kit/BaseFiltration/renderGridBlocks.d.ts +10 -0
- package/bundle/ui-kit/BaseFiltration/useFiltrationForm.d.ts +7 -5
- package/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +2 -2
- package/bundle/ui-kit/NotFound/NotFound.d.ts +2 -2
- package/bundle/utils/dataAttributes.d.ts +2 -2
- package/dist/api/LeadServiceAPI.js +2 -1
- package/dist/api/LeadServiceAPI.js.map +1 -1
- package/dist/components/BankAccountFiltration/BankAccountFiltration.js +6 -23
- package/dist/components/BankAccountFiltration/BankAccountFiltration.js.map +1 -1
- package/dist/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +5 -4
- package/dist/components/DepositFiltration/DepositFiltration.js +2 -2
- package/dist/components/DepositFiltration/DepositFiltration.js.map +1 -1
- package/dist/components/DepositFiltration/DepositFiltrationContent.d.ts +3 -2
- package/dist/components/Footer/Footer.mobile.js +1 -1
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Footer/LinkList.js +5 -3
- package/dist/components/Footer/LinkList.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.js +6 -3
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/MortgageFiltration/MortgageFiltration.js +4 -4
- package/dist/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
- package/dist/components/MortgageFiltration/MortgageFiltrationContent.d.ts +3 -2
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.js +2 -2
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/dist/data/SitemapData.d.ts +12 -3
- package/dist/ui-kit/BaseFiltration/BaseFiltrationContent.d.ts +28 -68
- package/dist/ui-kit/BaseFiltration/FilteredBlocks.d.ts +8 -0
- package/dist/ui-kit/BaseFiltration/FilteredBlocks.js +19 -0
- package/dist/ui-kit/BaseFiltration/FilteredBlocks.js.map +1 -0
- package/dist/ui-kit/BaseFiltration/FiltrationForm.d.ts +4 -3
- package/dist/ui-kit/BaseFiltration/FiltrationForm.js +2 -6
- package/dist/ui-kit/BaseFiltration/FiltrationForm.js.map +1 -1
- package/dist/ui-kit/BaseFiltration/FiltrationSchemaContent.d.ts +62 -0
- package/dist/ui-kit/BaseFiltration/FiltrationSchemaContent.js +2 -0
- package/dist/ui-kit/BaseFiltration/FiltrationSchemaContent.js.map +1 -0
- package/dist/ui-kit/BaseFiltration/renderCarouselBlocks.d.ts +6 -0
- package/dist/ui-kit/BaseFiltration/renderCarouselBlocks.js +15 -0
- package/dist/ui-kit/BaseFiltration/renderCarouselBlocks.js.map +1 -0
- package/dist/ui-kit/BaseFiltration/renderGridBlocks.d.ts +10 -0
- package/dist/ui-kit/BaseFiltration/renderGridBlocks.js +20 -0
- package/dist/ui-kit/BaseFiltration/renderGridBlocks.js.map +1 -0
- package/dist/ui-kit/BaseFiltration/useFiltrationForm.d.ts +7 -5
- package/dist/ui-kit/BaseFiltration/useFiltrationForm.js +3 -7
- package/dist/ui-kit/BaseFiltration/useFiltrationForm.js.map +1 -1
- package/dist/ui-kit/LocationDialog/LocationDialog.d.ts +2 -2
- package/dist/ui-kit/LocationDialog/LocationDialog.js +2 -2
- package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/dist/ui-kit/NotFound/NotFound.d.ts +2 -2
- package/dist/ui-kit/NotFound/NotFound.js.map +1 -1
- package/dist/utils/dataAttributes.d.ts +2 -2
- package/dist/utils/dataAttributes.js +3 -0
- package/dist/utils/dataAttributes.js.map +1 -1
- package/dist/utils/formatDate.js +1 -1
- package/dist/utils/formatDate.js.map +1 -1
- package/lib/api/LeadServiceAPI.js +2 -1
- package/lib/api/LeadServiceAPI.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/BankAccountFiltration/BankAccountFiltration.fixture.d.ts +1 -0
- package/lib/components/BankAccountFiltration/BankAccountFiltration.fixture.mobile.d.ts +1 -0
- package/lib/components/BankAccountFiltration/BankAccountFiltration.js +6 -23
- package/lib/components/BankAccountFiltration/BankAccountFiltration.js.map +1 -1
- package/lib/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +5 -4
- package/lib/components/DepositFiltration/DepositFiltration.fixture.d.ts +1 -0
- package/lib/components/DepositFiltration/DepositFiltration.fixture.mobile.d.ts +1 -0
- package/lib/components/DepositFiltration/DepositFiltration.js +2 -2
- package/lib/components/DepositFiltration/DepositFiltration.js.map +1 -1
- package/lib/components/DepositFiltration/DepositFiltrationContent.d.ts +3 -2
- package/lib/components/Footer/Footer.mobile.js +1 -1
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Footer/LinkList.js +5 -3
- package/lib/components/Footer/LinkList.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.js +6 -3
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/MortgageFiltration/MortgageFiltration.fixture.d.ts +1 -0
- package/lib/components/MortgageFiltration/MortgageFiltration.fixture.mobile.d.ts +1 -0
- package/lib/components/MortgageFiltration/MortgageFiltration.js +4 -4
- package/lib/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
- package/lib/components/MortgageFiltration/MortgageFiltrationContent.d.ts +3 -2
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.js +2 -2
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/lib/data/SitemapData.d.ts +12 -3
- package/lib/ui-kit/BaseFiltration/BaseFiltrationContent.d.ts +28 -68
- package/lib/ui-kit/BaseFiltration/FilteredBlocks.d.ts +8 -0
- package/lib/ui-kit/BaseFiltration/FilteredBlocks.js +17 -0
- package/lib/ui-kit/BaseFiltration/FilteredBlocks.js.map +1 -0
- package/lib/ui-kit/BaseFiltration/FiltrationForm.d.ts +4 -3
- package/lib/ui-kit/BaseFiltration/FiltrationForm.js +2 -6
- package/lib/ui-kit/BaseFiltration/FiltrationForm.js.map +1 -1
- package/lib/ui-kit/BaseFiltration/FiltrationSchemaContent.d.ts +62 -0
- package/lib/ui-kit/BaseFiltration/FiltrationSchemaContent.js +2 -0
- package/lib/ui-kit/BaseFiltration/FiltrationSchemaContent.js.map +1 -0
- package/lib/ui-kit/BaseFiltration/renderCarouselBlocks.d.ts +5 -0
- package/lib/ui-kit/BaseFiltration/renderCarouselBlocks.js +12 -0
- package/lib/ui-kit/BaseFiltration/renderCarouselBlocks.js.map +1 -0
- package/lib/ui-kit/BaseFiltration/renderGridBlocks.d.ts +9 -0
- package/lib/ui-kit/BaseFiltration/renderGridBlocks.js +17 -0
- package/lib/ui-kit/BaseFiltration/renderGridBlocks.js.map +1 -0
- package/lib/ui-kit/BaseFiltration/useFiltrationForm.d.ts +7 -5
- package/lib/ui-kit/BaseFiltration/useFiltrationForm.js +3 -7
- package/lib/ui-kit/BaseFiltration/useFiltrationForm.js.map +1 -1
- package/lib/ui-kit/LocationDialog/LocationDialog.d.ts +2 -2
- package/lib/ui-kit/LocationDialog/LocationDialog.js +2 -2
- package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/lib/ui-kit/NotFound/NotFound.d.ts +2 -2
- package/lib/ui-kit/NotFound/NotFound.js.map +1 -1
- package/lib/utils/dataAttributes.d.ts +2 -2
- package/lib/utils/dataAttributes.js +3 -0
- package/lib/utils/dataAttributes.js.map +1 -1
- package/lib/utils/formatDate.js +1 -1
- package/lib/utils/formatDate.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +213 -213
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +5 -4
- package/mobile/bundle/components/DepositFiltration/DepositFiltrationContent.d.ts +3 -2
- package/mobile/bundle/components/MortgageFiltration/MortgageFiltrationContent.d.ts +3 -2
- package/mobile/bundle/data/SitemapData.d.ts +12 -3
- package/mobile/bundle/ui-kit/BaseFiltration/BaseFiltrationContent.d.ts +28 -68
- package/mobile/bundle/ui-kit/BaseFiltration/FilteredBlocks.d.ts +8 -0
- package/mobile/bundle/ui-kit/BaseFiltration/FiltrationForm.d.ts +4 -3
- package/mobile/bundle/ui-kit/BaseFiltration/FiltrationSchemaContent.d.ts +62 -0
- package/mobile/bundle/ui-kit/BaseFiltration/renderCarouselBlocks.d.ts +6 -0
- package/mobile/bundle/ui-kit/BaseFiltration/renderGridBlocks.d.ts +10 -0
- package/mobile/bundle/ui-kit/BaseFiltration/useFiltrationForm.d.ts +7 -5
- package/mobile/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +2 -2
- package/mobile/bundle/ui-kit/NotFound/NotFound.d.ts +2 -2
- package/mobile/bundle/utils/dataAttributes.d.ts +2 -2
- package/mobile/dist/api/LeadServiceAPI.js +2 -1
- package/mobile/dist/api/LeadServiceAPI.js.map +1 -1
- package/mobile/dist/components/BankAccountFiltration/BankAccountFiltration.js +6 -23
- package/mobile/dist/components/BankAccountFiltration/BankAccountFiltration.js.map +1 -1
- package/mobile/dist/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +5 -4
- package/mobile/dist/components/DepositFiltration/DepositFiltration.js +2 -2
- package/mobile/dist/components/DepositFiltration/DepositFiltration.js.map +1 -1
- package/mobile/dist/components/DepositFiltration/DepositFiltrationContent.d.ts +3 -2
- package/mobile/dist/components/Footer/Footer.js +1 -1
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Footer/LinkList.js +5 -3
- package/mobile/dist/components/Footer/LinkList.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +6 -3
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/MortgageFiltration/MortgageFiltration.js +4 -4
- package/mobile/dist/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
- package/mobile/dist/components/MortgageFiltration/MortgageFiltrationContent.d.ts +3 -2
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js +2 -2
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/mobile/dist/data/SitemapData.d.ts +12 -3
- package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationContent.d.ts +28 -68
- package/mobile/dist/ui-kit/BaseFiltration/FilteredBlocks.d.ts +8 -0
- package/mobile/dist/ui-kit/BaseFiltration/FilteredBlocks.js +19 -0
- package/mobile/dist/ui-kit/BaseFiltration/FilteredBlocks.js.map +1 -0
- package/mobile/dist/ui-kit/BaseFiltration/FiltrationForm.d.ts +4 -3
- package/mobile/dist/ui-kit/BaseFiltration/FiltrationForm.js +2 -6
- package/mobile/dist/ui-kit/BaseFiltration/FiltrationForm.js.map +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/FiltrationSchemaContent.d.ts +62 -0
- package/mobile/dist/ui-kit/BaseFiltration/FiltrationSchemaContent.js +2 -0
- package/mobile/dist/ui-kit/BaseFiltration/FiltrationSchemaContent.js.map +1 -0
- package/mobile/dist/ui-kit/BaseFiltration/renderCarouselBlocks.d.ts +6 -0
- package/mobile/dist/ui-kit/BaseFiltration/renderCarouselBlocks.js +15 -0
- package/mobile/dist/ui-kit/BaseFiltration/renderCarouselBlocks.js.map +1 -0
- package/mobile/dist/ui-kit/BaseFiltration/renderGridBlocks.d.ts +10 -0
- package/mobile/dist/ui-kit/BaseFiltration/renderGridBlocks.js +20 -0
- package/mobile/dist/ui-kit/BaseFiltration/renderGridBlocks.js.map +1 -0
- package/mobile/dist/ui-kit/BaseFiltration/useFiltrationForm.d.ts +7 -5
- package/mobile/dist/ui-kit/BaseFiltration/useFiltrationForm.js +3 -7
- package/mobile/dist/ui-kit/BaseFiltration/useFiltrationForm.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.d.ts +2 -2
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +2 -2
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/dist/ui-kit/NotFound/NotFound.d.ts +2 -2
- package/mobile/dist/ui-kit/NotFound/NotFound.js.map +1 -1
- package/mobile/dist/utils/dataAttributes.d.ts +2 -2
- package/mobile/dist/utils/dataAttributes.js +3 -0
- package/mobile/dist/utils/dataAttributes.js.map +1 -1
- package/mobile/dist/utils/formatDate.js +1 -1
- package/mobile/dist/utils/formatDate.js.map +1 -1
- package/mobile/lib/api/LeadServiceAPI.js +2 -1
- package/mobile/lib/api/LeadServiceAPI.js.map +1 -1
- package/mobile/lib/components/BankAccountFiltration/BankAccountFiltration.js +6 -23
- package/mobile/lib/components/BankAccountFiltration/BankAccountFiltration.js.map +1 -1
- package/mobile/lib/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +5 -4
- package/mobile/lib/components/DepositFiltration/DepositFiltration.js +2 -2
- package/mobile/lib/components/DepositFiltration/DepositFiltration.js.map +1 -1
- package/mobile/lib/components/DepositFiltration/DepositFiltrationContent.d.ts +3 -2
- package/mobile/lib/components/Footer/Footer.js +1 -1
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Footer/LinkList.js +5 -3
- package/mobile/lib/components/Footer/LinkList.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +6 -3
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/MortgageFiltration/MortgageFiltration.js +4 -4
- package/mobile/lib/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
- package/mobile/lib/components/MortgageFiltration/MortgageFiltrationContent.d.ts +3 -2
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js +2 -2
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/mobile/lib/data/SitemapData.d.ts +12 -3
- package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationContent.d.ts +28 -68
- package/mobile/lib/ui-kit/BaseFiltration/FilteredBlocks.d.ts +8 -0
- package/mobile/lib/ui-kit/BaseFiltration/FilteredBlocks.js +17 -0
- package/mobile/lib/ui-kit/BaseFiltration/FilteredBlocks.js.map +1 -0
- package/mobile/lib/ui-kit/BaseFiltration/FiltrationForm.d.ts +4 -3
- package/mobile/lib/ui-kit/BaseFiltration/FiltrationForm.js +2 -6
- package/mobile/lib/ui-kit/BaseFiltration/FiltrationForm.js.map +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/FiltrationSchemaContent.d.ts +62 -0
- package/mobile/lib/ui-kit/BaseFiltration/FiltrationSchemaContent.js +2 -0
- package/mobile/lib/ui-kit/BaseFiltration/FiltrationSchemaContent.js.map +1 -0
- package/mobile/lib/ui-kit/BaseFiltration/renderCarouselBlocks.d.ts +6 -0
- package/mobile/lib/ui-kit/BaseFiltration/renderCarouselBlocks.js +12 -0
- package/mobile/lib/ui-kit/BaseFiltration/renderCarouselBlocks.js.map +1 -0
- package/mobile/lib/ui-kit/BaseFiltration/renderGridBlocks.d.ts +10 -0
- package/mobile/lib/ui-kit/BaseFiltration/renderGridBlocks.js +17 -0
- package/mobile/lib/ui-kit/BaseFiltration/renderGridBlocks.js.map +1 -0
- package/mobile/lib/ui-kit/BaseFiltration/useFiltrationForm.d.ts +7 -5
- package/mobile/lib/ui-kit/BaseFiltration/useFiltrationForm.js +3 -7
- package/mobile/lib/ui-kit/BaseFiltration/useFiltrationForm.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.d.ts +2 -2
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +2 -2
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/lib/ui-kit/NotFound/NotFound.d.ts +2 -2
- package/mobile/lib/ui-kit/NotFound/NotFound.js.map +1 -1
- package/mobile/lib/utils/dataAttributes.d.ts +2 -2
- package/mobile/lib/utils/dataAttributes.js +3 -0
- package/mobile/lib/utils/dataAttributes.js.map +1 -1
- package/mobile/lib/utils/formatDate.js +1 -1
- package/mobile/lib/utils/formatDate.js.map +1 -1
- package/mobile/src/api/LeadServiceAPI.ts +2 -1
- package/mobile/src/components/BankAccountFiltration/BankAccountFiltration.example.json +13 -12
- package/mobile/src/components/BankAccountFiltration/BankAccountFiltration.tsx +16 -43
- package/mobile/src/components/BankAccountFiltration/BankAccountFiltration.ui.json +7 -1
- package/mobile/src/components/BankAccountFiltration/BankAccountFiltrationContent.ts +5 -7
- package/mobile/src/components/DepositFiltration/DepositFiltration.example.json +2 -1
- package/mobile/src/components/DepositFiltration/DepositFiltration.tsx +2 -2
- package/mobile/src/components/DepositFiltration/DepositFiltration.ui.json +7 -1
- package/mobile/src/components/DepositFiltration/DepositFiltrationContent.ts +3 -3
- package/mobile/src/components/Footer/Footer.tsx +1 -1
- package/mobile/src/components/Footer/LinkList.tsx +10 -9
- package/mobile/src/components/Header/Header.example.json +0 -1
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +23 -19
- package/mobile/src/components/MortgageFiltration/MortgageFiltration.example.json +2 -1
- package/mobile/src/components/MortgageFiltration/MortgageFiltration.tsx +9 -8
- package/mobile/src/components/MortgageFiltration/MortgageFiltration.ui.json +7 -1
- package/mobile/src/components/MortgageFiltration/MortgageFiltrationContent.ts +3 -5
- package/mobile/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +2 -2
- package/mobile/src/data/SitemapData.ts +13 -3
- package/mobile/src/ui-kit/BaseFiltration/BaseFiltrationContent.ts +31 -74
- package/mobile/src/ui-kit/BaseFiltration/FilteredBlocks.tsx +37 -0
- package/mobile/src/ui-kit/BaseFiltration/FiltrationForm.tsx +6 -16
- package/mobile/src/ui-kit/BaseFiltration/FiltrationSchemaContent.ts +66 -0
- package/mobile/src/ui-kit/BaseFiltration/renderCarouselBlocks.tsx +31 -0
- package/mobile/src/ui-kit/BaseFiltration/renderGridBlocks.tsx +55 -0
- package/mobile/src/ui-kit/BaseFiltration/useFiltrationForm.ts +9 -16
- package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +4 -4
- package/mobile/src/ui-kit/NotFound/NotFound.tsx +2 -2
- package/mobile/src/utils/dataAttributes.ts +4 -0
- package/mobile/src/utils/formatDate.ts +1 -1
- package/package.json +1 -1
- package/src/api/LeadServiceAPI.ts +2 -1
- package/src/components/BankAccountFiltration/BankAccountFiltration.example.json +13 -12
- package/src/components/BankAccountFiltration/BankAccountFiltration.fixture.mobile.tsx +53 -29
- package/src/components/BankAccountFiltration/BankAccountFiltration.fixture.tsx +53 -29
- package/src/components/BankAccountFiltration/BankAccountFiltration.tsx +16 -43
- package/src/components/BankAccountFiltration/BankAccountFiltration.ui.json +7 -1
- package/src/components/BankAccountFiltration/BankAccountFiltrationContent.ts +5 -7
- package/src/components/DepositFiltration/DepositFiltration.example.json +2 -1
- package/src/components/DepositFiltration/DepositFiltration.fixture.mobile.tsx +103 -64
- package/src/components/DepositFiltration/DepositFiltration.fixture.tsx +91 -53
- package/src/components/DepositFiltration/DepositFiltration.tsx +2 -2
- package/src/components/DepositFiltration/DepositFiltration.ui.json +7 -1
- package/src/components/DepositFiltration/DepositFiltrationContent.ts +3 -3
- package/src/components/Footer/Footer.mobile.tsx +1 -1
- package/src/components/Footer/LinkList.tsx +10 -9
- package/src/components/Header/Header.example.json +0 -1
- package/src/components/Header/HeaderSecondaryMenu.tsx +23 -19
- package/src/components/MortgageFiltration/MortgageFiltration.example.json +2 -1
- package/src/components/MortgageFiltration/MortgageFiltration.fixture.mobile.tsx +67 -46
- package/src/components/MortgageFiltration/MortgageFiltration.fixture.tsx +67 -46
- package/src/components/MortgageFiltration/MortgageFiltration.tsx +9 -8
- package/src/components/MortgageFiltration/MortgageFiltration.ui.json +7 -1
- package/src/components/MortgageFiltration/MortgageFiltrationContent.ts +3 -5
- package/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +2 -2
- package/src/data/SitemapData.ts +13 -3
- package/src/ui-kit/BaseFiltration/BaseFiltrationContent.ts +31 -74
- package/src/ui-kit/BaseFiltration/FilteredBlocks.tsx +37 -0
- package/src/ui-kit/BaseFiltration/FiltrationForm.tsx +6 -16
- package/src/ui-kit/BaseFiltration/FiltrationSchemaContent.ts +66 -0
- package/src/ui-kit/BaseFiltration/renderCarouselBlocks.tsx +31 -0
- package/src/ui-kit/BaseFiltration/renderGridBlocks.tsx +55 -0
- package/src/ui-kit/BaseFiltration/useFiltrationForm.ts +9 -16
- package/src/ui-kit/LocationDialog/LocationDialog.tsx +4 -4
- package/src/ui-kit/NotFound/NotFound.tsx +2 -2
- package/src/utils/dataAttributes.ts +4 -0
- package/src/utils/formatDate.ts +1 -1
- package/bundle/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +0 -8
- package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +0 -8
- package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +0 -23
- package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +0 -1
- package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +0 -8
- package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +0 -21
- package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +0 -1
- package/mobile/bundle/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +0 -8
- package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +0 -8
- package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +0 -23
- package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +0 -1
- package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +0 -8
- package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +0 -21
- package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +0 -1
- package/mobile/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +0 -64
- package/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +0 -64
|
@@ -476,6 +476,9 @@
|
|
|
476
476
|
}
|
|
477
477
|
|
|
478
478
|
const getAspectsAttributes = (data) => {
|
|
479
|
+
if (!Array.isArray(data) || !data.length) {
|
|
480
|
+
return {};
|
|
481
|
+
}
|
|
479
482
|
try {
|
|
480
483
|
return {
|
|
481
484
|
'data-aspects': JSON.stringify(data),
|
|
@@ -832,6 +835,18 @@
|
|
|
832
835
|
});
|
|
833
836
|
const randomNumber = (min = 0, max = 0) => Math.floor(Math.random() * (max - min) + min);
|
|
834
837
|
|
|
838
|
+
const formatDate = (date, toTimeStamp = false) => {
|
|
839
|
+
if (typeof date === 'string') {
|
|
840
|
+
return date.split('-').reverse().join('.');
|
|
841
|
+
}
|
|
842
|
+
else {
|
|
843
|
+
const day = String(date.getDate()).padStart(2, '0');
|
|
844
|
+
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
845
|
+
const year = String(date.getFullYear());
|
|
846
|
+
return toTimeStamp ? `${year}-${month}-${day}` : `${day}.${month}.${year}`;
|
|
847
|
+
}
|
|
848
|
+
};
|
|
849
|
+
|
|
835
850
|
const formatPhone = (phone) => phone?.replace(/[^+\d]/g, '');
|
|
836
851
|
|
|
837
852
|
function LeadServiceAPI() {
|
|
@@ -844,7 +859,7 @@
|
|
|
844
859
|
...getRegion$1(region, isNaturalPerson),
|
|
845
860
|
...getEmail(email, isNaturalPerson),
|
|
846
861
|
...getPhone(phone),
|
|
847
|
-
...(isNaturalPerson ? { birthday: birthday
|
|
862
|
+
...(isNaturalPerson ? { birthday: formatDate(birthday) } : { inn, fullName }),
|
|
848
863
|
...(typeForm === 'FEEDBACK'
|
|
849
864
|
? {}
|
|
850
865
|
: {
|
|
@@ -1064,18 +1079,6 @@
|
|
|
1064
1079
|
return [value, { setValue, setTrue, setFalse, toggle }];
|
|
1065
1080
|
}
|
|
1066
1081
|
|
|
1067
|
-
const formatDate = (date, toTimeStamp = false) => {
|
|
1068
|
-
if (typeof date === 'string') {
|
|
1069
|
-
return date.split('-').reverse().join('.');
|
|
1070
|
-
}
|
|
1071
|
-
else {
|
|
1072
|
-
const day = String(date.getDate()).padStart(2, '0');
|
|
1073
|
-
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
1074
|
-
const year = toTimeStamp ? String(date.getFullYear()) : String(date.getFullYear()).slice(-2);
|
|
1075
|
-
return toTimeStamp ? `${year}-${month}-${day}` : `${day}.${month}.${year}`;
|
|
1076
|
-
}
|
|
1077
|
-
};
|
|
1078
|
-
|
|
1079
1082
|
const renderLabel = (label) => label ? (jsx(Text, { size: "text-m", color: "text-primary-text", font: "font-light", children: label })) : null;
|
|
1080
1083
|
|
|
1081
1084
|
const Input = JSX(({ key, className = '', id, name, type = 'text', label, placeholder, value = '', valid = true, children, onChange, onFocus, onBlur, pattern, autoFocus = false, isTextarea = false, }) => {
|
|
@@ -1900,109 +1903,10 @@
|
|
|
1900
1903
|
: _ === (dataValue?.key ?? dataValue);
|
|
1901
1904
|
}));
|
|
1902
1905
|
|
|
1903
|
-
const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
|
|
1904
|
-
|
|
1905
|
-
const SlideCheckboxGroup = JSX(({ value, onChange, items = [], multiple }) => {
|
|
1906
|
-
const handleChange = (newValue) => {
|
|
1907
|
-
if (!onChange) {
|
|
1908
|
-
return;
|
|
1909
|
-
}
|
|
1910
|
-
const hasAlready = value?.includes(newValue);
|
|
1911
|
-
if (multiple) {
|
|
1912
|
-
onChange(hasAlready ? (value || []).filter((v) => v !== newValue) : [...(value || []), newValue]);
|
|
1913
|
-
}
|
|
1914
|
-
else {
|
|
1915
|
-
onChange(hasAlready ? [] : [newValue]);
|
|
1916
|
-
}
|
|
1917
|
-
};
|
|
1918
|
-
return items.map((item) => (jsx(SlideCheckbox, { text: item?.title, value: [value].flatMap((_) => _).includes(item.value), onChange: () => handleChange(item.value), type: multiple ? 'checkbox' : 'radio' }, item.value)));
|
|
1919
|
-
});
|
|
1920
|
-
|
|
1921
|
-
const FiltrationForm = JSX(({ children, filtrationSchema, resetButton, field, reset }) => (jsxs("form", { className: "flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0", children: [jsxs("div", { className: "flex flex-col @4xl:flex-row gap-xl", children: [children, joinList(jsx("div", { className: "h-full w-px bg-gray" }))(
|
|
1922
|
-
// TS can't correctly refine array's type after filter
|
|
1923
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
1924
|
-
Object.entries(filtrationSchema).map(renderFormItem(field)).filter(Boolean))] }), resetButton ? (jsx("div", { children: jsx(Button, { type: "reset", className: "w-full @4xl:w-56 @4xl:ml-s", onClick: reset, children: resetButton?.text }) })) : null] })));
|
|
1925
|
-
const renderFormItem = (field) => ([key, item]) => {
|
|
1926
|
-
const type = item?.type;
|
|
1927
|
-
switch (type) {
|
|
1928
|
-
case 'array':
|
|
1929
|
-
return renderArrayFormItem(key, field)(item);
|
|
1930
|
-
default:
|
|
1931
|
-
return null;
|
|
1932
|
-
}
|
|
1933
|
-
};
|
|
1934
|
-
const renderArrayFormItem = (key, field) => (item) => item?.ui !== 'dropdown' ? renderCheckboxes(key, field)(item) : null;
|
|
1935
|
-
const renderCheckboxes = (key, field) => (item) => {
|
|
1936
|
-
const options = item?.items?.enum?.map((e, i) => ({ value: e, title: item?.items?.enumNames?.[i] || '' })) ||
|
|
1937
|
-
[];
|
|
1938
|
-
return (jsxs("div", { className: "flex-1", children: [item?.title ? (jsx("div", { className: "mb-m", children: jsx(Text, { size: "text-m", font: "font-medium", color: "text-primary-text", children: item.title }) })) : null, jsx(SlideCheckboxGroup, { items: options, multiple: !item?.single, ...field(key) })] }, key));
|
|
1939
|
-
};
|
|
1940
|
-
|
|
1941
|
-
function zip(firstCol, ...restCols) {
|
|
1942
|
-
return firstCol.map((firstEl, rowIndex) => [firstEl, ...restCols.map((col) => col[rowIndex])]);
|
|
1943
|
-
}
|
|
1944
|
-
|
|
1945
|
-
const isEmpty = (v) => v === null ||
|
|
1946
|
-
v === undefined ||
|
|
1947
|
-
v === '' ||
|
|
1948
|
-
(Array.isArray(v) && v.length === 0) ||
|
|
1949
|
-
(typeof v === 'object' && Object.keys(v).length === 0);
|
|
1950
|
-
|
|
1951
|
-
const isSingularFieldMatch = (key, pattern) => (target) => isEmpty(pattern[key]) || isEmpty(target[key]) || pattern[key] === target[key];
|
|
1952
|
-
const isMultipleFieldMatch = (key, pattern) => (target) => isEmpty(pattern[key]) ||
|
|
1953
|
-
isEmpty(target[key]) ||
|
|
1954
|
-
pattern[key]?.every((_) => target[key]?.includes(_));
|
|
1955
|
-
const isNumberFieldMatch = (key, pattern) => (target) => isEmpty(pattern[key]) ||
|
|
1956
|
-
isEmpty(target[key]) ||
|
|
1957
|
-
naturalNumber(pattern[key]) <= naturalNumber(target[key]);
|
|
1958
|
-
const isMultipleNumberFieldMatch = (key, pattern) => (target) => isEmpty(pattern[key]) || isEmpty(target[key]) || target[key]?.includes(pattern[key]);
|
|
1959
|
-
const isValueInRange = (key, pattern) => (target) => isEmpty(pattern[key]) ||
|
|
1960
|
-
isEmpty(target[key]) ||
|
|
1961
|
-
(naturalNumber(pattern[key]?.min) >= naturalNumber(target[key]?.min) &&
|
|
1962
|
-
naturalNumber(pattern[key]?.min) <= naturalNumber(target[key]?.max));
|
|
1963
|
-
const targetMatchPattern = (pattern, target) => Object.entries(pattern)
|
|
1964
|
-
.map(([key, subPattern]) => {
|
|
1965
|
-
if (typeof subPattern === 'number') {
|
|
1966
|
-
return Array.isArray(target[key])
|
|
1967
|
-
? isMultipleNumberFieldMatch(key, pattern)
|
|
1968
|
-
: isNumberFieldMatch(key, pattern);
|
|
1969
|
-
}
|
|
1970
|
-
if (typeof subPattern === 'object' && 'min' in subPattern && 'max' in subPattern) {
|
|
1971
|
-
return isValueInRange(key, pattern);
|
|
1972
|
-
}
|
|
1973
|
-
return Array.isArray(subPattern)
|
|
1974
|
-
? isMultipleFieldMatch(key, pattern)
|
|
1975
|
-
: isSingularFieldMatch(key, pattern);
|
|
1976
|
-
})
|
|
1977
|
-
.every((predicate) => predicate(target));
|
|
1978
|
-
const naturalNumber = (n) => Number(n || 0);
|
|
1979
|
-
|
|
1980
|
-
const filterBlocks = (blocksWithProps, filtrationState) => (normalize = identity) => blocksWithProps
|
|
1981
|
-
?.filter(([, content]) => targetMatchPattern(filtrationState, normalize(content) || {}))
|
|
1982
|
-
.map(([block]) => block);
|
|
1983
|
-
|
|
1984
|
-
const useFiltrationForm = (initialFormState, { block, page, normalize = identity, }) => {
|
|
1985
|
-
const blocks = block?.blocks || [];
|
|
1986
|
-
const [filtrationState, { field, reset, update: replaceFiltrationState }] = useForm(initialFormState);
|
|
1987
|
-
const blocksWithProps = useMemo(() => zip(blocks, blocks.map((b) => resolveBlockProps(b.content, page?.fallback))), [blocks, page?.fallback]);
|
|
1988
|
-
const blocksToRender = filtrationState === initialFormState
|
|
1989
|
-
? blocks
|
|
1990
|
-
: filterBlocks(blocksWithProps, filtrationState)(normalize);
|
|
1991
|
-
return [
|
|
1992
|
-
filtrationState,
|
|
1993
|
-
{ blocksToRender, blocksWithProps },
|
|
1994
|
-
{ field, reset, update: replaceFiltrationState },
|
|
1995
|
-
];
|
|
1996
|
-
};
|
|
1997
|
-
|
|
1998
1906
|
const AlignStyles = 'text-left';
|
|
1999
1907
|
|
|
2000
1908
|
const NotFound = JSX(({ title, description }) => (jsxs("div", { className: "bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center", children: [jsx(Img, { image: { icon: 'MagnifierIcon', iconVersion: 'normal' }, width: "120", height: "120" }), jsx(Headline, { title: title, description: description, headlineVersion: "S", isEmbedded: true, align: AlignStyles })] })));
|
|
2001
1909
|
|
|
2002
|
-
const getBorderStyle = (showBorder = false) => showBorder
|
|
2003
|
-
? 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider'
|
|
2004
|
-
: '';
|
|
2005
|
-
|
|
2006
1910
|
const useCarouselControls = (props, initialIndex = 0) => {
|
|
2007
1911
|
const { itemCount, visibleItemCount } = props;
|
|
2008
1912
|
const [activeIndex, setActiveIndex] = useState(initialIndex);
|
|
@@ -2254,6 +2158,10 @@
|
|
|
2254
2158
|
|
|
2255
2159
|
const ITEMS_GAP = 16;
|
|
2256
2160
|
|
|
2161
|
+
const getBorderStyle = (showBorder = false) => showBorder
|
|
2162
|
+
? 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider'
|
|
2163
|
+
: '';
|
|
2164
|
+
|
|
2257
2165
|
const renderCardHighlight = ({ className, text = 'ХИТ' } = {}) => (jsxs("div", { className: style('w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black', className), children: [jsx(Icon, { iconVersion: "black", name: "HeartIcon", width: "24", height: "24" }), jsx(Paragraph, { size: "text-s", font: "font-normal", align: "text-center", color: "text-primary-text", children: text })] }));
|
|
2258
2166
|
|
|
2259
2167
|
const cardBaseStyle = 'relative h-full';
|
|
@@ -2317,31 +2225,191 @@
|
|
|
2317
2225
|
}),
|
|
2318
2226
|
});
|
|
2319
2227
|
|
|
2228
|
+
const renderCarouselBlocks = ({ blocksToRender, ...rest }) => (jsx(Carousel, { padding: "p-0", isEmbedded: true, itemCount: blocksToRender?.length, visibleItemCount: 0, isAlignCenter: true, isGap: false, children: renderBlocksList(blocksToRender, {
|
|
2229
|
+
...rest.options,
|
|
2230
|
+
parent: rest.block,
|
|
2231
|
+
renderProps: (block, options, i) => (jsx("div", { className: style('relative min-w-80', getBorderStyle(true)), children: renderBlock$1(block, options) }, String(i))),
|
|
2232
|
+
}) }));
|
|
2233
|
+
|
|
2234
|
+
const isOdd = (n) => n % 2 !== 0;
|
|
2235
|
+
|
|
2236
|
+
const TextWithIcon = JSX(({ textNode, iconNode, tag, onClick, justifyContent = 'between', className, role, ...rest }) => {
|
|
2237
|
+
const Tag = tag;
|
|
2238
|
+
return (jsxs(Tag, { tag: tag, className: style('flex items-center w-full gap-1', justifyContent === 'between' ? 'justify-between' : 'justify-center', className), onClick: onClick, role: role, ...rest, children: [textNode ? jsx("div", { children: textNode }) : null, iconNode ? jsx("div", { children: iconNode }) : null] }));
|
|
2239
|
+
});
|
|
2240
|
+
|
|
2241
|
+
const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', disabled = false, onClick }) => (jsx(TextWithIcon, { tag: "button", onClick: onClick, disabled: disabled, "data-theme": dataTheme, justifyContent: "center", role: "button", className: style('py-4 border border-transparent outline-none focus:border-primary-text space-x-s', disabled
|
|
2242
|
+
? 'bg-main-divider text-main-disabled hover:bg-main-divider'
|
|
2243
|
+
: 'bg-primary-main text-white hover:bg-primary-hove', className), textNode: jsx(Text, { size: "text-h4", children: label }), iconNode: icon ? (jsx(Img, { image: {
|
|
2244
|
+
icon,
|
|
2245
|
+
iconVersion: 'white',
|
|
2246
|
+
}, className: "my-auto", width: "20", height: "20" })) : null })));
|
|
2247
|
+
const renderDefaultFoldButton = ({ isUnfolded, onToggle }) => {
|
|
2248
|
+
const labels = ['Развернуть', 'Скрыть'];
|
|
2249
|
+
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
2250
|
+
return (jsx(DefaultFoldButton, { icon: icons[Number(isUnfolded)], label: labels[Number(isUnfolded)], onClick: onToggle }));
|
|
2251
|
+
};
|
|
2252
|
+
|
|
2253
|
+
const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
|
|
2254
|
+
const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
|
|
2255
|
+
const onToggle = useCallback(() => {
|
|
2256
|
+
setIsUnfolded((_) => !_);
|
|
2257
|
+
}, []);
|
|
2258
|
+
const sectionNode = renderFoldableSection({ isUnfolded, onToggle });
|
|
2259
|
+
const buttonNode = renderFoldButton ? renderFoldButton({ isUnfolded, onToggle }) : null;
|
|
2260
|
+
return isFoldButtonOnTop ? (jsxs("div", { className: className, role: "group", children: [buttonNode, sectionNode] })) : (jsxs("div", { className: className, role: "group", children: [sectionNode, buttonNode] }));
|
|
2261
|
+
});
|
|
2262
|
+
|
|
2263
|
+
function useResizeObserver(callback, deps) {
|
|
2264
|
+
const ref = useRef(null);
|
|
2265
|
+
useEffect(() => {
|
|
2266
|
+
const element = ref?.current;
|
|
2267
|
+
if (!element) {
|
|
2268
|
+
return undefined;
|
|
2269
|
+
}
|
|
2270
|
+
const observer = new ResizeObserver((entries) => {
|
|
2271
|
+
callback(element, entries[0]);
|
|
2272
|
+
});
|
|
2273
|
+
observer.observe(element);
|
|
2274
|
+
return () => {
|
|
2275
|
+
observer.disconnect();
|
|
2276
|
+
};
|
|
2277
|
+
}, [callback, ...deps]);
|
|
2278
|
+
return ref;
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
const FoldableSection = JSX(({ className = '', isUnfolded, children }) => {
|
|
2282
|
+
const containerRef = useRef(null);
|
|
2283
|
+
const childrenWrapperRef = useResizeObserver((childrenWrapperEl) => {
|
|
2284
|
+
if (containerRef.current) {
|
|
2285
|
+
containerRef.current.style.maxHeight = isUnfolded
|
|
2286
|
+
? `${childrenWrapperEl.scrollHeight}px`
|
|
2287
|
+
: '';
|
|
2288
|
+
}
|
|
2289
|
+
}, [isUnfolded]);
|
|
2290
|
+
return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} `, children: jsx("div", { className: className, ref: childrenWrapperRef, children: children }) }));
|
|
2291
|
+
});
|
|
2292
|
+
|
|
2293
|
+
const ICONS$1 = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
2294
|
+
const resultsGridStyle = 'space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs';
|
|
2295
|
+
const renderGridBlocks = ({ topItemsCount = 0, label = '', block, blocksToRender = [], ...rest }) => {
|
|
2296
|
+
const [visibleBlocks, hiddenBlocks] = topItemsCount > 0
|
|
2297
|
+
? [blocksToRender.slice(0, topItemsCount), blocksToRender.slice(topItemsCount)]
|
|
2298
|
+
: [blocksToRender, []];
|
|
2299
|
+
return (jsxs("div", { className: style('space-y-2xs', blocksToRender.length ? '' : 'hidden'), children: [jsxs("div", { className: style(resultsGridStyle), children: [renderBlocksList(visibleBlocks, { ...rest.options, parent: block }), isOdd(visibleBlocks.length) ? jsx(AdTile, { className: "col-span-6", ...rest }) : null] }), jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs(FoldableSection, { className: style(resultsGridStyle), isUnfolded: isUnfolded, children: [renderBlocksList(hiddenBlocks, { ...rest.options, parent: block }), isOdd(hiddenBlocks.length) ? jsx(AdTile, { className: "col-span-6", ...rest }) : null] })), renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(DefaultFoldButton, { className: style(topItemsCount < 1 ? 'hidden' : ''), disabled: !hiddenBlocks?.length, label: label, icon: ICONS$1[Number(isUnfolded)], dataTheme: rest.options?.page?.colorPalette, onClick: onToggle })) })] }));
|
|
2300
|
+
};
|
|
2301
|
+
|
|
2302
|
+
const FilteredBlocks = JSX(({ blocksSection, blocksToRender = [], notFound, ...rest }) => {
|
|
2303
|
+
switch (blocksSection?.view) {
|
|
2304
|
+
case 'grid':
|
|
2305
|
+
return (jsxs("div", { children: [renderNotFound(notFound, blocksToRender), renderGridBlocks({ ...blocksSection, ...rest, blocksToRender })] }));
|
|
2306
|
+
case 'carousel':
|
|
2307
|
+
return (jsxs("div", { children: [renderNotFound(notFound, blocksToRender), renderCarouselBlocks({ ...rest, blocksToRender })] }));
|
|
2308
|
+
default:
|
|
2309
|
+
return null;
|
|
2310
|
+
}
|
|
2311
|
+
});
|
|
2312
|
+
const renderNotFound = (notFound, blocksToRender) => notFound && !blocksToRender.length ? jsx(NotFound, { ...notFound }) : null;
|
|
2313
|
+
|
|
2314
|
+
const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
|
|
2315
|
+
|
|
2316
|
+
const SlideCheckboxGroup = JSX(({ value, onChange, items = [], multiple }) => {
|
|
2317
|
+
const handleChange = (newValue) => {
|
|
2318
|
+
if (!onChange) {
|
|
2319
|
+
return;
|
|
2320
|
+
}
|
|
2321
|
+
const hasAlready = value?.includes(newValue);
|
|
2322
|
+
if (multiple) {
|
|
2323
|
+
onChange(hasAlready ? (value || []).filter((v) => v !== newValue) : [...(value || []), newValue]);
|
|
2324
|
+
}
|
|
2325
|
+
else {
|
|
2326
|
+
onChange(hasAlready ? [] : [newValue]);
|
|
2327
|
+
}
|
|
2328
|
+
};
|
|
2329
|
+
return items.map((item) => (jsx(SlideCheckbox, { text: item?.title, value: [value].flatMap((_) => _).includes(item.value), onChange: () => handleChange(item.value), type: multiple ? 'checkbox' : 'radio' }, item.value)));
|
|
2330
|
+
});
|
|
2331
|
+
|
|
2332
|
+
const FiltrationForm = JSX(({ children, filtrationSchema, resetButton, field, reset }) => (jsxs("form", { className: "flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0", children: [jsxs("div", { className: "flex flex-col @4xl:flex-row gap-xl", children: [children, joinList((jsx("div", { className: "h-full w-px bg-gray" })))(Object.entries(filtrationSchema).map(renderFormItem(field)).filter(Boolean))] }), resetButton ? (jsx("div", { children: jsx(Button, { type: "reset", className: "w-full @4xl:w-56 @4xl:ml-s", onClick: reset, children: resetButton?.text }) })) : null] })));
|
|
2333
|
+
const renderFormItem = (field) => ([key, item]) => {
|
|
2334
|
+
const type = item?.type;
|
|
2335
|
+
switch (type) {
|
|
2336
|
+
case 'array':
|
|
2337
|
+
return renderCheckboxes(key, field)(item);
|
|
2338
|
+
default:
|
|
2339
|
+
return null;
|
|
2340
|
+
}
|
|
2341
|
+
};
|
|
2342
|
+
const renderCheckboxes = (key, field) => (item) => {
|
|
2343
|
+
const options = item?.items?.enum?.map((e, i) => ({ value: e, title: item?.items?.enumNames?.[i] || '' })) ||
|
|
2344
|
+
[];
|
|
2345
|
+
return (jsxs("div", { className: "flex-1", children: [item?.title ? (jsx("div", { className: "mb-m", children: jsx(Text, { size: "text-m", font: "font-medium", color: "text-primary-text", children: item.title }) })) : null, jsx(SlideCheckboxGroup, { items: options, multiple: !item?.single, ...field(key) })] }, key));
|
|
2346
|
+
};
|
|
2347
|
+
|
|
2348
|
+
function zip(firstCol, ...restCols) {
|
|
2349
|
+
return firstCol.map((firstEl, rowIndex) => [firstEl, ...restCols.map((col) => col[rowIndex])]);
|
|
2350
|
+
}
|
|
2351
|
+
|
|
2352
|
+
const isEmpty = (v) => v === null ||
|
|
2353
|
+
v === undefined ||
|
|
2354
|
+
v === '' ||
|
|
2355
|
+
(Array.isArray(v) && v.length === 0) ||
|
|
2356
|
+
(typeof v === 'object' && Object.keys(v).length === 0);
|
|
2357
|
+
|
|
2358
|
+
const isSingularFieldMatch = (key, pattern) => (target) => isEmpty(pattern[key]) || isEmpty(target[key]) || pattern[key] === target[key];
|
|
2359
|
+
const isMultipleFieldMatch = (key, pattern) => (target) => isEmpty(pattern[key]) ||
|
|
2360
|
+
isEmpty(target[key]) ||
|
|
2361
|
+
pattern[key]?.every((_) => target[key]?.includes(_));
|
|
2362
|
+
const isNumberFieldMatch = (key, pattern) => (target) => isEmpty(pattern[key]) ||
|
|
2363
|
+
isEmpty(target[key]) ||
|
|
2364
|
+
naturalNumber(pattern[key]) <= naturalNumber(target[key]);
|
|
2365
|
+
const isMultipleNumberFieldMatch = (key, pattern) => (target) => isEmpty(pattern[key]) || isEmpty(target[key]) || target[key]?.includes(pattern[key]);
|
|
2366
|
+
const isValueInRange = (key, pattern) => (target) => isEmpty(pattern[key]) ||
|
|
2367
|
+
isEmpty(target[key]) ||
|
|
2368
|
+
(naturalNumber(pattern[key]?.min) >= naturalNumber(target[key]?.min) &&
|
|
2369
|
+
naturalNumber(pattern[key]?.min) <= naturalNumber(target[key]?.max));
|
|
2370
|
+
const targetMatchPattern = (pattern, target) => Object.entries(pattern)
|
|
2371
|
+
.map(([key, subPattern]) => {
|
|
2372
|
+
if (typeof subPattern === 'number') {
|
|
2373
|
+
return Array.isArray(target[key])
|
|
2374
|
+
? isMultipleNumberFieldMatch(key, pattern)
|
|
2375
|
+
: isNumberFieldMatch(key, pattern);
|
|
2376
|
+
}
|
|
2377
|
+
if (typeof subPattern === 'object' && 'min' in subPattern && 'max' in subPattern) {
|
|
2378
|
+
return isValueInRange(key, pattern);
|
|
2379
|
+
}
|
|
2380
|
+
return Array.isArray(subPattern)
|
|
2381
|
+
? isMultipleFieldMatch(key, pattern)
|
|
2382
|
+
: isSingularFieldMatch(key, pattern);
|
|
2383
|
+
})
|
|
2384
|
+
.every((predicate) => predicate(target));
|
|
2385
|
+
const naturalNumber = (n) => Number(n || 0);
|
|
2386
|
+
|
|
2387
|
+
const filterBlocks = (blocksWithProps, filtrationState) => (normalize = identity) => blocksWithProps
|
|
2388
|
+
?.filter(([, content]) => targetMatchPattern(filtrationState, normalize(content) || {}))
|
|
2389
|
+
.map(([block]) => block);
|
|
2390
|
+
|
|
2391
|
+
const useFiltrationForm = (initialFormState, { block, page, normalize = identity }) => {
|
|
2392
|
+
const blocks = block?.blocks || [];
|
|
2393
|
+
const [filtrationState, { field, reset, update }] = useForm(initialFormState);
|
|
2394
|
+
const blocksWithProps = useMemo(() => zip(blocks, blocks.map((b) => resolveBlockProps(b.content, page?.fallback))), [blocks, page?.fallback]);
|
|
2395
|
+
const blocksToRender = filtrationState === initialFormState
|
|
2396
|
+
? blocks
|
|
2397
|
+
: filterBlocks(blocksWithProps, filtrationState)(normalize);
|
|
2398
|
+
return [filtrationState, { blocksToRender, blocksWithProps }, { field, reset, update }];
|
|
2399
|
+
};
|
|
2400
|
+
|
|
2320
2401
|
const EMPTY_SCHEMA = {};
|
|
2321
2402
|
const initialFiltrationState$2 = {};
|
|
2322
|
-
const BankAccountFiltration = UniBlock(({ className, filtrationSchema = EMPTY_SCHEMA,
|
|
2403
|
+
const BankAccountFiltration = UniBlock(({ className, filtrationSchema = EMPTY_SCHEMA, consumerField = {}, resetButton, ...rest }) => {
|
|
2323
2404
|
const [, { blocksToRender }, { field, reset }] = useFiltrationForm(initialFiltrationState$2, {
|
|
2324
2405
|
block: rest.block,
|
|
2325
2406
|
page: rest.options?.page,
|
|
2326
2407
|
});
|
|
2327
|
-
const
|
|
2328
|
-
// Only StringArray
|
|
2329
|
-
.filter(([, schema]) => schema.type === 'array' && schema.ui === 'dropdown')
|
|
2330
|
-
.map(([name, schema]) => ({
|
|
2331
|
-
className: 'w-64',
|
|
2332
|
-
label: schema.title,
|
|
2333
|
-
options: stringArrayToOptions(schema),
|
|
2334
|
-
...field(name, {
|
|
2408
|
+
const ConsumerSelect = (jsx(Select, { className: "w-64", label: consumerField?.title, options: stringArrayToOptions(consumerField), ...field('consumer', {
|
|
2335
2409
|
parse: ({ key }) => [key],
|
|
2336
|
-
format: ([value] = []) => stringArrayToOptions(
|
|
2337
|
-
})
|
|
2338
|
-
}));
|
|
2339
|
-
const Selects = selectArrProps.map((props, i) => jsx(Select, { ...props }, String(i)));
|
|
2340
|
-
return (jsxs(BlockWrapper, { className: style(className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(FiltrationForm, { filtrationSchema: filtrationSchema, field: field, reset: reset, children: jsxs("div", { children: [Selects, jsx("div", { children: jsx(Button, { type: "reset", className: "mt-lg w-64", onClick: reset, version: resetButton?.version, children: resetButton?.text }) })] }) }), jsx("div", { className: style(blocksToRender?.length ? 'hidden' : 'block'), children: notFound ? jsx(NotFound, { ...notFound }) : null }), jsx(Carousel, { padding: "p-0", isEmbedded: true, itemCount: blocksToRender?.length, visibleItemCount: 0, isAlignCenter: true, isGap: false, children: renderBlocksList(blocksToRender, {
|
|
2341
|
-
...rest.options,
|
|
2342
|
-
parent: rest.block,
|
|
2343
|
-
renderProps: (block, options, i) => (jsx("div", { className: style('relative min-w-80', getBorderStyle(true)), children: renderBlock$1(block, options) }, String(i))),
|
|
2344
|
-
}) })] }));
|
|
2410
|
+
format: ([value] = []) => stringArrayToOptions(consumerField).find((_) => _.key === value) || { key: '' },
|
|
2411
|
+
}) }));
|
|
2412
|
+
return (jsxs(BlockWrapper, { className: style(className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(FiltrationForm, { filtrationSchema: filtrationSchema, field: field, reset: reset, children: jsxs("div", { children: [ConsumerSelect, jsx("div", { children: jsx(Button, { type: "reset", className: "mt-lg w-64", onClick: reset, version: resetButton?.version, children: resetButton?.text }) })] }) }), jsx(FilteredBlocks, { blocksToRender: blocksToRender, ...rest })] }));
|
|
2345
2413
|
}, {
|
|
2346
2414
|
childrenTypes: ['CarouselTariffsCard'],
|
|
2347
2415
|
childSchema: (content) => content?.filtrationSchema || {},
|
|
@@ -2410,46 +2478,6 @@
|
|
|
2410
2478
|
return (jsx(BlockWrapper, { className: style('!bg-transparent', alignStyle, className), defaultPadding: "p-0", ...rest, children: renderButtonsSection(buttons) }));
|
|
2411
2479
|
});
|
|
2412
2480
|
|
|
2413
|
-
const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
|
|
2414
|
-
const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
|
|
2415
|
-
const onToggle = useCallback(() => {
|
|
2416
|
-
setIsUnfolded((_) => !_);
|
|
2417
|
-
}, []);
|
|
2418
|
-
const sectionNode = renderFoldableSection({ isUnfolded, onToggle });
|
|
2419
|
-
const buttonNode = renderFoldButton ? renderFoldButton({ isUnfolded, onToggle }) : null;
|
|
2420
|
-
return isFoldButtonOnTop ? (jsxs("div", { className: className, role: "group", children: [buttonNode, sectionNode] })) : (jsxs("div", { className: className, role: "group", children: [sectionNode, buttonNode] }));
|
|
2421
|
-
});
|
|
2422
|
-
|
|
2423
|
-
function useResizeObserver(callback, deps) {
|
|
2424
|
-
const ref = useRef(null);
|
|
2425
|
-
useEffect(() => {
|
|
2426
|
-
const element = ref?.current;
|
|
2427
|
-
if (!element) {
|
|
2428
|
-
return undefined;
|
|
2429
|
-
}
|
|
2430
|
-
const observer = new ResizeObserver((entries) => {
|
|
2431
|
-
callback(element, entries[0]);
|
|
2432
|
-
});
|
|
2433
|
-
observer.observe(element);
|
|
2434
|
-
return () => {
|
|
2435
|
-
observer.disconnect();
|
|
2436
|
-
};
|
|
2437
|
-
}, [callback, ...deps]);
|
|
2438
|
-
return ref;
|
|
2439
|
-
}
|
|
2440
|
-
|
|
2441
|
-
const FoldableSection = JSX(({ className = '', isUnfolded, children }) => {
|
|
2442
|
-
const containerRef = useRef(null);
|
|
2443
|
-
const childrenWrapperRef = useResizeObserver((childrenWrapperEl) => {
|
|
2444
|
-
if (containerRef.current) {
|
|
2445
|
-
containerRef.current.style.maxHeight = isUnfolded
|
|
2446
|
-
? `${childrenWrapperEl.scrollHeight}px`
|
|
2447
|
-
: '';
|
|
2448
|
-
}
|
|
2449
|
-
}, [isUnfolded]);
|
|
2450
|
-
return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} `, children: jsx("div", { className: className, ref: childrenWrapperRef, children: children }) }));
|
|
2451
|
-
});
|
|
2452
|
-
|
|
2453
2481
|
const calculatorValueBlockStyle = 'flex justify-between @xl:flex-col';
|
|
2454
2482
|
const CalculatorValueBlock = JSX(({ className, title, value, fractionDigits, fixed, prefix, postfix }) => (jsxs("div", { className: style(calculatorValueBlockStyle, className), children: [title ? (jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title })) : null, value ? (jsx("div", { children: jsx(Text, { size: "text-h3", children: [prefix, toLocalNumberFormat(fractionDigits, { fixed })(value), postfix]
|
|
2455
2483
|
.filter(Boolean)
|
|
@@ -3406,36 +3434,6 @@
|
|
|
3406
3434
|
return orientation === 'horizontal' ? (jsx("tbody", { children: jsx(SwipeListControl, { onVisibleIndicesChange: handleSlideChange, children: tableColumns }) })) : (jsx("tbody", { children: tableColumns }));
|
|
3407
3435
|
});
|
|
3408
3436
|
|
|
3409
|
-
const isOdd = (n) => n % 2 !== 0;
|
|
3410
|
-
|
|
3411
|
-
const TextWithIcon = JSX(({ textNode, iconNode, tag, onClick, justifyContent = 'between', className, role, ...rest }) => {
|
|
3412
|
-
const Tag = tag;
|
|
3413
|
-
return (jsxs(Tag, { tag: tag, className: style('flex items-center w-full gap-1', justifyContent === 'between' ? 'justify-between' : 'justify-center', className), onClick: onClick, role: role, ...rest, children: [textNode ? jsx("div", { children: textNode }) : null, iconNode ? jsx("div", { children: iconNode }) : null] }));
|
|
3414
|
-
});
|
|
3415
|
-
|
|
3416
|
-
const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', disabled = false, onClick }) => (jsx(TextWithIcon, { tag: "button", onClick: onClick, disabled: disabled, "data-theme": dataTheme, justifyContent: "center", role: "button", className: style('py-4 border border-transparent outline-none focus:border-primary-text space-x-s', disabled
|
|
3417
|
-
? 'bg-main-divider text-main-disabled hover:bg-main-divider'
|
|
3418
|
-
: 'bg-primary-main text-white hover:bg-primary-hove', className), textNode: jsx(Text, { size: "text-h4", children: label }), iconNode: icon ? (jsx(Img, { image: {
|
|
3419
|
-
icon,
|
|
3420
|
-
iconVersion: 'white',
|
|
3421
|
-
}, className: "my-auto", width: "20", height: "20" })) : null })));
|
|
3422
|
-
const renderDefaultFoldButton = ({ isUnfolded, onToggle }) => {
|
|
3423
|
-
const labels = ['Развернуть', 'Скрыть'];
|
|
3424
|
-
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
3425
|
-
return (jsx(DefaultFoldButton, { icon: icons[Number(isUnfolded)], label: labels[Number(isUnfolded)], onClick: onToggle }));
|
|
3426
|
-
};
|
|
3427
|
-
|
|
3428
|
-
const ICONS$1 = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
3429
|
-
const resultsGridStyle = 'space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box';
|
|
3430
|
-
const BaseFiltrationInner = JSX(({ label = '', blocksToRender = [], topItemsCount = 0, block, notFound, ...rest }) => {
|
|
3431
|
-
const [visibleBlocks, hiddenBlocks] = topItemsCount > 0
|
|
3432
|
-
? [blocksToRender.slice(0, topItemsCount), blocksToRender.slice(topItemsCount)]
|
|
3433
|
-
: [blocksToRender, []];
|
|
3434
|
-
return (jsxs("div", { children: [jsx("div", { className: style(blocksToRender.length ? 'hidden' : 'block'), children: notFound ? jsx(NotFound, { ...notFound }) : null }), jsxs("div", { className: style('space-y-2xs', blocksToRender.length ? '' : 'hidden'), children: [jsxs("div", { className: style(resultsGridStyle), children: [renderBlocksList(visibleBlocks, { ...rest.options, parent: block }), isOdd(visibleBlocks.length) ? jsx(AdTile, { className: "col-span-6", ...rest }) : null] }), jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => {
|
|
3435
|
-
return (jsxs(FoldableSection, { className: style(resultsGridStyle), isUnfolded: isUnfolded, children: [renderBlocksList(hiddenBlocks, { ...rest.options, parent: block }), isOdd(hiddenBlocks.length) ? jsx(AdTile, { className: "col-span-6", ...rest }) : null] }));
|
|
3436
|
-
}, renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(DefaultFoldButton, { className: style(topItemsCount < 1 ? 'hidden' : ''), disabled: !hiddenBlocks?.length, label: label, icon: ICONS$1[Number(isUnfolded)], dataTheme: rest.options?.page?.colorPalette, onClick: onToggle })) })] })] }));
|
|
3437
|
-
});
|
|
3438
|
-
|
|
3439
3437
|
const isRateRow = (rateRow) => {
|
|
3440
3438
|
return typeof rateRow?.minMonths === 'number' && typeof rateRow?.maxMonths === 'number';
|
|
3441
3439
|
};
|
|
@@ -3462,7 +3460,7 @@
|
|
|
3462
3460
|
return (jsxs(BlockWrapper, { className: style('space-y-2xs', className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(FiltrationForm, { filtrationSchema: filtrationSchema, resetButton: resetButton, field: field, reset: reset, children: jsxs("div", { className: "@4xl:max-w-xs", children: [jsx(CurrencyInput, { label: sumInput?.title, min: DEFAULT_MIN_SUM, max: DEFAULT_MAX_SUM, ...field('sum', {
|
|
3463
3461
|
parse: (min) => ({ min: Number(min), max: DEFAULT_MAX_SUM }),
|
|
3464
3462
|
format: ({ min }) => String(min),
|
|
3465
|
-
}) }), jsx(InputRange, { title: periodInput?.title, items: ['От 3 мес', 'До 5 лет'], list: months, ...field('period') })] }) }), jsx(
|
|
3463
|
+
}) }), jsx(InputRange, { title: periodInput?.title, items: ['От 3 мес', 'До 5 лет'], list: months, ...field('period') })] }) }), jsx(FilteredBlocks, { blocksToRender: blocksToRender, ...rest })] }));
|
|
3466
3464
|
}, {
|
|
3467
3465
|
childrenTypes: ['ProductBlock'],
|
|
3468
3466
|
childSchema: (content) => ({
|
|
@@ -3755,11 +3753,13 @@
|
|
|
3755
3753
|
|
|
3756
3754
|
const HorizontalNavigation = JSX(({ title, links, className = '' }) => (jsxs("div", { className: style('flex flex-col gap-4', className), children: [jsx(Text, { size: "text-l", font: "font-normal", children: title }), links?.length ? (jsx("div", { className: "flex flex-col gap-lg", children: links.map((_, i) => (jsx(HorizontalNavigationLink, { className: "text-l font-light", index: i, ..._ }, String(i)))) })) : null] })));
|
|
3757
3755
|
|
|
3758
|
-
const LinkList = JSX(({ className = '', items, basePath }) =>
|
|
3759
|
-
const renderLinkListItem = (basePath) => (item, i) => {
|
|
3760
|
-
const { text, ...linkProps } = item;
|
|
3756
|
+
const LinkList = JSX(({ className = '', items, basePath }) => {
|
|
3761
3757
|
const isAnotherPortal = projectSettings.BASE_PATH && basePath ? !projectSettings.BASE_PATH.startsWith(basePath) : false;
|
|
3762
3758
|
const link = useLink({ isRemote: isAnotherPortal, basePath });
|
|
3759
|
+
return (jsx("ul", { className: style('flex flex-col', className), children: items?.map(renderLinkListItem(link)) }));
|
|
3760
|
+
});
|
|
3761
|
+
const renderLinkListItem = (link) => (item, i) => {
|
|
3762
|
+
const { text, ...linkProps } = item;
|
|
3763
3763
|
const { href, target, onClick } = link(linkProps);
|
|
3764
3764
|
return (jsx("li", { className: "list-none my-xs", children: jsx("a", { className: "hover:text-primary-main font-light", role: "link", href: href, target: target || '_self', onClick: onClick, children: text ? text : null }) }, `list_item_${String(i)}`));
|
|
3765
3765
|
};
|
|
@@ -3783,7 +3783,7 @@
|
|
|
3783
3783
|
});
|
|
3784
3784
|
const renderTopItems = (topItems) => topItems
|
|
3785
3785
|
?.filter((_) => _.icon?.icon)
|
|
3786
|
-
.map((item, i) => (jsx(RollupItem, { foldButtonVersion: "accordion", label: item?.text, labelIcon: item?.icon, role: "menuitem", children: jsx(LinkList, { items: item.items, basePath: appendSlash(item.href) }) }, String(i))));
|
|
3786
|
+
.map((item, i) => (jsx(RollupItem, { foldButtonVersion: "accordion", label: item?.text, labelIcon: item?.icon, role: "menuitem", children: item.items ? jsx(LinkList, { items: item.items, basePath: appendSlash(item.href) }) : null }, String(i))));
|
|
3787
3787
|
|
|
3788
3788
|
const ICON_SIZE = { width: '34', height: '34' };
|
|
3789
3789
|
|
|
@@ -4027,18 +4027,18 @@
|
|
|
4027
4027
|
stage: [],
|
|
4028
4028
|
};
|
|
4029
4029
|
const MortgageFiltration = UniBlock(({ className, hotFilters, filtrationSchema = {}, resetButton, ...rest }) => {
|
|
4030
|
-
const [filtrationState, { blocksToRender }, { field, reset, update }] = useFiltrationForm(initialFiltrationState, {
|
|
4030
|
+
const [filtrationState, { blocksToRender }, { field, reset, update: replaceFiltrationState }] = useFiltrationForm(initialFiltrationState, {
|
|
4031
4031
|
block: rest.block,
|
|
4032
4032
|
page: rest.options?.page,
|
|
4033
4033
|
});
|
|
4034
|
-
const handleFiltrationStateChange = useCallback((_ = initialFiltrationState) =>
|
|
4034
|
+
const handleFiltrationStateChange = useCallback((_ = initialFiltrationState) => replaceFiltrationState(_), []);
|
|
4035
4035
|
const tabsControlProps = useHotFilters({
|
|
4036
4036
|
hotFilters,
|
|
4037
4037
|
filtrationState,
|
|
4038
4038
|
blocks: rest.block?.blocks,
|
|
4039
4039
|
onFiltrationStateChange: handleFiltrationStateChange,
|
|
4040
4040
|
});
|
|
4041
|
-
return (jsxs(BlockWrapper, { className: style('space-y-2xs', className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(TabsControl, { ...tabsControlProps }), jsx(FiltrationForm, { filtrationSchema: filtrationSchema, resetButton: resetButton, field: field, reset: reset }), jsx(
|
|
4041
|
+
return (jsxs(BlockWrapper, { className: style('space-y-2xs', className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(TabsControl, { ...tabsControlProps }), jsx(FiltrationForm, { filtrationSchema: filtrationSchema, resetButton: resetButton, field: field, reset: reset }), jsx(FilteredBlocks, { blocksToRender: blocksToRender, ...rest })] }));
|
|
4042
4042
|
}, {
|
|
4043
4043
|
childrenTypes: ['ProductBlock'],
|
|
4044
4044
|
childSchema: (content) => content?.filtrationSchema || {},
|
|
@@ -5006,8 +5006,8 @@
|
|
|
5006
5006
|
});
|
|
5007
5007
|
|
|
5008
5008
|
const SEARCH_TERM_MIN_LENGTH = 3;
|
|
5009
|
-
const LocationDialog = JSX(({ foreignOffices,
|
|
5010
|
-
const [currentLocation, selectCurrentLocation] = useLocation(
|
|
5009
|
+
const LocationDialog = JSX(({ foreignOffices, branches }) => {
|
|
5010
|
+
const [currentLocation, selectCurrentLocation] = useLocation(branches?.default);
|
|
5011
5011
|
const link = useLink({ isRemote: true });
|
|
5012
5012
|
const { href } = link({ href: `/branches/${currentLocation.slug}` });
|
|
5013
5013
|
const [query, setQuery] = useState('');
|
|
@@ -5048,8 +5048,8 @@
|
|
|
5048
5048
|
const TopItemMobile = ({ item, isActive, onClick }) => (jsx("div", { className: style('relative rounded-2xl p-2', isActive ? 'bg-primary-main' : 'bg-main-gray'), children: jsx("button", { type: "button", className: "relative", onClick: onClick, children: jsx("span", { className: style('whitespace-nowrap', isActive ? 'text-white' : ''), children: item.text }) }) }));
|
|
5049
5049
|
|
|
5050
5050
|
const BurgerMenuDialog = JSX((props) => {
|
|
5051
|
-
const { topItems,
|
|
5052
|
-
const [location] = useLocation(
|
|
5051
|
+
const { topItems, branches, officesAtms } = props;
|
|
5052
|
+
const [location] = useLocation(branches?.default);
|
|
5053
5053
|
const locationDialog = useLocationDialog(props);
|
|
5054
5054
|
const [containerRef, scroll] = useSwipeListScroll({
|
|
5055
5055
|
itemCount: topItems?.length ?? 0,
|
|
@@ -5651,7 +5651,7 @@
|
|
|
5651
5651
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
5652
5652
|
});
|
|
5653
5653
|
|
|
5654
|
-
const packageVersion = "0.14.
|
|
5654
|
+
const packageVersion = "0.14.292";
|
|
5655
5655
|
|
|
5656
5656
|
exports.Blocks = Blocks;
|
|
5657
5657
|
exports.ContentPage = ContentPage;
|