profinansy-ui-lib 4.1.62 → 4.1.63

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.
Files changed (25) hide show
  1. package/dist/components/blocks/LanguageSwitcher/LanguageSwitcher.const.d.ts +14 -0
  2. package/dist/components/blocks/LanguageSwitcher/LanguageSwitcher.d.ts +3 -0
  3. package/dist/components/blocks/LanguageSwitcher/LanguageSwitcher.styled.d.ts +17 -0
  4. package/dist/components/blocks/LanguageSwitcher/LanguageSwitcher.typed.d.ts +4 -0
  5. package/dist/components/blocks/LanguageSwitcher/index.d.ts +2 -0
  6. package/dist/components/blocks/Navigation/components/Premium/components/ModalQuiz/useQuizModal.d.ts +1 -1
  7. package/dist/components/blocks/footerNew/components/Legal/Legal.const.d.ts +1 -1
  8. package/dist/components/blocks/footerNew/components/Navigation/Navigation.const.d.ts +1 -0
  9. package/dist/components/blocks/footerNew/components/Navigation/Navigation.typed.d.ts +1 -0
  10. package/dist/components/blocks/headerV2/HeaderV2.typed.d.ts +4 -0
  11. package/dist/components/blocks/headerV2/components/HeaderRight/HeaderRight.styled.d.ts +3 -0
  12. package/dist/components/blocks/headerV2/headerV2.styled.d.ts +3 -2
  13. package/dist/components/blocks/sideMenuV2/SideMenuV2.const.d.ts +53 -0
  14. package/dist/localization/translations/arias.d.ts +2 -0
  15. package/dist/localization/translations/common.d.ts +4 -0
  16. package/dist/localization/translations/premium.d.ts +58 -0
  17. package/dist/localization/useLocalization.d.ts +3 -0
  18. package/dist/profinansy-ui-lib.cjs +1555 -1412
  19. package/dist/profinansy-ui-lib.cjs.map +1 -1
  20. package/dist/profinansy-ui-lib.es.js +10195 -9699
  21. package/dist/profinansy-ui-lib.es.js.map +1 -1
  22. package/dist/urls/productsV2/about/about.d.ts +54 -1
  23. package/dist/urls/productsV2/calculators/calculators.d.ts +14 -0
  24. package/dist/urls/productsV2/profile/profile.d.ts +1 -1
  25. package/package.json +1 -1
@@ -0,0 +1,14 @@
1
+ import { Locales } from 'src/common.types';
2
+ export declare const LANGUAGE_OPTIONS: {
3
+ locale: Locales;
4
+ code: string;
5
+ versionLabel: string;
6
+ }[];
7
+ export declare const getOppositeLocale: (locale: Locales) => Locales;
8
+ export declare const getLanguageOption: (locale: Locales) => {
9
+ locale: Locales;
10
+ code: string;
11
+ versionLabel: string;
12
+ };
13
+ export declare const getLocaleOptionIndex: (locale: Locales) => number;
14
+ export declare const getCycledOptionIndex: (index: number, delta: number) => number;
@@ -0,0 +1,3 @@
1
+ import { ILanguageSwitcherProps } from 'src/components/blocks/LanguageSwitcher/LanguageSwitcher.typed';
2
+ declare const LanguageSwitcher: ({ variant }: ILanguageSwitcherProps) => import("react/jsx-runtime").JSX.Element;
3
+ export { LanguageSwitcher };
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ export declare const HeaderRoot: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
+ export declare const HeaderTrigger: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
4
+ $isOpen: boolean;
5
+ }>> & string;
6
+ export declare const HeaderTriggerContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
7
+ export declare const HeaderLanguage: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
8
+ export declare const HeaderChevron: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
9
+ export declare const HeaderDropdown: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
10
+ export declare const HeaderOption: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
11
+ $isActive: boolean;
12
+ }>> & string;
13
+ export declare const Flag: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
14
+ $size: 12 | 16;
15
+ }>> & string;
16
+ export declare const FooterButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
17
+ export declare const FooterLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
@@ -0,0 +1,4 @@
1
+ export type TLanguageSwitcherVariant = 'header' | 'footer';
2
+ export interface ILanguageSwitcherProps {
3
+ variant: TLanguageSwitcherVariant;
4
+ }
@@ -0,0 +1,2 @@
1
+ export { LanguageSwitcher } from 'src/components/blocks/LanguageSwitcher/LanguageSwitcher';
2
+ export type { ILanguageSwitcherProps } from 'src/components/blocks/LanguageSwitcher/LanguageSwitcher.typed';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { THeaderLinkSubPage } from '../../../../../../../common.types';
2
+ import { THeaderLinkSubPage } from 'src/common.types';
3
3
  /**
4
4
  * Хук для управления модалкой Premium.
5
5
  * Инкапсулирует состояние, проверку роли и рендер ModalQuiz.
@@ -68,7 +68,7 @@ export declare const LEGAL_LAYOUT: {
68
68
  readonly gapBeforeCertificates: 16;
69
69
  };
70
70
  readonly sidebar: {
71
- readonly controlsGap: 12;
71
+ readonly controlsGap: 10;
72
72
  };
73
73
  };
74
74
  readonly mobile: {
@@ -53,3 +53,4 @@ export declare const NAVIGATION_LAYOUT: {
53
53
  export declare const NAVIGATION_COLUMN_GAP_NARROW_BREAKPOINT: 1200;
54
54
  export declare const FOOTER_ABOUT_LINKS: IFooterAboutLink[];
55
55
  export declare const getFooterAboutLinks: (hostname: string, isGuest: boolean, isEmployee: boolean) => IFooterAboutLink[];
56
+ export declare const getFooterAboutLinksForeign: (hostname: string, isGuest: boolean) => IFooterAboutLink[];
@@ -11,4 +11,5 @@ export interface IFooterAboutLink {
11
11
  name: keyof (typeof import('../../../../../localization/translations/urls'))['Urls_translations']['ru'];
12
12
  href: string;
13
13
  isNotVisible?: boolean;
14
+ isForeignAccess?: boolean;
14
15
  }
@@ -2,3 +2,7 @@ export interface IHeaderV2Props {
2
2
  onLogout: () => void;
3
3
  leaderBoardPermission?: boolean;
4
4
  }
5
+ /** Горизонтальное выравнивание списка ссылок шапки */
6
+ export interface IHeaderLinksCentered {
7
+ $isCentered?: boolean;
8
+ }
@@ -1,4 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export declare const HeaderRight: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
3
  export declare const Buttons: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
4
+ export declare const LanguageSlot: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
5
+ $withOffset?: boolean;
6
+ }>> & string;
4
7
  export declare const EnterButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { IHeaderLinksCentered } from 'src/components/blocks/headerV2/HeaderV2.typed';
2
3
  export declare const Container: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
4
  export declare const Header: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
4
5
  $isCollapsed?: boolean;
@@ -17,8 +18,8 @@ export declare const Stub: import("styled-components/dist/types").IStyledCompone
17
18
  $isCollapsed?: boolean;
18
19
  }>> & string;
19
20
  export declare const CenterWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
20
- export declare const LinksContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
21
+ export declare const LinksContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, IHeaderLinksCentered>> & string;
21
22
  export declare const Background: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
22
23
  $isOpen: boolean;
23
24
  }>> & string;
24
- export declare const LinkList: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
25
+ export declare const LinkList: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, IHeaderLinksCentered>> & string;
@@ -689,6 +689,20 @@ export declare const useGetSideMenuData: (category: TSideMenuCategory, hostname:
689
689
  nowrap: boolean;
690
690
  isForeignAccess: boolean;
691
691
  isFill?: undefined;
692
+ } | {
693
+ name: string;
694
+ Icon: ComponentType<void>;
695
+ href: string;
696
+ isForeignAccess?: undefined;
697
+ isFill?: undefined;
698
+ nowrap?: undefined;
699
+ } | {
700
+ name: string;
701
+ Icon: ComponentType<void>;
702
+ isFill: boolean;
703
+ href: string;
704
+ isForeignAccess?: undefined;
705
+ nowrap?: undefined;
692
706
  })[];
693
707
  } | {
694
708
  name: string;
@@ -696,22 +710,61 @@ export declare const useGetSideMenuData: (category: TSideMenuCategory, hostname:
696
710
  name: string;
697
711
  Icon: ComponentType<void>;
698
712
  isFill: boolean;
713
+ isForeignAccess: boolean;
714
+ isNotVisible: boolean;
699
715
  href: string;
716
+ locked?: undefined;
717
+ innerPages?: undefined;
700
718
  nowrap?: undefined;
719
+ } | {
720
+ name: string;
721
+ Icon: ComponentType<void>;
722
+ isFill: boolean;
723
+ isForeignAccess: boolean;
724
+ isNotVisible: boolean;
725
+ href: string;
726
+ locked: boolean;
727
+ innerPages?: undefined;
728
+ nowrap?: undefined;
729
+ } | {
730
+ name: string;
731
+ Icon: ComponentType<void>;
732
+ isFill: boolean;
733
+ isForeignAccess: boolean;
734
+ isNotVisible: boolean;
735
+ href: string;
736
+ locked: boolean;
737
+ innerPages: string[];
738
+ nowrap?: undefined;
739
+ } | {
740
+ name: string;
741
+ Icon: ComponentType<void>;
742
+ isFill: boolean;
743
+ href: string;
744
+ isForeignAccess?: undefined;
701
745
  isNotVisible?: undefined;
746
+ locked?: undefined;
747
+ innerPages?: undefined;
748
+ nowrap?: undefined;
702
749
  } | {
703
750
  name: string;
704
751
  Icon: ComponentType<void>;
705
752
  isFill: boolean;
706
753
  href: string;
707
754
  nowrap: boolean;
755
+ isForeignAccess?: undefined;
708
756
  isNotVisible?: undefined;
757
+ locked?: undefined;
758
+ innerPages?: undefined;
709
759
  } | {
710
760
  name: string;
711
761
  Icon: ComponentType<void>;
712
762
  href: string;
713
763
  isFill: boolean;
714
764
  isNotVisible: boolean;
765
+ isForeignAccess?: undefined;
766
+ locked?: undefined;
767
+ innerPages?: undefined;
715
768
  nowrap?: undefined;
716
769
  })[];
717
770
  } | {
@@ -9,6 +9,7 @@ export declare const arias_translation: {
9
9
  favouriteClosePanel: string;
10
10
  notifications: string;
11
11
  basket: string;
12
+ language_switch: string;
12
13
  };
13
14
  en: {
14
15
  logo: string;
@@ -20,5 +21,6 @@ export declare const arias_translation: {
20
21
  favouriteClosePanel: string;
21
22
  notifications: string;
22
23
  basket: string;
24
+ language_switch: string;
23
25
  };
24
26
  };
@@ -16,6 +16,8 @@ export declare const common_translation: {
16
16
  try_another_instruments: string;
17
17
  search_button: string;
18
18
  new: string;
19
+ hit: string;
20
+ login: string;
19
21
  how_it_works: string;
20
22
  read_more: string;
21
23
  share: string;
@@ -42,6 +44,8 @@ export declare const common_translation: {
42
44
  try_another_instruments: string;
43
45
  search_button: string;
44
46
  new: string;
47
+ hit: string;
48
+ login: string;
45
49
  how_it_works: string;
46
50
  read_more: string;
47
51
  share: string;
@@ -0,0 +1,58 @@
1
+ export declare const premium_translation: {
2
+ readonly ru: {
3
+ readonly available_by_subscription: "Доступно по подписке";
4
+ readonly section_premium_only: "Этот раздел доступен только в";
5
+ readonly get_premium_access: "Получите премиум доступ к финансовым новостям, аналитике и обзорам рынков - все в одном месте, в режиме реального времени";
6
+ readonly follow_recommendations: "Следите за рекомендациями и инсайтами от ведущих экспертов pro.finansy, чтобы улучшить качество своего портфеля.";
7
+ readonly become_investor: "Хотите стать инвестором на максимум?";
8
+ readonly yes_want: "Да, хочу 🤩";
9
+ readonly will_think: "Я подумаю";
10
+ readonly no_thanks: "Нет, спасибо";
11
+ readonly help_us_improve: "Помогите нам стать лучше";
12
+ readonly why_not_premium: "Расскажите, пожалуйста, почему не готовы подключить подписку Premium?";
13
+ readonly own_option: "Свой вариант";
14
+ readonly send: "Отправить";
15
+ readonly thanks_feedback: "Спасибо за обратную связь!";
16
+ readonly feedback_matters: "Ваше мнение имеет для нас огромное значение, и мы обязательно учтем все ваши замечания ❤️";
17
+ readonly descriptions: {
18
+ readonly screener: "Быстро находите акции, фонды и облигации, фильтруйте их по доходности и рискам и собирайте идеи для портфеля в удобном формате";
19
+ readonly pas_income: "Формируйте пассивный доход и наблюдайте, как растут ваши вложения. Сравнивайте стратегии и выбирайте ту, что подходит именно вам";
20
+ readonly passive_income: "Формируйте пассивный доход и наблюдайте, как растут ваши вложения. Сравнивайте стратегии и выбирайте ту, что подходит именно вам";
21
+ readonly asset_comparison: "Сравнивайте акции, облигации и другие инструменты на одном экране, оценивая доходность, риски и перспективы с помощью графиков и аналитики";
22
+ readonly rrg: "Отслеживайте тренды акций и фондов: индикатор показывает фазу актива — рост или спад, помогая принимать своевременные решения";
23
+ readonly econom_cycles: "Изучайте экономические циклы — рост, пик, спад, рецессию — и используйте их для более взвешенных инвестиционных решений";
24
+ readonly portfolios_my: "Создавайте портфели и управляйте ими в удобном формате. Синхронизируйте аккаунт с брокером и отслеживайте доходность в реальном времени";
25
+ readonly portfolios_add_deal: "Создавайте портфели и управляйте ими в удобном формате. Синхронизируйте аккаунт с брокером и отслеживайте доходность в реальном времени";
26
+ readonly portfolios_create_new: "Создавайте портфели и управляйте ими в удобном формате. Синхронизируйте аккаунт с брокером и отслеживайте доходность в реальном времени";
27
+ };
28
+ };
29
+ readonly en: {
30
+ readonly available_by_subscription: "Available with";
31
+ readonly section_premium_only: "This section is available only in";
32
+ readonly get_premium_access: "Get premium access to financial news, analytics and market reviews — all in one place, in real time";
33
+ readonly follow_recommendations: "Follow recommendations and insights from leading pro.finansy experts to improve the quality of your portfolio.";
34
+ readonly become_investor: "Want to invest at full potential?";
35
+ readonly yes_want: "Yes, I want 🤩";
36
+ readonly will_think: "I'll think about it";
37
+ readonly no_thanks: "No, thanks";
38
+ readonly help_us_improve: "Help us get better";
39
+ readonly why_not_premium: "Please tell us why you are not ready to connect a Premium subscription?";
40
+ readonly own_option: "Your own option";
41
+ readonly send: "Send";
42
+ readonly thanks_feedback: "Thank you for your feedback!";
43
+ readonly feedback_matters: "Your opinion means a lot to us, and we will definitely take all your comments into account ❤️";
44
+ readonly descriptions: {
45
+ readonly screener: "Quickly find stocks, funds and bonds, filter them by return and risk, and collect portfolio ideas in a convenient format";
46
+ readonly pas_income: "Build passive income and watch your investments grow. Compare strategies and choose the one that suits you";
47
+ readonly passive_income: "Build passive income and watch your investments grow. Compare strategies and choose the one that suits you";
48
+ readonly asset_comparison: "Compare stocks, bonds and other instruments on one screen, evaluating returns, risks and prospects with charts and analytics";
49
+ readonly rrg: "Track trends of stocks and funds: the indicator shows the asset phase — growth or decline — helping you make timely decisions";
50
+ readonly econom_cycles: "Study economic cycles — growth, peak, decline, recession — and use them for more balanced investment decisions";
51
+ readonly portfolios_my: "Create and manage portfolios in a convenient format. Sync your account with a broker and track returns in real time";
52
+ readonly portfolios_add_deal: "Create and manage portfolios in a convenient format. Sync your account with a broker and track returns in real time";
53
+ readonly portfolios_create_new: "Create and manage portfolios in a convenient format. Sync your account with a broker and track returns in real time";
54
+ };
55
+ };
56
+ };
57
+ export type TPremiumDescriptionKey = keyof (typeof premium_translation)['ru']['descriptions'];
58
+ export declare const isPremiumDescriptionKey: (name: string | undefined) => name is "portfolios_my" | "portfolios_add_deal" | "portfolios_create_new" | "screener" | "pas_income" | "asset_comparison" | "rrg" | "econom_cycles" | "passive_income";
@@ -3,9 +3,12 @@ import { Locales } from '../common.types';
3
3
  interface ILocalizationProps {
4
4
  /** Выбранная локализация **/
5
5
  locale: Locales;
6
+ /** Хост меняет локаль (роутер, i18n). Если нет — библиотека переписывает `/en` в URL */
7
+ onLocaleChange?: (locale: Locales) => void;
6
8
  }
7
9
  interface ILocalization extends ILocalizationProps {
8
10
  isForeignSite: boolean;
11
+ changeLocale: (locale: Locales) => void;
9
12
  }
10
13
  export declare const LocalizationProvider: ({ config, children }: {
11
14
  config: ILocalizationProps;