@topconsultnpm/sdkui-react-beta 6.16.69 → 6.16.71
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/lib/components/base/TMDataGrid.d.ts +2 -0
- package/lib/components/base/TMDataGrid.js +12 -3
- package/lib/components/base/TMDataGridExportForm.js +1 -1
- package/lib/components/base/TMFloatingToolbar.js +2 -0
- package/lib/components/base/TMPopUp.d.ts +2 -1
- package/lib/components/base/TMPopUp.js +19 -4
- package/lib/components/features/search/TMSearchResult.js +56 -15
- package/lib/components/features/search/TMSearchResultsMenuItems.js +2 -2
- package/lib/components/grids/TMBlogs.js +44 -44
- package/lib/helper/SDKUI_Localizator.d.ts +2 -0
- package/lib/helper/SDKUI_Localizator.js +20 -0
- package/lib/ts/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -49,6 +49,8 @@ export interface TMDataGridProps<T> extends IDataGridOptions {
|
|
|
49
49
|
counterConfig?: ITMCounterContainerProps;
|
|
50
50
|
/** Master Detail */
|
|
51
51
|
masterDetail?: IMasterDetailProps;
|
|
52
|
+
/** On Has Filters Change */
|
|
53
|
+
onHasFiltersChange?: (hasFilters: boolean) => void;
|
|
52
54
|
}
|
|
53
55
|
declare const TMDataGrid: React.ForwardRefExoticComponent<TMDataGridProps<unknown> & React.RefAttributes<dxDataGrid<any, any>>>;
|
|
54
56
|
export default TMDataGrid;
|
|
@@ -16,7 +16,7 @@ const TMDataGrid = React.forwardRef((props, ref) => {
|
|
|
16
16
|
// main properties
|
|
17
17
|
keyExpr = 'id', dataSource, focusedRowEnabled = true, hoverStateEnabled = true, focusedRowKey, selectedRowKeys = [],
|
|
18
18
|
// custom options
|
|
19
|
-
dataColumns = [], pageSize = TMDataGridPageSize.Large, showHeaderFilter = true, showFilterPanel =
|
|
19
|
+
dataColumns = [], pageSize = TMDataGridPageSize.Large, showHeaderFilter = true, showFilterPanel = true, showLoadPanel = true, showSearchPanel = true, searchPanelToolbarPosition = 'before', searchPanelFocusStarting = false, counterConfig = { show: false, items: new Map() }, onHasFiltersChange,
|
|
20
20
|
// events and callbacks
|
|
21
21
|
onSelectionChanged, onFocusedRowChanged, onRowDblClick, onRowClick, onCellClick, onCellDblClick, onOptionChanged, onContentReady, onContextMenuPreparing, onInitialized, onEditorPreparing, onCellPrepared, onRowPrepared, onRowUpdating, onRowExpanded, onRowCollapsed, onRowUpdated, onSaved, onEditCanceled, onEditingStart, onEditingChange, customizeColumns, onKeyDown, scrolling = { mode: 'standard', useNative: SDKUI_Globals.userSettings?.themeSettings.gridSettings.useNativeScrollbar === 1 }, paging = { enabled: true, pageSize: pageSize }, pager = { visible: true, showInfo: true, showNavigationButtons: true }, selection = { mode: 'multiple', showCheckBoxesMode: "always", selectAllMode: "allPages" }, sorting, summary, stateStoring, columnChooser, grouping, groupPanel, filterRow, headerFilter, editing, rowDragging, masterDetail,
|
|
22
22
|
// other properties
|
|
@@ -28,6 +28,7 @@ const TMDataGrid = React.forwardRef((props, ref) => {
|
|
|
28
28
|
const [counterValues, setCounterValues] = useState(new Map());
|
|
29
29
|
const [totalRecordCount, setTotalRecordCount] = useState(0);
|
|
30
30
|
const [visibleItemsCount, setVisibleItemsCount] = useState(0);
|
|
31
|
+
const [hasFilters, setHasFilters] = useState(false);
|
|
31
32
|
useEffect(() => {
|
|
32
33
|
const count = getRecordCount(dataSource);
|
|
33
34
|
setTotalRecordCount(count);
|
|
@@ -182,11 +183,19 @@ const TMDataGrid = React.forwardRef((props, ref) => {
|
|
|
182
183
|
}, 100);
|
|
183
184
|
}
|
|
184
185
|
}, [onContentReady]);
|
|
185
|
-
|
|
186
|
+
const onOptionChangedCallback = useCallback((e) => {
|
|
187
|
+
if (showFilterPanel && e.fullName === 'filterValue' || e.fullName?.startsWith('columns') && e.fullName.endsWith('filterValues')) {
|
|
188
|
+
const newHasFilters = Array.isArray(e.value) ? e.value.length > 0 : !!e.value;
|
|
189
|
+
setHasFilters(newHasFilters);
|
|
190
|
+
onHasFiltersChange?.(newHasFilters);
|
|
191
|
+
}
|
|
192
|
+
onOptionChanged?.(e);
|
|
193
|
+
}, [onOptionChanged]);
|
|
194
|
+
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 ${hasFilters ? 'has-filters' : ''}`,
|
|
186
195
|
// main properties
|
|
187
196
|
keyExpr: keyExpr, dataSource: dataSource, selectedRowKeys: selectedRowKeys, focusedRowEnabled: focusedRowEnabled, hoverStateEnabled: hoverStateEnabled,
|
|
188
197
|
// events and callbacks
|
|
189
|
-
onSelectionChanged: onSelectionChangedCallback, onRowDblClick: onRowDblClickCallback, onRowPrepared: onRowPrepared, onContextMenuPreparing: onContextMenuPreparingCallback, onToolbarPreparing: onToolbarPreparingCallback, onFocusedRowChanged: onFocusedRowChanged, onRowClick: onRowClick, onCellClick: onCellClick, onCellDblClick: onCellDblClick, onOptionChanged:
|
|
198
|
+
onSelectionChanged: onSelectionChangedCallback, onRowDblClick: onRowDblClickCallback, onRowPrepared: onRowPrepared, onContextMenuPreparing: onContextMenuPreparingCallback, onToolbarPreparing: onToolbarPreparingCallback, onFocusedRowChanged: onFocusedRowChanged, onRowClick: onRowClick, onCellClick: onCellClick, onCellDblClick: onCellDblClick, onOptionChanged: onOptionChangedCallback, onContentReady: onContentReadyCallback, 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,
|
|
190
199
|
// other properties
|
|
191
200
|
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,
|
|
192
201
|
// styles
|
|
@@ -68,7 +68,7 @@ const TMDataGridExportForm = (props) => {
|
|
|
68
68
|
// Create a Set from selectedRowKeys for efficient lookup
|
|
69
69
|
const selectedSet = new Set(selectedRowKeys);
|
|
70
70
|
// If exporting only selected rows, filter the dataSource accordingly; otherwise use the full dataSource
|
|
71
|
-
const rowsToExport = exportSelectedOnly ? dataSource.filter((
|
|
71
|
+
const rowsToExport = exportSelectedOnly ? dataSource.filter((item) => selectedSet.has(item.rowIndex)) : dataSource;
|
|
72
72
|
// Filter columns to only those that are visible; optionally hide 'object' data types based on the `hideSelection` flag
|
|
73
73
|
let visibleColumns = dataColumns.filter(col => {
|
|
74
74
|
if (!exportSelectedFormatColumns) {
|
|
@@ -64,6 +64,8 @@ const TMFloatingToolbar = ({ children, backgroundColor, initialLeft, initialTop
|
|
|
64
64
|
isClicked.current = true;
|
|
65
65
|
coords.current.startX = e.clientX;
|
|
66
66
|
coords.current.startY = e.clientY;
|
|
67
|
+
coords.current.lastX = box.offsetLeft;
|
|
68
|
+
coords.current.lastY = box.offsetTop;
|
|
67
69
|
};
|
|
68
70
|
const onMouseUp = (e) => {
|
|
69
71
|
isClicked.current = false;
|
|
@@ -15,6 +15,7 @@ interface ITMMessageBox extends ITMPopup {
|
|
|
15
15
|
onButtonClick?: (e: ButtonNames) => void;
|
|
16
16
|
parentId?: string;
|
|
17
17
|
onClose?: () => void;
|
|
18
|
+
confirmOnEnter?: boolean;
|
|
18
19
|
}
|
|
19
20
|
interface ITMExceptionBox extends ITMPopup {
|
|
20
21
|
exception?: any;
|
|
@@ -23,6 +24,6 @@ declare class TMExceptionBoxManager {
|
|
|
23
24
|
static show({ title, exception }: ITMExceptionBox): void;
|
|
24
25
|
}
|
|
25
26
|
declare class TMMessageBoxManager {
|
|
26
|
-
static show({ title, buttons, onButtonClick, message, parentId, resizable, onClose }: ITMMessageBox): void;
|
|
27
|
+
static show({ title, buttons, onButtonClick, message, parentId, resizable, onClose, confirmOnEnter }: ITMMessageBox): void;
|
|
27
28
|
}
|
|
28
29
|
export { TMExceptionBoxManager, TMMessageBoxManager };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import TMButton from './TMButton';
|
|
4
4
|
import { SDKUI_Localizator, calcResponsiveSizes, getExceptionMessage } from '../../helper';
|
|
5
5
|
import styled from 'styled-components';
|
|
@@ -174,7 +174,7 @@ const ResponsiveButton = styled(TMButton) `
|
|
|
174
174
|
const ResponsiveMessageBody = ({ message, isMobile, MessageToolbar }) => {
|
|
175
175
|
return (_jsxs(ResponsiveMessageContainer, { children: [_jsxs(ResponsiveMessageContent, { "$isMobile": isMobile, children: [_jsx(ResponsiveToppyImage, { "$isMobile": isMobile, src: toppy, alt: "Toppy" }), _jsx(ResponsiveMessageText, { "$isMobile": isMobile, children: typeof message === 'string' ? _jsx(Message, { msg: message }) : message })] }), _jsx(MessageToolbar, {})] }));
|
|
176
176
|
};
|
|
177
|
-
const TMMessageBox = ({ resizable = false, onButtonClick, title = 'TopMedia', message = '', buttons, onClose }) => {
|
|
177
|
+
const TMMessageBox = ({ resizable = false, onButtonClick, title = 'TopMedia', message = '', buttons, onClose, confirmOnEnter = false }) => {
|
|
178
178
|
let deviceType = useDeviceType();
|
|
179
179
|
const isMobile = useMemo(() => { return deviceType === DeviceType.MOBILE; }, [deviceType]);
|
|
180
180
|
const [initialWidth, setInitialWidth] = useState('clamp(100px, 90vw, 400px)');
|
|
@@ -190,6 +190,21 @@ const TMMessageBox = ({ resizable = false, onButtonClick, title = 'TopMedia', me
|
|
|
190
190
|
setBtns(arr);
|
|
191
191
|
}
|
|
192
192
|
}, [buttons]);
|
|
193
|
+
const handleKeyDown = useCallback((e) => {
|
|
194
|
+
if (confirmOnEnter && e.key === 'Enter') {
|
|
195
|
+
e.preventDefault();
|
|
196
|
+
if (btns.includes(ButtonNames.YES)) {
|
|
197
|
+
onButtonClick?.(ButtonNames.YES);
|
|
198
|
+
setIsVisible(false);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}, [confirmOnEnter, btns, onButtonClick]);
|
|
202
|
+
useEffect(() => {
|
|
203
|
+
if (!confirmOnEnter)
|
|
204
|
+
return;
|
|
205
|
+
window.addEventListener('keydown', handleKeyDown);
|
|
206
|
+
return () => window.removeEventListener('keydown', handleKeyDown);
|
|
207
|
+
}, [confirmOnEnter, handleKeyDown]);
|
|
193
208
|
const MessageToolbar = () => {
|
|
194
209
|
return (_jsxs(StyledMessageToolbar, { children: [(btns.includes(ButtonNames.OK) || btns.includes(ButtonNames.YES)) &&
|
|
195
210
|
_jsx(ResponsiveButton, { fontSize: 'clamp(12px, 2vw, 1.1rem)', color: 'primaryOutline', btnStyle: 'text', onClick: () => {
|
|
@@ -245,7 +260,7 @@ class TMExceptionBoxManager {
|
|
|
245
260
|
}
|
|
246
261
|
}
|
|
247
262
|
class TMMessageBoxManager {
|
|
248
|
-
static show({ title, buttons, onButtonClick, message, parentId, resizable, onClose }) {
|
|
263
|
+
static show({ title, buttons, onButtonClick, message, parentId, resizable, onClose, confirmOnEnter = false }) {
|
|
249
264
|
let container = document.createElement('div');
|
|
250
265
|
if (parentId) {
|
|
251
266
|
const parent = document.getElementById(parentId);
|
|
@@ -260,7 +275,7 @@ class TMMessageBoxManager {
|
|
|
260
275
|
document.body.appendChild(container);
|
|
261
276
|
}
|
|
262
277
|
const root = ReactDOM.createRoot(container);
|
|
263
|
-
root.render(_jsx(TMDeviceProvider, { children: React.createElement(TMMessageBox, { title, buttons, onButtonClick, message, resizable, onClose }) }));
|
|
278
|
+
root.render(_jsx(TMDeviceProvider, { children: React.createElement(TMMessageBox, { title, buttons, onButtonClick, message, resizable, onClose, confirmOnEnter }) }));
|
|
264
279
|
}
|
|
265
280
|
}
|
|
266
281
|
export { TMExceptionBoxManager, TMMessageBoxManager };
|
|
@@ -37,6 +37,7 @@ import TMAccordion from '../../base/TMAccordion';
|
|
|
37
37
|
import TMDataGridExportForm from '../../base/TMDataGridExportForm';
|
|
38
38
|
import TMSearchResultFloatingActionButton from './TMSearchResultFloatingActionButton';
|
|
39
39
|
import ShowAlert from '../../base/TMAlert';
|
|
40
|
+
import TMSpinner from '../../base/TMSpinner';
|
|
40
41
|
//#region Helper Methods
|
|
41
42
|
export const getSearchResultCountersSingleCategory = (searchResults) => {
|
|
42
43
|
// let totDcmtTypes = searchResults.length;
|
|
@@ -483,7 +484,6 @@ export default TMSearchResult;
|
|
|
483
484
|
const renderDcmtIcon = (cellData, onDownloadDcmtsAsync, openInOffice) => _jsx(TMDcmtIcon, { tid: cellData.data.TID, did: cellData.data.DID, fileExtension: cellData.data.FILEEXT, fileCount: cellData.data.FILECOUNT, isLexProt: cellData.data.IsLexProt, isMail: cellData.data.ISMAIL, isShared: cellData.data.ISSHARED, isSigned: cellData.data.ISSIGNED, downloadMode: 'openInNewWindow', onDownloadDcmtsAsync: onDownloadDcmtsAsync, openInOffice: openInOffice });
|
|
484
485
|
const TMSearchResultGrid = ({ openInOffice, inputFocusedItem, showSearch, allowMultipleSelection = true, showExportForm = false, onCloseExportForm, onFocusedItemChanged, onDownloadDcmtsAsync, onVisibleItemChanged, inputSelectedItems = [], lastUpdateSearchTime, searchResult, onContextMenuPreparing, onSelectionChanged, onDblClick }) => {
|
|
485
486
|
const [dataSource, setDataSource] = useState();
|
|
486
|
-
const [showFilterPanel, setShowFilterPanel] = useState(false);
|
|
487
487
|
const [columns, setColumns] = useState([]);
|
|
488
488
|
// State to store selected row keys
|
|
489
489
|
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
|
@@ -501,14 +501,62 @@ const TMSearchResultGrid = ({ openInOffice, inputFocusedItem, showSearch, allowM
|
|
|
501
501
|
setSelectedRowKeys(inputSelectedItemsRowIndex);
|
|
502
502
|
}, [inputSelectedItems]);
|
|
503
503
|
const onKeyDown = useCallback((e) => {
|
|
504
|
-
if
|
|
505
|
-
|
|
504
|
+
// Check if the pressed key is the "Delete" key.
|
|
505
|
+
if (e.event?.key === 'Delete' && !showExportForm) {
|
|
506
|
+
// Get the selected or focused documents/items from the grid.
|
|
507
|
+
const dcmts = getSelectedDcmtsOrFocused(inputSelectedItems, inputFocusedItem);
|
|
508
|
+
// If there are no selected or focused items, do nothing.
|
|
509
|
+
if (dcmts === undefined || dcmts.length === 0)
|
|
506
510
|
return;
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
511
|
+
// --- CASE 1: Only one item selected ---
|
|
512
|
+
if (dcmts.length === 1) {
|
|
513
|
+
const current = dcmts[0];
|
|
514
|
+
// If the selected item has a row index (valid entry)
|
|
515
|
+
if (current.rowIndex !== undefined) {
|
|
516
|
+
TMSpinner.show({ description: SDKUI_Localizator.RemovingFromList });
|
|
517
|
+
const currentDataSource = dataSource ?? [];
|
|
518
|
+
setTimeout(() => {
|
|
519
|
+
// Remove the selected item from the data source by filtering it out.
|
|
520
|
+
setDataSource(currentDataSource.filter((data) => data.rowIndex !== current.rowIndex));
|
|
521
|
+
// Clear any selection, focused item, and update callbacks.
|
|
522
|
+
onSelectionChanged?.([]);
|
|
523
|
+
setSelectedRowKeys([]);
|
|
524
|
+
onFocusedItemChanged?.(undefined);
|
|
525
|
+
setFocusedItem(undefined);
|
|
526
|
+
TMSpinner.hide();
|
|
527
|
+
}, 500);
|
|
528
|
+
}
|
|
529
|
+
return;
|
|
530
|
+
}
|
|
531
|
+
// --- CASE 2: Multiple items selected ---
|
|
532
|
+
if (dcmts.length > 1) {
|
|
533
|
+
// Show a confirmation message box before deleting multiple items.
|
|
534
|
+
TMMessageBoxManager.show({
|
|
535
|
+
buttons: [ButtonNames.YES, ButtonNames.NO],
|
|
536
|
+
title: SDKUI_Localizator.RemoveFromList,
|
|
537
|
+
message: `${SDKUI_Localizator.ConfirmSelectedDocumentsMessage.replaceParams(dcmts.length)}`,
|
|
538
|
+
confirmOnEnter: true,
|
|
539
|
+
onButtonClick(e) {
|
|
540
|
+
// Only proceed if user clicks "YES"
|
|
541
|
+
if (e !== ButtonNames.YES)
|
|
542
|
+
return;
|
|
543
|
+
TMSpinner.show({ description: SDKUI_Localizator.RemovingFromList });
|
|
544
|
+
const currentDataSource = dataSource ?? [];
|
|
545
|
+
setTimeout(() => {
|
|
546
|
+
// Remove all selected items from the data source.
|
|
547
|
+
setDataSource(currentDataSource.filter((data) => !dcmts.some((d) => d.rowIndex === data.rowIndex)));
|
|
548
|
+
// Clear selections and focus after deletion.
|
|
549
|
+
onSelectionChanged?.([]);
|
|
550
|
+
setSelectedRowKeys([]);
|
|
551
|
+
onFocusedItemChanged?.(undefined);
|
|
552
|
+
setFocusedItem(undefined);
|
|
553
|
+
TMSpinner.hide();
|
|
554
|
+
}, 500);
|
|
555
|
+
},
|
|
556
|
+
});
|
|
557
|
+
}
|
|
510
558
|
}
|
|
511
|
-
}, [
|
|
559
|
+
}, [inputSelectedItems, inputFocusedItem, dataSource]);
|
|
512
560
|
const cellRender = useCallback((cellData, dataDomain, dataListID, dataListViewMode) => {
|
|
513
561
|
if (!cellData || cellData.value === undefined)
|
|
514
562
|
return null;
|
|
@@ -652,14 +700,7 @@ const TMSearchResultGrid = ({ openInOffice, inputFocusedItem, showSearch, allowM
|
|
|
652
700
|
setVisibleItems(visibleRows.map((row) => { return row.data; }));
|
|
653
701
|
}, []);
|
|
654
702
|
useEffect(() => { onVisibleItemChanged?.(visibleItems); }, [visibleItems]);
|
|
655
|
-
|
|
656
|
-
if (e === undefined)
|
|
657
|
-
return;
|
|
658
|
-
if (e.fullName === "filterValue") {
|
|
659
|
-
setShowFilterPanel(!!e.value);
|
|
660
|
-
}
|
|
661
|
-
}, []);
|
|
662
|
-
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: showSearch, 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 })] });
|
|
703
|
+
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: showSearch, showFilterPanel: true, sorting: { mode: "multiple" }, selection: { mode: allowMultipleSelection ? 'multiple' : 'single' }, pageSize: TMDataGridPageSize.Small, onSelectionChanged: handleSelectionChange, onFocusedRowChanged: handleFocusedRowChange, onRowDblClick: onRowDblClick, onContentReady: onContentReady, onContextMenuPreparing: onContextMenuPreparing, onKeyDown: onKeyDown, counterConfig: { show: true } }), (showExportForm && searchResult && onCloseExportForm) && _jsx(TMDataGridExportForm, { dataColumns: dataColumns, dataSource: dataSource, selectedRowKeys: selectedRowKeys, onCloseExportForm: onCloseExportForm, searchResult: searchResult })] });
|
|
663
704
|
};
|
|
664
705
|
//#region TMSearchResultSelector
|
|
665
706
|
const StyledItemTemplate = styled.div `
|
|
@@ -17,10 +17,10 @@ export const getSelectedDcmtsOrFocused = (selectedItems, focusedItem, fileFormat
|
|
|
17
17
|
if (selectedItems.length <= 0 && !focusedItem)
|
|
18
18
|
return [];
|
|
19
19
|
if (selectedItems.length > 0) {
|
|
20
|
-
return selectedItems.map((item) => { return { TID: item.TID, DID: item.DID, FILEEXT: item.FILEEXT, fileFormat: fileFormat }; });
|
|
20
|
+
return selectedItems.map((item) => { return { TID: item.TID, DID: item.DID, FILEEXT: item.FILEEXT, fileFormat: fileFormat, rowIndex: item.rowIndex }; });
|
|
21
21
|
}
|
|
22
22
|
else if (focusedItem !== undefined) {
|
|
23
|
-
return [{ TID: focusedItem.TID, DID: focusedItem.DID, FILEEXT: focusedItem.FILEEXT, fileFormat: fileFormat }];
|
|
23
|
+
return [{ TID: focusedItem.TID, DID: focusedItem.DID, FILEEXT: focusedItem.FILEEXT, fileFormat: fileFormat, rowIndex: focusedItem.rowIndex }];
|
|
24
24
|
}
|
|
25
25
|
return [];
|
|
26
26
|
};
|
|
@@ -621,49 +621,49 @@ const TMBlogs = (props) => {
|
|
|
621
621
|
setShowDcmtForm(false);
|
|
622
622
|
handleFocusedAttachment(undefined);
|
|
623
623
|
}, []);
|
|
624
|
-
return
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
624
|
+
return _jsxs("div", { style: { height: height ?? '100%', width: width ?? '100%' }, children: [_jsxs(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: localShowWaitPanel, showWaitPanelPrimary: localShowPrimary, waitPanelTitle: localWaitPanelTitle, waitPanelTextPrimary: localWaitPanelTextPrimary, waitPanelValuePrimary: localWaitPanelValuePrimary, waitPanelMaxValuePrimary: localWaitPanelMaxValuePrimary, isCancelable: true, abortController: localAbortController, children: [(currentHeader && !isHeaderHidden) && (_jsx("div", { style: { display: 'block', width: '100%', overflowX: 'auto', overflowY: 'hidden', whiteSpace: 'nowrap' }, onContextMenu: e => e.preventDefault(), children: _jsx(ScrollView, { width: "100%", height: "auto", direction: "horizontal", useNative: true, children: _jsxs("div", { style: {
|
|
625
|
+
display: 'flex',
|
|
626
|
+
flexDirection: 'row',
|
|
627
|
+
gap: '8px',
|
|
628
|
+
alignItems: 'center',
|
|
629
|
+
minWidth: 'max-content',
|
|
630
|
+
padding: '10px 0',
|
|
631
|
+
}, children: [currentHeader.showSearchBar && (_jsx("div", { style: {
|
|
632
|
+
minWidth: isMobile ? '120px' : '160px',
|
|
633
|
+
maxWidth: isMobile ? '120px' : '200px',
|
|
634
|
+
marginLeft: "10px"
|
|
635
|
+
}, children: _jsx(TMSearchBar, { marginLeft: "0px", maxWidth: "100%", searchValue: searchText, onSearchValueChanged: (e) => handleSearchChange(e) }) })), currentHeader.showPostsDropDown && (_jsx("div", { style: {
|
|
636
|
+
minWidth: isMobile ? '90px' : '120px',
|
|
637
|
+
maxWidth: isMobile ? '90px' : '200px',
|
|
638
|
+
}, children: _jsx(TMDropDown, { value: postsToShow, dataSource: postsToShowDataSource, onValueChanged: handleFilterChange }) })), currentHeader.showFilters && (_jsx(TMTreeDropDown, { dataSource: treeDataSource, values: appliedGlobalFilters, setValues: setAppliedGlobalFilters, displayExpr: false, isValidKey: () => true, elementStyle: {
|
|
639
|
+
minWidth: isMobile ? '90px' : '120px',
|
|
640
|
+
width: isMobile ? '90px' : '150px',
|
|
641
|
+
height: '29px',
|
|
642
|
+
} }))] }) }) })), _jsxs("div", { style: { height: `calc(100% - ${currentHeader && !isHeaderHidden ? '50px' : '0px'})`, width: "100%", overflow: 'auto', display: 'block' }, onContextMenu: onBackgroundContextMenu, children: [_jsx("div", { style: { width: "100%", height: "100%" }, children: ThumbnailView() }), anchorEl && _jsx(ContextMenu, { ref: contextMenuRef, dataSource: contextMenuItems, target: anchorEl, onHiding: closeContextMenu })] }), (showDcmtForm && focusedAttachment && focusedAttachment.TID && focusedAttachment.DID) && _jsx(TMDcmtForm, { TID: Number(focusedAttachment.TID), DID: Number(focusedAttachment.DID), layoutMode: LayoutModes.Update, onClose: onCloseDcmtForm, isClosable: true, titleModal: SDKUI_Localizator.Attachment + ": " + focusedAttachment.fileName, isModal: true, widthModal: "95%", heightModal: "95%" })] }), (showFloatingCommentButton && showCommentFormCallback && !(context?.engine === 'WorkingGroupEngine' && context?.object?.customData1 === 1)) && _jsx("button", { style: {
|
|
643
|
+
position: 'absolute',
|
|
644
|
+
bottom: '18px',
|
|
645
|
+
right: '20px',
|
|
646
|
+
width: '40px',
|
|
647
|
+
height: '40px',
|
|
648
|
+
borderRadius: "50%",
|
|
649
|
+
backgroundColor: "#C2388B",
|
|
650
|
+
color: '#fff',
|
|
651
|
+
border: 'none',
|
|
652
|
+
cursor: 'pointer',
|
|
653
|
+
boxShadow: '0 2px 6px rgba(0,0,0,0.2)',
|
|
654
|
+
zIndex: 1000,
|
|
655
|
+
transition: 'background-color 0.3s ease, transform 0.2s ease',
|
|
656
|
+
display: 'flex',
|
|
657
|
+
justifyContent: 'center',
|
|
658
|
+
alignItems: 'center',
|
|
659
|
+
}, onMouseEnter: (e) => {
|
|
660
|
+
e.currentTarget.style.backgroundColor = '#D94A9F';
|
|
661
|
+
e.currentTarget.style.transform = 'scale(1.1)';
|
|
662
|
+
e.currentTarget.style.boxShadow = '0 4px 12px rgba(37, 89, 165, 0.6)';
|
|
663
|
+
}, onMouseLeave: (e) => {
|
|
664
|
+
e.currentTarget.style.backgroundColor = "#C2388B";
|
|
665
|
+
e.currentTarget.style.transform = 'scale(1)';
|
|
666
|
+
e.currentTarget.style.boxShadow = '0 2px 6px rgba(0,0,0,0.2)';
|
|
667
|
+
}, onClick: () => { showCommentFormCallback(); }, children: _jsx(TMTooltip, { content: SDKUI_Localizator.AddNewComment, children: _jsx("i", { className: "dx-icon-chat", style: { fontSize: '25px' } }) }) })] });
|
|
668
668
|
};
|
|
669
669
|
export default TMBlogs;
|
|
@@ -403,8 +403,10 @@ export declare class SDKUI_Localizator {
|
|
|
403
403
|
static get RelationManyToMany(): "Folge viele mit vielen" | "Relation many to many" | "Correlación muchos a muchos" | "Corrélation plusieurs à plusieurs" | "Muitos para muitos relação" | "Correlazione molti a molti";
|
|
404
404
|
static get RelationType(): "Art der Beziehung" | "Relation type" | "Tipo de relación" | "Type de relation" | "Tipo de relacionamento" | "Tipo di relazione";
|
|
405
405
|
static get RemoveFromCache(): string;
|
|
406
|
+
static get RemoveFromList(): string;
|
|
406
407
|
static get RemoveFromWorkgroup(): string;
|
|
407
408
|
static get RemoveNamedPreferredCredentials(): "Möchten Sie die Anmeldedaten '{{0}}' entfernen, die als bevorzugt festgelegt wurden?" | "Do you want to remove the '{{0}}' credentials set as preferred?" | "¿Quieres eliminar las credenciales '{{0}}' configuradas como preferidas?" | "Voulez-vous supprimer les identifiants '{{0}}' définis comme préférés ?" | "Deseja remover as credenciais '{{0}}' definidas como preferidas?" | "Vuoi rimuovere le credenziali '{{0}}' impostate come preferite?";
|
|
409
|
+
static get RemovingFromList(): string;
|
|
408
410
|
static get RememberCredentials(): "Anmeldedaten merken" | "Remember credentials" | "Recordar credenciales" | "Se souvenir des identifiants" | "Lembrar credenciais" | "Ricorda credenziali";
|
|
409
411
|
static get ReopenDocument(): string;
|
|
410
412
|
static get ReplaceDocument(): "Dokument ersetzen" | "Replace Document" | "Reemplazar Documento" | "Remplacer le Document" | "Substituir Documento" | "Sostituisci Documento";
|
|
@@ -3988,6 +3988,16 @@ export class SDKUI_Localizator {
|
|
|
3988
3988
|
default: return "Rimuovi elemento dalla cache";
|
|
3989
3989
|
}
|
|
3990
3990
|
}
|
|
3991
|
+
static get RemoveFromList() {
|
|
3992
|
+
switch (this._cultureID) {
|
|
3993
|
+
case CultureIDs.De_DE: return "Aus der Liste entfernen";
|
|
3994
|
+
case CultureIDs.En_US: return "Remove from list";
|
|
3995
|
+
case CultureIDs.Es_ES: return "Eliminar de la lista";
|
|
3996
|
+
case CultureIDs.Fr_FR: return "Supprimer de la liste";
|
|
3997
|
+
case CultureIDs.Pt_PT: return "Remover da lista";
|
|
3998
|
+
default: return "Rimuovere dalla lista";
|
|
3999
|
+
}
|
|
4000
|
+
}
|
|
3991
4001
|
static get RemoveFromWorkgroup() {
|
|
3992
4002
|
switch (this._cultureID) {
|
|
3993
4003
|
case CultureIDs.De_DE: return "Aus der Arbeitsgruppe entfernen";
|
|
@@ -4014,6 +4024,16 @@ export class SDKUI_Localizator {
|
|
|
4014
4024
|
return "Vuoi rimuovere le credenziali '{{0}}' impostate come preferite?";
|
|
4015
4025
|
}
|
|
4016
4026
|
}
|
|
4027
|
+
static get RemovingFromList() {
|
|
4028
|
+
switch (this._cultureID) {
|
|
4029
|
+
case CultureIDs.De_DE: return "Wird aus der Liste entfernt";
|
|
4030
|
+
case CultureIDs.En_US: return "Removing from list";
|
|
4031
|
+
case CultureIDs.Es_ES: return "Eliminando de la lista";
|
|
4032
|
+
case CultureIDs.Fr_FR: return "Suppression de la liste en cours";
|
|
4033
|
+
case CultureIDs.Pt_PT: return "Removendo da lista";
|
|
4034
|
+
default: return "Rimozione dalla lista in corso";
|
|
4035
|
+
}
|
|
4036
|
+
}
|
|
4017
4037
|
static get RememberCredentials() {
|
|
4018
4038
|
switch (this._cultureID) {
|
|
4019
4039
|
case CultureIDs.De_DE: return "Anmeldedaten merken";
|
package/lib/ts/types.d.ts
CHANGED