@topconsultnpm/sdkui-react 6.17.0-test10 → 6.17.0-test11
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/base/TMButton.d.ts +1 -0
- package/lib/components/base/TMButton.js +6 -6
- package/lib/components/base/TMCustomButton.d.ts +1 -1
- package/lib/components/base/TMCustomButton.js +28 -26
- package/lib/components/base/TMFileManagerDataGridView.js +1 -1
- package/lib/components/base/TMModal.d.ts +2 -0
- package/lib/components/base/TMModal.js +48 -3
- package/lib/components/base/TMPopUp.js +4 -1
- package/lib/components/base/TMWaitPanel.js +8 -2
- package/lib/components/choosers/TMDataListItemChooser.js +1 -1
- package/lib/components/choosers/TMMetadataChooser.js +3 -1
- package/lib/components/choosers/TMUserChooser.d.ts +4 -0
- package/lib/components/choosers/TMUserChooser.js +21 -5
- package/lib/components/editors/TMTextArea.d.ts +1 -0
- package/lib/components/editors/TMTextArea.js +43 -9
- package/lib/components/editors/TMTextBox.js +33 -3
- package/lib/components/editors/TMTextExpression.js +36 -28
- package/lib/components/features/assistant/ToppyDraggableHelpCenter.d.ts +30 -0
- package/lib/components/features/assistant/ToppyDraggableHelpCenter.js +459 -0
- package/lib/components/features/assistant/ToppySpeechBubble.d.ts +9 -0
- package/lib/components/features/assistant/ToppySpeechBubble.js +117 -0
- package/lib/components/features/blog/TMBlogCommentForm.d.ts +2 -0
- package/lib/components/features/blog/TMBlogCommentForm.js +18 -6
- package/lib/components/features/documents/TMDcmtBlog.js +1 -1
- package/lib/components/features/documents/TMDcmtForm.js +5 -5
- package/lib/components/features/documents/TMDcmtPreview.js +45 -8
- package/lib/components/features/search/TMSearchQueryPanel.js +2 -3
- package/lib/components/features/search/TMSearchResult.js +12 -13
- package/lib/components/features/tasks/TMTaskForm.js +2 -2
- package/lib/components/features/workflow/TMWorkflowPopup.js +1 -1
- package/lib/components/forms/TMSaveForm.js +2 -2
- package/lib/components/grids/TMBlogsPost.d.ts +7 -5
- package/lib/components/grids/TMBlogsPost.js +56 -10
- package/lib/components/grids/TMBlogsPostUtils.d.ts +1 -0
- package/lib/components/grids/TMBlogsPostUtils.js +10 -0
- package/lib/components/index.d.ts +1 -1
- package/lib/components/index.js +1 -1
- package/lib/helper/SDKUI_Localizator.d.ts +5 -0
- package/lib/helper/SDKUI_Localizator.js +50 -0
- package/lib/helper/TMIcons.d.ts +2 -0
- package/lib/helper/TMIcons.js +9 -0
- package/lib/helper/TMToppyMessage.js +2 -1
- package/lib/helper/dcmtsHelper.d.ts +2 -2
- package/lib/helper/dcmtsHelper.js +54 -25
- package/lib/helper/helpers.d.ts +1 -1
- package/lib/helper/helpers.js +10 -16
- package/lib/ts/types.d.ts +2 -0
- package/package.json +2 -2
- package/lib/components/features/assistant/ToppyHelpCenter.d.ts +0 -12
- package/lib/components/features/assistant/ToppyHelpCenter.js +0 -173
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
3
|
-
import { DossierEngine, LayoutModes, ResultTypes, SDK_Globals, WorkingGroupEngine } from "@topconsultnpm/sdk-ts";
|
|
3
|
+
import { DossierEngine, LayoutModes, ResultTypes, SDK_Globals, TaskDescriptor, WorkingGroupEngine } from "@topconsultnpm/sdk-ts";
|
|
4
4
|
import { ContextMenu } from "devextreme-react";
|
|
5
|
-
import { SDKUI_Localizator, Globalization, getExceptionMessage, TMConditionalWrapper } from "../../helper";
|
|
5
|
+
import { SDKUI_Localizator, Globalization, getExceptionMessage, TMConditionalWrapper, calcResponsiveSizes } from "../../helper";
|
|
6
6
|
import TMToppyMessage from "../../helper/TMToppyMessage";
|
|
7
7
|
import { useDcmtOperations } from "../../hooks/useDcmtOperations";
|
|
8
|
-
import { DownloadTypes } from "../../ts";
|
|
8
|
+
import { DownloadTypes, FormModes } from "../../ts";
|
|
9
9
|
import { TMColors } from "../../utils/theme";
|
|
10
10
|
import ShowAlert from "../base/TMAlert";
|
|
11
11
|
import { TMMessageBoxManager, ButtonNames } from "../base/TMPopUp";
|
|
@@ -14,12 +14,14 @@ import { TMLayoutWaitingContainer } from "../base/TMWaitPanel";
|
|
|
14
14
|
import TMHtmlContentDisplay from "../editors/TMHtmlContentDisplay";
|
|
15
15
|
import TMDcmtForm from "../features/documents/TMDcmtForm";
|
|
16
16
|
import { TMResultManager } from "../forms/TMResultDialog";
|
|
17
|
-
import { isHeaderFullyHidden, TMBlogsFilterCategoryId, getDcmtTypeDescriptor, findFileItemByDraftID, BlogPostTitle, NewBadge } from "./TMBlogsPostUtils";
|
|
17
|
+
import { isHeaderFullyHidden, TMBlogsFilterCategoryId, getDcmtTypeDescriptor, findFileItemByDraftID, BlogPostTitle, NewBadge, stripHtml } from "./TMBlogsPostUtils";
|
|
18
18
|
import TMBlogAttachments from "./TMBlogAttachments";
|
|
19
19
|
import TMBlogHeader from "./TMBlogHeader";
|
|
20
|
+
import TMTaskForm from "../features/tasks/TMTaskForm";
|
|
21
|
+
import { useDeviceType } from "../base/TMDeviceProvider";
|
|
20
22
|
let localAbortController = new AbortController();
|
|
21
23
|
const TMBlogsPost = (props) => {
|
|
22
|
-
const { scrollToSelected, id, posts, displayMode = "stacked", height = "100%", width = "100%", scrollToBottom = true, header, showExtendedAttachments = true, treeFs, draftLatestInfoMap, archivedDocumentMap, context, contextMenuParams = {
|
|
24
|
+
const { scrollToSelected, id, posts, displayMode = "stacked", height = "100%", width = "100%", scrollToBottom = true, header, showExtendedAttachments = true, treeFs, draftLatestInfoMap, archivedDocumentMap, context, participants, contextMenuParams = {
|
|
23
25
|
isShowHideFilterEnabled: true,
|
|
24
26
|
isShowHideIDEnaled: true,
|
|
25
27
|
isCommentEnabled: false,
|
|
@@ -30,8 +32,10 @@ const TMBlogsPost = (props) => {
|
|
|
30
32
|
isRestoreEnabled: false,
|
|
31
33
|
isRefreshEnabled: false,
|
|
32
34
|
isCreateContextualTask: false,
|
|
33
|
-
}, showFloatingCommentButton = false, showCommentFormCallback,
|
|
35
|
+
}, showFloatingCommentButton = false, showCommentFormCallback, refreshCallback, showId, setShowId, refreshHomePageNews, markBlogAsRead, externalBlogPost, resetExternalBlogPost, visible = true, allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, afterTaskSaved, handleNavigateToWGs, handleNavigateToDossiers, } = props;
|
|
34
36
|
const { abortController, showWaitPanel, waitPanelTitle, showPrimary, waitPanelTextPrimary, waitPanelValuePrimary, waitPanelMaxValuePrimary, showSecondary, waitPanelTextSecondary, waitPanelValueSecondary, waitPanelMaxValueSecondary, downloadDcmtsAsync } = useDcmtOperations();
|
|
37
|
+
// Get the current device type (e.g., mobile, tablet, desktop) using a custom hook.
|
|
38
|
+
const deviceType = useDeviceType();
|
|
35
39
|
const bottomRef = useRef(null);
|
|
36
40
|
const containerRef = useRef(null);
|
|
37
41
|
// State to manage the layout mode of the document form
|
|
@@ -58,6 +62,10 @@ const TMBlogsPost = (props) => {
|
|
|
58
62
|
const [focusedItem, setFocusedItem] = useState(undefined);
|
|
59
63
|
// State to manage the focused file
|
|
60
64
|
const [focusedAttachment, setFocusedAttachment] = useState(undefined);
|
|
65
|
+
const [taskContext, setTaskContext] = useState(undefined);
|
|
66
|
+
const [currentTask, setCurrentTask] = useState(new TaskDescriptor());
|
|
67
|
+
// State to manage show task form selected file
|
|
68
|
+
const [showTaskForm, setShowTaskForm] = useState(false);
|
|
61
69
|
// State to manage show selected file
|
|
62
70
|
const [dcmtForm, setDcmtForm] = useState({ show: false, dcmt: undefined });
|
|
63
71
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
@@ -79,11 +87,28 @@ const TMBlogsPost = (props) => {
|
|
|
79
87
|
markBlogAsRead(item[0]);
|
|
80
88
|
}
|
|
81
89
|
setSelectedItem(item ? item : []);
|
|
82
|
-
updateSelectedBlogPosts?.(item ? item : []);
|
|
83
90
|
};
|
|
84
91
|
const handleFocusedAttachment = (attachment) => {
|
|
85
92
|
setFocusedAttachment(attachment);
|
|
86
93
|
};
|
|
94
|
+
useEffect(() => {
|
|
95
|
+
if (context === undefined) {
|
|
96
|
+
setTaskContext(undefined);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
if (context.engine === 'WorkingGroupEngine' && context.object) {
|
|
100
|
+
setTaskContext({ workingGroup: { id: context?.object?.id ?? 0, name: context?.object?.name ?? '' } });
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (context.engine === 'DossierEngine' && context.object) {
|
|
104
|
+
setTaskContext({ dossier: { id: context?.object?.id ?? 0, name: context?.object?.name ?? '' } });
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if (context.engine === 'SearchEngine' && context.object) {
|
|
108
|
+
setTaskContext({ document: { tid: context?.object?.tid ?? 0, did: context?.object?.did ?? 0, name: '' } });
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
}, [context]);
|
|
87
112
|
useEffect(() => {
|
|
88
113
|
if (externalBlogPost && externalBlogPost.id) {
|
|
89
114
|
const foundPost = blogPosts.find(post => post.id === externalBlogPost.id);
|
|
@@ -434,6 +459,27 @@ const TMBlogsPost = (props) => {
|
|
|
434
459
|
}
|
|
435
460
|
});
|
|
436
461
|
};
|
|
462
|
+
const openTaskFormCallback = useCallback((targetItem) => {
|
|
463
|
+
const task = new TaskDescriptor();
|
|
464
|
+
const cleanText = stripHtml(targetItem?.description ?? '');
|
|
465
|
+
task.name = cleanText.slice(0, 100);
|
|
466
|
+
setCurrentTask(task);
|
|
467
|
+
setShowTaskForm(true);
|
|
468
|
+
}, []);
|
|
469
|
+
const closeTaskFormCallback = useCallback(() => {
|
|
470
|
+
setShowTaskForm(false);
|
|
471
|
+
}, []);
|
|
472
|
+
const onSavedTaskFormCallback = (task) => {
|
|
473
|
+
if (task) {
|
|
474
|
+
addTaskCallback?.(task);
|
|
475
|
+
setShowTaskForm(false);
|
|
476
|
+
afterTaskSaved?.(task, FormModes.Create);
|
|
477
|
+
ShowAlert({ message: SDKUI_Localizator.TaskSavedSuccessfully.replaceParams(task.name ?? '-'), mode: 'success', title: SDKUI_Localizator.Widget_Activities, duration: 3000 });
|
|
478
|
+
}
|
|
479
|
+
else {
|
|
480
|
+
ShowAlert({ message: SDKUI_Localizator.TaskSaveError, mode: 'error', title: SDKUI_Localizator.Widget_Activities, duration: 3000 });
|
|
481
|
+
}
|
|
482
|
+
};
|
|
437
483
|
// Open document form
|
|
438
484
|
const openDcmtForm = (dcmtInfo) => {
|
|
439
485
|
setDcmtForm({ show: true, dcmt: dcmtInfo });
|
|
@@ -507,11 +553,11 @@ const TMBlogsPost = (props) => {
|
|
|
507
553
|
onClick: () => { copyInClipboard(targetItem); }
|
|
508
554
|
});
|
|
509
555
|
}
|
|
510
|
-
if (contextMenuParams.isCreateContextualTask
|
|
556
|
+
if (contextMenuParams.isCreateContextualTask) {
|
|
511
557
|
menuItems.push({
|
|
512
558
|
text: SDKUI_Localizator.CreateContextualTask,
|
|
513
559
|
icon: 'plus',
|
|
514
|
-
onClick: () =>
|
|
560
|
+
onClick: () => openTaskFormCallback(targetItem),
|
|
515
561
|
disabled: isGroupArchived ? true : false,
|
|
516
562
|
beginGroup: true
|
|
517
563
|
});
|
|
@@ -614,7 +660,7 @@ const TMBlogsPost = (props) => {
|
|
|
614
660
|
boxShadow: isFocused ? "0 4px 12px rgba(19, 85, 150, 0.6)" : "none",
|
|
615
661
|
cursor: 'pointer',
|
|
616
662
|
}, children: [_jsx(BlogPostTitle, { displayMode: displayMode, layoutMode: layoutMode, blogPost: blogPost, isSelected: isSelected, isOwnComment: isOwnComment, searchText: searchText, isSys: isSys, isHomeBlogPost: isHomeBlogPost, showId: localShowId, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), isNew && _jsx(NewBadge, { layoutMode: layoutMode }), _jsx("div", { style: { fontSize: '1rem', color: "#000", marginTop: "10px", overflow: "hidden" }, children: _jsx(TMHtmlContentDisplay, { markup: blogPost.description ?? '-', searchText: searchText, isSelected: isSelected }) }), showExtendedAttachments && blogPost.attachments && blogPost.attachments.length > 0 && (_jsx(TMBlogAttachments, { contextMenuParams: contextMenuParams, attachments: blogPost.attachments, layoutMode: layoutMode, isSelected: isSelected, searchText: searchText, dcmtTypeDescriptors: dcmtTypeDescriptors, treeFs: treeFs, draftLatestInfoMap: draftLatestInfoMap, archivedDocumentMap: archivedDocumentMap, context: context, handleAttachmentFocus: handleFocusedAttachment, openDcmtForm: openDcmtForm }))] }, `${id}-blogpost-${blogPost.id}`) })] }, "blog-post-wrapper-" + id + "-" + blogPost.id);
|
|
617
|
-
}), _jsx("div", { ref: bottomRef }), anchorEl && _jsx("div", { style: { position: 'fixed', zIndex: 9999 }, children: _jsx(ContextMenu, { dataSource: menuItems, target: anchorEl, onHiding: closeContextMenu }) })] }), (dcmtForm.dcmt && dcmtForm.dcmt.TID && dcmtForm.dcmt.DID) && _jsx(TMDcmtForm, { TID: Number(dcmtForm.dcmt.TID), DID: Number(dcmtForm.dcmt.DID), layoutMode: LayoutModes.Update, onClose: closeDcmtForm, isClosable: true, titleModal: SDKUI_Localizator.Attachment + ": " + dcmtForm.dcmt.fileName, isModal: true, widthModal: "95%", heightModal: "95%", allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), (showFloatingCommentButton && showCommentFormCallback && !(context?.engine === 'WorkingGroupEngine' && context?.object?.customData1 === 1)) && _jsx("button", { style: {
|
|
663
|
+
}), _jsx("div", { ref: bottomRef }), anchorEl && _jsx("div", { style: { position: 'fixed', zIndex: 9999 }, children: _jsx(ContextMenu, { dataSource: menuItems, target: anchorEl, onHiding: closeContextMenu }) })] }), (showTaskForm && handleNavigateToWGs && handleNavigateToDossiers && getAllTasks && deleteTaskByIdsCallback && addTaskCallback && editTaskCallback) && _jsx("div", { style: { height: "100%", width: "100%" }, children: _jsx(TMTaskForm, { id: -1, title: SDKUI_Localizator.ContextualTask, isModal: true, width: calcResponsiveSizes(deviceType, '700px', '700px', '95%'), height: calcResponsiveSizes(deviceType, '670px', '80%', '95%'), formMode: FormModes.Create, visualizedTasks: [], currentTask: currentTask, setCurrentTask: () => { }, selectedRowKeys: [], handleFocusedRowKeyChange: () => { }, onStatusChanged: () => { }, onSaved: onSavedTaskFormCallback, onClose: () => closeTaskFormCallback(), onCancel: () => closeTaskFormCallback(), usersList: participants, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, isContextualCreate: true, taskContext: taskContext, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback }) }), (dcmtForm.dcmt && dcmtForm.dcmt.TID && dcmtForm.dcmt.DID) && _jsx(TMDcmtForm, { TID: Number(dcmtForm.dcmt.TID), DID: Number(dcmtForm.dcmt.DID), layoutMode: LayoutModes.Update, onClose: closeDcmtForm, isClosable: true, titleModal: SDKUI_Localizator.Attachment + ": " + dcmtForm.dcmt.fileName, isModal: true, widthModal: "95%", heightModal: "95%", allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), (showFloatingCommentButton && showCommentFormCallback && !(context?.engine === 'WorkingGroupEngine' && context?.object?.customData1 === 1)) && _jsx("button", { style: {
|
|
618
664
|
position: 'absolute',
|
|
619
665
|
bottom: '18px',
|
|
620
666
|
right: '20px',
|
|
@@ -110,4 +110,5 @@ interface BlogPostTitleProps {
|
|
|
110
110
|
handleNavigateToDossiers?: (blogPost: BlogPost | HomeBlogPost) => void;
|
|
111
111
|
}
|
|
112
112
|
export declare const BlogPostTitle: (props: BlogPostTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
113
|
+
export declare const stripHtml: (html: string) => string;
|
|
113
114
|
export {};
|
|
@@ -248,3 +248,13 @@ export const BlogPostTitle = (props) => {
|
|
|
248
248
|
...getCompactEllipsisStyle(layoutMode)
|
|
249
249
|
}, children: highlightText(subtitle, searchText, isSelected) }))] })] });
|
|
250
250
|
};
|
|
251
|
+
export const stripHtml = (html) => {
|
|
252
|
+
try {
|
|
253
|
+
const doc = new DOMParser().parseFromString(html, 'text/html');
|
|
254
|
+
return doc.body.textContent || '';
|
|
255
|
+
}
|
|
256
|
+
catch (error) {
|
|
257
|
+
// Se qualcosa va storto, restituisci l'HTML originale
|
|
258
|
+
return html;
|
|
259
|
+
}
|
|
260
|
+
};
|
|
@@ -59,7 +59,7 @@ export { default as TMBlogAttachments } from './grids/TMBlogAttachments';
|
|
|
59
59
|
export { default as TMBlogCommentForm } from './features/blog/TMBlogCommentForm';
|
|
60
60
|
export * from './query/TMQueryEditor';
|
|
61
61
|
export * from './query/TMQuerySummary';
|
|
62
|
-
export
|
|
62
|
+
export { default as ToppyDraggableHelpCenter } from './features/assistant/ToppyDraggableHelpCenter';
|
|
63
63
|
export * from './features/documents/TMDcmtForm';
|
|
64
64
|
export * from './features/documents/TMDcmtIcon';
|
|
65
65
|
export * from './features/documents/TMDcmtPreview';
|
package/lib/components/index.js
CHANGED
|
@@ -66,7 +66,7 @@ export { default as TMBlogCommentForm } from './features/blog/TMBlogCommentForm'
|
|
|
66
66
|
export * from './query/TMQueryEditor';
|
|
67
67
|
export * from './query/TMQuerySummary';
|
|
68
68
|
//assistant
|
|
69
|
-
export
|
|
69
|
+
export { default as ToppyDraggableHelpCenter } from './features/assistant/ToppyDraggableHelpCenter';
|
|
70
70
|
//documents
|
|
71
71
|
export * from './features/documents/TMDcmtForm';
|
|
72
72
|
export * from './features/documents/TMDcmtIcon';
|
|
@@ -67,6 +67,8 @@ export declare class SDKUI_Localizator {
|
|
|
67
67
|
static get AutoAdjust(): "Automatische Anpassung" | "Auto Adjust" | "Ajuste automático" | "Ajustement automatique" | "Regolazione automatica";
|
|
68
68
|
static get Author(): string;
|
|
69
69
|
static get CustomButtons(): string;
|
|
70
|
+
static get CustomButtonAction(): string;
|
|
71
|
+
static get CustomButtonActions(): string;
|
|
70
72
|
static get Back(): "Zurück" | "Back" | "Atrás" | "Dos" | "Voltar" | "Indietro";
|
|
71
73
|
static get BatchUpdate(): "Mehrfachbearbeitung" | "Multiple modification" | "Modificación múltiple" | "Modifie multiple" | "Editar múltipla" | "Modifica multipla";
|
|
72
74
|
static get BlogCase(): "Anschlagbrett" | "Blog board" | "Tablón" | "Tableau d'affichage" | "Bakeca" | "Bacheca";
|
|
@@ -285,6 +287,7 @@ export declare class SDKUI_Localizator {
|
|
|
285
287
|
static get GoToToday(): "Gehe zu heute" | "Go to today" | "Ir a hoy" | "Aller à aujourd'hui" | "Ir para hoje" | "Vai a oggi";
|
|
286
288
|
static get Grids(): string;
|
|
287
289
|
static get Hide_CompleteName(): "Vollständigen Namen ausblenden" | "Hide full name" | "Ocultar nombre completo" | "Masquer le nom complet" | "Ocultar nome completo" | "Nascondi nome completo";
|
|
290
|
+
static get HideAll(): "Alle ausblenden" | "Hide all" | "Ocultar todo" | "Masquer tout" | "Ocultar tudo" | "Nascondi tutti";
|
|
288
291
|
static get HideFloatingBar(): string;
|
|
289
292
|
static get HideFilters(): string;
|
|
290
293
|
static get HideLeftPanel(): "Linkes Panel ausblenden" | "Hide left panel" | "Ocultar panel izquierdo" | "Masquer le panneau de gauche" | "Ocultar painel esquerdo" | "Nascondi il pannello sinistro";
|
|
@@ -305,6 +308,7 @@ export declare class SDKUI_Localizator {
|
|
|
305
308
|
static get IndexingInformation(): string;
|
|
306
309
|
static get IndexOrReindex(): string;
|
|
307
310
|
static get InProgress(): "Laufende" | "In Progress" | "En curso" | "En cours" | "Em andamento" | "In corso";
|
|
311
|
+
static get InsertCommentToCompleteOperation(): string;
|
|
308
312
|
static get InsertYourEmail(): "Geben Sie Ihre E-Mail ein" | "Insert your Email" | "Inserta tu Email" | "Insérez votre e-mail" | "Insira seu e-mail" | "Inserisci la tua email";
|
|
309
313
|
static get InsertOTP(): "Geben Sie den OTP-Code ein" | "Insert OTP code" | "Insertar código OTP" | "Insérer le code OTP" | "Insira o código OTP" | "Inserisci il codice OTP";
|
|
310
314
|
static get Interrupt(): "Unterbrechen" | "Interrupt" | "interrumpir" | "Interrompre" | "Interromper" | "Interrompere";
|
|
@@ -504,6 +508,7 @@ export declare class SDKUI_Localizator {
|
|
|
504
508
|
static get RemovingFromList(): string;
|
|
505
509
|
static get RememberCredentials(): "Anmeldedaten merken" | "Remember credentials" | "Recordar credenciales" | "Se souvenir des identifiants" | "Lembrar credenciais" | "Ricorda credenziali";
|
|
506
510
|
static get ReopenDocument(): string;
|
|
511
|
+
static get TryAgain(): string;
|
|
507
512
|
static get ReplaceDocument(): "Dokument ersetzen" | "Replace Document" | "Reemplazar Documento" | "Remplacer le Document" | "Substituir Documento" | "Sostituisci Documento";
|
|
508
513
|
static get Request(): string;
|
|
509
514
|
static get RequestTo(): string;
|
|
@@ -625,6 +625,26 @@ export class SDKUI_Localizator {
|
|
|
625
625
|
default: return "Bottoni personalizzati";
|
|
626
626
|
}
|
|
627
627
|
}
|
|
628
|
+
static get CustomButtonAction() {
|
|
629
|
+
switch (this._cultureID) {
|
|
630
|
+
case CultureIDs.De_DE: return "Vorgang läuft";
|
|
631
|
+
case CultureIDs.En_US: return "Operation in progress";
|
|
632
|
+
case CultureIDs.Es_ES: return "Operación en curso";
|
|
633
|
+
case CultureIDs.Fr_FR: return "Opération en cours";
|
|
634
|
+
case CultureIDs.Pt_PT: return "Operação em curso";
|
|
635
|
+
default: return "Operazione in corso";
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
static get CustomButtonActions() {
|
|
639
|
+
switch (this._cultureID) {
|
|
640
|
+
case CultureIDs.De_DE: return "Aktion {{0}} von {{1}} wird ausgeführt";
|
|
641
|
+
case CultureIDs.En_US: return "Executing action {{0}} of {{1}}";
|
|
642
|
+
case CultureIDs.Es_ES: return "Ejecutando acción {{0}} de {{1}}";
|
|
643
|
+
case CultureIDs.Fr_FR: return "Exécution de l'action {{0}} sur {{1}}";
|
|
644
|
+
case CultureIDs.Pt_PT: return "Executando ação {{0}} de {{1}}";
|
|
645
|
+
default: return "Esecuzione azione {{0}} di {{1}}";
|
|
646
|
+
}
|
|
647
|
+
}
|
|
628
648
|
static get Back() {
|
|
629
649
|
switch (this._cultureID) {
|
|
630
650
|
case CultureIDs.De_DE: return "Zurück";
|
|
@@ -2779,6 +2799,16 @@ export class SDKUI_Localizator {
|
|
|
2779
2799
|
default: return "Nascondi nome completo";
|
|
2780
2800
|
}
|
|
2781
2801
|
}
|
|
2802
|
+
static get HideAll() {
|
|
2803
|
+
switch (this._cultureID) {
|
|
2804
|
+
case CultureIDs.De_DE: return "Alle ausblenden";
|
|
2805
|
+
case CultureIDs.En_US: return "Hide all";
|
|
2806
|
+
case CultureIDs.Es_ES: return "Ocultar todo";
|
|
2807
|
+
case CultureIDs.Fr_FR: return "Masquer tout";
|
|
2808
|
+
case CultureIDs.Pt_PT: return "Ocultar tudo";
|
|
2809
|
+
default: return "Nascondi tutti";
|
|
2810
|
+
}
|
|
2811
|
+
}
|
|
2782
2812
|
static get HideFloatingBar() {
|
|
2783
2813
|
switch (this._cultureID) {
|
|
2784
2814
|
case CultureIDs.De_DE: return "Floating-Leiste ausblenden";
|
|
@@ -2979,6 +3009,16 @@ export class SDKUI_Localizator {
|
|
|
2979
3009
|
default: return "In corso";
|
|
2980
3010
|
}
|
|
2981
3011
|
}
|
|
3012
|
+
static get InsertCommentToCompleteOperation() {
|
|
3013
|
+
switch (this._cultureID) {
|
|
3014
|
+
case CultureIDs.De_DE: return "Geben Sie einen Kommentar ein, um den Vorgang abzuschließen.";
|
|
3015
|
+
case CultureIDs.En_US: return "Enter a comment to complete the operation.";
|
|
3016
|
+
case CultureIDs.Es_ES: return "Introduzca un comentario para completar la operación.";
|
|
3017
|
+
case CultureIDs.Fr_FR: return "Saisissez un commentaire pour terminer l’opération.";
|
|
3018
|
+
case CultureIDs.Pt_PT: return "Introduza um comentário para concluir a operação.";
|
|
3019
|
+
default: return "Inserisci un commento per completare l’operazione.";
|
|
3020
|
+
}
|
|
3021
|
+
}
|
|
2982
3022
|
static get InsertYourEmail() {
|
|
2983
3023
|
switch (this._cultureID) {
|
|
2984
3024
|
case CultureIDs.De_DE: return "Geben Sie Ihre E-Mail ein";
|
|
@@ -4968,6 +5008,16 @@ export class SDKUI_Localizator {
|
|
|
4968
5008
|
default: return "Riapri documento";
|
|
4969
5009
|
}
|
|
4970
5010
|
}
|
|
5011
|
+
static get TryAgain() {
|
|
5012
|
+
switch (this._cultureID) {
|
|
5013
|
+
case CultureIDs.De_DE: return "Erneut versuchen";
|
|
5014
|
+
case CultureIDs.En_US: return "Try Again";
|
|
5015
|
+
case CultureIDs.Es_ES: return "Intentar de nuevo";
|
|
5016
|
+
case CultureIDs.Fr_FR: return "Réessayer";
|
|
5017
|
+
case CultureIDs.Pt_PT: return "Tentar novamente";
|
|
5018
|
+
default: return "Riprova";
|
|
5019
|
+
}
|
|
5020
|
+
}
|
|
4971
5021
|
static get ReplaceDocument() {
|
|
4972
5022
|
switch (this._cultureID) {
|
|
4973
5023
|
case CultureIDs.De_DE: return "Dokument ersetzen";
|
package/lib/helper/TMIcons.d.ts
CHANGED
|
@@ -134,6 +134,8 @@ declare function IconImport(props: React.SVGProps<SVGSVGElement>): import("react
|
|
|
134
134
|
declare function IconPalette(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
135
135
|
declare function IconFastSearch(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
136
136
|
declare function IconUserGroup(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
137
|
+
export declare function IconShowAllUsers(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
138
|
+
export declare function IconShowAllUsersOff(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
137
139
|
declare function IconUserGroupOutline(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
138
140
|
declare function IconBoard(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
139
141
|
declare function IconActivity(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
package/lib/helper/TMIcons.js
CHANGED
|
@@ -405,6 +405,15 @@ function IconFastSearch(props) {
|
|
|
405
405
|
function IconUserGroup(props) {
|
|
406
406
|
return (_jsxs("svg", { fontSize: props.fontSize ? props.fontSize : FONTSIZE, viewBox: "0 0 640 512", fill: "currentColor", height: "1em", width: "1em", ...props, children: [" ", _jsx("path", { d: "M352 128c0 70.7-57.3 128-128 128S96 198.7 96 128 153.3 0 224 0s128 57.3 128 128zM0 482.3C0 383.8 79.8 304 178.3 304h91.4c98.5 0 178.3 79.8 178.3 178.3 0 16.4-13.3 29.7-29.7 29.7H29.7C13.3 512 0 498.7 0 482.3zM609.3 512H471.4c5.4-9.4 8.6-20.3 8.6-32v-8c0-60.7-27.1-115.2-69.8-151.8 2.4-.1 4.7-.2 7.1-.2h61.4c89.1 0 161.3 72.2 161.3 161.3 0 17-13.8 30.7-30.7 30.7zM432 256c-31 0-59-12.6-79.3-32.9 19.7-26.6 31.3-59.5 31.3-95.1 0-26.8-6.6-52.1-18.3-74.3C384.3 40.1 407.2 32 432 32c61.9 0 112 50.1 112 112s-50.1 112-112 112z" }), " "] }));
|
|
407
407
|
}
|
|
408
|
+
export function IconShowAllUsers(props) {
|
|
409
|
+
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "1em", height: "1em", fontSize: props.fontSize ? props.fontSize : FONTSIZE, ...props, children: _jsx("path", { fill: "currentColor", d: "M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5s-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5S5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05c1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5" }) }));
|
|
410
|
+
}
|
|
411
|
+
export function IconShowAllUsersOff(props) {
|
|
412
|
+
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "1em", height: "1em", fontSize: props.fontSize ? props.fontSize : FONTSIZE, ...props, children: _jsx("path", { fill: "currentColor", d: "M15 8c0-1.42-.5-2.73-1.33-3.76c.42-.14.86-.24 1.33-.24c2.21 0 4 1.79 4 4s-1.79 4-4 4h-.18l-.77-.77c.6-.94.95-2.05.95-3.23m7.83 12H23v-3c0-2.18-3.58-3.47-6.34-3.87c1.1.75 1.95 1.71 2.23 2.94zM7.24 4.41a3.996 3.996 0 0 1 5.35 5.35zM9.17 12H9c-2.21 0-4-1.79-4-4v-.17L.69 3.51L2.1 2.1l19.8 19.8l-1.41 1.41L17 19.83V20H1v-3c0-2.66 5.33-4 8-4c.37 0 .8.03 1.25.08z" }) }));
|
|
413
|
+
}
|
|
414
|
+
function IconUserGroupSlash(props) {
|
|
415
|
+
return (_jsxs("svg", { fontSize: props.fontSize ? props.fontSize : FONTSIZE, viewBox: "0 0 640 512", fill: "currentColor", height: "1em", width: "1em", ...props, children: [" ", _jsx("path", { d: "M352 128c0 70.7-57.3 128-128 128S96 198.7 96 128 153.3 0 224 0s128 57.3 128 128zM0 482.3C0 383.8 79.8 304 178.3 304h91.4c98.5 0 178.3 79.8 178.3 178.3 0 16.4-13.3 29.7-29.7 29.7H29.7C13.3 512 0 498.7 0 482.3zM609.3 512H471.4c5.4-9.4 8.6-20.3 8.6-32v-8c0-60.7-27.1-115.2-69.8-151.8 2.4-.1 4.7-.2 7.1-.2h61.4c89.1 0 161.3 72.2 161.3 161.3 0 17-13.8 30.7-30.7 30.7zM432 256c-31 0-59-12.6-79.3-32.9 19.7-26.6 31.3-59.5 31.3-95.1 0-26.8-6.6-52.1-18.3-74.3C384.3 40.1 407.2 32 432 32c61.9 0 112 50.1 112 112s-50.1 112-112 112z" }), " ", _jsx("line", { x1: "0", y1: "512", x2: "640", y2: "0", stroke: "currentColor", strokeWidth: "40" }), " "] }));
|
|
416
|
+
}
|
|
408
417
|
function IconUserGroupOutline(props) {
|
|
409
418
|
return (_jsxs("svg", { fontSize: props.fontSize ? props.fontSize : FONTSIZE, viewBox: "0 0 640 512", fill: "white", stroke: "black", strokeWidth: "40", height: "1em", width: "1em", ...props, children: [" ", _jsx("path", { d: "M352 128c0 70.7-57.3 128-128 128S96 198.7 96 128 153.3 0 224 0s128 57.3 128 128zM0 482.3C0 383.8 79.8 304 178.3 304h91.4c98.5 0 178.3 79.8 178.3 178.3 0 16.4-13.3 29.7-29.7 29.7H29.7C13.3 512 0 498.7 0 482.3zM609.3 512H471.4c5.4-9.4 8.6-20.3 8.6-32v-8c0-60.7-27.1-115.2-69.8-151.8 2.4-.1 4.7-.2 7.1-.2h61.4c89.1 0 161.3 72.2 161.3 161.3 0 17-13.8 30.7-30.7 30.7zM432 256c-31 0-59-12.6-79.3-32.9 19.7-26.6 31.3-59.5 31.3-95.1 0-26.8-6.6-52.1-18.3-74.3C384.3 40.1 407.2 32 432 32c61.9 0 112 50.1 112 112s-50.1 112-112 112z" }), " "] }));
|
|
410
419
|
}
|
|
@@ -34,9 +34,10 @@ const StyledToppyImage = styled.img `
|
|
|
34
34
|
max-width: 120px;
|
|
35
35
|
height: auto;
|
|
36
36
|
display: block;
|
|
37
|
+
user-select: none;
|
|
37
38
|
`;
|
|
38
39
|
const TMToppyMessage = (props) => {
|
|
39
40
|
const { message, titleTooltip } = props;
|
|
40
|
-
return (_jsxs(TMLayoutContainer, { gap: 30, alignItems: "center", justifyContent: "center", onContextMenu: (e) => e.preventDefault(), children: [_jsx(StyledToppyTextContainer, { children: _jsx(StyledToppyText, { title: titleTooltip || undefined, children: message }) }), _jsx(StyledToppyImage, { src: Toppy, alt: "Toppy" })] }));
|
|
41
|
+
return (_jsxs(TMLayoutContainer, { gap: 30, alignItems: "center", justifyContent: "center", onContextMenu: (e) => e.preventDefault(), children: [_jsx(StyledToppyTextContainer, { children: _jsx(StyledToppyText, { title: titleTooltip || undefined, children: message }) }), _jsx(StyledToppyImage, { src: Toppy, alt: "Toppy", draggable: false, onMouseDown: (e) => e.stopPropagation() })] }));
|
|
41
42
|
};
|
|
42
43
|
export default TMToppyMessage;
|
|
@@ -4,5 +4,5 @@ export declare const hasDetailRelations: (mTID: number | undefined) => Promise<b
|
|
|
4
4
|
/** Check if dcmtType (mTID) has configured Master or Many-to-Many relations */
|
|
5
5
|
export declare const hasMasterRelations: (mTID: number | undefined) => Promise<boolean>;
|
|
6
6
|
export declare const isXMLFileExt: (fileExt: string | undefined) => boolean;
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
7
|
+
export declare const getButtonAttributes: (args: string | undefined, formData: MetadataValueDescriptorEx[] | undefined, selectedItems: Array<any> | undefined) => Record<string, any> | undefined;
|
|
8
|
+
export declare const getSelectedItem: (args: string | undefined, formData: MetadataValueDescriptorEx[] | undefined, item: any) => Record<string, any> | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RelationCacheService, RelationTypes } from "@topconsultnpm/sdk-ts";
|
|
1
|
+
import { RelationCacheService, RelationTypes, SDK_Globals } from "@topconsultnpm/sdk-ts";
|
|
2
2
|
/** Check if dcmtType (mTID) has configured Detail or Many-to-Many relations */
|
|
3
3
|
export const hasDetailRelations = async (mTID) => {
|
|
4
4
|
let allRelations = await RelationCacheService.GetAllAsync();
|
|
@@ -24,30 +24,59 @@ export const isXMLFileExt = (fileExt) => {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
/*utility functions for TMCustomButton*/
|
|
27
|
-
export const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}, {});
|
|
38
|
-
});
|
|
39
|
-
const formDataMap = (data, args) => {
|
|
40
|
-
const tokens = args.match(/\{@?[^}]+\}/g) || [];
|
|
41
|
-
return tokens.map(token => {
|
|
42
|
-
if (token.startsWith('{@')) {
|
|
43
|
-
// Campo dinamico: {@campo} -> cerca in formData
|
|
44
|
-
const fieldName = token.slice(2, -1); // Rimuove {@...}
|
|
45
|
-
const md = data.find(md => md.md?.name === fieldName);
|
|
46
|
-
return md?.value;
|
|
27
|
+
export const getButtonAttributes = (args, formData, selectedItems) => args && formData ? formDataMap(formData, args, selectedItems) : undefined;
|
|
28
|
+
const getSelectedItems = (selectedItems) => selectedItems && selectedItems.map(item => item["DID"]) || [];
|
|
29
|
+
export const getSelectedItem = (args, formData, item) => {
|
|
30
|
+
//converto item in formData
|
|
31
|
+
const formDataConverted = [];
|
|
32
|
+
for (const key in item) {
|
|
33
|
+
const md = formData?.find(md => `${item["TID"]}_${md.mid}` === key);
|
|
34
|
+
if (md) { // aggiungo solo i metadati
|
|
35
|
+
const name = md.md?.name || "";
|
|
36
|
+
formDataConverted.push({ md: { name: name }, value: item[key] });
|
|
47
37
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
38
|
+
}
|
|
39
|
+
return args && formDataConverted ?
|
|
40
|
+
formDataMap(formDataConverted, args, []) : undefined;
|
|
41
|
+
};
|
|
42
|
+
const formDataMap = (data, args, selectedItems) => {
|
|
43
|
+
const session = SDK_Globals.tmSession;
|
|
44
|
+
const sessionDescr = session?.SessionDescr;
|
|
45
|
+
const result = {};
|
|
46
|
+
// Helper per estrarre il valore di un campo
|
|
47
|
+
const getParamValue = (fieldName) => {
|
|
48
|
+
const md = data.find(md => md.md?.name === fieldName);
|
|
49
|
+
switch (fieldName) {
|
|
50
|
+
case 'SelectedDIDs': return getSelectedItems(selectedItems);
|
|
51
|
+
case 'AuthenticationMode': return sessionDescr?.authenticationMode ?? null;
|
|
52
|
+
case 'ArchiveID': return sessionDescr?.archiveID ?? null;
|
|
53
|
+
case 'CultureID': return sessionDescr?.cultureID ?? null;
|
|
54
|
+
case 'Domain': return sessionDescr?.domain ?? null;
|
|
55
|
+
case 'UserID': return sessionDescr?.userID ?? null;
|
|
56
|
+
case 'UserName': return sessionDescr?.userName ?? null;
|
|
57
|
+
case 'Session': return session ?? null;
|
|
58
|
+
default: return md?.value;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
// Regex per catturare: chiave=[...] o chiave={...} o {@campo}
|
|
62
|
+
const keyValueRegex = /(\w+)=\[([^\]]+)\]|(\w+)=\{@?([^}]+)\}|\{@([^}]+)\}/g;
|
|
63
|
+
for (const match of args.matchAll(keyValueRegex)) {
|
|
64
|
+
if (match[1]) {
|
|
65
|
+
// Formato: chiave=[{@campo} testo {@campo} ...]
|
|
66
|
+
const key = match[1];
|
|
67
|
+
const content = match[2].replace(/\{@([^}]+)\}/g, (_, fieldName) => data.find(md => md.md?.name === fieldName)?.value ?? '');
|
|
68
|
+
result[key] = content;
|
|
51
69
|
}
|
|
52
|
-
|
|
70
|
+
else if (match[3]) {
|
|
71
|
+
// Formato: chiave={@campo} o chiave={valore}
|
|
72
|
+
const key = match[3];
|
|
73
|
+
const value = match[4];
|
|
74
|
+
result[key] = value.startsWith('@') ? getParamValue(value.substring(1)) : value;
|
|
75
|
+
}
|
|
76
|
+
else if (match[5]) {
|
|
77
|
+
// Formato: {@campo}
|
|
78
|
+
result[match[5]] = getParamValue(match[5]);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return result;
|
|
53
82
|
};
|
package/lib/helper/helpers.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare const TABLET_WIDTH = 1024;
|
|
|
6
6
|
declare const MOBILE_WIDTH = 640;
|
|
7
7
|
declare const calcResponsiveDirection: (deviceType: DeviceType, desktopDir: "horizontal" | "vertical", tabletDir: "horizontal" | "vertical", mobileDir: "horizontal" | "vertical") => "horizontal" | "vertical";
|
|
8
8
|
declare const openApps: (appModule: AppModules, tmSession: ITopMediaSession, appRoutes?: any[]) => Promise<void>;
|
|
9
|
-
export declare const setSDK_GlobalsInfoAsync: (tms: ITopMediaSession | undefined) => Promise<ITopMediaSession>;
|
|
9
|
+
export declare const setSDK_GlobalsInfoAsync: (tms: ITopMediaSession | undefined) => Promise<ITopMediaSession | undefined>;
|
|
10
10
|
declare const calcResponsiveSizes: (deviceType: DeviceType | undefined, desktopSize: string, tabletSize: string, mobileSize: string) => string;
|
|
11
11
|
declare const getColor: (color: ColorsType) => string;
|
|
12
12
|
/**
|
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, SystemMIDs, SystemMIDsAsNumber, TopMediaServer } from "@topconsultnpm/sdk-ts";
|
|
4
|
+
import { AccessLevels, MetadataDataDomains, MetadataDataTypes, MetadataDescriptor, MetadataFormatDescriptor, MetadataFormats, MetadataPermission, SDK_Globals, SetGlobalsInfoAsync, SystemMIDs, SystemMIDsAsNumber, TopMediaServer } 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";
|
|
@@ -37,22 +37,13 @@ const openApps = async (appModule, tmSession, appRoutes) => {
|
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
export const setSDK_GlobalsInfoAsync = async (tms) => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
SDK_Globals.tmSession.AutoRefresh = true;
|
|
47
|
-
if (SDK_Globals.license == undefined) {
|
|
48
|
-
try {
|
|
49
|
-
SDK_Globals.license = await tmSessionNew.NewLicenseEngine().RetrieveAsync();
|
|
50
|
-
}
|
|
51
|
-
catch (e) {
|
|
52
|
-
TMExceptionBoxManager.show({ title: 'Errore caricamento licenza', exception: e });
|
|
53
|
-
}
|
|
40
|
+
try {
|
|
41
|
+
return await SetGlobalsInfoAsync(tms);
|
|
42
|
+
}
|
|
43
|
+
catch (e) {
|
|
44
|
+
TMExceptionBoxManager.show({ exception: e.message });
|
|
45
|
+
return undefined;
|
|
54
46
|
}
|
|
55
|
-
return tmSessionNew;
|
|
56
47
|
};
|
|
57
48
|
const calcResponsiveSizes = (deviceType, desktopSize, tabletSize, mobileSize) => {
|
|
58
49
|
if (deviceType === DeviceType.DESKTOP)
|
|
@@ -480,6 +471,9 @@ export const extensionHandler = (fileExt) => {
|
|
|
480
471
|
case 'xml.p7m.tsd': return FileExtensionHandler.READY_TO_SHOW;
|
|
481
472
|
case 'pdf': return FileExtensionHandler.READY_TO_SHOW;
|
|
482
473
|
case 'txt': return FileExtensionHandler.READY_TO_SHOW;
|
|
474
|
+
case 'config':
|
|
475
|
+
case 'cfg':
|
|
476
|
+
case 'json': return FileExtensionHandler.READY_TO_SHOW;
|
|
483
477
|
default: return FileExtensionHandler.NONE;
|
|
484
478
|
}
|
|
485
479
|
};
|
package/lib/ts/types.d.ts
CHANGED
|
@@ -112,6 +112,7 @@ export type TaskContext = {
|
|
|
112
112
|
dossier?: {
|
|
113
113
|
id: number;
|
|
114
114
|
name: string;
|
|
115
|
+
origin?: string;
|
|
115
116
|
};
|
|
116
117
|
document?: {
|
|
117
118
|
tid: number;
|
|
@@ -172,6 +173,7 @@ export interface ITMSaveFormBaseProps {
|
|
|
172
173
|
customTooltipSaveButton?: string;
|
|
173
174
|
showBackButton?: boolean;
|
|
174
175
|
showUndoButton?: boolean;
|
|
176
|
+
showCloseButton?: boolean;
|
|
175
177
|
showWarningsCount?: boolean;
|
|
176
178
|
showErrorCount?: boolean;
|
|
177
179
|
hasNavigation?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topconsultnpm/sdkui-react",
|
|
3
|
-
"version": "6.17.0-
|
|
3
|
+
"version": "6.17.0-test11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"lib"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@topconsultnpm/sdk-ts": "6.19.0-dev2.
|
|
42
|
+
"@topconsultnpm/sdk-ts": "6.19.0-dev2.7",
|
|
43
43
|
"buffer": "^6.0.3",
|
|
44
44
|
"devextreme": "25.1.7",
|
|
45
45
|
"devextreme-react": "25.1.7",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DeviceType } from '../../base/TMDeviceProvider';
|
|
3
|
-
interface ToppyHelpCenterProps {
|
|
4
|
-
content?: React.ReactNode;
|
|
5
|
-
deviceType?: DeviceType;
|
|
6
|
-
usePortal?: boolean;
|
|
7
|
-
align?: 'right' | 'left';
|
|
8
|
-
initialIsCollapsed?: boolean;
|
|
9
|
-
onToppyImageClick?: () => void;
|
|
10
|
-
}
|
|
11
|
-
declare const ToppyHelpCenter: React.FC<ToppyHelpCenterProps>;
|
|
12
|
-
export default ToppyHelpCenter;
|