es-grid-template 1.8.95 → 1.8.96
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.
|
@@ -162,7 +162,7 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
|
|
|
162
162
|
type?: IColumnType;
|
|
163
163
|
haveSum?: boolean;
|
|
164
164
|
isSummary?: boolean;
|
|
165
|
-
summaryTemplate?: (data: number, key: string) => import("react").
|
|
165
|
+
summaryTemplate?: (data: number, key: string) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
166
166
|
format?: IFormat | ((rowData: any) => IFormat);
|
|
167
167
|
allowFiltering?: boolean;
|
|
168
168
|
sorter?: boolean;
|
|
@@ -177,18 +177,18 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
|
|
|
177
177
|
headerText?: string;
|
|
178
178
|
hidden?: boolean;
|
|
179
179
|
visible?: boolean;
|
|
180
|
-
headerTooltip?: string | boolean | (() => import("react").
|
|
180
|
+
headerTooltip?: string | boolean | (() => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
|
|
181
181
|
columnGroupText?: string;
|
|
182
182
|
align?: import("./../../grid-component/type").ITextAlign;
|
|
183
183
|
textAlign?: import("./../../grid-component/type").ITextAlign;
|
|
184
184
|
headerTextAlign?: import("./../../grid-component/type").ITextAlign;
|
|
185
|
-
template?: import("react").
|
|
185
|
+
template?: import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | ((args: import("./../../grid-component/type").ColumnTemplate<RecordType>) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
|
|
186
186
|
showTooltip?: boolean;
|
|
187
187
|
tooltipDescription?: string | ((args: {
|
|
188
188
|
value: any;
|
|
189
189
|
rowData: RecordType;
|
|
190
|
-
}) => import("react").
|
|
191
|
-
headerTemplate?: import("react").
|
|
190
|
+
}) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
|
|
191
|
+
headerTemplate?: import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | ((column: ColumnTable<RecordType>) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
|
|
192
192
|
commandItems?: import("./../../grid-component/type").CommandItem[];
|
|
193
193
|
children?: ColumnTable<RecordType>[];
|
|
194
194
|
editType?: EditType | ((rowData?: RecordType) => EditType);
|
|
@@ -208,9 +208,9 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
|
|
|
208
208
|
ellipsis?: boolean;
|
|
209
209
|
allowResizing?: boolean;
|
|
210
210
|
allowSelection?: boolean | ((rowData: RecordType) => boolean);
|
|
211
|
-
onCellStyles?: Omit<CSSProperties, "
|
|
212
|
-
onCellHeaderStyles?: Omit<CSSProperties, "
|
|
213
|
-
onCellFooterStyles?: Omit<CSSProperties, "
|
|
211
|
+
onCellStyles?: Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width">);
|
|
212
|
+
onCellHeaderStyles?: Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width">);
|
|
213
|
+
onCellFooterStyles?: Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width"> | ((cellValue: any, cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width">);
|
|
214
214
|
sumGroup?: boolean;
|
|
215
215
|
getValue?: (row: any, rowIndex: number) => any;
|
|
216
216
|
getCellProps?: (value: any, row: any, rowIndex: number) => import("./../../grid-component/type").CellProps;
|
|
@@ -76,14 +76,15 @@ const TableBodyRow = ({
|
|
|
76
76
|
});
|
|
77
77
|
},
|
|
78
78
|
onContextMenu: e => {
|
|
79
|
-
if (contextMenuItems && contextMenuItems.length) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
79
|
+
// if (contextMenuItems && contextMenuItems.length) {
|
|
80
|
+
|
|
81
|
+
const cell = e.target.closest('[data-col-key]');
|
|
82
|
+
const colKey = cell?.getAttribute('data-col-key');
|
|
83
|
+
onContextMenu?.({
|
|
84
|
+
rowData: row.original,
|
|
85
|
+
field: colKey
|
|
86
|
+
})(e);
|
|
87
|
+
// }
|
|
87
88
|
}
|
|
88
89
|
}, fixedLeftColumns.length > 0 ? fixedLeftColumns.map(column => {
|
|
89
90
|
const cell = row.getVisibleCells().find(c => c.column.id === column.id);
|
|
@@ -153,24 +153,6 @@ const TableWrapper = props => {
|
|
|
153
153
|
y
|
|
154
154
|
}));
|
|
155
155
|
}, 100);
|
|
156
|
-
|
|
157
|
-
// if (!menuVisible) {
|
|
158
|
-
|
|
159
|
-
// document.addEventListener(`click`, function onClickOutside(e) {
|
|
160
|
-
// const element: any = e.target
|
|
161
|
-
// const menuContainer = document.querySelector('.popup-context-menu')
|
|
162
|
-
|
|
163
|
-
// const isInsideContainer = element.closest('.popup-context-menu') && menuContainer
|
|
164
|
-
|
|
165
|
-
// if (isInsideContainer) {
|
|
166
|
-
// return
|
|
167
|
-
// }
|
|
168
|
-
// setMenuVisible(false)
|
|
169
|
-
// setPosition(prevState => ({ ...prevState, x: undefined, y: undefined }))
|
|
170
|
-
// document.removeEventListener(`click`, onClickOutside)
|
|
171
|
-
// })
|
|
172
|
-
|
|
173
|
-
// }
|
|
174
156
|
};
|
|
175
157
|
React.useEffect(() => {
|
|
176
158
|
const handleClickOutside = event => {
|
|
@@ -83,14 +83,15 @@ const TableBodyRow = ({
|
|
|
83
83
|
});
|
|
84
84
|
},
|
|
85
85
|
onContextMenu: e => {
|
|
86
|
-
if (contextMenuItems && contextMenuItems.length) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
86
|
+
// if (contextMenuItems && contextMenuItems.length) {
|
|
87
|
+
|
|
88
|
+
const cell = e.target.closest('[data-col-key]');
|
|
89
|
+
const colKey = cell?.getAttribute('data-col-key');
|
|
90
|
+
onContextMenu?.({
|
|
91
|
+
rowData: row.original,
|
|
92
|
+
field: colKey
|
|
93
|
+
})(e);
|
|
94
|
+
// }
|
|
94
95
|
}
|
|
95
96
|
}, fixedLeftColumns.length > 0 ? fixedLeftColumns.map(column => {
|
|
96
97
|
const cell = row.getVisibleCells().find(c => c.column.id === column.id);
|
|
@@ -162,24 +162,6 @@ const TableWrapper = props => {
|
|
|
162
162
|
y
|
|
163
163
|
}));
|
|
164
164
|
}, 100);
|
|
165
|
-
|
|
166
|
-
// if (!menuVisible) {
|
|
167
|
-
|
|
168
|
-
// document.addEventListener(`click`, function onClickOutside(e) {
|
|
169
|
-
// const element: any = e.target
|
|
170
|
-
// const menuContainer = document.querySelector('.popup-context-menu')
|
|
171
|
-
|
|
172
|
-
// const isInsideContainer = element.closest('.popup-context-menu') && menuContainer
|
|
173
|
-
|
|
174
|
-
// if (isInsideContainer) {
|
|
175
|
-
// return
|
|
176
|
-
// }
|
|
177
|
-
// setMenuVisible(false)
|
|
178
|
-
// setPosition(prevState => ({ ...prevState, x: undefined, y: undefined }))
|
|
179
|
-
// document.removeEventListener(`click`, onClickOutside)
|
|
180
|
-
// })
|
|
181
|
-
|
|
182
|
-
// }
|
|
183
165
|
};
|
|
184
166
|
_react.default.useEffect(() => {
|
|
185
167
|
const handleClickOutside = event => {
|