@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
package/src/data/SitemapData.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AspectsDef } from '../model/AspectsProps';
|
|
2
|
-
import { type
|
|
2
|
+
import { type LinkProps } from '../model/LinkProps';
|
|
3
3
|
import { type LogoType } from '../model/LogoType';
|
|
4
4
|
import { type IconProps, type Picture } from '../model/Picture';
|
|
5
5
|
|
|
@@ -39,11 +39,21 @@ export interface DispositionItem extends LinkProps {
|
|
|
39
39
|
*/
|
|
40
40
|
export type ForeignOfficeProps = LinkProps & IconProps;
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* @title Филиалы
|
|
44
|
+
*/
|
|
45
|
+
export type BranchesSitemap = {
|
|
46
|
+
/** @title Филиал по-умолчанию */
|
|
47
|
+
default?: string;
|
|
48
|
+
/** @title Отображать выбор филиалов */
|
|
49
|
+
visible?: boolean;
|
|
50
|
+
};
|
|
51
|
+
|
|
42
52
|
export interface SitemapData {
|
|
43
53
|
logo?: LogoType;
|
|
44
54
|
topItems?: TopMenuItemProps[];
|
|
45
55
|
dispositions?: DispositionItem[];
|
|
46
56
|
foreignOffices?: ForeignOfficeProps[];
|
|
47
|
-
|
|
48
|
-
officesAtms?:
|
|
57
|
+
branches?: BranchesSitemap;
|
|
58
|
+
officesAtms?: LinkProps;
|
|
49
59
|
}
|
|
@@ -1,79 +1,10 @@
|
|
|
1
1
|
import { type ButtonVersion } from '../../model/ButtonVersion';
|
|
2
2
|
import { type DescriptionProps, type LabelProps, type TitleProps } from '../../model/HeadlineType';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* @title Заголовок
|
|
6
|
-
*/
|
|
7
|
-
type Title = string;
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @title Ключи
|
|
11
|
-
*/
|
|
12
|
-
type Enum = string[];
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @title Имена
|
|
16
|
-
*/
|
|
17
|
-
type EnumNames = string[];
|
|
18
|
-
|
|
19
|
-
export type StringArray = {
|
|
20
|
-
title?: Title;
|
|
21
|
-
/**
|
|
22
|
-
* @default array
|
|
23
|
-
* @hidden
|
|
24
|
-
*/
|
|
25
|
-
type?: 'array';
|
|
26
|
-
/** @title Минимальное количество */
|
|
27
|
-
minItems?: number;
|
|
28
|
-
/** @title Максимальное количество */
|
|
29
|
-
maxItems?: number;
|
|
30
|
-
/** @title */
|
|
31
|
-
items?: {
|
|
32
|
-
/**
|
|
33
|
-
* @default string
|
|
34
|
-
* @hidden
|
|
35
|
-
*/
|
|
36
|
-
type?: 'string';
|
|
37
|
-
enum?: Enum;
|
|
38
|
-
enumNames?: EnumNames;
|
|
39
|
-
};
|
|
40
|
-
/** @title В подборщике выбирается только одна опция */
|
|
41
|
-
single?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* @hidden
|
|
44
|
-
*/
|
|
45
|
-
ui?: 'checkboxes' | 'dropdown';
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export type NumberValue = {
|
|
49
|
-
title?: Title;
|
|
50
|
-
/**
|
|
51
|
-
* @default number
|
|
52
|
-
* @hidden
|
|
53
|
-
*/
|
|
54
|
-
type?: 'number';
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export type NumberRange = {
|
|
58
|
-
title?: Title;
|
|
59
|
-
/**
|
|
60
|
-
* @default object
|
|
61
|
-
* @hidden
|
|
62
|
-
*/
|
|
63
|
-
type?: 'object';
|
|
64
|
-
/** @title */
|
|
65
|
-
properties: {
|
|
66
|
-
/** @title Минимум */
|
|
67
|
-
min?: NumberValue;
|
|
68
|
-
/** @title Максимум */
|
|
69
|
-
max?: NumberValue;
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
|
|
73
4
|
/**
|
|
74
5
|
* @title Кнопка сброса
|
|
75
6
|
*/
|
|
76
|
-
|
|
7
|
+
type ResetButton = {
|
|
77
8
|
/** @title Текст кнопки */
|
|
78
9
|
text: string;
|
|
79
10
|
/** @title Цвет кнопки */
|
|
@@ -83,14 +14,40 @@ export type ResetButton = {
|
|
|
83
14
|
/**
|
|
84
15
|
* @title Плитка "Не найдено"
|
|
85
16
|
*/
|
|
86
|
-
export type
|
|
17
|
+
export type NotFoundDef = TitleProps & DescriptionProps;
|
|
87
18
|
|
|
88
|
-
|
|
19
|
+
type CommonFiltrationDef = {
|
|
20
|
+
resetButton?: ResetButton;
|
|
21
|
+
notFound?: NotFoundDef;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @title Сетка
|
|
26
|
+
*/
|
|
27
|
+
export type GridSection = LabelProps & {
|
|
89
28
|
/**
|
|
90
29
|
* @title Количество отображаемых предметов
|
|
91
30
|
* @minimum 1
|
|
92
31
|
*/
|
|
93
32
|
topItemsCount?: number;
|
|
94
|
-
|
|
95
|
-
|
|
33
|
+
/** @default grid */
|
|
34
|
+
view: 'grid';
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @title Карусель
|
|
39
|
+
*/
|
|
40
|
+
type CarouselSection = {
|
|
41
|
+
/** @default carousel */
|
|
42
|
+
view: 'carousel';
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export type BaseFiltrationContent = CommonFiltrationDef & {
|
|
46
|
+
/**
|
|
47
|
+
* @title Секция с вложенными блоками
|
|
48
|
+
* @default {
|
|
49
|
+
* "view": "grid"
|
|
50
|
+
* }
|
|
51
|
+
*/
|
|
52
|
+
blocksSection?: GridSection | CarouselSection;
|
|
96
53
|
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { type BlockDef } from '../../model/ContentPageDef';
|
|
3
|
+
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
4
|
+
import { NotFound } from '../NotFound/NotFound';
|
|
5
|
+
import { type BaseFiltrationContent } from './BaseFiltrationContent';
|
|
6
|
+
import { renderCarouselBlocks } from './renderCarouselBlocks';
|
|
7
|
+
import { renderGridBlocks } from './renderGridBlocks';
|
|
8
|
+
|
|
9
|
+
interface FilteredBlocksProps extends BaseFiltrationContent, UniBlockProps {
|
|
10
|
+
blocksToRender?: BlockDef[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const FilteredBlocks = JSX<FilteredBlocksProps>(
|
|
14
|
+
({ blocksSection, blocksToRender = [], notFound, ...rest }) => {
|
|
15
|
+
switch (blocksSection?.view) {
|
|
16
|
+
case 'grid':
|
|
17
|
+
return (
|
|
18
|
+
<div>
|
|
19
|
+
{renderNotFound(notFound, blocksToRender)}
|
|
20
|
+
{renderGridBlocks({ ...blocksSection, ...rest, blocksToRender })}
|
|
21
|
+
</div>
|
|
22
|
+
);
|
|
23
|
+
case 'carousel':
|
|
24
|
+
return (
|
|
25
|
+
<div>
|
|
26
|
+
{renderNotFound(notFound, blocksToRender)}
|
|
27
|
+
{renderCarouselBlocks({ ...rest, blocksToRender })}
|
|
28
|
+
</div>
|
|
29
|
+
);
|
|
30
|
+
default:
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
const renderNotFound = (notFound: FilteredBlocksProps['notFound'], blocksToRender: BlockDef[]) =>
|
|
37
|
+
notFound && !blocksToRender.length ? <NotFound {...notFound} /> : null;
|
|
@@ -5,19 +5,15 @@ import { joinList } from '../../utils/joinList';
|
|
|
5
5
|
import { Button } from '../Button/Button';
|
|
6
6
|
import { SlideCheckboxGroup } from '../SlideCheckboxGroup/SlideCheckboxGroup';
|
|
7
7
|
import { Text } from '../Text/Text';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
type NumberRange,
|
|
11
|
-
type NumberValue,
|
|
12
|
-
type StringArray,
|
|
13
|
-
} from './BaseFiltrationContent';
|
|
8
|
+
import { type BaseFiltrationContent } from './BaseFiltrationContent';
|
|
9
|
+
import { type NumberRange, type StringArray } from './FiltrationSchemaContent';
|
|
14
10
|
|
|
15
|
-
type SchemaItem = StringArray | NumberRange
|
|
11
|
+
type SchemaItem = StringArray | NumberRange;
|
|
16
12
|
type FiltrationSchema = Record<string, SchemaItem>;
|
|
17
13
|
|
|
18
14
|
interface FiltrationFormProps {
|
|
19
15
|
filtrationSchema: FiltrationSchema;
|
|
20
|
-
resetButton?:
|
|
16
|
+
resetButton?: BaseFiltrationContent['resetButton'];
|
|
21
17
|
field: FormFieldRegisterer<any>;
|
|
22
18
|
reset?: () => void;
|
|
23
19
|
}
|
|
@@ -27,9 +23,7 @@ export const FiltrationForm = JSX<FiltrationFormProps>(
|
|
|
27
23
|
<form className="flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0">
|
|
28
24
|
<div className="flex flex-col @4xl:flex-row gap-xl">
|
|
29
25
|
{children}
|
|
30
|
-
{joinList(<div className="h-full w-px bg-gray" />)(
|
|
31
|
-
// TS can't correctly refine array's type after filter
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
26
|
+
{joinList((<div className="h-full w-px bg-gray" />) as VNode)(
|
|
33
27
|
Object.entries(filtrationSchema).map(renderFormItem(field)).filter(Boolean) as VNode[],
|
|
34
28
|
)}
|
|
35
29
|
</div>
|
|
@@ -51,16 +45,12 @@ const renderFormItem =
|
|
|
51
45
|
|
|
52
46
|
switch (type) {
|
|
53
47
|
case 'array':
|
|
54
|
-
return
|
|
48
|
+
return renderCheckboxes(key, field)(item);
|
|
55
49
|
default:
|
|
56
50
|
return null;
|
|
57
51
|
}
|
|
58
52
|
};
|
|
59
53
|
|
|
60
|
-
const renderArrayFormItem =
|
|
61
|
-
(key: string, field: FormFieldRegisterer<any>) => (item?: StringArray) =>
|
|
62
|
-
item?.ui !== 'dropdown' ? renderCheckboxes(key, field)(item) : null;
|
|
63
|
-
|
|
64
54
|
const renderCheckboxes = (key: string, field: FormFieldRegisterer<any>) => (item?: StringArray) => {
|
|
65
55
|
const options =
|
|
66
56
|
item?.items?.enum?.map((e, i) => ({ value: e, title: item?.items?.enumNames?.[i] || '' })) ||
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @title Заголовок
|
|
3
|
+
*/
|
|
4
|
+
type Title = string;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @title Ключи
|
|
8
|
+
*/
|
|
9
|
+
type Enum = string[];
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @title Имена
|
|
13
|
+
*/
|
|
14
|
+
type EnumNames = string[];
|
|
15
|
+
|
|
16
|
+
export type StringArray = {
|
|
17
|
+
title?: Title;
|
|
18
|
+
/**
|
|
19
|
+
* @default array
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
type?: 'array';
|
|
23
|
+
/** @title Минимальное количество */
|
|
24
|
+
minItems?: number;
|
|
25
|
+
/** @title Максимальное количество */
|
|
26
|
+
maxItems?: number;
|
|
27
|
+
/** @title */
|
|
28
|
+
items?: {
|
|
29
|
+
/**
|
|
30
|
+
* @default string
|
|
31
|
+
* @hidden
|
|
32
|
+
*/
|
|
33
|
+
type?: 'string';
|
|
34
|
+
enum?: Enum;
|
|
35
|
+
enumNames?: EnumNames;
|
|
36
|
+
};
|
|
37
|
+
/** @title В подборщике выбирается только одна опция */
|
|
38
|
+
single?: boolean;
|
|
39
|
+
/** @hidden */
|
|
40
|
+
ui?: 'checkboxes' | 'dropdown';
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
type NumberValue = {
|
|
44
|
+
title?: Title;
|
|
45
|
+
/**
|
|
46
|
+
* @default number
|
|
47
|
+
* @hidden
|
|
48
|
+
*/
|
|
49
|
+
type?: 'number';
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export type NumberRange = {
|
|
53
|
+
title?: Title;
|
|
54
|
+
/**
|
|
55
|
+
* @default object
|
|
56
|
+
* @hidden
|
|
57
|
+
*/
|
|
58
|
+
type?: 'object';
|
|
59
|
+
/** @title */
|
|
60
|
+
properties: {
|
|
61
|
+
/** @title Минимум */
|
|
62
|
+
min?: NumberValue;
|
|
63
|
+
/** @title Максимум */
|
|
64
|
+
max?: NumberValue;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { renderBlock } from '../../BlockRenderer/renderBlock';
|
|
2
|
+
import { renderBlocksList } from '../../BlockRenderer/renderBlockList';
|
|
3
|
+
import { Carousel } from '../../components/Carousel/Carousel';
|
|
4
|
+
import { type BlockDef } from '../../model/ContentPageDef';
|
|
5
|
+
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
6
|
+
import { getBorderStyle } from '../../utils/getBorderStyle';
|
|
7
|
+
import { style } from '../../utils/style';
|
|
8
|
+
|
|
9
|
+
export const renderCarouselBlocks = ({
|
|
10
|
+
blocksToRender,
|
|
11
|
+
...rest
|
|
12
|
+
}: UniBlockProps & { blocksToRender?: BlockDef[] }) => (
|
|
13
|
+
<Carousel
|
|
14
|
+
padding="p-0"
|
|
15
|
+
isEmbedded={true}
|
|
16
|
+
itemCount={blocksToRender?.length}
|
|
17
|
+
visibleItemCount={0}
|
|
18
|
+
isAlignCenter={true}
|
|
19
|
+
isGap={false}
|
|
20
|
+
>
|
|
21
|
+
{renderBlocksList(blocksToRender, {
|
|
22
|
+
...rest.options,
|
|
23
|
+
parent: rest.block,
|
|
24
|
+
renderProps: (block, options, i) => (
|
|
25
|
+
<div key={String(i)} className={style('relative min-w-80', getBorderStyle(true))}>
|
|
26
|
+
{renderBlock(block, options)}
|
|
27
|
+
</div>
|
|
28
|
+
),
|
|
29
|
+
})}
|
|
30
|
+
</Carousel>
|
|
31
|
+
);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { renderBlocksList } from '../../BlockRenderer/renderBlockList';
|
|
2
|
+
import { AdTile } from '../../components/AdTile/AdTile';
|
|
3
|
+
import { type BlockDef } from '../../model/ContentPageDef';
|
|
4
|
+
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
5
|
+
import { isOdd } from '../../utils/isOdd';
|
|
6
|
+
import { style } from '../../utils/style';
|
|
7
|
+
import { DefaultFoldButton } from '../Foldable/DefaultFoldButton';
|
|
8
|
+
import { Foldable } from '../Foldable/Foldable';
|
|
9
|
+
import { FoldableSection } from '../Foldable/FoldableSection';
|
|
10
|
+
import { type IconName } from '../Icon/IconProps';
|
|
11
|
+
import { type GridSection } from './BaseFiltrationContent';
|
|
12
|
+
|
|
13
|
+
const ICONS: IconName[] = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
14
|
+
|
|
15
|
+
const resultsGridStyle = 'space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs';
|
|
16
|
+
|
|
17
|
+
export const renderGridBlocks = ({
|
|
18
|
+
topItemsCount = 0,
|
|
19
|
+
label = '',
|
|
20
|
+
block,
|
|
21
|
+
blocksToRender = [],
|
|
22
|
+
...rest
|
|
23
|
+
}: GridSection & UniBlockProps & { blocksToRender?: BlockDef[] }) => {
|
|
24
|
+
const [visibleBlocks, hiddenBlocks] =
|
|
25
|
+
topItemsCount > 0
|
|
26
|
+
? [blocksToRender.slice(0, topItemsCount), blocksToRender.slice(topItemsCount)]
|
|
27
|
+
: [blocksToRender, []];
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<div className={style('space-y-2xs', blocksToRender.length ? '' : 'hidden')}>
|
|
31
|
+
<div className={style(resultsGridStyle)}>
|
|
32
|
+
{renderBlocksList(visibleBlocks, { ...rest.options, parent: block })}
|
|
33
|
+
{isOdd(visibleBlocks.length) ? <AdTile className="col-span-6" {...rest} /> : null}
|
|
34
|
+
</div>
|
|
35
|
+
<Foldable
|
|
36
|
+
renderFoldableSection={({ isUnfolded }) => (
|
|
37
|
+
<FoldableSection className={style(resultsGridStyle)} isUnfolded={isUnfolded}>
|
|
38
|
+
{renderBlocksList(hiddenBlocks, { ...rest.options, parent: block })}
|
|
39
|
+
{isOdd(hiddenBlocks.length) ? <AdTile className="col-span-6" {...rest} /> : null}
|
|
40
|
+
</FoldableSection>
|
|
41
|
+
)}
|
|
42
|
+
renderFoldButton={({ isUnfolded, onToggle }) => (
|
|
43
|
+
<DefaultFoldButton
|
|
44
|
+
className={style(topItemsCount < 1 ? 'hidden' : '')}
|
|
45
|
+
disabled={!hiddenBlocks?.length}
|
|
46
|
+
label={label}
|
|
47
|
+
icon={ICONS[Number(isUnfolded)]}
|
|
48
|
+
dataTheme={rest.options?.page?.colorPalette}
|
|
49
|
+
onClick={onToggle}
|
|
50
|
+
/>
|
|
51
|
+
)}
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
);
|
|
55
|
+
};
|
|
@@ -6,17 +6,15 @@ import { identity } from '../../utils/identity';
|
|
|
6
6
|
import { zip } from '../../utils/zip';
|
|
7
7
|
import { filterBlocks } from './filterBlocks';
|
|
8
8
|
|
|
9
|
+
interface UseFiltrationFormOptions {
|
|
10
|
+
block?: BlockDef;
|
|
11
|
+
page?: ContentPageDef;
|
|
12
|
+
normalize?: (content: BlockDef['content']) => BlockDef['content'];
|
|
13
|
+
}
|
|
14
|
+
|
|
9
15
|
export const useFiltrationForm = <FormState extends Record<string, any>>(
|
|
10
16
|
initialFormState: FormState,
|
|
11
|
-
{
|
|
12
|
-
block,
|
|
13
|
-
page,
|
|
14
|
-
normalize = identity,
|
|
15
|
-
}: {
|
|
16
|
-
block?: BlockDef;
|
|
17
|
-
page?: ContentPageDef;
|
|
18
|
-
normalize?: (content: BlockDef['content']) => BlockDef['content'];
|
|
19
|
-
},
|
|
17
|
+
{ block, page, normalize = identity }: UseFiltrationFormOptions,
|
|
20
18
|
): [
|
|
21
19
|
FormState,
|
|
22
20
|
{
|
|
@@ -27,8 +25,7 @@ export const useFiltrationForm = <FormState extends Record<string, any>>(
|
|
|
27
25
|
] => {
|
|
28
26
|
const blocks = block?.blocks || [];
|
|
29
27
|
|
|
30
|
-
const [filtrationState, { field, reset, update
|
|
31
|
-
useForm(initialFormState);
|
|
28
|
+
const [filtrationState, { field, reset, update }] = useForm(initialFormState);
|
|
32
29
|
|
|
33
30
|
const blocksWithProps = useMemo(
|
|
34
31
|
() =>
|
|
@@ -44,9 +41,5 @@ export const useFiltrationForm = <FormState extends Record<string, any>>(
|
|
|
44
41
|
? blocks
|
|
45
42
|
: filterBlocks(blocksWithProps, filtrationState)(normalize);
|
|
46
43
|
|
|
47
|
-
return [
|
|
48
|
-
filtrationState,
|
|
49
|
-
{ blocksToRender, blocksWithProps },
|
|
50
|
-
{ field, reset, update: replaceFiltrationState },
|
|
51
|
-
];
|
|
44
|
+
return [filtrationState, { blocksToRender, blocksWithProps }, { field, reset, update }];
|
|
52
45
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
-
import { type ForeignOfficeProps } from '../../data/SitemapData';
|
|
3
|
+
import { type BranchesSitemap, type ForeignOfficeProps } from '../../data/SitemapData';
|
|
4
4
|
import { useLink } from '../../hooks/useLink';
|
|
5
5
|
import { useLocation } from '../../hooks/useLocation';
|
|
6
6
|
import { useRegions, type Region } from '../../hooks/useRegions';
|
|
@@ -20,11 +20,11 @@ const SEARCH_TERM_MIN_LENGTH = 3;
|
|
|
20
20
|
|
|
21
21
|
export interface LocationDialogProps {
|
|
22
22
|
foreignOffices?: ForeignOfficeProps[];
|
|
23
|
-
|
|
23
|
+
branches?: BranchesSitemap;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
export const LocationDialog = JSX<LocationDialogProps>(({ foreignOffices,
|
|
27
|
-
const [currentLocation, selectCurrentLocation] = useLocation(
|
|
26
|
+
export const LocationDialog = JSX<LocationDialogProps>(({ foreignOffices, branches }) => {
|
|
27
|
+
const [currentLocation, selectCurrentLocation] = useLocation(branches?.default);
|
|
28
28
|
|
|
29
29
|
const link = useLink({ isRemote: true });
|
|
30
30
|
const { href } = link({ href: `/branches/${currentLocation.slug}` });
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { Headline } from '../../components/Headline/Headline';
|
|
3
3
|
import { AlignStyles } from '../../model/AlignStyles';
|
|
4
|
-
import { type
|
|
4
|
+
import { type NotFoundDef } from '../BaseFiltration/BaseFiltrationContent';
|
|
5
5
|
import { Img } from '../Img/Img';
|
|
6
6
|
|
|
7
|
-
export const NotFound = JSX<
|
|
7
|
+
export const NotFound = JSX<NotFoundDef>(({ title, description }) => (
|
|
8
8
|
<div className="bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center">
|
|
9
9
|
<Img image={{ icon: 'MagnifierIcon', iconVersion: 'normal' }} width="120" height="120" />
|
|
10
10
|
<Headline
|
package/src/utils/formatDate.ts
CHANGED
|
@@ -4,7 +4,7 @@ export const formatDate = (date: string | Date, toTimeStamp = false) => {
|
|
|
4
4
|
} else {
|
|
5
5
|
const day = String(date.getDate()).padStart(2, '0');
|
|
6
6
|
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
7
|
-
const year =
|
|
7
|
+
const year = String(date.getFullYear());
|
|
8
8
|
|
|
9
9
|
return toTimeStamp ? `${year}-${month}-${day}` : `${day}.${month}.${year}`;
|
|
10
10
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type BlockDef } from '../../model/ContentPageDef';
|
|
2
|
-
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
3
|
-
import { type BaseFiltrationInnerContent } from './BaseFiltrationContent';
|
|
4
|
-
interface BaseFiltrationInnerProps extends BaseFiltrationInnerContent, UniBlockProps {
|
|
5
|
-
blocksToRender?: BlockDef[];
|
|
6
|
-
}
|
|
7
|
-
export declare const BaseFiltrationInner: import("@redneckz/uni-jsx").UNIComponent<BaseFiltrationInnerProps, any, any>;
|
|
8
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type BlockDef } from '../../model/ContentPageDef';
|
|
2
|
-
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
3
|
-
import { type BaseFiltrationInnerContent } from './BaseFiltrationContent';
|
|
4
|
-
interface BaseFiltrationInnerProps extends BaseFiltrationInnerContent, UniBlockProps {
|
|
5
|
-
blocksToRender?: BlockDef[];
|
|
6
|
-
}
|
|
7
|
-
export declare const BaseFiltrationInner: import("@redneckz/uni-jsx").UNIComponent<BaseFiltrationInnerProps, any, any>;
|
|
8
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.BaseFiltrationInner = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const renderBlockList_1 = require("../../BlockRenderer/renderBlockList");
|
|
6
|
-
const AdTile_1 = require("../../components/AdTile/AdTile");
|
|
7
|
-
const isOdd_1 = require("../../utils/isOdd");
|
|
8
|
-
const style_1 = require("../../utils/style");
|
|
9
|
-
const DefaultFoldButton_1 = require("../Foldable/DefaultFoldButton");
|
|
10
|
-
const Foldable_1 = require("../Foldable/Foldable");
|
|
11
|
-
const FoldableSection_1 = require("../Foldable/FoldableSection");
|
|
12
|
-
const NotFound_1 = require("../NotFound/NotFound");
|
|
13
|
-
const ICONS = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
14
|
-
const resultsGridStyle = 'space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box';
|
|
15
|
-
exports.BaseFiltrationInner = (0, uni_jsx_1.JSX)(({ label = '', blocksToRender = [], topItemsCount = 0, block, notFound, ...rest }) => {
|
|
16
|
-
const [visibleBlocks, hiddenBlocks] = topItemsCount > 0
|
|
17
|
-
? [blocksToRender.slice(0, topItemsCount), blocksToRender.slice(topItemsCount)]
|
|
18
|
-
: [blocksToRender, []];
|
|
19
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)(blocksToRender.length ? 'hidden' : 'block'), children: notFound ? (0, jsx_runtime_1.jsx)(NotFound_1.NotFound, { ...notFound }) : null }), (0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)('space-y-2xs', blocksToRender.length ? '' : 'hidden'), children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)(resultsGridStyle), children: [(0, renderBlockList_1.renderBlocksList)(visibleBlocks, { ...rest.options, parent: block }), (0, isOdd_1.isOdd)(visibleBlocks.length) ? (0, jsx_runtime_1.jsx)(AdTile_1.AdTile, { className: "col-span-6", ...rest }) : null] }), (0, jsx_runtime_1.jsx)(Foldable_1.Foldable, { renderFoldableSection: ({ isUnfolded }) => {
|
|
20
|
-
return ((0, jsx_runtime_1.jsxs)(FoldableSection_1.FoldableSection, { className: (0, style_1.style)(resultsGridStyle), isUnfolded: isUnfolded, children: [(0, renderBlockList_1.renderBlocksList)(hiddenBlocks, { ...rest.options, parent: block }), (0, isOdd_1.isOdd)(hiddenBlocks.length) ? (0, jsx_runtime_1.jsx)(AdTile_1.AdTile, { className: "col-span-6", ...rest }) : null] }));
|
|
21
|
-
}, renderFoldButton: ({ isUnfolded, onToggle }) => ((0, jsx_runtime_1.jsx)(DefaultFoldButton_1.DefaultFoldButton, { className: (0, style_1.style)(topItemsCount < 1 ? 'hidden' : ''), disabled: !hiddenBlocks?.length, label: label, icon: ICONS[Number(isUnfolded)], dataTheme: rest.options?.page?.colorPalette, onClick: onToggle })) })] })] }));
|
|
22
|
-
});
|
|
23
|
-
//# sourceMappingURL=BaseFiltrationInner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseFiltrationInner.js","sourceRoot":"","sources":["../../../src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,yEAAuE;AACvE,2DAAwD;AAIxD,6CAA0C;AAC1C,6CAA0C;AAC1C,qEAAkE;AAClE,mDAAgD;AAChD,iEAA8D;AAC9D,mDAAgD;AAGhD,MAAM,KAAK,GAAe,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;AAE3D,MAAM,gBAAgB,GAAG,oEAAoE,CAAC;AAMjF,QAAA,mBAAmB,GAAG,IAAA,aAAG,EACpC,CAAC,EAAE,KAAK,GAAG,EAAE,EAAE,cAAc,GAAG,EAAE,EAAE,aAAa,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACnF,MAAM,CAAC,aAAa,EAAE,YAAY,CAAC,GACjC,aAAa,GAAG,CAAC;QACf,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QAC/E,CAAC,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;IAE3B,OAAO,CACL,4CACE,gCAAK,SAAS,EAAE,IAAA,aAAK,EAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,YAC9D,QAAQ,CAAC,CAAC,CAAC,uBAAC,mBAAQ,OAAK,QAAQ,GAAI,CAAC,CAAC,CAAC,IAAI,GACzC,EACN,iCAAK,SAAS,EAAE,IAAA,aAAK,EAAC,aAAa,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,aACzE,iCAAK,SAAS,EAAE,IAAA,aAAK,EAAC,gBAAgB,CAAC,aACpC,IAAA,kCAAgB,EAAC,aAAa,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EACnE,IAAA,aAAK,EAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,uBAAC,eAAM,IAAC,SAAS,EAAC,YAAY,KAAK,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,IAC7E,EACN,uBAAC,mBAAQ,IACP,qBAAqB,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE;4BACxC,OAAO,CACL,wBAAC,iCAAe,IAAC,SAAS,EAAE,IAAA,aAAK,EAAC,gBAAgB,CAAC,EAAE,UAAU,EAAE,UAAU,aACxE,IAAA,kCAAgB,EAAC,YAAY,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAClE,IAAA,aAAK,EAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,uBAAC,eAAM,IAAC,SAAS,EAAC,YAAY,KAAK,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,IAChE,CACnB,CAAC;wBACJ,CAAC,EACD,gBAAgB,EAAE,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAC9C,uBAAC,qCAAiB,IAChB,SAAS,EAAE,IAAA,aAAK,EAAC,aAAa,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EACnD,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,EAC/B,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAC/B,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,YAAY,EAC3C,OAAO,EAAE,QAAQ,GACjB,CACH,GACD,IACE,IACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type BlockDef } from '../../model/ContentPageDef';
|
|
2
|
-
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
3
|
-
import { type BaseFiltrationInnerContent } from './BaseFiltrationContent';
|
|
4
|
-
interface BaseFiltrationInnerProps extends BaseFiltrationInnerContent, UniBlockProps {
|
|
5
|
-
blocksToRender?: BlockDef[];
|
|
6
|
-
}
|
|
7
|
-
export declare const BaseFiltrationInner: import("@redneckz/uni-jsx").UNIComponent<BaseFiltrationInnerProps, any, any>;
|
|
8
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import { renderBlocksList } from '../../BlockRenderer/renderBlockList.js';
|
|
4
|
-
import { AdTile } from '../../components/AdTile/AdTile.js';
|
|
5
|
-
import { isOdd } from '../../utils/isOdd.js';
|
|
6
|
-
import { style } from '../../utils/style.js';
|
|
7
|
-
import { DefaultFoldButton } from '../Foldable/DefaultFoldButton.js';
|
|
8
|
-
import { Foldable } from '../Foldable/Foldable.js';
|
|
9
|
-
import { FoldableSection } from '../Foldable/FoldableSection.js';
|
|
10
|
-
import { NotFound } from '../NotFound/NotFound.js';
|
|
11
|
-
const ICONS = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
12
|
-
const resultsGridStyle = 'space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box';
|
|
13
|
-
export const BaseFiltrationInner = JSX(({ label = '', blocksToRender = [], topItemsCount = 0, block, notFound, ...rest }) => {
|
|
14
|
-
const [visibleBlocks, hiddenBlocks] = topItemsCount > 0
|
|
15
|
-
? [blocksToRender.slice(0, topItemsCount), blocksToRender.slice(topItemsCount)]
|
|
16
|
-
: [blocksToRender, []];
|
|
17
|
-
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 }) => {
|
|
18
|
-
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] }));
|
|
19
|
-
}, renderFoldButton: ({ isUnfolded, onToggle }) => (_jsx(DefaultFoldButton, { className: style(topItemsCount < 1 ? 'hidden' : ''), disabled: !hiddenBlocks?.length, label: label, icon: ICONS[Number(isUnfolded)], dataTheme: rest.options?.page?.colorPalette, onClick: onToggle })) })] })] }));
|
|
20
|
-
});
|
|
21
|
-
//# sourceMappingURL=BaseFiltrationInner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseFiltrationInner.js","sourceRoot":"","sources":["../../../src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAIxD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,MAAM,KAAK,GAAe,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;AAE3D,MAAM,gBAAgB,GAAG,oEAAoE,CAAC;AAM9F,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CACpC,CAAC,EAAE,KAAK,GAAG,EAAE,EAAE,cAAc,GAAG,EAAE,EAAE,aAAa,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACnF,MAAM,CAAC,aAAa,EAAE,YAAY,CAAC,GACjC,aAAa,GAAG,CAAC;QACf,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QAC/E,CAAC,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;IAE3B,OAAO,CACL,0BACE,cAAK,SAAS,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,YAC9D,QAAQ,CAAC,CAAC,CAAC,KAAC,QAAQ,OAAK,QAAQ,GAAI,CAAC,CAAC,CAAC,IAAI,GACzC,EACN,eAAK,SAAS,EAAE,KAAK,CAAC,aAAa,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,aACzE,eAAK,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,aACpC,gBAAgB,CAAC,aAAa,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EACnE,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAC,MAAM,IAAC,SAAS,EAAC,YAAY,KAAK,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,IAC7E,EACN,KAAC,QAAQ,IACP,qBAAqB,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE;4BACxC,OAAO,CACL,MAAC,eAAe,IAAC,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,EAAE,UAAU,EAAE,UAAU,aACxE,gBAAgB,CAAC,YAAY,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAClE,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAC,MAAM,IAAC,SAAS,EAAC,YAAY,KAAK,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,IAChE,CACnB,CAAC;wBACJ,CAAC,EACD,gBAAgB,EAAE,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAC9C,KAAC,iBAAiB,IAChB,SAAS,EAAE,KAAK,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EACnD,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,EAC/B,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAC/B,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,YAAY,EAC3C,OAAO,EAAE,QAAQ,GACjB,CACH,GACD,IACE,IACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type BlockDef } from '../../model/ContentPageDef';
|
|
2
|
-
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
3
|
-
import { type BaseFiltrationInnerContent } from './BaseFiltrationContent';
|
|
4
|
-
interface BaseFiltrationInnerProps extends BaseFiltrationInnerContent, UniBlockProps {
|
|
5
|
-
blocksToRender?: BlockDef[];
|
|
6
|
-
}
|
|
7
|
-
export declare const BaseFiltrationInner: import("@redneckz/uni-jsx").UNIComponent<BaseFiltrationInnerProps, any, any>;
|
|
8
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type BlockDef } from '../../model/ContentPageDef';
|
|
2
|
-
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
3
|
-
import { type BaseFiltrationInnerContent } from './BaseFiltrationContent';
|
|
4
|
-
interface BaseFiltrationInnerProps extends BaseFiltrationInnerContent, UniBlockProps {
|
|
5
|
-
blocksToRender?: BlockDef[];
|
|
6
|
-
}
|
|
7
|
-
export declare const BaseFiltrationInner: import("@redneckz/uni-jsx").UNIComponent<BaseFiltrationInnerProps, any, any>;
|
|
8
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.BaseFiltrationInner = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const renderBlockList_1 = require("../../BlockRenderer/renderBlockList");
|
|
6
|
-
const AdTile_1 = require("../../components/AdTile/AdTile");
|
|
7
|
-
const isOdd_1 = require("../../utils/isOdd");
|
|
8
|
-
const style_1 = require("../../utils/style");
|
|
9
|
-
const DefaultFoldButton_1 = require("../Foldable/DefaultFoldButton");
|
|
10
|
-
const Foldable_1 = require("../Foldable/Foldable");
|
|
11
|
-
const FoldableSection_1 = require("../Foldable/FoldableSection");
|
|
12
|
-
const NotFound_1 = require("../NotFound/NotFound");
|
|
13
|
-
const ICONS = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
14
|
-
const resultsGridStyle = 'space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box';
|
|
15
|
-
exports.BaseFiltrationInner = (0, uni_jsx_1.JSX)(({ label = '', blocksToRender = [], topItemsCount = 0, block, notFound, ...rest }) => {
|
|
16
|
-
const [visibleBlocks, hiddenBlocks] = topItemsCount > 0
|
|
17
|
-
? [blocksToRender.slice(0, topItemsCount), blocksToRender.slice(topItemsCount)]
|
|
18
|
-
: [blocksToRender, []];
|
|
19
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)(blocksToRender.length ? 'hidden' : 'block'), children: notFound ? (0, jsx_runtime_1.jsx)(NotFound_1.NotFound, { ...notFound }) : null }), (0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)('space-y-2xs', blocksToRender.length ? '' : 'hidden'), children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)(resultsGridStyle), children: [(0, renderBlockList_1.renderBlocksList)(visibleBlocks, { ...rest.options, parent: block }), (0, isOdd_1.isOdd)(visibleBlocks.length) ? (0, jsx_runtime_1.jsx)(AdTile_1.AdTile, { className: "col-span-6", ...rest }) : null] }), (0, jsx_runtime_1.jsx)(Foldable_1.Foldable, { renderFoldableSection: ({ isUnfolded }) => {
|
|
20
|
-
return ((0, jsx_runtime_1.jsxs)(FoldableSection_1.FoldableSection, { className: (0, style_1.style)(resultsGridStyle), isUnfolded: isUnfolded, children: [(0, renderBlockList_1.renderBlocksList)(hiddenBlocks, { ...rest.options, parent: block }), (0, isOdd_1.isOdd)(hiddenBlocks.length) ? (0, jsx_runtime_1.jsx)(AdTile_1.AdTile, { className: "col-span-6", ...rest }) : null] }));
|
|
21
|
-
}, renderFoldButton: ({ isUnfolded, onToggle }) => ((0, jsx_runtime_1.jsx)(DefaultFoldButton_1.DefaultFoldButton, { className: (0, style_1.style)(topItemsCount < 1 ? 'hidden' : ''), disabled: !hiddenBlocks?.length, label: label, icon: ICONS[Number(isUnfolded)], dataTheme: rest.options?.page?.colorPalette, onClick: onToggle })) })] })] }));
|
|
22
|
-
});
|
|
23
|
-
//# sourceMappingURL=BaseFiltrationInner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseFiltrationInner.js","sourceRoot":"","sources":["../../../src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,yEAAuE;AACvE,2DAAwD;AAIxD,6CAA0C;AAC1C,6CAA0C;AAC1C,qEAAkE;AAClE,mDAAgD;AAChD,iEAA8D;AAC9D,mDAAgD;AAGhD,MAAM,KAAK,GAAe,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;AAE3D,MAAM,gBAAgB,GAAG,oEAAoE,CAAC;AAMjF,QAAA,mBAAmB,GAAG,IAAA,aAAG,EACpC,CAAC,EAAE,KAAK,GAAG,EAAE,EAAE,cAAc,GAAG,EAAE,EAAE,aAAa,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACnF,MAAM,CAAC,aAAa,EAAE,YAAY,CAAC,GACjC,aAAa,GAAG,CAAC;QACf,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QAC/E,CAAC,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;IAE3B,OAAO,CACL,4CACE,gCAAK,SAAS,EAAE,IAAA,aAAK,EAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,YAC9D,QAAQ,CAAC,CAAC,CAAC,uBAAC,mBAAQ,OAAK,QAAQ,GAAI,CAAC,CAAC,CAAC,IAAI,GACzC,EACN,iCAAK,SAAS,EAAE,IAAA,aAAK,EAAC,aAAa,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,aACzE,iCAAK,SAAS,EAAE,IAAA,aAAK,EAAC,gBAAgB,CAAC,aACpC,IAAA,kCAAgB,EAAC,aAAa,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EACnE,IAAA,aAAK,EAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,uBAAC,eAAM,IAAC,SAAS,EAAC,YAAY,KAAK,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,IAC7E,EACN,uBAAC,mBAAQ,IACP,qBAAqB,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE;4BACxC,OAAO,CACL,wBAAC,iCAAe,IAAC,SAAS,EAAE,IAAA,aAAK,EAAC,gBAAgB,CAAC,EAAE,UAAU,EAAE,UAAU,aACxE,IAAA,kCAAgB,EAAC,YAAY,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAClE,IAAA,aAAK,EAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,uBAAC,eAAM,IAAC,SAAS,EAAC,YAAY,KAAK,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,IAChE,CACnB,CAAC;wBACJ,CAAC,EACD,gBAAgB,EAAE,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAC9C,uBAAC,qCAAiB,IAChB,SAAS,EAAE,IAAA,aAAK,EAAC,aAAa,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EACnD,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,EAC/B,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAC/B,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,YAAY,EAC3C,OAAO,EAAE,QAAQ,GACjB,CACH,GACD,IACE,IACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|