@topconsultnpm/sdkui-react-beta 6.15.65 → 6.15.67
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.
|
@@ -153,19 +153,17 @@ const TMDataGrid = React.forwardRef((props, ref) => {
|
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
155
|
}, [showSearchPanel, searchPanelToolbarPosition]);
|
|
156
|
-
const onContentReadyCallback = (e) => {
|
|
156
|
+
/* const onContentReadyCallback = (e: DataGridTypes.ContentReadyEvent<any, any>) => {
|
|
157
157
|
onContentReady?.(e);
|
|
158
|
-
if (!internalRef.current)
|
|
159
|
-
|
|
160
|
-
if (counterConfig.show === false || counterConfig.items === undefined)
|
|
161
|
-
return;
|
|
158
|
+
if (!internalRef.current) return;
|
|
159
|
+
if(counterConfig.show === false || counterConfig.items === undefined) return;
|
|
162
160
|
setRecordCount(internalRef.current.instance().getVisibleRows().length);
|
|
163
|
-
}
|
|
164
|
-
return _jsxs("div", { style: { width: "100%", height: "100%" }, children: [_jsx("div", { style: { width: "100%", height: counterConfig.show ? "calc(100% - 25px)" : "100%" }, children: _jsxs(DataGrid, { ref:
|
|
161
|
+
} */
|
|
162
|
+
return _jsxs("div", { style: { width: "100%", height: "100%" }, children: [_jsx("div", { style: { width: "100%", height: counterConfig.show ? "calc(100% - 25px)" : "100%" }, children: _jsxs(DataGrid, { ref: internalRef, id: id, className: 'tm-datagrid',
|
|
165
163
|
// main properties
|
|
166
164
|
keyExpr: keyExpr, dataSource: dataSource, selectedRowKeys: selectedRowKeys, focusedRowEnabled: focusedRowEnabled, hoverStateEnabled: hoverStateEnabled,
|
|
167
165
|
// events and callbacks
|
|
168
|
-
onSelectionChanged: onSelectionChangedCallback, onRowDblClick: onRowDblClickCallback, onRowPrepared: onRowPrepared, onContextMenuPreparing: onContextMenuPreparingCallback, onToolbarPreparing: onToolbarPreparingCallback, onFocusedRowChanged: onFocusedRowChanged, onRowClick: onRowClick, onCellClick: onCellClick, onCellDblClick: onCellDblClick, onOptionChanged: onOptionChanged, onContentReady:
|
|
166
|
+
onSelectionChanged: onSelectionChangedCallback, onRowDblClick: onRowDblClickCallback, onRowPrepared: onRowPrepared, onContextMenuPreparing: onContextMenuPreparingCallback, onToolbarPreparing: onToolbarPreparingCallback, onFocusedRowChanged: onFocusedRowChanged, onRowClick: onRowClick, onCellClick: onCellClick, onCellDblClick: onCellDblClick, onOptionChanged: onOptionChanged, onContentReady: onContentReady, onInitialized: onInitialized, customizeColumns: customizeColumns, onEditorPreparing: onEditorPreparing, onCellPrepared: onCellPrepared, onRowUpdating: onRowUpdating, onRowExpanded: onRowExpanded, onRowCollapsed: onRowCollapsed, onRowUpdated: onRowUpdated, onSaved: onSaved, onEditCanceled: onEditCanceled, onEditingStart: onEditingStart, onEditingChange: onEditingChange, onKeyDown: onKeyDown,
|
|
169
167
|
// other properties
|
|
170
168
|
disabled: disabled, autoNavigateToFocusedRow: autoNavigateToFocusedRow, focusedRowKey: focusedRowKey, columnHidingEnabled: columnHidingEnabled, columnResizingMode: columnResizingMode, columnAutoWidth: columnAutoWidth, allowColumnResizing: allowColumnResizing, allowColumnReordering: allowColumnReordering, showBorders: showBorders, showRowLines: showRowLines, showColumnLines: showColumnLines, showColumnHeaders: showColumnHeaders, rowAlternationEnabled: rowAlternationEnabled, wordWrapEnabled: wordWrapEnabled, noDataText: noDataText,
|
|
171
169
|
// styles
|
|
@@ -3,7 +3,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
3
3
|
import { SDK_Globals, DataColumnTypes, MetadataDataDomains, DataListViewModes, MetadataFormats, LayoutModes, TemplateTIDs, DcmtTypeListCacheService, AccessLevels, SystemMIDsAsNumber } from '@topconsultnpm/sdk-ts-beta';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import { getCommandsMenuItems, getSelectedDcmtsOrFocused } from './TMSearchResultsMenuItems';
|
|
6
|
-
import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, IconDetailDcmts, SDKUI_Localizator, IconDelete, IconRefresh, IconMenuVertical, IconDownload, deepCompare, getDataColumnName, searchResultDescriptorToSimpleArray, searchResultToMetadataValues, IconSearchCheck, TMCommandsContextMenu
|
|
6
|
+
import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, IconDetailDcmts, SDKUI_Localizator, IconDelete, IconRefresh, IconMenuVertical, IconDownload, deepCompare, getDataColumnName, searchResultDescriptorToSimpleArray, searchResultToMetadataValues, IconSearchCheck, TMCommandsContextMenu } from '../../../helper';
|
|
7
7
|
import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
|
|
8
8
|
import { useInputAttachmentsDialog, useInputCvtFormatDialog } from '../../../hooks/useInputDialog';
|
|
9
9
|
import { DcmtOperationTypes, FormModes, SearchResultContext, DownloadTypes } from '../../../ts';
|
|
@@ -468,12 +468,6 @@ const TMSearchResultGrid = ({ inputFocusedItem, allowMultipleSelection = true, s
|
|
|
468
468
|
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
|
469
469
|
const [focusedItem, setFocusedItem] = useState();
|
|
470
470
|
const [visibleItems, setVisibleItems] = useState([]);
|
|
471
|
-
const counterConfig = useMemo(() => ({
|
|
472
|
-
show: true,
|
|
473
|
-
items: new Map([
|
|
474
|
-
['all', { key: 'all', show: true, caption: SDKUI_Localizator.All, value: dataSource ? dataSource.length : 0, icon: _jsx(IconAll, {}), order: -1 }],
|
|
475
|
-
])
|
|
476
|
-
}), [dataSource]);
|
|
477
471
|
useEffect(() => {
|
|
478
472
|
if (deepCompare(inputFocusedItem, focusedItem))
|
|
479
473
|
return;
|
|
@@ -653,7 +647,7 @@ const TMSearchResultGrid = ({ inputFocusedItem, allowMultipleSelection = true, s
|
|
|
653
647
|
setShowFilterPanel(!!e.value);
|
|
654
648
|
}
|
|
655
649
|
}, []);
|
|
656
|
-
return _jsxs("div", { style: { width: "100%", height: "100%" }, children: [_jsx(TMDataGrid, { id: "tm-search-result", keyExpr: "rowIndex", dataColumns: dataColumns, dataSource: dataSource, repaintChangesOnly: true, selectedRowKeys: selectedRowKeys, focusedRowKey: Number(focusedItem?.rowIndex ?? 0), showSearchPanel: false, showFilterPanel: showFilterPanel, sorting: { mode: "multiple" }, selection: { mode: allowMultipleSelection ? 'multiple' : 'single' }, pageSize: TMDataGridPageSize.Small, onSelectionChanged: handleSelectionChange, onFocusedRowChanged: handleFocusedRowChange, onRowDblClick: onRowDblClick, onContentReady: onContentReady, onOptionChanged: onOptionChanged, onContextMenuPreparing: onContextMenuPreparing, onKeyDown: onKeyDown, counterConfig:
|
|
650
|
+
return _jsxs("div", { style: { width: "100%", height: "100%" }, children: [_jsx(TMDataGrid, { id: "tm-search-result", keyExpr: "rowIndex", dataColumns: dataColumns, dataSource: dataSource, repaintChangesOnly: true, selectedRowKeys: selectedRowKeys, focusedRowKey: Number(focusedItem?.rowIndex ?? 0), showSearchPanel: false, showFilterPanel: showFilterPanel, sorting: { mode: "multiple" }, selection: { mode: allowMultipleSelection ? 'multiple' : 'single' }, pageSize: TMDataGridPageSize.Small, onSelectionChanged: handleSelectionChange, onFocusedRowChanged: handleFocusedRowChange, onRowDblClick: onRowDblClick, onContentReady: onContentReady, onOptionChanged: onOptionChanged, onContextMenuPreparing: onContextMenuPreparing, onKeyDown: onKeyDown, counterConfig: { show: true } }), (showExportForm && searchResult && onCloseExportForm) && _jsx(TMDataGridExportForm, { dataColumns: dataColumns, dataSource: dataSource, selectedRowKeys: selectedRowKeys, onCloseExportForm: onCloseExportForm, searchResult: searchResult })] });
|
|
657
651
|
};
|
|
658
652
|
//#region TMSearchResultSelector
|
|
659
653
|
const StyledItemTemplate = styled.div `
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topconsultnpm/sdkui-react-beta",
|
|
3
|
-
"version": "6.15.
|
|
3
|
+
"version": "6.15.67",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"lib"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@topconsultnpm/sdk-ts-beta": "
|
|
41
|
+
"@topconsultnpm/sdk-ts-beta": "file:../tm-sdk-ts",
|
|
42
42
|
"buffer": "^6.0.3",
|
|
43
43
|
"devextreme": "24.2.6",
|
|
44
44
|
"devextreme-react": "24.2.6",
|