@topconsultnpm/sdkui-react-beta 6.6.47 → 6.6.49
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/assets/TopMediaOrchestrator6.svg +92 -92
- package/lib/assets/icomoon.svg +96 -96
- package/lib/components/base/Styled.d.ts +22 -1919
- package/lib/components/base/TMAlert.d.ts +2 -3
- package/lib/components/base/TMButton.d.ts +7 -7
- package/lib/components/base/TMContextMenuOLD.d.ts +3 -274
- package/lib/components/base/TMDropDownMenu.d.ts +0 -1
- package/lib/components/base/TMEditorBase.d.ts +0 -1
- package/lib/components/base/TMLayout.d.ts +36 -36
- package/lib/components/base/TMListView.d.ts +0 -1
- package/lib/components/base/TMTab.d.ts +4 -4
- package/lib/components/base/TMVilViewer.d.ts +1 -1
- package/lib/components/choosers/TMUserChooser.d.ts +5 -5
- package/lib/components/editors/TMEditorStyled.d.ts +16 -17
- package/lib/components/forms/TMLoginForm.d.ts +4 -4
- package/lib/components/query/TMQueryEditor.d.ts +8 -550
- package/lib/components/query/TMQueryResult.d.ts +5 -5
- package/lib/components/query/TMQueryResultForm.d.ts +10 -10
- package/lib/components/query/TMQueryResultForm.js +29 -10
- package/lib/components/sidebar/TMHeader.d.ts +2 -2
- package/lib/components/viewers/TMDataListItemViewer.d.ts +3 -3
- package/lib/components/viewers/TMMidViewer.d.ts +5 -5
- package/lib/components/viewers/TMTidViewer.d.ts +5 -5
- package/lib/helper/helpers.d.ts +1 -1
- package/lib/hooks/useForm.d.ts +0 -1
- package/lib/hooks/useOutsideClick.d.ts +0 -1
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@ import { useEffect, useState } from 'react';
|
|
|
3
3
|
import { SDK_Globals, AppModules } from '@topconsultnpm/sdk-ts-beta';
|
|
4
4
|
import TMQueryResult from './TMQueryResult';
|
|
5
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 } from '../../helper';
|
|
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
7
|
import { FormModes } from '../../ts';
|
|
8
8
|
import { TMColors } from '../../utils/theme';
|
|
9
9
|
import { StyledBadge } from '../base/Styled';
|
|
@@ -221,13 +221,29 @@ const TMQueryResultForm = ({ onUpdate, isModal, onClose, context = SearchResultC
|
|
|
221
221
|
_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' : '')
|
|
222
222
|
];
|
|
223
223
|
const [toolbar, setToolbar] = useState(toolbarElements);
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
224
|
+
let width = useWindowWidth();
|
|
225
|
+
let isMobile = width <= MOBILE_WIDTH;
|
|
226
|
+
useEffect(() => { if (isMobile) {
|
|
227
|
+
setCurrentSearchResult1(undefined);
|
|
228
|
+
setCurrentSearchResult2(undefined);
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
if (Array.isArray(result1)) {
|
|
232
|
+
setCurrentSearchResult1(orderByName(result1)[0]);
|
|
233
|
+
}
|
|
234
|
+
;
|
|
235
|
+
if (Array.isArray(result2)) {
|
|
236
|
+
setCurrentSearchResult2(orderByName(result2)[0]);
|
|
237
|
+
}
|
|
238
|
+
} }, [isMobile, result1, result2]);
|
|
227
239
|
useEffect(() => {
|
|
228
240
|
let arr = [...toolbarElements];
|
|
229
|
-
|
|
230
|
-
|
|
241
|
+
if (isMobile && hasBack) {
|
|
242
|
+
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"));
|
|
243
|
+
}
|
|
244
|
+
if (!isMobile || !hasBack) {
|
|
245
|
+
arr = arr.filter(item => item.key !== 'btn00');
|
|
246
|
+
}
|
|
231
247
|
if (context === SearchResultContext.METADATA_SEARCH) {
|
|
232
248
|
arr = arr.filter(item => item.key !== 'btn14');
|
|
233
249
|
arr = arr.filter(item => item.key !== 'btn5');
|
|
@@ -255,7 +271,7 @@ const TMQueryResultForm = ({ onUpdate, isModal, onClose, context = SearchResultC
|
|
|
255
271
|
arr = arr.filter(item => item.key !== 'title1');
|
|
256
272
|
}
|
|
257
273
|
setToolbar(arr);
|
|
258
|
-
}, [context, selectedItems, hasBack]);
|
|
274
|
+
}, [context, selectedItems, isMobile, hasBack]);
|
|
259
275
|
useEffect(() => {
|
|
260
276
|
let c = 0;
|
|
261
277
|
if (Array.isArray(result1)) {
|
|
@@ -291,14 +307,17 @@ const TMQueryResultForm = ({ onUpdate, isModal, onClose, context = SearchResultC
|
|
|
291
307
|
// window.addEventListener('keydown', handleTabChange)
|
|
292
308
|
// return () => window.removeEventListener('keydown', handleTabChange)
|
|
293
309
|
// }, [selectedTabIndex])
|
|
294
|
-
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 ? [] : context !== SearchResultContext.METADATA_SEARCH && !hasBack ? mobileHeaderTitle : toolbar, children: [Array.isArray(result1)
|
|
310
|
+
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)
|
|
295
311
|
?
|
|
296
|
-
_jsxs(TMSplitterLayout, { direction: 'horizontal', min: ['0', '0'], start: ['20%', '80%'], 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) {
|
|
312
|
+
_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) {
|
|
297
313
|
setCurrentSearchResult1(e);
|
|
298
314
|
}
|
|
299
315
|
else {
|
|
300
316
|
setCurrentSearchResult2(e);
|
|
301
|
-
} ;
|
|
317
|
+
} ; if (isMobile) {
|
|
318
|
+
setSplitterSize(['0', '100%']);
|
|
319
|
+
setHasBack(true);
|
|
320
|
+
} }, 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 })] })] })
|
|
302
321
|
:
|
|
303
322
|
_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) })] }));
|
|
304
323
|
};
|
|
@@ -24,8 +24,8 @@ interface ITMHeader {
|
|
|
24
24
|
onSettingsClick?: () => void;
|
|
25
25
|
}
|
|
26
26
|
export declare const TMSearchBar: ({ searchValue, onSearchValueChanged, maxWidth, marginLeft }: {
|
|
27
|
-
maxWidth?: string
|
|
28
|
-
marginLeft?: string
|
|
27
|
+
maxWidth?: string;
|
|
28
|
+
marginLeft?: string;
|
|
29
29
|
searchValue: string;
|
|
30
30
|
onSearchValueChanged: (value: string) => void;
|
|
31
31
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DataListViewModes } from '@topconsultnpm/sdk-ts-beta';
|
|
2
2
|
import { DataGridTypes } from 'devextreme-react/cjs/data-grid';
|
|
3
3
|
declare const TMDataListItemViewer: ({ dataListId, value, viewMode }: {
|
|
4
|
-
dataListId?: number
|
|
5
|
-
value?: string
|
|
6
|
-
viewMode?: DataListViewModes
|
|
4
|
+
dataListId?: number;
|
|
5
|
+
value?: string;
|
|
6
|
+
viewMode?: DataListViewModes;
|
|
7
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default TMDataListItemViewer;
|
|
9
9
|
export declare const cellRenderDataListItem: (data: DataGridTypes.ColumnCellTemplateData, dataListId?: number, viewMode?: DataListViewModes) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,12 +3,12 @@ import { ITopMediaSession, MetadataDescriptor } from '@topconsultnpm/sdk-ts-beta
|
|
|
3
3
|
import { TID_MID } from '../../ts';
|
|
4
4
|
import { DataGridTypes } from 'devextreme-react/cjs/data-grid';
|
|
5
5
|
export declare const TMMidViewer: ({ tmSession, tid_mid, showCompleteName, showIcon, showId, noneSelectionText }: {
|
|
6
|
-
tmSession?: ITopMediaSession
|
|
6
|
+
tmSession?: ITopMediaSession;
|
|
7
7
|
tid_mid: TID_MID | undefined;
|
|
8
|
-
showCompleteName?: boolean
|
|
9
|
-
showIcon?: boolean
|
|
10
|
-
showId?: boolean
|
|
11
|
-
noneSelectionText?: string
|
|
8
|
+
showCompleteName?: boolean;
|
|
9
|
+
showIcon?: boolean;
|
|
10
|
+
showId?: boolean;
|
|
11
|
+
noneSelectionText?: string;
|
|
12
12
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
interface ITMMetadataIcon {
|
|
14
14
|
tid: number | undefined;
|
|
@@ -11,11 +11,11 @@ interface ITMDcmtTypeTooltip {
|
|
|
11
11
|
}
|
|
12
12
|
export declare const TMDcmtTypeTooltip: React.FC<ITMDcmtTypeTooltip>;
|
|
13
13
|
declare const TMTidViewer: ({ tmSession, tid, showIcon, showId, noneSelectionText }: {
|
|
14
|
-
tmSession?: ITopMediaSession
|
|
15
|
-
tid?: number
|
|
16
|
-
showIcon?: boolean
|
|
17
|
-
showId?: boolean
|
|
18
|
-
noneSelectionText?: string
|
|
14
|
+
tmSession?: ITopMediaSession;
|
|
15
|
+
tid?: number;
|
|
16
|
+
showIcon?: boolean;
|
|
17
|
+
showId?: boolean;
|
|
18
|
+
noneSelectionText?: string;
|
|
19
19
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export default TMTidViewer;
|
|
21
21
|
export declare const cellRenderTID: (data: DataGridTypes.ColumnCellTemplateData, noneSelectionText?: string) => import("react/jsx-runtime").JSX.Element;
|
package/lib/helper/helpers.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { AppModules, DataColumnDescriptor, ITopMediaSession, QueryDescriptor, Se
|
|
|
3
3
|
import { FormModes } from "../ts";
|
|
4
4
|
declare const TABLET_WIDTH = 1024;
|
|
5
5
|
declare const MOBILE_WIDTH = 640;
|
|
6
|
-
declare const calcResponsiveDirection: (currentWidth: number, desktopDir:
|
|
6
|
+
declare const calcResponsiveDirection: (currentWidth: number, desktopDir: "horizontal" | "vertical", tabletDir: "horizontal" | "vertical", mobileDir: "horizontal" | "vertical") => "horizontal" | "vertical";
|
|
7
7
|
declare const openApps: (appModule: AppModules, tmSession: ITopMediaSession, appRoutes?: any[]) => Promise<void>;
|
|
8
8
|
export declare const setSDK_GlobalsInfoAsync: (tms: ITopMediaSession | undefined) => Promise<ITopMediaSession>;
|
|
9
9
|
declare const calcResponsiveSizes: (currentWidth: number, desktopSize: string, tabletSize: string, mobileSize: string) => string;
|
package/lib/hooks/useForm.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topconsultnpm/sdkui-react-beta",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.49",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"lib"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@topconsultnpm/sdk-ts-beta": "^6.6.
|
|
31
|
+
"@topconsultnpm/sdk-ts-beta": "^6.6.12",
|
|
32
32
|
"buffer": "^6.0.3",
|
|
33
33
|
"devextreme": "24.1.6",
|
|
34
34
|
"devextreme-react": "24.1.6",
|