@elcrm/telegram 0.0.69 → 0.0.71

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,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from "react";
2
2
  declare let toggleBottomsheet: () => void;
3
3
  type TBottomsheet = {
4
4
  children: React.ReactNode;
@@ -13,6 +13,10 @@ type TBottomsheet = {
13
13
  * @param {string} [props.title] - Заголовок окна (опционально)
14
14
  * @param {boolean} [props.isOverlay=true] - Показывать ли затемняющую подложку (по умолчанию true)
15
15
  */
16
- declare const BottomSheet: ({ children, title, isOverlay }: TBottomsheet) => import("react/jsx-runtime").JSX.Element;
16
+ declare const BottomSheet: ({
17
+ children,
18
+ title,
19
+ isOverlay,
20
+ }: TBottomsheet) => import("react/jsx-runtime").JSX.Element;
17
21
  export default BottomSheet;
18
22
  export { toggleBottomsheet };
@@ -0,0 +1,7 @@
1
+ export declare const _debug: {
2
+ is: boolean;
3
+ MainButton: any;
4
+ BackButton: any;
5
+ };
6
+ declare const Header: () => import("react/jsx-runtime").JSX.Element;
7
+ export default Header;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,12 @@
1
- import { default as React } from 'react';
2
1
  import { Modal as _Modal } from './Madal/index';
2
+ type MainButton = {
3
+ text?: string;
4
+ color?: string;
5
+ textColor?: string;
6
+ isActive?: boolean;
7
+ callback?: () => void;
8
+ page: string;
9
+ };
3
10
  declare namespace Telegram {
4
11
  const WebApp: any;
5
12
  const getUser: () => any;
@@ -16,8 +23,6 @@ declare namespace Telegram {
16
23
  const Notice: (type: any, text?: any, thema?: any) => void;
17
24
  const Header: () => import("react/jsx-runtime").JSX.Element;
18
25
  /**
19
- * Компонент Footer
20
- *
21
26
  * @param {TAction[]} [actions] - Массив действий для отображения в футере
22
27
  * @param {React.ReactNode} [children] - Дополнительные дочерние элементы
23
28
  * @param {string} [className] - Пользовательский CSS-класс
@@ -27,8 +32,6 @@ declare namespace Telegram {
27
32
  */
28
33
  const Footer: ({ actions, children, className, page, onPageChange, direction, }: import("./Footer").TFooter) => import("react/jsx-runtime").JSX.Element;
29
34
  /**
30
- * Компонент BottomSheet
31
- *
32
35
  * @param {object} props - параметры компонента
33
36
  * @param {React.ReactNode} props.children - Контент внутри шита
34
37
  * @param {string} [props.title] - Заголовок окна (опционально)
@@ -45,32 +48,58 @@ declare namespace Telegram {
45
48
  callback: never[];
46
49
  set: (j: MainButton | boolean) => void;
47
50
  };
48
- const BackButton: {
49
- state: boolean[];
50
- listen: any;
51
- router: (j: any) => void;
52
- set: (j: any) => void;
53
- };
51
+ /**
52
+ * @param {object} params - параметры компонента
53
+ * @param {string} [params.page] - Текущая страница для определения активного действия
54
+ * @param {() => void} [params.callback] - Функция для обработки смены страницы
55
+ */
56
+ const BackButton: (params: boolean | {
57
+ page?: string;
58
+ callback?: () => void;
59
+ }) => void;
54
60
  }
55
- type MainButton = {
56
- text?: string;
57
- color?: string;
58
- textColor?: string;
59
- isActive?: boolean;
60
- callback?: () => void;
61
- page: string;
62
- };
63
- export declare const Header: () => import("react/jsx-runtime").JSX.Element, Footer: ({ actions, children, className, page, onPageChange, direction, }: import('./Footer').TFooter) => import("react/jsx-runtime").JSX.Element, toggleBottomSheet: () => void, Modal: typeof _Modal, MainButton: {
64
- callback: never[];
65
- set: (j: MainButton | boolean) => void;
66
- }, BackButton: {
67
- state: boolean[];
68
- listen: any;
69
- router: (j: any) => void;
70
- set: (j: any) => void;
71
- }, BottomSheet: ({ children, title, isOverlay }: {
61
+ /**
62
+ * @param {TAction[]} [actions] - Массив действий для отображения в футере
63
+ * @param {React.ReactNode} [children] - Дополнительные дочерние элементы
64
+ * @param {string} [className] - Пользовательский CSS-класс
65
+ * @param {string} [page] - Текущая страница для определения активного действия
66
+ * @param {"row"|"column"} [direction="row"] - Направление расположения элементов футера
67
+ * @param {(page: string) => void} [onPageChange] - Функция для обработки смены страницы
68
+ */
69
+ export declare const Footer: ({ actions, children, className, page, onPageChange, direction, }: import('./Footer').TFooter) => import("react/jsx-runtime").JSX.Element;
70
+ /**
71
+ * @param {object} props - параметры компонента
72
+ * @param {React.ReactNode} props.children - Контент внутри шита
73
+ * @param {string} [props.title] - Заголовок окна (опционально)
74
+ * @param {boolean} [props.isOverlay=true] - Показывать ли затемняющую подложку (по умолчанию true)
75
+ */
76
+ export declare const BottomSheet: ({ children, title, isOverlay }: {
72
77
  children: React.ReactNode;
73
78
  title?: string;
74
79
  isOverlay?: boolean;
75
- }) => import("react/jsx-runtime").JSX.Element, WebApp: any, getUser: () => any, Notice: (type: any, text?: any, thema?: any) => void;
80
+ }) => import("react/jsx-runtime").JSX.Element;
81
+ /**
82
+ * @param {object} params - параметры компонента
83
+ * @param {string} [params.page] - Текущая страница для определения активного действия
84
+ * @param {() => void} [params.callback] - Функция для обработки смены страницы
85
+ */
86
+ export declare const BackButton: (params: boolean | {
87
+ page?: string;
88
+ callback?: () => void;
89
+ }) => void;
90
+ /**
91
+ * Показывает уведомление с поддержкой тем оформления и хаптик-отклика.
92
+ * @param {string|object} type - Тип уведомления ('error', 'success', 'warning') или объект: {type, text, thema}.
93
+ * @param {string} [text] - Текст уведомления.
94
+ * @param {boolean} [thema] - Признак применения темы оформния.
95
+ *
96
+ * Пример использования:
97
+ * Notice('error', 'Что-то пошло не так');
98
+ * Notice({type: 'success', text: 'Операция выполнена', thema: true});
99
+ */
100
+ export declare const Notice: (type: any, text?: any, thema?: any) => void;
101
+ export declare const Header: () => import("react/jsx-runtime").JSX.Element, toggleBottomSheet: () => void, Modal: typeof _Modal, MainButton: {
102
+ callback: never[];
103
+ set: (j: MainButton | boolean) => void;
104
+ }, WebApp: any, getUser: () => any;
76
105
  export default Telegram;