@redneckz/wildless-cms-uni-blocks 0.8.28 → 0.8.30
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.8.29.js +41 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +127 -97
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +2 -3
- package/bundle/components/ImgBlock/ImgBlockContent.d.ts +1 -1
- package/bundle/components/StepsBlock/StepsBlockContent.d.ts +4 -1
- package/bundle/components/TariffsTable/TariffsTableContent.d.ts +3 -3
- package/bundle/components/TextBlock/TextBlockContent.d.ts +2 -7
- package/bundle/{services/sitemap → hooks}/fallbackWCMSResource.d.ts +1 -1
- package/bundle/hooks/useLink.d.ts +1 -1
- package/bundle/services/{sitemap/search → search}/jaroWinklerDistance.d.ts +0 -0
- package/bundle/services/{sitemap/search → search}/joinMaps.d.ts +0 -0
- package/bundle/services/{sitemap/search → search}/search.d.ts +0 -0
- package/bundle/services/{sitemap/search → search}/textRank.d.ts +0 -0
- package/bundle/services/{sitemap/search → search}/tokenize.d.ts +0 -0
- package/{dist/services/sitemap → bundle/services/search}/useSearch.d.ts +1 -1
- package/bundle/ui-kit/Button/ButtonProps.d.ts +2 -3
- package/bundle/ui-kit/Dialog/CloseButton.d.ts +7 -0
- package/bundle/ui-kit/Dialog/Dialog.d.ts +7 -0
- package/bundle/ui-kit/Location/LocationProps.d.ts +2 -2
- package/bundle/{model → ui-kit}/PreventableEvent.d.ts +0 -0
- package/bundle/ui-kit/SearchBar/SearchBarInner.d.ts +2 -3
- package/bundle/ui-kit/SearchBar/SearchBarInput.d.ts +9 -0
- package/bundle/{components/Footer → ui-kit/Sitemap}/Sitemap.d.ts +2 -2
- package/bundle/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/dist/components/Blocks.js +0 -2
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Footer/Footer.fallback.js +1 -1
- package/dist/components/Footer/Footer.fallback.js.map +1 -1
- package/dist/components/Footer/Footer.js +2 -21
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Header/Header.fallback.js +1 -1
- package/dist/components/Header/Header.fallback.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.js +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenuButton.d.ts +2 -3
- package/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/dist/components/ImgBlock/ImgBlockContent.d.ts +1 -1
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +4 -1
- package/dist/components/TariffsTable/TariffsTableContent.d.ts +3 -3
- package/dist/components/TextBlock/TextBlockContent.d.ts +2 -7
- package/dist/{services/sitemap → hooks}/fallbackWCMSResource.d.ts +1 -1
- package/dist/{services/sitemap → hooks}/fallbackWCMSResource.js +0 -0
- package/dist/hooks/fallbackWCMSResource.js.map +1 -0
- package/dist/hooks/useLink.d.ts +1 -1
- package/dist/services/{sitemap/search → search}/jaroWinklerDistance.d.ts +0 -0
- package/dist/services/{sitemap/search → search}/jaroWinklerDistance.js +0 -0
- package/dist/services/search/jaroWinklerDistance.js.map +1 -0
- package/dist/services/{sitemap/search → search}/joinMaps.d.ts +0 -0
- package/dist/services/{sitemap/search → search}/joinMaps.js +0 -0
- package/dist/services/search/joinMaps.js.map +1 -0
- package/dist/services/{sitemap/search → search}/search.d.ts +0 -0
- package/{mobile/dist/services/sitemap → dist/services}/search/search.js +2 -2
- package/dist/services/search/search.js.map +1 -0
- package/dist/services/{sitemap/search → search}/textRank.d.ts +0 -0
- package/{mobile/dist/services/sitemap → dist/services}/search/textRank.js +2 -2
- package/dist/services/search/textRank.js.map +1 -0
- package/dist/services/{sitemap/search → search}/tokenize.d.ts +0 -0
- package/dist/services/{sitemap/search → search}/tokenize.js +0 -0
- package/dist/services/search/tokenize.js.map +1 -0
- package/{lib/services/sitemap → dist/services/search}/useSearch.d.ts +1 -1
- package/{mobile/dist/services/sitemap → dist/services/search}/useSearch.js +1 -1
- package/dist/services/search/useSearch.js.map +1 -0
- package/dist/ui-kit/Button/ButtonProps.d.ts +2 -3
- package/dist/ui-kit/Dialog/CloseButton.d.ts +7 -0
- package/dist/ui-kit/Dialog/CloseButton.js +8 -0
- package/dist/ui-kit/Dialog/CloseButton.js.map +1 -0
- package/dist/ui-kit/Dialog/Dialog.d.ts +7 -0
- package/dist/ui-kit/Dialog/Dialog.js +26 -0
- package/dist/ui-kit/Dialog/Dialog.js.map +1 -0
- package/dist/ui-kit/Location/Location.js +9 -11
- package/dist/ui-kit/Location/Location.js.map +1 -1
- package/dist/ui-kit/Location/LocationProps.d.ts +2 -2
- package/dist/{model → ui-kit}/PreventableEvent.d.ts +0 -0
- package/dist/{model → ui-kit}/PreventableEvent.js +0 -0
- package/dist/ui-kit/PreventableEvent.js.map +1 -0
- package/dist/ui-kit/SearchBar/SearchBarInner.d.ts +2 -3
- package/dist/ui-kit/SearchBar/SearchBarInner.js +46 -14
- package/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/dist/ui-kit/SearchBar/SearchBarInput.d.ts +9 -0
- package/dist/ui-kit/SearchBar/SearchBarInput.js +14 -0
- package/dist/ui-kit/SearchBar/SearchBarInput.js.map +1 -0
- package/{lib/components/Footer → dist/ui-kit/Sitemap}/Sitemap.d.ts +2 -2
- package/dist/ui-kit/Sitemap/Sitemap.js +23 -0
- package/dist/ui-kit/Sitemap/Sitemap.js.map +1 -0
- package/dist/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/dist/utils/groupBy.js +6 -6
- package/dist/utils/groupBy.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/lib/components/Blocks.js +0 -2
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Footer/Footer.fallback.js +1 -1
- package/lib/components/Footer/Footer.fallback.js.map +1 -1
- package/lib/components/Footer/Footer.js +2 -21
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Header/Header.fallback.js +1 -1
- package/lib/components/Header/Header.fallback.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.js +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenuButton.d.ts +2 -3
- package/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/lib/components/ImgBlock/ImgBlockContent.d.ts +1 -1
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +4 -1
- package/lib/components/TariffsTable/TariffsTableContent.d.ts +3 -3
- package/lib/components/TextBlock/TextBlockContent.d.ts +2 -7
- package/lib/{services/sitemap → hooks}/fallbackWCMSResource.d.ts +1 -1
- package/lib/{services/sitemap → hooks}/fallbackWCMSResource.js +0 -0
- package/lib/hooks/fallbackWCMSResource.js.map +1 -0
- package/lib/hooks/useLink.d.ts +1 -1
- package/lib/services/{sitemap/search → search}/jaroWinklerDistance.d.ts +0 -0
- package/lib/services/{sitemap/search → search}/jaroWinklerDistance.js +0 -0
- package/lib/services/search/jaroWinklerDistance.js.map +1 -0
- package/lib/services/{sitemap/search → search}/joinMaps.d.ts +0 -0
- package/lib/services/{sitemap/search → search}/joinMaps.js +0 -0
- package/lib/services/search/joinMaps.js.map +1 -0
- package/lib/services/{sitemap/search → search}/search.d.ts +0 -0
- package/lib/services/{sitemap/search → search}/search.js +2 -2
- package/lib/services/search/search.js.map +1 -0
- package/lib/services/{sitemap/search → search}/textRank.d.ts +0 -0
- package/{mobile/lib/services/sitemap → lib/services}/search/textRank.js +2 -2
- package/lib/services/search/textRank.js.map +1 -0
- package/lib/services/{sitemap/search → search}/tokenize.d.ts +0 -0
- package/lib/services/{sitemap/search → search}/tokenize.js +0 -0
- package/lib/services/search/tokenize.js.map +1 -0
- package/{mobile/bundle/services/sitemap → lib/services/search}/useSearch.d.ts +1 -1
- package/lib/services/{sitemap → search}/useSearch.js +1 -1
- package/lib/services/search/useSearch.js.map +1 -0
- package/lib/ui-kit/Button/ButtonProps.d.ts +2 -3
- package/lib/ui-kit/Dialog/CloseButton.d.ts +7 -0
- package/lib/ui-kit/Dialog/CloseButton.js +6 -0
- package/lib/ui-kit/Dialog/CloseButton.js.map +1 -0
- package/lib/ui-kit/Dialog/Dialog.d.ts +7 -0
- package/lib/ui-kit/Dialog/Dialog.js +24 -0
- package/lib/ui-kit/Dialog/Dialog.js.map +1 -0
- package/lib/ui-kit/Location/Location.js +9 -11
- package/lib/ui-kit/Location/Location.js.map +1 -1
- package/lib/ui-kit/Location/LocationProps.d.ts +2 -2
- package/lib/{model → ui-kit}/PreventableEvent.d.ts +0 -0
- package/lib/{model → ui-kit}/PreventableEvent.js +0 -0
- package/lib/ui-kit/PreventableEvent.js.map +1 -0
- package/lib/ui-kit/SearchBar/SearchBarInner.d.ts +2 -3
- package/lib/ui-kit/SearchBar/SearchBarInner.js +46 -14
- package/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/lib/ui-kit/SearchBar/SearchBarInput.d.ts +9 -0
- package/lib/ui-kit/SearchBar/SearchBarInput.js +12 -0
- package/lib/ui-kit/SearchBar/SearchBarInput.js.map +1 -0
- package/{mobile/bundle/components/Footer → lib/ui-kit/Sitemap}/Sitemap.d.ts +2 -2
- package/lib/ui-kit/Sitemap/Sitemap.js +21 -0
- package/lib/ui-kit/Sitemap/Sitemap.js.map +1 -0
- package/lib/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/lib/utils/groupBy.js +6 -6
- package/lib/utils/groupBy.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +248 -13
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +2 -3
- package/mobile/bundle/components/ImgBlock/ImgBlockContent.d.ts +1 -1
- package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +4 -1
- package/mobile/bundle/components/TariffsTable/TariffsTableContent.d.ts +3 -3
- package/mobile/bundle/components/TextBlock/TextBlockContent.d.ts +2 -7
- package/mobile/bundle/{services/sitemap → hooks}/fallbackWCMSResource.d.ts +1 -1
- package/mobile/bundle/hooks/useLink.d.ts +1 -1
- package/mobile/bundle/services/{sitemap/search → search}/jaroWinklerDistance.d.ts +0 -0
- package/mobile/bundle/services/{sitemap/search → search}/joinMaps.d.ts +0 -0
- package/mobile/bundle/services/{sitemap/search → search}/search.d.ts +0 -0
- package/mobile/bundle/services/{sitemap/search → search}/textRank.d.ts +0 -0
- package/mobile/bundle/services/{sitemap/search → search}/tokenize.d.ts +0 -0
- package/{bundle/services/sitemap → mobile/bundle/services/search}/useSearch.d.ts +1 -1
- package/mobile/bundle/ui-kit/Button/ButtonProps.d.ts +2 -3
- package/mobile/bundle/ui-kit/Dialog/CloseButton.d.ts +7 -0
- package/mobile/bundle/ui-kit/Dialog/Dialog.d.ts +7 -0
- package/mobile/bundle/ui-kit/Location/LocationProps.d.ts +2 -2
- package/mobile/bundle/{model → ui-kit}/PreventableEvent.d.ts +0 -0
- package/mobile/bundle/ui-kit/SearchBar/SearchBarInner.d.ts +2 -3
- package/mobile/bundle/ui-kit/SearchBar/SearchBarInput.d.ts +9 -0
- package/{dist/components/Footer → mobile/bundle/ui-kit/Sitemap}/Sitemap.d.ts +2 -2
- package/mobile/bundle/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.fallback.js +1 -1
- package/mobile/dist/components/Footer/Footer.fallback.js.map +1 -1
- package/mobile/dist/components/Header/Header.fallback.js +1 -1
- package/mobile/dist/components/Header/Header.fallback.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.d.ts +2 -3
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/mobile/dist/components/ImgBlock/ImgBlockContent.d.ts +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +4 -1
- package/mobile/dist/components/TariffsTable/TariffsTableContent.d.ts +3 -3
- package/mobile/dist/components/TextBlock/TextBlockContent.d.ts +2 -7
- package/mobile/dist/hooks/fallbackWCMSResource.d.ts +2 -0
- package/mobile/dist/{services/sitemap → hooks}/fallbackWCMSResource.js +0 -0
- package/mobile/dist/hooks/fallbackWCMSResource.js.map +1 -0
- package/mobile/dist/hooks/useLink.d.ts +1 -1
- package/mobile/dist/services/{sitemap/search → search}/jaroWinklerDistance.d.ts +0 -0
- package/mobile/dist/services/{sitemap/search → search}/jaroWinklerDistance.js +0 -0
- package/mobile/dist/services/search/jaroWinklerDistance.js.map +1 -0
- package/mobile/dist/services/{sitemap/search → search}/joinMaps.d.ts +0 -0
- package/mobile/dist/services/{sitemap/search → search}/joinMaps.js +0 -0
- package/mobile/dist/services/search/joinMaps.js.map +1 -0
- package/mobile/dist/services/{sitemap/search → search}/search.d.ts +0 -0
- package/{dist/services/sitemap → mobile/dist/services}/search/search.js +2 -2
- package/mobile/dist/services/search/search.js.map +1 -0
- package/mobile/dist/services/{sitemap/search → search}/textRank.d.ts +0 -0
- package/{dist/services/sitemap → mobile/dist/services}/search/textRank.js +2 -2
- package/mobile/dist/services/search/textRank.js.map +1 -0
- package/mobile/dist/services/{sitemap/search → search}/tokenize.d.ts +0 -0
- package/mobile/dist/services/{sitemap/search → search}/tokenize.js +0 -0
- package/mobile/dist/services/search/tokenize.js.map +1 -0
- package/mobile/dist/services/search/useSearch.d.ts +8 -0
- package/{dist/services/sitemap → mobile/dist/services/search}/useSearch.js +1 -1
- package/mobile/dist/services/search/useSearch.js.map +1 -0
- package/mobile/dist/ui-kit/Button/ButtonProps.d.ts +2 -3
- package/mobile/dist/ui-kit/Dialog/CloseButton.d.ts +7 -0
- package/mobile/dist/ui-kit/Dialog/CloseButton.js +8 -0
- package/mobile/dist/ui-kit/Dialog/CloseButton.js.map +1 -0
- package/mobile/dist/ui-kit/Dialog/Dialog.d.ts +7 -0
- package/mobile/dist/ui-kit/Dialog/Dialog.js +26 -0
- package/mobile/dist/ui-kit/Dialog/Dialog.js.map +1 -0
- package/mobile/dist/ui-kit/Location/Location.js +9 -11
- package/mobile/dist/ui-kit/Location/Location.js.map +1 -1
- package/mobile/dist/ui-kit/Location/LocationProps.d.ts +2 -2
- package/mobile/dist/{model → ui-kit}/PreventableEvent.d.ts +0 -0
- package/mobile/dist/{model → ui-kit}/PreventableEvent.js +0 -0
- package/mobile/dist/ui-kit/PreventableEvent.js.map +1 -0
- package/mobile/dist/ui-kit/SearchBar/SearchBarInner.d.ts +2 -3
- package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js +46 -14
- package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBarInput.d.ts +9 -0
- package/mobile/dist/ui-kit/SearchBar/SearchBarInput.js +14 -0
- package/mobile/dist/ui-kit/SearchBar/SearchBarInput.js.map +1 -0
- package/mobile/dist/ui-kit/Sitemap/Sitemap.d.ts +6 -0
- package/mobile/dist/ui-kit/Sitemap/Sitemap.js +23 -0
- package/mobile/dist/ui-kit/Sitemap/Sitemap.js.map +1 -0
- package/mobile/dist/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/mobile/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/dist/utils/groupBy.js +6 -6
- package/mobile/dist/utils/groupBy.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.fallback.js +1 -1
- package/mobile/lib/components/Footer/Footer.fallback.js.map +1 -1
- package/mobile/lib/components/Header/Header.fallback.js +1 -1
- package/mobile/lib/components/Header/Header.fallback.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.d.ts +2 -3
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/mobile/lib/components/ImgBlock/ImgBlockContent.d.ts +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +4 -1
- package/mobile/lib/components/TariffsTable/TariffsTableContent.d.ts +3 -3
- package/mobile/lib/components/TextBlock/TextBlockContent.d.ts +2 -7
- package/mobile/lib/hooks/fallbackWCMSResource.d.ts +2 -0
- package/mobile/lib/{services/sitemap → hooks}/fallbackWCMSResource.js +0 -0
- package/mobile/lib/hooks/fallbackWCMSResource.js.map +1 -0
- package/mobile/lib/hooks/useLink.d.ts +1 -1
- package/mobile/lib/services/{sitemap/search → search}/jaroWinklerDistance.d.ts +0 -0
- package/mobile/lib/services/{sitemap/search → search}/jaroWinklerDistance.js +0 -0
- package/mobile/lib/services/search/jaroWinklerDistance.js.map +1 -0
- package/mobile/lib/services/{sitemap/search → search}/joinMaps.d.ts +0 -0
- package/mobile/lib/services/{sitemap/search → search}/joinMaps.js +0 -0
- package/mobile/lib/services/search/joinMaps.js.map +1 -0
- package/mobile/lib/services/{sitemap/search → search}/search.d.ts +0 -0
- package/mobile/lib/services/{sitemap/search → search}/search.js +2 -2
- package/mobile/lib/services/search/search.js.map +1 -0
- package/mobile/lib/services/{sitemap/search → search}/textRank.d.ts +0 -0
- package/{lib/services/sitemap → mobile/lib/services}/search/textRank.js +2 -2
- package/mobile/lib/services/search/textRank.js.map +1 -0
- package/mobile/lib/services/{sitemap/search → search}/tokenize.d.ts +0 -0
- package/mobile/lib/services/{sitemap/search → search}/tokenize.js +0 -0
- package/mobile/lib/services/search/tokenize.js.map +1 -0
- package/mobile/lib/services/search/useSearch.d.ts +8 -0
- package/mobile/lib/services/{sitemap → search}/useSearch.js +1 -1
- package/mobile/lib/services/search/useSearch.js.map +1 -0
- package/mobile/lib/ui-kit/Button/ButtonProps.d.ts +2 -3
- package/mobile/lib/ui-kit/Dialog/CloseButton.d.ts +7 -0
- package/mobile/lib/ui-kit/Dialog/CloseButton.js +6 -0
- package/mobile/lib/ui-kit/Dialog/CloseButton.js.map +1 -0
- package/mobile/lib/ui-kit/Dialog/Dialog.d.ts +7 -0
- package/mobile/lib/ui-kit/Dialog/Dialog.js +24 -0
- package/mobile/lib/ui-kit/Dialog/Dialog.js.map +1 -0
- package/mobile/lib/ui-kit/Location/Location.js +9 -11
- package/mobile/lib/ui-kit/Location/Location.js.map +1 -1
- package/mobile/lib/ui-kit/Location/LocationProps.d.ts +2 -2
- package/mobile/lib/{model → ui-kit}/PreventableEvent.d.ts +0 -0
- package/mobile/lib/{model → ui-kit}/PreventableEvent.js +0 -0
- package/mobile/lib/ui-kit/PreventableEvent.js.map +1 -0
- package/mobile/lib/ui-kit/SearchBar/SearchBarInner.d.ts +2 -3
- package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js +46 -14
- package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBarInput.d.ts +9 -0
- package/mobile/lib/ui-kit/SearchBar/SearchBarInput.js +12 -0
- package/mobile/lib/ui-kit/SearchBar/SearchBarInput.js.map +1 -0
- package/mobile/lib/ui-kit/Sitemap/Sitemap.d.ts +6 -0
- package/mobile/lib/ui-kit/Sitemap/Sitemap.js +21 -0
- package/mobile/lib/ui-kit/Sitemap/Sitemap.js.map +1 -0
- package/mobile/lib/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/mobile/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/lib/utils/groupBy.js +6 -6
- package/mobile/lib/utils/groupBy.js.map +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormDeposit.tsx +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormWed.tsx +1 -1
- package/mobile/src/components/Footer/Footer.fallback.ts +1 -1
- package/mobile/src/components/Header/Header.fallback.ts +1 -1
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +2 -2
- package/mobile/src/components/Header/HeaderSecondaryMenuButton.tsx +2 -1
- package/mobile/src/components/ImgBlock/ImgBlockContent.ts +1 -1
- package/mobile/src/components/StepsBlock/StepsBlockContent.ts +4 -1
- package/mobile/src/components/TariffsTable/TariffsTableContent.ts +4 -3
- package/mobile/src/components/TextBlock/TextBlockContent.ts +3 -8
- package/mobile/src/{services/sitemap → hooks}/fallbackWCMSResource.ts +1 -1
- package/mobile/src/hooks/useLink.ts +1 -1
- package/mobile/src/services/{sitemap/search → search}/jaroWinklerDistance.ts +0 -0
- package/mobile/src/services/{sitemap/search → search}/joinMaps.ts +0 -0
- package/mobile/src/services/{sitemap/search → search}/search.ts +2 -2
- package/mobile/src/services/{sitemap/search → search}/textRank.ts +2 -2
- package/mobile/src/services/{sitemap/search → search}/tokenize.ts +0 -0
- package/{src/services/sitemap → mobile/src/services/search}/useSearch.ts +1 -1
- package/mobile/src/ui-kit/Button/ButtonProps.ts +2 -1
- package/mobile/src/ui-kit/Dialog/CloseButton.tsx +22 -0
- package/mobile/src/ui-kit/Dialog/Dialog.tsx +54 -0
- package/mobile/src/ui-kit/Location/Location.tsx +36 -44
- package/mobile/src/ui-kit/Location/LocationProps.ts +2 -2
- package/mobile/src/{model → ui-kit}/PreventableEvent.ts +0 -0
- package/mobile/src/ui-kit/SearchBar/SearchBarInner.tsx +100 -63
- package/mobile/src/ui-kit/SearchBar/SearchBarInput.tsx +46 -0
- package/mobile/src/{components/Footer → ui-kit/Sitemap}/Sitemap.tsx +12 -8
- package/mobile/src/ui-kit/TopItem/TopItem.tsx +1 -1
- package/mobile/src/utils/groupBy.ts +8 -7
- package/package.json +2 -2
- package/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationFormCredit.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationFormDeposit.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationFormWed.tsx +1 -1
- package/src/components/Blocks.ts +0 -2
- package/src/components/Footer/Footer.fallback.ts +1 -1
- package/src/components/Footer/Footer.tsx +3 -31
- package/src/components/Header/Header.fallback.ts +1 -1
- package/src/components/Header/HeaderSecondaryMenu.tsx +2 -2
- package/src/components/Header/HeaderSecondaryMenuButton.tsx +2 -1
- package/src/components/ImgBlock/ImgBlockContent.ts +1 -1
- package/src/components/StepsBlock/StepsBlockContent.ts +4 -1
- package/src/components/TariffsTable/TariffsTableContent.ts +4 -3
- package/src/components/TextBlock/TextBlock.fixture.mobile.tsx +11 -20
- package/src/components/TextBlock/TextBlockContent.ts +3 -8
- package/src/{services/sitemap → hooks}/fallbackWCMSResource.ts +1 -1
- package/src/hooks/useLink.ts +1 -1
- package/src/services/{sitemap/search → search}/jaroWinklerDistance.ts +0 -0
- package/src/services/{sitemap/search → search}/joinMaps.ts +0 -0
- package/src/services/{sitemap/search → search}/search.ts +2 -2
- package/src/services/{sitemap/search → search}/textRank.ts +2 -2
- package/src/services/{sitemap/search → search}/tokenize.ts +0 -0
- package/{mobile/src/services/sitemap → src/services/search}/useSearch.ts +1 -1
- package/src/ui-kit/Button/ButtonProps.ts +2 -1
- package/src/ui-kit/Dialog/CloseButton.tsx +22 -0
- package/src/ui-kit/Dialog/Dialog.tsx +54 -0
- package/src/ui-kit/Location/Location.fixture.tsx +1 -1
- package/src/ui-kit/Location/Location.tsx +36 -44
- package/src/ui-kit/Location/LocationProps.ts +2 -2
- package/src/{model → ui-kit}/PreventableEvent.ts +0 -0
- package/src/ui-kit/SearchBar/SearchBarInner.tsx +100 -63
- package/src/ui-kit/SearchBar/SearchBarInput.tsx +46 -0
- package/src/{components/Footer → ui-kit/Sitemap}/Sitemap.tsx +12 -8
- package/src/ui-kit/TopItem/TopItem.tsx +1 -1
- package/src/utils/groupBy.ts +8 -7
- package/bundle/components/OtherProducts/OtherProducts.d.ts +0 -5
- package/bundle/components/OtherProducts/OtherProductsContent.d.ts +0 -8
- package/bundle/model/SitemapProps.d.ts +0 -24
- package/dist/components/Footer/Sitemap.js +0 -22
- package/dist/components/Footer/Sitemap.js.map +0 -1
- package/dist/components/OtherProducts/OtherProducts.d.ts +0 -5
- package/dist/components/OtherProducts/OtherProducts.js +0 -9
- package/dist/components/OtherProducts/OtherProducts.js.map +0 -1
- package/dist/components/OtherProducts/OtherProductsContent.d.ts +0 -8
- package/dist/components/OtherProducts/OtherProductsContent.js +0 -2
- package/dist/components/OtherProducts/OtherProductsContent.js.map +0 -1
- package/dist/model/PreventableEvent.js.map +0 -1
- package/dist/model/SitemapProps.d.ts +0 -24
- package/dist/model/SitemapProps.js +0 -2
- package/dist/model/SitemapProps.js.map +0 -1
- package/dist/services/sitemap/fallbackWCMSResource.js.map +0 -1
- package/dist/services/sitemap/search/jaroWinklerDistance.js.map +0 -1
- package/dist/services/sitemap/search/joinMaps.js.map +0 -1
- package/dist/services/sitemap/search/search.js.map +0 -1
- package/dist/services/sitemap/search/textRank.js.map +0 -1
- package/dist/services/sitemap/search/tokenize.js.map +0 -1
- package/dist/services/sitemap/useSearch.js.map +0 -1
- package/lib/components/Footer/Sitemap.js +0 -20
- package/lib/components/Footer/Sitemap.js.map +0 -1
- package/lib/components/OtherProducts/OtherProducts.d.ts +0 -5
- package/lib/components/OtherProducts/OtherProducts.fixture.d.ts +0 -8
- package/lib/components/OtherProducts/OtherProducts.js +0 -7
- package/lib/components/OtherProducts/OtherProducts.js.map +0 -1
- package/lib/components/OtherProducts/OtherProductsContent.d.ts +0 -8
- package/lib/components/OtherProducts/OtherProductsContent.js +0 -2
- package/lib/components/OtherProducts/OtherProductsContent.js.map +0 -1
- package/lib/model/PreventableEvent.js.map +0 -1
- package/lib/model/SitemapProps.d.ts +0 -24
- package/lib/model/SitemapProps.js +0 -2
- package/lib/model/SitemapProps.js.map +0 -1
- package/lib/services/sitemap/fallbackWCMSResource.js.map +0 -1
- package/lib/services/sitemap/search/jaroWinklerDistance.js.map +0 -1
- package/lib/services/sitemap/search/joinMaps.js.map +0 -1
- package/lib/services/sitemap/search/search.js.map +0 -1
- package/lib/services/sitemap/search/textRank.js.map +0 -1
- package/lib/services/sitemap/search/tokenize.js.map +0 -1
- package/lib/services/sitemap/useSearch.js.map +0 -1
- package/mobile/bundle/components/OtherProducts/OtherProducts.d.ts +0 -5
- package/mobile/bundle/components/OtherProducts/OtherProductsContent.d.ts +0 -8
- package/mobile/bundle/model/SitemapProps.d.ts +0 -24
- package/mobile/dist/components/Footer/Sitemap.d.ts +0 -6
- package/mobile/dist/components/Footer/Sitemap.js +0 -22
- package/mobile/dist/components/Footer/Sitemap.js.map +0 -1
- package/mobile/dist/components/OtherProducts/OtherProducts.d.ts +0 -5
- package/mobile/dist/components/OtherProducts/OtherProducts.js +0 -9
- package/mobile/dist/components/OtherProducts/OtherProducts.js.map +0 -1
- package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +0 -8
- package/mobile/dist/components/OtherProducts/OtherProductsContent.js +0 -2
- package/mobile/dist/components/OtherProducts/OtherProductsContent.js.map +0 -1
- package/mobile/dist/model/PreventableEvent.js.map +0 -1
- package/mobile/dist/model/SitemapProps.d.ts +0 -24
- package/mobile/dist/model/SitemapProps.js +0 -2
- package/mobile/dist/model/SitemapProps.js.map +0 -1
- package/mobile/dist/services/sitemap/fallbackWCMSResource.d.ts +0 -2
- package/mobile/dist/services/sitemap/fallbackWCMSResource.js.map +0 -1
- package/mobile/dist/services/sitemap/search/jaroWinklerDistance.js.map +0 -1
- package/mobile/dist/services/sitemap/search/joinMaps.js.map +0 -1
- package/mobile/dist/services/sitemap/search/search.js.map +0 -1
- package/mobile/dist/services/sitemap/search/textRank.js.map +0 -1
- package/mobile/dist/services/sitemap/search/tokenize.js.map +0 -1
- package/mobile/dist/services/sitemap/useSearch.d.ts +0 -8
- package/mobile/dist/services/sitemap/useSearch.js.map +0 -1
- package/mobile/lib/components/Footer/Sitemap.d.ts +0 -6
- package/mobile/lib/components/Footer/Sitemap.js +0 -20
- package/mobile/lib/components/Footer/Sitemap.js.map +0 -1
- package/mobile/lib/components/OtherProducts/OtherProducts.d.ts +0 -5
- package/mobile/lib/components/OtherProducts/OtherProducts.js +0 -7
- package/mobile/lib/components/OtherProducts/OtherProducts.js.map +0 -1
- package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +0 -8
- package/mobile/lib/components/OtherProducts/OtherProductsContent.js +0 -2
- package/mobile/lib/components/OtherProducts/OtherProductsContent.js.map +0 -1
- package/mobile/lib/model/PreventableEvent.js.map +0 -1
- package/mobile/lib/model/SitemapProps.d.ts +0 -24
- package/mobile/lib/model/SitemapProps.js +0 -2
- package/mobile/lib/model/SitemapProps.js.map +0 -1
- package/mobile/lib/services/sitemap/fallbackWCMSResource.d.ts +0 -2
- package/mobile/lib/services/sitemap/fallbackWCMSResource.js.map +0 -1
- package/mobile/lib/services/sitemap/search/jaroWinklerDistance.js.map +0 -1
- package/mobile/lib/services/sitemap/search/joinMaps.js.map +0 -1
- package/mobile/lib/services/sitemap/search/search.js.map +0 -1
- package/mobile/lib/services/sitemap/search/textRank.js.map +0 -1
- package/mobile/lib/services/sitemap/search/tokenize.js.map +0 -1
- package/mobile/lib/services/sitemap/useSearch.d.ts +0 -8
- package/mobile/lib/services/sitemap/useSearch.js.map +0 -1
- package/mobile/src/components/OtherProducts/OtherProducts.example.json +0 -30
- package/mobile/src/components/OtherProducts/OtherProducts.tsx +0 -17
- package/mobile/src/components/OtherProducts/OtherProducts.ui.json +0 -1
- package/mobile/src/components/OtherProducts/OtherProductsContent.ts +0 -9
- package/mobile/src/model/SitemapProps.ts +0 -27
- package/src/components/OtherProducts/OtherProducts.example.json +0 -30
- package/src/components/OtherProducts/OtherProducts.fixture.tsx +0 -88
- package/src/components/OtherProducts/OtherProducts.tsx +0 -17
- package/src/components/OtherProducts/OtherProducts.ui.json +0 -1
- package/src/components/OtherProducts/OtherProductsContent.ts +0 -9
- package/src/model/SitemapProps.ts +0 -27
package/bundle/bundle.umd.js
CHANGED
|
@@ -2531,6 +2531,41 @@
|
|
|
2531
2531
|
return data || {};
|
|
2532
2532
|
}
|
|
2533
2533
|
|
|
2534
|
+
const ICON_VERSION_MAP = {
|
|
2535
|
+
'bg-white': 'color',
|
|
2536
|
+
transparent: 'white',
|
|
2537
|
+
};
|
|
2538
|
+
const SVG_COLOR = {
|
|
2539
|
+
'bg-white': 'text-primary-main',
|
|
2540
|
+
transparent: 'text-white',
|
|
2541
|
+
};
|
|
2542
|
+
const renderImage$2 = (bgColor, image, size) => {
|
|
2543
|
+
return image?.src ? (jsx(ImgInner, { image: image, className: SVG_COLOR[bgColor], width: size?.width, height: size?.height, pathPrefix: "/wcms-resources/", asSVG: true })) : (jsx(ImgInner, { image: {
|
|
2544
|
+
icon: image?.icon || 'LogoIcon',
|
|
2545
|
+
iconVersion: ICON_VERSION_MAP[bgColor],
|
|
2546
|
+
}, className: SVG_COLOR[bgColor], width: size?.width, height: size?.height, asSVG: true }));
|
|
2547
|
+
};
|
|
2548
|
+
|
|
2549
|
+
const TEXT_COLOR = {
|
|
2550
|
+
'bg-white': 'text-primary-text',
|
|
2551
|
+
transparent: 'text-white',
|
|
2552
|
+
};
|
|
2553
|
+
const renderTitle$3 = (title, bgColor, className) => {
|
|
2554
|
+
return (jsx("span", { className: `${TEXT_COLOR[bgColor]} ml-2.5 font-medium ${className || ''}`, children: title || 'Россельхозбанк' }));
|
|
2555
|
+
};
|
|
2556
|
+
|
|
2557
|
+
const Logo = JSX(({ className = '', href, logo, children = logo?.title, targetBlank, bgColor = 'bg-white', showTitle = true, }) => {
|
|
2558
|
+
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || '/', target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title || 'Россельхозбанк', children: [renderImage$2(bgColor, logo?.image, { width: '40', height: '45' }), showTitle ? renderTitle$3(children || logo?.title, bgColor) : null] }));
|
|
2559
|
+
});
|
|
2560
|
+
|
|
2561
|
+
function useBool(defaultValue = false) {
|
|
2562
|
+
const [value, setValue] = useState(defaultValue);
|
|
2563
|
+
const setTrue = useCallback(() => setValue(true), []);
|
|
2564
|
+
const setFalse = useCallback(() => setValue(false), []);
|
|
2565
|
+
const toggle = useCallback(() => setValue((_) => !_), []);
|
|
2566
|
+
return [value, { setValue, setTrue, setFalse, toggle }];
|
|
2567
|
+
}
|
|
2568
|
+
|
|
2534
2569
|
const compareBy = (indexOf) => (a, b) => indexOf(a) - indexOf(b);
|
|
2535
2570
|
const desc = (cmp) => (a, b) => -cmp(a, b);
|
|
2536
2571
|
|
|
@@ -2679,47 +2714,89 @@
|
|
|
2679
2714
|
};
|
|
2680
2715
|
const fetchSearchIndex = async (...basePathList) => (await Promise.allSettled(basePathList.map((basePath) => fetchJSON(joinPath(basePath, '/', SEARCH_INDEX_FILENAME))))).map((_) => (_.status === 'fulfilled' ? _.value : {}));
|
|
2681
2716
|
|
|
2682
|
-
const
|
|
2683
|
-
'bg-white': 'color',
|
|
2684
|
-
transparent: 'white',
|
|
2685
|
-
};
|
|
2686
|
-
const SVG_COLOR = {
|
|
2687
|
-
'bg-white': 'text-primary-main',
|
|
2688
|
-
transparent: 'text-white',
|
|
2689
|
-
};
|
|
2690
|
-
const renderImage$2 = (bgColor, image, size) => {
|
|
2691
|
-
return image?.src ? (jsx(ImgInner, { image: image, className: SVG_COLOR[bgColor], width: size?.width, height: size?.height, pathPrefix: "/wcms-resources/", asSVG: true })) : (jsx(ImgInner, { image: {
|
|
2692
|
-
icon: image?.icon || 'LogoIcon',
|
|
2693
|
-
iconVersion: ICON_VERSION_MAP[bgColor],
|
|
2694
|
-
}, className: SVG_COLOR[bgColor], width: size?.width, height: size?.height, asSVG: true }));
|
|
2695
|
-
};
|
|
2717
|
+
const CloseButton = JSX(({ className, onClick }) => (jsx("button", { className: style('visible peer-placeholder-shown:invisible w-6 h-6 p-1 bg-transparent border-none', className), onClick: onClick, title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", children: jsx(ImgInner, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
|
|
2696
2718
|
|
|
2697
|
-
const
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2719
|
+
const Dialog = JSX(({ className, head, children, onClose }) => {
|
|
2720
|
+
const handleClose = useCallback((ev) => {
|
|
2721
|
+
ev.preventDefault();
|
|
2722
|
+
onClose && onClose();
|
|
2723
|
+
}, [onClose]);
|
|
2724
|
+
useEffect(() => {
|
|
2725
|
+
const handleEscape = ({ key }) => {
|
|
2726
|
+
if (key === 'Escape') {
|
|
2727
|
+
onClose && onClose();
|
|
2728
|
+
}
|
|
2729
|
+
};
|
|
2730
|
+
globalThis.document?.addEventListener('keydown', handleEscape);
|
|
2731
|
+
return () => {
|
|
2732
|
+
globalThis.document?.removeEventListener('keydown', handleEscape);
|
|
2733
|
+
};
|
|
2734
|
+
}, [onClose]);
|
|
2735
|
+
return (jsx("div", { className: style('fixed inset-0 bg-white text-l-light z-50 overflow-x-hidden overflow-y-scroll no-scrollbar', className), role: "dialog", children: jsxs("div", { className: "relative container pb-12 min-h-full", children: [jsxs("div", { className: "sticky bg-white pt-6 top-0", children: [jsx(CloseButton, { className: "absolute top-3 -right-6", onClick: handleClose }), head] }), children] }) }));
|
|
2736
|
+
});
|
|
2737
|
+
|
|
2738
|
+
const Sitemap = JSX(({ className, topItems }) => {
|
|
2739
|
+
const link = useLink(true);
|
|
2740
|
+
return (jsx("div", { className: style('flex items-start justify-between', className), children: topItems?.map(link).map(renderColumn) }));
|
|
2741
|
+
});
|
|
2742
|
+
const renderColumn = (menuItem, index) => {
|
|
2743
|
+
const { text, items, href, target, onClick } = menuItem;
|
|
2744
|
+
return (jsxs("div", { className: "flex flex-col gap-3.5 w-1/4", children: [jsx("a", { className: "leading-5 text-l text-primary-text hover:text-primary-main no-underline", href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }), items?.map((_, i) => (jsx(ColumnItem, { ..._, basePath: href, index: i }, String(i))))] }, String(index)));
|
|
2703
2745
|
};
|
|
2746
|
+
const ColumnItem = JSX(({ text, index, basePath, ...rest }) => {
|
|
2747
|
+
const isAnotherPortal = projectSettings.BASE_PATH && basePath ? !projectSettings.BASE_PATH.startsWith(basePath) : false;
|
|
2748
|
+
const link = useLink(isAnotherPortal);
|
|
2749
|
+
const { href, target, onClick } = link(rest);
|
|
2750
|
+
return (jsx("a", { className: style('text-l-light text-secondary-text hover:text-primary-main no-underline', 'overflow-x-hidden overflow-ellipsis whitespace-nowrap'), href: isAnotherPortal ? joinPath(basePath, href) : href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }));
|
|
2751
|
+
});
|
|
2704
2752
|
|
|
2705
|
-
const
|
|
2706
|
-
|
|
2753
|
+
const SearchBarInput = JSX(({ className, isMobile, value, autoFocus, onChange, onFocus }) => {
|
|
2754
|
+
const handleChange = useCallback((ev) => {
|
|
2755
|
+
onChange && onChange(ev.target?.value || '');
|
|
2756
|
+
}, [onChange]);
|
|
2757
|
+
return (jsxs("div", { className: style('font-sans relative', className), role: "form", children: [jsx("div", { className: "absolute h-full flex items-center pl-4 pointer-events-none", children: jsx(ImgInner, { image: { icon: 'LoupeIcon' }, width: "24", height: "24" }) }), jsx("input", { className: style('h-12 pl-12 w-full text-l text-black outline-none box-border', 'border border-solid rounded-md border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text', isMobile ? '' : 'h-full'), value: value, type: "text", name: "search-bar-input", placeholder: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", autoFocus: autoFocus, onChange: handleChange, onFocus: onFocus })] }));
|
|
2707
2758
|
});
|
|
2708
2759
|
|
|
2709
|
-
const
|
|
2710
|
-
|
|
2711
|
-
const
|
|
2712
|
-
const
|
|
2713
|
-
const
|
|
2714
|
-
|
|
2715
|
-
|
|
2760
|
+
const MIN_QUERY_LEN = 3;
|
|
2761
|
+
const SearchBarInner = JSX(({ className, isMobile, topItems }) => {
|
|
2762
|
+
const basePathList = topItems?.map((_) => _.href || '/');
|
|
2763
|
+
const [searchResult, searchInputProps] = useSearch(basePathList);
|
|
2764
|
+
const { value, onChange, onFocus } = searchInputProps;
|
|
2765
|
+
const searchItems = useMemo(() => combineTopItemsAndSearchResult(topItems)(searchResult), [topItems, searchResult]);
|
|
2766
|
+
useEffect(() => printSearchItems(searchItems), [searchItems]); // Temp
|
|
2767
|
+
const [isSearchDialogOpen, { setTrue: openSearchDialog, setFalse: hideSearchDialog }] = useBool();
|
|
2768
|
+
const handleInitialInputChange = useCallback((_) => {
|
|
2769
|
+
onChange(_);
|
|
2770
|
+
if (isQueryLongEnough(_)) {
|
|
2771
|
+
openSearchDialog();
|
|
2772
|
+
}
|
|
2773
|
+
}, [onChange, isQueryLongEnough]);
|
|
2774
|
+
const handleInitialInputFocus = useCallback(() => {
|
|
2775
|
+
onFocus();
|
|
2776
|
+
if (isQueryLongEnough(value)) {
|
|
2777
|
+
openSearchDialog();
|
|
2778
|
+
}
|
|
2779
|
+
}, [value, onFocus]);
|
|
2780
|
+
return (jsxs("div", { className: className, children: [jsx(SearchBarInput, { isMobile: isMobile, value: value, onChange: handleInitialInputChange, onFocus: handleInitialInputFocus }), isMobile ? (jsx(CloseButton, { className: "absolute top-2 right-3", onClick: (e) => {
|
|
2716
2781
|
e.preventDefault();
|
|
2717
|
-
onChange
|
|
2718
|
-
}
|
|
2719
|
-
ev?.preventDefault();
|
|
2720
|
-
console.log('click');
|
|
2721
|
-
}, children: jsx("div", { className: "text-s px-9 py-2.5", children: "\u041D\u0430\u0439\u0442\u0438" }) }))] }));
|
|
2782
|
+
onChange('');
|
|
2783
|
+
} })) : null, isSearchDialogOpen ? (jsx(Dialog, { head: jsx(SearchBarInput, { className: "my-5", isMobile: isMobile, autoFocus: true, ...searchInputProps }), onClose: hideSearchDialog, children: jsx(Sitemap, { topItems: searchItems }) })) : null] }));
|
|
2722
2784
|
});
|
|
2785
|
+
const isQueryLongEnough = (_) => _ && _.length >= MIN_QUERY_LEN;
|
|
2786
|
+
const combineTopItemsAndSearchResult = (topItems) => (searchResult) => topItems?.length && searchResult?.length
|
|
2787
|
+
? zip(topItems, searchResult).map(([_, portalSearchResult]) => ({
|
|
2788
|
+
..._,
|
|
2789
|
+
items: portalSearchResult?.map(({ title, uri }) => ({ text: title, href: uri })),
|
|
2790
|
+
}))
|
|
2791
|
+
: [];
|
|
2792
|
+
// Temp
|
|
2793
|
+
function printSearchItems(topItems) {
|
|
2794
|
+
for (const _ of topItems.filter(({ items }) => items?.length)) {
|
|
2795
|
+
console.group(_.text);
|
|
2796
|
+
console.table(_.items, ['text', 'href']);
|
|
2797
|
+
console.groupEnd();
|
|
2798
|
+
}
|
|
2799
|
+
}
|
|
2723
2800
|
|
|
2724
2801
|
const SearchBar$1 = JSX((props) => jsx(SearchBarInner, { ...props }));
|
|
2725
2802
|
|
|
@@ -2750,21 +2827,6 @@
|
|
|
2750
2827
|
return (jsx("div", { className: className, children: links?.length ? (jsx("div", { className: "flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider", children: links.map((_, i) => (jsx(HorizontalNavigationLink, { index: i, className: "text-l-light max-w-[292px]", ..._ }, String(i)))) })) : null }));
|
|
2751
2828
|
});
|
|
2752
2829
|
|
|
2753
|
-
const Sitemap = JSX(({ className = '', sitemap }) => {
|
|
2754
|
-
const link = useLink(true);
|
|
2755
|
-
return (jsx("div", { className: `flex flex-grow items-start justify-between gap-[54px] xl:gap-5 ${className}`, children: sitemap?.topItems?.map((_, i) => renderColumn(link(_), i)) }));
|
|
2756
|
-
});
|
|
2757
|
-
const renderColumn = (menuItem, index) => {
|
|
2758
|
-
const { text, items, href, target, onClick } = menuItem;
|
|
2759
|
-
return (jsxs("div", { className: "flex flex-col w-1/5 last:w-1/4 gap-3.5", children: [jsx("a", { className: "block leading-5 text-l text-primary-text hover:text-primary-main no-underline", href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }), items?.map((_, i) => (jsx(ColumnItem, { ..._, basePath: href, index: i }, String(i))))] }, String(index)));
|
|
2760
|
-
};
|
|
2761
|
-
const ColumnItem = JSX(({ text, index, basePath, ...rest }) => {
|
|
2762
|
-
const isAnotherPortal = projectSettings.BASE_PATH && basePath ? !projectSettings.BASE_PATH.startsWith(basePath) : false;
|
|
2763
|
-
const link = useLink(isAnotherPortal);
|
|
2764
|
-
const { href, target, onClick } = link(rest);
|
|
2765
|
-
return (jsx("a", { className: "block text-l-light text-secondary-text hover:text-primary-main no-underline", href: isAnotherPortal ? joinPath(basePath, href) : href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }));
|
|
2766
|
-
});
|
|
2767
|
-
|
|
2768
2830
|
const TextInformationLink = JSX(({ className = '', index, ...rest }) => {
|
|
2769
2831
|
const link = useLink();
|
|
2770
2832
|
const { href, target, text, onClick } = link(rest);
|
|
@@ -2778,24 +2840,8 @@
|
|
|
2778
2840
|
const fallback = rest.options?.page?.fallback;
|
|
2779
2841
|
const sitemap = useSWRResource(projectSettings.SITEMAP || 'sitemap', fallback);
|
|
2780
2842
|
const { documents, relatedEnterprises, contacts, socialMedia, mobileApps, logo } = useSWRResource(projectSettings.FOOTER || 'footer', fallback);
|
|
2781
|
-
|
|
2782
|
-
const [searchResult, searchInputProps] = useSearch(basePathList);
|
|
2783
|
-
useEffect(() => {
|
|
2784
|
-
printSearchResult(sitemap, searchResult); // Temp
|
|
2785
|
-
}, [sitemap, searchResult]);
|
|
2786
|
-
return (jsxs(BlockWrapper, { tag: "footer", className: `p-9 ${className}`, ...rest, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD, logo: logo }), jsx(SearchBar$1, { className: "grow", ...searchInputProps })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsxs("div", { className: `${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`, children: [jsx(Contacts, { items: contacts, hasButton: true }), jsx(SocialMedia, { media: socialMedia, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }), jsx(Sitemap, { className: "pt-[3px]", sitemap: sitemap })] }), jsx(HorizontalNavigation, { className: "mt-[98px]", links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
|
|
2843
|
+
return (jsxs(BlockWrapper, { tag: "footer", className: `p-9 ${className}`, ...rest, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD, logo: logo }), jsx(SearchBar$1, { className: "grow", topItems: sitemap?.topItems })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsxs("div", { className: `${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`, children: [jsx(Contacts, { items: contacts, hasButton: true }), jsx(SocialMedia, { media: socialMedia, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }), jsx(Sitemap, { className: "flex-grow", topItems: sitemap?.topItems })] }), jsx(HorizontalNavigation, { className: "mt-[98px]", links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
|
|
2787
2844
|
});
|
|
2788
|
-
// Temp
|
|
2789
|
-
function printSearchResult(sitemap, searchResult) {
|
|
2790
|
-
if (!sitemap?.topItems?.length || !searchResult?.length) {
|
|
2791
|
-
return;
|
|
2792
|
-
}
|
|
2793
|
-
for (const [{ text }, portalSearchResult] of zip(sitemap.topItems, searchResult).filter(([, _]) => _?.length)) {
|
|
2794
|
-
console.group(text);
|
|
2795
|
-
console.table(portalSearchResult, ['title', 'uri']);
|
|
2796
|
-
console.groupEnd();
|
|
2797
|
-
}
|
|
2798
|
-
}
|
|
2799
2845
|
|
|
2800
2846
|
const GracePeriod = JSX(({ className = '', title, description, calendar, ...rest }) => (jsxs(BlockWrapper, { className: `p-12 ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0 mb-4", title: title, description: description, headlineVersion: "M" }), calendar ? renderCalendar(calendar) : null] })));
|
|
2801
2847
|
const renderCalendar = (calendar) => {
|
|
@@ -2829,14 +2875,6 @@
|
|
|
2829
2875
|
? 'text-primary-main'
|
|
2830
2876
|
: style(flat ? 'text-primary-text' : 'text-secondary-text', 'hover:text-primary-main'), 'group-data-transparent:text-white group-data-transparent:hover:text-primary-hover');
|
|
2831
2877
|
|
|
2832
|
-
function useBool(defaultValue = false) {
|
|
2833
|
-
const [value, setValue] = useState(defaultValue);
|
|
2834
|
-
const setTrue = useCallback(() => setValue(true), []);
|
|
2835
|
-
const setFalse = useCallback(() => setValue(false), []);
|
|
2836
|
-
const toggle = useCallback(() => setValue((_) => !_), []);
|
|
2837
|
-
return [value, { setValue, setTrue, setFalse, toggle }];
|
|
2838
|
-
}
|
|
2839
|
-
|
|
2840
2878
|
const STORAGE_DEFAULT_TTL = 86400000; // 24 * 60 * 60 * 1000
|
|
2841
2879
|
function useCachedAsyncData(key, fetcher, storage = globalThis?.localStorage) {
|
|
2842
2880
|
const cachedFetcher = useCallback(async (...args) => {
|
|
@@ -2890,13 +2928,13 @@
|
|
|
2890
2928
|
}
|
|
2891
2929
|
|
|
2892
2930
|
const groupBy = (list, keyGetter) => {
|
|
2893
|
-
const
|
|
2894
|
-
|
|
2931
|
+
const result = new Map();
|
|
2932
|
+
for (const item of list) {
|
|
2895
2933
|
const key = keyGetter(item);
|
|
2896
|
-
const
|
|
2897
|
-
|
|
2898
|
-
}
|
|
2899
|
-
return
|
|
2934
|
+
const group = result.get(key) || [];
|
|
2935
|
+
result.set(key, [...group, item]);
|
|
2936
|
+
}
|
|
2937
|
+
return result;
|
|
2900
2938
|
};
|
|
2901
2939
|
|
|
2902
2940
|
const SearchBar = JSX(({ className, searchTerm, onSearch }) => {
|
|
@@ -2905,13 +2943,13 @@
|
|
|
2905
2943
|
});
|
|
2906
2944
|
|
|
2907
2945
|
const SEARCH_TERM_MIN_LENGTH = 3;
|
|
2908
|
-
const Location = JSX(({ currentLocation, onChangeLocation,
|
|
2946
|
+
const Location = JSX(({ currentLocation, onChangeLocation, onClose, foreignOffices }) => {
|
|
2909
2947
|
const [query, setQuery] = useState('');
|
|
2910
2948
|
const regions = cleanUpRegions(useRegions()).sort((a, b) => a.name.localeCompare(b.name));
|
|
2911
2949
|
const regionsGroupByLetter = groupBy(regions, regionFirstLetter);
|
|
2912
|
-
return (
|
|
2913
|
-
|
|
2914
|
-
|
|
2950
|
+
return (jsxs(Dialog, { head: jsxs("div", { children: [jsx(CurrentLocation, { currentLocation: currentLocation }), jsx(SearchBar, { onSearch: setQuery, searchTerm: query, className: "mb-7" })] }), onClose: onClose, children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
|
|
2951
|
+
.filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
|
|
2952
|
+
.map(renderRegion({ onChangeLocation, onClose })) })) : (jsx("div", { className: "columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup({ onChangeLocation, onClose })) })), jsx(ForeignOffices, { foreignOffices: foreignOffices })] }));
|
|
2915
2953
|
});
|
|
2916
2954
|
const regionFirstLetter = (region) => region.name?.charAt(0) || '';
|
|
2917
2955
|
const cleanUpRegions = (regions) => regions.map((region) => ({
|
|
@@ -2919,14 +2957,10 @@
|
|
|
2919
2957
|
name: region.name?.replace(/республика|область|край'/gi, '').trim() || '',
|
|
2920
2958
|
}));
|
|
2921
2959
|
const CurrentLocation = JSX(({ currentLocation }) => currentLocation ? (jsxs("div", { className: "mb-4", children: [jsx(Text, { size: "text-l", font: "font-light", children: "\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:\u00A0" }), jsx("button", { className: "cursor-pointer", onClick: close, children: jsx(Text, { color: "text-primary-main", children: currentLocation.name }) })] })) : null);
|
|
2922
|
-
const
|
|
2923
|
-
|
|
2924
|
-
close && close();
|
|
2925
|
-
}, children: jsx(ImgInner, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
|
|
2926
|
-
const renderRegionGroup = ({ onChangeLocation, close }) => ([letter, regions]) => (jsxs("div", { className: "break-inside-avoid mb-7 w-[224px]", children: [jsx("div", { className: "mb-2.5", children: jsx(Text, { size: "text-h6", children: letter }) }), regions.map(renderRegion({ onChangeLocation, close }))] }, letter));
|
|
2927
|
-
const renderRegion = ({ onChangeLocation, close }) => (region) => (jsx("div", { className: "mb-1", children: jsx("button", { className: "cursor-pointer hover:text-primary-hover", onClick: () => {
|
|
2960
|
+
const renderRegionGroup = ({ onChangeLocation, onClose }) => ([letter, regions]) => (jsxs("div", { className: "break-inside-avoid mb-7 w-[224px]", children: [jsx("div", { className: "mb-2.5", children: jsx(Text, { size: "text-h6", children: letter }) }), regions.map(renderRegion({ onChangeLocation, onClose }))] }, letter));
|
|
2961
|
+
const renderRegion = ({ onChangeLocation, onClose }) => (region) => (jsx("div", { className: "mb-1", children: jsx("button", { className: "cursor-pointer hover:text-primary-hover", onClick: () => {
|
|
2928
2962
|
onChangeLocation && onChangeLocation(region);
|
|
2929
|
-
|
|
2963
|
+
onClose && onClose();
|
|
2930
2964
|
}, children: region.name || '' }) }, region.id));
|
|
2931
2965
|
const ForeignOffices = JSX(({ foreignOffices }) => foreignOffices?.length ? (jsxs("div", { className: "border-t border-main-divider mt-7 pt-7", children: [jsx("div", { className: "mb-4", children: jsx(Text, { size: "text-m", font: "font-light", color: "text-secondary-text", children: "\u041F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430 \u0437\u0430 \u0440\u0443\u0431\u0435\u0436\u043E\u043C:" }) }), jsx("div", { className: "flex gap-10", children: foreignOffices.map((office, i) => (jsx(ForeignOffice, { ...office }, String(i)))) })] })) : null);
|
|
2932
2966
|
const ForeignOffice = JSX(({ icon, ...rest }) => {
|
|
@@ -3003,7 +3037,7 @@
|
|
|
3003
3037
|
showLocationModal();
|
|
3004
3038
|
}, []);
|
|
3005
3039
|
defaultEventBus.fire('setPageOverflowHidden', isShowLocationModal);
|
|
3006
|
-
return (jsxs("div", { className: style('flex items-center', className), children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: location.name, onClick: handleShowLocationModal }), officesLink ? (jsx(TopItem, { className: "mr-7", flat: true, href: officesLink, text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B" })) : null, projectSettings.CHAT_BOT ? (jsx(HeaderChatBotButton, { className: "mr-5", iconVersion: iconVersion, chat: projectSettings.CHAT_BOT })) : null, isShowLocationModal ? (jsx(Location, { currentLocation: location, foreignOffices: foreignOffices, onChangeLocation: onChangeLocation,
|
|
3040
|
+
return (jsxs("div", { className: style('flex items-center', className), children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: location.name, onClick: handleShowLocationModal }), officesLink ? (jsx(TopItem, { className: "mr-7", flat: true, href: officesLink, text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B" })) : null, projectSettings.CHAT_BOT ? (jsx(HeaderChatBotButton, { className: "mr-5", iconVersion: iconVersion, chat: projectSettings.CHAT_BOT })) : null, isShowLocationModal ? (jsx(Location, { currentLocation: location, foreignOffices: foreignOffices, onChangeLocation: onChangeLocation, onClose: hideLocationModal })) : null] }));
|
|
3007
3041
|
});
|
|
3008
3042
|
|
|
3009
3043
|
const findActiveSubItem = (router) => (items = []) => {
|
|
@@ -3644,9 +3678,6 @@
|
|
|
3644
3678
|
const OfficeServicesBlock = JSX(({ className = '', title, servicesList, ...rest }) => (jsxs(BlockWrapper, { className: `p-8 flex flex-col ${className}`, ...rest, children: [title ? jsx(Heading, { headingType: "h5", className: "mb-5", title: title }) : null, servicesList?.length ? (jsx("ul", { className: "list-none m-0 p-0", children: servicesList.map(renderListItems) })) : null] })));
|
|
3645
3679
|
const renderListItems = (itemList, i) => (jsxs("li", { className: "flex mb-5 last:mb-0 list-none", children: [itemList.icon ? (jsx(ImgInner, { className: "mr-3 min-w-6 min-h-6 w-6 h-6", width: "24", height: "24", asSVG: true, image: getIconWithVersion(itemList.icon) })) : null, itemList.label ? jsx("span", { className: "text-l-light", children: itemList.label }) : null] }, `list_item_${String(i)}`));
|
|
3646
3680
|
|
|
3647
|
-
const OtherProducts = JSX(({ className = '', ...rest }) => (jsx(BlockWrapper, { className: `font-sans text-primary-text ${className}`, ...rest, children: renderChildren(rest) })));
|
|
3648
|
-
OtherProducts.childrenTypes = ['OtherProductsItem'];
|
|
3649
|
-
|
|
3650
3681
|
const ParagraphBlock = JSX(({ text, size, align, font, children, ...rest }) => (jsx(BlockWrapper, { ...rest, children: jsx(Paragraph, { size: size, align: align, font: font, children: text || children }) })));
|
|
3651
3682
|
|
|
3652
3683
|
const BenefitItem = JSX((props) => {
|
|
@@ -4564,7 +4595,6 @@
|
|
|
4564
4595
|
MobileAppTile,
|
|
4565
4596
|
OfficeMap,
|
|
4566
4597
|
OfficeServicesBlock,
|
|
4567
|
-
OtherProducts,
|
|
4568
4598
|
ParagraphBlock,
|
|
4569
4599
|
PictureText,
|
|
4570
4600
|
Placeholder,
|
|
@@ -4713,7 +4743,7 @@
|
|
|
4713
4743
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
|
|
4714
4744
|
}
|
|
4715
4745
|
|
|
4716
|
-
const packageVersion = "0.8.
|
|
4746
|
+
const packageVersion = "0.8.30";
|
|
4717
4747
|
|
|
4718
4748
|
exports.Blocks = Blocks;
|
|
4719
4749
|
exports.ContentPage = ContentPage;
|