master-components-react-ts 2.2.5 → 2.2.7
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.
- package/dist/assets/Icons/IconFilterLines.d.ts +1 -0
- package/dist/components/Dropdown/DropDown.d.ts +1 -1
- package/dist/components/Dropdown/DropDown.types.d.ts +5 -1
- package/dist/components/FilterWithTags/FilterWithTags.d.ts +3 -0
- package/dist/components/FilterWithTags/FilterWithTags.types.d.ts +10 -0
- package/dist/components/MainButton/MainButton.types.d.ts +1 -1
- package/dist/components/Popup/Popup.d.ts +2 -2
- package/dist/components/Popup/Popup.types.d.ts +1 -6
- package/dist/components/Table/Table.d.ts +2 -0
- package/dist/components/Table/Table.types.d.ts +28 -0
- package/dist/components/Table/useColumnResizer.d.ts +11 -0
- package/dist/components/TreeNode/TreeNode.d.ts +3 -0
- package/dist/components/TreeNode/TreeNode.types.d.ts +49 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2148 -1545
- package/package.json +4 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const IconFilterLines: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DropdownProps } from './DropDown.types';
|
|
2
2
|
declare const Dropdown: {
|
|
3
|
-
({ data, withFilter, withClose, disableAll, withMultiselect, selectedOptionID, withInput, dropdownType, onSelect, onFocus, onBlur, onValueChange, customInputSlot, dropdownWrapperStyle, dropdownInputWrapperStyle, dropdownInputSlotStyle, dropdownInputSlotItemStyle, dropdownInputSlotItemLabelStyle, dropdownInputSlotItemCloseStyle, dropdownInputSlotItemMoreStyle, dropdownItemStyle, dropdownItemLabelStyle, itemCheckboxStyle, dropdownItemLabelTextStyle, dropdownListStyle, ...rest }: DropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
({ data, withFilter, withClose, disableAll, withMultiselect, selectedOptionID, withInput, withTree, withSelectAll, dropdownType, onSelect, onFocus, onBlur, onValueChange, customInputSlot, dropdownWrapperStyle, dropdownInputWrapperStyle, dropdownInputSlotStyle, dropdownInputSlotItemStyle, dropdownInputSlotItemLabelStyle, dropdownInputSlotItemCloseStyle, dropdownInputSlotItemMoreStyle, dropdownItemStyle, dropdownItemLabelStyle, itemCheckboxStyle, dropdownItemLabelTextStyle, dropdownListStyle, treeProps, ...rest }: DropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
propKeys: readonly ["data", "withFilter", "withClose", "disableAll", "withMultiselect", "selectedOptionID", "withInput", "dropdownType", "onSelect", "onFocus", "onBlur", "onValueChange", "customInputSlot", "dropdownWrapperStyle", "dropdownInputWrapperStyle", "dropdownInputSlotStyle", "dropdownInputSlotItemStyle", "dropdownInputSlotItemLabelStyle", "dropdownInputSlotItemCloseStyle", "dropdownInputSlotItemMoreStyle", "dropdownItemStyle", "dropdownItemLabelStyle", "itemCheckboxStyle", "dropdownItemLabelTextStyle", "dropdownListStyle"];
|
|
5
5
|
displayName: string;
|
|
6
6
|
description: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FormInputProps } from '../FormInput/FormInput.types';
|
|
2
|
+
import { TreeNodeProps } from '../TreeNode/TreeNode.types';
|
|
2
3
|
type DropdownItem = {
|
|
3
4
|
id: string | number;
|
|
4
5
|
label: string;
|
|
@@ -8,7 +9,7 @@ type DropdownItem = {
|
|
|
8
9
|
[key: string]: any;
|
|
9
10
|
};
|
|
10
11
|
export interface DropdownProps extends FormInputProps {
|
|
11
|
-
data
|
|
12
|
+
data?: DropdownItem[];
|
|
12
13
|
withFilter?: boolean;
|
|
13
14
|
withClose?: boolean;
|
|
14
15
|
disableAll?: boolean;
|
|
@@ -16,6 +17,8 @@ export interface DropdownProps extends FormInputProps {
|
|
|
16
17
|
selectedOptionID?: string | number;
|
|
17
18
|
withInput?: boolean;
|
|
18
19
|
dropdownType?: 'country' | 'currency';
|
|
20
|
+
withTree?: boolean;
|
|
21
|
+
withSelectAll?: boolean;
|
|
19
22
|
customInputSlot?: React.ReactNode;
|
|
20
23
|
dropdownWrapperStyle?: React.CSSProperties;
|
|
21
24
|
dropdownInputWrapperStyle?: React.CSSProperties;
|
|
@@ -33,5 +36,6 @@ export interface DropdownProps extends FormInputProps {
|
|
|
33
36
|
onFocus?: () => void;
|
|
34
37
|
onBlur?: () => void;
|
|
35
38
|
onValueChange?: (value: string) => void;
|
|
39
|
+
treeProps?: TreeNodeProps;
|
|
36
40
|
}
|
|
37
41
|
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { FilterWithTagsProps } from './FilterWithTags.types';
|
|
2
|
+
declare const FilterWithTags: ({ filterOptions, customOpenPopup, withSearch, onSearchChange, mainButtonProps, popupProps }: FilterWithTagsProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default FilterWithTags;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ButtonProps } from '../MainButton/MainButton.types';
|
|
2
|
+
import { PopupProps } from '../Popup/Popup.types';
|
|
3
|
+
export interface FilterWithTagsProps {
|
|
4
|
+
filterOptions: any[];
|
|
5
|
+
customOpenPopup?: boolean;
|
|
6
|
+
withSearch?: boolean;
|
|
7
|
+
onSearchChange?: (value: string) => void;
|
|
8
|
+
mainButtonProps?: ButtonProps;
|
|
9
|
+
popupProps?: PopupProps;
|
|
10
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PopupProps } from './Popup.types';
|
|
2
2
|
declare const Popup: {
|
|
3
|
-
({ visible, template,
|
|
4
|
-
propKeys: readonly ["visible", "template", "
|
|
3
|
+
({ visible, template, mode, children, onClickOutside, onClose, widthType, modalOverlayStyle, popupContainerStyle, templateWrapperStyle, popupHeaderStyle, popupTitleStyle, closeButtonStyle, }: PopupProps): false | import("react/jsx-runtime").JSX.Element | undefined;
|
|
4
|
+
propKeys: readonly ["visible", "template", "mode", "children", "onClickOutside", "onClose", "widthType", "modalOverlayStyle", "popupContainerStyle", "templateWrapperStyle", "popupHeaderStyle", "popupTitleStyle", "closeButtonStyle"];
|
|
5
5
|
displayName: string;
|
|
6
6
|
description: string;
|
|
7
7
|
};
|
|
@@ -3,12 +3,7 @@ import { CSSProperties } from 'react';
|
|
|
3
3
|
export interface PopupProps {
|
|
4
4
|
visible?: boolean;
|
|
5
5
|
template?: React.ReactNode;
|
|
6
|
-
|
|
7
|
-
title: string;
|
|
8
|
-
description: string;
|
|
9
|
-
type: 'success' | 'error' | 'unsaved' | 'info';
|
|
10
|
-
mode: 'drawer' | 'modal';
|
|
11
|
-
};
|
|
6
|
+
mode?: 'drawer' | 'modal';
|
|
12
7
|
children?: React.ReactNode;
|
|
13
8
|
onClickOutside?: () => void;
|
|
14
9
|
onClose?: () => void;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { TableProps } from './Table.types';
|
|
2
|
+
export default function Table({ columns, data, onRowClick, onHeaderClick, sort, selectedRows, onSelectionChange, withSelectAll, actionButtonText, actionButtonIcon, onActionButtonClick, actionButtons, currentPage, totalPages, onPageChange, showPagination, onRowEdit, onRowDelete, rowActions, }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type ColumnType = {
|
|
2
|
+
key?: string;
|
|
3
|
+
label?: string;
|
|
4
|
+
render?: (row: any) => React.ReactNode;
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
};
|
|
7
|
+
/**Table Component Props */
|
|
8
|
+
export interface TableProps {
|
|
9
|
+
columns?: ColumnType[];
|
|
10
|
+
data?: any[];
|
|
11
|
+
onRowClick?: (row: any, rowIndex: number) => void;
|
|
12
|
+
onHeaderClick?: (key: string | number) => void;
|
|
13
|
+
sort?: any[];
|
|
14
|
+
selectedRows?: any[];
|
|
15
|
+
onSelectionChange?: (selectedRows: any[]) => void;
|
|
16
|
+
withSelectAll?: boolean;
|
|
17
|
+
actionButtonText?: string;
|
|
18
|
+
actionButtonIcon?: React.ReactNode;
|
|
19
|
+
onActionButtonClick?: (row: any) => void;
|
|
20
|
+
actionButtons?: any[];
|
|
21
|
+
currentPage?: number;
|
|
22
|
+
totalPages?: number;
|
|
23
|
+
onPageChange?: (page: number) => void;
|
|
24
|
+
showPagination?: boolean;
|
|
25
|
+
onRowEdit?: (row: any, rowIndex: number) => void;
|
|
26
|
+
onRowDelete?: (row: any, rowIndex: number) => void;
|
|
27
|
+
rowActions?: any[];
|
|
28
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ColumnType } from './Table.types';
|
|
2
|
+
export declare const useColumnResizer: (columns: ColumnType[], initialColumnWidths?: {
|
|
3
|
+
[key: string]: number;
|
|
4
|
+
}) => {
|
|
5
|
+
columnWidths: {
|
|
6
|
+
[key: string]: number;
|
|
7
|
+
};
|
|
8
|
+
isResizing: boolean;
|
|
9
|
+
resizeColumn: string | null;
|
|
10
|
+
handleResizeStart: (e: MouseEvent, columnKey: string) => void;
|
|
11
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { CheckboxProps } from '../Checkbox/Checkbox.types';
|
|
3
|
+
export type TreeNodeData = {
|
|
4
|
+
id: string | number;
|
|
5
|
+
label: string;
|
|
6
|
+
children?: TreeNodeData[];
|
|
7
|
+
customLabel?: React.ReactNode | ((item: any) => React.ReactNode);
|
|
8
|
+
selected?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
};
|
|
12
|
+
export interface TreeNodeProps {
|
|
13
|
+
data?: TreeNodeData[];
|
|
14
|
+
defaultCollapsed?: boolean;
|
|
15
|
+
checkboxProps?: CheckboxProps;
|
|
16
|
+
onCollapse?: (collapsed: boolean, node: TreeNodeData) => void;
|
|
17
|
+
onSelect?: (selectedNodes: TreeNodeData[]) => void;
|
|
18
|
+
fromDropdown?: boolean;
|
|
19
|
+
withSelectAll?: boolean;
|
|
20
|
+
withClearAll?: boolean;
|
|
21
|
+
expandedNodes?: TreeNodeData[];
|
|
22
|
+
SearchValue?: string;
|
|
23
|
+
SelectedData?: TreeNodeData[];
|
|
24
|
+
treeContainerStyle?: CSSProperties;
|
|
25
|
+
treeNodeItemStyle?: CSSProperties;
|
|
26
|
+
treeFooterStyle?: CSSProperties;
|
|
27
|
+
treeFooterTextStyle?: CSSProperties;
|
|
28
|
+
treeNodeStyle?: CSSProperties;
|
|
29
|
+
labelRowStyle?: CSSProperties;
|
|
30
|
+
collapseToggleStyle?: CSSProperties;
|
|
31
|
+
}
|
|
32
|
+
export interface TreeNodeItemProps {
|
|
33
|
+
node: TreeNodeData;
|
|
34
|
+
onSelect: (id: string | number, selected: boolean) => void;
|
|
35
|
+
defaultCollapsed?: boolean;
|
|
36
|
+
checkboxProps?: CheckboxProps;
|
|
37
|
+
onCollapse?: (collapsed: boolean, node: TreeNodeData) => void;
|
|
38
|
+
depth: number;
|
|
39
|
+
expandedNodes?: TreeNodeData[];
|
|
40
|
+
SearchValue?: string;
|
|
41
|
+
SelectedData?: TreeNodeData[];
|
|
42
|
+
treeContainerStyle?: CSSProperties;
|
|
43
|
+
treeNodeItemStyle?: CSSProperties;
|
|
44
|
+
treeFooterStyle?: CSSProperties;
|
|
45
|
+
treeFooterTextStyle?: CSSProperties;
|
|
46
|
+
treeNodeStyle?: CSSProperties;
|
|
47
|
+
labelRowStyle?: CSSProperties;
|
|
48
|
+
collapseToggleStyle?: CSSProperties;
|
|
49
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -15,3 +15,6 @@ export { default as Skeleton } from './components/Skeleton/Skeleton';
|
|
|
15
15
|
export { default as ActionDropdown } from './components/ActionDropdown/ActionDropdown';
|
|
16
16
|
export { default as InlineLoading } from './components/InlineLoading/InlineLoading';
|
|
17
17
|
export { default as Slider } from './components/Slider/Slider';
|
|
18
|
+
export { default as TreeNode } from './components/TreeNode/TreeNode';
|
|
19
|
+
export { default as FilterWithTags } from './components/FilterWithTags/FilterWithTags';
|
|
20
|
+
export { default as Table } from './components/Table/Table';
|