profinansy-ui-lib 4.1.63 → 4.1.65

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.
@@ -1,3 +1,3 @@
1
1
  import { ILanguageSwitcherProps } from 'src/components/blocks/LanguageSwitcher/LanguageSwitcher.typed';
2
- declare const LanguageSwitcher: ({ variant }: ILanguageSwitcherProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const LanguageSwitcher: ({ variant, forceVisible }: ILanguageSwitcherProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export { LanguageSwitcher };
@@ -1,4 +1,6 @@
1
1
  export type TLanguageSwitcherVariant = 'header' | 'footer';
2
2
  export interface ILanguageSwitcherProps {
3
3
  variant: TLanguageSwitcherVariant;
4
+ /** Показать без query. Нужен для Storybook, в продукте не использовать */
5
+ forceVisible?: boolean;
4
6
  }
@@ -1,7 +1,8 @@
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
- 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;
3
+ export declare const Buttons: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
4
+ $compact?: boolean;
5
+ }>> & string;
6
+ export declare const EnterButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
7
+ $compact?: boolean;
6
8
  }>> & string;
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;
@@ -0,0 +1,14 @@
1
+ import { Locales } from 'src/common.types';
2
+ export declare const EN_PROD_ORIGIN = "https://profinansy.ae";
3
+ export declare const RU_PROD_ORIGIN = "https://profinansy.ru";
4
+ export declare const EN_FALLBACK_PATH = "/market/dashboard";
5
+ /** Временный флаг показа переключателя: `?langSwitcher` или `?langSwitcher=1` */
6
+ export declare const LANGUAGE_SWITCHER_QUERY = "langSwitcher";
7
+ export declare const hasLanguageSwitcherQuery: (search?: string) => boolean;
8
+ type TLocationParts = Pick<Location, 'hostname' | 'pathname' | 'search' | 'hash'>;
9
+ export declare const stripLocalePrefix: (pathname: string) => string;
10
+ export declare const isLocalOrQaHost: (hostname: string) => boolean;
11
+ export declare const isForeignPath: (pathname: string) => boolean;
12
+ /** Локалка и QA — префикс `/en`. Прод — домен `.ae` / `.ru`. Нет EN-раздела — dashboard. */
13
+ export declare const getLocaleSwitchUrl: (next: Locales, location: TLocationParts) => string;
14
+ export {};
@@ -3,7 +3,7 @@ import { Locales } from '../common.types';
3
3
  interface ILocalizationProps {
4
4
  /** Выбранная локализация **/
5
5
  locale: Locales;
6
- /** Хост меняет локаль (роутер, i18n). Если нет — библиотека переписывает `/en` в URL */
6
+ /** Хост меняет локаль (роутер, i18n). Если нет — библиотека сама ведёт на `/en` или прод-домен */
7
7
  onLocaleChange?: (locale: Locales) => void;
8
8
  }
9
9
  interface ILocalization extends ILocalizationProps {