profinansy-ui-lib 3.2.63 → 3.2.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.
Files changed (30) hide show
  1. package/dist/api/initial.d.ts +1 -1
  2. package/dist/api/notifications/notifications.api.d.ts +9 -0
  3. package/dist/api/notifications/notifications.typed.d.ts +17 -0
  4. package/dist/components/blocks/CompanyInfo/CompanyInfo.d.ts +3 -0
  5. package/dist/components/blocks/CompanyInfo/CompanyInfo.stories.d.ts +7 -0
  6. package/dist/components/blocks/CompanyInfo/CompanyInfo.styled.d.ts +4 -0
  7. package/dist/components/blocks/CompanyInfo/CompanyInfo.typed.d.ts +15 -0
  8. package/dist/components/blocks/CompanyInfo/index.d.ts +1 -0
  9. package/dist/components/blocks/header/components/HeaderRight/HeaderRight.d.ts +3 -1
  10. package/dist/components/blocks/header/components/Notification/Notification.d.ts +3 -1
  11. package/dist/components/blocks/header/components/Notification/Notification.styled.d.ts +4 -0
  12. package/dist/components/blocks/header/hooks/useGetNotificationsCount.d.ts +4 -0
  13. package/dist/components/uikit/AvatarCompany/AvatarCompany.d.ts +3 -0
  14. package/dist/components/uikit/AvatarCompany/AvatarCompany.stories.d.ts +7 -0
  15. package/dist/components/uikit/AvatarCompany/AvatarCompany.styled.d.ts +6 -0
  16. package/dist/components/uikit/AvatarCompany/AvatarCompany.typed.d.ts +11 -0
  17. package/dist/components/uikit/AvatarCompany/index.d.ts +1 -0
  18. package/dist/components/uikit/Dropdown/Dropdown.d.ts +1 -1
  19. package/dist/components/uikit/FilterButton/Drop/Drop.d.ts +1 -1
  20. package/dist/components/uikit/Hint/Hint.d.ts +1 -1
  21. package/dist/components/uikit/Popup/Popup.d.ts +1 -1
  22. package/dist/components/uikit/Table/components/MockData.d.ts +14 -18
  23. package/dist/components/uikit/Tooltip/Tooltip.d.ts +1 -1
  24. package/dist/constants/common.d.ts +12 -0
  25. package/dist/firebase.d.ts +4 -0
  26. package/dist/index.d.ts +3 -1
  27. package/dist/index.js +74 -22
  28. package/dist/index.js.LICENSE.txt +85 -0
  29. package/dist/utils/getImageFormat.d.ts +1 -2
  30. package/package.json +2 -1
@@ -1,5 +1,5 @@
1
1
  import { IApiSettings } from './api';
2
- type TMethod = 'GET' | 'POST' | 'PATCH' | 'DELETE';
2
+ export type TMethod = 'GET' | 'POST' | 'PATCH' | 'DELETE';
3
3
  type TBody = Record<string, unknown>;
4
4
  export declare const apiHelper: (url: string, method: TMethod, settings: IApiSettings, body?: TBody) => Promise<any>;
5
5
  export {};
@@ -0,0 +1,9 @@
1
+ import { IApiSettings } from '../api';
2
+ import { INotification } from './notifications.typed';
3
+ export declare const notificationsApi: {
4
+ getNotificationsHistory: (apiSettings: IApiSettings) => Promise<{
5
+ data: INotification[];
6
+ next_notification_id: number;
7
+ new_count: number;
8
+ }>;
9
+ };
@@ -0,0 +1,17 @@
1
+ export interface INotification {
2
+ body: string;
3
+ data: {
4
+ instrument_id: number;
5
+ };
6
+ date: number;
7
+ deeplink_msg: string;
8
+ deeplink: string;
9
+ group_name: string;
10
+ group_title: string;
11
+ icon?: string;
12
+ id: number;
13
+ is_read: boolean;
14
+ title: string;
15
+ type_name: string;
16
+ type_title: string;
17
+ }
@@ -0,0 +1,3 @@
1
+ import { ICompanyInfo } from './CompanyInfo.typed';
2
+ declare const CompanyInfo: ({ link, ...props }: ICompanyInfo) => JSX.Element;
3
+ export { CompanyInfo };
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ title: string;
3
+ component: ({ link, ...props }: import("./CompanyInfo.typed").ICompanyInfo) => JSX.Element;
4
+ tags: string[];
5
+ };
6
+ export default _default;
7
+ export declare const CompanyInfo: () => JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare const FirstLine: import("styled-components").StyledComponent<({ tag, className, children, variant, title, ...props }: import("profinansy-ui-lib/dist/components/uikit/Typography/Typography.typed").ITypographyProps & import("react").CSSProperties) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const ContainerLink: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const Container: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
4
+ export declare const Right: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -0,0 +1,15 @@
1
+ import { ImageSize } from '../../../utils/getImageFormat';
2
+ export interface ICompanyInfo {
3
+ /** Ссылка на изображение */
4
+ logo?: string;
5
+ /** Тиккер компании */
6
+ firstLine?: string;
7
+ /** Ссылка на страницу компании */
8
+ link?: string;
9
+ /** Название компании */
10
+ secondLine?: string;
11
+ /** Размер изображения. По умолчанию 28px */
12
+ logoSize?: number;
13
+ /** Формат сжатия изображения. */
14
+ compressionImage?: ImageSize;
15
+ }
@@ -0,0 +1 @@
1
+ export { CompanyInfo } from './CompanyInfo';
@@ -1,4 +1,5 @@
1
1
  import { IUser, UserRole } from '../../../../../common.types';
2
+ import { IApiSettings } from '../../../../../api/api';
2
3
  interface IProps {
3
4
  user: IUser;
4
5
  hostname: string;
@@ -9,6 +10,7 @@ interface IProps {
9
10
  handleRouteChange: (val: string) => void;
10
11
  setBurgerOpened: (val: boolean) => void;
11
12
  onLogout: () => void;
13
+ apiSettings: IApiSettings;
12
14
  }
13
- declare const HeaderRight: ({ user, hostname, userRole, isProfinansy, isPossibleTrial, trial, handleRouteChange, setBurgerOpened, onLogout }: IProps) => JSX.Element;
15
+ declare const HeaderRight: ({ user, hostname, userRole, isProfinansy, isPossibleTrial, trial, handleRouteChange, setBurgerOpened, onLogout, apiSettings }: IProps) => JSX.Element;
14
16
  export { HeaderRight };
@@ -1,8 +1,10 @@
1
1
  import { UserRole } from '../../../../../common.types';
2
+ import { IApiSettings } from '../../../../../api/api';
2
3
  interface IProps {
3
4
  hostname: string;
4
5
  handleRouteChange: (val: string) => void;
5
6
  userRole: UserRole;
7
+ apiSettings: IApiSettings;
6
8
  }
7
- declare const Notification: ({ hostname, handleRouteChange, userRole }: IProps) => JSX.Element;
9
+ declare const Notification: ({ hostname, handleRouteChange, userRole, apiSettings }: IProps) => JSX.Element;
8
10
  export { Notification };
@@ -1,3 +1,7 @@
1
+ export declare const Wrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const NotificationsCount: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
3
+ notificationsCount: number;
4
+ }, never>;
1
5
  export declare const NotificationButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
2
6
  isActive: boolean;
3
7
  }, never>;
@@ -0,0 +1,4 @@
1
+ import { IApiSettings } from '../../../../api/api';
2
+ export declare const useGetNotificationsCount: (apiSettings: IApiSettings) => {
3
+ notificationsCount: number;
4
+ };
@@ -0,0 +1,3 @@
1
+ import { IAvatarCompany } from './AvatarCompany.typed';
2
+ declare const AvatarCompany: ({ ticker, logo, logoSize, compressionImage }: IAvatarCompany) => JSX.Element;
3
+ export { AvatarCompany };
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ title: string;
3
+ component: ({ ticker, logo, logoSize, compressionImage }: import("./AvatarCompany.typed").IAvatarCompany) => JSX.Element;
4
+ tags: string[];
5
+ };
6
+ export default _default;
7
+ export declare const AvatarCompany: () => JSX.Element;
@@ -0,0 +1,6 @@
1
+ export declare const Logo: import("styled-components").StyledComponent<"img", import("styled-components").DefaultTheme, {
2
+ logoSize: number;
3
+ }, never>;
4
+ export declare const EmptyLogo: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
5
+ logoSize: number;
6
+ }, never>;
@@ -0,0 +1,11 @@
1
+ import { ImageSize } from '../../../utils/getImageFormat';
2
+ export interface IAvatarCompany {
3
+ /** Ссылка на изображение */
4
+ logo?: string;
5
+ /** Размер изображения. По умолчанию 28px */
6
+ logoSize?: number;
7
+ /** Формат сжатия изображения. */
8
+ compressionImage?: ImageSize;
9
+ /** Тиккер компании */
10
+ ticker: string;
11
+ }
@@ -0,0 +1 @@
1
+ export { AvatarCompany } from './AvatarCompany';
@@ -25,9 +25,9 @@ export declare function useDrop({ placement, onOpenList }: {
25
25
  } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
26
26
  context: {
27
27
  placement: Placement;
28
+ strategy: import("@floating-ui/utils").Strategy;
28
29
  x: number;
29
30
  y: number;
30
- strategy: import("@floating-ui/utils").Strategy;
31
31
  middlewareData: import("@floating-ui/core").MiddlewareData;
32
32
  isPositioned: boolean;
33
33
  update: () => void;
@@ -24,9 +24,9 @@ export declare function useDrop({ placement }: {
24
24
  } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
25
25
  context: {
26
26
  placement: Placement;
27
+ strategy: import("@floating-ui/utils").Strategy;
27
28
  x: number;
28
29
  y: number;
29
- strategy: import("@floating-ui/utils").Strategy;
30
30
  middlewareData: import("@floating-ui/core").MiddlewareData;
31
31
  isPositioned: boolean;
32
32
  update: () => void;
@@ -26,9 +26,9 @@ export declare function useHint({ placement, isClickMobile }?: HintOptions): {
26
26
  } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
27
27
  context: {
28
28
  placement: Placement;
29
+ strategy: import("@floating-ui/utils").Strategy;
29
30
  x: number;
30
31
  y: number;
31
- strategy: import("@floating-ui/utils").Strategy;
32
32
  middlewareData: import("@floating-ui/core").MiddlewareData;
33
33
  isPositioned: boolean;
34
34
  update: () => void;
@@ -29,9 +29,9 @@ export declare function usePopup({ placement, isHover }: {
29
29
  } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
30
30
  context: {
31
31
  placement: Placement;
32
+ strategy: import("@floating-ui/utils").Strategy;
32
33
  x: number;
33
34
  y: number;
34
- strategy: import("@floating-ui/utils").Strategy;
35
35
  middlewareData: import("@floating-ui/core").MiddlewareData;
36
36
  isPositioned: boolean;
37
37
  update: () => void;
@@ -1,23 +1,19 @@
1
1
  import { IColumnTable } from '../Table.typed';
2
- export declare const MOCK_DATA_1: ({
2
+ export declare const MOCK_DATA_1: {
3
3
  id: number;
4
- yearProfit: string;
5
- ThreeYearsProfit: string;
6
- FiveYearsProfit: string;
7
- TenYearsProfit: string;
8
- AllTimeProfit: string;
9
- fieldTitle: string;
10
- targetScroll?: undefined;
11
- } | {
12
- id: number;
13
- yearProfit: string;
14
- ThreeYearsProfit: string;
15
- FiveYearsProfit: string;
16
- TenYearsProfit: string;
17
- AllTimeProfit: string;
18
- targetScroll: boolean;
19
- fieldTitle: string;
20
- })[];
4
+ name: string;
5
+ ticker: string;
6
+ link: string;
7
+ logo: string;
8
+ price: string;
9
+ note: string;
10
+ sector: string;
11
+ amount: number;
12
+ 'p/e': number;
13
+ 'p/s': number;
14
+ 'p/b': number;
15
+ description: string;
16
+ }[];
21
17
  export declare const Hints: {
22
18
  hint_1: string[];
23
19
  };
@@ -26,9 +26,9 @@ export declare function useTooltip({ placement, isHover, showArrow }: {
26
26
  } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
27
27
  context: {
28
28
  placement: Placement;
29
+ strategy: import("@floating-ui/utils").Strategy;
29
30
  x: number;
30
31
  y: number;
31
- strategy: import("@floating-ui/utils").Strategy;
32
32
  middlewareData: import("@floating-ui/core").MiddlewareData;
33
33
  isPositioned: boolean;
34
34
  update: () => void;
@@ -1,3 +1,15 @@
1
+ import { TMethod } from '../api/initial';
1
2
  export declare const HEIGHT_HEADER = 64;
2
3
  export declare const TABLET_WIDTH = 960;
3
4
  export declare const MOBILE_WIDTH = 600;
5
+ export declare const REQUEST_METHOD: Record<TMethod, TMethod>;
6
+ export declare const firebaseConfig: {
7
+ apiKey: string;
8
+ authDomain: string;
9
+ projectId: string;
10
+ storageBucket: string;
11
+ messagingSenderId: string;
12
+ appId: string;
13
+ measurementId: string;
14
+ vapidKey: string;
15
+ };
@@ -0,0 +1,4 @@
1
+ import { Messaging } from 'firebase/messaging';
2
+ export declare const firebaseApp: import("@firebase/app").FirebaseApp;
3
+ declare let messaging: Messaging | undefined;
4
+ export { messaging };
package/dist/index.d.ts CHANGED
@@ -2,12 +2,14 @@ import { Header } from './components/blocks/header';
2
2
  import { Footer } from './components/blocks/footer';
3
3
  import { SideMenu } from './components/blocks/sideMenu';
4
4
  import { PremiumBanner } from './components/blocks/PremiumBanner';
5
+ import { CompanyInfo } from './components/blocks/CompanyInfo';
5
6
  import { LayoutSideMenu } from './components/layouts/LayoutSideMenu';
6
7
  import { useHidingFromApp } from './hooks/useHiddingFromApp';
7
8
  import { useHidingChat } from './hooks/useHidingChat';
8
9
  import { useOpenSideMenu } from './hooks/useOpenSideMenu';
9
10
  import { SuccessModal } from './components/modals/SuccessModal';
10
11
  import { Alert } from './components/uikit/Alert';
12
+ import { AvatarCompany } from './components/uikit/AvatarCompany';
11
13
  import { Hint } from './components/uikit/Hint';
12
14
  import { SwiperButton } from './components/uikit/SwiperButton';
13
15
  import { Counter } from './components/uikit/Counter';
@@ -52,4 +54,4 @@ import { setCookie, getCookie, deleteCookie } from './utils/cookie';
52
54
  import { INSTRUMENTS_TYPES } from './hooks/useSearchInstruments';
53
55
  import { HEIGHT_HEADER } from './constants/common';
54
56
  import { AnimationFunctions } from './constants/animation/animation';
55
- export { AnimationFunctions, INSTRUMENTS_TYPES, eventBus, BusEvent, SuccessModal, Footer, Header, SideMenu, PremiumBanner, Alert, Hint, SegmentControl, SwiperButton, FilterButton, ControlButton, SortingButton, Counter, Checkbox, Radio, Portal, Loader, Button, Tabs, TextButton, RegexPattern, Input, Textarea, ErrorText, Avatar, Tooltip, Typography, Modal, SideModal, ArrowButton, Bubbles, HiddenText, PasswordInput, Dropdown, ModalMobile, Popup, IPopup, FieldRow, Card, PageTitle, Switch, Spinner, Skeleton, palette, ThemeProvider, useMode, useHidingChat, useHidingFromApp, useOpenSideMenu, LayoutSideMenu, HEIGHT_HEADER, setCookie, getCookie, deleteCookie };
57
+ export { AnimationFunctions, INSTRUMENTS_TYPES, eventBus, BusEvent, SuccessModal, Footer, Header, SideMenu, PremiumBanner, CompanyInfo, Alert, AvatarCompany, Hint, SegmentControl, SwiperButton, FilterButton, ControlButton, SortingButton, Counter, Checkbox, Radio, Portal, Loader, Button, Tabs, TextButton, RegexPattern, Input, Textarea, ErrorText, Avatar, Tooltip, Typography, Modal, SideModal, ArrowButton, Bubbles, HiddenText, PasswordInput, Dropdown, ModalMobile, Popup, IPopup, FieldRow, Card, PageTitle, Switch, Spinner, Skeleton, palette, ThemeProvider, useMode, useHidingChat, useHidingFromApp, useOpenSideMenu, LayoutSideMenu, HEIGHT_HEADER, setCookie, getCookie, deleteCookie };