@topconsultnpm/sdkui-react-beta 6.14.47 → 6.14.48
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/features/blog/TMBlogCommentForm.d.ts +16 -0
- package/lib/components/features/blog/TMBlogCommentForm.js +316 -0
- package/lib/components/features/documents/TMDcmtBlog.js +37 -20
- package/lib/components/grids/TMBlogs.d.ts +4 -3
- package/lib/components/grids/TMBlogs.js +36 -18
- package/lib/components/grids/TMBlogsUtils.d.ts +8 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +2 -0
- package/lib/helper/SDKUI_Localizator.d.ts +6 -0
- package/lib/helper/SDKUI_Localizator.js +60 -0
- package/package.json +2 -2
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { UserDescriptor } from "@topconsultnpm/sdk-ts-beta";
|
|
2
|
+
import { FileItem } from '../../base/TMFileManager';
|
|
3
|
+
import { TMBlogContextDescriptor } from '../../grids/TMBlogsUtils';
|
|
4
|
+
interface TMBlogCommentFormProps {
|
|
5
|
+
context: TMBlogContextDescriptor;
|
|
6
|
+
participants: Array<UserDescriptor>;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
refreshCallback: () => void;
|
|
9
|
+
showAttachmentsSection?: boolean;
|
|
10
|
+
selectedAttachments?: Array<FileItem>;
|
|
11
|
+
selectedAttachmentDid?: number;
|
|
12
|
+
allFileItems?: FileItem;
|
|
13
|
+
allArchivedDocumentsFileItems?: Array<FileItem>;
|
|
14
|
+
}
|
|
15
|
+
declare const TMBlogCommentForm: (props: TMBlogCommentFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default TMBlogCommentForm;
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import { BlogPost, BlogPostAttachment, ResultTypes, SDK_Globals, SDK_Localizator, ValidationItem, WorkingGroupEngine } from "@topconsultnpm/sdk-ts-beta";
|
|
4
|
+
import { SDKUI_Localizator, calcResponsiveSizes, calcIsModified, formatBytes, Globalization, getFileIcon, IconAttachment } from '../../../helper';
|
|
5
|
+
import { useSaveForm, SaveFormOptions } from '../../../hooks/useForm';
|
|
6
|
+
import { FormModes } from '../../../ts';
|
|
7
|
+
import TMButton from '../../base/TMButton';
|
|
8
|
+
import { useDeviceType } from '../../base/TMDeviceProvider';
|
|
9
|
+
import { TMExceptionBoxManager, TMMessageBoxManager, ButtonNames } from '../../base/TMPopUp';
|
|
10
|
+
import TMSpinner from '../../base/TMSpinner';
|
|
11
|
+
import TMTooltip from '../../base/TMTooltip';
|
|
12
|
+
import TMUserAvatar from '../../base/TMUserAvatar';
|
|
13
|
+
import TMHtmlEditor from '../../editors/TMHtmlEditor';
|
|
14
|
+
import TMChooserForm from '../../forms/TMChooserForm';
|
|
15
|
+
import { TMResultManager } from '../../forms/TMResultDialog';
|
|
16
|
+
import TMSaveForm from '../../forms/TMSaveForm';
|
|
17
|
+
const getNonDirectoryFiles = (items, exclude) => {
|
|
18
|
+
const excludeIds = new Set(exclude.map(item => item.id));
|
|
19
|
+
return items.flatMap((item) => {
|
|
20
|
+
if (item.isDirectory && item.items) {
|
|
21
|
+
return getNonDirectoryFiles(item.items, exclude);
|
|
22
|
+
}
|
|
23
|
+
else if (!item.isDirectory && !excludeIds.has(item.id)) {
|
|
24
|
+
return [item];
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
return [];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
const TMBlogCommentForm = (props) => {
|
|
32
|
+
const { participants, selectedAttachments, selectedAttachmentDid, allFileItems, allArchivedDocumentsFileItems = [], onClose, refreshCallback, context, showAttachmentsSection = true } = props;
|
|
33
|
+
// Initialize state with combined array
|
|
34
|
+
const [dataSource, setDataSource] = useState(() => [...getNonDirectoryFiles(allFileItems?.items || [], []), ...allArchivedDocumentsFileItems]);
|
|
35
|
+
const [isEditorEnabled, setIsEditorEnabled] = useState(false);
|
|
36
|
+
const [showAttachmentsForm, setShowAttachmentsForm] = useState(false);
|
|
37
|
+
const [mentionsConfig, setMentionsConfig] = useState([]);
|
|
38
|
+
// Get the current device type (e.g., mobile, tablet, desktop) using a custom hook.
|
|
39
|
+
const deviceType = useDeviceType();
|
|
40
|
+
const validator = async (params) => {
|
|
41
|
+
let vil = [];
|
|
42
|
+
const { comment } = params;
|
|
43
|
+
// Check for empty comment
|
|
44
|
+
if (!comment || comment.trim() === "") {
|
|
45
|
+
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.Comment, `${SDK_Localizator.RequiredField}`));
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
// Validate description length (max 500)
|
|
49
|
+
if (comment.length > 500) {
|
|
50
|
+
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.Comment, `${SDKUI_Localizator.DescriptionTooLongMessage.replaceParams(500)}`));
|
|
51
|
+
}
|
|
52
|
+
// Detect dangerous HTML tags
|
|
53
|
+
const tagRegex = /<\/?(script|iframe|embed|object|link|style|img|video|audio|svg|form|input|button|textarea|select|pre|function)[^>]*>/gi;
|
|
54
|
+
const attrRegex = /\son\w+\s*=\s*(['"]).*?\1/gi;
|
|
55
|
+
const encodedTagRegex = /<\/?(script|iframe|embed|object|link|style|img|video|audio|svg|form|input|button|textarea|select|pre|function)[^&]*>/gi;
|
|
56
|
+
if (tagRegex.test(comment) || attrRegex.test(comment) || encodedTagRegex.test(comment)) {
|
|
57
|
+
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.Comment, `${SDKUI_Localizator.CommentDoesNotMeetRequirements}`));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return vil;
|
|
61
|
+
};
|
|
62
|
+
const { formData, setFormData, formDataOrig, validationItems, exception } = useSaveForm(FormModes.Create, 0, new SaveFormOptions(), validator);
|
|
63
|
+
const [currentDraftAttachments, setCurrentDraftAttachments] = useState([]);
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
setDataSource([...getNonDirectoryFiles(allFileItems?.items || [], []), ...allArchivedDocumentsFileItems,]);
|
|
66
|
+
}, [allFileItems, allArchivedDocumentsFileItems]);
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
if (selectedAttachmentDid) {
|
|
69
|
+
const selectedFile = dataSource.find(file => file.did === selectedAttachmentDid);
|
|
70
|
+
if (selectedFile) {
|
|
71
|
+
setCurrentDraftAttachments([selectedFile]);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}, [selectedAttachmentDid, dataSource]);
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
if (selectedAttachments) {
|
|
77
|
+
setCurrentDraftAttachments(selectedAttachments);
|
|
78
|
+
}
|
|
79
|
+
;
|
|
80
|
+
}, [selectedAttachments]);
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
const mentions = [{
|
|
83
|
+
dataSource: participants.map(user => ({ text: user.name || '', icon: TMUserAvatar({ displayName: user.name || '', nameForColorCalculation: user.name || '', returnType: "svg" }) })),
|
|
84
|
+
searchExpr: 'text',
|
|
85
|
+
displayExpr: 'text',
|
|
86
|
+
valueExpr: 'text',
|
|
87
|
+
itemTemplate: function (itemData) {
|
|
88
|
+
return `<div style="display: flex; align-items: center; justify-content: center; gap: 8px; height: 100%;">
|
|
89
|
+
${itemData.icon}
|
|
90
|
+
<span>${itemData.text}</span>
|
|
91
|
+
</div>`;
|
|
92
|
+
},
|
|
93
|
+
}];
|
|
94
|
+
setMentionsConfig(mentions);
|
|
95
|
+
}, [participants]);
|
|
96
|
+
const onSaveAsync = async () => {
|
|
97
|
+
try {
|
|
98
|
+
// Show a loading spinner with a localized description
|
|
99
|
+
TMSpinner.show({ description: SDKUI_Localizator.Comment });
|
|
100
|
+
// Exit early if the engine or its required identifiers are undefined
|
|
101
|
+
if (context.object === undefined
|
|
102
|
+
|| (context.engine === 'WorkingGroupEngine' && !context.object.id)
|
|
103
|
+
|| (context.engine === 'SearchEngine' && (!context.object.tid || !context.object.did))) {
|
|
104
|
+
TMSpinner.hide();
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
// Create a new BlogPost object
|
|
108
|
+
const blogPost = new BlogPost();
|
|
109
|
+
// Retrieve the comment from formData, or use an empty string if undefined
|
|
110
|
+
const comment = formData?.comment ?? "";
|
|
111
|
+
// Clean the comment by removing <p> tags and replacing </p> with line breaks
|
|
112
|
+
let cleanComment = comment.replace(/<p>/gi, '').replace(/<\/p>/gi, '\r\n').trim();
|
|
113
|
+
// Validate and remove any potentially dangerous HTML tags (like <script>, <iframe>, etc.)
|
|
114
|
+
cleanComment = cleanComment.replace(/<(script|iframe|embed|object|link|style|img|video|audio|svg|form|input|button|textarea|select|pre|function)[^>]*>/gi, '');
|
|
115
|
+
// Assign the cleaned comment as the description for the blog post
|
|
116
|
+
blogPost.description = cleanComment ?? "";
|
|
117
|
+
// If there are file items (attachments), process them
|
|
118
|
+
if (currentDraftAttachments && currentDraftAttachments.length > 0) {
|
|
119
|
+
// Initialize an array to hold the blog post attachments
|
|
120
|
+
const attachment = [];
|
|
121
|
+
currentDraftAttachments.forEach((fileItem) => {
|
|
122
|
+
// Set the necessary properties for the blog post attachment
|
|
123
|
+
const blogPostAttachement = new BlogPostAttachment();
|
|
124
|
+
blogPostAttachement.did = fileItem.did;
|
|
125
|
+
blogPostAttachement.tid = fileItem.tid;
|
|
126
|
+
blogPostAttachement.draftID = fileItem.id;
|
|
127
|
+
// Add the attachment to the array
|
|
128
|
+
attachment.push(blogPostAttachement);
|
|
129
|
+
});
|
|
130
|
+
blogPost.attachments = attachment;
|
|
131
|
+
}
|
|
132
|
+
// Initialize an empty array to hold the result information
|
|
133
|
+
let result = [];
|
|
134
|
+
if (context.engine === 'WorkingGroupEngine' && context.object && context.object.id) {
|
|
135
|
+
// Create an instance of WorkingGroupEngine to interact with the working group
|
|
136
|
+
const workingGroupEngine = new WorkingGroupEngine(SDK_Globals.tmSession);
|
|
137
|
+
// Call the BlogPostAddAsync method to add the blog post to the working group
|
|
138
|
+
await workingGroupEngine.BlogPostAddAsync(context.object.id, blogPost)
|
|
139
|
+
.then(() => {
|
|
140
|
+
// On success, push a success result to the result array
|
|
141
|
+
result.push({ rowIndex: 1, id1: context.object?.id, id2: 0, description: SDKUI_Localizator.UpdateCompletedSuccessfully, resultType: ResultTypes.SUCCESS });
|
|
142
|
+
// Show the result to the user
|
|
143
|
+
TMResultManager.show(result, SDKUI_Localizator.Comment, "ID", undefined);
|
|
144
|
+
refreshCallback();
|
|
145
|
+
})
|
|
146
|
+
.catch((e) => {
|
|
147
|
+
// If an error occurs, display the exception in an error box
|
|
148
|
+
TMExceptionBoxManager.show({ exception: e });
|
|
149
|
+
})
|
|
150
|
+
.finally(() => {
|
|
151
|
+
// Hide the loading spinner and close the operation (e.g., close a modal or cleanup)
|
|
152
|
+
TMSpinner.hide();
|
|
153
|
+
onClose();
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
else if (context.engine === 'SearchEngine') {
|
|
157
|
+
// Create an instance of SearchEngine
|
|
158
|
+
const searchEngine = SDK_Globals.tmSession?.NewSearchEngine();
|
|
159
|
+
await searchEngine.BlogPostAddAsync(context.object.tid, context.object.did, cleanComment)
|
|
160
|
+
.then(() => {
|
|
161
|
+
// On success, push a success result to the result array
|
|
162
|
+
result.push({ rowIndex: 1, id1: context.object?.tid, id2: context.object?.did, description: SDKUI_Localizator.UpdateCompletedSuccessfully, resultType: ResultTypes.SUCCESS });
|
|
163
|
+
// Show the result to the user
|
|
164
|
+
TMResultManager.show(result, SDKUI_Localizator.Comment, "ID", undefined);
|
|
165
|
+
refreshCallback();
|
|
166
|
+
})
|
|
167
|
+
.catch((e) => {
|
|
168
|
+
// If an error occurs, display the exception in an error box
|
|
169
|
+
TMExceptionBoxManager.show({ exception: e });
|
|
170
|
+
})
|
|
171
|
+
.finally(() => {
|
|
172
|
+
// Hide the loading spinner and close the operation (e.g., close a modal or cleanup)
|
|
173
|
+
TMSpinner.hide();
|
|
174
|
+
onClose();
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
catch (e) {
|
|
179
|
+
// If any error occurs during the try block execution, display the exception in an error box
|
|
180
|
+
TMExceptionBoxManager.show({ exception: e });
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
const onCloseCallback = () => {
|
|
184
|
+
if (formData && formData?.comment.length > 0) {
|
|
185
|
+
TMMessageBoxManager.show({
|
|
186
|
+
parentId: "TMSaveFormShowConfirmForClose-1",
|
|
187
|
+
buttons: [ButtonNames.YES, ButtonNames.NO],
|
|
188
|
+
message: SDKUI_Localizator.ConfirmOnCancel,
|
|
189
|
+
onButtonClick(e) {
|
|
190
|
+
if (e !== ButtonNames.YES)
|
|
191
|
+
return;
|
|
192
|
+
setFormData(undefined);
|
|
193
|
+
if (onClose)
|
|
194
|
+
onClose();
|
|
195
|
+
},
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
setFormData(undefined);
|
|
200
|
+
if (onClose)
|
|
201
|
+
onClose();
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
const toggleEditorMode = () => {
|
|
205
|
+
setIsEditorEnabled((prev) => !prev);
|
|
206
|
+
};
|
|
207
|
+
const onValueChanged = (e) => {
|
|
208
|
+
// Clean the value by:
|
|
209
|
+
// 1. Removing any <span> tags (both opening and closing) using regex
|
|
210
|
+
// 2. Replacing HTML non-breaking spaces ( ) with regular spaces
|
|
211
|
+
const cleaned = e.value.replace(/<span[^>]*>|<\/span>/g, '').replace(/ /g, ' ');
|
|
212
|
+
// Update the formData state by copying the existing data
|
|
213
|
+
// and setting the `comment` field to the cleaned value
|
|
214
|
+
setFormData({ ...formData, comment: cleaned });
|
|
215
|
+
};
|
|
216
|
+
const removeAttachment = (attachment) => {
|
|
217
|
+
setCurrentDraftAttachments(prev => prev.filter(item => item.id !== attachment.id));
|
|
218
|
+
};
|
|
219
|
+
const onChoose = (selectedDraftItemsIds) => {
|
|
220
|
+
// Find the file items corresponding to the selected IDs
|
|
221
|
+
const selectedDraftItems = selectedDraftItemsIds.map(id => dataSource.find(file => file.id === id)).filter((item) => !!item); // Filter out undefined
|
|
222
|
+
// Update the state with selected draft items
|
|
223
|
+
setCurrentDraftAttachments(selectedDraftItems);
|
|
224
|
+
};
|
|
225
|
+
return _jsx(TMSaveForm, { id: 1, title: SDKUI_Localizator.Comment, showErrorCount: false, showSaveButton: !showAttachmentsForm, showUndoButton: false, hasNavigation: false, skipIsModifiedCheck: true, isModal: true, width: calcResponsiveSizes(deviceType, '800px', '800px', '95%'), height: '550px', formMode: FormModes.Create, validationItems: validationItems, exception: exception, isModified: calcIsModified(formData, formDataOrig), onSaveAsync: onSaveAsync, onClose: onCloseCallback, customToolbarElements: _jsx("div", { style: { display: 'flex', gap: '2px' }, children: showAttachmentsForm === false && _jsx(TMButton, { btnStyle: "toolbar", icon: isEditorEnabled ? _jsx("i", { className: 'dx-icon-font' }) : _jsx("i", { className: 'dx-icon-background' }), caption: isEditorEnabled ? SDKUI_Localizator.HideFormattingOptions : SDKUI_Localizator.ShowFormattingOptions, onClick: toggleEditorMode }) }), children: _jsxs("div", { style: { width: "100%", height: "100%" }, children: [_jsxs("div", { style: { width: "100%", height: "100%" }, children: [_jsx("div", { style: { width: "100%", height: showAttachmentsSection ? "calc(100% - 60px)" : "100%" }, children: _jsx(TMHtmlEditor, { width: '100%', height: '100%', isEditorEnabled: isEditorEnabled, validationItems: validationItems, onValueChanged: onValueChanged, mentionsConfig: mentionsConfig, autoFocus: true }) }), showAttachmentsSection && _jsxs("div", { style: { display: 'flex', alignItems: 'center', height: '60px', marginTop: '10px' }, children: [_jsx("div", { style: {
|
|
226
|
+
width: 'calc(100% - 60px)',
|
|
227
|
+
overflowX: 'auto',
|
|
228
|
+
whiteSpace: 'nowrap',
|
|
229
|
+
height: '50px',
|
|
230
|
+
border: '1px solid #ccc',
|
|
231
|
+
borderRadius: '8px',
|
|
232
|
+
backgroundColor: '#fafafa',
|
|
233
|
+
display: 'flex',
|
|
234
|
+
alignItems: 'center',
|
|
235
|
+
padding: '0 8px',
|
|
236
|
+
}, children: currentDraftAttachments.length > 0 ? (currentDraftAttachments.map(draft => {
|
|
237
|
+
const tooltipContent = (_jsxs("div", { style: { textAlign: 'left' }, children: [_jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Name, ":"] }), " ", draft.name ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Author, ":"] }), " ", draft.updaterName ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Version, ":"] }), " ", draft.version] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Size, ":"] }), " ", formatBytes(draft.size ?? 0)] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.CreationTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(draft.creationTime)] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.LastUpdateTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(draft.lastUpdateTime)] })] }));
|
|
238
|
+
return _jsxs("div", { style: {
|
|
239
|
+
display: 'inline-flex',
|
|
240
|
+
alignItems: 'center',
|
|
241
|
+
padding: '8px 12px',
|
|
242
|
+
marginRight: '8px',
|
|
243
|
+
border: '1px solid #ddd',
|
|
244
|
+
borderRadius: '8px',
|
|
245
|
+
backgroundColor: '#fff',
|
|
246
|
+
boxShadow: '0 2px 4px rgba(0,0,0,0.1)',
|
|
247
|
+
}, children: [draft.ext ? (_jsx("span", { style: { marginRight: '10px' }, children: getFileIcon(draft.ext, undefined, tooltipContent) })) : (_jsx(IconAttachment, { style: { marginRight: '5px' } })), _jsx("span", { style: { marginRight: '8px' }, children: draft.name }), draft.version && _jsx("span", { style: {
|
|
248
|
+
display: 'inline-flex',
|
|
249
|
+
width: '20px',
|
|
250
|
+
height: '20px',
|
|
251
|
+
alignItems: 'center',
|
|
252
|
+
justifyContent: 'center',
|
|
253
|
+
backgroundColor: '#28a745',
|
|
254
|
+
color: '#fff',
|
|
255
|
+
borderRadius: '30px',
|
|
256
|
+
fontWeight: 'bold',
|
|
257
|
+
marginRight: '8px',
|
|
258
|
+
boxShadow: '1px 1px 2px #00000020',
|
|
259
|
+
}, children: _jsx(TMTooltip, { content: SDKUI_Localizator.Version, children: draft.version }) }), _jsx(TMTooltip, { content: SDKUI_Localizator.RemoveAttachment, children: _jsx("span", { onClick: () => removeAttachment(draft), style: {
|
|
260
|
+
display: 'inline-flex',
|
|
261
|
+
width: '20px',
|
|
262
|
+
height: '20px',
|
|
263
|
+
alignItems: 'center',
|
|
264
|
+
justifyContent: 'center',
|
|
265
|
+
color: '#000',
|
|
266
|
+
border: '1px solid #000',
|
|
267
|
+
borderRadius: '30px',
|
|
268
|
+
cursor: 'pointer',
|
|
269
|
+
boxShadow: '1px 1px 2px #00000020',
|
|
270
|
+
}, children: _jsx("span", { style: { fontSize: "15px" }, children: "\u00D7" }) }) })] }, draft.did);
|
|
271
|
+
})) : (_jsx("div", { style: { color: '#999', width: '100%', textAlign: 'center' }, children: SDKUI_Localizator.NoAttachments })) }), _jsx(TMTooltip, { content: SDKUI_Localizator.Attachments, children: _jsx("i", { className: "dx-icon-attach", style: {
|
|
272
|
+
width: '50px',
|
|
273
|
+
height: '50px',
|
|
274
|
+
marginLeft: '10px',
|
|
275
|
+
fontSize: '20px',
|
|
276
|
+
cursor: 'pointer',
|
|
277
|
+
border: '1px solid #ccc',
|
|
278
|
+
borderRadius: '8px',
|
|
279
|
+
backgroundColor: '#f9f9f9',
|
|
280
|
+
display: 'flex',
|
|
281
|
+
alignItems: 'center',
|
|
282
|
+
justifyContent: 'center',
|
|
283
|
+
transition: 'all 0.2s ease-in-out',
|
|
284
|
+
}, onMouseOver: (e) => (e.currentTarget.style.backgroundColor = '#e6f7ff'), onMouseOut: (e) => (e.currentTarget.style.backgroundColor = '#f9f9f9'), onClick: () => setShowAttachmentsForm(true) }) })] })] }), showAttachmentsForm && _jsx(TMAttachmentsView, { dataSource: dataSource, selectedIDs: currentDraftAttachments.map(draft => draft.id), onChoose: onChoose, onClose: () => setShowAttachmentsForm(false) })] }) });
|
|
285
|
+
};
|
|
286
|
+
export default TMBlogCommentForm;
|
|
287
|
+
const TMAttachmentsView = (props) => {
|
|
288
|
+
const { dataSource, selectedIDs, onChoose, onClose } = props;
|
|
289
|
+
// Get the current device type (e.g., mobile, tablet, desktop) using a custom hook.
|
|
290
|
+
const deviceType = useDeviceType();
|
|
291
|
+
const cellExtRender = useCallback((cellData) => {
|
|
292
|
+
const data = cellData.data;
|
|
293
|
+
return _jsx("div", { style: { display: 'flex', justifyContent: 'center', alignItems: 'center' }, children: getFileIcon(data.ext, data.version) });
|
|
294
|
+
}, []);
|
|
295
|
+
const cellDatetimeRender = useCallback((cellData) => {
|
|
296
|
+
const { value } = cellData;
|
|
297
|
+
const formattedDate = value ? new Date(value).toLocaleString('en-GB', { day: '2-digit', month: '2-digit', year: 'numeric', hour: '2-digit', minute: '2-digit' }) : '';
|
|
298
|
+
return _jsx("div", { children: formattedDate });
|
|
299
|
+
}, []);
|
|
300
|
+
const cellSizeRender = useCallback((cellData) => {
|
|
301
|
+
const data = cellData.data;
|
|
302
|
+
return formatBytes(data.size ?? 0);
|
|
303
|
+
}, []);
|
|
304
|
+
const dataColumns = useMemo(() => {
|
|
305
|
+
return ([
|
|
306
|
+
{ dataField: "ext", caption: SDKUI_Localizator.Extension, cellRender: cellExtRender },
|
|
307
|
+
{ dataField: "name", caption: SDKUI_Localizator.Name, sortOrder: 'asc' },
|
|
308
|
+
{ dataField: "version", caption: SDKUI_Localizator.Version },
|
|
309
|
+
{ dataField: "size", caption: SDKUI_Localizator.Size, cellRender: cellSizeRender },
|
|
310
|
+
{ dataField: "updaterName", caption: SDKUI_Localizator.Author },
|
|
311
|
+
{ dataField: "lastUpdateTime", caption: SDKUI_Localizator.LastUpdateTime, dataType: 'datetime', format: 'dd/MM/yyyy HH:mm', cellRender: cellDatetimeRender },
|
|
312
|
+
{ dataField: "creationTime", caption: SDKUI_Localizator.CreationTime, dataType: 'datetime', format: 'dd/MM/yyyy HH:mm', cellRender: cellDatetimeRender },
|
|
313
|
+
]);
|
|
314
|
+
}, []);
|
|
315
|
+
return _jsx(TMChooserForm, { title: SDKUI_Localizator.Attachments, allowMultipleSelection: true, allowApplyWithZeroSelection: true, startWithShowOnlySelectedItems: true, hasShowOnlySelectedItems: false, width: calcResponsiveSizes(deviceType, '700px', '700px', '95%'), height: "500px", manageUseLocalizedName: false, columns: dataColumns, showDefaultColumns: false, selectedIDs: selectedIDs, dataSource: dataSource, hasShowId: true, hideRefresh: false, onClose: onClose, onChoose: onChoose });
|
|
316
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from 'react';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { SDK_Globals } from '@topconsultnpm/sdk-ts-beta';
|
|
5
5
|
import { TMExceptionBoxManager } from '../../base/TMPopUp';
|
|
@@ -7,10 +7,32 @@ import TMSpinner from '../../base/TMSpinner';
|
|
|
7
7
|
import TMBlogs from '../../grids/TMBlogs';
|
|
8
8
|
import { TMNothingToShow } from './TMDcmtPreview';
|
|
9
9
|
import { IconBoard } from '../../../helper';
|
|
10
|
+
import TMBlogCommentForm from '../blog/TMBlogCommentForm';
|
|
10
11
|
const TMDcmtBlog = ({ tid, did, isVisible }) => {
|
|
11
12
|
const [blogsDatasource, setBlogsDatasource] = useState([]);
|
|
12
13
|
const [hasLoadedDataOnce, setHasLoadedDataOnce] = useState(false); //traccia se *qualsiasi* dato è stato caricato per la prima volta
|
|
13
14
|
const [lastLoadedDid, setLastLoadedDid] = useState(undefined); // `lastLoadedDid` tiene traccia dell'ultimo `did` per cui abbiamo caricato i dati
|
|
15
|
+
// State to manage show comment form selected file
|
|
16
|
+
const [showCommentForm, setShowCommentForm] = useState(false);
|
|
17
|
+
const showCommentFormCallback = useCallback(() => {
|
|
18
|
+
setShowCommentForm(true);
|
|
19
|
+
}, []);
|
|
20
|
+
const fetchDataAsync = async (tid, did) => {
|
|
21
|
+
try {
|
|
22
|
+
TMSpinner.show({ description: 'Caricamento - Bacheca...' });
|
|
23
|
+
let res = await SDK_Globals.tmSession?.NewSearchEngine().BlogRetrieveAsync(tid, did);
|
|
24
|
+
setBlogsDatasource(res ?? []);
|
|
25
|
+
setHasLoadedDataOnce(true);
|
|
26
|
+
setLastLoadedDid(did);
|
|
27
|
+
}
|
|
28
|
+
catch (e) {
|
|
29
|
+
let err = e;
|
|
30
|
+
TMExceptionBoxManager.show({ exception: err });
|
|
31
|
+
}
|
|
32
|
+
finally {
|
|
33
|
+
TMSpinner.hide();
|
|
34
|
+
}
|
|
35
|
+
};
|
|
14
36
|
useEffect(() => {
|
|
15
37
|
if (!tid || !did) {
|
|
16
38
|
setBlogsDatasource([]);
|
|
@@ -24,27 +46,22 @@ const TMDcmtBlog = ({ tid, did, isVisible }) => {
|
|
|
24
46
|
// Esegui la chiamata API solo se il pannello è visibile E i dati non sono già stati caricati
|
|
25
47
|
// O, se vuoi ricaricare ogni volta che diventa visibile (ma è meno efficiente per "pesante")
|
|
26
48
|
if (shouldFetch) {
|
|
27
|
-
const fetchDataAsync = async (tid, did) => {
|
|
28
|
-
try {
|
|
29
|
-
TMSpinner.show({ description: 'Caricamento - Bacheca...' });
|
|
30
|
-
let res = await SDK_Globals.tmSession?.NewSearchEngine().BlogRetrieveAsync(tid, did);
|
|
31
|
-
setBlogsDatasource(res ?? []);
|
|
32
|
-
setHasLoadedDataOnce(true); // Marca che abbiamo caricato dati almeno una volta
|
|
33
|
-
setLastLoadedDid(did); // Memorizza il `did` per cui abbiamo caricato
|
|
34
|
-
}
|
|
35
|
-
catch (e) {
|
|
36
|
-
let err = e;
|
|
37
|
-
TMExceptionBoxManager.show({ exception: err });
|
|
38
|
-
}
|
|
39
|
-
finally {
|
|
40
|
-
TMSpinner.hide();
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
49
|
fetchDataAsync(tid, did);
|
|
44
50
|
}
|
|
45
51
|
}, [tid, did, isVisible, hasLoadedDataOnce, lastLoadedDid]);
|
|
46
|
-
return (_jsx(StyledContainer, { children: _jsx(StyledSectionContainer, { style: { position: 'relative' }, children: _jsx(StyledBoardContainer, { children: !did ? _jsx(TMNothingToShow, { text: 'Nessun documento selezionato.', secondText: 'Bacheca non disponibile.', icon: _jsx(IconBoard, { fontSize: 96 }) }) :
|
|
47
|
-
|
|
52
|
+
return (_jsxs("div", { style: { width: '100%', height: '100%' }, children: [_jsx(StyledContainer, { children: _jsx(StyledSectionContainer, { style: { position: 'relative' }, children: _jsx(StyledBoardContainer, { children: !did ? _jsx(TMNothingToShow, { text: 'Nessun documento selezionato.', secondText: 'Bacheca non disponibile.', icon: _jsx(IconBoard, { fontSize: 96 }) }) :
|
|
53
|
+
_jsx(TMBlogs, { context: { engine: 'SearchEngine', object: { tid, did } }, id: "dcmt-blog", allData: blogsDatasource, showExtendedAttachments: false, showFloatingCommentButton: true, showCommentFormCallback: showCommentFormCallback, refreshCallback: () => fetchDataAsync(tid, did), contextMenuParams: {
|
|
54
|
+
isShowHideFilterEnabled: true,
|
|
55
|
+
isShowHideIDEnaled: true,
|
|
56
|
+
isCommentEnabled: true,
|
|
57
|
+
isDownloadAttachmentEnabled: false,
|
|
58
|
+
isViewEditMetadata: false,
|
|
59
|
+
isDeleteEnabled: true,
|
|
60
|
+
isCopyToClipboardEnabled: true,
|
|
61
|
+
isRefreshEnabled: true,
|
|
62
|
+
isRestoreEnabled: true,
|
|
63
|
+
isCreateContextualTask: false
|
|
64
|
+
} }) }) }) }), (showCommentForm && tid && did) && _jsx(TMBlogCommentForm, { context: { engine: 'SearchEngine', object: { tid, did } }, onClose: () => setShowCommentForm(false), refreshCallback: () => { fetchDataAsync(tid, did); }, participants: [], showAttachmentsSection: false })] }));
|
|
48
65
|
};
|
|
49
66
|
export default TMDcmtBlog;
|
|
50
67
|
const StyledContainer = styled.div ` user-select: none; overflow: hidden; background-color: #ffffff; width: calc(100%); height: calc(100%); display: flex; gap: 10px; `;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BlogPost, HomeBlogPost, IDCount, UserDescriptor
|
|
2
|
+
import { BlogPost, HomeBlogPost, IDCount, UserDescriptor } from "@topconsultnpm/sdk-ts-beta";
|
|
3
3
|
import { FileItem } from '../base/TMFileManager';
|
|
4
|
+
import { TMBlogContextDescriptor } from './TMBlogsUtils';
|
|
4
5
|
import { DcmtInfo } from '../../ts';
|
|
5
6
|
interface TMBlogsProps {
|
|
6
7
|
/** Component Identifier */
|
|
@@ -57,8 +58,6 @@ interface TMBlogsProps {
|
|
|
57
58
|
showId?: boolean;
|
|
58
59
|
/** Optional setter function to update the visibility state of an ID */
|
|
59
60
|
setShowId?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
60
|
-
/** Optional currect working group */
|
|
61
|
-
currentWorkingGroup?: WorkingGroupDescriptor;
|
|
62
61
|
/** Optional context menu params */
|
|
63
62
|
contextMenuParams?: {
|
|
64
63
|
isShowHideFilterEnabled: boolean;
|
|
@@ -87,6 +86,8 @@ interface TMBlogsProps {
|
|
|
87
86
|
handleAttachmentFocus?: (attachment: DcmtInfo | undefined) => void;
|
|
88
87
|
/** Optional flag to show the floating comment button (default: false) */
|
|
89
88
|
showFloatingCommentButton?: boolean;
|
|
89
|
+
/** Context descriptor for the blog component */
|
|
90
|
+
context?: TMBlogContextDescriptor;
|
|
90
91
|
}
|
|
91
92
|
declare const TMBlogs: (props: TMBlogsProps) => import("react/jsx-runtime").JSX.Element;
|
|
92
93
|
export default TMBlogs;
|
|
@@ -20,7 +20,7 @@ import TMDcmtForm from '../features/documents/TMDcmtForm';
|
|
|
20
20
|
import { TMColors } from '../../utils/theme';
|
|
21
21
|
let localAbortController = new AbortController();
|
|
22
22
|
const TMBlogs = (props) => {
|
|
23
|
-
const { id, allData, showExtendedAttachments = true, treeFs, draftLatestInfoMap, archivedDocumentMap, updateVisualizedBlogCallback, height, width, scrollToBottom = true, viewMode = 'thumbnails', header, showIconHeader = true, color = colors.PRIMARY_BLUE, handleNavigateToWGs, showId, setShowId,
|
|
23
|
+
const { id, allData, showExtendedAttachments = true, treeFs, draftLatestInfoMap, archivedDocumentMap, updateVisualizedBlogCallback, height, width, scrollToBottom = true, viewMode = 'thumbnails', header, showIconHeader = true, color = colors.PRIMARY_BLUE, handleNavigateToWGs, showId, setShowId, contextMenuParams = {
|
|
24
24
|
isShowHideFilterEnabled: true,
|
|
25
25
|
isShowHideIDEnaled: true,
|
|
26
26
|
isCommentEnabled: false,
|
|
@@ -31,7 +31,7 @@ const TMBlogs = (props) => {
|
|
|
31
31
|
isRestoreEnabled: false,
|
|
32
32
|
isRefreshEnabled: false,
|
|
33
33
|
isCreateContextualTask: false,
|
|
34
|
-
}, refreshCallback, newPosts = [], showCommentFormCallback, showTaskFormCallback, showContextMenu = true, handleAttachmentFocus, showFloatingCommentButton = false } = props;
|
|
34
|
+
}, refreshCallback, newPosts = [], showCommentFormCallback, showTaskFormCallback, showContextMenu = true, handleAttachmentFocus, showFloatingCommentButton = false, context, } = props;
|
|
35
35
|
// Get the current device type (e.g., mobile, tablet, desktop) using a custom hook.
|
|
36
36
|
const deviceType = useDeviceType();
|
|
37
37
|
const { abortController, showWaitPanel, waitPanelTitle, showPrimary, waitPanelTextPrimary, waitPanelValuePrimary, waitPanelMaxValuePrimary, showSecondary, waitPanelTextSecondary, waitPanelValueSecondary, waitPanelMaxValueSecondary, downloadDcmtsAsync } = useDcmtOperations();
|
|
@@ -118,8 +118,11 @@ const TMBlogs = (props) => {
|
|
|
118
118
|
onButtonClick: async (e) => {
|
|
119
119
|
if (e !== ButtonNames.YES)
|
|
120
120
|
return;
|
|
121
|
-
if (focusedBlog === undefined || focusedBlog.id === undefined ||
|
|
121
|
+
if (focusedBlog === undefined || focusedBlog.id === undefined || context === undefined || context.object === undefined
|
|
122
|
+
|| (context.engine === 'WorkingGroupEngine' && !context.object.id)
|
|
123
|
+
|| (context.engine === 'SearchEngine' && (!context.object.tid || !context.object.did))) {
|
|
122
124
|
return Promise.resolve();
|
|
125
|
+
}
|
|
123
126
|
setLocalWaitPanelTitle(del ? SDKUI_Localizator.Delete : SDKUI_Localizator.Restore);
|
|
124
127
|
setLocalShowWaitPanel(true);
|
|
125
128
|
setLocalShowPrimary(true);
|
|
@@ -132,17 +135,32 @@ const TMBlogs = (props) => {
|
|
|
132
135
|
}
|
|
133
136
|
else {
|
|
134
137
|
setLocalWaitPanelTextPrimary(del ? SDKUI_Localizator.Delete : SDKUI_Localizator.Restore);
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
138
|
+
if (context.engine === 'WorkingGroupEngine' && context.object.id) {
|
|
139
|
+
const workingGroupEngine = new WorkingGroupEngine(SDK_Globals.tmSession);
|
|
140
|
+
await workingGroupEngine.BlogPostDeleteOrUndeleteAsync(context.object.id, focusedBlog.id, del)
|
|
141
|
+
.then(() => {
|
|
142
|
+
result.push({ rowIndex: 1, id1: context.object?.id, id2: 0, description: SDKUI_Localizator.UpdateCompletedSuccessfully, resultType: ResultTypes.SUCCESS });
|
|
143
|
+
TMResultManager.show(result, del ? SDKUI_Localizator.Delete : SDKUI_Localizator.Restore, "ID", undefined);
|
|
144
|
+
handleFocusedBlog(undefined);
|
|
145
|
+
refresh();
|
|
146
|
+
})
|
|
147
|
+
.catch((err) => {
|
|
148
|
+
result.push({ rowIndex: 1, id1: context.object?.id, id2: context.object?.id, resultType: ResultTypes.ERROR, description: getExceptionMessage(err) });
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
else if (context.engine === 'SearchEngine' && context.object.tid && context.object.did) {
|
|
152
|
+
const searchEngine = SDK_Globals.tmSession?.NewSearchEngine();
|
|
153
|
+
await searchEngine.BlogPostDeleteOrUndeleteAsync(context.object.tid, context.object.did, focusedBlog.id, del)
|
|
154
|
+
.then(() => {
|
|
155
|
+
result.push({ rowIndex: 1, id1: context.object?.tid, id2: context.object?.did, description: SDKUI_Localizator.UpdateCompletedSuccessfully, resultType: ResultTypes.SUCCESS });
|
|
156
|
+
TMResultManager.show(result, del ? SDKUI_Localizator.Delete : SDKUI_Localizator.Restore, "ID", undefined);
|
|
157
|
+
handleFocusedBlog(undefined);
|
|
158
|
+
refresh();
|
|
159
|
+
})
|
|
160
|
+
.catch((err) => {
|
|
161
|
+
result.push({ rowIndex: 1, id1: context.object?.tid, id2: context.object?.did, resultType: ResultTypes.ERROR, description: getExceptionMessage(err) });
|
|
162
|
+
});
|
|
163
|
+
}
|
|
146
164
|
}
|
|
147
165
|
setLocalWaitPanelTextPrimary('');
|
|
148
166
|
setLocalWaitPanelMaxValuePrimary(0);
|
|
@@ -273,13 +291,13 @@ const TMBlogs = (props) => {
|
|
|
273
291
|
return menuItemsElements;
|
|
274
292
|
}, [isHeaderHidden, localShowId, setLocalShowId, focusedBlog, focusedAttachment, showDcmtForm]);
|
|
275
293
|
useEffect(() => {
|
|
276
|
-
if (
|
|
294
|
+
if (context === undefined)
|
|
277
295
|
setNewPostCount(0);
|
|
278
|
-
|
|
279
|
-
const postCount = newPosts?.find(d => d.id ===
|
|
296
|
+
if (context && context.engine === 'WorkingGroupEngine' && context.object && context.object.id) {
|
|
297
|
+
const postCount = newPosts?.find(d => d.id === context.object?.id)?.count ?? 0;
|
|
280
298
|
setNewPostCount(postCount);
|
|
281
299
|
}
|
|
282
|
-
}, [
|
|
300
|
+
}, [context, newPosts]);
|
|
283
301
|
useEffect(() => {
|
|
284
302
|
if (showId !== undefined)
|
|
285
303
|
setLocalShowId(showId);
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BlogPost, BlogPostAttachment, DcmtTypeDescriptor, HomeBlogPost } from "@topconsultnpm/sdk-ts-beta";
|
|
2
|
+
import { BlogPost, BlogPostAttachment, DcmtTypeDescriptor, HomeBlogPost, TID_DID, WorkingGroupDescriptor } from "@topconsultnpm/sdk-ts-beta";
|
|
3
3
|
import { FileItem } from '../base/TMFileManager';
|
|
4
4
|
import { DcmtInfo, DownloadModes, DownloadTypes } from '../../ts';
|
|
5
5
|
import { ContextMenuRef } from 'devextreme-react/cjs/context-menu';
|
|
6
6
|
export declare const DRAFT_TYPE_TID = 6;
|
|
7
|
+
export type TMBlogContextDescriptor = {
|
|
8
|
+
engine: 'WorkingGroupEngine';
|
|
9
|
+
object?: WorkingGroupDescriptor;
|
|
10
|
+
} | {
|
|
11
|
+
engine: 'SearchEngine';
|
|
12
|
+
object?: TID_DID;
|
|
13
|
+
};
|
|
7
14
|
export declare const colors: {
|
|
8
15
|
DARK_BLUE: string;
|
|
9
16
|
WHITE: string;
|
|
@@ -49,6 +49,7 @@ export * from './choosers/TMOrderRetrieveFormats';
|
|
|
49
49
|
export * from './choosers/TMUserChooser';
|
|
50
50
|
export { default as TMValidationItemsList } from './grids/TMValidationItemsList';
|
|
51
51
|
export { default as TMBlogs } from './grids/TMBlogs';
|
|
52
|
+
export { default as TMBlogCommentForm } from './features/blog/TMBlogCommentForm';
|
|
52
53
|
export * from './query/TMQueryEditor';
|
|
53
54
|
export * from './query/TMQuerySummary';
|
|
54
55
|
export * from './features/documents/TMDcmtForm';
|
package/lib/components/index.js
CHANGED
|
@@ -52,7 +52,9 @@ export * from './choosers/TMOrderRetrieveFormats';
|
|
|
52
52
|
export * from './choosers/TMUserChooser';
|
|
53
53
|
//grids
|
|
54
54
|
export { default as TMValidationItemsList } from './grids/TMValidationItemsList';
|
|
55
|
+
// blogs
|
|
55
56
|
export { default as TMBlogs } from './grids/TMBlogs';
|
|
57
|
+
export { default as TMBlogCommentForm } from './features/blog/TMBlogCommentForm';
|
|
56
58
|
//query
|
|
57
59
|
export * from './query/TMQueryEditor';
|
|
58
60
|
export * from './query/TMQuerySummary';
|
|
@@ -69,6 +69,7 @@ export declare class SDKUI_Localizator {
|
|
|
69
69
|
static get Columns_All_Hide(): "Alle Spalten ausblenden" | "Hide all columns" | "Ocultar todas las columnas" | "Masquer toutes les colonnes" | "Ocultar todas as colunas" | "Nascondi tutte le colonne";
|
|
70
70
|
static get Columns_All_Show(): "Alle Spalten anzeigen" | "Show all columns" | "Mostrar todas las columnas" | "Afficher toutes les colonnes" | "Mostrar todas as colunas" | "Visualizza tutte le colonne";
|
|
71
71
|
static get Comment(): string;
|
|
72
|
+
static get CommentDoesNotMeetRequirements(): "Der Kommentar erfüllt nicht die erforderlichen Anforderungen" | "The comment does not meet the required criteria" | "El comentario no cumple con los requisitos requeridos" | "Le commentaire ne répond pas aux exigences requises" | "O comentário não atende aos requisitos exigidos" | "Il commento non rispetta i requisiti richiesti";
|
|
72
73
|
static get CompleteError(): "Kompletter Fehler" | "Complete error" | "Error completo" | "Erreur complète" | "Erro completo" | "Errore completo";
|
|
73
74
|
static get Configure(): "Konfigurieren" | "Configure" | "Configurar" | "Configura";
|
|
74
75
|
static get ConfirmPassword(): "Bestätige das Passwort" | "Confirm password" | "Confirmar Contraseña" | "Confirmez le mot de passe" | "Confirme sua senha" | "Conferma password";
|
|
@@ -102,6 +103,7 @@ export declare class SDKUI_Localizator {
|
|
|
102
103
|
static get Deleted(): "Gelöscht" | "Deleted" | "Eliminados" | "Supprimés" | "Excluídos" | "Eliminati";
|
|
103
104
|
static get DeletionOperationInterrupted(): "Löschvorgang abgebrochen" | "Deletion operation interrupted" | "Operación de eliminación interrumpida" | "Opération de suppression interrompue" | "Operação de exclusão interrompida" | "Operazione di eliminazione interrotta";
|
|
104
105
|
static get Description(): "Beschreibung" | "Description" | "Descripción" | "Descrição" | "Descrizione";
|
|
106
|
+
static get DescriptionTooLongMessage(): "Die Beschreibung ist zu lang: Maximal {{0}' Zeichen" | "Description is too long: Max {{0}} characters" | "La descripción es demasiado larga: Máximo {{0}} caracteres" | "La description est trop longue : Maximum {{0}} caractères" | "A descrição é demasiado longa: Máximo {{0}} caracteres" | "La descrizione è troppo lunga: Massimo {{0}} caratteri";
|
|
105
107
|
static get Destination(): "Bestimmung" | "Destination" | "Destino" | "Destinazione";
|
|
106
108
|
static get DetailsView(): string;
|
|
107
109
|
static get Disabled(): "Deaktiviert" | "Disabled" | "Deshabilitado" | "Désactivé" | "Desabilitado" | "Disabilitato";
|
|
@@ -179,6 +181,7 @@ export declare class SDKUI_Localizator {
|
|
|
179
181
|
static get Hide_CompleteName(): "Vollständigen Namen ausblenden" | "Hide full name" | "Ocultar nombre completo" | "Masquer le nom complet" | "Ocultar nome completo" | "Nascondi nome completo";
|
|
180
182
|
static get HideFilters(): string;
|
|
181
183
|
static get HideLeftPanel(): "Linkes Panel ausblenden" | "Hide left panel" | "Ocultar panel izquierdo" | "Masquer le panneau de gauche" | "Ocultar painel esquerdo" | "Nascondi il pannello sinistro";
|
|
184
|
+
static get HideFormattingOptions(): "Formatierungsoptionen ausblenden" | "Hide formatting options" | "Ocultar opciones de formato" | "Masquer les options de formatage" | "Ocultar opções de formatação" | "Nascondi opzioni di formattazione";
|
|
182
185
|
static get HideMetadata(): string;
|
|
183
186
|
static get HideSearch(): "Suche ausblenden" | "Hide search" | "Ocultar búsqueda" | "Masquer la recherche" | "Ocultar pesquisa" | "Nascondi ricerca";
|
|
184
187
|
static get ID_Hide(): "Ausblenden ID" | "Hide ID" | "Ocultar ID" | "Masquer ID" | "Nascondi ID";
|
|
@@ -246,6 +249,7 @@ export declare class SDKUI_Localizator {
|
|
|
246
249
|
static get NewPassword(): "Neues Kennwort" | "New password" | "Nueva contraseña" | "Nouveau mot de passe" | "Nova Senha" | "Password nuova";
|
|
247
250
|
static get Next(): "Weiter" | "Next" | "Siguiente" | "Suivant" | "Seguinte" | "Successivo";
|
|
248
251
|
static get No(): "Nein" | "No" | "Non" | "Não";
|
|
252
|
+
static get NoAttachments(): "Keine Anhänge" | "No attachments" | "Sin archivos adjuntos" | "Aucune pièce jointe" | "Sem anexos" | "Nessun allegato";
|
|
249
253
|
static get NoCredentialsSaved(): "Keine gespeicherten Anmeldedaten" | "No credentials saved" | "No se han guardado credenciales" | "Aucune information d'identification enregistrée" | "Nenhuma credencial salva" | "Nessuna credenziale salvata";
|
|
250
254
|
static get NoDataToDisplay(): "Keine Daten zum Anzeigen" | "No data to display" | "No hay datos para mostrar" | "Aucune donnée à afficher" | "Sem dados para exibir" | "Nessun dato da visualizzare";
|
|
251
255
|
static get NoDcmtFound(): "Kein Dokument gefunden" | "No documents found" | "Ningún documento encontrado" | "Pas de documents trouvés" | "Nenhum documento encontrado" | "Nessun documento trovato";
|
|
@@ -328,6 +332,7 @@ export declare class SDKUI_Localizator {
|
|
|
328
332
|
static get Refresh(): "Aktualisieren" | "Refresh" | "Actualizar" | "Mis à jour" | "Refrescar" | "Aggiorna";
|
|
329
333
|
static get Remove(): "Entfernen" | "Remove" | "Quitar" | "Supprime" | "Remover" | "Rimuovi";
|
|
330
334
|
static get RemoveAll(): "Alle entfernen" | "Remove all" | "Eliminar todo" | "Supprime tout" | "Remover todos" | "Rimuovi tutto";
|
|
335
|
+
static get RemoveAttachment(): string;
|
|
331
336
|
static get RemoveSelected(): "Ausgewählte Objekte entfernen" | "Remove selected items" | "Eliminar objetos seleccionados" | "Supprime objets sélectionnés" | "Remova os objetos selecionados" | "Rimuovi oggetti selezionati";
|
|
332
337
|
static get RenameFolder(): "Ordner erfolgreich umbenannt" | "Folder renamed successfully" | "Carpeta renombrada exitosamente" | "Dossier renommé avec succès" | "Pasta renomeada com sucesso" | "Cartella rinominata con successo";
|
|
333
338
|
static get RenameFile(): "Datei erfolgreich umbenannt" | "File renamed successfully" | "Archivo renombrada exitosamente" | "Fichier renommé avec succès" | "Arquivo renomeada com sucesso" | "File rinominata con successo";
|
|
@@ -370,6 +375,7 @@ export declare class SDKUI_Localizator {
|
|
|
370
375
|
static get Show_CompleteName(): "Vollständigen Namen anzeigen" | "View full name" | "Mostrar nombre completo" | "Afficher le nom complet" | "Mostrar nome completo" | "Visualizza nome completo";
|
|
371
376
|
static get ShowDetails(): "Details anzeigen" | "Show details" | "Mostrar detalles" | "Afficher les détails" | "Mostrar detalhes" | "Mostra dettagli";
|
|
372
377
|
static get ShowFilters(): string;
|
|
378
|
+
static get ShowFormattingOptions(): "Formatierungsoptionen anzeigen" | "Show formatting options" | "Mostrar opciones de formato" | "Afficher les options de formatage" | "Mostrar opções de formatação" | "Mostra opzioni di formattazione";
|
|
373
379
|
static get ShowHideMetadataSystemDesc(): "Anzeigen oder Verbergen von Methadaten des Dokumententypsystems" | "Shows/hides system metadata of selected document type" | "Ver u ocultar los metadatos de sistema del tipo de documento" | "Visualise ou cache les métadonnées de système du type de document" | "Mostra ou oculta o tipo de documento de metadados do sistema" | "Visualizza o nasconde i metadati di sistema del tipo documento";
|
|
374
380
|
static get ShowLeftPanel(): "Linkes Panel anzeigen" | "Show left panel" | "Mostrar panel izquierdo" | "Afficher le panneau de gauche" | "Mostrar painel esquerdo" | "Mostra il pannello sinistro";
|
|
375
381
|
static get ShowSearch(): "Suche anzeigen" | "Show search" | "Mostrar búsqueda" | "Afficher la recherche" | "Mostrar pesquisa" | "Mostra ricerca";
|
|
@@ -639,6 +639,16 @@ export class SDKUI_Localizator {
|
|
|
639
639
|
default: return "Commenta";
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
+
static get CommentDoesNotMeetRequirements() {
|
|
643
|
+
switch (this._cultureID) {
|
|
644
|
+
case CultureIDs.De_DE: return "Der Kommentar erfüllt nicht die erforderlichen Anforderungen";
|
|
645
|
+
case CultureIDs.En_US: return "The comment does not meet the required criteria";
|
|
646
|
+
case CultureIDs.Es_ES: return "El comentario no cumple con los requisitos requeridos";
|
|
647
|
+
case CultureIDs.Fr_FR: return "Le commentaire ne répond pas aux exigences requises";
|
|
648
|
+
case CultureIDs.Pt_PT: return "O comentário não atende aos requisitos exigidos";
|
|
649
|
+
default: return "Il commento non rispetta i requisiti richiesti";
|
|
650
|
+
}
|
|
651
|
+
}
|
|
642
652
|
static get CompleteError() {
|
|
643
653
|
switch (this._cultureID) {
|
|
644
654
|
case CultureIDs.De_DE: return "Kompletter Fehler";
|
|
@@ -969,6 +979,16 @@ export class SDKUI_Localizator {
|
|
|
969
979
|
default: return "Descrizione";
|
|
970
980
|
}
|
|
971
981
|
}
|
|
982
|
+
static get DescriptionTooLongMessage() {
|
|
983
|
+
switch (this._cultureID) {
|
|
984
|
+
case CultureIDs.De_DE: return "Die Beschreibung ist zu lang: Maximal {{0}' Zeichen";
|
|
985
|
+
case CultureIDs.En_US: return "Description is too long: Max {{0}} characters";
|
|
986
|
+
case CultureIDs.Es_ES: return "La descripción es demasiado larga: Máximo {{0}} caracteres";
|
|
987
|
+
case CultureIDs.Fr_FR: return "La description est trop longue : Maximum {{0}} caractères";
|
|
988
|
+
case CultureIDs.Pt_PT: return "A descrição é demasiado longa: Máximo {{0}} caracteres";
|
|
989
|
+
default: return "La descrizione è troppo lunga: Massimo {{0}} caratteri";
|
|
990
|
+
}
|
|
991
|
+
}
|
|
972
992
|
static get Destination() {
|
|
973
993
|
switch (this._cultureID) {
|
|
974
994
|
case CultureIDs.De_DE: return "Bestimmung";
|
|
@@ -1750,6 +1770,16 @@ export class SDKUI_Localizator {
|
|
|
1750
1770
|
default: return "Nascondi il pannello sinistro";
|
|
1751
1771
|
}
|
|
1752
1772
|
}
|
|
1773
|
+
static get HideFormattingOptions() {
|
|
1774
|
+
switch (this._cultureID) {
|
|
1775
|
+
case CultureIDs.De_DE: return "Formatierungsoptionen ausblenden";
|
|
1776
|
+
case CultureIDs.En_US: return "Hide formatting options";
|
|
1777
|
+
case CultureIDs.Es_ES: return "Ocultar opciones de formato";
|
|
1778
|
+
case CultureIDs.Fr_FR: return "Masquer les options de formatage";
|
|
1779
|
+
case CultureIDs.Pt_PT: return "Ocultar opções de formatação";
|
|
1780
|
+
default: return "Nascondi opzioni di formattazione";
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1753
1783
|
static get HideMetadata() {
|
|
1754
1784
|
switch (this._cultureID) {
|
|
1755
1785
|
case CultureIDs.De_DE: return "Metadaten ausblenden";
|
|
@@ -2411,6 +2441,16 @@ export class SDKUI_Localizator {
|
|
|
2411
2441
|
default: return "No";
|
|
2412
2442
|
}
|
|
2413
2443
|
}
|
|
2444
|
+
static get NoAttachments() {
|
|
2445
|
+
switch (this._cultureID) {
|
|
2446
|
+
case CultureIDs.De_DE: return "Keine Anhänge";
|
|
2447
|
+
case CultureIDs.En_US: return "No attachments";
|
|
2448
|
+
case CultureIDs.Es_ES: return "Sin archivos adjuntos";
|
|
2449
|
+
case CultureIDs.Fr_FR: return "Aucune pièce jointe";
|
|
2450
|
+
case CultureIDs.Pt_PT: return "Sem anexos";
|
|
2451
|
+
default: return "Nessun allegato";
|
|
2452
|
+
}
|
|
2453
|
+
}
|
|
2414
2454
|
static get NoCredentialsSaved() {
|
|
2415
2455
|
switch (this._cultureID) {
|
|
2416
2456
|
case CultureIDs.De_DE: return "Keine gespeicherten Anmeldedaten";
|
|
@@ -3238,6 +3278,16 @@ export class SDKUI_Localizator {
|
|
|
3238
3278
|
default: return "Rimuovi tutto";
|
|
3239
3279
|
}
|
|
3240
3280
|
}
|
|
3281
|
+
static get RemoveAttachment() {
|
|
3282
|
+
switch (this._cultureID) {
|
|
3283
|
+
case CultureIDs.De_DE: return "Anhang entfernen";
|
|
3284
|
+
case CultureIDs.En_US: return "Remove attachment";
|
|
3285
|
+
case CultureIDs.Es_ES: return "Eliminar archivo adjunto";
|
|
3286
|
+
case CultureIDs.Fr_FR: return "Supprimer la pièce jointe";
|
|
3287
|
+
case CultureIDs.Pt_PT: return "Remover anexo";
|
|
3288
|
+
default: return "Rimuovi allegato";
|
|
3289
|
+
}
|
|
3290
|
+
}
|
|
3241
3291
|
static get RemoveSelected() {
|
|
3242
3292
|
switch (this._cultureID) {
|
|
3243
3293
|
case CultureIDs.De_DE: return "Ausgewählte Objekte entfernen";
|
|
@@ -3658,6 +3708,16 @@ export class SDKUI_Localizator {
|
|
|
3658
3708
|
default: return "Mostra filtri";
|
|
3659
3709
|
}
|
|
3660
3710
|
}
|
|
3711
|
+
static get ShowFormattingOptions() {
|
|
3712
|
+
switch (this._cultureID) {
|
|
3713
|
+
case CultureIDs.De_DE: return "Formatierungsoptionen anzeigen";
|
|
3714
|
+
case CultureIDs.En_US: return "Show formatting options";
|
|
3715
|
+
case CultureIDs.Es_ES: return "Mostrar opciones de formato";
|
|
3716
|
+
case CultureIDs.Fr_FR: return "Afficher les options de formatage";
|
|
3717
|
+
case CultureIDs.Pt_PT: return "Mostrar opções de formatação";
|
|
3718
|
+
default: return "Mostra opzioni di formattazione";
|
|
3719
|
+
}
|
|
3720
|
+
}
|
|
3661
3721
|
static get ShowHideMetadataSystemDesc() {
|
|
3662
3722
|
switch (this._cultureID) {
|
|
3663
3723
|
case CultureIDs.De_DE: return "Anzeigen oder Verbergen von Methadaten des Dokumententypsystems";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topconsultnpm/sdkui-react-beta",
|
|
3
|
-
"version": "6.14.
|
|
3
|
+
"version": "6.14.48",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"lib"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@topconsultnpm/sdk-ts-beta": "
|
|
45
|
+
"@topconsultnpm/sdk-ts-beta": "file:../tm-sdk-ts",
|
|
46
46
|
"buffer": "^6.0.3",
|
|
47
47
|
"devextreme": "24.2.6",
|
|
48
48
|
"devextreme-react": "24.2.6",
|