@topconsultnpm/sdkui-react 6.20.0-dev1.13 → 6.20.0-dev1.131
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/Toppy-help-center.png +0 -0
- package/lib/assets/headergradient.svg +87 -0
- package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +322 -30
- package/lib/components/NewComponents/ContextMenu/hooks.d.ts +8 -1
- package/lib/components/NewComponents/ContextMenu/hooks.js +80 -8
- package/lib/components/NewComponents/ContextMenu/index.d.ts +3 -0
- package/lib/components/NewComponents/ContextMenu/index.js +2 -0
- package/lib/components/NewComponents/ContextMenu/styles.d.ts +9 -1
- package/lib/components/NewComponents/ContextMenu/styles.js +146 -47
- package/lib/components/NewComponents/ContextMenu/types.d.ts +22 -3
- package/lib/components/NewComponents/ContextMenu/useLongPress.d.ts +21 -0
- package/lib/components/NewComponents/ContextMenu/useLongPress.js +112 -0
- package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +620 -125
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +25 -5
- package/lib/components/NewComponents/FloatingMenuBar/styles.js +215 -59
- package/lib/components/NewComponents/FloatingMenuBar/types.d.ts +12 -3
- package/lib/components/base/TMAccordionNew.js +35 -14
- package/lib/components/base/TMButton.js +6 -0
- package/lib/components/base/TMClosableList.js +4 -0
- package/lib/components/base/TMCustomButton.js +61 -17
- package/lib/components/base/TMDataGrid.d.ts +7 -4
- package/lib/components/base/TMDataGrid.js +153 -11
- package/lib/components/base/TMDropDownMenu.js +21 -18
- package/lib/components/base/TMFileManager.d.ts +4 -3
- package/lib/components/base/TMFileManager.js +32 -24
- package/lib/components/base/TMFileManagerDataGridView.d.ts +3 -2
- package/lib/components/base/TMFileManagerDataGridView.js +1 -11
- package/lib/components/base/TMFileManagerThumbnailItems.d.ts +7 -1
- package/lib/components/base/TMFileManagerThumbnailItems.js +5 -2
- package/lib/components/base/TMFileManagerThumbnailsView.d.ts +17 -4
- package/lib/components/base/TMFileManagerThumbnailsView.js +18 -6
- package/lib/components/base/TMFileManagerUtils.d.ts +0 -12
- package/lib/components/base/TMListView.js +33 -15
- package/lib/components/base/TMPanel.d.ts +1 -1
- package/lib/components/base/TMPanel.js +4 -2
- package/lib/components/base/TMPopUp.js +6 -0
- package/lib/components/base/TMToolbarCard.js +2 -0
- package/lib/components/base/TMTreeView.d.ts +2 -1
- package/lib/components/base/TMTreeView.js +33 -26
- package/lib/components/choosers/TMDataListItemChooser.d.ts +2 -0
- package/lib/components/choosers/TMDataListItemChooser.js +8 -2
- package/lib/components/choosers/TMDcmtTypeChooser.d.ts +1 -0
- package/lib/components/choosers/TMDcmtTypeChooser.js +11 -3
- package/lib/components/choosers/TMDistinctValues.js +2 -2
- package/lib/components/choosers/TMDynDataListItemChooser.d.ts +2 -0
- package/lib/components/choosers/TMDynDataListItemChooser.js +8 -2
- package/lib/components/choosers/TMInvoiceRetrieveFormats.js +1 -1
- package/lib/components/choosers/TMMetadataChooser.d.ts +2 -0
- package/lib/components/choosers/TMMetadataChooser.js +19 -4
- package/lib/components/choosers/TMOrderRetrieveFormats.js +1 -1
- package/lib/components/choosers/TMUserChooser.d.ts +2 -5
- package/lib/components/choosers/TMUserChooser.js +33 -47
- package/lib/components/editors/TMCheckBox.js +2 -0
- package/lib/components/editors/TMDateBox.js +18 -9
- package/lib/components/editors/TMEditorStyled.js +7 -0
- package/lib/components/editors/TMLocalizedTextBox.d.ts +3 -1
- package/lib/components/editors/TMLocalizedTextBox.js +16 -14
- package/lib/components/editors/TMMetadataEditor.d.ts +1 -0
- package/lib/components/editors/TMMetadataEditor.js +4 -4
- package/lib/components/editors/TMMetadataTextBox.d.ts +9 -0
- package/lib/components/editors/TMMetadataTextBox.js +92 -0
- package/lib/components/editors/TMMetadataValues.d.ts +2 -0
- package/lib/components/editors/TMMetadataValues.js +26 -8
- package/lib/components/editors/TMRadioButton.js +2 -0
- package/lib/components/editors/TMTextArea.js +18 -30
- package/lib/components/editors/TMTextBox.d.ts +1 -1
- package/lib/components/editors/TMTextBox.js +29 -4
- package/lib/components/editors/TMTextExpression.js +6 -91
- package/lib/components/features/archive/TMArchive.js +2 -2
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.d.ts +15 -0
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +462 -0
- package/lib/components/features/assistant/TMToppySpeechBubble.d.ts +11 -0
- package/lib/components/features/assistant/TMToppySpeechBubble.js +126 -0
- package/lib/components/features/documents/TMDcmtBlog.js +1 -1
- package/lib/components/features/documents/TMDcmtForm.d.ts +14 -2
- package/lib/components/features/documents/TMDcmtForm.js +576 -292
- package/lib/components/features/documents/TMDcmtPreview.js +42 -155
- package/lib/components/features/documents/TMDcmtTasks.js +9 -9
- package/lib/components/features/documents/TMMasterDetailDcmts.js +38 -53
- package/lib/components/features/documents/TMRelationViewer.d.ts +1 -1
- package/lib/components/features/documents/TMRelationViewer.js +2 -2
- package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +8 -0
- package/lib/components/features/search/{TMSearchResultCheckoutInfoForm.js → TMDcmtCheckoutInfoForm.js} +2 -2
- package/lib/components/features/search/TMSavedQuerySelector.js +72 -67
- package/lib/components/features/search/TMSearch.d.ts +3 -0
- package/lib/components/features/search/TMSearch.js +50 -11
- package/lib/components/features/search/TMSearchQueryEditor.d.ts +1 -0
- package/lib/components/features/search/TMSearchQueryEditor.js +10 -10
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +1 -0
- package/lib/components/features/search/TMSearchQueryPanel.js +40 -25
- package/lib/components/features/search/TMSearchResult.d.ts +3 -0
- package/lib/components/features/search/TMSearchResult.js +370 -252
- package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +3 -3
- package/lib/components/features/search/TMSearchResultsMenuItems.js +227 -171
- package/lib/components/features/search/TMSignSettingsForm.js +1 -1
- package/lib/components/features/search/TMSignatureInfoContent.d.ts +6 -0
- package/lib/components/features/search/TMSignatureInfoContent.js +140 -0
- package/lib/components/features/search/TMViewHistoryDcmt.js +47 -52
- package/lib/components/features/tasks/TMTaskForm.js +75 -25
- package/lib/components/features/tasks/TMTasksAgenda.d.ts +3 -1
- package/lib/components/features/tasks/TMTasksAgenda.js +48 -9
- package/lib/components/features/tasks/TMTasksCalendar.d.ts +2 -0
- package/lib/components/features/tasks/TMTasksCalendar.js +19 -7
- package/lib/components/features/tasks/TMTasksUtils.d.ts +2 -2
- package/lib/components/features/tasks/TMTasksUtils.js +57 -37
- package/lib/components/features/tasks/TMTasksView.js +28 -19
- package/lib/components/features/workflow/TMWorkflowPopup.d.ts +33 -2
- package/lib/components/features/workflow/TMWorkflowPopup.js +140 -34
- package/lib/components/features/workflow/diagram/DiagramItemComponent.d.ts +2 -0
- package/lib/components/features/workflow/diagram/DiagramItemComponent.js +14 -7
- package/lib/components/features/workflow/diagram/DiagramItemForm.js +1 -1
- package/lib/components/features/workflow/diagram/RecipientList.js +3 -2
- package/lib/components/features/workflow/diagram/WFDiagram.d.ts +4 -0
- package/lib/components/features/workflow/diagram/WFDiagram.js +164 -13
- package/lib/components/forms/Login/LoginValidatorService.d.ts +2 -0
- package/lib/components/forms/Login/LoginValidatorService.js +7 -2
- package/lib/components/forms/Login/TMLoginForm.js +35 -7
- package/lib/components/forms/TMChooserForm.js +1 -1
- package/lib/components/grids/TMBlogsPost.js +56 -31
- package/lib/components/grids/TMRecentsManager.js +20 -10
- package/lib/components/grids/TMValidationItemsList.js +6 -0
- package/lib/components/index.d.ts +6 -3
- package/lib/components/index.js +6 -3
- package/lib/components/layout/panelManager/TMPanelManagerContext.js +13 -5
- package/lib/components/query/TMQueryEditor.d.ts +6 -1
- package/lib/components/query/TMQueryEditor.js +105 -101
- package/lib/components/settings/SettingsAppearance.d.ts +2 -1
- package/lib/components/settings/SettingsAppearance.js +99 -30
- package/lib/components/sidebar/TMHeader.js +11 -7
- package/lib/components/sidebar/TMSidebar.d.ts +0 -1
- package/lib/components/sidebar/TMSidebar.js +16 -44
- package/lib/components/sidebar/TMSidebarItem.js +36 -17
- package/lib/components/viewers/TMDataListItemViewer.d.ts +2 -1
- package/lib/components/viewers/TMDataListItemViewer.js +35 -71
- package/lib/components/viewers/TMDataUserIdItemViewer.d.ts +8 -0
- package/lib/components/viewers/TMDataUserIdItemViewer.js +39 -0
- package/lib/css/tm-sdkui.css +1 -1
- package/lib/helper/SDKUI_Globals.d.ts +22 -0
- package/lib/helper/SDKUI_Globals.js +10 -1
- package/lib/helper/SDKUI_Localizator.d.ts +21 -3
- package/lib/helper/SDKUI_Localizator.js +196 -10
- package/lib/helper/TMCommandsContextMenu.d.ts +4 -2
- package/lib/helper/TMCommandsContextMenu.js +15 -4
- package/lib/helper/TMIcons.d.ts +4 -0
- package/lib/helper/TMIcons.js +13 -3
- package/lib/helper/TMPdfViewer.d.ts +8 -0
- package/lib/helper/TMPdfViewer.js +373 -0
- package/lib/helper/TMToppyMessage.js +4 -0
- package/lib/helper/checkinCheckoutManager.d.ts +31 -1
- package/lib/helper/checkinCheckoutManager.js +112 -30
- package/lib/helper/devextremeCustomMessages.d.ts +30 -0
- package/lib/helper/devextremeCustomMessages.js +30 -0
- package/lib/helper/helpers.d.ts +30 -2
- package/lib/helper/helpers.js +132 -4
- package/lib/helper/index.d.ts +2 -0
- package/lib/helper/index.js +2 -0
- package/lib/helper/queryHelper.d.ts +2 -2
- package/lib/helper/queryHelper.js +80 -24
- package/lib/helper/workItemsHelper.d.ts +6 -0
- package/lib/helper/workItemsHelper.js +230 -0
- package/lib/hooks/useCheckInOutOperations.d.ts +28 -0
- package/lib/hooks/useCheckInOutOperations.js +223 -0
- package/lib/hooks/useDataListItem.d.ts +12 -0
- package/lib/hooks/useDataListItem.js +132 -0
- package/lib/hooks/useDataUserIdItem.d.ts +10 -0
- package/lib/hooks/useDataUserIdItem.js +96 -0
- package/lib/hooks/useFloatingBarPinnedItems.d.ts +11 -0
- package/lib/hooks/useFloatingBarPinnedItems.js +54 -0
- package/lib/hooks/useMetadataExpression.d.ts +19 -0
- package/lib/hooks/useMetadataExpression.js +99 -0
- package/lib/hooks/useSettingsFeedback.d.ts +11 -0
- package/lib/hooks/useSettingsFeedback.js +38 -0
- package/lib/hooks/useWorkflowApprove.d.ts +4 -0
- package/lib/hooks/useWorkflowApprove.js +14 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -2
- package/lib/services/platform_services.d.ts +3 -3
- package/lib/ts/types.d.ts +61 -1
- package/lib/utils/theme.d.ts +1 -1
- package/lib/utils/theme.js +1 -1
- package/package.json +8 -6
- package/lib/components/NewComponents/Notification/Notification.d.ts +0 -4
- package/lib/components/NewComponents/Notification/Notification.js +0 -60
- package/lib/components/NewComponents/Notification/NotificationContainer.d.ts +0 -8
- package/lib/components/NewComponents/Notification/NotificationContainer.js +0 -33
- package/lib/components/NewComponents/Notification/index.d.ts +0 -2
- package/lib/components/NewComponents/Notification/index.js +0 -2
- package/lib/components/NewComponents/Notification/styles.d.ts +0 -21
- package/lib/components/NewComponents/Notification/styles.js +0 -180
- package/lib/components/NewComponents/Notification/types.d.ts +0 -18
- package/lib/components/NewComponents/Notification/types.js +0 -1
- package/lib/components/base/TMContextMenu.d.ts +0 -25
- package/lib/components/base/TMContextMenu.js +0 -109
- package/lib/components/base/TMContextMenuOLD.d.ts +0 -26
- package/lib/components/base/TMContextMenuOLD.js +0 -56
- package/lib/components/base/TMFloatingToolbar.d.ts +0 -9
- package/lib/components/base/TMFloatingToolbar.js +0 -101
- package/lib/components/features/assistant/ToppyDraggableHelpCenter.d.ts +0 -30
- package/lib/components/features/assistant/ToppyDraggableHelpCenter.js +0 -482
- package/lib/components/features/assistant/ToppySpeechBubble.d.ts +0 -9
- package/lib/components/features/assistant/ToppySpeechBubble.js +0 -117
- package/lib/components/features/search/TMSearchResultCheckoutInfoForm.d.ts +0 -8
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom DevExtreme localization messages
|
|
3
|
+
* Contains missing translations for DevExtreme components
|
|
4
|
+
*/
|
|
5
|
+
export declare const devextremeCustomMessages: {
|
|
6
|
+
de: {
|
|
7
|
+
"dxDataGrid-moveColumnToTheRight": string;
|
|
8
|
+
"dxDataGrid-moveColumnToTheLeft": string;
|
|
9
|
+
};
|
|
10
|
+
en: {
|
|
11
|
+
"dxDataGrid-moveColumnToTheRight": string;
|
|
12
|
+
"dxDataGrid-moveColumnToTheLeft": string;
|
|
13
|
+
};
|
|
14
|
+
es: {
|
|
15
|
+
"dxDataGrid-moveColumnToTheRight": string;
|
|
16
|
+
"dxDataGrid-moveColumnToTheLeft": string;
|
|
17
|
+
};
|
|
18
|
+
fr: {
|
|
19
|
+
"dxDataGrid-moveColumnToTheRight": string;
|
|
20
|
+
"dxDataGrid-moveColumnToTheLeft": string;
|
|
21
|
+
};
|
|
22
|
+
it: {
|
|
23
|
+
"dxDataGrid-moveColumnToTheRight": string;
|
|
24
|
+
"dxDataGrid-moveColumnToTheLeft": string;
|
|
25
|
+
};
|
|
26
|
+
pt: {
|
|
27
|
+
"dxDataGrid-moveColumnToTheRight": string;
|
|
28
|
+
"dxDataGrid-moveColumnToTheLeft": string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom DevExtreme localization messages
|
|
3
|
+
* Contains missing translations for DevExtreme components
|
|
4
|
+
*/
|
|
5
|
+
export const devextremeCustomMessages = {
|
|
6
|
+
"de": {
|
|
7
|
+
"dxDataGrid-moveColumnToTheRight": "Nach rechts verschieben",
|
|
8
|
+
"dxDataGrid-moveColumnToTheLeft": "Nach links verschieben"
|
|
9
|
+
},
|
|
10
|
+
"en": {
|
|
11
|
+
"dxDataGrid-moveColumnToTheRight": "Move to the right",
|
|
12
|
+
"dxDataGrid-moveColumnToTheLeft": "Move to the left"
|
|
13
|
+
},
|
|
14
|
+
"es": {
|
|
15
|
+
"dxDataGrid-moveColumnToTheRight": "Mover a la derecha",
|
|
16
|
+
"dxDataGrid-moveColumnToTheLeft": "Mover a la izquierda"
|
|
17
|
+
},
|
|
18
|
+
"fr": {
|
|
19
|
+
"dxDataGrid-moveColumnToTheRight": "Déplacer vers la droite",
|
|
20
|
+
"dxDataGrid-moveColumnToTheLeft": "Déplacer vers la gauche"
|
|
21
|
+
},
|
|
22
|
+
"it": {
|
|
23
|
+
"dxDataGrid-moveColumnToTheRight": "Sposta a destra",
|
|
24
|
+
"dxDataGrid-moveColumnToTheLeft": "Sposta a sinistra"
|
|
25
|
+
},
|
|
26
|
+
"pt": {
|
|
27
|
+
"dxDataGrid-moveColumnToTheRight": "Mover para a direita",
|
|
28
|
+
"dxDataGrid-moveColumnToTheLeft": "Mover para a esquerda"
|
|
29
|
+
}
|
|
30
|
+
};
|
package/lib/helper/helpers.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Colors as ColorsType } from "../components/base/TMEditorBase";
|
|
2
2
|
import { DeviceType } from "../components";
|
|
3
|
-
import { AppModules, DataColumnDescriptor, ITopMediaSession, MetadataDescriptor, QueryDescriptor, SearchResultDescriptor } from "@topconsultnpm/sdk-ts";
|
|
3
|
+
import { AppModules, DataColumnDescriptor, DcmtTypeDescriptor, ITopMediaSession, MetadataDescriptor, QueryDescriptor, SearchResultDescriptor, TaskDescriptor } from "@topconsultnpm/sdk-ts";
|
|
4
4
|
import { FileExtensionHandler, FormModes, moduleTypes } from "../ts";
|
|
5
5
|
declare const TABLET_WIDTH = 1024;
|
|
6
6
|
declare const MOBILE_WIDTH = 640;
|
|
@@ -37,6 +37,7 @@ export declare const extensionHandler: (fileExt: string | undefined) => FileExte
|
|
|
37
37
|
export declare const downloadBase64File: (base64Data: string, fileName: string) => void;
|
|
38
38
|
export declare const TASK_MORE_INFO_PREFIX_NAME: string;
|
|
39
39
|
export declare const isTaskMoreInfo: (taskName: string | undefined) => boolean | undefined;
|
|
40
|
+
export declare const getMoreInfoTasksForDocument: (allTasks: TaskDescriptor[], TID: number | null | undefined, DID: number | null | undefined) => TaskDescriptor[];
|
|
40
41
|
export declare const canNext: (visibleItems: any[], selectedItems: any[]) => boolean;
|
|
41
42
|
export declare const getNext: (visibleItems: any[], selectedItems: any[]) => any;
|
|
42
43
|
export declare const canPrev: (visibleItems: any[], selectedItems: any[]) => boolean;
|
|
@@ -66,7 +67,8 @@ export declare enum LandingPages {
|
|
|
66
67
|
RECENT = "recent",
|
|
67
68
|
AREA_MANAGER = "areaManager",
|
|
68
69
|
NOTIFICATIONS = "notifications",
|
|
69
|
-
ACTIVITIES = "activities"
|
|
70
|
+
ACTIVITIES = "activities",
|
|
71
|
+
WORKFLOW_CTRL = "workflowCtrl"
|
|
70
72
|
}
|
|
71
73
|
export declare function getExceptionMessage(ex: any): string;
|
|
72
74
|
export declare function getContrastColor(inputColor: string): {
|
|
@@ -89,3 +91,29 @@ export declare class AreaHelper {
|
|
|
89
91
|
static ExtractAreaInfo_1(areaPath: string): AreaValues;
|
|
90
92
|
static ExtractAreaInfo_2(areaPath: string, extractFileName: boolean): AreaValues;
|
|
91
93
|
}
|
|
94
|
+
export declare const isApprovalWorkflowView: (dtd: DcmtTypeDescriptor) => boolean;
|
|
95
|
+
export interface SessionIpInfo {
|
|
96
|
+
publicIp: string;
|
|
97
|
+
localIp: string;
|
|
98
|
+
forwardedFor: string;
|
|
99
|
+
}
|
|
100
|
+
export declare const getSessionIpInfo: () => SessionIpInfo;
|
|
101
|
+
interface BrowserAuditInfo {
|
|
102
|
+
name: string;
|
|
103
|
+
version: string;
|
|
104
|
+
os: string;
|
|
105
|
+
language: string;
|
|
106
|
+
screenWidth: number;
|
|
107
|
+
screenHeight: number;
|
|
108
|
+
viewportWidth: number;
|
|
109
|
+
viewportHeight: number;
|
|
110
|
+
colorDepth: number;
|
|
111
|
+
pixelRatio: number;
|
|
112
|
+
timezone: string;
|
|
113
|
+
cookiesEnabled: boolean;
|
|
114
|
+
onlineStatus: boolean;
|
|
115
|
+
touchSupport: boolean;
|
|
116
|
+
userAgent: string;
|
|
117
|
+
toString(): string;
|
|
118
|
+
}
|
|
119
|
+
export declare const getBrowserAuditInfo: () => BrowserAuditInfo;
|
package/lib/helper/helpers.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Colors } from "../utils/theme";
|
|
3
3
|
import { ButtonNames, DeviceType, TMExceptionBoxManager, TMMessageBoxManager, TMSpinner } from "../components";
|
|
4
|
-
import { AccessLevels, MetadataDataDomains, MetadataDataTypes, MetadataDescriptor, MetadataFormatDescriptor, MetadataFormats, MetadataPermission, SDK_Globals, SetGlobalsInfoAsync, SystemMIDs, SystemMIDsAsNumber, TopMediaServer } from "@topconsultnpm/sdk-ts";
|
|
4
|
+
import { AccessLevels, MetadataDataDomains, MetadataDataTypes, MetadataDescriptor, MetadataFormatDescriptor, MetadataFormats, MetadataPermission, SDK_Globals, SetGlobalsInfoAsync, SystemMIDs, SystemMIDsAsNumber, Task_States, TopMediaServer, WorkItemMetadataNames } from "@topconsultnpm/sdk-ts";
|
|
5
5
|
import { Buffer } from 'buffer';
|
|
6
6
|
import { buildTypes, FileExtensionHandler, FormModes, moduleTypes } from "../ts";
|
|
7
7
|
import { SDKUI_Localizator } from "./SDKUI_Localizator";
|
|
@@ -27,7 +27,7 @@ const openApps = async (appModule, tmSession, appRoutes) => {
|
|
|
27
27
|
toTMSession.SessionDescr = toSessionDescr;
|
|
28
28
|
let str = (JSON.stringify(toTMSession));
|
|
29
29
|
let sessionToBase64 = Buffer.from(str).toString("base64");
|
|
30
|
-
window.open(appRoutes?.find(route => route.appName === appModule).URL + '/Homepage' + '?session=' + sessionToBase64);
|
|
30
|
+
window.open(appRoutes?.find(route => route.appName === appModule).URL + '/Homepage' + '?session=' + encodeURIComponent(sessionToBase64));
|
|
31
31
|
}
|
|
32
32
|
catch (e) {
|
|
33
33
|
TMExceptionBoxManager.show({ exception: e.message });
|
|
@@ -505,7 +505,8 @@ export const extensionHandler = (fileExt) => {
|
|
|
505
505
|
case 'txt': return FileExtensionHandler.READY_TO_SHOW;
|
|
506
506
|
case 'config':
|
|
507
507
|
case 'cfg':
|
|
508
|
-
case 'json':
|
|
508
|
+
case 'json':
|
|
509
|
+
case 'sql': return FileExtensionHandler.READY_TO_SHOW;
|
|
509
510
|
default: return FileExtensionHandler.NONE;
|
|
510
511
|
}
|
|
511
512
|
};
|
|
@@ -531,6 +532,17 @@ export const downloadBase64File = (base64Data, fileName) => {
|
|
|
531
532
|
};
|
|
532
533
|
export const TASK_MORE_INFO_PREFIX_NAME = `${SDKUI_Localizator.MoreInformation} - `;
|
|
533
534
|
export const isTaskMoreInfo = (taskName) => taskName?.startsWith(TASK_MORE_INFO_PREFIX_NAME);
|
|
535
|
+
// Filtra i task di tipo "More Info" non completati associati a un documento specifico.
|
|
536
|
+
export const getMoreInfoTasksForDocument = (allTasks, TID, DID) => {
|
|
537
|
+
if (TID === null || DID === null)
|
|
538
|
+
return [];
|
|
539
|
+
if (TID === undefined || DID === undefined)
|
|
540
|
+
return [];
|
|
541
|
+
return allTasks.filter(task => isTaskMoreInfo(task.name) &&
|
|
542
|
+
task.state !== Task_States.Completed &&
|
|
543
|
+
task.iD1?.toString() === TID.toString() &&
|
|
544
|
+
task.iD2?.toString() === DID.toString());
|
|
545
|
+
};
|
|
534
546
|
//#region Form, Page Helpers
|
|
535
547
|
export const canNext = (visibleItems, selectedItems) => {
|
|
536
548
|
if (!visibleItems)
|
|
@@ -664,7 +676,13 @@ export const renderHighlightedText = (text, searchText, isSelected) => {
|
|
|
664
676
|
return text.split(regex).map((part, index) => regex.test(part) ? (_jsx("span", { style: { backgroundColor: isSelected ? '#6c9023' : 'yellow' }, children: part }, index)) : (part));
|
|
665
677
|
};
|
|
666
678
|
export function versionAndBuildtypeInfo(module) {
|
|
667
|
-
|
|
679
|
+
switch (module) {
|
|
680
|
+
case moduleTypes.SDK:
|
|
681
|
+
case moduleTypes.SDKUI:
|
|
682
|
+
return moduleVersion(module).replace("-hotfix.", "+hotfix").replace("-hotfix", "+hotfix");
|
|
683
|
+
default:
|
|
684
|
+
return moduleVersion(module);
|
|
685
|
+
}
|
|
668
686
|
}
|
|
669
687
|
export const getListMaxItems = (deviceType) => { return deviceType === DeviceType.MOBILE ? 8 : 12; };
|
|
670
688
|
export const svgToString = (icon) => {
|
|
@@ -710,6 +728,7 @@ export var LandingPages;
|
|
|
710
728
|
LandingPages["AREA_MANAGER"] = "areaManager";
|
|
711
729
|
LandingPages["NOTIFICATIONS"] = "notifications";
|
|
712
730
|
LandingPages["ACTIVITIES"] = "activities";
|
|
731
|
+
LandingPages["WORKFLOW_CTRL"] = "workflowCtrl";
|
|
713
732
|
})(LandingPages || (LandingPages = {}));
|
|
714
733
|
// #endregion
|
|
715
734
|
// #region Exception
|
|
@@ -850,3 +869,112 @@ export class AreaHelper {
|
|
|
850
869
|
}
|
|
851
870
|
AreaHelper.AreaPathPrefix = "tmarea:\\\\";
|
|
852
871
|
AreaHelper.AreaFolderNamePrefix = "AID_";
|
|
872
|
+
export const isApprovalWorkflowView = (dtd) => {
|
|
873
|
+
return Boolean(dtd?.isView &&
|
|
874
|
+
dtd.metadata?.some(data => data.name === WorkItemMetadataNames.WI_DID));
|
|
875
|
+
};
|
|
876
|
+
// Recupera e normalizza le informazioni IP dalla sessione corrente
|
|
877
|
+
export const getSessionIpInfo = () => {
|
|
878
|
+
// Lettura sicura del valore globale
|
|
879
|
+
const raw = SDK_Globals.tmSession?.SessionDescr?.customData2;
|
|
880
|
+
// Se non esiste, ritorna struttura vuota
|
|
881
|
+
if (!raw) {
|
|
882
|
+
return {
|
|
883
|
+
publicIp: "",
|
|
884
|
+
localIp: "",
|
|
885
|
+
forwardedFor: ""
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
try {
|
|
889
|
+
// Se è stringa, effettua il parse JSON
|
|
890
|
+
const parsed = typeof raw === "string" ? JSON.parse(raw) : raw;
|
|
891
|
+
// Normalizza i campi garantendo sempre stringhe
|
|
892
|
+
return {
|
|
893
|
+
publicIp: parsed?.publicIp ?? "",
|
|
894
|
+
localIp: parsed?.localIp ?? "",
|
|
895
|
+
forwardedFor: parsed?.forwardedFor ?? ""
|
|
896
|
+
};
|
|
897
|
+
}
|
|
898
|
+
catch {
|
|
899
|
+
// In caso di errore JSON, ritorna valori vuoti
|
|
900
|
+
return {
|
|
901
|
+
publicIp: "",
|
|
902
|
+
localIp: "",
|
|
903
|
+
forwardedFor: ""
|
|
904
|
+
};
|
|
905
|
+
}
|
|
906
|
+
};
|
|
907
|
+
export const getBrowserAuditInfo = () => {
|
|
908
|
+
// Funzione per rilevare browser e versione
|
|
909
|
+
const detectBrowser = () => {
|
|
910
|
+
const ua = navigator.userAgent;
|
|
911
|
+
if (ua.includes("Chrome") && !ua.includes("Edg")) {
|
|
912
|
+
const match = ua.match(/Chrome\/([\d.]+)/);
|
|
913
|
+
return { name: "Chrome", version: match?.[1] ?? "unknown" };
|
|
914
|
+
}
|
|
915
|
+
if (ua.includes("Edg")) {
|
|
916
|
+
const match = ua.match(/Edg\/([\d.]+)/);
|
|
917
|
+
return { name: "Edge", version: match?.[1] ?? "unknown" };
|
|
918
|
+
}
|
|
919
|
+
if (ua.includes("Firefox")) {
|
|
920
|
+
const match = ua.match(/Firefox\/([\d.]+)/);
|
|
921
|
+
return { name: "Firefox", version: match?.[1] ?? "unknown" };
|
|
922
|
+
}
|
|
923
|
+
if (ua.includes("Safari") && !ua.includes("Chrome")) {
|
|
924
|
+
const match = ua.match(/Version\/([\d.]+)/);
|
|
925
|
+
return { name: "Safari", version: match?.[1] ?? "unknown" };
|
|
926
|
+
}
|
|
927
|
+
return { name: "Unknown", version: "unknown" };
|
|
928
|
+
};
|
|
929
|
+
// Funzione per rilevare il sistema operativo (sostituisce navigator.platform deprecato)
|
|
930
|
+
const detectOS = () => {
|
|
931
|
+
const ua = navigator.userAgent;
|
|
932
|
+
if (ua.includes("Win"))
|
|
933
|
+
return "Windows";
|
|
934
|
+
if (ua.includes("Mac"))
|
|
935
|
+
return "macOS";
|
|
936
|
+
if (ua.includes("Linux"))
|
|
937
|
+
return "Linux";
|
|
938
|
+
if (ua.includes("Android"))
|
|
939
|
+
return "Android";
|
|
940
|
+
if (ua.includes("iOS") || ua.includes("iPhone") || ua.includes("iPad"))
|
|
941
|
+
return "iOS";
|
|
942
|
+
return "Unknown";
|
|
943
|
+
};
|
|
944
|
+
// Rileva supporto touch
|
|
945
|
+
const hasTouchSupport = () => {
|
|
946
|
+
return 'ontouchstart' in window || navigator.maxTouchPoints > 0;
|
|
947
|
+
};
|
|
948
|
+
const browser = detectBrowser();
|
|
949
|
+
const os = detectOS();
|
|
950
|
+
const info = {
|
|
951
|
+
name: browser.name,
|
|
952
|
+
version: browser.version,
|
|
953
|
+
os: os,
|
|
954
|
+
language: navigator.language,
|
|
955
|
+
screenWidth: screen.width,
|
|
956
|
+
screenHeight: screen.height,
|
|
957
|
+
viewportWidth: window.innerWidth,
|
|
958
|
+
viewportHeight: window.innerHeight,
|
|
959
|
+
colorDepth: screen.colorDepth,
|
|
960
|
+
pixelRatio: window.devicePixelRatio || 1,
|
|
961
|
+
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
962
|
+
cookiesEnabled: navigator.cookieEnabled,
|
|
963
|
+
onlineStatus: navigator.onLine,
|
|
964
|
+
touchSupport: hasTouchSupport(),
|
|
965
|
+
userAgent: navigator.userAgent,
|
|
966
|
+
toString() {
|
|
967
|
+
return [
|
|
968
|
+
`Browser: ${this.name} ${this.version}`,
|
|
969
|
+
`OS: ${this.os}`,
|
|
970
|
+
`Language: ${this.language}`,
|
|
971
|
+
`Timezone: ${this.timezone}`,
|
|
972
|
+
`Screen: ${this.screenWidth}x${this.screenHeight} (${this.colorDepth}bit, ${this.pixelRatio}x)`,
|
|
973
|
+
`Viewport: ${this.viewportWidth}x${this.viewportHeight}`,
|
|
974
|
+
// `Features: Cookies=${this.cookiesEnabled}, Online=${this.onlineStatus}, Touch=${this.touchSupport}`,
|
|
975
|
+
`UserAgent: ${this.userAgent}`
|
|
976
|
+
].join(' | ');
|
|
977
|
+
},
|
|
978
|
+
};
|
|
979
|
+
return info;
|
|
980
|
+
};
|
package/lib/helper/index.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export * from './queryHelper';
|
|
|
9
9
|
export * from './TMUtils';
|
|
10
10
|
export * from './TMCommandsContextMenu';
|
|
11
11
|
export * from './TMConditionalWrapper';
|
|
12
|
+
export * from './TMPdfViewer';
|
|
12
13
|
export * from './TMToppyMessage';
|
|
13
14
|
export * from './GlobalStyles';
|
|
14
15
|
export * from './checkinCheckoutManager';
|
|
16
|
+
export * from './workItemsHelper';
|
package/lib/helper/index.js
CHANGED
|
@@ -9,6 +9,8 @@ export * from './queryHelper';
|
|
|
9
9
|
export * from './TMUtils';
|
|
10
10
|
export * from './TMCommandsContextMenu';
|
|
11
11
|
export * from './TMConditionalWrapper';
|
|
12
|
+
export * from './TMPdfViewer';
|
|
12
13
|
export * from './TMToppyMessage';
|
|
13
14
|
export * from './GlobalStyles';
|
|
14
15
|
export * from './checkinCheckoutManager';
|
|
16
|
+
export * from './workItemsHelper';
|
|
@@ -12,8 +12,8 @@ export declare const addHiddenSelectItem: (select: SelectItem[], tid: number | u
|
|
|
12
12
|
export declare const prepareQdForSearchAsync: (qdInput?: QueryDescriptor, removeWhereItemNoValue?: boolean) => Promise<QueryDescriptor>;
|
|
13
13
|
export declare function addWhereClausesForConnect(qd: QueryDescriptor): void;
|
|
14
14
|
export declare function getDefaultOperator(dataDomain: MetadataDataDomains | undefined, dataType: MetadataDataTypes | undefined): QueryOperators.Equal | QueryOperators.Contain | QueryOperators.In;
|
|
15
|
-
export declare const getQD: (tid: number | undefined, easyOr: boolean) => Promise<QueryDescriptor | undefined>;
|
|
15
|
+
export declare const getQD: (tid: number | undefined, easyOr: boolean, newMaxDcmtsToBeReturned: number) => Promise<QueryDescriptor | undefined>;
|
|
16
16
|
export declare const getWorkItemSetIDAsync: (vid: number, did: number) => Promise<string | undefined>;
|
|
17
17
|
export declare const getSysAllDcmtsSQD: (tid: number | undefined, easyOr: boolean) => Promise<SavedQueryDescriptor>;
|
|
18
|
-
export declare const searchResultToMetadataValues: (tid: number | undefined, dtd: DataTableDescriptor | undefined, rows: string[], mids: number[], metadata: MetadataDescriptor[], layoutMode: LayoutModes) => MetadataValueDescriptorEx[];
|
|
18
|
+
export declare const searchResultToMetadataValues: (tid: number | undefined, dtd: DataTableDescriptor | undefined, rows: string[], mids: number[], metadata: MetadataDescriptor[], layoutMode: LayoutModes, isReadOnlyOrigin?: boolean) => MetadataValueDescriptorEx[];
|
|
19
19
|
export declare const handleArchiveVisibility: (md: MetadataDescriptor) => boolean;
|
|
@@ -2,6 +2,8 @@ import { AccessLevels, MetadataDataDomains, DcmtTypeListCacheService, SystemMIDs
|
|
|
2
2
|
import { DateDisplayTypes, Globalization } from './Globalization';
|
|
3
3
|
import { ChronologyMIDs, DraftsMIDs, MetadataValueDescriptorEx } from '../ts';
|
|
4
4
|
import { SDKUI_Localizator } from './SDKUI_Localizator';
|
|
5
|
+
import { getDcmtCicoInfo } from './checkinCheckoutManager';
|
|
6
|
+
import { SDKUI_Globals } from './SDKUI_Globals';
|
|
5
7
|
export const getTIDsByQd = (qd) => {
|
|
6
8
|
let tids = [];
|
|
7
9
|
qd?.from?.tid && tids.push({ tid: qd.from?.tid, alias: undefined });
|
|
@@ -82,6 +84,22 @@ export const prepareQdForSearchAsync = async (qdInput, removeWhereItemNoValue) =
|
|
|
82
84
|
addHiddenSelectItem(qd.select, fromTID, SystemMIDsAsNumber.IsMail);
|
|
83
85
|
addHiddenSelectItem(qd.select, fromTID, SystemMIDsAsNumber.IsSigned);
|
|
84
86
|
addHiddenSelectItem(qd.select, fromTID, SystemMIDsAsNumber.IsShared);
|
|
87
|
+
const dtd = await DcmtTypeListCacheService.GetAsync(fromTID);
|
|
88
|
+
if (dtd) {
|
|
89
|
+
const cicoInfo = getDcmtCicoInfo(dtd);
|
|
90
|
+
const canCICO = cicoInfo.CICO === 1 && cicoInfo.CanCICO === AccessLevels.Yes;
|
|
91
|
+
if (canCICO) {
|
|
92
|
+
if (!qd.select.find(o => o.mid == cicoInfo.UserID_MID) && cicoInfo.UserID_CanViewOrUpdate == AccessLevels.Yes) {
|
|
93
|
+
addHiddenSelectItem(qd.select, fromTID, cicoInfo.UserID_MID);
|
|
94
|
+
}
|
|
95
|
+
if (!qd.select.find(o => o.mid == cicoInfo.Date_MID) && cicoInfo.Date_CanViewOrUpdate == AccessLevels.Yes) {
|
|
96
|
+
addHiddenSelectItem(qd.select, fromTID, cicoInfo.Date_MID);
|
|
97
|
+
}
|
|
98
|
+
if (!qd.select.find(o => o.mid == cicoInfo.Ver_MID) && cicoInfo.Ver_CanViewOrUpdate == AccessLevels.Yes) {
|
|
99
|
+
addHiddenSelectItem(qd.select, fromTID, cicoInfo.Ver_MID);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
85
103
|
if (qd.orderBy && qd.orderBy.length <= 0) {
|
|
86
104
|
let obi = new OrderByItem();
|
|
87
105
|
obi.tid = fromTID;
|
|
@@ -164,14 +182,14 @@ export function getDefaultOperator(dataDomain, dataType) {
|
|
|
164
182
|
return QueryOperators.In;
|
|
165
183
|
return dataType == MetadataDataTypes.Varchar ? QueryOperators.Contain : QueryOperators.Equal;
|
|
166
184
|
}
|
|
167
|
-
export const getQD = async (tid, easyOr) => {
|
|
185
|
+
export const getQD = async (tid, easyOr, newMaxDcmtsToBeReturned) => {
|
|
168
186
|
let dtd = await DcmtTypeListCacheService.GetAsync(tid);
|
|
169
187
|
if (!dtd?.metadata)
|
|
170
188
|
return;
|
|
171
189
|
let qd = SearchEngine.NewQueryDescriptor();
|
|
172
190
|
qd.isDistinct = false;
|
|
173
191
|
qd.id = 1;
|
|
174
|
-
qd.maxDcmtsToBeReturned =
|
|
192
|
+
qd.maxDcmtsToBeReturned = newMaxDcmtsToBeReturned;
|
|
175
193
|
qd.from = new FromItem();
|
|
176
194
|
qd.from.tid = tid;
|
|
177
195
|
qd.select = [];
|
|
@@ -239,10 +257,10 @@ export const getSysAllDcmtsSQD = async (tid, easyOr) => {
|
|
|
239
257
|
sqd.masterTID = tid;
|
|
240
258
|
sqd.isEasyWhere = 1;
|
|
241
259
|
sqd.name = SDKUI_Localizator.AllDcmts;
|
|
242
|
-
sqd.qd = await getQD(tid, easyOr);
|
|
260
|
+
sqd.qd = await getQD(tid, easyOr, SDKUI_Globals.userSettings.searchSettings?.maxDcmtsToBeReturned ?? 1000);
|
|
243
261
|
return sqd;
|
|
244
262
|
};
|
|
245
|
-
export const searchResultToMetadataValues = (tid, dtd, rows, mids, metadata, layoutMode) => {
|
|
263
|
+
export const searchResultToMetadataValues = (tid, dtd, rows, mids, metadata, layoutMode, isReadOnlyOrigin = false) => {
|
|
246
264
|
if (!metadata || metadata.length === 0) {
|
|
247
265
|
return [];
|
|
248
266
|
}
|
|
@@ -311,31 +329,69 @@ export const searchResultToMetadataValues = (tid, dtd, rows, mids, metadata, lay
|
|
|
311
329
|
mvd.customName = SDKUI_Localizator.Author;
|
|
312
330
|
mvd.isReadOnly = true;
|
|
313
331
|
break;
|
|
332
|
+
case ChronologyMIDs.CheckInTime:
|
|
333
|
+
mvd.customName = SDKUI_Localizator.LastUpdateTime;
|
|
334
|
+
mvd.isReadOnly = true;
|
|
335
|
+
break;
|
|
336
|
+
case SystemMIDsAsNumber.FileExt:
|
|
337
|
+
mvd.customName = SDKUI_Localizator.Extension;
|
|
338
|
+
mvd.isReadOnly = true;
|
|
339
|
+
break;
|
|
340
|
+
case SystemMIDsAsNumber.FileSize:
|
|
341
|
+
mvd.customName = SDKUI_Localizator.File_Size;
|
|
342
|
+
mvd.isReadOnly = true;
|
|
343
|
+
break;
|
|
314
344
|
}
|
|
315
345
|
}
|
|
316
346
|
return mvd;
|
|
317
347
|
};
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
const
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
348
|
+
// Caso: il documento proviene da un'origine esterna e non può essere modificato
|
|
349
|
+
// Documento esterno: visualizza tutti i metadati non di sistema come read-only
|
|
350
|
+
if (isReadOnlyOrigin) {
|
|
351
|
+
const columns = dtd?.columns || [];
|
|
352
|
+
const rows = dtd?.rows ?? [];
|
|
353
|
+
// Itera su ogni colonna per costruire la metadata read-only
|
|
354
|
+
columns.forEach((col, index) => {
|
|
355
|
+
// MID: identificatore unico della colonna
|
|
356
|
+
const mid = Number(col.extendedProperties?.MID);
|
|
357
|
+
// Solo se MID > 100 (per escludere i metadati di sistema)
|
|
358
|
+
if (mid > 100 && rows[0] && rows[0][index]) {
|
|
359
|
+
// Cerca nei metadata se esiste un oggetto corrispondente a questo MID
|
|
360
|
+
const md = metadata.find(m => m.fromMID === mid);
|
|
361
|
+
if (!md)
|
|
362
|
+
return;
|
|
363
|
+
// Crea le proprietà del metadata impostando isReadOnly a true
|
|
364
|
+
const metadataProps = createMetadataProps(tid, md, rows[0][index], 0);
|
|
365
|
+
metadataProps.isReadOnly = true;
|
|
366
|
+
// Aggiunge l'oggetto read-only alla lista di output
|
|
367
|
+
outputMetadataList.push(metadataProps);
|
|
330
368
|
}
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
else {
|
|
372
|
+
// Caso: documento locale/modificabile
|
|
373
|
+
metadata.forEach(md => {
|
|
374
|
+
if (!md.id)
|
|
375
|
+
return;
|
|
376
|
+
if (layoutMode === LayoutModes.Ark && !handleArchiveVisibility(md))
|
|
377
|
+
return;
|
|
378
|
+
if (!rows)
|
|
379
|
+
return;
|
|
380
|
+
if (mids.length > 0) {
|
|
381
|
+
const index = mids.indexOf(md.id);
|
|
382
|
+
if (index >= 0) {
|
|
383
|
+
const isLexProt = (isLexProtIndex !== undefined && rows[isLexProtIndex]) ? (parseInt(rows[isLexProtIndex]) || undefined) : undefined;
|
|
384
|
+
outputMetadataList.push(createMetadataProps(tid, md, rows[index], isLexProt));
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
let defaultValue;
|
|
389
|
+
if (layoutMode === LayoutModes.Ark && (md.dataDomain === MetadataDataDomains.DataList || md.dataDomain === MetadataDataDomains.DynamicDataList || md.dataDomain === MetadataDataDomains.UserID))
|
|
390
|
+
defaultValue = md.defaultValue;
|
|
391
|
+
outputMetadataList.push(createMetadataProps(tid, md, defaultValue, undefined));
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
}
|
|
339
395
|
return outputMetadataList;
|
|
340
396
|
};
|
|
341
397
|
export const handleArchiveVisibility = (md) => {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IWorkItemData, WFInstanceDescriptor } from '../ts';
|
|
2
|
+
/**
|
|
3
|
+
* Helper function per costruire IWorkItemData da un WFInstanceDescriptor
|
|
4
|
+
* Effettua le chiamate API necessarie e popola tutti i campi disponibili
|
|
5
|
+
*/
|
|
6
|
+
export declare const buildWorkItemsFromWFCtrl: (wfInstance: WFInstanceDescriptor) => Promise<IWorkItemData[]>;
|