Skip to content

Commit 28d3370

Browse files
Merge pull request #8 from iron-tech-space/editable_table
Fix bugs with types
2 parents 90c7a11 + fed8e60 commit 28d3370

File tree

26 files changed

+177
-36
lines changed

26 files changed

+177
-36
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.0.76
2+
3+
- Fix bugs with types
4+
15
## 0.0.75
26

37
- Fix bug withItem props

dist/components/Custom/Custom.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export interface CustomProps extends StoreProps {
44
/** Функция для рендера компонента. В приритере если передани и render, и ребенок */
55
render?: React.FunctionComponent;
66
/** Возможен только 1 ребенок для рендоракомпонеента */
7-
children?: ReactNode;
7+
children?: ReactNode | undefined;
88
}
99
/** Custom компонент */
1010
declare const Custom: (props: CustomProps) => JSX.Element | null;

dist/components/Form/FormProps.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export interface FormProps extends AntFormProps {
3434
/** Параметры записи в store изменений всех полей формы */
3535
dispatch?: {
3636
path: string;
37+
type?: 'event' | undefined;
3738
extraData?: any;
3839
};
3940
}

dist/components/Layout/Layout.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { StoreProps } from "../core/wrappers";
33
export interface LayoutProps extends StoreProps {
44
/** Имя CSS класса */
55
className?: string | undefined;
6-
children?: ReactNode[];
6+
style?: object | undefined;
7+
children?: ReactNode | undefined;
78
}
89
/** Компонент обертка со всеми пропрами div */
910
declare const Layout: (props: LayoutProps) => JSX.Element;

dist/components/Modal/ModalProps.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { StoreProps } from "../core/wrappers";
22
import { ButtonProps, ModalProps as AntModalProps } from "antd";
33
import { Request } from "../core/interfaces";
44
import { FormProps } from "../Form/FormProps";
5-
export interface ModalOnChangeOptions {
5+
export interface ModalSubscribeOnChangeOptions {
66
/** Значение лежащие в Store по пути subscribe[i].path */
77
value: any;
88
/** Значение доп данных в Store по пути subscribe[i].extraData */
@@ -54,6 +54,6 @@ export interface ModalProps extends Omit<StoreProps, 'subscribe'> {
5454
* По умолчанию false */
5555
withMount?: boolean;
5656
/** Вызывается при изменение объекта по указанному path */
57-
onChange: (params: ModalOnChangeOptions) => void;
57+
onChange: (params: ModalSubscribeOnChangeOptions) => void;
5858
}[];
5959
}

dist/components/Modal/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import Modal from "./Modal";
2-
export type { ModalProps } from './ModalProps';
2+
export type { ModalProps, ModalSubscribeOnChangeOptions } from './ModalProps';
33
export default Modal;

dist/components/Select/Select.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ declare namespace Select {
4444
export { searchParamName_1 as searchParamName };
4545
const lostParamName_1: string;
4646
export { lostParamName_1 as lostParamName };
47+
export function optionConverter_1(option: any): {
48+
label: any;
49+
value: any;
50+
};
51+
export { optionConverter_1 as optionConverter };
4752
}
4853
}
4954
import PropTypes from "prop-types";

dist/components/Table/Table.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import RtTable from "./ReactBaseTable/ConfigLoader";
22
import AntTable from "./AntTable/ConfigLoader";
33
import React, { FunctionComponent, ReactNode } from "react";
44
import { Request, sortBy } from "../core/interfaces";
5+
import { FormItemProps as AntFormItemProps } from "antd/lib/form/FormItem";
56
export { RtTable, AntTable };
67
export declare const TableWrapper: FunctionComponent<TableProps>;
78
export interface TablesSubscribeOnChangeOptions {
@@ -37,6 +38,8 @@ export interface TablesSubscribeOnChangeOptions {
3738
setSubscribeProps: (props?: any) => void;
3839
}
3940
export interface TableProps {
41+
/** Объект с props для Form Item */
42+
itemProps?: AntFormItemProps;
4043
/** Тип таблицы */
4144
type?: 'rt' | undefined;
4245
/** Столбцы таблицы */
@@ -194,6 +197,12 @@ export interface TableProps {
194197
}) => void | string;
195198
/** Путь в сторе куда класть выбранную строку таблицы */
196199
dispatchPath?: string;
200+
/** Параметры записи в Store изменений компонента */
201+
dispatch?: {
202+
path: string;
203+
type?: 'event' | undefined;
204+
extraData?: any;
205+
};
197206
/** Объект для подписки на изменения в STORE */
198207
subscribe?: {
199208
/** Имя параметра в props с которым связать значение Store */

dist/components/TreeSelect/TreeSelect.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ declare namespace TreeSelect {
3030
export { requestLoadRows_1 as requestLoadRows };
3131
const searchParamName_1: string;
3232
export { searchParamName_1 as searchParamName };
33+
export function optionConverter_1(option: any): {
34+
label: any;
35+
value: any;
36+
children: any;
37+
};
38+
export { optionConverter_1 as optionConverter };
3339
}
3440
}
3541
import PropTypes from "prop-types";

dist/components/core/wrappers.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { FormItemProps as AntFormItemProps } from "antd";
33
export interface LabelProps {
44
label?: string | ReactNode;
55
value?: any | ReactNode;
6-
children?: ReactNode;
6+
children?: ReactNode | undefined;
77
}
88
export interface SubscribeOnChangeOptions {
99
/** Значение лежащие в Store по пути subscribe[i].path */
@@ -19,6 +19,7 @@ export interface StoreProps {
1919
/** Параметры записи в Store изменений компонента */
2020
dispatch?: {
2121
path: string;
22+
type?: 'event' | undefined;
2223
extraData?: any;
2324
};
2425
/** Параметры подписки на изменения в Store */

0 commit comments

Comments
 (0)