@topconsultnpm/sdkui-react-beta 6.6.1 → 6.6.2

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.
@@ -1,8 +1,10 @@
1
1
  import { SearchResultDescriptor } from '@topconsultnpm/sdk-ts-beta';
2
- declare const TMQueryResult: ({ result, elapsedTime, showSysMetadata, searchText }: {
2
+ declare const TMQueryResult: ({ result, elapsedTime, showHiddenSelectItems, searchText, onSelectionChanged, onDblClick }: {
3
+ onDblClick?: () => void;
4
+ onSelectionChanged?: (e: any[]) => void;
3
5
  result: SearchResultDescriptor | undefined;
4
6
  elapsedTime?: number;
5
- showSysMetadata?: boolean;
7
+ showHiddenSelectItems?: boolean;
6
8
  searchText?: string;
7
9
  }) => import("react/jsx-runtime").JSX.Element;
8
10
  export default TMQueryResult;
@@ -7,13 +7,13 @@ import TMLayoutContainer, { TMLayoutItem } from '../base/TMLayout';
7
7
  import { StyledDivHorizontal, StyledParagraph, cellRenderObjectIcon } from '../base/Styled';
8
8
  import { Globalization, IconAll, IconApply, IconFileDots, IconProgressReady, IconSelected, IconVisible, SDKUI_Globals, getDataColumnName, searchResultDescriptorToSimpleArray } from '../../helper';
9
9
  import { TMColors } from '../../utils/theme';
10
- const TMQueryResult = ({ result, elapsedTime, showSysMetadata = false, searchText }) => {
10
+ const TMQueryResult = ({ result, elapsedTime, showHiddenSelectItems, searchText, onSelectionChanged, onDblClick }) => {
11
11
  const [dataSource, setDataSource] = useState();
12
12
  const [selectedItems, setSelectedItems] = useState([]);
13
13
  const [visibleItems, setVisibleItems] = useState([]);
14
14
  let gridInstance;
15
15
  useEffect(() => { gridInstance?.instance().searchByText(searchText ?? ''); }, [searchText]);
16
- useEffect(() => { setDataSource(searchResultDescriptorToSimpleArray(result)); }, [result]);
16
+ useEffect(() => { setDataSource(searchResultDescriptorToSimpleArray(result)); setSelectedItems([]); }, [result]);
17
17
  function millisecondsToTime(milli) {
18
18
  //console.log(milli)
19
19
  let milliseconds = milli % 1000;
@@ -21,18 +21,17 @@ const TMQueryResult = ({ result, elapsedTime, showSysMetadata = false, searchTex
21
21
  let minutes = Math.floor((milli / (60 * 1000)) % 60);
22
22
  return minutes + "m " + seconds + "s " + milliseconds.toFixed(2) + "ms";
23
23
  }
24
- return (_jsxs(TMLayoutContainer, { gap: 0, children: [_jsx(TMLayoutItem, { height: 'calc(100% - 30px)', children: _jsxs(DataGrid, { ref: (grid) => (gridInstance = grid), keyExpr: "rowIndex", width: '100%', height: '100%', dataSource: dataSource, allowColumnResizing: true, columnResizingMode: "widget", columnAutoWidth: true, allowColumnReordering: true, showBorders: true, showColumnLines: SDKUI_Globals.dataGridShowColumnLines, showRowLines: SDKUI_Globals.dataGridShowRowLines, onContentReady: (e) => { setVisibleItems(e.component.getVisibleRows().map((row) => { return row.data; })); }, onSelectionChanged: (e) => { setSelectedItems(e.selectedRowsData); },
25
- // onRowPrepared={(e: RowPreparedEvent<string[], any>) => { e.rowElement.style.height = '21px' }}
26
- onToolbarPreparing: (e) => {
24
+ // console.log(showHiddenSelectItems)
25
+ return (_jsxs(TMLayoutContainer, { gap: 0, children: [_jsx(TMLayoutItem, { height: 'calc(100% - 30px)', children: _jsxs(DataGrid, { ref: (grid) => (gridInstance = grid), keyExpr: "rowIndex", width: '100%', height: '100%', dataSource: dataSource, selectedRowKeys: selectedItems, allowColumnResizing: true, columnResizingMode: "widget", columnAutoWidth: true, allowColumnReordering: true, showBorders: true, showColumnLines: SDKUI_Globals.dataGridShowColumnLines, showRowLines: SDKUI_Globals.dataGridShowRowLines, onContentReady: (e) => { setVisibleItems(e.component.getVisibleRows().map((row) => { return row.data; })); }, onSelectionChanged: (e) => { setSelectedItems(e.selectedRowKeys); onSelectionChanged && onSelectionChanged(e.selectedRowsData); }, onToolbarPreparing: (e) => {
27
26
  e.toolbarOptions.items.forEach((item) => {
28
27
  if (item.name === "searchPanel") {
29
28
  item.location = "before";
30
29
  }
31
30
  });
32
- }, children: [_jsx(Selection, { mode: "multiple", showCheckBoxesMode: "onClick", selectAllMode: 'allPages' }), _jsx(SearchPanel, { visible: false }), _jsx(Scrolling, { mode: 'virtual', useNative: SDKUI_Globals.dataGridUseNativeScrollbar }), _jsx(HeaderFilter, { visible: true }), _jsx(Paging, { pageSize: 25 }), _jsx(Pager, { visible: true, showInfo: true, showNavigationButtons: true }), _jsx(LoadPanel, { enabled: true }), _jsx(Column, { dataType: "object", width: 40, visible: true, cellRender: () => cellRenderObjectIcon(_jsx(IconFileDots, { color: '#767676' })) }), result?.dtdResult?.columns?.map((col, index) => {
33
- let mid = col.extendedProperties?.["MID"];
31
+ }, onRowDblClick: onDblClick, children: [_jsx(Selection, { mode: "multiple", showCheckBoxesMode: "onClick", selectAllMode: 'allPages' }), _jsx(SearchPanel, { visible: false }), _jsx(Scrolling, { mode: 'virtual', useNative: SDKUI_Globals.dataGridUseNativeScrollbar }), _jsx(HeaderFilter, { visible: true }), _jsx(Paging, { pageSize: 25 }), _jsx(Pager, { visible: true, showInfo: true, showNavigationButtons: true }), _jsx(LoadPanel, { enabled: true }), _jsx(Column, { dataType: "object", width: 40, visible: true, cellRender: () => cellRenderObjectIcon(_jsx(IconFileDots, { color: '#767676' })) }), result?.dtdResult?.columns?.map((col, index) => {
34
32
  let keyField = getDataColumnName(result?.fromTID, col);
35
- const isSystemField = Number(mid) < 50;
33
+ const isVisible = col.extendedProperties?.["Visibility"] != "Hidden";
34
+ // console.log(isVisible || showHiddenSelectItems)
36
35
  const dataType = () => {
37
36
  switch (col.dataType) {
38
37
  case DataColumnTypes.DateTime: return "datetime";
@@ -41,7 +40,7 @@ const TMQueryResult = ({ result, elapsedTime, showSysMetadata = false, searchTex
41
40
  default: return "string";
42
41
  }
43
42
  };
44
- return (_jsx(Column, { dataField: keyField, caption: col.caption, visible: !isSystemField ? true : showSysMetadata, dataType: dataType(), format: col.dataType === DataColumnTypes.DateTime ? Globalization.getDateDisplayFormat() : "" }, col.caption + index.toString()));
43
+ return (_jsx(Column, { dataField: keyField, caption: col.caption, visible: isVisible || showHiddenSelectItems, dataType: dataType(), format: col.dataType === DataColumnTypes.DateTime ? Globalization.getDateDisplayFormat() : "" }, col.caption + index.toString()));
45
44
  })] }) }), _jsx(TMLayoutItem, { height: 'max-content', children: _jsxs(StyledDivHorizontal, { style: { backgroundColor: TMColors.toolbar_background, height: '30px' }, children: [_jsxs(StyledParagraph, { children: [_jsxs("span", { style: { marginRight: '5px', fontWeight: 'bold' }, children: [" ", _jsx(IconAll, { fontSize: 12 })] }), Globalization.getNumberDisplayValue(dataSource?.length ?? 0, true)] }), _jsxs(StyledParagraph, { children: [_jsxs("span", { style: { marginRight: '5px', fontWeight: 'bold' }, children: [" ", _jsx(IconVisible, { fontSize: 12 })] }), Globalization.getNumberDisplayValue(visibleItems.length ?? 0, true)] }), _jsxs(StyledParagraph, { children: [_jsxs("span", { style: { marginRight: '5px', fontWeight: 'bold' }, children: [" ", _jsx(IconSelected, { fontSize: 12 })] }), Globalization.getNumberDisplayValue(selectedItems.length ?? 0, true)] }), _jsxs(StyledParagraph, { children: [_jsxs("span", { style: { marginRight: '5px', fontWeight: 'bold' }, children: [" ", _jsx(IconApply, { fontSize: 12 })] }), `${Globalization.getNumberDisplayValue(result?.dcmtsReturned ?? 0, true)}/${Globalization.getNumberDisplayValue(result?.dcmtsFound ?? 0, true)}`] }), _jsxs(StyledParagraph, { children: [_jsxs("span", { style: { marginRight: '5px', fontWeight: 'bold' }, children: [" ", _jsx(IconProgressReady, { fontSize: 12 })] }), millisecondsToTime(elapsedTime)] })] }) })] }));
46
45
  };
47
46
  export default TMQueryResult;
@@ -0,0 +1,33 @@
1
+ import { SearchResultDescriptor } from '@topconsultnpm/sdk-ts-beta';
2
+ export declare enum SearchResultContext {
3
+ METADATA_SEARCH = "metadataSearch",
4
+ WORKFLOW_APPROVE = "workflowApprove",
5
+ FAVORITES = "favorites",
6
+ RECENT = "recent"
7
+ }
8
+ export type NewButtonType = 'success' | 'error' | 'tertiary' | 'primary';
9
+ export declare const TMButtonNew: ({ color, caption, disable, onClick, type, icon, width, height }: {
10
+ color?: string;
11
+ width?: string;
12
+ height?: string;
13
+ disable?: boolean;
14
+ caption?: string;
15
+ onClick?: () => void;
16
+ type?: NewButtonType;
17
+ icon?: any;
18
+ }) => import("react/jsx-runtime").JSX.Element;
19
+ declare const TMQueryResultForm: ({ onUpdate, isModal, onClose, context, result1, result2, elapsedTime, searchText, tabIcon1, tabIcon2, tabTitle1, tabTitle2 }: {
20
+ tabTitle1?: string;
21
+ tabTitle2?: string;
22
+ tabIcon1?: any;
23
+ tabIcon2?: any;
24
+ isModal?: boolean;
25
+ onClose?: () => void;
26
+ context?: SearchResultContext;
27
+ result1?: SearchResultDescriptor | SearchResultDescriptor[];
28
+ result2?: SearchResultDescriptor | SearchResultDescriptor[];
29
+ elapsedTime?: number;
30
+ searchText?: string;
31
+ onUpdate?: () => Promise<void>;
32
+ }) => import("react/jsx-runtime").JSX.Element;
33
+ export default TMQueryResultForm;
@@ -0,0 +1,362 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from 'react';
3
+ import { SDK_Globals, AppModules } from '@topconsultnpm/sdk-ts-beta';
4
+ import TMQueryResult from './TMQueryResult';
5
+ import styled from 'styled-components';
6
+ import { IconApply, IconCloseOutline, IconUser, IconInfo, IconRefresh, IconSync, IconDownload, IconPreview, IconPrinter, IconCheckIn, IconEdit, IconStar, IconRecursiveOps, IconMail, IconDcmtTypeOnlyMetadata, IconCopy, IconRelation, IconSignature, IconDelete, IconUndo, IconCloseCircle, IconMenuVertical, IconArchiveDoc, IconDuplicate, IconSubstFile, IconConvertFilePdf, IconCheckFile, IconBatchUpdate, IconShare, IconSharedDcmt, IconSearch, IconExportTo, IconShow, IconSettings, IconActivityLog, SDKUI_Localizator, useWindowWidth, MOBILE_WIDTH, IconArrowLeft } from '../../helper';
7
+ import { FormModes } from '../../ts';
8
+ import { TMColors } from '../../utils/theme';
9
+ import { StyledBadge } from '../base/Styled';
10
+ import ShowAlert from '../base/TMAlert';
11
+ import TMButton from '../base/TMButton';
12
+ import TMDropDownMenu from '../base/TMDropDownMenu';
13
+ import { TMSplitterLayout, TMLayoutItem } from '../base/TMLayout';
14
+ import TMModal from '../base/TMModal';
15
+ import { TMExceptionBoxManager } from '../base/TMPopUp';
16
+ import TMSpinner from '../base/TMSpinner';
17
+ import TMTooltip from '../base/TMTooltip';
18
+ import TMUserChooser from '../choosers/TMUserChooser';
19
+ import TMApplyForm from '../forms/TMApplyForm';
20
+ import TMTidViewer from '../viewers/TMTidViewer';
21
+ import TMListView from '../base/TMListView';
22
+ export var SearchResultContext;
23
+ (function (SearchResultContext) {
24
+ SearchResultContext["METADATA_SEARCH"] = "metadataSearch";
25
+ SearchResultContext["WORKFLOW_APPROVE"] = "workflowApprove";
26
+ SearchResultContext["FAVORITES"] = "favorites";
27
+ SearchResultContext["RECENT"] = "recent";
28
+ })(SearchResultContext || (SearchResultContext = {}));
29
+ const StyledWorkFlowOperationButtonsContainer = styled.div `
30
+ display: flex;
31
+ align-items: center;
32
+ gap: 15px;
33
+ margin-left: 50px;
34
+ `;
35
+ const StyledWorkFlowOpereationButton = styled.div `
36
+ display: flex;
37
+ align-items: center;
38
+ justify-content: flex-end;
39
+ width: ${props => props.$width};
40
+ height: ${props => props.$height};
41
+ font-weight: bold;
42
+ cursor: ${props => !props.$isDisabled ? 'pointer' : 'default'};
43
+ border-radius: 10px;
44
+ overflow: hidden;
45
+ color: white;
46
+ user-select: none;
47
+ `;
48
+ const StyledWorkFlowOpereationButtonIcon = styled.div `
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+ width: ${props => props.$isHoverred ? '25px' : '0px'};
53
+ transition: width ease-in-out 100ms;
54
+ height: 100%;
55
+ background-color: ${props => props.$isDisabled ? '#b4b4b4' : props.$color ? `${props.$color}90` : props.$type === 'success' ? `${TMColors.success}90` : props.$type === 'error' ? `${TMColors.error}90` : props.$type === 'tertiary' ? `${TMColors.tertiary}90` : `${TMColors.primary}90`};
56
+ border-top-left-radius: 10px;
57
+ border-bottom-left-radius: 10px;
58
+ `;
59
+ const StyledWorkFlowOpereationButtonText = styled.div `
60
+ display: flex;
61
+ align-items: center;
62
+ justify-content: center;
63
+ width: 100%;
64
+ height: 100%;
65
+ background-color: ${props => props.$isDisabled ? '#d1d1d1' : props.$color ? props.$color : props.$type === 'success' ? `${TMColors.success}` : props.$type === 'error' ? `${TMColors.error}` : props.$type === 'tertiary' ? `${TMColors.tertiary}` : `${TMColors.primary}`};
66
+ border-top-right-radius: 10px;
67
+ border-bottom-right-radius: 10px;
68
+ `;
69
+ const StyledTextArea = styled.textarea `
70
+ width: 100%;
71
+ height: 100%;
72
+ border: 1px solid ${props => props.$isValid ? '#b4b4b4' : TMColors.error};
73
+ border-radius: 10px;
74
+ padding: 10px;
75
+ &:focus{
76
+ outline: none;
77
+ border-bottom: 4px solid ${props => props.$isValid ? TMColors.primary : TMColors.error};
78
+ }
79
+ `;
80
+ const StyledTitleContainer = styled.div ` width: max-content; height: max-content; font-weight:bold; border-radius: 5px; padding: 5px; background-color: #fff; color: #0e7418; margin-right: 10px; display: flex; align-items: center; gap: 2px; `;
81
+ const WorfflowListItem = ({ data }) => {
82
+ return (_jsxs("div", { style: { width: '100%', padding: '2px 5px', display: 'flex', alignItems: 'center', justifyContent: 'space-between', userSelect: 'none' }, children: [_jsx(TMTidViewer, { tid: data.fromTID, showIcon: true }), _jsx("div", { style: { padding: 3, display: 'flex', alignItems: 'center', justifyContent: 'center', backgroundColor: 'white', color: 'gray', borderRadius: 3 }, children: data.dcmtsReturned })] }));
83
+ };
84
+ export const TMButtonNew = ({ color, caption = '', disable = false, onClick, type = 'primary', icon = _jsx(IconApply, {}), width = '90px', height = '30px' }) => {
85
+ const [isHovered, setIsHovered] = useState(false);
86
+ return (_jsxs(StyledWorkFlowOpereationButton, { "$width": width, "$height": height, onMouseOver: () => !disable && setIsHovered(true), onMouseOut: () => setIsHovered(false), "$isDisabled": disable, onClick: () => !disable && onClick && onClick(), children: [_jsx(StyledWorkFlowOpereationButtonIcon, { "$color": color, "$isHoverred": isHovered, "$isDisabled": disable, "$type": type, children: icon }), _jsxs(StyledWorkFlowOpereationButtonText, { "$color": color, "$isDisabled": disable, "$type": type, children: [" ", caption, " "] })] }));
87
+ };
88
+ const WorkFlowOperationButtons = ({ onApprove, onReAssign, onReject, approveDisable = false, reassignDisable = false, rejectDisable = false }) => {
89
+ return (_jsxs(StyledWorkFlowOperationButtonsContainer, { children: [_jsx(TMButtonNew, { icon: _jsx(IconApply, {}), caption: 'Approva', disable: approveDisable, onClick: () => !approveDisable && onApprove && onApprove(), type: 'success' }), _jsx(TMButtonNew, { icon: _jsx(IconCloseOutline, {}), caption: 'Rifiuta', disable: rejectDisable, onClick: () => !rejectDisable && onReject && onReject(), type: 'error' }), _jsx(TMButtonNew, { icon: _jsx(IconUser, { fontSize: 16 }), caption: 'Riassegna', disable: reassignDisable, onClick: () => !reassignDisable && onReAssign && onReAssign(), type: 'tertiary' }), _jsx(TMButtonNew, { icon: _jsx(IconInfo, { fontSize: 16 }), caption: 'Maggiori informazioni', width: '180px', disable: approveDisable, onClick: () => alert('TODO!!!'), type: 'primary' })] }));
90
+ };
91
+ const WorkFlowApproveRejectPopUp = ({ op, onClose, selectedItems = [], onUpdate }) => {
92
+ const [commentValue, setCommentValue] = useState('');
93
+ const disable = commentValue.length === 0;
94
+ const count = () => { return selectedItems.length.toString() + ' Workitem'; };
95
+ const completeWorkFlowAsync = async () => {
96
+ try {
97
+ TMSpinner.show();
98
+ for (let item of selectedItems) {
99
+ await SDK_Globals.tmSession?.NewWorkflowEngine().WorkItem_CompleteOrRejectAsync(item.TID, item.DID, commentValue, 0);
100
+ }
101
+ }
102
+ catch (e) {
103
+ TMExceptionBoxManager.show({ exception: e });
104
+ }
105
+ finally {
106
+ onClose && onClose();
107
+ TMSpinner.hide();
108
+ }
109
+ };
110
+ const rejectWorkFlowAsync = async () => {
111
+ try {
112
+ TMSpinner.show();
113
+ for (let item of selectedItems) {
114
+ await SDK_Globals.tmSession?.NewWorkflowEngine().WorkItem_CompleteOrRejectAsync(item.TID, item.DID, commentValue, 1);
115
+ }
116
+ }
117
+ catch (e) {
118
+ TMExceptionBoxManager.show({ exception: e });
119
+ }
120
+ finally {
121
+ onUpdate && onUpdate();
122
+ onClose && onClose();
123
+ TMSpinner.hide();
124
+ }
125
+ };
126
+ return (_jsx(TMModal, { toolbar: op === 0 ?
127
+ _jsx(TMButtonNew, { icon: _jsx(IconApply, {}), caption: 'Approva', disable: false, onClick: completeWorkFlowAsync, type: 'success' }) :
128
+ _jsx(TMButtonNew, { icon: _jsx(IconCloseOutline, {}), caption: 'Rifiuta', disable: disable, onClick: () => { !disable && rejectWorkFlowAsync(); }, type: 'error' }), onClose: onClose, width: '60%', height: '60%', isModal: true, title: (op === 0 ? 'Approva workflow ' + '(' + count() + ')' : 'Rifiuta workflow ' + '(' + count() + ')'), children: _jsxs("div", { style: { width: '100%', height: '100%', padding: '10px', display: 'flex', flexDirection: 'column', gap: 5 }, children: [_jsxs("p", { style: { color: (op === 1 && disable) ? TMColors.error : 'black' }, children: ["Commento ", op === 1 && disable && _jsx("span", { children: ' (Campo obbligatorio)' }), " "] }), _jsx(StyledTextArea, { "$isValid": op === 0 ? true : !disable, value: commentValue, onChange: (e) => setCommentValue(e.target.value) })] }) }));
129
+ };
130
+ const WorkFlowReAssignPopUp = ({ onClose, selectedItems = [], onUpdate }) => {
131
+ const [commentValue, setCommentValue] = useState('');
132
+ const [selectedUserID, setSelectedUserID] = useState();
133
+ const disable = commentValue.length === 0 || !selectedUserID;
134
+ const count = () => { return selectedItems.length.toString() + ' Workitem'; };
135
+ const reAssignWorkFlowAsync = async () => {
136
+ try {
137
+ TMSpinner.show();
138
+ for (let item of selectedItems) {
139
+ await SDK_Globals.tmSession?.NewWorkflowEngine().WorkItem_ReassignAsync(item.TID, item.DID, selectedUserID, commentValue);
140
+ }
141
+ }
142
+ catch (e) {
143
+ TMExceptionBoxManager.show({ exception: e });
144
+ }
145
+ finally {
146
+ onUpdate && onUpdate();
147
+ onClose && onClose();
148
+ TMSpinner.hide();
149
+ }
150
+ };
151
+ return (_jsx(TMModal, { toolbar: _jsx(TMButtonNew, { icon: _jsx(IconUser, { fontSize: 16 }), caption: 'Riassegna', disable: disable, onClick: () => !disable && reAssignWorkFlowAsync(), type: 'tertiary' }), onClose: onClose, width: '60%', height: '60%', isModal: true, title: 'Riassegna workflow ' + '(' + count() + ')', children: _jsxs("div", { style: { width: '100%', height: '100%', padding: '10px', display: 'flex', flexDirection: 'column', gap: 5 }, children: [_jsx(TMUserChooser, { value: selectedUserID, onValueChanged: (e) => setSelectedUserID(e) }), _jsxs("p", { style: { color: commentValue.length === 0 ? TMColors.error : 'black' }, children: ["Commento ", commentValue.length === 0 && _jsx("span", { children: ' (Campo obbligatorio)' }), " "] }), _jsx(StyledTextArea, { "$isValid": commentValue.length !== 0, value: commentValue, onChange: (e) => setCommentValue(e.target.value) })] }) }));
152
+ };
153
+ const TabView = ({ title = '', onMouseOut, onMouseOver, onClick, clickable, selectedTabBorderColor, icon = _jsx(IconApply, {}), count = 0 }) => {
154
+ return (_jsx(TMTooltip, { content: title, children: _jsxs("div", { onMouseOut: onMouseOut, onMouseOver: onMouseOver, onClick: onClick, style: { userSelect: 'none', width: 'max-content', padding: 5, height: '40px', display: 'flex', alignItems: 'center', position: 'relative', cursor: clickable ? 'pointer' : 'default' }, children: [_jsx("div", { style: { position: 'absolute', top: 0, left: 0, width: '100%', height: '3px', backgroundColor: selectedTabBorderColor, transition: 'all ease 100ms' } }), _jsx("div", { style: { transform: 'translateY(2px)' }, children: icon }), _jsx(StyledBadge, { "$backgroundColor": '#679CE8', children: count })] }) }));
155
+ };
156
+ const TMQueryResultForm = ({ onUpdate, isModal, onClose, context = SearchResultContext.METADATA_SEARCH, result1, result2, elapsedTime, searchText, tabIcon1 = _jsx(IconApply, {}), tabIcon2 = _jsx(IconApply, {}), tabTitle1, tabTitle2 }) => {
157
+ const [currentSearchResult1, setCurrentSearchResult1] = useState();
158
+ const [currentSearchResult2, setCurrentSearchResult2] = useState();
159
+ const [selectedItems, setSelectedItems] = useState([]);
160
+ const [showApprovePopup, setShowApprovePopup] = useState(false);
161
+ const [showRejectPopup, setShowRejectPopup] = useState(false);
162
+ const [showReAssignPopup, setShowReAssignPopup] = useState(false);
163
+ const [showHiddenSelectItems, setShowHiddenSelectItems] = useState(false);
164
+ const [selectedTabIndex, setSelectedTabIndex] = useState(0);
165
+ const [hoveredTab, setHoveredTab] = useState(undefined);
166
+ const [tabCount1, setTabCount1] = useState(0);
167
+ const [tabCount2, setTabCount2] = useState(0);
168
+ const [splitterSize, setSplitterSize] = useState(['100%', '0']);
169
+ const [hasBack, setHasBack] = useState(false);
170
+ let disable = selectedItems.length === 0;
171
+ const orderByName = (array) => {
172
+ let arr = [...array];
173
+ return arr.sort((a, b) => { if (a['fromName'] < b['fromName']) {
174
+ return -1;
175
+ } if (a['fromName'] > b['fromName']) {
176
+ return 1;
177
+ } return 0; });
178
+ };
179
+ let toolbarElements = [
180
+ _jsx(TMButton, { caption: "Aggiorna", icon: _jsx(IconRefresh, {}), btnStyle: 'toolbar', fontSize: '1.3rem', elementStyle: { marginRight: context === SearchResultContext.WORKFLOW_APPROVE ? '10px' : '0' }, onClick: () => context === SearchResultContext.WORKFLOW_APPROVE ? onUpdate && onUpdate() : alert('todo') }, "btn1"),
181
+ _jsx(TMButton, { caption: "Sincronizza elementi query", icon: _jsx(IconSync, {}), btnStyle: 'toolbar', fontSize: '1.3rem', elementStyle: { marginRight: '10px' }, onClick: () => { ShowAlert({ message: "TODO Sync Query", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } }, "btn2"),
182
+ _jsx(TMButton, { caption: "Download documento", icon: _jsx(IconDownload, {}), btnStyle: 'toolbar', fontSize: '1.3rem', onClick: () => { ShowAlert({ message: "TODO Download documento", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } }, "btn3"),
183
+ _jsx(TMButton, { caption: "Apri form", icon: _jsx(IconPreview, {}), btnStyle: 'toolbar', fontSize: '1.3rem', onClick: () => { ShowAlert({ message: "TODO Apri form", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } }, "btn4"),
184
+ _jsx(TMDropDownMenu, { backgroundColor: 'white', borderRadius: '3px', content: _jsx(TMButton, { icon: _jsx(IconPrinter, {}), caption: 'Stampa', btnStyle: 'toolbar', fontSize: '1.3rem' }), items: [
185
+ { icon: _jsx(IconCheckIn, {}), text: "Stampa con TopMedia", onClick: () => ShowAlert({ message: "TODO Stampa con TopMedia", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
186
+ { icon: _jsx(IconCheckIn, {}), text: "Stampa con Acrobat", onClick: () => ShowAlert({ message: "TODO Stampa con Acrobat", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
187
+ ] }, "btn5"),
188
+ _jsx(TMButton, { caption: "Vizualizza/Modifica metadati", icon: _jsx(IconEdit, {}), btnStyle: 'toolbar', fontSize: '1.3rem', elementStyle: { marginRight: '10px' }, onClick: () => { ShowAlert({ message: "TODO Vizualizza/Modifica metadati", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } }, "btn6"),
189
+ _jsx(TMDropDownMenu, { backgroundColor: 'white', borderRadius: '3px', content: _jsx(TMButton, { icon: _jsx(IconCheckIn, {}), caption: 'Check in', btnStyle: 'toolbar', fontSize: '1.3rem' }), items: [
190
+ { icon: _jsx(IconCheckIn, {}), text: "Check out", onClick: () => ShowAlert({ message: "TODO Check out", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
191
+ { icon: _jsx(IconCheckIn, {}), text: "Modifica file", onClick: () => ShowAlert({ message: "TODO Modifica file", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
192
+ { icon: _jsx(IconCheckIn, {}), text: "Annulla check out", onClick: () => ShowAlert({ message: "TODO Annulla check out", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
193
+ { icon: _jsx(IconCheckIn, {}), text: "Check in", onClick: () => ShowAlert({ message: "TODO Check in", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
194
+ { icon: _jsx(IconCheckIn, {}), text: "Cronologia", onClick: () => ShowAlert({ message: "TODO Cronologia", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
195
+ ] }, "btn7"),
196
+ _jsx(TMButton, { caption: "Aggiungi a preferiti", icon: _jsx(IconStar, {}), btnStyle: 'toolbar', fontSize: '1.3rem', onClick: () => { ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } }, "btn8"),
197
+ _jsx(TMDropDownMenu, { backgroundColor: 'white', borderRadius: '3px', content: _jsx(TMButton, { btnStyle: 'toolbar', caption: 'Operazioni ricorsive', icon: _jsx(IconRecursiveOps, {}) }), items: [
198
+ {
199
+ icon: _jsx(IconMail, {}), text: "Invia per posta", items: [
200
+ { icon: _jsx(IconMail, {}), text: "I documenti selezionati", onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
201
+ { icon: _jsx(IconMail, {}), text: "I documenti di primo livello e tutti i documenti correlati", onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
202
+ { icon: _jsx(IconMail, {}), text: "I documenti di primo livello e i documenti correlati personalizzando l'operazione", onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
203
+ ]
204
+ },
205
+ {
206
+ icon: _jsx(IconDcmtTypeOnlyMetadata, {}), text: "Unisci in un file PDF", items: [
207
+ { icon: _jsx(IconDcmtTypeOnlyMetadata, {}), text: "I documenti selezionati", onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
208
+ { icon: _jsx(IconDcmtTypeOnlyMetadata, {}), text: "I documenti di primo livello e tutti i documenti correlati", onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
209
+ { icon: _jsx(IconDcmtTypeOnlyMetadata, {}), text: "I documenti di primo livello e i documenti correlati personalizzando l'operazione", onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
210
+ ]
211
+ },
212
+ {
213
+ icon: _jsx(IconCopy, {}), text: "Copia in una cartella", items: [
214
+ { icon: _jsx(IconCopy, {}), text: "I documenti selezionati", onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
215
+ { icon: _jsx(IconCopy, {}), text: "I documenti di primo livello e tutti i documenti correlati", onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
216
+ { icon: _jsx(IconCopy, {}), text: "I documenti di primo livello e i documenti correlati personalizzando l'operazione", onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
217
+ ]
218
+ },
219
+ ] }, "btn9"),
220
+ _jsx(TMDropDownMenu, { backgroundColor: 'white', borderRadius: '3px', content: _jsx(TMButton, { icon: _jsx(IconRelation, {}), caption: 'Correlazioni', btnStyle: 'toolbar', fontSize: '1.3rem' }), items: [
221
+ { icon: _jsx(IconRelation, {}), text: "Abbina documenti molti a molti", onClick: () => ShowAlert({ message: "TODO Abbina documenti molti a molti", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
222
+ { icon: _jsx(IconRelation, {}), text: "Disabbina documenti molti a molti", onClick: () => ShowAlert({ message: "TODO Disabbina documenti molti a molti", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
223
+ { icon: _jsx(IconRelation, {}), text: "Archivia documento dettaglio", beginGroup: true, onClick: () => ShowAlert({ message: "TODO Archivia documento dettaglio", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
224
+ { icon: _jsx(IconRelation, {}), text: "Archivia documento master", onClick: () => ShowAlert({ message: "TODO Archivia documento master", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
225
+ { icon: _jsx(IconRelation, {}), text: "Documenti master", beginGroup: true, onClick: () => ShowAlert({ message: "TODO Documenti master", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
226
+ ] }, "btn10"),
227
+ _jsx(TMDropDownMenu, { backgroundColor: 'white', borderRadius: '3px', content: _jsx(TMButton, { icon: _jsx(IconSignature, {}), btnStyle: 'toolbar', caption: 'Firma', fontSize: '1.3rem' }), items: [
228
+ { icon: _jsx(IconSignature, {}), text: "Informazioni di firma", onClick: () => ShowAlert({ message: "TODO Informazioni di firma", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
229
+ { icon: _jsx(IconSignature, {}), text: "Verifica firma", onClick: () => ShowAlert({ message: "TODO Verifica firma", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
230
+ { icon: _jsx(IconSignature, {}), text: "Firma e marca", onClick: () => ShowAlert({ message: "TODO Firma e marca", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
231
+ ] }, "btn11"),
232
+ _jsx(TMDropDownMenu, { backgroundColor: 'white', borderRadius: '3px', content: _jsx(TMButton, { btnStyle: 'toolbar', caption: 'Cancellazione', icon: _jsx(IconDelete, {}) }), items: [
233
+ { icon: _jsx(IconDelete, {}), text: "Cancellazione logica", onClick: () => ShowAlert({ message: "TODO Cancellazione logica", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
234
+ { icon: _jsx(IconUndo, {}), text: "Ripristina", onClick: () => ShowAlert({ message: "TODO Ripristina", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
235
+ { icon: _jsx(IconCloseCircle, {}), text: "Cancellazione fisica", onClick: () => ShowAlert({ message: "TODO Cancellazione fisica", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
236
+ ] }, "btn12"),
237
+ _jsx(TMDropDownMenu, { backgroundColor: 'white', borderRadius: '3px', content: _jsx(TMButton, { btnStyle: 'toolbar', caption: 'Altro', icon: _jsx(IconMenuVertical, {}) }), items: [
238
+ { icon: _jsx(IconArchiveDoc, {}), text: "Passa ad archiviazione", onClick: () => ShowAlert({ message: "TODO Passa ad archiviazione", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
239
+ { icon: _jsx(IconDuplicate, {}), text: "Duplica documento", onClick: () => ShowAlert({ message: "TODO Duplica documento", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
240
+ { icon: _jsx(IconSubstFile, { fontSize: 18 }), text: "Aggiungi/sostituisci file", onClick: () => ShowAlert({ message: "TODO Aggiungi/sostituisci file", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
241
+ { icon: _jsx(IconConvertFilePdf, { fontSize: 18 }), text: "Conversione file", onClick: () => ShowAlert({ message: "TODO Conversione file", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
242
+ { icon: _jsx(IconCheckFile, { fontSize: 18 }), text: "Controllo file", onClick: () => ShowAlert({ message: "TODO Controllo file", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
243
+ { icon: _jsx(IconBatchUpdate, { fontSize: 18 }), text: "Modifica multipla", onClick: () => ShowAlert({ message: "TODO Modifica multipla", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
244
+ { icon: _jsx(IconShare, { fontSize: 18 }), text: "Archiviazione condivisa", beginGroup: true, onClick: () => ShowAlert({ message: "TODO Archiviazione condivisa", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
245
+ { icon: _jsx(IconSharedDcmt, { fontSize: 18 }), text: "Documenti condivisi", onClick: () => ShowAlert({ message: "TODO Documenti condivisi", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
246
+ {
247
+ icon: _jsx(IconSearch, {}), text: "Trova tutti i riferimenti", beginGroup: true, items: [
248
+ { icon: _jsx(IconSearch, {}), text: "Trova tutti i riferimenti", onClick: () => ShowAlert({ message: "TODO Trova tutti i riferimenti", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
249
+ { icon: _jsx(IconSearch, {}), text: "Trova tutti i riferimenti (anche nello storico)", onClick: () => ShowAlert({ message: "TODO Trova tutti i riferimenti (anche nello storico)", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
250
+ ]
251
+ },
252
+ { icon: _jsx(IconExportTo, { fontSize: 18 }), text: "Esporta in...", onClick: () => ShowAlert({ message: "TODO Esporta in", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
253
+ { icon: _jsx(IconShow, {}), text: "Mostra footer", onClick: () => ShowAlert({ message: "TODO Mostra footer", mode: 'info', title: `${"TODO"}`, duration: 3000 }) },
254
+ { icon: _jsx(IconSettings, {}), text: "Visualizza o nasconde i metadati nascosti", onClick: () => setShowHiddenSelectItems(!showHiddenSelectItems) },
255
+ ] }, "btn13"),
256
+ _jsx(WorkFlowOperationButtons, { onApprove: () => setShowApprovePopup(true), onReject: () => setShowRejectPopup(true), onReAssign: () => setShowReAssignPopup(true), approveDisable: disable, rejectDisable: disable, reassignDisable: disable }, 'btn14')
257
+ ];
258
+ let mobileHeaderTitle = [
259
+ _jsxs(StyledTitleContainer, { children: [context === SearchResultContext.WORKFLOW_APPROVE ? _jsx(IconActivityLog, { fontSize: 14 }) : context === SearchResultContext.FAVORITES ? _jsx(IconStar, {}) : context === SearchResultContext.RECENT ? _jsx(IconRefresh, {}) : '', context === SearchResultContext.WORKFLOW_APPROVE ? SDKUI_Localizator.WorkflowApproval : context === SearchResultContext.FAVORITES ? SDKUI_Localizator.Favorites : context === SearchResultContext.RECENT ? SDKUI_Localizator.Recent : ''] }, context === SearchResultContext.WORKFLOW_APPROVE ? 'title2' : context === SearchResultContext.FAVORITES ? 'title0' : context === SearchResultContext.RECENT ? 'title1' : '')
260
+ ];
261
+ const [toolbar, setToolbar] = useState(toolbarElements);
262
+ let width = useWindowWidth();
263
+ let isMobile = width <= MOBILE_WIDTH;
264
+ useEffect(() => { if (isMobile) {
265
+ setCurrentSearchResult1(undefined);
266
+ setCurrentSearchResult2(undefined);
267
+ }
268
+ else {
269
+ if (Array.isArray(result1)) {
270
+ setCurrentSearchResult1(orderByName(result1)[0]);
271
+ }
272
+ ;
273
+ if (Array.isArray(result2)) {
274
+ setCurrentSearchResult2(orderByName(result2)[0]);
275
+ }
276
+ } }, [isMobile, result1, result2]);
277
+ useEffect(() => {
278
+ let arr = [...toolbarElements];
279
+ if (isMobile && hasBack) {
280
+ arr.unshift(_jsx(TMButton, { caption: SDKUI_Localizator.Back, icon: _jsx(IconArrowLeft, {}), btnStyle: 'toolbar', color: 'tertiary', fontSize: '1.3rem', onClick: () => { setSplitterSize(['100%', '0']); setHasBack(false); let arr = [...toolbar]; arr = arr.filter(item => item.key !== 'btn00'); } }, "btn00"));
281
+ }
282
+ if (!isMobile || !hasBack) {
283
+ arr = arr.filter(item => item.key !== 'btn00');
284
+ }
285
+ if (context === SearchResultContext.METADATA_SEARCH) {
286
+ arr = arr.filter(item => item.key !== 'btn14');
287
+ arr = arr.filter(item => item.key !== 'btn5');
288
+ arr = arr.filter(item => item.key !== 'btn6');
289
+ }
290
+ if (context === SearchResultContext.WORKFLOW_APPROVE) {
291
+ arr.unshift(_jsxs(StyledTitleContainer, { style: { gap: 5 }, children: [_jsx(IconActivityLog, { fontSize: 14 }), " ", SDKUI_Localizator.WorkflowApproval] }, 'title2'));
292
+ arr = arr.filter(item => item.key !== 'btn2');
293
+ arr = arr.filter(item => item.key !== 'btn4');
294
+ arr = arr.filter(item => item.key !== 'btn8');
295
+ }
296
+ else {
297
+ arr = arr.filter(item => item.key !== 'title2');
298
+ }
299
+ if (context === SearchResultContext.FAVORITES) {
300
+ arr.unshift(_jsxs(StyledTitleContainer, { children: [_jsx(IconStar, {}), " ", SDKUI_Localizator.Favorites] }, 'title0'));
301
+ }
302
+ else {
303
+ arr = arr.filter(item => item.key !== 'title0');
304
+ }
305
+ if (context === SearchResultContext.RECENT) {
306
+ arr.unshift(_jsxs(StyledTitleContainer, { children: [_jsx(IconRefresh, {}), " ", SDKUI_Localizator.Recent] }, 'title1'));
307
+ }
308
+ else {
309
+ arr = arr.filter(item => item.key !== 'title1');
310
+ }
311
+ setToolbar(arr);
312
+ }, [context, selectedItems, isMobile, hasBack]);
313
+ useEffect(() => {
314
+ let c = 0;
315
+ if (Array.isArray(result1)) {
316
+ for (let res of result1) {
317
+ if (res.dcmtsFound)
318
+ c += res.dcmtsFound;
319
+ }
320
+ }
321
+ setTabCount1(c);
322
+ }, [result1]);
323
+ useEffect(() => {
324
+ let c = 0;
325
+ if (Array.isArray(result2)) {
326
+ for (let res of result2) {
327
+ if (res.dcmtsFound)
328
+ c += res.dcmtsFound;
329
+ }
330
+ }
331
+ setTabCount2(c);
332
+ }, [result2]);
333
+ useEffect(() => { setSelectedItems([]); }, [currentSearchResult1, currentSearchResult2]);
334
+ // useEffect(() => {
335
+ // const handleTabChange = (e: any) => {
336
+ // if (e.key === 'ArrowLeft') {
337
+ // e.preventDefault();
338
+ // selectedTabIndex === 1 && setSelectedTabIndex(0)
339
+ // }
340
+ // if (e.key === 'ArrowRight') {
341
+ // e.preventDefault();
342
+ // selectedTabIndex === 0 && setSelectedTabIndex(1)
343
+ // }
344
+ // }
345
+ // window.addEventListener('keydown', handleTabChange)
346
+ // return () => window.removeEventListener('keydown', handleTabChange)
347
+ // }, [selectedTabIndex])
348
+ return (_jsxs(TMApplyForm, { isModal: isModal, formMode: FormModes.None, showApply: false, showUndo: false, hasNavigation: false, onClose: onClose, showBack: context === SearchResultContext.METADATA_SEARCH, customToolbarElements: SDK_Globals.tmSession?.SessionDescr?.appModuleID == AppModules.ORCHESTRATOR ? [] : isMobile && context !== SearchResultContext.METADATA_SEARCH && !hasBack ? mobileHeaderTitle : toolbar, children: [Array.isArray(result1)
349
+ ?
350
+ _jsxs(TMSplitterLayout, { showSeparator: !isMobile, direction: 'horizontal', min: ['0', '0'], start: !isMobile ? ['20%', '80%'] : splitterSize, children: [_jsx(TMLayoutItem, { children: _jsxs("div", { style: { height: '100%', display: 'flex', flexDirection: 'column' }, children: [_jsx("div", { style: { width: '100%', height: 'calc(100% - 40px)' }, children: _jsx(TMListView, { orderBy: 'fromName', exprKey: 'fromTID', dataSource: selectedTabIndex === 0 ? result1 : result2 && Array.isArray(result2) ? result2 : [], customColor: '#0e7418', id: `workflow-approve-list-view${selectedTabIndex.toString()}`, itemTemplate: (data) => _jsx(WorfflowListItem, { data: data }), selectedItem: selectedTabIndex === 0 ? currentSearchResult1 : currentSearchResult2, onSelectionChanged: (e) => { if (selectedTabIndex === 0) {
351
+ setCurrentSearchResult1(e);
352
+ }
353
+ else {
354
+ setCurrentSearchResult2(e);
355
+ } ; if (isMobile) {
356
+ setSplitterSize(['0', '100%']);
357
+ setHasBack(true);
358
+ } }, onItemDblClick: (e) => alert(e.fromName), searchKeys: ['fromTID', 'fromName'] }) }), _jsxs("div", { style: { display: 'flex', flexDirection: 'row', gap: 10, alignItems: 'center', width: '100%', height: '40px', borderTop: '1px #e1e1e1 solid', borderBottom: '1px solid #e1e1e1' }, children: [_jsx(TabView, { clickable: result2 && Array.isArray(result2), count: tabCount1, icon: tabIcon1, onClick: () => setSelectedTabIndex(0), onMouseOut: () => setHoveredTab(undefined), onMouseOver: () => setHoveredTab(0), selectedTabBorderColor: selectedTabIndex === 0 ? '#0e7418' : hoveredTab === 0 ? '#c1c1c1' : 'transparent', title: tabTitle1 }), result2 && _jsx(TabView, { clickable: true, count: tabCount2, icon: tabIcon2, onClick: () => setSelectedTabIndex(1), onMouseOut: () => setHoveredTab(undefined), onMouseOver: () => setHoveredTab(1), selectedTabBorderColor: selectedTabIndex === 1 ? '#0e7418' : hoveredTab === 1 ? '#c1c1c1' : 'transparent', title: tabTitle2 })] })] }) }), _jsxs(TMLayoutItem, { children: [" ", _jsx(TMQueryResult, { onDblClick: () => alert('open form'), onSelectionChanged: (e) => setSelectedItems(e), result: selectedTabIndex === 0 ? currentSearchResult1 : currentSearchResult2, showHiddenSelectItems: showHiddenSelectItems, elapsedTime: elapsedTime, searchText: searchText })] })] })
359
+ :
360
+ _jsx(TMQueryResult, { onSelectionChanged: (e) => setSelectedItems(e), result: result1, showHiddenSelectItems: showHiddenSelectItems, elapsedTime: elapsedTime, searchText: searchText }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { onUpdate: onUpdate, selectedItems: selectedItems, op: 0, onClose: () => setShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { onUpdate: onUpdate, selectedItems: selectedItems, op: 1, onClose: () => setShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { onUpdate: onUpdate, selectedItems: selectedItems, onClose: () => setShowReAssignPopup(false) })] }));
361
+ };
362
+ export default TMQueryResultForm;
@@ -23,7 +23,9 @@ interface ITMHeader {
23
23
  onSeacrhQEValueChange?: (e: string) => void;
24
24
  onSettingsClick?: () => void;
25
25
  }
26
- export declare const TMSearchBar: ({ searchValue, onSearchValueChanged }: {
26
+ export declare const TMSearchBar: ({ searchValue, onSearchValueChanged, maxWidth, marginLeft }: {
27
+ maxWidth?: string;
28
+ marginLeft?: string;
27
29
  searchValue: string;
28
30
  onSearchValueChanged: (value: string) => void;
29
31
  }) => import("react/jsx-runtime").JSX.Element;