@topconsultnpm/sdkui-react 6.20.0-test1 → 6.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/NewComponents/ContextMenu/styles.d.ts +3 -1
- package/lib/components/NewComponents/ContextMenu/styles.js +7 -5
- package/lib/components/base/Styled.d.ts +4 -1
- package/lib/components/base/Styled.js +11 -3
- package/lib/components/base/TMPanel.js +6 -4
- package/lib/components/base/TMPopUp.js +4 -0
- package/lib/components/base/TMTreeView.d.ts +3 -1
- package/lib/components/base/TMTreeView.js +68 -21
- package/lib/components/choosers/TMDataListItemChooser.js +1 -1
- package/lib/components/choosers/TMDataListItemEditor.d.ts +11 -0
- package/lib/components/choosers/TMDataListItemEditor.js +130 -0
- package/lib/components/choosers/TMDataListItemFields.d.ts +11 -0
- package/lib/components/choosers/TMDataListItemFields.js +61 -0
- package/lib/components/choosers/TMDataListItemPicker.d.ts +2 -0
- package/lib/components/choosers/TMDataListItemPicker.js +182 -18
- package/lib/components/choosers/TMDynDataListItemChooser.js +11 -6
- package/lib/components/choosers/TMImageIDChooser.d.ts +16 -0
- package/lib/components/choosers/TMImageIDChooser.js +53 -0
- package/lib/components/choosers/TMMetadataChooser.js +1 -1
- package/lib/components/choosers/TMUserChooser.js +1 -1
- package/lib/components/editors/TMDateBox.js +1 -1
- package/lib/components/editors/TMHtmlEditor.js +1 -1
- package/lib/components/editors/TMLocalizedTextBox.d.ts +1 -0
- package/lib/components/editors/TMLocalizedTextBox.js +3 -3
- package/lib/components/editors/TMMetadataValues.js +203 -41
- package/lib/components/editors/TMTextArea.d.ts +1 -0
- package/lib/components/editors/TMTextArea.js +6 -6
- package/lib/components/editors/TMTextBox.js +9 -10
- package/lib/components/features/archive/TMArchive.d.ts +3 -1
- package/lib/components/features/archive/TMArchive.js +31 -44
- package/lib/components/features/blog/TMBlogCommentForm.d.ts +3 -0
- package/lib/components/features/blog/TMBlogCommentForm.js +42 -36
- package/lib/components/features/documents/TMDcmtForm.d.ts +3 -1
- package/lib/components/features/documents/TMDcmtForm.js +215 -54
- package/lib/components/features/documents/TMDcmtPreview.js +66 -13
- package/lib/components/features/documents/TMDcmtTasks.d.ts +3 -1
- package/lib/components/features/documents/TMDcmtTasks.js +2 -2
- package/lib/components/features/documents/TMFileUploader.d.ts +5 -0
- package/lib/components/features/documents/TMFileUploader.js +28 -6
- package/lib/components/features/documents/TMMasterDetailDcmts.js +31 -85
- package/lib/components/features/documents/TMRelationViewer.d.ts +7 -1
- package/lib/components/features/documents/TMRelationViewer.js +497 -111
- package/lib/components/features/search/TMSearchQueryPanel.js +6 -6
- package/lib/components/features/search/TMSearchResult.d.ts +2 -0
- package/lib/components/features/search/TMSearchResult.js +106 -86
- package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +1 -1
- package/lib/components/features/search/TMSearchResultsMenuItems.js +6 -18
- package/lib/components/features/search/TMSignatureInfoContent.js +10 -6
- package/lib/components/features/search/TMTreeSelector.js +1 -1
- package/lib/components/features/tasks/TMTaskForm.d.ts +1 -0
- package/lib/components/features/tasks/TMTaskForm.js +61 -193
- package/lib/components/features/tasks/TMTaskFormUtils.d.ts +80 -0
- package/lib/components/features/tasks/TMTaskFormUtils.js +559 -0
- package/lib/components/features/tasks/TMTasksUtils.d.ts +3 -1
- package/lib/components/features/tasks/TMTasksUtils.js +46 -16
- package/lib/components/features/tasks/TMTasksUtilsView.d.ts +0 -7
- package/lib/components/features/tasks/TMTasksUtilsView.js +7 -14
- package/lib/components/features/tasks/TMTasksView.js +5 -3
- package/lib/components/features/workflow/TMWorkflowPopup.d.ts +20 -3
- package/lib/components/features/workflow/TMWorkflowPopup.js +21 -109
- package/lib/components/features/workflow/diagram/ConnectionComponent.d.ts +1 -0
- package/lib/components/features/workflow/diagram/ConnectionComponent.js +6 -2
- package/lib/components/features/workflow/diagram/DiagramItemForm.d.ts +2 -0
- package/lib/components/features/workflow/diagram/DiagramItemForm.js +32 -25
- package/lib/components/features/workflow/diagram/RecipientList.d.ts +3 -1
- package/lib/components/features/workflow/diagram/RecipientList.js +13 -9
- package/lib/components/features/workflow/diagram/WFDiagram.js +102 -5
- package/lib/components/features/workflow/diagram/workflowHelpers.js +31 -19
- package/lib/components/forms/Login/TMLoginForm.js +1 -1
- package/lib/components/forms/TMSaveForm.js +61 -13
- package/lib/components/grids/TMBlogsPost.js +8 -8
- package/lib/components/grids/TMBlogsPostUtils.js +2 -2
- package/lib/components/grids/TMRecentsManager.js +1 -1
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.js +2 -0
- package/lib/components/layout/panelManager/TMPanelManagerContainer.js +3 -2
- package/lib/components/pages/TMPage.js +4 -0
- package/lib/components/query/TMQueryEditor.d.ts +1 -0
- package/lib/components/query/TMQueryEditor.js +3 -3
- package/lib/components/viewers/TMMidViewer.js +2 -1
- package/lib/components/viewers/TMTidViewer.js +7 -3
- package/lib/helper/Enum_Localizator.js +5 -0
- package/lib/helper/GlobalStyles.js +3 -0
- package/lib/helper/SDKUI_Globals.d.ts +12 -0
- package/lib/helper/SDKUI_Globals.js +21 -1
- package/lib/helper/SDKUI_Localizator.d.ts +31 -7
- package/lib/helper/SDKUI_Localizator.js +286 -46
- package/lib/helper/TMIcons.d.ts +2 -1
- package/lib/helper/TMIcons.js +4 -1
- package/lib/helper/TMUtils.d.ts +33 -41
- package/lib/helper/TMUtils.js +157 -170
- package/lib/helper/helpers.d.ts +6 -2
- package/lib/helper/helpers.js +24 -8
- package/lib/helper/index.d.ts +1 -0
- package/lib/helper/index.js +1 -0
- package/lib/helper/queryHelper.js +1 -1
- package/lib/hooks/useBetaFeatures.d.ts +1 -0
- package/lib/hooks/useBetaFeatures.js +41 -0
- package/lib/hooks/useDataUserIdItem.js +2 -2
- package/lib/hooks/useDcmtOperations.js +14 -2
- package/lib/hooks/useRelatedDocuments.js +64 -42
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/services/platform_services.d.ts +1 -1
- package/lib/services/platform_services.js +4 -0
- package/lib/ts/types.d.ts +3 -0
- package/package.json +2 -2
- package/lib/components/features/search/TMSignSettingsForm.d.ts +0 -9
- package/lib/components/features/search/TMSignSettingsForm.js +0 -621
|
@@ -28,8 +28,7 @@ const getNonDirectoryFiles = (items, exclude) => {
|
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
30
|
const TMBlogCommentForm = (props) => {
|
|
31
|
-
const maxLength = 1000;
|
|
32
|
-
const { participants, selectedAttachments, selectedAttachmentDid, allFileItems, allArchivedDocumentsFileItems = [], onClose, context, showAttachmentsSection = true, removeAndEditAttachment = true, onFilterCreated, refreshCallback, isCommentRequired = false } = props;
|
|
31
|
+
const { participants, selectedAttachments, selectedAttachmentDid, allFileItems, allArchivedDocumentsFileItems = [], onClose, context, showAttachmentsSection = true, removeAndEditAttachment = true, onFilterCreated, refreshCallback, isCommentRequired = false, maxLength = 1000, onCustomSave } = props;
|
|
33
32
|
// Initialize state with combined array
|
|
34
33
|
const [dataSource, setDataSource] = useState(() => [...getNonDirectoryFiles(allFileItems?.items || [], []), ...allArchivedDocumentsFileItems]);
|
|
35
34
|
const [isEditorEnabled, setIsEditorEnabled] = useState(true);
|
|
@@ -101,14 +100,6 @@ const TMBlogCommentForm = (props) => {
|
|
|
101
100
|
try {
|
|
102
101
|
// Show a loading spinner with a localized description
|
|
103
102
|
TMSpinner.show({ description: SDKUI_Localizator.Comment });
|
|
104
|
-
// Exit early if the engine or its required identifiers are undefined
|
|
105
|
-
if (context.object === undefined
|
|
106
|
-
|| (context.engine === 'WorkingGroupEngine' && !context.object.id)
|
|
107
|
-
|| (context.engine === 'SearchEngine' && (!context.object.tid || !context.object.did))
|
|
108
|
-
|| (context.engine === 'DossierEngine' && !context.object.id)) {
|
|
109
|
-
TMSpinner.hide();
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
103
|
// Create a new BlogPost object
|
|
113
104
|
const blogPost = new BlogPost();
|
|
114
105
|
// Retrieve the comment from formData, or use an empty string if undefined
|
|
@@ -132,36 +123,51 @@ const TMBlogCommentForm = (props) => {
|
|
|
132
123
|
});
|
|
133
124
|
blogPost.attachments = attachment;
|
|
134
125
|
}
|
|
135
|
-
if (
|
|
136
|
-
//
|
|
137
|
-
|
|
138
|
-
// Call the BlogPostAddAsync method to add the blog post to the working group
|
|
139
|
-
const newBlogPostId = await workingGroupEngine.BlogPostAddAsync(context.object.id, blogPost);
|
|
126
|
+
if (onCustomSave) {
|
|
127
|
+
// Use the external save handler - logic is managed externally
|
|
128
|
+
await onCustomSave(blogPost);
|
|
140
129
|
await refreshCallback?.();
|
|
141
|
-
if (newBlogPostId && onFilterCreated) {
|
|
142
|
-
onFilterCreated(post => post.id === newBlogPostId);
|
|
143
|
-
}
|
|
144
|
-
;
|
|
145
130
|
}
|
|
146
|
-
else
|
|
147
|
-
//
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
131
|
+
else {
|
|
132
|
+
// Validate context only when using internal engine logic
|
|
133
|
+
if (context.object === undefined
|
|
134
|
+
|| (context.engine === 'WorkingGroupEngine' && !context.object.id)
|
|
135
|
+
|| (context.engine === 'SearchEngine' && (!context.object.tid || !context.object.did))
|
|
136
|
+
|| (context.engine === 'DossierEngine' && !context.object.id)) {
|
|
137
|
+
TMSpinner.hide();
|
|
138
|
+
return;
|
|
153
139
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
140
|
+
if (context.engine === 'WorkingGroupEngine' && context.object && context.object.id) {
|
|
141
|
+
// Create an instance of WorkingGroupEngine to interact with the working group
|
|
142
|
+
const workingGroupEngine = new WorkingGroupEngine(SDK_Globals.tmSession);
|
|
143
|
+
// Call the BlogPostAddAsync method to add the blog post to the working group
|
|
144
|
+
const newBlogPostId = await workingGroupEngine.BlogPostAddAsync(context.object.id, blogPost);
|
|
145
|
+
await refreshCallback?.();
|
|
146
|
+
if (newBlogPostId && onFilterCreated) {
|
|
147
|
+
onFilterCreated(post => post.id === newBlogPostId);
|
|
148
|
+
}
|
|
149
|
+
;
|
|
150
|
+
}
|
|
151
|
+
else if (context.engine === 'SearchEngine') {
|
|
152
|
+
// Create an instance of SearchEngine
|
|
153
|
+
const searchEngine = SDK_Globals.tmSession?.NewSearchEngine();
|
|
154
|
+
const newBlogPostId = await searchEngine.BlogPostAddAsync(context.object.tid, context.object.did, cleanComment);
|
|
155
|
+
await refreshCallback?.();
|
|
156
|
+
if (newBlogPostId && onFilterCreated) {
|
|
157
|
+
onFilterCreated(post => post.id === newBlogPostId);
|
|
158
|
+
}
|
|
159
|
+
;
|
|
160
|
+
}
|
|
161
|
+
else if (context.engine === 'DossierEngine' && context.object && context.object.id) {
|
|
162
|
+
// Create an instance of DossierEngine
|
|
163
|
+
const dossierEngine = SDK_Globals.tmSession?.NewDossierEngine();
|
|
164
|
+
const newBlogPostId = await dossierEngine.BlogPostAddAsync(context.object.id, blogPost);
|
|
165
|
+
await refreshCallback?.();
|
|
166
|
+
if (newBlogPostId && onFilterCreated) {
|
|
167
|
+
onFilterCreated(post => post.id === newBlogPostId);
|
|
168
|
+
}
|
|
169
|
+
;
|
|
163
170
|
}
|
|
164
|
-
;
|
|
165
171
|
}
|
|
166
172
|
}
|
|
167
173
|
catch (e) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { HomeBlogPost, LayoutModes, ObjectRef, SearchResultDescriptor, TaskDescriptor, ValidationItem } from '@topconsultnpm/sdk-ts';
|
|
2
|
+
import { DcmtTypeDescriptor, HomeBlogPost, LayoutModes, ObjectRef, SearchResultDescriptor, TaskDescriptor, ValidationItem } from '@topconsultnpm/sdk-ts';
|
|
3
3
|
import { DcmtInfo, FormModes, MetadataValueDescriptorEx, TaskContext } from '../../../ts';
|
|
4
4
|
/**
|
|
5
5
|
* Definisce il contesto da cui è stato invocato il TMDcmtForm.
|
|
@@ -62,6 +62,7 @@ interface ITMDcmtFormProps {
|
|
|
62
62
|
onOpenS4TViewerRequest?: (dcmtInfo: Array<DcmtInfo>, onRefreshSearchAsync?: (() => Promise<void>)) => void;
|
|
63
63
|
s4TViewerDialogComponent?: React.ReactNode;
|
|
64
64
|
enableDragDropOverlay?: boolean;
|
|
65
|
+
onScanRequest?: (onFileScanned: (file: File) => void) => void;
|
|
65
66
|
passToSearch?: (outputMids: Array<{
|
|
66
67
|
mid: number;
|
|
67
68
|
value: string;
|
|
@@ -71,6 +72,7 @@ interface ITMDcmtFormProps {
|
|
|
71
72
|
sharedSourceDID?: number;
|
|
72
73
|
allowButtonsRefs?: boolean;
|
|
73
74
|
onReferenceClick?: (ref: ObjectRef) => void;
|
|
75
|
+
openPdfEditor?: (fromDTD?: DcmtTypeDescriptor, file?: File | null, handleFile?: (file: File) => void) => void;
|
|
74
76
|
}
|
|
75
77
|
declare const TMDcmtForm: React.FC<ITMDcmtFormProps>;
|
|
76
78
|
export default TMDcmtForm;
|