mig-schema-table 4.2.2 → 4.2.4
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/component/SchemaTable/ColumnResizers/index.d.ts +1 -2
- package/dist/component/SchemaTable/Th/index.d.ts +3 -21
- package/dist/component/SchemaTable/index.d.ts +2 -2
- package/dist/component/hooks/useIsAllRowsChecked.d.ts +1 -0
- package/dist/component/hooks/useOnColumnsWidthsChange.d.ts +1 -0
- package/dist/component/hooks/useTranslate.d.ts +1 -0
- package/dist/component/inc/column.d.ts +4 -0
- package/dist/component/provider/SchemaTableContext.d.ts +14 -12
- package/dist/{index-CznENFjN.js → index-BeuaAtOX.js} +1 -1
- package/dist/{index-CUaKZ0_y.js → index-C4n9c7D7.js} +5968 -5981
- package/dist/mig-schema-table.es.js +1 -1
- package/dist/mig-schema-table.umd.js +55 -55
- package/package.json +1 -1
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
interface IColumnResizersProps {
|
|
2
2
|
columnWidths: number[];
|
|
3
|
-
onColumnWidthsChange: (newColumnWidths: number[]) => void;
|
|
4
3
|
resizeColumnIndex: number;
|
|
5
4
|
setResizeColumnIndex: (newResizeColumnIndex: number) => void;
|
|
6
5
|
tableBodyHeight: number;
|
|
7
6
|
}
|
|
8
|
-
declare const ColumnResizers: ({ columnWidths,
|
|
7
|
+
declare const ColumnResizers: ({ columnWidths, resizeColumnIndex, setResizeColumnIndex, tableBodyHeight, }: IColumnResizersProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default ColumnResizers;
|
|
@@ -1,26 +1,8 @@
|
|
|
1
|
-
import { oas31 } from 'openapi3-ts';
|
|
2
|
-
import { IColumnConfig } from '../../types';
|
|
3
|
-
import { IThMenuConfig } from '../ThMenu';
|
|
4
|
-
import { EColumnFilterStatus } from '../../inc/constant.ts';
|
|
5
1
|
import { default as React } from 'react';
|
|
6
2
|
|
|
7
|
-
interface IThProps
|
|
8
|
-
|
|
9
|
-
isAllChecked?: boolean;
|
|
10
|
-
isSortable: boolean;
|
|
11
|
-
numberOfSelectedRows?: number;
|
|
12
|
-
onColumnPositionChange?: (sourceColumnName: string, destinationColumnName: string) => void;
|
|
13
|
-
onSelectAllIndexesHandler?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
14
|
-
propConfig?: IColumnConfig<T>;
|
|
15
|
-
propIsRequired: boolean;
|
|
16
|
-
propName: string;
|
|
17
|
-
schema?: oas31.SchemaObject;
|
|
18
|
-
setMenuConfig: React.Dispatch<React.SetStateAction<IThMenuConfig<T> | undefined>>;
|
|
19
|
-
setSortAsc: React.Dispatch<React.SetStateAction<boolean>>;
|
|
20
|
-
setSortColumn: React.Dispatch<React.SetStateAction<string>>;
|
|
21
|
-
sortAsc?: boolean;
|
|
3
|
+
interface IThProps {
|
|
4
|
+
index: number;
|
|
22
5
|
style: React.CSSProperties;
|
|
23
|
-
translate: (key: string, ...args: Array<string | number>) => string;
|
|
24
6
|
}
|
|
25
|
-
declare const MemoizedTh: <T>({
|
|
7
|
+
declare const MemoizedTh: <T>({ index, style }: IThProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
8
|
export default MemoizedTh;
|
|
@@ -12,7 +12,7 @@ export interface IGetDataProps {
|
|
|
12
12
|
sortColumn?: string;
|
|
13
13
|
sortAsc: boolean;
|
|
14
14
|
}
|
|
15
|
-
interface IColumnFilterMap {
|
|
15
|
+
export interface IColumnFilterMap {
|
|
16
16
|
[propName: string]: TColumnFilterValue;
|
|
17
17
|
}
|
|
18
18
|
export interface ICustomElementProps {
|
|
@@ -74,5 +74,5 @@ export interface INumberColumnFilterValue {
|
|
|
74
74
|
filterEmpty?: true;
|
|
75
75
|
}
|
|
76
76
|
export type TColumnFilterValue = string | boolean | number | IDateColumnFilterValue | INumberColumnFilterValue | null;
|
|
77
|
-
declare const MemoizedSchemaTable: <T>(
|
|
77
|
+
declare const MemoizedSchemaTable: <T>(props: ISchemaTableProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
78
78
|
export default MemoizedSchemaTable;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useIsAllRowsChecked(): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useOnColumnsWidthsChange(): (newColumnWidths: number[]) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useTranslate(): (key: string, ...args: (string | number)[]) => string;
|
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IColumnConfig, IRenderData } from '../types.ts';
|
|
1
|
+
import { IRenderData } from '../types.ts';
|
|
3
2
|
import { ReferenceObject, SchemaObject } from 'openapi3-ts/oas31';
|
|
3
|
+
import { IColumnFilterMap, ISchemaTableProps } from '../SchemaTable';
|
|
4
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
5
|
+
import { IThMenuConfig } from '../SchemaTable/ThMenu';
|
|
4
6
|
import * as React from "react";
|
|
5
7
|
export interface ISchemaTableContext<T = any> {
|
|
6
8
|
checkedIndexes?: number[];
|
|
9
|
+
columnFilterMap: IColumnFilterMap;
|
|
7
10
|
columnNames: string[];
|
|
8
|
-
|
|
9
|
-
[propName: string]: IColumnConfig<T>;
|
|
10
|
-
};
|
|
11
|
-
disabledCheckedIndexes?: number[];
|
|
12
|
-
getRowClassName?: (rowData: T, dataIndex: number, filteredSortedData: IRenderData[]) => string;
|
|
13
|
-
getRowSelected?: (rowData: T, dataIndex: number) => boolean;
|
|
11
|
+
columnWidths: number[];
|
|
14
12
|
isItemLoaded: (rowIndex: number) => boolean;
|
|
15
|
-
onCheckedIndexesChange?: Dispatch<SetStateAction<number[]>>;
|
|
16
|
-
onRowClick?: (rowData: T, dataIndex: number, event: React.MouseEvent) => void;
|
|
17
|
-
onRowDoubleClick?: (rowData: T, dataIndex: number, event: React.MouseEvent) => void;
|
|
18
13
|
properties: {
|
|
19
14
|
[propertyName: string]: SchemaObject | ReferenceObject;
|
|
20
15
|
};
|
|
21
16
|
required: string[];
|
|
17
|
+
schemaTableProps: ISchemaTableProps<T>;
|
|
18
|
+
setCustomColumnNames: Dispatch<SetStateAction<string[] | undefined>>;
|
|
19
|
+
setCustomColumnWidths: Dispatch<SetStateAction<number[] | undefined>>;
|
|
20
|
+
setMenuConfig: React.Dispatch<React.SetStateAction<IThMenuConfig<T> | undefined>>;
|
|
21
|
+
setSortAsc: React.Dispatch<React.SetStateAction<boolean>>;
|
|
22
|
+
setSortColumn: React.Dispatch<React.SetStateAction<string>>;
|
|
23
|
+
sortAsc?: boolean;
|
|
24
|
+
sortColumn?: string;
|
|
22
25
|
sortedRenderData?: IRenderData[];
|
|
23
26
|
sourceData?: T[] | null;
|
|
24
|
-
translate: (key: string, ...args: Array<string | number>) => string;
|
|
25
27
|
}
|
|
26
28
|
export declare const SchemaTableContext: React.Context<ISchemaTableContext<any>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as $t, l as Ve } from "./index-
|
|
1
|
+
import { c as $t, l as Ve } from "./index-C4n9c7D7.js";
|
|
2
2
|
function Fe(ye) {
|
|
3
3
|
throw new Error('Could not dynamically require "' + ye + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
4
4
|
}
|