master-components-react-ts 2.10.19 → 2.11.1

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.
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+ export type ThemeColors = {
3
+ primaryBackgroundColor?: string;
4
+ primaryHoverColor?: string;
5
+ primaryActiveColor?: string;
6
+ primaryActiveOutlineColor?: string;
7
+ primaryLabelColor?: string;
8
+ };
9
+ export type ThemeProviderProps = {
10
+ children: ReactNode;
11
+ theme?: ThemeColors;
12
+ };
13
+ declare const ThemeProvider: {
14
+ ({ children, theme }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
15
+ propKeys: readonly ["children", "theme"];
16
+ };
17
+ export default ThemeProvider;
@@ -1,6 +1,6 @@
1
1
  import { TableProps } from './Table.types';
2
2
  declare const Table: {
3
- ({ uniqueKey, columns, data, onRowClick, onHeaderClick, withSortIcons, sort, selectedRows, onSelectionChange, withSelectAll, actionButtonText, actionButtonIcon, onActionButtonClick, actionButtons, withColumnConfiguration, headerSlot, onColumnOrderChange, onColumnVisibilityChange, withActions, currentPage, totalPages, onPageChange, showPagination, paginationType, maxVisiblePages, rowsPerPage, rowsPerPageOptions, onRowsPerPageChange, totalItems, startItem, endItem, onRowEdit, onRowDelete, rowActions, childrenKey, withChildrenSelection, paginationFooterStyle, }: TableProps): import("react/jsx-runtime").JSX.Element;
3
+ ({ uniqueKey, columns, data, onRowClick, onHeaderClick, withSortIcons, sort, selectedRows, onSelectionChange, withSelectAll, actionButtonText, actionButtonIcon, onActionButtonClick, actionButtons, withColumnConfiguration, headerSlot, onColumnOrderChange, onColumnVisibilityChange, showColumnTitles, inlineEditActionSlot, inlineEditActionSlotStyle, withActions, currentPage, totalPages, onPageChange, showPagination, paginationType, maxVisiblePages, rowsPerPage, rowsPerPageOptions, onRowsPerPageChange, totalItems, startItem, endItem, onRowEdit, onRowDelete, rowActions, childrenKey, withChildrenSelection, paginationFooterStyle, }: TableProps): import("react/jsx-runtime").JSX.Element;
4
4
  propKeys: readonly ["uniqueKey", "columns", "data", "onRowClick", "onHeaderClick", "sort", "selectedRows", "onSelectionChange", "withSelectAll", "actionButtonText", "actionButtonIcon", "onActionButtonClick", "actionButtons", "withColumnConfiguration", "headerSlot", "onColumnOrderChange", "onColumnVisibilityChange", "currentPage", "totalPages", "onPageChange", "showPagination", "rowsPerPage", "rowsPerPageOptions", "onRowsPerPageChange", "totalItems", "startItem", "endItem", "onRowEdit", "onRowDelete", "rowActions", "childrenKey", "withChildrenSelection"];
5
5
  displayName: string;
6
6
  description: string;
@@ -1,11 +1,23 @@
1
1
  import { TooltipProps } from '../Tooltip/Tooltip.types';
2
2
  import { CSSProperties } from 'react';
3
3
  export type TooltipConfig = Omit<TooltipProps, 'children'>;
4
+ export type InlineEditRenderArgs = {
5
+ close: () => void;
6
+ save: () => void;
7
+ cancel: () => void;
8
+ rowIndex: number;
9
+ rowKey: string | number;
10
+ columnKey: string;
11
+ };
4
12
  export type ColumnType = {
5
13
  key?: string;
6
14
  label?: string;
7
15
  visible?: boolean;
8
16
  render?: (row: any) => React.ReactNode;
17
+ inlineEdit?: boolean;
18
+ editRender?: (row: any, args: InlineEditRenderArgs) => React.ReactNode;
19
+ onInlineEditSave?: (row: any, args: InlineEditRenderArgs) => void;
20
+ onInlineEditCancel?: (row: any, args: InlineEditRenderArgs) => void;
9
21
  rowTooltipProps?: TooltipConfig | ((row: any) => TooltipConfig);
10
22
  sortable?: boolean;
11
23
  customWidth?: string | number;
@@ -38,6 +50,9 @@ export interface TableProps {
38
50
  onSelectionChange?: (selectedRows: any[], row?: any) => void;
39
51
  withSelectAll?: boolean;
40
52
  actionButtonText?: string;
53
+ showColumnTitles?: boolean;
54
+ inlineEditActionSlot?: React.ReactNode;
55
+ inlineEditActionSlotStyle?: CSSProperties;
41
56
  actionButtonIcon?: React.ReactNode;
42
57
  onActionButtonClick?: (row: any) => void;
43
58
  actionButtons?: ActionButtonType[];
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ export { default as ThemeProvider } from './Provider/ThemeProvider';
2
+ export type { ThemeColors, ThemeProviderProps } from './Provider/ThemeProvider';
1
3
  export { default as MainButton } from './components/MainButton/MainButton';
2
4
  export type { MainButtonProps } from './components/MainButton/MainButton.types';
3
5
  export { default as FormInput } from './components/FormInput/FormInput';
@@ -39,7 +41,7 @@ export { default as FilterWithTags } from './components/FilterWithTags/FilterWit
39
41
  export type { FilterOptionsTypes } from './components/FilterWithTags/FilterWithTags.types';
40
42
  export type { FilterWithTagsProps } from './components/FilterWithTags/FilterWithTags.types';
41
43
  export { default as Table } from './components/Table/Table';
42
- export type { ColumnType, SortType, RowActionType, ActionButtonType } from './components/Table/Table.types';
44
+ export type { ColumnType, SortType, RowActionType, ActionButtonType, InlineEditRenderArgs } from './components/Table/Table.types';
43
45
  export type { TableProps } from './components/Table/Table.types';
44
46
  export { default as FileUploader } from './components/FileUploader/FileUploader';
45
47
  export { default as FilesBlock } from './components/FileUploader/FilesBlock';