@redneckz/wildless-cms-uni-blocks 0.2.99 → 0.2.103
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +126 -63
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/BlockContent.d.ts +3 -2
- package/dist/components/Blocks.d.ts +1 -0
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/CreditCalculator/CreditCalculator.js +2 -2
- package/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/dist/components/Footer/FooterContent.d.ts +1 -1
- package/dist/components/Footer/Sitemap.d.ts +1 -1
- package/dist/components/Footer/Sitemap.js +2 -2
- package/dist/components/Footer/Sitemap.js.map +1 -1
- package/dist/components/Header/Header.js +13 -9
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/HeaderContent.d.ts +8 -1
- package/dist/components/Header/HeaderSecondaryMenu.d.ts +2 -1
- package/dist/components/Header/HeaderSecondaryMenu.js +14 -2
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenuButton.js +1 -1
- package/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/dist/components/Headline/HeadlineContent.d.ts +2 -9
- package/dist/components/MobileBlocks.d.ts +1 -0
- package/dist/components/MobileBlocks.js +2 -0
- package/dist/components/MobileBlocks.js.map +1 -1
- package/dist/components/Navigation/Navigation.d.ts +5 -0
- package/dist/components/Navigation/Navigation.js +16 -0
- package/dist/components/Navigation/Navigation.js.map +1 -0
- package/dist/components/Navigation/NavigationContent.d.ts +10 -0
- package/dist/components/Navigation/NavigationContent.js +2 -0
- package/dist/components/Navigation/NavigationContent.js.map +1 -0
- package/dist/components/Navigation/NavigationItem.d.ts +4 -0
- package/dist/components/Navigation/NavigationItem.js +6 -0
- package/dist/components/Navigation/NavigationItem.js.map +1 -0
- package/dist/components/StepsBlock/StepsBlock.d.ts +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +3 -3
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +5 -2
- package/dist/hooks/useLink.js +2 -1
- package/dist/hooks/useLink.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/dist/model/BgColorVersion.d.ts +8 -0
- package/dist/model/BgColorVersion.js +2 -0
- package/dist/model/BgColorVersion.js.map +1 -0
- package/dist/services/sitemap/SitemapProps.d.ts +13 -0
- package/dist/services/sitemap/SitemapProps.js +2 -0
- package/dist/services/sitemap/SitemapProps.js.map +1 -0
- package/dist/services/sitemap/findActiveSubItem.d.ts +3 -0
- package/dist/services/sitemap/findActiveSubItem.js +13 -0
- package/dist/services/sitemap/findActiveSubItem.js.map +1 -0
- package/dist/services/sitemap/isHrefActive.d.ts +4 -0
- package/dist/services/sitemap/isHrefActive.js +9 -0
- package/dist/services/sitemap/isHrefActive.js.map +1 -0
- package/dist/services/sitemap/isSubItemActive.d.ts +3 -0
- package/dist/services/sitemap/isSubItemActive.js +6 -0
- package/dist/services/sitemap/isSubItemActive.js.map +1 -0
- package/dist/services/sitemap/isTopItemActive.d.ts +3 -0
- package/dist/services/sitemap/isTopItemActive.js +7 -0
- package/dist/services/sitemap/isTopItemActive.js.map +1 -0
- package/dist/services/sitemap/mergeTopItems.d.ts +2 -0
- package/dist/{mergeTopItems.js → services/sitemap/mergeTopItems.js} +1 -3
- package/dist/services/sitemap/mergeTopItems.js.map +1 -0
- package/dist/services/sitemap/useSitemap.d.ts +3 -0
- package/dist/{hooks → services/sitemap}/useSitemap.js +1 -1
- package/dist/services/sitemap/useSitemap.js.map +1 -0
- package/dist/ui-kit/Button/ButtonProps.d.ts +1 -1
- package/dist/ui-kit/HeaderItem/HeaderItem.js +16 -4
- package/dist/ui-kit/HeaderItem/HeaderItem.js.map +1 -1
- package/dist/ui-kit/Icon/IconProps.d.ts +83 -45
- package/dist/ui-kit/Icon/IconProps.js +62 -43
- package/dist/ui-kit/Icon/IconProps.js.map +1 -1
- package/dist/ui-kit/Logo/Logo.d.ts +1 -0
- package/dist/ui-kit/Logo/Logo.js +10 -2
- package/dist/ui-kit/Logo/Logo.js.map +1 -1
- package/dist/ui-kit/TopItem/TopItem.d.ts +2 -0
- package/dist/ui-kit/TopItem/TopItem.js +19 -7
- package/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/dist/utils/adjustHref.d.ts +4 -0
- package/dist/utils/adjustHref.js +21 -0
- package/dist/utils/adjustHref.js.map +1 -0
- package/dist/utils/maxBy.d.ts +2 -0
- package/dist/utils/maxBy.js +7 -0
- package/dist/utils/maxBy.js.map +1 -0
- package/dist/utils/url.d.ts +0 -13
- package/dist/utils/url.js +2 -26
- package/dist/utils/url.js.map +1 -1
- package/dist/utils/withoutMobilePath.d.ts +2 -0
- package/dist/utils/withoutMobilePath.js +6 -0
- package/dist/utils/withoutMobilePath.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/BlockContent.d.ts +3 -2
- package/lib/components/Blocks.d.ts +1 -0
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/CreditCalculator/CreditCalculator.js +2 -2
- package/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/lib/components/Footer/FooterContent.d.ts +1 -1
- package/lib/components/Footer/Sitemap.d.ts +1 -1
- package/lib/components/Footer/Sitemap.js +2 -2
- package/lib/components/Footer/Sitemap.js.map +1 -1
- package/lib/components/Header/Header.fixture.d.ts +4 -1
- package/lib/components/Header/Header.js +13 -9
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/HeaderContent.d.ts +8 -1
- package/lib/components/Header/HeaderSecondaryMenu.d.ts +2 -1
- package/lib/components/Header/HeaderSecondaryMenu.js +14 -2
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenuButton.js +1 -1
- package/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/lib/components/Headline/HeadlineContent.d.ts +2 -9
- package/lib/components/MobileBlocks.d.ts +1 -0
- package/lib/components/MobileBlocks.js +2 -0
- package/lib/components/MobileBlocks.js.map +1 -1
- package/lib/components/Navigation/Navigation.d.ts +5 -0
- package/lib/components/Navigation/Navigation.fixture.d.ts +2 -0
- package/lib/components/Navigation/Navigation.js +14 -0
- package/lib/components/Navigation/Navigation.js.map +1 -0
- package/lib/components/Navigation/NavigationContent.d.ts +10 -0
- package/lib/components/Navigation/NavigationContent.js +2 -0
- package/lib/components/Navigation/NavigationContent.js.map +1 -0
- package/lib/components/Navigation/NavigationItem.d.ts +4 -0
- package/lib/components/Navigation/NavigationItem.js +4 -0
- package/lib/components/Navigation/NavigationItem.js.map +1 -0
- package/lib/components/StepsBlock/StepsBlock.d.ts +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +3 -3
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +5 -2
- package/lib/hooks/useLink.js +2 -1
- package/lib/hooks/useLink.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js.map +1 -1
- package/lib/model/BgColorVersion.d.ts +8 -0
- package/lib/model/BgColorVersion.js +2 -0
- package/lib/model/BgColorVersion.js.map +1 -0
- package/lib/services/sitemap/SitemapProps.d.ts +13 -0
- package/lib/services/sitemap/SitemapProps.js +2 -0
- package/lib/services/sitemap/SitemapProps.js.map +1 -0
- package/lib/services/sitemap/findActiveSubItem.d.ts +3 -0
- package/lib/services/sitemap/findActiveSubItem.js +10 -0
- package/lib/services/sitemap/findActiveSubItem.js.map +1 -0
- package/lib/services/sitemap/isHrefActive.d.ts +4 -0
- package/lib/services/sitemap/isHrefActive.js +6 -0
- package/lib/services/sitemap/isHrefActive.js.map +1 -0
- package/lib/services/sitemap/isSubItemActive.d.ts +3 -0
- package/lib/services/sitemap/isSubItemActive.js +3 -0
- package/lib/services/sitemap/isSubItemActive.js.map +1 -0
- package/lib/services/sitemap/isTopItemActive.d.ts +3 -0
- package/lib/services/sitemap/isTopItemActive.js +4 -0
- package/lib/services/sitemap/isTopItemActive.js.map +1 -0
- package/lib/services/sitemap/mergeTopItems.d.ts +2 -0
- package/lib/{mergeTopItems.js → services/sitemap/mergeTopItems.js} +1 -3
- package/lib/services/sitemap/mergeTopItems.js.map +1 -0
- package/lib/services/sitemap/useSitemap.d.ts +3 -0
- package/lib/{hooks → services/sitemap}/useSitemap.js +1 -1
- package/lib/services/sitemap/useSitemap.js.map +1 -0
- package/lib/ui-kit/Button/ButtonProps.d.ts +1 -1
- package/lib/ui-kit/HeaderItem/HeaderItem.js +16 -4
- package/lib/ui-kit/HeaderItem/HeaderItem.js.map +1 -1
- package/lib/ui-kit/Icon/IconProps.d.ts +83 -45
- package/lib/ui-kit/Icon/IconProps.js +62 -43
- package/lib/ui-kit/Icon/IconProps.js.map +1 -1
- package/lib/ui-kit/Logo/Logo.d.ts +1 -0
- package/lib/ui-kit/Logo/Logo.js +10 -2
- package/lib/ui-kit/Logo/Logo.js.map +1 -1
- package/lib/ui-kit/TopItem/TopItem.d.ts +2 -0
- package/lib/ui-kit/TopItem/TopItem.js +19 -7
- package/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/lib/utils/adjustHref.d.ts +4 -0
- package/lib/utils/adjustHref.js +18 -0
- package/lib/utils/adjustHref.js.map +1 -0
- package/lib/utils/maxBy.d.ts +2 -0
- package/lib/utils/maxBy.js +3 -0
- package/lib/utils/maxBy.js.map +1 -0
- package/lib/utils/url.d.ts +0 -13
- package/lib/utils/url.js +1 -21
- package/lib/utils/url.js.map +1 -1
- package/lib/utils/withoutMobilePath.d.ts +2 -0
- package/lib/utils/withoutMobilePath.js +3 -0
- package/lib/utils/withoutMobilePath.js.map +1 -0
- package/package.json +4 -2
- package/src/components/BlockContent.ts +4 -2
- package/src/components/Blocks.ts +2 -0
- package/src/components/ContentPage/ContentPage.page.json +28 -15
- package/src/components/CreditCalculator/CreditCalculator.tsx +4 -6
- package/src/components/Footer/FooterContent.ts +1 -1
- package/src/components/Footer/Sitemap.tsx +4 -3
- package/src/components/Header/Header.fixture.tsx +4 -18
- package/src/components/Header/Header.tsx +56 -45
- package/src/components/Header/HeaderContent.ts +8 -1
- package/src/components/Header/HeaderSecondaryMenu.tsx +25 -12
- package/src/components/Header/HeaderSecondaryMenuButton.tsx +2 -4
- package/src/components/Headline/HeadlineContent.ts +2 -10
- package/src/components/MobileBlocks.ts +2 -0
- package/src/components/Navigation/Navigation.fixture.tsx +28 -0
- package/src/components/Navigation/Navigation.tsx +39 -0
- package/src/components/Navigation/NavigationContent.ts +11 -0
- package/src/components/Navigation/NavigationItem.tsx +17 -0
- package/src/components/PictureText/PictureText.example.json +2 -2
- package/src/components/PictureText/PictureText.fixture.tsx +2 -2
- package/src/components/StepsBlock/StepsBlock.example.json +3 -1
- package/src/components/StepsBlock/StepsBlock.tsx +21 -16
- package/src/components/StepsBlock/StepsBlockContent.ts +5 -2
- package/src/hooks/useLink.ts +2 -1
- package/src/icons/Calendar2Icon.svg +1 -0
- package/src/icons/CalendarCircleIcon.svg +1 -0
- package/src/icons/CalendarTickIcon.svg +1 -0
- package/src/icons/CardIcon.svg +1 -0
- package/src/icons/CardPosIcon.svg +1 -0
- package/src/icons/CardTickIcon.svg +1 -0
- package/src/icons/CardWithGemIcon.svg +1 -0
- package/src/icons/ChartSquareIcon.svg +1 -0
- package/src/icons/CreditCardsIcon.svg +1 -0
- package/src/icons/DischountStarIcon.svg +1 -0
- package/src/icons/{DocumentText.svg → DocumentTextIcon.svg} +0 -0
- package/src/icons/EarthIcon.svg +1 -0
- package/src/icons/EmptyWalletChangeIcon.svg +1 -0
- package/src/icons/GlobalIcon.svg +1 -0
- package/src/icons/GridIcon.svg +1 -1
- package/src/icons/GridIconWhite.svg +4 -0
- package/src/icons/InterestGrowthIcon.svg +1 -0
- package/src/icons/InterestIcon.svg +1 -0
- package/src/icons/JCBIcon.svg +1 -0
- package/src/icons/MasterCardIcon.svg +1 -0
- package/src/icons/MinusIcon.svg +1 -0
- package/src/icons/MirIcon.svg +1 -0
- package/src/icons/MoneyIcon.svg +1 -0
- package/src/icons/MoneyInsuranceIcon.svg +1 -0
- package/src/icons/MonitorMobileIcon.svg +1 -0
- package/src/icons/OfficeIcon.svg +1 -0
- package/src/icons/PercentageRoundIcon.svg +1 -0
- package/src/icons/PersonalCardIcon.svg +1 -0
- package/src/icons/PlusIcon.svg +1 -0
- package/src/icons/Profile2UserIcon.svg +1 -0
- package/src/icons/RoundRubleIcon.svg +1 -0
- package/src/icons/SafeIcon.svg +1 -0
- package/src/icons/ShieldTickIcon.svg +1 -0
- package/src/icons/SmallClockIcon.svg +1 -0
- package/src/icons/UnionPayIcon.svg +1 -0
- package/src/icons/UserTickIcon.svg +1 -0
- package/src/icons/VisaIcon.svg +1 -0
- package/src/icons/WalletAdd2Icon.svg +1 -0
- package/src/icons/WalletAddIcon.svg +1 -0
- package/src/icons/WalletWithMoneyIcon.svg +1 -0
- package/src/index.ts +1 -1
- package/src/model/BgColorVersion.ts +8 -0
- package/src/services/sitemap/SitemapProps.ts +15 -0
- package/src/services/sitemap/findActiveSubItem.ts +14 -0
- package/src/services/sitemap/isHrefActive.ts +13 -0
- package/src/services/sitemap/isSubItemActive.ts +8 -0
- package/src/services/sitemap/isTopItemActive.ts +9 -0
- package/src/{mergeTopItems.spec.ts → services/sitemap/mergeTopItems.spec.ts} +0 -0
- package/src/{mergeTopItems.ts → services/sitemap/mergeTopItems.ts} +3 -4
- package/src/{hooks → services/sitemap}/useSitemap.ts +3 -3
- package/src/ui-kit/Button/ButtonProps.ts +1 -1
- package/src/ui-kit/HeaderItem/HeaderItem.tsx +32 -18
- package/src/ui-kit/Icon/IconProps.ts +44 -6
- package/src/ui-kit/Logo/Logo.tsx +30 -18
- package/src/ui-kit/TopItem/TopItem.tsx +46 -19
- package/src/utils/adjustHref.spec.ts +25 -0
- package/src/utils/adjustHref.ts +24 -0
- package/src/utils/maxBy.spec.ts +11 -0
- package/src/utils/maxBy.ts +7 -0
- package/src/utils/url.spec.ts +1 -37
- package/src/utils/url.ts +2 -39
- package/src/utils/withoutMobilePath.ts +3 -0
- package/dist/components/Header/isSubItemActive.d.ts +0 -3
- package/dist/components/Header/isSubItemActive.js +0 -8
- package/dist/components/Header/isSubItemActive.js.map +0 -1
- package/dist/components/Header/isTopItemActive.d.ts +0 -3
- package/dist/components/Header/isTopItemActive.js +0 -8
- package/dist/components/Header/isTopItemActive.js.map +0 -1
- package/dist/hooks/useSitemap.d.ts +0 -3
- package/dist/hooks/useSitemap.js.map +0 -1
- package/dist/mergeTopItems.d.ts +0 -2
- package/dist/mergeTopItems.js.map +0 -1
- package/lib/components/Header/isSubItemActive.d.ts +0 -3
- package/lib/components/Header/isSubItemActive.js +0 -5
- package/lib/components/Header/isSubItemActive.js.map +0 -1
- package/lib/components/Header/isTopItemActive.d.ts +0 -3
- package/lib/components/Header/isTopItemActive.js +0 -5
- package/lib/components/Header/isTopItemActive.js.map +0 -1
- package/lib/hooks/useSitemap.d.ts +0 -3
- package/lib/hooks/useSitemap.js.map +0 -1
- package/lib/mergeTopItems.d.ts +0 -2
- package/lib/mergeTopItems.js.map +0 -1
- package/src/components/Header/isSubItemActive.ts +0 -7
- package/src/components/Header/isTopItemActive.ts +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"http://json-schema.org/draft-07/schema#","definitions":{"HeadlineBgColor":{"type":"string","enum":["transparent","bg-white"],"title":"Цвет фона","enumNames":["Прозрачный","Белый"]},"HeadlineContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"align":{"$ref":"#/definitions/AlignType"},"description":{"type":"string","title":"Описание"},"bgColor":{"$ref":"#/definitions/HeadlineBgColor"}},"title":"Заголовок"},"TitleSize":{"type":"string","enum":["XL","L","M","S"]},"AlignType":{"type":"string","enum":["left","center","right"],"title":"Выравнивание","enumNames":["По левому краю","По центру","По правому краю"]},"LinkColumnsMode":{"type":"string","enum":["single","double"],"title":"Режим отображения списка"},"LinkDocsItem":{"type":"object","properties":{"text":{"type":"string","title":"Текст"},"fileSize":{"type":"string","title":"размер файла"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}},"title":"Элемент списка"},"LinkProps":{"type":"object","properties":{"text":{"type":"string","title":"Текст"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}},"title":"Ссылка","required":["text","href"]},"Target":{"type":"string","enum":["","_self","_blank","_parent","_top"],"title":"Таргет (target)","enumNames":["","self (текущее окно или фрейм)","blank (новое окно)","parent (фрейм-родитель)","top (текущее окно)"]},"LinkDocsContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"align":{"$ref":"#/definitions/AlignType"},"columnsMode":{"$ref":"#/definitions/LinkColumnsMode","title":"Отображение списка"},"icon":{"$ref":"#/definitions/IconName","title":"Название иконки"},"documents":{"type":"array","items":{"$ref":"#/definitions/LinkDocsItem"},"title":"Список"}},"title":"Список документов"},"IconName":{"type":"string","enum":["","ActualBalanceIcon","AppleIcon","CalendarCircleIcon","CalendarIcon","CalendarWhiteIcon","CardIcon","CardPosIcon","CardTickIcon","ClockIcon","ComfortableCompIcon","DiscountShape","DocIcon","DocumentText","DollarIcon","EmptyWalletChangeIcon","EmptyWalletIcon","EmptyWalletWhiteIcon","EuroIcon","GlassIcon","GridIcon","JCBIcon","LoupeIcon","MasterCardIcon","MinusIcon","MirIcon","MoneyIcon","MonitorMobileIcon","NewDocIcon","OkIcon","PassSendIcon","PercentageSquareIcon","PercentageSquareWhiteIcon","PlayMarketIcon","PlusIcon","Profile2UserIcon","ProfileIcon","ShieldTickIcon","SignDocsIcon","TelegramIcon","UnionPayIcon","UserIcon","VisaIcon","VKIcon","WalletIcon"],"title":"Иконка","enumNames":["","Деньги","Лого «Apple»","Скруглённый календарь","Календарь","Календарь белый","Кред. карта","Кред. карта под наклоном","Кред. карта с галочкой","Часы","Кресло","Скидка","Документ","Документ с текстом","Доллар","Пустой кошелёк с возвратом","Пустой кошелёк","Пустой кошелёк белый","Евро","Зеркало","Сетка","JCB","Лупа","MasterCard","Минус","МИР","Деньги","Монитор и мобильный","Новый документ","Лого «Одноклассники»","Бизнес","Проценты","Проценты белые","Лого «PlayMarket»","Плюс","Профиль, 2 персоны","Профиль","Безопасность","Подписанные документы","Лого «Telegram»","UnionPay","Пользователь","Visa","Лого «VK»","Кошелёк"]},"Benefit":{"type":"object","properties":{"label":{"type":"string","title":"Название"},"description":{"type":"string","title":"Описание"},"icon":{"$ref":"#/definitions/IconName"}},"title":"Преимущество"},"BenefitsBlockContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"benefits":{"type":"array","items":{"$ref":"#/definitions/Benefit"},"title":"Список преимуществ","maxItems":6}},"title":"Блок преимущества"},"PictureTextContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"image":{"$ref":"#/definitions/Picture"},"benefits":{"type":"array","items":{"$ref":"#/definitions/Benefit"},"title":"Список преимуществ"}},"title":"Картинка с текстом"},"Picture":{"type":"object","properties":{"src":{"type":"string","title":"Картинка"},"format":{"type":"string","enum":["jpeg","jpg","png","gif","webp","heif","avif"],"title":"Формат"},"size":{"type":"object","properties":{"width":{"type":"number","title":"Ширина"},"height":{"type":"number","title":"Высота"}},"title":"Размер изображения"},"alt":{"type":"string","title":"Альтернативный текст (alt)"},"sources":{"type":"array","items":{"$ref":"#/definitions/ImgSource"},"title":"Другие форматы"},"title":{"type":"string","title":"Текст подсказки (title)"}},"required":["src"],"title":"Изображение"},"Img":{"type":"object","properties":{"src":{"type":"string","title":"Картинка"},"alt":{"type":"string","title":"Альтернативный текст (alt)"},"title":{"type":"string","title":"Текст подсказки (title)"}},"required":["src"]},"ImgSource":{"type":"object","properties":{"src":{"type":"string","title":"Картинка"},"format":{"type":"string","enum":["jpeg","jpg","png","gif","webp","heif","avif"],"title":"Формат"},"size":{"type":"object","properties":{"width":{"type":"number","title":"Ширина"},"height":{"type":"number","title":"Высота"}},"title":"Размер изображения"}},"required":["src"]},"TextBlockVersion":{"type":"string","enum":["primary","secondary","secondary-light"],"title":"Цвет плитки","enumNames":["Основная","Второстепенная","Второстепенная прозрачная"]},"TextBlockIconVersion":{"type":"string","enum":["none","small","big"],"title":"Размер иконки","enumNames":["Нет","Маленькая","Большая"]},"TextBlockContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"iconVersion":{"$ref":"#/definitions/TextBlockIconVersion"},"blockVersion":{"$ref":"#/definitions/TextBlockVersion"}},"title":"Текстовый блок"},"AccordionTypeBlock":{"type":"string","enum":["Headline","LinkDocs","TextBlock","PictureText"],"title":"Тип блока"},"HeadlineAccordionBlock":{"type":"object","properties":{"accordionBlockType":{"$ref":"#/definitions/AccordionTypeBlock","default":"Headline"},"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"align":{"$ref":"#/definitions/AlignType"},"description":{"type":"string","title":"Описание"},"bgColor":{"$ref":"#/definitions/HeadlineBgColor"}},"required":["accordionBlockType"],"title":"Заголовок"},"LinkDocsAccordionBlock":{"type":"object","properties":{"accordionBlockType":{"$ref":"#/definitions/AccordionTypeBlock","default":"LinkDocs"},"title":{"type":"string","title":"Заголовок"},"align":{"$ref":"#/definitions/AlignType"},"columnsMode":{"$ref":"#/definitions/LinkColumnsMode","title":"Отображение списка"},"icon":{"$ref":"#/definitions/IconName","title":"Название иконки"},"documents":{"type":"array","items":{"$ref":"#/definitions/LinkDocsItem"},"title":"Список"}},"required":["accordionBlockType"],"title":"Список документов"},"TextBlockAccordionBlock":{"type":"object","properties":{"accordionBlockType":{"$ref":"#/definitions/AccordionTypeBlock","default":"TextBlock"},"title":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"iconVersion":{"$ref":"#/definitions/TextBlockIconVersion"},"blockVersion":{"$ref":"#/definitions/TextBlockVersion"}},"required":["accordionBlockType"],"title":"Текстовый блок"},"PictureTextAccordionBlock":{"type":"object","properties":{"accordionBlockType":{"$ref":"#/definitions/AccordionTypeBlock","default":"PictureText"},"title":{"type":"string","title":"Заголовок"},"image":{"$ref":"#/definitions/Picture"},"benefits":{"type":"array","items":{"$ref":"#/definitions/Benefit"},"title":"Список преимуществ"}},"required":["accordionBlockType"],"title":"Картинка с текстом"},"EmptyOption":{"type":"null","title":"Выберите блок"},"AccordionBlockProps":{"anyOf":[{"$ref":"#/definitions/EmptyOption"},{"$ref":"#/definitions/HeadlineAccordionBlock"},{"$ref":"#/definitions/LinkDocsAccordionBlock"},{"$ref":"#/definitions/TextBlockAccordionBlock"},{"$ref":"#/definitions/PictureTextAccordionBlock"}],"title":"Содержимое аккордеона"},"AccordionItemCommonProps":{"type":"object","properties":{"label":{"type":"string","title":"Название","default":"Список"},"blocks":{"type":"array","items":{"$ref":"#/definitions/AccordionBlockProps"},"title":"Блоки"}},"title":"Элемент списка"},"AccordionContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"accordionItems":{"type":"array","items":{"$ref":"#/definitions/AccordionItemCommonProps"},"title":"Список"}},"title":"Аккордеон"},"CellData":{"type":"object","properties":{"label":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"}},"title":"Ячейка"},"ColumnHeader":{"type":"object","properties":{"link":{"$ref":"#/definitions/LinkProps"},"title":{"type":"string","title":"Заголовок"},"image":{"$ref":"#/definitions/Picture"},"icon":{"$ref":"#/definitions/IconName"}},"title":"Шапка колонки"},"Column":{"type":"object","properties":{"header":{"$ref":"#/definitions/ColumnHeader"},"data":{"type":"array","items":{"type":"array","items":{"$ref":"#/definitions/CellData"}},"title":"Данные"}},"title":"Продукт"},"RowHeader":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"}},"title":"Параметр"},"ComparisonTableContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"rowHeaders":{"type":"array","items":{"$ref":"#/definitions/RowHeader"},"title":"Параметры"},"columns":{"type":"array","items":{"$ref":"#/definitions/Column"},"title":"Продукты"},"isColoredFirstColumn":{"type":"boolean","title":"Закрасить первую колонку"},"visibleRowLength":{"type":"number","title":"Отображать заданное количество строк"}},"title":"Сравнительная таблица"},"ExchangeRateTileContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"}},"title":"Курсы валют"},"ContactType":{"type":"string","enum":["tel","email"],"title":"Тип контакта","enumNames":["Телефон","Почта"]},"ContactInfo":{"type":"object","properties":{"type":{"$ref":"#/definitions/ContactType"},"description":{"type":"string","title":"Описание"},"text":{"type":"string","title":"Текст"}},"title":"Контакт"},"SocialMedia":{"type":"object","properties":{"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}},"required":["href"]},"FooterContent":{"type":"object","properties":{"topItems":{"type":"array","items":{"$ref":"#/definitions/TopMenuItem"},"title":"Дополнительное меню"},"relatedEnterprises":{"type":"array","items":{"$ref":"#/definitions/LinkProps"},"title":"Другие предприятия"},"contacts":{"type":"array","items":{"$ref":"#/definitions/ContactInfo"},"title":"Контакты"},"socialMedia":{"type":"array","items":{"$ref":"#/definitions/SocialMedia"},"title":"Социальные сети"},"documents":{"type":"array","items":{"$ref":"#/definitions/LinkProps"},"title":"Обязательные документы"}},"title":"Подвал","required":["topItems"]},"SitemapProps":{"type":"object","properties":{"topItems":{"type":"array","items":{"$ref":"#/definitions/TopMenuItem"},"title":"Дополнительное меню"}}},"TopMenuItem":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/definitions/LinkProps"},"title":"Ссылки"},"text":{"type":"string","title":"Текст"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}},"title":"Меню","required":["text","href"]},"GalleryCard":{"type":"object","properties":{"button":{"$ref":"#/definitions/BaseTileIconButton","title":"Ссылка"},"title":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"items":{"type":"array","items":{"type":"string"},"title":"Список","minItems":4},"version":{"$ref":"#/definitions/BlockVersion"}},"title":"Карточка"},"BaseTileIconButton":{"type":"object","properties":{"version":{"$ref":"#/definitions/ButtonVersion"},"aboveText":{"type":"string","title":"Верхний текст"},"icon":{"$ref":"#/definitions/IconName"},"text":{"type":"string","title":"Текст","default":"Кнопка"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}}},"ButtonWithIconProps":{"type":"object","properties":{"version":{"$ref":"#/definitions/ButtonVersion"},"aboveText":{"type":"string","title":"Верхний текст"},"text":{"type":"string","title":"Текст","default":"Кнопка"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}}},"ButtonProps":{"type":"object","properties":{"version":{"$ref":"#/definitions/ButtonVersion"},"text":{"type":"string","title":"Текст","default":"Кнопка"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}}},"ButtonVersion":{"type":"string","enum":["primary","secondary"],"title":"Цвет кнопки","default":"primary","enumNames":["Основная","Второстепенная"]},"BlockVersion":{"type":"string","enum":["primary","secondary"],"title":"Цвет плитки","enumNames":["Основная","Второстепенная"]},"GalleryContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"},"cards":{"type":"array","items":{"$ref":"#/definitions/GalleryCard"},"title":"Карточки"}},"title":"Галерея"},"HeaderContent":{"type":"object","properties":{"topItems":{"type":"array","items":{"$ref":"#/definitions/TopMenuItem"},"title":"Дополнительное меню"},"defaultLocation":{"type":"string","title":"Город по-умолчанию","default":"Москва"}},"title":"Шапка","required":["defaultLocation","topItems"]},"QRCode":{"type":"object","properties":{"src":{"type":"string","title":"QR код"},"href":{"type":"string","title":"Ссылка"}},"title":"QR код"},"MobileAppTileContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"qr":{"$ref":"#/definitions/QRCode"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4}},"title":"Мобильное приложение"},"ProductBlockInnerCommonProps":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"benefits":{"type":"array","items":{"$ref":"#/definitions/Benefit"},"title":"Преимущества","minItems":2,"maxItems":3},"items":{"type":"array","items":{"type":"string"},"title":"Список"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4},"version":{"$ref":"#/definitions/BlockVersion"}}},"ProductBlockContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"breadcrumbs":{"type":"array","items":{"$ref":"#/definitions/LinkProps"},"title":"Хлебные крошки"},"benefits":{"type":"array","items":{"$ref":"#/definitions/Benefit"},"title":"Преимущества","minItems":2,"maxItems":3},"items":{"type":"array","items":{"type":"string"},"title":"Список"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4},"version":{"$ref":"#/definitions/BlockVersion"}},"title":"Продуктовый блок"},"ProductSlide":{"type":"object","properties":{"nav":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"desc":{"type":"string","title":"Описание"}},"required":["title","desc"],"title":"Кнопка под слайдом"},"productBlock":{"$ref":"#/definitions/ProductBlockInnerCommonProps","title":"Содержимое слайда"}},"required":["nav","productBlock"],"title":"Слайд"},"ProductGalleryContent":{"type":"object","properties":{"slides":{"type":"array","items":{"$ref":"#/definitions/ProductSlide"},"title":"Слайды"}},"title":"Продуктовая галерея"},"ProductTileContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"benefits":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","title":"Название"},"description":{"type":"string","title":"Описание"}}},"title":"Преимущества"},"items":{"type":"array","items":{"type":"string"},"title":"Список"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4},"version":{"$ref":"#/definitions/BlockVersion"}},"title":"Продуктовая плитка"},"PromoTileContent":{"type":"object","properties":{"date":{"type":"string","title":"Дата публикации"},"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"align":{"$ref":"#/definitions/AlignType"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"items":{"type":"array","items":{"type":"string"},"title":"Список"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4},"version":{"$ref":"#/definitions/BlockVersion"}},"title":"Акции"},"BaseTileCommonProps":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"align":{"$ref":"#/definitions/AlignType"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"items":{"type":"array","items":{"type":"string"},"title":"Список"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4},"version":{"$ref":"#/definitions/BlockVersion"}},"title":"Плитка"},"Step":{"type":"object","properties":{"label":{"type":"string","title":"Название"},"description":{"type":"string","title":"Описание"},"icon":{"$ref":"#/definitions/IconName"}},"required":["label"],"title":"Шаг"},"StepsBlockContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"steps":{"type":"array","items":{"$ref":"#/definitions/Step"},"title":"Шаги","maxItems":6}},"title":"Блок шаги"},"TileContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"items":{"type":"array","items":{"type":"string"},"title":"Список"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4},"version":{"$ref":"#/definitions/BlockVersion"}},"title":"Плитка"},"TariffsTableRowData":{"type":"object","properties":{"header":{"$ref":"#/definitions/TariffsTableRowHeader"},"data":{"type":"array","items":{"type":"array","items":{"$ref":"#/definitions/TariffsTableCellData"}}}},"required":["header","data"],"title":"Ряд"},"TariffsTableRowHeader":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"icon":{"$ref":"#/definitions/IconName"}},"title":"Параметр"},"TariffsTableCellData":{"type":"object","properties":{"label":{"type":"string","title":"Заголовок"},"list":{"$ref":"#/definitions/TariffsTableList"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки"}},"title":"Ячейка"},"TariffsTableList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"string"},"title":"Элементы списка"}},"title":"Список"},"TariffsTableColumn":{"type":"object","properties":{"data":{"type":"array","items":{"type":"array","items":{"$ref":"#/definitions/TariffsTableCellData"}},"title":"Данные"}},"title":"Колонка"},"TariffsTableContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"rowHeaders":{"type":"array","items":{"$ref":"#/definitions/TariffsTableRowHeader"},"title":"Параметры"},"columns":{"type":"array","items":{"$ref":"#/definitions/TariffsTableColumn"},"title":"Колонки"}},"title":"Таблица тарифов"},"CalculatorParams":{"type":"object","properties":{"isAnnuity":{"type":"boolean"},"minSum":{"type":"number"},"maxSum":{"type":"number"},"minMonths":{"type":"number"},"maxMonths":{"type":"number"},"rateWithInsurance":{"type":"number"},"rateWithoutInsurance":{"type":"number"}}},"CreditCalculatorData":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/definitions/CalculatorParams"}}}},"CreditCalculatorContent":{"type":"object","properties":{"directoryName":{"type":"string","title":"Справочник"}},"title":"Кредитный калькулятор"},"MiniGalleryContent":{"$ref":"#/definitions/GalleryContent","title":"Мини-галерея"}}}
|
|
1
|
+
{"$schema":"http://json-schema.org/draft-07/schema#","definitions":{"HeadlineContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"align":{"$ref":"#/definitions/AlignType"},"description":{"type":"string","title":"Описание"},"bgColor":{"$ref":"#/definitions/BgColorVersion"}},"title":"Заголовок"},"TitleSize":{"type":"string","enum":["XL","L","M","S"]},"AlignType":{"type":"string","enum":["left","center","right"],"title":"Выравнивание","enumNames":["По левому краю","По центру","По правому краю"]},"BgColorVersion":{"type":"string","enum":["transparent","bg-white"],"title":"Цвет фона","enumNames":["Прозрачный","Белый"]},"LinkColumnsMode":{"type":"string","enum":["single","double"],"title":"Режим отображения списка"},"LinkDocsItem":{"type":"object","properties":{"text":{"type":"string","title":"Текст"},"fileSize":{"type":"string","title":"размер файла"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}},"title":"Элемент списка"},"LinkProps":{"type":"object","properties":{"text":{"type":"string","title":"Текст"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}},"title":"Ссылка","required":["text","href"]},"Target":{"type":"string","enum":["","_self","_blank","_parent","_top"],"title":"Таргет (target)","enumNames":["","self (текущее окно или фрейм)","blank (новое окно)","parent (фрейм-родитель)","top (текущее окно)"]},"LinkDocsContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"align":{"$ref":"#/definitions/AlignType"},"columnsMode":{"$ref":"#/definitions/LinkColumnsMode","title":"Отображение списка"},"icon":{"$ref":"#/definitions/IconName","title":"Название иконки"},"documents":{"type":"array","items":{"$ref":"#/definitions/LinkDocsItem"},"title":"Список"}},"title":"Список документов"},"IconName":{"type":"string","enum":["ActualBalanceIcon","AppleIcon","Calendar2Icon","CalendarCircleIcon","CalendarIcon","CalendarTickIcon","CalendarWhiteIcon","CardWithGemIcon","ChartSquareIcon","CardIcon","CardPosIcon","CardTickIcon","ClockIcon","ComfortableCompIcon","CreditCardsIcon","DiscountShapeIcon","DocIcon","DocumentTextIcon","DollarIcon","EarthIcon","EmptyWalletChangeIcon","EmptyWalletIcon","EmptyWalletWhiteIcon","EuroIcon","GlassIcon","GlobalIcon","GridIcon","GridIconWhite","InterestGrowthIcon","InterestIcon","JCBIcon","LoupeIcon","MasterCardIcon","MinusIcon","MirIcon","MoneyIcon","MoneyInsuranceIcon","MonitorMobileIcon","NewDocIcon","OfficeIcon","OkIcon","PassSendIcon","PercentageRoundIcon","PercentageSquareIcon","PercentageSquareWhiteIcon","PersonalCardIcon","PlayMarketIcon","PlusIcon","Profile2UserIcon","ProfileIcon","RoundRubleIcon","SafeIcon","ShieldTickIcon","SignDocsIcon","SmallClockIcon","TelegramIcon","UnionPayIcon","UserTickIcon","VisaIcon","VKIcon","WalletAdd","WalletAdd2","WalletIcon","WalletWithMoneyIcon"],"title":"Иконка","enumNames":["Деньги","Лого «Apple»","Календарь 2","Скруглённый календарь","Календарь","Календарь с галочкой","Календарь белый","Карта с драгоценностями","Деньги внутри кошелька","Кред. карта","Кред. карта под наклоном","Кред. карта с галочкой","Часы","Кресло","Скидка","Кредитные карты","Огромная скидка","Документ","Документ с текстом","Доллар","Пустой кошелёк с возвратом","Пустой кошелёк","Пустой кошелёк (белый)","Евро","Зеркало","Глобус","Сетка","Сетка (белая)","Диаграмма роста","Скидка","JCB","Лупа","MasterCard","Минус","МИР","Деньги","Денежное страхование","Монитор и мобильный","Новый документ","Офис","Лого «Одноклассники»","Бизнес","Проценты (круг.)","Проценты","Проценты белые","Персональная карта","Лого «PlayMarket»","Плюс","Профиль, 2 персоны","Профиль","Рубль (круг.)","Сейф","Безопасность","Подписанные документы","Маленькие часы","Лого «Telegram»","UnionPay","Пользователь","Visa","Лого «VK»","Пополнение карты","Кошелёк с плюсом","Кошелёк","Кошелёк с деньгами"]},"Benefit":{"type":"object","properties":{"label":{"type":"string","title":"Название"},"description":{"type":"string","title":"Описание"},"icon":{"$ref":"#/definitions/IconName"}},"title":"Преимущество"},"BenefitsBlockContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"benefits":{"type":"array","items":{"$ref":"#/definitions/Benefit"},"title":"Список преимуществ","maxItems":6}},"title":"Блок преимущества"},"PictureTextContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"image":{"$ref":"#/definitions/Picture"},"benefits":{"type":"array","items":{"$ref":"#/definitions/Benefit"},"title":"Список преимуществ"}},"title":"Картинка с текстом"},"Picture":{"type":"object","properties":{"src":{"type":"string","title":"Картинка"},"format":{"type":"string","enum":["jpeg","jpg","png","gif","webp","heif","avif"],"title":"Формат"},"size":{"type":"object","properties":{"width":{"type":"number","title":"Ширина"},"height":{"type":"number","title":"Высота"}},"title":"Размер изображения"},"alt":{"type":"string","title":"Альтернативный текст (alt)"},"sources":{"type":"array","items":{"$ref":"#/definitions/ImgSource"},"title":"Другие форматы"},"title":{"type":"string","title":"Текст подсказки (title)"}},"required":["src"],"title":"Изображение"},"Img":{"type":"object","properties":{"src":{"type":"string","title":"Картинка"},"alt":{"type":"string","title":"Альтернативный текст (alt)"},"title":{"type":"string","title":"Текст подсказки (title)"}},"required":["src"]},"ImgSource":{"type":"object","properties":{"src":{"type":"string","title":"Картинка"},"format":{"type":"string","enum":["jpeg","jpg","png","gif","webp","heif","avif"],"title":"Формат"},"size":{"type":"object","properties":{"width":{"type":"number","title":"Ширина"},"height":{"type":"number","title":"Высота"}},"title":"Размер изображения"}},"required":["src"]},"TextBlockVersion":{"type":"string","enum":["primary","secondary","secondary-light"],"title":"Цвет плитки","enumNames":["Основная","Второстепенная","Второстепенная прозрачная"]},"TextBlockIconVersion":{"type":"string","enum":["none","small","big"],"title":"Размер иконки","enumNames":["Нет","Маленькая","Большая"]},"TextBlockContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"iconVersion":{"$ref":"#/definitions/TextBlockIconVersion"},"blockVersion":{"$ref":"#/definitions/TextBlockVersion"}},"title":"Текстовый блок"},"AccordionTypeBlock":{"type":"string","enum":["Headline","LinkDocs","TextBlock","PictureText"],"title":"Тип блока"},"HeadlineAccordionBlock":{"type":"object","properties":{"accordionBlockType":{"$ref":"#/definitions/AccordionTypeBlock","default":"Headline"},"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"align":{"$ref":"#/definitions/AlignType"},"description":{"type":"string","title":"Описание"},"bgColor":{"$ref":"#/definitions/BgColorVersion"}},"required":["accordionBlockType"],"title":"Заголовок"},"LinkDocsAccordionBlock":{"type":"object","properties":{"accordionBlockType":{"$ref":"#/definitions/AccordionTypeBlock","default":"LinkDocs"},"title":{"type":"string","title":"Заголовок"},"align":{"$ref":"#/definitions/AlignType"},"columnsMode":{"$ref":"#/definitions/LinkColumnsMode","title":"Отображение списка"},"icon":{"$ref":"#/definitions/IconName","title":"Название иконки"},"documents":{"type":"array","items":{"$ref":"#/definitions/LinkDocsItem"},"title":"Список"}},"required":["accordionBlockType"],"title":"Список документов"},"TextBlockAccordionBlock":{"type":"object","properties":{"accordionBlockType":{"$ref":"#/definitions/AccordionTypeBlock","default":"TextBlock"},"title":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"iconVersion":{"$ref":"#/definitions/TextBlockIconVersion"},"blockVersion":{"$ref":"#/definitions/TextBlockVersion"}},"required":["accordionBlockType"],"title":"Текстовый блок"},"PictureTextAccordionBlock":{"type":"object","properties":{"accordionBlockType":{"$ref":"#/definitions/AccordionTypeBlock","default":"PictureText"},"title":{"type":"string","title":"Заголовок"},"image":{"$ref":"#/definitions/Picture"},"benefits":{"type":"array","items":{"$ref":"#/definitions/Benefit"},"title":"Список преимуществ"}},"required":["accordionBlockType"],"title":"Картинка с текстом"},"EmptyOption":{"type":"null","title":"Выберите блок"},"AccordionBlockProps":{"anyOf":[{"$ref":"#/definitions/EmptyOption"},{"$ref":"#/definitions/HeadlineAccordionBlock"},{"$ref":"#/definitions/LinkDocsAccordionBlock"},{"$ref":"#/definitions/TextBlockAccordionBlock"},{"$ref":"#/definitions/PictureTextAccordionBlock"}],"title":"Содержимое аккордеона"},"AccordionItemCommonProps":{"type":"object","properties":{"label":{"type":"string","title":"Название","default":"Список"},"blocks":{"type":"array","items":{"$ref":"#/definitions/AccordionBlockProps"},"title":"Блоки"}},"title":"Элемент списка"},"AccordionContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"accordionItems":{"type":"array","items":{"$ref":"#/definitions/AccordionItemCommonProps"},"title":"Список"}},"title":"Аккордеон"},"CellData":{"type":"object","properties":{"label":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"}},"title":"Ячейка"},"ColumnHeader":{"type":"object","properties":{"link":{"$ref":"#/definitions/LinkProps"},"title":{"type":"string","title":"Заголовок"},"image":{"$ref":"#/definitions/Picture"},"icon":{"$ref":"#/definitions/IconName"}},"title":"Шапка колонки"},"Column":{"type":"object","properties":{"header":{"$ref":"#/definitions/ColumnHeader"},"data":{"type":"array","items":{"type":"array","items":{"$ref":"#/definitions/CellData"}},"title":"Данные"}},"title":"Продукт"},"RowHeader":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"}},"title":"Параметр"},"ComparisonTableContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"rowHeaders":{"type":"array","items":{"$ref":"#/definitions/RowHeader"},"title":"Параметры"},"columns":{"type":"array","items":{"$ref":"#/definitions/Column"},"title":"Продукты"},"isColoredFirstColumn":{"type":"boolean","title":"Закрасить первую колонку"},"visibleRowLength":{"type":"number","title":"Отображать заданное количество строк"}},"title":"Сравнительная таблица"},"ExchangeRateTileContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"}},"title":"Курсы валют"},"ContactType":{"type":"string","enum":["tel","email"],"title":"Тип контакта","enumNames":["Телефон","Почта"]},"ContactInfo":{"type":"object","properties":{"type":{"$ref":"#/definitions/ContactType"},"description":{"type":"string","title":"Описание"},"text":{"type":"string","title":"Текст"}},"title":"Контакт"},"SocialMedia":{"type":"object","properties":{"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}},"required":["href"]},"FooterContent":{"type":"object","properties":{"topItems":{"type":"array","items":{"$ref":"#/definitions/TopMenuItem"},"title":"Дополнительное меню"},"relatedEnterprises":{"type":"array","items":{"$ref":"#/definitions/LinkProps"},"title":"Другие предприятия"},"contacts":{"type":"array","items":{"$ref":"#/definitions/ContactInfo"},"title":"Контакты"},"socialMedia":{"type":"array","items":{"$ref":"#/definitions/SocialMedia"},"title":"Социальные сети"},"documents":{"type":"array","items":{"$ref":"#/definitions/LinkProps"},"title":"Обязательные документы"}},"title":"Подвал","required":["topItems"]},"SitemapProps":{"type":"object","properties":{"topItems":{"type":"array","items":{"$ref":"#/definitions/TopMenuItem"},"title":"Дополнительное меню"}}},"TopMenuItem":{"type":"object","properties":{"text":{"type":"string","title":"Текст"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}},"title":"Ссылка","required":["text","href"]},"GalleryCard":{"type":"object","properties":{"button":{"$ref":"#/definitions/BaseTileIconButton","title":"Ссылка"},"title":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"items":{"type":"array","items":{"type":"string"},"title":"Список","minItems":4},"version":{"$ref":"#/definitions/BlockVersion"}},"title":"Карточка"},"BaseTileIconButton":{"type":"object","properties":{"rounded":{"type":"boolean","title":"Закругленные углы"},"version":{"$ref":"#/definitions/ButtonVersion"},"aboveText":{"type":"string","title":"Верхний текст"},"icon":{"$ref":"#/definitions/IconName"},"text":{"type":"string","title":"Текст","default":"Кнопка"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}}},"ButtonWithIconProps":{"type":"object","properties":{"rounded":{"type":"boolean","title":"Закругленные углы"},"version":{"$ref":"#/definitions/ButtonVersion"},"aboveText":{"type":"string","title":"Верхний текст"},"text":{"type":"string","title":"Текст","default":"Кнопка"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}}},"ButtonProps":{"type":"object","properties":{"version":{"$ref":"#/definitions/ButtonVersion"},"text":{"type":"string","title":"Текст","default":"Кнопка"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}}},"ButtonVersion":{"type":"string","enum":["primary","secondary"],"title":"Цвет кнопки","default":"primary","enumNames":["Основная","Второстепенная"]},"BlockVersion":{"type":"string","enum":["primary","secondary"],"title":"Цвет плитки","enumNames":["Основная","Второстепенная"]},"GalleryContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"},"cards":{"type":"array","items":{"$ref":"#/definitions/GalleryCard"},"title":"Карточки"}},"title":"Галерея"},"HeaderContent":{"type":"object","properties":{"topItems":{"type":"array","items":{"$ref":"#/definitions/TopMenuItem"},"title":"Дополнительное меню"},"defaultLocation":{"type":"string","title":"Город по-умолчанию","default":"Москва"}},"title":"Шапка","required":["defaultLocation","topItems"]},"QRCode":{"type":"object","properties":{"src":{"type":"string","title":"QR код"},"href":{"type":"string","title":"Ссылка"}},"title":"QR код"},"MobileAppTileContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"qr":{"$ref":"#/definitions/QRCode"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4}},"title":"Мобильное приложение"},"NavigationContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"buttons":{"type":"array","items":{"$ref":"#/definitions/ButtonProps"},"title":"Список ссылок"}},"title":"Навигация"},"ProductBlockInnerCommonProps":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"benefits":{"type":"array","items":{"$ref":"#/definitions/Benefit"},"title":"Преимущества","minItems":2,"maxItems":3},"items":{"type":"array","items":{"type":"string"},"title":"Список"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4},"version":{"$ref":"#/definitions/BlockVersion"}}},"ProductBlockContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"breadcrumbs":{"type":"array","items":{"$ref":"#/definitions/LinkProps"},"title":"Хлебные крошки"},"benefits":{"type":"array","items":{"$ref":"#/definitions/Benefit"},"title":"Преимущества","minItems":2,"maxItems":3},"items":{"type":"array","items":{"type":"string"},"title":"Список"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4},"version":{"$ref":"#/definitions/BlockVersion"}},"title":"Продуктовый блок"},"ProductSlide":{"type":"object","properties":{"nav":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"desc":{"type":"string","title":"Описание"}},"required":["title","desc"],"title":"Кнопка под слайдом"},"productBlock":{"$ref":"#/definitions/ProductBlockInnerCommonProps","title":"Содержимое слайда"}},"required":["nav","productBlock"],"title":"Слайд"},"ProductGalleryContent":{"type":"object","properties":{"slides":{"type":"array","items":{"$ref":"#/definitions/ProductSlide"},"title":"Слайды"}},"title":"Продуктовая галерея"},"ProductTileContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"benefits":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","title":"Название"},"description":{"type":"string","title":"Описание"}}},"title":"Преимущества"},"items":{"type":"array","items":{"type":"string"},"title":"Список"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4},"version":{"$ref":"#/definitions/BlockVersion"}},"title":"Продуктовая плитка"},"PromoTileContent":{"type":"object","properties":{"date":{"type":"string","title":"Дата публикации"},"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"align":{"$ref":"#/definitions/AlignType"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"items":{"type":"array","items":{"type":"string"},"title":"Список"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4},"version":{"$ref":"#/definitions/BlockVersion"}},"title":"Акции"},"BaseTileCommonProps":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"align":{"$ref":"#/definitions/AlignType"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"items":{"type":"array","items":{"type":"string"},"title":"Список"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4},"version":{"$ref":"#/definitions/BlockVersion"}},"title":"Плитка"},"Step":{"type":"object","properties":{"label":{"type":"string","title":"Название"},"description":{"type":"string","title":"Описание"},"icon":{"$ref":"#/definitions/IconName"}},"title":"Шаг"},"StepsBlockContent":{"type":"object","properties":{"showLines":{"type":"boolean","title":"Линии"},"title":{"type":"string","title":"Заголовок"},"steps":{"type":"array","items":{"$ref":"#/definitions/Step"},"title":"Шаги","minItems":2,"maxItems":3}},"title":"Блок шаги"},"TariffsTableRowData":{"type":"object","properties":{"header":{"$ref":"#/definitions/TariffsTableRowHeader"},"data":{"type":"array","items":{"type":"array","items":{"$ref":"#/definitions/TariffsTableCellData"}}}},"required":["header","data"],"title":"Ряд"},"TariffsTableRowHeader":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"icon":{"$ref":"#/definitions/IconName"}},"title":"Параметр"},"TariffsTableCellData":{"type":"object","properties":{"label":{"type":"string","title":"Заголовок"},"list":{"$ref":"#/definitions/TariffsTableList"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки"}},"title":"Ячейка"},"TariffsTableList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"string"},"title":"Элементы списка"}},"title":"Список"},"TariffsTableColumn":{"type":"object","properties":{"data":{"type":"array","items":{"type":"array","items":{"$ref":"#/definitions/TariffsTableCellData"}},"title":"Данные"}},"title":"Колонка"},"TariffsTableContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"rowHeaders":{"type":"array","items":{"$ref":"#/definitions/TariffsTableRowHeader"},"title":"Параметры"},"columns":{"type":"array","items":{"$ref":"#/definitions/TariffsTableColumn"},"title":"Колонки"}},"title":"Таблица тарифов"},"TileContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"items":{"type":"array","items":{"type":"string"},"title":"Список"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4},"version":{"$ref":"#/definitions/BlockVersion"}},"title":"Плитка"},"CalculatorParams":{"type":"object","properties":{"isAnnuity":{"type":"boolean"},"minSum":{"type":"number"},"maxSum":{"type":"number"},"minMonths":{"type":"number"},"maxMonths":{"type":"number"},"rateWithInsurance":{"type":"number"},"rateWithoutInsurance":{"type":"number"}}},"CreditCalculatorData":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/definitions/CalculatorParams"}}}},"CreditCalculatorContent":{"type":"object","properties":{"directoryName":{"type":"string","title":"Справочник"}},"title":"Кредитный калькулятор"},"MiniGalleryContent":{"$ref":"#/definitions/GalleryContent","title":"Мини-галерея"}}}
|
package/bundle/bundle.umd.js
CHANGED
|
@@ -390,15 +390,10 @@
|
|
|
390
390
|
return { nextClick, prevClick, isScrollAvailable, showNextButton, showPrevButton };
|
|
391
391
|
};
|
|
392
392
|
|
|
393
|
-
const MOBILE_URL_PATH = '/mobile';
|
|
394
393
|
const isURL = (href) => href?.includes('//');
|
|
395
|
-
const isHrefActive = (href, router, cmp = (href, baseHref) => href === baseHref) => {
|
|
396
|
-
return cmp(withoutQuery(href), withoutMobilePath(withoutQuery(isURL(href) ? router.href : router.pathname)));
|
|
397
|
-
};
|
|
398
394
|
const withoutQuery = (href) => (href || '').replace(/\/?\?.*/, '');
|
|
399
|
-
const withoutMobilePath = (href) => (href || '').replace(MOBILE_URL_PATH, '');
|
|
400
395
|
const getOrigin = (href) => {
|
|
401
|
-
if (!isURL(href)) {
|
|
396
|
+
if (!href || !isURL(href)) {
|
|
402
397
|
return undefined;
|
|
403
398
|
}
|
|
404
399
|
const url = href;
|
|
@@ -407,11 +402,22 @@
|
|
|
407
402
|
const endOfOrigin = url.indexOf('/', endOfProto + protoSeparator.length);
|
|
408
403
|
return endOfOrigin !== -1 ? url.substring(0, endOfOrigin) : url;
|
|
409
404
|
};
|
|
405
|
+
|
|
406
|
+
var url = /*#__PURE__*/Object.freeze({
|
|
407
|
+
__proto__: null,
|
|
408
|
+
isURL: isURL,
|
|
409
|
+
withoutQuery: withoutQuery,
|
|
410
|
+
getOrigin: getOrigin
|
|
411
|
+
});
|
|
412
|
+
|
|
413
|
+
const MOBILE_URL_PATH = '/mobile';
|
|
414
|
+
const withoutMobilePath = (href) => (href || '').replace(MOBILE_URL_PATH, '');
|
|
415
|
+
|
|
410
416
|
const adjustHref = (href, router) => {
|
|
411
417
|
if (!href) {
|
|
412
418
|
return href;
|
|
413
419
|
}
|
|
414
|
-
const relativeHref = toRelativeHref(href, router);
|
|
420
|
+
const relativeHref = toRelativeHref(href, router) || '';
|
|
415
421
|
const isMobilePage = router?.pathname.startsWith(MOBILE_URL_PATH);
|
|
416
422
|
return isMobilePage && !isURL(relativeHref) ? `${MOBILE_URL_PATH}${relativeHref}` : relativeHref;
|
|
417
423
|
};
|
|
@@ -423,18 +429,6 @@
|
|
|
423
429
|
return origin ? href.replace(origin, '') || '/' : href;
|
|
424
430
|
};
|
|
425
431
|
|
|
426
|
-
var url = /*#__PURE__*/Object.freeze({
|
|
427
|
-
__proto__: null,
|
|
428
|
-
MOBILE_URL_PATH: MOBILE_URL_PATH,
|
|
429
|
-
isURL: isURL,
|
|
430
|
-
isHrefActive: isHrefActive,
|
|
431
|
-
withoutQuery: withoutQuery,
|
|
432
|
-
withoutMobilePath: withoutMobilePath,
|
|
433
|
-
getOrigin: getOrigin,
|
|
434
|
-
adjustHref: adjustHref,
|
|
435
|
-
toRelativeHref: toRelativeHref
|
|
436
|
-
});
|
|
437
|
-
|
|
438
432
|
const defaultHandlerDecorator = (handler) => handler;
|
|
439
433
|
function useLink({ router, handlerDecorator = defaultHandlerDecorator, }, link) {
|
|
440
434
|
const href = adjustHref(link.href, router);
|
|
@@ -496,13 +490,13 @@
|
|
|
496
490
|
: 'bg-white text-primary-text hover:text-primary-main'} ${className || ''}`, disabled: disabled, ...rest, children: jsx(SVG, { paths: ARROW_PATHS, viewBox: "0 0 16 16", fill: "none", width: "16", height: "16" }) })));
|
|
497
491
|
|
|
498
492
|
const GRADIENT = 'bg-gradient-to-r from-main-gradient-start to-main-gradient-end';
|
|
499
|
-
const BORDER_CLASSES = 'border-main-stroke border-solid border';
|
|
493
|
+
const BORDER_CLASSES$1 = 'border-main-stroke border-solid border';
|
|
500
494
|
const DIVIDER_CLASSES$1 = 'border-main-divider border border-t-0 border-x-0';
|
|
501
495
|
const FIRST_CELL_CLASSES$1 = 'w-[200px] mr-6';
|
|
502
496
|
const COLS_LENGTH_FOR_SCROLL$1 = 2;
|
|
503
497
|
const COLUMN_WIDTH$1 = 4 * 80 + 4 * 4; // w-80 + gap-4 = 336px
|
|
504
498
|
|
|
505
|
-
const HeaderCell = JSX(({ icon, image, title, link }) => (jsxs("div", { className: `w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${BORDER_CLASSES} ${GRADIENT}`, role: "columnheader", scope: "col", children: [icon && !image?.src && (jsx(Icon, { className: "h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4", name: icon, width: "63", height: "63" })), image?.src && jsx(Img, { className: "mb-[18px]", image: image }), title && (jsx(Title, { size: "S", className: "font-medium m-0 text-center text-white", children: title })), link?.text && (jsx("div", { className: "mt-auto w-full", children: jsx(Button, { href: link.href, target: link.target, className: "mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active", children: jsx("div", { className: "font-medium text-xs py-[11px]", children: link.text }) }) }))] })));
|
|
499
|
+
const HeaderCell = JSX(({ icon, image, title, link }) => (jsxs("div", { className: `w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${BORDER_CLASSES$1} ${GRADIENT}`, role: "columnheader", scope: "col", children: [icon && !image?.src && (jsx(Icon, { className: "h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4", name: icon, width: "63", height: "63" })), image?.src && jsx(Img, { className: "mb-[18px]", image: image }), title && (jsx(Title, { size: "S", className: "font-medium m-0 text-center text-white", children: title })), link?.text && (jsx("div", { className: "mt-auto w-full", children: jsx(Button, { href: link.href, target: link.target, className: "mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active", children: jsx("div", { className: "font-medium text-xs py-[11px]", children: link.text }) }) }))] })));
|
|
506
500
|
|
|
507
501
|
const carouselContainerClassesMap = {
|
|
508
502
|
comparison: 'flex gap-4 duration-1000',
|
|
@@ -511,7 +505,7 @@
|
|
|
511
505
|
const TableCarouselContainer = JSX(({ children, activeCardIndex, columnWidth, version = 'comparison' }) => (jsx("div", { className: "flex flex-1 overflow-hidden", children: jsx("div", { className: carouselContainerClassesMap[version], style: { transform: `translateX(-${activeCardIndex * columnWidth}px)` }, children: children }) })));
|
|
512
506
|
|
|
513
507
|
const TableCell = JSX(({ cell, isFirstRow, isLastRow, isFillGradient }) => {
|
|
514
|
-
const cellWrapperClasses = `w-80 box-border flex flex-col ${BORDER_CLASSES} ${!isLastRow ? 'border-y-0' : 'border-t-0 rounded-b-md'} ${isFillGradient ? GRADIENT : ''}`;
|
|
508
|
+
const cellWrapperClasses = `w-80 box-border flex flex-col ${BORDER_CLASSES$1} ${!isLastRow ? 'border-y-0' : 'border-t-0 rounded-b-md'} ${isFillGradient ? GRADIENT : ''}`;
|
|
515
509
|
const cellClasses = `mx-7 h-full ${DIVIDER_CLASSES$1} ${isFillGradient && isFirstRow ? 'border-t' : ''} ${!isLastRow ? 'border-solid' : ''}`;
|
|
516
510
|
return (jsx("div", { className: cellWrapperClasses, role: "cell", children: jsx("div", { className: cellClasses, children: cell.map((item, i) => renderCellInner$1(item, i, isFillGradient)) }) }));
|
|
517
511
|
});
|
|
@@ -678,10 +672,10 @@
|
|
|
678
672
|
function handleButtonClick(value) {
|
|
679
673
|
setMonthsValue(clamp(value * MONTHS_IN_YEAR, minMonths, maxMonths));
|
|
680
674
|
}
|
|
681
|
-
return (jsx("section", { className: `font-sans text-primary-text
|
|
675
|
+
return (jsx("section", { className: `font-sans text-primary-text p-10 bg-white ${className || ''}`, children: jsxs("div", { className: `box-border p-[49px] pr-[56px] mx-auto w-max ${borderStyle}`, children: [jsxs("div", { className: "flex justify-between ", children: [jsxs("div", { className: "mr-[42px]", children: [jsx(InputRange, { title: "\u0416\u0435\u043B\u0430\u0435\u043C\u0430\u044F \u0441\u0443\u043C\u043C\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u20BD", items: [
|
|
682
676
|
`От ${addSpacesBetweenNumbers(minSum)} рублей`,
|
|
683
677
|
`До ${addSpacesBetweenNumbers(maxSum)} рублей`,
|
|
684
|
-
], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue || defaultSum, onChange: setMoneyValue }), jsx(InputRange, { className: "mt-[23px]", title: "\u0421\u0440\u043E\u043A \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u043C\u0435\u0441\u044F\u0446\u0435\u0432", items: ['Или выберите из предложенных вариантов ниже'], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: monthsValue || defaultMonths, onChange: setMonthsValue }), jsx("div", { className: "flex mb-7", children: creditTermYears.map((number, i) => renderButton$1(number, i, handleButtonClick)) }), jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", checked: isAnnuityChecked, onChange: setIsAnnuityChecked }), jsx(Checkbox, { className: "mt-3 mb-7", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsuranceChecked, onChange: setIsInsuranceChecked })] }), jsxs("div", { className: "
|
|
678
|
+
], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue || defaultSum, onChange: setMoneyValue }), jsx(InputRange, { className: "mt-[23px]", title: "\u0421\u0440\u043E\u043A \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u043C\u0435\u0441\u044F\u0446\u0435\u0432", items: ['Или выберите из предложенных вариантов ниже'], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: monthsValue || defaultMonths, onChange: setMonthsValue }), jsx("div", { className: "flex mb-7", children: creditTermYears.map((number, i) => renderButton$1(number, i, handleButtonClick)) }), jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", checked: isAnnuityChecked, onChange: setIsAnnuityChecked }), jsx(Checkbox, { className: "mt-3 mb-7", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsuranceChecked, onChange: setIsInsuranceChecked })] }), jsxs("div", { className: "box-border h-fit p-9 bg-primary-main rounded-md text-white", children: [jsx("div", { className: "text-base mb-[18px]", children: "\u041D\u0430\u0448\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435" }), jsx("div", { className: "text-sm opacity-60", children: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0451\u0436" }), jsxs("div", { className: "text-lg mb-3", children: [addSpacesBetweenNumbers(Math.round(montlyPayment)), " \u20BD"] }), jsx("div", { className: "text-sm opacity-60", children: "\u0421\u0442\u0430\u0432\u043A\u0430" }), jsxs("div", { className: "text-lg", children: [rate, " %"] })] })] }), jsxs("div", { className: "flex items-center", children: [jsx(Button, { className: "mr-3", text: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443", version: "primary", href: "#" }), jsx("div", { className: "w-80 text-xxs leading-4 text-secondary-text", "aria-label": "\u0421\u043E\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u0435 \u043D\u0430 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0443 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445", children: "\u041E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u044F \u0437\u0430\u044F\u0432\u043A\u0443, \u0432\u044B \u0441\u043E\u0433\u043B\u0430\u0448\u0430\u0435\u0442\u0435\u0441\u044C \u043D\u0430 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0443 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u043E \u0442\u0440\u0435\u0431\u043E\u0432\u0430\u043D\u0438\u044F\u043C \u0424\u0417 \u00AB\u041E \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445\u00BB" })] })] }) }));
|
|
685
679
|
});
|
|
686
680
|
function renderButton$1(number, i, handleClick) {
|
|
687
681
|
return (jsx("button", { className: "bg-secondary-light rounded-3xl h-10 w-[75px] box-border mr-2 flex items-center justify-center cursor-pointer border-none", onClick: () => handleClick(number), children: jsxs("span", { className: "font-semibold text-sm", children: [number, " ", number === 1 ? 'год' : number > 4 ? 'лет' : 'года'] }) }, String(i)));
|
|
@@ -801,8 +795,16 @@
|
|
|
801
795
|
'M14.7 27.83h2.58c.67 0 1.14.14 1.4.4.27.25.4.72.4 1.38v7.4c0 .66-.12 1.12-.4 1.38-.4.41-1.16.41-1.78.41l-.4-.01v3.5l.78.14v-2.88c1.2 0 1.97-.4 2.34-1.22v4.29h.26l.5-.01V29.74c0-.68.13-1.16.4-1.43.25-.27.72-.4 1.37-.4.67 0 1.65-.1 2.16.4.26.27.38.76.38 1.43v3.8h-1.77v-4.06h-.77v12.99c.26-.03.5-.07.77-.12V34.3h1.77v7.64c.36-.1.72-.21 1.08-.34v-7c0-.8.19-1.4 1-1.67l-.9-4.87h1.8l.3 5.31h.22l.3-5.31h1.88l-1.01 4.87c.84.3 1.01.81 1.01 1.66v4.53a16.63 16.63 0 0 0 1.5-1.27v-9.83h5.25l.1-.72H24.93l.17.89c-.38-.72-1.12-1.08-2.2-1.08h-.77c-1.3 0-2.1.52-2.4 1.55-.27-1.08-1.1-1.62-2.46-1.62h-3.36v14.52c.26.09.52.18.78.25V27.84Zm16.29 5.58-.85-.8.85-4.37v5.17Z',
|
|
802
796
|
'M27.66 40.79c.27-.14.55-.28.8-.43v-5.98h-.8v6.4Z',
|
|
803
797
|
];
|
|
804
|
-
const
|
|
805
|
-
|
|
798
|
+
const SVG_COLOR = {
|
|
799
|
+
'bg-white': 'text-primary-main',
|
|
800
|
+
transparent: 'text-white',
|
|
801
|
+
};
|
|
802
|
+
const TEXT_COLOR = {
|
|
803
|
+
'bg-white': 'text-black',
|
|
804
|
+
transparent: 'text-white',
|
|
805
|
+
};
|
|
806
|
+
const Logo = JSX(({ className, href, children, targetBlank, bgColor = 'bg-white' }) => {
|
|
807
|
+
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className || ''}`, href: href || 'https://rshb.ru/', target: targetBlank ? '_blank' : '_self', children: [jsx(SVG, { className: `${SVG_COLOR[bgColor]} w-10`, viewBox: "0 0 40 45", paths: LOGO_PATHS.map((d) => ({ d })) }), jsx("span", { className: `${TEXT_COLOR[bgColor]} text-base font-medium ml-2.5`, children: children || 'Россельхозбанк' })] }));
|
|
806
808
|
});
|
|
807
809
|
|
|
808
810
|
const SearchBar = JSX(({ className, context }) => {
|
|
@@ -846,6 +848,11 @@
|
|
|
846
848
|
});
|
|
847
849
|
const HorizontalNavigationLink = JSX(({ className, index, text, href, target, onClick }) => (jsx("a", { className: `font-sans font-normal text-sm text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${className || ''}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
|
|
848
850
|
|
|
851
|
+
const cmp = (a) => (b) => a?.href === b?.href;
|
|
852
|
+
const substitute = (items, substitution) => (items || []).map((_) => substitution?.find(cmp(_)) || _);
|
|
853
|
+
const subtract = (minuend, subtrahend) => (minuend || []).filter((_) => !subtrahend?.find(cmp(_)));
|
|
854
|
+
const mergeTopItems = (left, right) => substitute(left, right).concat(subtract(right, left));
|
|
855
|
+
|
|
849
856
|
function useSitemap(useAsyncData) {
|
|
850
857
|
const { data } = useAsyncData(sitemapURL(), fetchSitemap);
|
|
851
858
|
return data || {};
|
|
@@ -858,13 +865,6 @@
|
|
|
858
865
|
return `/wcms-resources/${projectSettings.SITEMAP || 'sitemap'}.json`;
|
|
859
866
|
}
|
|
860
867
|
|
|
861
|
-
const cmp = (a) => (b) => a?.href === b?.href;
|
|
862
|
-
const substitute = (items, substitution) => (items || []).map((_) => substitution?.find(cmp(_)) || _);
|
|
863
|
-
const subtract = (minuend, subtrahend) => (minuend || []).filter((_) => !subtrahend?.find(cmp(_)));
|
|
864
|
-
function mergeTopItems(left, right) {
|
|
865
|
-
return substitute(left, right).concat(subtract(right, left));
|
|
866
|
-
}
|
|
867
|
-
|
|
868
868
|
const Sitemap = JSX(({ className, items, context }) => {
|
|
869
869
|
const sitemap = useSitemap(context.useAsyncData);
|
|
870
870
|
const mergedItems = mergeTopItems(sitemap.topItems, items);
|
|
@@ -965,45 +965,95 @@
|
|
|
965
965
|
|
|
966
966
|
const Gallery$1 = JSX((props) => jsx(GalleryInner, { ...props, version: "normal" }));
|
|
967
967
|
|
|
968
|
-
const
|
|
969
|
-
const textStyle = active ? 'text-primary-main' : 'text-primary-text hover:text-primary-main';
|
|
970
|
-
return (jsxs("a", { className: `relative inline-block bg-transparent text-center no-underline ${className || ''}`, href: href, target: target, onClick: onClick, children: [jsx("span", { className: `font-sans font-normal text-base ${textStyle}`, children: text || children }), active ? (jsx("div", { className: "absolute left-0 -bottom-2 w-full h-[2px] bg-primary-main" })) : null] }));
|
|
971
|
-
});
|
|
968
|
+
const maxBy = (discriminator) => (list) => list.reduceRight((a, b) => (discriminator(a) > discriminator(b) ? a : b));
|
|
972
969
|
|
|
973
|
-
const
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
? 'text-primary-main'
|
|
977
|
-
: `${flat ? 'text-primary-text' : 'text-secondary-text'} hover:text-primary-main`;
|
|
978
|
-
return (jsx("a", { className: `inline-block border border-solid bg-transparent text-center no-underline ${flat ? '' : 'px-4 py-2'} ${linkStyle} ${className || ''}`, href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": ariaLabel, children: jsx("span", { className: `font-sans font-normal text-sm ${textStyle}`, children: text || children }) }));
|
|
979
|
-
});
|
|
970
|
+
const isHrefActive = (href, router, cmp = (href, baseHref) => baseHref.startsWith(href)) => {
|
|
971
|
+
return cmp(withoutQuery(href), withoutMobilePath(withoutQuery(isURL(href) ? router.href : router.pathname)));
|
|
972
|
+
};
|
|
980
973
|
|
|
981
|
-
const
|
|
974
|
+
const isSubItemActive = (router) => (subItem) => isHrefActive(subItem.href, router);
|
|
982
975
|
|
|
983
|
-
const
|
|
984
|
-
const
|
|
985
|
-
|
|
986
|
-
|
|
976
|
+
const findActiveSubItem = (router) => (items = []) => {
|
|
977
|
+
const possibleActiveSubItems = items?.filter(isSubItemActive(router));
|
|
978
|
+
const activeSubItem = possibleActiveSubItems?.length
|
|
979
|
+
? maxBy((_) => _.href?.length || 0)(possibleActiveSubItems) // More specific item with max length
|
|
980
|
+
: null;
|
|
981
|
+
return activeSubItem;
|
|
982
|
+
};
|
|
987
983
|
|
|
988
|
-
|
|
989
|
-
return (subItem) => isHrefActive(subItem.href, router);
|
|
990
|
-
}
|
|
984
|
+
const isTopItemActive = (router) => (topItem) => topItem.items?.some(isSubItemActive(router)) || isHrefActive(topItem.href, router);
|
|
991
985
|
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
}
|
|
986
|
+
const TEXT_CLASSES$1 = 'font-sans font-normal text-base';
|
|
987
|
+
const BORDER_CLASSES = 'absolute left-0 -bottom-2 w-full h-[2px]';
|
|
988
|
+
const HeaderItem = JSX(({ className, text, href, target, active, onClick, children, bgColor = 'bg-white' }) => (jsxs("a", { className: `relative inline-block bg-transparent text-center no-underline ${className || ''}`, href: href, target: target, onClick: onClick, children: [jsx("span", { className: getTextClasses$1(bgColor, active), children: text || children }), active ? jsx("div", { className: getBorderClasses(bgColor, active) }) : null] })));
|
|
989
|
+
const getTextClasses$1 = (bgColor, active) => {
|
|
990
|
+
let classes = 'text-white';
|
|
991
|
+
if (bgColor === 'bg-white') {
|
|
992
|
+
classes = active ? 'text-primary-main' : 'text-primary-text hover:text-primary-main';
|
|
993
|
+
}
|
|
994
|
+
return `${classes} ${TEXT_CLASSES$1}`;
|
|
995
|
+
};
|
|
996
|
+
const getBorderClasses = (bgColor, active) => {
|
|
997
|
+
if (!active) {
|
|
998
|
+
return BORDER_CLASSES;
|
|
999
|
+
}
|
|
1000
|
+
return `${bgColor === 'bg-white' ? bgColor : 'bg-primary-main'} ${BORDER_CLASSES}`;
|
|
1001
|
+
};
|
|
995
1002
|
|
|
996
|
-
const
|
|
1003
|
+
const TEXT_CLASSES = 'font-sans font-normal text-sm';
|
|
1004
|
+
const LINK_CLASSES = 'inline-block border border-solid bg-transparent text-center no-underline';
|
|
1005
|
+
const TopItem = JSX(({ className = '', text, href, target, active, flat, onClick, children, ariaLabel, bgColor = 'bg-white', }) => (jsx("a", { className: `${getLinkClasses(bgColor, active, flat)} ${className}`, href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": ariaLabel, children: jsx("span", { className: getTextClasses(bgColor, active, flat), children: text || children }) })));
|
|
1006
|
+
const getLinkClasses = (bgColor, active, flat) => {
|
|
1007
|
+
let classes = 'border-transparent';
|
|
1008
|
+
if (active) {
|
|
1009
|
+
classes = `rounded-md ${bgColor === 'bg-white' ? 'border-primary-main' : 'border-white'}`;
|
|
1010
|
+
}
|
|
1011
|
+
return `${classes} ${LINK_CLASSES} ${flat ? '' : 'px-4 py-2'}`;
|
|
1012
|
+
};
|
|
1013
|
+
const getTextClasses = (bgColor, active, flat) => {
|
|
1014
|
+
let classes = 'text-white';
|
|
1015
|
+
if (bgColor === 'bg-white') {
|
|
1016
|
+
classes = active
|
|
1017
|
+
? 'text-primary-main'
|
|
1018
|
+
: `${flat ? 'text-primary-text' : 'text-secondary-text'} hover:text-primary-main`;
|
|
1019
|
+
}
|
|
1020
|
+
return `${classes} ${TEXT_CLASSES}`;
|
|
1021
|
+
};
|
|
1022
|
+
|
|
1023
|
+
const HeaderSecondaryMenuButton = JSX(({ className = '', children, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 p-0 w-[24px] h-[24px] flex items-center bg-inherit cursor-pointer ${className}`, disabled: true, "aria-label": ariaLabel, children: children })));
|
|
1024
|
+
|
|
1025
|
+
const COLORS_MAP = {
|
|
1026
|
+
'bg-white': 'text-primary-text hover:text-primary-main',
|
|
1027
|
+
transparent: 'text-white',
|
|
1028
|
+
};
|
|
1029
|
+
const DOP_LINKS_COLORS_MAP = {
|
|
1030
|
+
'bg-white': 'text-secondary-light hover:text-secondary-hover',
|
|
1031
|
+
transparent: 'text-white',
|
|
1032
|
+
};
|
|
1033
|
+
const DOP_LINKS_ICON_NAME_MAP = {
|
|
1034
|
+
'bg-white': 'GridIcon',
|
|
1035
|
+
transparent: 'GridIconWhite',
|
|
1036
|
+
};
|
|
1037
|
+
const HeaderSecondaryMenu = JSX(({ context, className, defaultLocation = '', bgColor = 'bg-white' }) => {
|
|
1038
|
+
const [city, getCity] = context.useGeolocation(defaultLocation);
|
|
1039
|
+
return (jsxs("div", { className: `flex items-center ${className || ''}`, children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: city, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: getCity, bgColor: bgColor }), jsx(TopItem, { className: "mr-7", flat: true, href: "#", text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ariaLabel: "\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u0441\u0435\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043E\u0444\u0438\u0441\u043E\u0432 \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u0432", bgColor: bgColor }), jsx(HeaderSecondaryMenuButton, { className: `mr-5 ${COLORS_MAP[bgColor]}`, ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", children: jsx(Icon, { name: "LoupeIcon", className: "h-full", asSVG: true }) }), jsx(HeaderSecondaryMenuButton, { className: `mr-5 ${COLORS_MAP[bgColor]}`, ariaLabel: "\u041F\u0440\u043E\u0444\u0438\u043B\u044C", children: jsx(Icon, { name: "ProfileIcon", className: "h-full", asSVG: true }) }), jsx(HeaderSecondaryMenuButton, { className: `${DOP_LINKS_COLORS_MAP[bgColor]} min-w-[32px] min-h-[32px]`, ariaLabel: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438", children: jsx(Icon, { name: DOP_LINKS_ICON_NAME_MAP[bgColor], className: "h-full", asSVG: true }) })] }));
|
|
1040
|
+
});
|
|
1041
|
+
|
|
1042
|
+
const BORDER_COLORS = {
|
|
1043
|
+
'bg-white': 'bg-main-divider',
|
|
1044
|
+
transparent: 'bg-main-divider opacity-30',
|
|
1045
|
+
};
|
|
1046
|
+
const Header = JSX(({ className, defaultLocation, bgColor = 'bg-white', context, topItems }) => {
|
|
997
1047
|
const router = context.useRouter();
|
|
998
1048
|
const sitemap = useSitemap(context.useAsyncData);
|
|
999
1049
|
const { handlerDecorator } = context;
|
|
1000
1050
|
const mergedItems = mergeTopItems(sitemap.topItems, topItems);
|
|
1001
1051
|
const activeTopItem = mergedItems.find(isTopItemActive(router));
|
|
1002
1052
|
const subItems = activeTopItem?.items;
|
|
1003
|
-
const activeSubItem =
|
|
1004
|
-
const topMenu = mergedItems.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, ...useLink({ router, handlerDecorator }, _), ariaLabel: _.text }, String(i))));
|
|
1005
|
-
const subMenu = subItems?.map((_) => (jsx(HeaderItem, { className: "mr-8", active: _ === activeSubItem, ...useLink({ router, handlerDecorator }, _) }, _.href)));
|
|
1006
|
-
return (jsx("header", { className: `pt-5 pb-8 px-20
|
|
1053
|
+
const activeSubItem = findActiveSubItem(router)(subItems);
|
|
1054
|
+
const topMenu = mergedItems.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, ...useLink({ router, handlerDecorator }, _), ariaLabel: _.text, bgColor: bgColor }, String(i))));
|
|
1055
|
+
const subMenu = subItems?.map((_) => (jsx(HeaderItem, { className: "mr-8", active: _ === activeSubItem, ...useLink({ router, handlerDecorator }, _), bgColor: bgColor }, _.href)));
|
|
1056
|
+
return (jsx("header", { className: `pt-5 pb-8 px-20 ${bgColor} ${className || ''}`, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8", bgColor: bgColor }), topMenu, jsx(HeaderSecondaryMenu, { context: context, className: "ml-auto", defaultLocation: defaultLocation, bgColor: bgColor })] }), jsx("div", { className: `mt-5 h-[1px] ${BORDER_COLORS[bgColor]}` }), jsx("nav", { className: "mt-5", children: subMenu })] }) }));
|
|
1007
1057
|
});
|
|
1008
1058
|
|
|
1009
1059
|
const MiniGallery = JSX((props) => (jsx(GalleryInner, { ...props, version: "mini" })));
|
|
@@ -1012,6 +1062,17 @@
|
|
|
1012
1062
|
return (jsx(Tile, { className: className, context: context, title: title, buttons: buttons, children: jsxs("div", { className: "flex items-center", children: [qr?.src && qr?.href && (jsx("a", { href: qr.href, target: "_blank", children: jsx("img", { src: qr.src, alt: title, title: title, width: "164", height: "164", className: "w-[90px] h-[90px] min-w-[90px] min-h-[90px] bg-secondary-light" }) })), jsx("span", { className: "font-normal text-sm text-secondary-text ml-4", children: "\u041D\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u0430\u043C\u0435\u0440\u0443 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430 \u043D\u0430 QR-\u043A\u043E\u0434 \u0438 \u0441\u043A\u0430\u0447\u0430\u0439\u0442\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }) }));
|
|
1013
1063
|
});
|
|
1014
1064
|
|
|
1065
|
+
const NavigationItem = JSX(({ className, text, onClick, href, target, isActive }) => (jsx("a", { className: `bg-inherit no-underline px-4 py-2.5 cursor-pointer rounded text-sm border border-solid hover:text-primary-main ${className || ''} ${isActive ? 'border-primary-main text-primary-main' : 'border-white text-secondary-text'}`, onClick: onClick, href: href, target: target, children: text })));
|
|
1066
|
+
|
|
1067
|
+
const Navigation = JSX(({ className, context, title, buttons }) => {
|
|
1068
|
+
const router = context.useRouter();
|
|
1069
|
+
const { handlerDecorator } = context;
|
|
1070
|
+
const activeButton = findActiveSubItem(router)(buttons);
|
|
1071
|
+
return (jsxs("section", { className: `font-sans text-primary-text rounded-[40px] flex items-center justify-between ${className || ''}`, children: [jsx("h2", { className: "font-medium text-xl m-0", children: title }), buttons?.length ? (jsx("div", { className: "flex rounded-md overflow-hidden bg-white", children: buttons
|
|
1072
|
+
.filter(({ text }) => text)
|
|
1073
|
+
.map((button, i) => (jsx(NavigationItem, { className: "first:rounded-tl-md first:rounded-bl-md last:rounded-tr-md last:rounded-br-md", isActive: button === activeButton, ...useLink({ router, handlerDecorator }, button) }, String(i)))) })) : null] }));
|
|
1074
|
+
});
|
|
1075
|
+
|
|
1015
1076
|
const GOLDEN_RATIO = 1.618;
|
|
1016
1077
|
const Placeholder = JSX(({ className, context, title }) => {
|
|
1017
1078
|
return (jsx(Tile, { className: className, context: context, title: title, description: "\u0411\u043B\u043E\u043A \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043E\u0442\u043A\u0435...", children: jsx("figure", { className: "m-0 min-w-[600px]", children: renderShimmer() }) }));
|
|
@@ -1119,14 +1180,14 @@
|
|
|
1119
1180
|
return dateObj.toLocaleString('ru-RU', dateFormat).replace('г.', '');
|
|
1120
1181
|
}
|
|
1121
1182
|
|
|
1122
|
-
const StepsBlock = JSX(({ className, title, steps }) => {
|
|
1123
|
-
return (jsxs("section", { className: `font-sans text-primary-text bg-white px-
|
|
1183
|
+
const StepsBlock = JSX(({ className, title, showLines = true, steps }) => {
|
|
1184
|
+
return (jsxs("section", { className: `box-border font-sans text-primary-text bg-white px-20 py-[50px] flex flex-col items-center ${className || ''}`, children: [jsx(Title, { className: "font-medium m-0 max-w-[47rem] text-center", children: title }), steps?.length ? (jsxs("div", { className: `box-border py-0.5 mb-0.5 ${title ? 'mt-9' : ''}`, children: [jsx("div", { className: "flex items-center px-[88px]", children: joinList(jsx("div", { className: `h-0.5 w-full bg-secondary-light ${!showLines ? 'opacity-0' : ''}` }))(steps.map((step, i) => renderStepIcon(step, i))) }), jsx("div", { className: "flex justify-between gap-x-[101px]", children: steps.map(renderStepTitle) })] })) : null] }));
|
|
1124
1185
|
});
|
|
1125
1186
|
const renderStepIcon = (step, i) => {
|
|
1126
1187
|
return (jsx("div", { className: "flex flex-col items-center text-center relative", children: jsx("div", { className: "h-[100px] w-[100px] min-w-[100px] min-h-[100px] bg-secondary-light rounded-full p-[26px] box-border z-10", children: (step.icon && jsx(Icon, { name: step.icon, width: "48", height: "48" })) || (jsx("span", { className: "font-medium text-title-sm text-secondary-text", children: i + 1 })) }) }, String(i)));
|
|
1127
1188
|
};
|
|
1128
1189
|
const renderStepTitle = (step, i) => {
|
|
1129
|
-
return (
|
|
1190
|
+
return (jsxs("div", { className: "flex flex-col items-center text-center relative w-[276px] whitespace-pre-line overflow-hidden", children: [step.label && jsx("div", { className: "font-medium text-xl m-0 mt-4", children: step.label }), step.description && (jsx("div", { className: `font-normal text-sm text-secondary-text ${step.label ? 'mt-2' : 'mt-4'}`, children: step.description }))] }, String(i)));
|
|
1130
1191
|
};
|
|
1131
1192
|
|
|
1132
1193
|
const DIVIDER_CLASSES = 'border-main-divider border border-t-0 border-x-0';
|
|
@@ -1186,6 +1247,7 @@
|
|
|
1186
1247
|
TariffsTable,
|
|
1187
1248
|
TextBlock,
|
|
1188
1249
|
Tile,
|
|
1250
|
+
Navigation,
|
|
1189
1251
|
};
|
|
1190
1252
|
|
|
1191
1253
|
const LikeButton = JSX(({ className, onClick, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 w-[36px] bg-inherit cursor-pointer ${className || ''}`, onClick: onClick, "aria-label": ariaLabel, children: renderLikeIcon() })));
|
|
@@ -1300,6 +1362,7 @@
|
|
|
1300
1362
|
ProductTile,
|
|
1301
1363
|
TextBlock,
|
|
1302
1364
|
Tile,
|
|
1365
|
+
Navigation,
|
|
1303
1366
|
};
|
|
1304
1367
|
|
|
1305
1368
|
exports.Blocks = Blocks;
|