@topconsultnpm/sdkui-react-beta 6.16.68 → 6.16.70
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/TMFileManager.js +1 -1
- package/lib/components/base/TMFloatingToolbar.js +2 -0
- package/lib/components/features/search/TMSearchResult.js +1 -9
- package/lib/components/features/workflow/diagram/WFDiagram.d.ts +0 -1
- package/lib/components/features/workflow/diagram/WFDiagram.js +10 -36
- package/lib/components/grids/TMBlogs.js +44 -44
- 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
|
|
@@ -189,7 +189,7 @@ const TMFileManager = (props) => {
|
|
|
189
189
|
const handleDragLeave = (e) => {
|
|
190
190
|
setIsDragging(false);
|
|
191
191
|
};
|
|
192
|
-
return _jsx(TMPanel, { title: SDKUI_Localizator.Drafts, totalItems: dcmtsFound ?? 0, showHeader: showPanel, onBack: (isMobile && openDraftList) ? onBackCallback : undefined, onClose: onClosePanel, allowMaximize: !isMobile ? allowMaximize : false, onMaximize: !isMobile ? onMaximizePanel : undefined, onHeaderDoubleClick: !isMobile ? onMaximizePanel : undefined, toolbar: toolbar, children: _jsx("div", { style: { flexDirection: "column", height: "100%", width: "100%", }, children: _jsxs(TMConditionalWrapper, { condition: !isMobile, wrapper: children => _jsx("div", { style: { display: "flex", flexGrow: 1, height: "100%" }, children: _jsx(TMSplitterLayout, { direction: 'horizontal', showSeparator: true, separatorColor: 'transparent', separatorActiveColor: 'transparent', min: ['0', '0'], start: [isLeftPanelCollapsed ? '0%' : "32
|
|
192
|
+
return _jsx(TMPanel, { title: SDKUI_Localizator.Drafts, totalItems: dcmtsFound ?? 0, showHeader: showPanel, onBack: (isMobile && openDraftList) ? onBackCallback : undefined, onClose: onClosePanel, allowMaximize: !isMobile ? allowMaximize : false, onMaximize: !isMobile ? onMaximizePanel : undefined, onHeaderDoubleClick: !isMobile ? onMaximizePanel : undefined, toolbar: toolbar, children: _jsx("div", { style: { flexDirection: "column", height: "100%", width: "100%", }, children: _jsxs(TMConditionalWrapper, { condition: !isMobile, wrapper: children => _jsx("div", { style: { display: "flex", flexGrow: 1, height: "100%" }, children: _jsx(TMSplitterLayout, { direction: 'horizontal', showSeparator: true, separatorColor: 'transparent', separatorActiveColor: 'transparent', min: ['0', '0'], start: [isLeftPanelCollapsed ? '0%' : "32%", isLeftPanelCollapsed ? '100%' : "68%"], children: children }, "TMWGs-panels-treeView") }), children: [_jsxs("div", { style: {
|
|
193
193
|
height: "100%",
|
|
194
194
|
width: "100%",
|
|
195
195
|
...(isMobile && { display: openDraftList ? 'none' : 'block', transition: "opacity 0.3s ease-in-out" }),
|
|
@@ -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;
|
|
@@ -483,7 +483,6 @@ export default TMSearchResult;
|
|
|
483
483
|
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
484
|
const TMSearchResultGrid = ({ openInOffice, inputFocusedItem, showSearch, allowMultipleSelection = true, showExportForm = false, onCloseExportForm, onFocusedItemChanged, onDownloadDcmtsAsync, onVisibleItemChanged, inputSelectedItems = [], lastUpdateSearchTime, searchResult, onContextMenuPreparing, onSelectionChanged, onDblClick }) => {
|
|
485
485
|
const [dataSource, setDataSource] = useState();
|
|
486
|
-
const [showFilterPanel, setShowFilterPanel] = useState(false);
|
|
487
486
|
const [columns, setColumns] = useState([]);
|
|
488
487
|
// State to store selected row keys
|
|
489
488
|
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
|
@@ -652,14 +651,7 @@ const TMSearchResultGrid = ({ openInOffice, inputFocusedItem, showSearch, allowM
|
|
|
652
651
|
setVisibleItems(visibleRows.map((row) => { return row.data; }));
|
|
653
652
|
}, []);
|
|
654
653
|
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 })] });
|
|
654
|
+
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
655
|
};
|
|
664
656
|
//#region TMSearchResultSelector
|
|
665
657
|
const StyledItemTemplate = styled.div `
|
|
@@ -205,7 +205,7 @@ const DiagramMessage = styled.div `
|
|
|
205
205
|
color: #555;
|
|
206
206
|
text-align: center;
|
|
207
207
|
`;
|
|
208
|
-
const WFDiagram = ({ xmlDiagramString, currentSetID, readOnly = false, zoomLevel = 1, translateX = 0, translateY = 0
|
|
208
|
+
const WFDiagram = ({ xmlDiagramString, currentSetID, readOnly = false, zoomLevel = 1, translateX = 0, translateY = 0 }) => {
|
|
209
209
|
const [isLoading, setIsLoading] = useState(true);
|
|
210
210
|
const [wfDiagram, setWfDiagram] = useState(null);
|
|
211
211
|
const [selectedItems, setSelectedItems] = useState(new Set());
|
|
@@ -270,31 +270,6 @@ const WFDiagram = ({ xmlDiagramString, currentSetID, readOnly = false, zoomLevel
|
|
|
270
270
|
const totalHeight = finalMaxY - finalMinY;
|
|
271
271
|
return { svgWidth: Math.max(0, totalWidth * zoomLevel), svgHeight: Math.max(0, totalHeight * zoomLevel) };
|
|
272
272
|
}, [wfDiagram, zoomLevel]);
|
|
273
|
-
// const updateWfDiagram = useCallback((newDiagram: WfDiagram) => {
|
|
274
|
-
// if (readOnly) return;
|
|
275
|
-
// try {
|
|
276
|
-
// validateDiagram(newDiagram);
|
|
277
|
-
// setWfDiagram(newDiagram);
|
|
278
|
-
// if (!isUndoingRedoing.current) {
|
|
279
|
-
// setWfDiagramHistory(prevHistory => {
|
|
280
|
-
// const newHistory = prevHistory.slice(0, historyIndex + 1);
|
|
281
|
-
// return [...newHistory, newDiagram];
|
|
282
|
-
// });
|
|
283
|
-
// setHistoryIndex(prevIndex => prevIndex + 1);
|
|
284
|
-
// }
|
|
285
|
-
// } catch (e: any) {
|
|
286
|
-
// TMExceptionBoxManager.show({ exception: e });
|
|
287
|
-
// }
|
|
288
|
-
// }, [historyIndex, readOnly]);
|
|
289
|
-
// const updateDiagramAndHistory = useCallback((newDiagram: WfDiagram) => {
|
|
290
|
-
// if (readOnly) return;
|
|
291
|
-
// if (!isUndoingRedoing.current) {
|
|
292
|
-
// const newHistory = wfDiagramHistory.slice(0, historyIndex + 1);
|
|
293
|
-
// setWfDiagramHistory([...newHistory, newDiagram]);
|
|
294
|
-
// setHistoryIndex(newHistory.length);
|
|
295
|
-
// }
|
|
296
|
-
// setWfDiagram(newDiagram);
|
|
297
|
-
// }, [wfDiagramHistory, historyIndex, isUndoingRedoing, setWfDiagramHistory, setHistoryIndex, setWfDiagram, readOnly]);
|
|
298
273
|
const updateDiagram = useCallback((newDiagram, validate = true) => {
|
|
299
274
|
if (readOnly)
|
|
300
275
|
return;
|
|
@@ -615,6 +590,7 @@ const WFDiagram = ({ xmlDiagramString, currentSetID, readOnly = false, zoomLevel
|
|
|
615
590
|
}
|
|
616
591
|
}, []);
|
|
617
592
|
// Gestore dell'evento di selezione file (esegue il parse e chiama il genitore)
|
|
593
|
+
// Gestore dell'evento di selezione file (esegue il parse e chiama il genitore)
|
|
618
594
|
const handleFileChange = useCallback((event) => {
|
|
619
595
|
const file = event.target.files?.[0];
|
|
620
596
|
if (!file) {
|
|
@@ -624,15 +600,13 @@ const WFDiagram = ({ xmlDiagramString, currentSetID, readOnly = false, zoomLevel
|
|
|
624
600
|
reader.onload = (e) => {
|
|
625
601
|
try {
|
|
626
602
|
const xmlContent = e.target?.result;
|
|
627
|
-
// 1. Esegui il parse per
|
|
628
|
-
|
|
629
|
-
//
|
|
630
|
-
//
|
|
631
|
-
|
|
632
|
-
//
|
|
633
|
-
|
|
634
|
-
// il che farà re-renderizzare questo componente con il nuovo diagramma.
|
|
635
|
-
onDiagramImport?.(xmlContent);
|
|
603
|
+
// 1. Esegui il parse per ottenere il nuovo oggetto WfDiagram.
|
|
604
|
+
const newWfDiagram = parseWfDiagramXml(xmlContent);
|
|
605
|
+
// 2. TRATTA L'IMPORT COME UNA MODIFICA:
|
|
606
|
+
// Usa updateDiagram per aggiornare lo stato interno (wfDiagram) e la history (wfDiagramHistory).
|
|
607
|
+
// L'originale xmlDiagramString del genitore resta intatto.
|
|
608
|
+
// Passiamo false per 'validate' in quanto il file importato è già stato validato da parseWfDiagramXml.
|
|
609
|
+
updateDiagram(newWfDiagram, false);
|
|
636
610
|
// 3. Resetta l'input per permettere re-import dello stesso file
|
|
637
611
|
if (fileInputRef.current) {
|
|
638
612
|
fileInputRef.current.value = '';
|
|
@@ -649,7 +623,7 @@ const WFDiagram = ({ xmlDiagramString, currentSetID, readOnly = false, zoomLevel
|
|
|
649
623
|
}
|
|
650
624
|
};
|
|
651
625
|
reader.readAsText(file, 'UTF-8');
|
|
652
|
-
}, [
|
|
626
|
+
}, [updateDiagram]);
|
|
653
627
|
const calculateConnectionPath = useCallback((connection, sourceItem, sinkItem) => {
|
|
654
628
|
const sourcePoint = getConnectionPoint(sourceItem, connection.Source.ConnectorName);
|
|
655
629
|
const sinkPoint = getConnectionPoint(sinkItem, connection.Sink.ConnectorName);
|
|
@@ -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;
|