@redneckz/wildless-cms-uni-blocks 0.14.830 → 0.14.832
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/bundle/bundle.umd.js +60 -26
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/GalleryLayout/useSortProductBlocks.d.ts +2 -0
- package/bundle/external/useRouter.d.ts +2 -6
- package/bundle/model/Fallback.d.ts +0 -1
- package/dist/components/ApplicationLeadForm/parseEsiaProfile.js +0 -2
- package/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/dist/components/GalleryLayout/GalleryLayout.js +11 -5
- package/dist/components/GalleryLayout/GalleryLayout.js.map +1 -1
- package/dist/components/GalleryLayout/useSortProductBlocks.d.ts +2 -0
- package/dist/components/GalleryLayout/useSortProductBlocks.js +21 -0
- package/dist/components/GalleryLayout/useSortProductBlocks.js.map +1 -0
- package/dist/components/Header/HeaderSecondaryMenu.js +2 -1
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.js +5 -5
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/dist/components/TabsLayout/TabsLayout.js +13 -12
- package/dist/components/TabsLayout/TabsLayout.js.map +1 -1
- package/dist/external/useRouter.d.ts +2 -6
- package/dist/external/useRouter.js +0 -3
- package/dist/external/useRouter.js.map +1 -1
- package/dist/hooks/useActiveRoute.js +1 -1
- package/dist/hooks/useActiveRoute.js.map +1 -1
- package/dist/model/Fallback.d.ts +0 -1
- package/dist/services/search/useSearch.js +18 -1
- package/dist/services/search/useSearch.js.map +1 -1
- package/dist/setup-fixture.js +0 -3
- package/dist/setup-fixture.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationLeadForm/parseEsiaProfile.js +0 -2
- package/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/lib/components/GalleryLayout/GalleryLayout.js +11 -5
- package/lib/components/GalleryLayout/GalleryLayout.js.map +1 -1
- package/lib/components/GalleryLayout/useSortProductBlocks.d.ts +2 -0
- package/lib/components/GalleryLayout/useSortProductBlocks.js +18 -0
- package/lib/components/GalleryLayout/useSortProductBlocks.js.map +1 -0
- package/lib/components/Header/HeaderSecondaryMenu.js +2 -1
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.js +6 -6
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/lib/components/TabsLayout/TabsLayout.js +13 -12
- package/lib/components/TabsLayout/TabsLayout.js.map +1 -1
- package/lib/external/useRouter.d.ts +2 -6
- package/lib/external/useRouter.js +0 -3
- package/lib/external/useRouter.js.map +1 -1
- package/lib/hooks/useActiveRoute.js +1 -1
- package/lib/hooks/useActiveRoute.js.map +1 -1
- package/lib/model/Fallback.d.ts +0 -1
- package/lib/services/search/useSearch.js +18 -1
- package/lib/services/search/useSearch.js.map +1 -1
- package/lib/setup-fixture.js +0 -3
- package/lib/setup-fixture.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +45 -28
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/GalleryLayout/useSortProductBlocks.d.ts +2 -0
- package/mobile/bundle/external/useRouter.d.ts +2 -6
- package/mobile/bundle/model/Fallback.d.ts +0 -1
- package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js +0 -2
- package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/mobile/dist/components/GalleryLayout/GalleryLayout.js +11 -5
- package/mobile/dist/components/GalleryLayout/GalleryLayout.js.map +1 -1
- package/mobile/dist/components/GalleryLayout/useSortProductBlocks.d.ts +2 -0
- package/mobile/dist/components/GalleryLayout/useSortProductBlocks.js +21 -0
- package/mobile/dist/components/GalleryLayout/useSortProductBlocks.js.map +1 -0
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +2 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js +5 -5
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/mobile/dist/components/TabsLayout/TabsLayout.js +13 -12
- package/mobile/dist/components/TabsLayout/TabsLayout.js.map +1 -1
- package/mobile/dist/external/useRouter.d.ts +2 -6
- package/mobile/dist/external/useRouter.js +0 -3
- package/mobile/dist/external/useRouter.js.map +1 -1
- package/mobile/dist/hooks/useActiveRoute.js +1 -1
- package/mobile/dist/hooks/useActiveRoute.js.map +1 -1
- package/mobile/dist/model/Fallback.d.ts +0 -1
- package/mobile/dist/services/search/useSearch.js +18 -1
- package/mobile/dist/services/search/useSearch.js.map +1 -1
- package/mobile/dist/setup-fixture.js +0 -3
- package/mobile/dist/setup-fixture.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js +0 -2
- package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/mobile/lib/components/GalleryLayout/GalleryLayout.js +11 -5
- package/mobile/lib/components/GalleryLayout/GalleryLayout.js.map +1 -1
- package/mobile/lib/components/GalleryLayout/useSortProductBlocks.d.ts +2 -0
- package/mobile/lib/components/GalleryLayout/useSortProductBlocks.js +18 -0
- package/mobile/lib/components/GalleryLayout/useSortProductBlocks.js.map +1 -0
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +2 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js +6 -6
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/mobile/lib/components/TabsLayout/TabsLayout.js +13 -12
- package/mobile/lib/components/TabsLayout/TabsLayout.js.map +1 -1
- package/mobile/lib/external/useRouter.d.ts +2 -6
- package/mobile/lib/external/useRouter.js +0 -3
- package/mobile/lib/external/useRouter.js.map +1 -1
- package/mobile/lib/hooks/useActiveRoute.js +1 -1
- package/mobile/lib/hooks/useActiveRoute.js.map +1 -1
- package/mobile/lib/model/Fallback.d.ts +0 -1
- package/mobile/lib/services/search/useSearch.js +18 -1
- package/mobile/lib/services/search/useSearch.js.map +1 -1
- package/mobile/lib/setup-fixture.js +0 -3
- package/mobile/lib/setup-fixture.js.map +1 -1
- package/mobile/src/components/ApplicationLeadForm/parseEsiaProfile.ts +0 -2
- package/mobile/src/components/GalleryLayout/GalleryLayout.tsx +32 -19
- package/mobile/src/components/GalleryLayout/useSortProductBlocks.ts +25 -0
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +12 -9
- package/mobile/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +8 -6
- package/mobile/src/components/TabsLayout/TabsLayout.tsx +14 -12
- package/mobile/src/external/useRouter.ts +2 -9
- package/mobile/src/hooks/useActiveRoute.ts +1 -1
- package/mobile/src/model/Fallback.ts +0 -1
- package/mobile/src/services/search/useSearch.ts +24 -3
- package/mobile/src/setup-fixture.ts +0 -3
- package/package.json +1 -21
- package/src/components/ApplicationLeadForm/parseEsiaProfile.ts +0 -2
- package/src/components/ContentPage/ContentPage.fixture.mobile.tsx +1 -4
- package/src/components/ContentPage/ContentPage.fixture.tsx +2 -7
- package/src/components/GalleryLayout/GalleryLayout.tsx +32 -19
- package/src/components/GalleryLayout/useSortProductBlocks.ts +25 -0
- package/src/components/Header/HeaderSecondaryMenu.tsx +12 -9
- package/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +8 -6
- package/src/components/TabsLayout/TabsLayout.tsx +14 -12
- package/src/external/useRouter.ts +2 -9
- package/src/hooks/useActiveRoute.ts +1 -1
- package/src/model/Fallback.ts +0 -1
- package/src/services/search/useSearch.ts +24 -3
- package/src/setup-fixture.ts +0 -3
- package/bundle/components/ContentPage/computeAPIFallback.d.ts +0 -4
- package/bundle/components/ContentPage/loadModuleFallback.d.ts +0 -2
- package/bundle/components/ContentPage/mapSlot.d.ts +0 -2
- package/bundle/components/ContentPage/normalizeBlock.d.ts +0 -3
- package/bundle/components/ContentPage/normalizeBlock.mobile.d.ts +0 -3
- package/bundle/components/ContentPage/normalizePage.d.ts +0 -3
- package/bundle/components/ContentPage/toMobileBlock.d.ts +0 -2
- package/bundle/content-page-repository/ContentPageRepository.d.ts +0 -10
- package/bundle/content-page-repository/JSONDocContentBox.d.ts +0 -8
- package/bundle/content-page-repository/TransformationOptions.d.ts +0 -4
- package/bundle/content-page-repository/clearAttachmentHref.d.ts +0 -2
- package/bundle/content-page-repository/computeImgOutputPath.d.ts +0 -3
- package/bundle/content-page-repository/extensions.d.ts +0 -3
- package/bundle/content-page-repository/index.d.ts +0 -3
- package/bundle/content-page-repository/mapJSON.d.ts +0 -1
- package/bundle/content-page-repository/mergePages.d.ts +0 -2
- package/bundle/content-page-repository/replaceHeadingTags.d.ts +0 -1
- package/bundle/content-page-repository/resizeImg.d.ts +0 -3
- package/bundle/content-page-repository/transformAttachmentLink.d.ts +0 -3
- package/bundle/content-page-repository/transformContentPage.d.ts +0 -4
- package/bundle/content-page-repository/transformDocument.d.ts +0 -3
- package/bundle/content-page-repository/transformHTML.d.ts +0 -1
- package/bundle/content-page-repository/transformImg.d.ts +0 -12
- package/bundle/content-page-repository/transformMarkdown.d.ts +0 -1
- package/bundle/content-page-repository/transformPicture.d.ts +0 -3
- package/dist/components/ContentPage/computeAPIFallback.d.ts +0 -4
- package/dist/components/ContentPage/computeAPIFallback.js +0 -36
- package/dist/components/ContentPage/computeAPIFallback.js.map +0 -1
- package/dist/components/ContentPage/loadModuleFallback.d.ts +0 -2
- package/dist/components/ContentPage/loadModuleFallback.js +0 -36
- package/dist/components/ContentPage/loadModuleFallback.js.map +0 -1
- package/dist/components/ContentPage/mapSlot.d.ts +0 -2
- package/dist/components/ContentPage/mapSlot.js +0 -16
- package/dist/components/ContentPage/mapSlot.js.map +0 -1
- package/dist/components/ContentPage/normalizeBlock.d.ts +0 -3
- package/dist/components/ContentPage/normalizeBlock.js +0 -15
- package/dist/components/ContentPage/normalizeBlock.js.map +0 -1
- package/dist/components/ContentPage/normalizeBlock.mobile.d.ts +0 -3
- package/dist/components/ContentPage/normalizeBlock.mobile.js +0 -18
- package/dist/components/ContentPage/normalizeBlock.mobile.js.map +0 -1
- package/dist/components/ContentPage/normalizePage.d.ts +0 -3
- package/dist/components/ContentPage/normalizePage.js +0 -6
- package/dist/components/ContentPage/normalizePage.js.map +0 -1
- package/dist/components/ContentPage/toMobileBlock.d.ts +0 -2
- package/dist/components/ContentPage/toMobileBlock.js +0 -12
- package/dist/components/ContentPage/toMobileBlock.js.map +0 -1
- package/dist/content-page-repository/ContentPageRepository.d.ts +0 -10
- package/dist/content-page-repository/ContentPageRepository.js +0 -31
- package/dist/content-page-repository/ContentPageRepository.js.map +0 -1
- package/dist/content-page-repository/JSONDocContentBox.d.ts +0 -8
- package/dist/content-page-repository/JSONDocContentBox.js +0 -39
- package/dist/content-page-repository/JSONDocContentBox.js.map +0 -1
- package/dist/content-page-repository/TransformationOptions.d.ts +0 -4
- package/dist/content-page-repository/TransformationOptions.js +0 -2
- package/dist/content-page-repository/TransformationOptions.js.map +0 -1
- package/dist/content-page-repository/clearAttachmentHref.d.ts +0 -2
- package/dist/content-page-repository/clearAttachmentHref.js +0 -6
- package/dist/content-page-repository/clearAttachmentHref.js.map +0 -1
- package/dist/content-page-repository/computeImgOutputPath.d.ts +0 -3
- package/dist/content-page-repository/computeImgOutputPath.js +0 -18
- package/dist/content-page-repository/computeImgOutputPath.js.map +0 -1
- package/dist/content-page-repository/extensions.d.ts +0 -3
- package/dist/content-page-repository/extensions.js +0 -18
- package/dist/content-page-repository/extensions.js.map +0 -1
- package/dist/content-page-repository/index.d.ts +0 -3
- package/dist/content-page-repository/index.js +0 -9
- package/dist/content-page-repository/index.js.map +0 -1
- package/dist/content-page-repository/mapJSON.d.ts +0 -1
- package/dist/content-page-repository/mapJSON.js +0 -26
- package/dist/content-page-repository/mapJSON.js.map +0 -1
- package/dist/content-page-repository/mergePages.d.ts +0 -2
- package/dist/content-page-repository/mergePages.js +0 -7
- package/dist/content-page-repository/mergePages.js.map +0 -1
- package/dist/content-page-repository/replaceHeadingTags.d.ts +0 -1
- package/dist/content-page-repository/replaceHeadingTags.js +0 -5
- package/dist/content-page-repository/replaceHeadingTags.js.map +0 -1
- package/dist/content-page-repository/resizeImg.d.ts +0 -3
- package/dist/content-page-repository/resizeImg.js +0 -19
- package/dist/content-page-repository/resizeImg.js.map +0 -1
- package/dist/content-page-repository/transformAttachmentLink.d.ts +0 -3
- package/dist/content-page-repository/transformAttachmentLink.js +0 -40
- package/dist/content-page-repository/transformAttachmentLink.js.map +0 -1
- package/dist/content-page-repository/transformContentPage.d.ts +0 -4
- package/dist/content-page-repository/transformContentPage.js +0 -78
- package/dist/content-page-repository/transformContentPage.js.map +0 -1
- package/dist/content-page-repository/transformDocument.d.ts +0 -3
- package/dist/content-page-repository/transformDocument.js +0 -38
- package/dist/content-page-repository/transformDocument.js.map +0 -1
- package/dist/content-page-repository/transformHTML.d.ts +0 -1
- package/dist/content-page-repository/transformHTML.js +0 -54
- package/dist/content-page-repository/transformHTML.js.map +0 -1
- package/dist/content-page-repository/transformImg.d.ts +0 -12
- package/dist/content-page-repository/transformImg.js +0 -51
- package/dist/content-page-repository/transformImg.js.map +0 -1
- package/dist/content-page-repository/transformMarkdown.d.ts +0 -1
- package/dist/content-page-repository/transformMarkdown.js +0 -18
- package/dist/content-page-repository/transformMarkdown.js.map +0 -1
- package/dist/content-page-repository/transformPicture.d.ts +0 -3
- package/dist/content-page-repository/transformPicture.js +0 -28
- package/dist/content-page-repository/transformPicture.js.map +0 -1
- package/lib/components/ContentPage/computeAPIFallback.d.ts +0 -4
- package/lib/components/ContentPage/computeAPIFallback.js +0 -33
- package/lib/components/ContentPage/computeAPIFallback.js.map +0 -1
- package/lib/components/ContentPage/loadModuleFallback.d.ts +0 -2
- package/lib/components/ContentPage/loadModuleFallback.js +0 -10
- package/lib/components/ContentPage/loadModuleFallback.js.map +0 -1
- package/lib/components/ContentPage/mapSlot.d.ts +0 -2
- package/lib/components/ContentPage/mapSlot.js +0 -13
- package/lib/components/ContentPage/mapSlot.js.map +0 -1
- package/lib/components/ContentPage/normalizeBlock.d.ts +0 -3
- package/lib/components/ContentPage/normalizeBlock.js +0 -12
- package/lib/components/ContentPage/normalizeBlock.js.map +0 -1
- package/lib/components/ContentPage/normalizeBlock.mobile.d.ts +0 -3
- package/lib/components/ContentPage/normalizeBlock.mobile.js +0 -15
- package/lib/components/ContentPage/normalizeBlock.mobile.js.map +0 -1
- package/lib/components/ContentPage/normalizePage.d.ts +0 -3
- package/lib/components/ContentPage/normalizePage.js +0 -3
- package/lib/components/ContentPage/normalizePage.js.map +0 -1
- package/lib/components/ContentPage/toMobileBlock.d.ts +0 -2
- package/lib/components/ContentPage/toMobileBlock.js +0 -9
- package/lib/components/ContentPage/toMobileBlock.js.map +0 -1
- package/lib/content-page-repository/ContentPageRepository.d.ts +0 -10
- package/lib/content-page-repository/ContentPageRepository.js +0 -25
- package/lib/content-page-repository/ContentPageRepository.js.map +0 -1
- package/lib/content-page-repository/JSONDocContentBox.d.ts +0 -8
- package/lib/content-page-repository/JSONDocContentBox.js +0 -36
- package/lib/content-page-repository/JSONDocContentBox.js.map +0 -1
- package/lib/content-page-repository/TransformationOptions.d.ts +0 -4
- package/lib/content-page-repository/TransformationOptions.js +0 -2
- package/lib/content-page-repository/TransformationOptions.js.map +0 -1
- package/lib/content-page-repository/clearAttachmentHref.d.ts +0 -2
- package/lib/content-page-repository/clearAttachmentHref.js +0 -3
- package/lib/content-page-repository/clearAttachmentHref.js.map +0 -1
- package/lib/content-page-repository/computeImgOutputPath.d.ts +0 -3
- package/lib/content-page-repository/computeImgOutputPath.js +0 -12
- package/lib/content-page-repository/computeImgOutputPath.js.map +0 -1
- package/lib/content-page-repository/extensions.d.ts +0 -3
- package/lib/content-page-repository/extensions.js +0 -16
- package/lib/content-page-repository/extensions.js.map +0 -1
- package/lib/content-page-repository/index.d.ts +0 -3
- package/lib/content-page-repository/index.js +0 -4
- package/lib/content-page-repository/index.js.map +0 -1
- package/lib/content-page-repository/mapJSON.d.ts +0 -1
- package/lib/content-page-repository/mapJSON.js +0 -23
- package/lib/content-page-repository/mapJSON.js.map +0 -1
- package/lib/content-page-repository/mergePages.d.ts +0 -2
- package/lib/content-page-repository/mergePages.js +0 -4
- package/lib/content-page-repository/mergePages.js.map +0 -1
- package/lib/content-page-repository/replaceHeadingTags.d.ts +0 -1
- package/lib/content-page-repository/replaceHeadingTags.js +0 -2
- package/lib/content-page-repository/replaceHeadingTags.js.map +0 -1
- package/lib/content-page-repository/resizeImg.d.ts +0 -3
- package/lib/content-page-repository/resizeImg.js +0 -13
- package/lib/content-page-repository/resizeImg.js.map +0 -1
- package/lib/content-page-repository/transformAttachmentLink.d.ts +0 -3
- package/lib/content-page-repository/transformAttachmentLink.js +0 -34
- package/lib/content-page-repository/transformAttachmentLink.js.map +0 -1
- package/lib/content-page-repository/transformContentPage.d.ts +0 -4
- package/lib/content-page-repository/transformContentPage.js +0 -71
- package/lib/content-page-repository/transformContentPage.js.map +0 -1
- package/lib/content-page-repository/transformDocument.d.ts +0 -3
- package/lib/content-page-repository/transformDocument.js +0 -32
- package/lib/content-page-repository/transformDocument.js.map +0 -1
- package/lib/content-page-repository/transformHTML.d.ts +0 -1
- package/lib/content-page-repository/transformHTML.js +0 -25
- package/lib/content-page-repository/transformHTML.js.map +0 -1
- package/lib/content-page-repository/transformImg.d.ts +0 -12
- package/lib/content-page-repository/transformImg.js +0 -45
- package/lib/content-page-repository/transformImg.js.map +0 -1
- package/lib/content-page-repository/transformMarkdown.d.ts +0 -1
- package/lib/content-page-repository/transformMarkdown.js +0 -12
- package/lib/content-page-repository/transformMarkdown.js.map +0 -1
- package/lib/content-page-repository/transformPicture.d.ts +0 -3
- package/lib/content-page-repository/transformPicture.js +0 -22
- package/lib/content-page-repository/transformPicture.js.map +0 -1
- package/mobile/bundle/components/ContentPage/computeAPIFallback.d.ts +0 -4
- package/mobile/bundle/components/ContentPage/loadModuleFallback.d.ts +0 -2
- package/mobile/bundle/components/ContentPage/mapSlot.d.ts +0 -2
- package/mobile/bundle/components/ContentPage/normalizeBlock.d.ts +0 -3
- package/mobile/bundle/components/ContentPage/normalizePage.d.ts +0 -3
- package/mobile/bundle/components/ContentPage/toMobileBlock.d.ts +0 -2
- package/mobile/bundle/content-page-repository/ContentPageRepository.d.ts +0 -10
- package/mobile/bundle/content-page-repository/JSONDocContentBox.d.ts +0 -8
- package/mobile/bundle/content-page-repository/TransformationOptions.d.ts +0 -4
- package/mobile/bundle/content-page-repository/clearAttachmentHref.d.ts +0 -2
- package/mobile/bundle/content-page-repository/computeImgOutputPath.d.ts +0 -3
- package/mobile/bundle/content-page-repository/extensions.d.ts +0 -3
- package/mobile/bundle/content-page-repository/index.d.ts +0 -3
- package/mobile/bundle/content-page-repository/mapJSON.d.ts +0 -1
- package/mobile/bundle/content-page-repository/mergePages.d.ts +0 -2
- package/mobile/bundle/content-page-repository/replaceHeadingTags.d.ts +0 -1
- package/mobile/bundle/content-page-repository/resizeImg.d.ts +0 -3
- package/mobile/bundle/content-page-repository/transformAttachmentLink.d.ts +0 -3
- package/mobile/bundle/content-page-repository/transformContentPage.d.ts +0 -4
- package/mobile/bundle/content-page-repository/transformDocument.d.ts +0 -3
- package/mobile/bundle/content-page-repository/transformHTML.d.ts +0 -1
- package/mobile/bundle/content-page-repository/transformImg.d.ts +0 -12
- package/mobile/bundle/content-page-repository/transformMarkdown.d.ts +0 -1
- package/mobile/bundle/content-page-repository/transformPicture.d.ts +0 -3
- package/mobile/dist/components/ContentPage/computeAPIFallback.d.ts +0 -4
- package/mobile/dist/components/ContentPage/computeAPIFallback.js +0 -36
- package/mobile/dist/components/ContentPage/computeAPIFallback.js.map +0 -1
- package/mobile/dist/components/ContentPage/loadModuleFallback.d.ts +0 -2
- package/mobile/dist/components/ContentPage/loadModuleFallback.js +0 -36
- package/mobile/dist/components/ContentPage/loadModuleFallback.js.map +0 -1
- package/mobile/dist/components/ContentPage/mapSlot.d.ts +0 -2
- package/mobile/dist/components/ContentPage/mapSlot.js +0 -16
- package/mobile/dist/components/ContentPage/mapSlot.js.map +0 -1
- package/mobile/dist/components/ContentPage/normalizeBlock.d.ts +0 -3
- package/mobile/dist/components/ContentPage/normalizeBlock.js +0 -18
- package/mobile/dist/components/ContentPage/normalizeBlock.js.map +0 -1
- package/mobile/dist/components/ContentPage/normalizePage.d.ts +0 -3
- package/mobile/dist/components/ContentPage/normalizePage.js +0 -6
- package/mobile/dist/components/ContentPage/normalizePage.js.map +0 -1
- package/mobile/dist/components/ContentPage/toMobileBlock.d.ts +0 -2
- package/mobile/dist/components/ContentPage/toMobileBlock.js +0 -12
- package/mobile/dist/components/ContentPage/toMobileBlock.js.map +0 -1
- package/mobile/dist/content-page-repository/ContentPageRepository.d.ts +0 -10
- package/mobile/dist/content-page-repository/ContentPageRepository.js +0 -31
- package/mobile/dist/content-page-repository/ContentPageRepository.js.map +0 -1
- package/mobile/dist/content-page-repository/JSONDocContentBox.d.ts +0 -8
- package/mobile/dist/content-page-repository/JSONDocContentBox.js +0 -39
- package/mobile/dist/content-page-repository/JSONDocContentBox.js.map +0 -1
- package/mobile/dist/content-page-repository/TransformationOptions.d.ts +0 -4
- package/mobile/dist/content-page-repository/TransformationOptions.js +0 -2
- package/mobile/dist/content-page-repository/TransformationOptions.js.map +0 -1
- package/mobile/dist/content-page-repository/clearAttachmentHref.d.ts +0 -2
- package/mobile/dist/content-page-repository/clearAttachmentHref.js +0 -6
- package/mobile/dist/content-page-repository/clearAttachmentHref.js.map +0 -1
- package/mobile/dist/content-page-repository/computeImgOutputPath.d.ts +0 -3
- package/mobile/dist/content-page-repository/computeImgOutputPath.js +0 -18
- package/mobile/dist/content-page-repository/computeImgOutputPath.js.map +0 -1
- package/mobile/dist/content-page-repository/extensions.d.ts +0 -3
- package/mobile/dist/content-page-repository/extensions.js +0 -18
- package/mobile/dist/content-page-repository/extensions.js.map +0 -1
- package/mobile/dist/content-page-repository/index.d.ts +0 -3
- package/mobile/dist/content-page-repository/index.js +0 -9
- package/mobile/dist/content-page-repository/index.js.map +0 -1
- package/mobile/dist/content-page-repository/mapJSON.d.ts +0 -1
- package/mobile/dist/content-page-repository/mapJSON.js +0 -26
- package/mobile/dist/content-page-repository/mapJSON.js.map +0 -1
- package/mobile/dist/content-page-repository/mergePages.d.ts +0 -2
- package/mobile/dist/content-page-repository/mergePages.js +0 -7
- package/mobile/dist/content-page-repository/mergePages.js.map +0 -1
- package/mobile/dist/content-page-repository/replaceHeadingTags.d.ts +0 -1
- package/mobile/dist/content-page-repository/replaceHeadingTags.js +0 -5
- package/mobile/dist/content-page-repository/replaceHeadingTags.js.map +0 -1
- package/mobile/dist/content-page-repository/resizeImg.d.ts +0 -3
- package/mobile/dist/content-page-repository/resizeImg.js +0 -19
- package/mobile/dist/content-page-repository/resizeImg.js.map +0 -1
- package/mobile/dist/content-page-repository/transformAttachmentLink.d.ts +0 -3
- package/mobile/dist/content-page-repository/transformAttachmentLink.js +0 -40
- package/mobile/dist/content-page-repository/transformAttachmentLink.js.map +0 -1
- package/mobile/dist/content-page-repository/transformContentPage.d.ts +0 -4
- package/mobile/dist/content-page-repository/transformContentPage.js +0 -78
- package/mobile/dist/content-page-repository/transformContentPage.js.map +0 -1
- package/mobile/dist/content-page-repository/transformDocument.d.ts +0 -3
- package/mobile/dist/content-page-repository/transformDocument.js +0 -38
- package/mobile/dist/content-page-repository/transformDocument.js.map +0 -1
- package/mobile/dist/content-page-repository/transformHTML.d.ts +0 -1
- package/mobile/dist/content-page-repository/transformHTML.js +0 -54
- package/mobile/dist/content-page-repository/transformHTML.js.map +0 -1
- package/mobile/dist/content-page-repository/transformImg.d.ts +0 -12
- package/mobile/dist/content-page-repository/transformImg.js +0 -51
- package/mobile/dist/content-page-repository/transformImg.js.map +0 -1
- package/mobile/dist/content-page-repository/transformMarkdown.d.ts +0 -1
- package/mobile/dist/content-page-repository/transformMarkdown.js +0 -18
- package/mobile/dist/content-page-repository/transformMarkdown.js.map +0 -1
- package/mobile/dist/content-page-repository/transformPicture.d.ts +0 -3
- package/mobile/dist/content-page-repository/transformPicture.js +0 -28
- package/mobile/dist/content-page-repository/transformPicture.js.map +0 -1
- package/mobile/lib/components/ContentPage/computeAPIFallback.d.ts +0 -4
- package/mobile/lib/components/ContentPage/computeAPIFallback.js +0 -33
- package/mobile/lib/components/ContentPage/computeAPIFallback.js.map +0 -1
- package/mobile/lib/components/ContentPage/loadModuleFallback.d.ts +0 -2
- package/mobile/lib/components/ContentPage/loadModuleFallback.js +0 -10
- package/mobile/lib/components/ContentPage/loadModuleFallback.js.map +0 -1
- package/mobile/lib/components/ContentPage/mapSlot.d.ts +0 -2
- package/mobile/lib/components/ContentPage/mapSlot.js +0 -13
- package/mobile/lib/components/ContentPage/mapSlot.js.map +0 -1
- package/mobile/lib/components/ContentPage/normalizeBlock.d.ts +0 -3
- package/mobile/lib/components/ContentPage/normalizeBlock.js +0 -15
- package/mobile/lib/components/ContentPage/normalizeBlock.js.map +0 -1
- package/mobile/lib/components/ContentPage/normalizePage.d.ts +0 -3
- package/mobile/lib/components/ContentPage/normalizePage.js +0 -3
- package/mobile/lib/components/ContentPage/normalizePage.js.map +0 -1
- package/mobile/lib/components/ContentPage/toMobileBlock.d.ts +0 -2
- package/mobile/lib/components/ContentPage/toMobileBlock.js +0 -9
- package/mobile/lib/components/ContentPage/toMobileBlock.js.map +0 -1
- package/mobile/lib/content-page-repository/ContentPageRepository.d.ts +0 -10
- package/mobile/lib/content-page-repository/ContentPageRepository.js +0 -25
- package/mobile/lib/content-page-repository/ContentPageRepository.js.map +0 -1
- package/mobile/lib/content-page-repository/JSONDocContentBox.d.ts +0 -8
- package/mobile/lib/content-page-repository/JSONDocContentBox.js +0 -36
- package/mobile/lib/content-page-repository/JSONDocContentBox.js.map +0 -1
- package/mobile/lib/content-page-repository/TransformationOptions.d.ts +0 -4
- package/mobile/lib/content-page-repository/TransformationOptions.js +0 -2
- package/mobile/lib/content-page-repository/TransformationOptions.js.map +0 -1
- package/mobile/lib/content-page-repository/clearAttachmentHref.d.ts +0 -2
- package/mobile/lib/content-page-repository/clearAttachmentHref.js +0 -3
- package/mobile/lib/content-page-repository/clearAttachmentHref.js.map +0 -1
- package/mobile/lib/content-page-repository/computeImgOutputPath.d.ts +0 -3
- package/mobile/lib/content-page-repository/computeImgOutputPath.js +0 -12
- package/mobile/lib/content-page-repository/computeImgOutputPath.js.map +0 -1
- package/mobile/lib/content-page-repository/extensions.d.ts +0 -3
- package/mobile/lib/content-page-repository/extensions.js +0 -16
- package/mobile/lib/content-page-repository/extensions.js.map +0 -1
- package/mobile/lib/content-page-repository/index.d.ts +0 -3
- package/mobile/lib/content-page-repository/index.js +0 -4
- package/mobile/lib/content-page-repository/index.js.map +0 -1
- package/mobile/lib/content-page-repository/mapJSON.d.ts +0 -1
- package/mobile/lib/content-page-repository/mapJSON.js +0 -23
- package/mobile/lib/content-page-repository/mapJSON.js.map +0 -1
- package/mobile/lib/content-page-repository/mergePages.d.ts +0 -2
- package/mobile/lib/content-page-repository/mergePages.js +0 -4
- package/mobile/lib/content-page-repository/mergePages.js.map +0 -1
- package/mobile/lib/content-page-repository/replaceHeadingTags.d.ts +0 -1
- package/mobile/lib/content-page-repository/replaceHeadingTags.js +0 -2
- package/mobile/lib/content-page-repository/replaceHeadingTags.js.map +0 -1
- package/mobile/lib/content-page-repository/resizeImg.d.ts +0 -3
- package/mobile/lib/content-page-repository/resizeImg.js +0 -13
- package/mobile/lib/content-page-repository/resizeImg.js.map +0 -1
- package/mobile/lib/content-page-repository/transformAttachmentLink.d.ts +0 -3
- package/mobile/lib/content-page-repository/transformAttachmentLink.js +0 -34
- package/mobile/lib/content-page-repository/transformAttachmentLink.js.map +0 -1
- package/mobile/lib/content-page-repository/transformContentPage.d.ts +0 -4
- package/mobile/lib/content-page-repository/transformContentPage.js +0 -71
- package/mobile/lib/content-page-repository/transformContentPage.js.map +0 -1
- package/mobile/lib/content-page-repository/transformDocument.d.ts +0 -3
- package/mobile/lib/content-page-repository/transformDocument.js +0 -32
- package/mobile/lib/content-page-repository/transformDocument.js.map +0 -1
- package/mobile/lib/content-page-repository/transformHTML.d.ts +0 -1
- package/mobile/lib/content-page-repository/transformHTML.js +0 -25
- package/mobile/lib/content-page-repository/transformHTML.js.map +0 -1
- package/mobile/lib/content-page-repository/transformImg.d.ts +0 -12
- package/mobile/lib/content-page-repository/transformImg.js +0 -45
- package/mobile/lib/content-page-repository/transformImg.js.map +0 -1
- package/mobile/lib/content-page-repository/transformMarkdown.d.ts +0 -1
- package/mobile/lib/content-page-repository/transformMarkdown.js +0 -12
- package/mobile/lib/content-page-repository/transformMarkdown.js.map +0 -1
- package/mobile/lib/content-page-repository/transformPicture.d.ts +0 -3
- package/mobile/lib/content-page-repository/transformPicture.js +0 -22
- package/mobile/lib/content-page-repository/transformPicture.js.map +0 -1
- package/mobile/src/components/ContentPage/computeAPIFallback.ts +0 -67
- package/mobile/src/components/ContentPage/loadModuleFallback.ts +0 -11
- package/mobile/src/components/ContentPage/mapSlot.ts +0 -18
- package/mobile/src/components/ContentPage/normalizeBlock.ts +0 -25
- package/mobile/src/components/ContentPage/normalizePage.ts +0 -8
- package/mobile/src/components/ContentPage/toMobileBlock.ts +0 -11
- package/mobile/src/content-page-repository/ContentPageRepository.ts +0 -31
- package/mobile/src/content-page-repository/JSONDocContentBox.ts +0 -56
- package/mobile/src/content-page-repository/TransformationOptions.ts +0 -4
- package/mobile/src/content-page-repository/clearAttachmentHref.ts +0 -3
- package/mobile/src/content-page-repository/computeImgOutputPath.ts +0 -21
- package/mobile/src/content-page-repository/extensions.ts +0 -17
- package/mobile/src/content-page-repository/index.ts +0 -3
- package/mobile/src/content-page-repository/mapJSON.ts +0 -30
- package/mobile/src/content-page-repository/mergePages.ts +0 -8
- package/mobile/src/content-page-repository/replaceHeadingTags.ts +0 -2
- package/mobile/src/content-page-repository/resizeImg.ts +0 -17
- package/mobile/src/content-page-repository/transformAttachmentLink.ts +0 -46
- package/mobile/src/content-page-repository/transformContentPage.ts +0 -102
- package/mobile/src/content-page-repository/transformDocument.ts +0 -43
- package/mobile/src/content-page-repository/transformHTML.ts +0 -28
- package/mobile/src/content-page-repository/transformImg.ts +0 -81
- package/mobile/src/content-page-repository/transformMarkdown.ts +0 -14
- package/mobile/src/content-page-repository/transformPicture.ts +0 -35
- package/src/components/ContentPage/computeAPIFallback.ts +0 -67
- package/src/components/ContentPage/loadModuleFallback.ts +0 -11
- package/src/components/ContentPage/mapSlot.ts +0 -18
- package/src/components/ContentPage/normalizeBlock.mobile.ts +0 -25
- package/src/components/ContentPage/normalizeBlock.ts +0 -21
- package/src/components/ContentPage/normalizePage.ts +0 -8
- package/src/components/ContentPage/toMobileBlock.ts +0 -11
- package/src/content-page-repository/ContentPageRepository.ts +0 -31
- package/src/content-page-repository/JSONDocContentBox.ts +0 -56
- package/src/content-page-repository/TransformationOptions.ts +0 -4
- package/src/content-page-repository/clearAttachmentHref.ts +0 -3
- package/src/content-page-repository/computeImgOutputPath.ts +0 -21
- package/src/content-page-repository/extensions.ts +0 -17
- package/src/content-page-repository/index.ts +0 -3
- package/src/content-page-repository/mapJSON.ts +0 -30
- package/src/content-page-repository/mergePages.ts +0 -8
- package/src/content-page-repository/replaceHeadingTags.ts +0 -2
- package/src/content-page-repository/resizeImg.ts +0 -17
- package/src/content-page-repository/transformAttachmentLink.ts +0 -46
- package/src/content-page-repository/transformContentPage.ts +0 -102
- package/src/content-page-repository/transformDocument.ts +0 -43
- package/src/content-page-repository/transformHTML.ts +0 -28
- package/src/content-page-repository/transformImg.ts +0 -81
- package/src/content-page-repository/transformMarkdown.ts +0 -14
- package/src/content-page-repository/transformPicture.ts +0 -35
|
@@ -21,5 +21,22 @@ export const useSearch = ({ basePathList, initialQuery = '', }) => {
|
|
|
21
21
|
}, [data, query]);
|
|
22
22
|
return [result, { value: query, onChange: setQuery }];
|
|
23
23
|
};
|
|
24
|
-
const fetchSearchIndex = async (...basePathList) => (await Promise.allSettled(basePathList.map(
|
|
24
|
+
const fetchSearchIndex = async (...basePathList) => (await Promise.allSettled(basePathList.map(async (basePath) => [
|
|
25
|
+
basePath,
|
|
26
|
+
await fetchJSON(joinPath(basePath, SEARCH_INDEX_FILENAME)),
|
|
27
|
+
])))
|
|
28
|
+
.map((_) => (_.status === 'fulfilled' ? _.value : []))
|
|
29
|
+
.map(getSearchIndex);
|
|
30
|
+
const getSearchIndex = ([basePath, result]) => {
|
|
31
|
+
if (!result) {
|
|
32
|
+
return {};
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
...result,
|
|
36
|
+
corpus: result.corpus?.map((_) => ({
|
|
37
|
+
..._,
|
|
38
|
+
uri: _.uri === 'index' ? basePath : joinPath(basePath, _.uri),
|
|
39
|
+
})),
|
|
40
|
+
};
|
|
41
|
+
};
|
|
25
42
|
//# sourceMappingURL=useSearch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSearch.js","sourceRoot":"","sources":["../../../src/services/search/useSearch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAqC,MAAM,UAAU,CAAC;AAErE,MAAM,qBAAqB,GAAG,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"useSearch.js","sourceRoot":"","sources":["../../../src/services/search/useSearch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAqC,MAAM,UAAU,CAAC;AAErE,MAAM,qBAAqB,GAAG,mBAAmB,CAAC;AAgBlD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EACxB,YAAY,EACZ,YAAY,GAAG,EAAE,GACJ,EAA2C,EAAE;IAC1D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC;IAEvD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,IAAI,EAAE;YACvD,QAAQ,CAAC,YAAY,CAAC,CAAC;SACxB;IACH,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,MAAM,EAAE,IAAI,EAAE,GAAG,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;IAE5F,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAsB,IAAI,CAAC,CAAC;IAEhE,kBAAkB,CAAC,GAAG,EAAE;QACtB,IAAI,IAAI,EAAE;YACR,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SACpC;IACH,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;IAElB,OAAO,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;AACxD,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,KAAK,EAAE,GAAG,YAA+B,EAA0B,EAAE,CAC5F,CACE,MAAM,OAAO,CAAC,UAAU,CACtB,YAAY,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC;IACnC,QAAQ;IACR,MAAM,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC,CAAC;CAC3D,CAAC,CACH,CACF;KACE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAA2B,CAAC;KAC/E,GAAG,CAAC,cAAc,CAAC,CAAC;AAEzB,MAAM,cAAc,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAyB,EAAe,EAAE;IACjF,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,EAAE,CAAC;KACX;IAED,OAAO;QACL,GAAG,MAAM;QACT,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACjC,GAAG,CAAC;YACJ,GAAG,EAAE,CAAC,CAAC,GAAG,KAAK,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,GAAG,CAAC;SAC9D,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -20,10 +20,7 @@ useRouter.setup(() => {
|
|
|
20
20
|
};
|
|
21
21
|
}, []);
|
|
22
22
|
return {
|
|
23
|
-
href,
|
|
24
|
-
isReady: true,
|
|
25
23
|
pathname: new URL(href).pathname,
|
|
26
|
-
query: Object.fromEntries(new URLSearchParams(globalThis.location.search)),
|
|
27
24
|
push: (url) => {
|
|
28
25
|
globalThis.history.pushState(null, '', url);
|
|
29
26
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-fixture.js","sourceRoot":"","sources":["../src/setup-fixture.ts"],"names":[],"mappings":"AAAA,OAAO,mCAAmC,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,GAAG,MAAM,YAAY,CAAC;AAE7B,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAE3B,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE;IACnB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAS,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAE/E,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,mBAAmB,GAAG,GAAG,EAAE;YAC/B,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC,CAAC;QAEF,UAAU,CAAC,gBAAgB,CAAC,UAAU,EAAE,mBAAmB,CAAC,CAAC;QAE7D,OAAO,GAAG,EAAE;YACV,UAAU,CAAC,mBAAmB,CAAC,UAAU,EAAE,mBAAmB,CAAC,CAAC;QAClE,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,
|
|
1
|
+
{"version":3,"file":"setup-fixture.js","sourceRoot":"","sources":["../src/setup-fixture.ts"],"names":[],"mappings":"AAAA,OAAO,mCAAmC,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,GAAG,MAAM,YAAY,CAAC;AAE7B,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAE3B,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE;IACnB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAS,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAE/E,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,mBAAmB,GAAG,GAAG,EAAE;YAC/B,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC,CAAC;QAEF,UAAU,CAAC,gBAAgB,CAAC,UAAU,EAAE,mBAAmB,CAAC,CAAC;QAE7D,OAAO,GAAG,EAAE;YACV,UAAU,CAAC,mBAAmB,CAAC,UAAU,EAAE,mBAAmB,CAAC,CAAC;QAClE,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,QAAQ,EAAE,IAAI,GAAG,CAAC,IAAc,CAAC,CAAC,QAAQ;QAC1C,IAAI,EAAE,CAAC,GAAW,EAAE,EAAE;YACpB,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;QAC9C,CAAC;QACD,OAAO,EAAE,CAAC,GAAW,EAAE,EAAE;YACvB,UAAU,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;QACjD,CAAC;QACD,IAAI,EAAE,GAAG,EAAE;YACT,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QAC5B,CAAC;KACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,gBAAgB,CAAC,KAAK,CAAC,CAAC,OAAO,EAAO,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE;IAC9C,MAAM,gBAAgB,GAAG,EAAE,EAAE,MAAM,EAAE,IAAI,KAAK,QAAQ,CAAC;IAEvD,IAAI,CAAC,gBAAgB,EAAE;QACrB,EAAE,EAAE,cAAc,EAAE,CAAC;KACtB;IAED,OAAO,CAAC,EAAE,CAAC,CAAC;AACd,CAAC,CAAC,CAAC;AAEH,iBAAiB,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;IAC7B,MAAM,EAAE,IAAI;IACZ,IAAI,IAAI;QACN,OAAO,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC;IAClC,CAAC;IACD,IAAI,MAAM;QACR,OAAO,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC;IACpC,CAAC;CACF,CAAC,CAAC,CAAC"}
|
|
@@ -49,8 +49,6 @@ export const parseEsiaProfile = async (
|
|
|
49
49
|
generalSeniority: getYearFromMonth(esiaAdditionalDocument.workLength).toString(),
|
|
50
50
|
lastJobExperience: getYearFromMonth(esiaAdditionalDocument.workLengthLastJob).toString(),
|
|
51
51
|
jobsNumber: esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
|
|
52
|
-
esiaAccountTypeCd: profile.esiaAccountType,
|
|
53
|
-
confirmationIncome: { key: 'SFR_CERTIFICATE', text: 'Запрос Банком доходов из СФР' },
|
|
54
52
|
employment: { key: 'WORK', text: 'Работаю' },
|
|
55
53
|
files,
|
|
56
54
|
}),
|
|
@@ -15,6 +15,7 @@ import { style } from '../../utils/style';
|
|
|
15
15
|
import { gapStyles } from '../HorizontalLayout/gapStyles';
|
|
16
16
|
import { type ProductBlockContent } from '../ProductBlock/ProductBlockContent';
|
|
17
17
|
import { type GalleryLayoutContent } from './GalleryLayoutContent';
|
|
18
|
+
import { useSortProductBlocks } from './useSortProductBlocks';
|
|
18
19
|
|
|
19
20
|
const MIN_LENGTH_CHILD = 5;
|
|
20
21
|
const SHORT_TILE_INDEXES = [1, 2, 3, 4];
|
|
@@ -49,25 +50,31 @@ export const GalleryLayout = UniBlock<GalleryLayoutProps>(
|
|
|
49
50
|
version = 'transparent',
|
|
50
51
|
isTheme = false,
|
|
51
52
|
isCardBorder = false,
|
|
53
|
+
block = {},
|
|
52
54
|
...rest
|
|
53
|
-
}) =>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
className
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
...rest
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
55
|
+
}) => {
|
|
56
|
+
const blocks = useSortProductBlocks(block);
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<BlockWrapper
|
|
60
|
+
className={style(
|
|
61
|
+
'grid grid-cols-1 sm:grid-cols-1 lg:grid-cols-4 lg:auto-rows-fr',
|
|
62
|
+
gapStyles[gap],
|
|
63
|
+
className,
|
|
64
|
+
)}
|
|
65
|
+
padding={padding}
|
|
66
|
+
version={version}
|
|
67
|
+
isTheme={isTheme}
|
|
68
|
+
{...rest}
|
|
69
|
+
>
|
|
70
|
+
{renderChildren({
|
|
71
|
+
...rest,
|
|
72
|
+
block: { ...block, blocks },
|
|
73
|
+
renderProps: getRenderProps({ isInnerPadding, isCardBorder }),
|
|
74
|
+
})}
|
|
75
|
+
</BlockWrapper>
|
|
76
|
+
);
|
|
77
|
+
},
|
|
71
78
|
{
|
|
72
79
|
childrenTypes: ['ProductBlock'],
|
|
73
80
|
childSchema: () => LINK_SCHEMA,
|
|
@@ -107,13 +114,19 @@ const blockDecoratorWrapper =
|
|
|
107
114
|
`wrap_${i}`,
|
|
108
115
|
) ?? productBlockDecorator(idx)(props, i);
|
|
109
116
|
|
|
117
|
+
const visibilityByIdx = (i?: number) => (Number(i) < 5 ? '' : 'hidden');
|
|
118
|
+
|
|
110
119
|
const productBlockDecorator =
|
|
111
120
|
(idx: number): BlockDecorator =>
|
|
112
121
|
({ blockClassName, block, render }, i) => {
|
|
113
122
|
const modifiedBlock = modifyBlock(block, idx);
|
|
114
123
|
|
|
115
124
|
return (
|
|
116
|
-
<LinkWrapper
|
|
125
|
+
<LinkWrapper
|
|
126
|
+
key={String(i)}
|
|
127
|
+
{...modifiedBlock.content?.link}
|
|
128
|
+
className={style(visibilityByIdx(idx), getChildStyle(idx))}
|
|
129
|
+
>
|
|
117
130
|
{render({
|
|
118
131
|
blockClassName: style(blockClassName, 'h-full'),
|
|
119
132
|
block: modifiedBlock,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useEffect, useMemo, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import { useSessionStore } from '@redneckz/uni-jsx/lib/Store/useSessionStore';
|
|
3
|
+
import { type BlockDef } from '../../model/ContentPageDef';
|
|
4
|
+
|
|
5
|
+
export const useSortProductBlocks = (parentBlock: BlockDef = {}): BlockDef[] => {
|
|
6
|
+
const [blocks, setBlocks] = useState(parentBlock.blocks ?? []);
|
|
7
|
+
const sessionStore = useSessionStore();
|
|
8
|
+
const offerIds: string[] = sessionStore?.offerIds || [];
|
|
9
|
+
|
|
10
|
+
const sortedBlocks = useMemo(() => {
|
|
11
|
+
const blocksMap = new Map(parentBlock.blocks?.map((block) => [block?.__id, block]) ?? []);
|
|
12
|
+
|
|
13
|
+
const blocksByOfferIds = offerIds
|
|
14
|
+
.map((id) => blocksMap.get(id))
|
|
15
|
+
.filter((block): block is BlockDef => Boolean(block));
|
|
16
|
+
|
|
17
|
+
const tailBlocks = blocks.filter(({ __id = '' }) => !offerIds.includes(__id));
|
|
18
|
+
|
|
19
|
+
return [...blocksByOfferIds, ...tailBlocks];
|
|
20
|
+
}, [blocks, offerIds]);
|
|
21
|
+
|
|
22
|
+
useEffect(() => setBlocks(sortedBlocks), []);
|
|
23
|
+
|
|
24
|
+
return blocks;
|
|
25
|
+
};
|
|
@@ -7,6 +7,7 @@ import { getAspectsWithInclude } from '../../hooks/useAspects/aspects/getAspects
|
|
|
7
7
|
import { useLocation } from '../../hooks/useLocation';
|
|
8
8
|
import { type BlockVersion } from '../../model/BlockVersion';
|
|
9
9
|
import { type IconVersion } from '../../model/IconVersion';
|
|
10
|
+
import { ClientOnly } from '../../ui-kit/ClientOnly';
|
|
10
11
|
import { useDialog } from '../../ui-kit/DialogManager/useDialog';
|
|
11
12
|
import { LocationDialog } from '../../ui-kit/LocationDialog/LocationDialog';
|
|
12
13
|
import { SearchDialog } from '../../ui-kit/SearchDialog/SearchDialog';
|
|
@@ -36,15 +37,17 @@ export const HeaderSecondaryMenu = JSX<HeaderSecondaryMenuProps>(
|
|
|
36
37
|
className={style('flex items-center ml-5 md:max-w-[300px] xl:max-w-full gap-lg', className)}
|
|
37
38
|
role="navigation"
|
|
38
39
|
>
|
|
39
|
-
{rest?.branches?.visible ? (
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
{currentLocation?.name && rest?.branches?.visible ? (
|
|
41
|
+
<ClientOnly>
|
|
42
|
+
<TopItem
|
|
43
|
+
className="whitespace-nowrap text-ellipsis overflow-hidden"
|
|
44
|
+
flat={true}
|
|
45
|
+
href="#"
|
|
46
|
+
text={currentLocation?.name}
|
|
47
|
+
data={getAspectsWithInclude(rest?.branches?.dataClick, currentLocation?.name ?? '')}
|
|
48
|
+
onClick={openLocationDialog}
|
|
49
|
+
/>
|
|
50
|
+
</ClientOnly>
|
|
48
51
|
) : null}
|
|
49
52
|
{rest?.officesAtms?.href ? (
|
|
50
53
|
<TopItem className="whitespace-nowrap" flat={true} {...rest.officesAtms} />
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useEffect } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import { useCallback, useEffect } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { type HeaderData } from '../../data/HeaderData';
|
|
4
4
|
import { type JSONRefObject } from '../../data/JSONRefObject';
|
|
5
5
|
import { type StickyMenuItem } from '../../data/StickyMobileData';
|
|
@@ -23,15 +23,17 @@ export const BurgerMenuDialog = JSX<BurgerMenuDialogProps>(
|
|
|
23
23
|
const locationDialog = useDialog(LocationDialog, locationDialogProps);
|
|
24
24
|
const { name: location } = useLocation();
|
|
25
25
|
const menuDimensions = menuRef?.current?.getBoundingClientRect();
|
|
26
|
-
const basePath = getBasePath(env.SITE_URL);
|
|
27
26
|
|
|
28
|
-
const handleIframeLoad = () => {
|
|
29
|
-
const iframeWindow: Window = globalThis
|
|
27
|
+
const handleIframeLoad = useCallback(() => {
|
|
28
|
+
const iframeWindow: Window = globalThis?.frames['burger-menu-iframe'];
|
|
30
29
|
const ifDoc: HTMLIFrameElement = document.getElementsByTagName('iframe')['iframe-dialog'];
|
|
30
|
+
|
|
31
31
|
ifDoc.style.height = String(ifDoc?.contentWindow?.document.body.offsetHeight) + 'px';
|
|
32
|
+
|
|
33
|
+
const basePath = getBasePath(env.SITE_URL);
|
|
32
34
|
iframeWindow.postMessage({ type: 'currentTab', data: basePath?.slice(1) }, '*');
|
|
33
35
|
iframeWindow.postMessage({ type: 'currentLocation', data: location }, '*');
|
|
34
|
-
};
|
|
36
|
+
}, [env.SITE_URL]);
|
|
35
37
|
|
|
36
38
|
useEffect(() => {
|
|
37
39
|
const iframeWindow: Window = globalThis.frames['burger-menu-iframe'];
|
|
@@ -74,7 +76,7 @@ export const BurgerMenuDialog = JSX<BurgerMenuDialogProps>(
|
|
|
74
76
|
<iframe
|
|
75
77
|
id="iframe-dialog"
|
|
76
78
|
name="burger-menu-iframe"
|
|
77
|
-
onLoad={
|
|
79
|
+
onLoad={handleIframeLoad}
|
|
78
80
|
src={menuItem?.src}
|
|
79
81
|
width={menuDimensions?.width || 0}
|
|
80
82
|
/>
|
|
@@ -11,6 +11,8 @@ import { style } from '../../utils/style';
|
|
|
11
11
|
import { renderTabsLayout } from './renderTabsLayout';
|
|
12
12
|
import { type GroupTab, type Tab, type TabsLayoutContent } from './TabsLayoutContent';
|
|
13
13
|
|
|
14
|
+
const STICKY_STYLE = 'sticky top-1 z-20';
|
|
15
|
+
|
|
14
16
|
type TabCountedProps = GroupTab & {
|
|
15
17
|
count?: number;
|
|
16
18
|
};
|
|
@@ -27,9 +29,11 @@ export const TabsLayout = UniBlock<TabsLayoutProps>(
|
|
|
27
29
|
isSticky = false,
|
|
28
30
|
...rest
|
|
29
31
|
}) => {
|
|
30
|
-
const id = getId(block
|
|
32
|
+
const id = getId(block || {});
|
|
31
33
|
const router = useRouter();
|
|
32
34
|
const isEveryLink = tabs.every((_) => _?.type === 'link');
|
|
35
|
+
const query = new URLSearchParams(globalThis?.location?.search || '');
|
|
36
|
+
const currentQueryParam = query.get[id];
|
|
33
37
|
|
|
34
38
|
const tabsCounted: Tab[] = showCounter
|
|
35
39
|
? tabs.map((_) => ({
|
|
@@ -38,7 +42,6 @@ export const TabsLayout = UniBlock<TabsLayoutProps>(
|
|
|
38
42
|
}))
|
|
39
43
|
: tabs;
|
|
40
44
|
|
|
41
|
-
const { isReady } = router;
|
|
42
45
|
const [activeTabIndex, setActiveTabIndex] = useState(
|
|
43
46
|
getInitSelectedIndex(tabsCounted, getUrlParams(id)),
|
|
44
47
|
);
|
|
@@ -47,25 +50,24 @@ export const TabsLayout = UniBlock<TabsLayoutProps>(
|
|
|
47
50
|
|
|
48
51
|
//TODO: Вынести в отдельный хук
|
|
49
52
|
useEffect(() => {
|
|
50
|
-
const defaultTabIndex =
|
|
53
|
+
const defaultTabIndex = currentQueryParam
|
|
51
54
|
? tabsCounted.findIndex(
|
|
52
|
-
(_, i) => _.type === 'group' && (_?.tabName ?? String(i)) ===
|
|
55
|
+
(_, i) => _.type === 'group' && (_?.tabName ?? String(i)) === currentQueryParam,
|
|
53
56
|
)
|
|
54
57
|
: defaultSelectedTab;
|
|
55
58
|
|
|
56
59
|
setActiveTabIndex(defaultTabIndex === -1 ? 0 : defaultTabIndex);
|
|
57
|
-
}, [
|
|
60
|
+
}, [defaultSelectedTab, currentQueryParam]);
|
|
58
61
|
|
|
59
62
|
const slotName = getSlotName(tabsCounted[activeTabIndex] as TabCountedProps, activeTabIndex);
|
|
60
63
|
|
|
61
64
|
const updateUrlSearchTabParam = (_: TabItemBase, i: number) => {
|
|
62
|
-
const searchParams = new URLSearchParams(router.query as Record<string, string>);
|
|
63
65
|
if (_.text) {
|
|
64
|
-
|
|
66
|
+
query.set(id, _?.tabName ?? String(i));
|
|
65
67
|
} else {
|
|
66
|
-
|
|
68
|
+
query.delete(id);
|
|
67
69
|
}
|
|
68
|
-
router.replace(`${router.pathname}?${
|
|
70
|
+
router.replace(`${router.pathname}?${query}`, { scroll: false });
|
|
69
71
|
};
|
|
70
72
|
|
|
71
73
|
const handleChange = useCallback(
|
|
@@ -84,15 +86,15 @@ export const TabsLayout = UniBlock<TabsLayoutProps>(
|
|
|
84
86
|
|
|
85
87
|
return (
|
|
86
88
|
<BlockWrapper
|
|
87
|
-
className={style({
|
|
89
|
+
className={style({ [STICKY_STYLE]: [isSticky, isEveryLink].every(Boolean) }, className)} // Sticky is only used for type links
|
|
88
90
|
defaultPadding="p-0"
|
|
89
91
|
block={block}
|
|
90
92
|
{...rest}
|
|
91
93
|
>
|
|
92
94
|
{renderTabsLayout({
|
|
93
95
|
className: style({
|
|
94
|
-
'pb-1': block?.slots
|
|
95
|
-
|
|
96
|
+
'pb-1': [block?.slots, tabsType === 'default'].every(Boolean),
|
|
97
|
+
[STICKY_STYLE]: [isSticky, !isEveryLink].every(Boolean),
|
|
96
98
|
}),
|
|
97
99
|
items: getItems(tabs, tabsCounted),
|
|
98
100
|
activeItem,
|
|
@@ -4,13 +4,9 @@ interface RouterOptions {
|
|
|
4
4
|
|
|
5
5
|
export interface Router {
|
|
6
6
|
pathname: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
basePath?: string;
|
|
10
|
-
push: (url: string, as?: string, options?: RouterOptions) => void;
|
|
11
|
-
replace: (url: string, as?: string, options?: RouterOptions) => void;
|
|
7
|
+
push: (url: string, options?: RouterOptions) => void;
|
|
8
|
+
replace: (url: string, options?: RouterOptions) => void;
|
|
12
9
|
back: () => void;
|
|
13
|
-
isReady: boolean;
|
|
14
10
|
}
|
|
15
11
|
|
|
16
12
|
export function useRouter(): Router {
|
|
@@ -18,10 +14,7 @@ export function useRouter(): Router {
|
|
|
18
14
|
}
|
|
19
15
|
|
|
20
16
|
useRouter._impl = (): Router => ({
|
|
21
|
-
isReady: false,
|
|
22
|
-
href: globalThis.location?.href || '/',
|
|
23
17
|
pathname: globalThis.location?.pathname || '/',
|
|
24
|
-
query: {},
|
|
25
18
|
push: () => {
|
|
26
19
|
// Do nothing
|
|
27
20
|
},
|
|
@@ -33,5 +33,5 @@ const isHrefActive =
|
|
|
33
33
|
const getRouterHref = (router: Router) => (href?: string) => {
|
|
34
34
|
const basePath = getBasePath(env.SITE_URL);
|
|
35
35
|
|
|
36
|
-
return isURL(href) ?
|
|
36
|
+
return isURL(href) ? globalThis?.location?.href : joinPath(basePath, router.pathname);
|
|
37
37
|
};
|
|
@@ -10,6 +10,8 @@ const SEARCH_INDEX_FILENAME = 'search.index.json';
|
|
|
10
10
|
|
|
11
11
|
export type SearchResult = Array<CorpusItem[]>; // List of pages (CorpusItem) per base path from "basePathList"
|
|
12
12
|
|
|
13
|
+
type FetchSearchIndexResult = [string, SearchIndex | null];
|
|
14
|
+
|
|
13
15
|
interface SearchParams {
|
|
14
16
|
basePathList: Nullable<string[]>;
|
|
15
17
|
initialQuery?: string;
|
|
@@ -47,7 +49,26 @@ export const useSearch = ({
|
|
|
47
49
|
|
|
48
50
|
const fetchSearchIndex = async (...basePathList: (string | null)[]): Promise<SearchIndex[]> =>
|
|
49
51
|
(
|
|
50
|
-
await Promise.allSettled
|
|
51
|
-
basePathList.map((basePath) =>
|
|
52
|
+
await Promise.allSettled(
|
|
53
|
+
basePathList.map(async (basePath) => [
|
|
54
|
+
basePath,
|
|
55
|
+
await fetchJSON(joinPath(basePath, SEARCH_INDEX_FILENAME)),
|
|
56
|
+
]),
|
|
52
57
|
)
|
|
53
|
-
)
|
|
58
|
+
)
|
|
59
|
+
.map((_) => (_.status === 'fulfilled' ? _.value : []) as FetchSearchIndexResult)
|
|
60
|
+
.map(getSearchIndex);
|
|
61
|
+
|
|
62
|
+
const getSearchIndex = ([basePath, result]: FetchSearchIndexResult): SearchIndex => {
|
|
63
|
+
if (!result) {
|
|
64
|
+
return {};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
...result,
|
|
69
|
+
corpus: result.corpus?.map((_) => ({
|
|
70
|
+
..._,
|
|
71
|
+
uri: _.uri === 'index' ? basePath : joinPath(basePath, _.uri),
|
|
72
|
+
})),
|
|
73
|
+
};
|
|
74
|
+
};
|
|
@@ -26,10 +26,7 @@ useRouter.setup(() => {
|
|
|
26
26
|
}, []);
|
|
27
27
|
|
|
28
28
|
return {
|
|
29
|
-
href,
|
|
30
|
-
isReady: true,
|
|
31
29
|
pathname: new URL(href as string).pathname,
|
|
32
|
-
query: Object.fromEntries(new URLSearchParams(globalThis.location.search)),
|
|
33
30
|
push: (url: string) => {
|
|
34
31
|
globalThis.history.pushState(null, '', url);
|
|
35
32
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redneckz/wildless-cms-uni-blocks",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.832",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ЦК",
|
|
@@ -39,26 +39,6 @@
|
|
|
39
39
|
"./lib/common.css": "./lib/common.css",
|
|
40
40
|
"./mobile/lib/common.css": "./mobile/lib/common.css",
|
|
41
41
|
"./fonts/ubuntu/*": "./fonts/ubuntu/*",
|
|
42
|
-
"./lib/content-page-repository": {
|
|
43
|
-
"import": "./lib/content-page-repository/index.js",
|
|
44
|
-
"require": "./dist/content-page-repository/index.js",
|
|
45
|
-
"types": "./lib/content-page-repository/index.d.ts"
|
|
46
|
-
},
|
|
47
|
-
"./lib/content-page-repository/*": {
|
|
48
|
-
"import": "./lib/content-page-repository/*.js",
|
|
49
|
-
"require": "./dist/content-page-repository/*.js",
|
|
50
|
-
"types": "./lib/content-page-repository/*.d.ts"
|
|
51
|
-
},
|
|
52
|
-
"./mobile/lib/content-page-repository": {
|
|
53
|
-
"import": "./mobile/lib/content-page-repository/index.js",
|
|
54
|
-
"require": "./mobile/dist/content-page-repository/index.js",
|
|
55
|
-
"types": "./mobile/lib/content-page-repository/index.d.ts"
|
|
56
|
-
},
|
|
57
|
-
"./mobile/lib/content-page-repository/*": {
|
|
58
|
-
"import": "./mobile/lib/content-page-repository/*.js",
|
|
59
|
-
"require": "./mobile/dist/content-page-repository/*.js",
|
|
60
|
-
"types": "./mobile/lib/content-page-repository/*.d.ts"
|
|
61
|
-
},
|
|
62
42
|
"./bundle/*.js": "./bundle/*.js",
|
|
63
43
|
"./bundle/*.json": "./bundle/*.json",
|
|
64
44
|
"./*.json": "./*.json",
|
|
@@ -49,8 +49,6 @@ export const parseEsiaProfile = async (
|
|
|
49
49
|
generalSeniority: getYearFromMonth(esiaAdditionalDocument.workLength).toString(),
|
|
50
50
|
lastJobExperience: getYearFromMonth(esiaAdditionalDocument.workLengthLastJob).toString(),
|
|
51
51
|
jobsNumber: esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
|
|
52
|
-
esiaAccountTypeCd: profile.esiaAccountType,
|
|
53
|
-
confirmationIncome: { key: 'SFR_CERTIFICATE', text: 'Запрос Банком доходов из СФР' },
|
|
54
52
|
employment: { key: 'WORK', text: 'Работаю' },
|
|
55
53
|
files,
|
|
56
54
|
}),
|
|
@@ -4,15 +4,12 @@ import '../../setup-fixture';
|
|
|
4
4
|
import { type ContentPageDef } from '../../model/ContentPageDef';
|
|
5
5
|
import { Blocks } from '../Blocks';
|
|
6
6
|
import { ContentPage } from './ContentPage';
|
|
7
|
-
import { normalizePage } from './normalizePage';
|
|
8
7
|
import { useContentPageData } from './useContentPageData';
|
|
9
8
|
|
|
10
9
|
export default {
|
|
11
10
|
default: () => {
|
|
12
11
|
const data = useContentPageData(Blocks);
|
|
13
12
|
|
|
14
|
-
return
|
|
15
|
-
<ContentPage blocksRegistry={Blocks} data={normalizePage(Blocks)(data as ContentPageDef)} />
|
|
16
|
-
);
|
|
13
|
+
return <ContentPage blocksRegistry={Blocks} data={data as ContentPageDef} />;
|
|
17
14
|
},
|
|
18
15
|
};
|
|
@@ -5,7 +5,6 @@ import { type BlockDecorator } from '../../model/BlockDecorator';
|
|
|
5
5
|
import { type ContentPageDef } from '../../model/ContentPageDef';
|
|
6
6
|
import { Blocks } from '../Blocks';
|
|
7
7
|
import { ContentPage } from './ContentPage';
|
|
8
|
-
import { normalizePage } from './normalizePage';
|
|
9
8
|
import { useContentPageData } from './useContentPageData';
|
|
10
9
|
|
|
11
10
|
const blockDecorator: BlockDecorator = ({ blockClassName, block, render }, i) => (
|
|
@@ -33,11 +32,7 @@ export default {
|
|
|
33
32
|
const data = useContentPageData(Blocks);
|
|
34
33
|
|
|
35
34
|
return (
|
|
36
|
-
<ContentPage
|
|
37
|
-
className="bg-main"
|
|
38
|
-
blocksRegistry={Blocks}
|
|
39
|
-
data={normalizePage(Blocks)(data as ContentPageDef)}
|
|
40
|
-
/>
|
|
35
|
+
<ContentPage className="bg-main" blocksRegistry={Blocks} data={data as ContentPageDef} />
|
|
41
36
|
);
|
|
42
37
|
},
|
|
43
38
|
editor: () => {
|
|
@@ -48,7 +43,7 @@ export default {
|
|
|
48
43
|
<ContentPage
|
|
49
44
|
className="bg-transparent"
|
|
50
45
|
blocksRegistry={Blocks}
|
|
51
|
-
data={
|
|
46
|
+
data={data as ContentPageDef}
|
|
52
47
|
blockDecorator={blockDecorator}
|
|
53
48
|
/>
|
|
54
49
|
</div>
|
|
@@ -15,6 +15,7 @@ import { style } from '../../utils/style';
|
|
|
15
15
|
import { gapStyles } from '../HorizontalLayout/gapStyles';
|
|
16
16
|
import { type ProductBlockContent } from '../ProductBlock/ProductBlockContent';
|
|
17
17
|
import { type GalleryLayoutContent } from './GalleryLayoutContent';
|
|
18
|
+
import { useSortProductBlocks } from './useSortProductBlocks';
|
|
18
19
|
|
|
19
20
|
const MIN_LENGTH_CHILD = 5;
|
|
20
21
|
const SHORT_TILE_INDEXES = [1, 2, 3, 4];
|
|
@@ -49,25 +50,31 @@ export const GalleryLayout = UniBlock<GalleryLayoutProps>(
|
|
|
49
50
|
version = 'transparent',
|
|
50
51
|
isTheme = false,
|
|
51
52
|
isCardBorder = false,
|
|
53
|
+
block = {},
|
|
52
54
|
...rest
|
|
53
|
-
}) =>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
className
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
...rest
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
55
|
+
}) => {
|
|
56
|
+
const blocks = useSortProductBlocks(block);
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<BlockWrapper
|
|
60
|
+
className={style(
|
|
61
|
+
'grid grid-cols-1 sm:grid-cols-1 lg:grid-cols-4 lg:auto-rows-fr',
|
|
62
|
+
gapStyles[gap],
|
|
63
|
+
className,
|
|
64
|
+
)}
|
|
65
|
+
padding={padding}
|
|
66
|
+
version={version}
|
|
67
|
+
isTheme={isTheme}
|
|
68
|
+
{...rest}
|
|
69
|
+
>
|
|
70
|
+
{renderChildren({
|
|
71
|
+
...rest,
|
|
72
|
+
block: { ...block, blocks },
|
|
73
|
+
renderProps: getRenderProps({ isInnerPadding, isCardBorder }),
|
|
74
|
+
})}
|
|
75
|
+
</BlockWrapper>
|
|
76
|
+
);
|
|
77
|
+
},
|
|
71
78
|
{
|
|
72
79
|
childrenTypes: ['ProductBlock'],
|
|
73
80
|
childSchema: () => LINK_SCHEMA,
|
|
@@ -107,13 +114,19 @@ const blockDecoratorWrapper =
|
|
|
107
114
|
`wrap_${i}`,
|
|
108
115
|
) ?? productBlockDecorator(idx)(props, i);
|
|
109
116
|
|
|
117
|
+
const visibilityByIdx = (i?: number) => (Number(i) < 5 ? '' : 'hidden');
|
|
118
|
+
|
|
110
119
|
const productBlockDecorator =
|
|
111
120
|
(idx: number): BlockDecorator =>
|
|
112
121
|
({ blockClassName, block, render }, i) => {
|
|
113
122
|
const modifiedBlock = modifyBlock(block, idx);
|
|
114
123
|
|
|
115
124
|
return (
|
|
116
|
-
<LinkWrapper
|
|
125
|
+
<LinkWrapper
|
|
126
|
+
key={String(i)}
|
|
127
|
+
{...modifiedBlock.content?.link}
|
|
128
|
+
className={style(visibilityByIdx(idx), getChildStyle(idx))}
|
|
129
|
+
>
|
|
117
130
|
{render({
|
|
118
131
|
blockClassName: style(blockClassName, 'h-full'),
|
|
119
132
|
block: modifiedBlock,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useEffect, useMemo, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import { useSessionStore } from '@redneckz/uni-jsx/lib/Store/useSessionStore';
|
|
3
|
+
import { type BlockDef } from '../../model/ContentPageDef';
|
|
4
|
+
|
|
5
|
+
export const useSortProductBlocks = (parentBlock: BlockDef = {}): BlockDef[] => {
|
|
6
|
+
const [blocks, setBlocks] = useState(parentBlock.blocks ?? []);
|
|
7
|
+
const sessionStore = useSessionStore();
|
|
8
|
+
const offerIds: string[] = sessionStore?.offerIds || [];
|
|
9
|
+
|
|
10
|
+
const sortedBlocks = useMemo(() => {
|
|
11
|
+
const blocksMap = new Map(parentBlock.blocks?.map((block) => [block?.__id, block]) ?? []);
|
|
12
|
+
|
|
13
|
+
const blocksByOfferIds = offerIds
|
|
14
|
+
.map((id) => blocksMap.get(id))
|
|
15
|
+
.filter((block): block is BlockDef => Boolean(block));
|
|
16
|
+
|
|
17
|
+
const tailBlocks = blocks.filter(({ __id = '' }) => !offerIds.includes(__id));
|
|
18
|
+
|
|
19
|
+
return [...blocksByOfferIds, ...tailBlocks];
|
|
20
|
+
}, [blocks, offerIds]);
|
|
21
|
+
|
|
22
|
+
useEffect(() => setBlocks(sortedBlocks), []);
|
|
23
|
+
|
|
24
|
+
return blocks;
|
|
25
|
+
};
|