@topconsultnpm/sdkui-react 6.19.0-test.1 → 6.19.0-test2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/assets/IconsS4t/add.svg +12 -12
- package/lib/assets/IconsS4t/aggiorna.svg +18 -18
- package/lib/assets/IconsS4t/bookmark.svg +42 -42
- package/lib/assets/IconsS4t/cancella.svg +15 -15
- package/lib/assets/IconsS4t/check-box.svg +19 -19
- package/lib/assets/IconsS4t/down-arrow-signBook.svg +40 -40
- package/lib/assets/IconsS4t/down.svg +28 -28
- package/lib/assets/IconsS4t/edit-file.svg +19 -19
- package/lib/assets/IconsS4t/edita.svg +32 -32
- package/lib/assets/IconsS4t/firma.svg +19 -19
- package/lib/assets/IconsS4t/icona_download.svg +16 -16
- package/lib/assets/IconsS4t/info.svg +51 -51
- package/lib/assets/IconsS4t/left.svg +20 -20
- package/lib/assets/IconsS4t/line.svg +40 -40
- package/lib/assets/IconsS4t/more.svg +19 -19
- package/lib/assets/IconsS4t/plus.svg +23 -23
- package/lib/assets/IconsS4t/printer.svg +49 -49
- package/lib/assets/IconsS4t/radio-on-button.svg +25 -25
- package/lib/assets/IconsS4t/rectangle.svg +41 -41
- package/lib/assets/IconsS4t/redo.svg +19 -19
- package/lib/assets/IconsS4t/right-arrow-signBook-finish.svg +40 -40
- package/lib/assets/IconsS4t/right-arrow-signBook.svg +40 -40
- package/lib/assets/IconsS4t/right.svg +22 -22
- package/lib/assets/IconsS4t/searchbar.svg +21 -21
- package/lib/assets/IconsS4t/text-box.svg +36 -36
- package/lib/assets/IconsS4t/tick.svg +8 -8
- package/lib/assets/IconsS4t/trash-white.svg +10 -10
- package/lib/assets/IconsS4t/undo.svg +19 -19
- package/lib/assets/IconsS4t/up.svg +32 -32
- package/lib/assets/IconsS4t/video-streaming.svg +2 -2
- package/lib/assets/IconsS4t/zoom-in.svg +58 -58
- package/lib/assets/IconsS4t/zoom-out.svg +56 -56
- package/lib/assets/icomoon.svg +96 -96
- package/lib/assets/italy.svg +16 -16
- package/lib/assets/six.svg +3 -3
- package/lib/assets/thumbnails/index.ts +39 -39
- package/lib/assets/topmedia-six.svg +65 -65
- package/lib/assets/topmeida-six-bianco.svg +65 -65
- package/lib/components/base/Styled.js +302 -302
- package/lib/components/base/TMAccordion.js +43 -43
- package/lib/components/base/TMAccordionNew.d.ts +28 -0
- package/lib/components/base/TMAccordionNew.js +326 -0
- package/lib/components/base/TMAreaManager.js +23 -23
- package/lib/components/base/TMButton.d.ts +1 -0
- package/lib/components/base/TMButton.js +136 -136
- package/lib/components/base/TMClosableList.js +46 -46
- package/lib/components/base/TMConfirm.js +20 -20
- package/lib/components/base/TMContextMenu.js +4 -4
- package/lib/components/base/TMContextMenuOLD.js +25 -25
- package/lib/components/base/TMCounterBar.js +32 -32
- package/lib/components/base/TMCounterContainer.js +30 -30
- package/lib/components/base/TMCustomButton.d.ts +1 -1
- package/lib/components/base/TMCustomButton.js +90 -35
- package/lib/components/base/TMDataGridExportForm.d.ts +1 -1
- package/lib/components/base/TMDataGridExportForm.js +9 -3
- package/lib/components/base/TMDropDownMenu.js +24 -24
- package/lib/components/base/TMFileManager.js +12 -3
- package/lib/components/base/TMFileManagerDataGridView.d.ts +2 -0
- package/lib/components/base/TMFileManagerDataGridView.js +12 -3
- package/lib/components/base/TMFileManagerThumbnailItems.d.ts +2 -0
- package/lib/components/base/TMFileManagerThumbnailItems.js +12 -2
- package/lib/components/base/TMFileManagerThumbnailsView.d.ts +2 -0
- package/lib/components/base/TMFileManagerThumbnailsView.js +2 -2
- package/lib/components/base/TMFileManagerUtils.js +19 -19
- package/lib/components/base/TMFloatingToolbar.js +34 -34
- package/lib/components/base/TMLayout.js +44 -44
- package/lib/components/base/TMList.js +34 -34
- package/lib/components/base/TMModal.d.ts +2 -0
- package/lib/components/base/TMModal.js +79 -34
- package/lib/components/base/TMPanel.js +57 -57
- package/lib/components/base/TMPopUp.js +186 -117
- package/lib/components/base/TMProgressBar.js +20 -20
- package/lib/components/base/TMResizableMenu.js +28 -28
- package/lib/components/base/TMRightSidebar.js +40 -40
- package/lib/components/base/TMSpinner.js +121 -121
- package/lib/components/base/TMTab.js +11 -11
- package/lib/components/base/TMToggleButton.js +36 -36
- package/lib/components/base/TMToolbarCard.js +35 -35
- package/lib/components/base/TMTooltip.d.ts +1 -1
- package/lib/components/base/TMTooltip.js +1 -1
- package/lib/components/base/TMTreeView.js +16 -16
- package/lib/components/base/TMUserAvatar.js +7 -7
- package/lib/components/base/TMWaitPanel.js +30 -24
- package/lib/components/choosers/TMCultureIDPicker.js +35 -35
- package/lib/components/choosers/TMDataListItemChooser.js +1 -1
- package/lib/components/choosers/TMDataListItemPicker.js +54 -54
- package/lib/components/choosers/TMDcmtTypeChooser.js +2 -2
- package/lib/components/choosers/TMMetadataChooser.d.ts +4 -1
- package/lib/components/choosers/TMMetadataChooser.js +31 -8
- package/lib/components/choosers/TMUserChooser.d.ts +4 -0
- package/lib/components/choosers/TMUserChooser.js +21 -5
- package/lib/components/editors/TMCheckBox.js +24 -24
- package/lib/components/editors/TMDateBox.d.ts +1 -1
- package/lib/components/editors/TMDropDown.js +43 -43
- package/lib/components/editors/TMEditorStyled.js +71 -71
- package/lib/components/editors/TMHtmlContentDisplay.js +16 -16
- package/lib/components/editors/TMLocalizedTextBox.js +31 -31
- package/lib/components/editors/TMMetadataValues.js +62 -21
- package/lib/components/editors/TMRadioButton.js +39 -39
- package/lib/components/editors/TMSummary.js +39 -39
- package/lib/components/editors/TMTextArea.d.ts +1 -0
- package/lib/components/editors/TMTextArea.js +56 -22
- package/lib/components/editors/TMTextBox.js +53 -23
- 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 +471 -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 +21 -9
- package/lib/components/features/documents/TMDcmtBlog.js +1 -1
- package/lib/components/features/documents/TMDcmtForm.js +321 -62
- package/lib/components/features/documents/TMDcmtIcon.js +17 -12
- package/lib/components/features/documents/TMDcmtPreview.js +75 -38
- package/lib/components/features/documents/TMFileUploader.js +21 -21
- package/lib/components/features/documents/TMRelationViewer.js +56 -23
- package/lib/components/features/search/TMSavedQuerySelector.js +52 -52
- package/lib/components/features/search/TMSearch.js +2 -2
- package/lib/components/features/search/TMSearchQueryEditor.js +14 -14
- package/lib/components/features/search/TMSearchQueryPanel.js +40 -58
- package/lib/components/features/search/TMSearchResult.js +160 -35
- package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +2 -1
- package/lib/components/features/search/TMSearchResultsMenuItems.js +117 -60
- package/lib/components/features/search/TMSignSettingsForm.d.ts +9 -0
- package/lib/components/features/search/TMSignSettingsForm.js +621 -0
- package/lib/components/features/search/TMTreeSelector.js +66 -66
- package/lib/components/features/tasks/TMTaskForm.js +42 -36
- package/lib/components/features/tasks/TMTasksAgenda.js +4 -4
- package/lib/components/features/tasks/TMTasksCalendar.js +2 -2
- package/lib/components/features/tasks/TMTasksHeader.js +1 -1
- package/lib/components/features/tasks/TMTasksUtils.d.ts +2 -1
- package/lib/components/features/tasks/TMTasksUtils.js +18 -3
- package/lib/components/features/tasks/TMTasksUtilsView.js +26 -4
- package/lib/components/features/tasks/TMTasksView.js +12 -6
- package/lib/components/features/wg/TMWGsCopyMoveForm.js +9 -9
- package/lib/components/features/workflow/TMWorkflowPopup.js +44 -44
- package/lib/components/features/workflow/diagram/ConnectionComponent.js +29 -29
- package/lib/components/features/workflow/diagram/ConnectionForm.js +10 -10
- package/lib/components/features/workflow/diagram/DiagramItemComponent.js +57 -57
- package/lib/components/features/workflow/diagram/DiagramItemForm.js +40 -35
- package/lib/components/features/workflow/diagram/DiagramItemSvgContent.js +12 -12
- package/lib/components/features/workflow/diagram/RecipientList.js +39 -39
- package/lib/components/features/workflow/diagram/WFDiagram.js +317 -285
- package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.js +4 -4
- package/lib/components/forms/Login/Chooser.js +35 -35
- package/lib/components/forms/Login/Menu.js +22 -22
- package/lib/components/forms/Login/SelectBox.js +46 -46
- package/lib/components/forms/Login/TMLoginForm.js +14 -14
- package/lib/components/forms/Login/TextBox.js +57 -57
- package/lib/components/forms/TMResultDialog.js +8 -2
- package/lib/components/forms/TMSaveForm.js +3 -11
- package/lib/components/grids/TMBlogAttachments.d.ts +0 -14
- package/lib/components/grids/TMBlogAttachments.js +10 -5
- package/lib/components/grids/TMBlogsPost.d.ts +8 -3
- package/lib/components/grids/TMBlogsPost.js +100 -39
- package/lib/components/grids/TMBlogsPostUtils.d.ts +1 -0
- package/lib/components/grids/TMBlogsPostUtils.js +32 -11
- package/lib/components/grids/TMRecentsManager.js +51 -51
- package/lib/components/grids/TMValidationItemsList.js +48 -48
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +2 -1
- package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +1 -0
- package/lib/components/layout/panelManager/TMPanelManagerContainer.js +14 -14
- package/lib/components/layout/panelManager/TMPanelManagerContext.js +0 -1
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +36 -35
- package/lib/components/layout/panelManager/types.d.ts +1 -0
- package/lib/components/pages/TMPage.js +1 -1
- package/lib/components/query/TMQueryEditor.js +17 -17
- package/lib/components/query/TMQuerySummary.d.ts +1 -0
- package/lib/components/query/TMQuerySummary.js +15 -15
- package/lib/components/settings/SettingsAppearance.js +9 -1
- package/lib/components/sidebar/TMCommandsPanel.js +10 -10
- package/lib/components/sidebar/TMHeader.js +307 -307
- package/lib/components/sidebar/TMSidebar.js +24 -24
- package/lib/components/sidebar/TMSidebarItem.js +21 -21
- package/lib/components/viewers/TMDataListItemViewer.d.ts +1 -1
- package/lib/components/viewers/TMMidViewer.d.ts +1 -1
- package/lib/components/viewers/TMTidViewer.d.ts +1 -1
- package/lib/components/wizard/TMStepIndicator.js +102 -102
- package/lib/components/wizard/TMWizard.js +29 -29
- package/lib/helper/GlobalStyles.d.ts +2 -0
- package/lib/helper/GlobalStyles.js +10 -0
- package/lib/helper/Globalization.d.ts +1 -0
- package/lib/helper/Globalization.js +30 -0
- package/lib/helper/SDKUI_Globals.d.ts +2 -0
- package/lib/helper/SDKUI_Globals.js +9 -1
- package/lib/helper/SDKUI_Localizator.d.ts +50 -2
- package/lib/helper/SDKUI_Localizator.js +502 -22
- package/lib/helper/TMCustomSearchBar.js +1 -1
- package/lib/helper/TMIcons.d.ts +4 -1
- package/lib/helper/TMIcons.js +14 -2
- package/lib/helper/TMToppyMessage.d.ts +1 -0
- package/lib/helper/TMToppyMessage.js +33 -32
- package/lib/helper/TMUtils.d.ts +42 -4
- package/lib/helper/TMUtils.js +227 -60
- package/lib/helper/dcmtsHelper.d.ts +2 -1
- package/lib/helper/dcmtsHelper.js +56 -17
- package/lib/helper/helpers.d.ts +1 -1
- package/lib/helper/helpers.js +12 -17
- package/lib/helper/index.d.ts +1 -0
- package/lib/helper/index.js +1 -0
- package/lib/hooks/useDcmtOperations.d.ts +1 -1
- package/lib/hooks/useDcmtOperations.js +10 -6
- package/lib/hooks/useRelatedDocuments.js +35 -26
- package/lib/ts/types.d.ts +3 -1
- package/package.json +54 -54
- 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 { 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);
|
|
@@ -83,6 +91,24 @@ const TMBlogsPost = (props) => {
|
|
|
83
91
|
const handleFocusedAttachment = (attachment) => {
|
|
84
92
|
setFocusedAttachment(attachment);
|
|
85
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]);
|
|
86
112
|
useEffect(() => {
|
|
87
113
|
if (externalBlogPost && externalBlogPost.id) {
|
|
88
114
|
const foundPost = blogPosts.find(post => post.id === externalBlogPost.id);
|
|
@@ -118,33 +144,32 @@ const TMBlogsPost = (props) => {
|
|
|
118
144
|
return () => ro.disconnect();
|
|
119
145
|
}, [layoutMode]);
|
|
120
146
|
useEffect(() => {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
]);
|
|
147
|
+
(async () => {
|
|
148
|
+
if (showExtendedAttachments) {
|
|
149
|
+
const descriptors = await getDcmtTypeDescriptor(posts);
|
|
150
|
+
setDcmtTypeDescriptors(descriptors);
|
|
151
|
+
}
|
|
152
|
+
const publishedBlogssLength = posts.filter(newsFeed => newsFeed.isSys !== 1 && newsFeed.isDel !== 1).length;
|
|
153
|
+
const systemBlogsLength = posts.filter(newsFeed => newsFeed.isSys === 1).length;
|
|
154
|
+
const deletedBlogsLength = posts.filter(newsFeed => newsFeed.isDel === 1).length;
|
|
155
|
+
setCategoryIdDataSource([
|
|
156
|
+
{
|
|
157
|
+
id: TMBlogsFilterCategoryId.PublishedBlogs,
|
|
158
|
+
label: SDKUI_Localizator.Active + " (" + publishedBlogssLength + ")",
|
|
159
|
+
value: SDKUI_Localizator.Active,
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
id: TMBlogsFilterCategoryId.SystemBlogs,
|
|
163
|
+
label: SDKUI_Localizator.OfSystem + " (" + systemBlogsLength + ")",
|
|
164
|
+
value: SDKUI_Localizator.OfSystem,
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
id: TMBlogsFilterCategoryId.DeletedBlogs,
|
|
168
|
+
label: SDKUI_Localizator.Deleted + " (" + deletedBlogsLength + ")",
|
|
169
|
+
value: SDKUI_Localizator.Deleted,
|
|
170
|
+
},
|
|
171
|
+
]);
|
|
172
|
+
})();
|
|
148
173
|
}, [posts]);
|
|
149
174
|
useEffect(() => {
|
|
150
175
|
setIsHeaderHidden(isHeaderFullyHidden(currentHeader));
|
|
@@ -222,6 +247,11 @@ const TMBlogsPost = (props) => {
|
|
|
222
247
|
if (setShowId)
|
|
223
248
|
setShowId(localShowId);
|
|
224
249
|
}, [localShowId]);
|
|
250
|
+
useEffect(() => {
|
|
251
|
+
if (!visible) {
|
|
252
|
+
closeContextMenu();
|
|
253
|
+
}
|
|
254
|
+
}, [visible]);
|
|
225
255
|
const toggleHeaderClick = () => {
|
|
226
256
|
setCurrentHeader(prevState => {
|
|
227
257
|
if (prevState === undefined) {
|
|
@@ -320,6 +350,16 @@ const TMBlogsPost = (props) => {
|
|
|
320
350
|
result.push({ rowIndex: currentBlog.id, id1: currentBlog.id, id2: currentBlog.id, resultType: ResultTypes.ERROR, description: getExceptionMessage(err) });
|
|
321
351
|
});
|
|
322
352
|
break;
|
|
353
|
+
case 'DS':
|
|
354
|
+
const dossierEngine = new DossierEngine(SDK_Globals.tmSession);
|
|
355
|
+
await dossierEngine.FollowAddOrRemoveAsync(currentBlog.id, true).then(async () => {
|
|
356
|
+
result.push({ rowIndex: currentBlog.id, id1: currentBlog.id, id2: currentBlog.id, description: SDKUI_Localizator.OperationSuccess, resultType: ResultTypes.SUCCESS });
|
|
357
|
+
refreshHomePageNews?.();
|
|
358
|
+
})
|
|
359
|
+
.catch((err) => {
|
|
360
|
+
result.push({ rowIndex: currentBlog.id, id1: currentBlog.id, id2: currentBlog.id, resultType: ResultTypes.ERROR, description: getExceptionMessage(err) });
|
|
361
|
+
});
|
|
362
|
+
break;
|
|
323
363
|
default:
|
|
324
364
|
ShowAlert({ message: 'TODO', mode: 'warning', title: SDKUI_Localizator.Unfollow, duration: 3000 });
|
|
325
365
|
break;
|
|
@@ -418,6 +458,27 @@ const TMBlogsPost = (props) => {
|
|
|
418
458
|
}
|
|
419
459
|
});
|
|
420
460
|
};
|
|
461
|
+
const openTaskFormCallback = useCallback((targetItem) => {
|
|
462
|
+
const task = new TaskDescriptor();
|
|
463
|
+
const cleanText = stripHtml(targetItem?.description ?? '');
|
|
464
|
+
task.name = cleanText.slice(0, 100);
|
|
465
|
+
setCurrentTask(task);
|
|
466
|
+
setShowTaskForm(true);
|
|
467
|
+
}, []);
|
|
468
|
+
const closeTaskFormCallback = useCallback(() => {
|
|
469
|
+
setShowTaskForm(false);
|
|
470
|
+
}, []);
|
|
471
|
+
const onSavedTaskFormCallback = (task) => {
|
|
472
|
+
if (task) {
|
|
473
|
+
addTaskCallback?.(task);
|
|
474
|
+
setShowTaskForm(false);
|
|
475
|
+
afterTaskSaved?.(task, FormModes.Create);
|
|
476
|
+
ShowAlert({ message: SDKUI_Localizator.TaskSavedSuccessfully.replaceParams(task.name ?? '-'), mode: 'success', title: SDKUI_Localizator.Widget_Activities, duration: 3000 });
|
|
477
|
+
}
|
|
478
|
+
else {
|
|
479
|
+
ShowAlert({ message: SDKUI_Localizator.TaskSaveError, mode: 'error', title: SDKUI_Localizator.Widget_Activities, duration: 3000 });
|
|
480
|
+
}
|
|
481
|
+
};
|
|
421
482
|
// Open document form
|
|
422
483
|
const openDcmtForm = (dcmtInfo) => {
|
|
423
484
|
setDcmtForm({ show: true, dcmt: dcmtInfo });
|
|
@@ -491,20 +552,20 @@ const TMBlogsPost = (props) => {
|
|
|
491
552
|
onClick: () => { copyInClipboard(targetItem); }
|
|
492
553
|
});
|
|
493
554
|
}
|
|
494
|
-
if (contextMenuParams.isCreateContextualTask
|
|
555
|
+
if (contextMenuParams.isCreateContextualTask) {
|
|
495
556
|
menuItems.push({
|
|
496
557
|
text: SDKUI_Localizator.CreateContextualTask,
|
|
497
558
|
icon: 'plus',
|
|
498
|
-
onClick: () =>
|
|
559
|
+
onClick: () => openTaskFormCallback(targetItem),
|
|
499
560
|
disabled: isGroupArchived ? true : false,
|
|
500
561
|
beginGroup: true
|
|
501
562
|
});
|
|
502
563
|
}
|
|
503
|
-
if (targetItem && Boolean(classId && classId === 'WG')) {
|
|
564
|
+
if (targetItem && Boolean(classId && (classId === 'WG' || classId === 'DS'))) {
|
|
504
565
|
menuItems.push({
|
|
505
566
|
icon: "eyeclose",
|
|
506
567
|
text: SDKUI_Localizator.Unfollow,
|
|
507
|
-
onClick: () => targetItem && classId && unFollowCallback(targetItem, classId),
|
|
568
|
+
onClick: () => (targetItem && classId) && unFollowCallback(targetItem, classId),
|
|
508
569
|
});
|
|
509
570
|
}
|
|
510
571
|
if (contextMenuParams.isShowHideFilterEnabled) {
|
|
@@ -597,8 +658,8 @@ const TMBlogsPost = (props) => {
|
|
|
597
658
|
textDecoration: blogPost.isDel ? 'line-through' : 'none',
|
|
598
659
|
boxShadow: isFocused ? "0 4px 12px rgba(19, 85, 150, 0.6)" : "none",
|
|
599
660
|
cursor: 'pointer',
|
|
600
|
-
}, 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, {
|
|
601
|
-
}), _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: {
|
|
661
|
+
}, 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, { attachments: blogPost.attachments, layoutMode: layoutMode, isSelected: isSelected, searchText: searchText, dcmtTypeDescriptors: dcmtTypeDescriptors, treeFs: treeFs, draftLatestInfoMap: draftLatestInfoMap, archivedDocumentMap: archivedDocumentMap, handleAttachmentFocus: handleFocusedAttachment, openDcmtForm: openDcmtForm }))] }, `${id}-blogpost-${blogPost.id}`) })] }, "blog-post-wrapper-" + id + "-" + blogPost.id);
|
|
662
|
+
}), _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: {
|
|
602
663
|
position: 'absolute',
|
|
603
664
|
bottom: '18px',
|
|
604
665
|
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 {};
|
|
@@ -144,33 +144,44 @@ export const getAttachmentInfo = (attachment, treeFs, draftLatestInfoMap, archiv
|
|
|
144
144
|
export const getDcmtTypeDescriptor = async (blogPosts) => {
|
|
145
145
|
// Create a Map to store tid as key and DcmtTypeDescriptor as value
|
|
146
146
|
const dcmtTypeMap = new Map();
|
|
147
|
+
// Collect unique tids first to avoid duplicate HTTP calls
|
|
148
|
+
const uniqueTids = new Set();
|
|
147
149
|
for (const blogPost of blogPosts) {
|
|
148
150
|
if (blogPost.attachments) {
|
|
149
151
|
for (const attachment of blogPost.attachments) {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
dcmtTypeMap.set(attachment.tid, dcmtTypeDescriptor);
|
|
152
|
+
if (attachment.tid) {
|
|
153
|
+
uniqueTids.add(attachment.tid);
|
|
153
154
|
}
|
|
154
155
|
}
|
|
155
156
|
}
|
|
156
157
|
}
|
|
158
|
+
// Fetch all descriptors in parallel instead of sequentially
|
|
159
|
+
const promises = Array.from(uniqueTids).map(async (tid) => {
|
|
160
|
+
const dcmtTypeDescriptor = await DcmtTypeListCacheService.GetAsync(tid, true);
|
|
161
|
+
if (dcmtTypeDescriptor) {
|
|
162
|
+
dcmtTypeMap.set(tid, dcmtTypeDescriptor);
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
await Promise.all(promises);
|
|
157
166
|
return dcmtTypeMap;
|
|
158
167
|
};
|
|
159
168
|
export const BlogPostHomeHeader = (header, classId, isSelected, searchText, headerClickCallback) => {
|
|
160
169
|
const isWorkGroup = classId === 'WG';
|
|
161
170
|
const iconColor = isSelected ? '#ffffff' : isWorkGroup ? '#009700' : '#e65b00';
|
|
162
|
-
return (_jsxs("div", {
|
|
171
|
+
return (_jsxs("div", { style: {
|
|
163
172
|
display: "flex",
|
|
164
173
|
alignItems: "center",
|
|
165
174
|
cursor: "pointer",
|
|
166
175
|
fontWeight: "bold",
|
|
167
176
|
color: isSelected ? "#fff" : TMColors.primary,
|
|
168
177
|
gap: "4px",
|
|
169
|
-
}, children: [_jsx(TMTooltip, { content: isWorkGroup ? SDKUI_Localizator.WorkGroup : SDKUI_Localizator.
|
|
178
|
+
}, children: [_jsx(TMTooltip, { content: isWorkGroup ? SDKUI_Localizator.WorkGroup : SDKUI_Localizator.Dossier, children: isWorkGroup ? (_jsx(IconMenuCAWorkingGroups, { color: iconColor, fontSize: 28, onClick: headerClickCallback })) : (_jsx(IconCADossier, { color: iconColor, fontSize: 28, onClick: headerClickCallback })) }), _jsx("div", { onClick: headerClickCallback, style: {
|
|
170
179
|
whiteSpace: "nowrap",
|
|
171
180
|
overflow: "hidden",
|
|
172
181
|
textOverflow: "ellipsis",
|
|
173
|
-
|
|
182
|
+
display: "inline-block",
|
|
183
|
+
cursor: "pointer",
|
|
184
|
+
maxWidth: "100%",
|
|
174
185
|
}, children: highlightText(header ?? "", searchText, isSelected) })] }));
|
|
175
186
|
};
|
|
176
187
|
export const isHeaderFullyHidden = (header) => {
|
|
@@ -200,11 +211,11 @@ export const NewBadge = ({ layoutMode }) => {
|
|
|
200
211
|
boxShadow: "0 2px 10px rgba(255, 200, 50, 0.45)",
|
|
201
212
|
zIndex: 1,
|
|
202
213
|
animation: "softBlink 2s infinite",
|
|
203
|
-
}, title: SDKUI_Localizator.NewMale, children: [!isCompact && "NEW", _jsx("style", { children: `
|
|
204
|
-
@keyframes softBlink {
|
|
205
|
-
0%, 100% { opacity: 1; }
|
|
206
|
-
50% { opacity: 0.7; }
|
|
207
|
-
}
|
|
214
|
+
}, title: SDKUI_Localizator.NewMale, children: [!isCompact && "NEW", _jsx("style", { children: `
|
|
215
|
+
@keyframes softBlink {
|
|
216
|
+
0%, 100% { opacity: 1; }
|
|
217
|
+
50% { opacity: 0.7; }
|
|
218
|
+
}
|
|
208
219
|
` })] }));
|
|
209
220
|
};
|
|
210
221
|
export const removeFileExtension = (filename) => {
|
|
@@ -246,3 +257,13 @@ export const BlogPostTitle = (props) => {
|
|
|
246
257
|
...getCompactEllipsisStyle(layoutMode)
|
|
247
258
|
}, children: highlightText(subtitle, searchText, isSelected) }))] })] });
|
|
248
259
|
};
|
|
260
|
+
export const stripHtml = (html) => {
|
|
261
|
+
try {
|
|
262
|
+
const doc = new DOMParser().parseFromString(html, 'text/html');
|
|
263
|
+
return doc.body.textContent || '';
|
|
264
|
+
}
|
|
265
|
+
catch (error) {
|
|
266
|
+
// Se qualcosa va storto, restituisci l'HTML originale
|
|
267
|
+
return html;
|
|
268
|
+
}
|
|
269
|
+
};
|
|
@@ -3,7 +3,7 @@ import styled from 'styled-components';
|
|
|
3
3
|
import { useCallback, useEffect, useState } from 'react';
|
|
4
4
|
import ReactDOMServer from 'react-dom/server';
|
|
5
5
|
import { DcmtTypeListCacheService } from '@topconsultnpm/sdk-ts';
|
|
6
|
-
import ContextMenu from 'devextreme-react/
|
|
6
|
+
import ContextMenu from 'devextreme-react/context-menu';
|
|
7
7
|
import { IconDelete, SDKUI_Localizator, IconApply, IconInfo, IconCloseOutline } from '../../helper';
|
|
8
8
|
import { TMColors } from '../../utils/theme';
|
|
9
9
|
import { DeviceType } from '../base/TMDeviceProvider';
|
|
@@ -11,56 +11,56 @@ import { TMDcmtTypeChooserForm } from '../choosers/TMDcmtTypeChooser';
|
|
|
11
11
|
import TMTidViewer, { renderDTDTooltipContent, TMDcmtTypeTooltip } from '../viewers/TMTidViewer';
|
|
12
12
|
import { StyledDivHorizontal, StyledOffCanvasPanel } from '../base/Styled';
|
|
13
13
|
import { useOutsideClick } from '../../hooks/useOutsideClick';
|
|
14
|
-
const StyledRecentTidItem = styled.div `
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
align-items: stretch;
|
|
18
|
-
min-width: 0;
|
|
19
|
-
padding: 10px;
|
|
20
|
-
position: relative;
|
|
21
|
-
gap: 0;
|
|
22
|
-
|
|
23
|
-
&:hover {
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
background: linear-gradient(
|
|
26
|
-
270deg,
|
|
27
|
-
rgba(70, 181, 162, 0.15) 16%,
|
|
28
|
-
rgba(59, 170, 188, 0.15) 34%,
|
|
29
|
-
rgba(59, 170, 188, 0.15) 34%,
|
|
30
|
-
rgba(54, 129, 173, 0.15) 54%,
|
|
31
|
-
rgba(51, 104, 165, 0.15) 72%,
|
|
32
|
-
rgba(47, 84, 157, 0.15) 88%,
|
|
33
|
-
rgba(48, 79, 153, 0.15) 100%
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.info-icon {
|
|
38
|
-
opacity: 0;
|
|
39
|
-
pointer-events: none;
|
|
40
|
-
transition: opacity 0.2s;
|
|
41
|
-
${({ $isMobile }) => $isMobile && `
|
|
42
|
-
display: none !important;
|
|
43
|
-
`}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&:hover .info-icon {
|
|
47
|
-
opacity: 1;
|
|
48
|
-
pointer-events: auto;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&::after {
|
|
52
|
-
content: '';
|
|
53
|
-
display: block;
|
|
54
|
-
width: 90%;
|
|
55
|
-
margin: 0 auto;
|
|
56
|
-
border-bottom: 1px solid #00A99D;
|
|
57
|
-
margin-top: 8px;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
&:last-child {
|
|
61
|
-
border-bottom: none;
|
|
62
|
-
margin-bottom: 0;
|
|
63
|
-
}
|
|
14
|
+
const StyledRecentTidItem = styled.div `
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
align-items: stretch;
|
|
18
|
+
min-width: 0;
|
|
19
|
+
padding: 10px;
|
|
20
|
+
position: relative;
|
|
21
|
+
gap: 0;
|
|
22
|
+
|
|
23
|
+
&:hover {
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
background: linear-gradient(
|
|
26
|
+
270deg,
|
|
27
|
+
rgba(70, 181, 162, 0.15) 16%,
|
|
28
|
+
rgba(59, 170, 188, 0.15) 34%,
|
|
29
|
+
rgba(59, 170, 188, 0.15) 34%,
|
|
30
|
+
rgba(54, 129, 173, 0.15) 54%,
|
|
31
|
+
rgba(51, 104, 165, 0.15) 72%,
|
|
32
|
+
rgba(47, 84, 157, 0.15) 88%,
|
|
33
|
+
rgba(48, 79, 153, 0.15) 100%
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.info-icon {
|
|
38
|
+
opacity: 0;
|
|
39
|
+
pointer-events: none;
|
|
40
|
+
transition: opacity 0.2s;
|
|
41
|
+
${({ $isMobile }) => $isMobile && `
|
|
42
|
+
display: none !important;
|
|
43
|
+
`}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:hover .info-icon {
|
|
47
|
+
opacity: 1;
|
|
48
|
+
pointer-events: auto;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&::after {
|
|
52
|
+
content: '';
|
|
53
|
+
display: block;
|
|
54
|
+
width: 90%;
|
|
55
|
+
margin: 0 auto;
|
|
56
|
+
border-bottom: 1px solid #00A99D;
|
|
57
|
+
margin-top: 8px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&:last-child {
|
|
61
|
+
border-bottom: none;
|
|
62
|
+
margin-bottom: 0;
|
|
63
|
+
}
|
|
64
64
|
`;
|
|
65
65
|
const iconDelete = () => ReactDOMServer.renderToString(_jsx(IconDelete, {}));
|
|
66
66
|
const TMRecentsManager = ({ deviceType, mruTIDs, currentMruTID, accessFilter = 'all', onSelectedTID, onDeletedTID }) => {
|
|
@@ -3,60 +3,60 @@ import { useState, useEffect } from 'react';
|
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { TMColors } from '../../utils/theme';
|
|
5
5
|
import { IconCloseCircle, IconWarning } from '../../helper';
|
|
6
|
-
const StyledValidationItemsTabs = styled.div `
|
|
7
|
-
position: sticky;
|
|
8
|
-
top: 0px;
|
|
9
|
-
height: 25px;
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: row;
|
|
12
|
-
justify-content: flex-start;
|
|
13
|
-
align-items: center;
|
|
14
|
-
border-bottom: 1px solid $primary;
|
|
15
|
-
width: 100%;
|
|
16
|
-
user-select: none;
|
|
17
|
-
background-color: ${TMColors.primary};
|
|
18
|
-
z-index: 20;
|
|
19
|
-
border-top: 1px solid #122C4C;
|
|
6
|
+
const StyledValidationItemsTabs = styled.div `
|
|
7
|
+
position: sticky;
|
|
8
|
+
top: 0px;
|
|
9
|
+
height: 25px;
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: row;
|
|
12
|
+
justify-content: flex-start;
|
|
13
|
+
align-items: center;
|
|
14
|
+
border-bottom: 1px solid $primary;
|
|
15
|
+
width: 100%;
|
|
16
|
+
user-select: none;
|
|
17
|
+
background-color: ${TMColors.primary};
|
|
18
|
+
z-index: 20;
|
|
19
|
+
border-top: 1px solid #122C4C;
|
|
20
20
|
`;
|
|
21
|
-
const StyledValidationTypeTab = styled.div `
|
|
22
|
-
padding: 10px;
|
|
23
|
-
color: ${(props) => props.$isSelected ? 'white' : 'rgb(182, 182, 182)'};
|
|
24
|
-
font-size: 1rem;
|
|
25
|
-
cursor: pointer;
|
|
26
|
-
${(props) => props.$isSelected ? 'border-bottom: 1px white solid;' : ''};
|
|
21
|
+
const StyledValidationTypeTab = styled.div `
|
|
22
|
+
padding: 10px;
|
|
23
|
+
color: ${(props) => props.$isSelected ? 'white' : 'rgb(182, 182, 182)'};
|
|
24
|
+
font-size: 1rem;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
${(props) => props.$isSelected ? 'border-bottom: 1px white solid;' : ''};
|
|
27
27
|
`;
|
|
28
|
-
const StyledMessageContainer = styled.div `
|
|
29
|
-
padding: 2px;
|
|
30
|
-
display: flex;
|
|
31
|
-
flex-direction: row;
|
|
32
|
-
justify-content: flex-start;
|
|
33
|
-
align-items: center;
|
|
34
|
-
color: $primary;
|
|
35
|
-
font-size: 1rem;
|
|
36
|
-
width: 100%;
|
|
37
|
-
border-bottom: 1px solid rgb(190, 190, 190);
|
|
28
|
+
const StyledMessageContainer = styled.div `
|
|
29
|
+
padding: 2px;
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: row;
|
|
32
|
+
justify-content: flex-start;
|
|
33
|
+
align-items: center;
|
|
34
|
+
color: $primary;
|
|
35
|
+
font-size: 1rem;
|
|
36
|
+
width: 100%;
|
|
37
|
+
border-bottom: 1px solid rgb(190, 190, 190);
|
|
38
38
|
`;
|
|
39
|
-
const StyledMessageIcon = styled.div `
|
|
40
|
-
transform: translateY(1.5px);
|
|
41
|
-
margin-right: 5px;
|
|
42
|
-
z-index: 5;
|
|
39
|
+
const StyledMessageIcon = styled.div `
|
|
40
|
+
transform: translateY(1.5px);
|
|
41
|
+
margin-right: 5px;
|
|
42
|
+
z-index: 5;
|
|
43
43
|
`;
|
|
44
|
-
const StyledMessageResultType = styled.div `
|
|
45
|
-
width: 50px;
|
|
46
|
-
user-select: none;
|
|
47
|
-
margin-right: 20px;
|
|
44
|
+
const StyledMessageResultType = styled.div `
|
|
45
|
+
width: 50px;
|
|
46
|
+
user-select: none;
|
|
47
|
+
margin-right: 20px;
|
|
48
48
|
`;
|
|
49
|
-
const StyledMessageElement = styled.div `
|
|
50
|
-
width: 150px;
|
|
51
|
-
text-align: left;
|
|
52
|
-
user-select: none;
|
|
53
|
-
margin-right: 20px;
|
|
49
|
+
const StyledMessageElement = styled.div `
|
|
50
|
+
width: 150px;
|
|
51
|
+
text-align: left;
|
|
52
|
+
user-select: none;
|
|
53
|
+
margin-right: 20px;
|
|
54
54
|
`;
|
|
55
|
-
const StyledMessageText = styled.div `
|
|
56
|
-
transform: translateY(1.5px);
|
|
57
|
-
margin-right: 5px;
|
|
58
|
-
z-index: 5;
|
|
59
|
-
margin-right: 20px;
|
|
55
|
+
const StyledMessageText = styled.div `
|
|
56
|
+
transform: translateY(1.5px);
|
|
57
|
+
margin-right: 5px;
|
|
58
|
+
z-index: 5;
|
|
59
|
+
margin-right: 20px;
|
|
60
60
|
`;
|
|
61
61
|
const TMValidationItemsList = ({ validationItems = [] }) => {
|
|
62
62
|
const [selectedTab, setSelectedTab] = useState(0);
|
|
@@ -15,6 +15,7 @@ export * from './base/TMRightSidebar';
|
|
|
15
15
|
export * from './base/TMTreeView';
|
|
16
16
|
export * from './base/TMPanel';
|
|
17
17
|
export * from './base/TMResizableMenu';
|
|
18
|
+
export * from './base/TMAccordionNew';
|
|
18
19
|
export { default as CounterBar } from './base/TMCounterBar';
|
|
19
20
|
export { default as TMProgressBar } from './base/TMProgressBar';
|
|
20
21
|
export { default as TMSpinner } from './base/TMSpinner';
|
|
@@ -59,7 +60,7 @@ export { default as TMBlogAttachments } from './grids/TMBlogAttachments';
|
|
|
59
60
|
export { default as TMBlogCommentForm } from './features/blog/TMBlogCommentForm';
|
|
60
61
|
export * from './query/TMQueryEditor';
|
|
61
62
|
export * from './query/TMQuerySummary';
|
|
62
|
-
export
|
|
63
|
+
export { default as ToppyDraggableHelpCenter } from './features/assistant/ToppyDraggableHelpCenter';
|
|
63
64
|
export * from './features/documents/TMDcmtForm';
|
|
64
65
|
export * from './features/documents/TMDcmtIcon';
|
|
65
66
|
export * from './features/documents/TMDcmtPreview';
|
package/lib/components/index.js
CHANGED
|
@@ -16,6 +16,7 @@ export * from './base/TMRightSidebar';
|
|
|
16
16
|
export * from './base/TMTreeView';
|
|
17
17
|
export * from './base/TMPanel';
|
|
18
18
|
export * from './base/TMResizableMenu';
|
|
19
|
+
export * from './base/TMAccordionNew';
|
|
19
20
|
export { default as CounterBar } from './base/TMCounterBar';
|
|
20
21
|
export { default as TMProgressBar } from './base/TMProgressBar';
|
|
21
22
|
export { default as TMSpinner } from './base/TMSpinner';
|
|
@@ -66,7 +67,7 @@ export { default as TMBlogCommentForm } from './features/blog/TMBlogCommentForm'
|
|
|
66
67
|
export * from './query/TMQueryEditor';
|
|
67
68
|
export * from './query/TMQuerySummary';
|
|
68
69
|
//assistant
|
|
69
|
-
export
|
|
70
|
+
export { default as ToppyDraggableHelpCenter } from './features/assistant/ToppyDraggableHelpCenter';
|
|
70
71
|
//documents
|
|
71
72
|
export * from './features/documents/TMDcmtForm';
|
|
72
73
|
export * from './features/documents/TMDcmtIcon';
|
|
@@ -4,6 +4,7 @@ interface TMPanelManagerContainerProps {
|
|
|
4
4
|
showToolbar: boolean;
|
|
5
5
|
direction: TMPanelDirection;
|
|
6
6
|
parentId?: string;
|
|
7
|
+
minPanelSizePx?: number;
|
|
7
8
|
}
|
|
8
9
|
declare const TMPanelManagerContainer: (props: TMPanelManagerContainerProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
10
|
export default TMPanelManagerContainer;
|
|
@@ -8,23 +8,23 @@ import { IconInfo, SDKUI_Localizator } from '../../../helper';
|
|
|
8
8
|
import { DeviceType, useDeviceType } from '../../base/TMDeviceProvider';
|
|
9
9
|
import { Gutters } from '../../../utils/theme';
|
|
10
10
|
// Styled Component per il contenitore principale di PanelContainer
|
|
11
|
-
const StyledPanelContainerWrapper = styled.div `
|
|
12
|
-
display: ${props => (props.$hasVisiblePanels ? 'flex' : 'none')};
|
|
13
|
-
flex-direction: ${props => (props.$direction === 'vertical' ? 'column' : 'row')};
|
|
14
|
-
height: 100%;
|
|
15
|
-
width: 100%;
|
|
16
|
-
// overflow: hidden;
|
|
11
|
+
const StyledPanelContainerWrapper = styled.div `
|
|
12
|
+
display: ${props => (props.$hasVisiblePanels ? 'flex' : 'none')};
|
|
13
|
+
flex-direction: ${props => (props.$direction === 'vertical' ? 'column' : 'row')};
|
|
14
|
+
height: 100%;
|
|
15
|
+
width: 100%;
|
|
16
|
+
// overflow: hidden;
|
|
17
17
|
`;
|
|
18
18
|
// Styled Component per il gutter (separatore)
|
|
19
|
-
const StyledResizerGutter = styled.div `
|
|
20
|
-
cursor: ${props => (props.$direction === 'horizontal' ? 'col-resize' : 'row-resize')};
|
|
21
|
-
${props => (props.$direction === 'horizontal' ? `width: ${Gutters.getGutters()}px;` : `height: ${Gutters.getGutters()}px;`)}
|
|
22
|
-
flex-shrink: 0;
|
|
23
|
-
background-color: "transparent";
|
|
24
|
-
z-index: 10;
|
|
19
|
+
const StyledResizerGutter = styled.div `
|
|
20
|
+
cursor: ${props => (props.$direction === 'horizontal' ? 'col-resize' : 'row-resize')};
|
|
21
|
+
${props => (props.$direction === 'horizontal' ? `width: ${Gutters.getGutters()}px;` : `height: ${Gutters.getGutters()}px;`)}
|
|
22
|
+
flex-shrink: 0;
|
|
23
|
+
background-color: "transparent";
|
|
24
|
+
z-index: 10;
|
|
25
25
|
`;
|
|
26
26
|
const TMPanelManagerContainer = (props) => {
|
|
27
|
-
const { panels, showToolbar, direction, parentId } = props;
|
|
27
|
+
const { panels, showToolbar, direction, parentId, minPanelSizePx = 150 } = props;
|
|
28
28
|
const { panelVisibility, setPanelDimensionsById, hasVisiblePanels, maximizedPanels, updateIsResizingActive } = useTMPanelManagerContext();
|
|
29
29
|
// Get the current device type (e.g., mobile, tablet, desktop) using a custom hook
|
|
30
30
|
const deviceType = useDeviceType();
|
|
@@ -73,7 +73,7 @@ const TMPanelManagerContainer = (props) => {
|
|
|
73
73
|
let newCurrent = initialCurrent + deltaPercent;
|
|
74
74
|
let newNext = initialNext - deltaPercent;
|
|
75
75
|
// Set a minimum size threshold (to prevent panels from collapsing)
|
|
76
|
-
const minPercent = (
|
|
76
|
+
const minPercent = (minPanelSizePx / containerSize) * 100;
|
|
77
77
|
// Correct sizes if they go below the minimum
|
|
78
78
|
if (newCurrent < minPercent) {
|
|
79
79
|
newCurrent = minPercent;
|