@topconsultnpm/sdkui-react 6.19.0-test.1 → 6.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/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/TMDynDataListItemChooser.js +5 -4
- 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 +71 -22
- 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 +482 -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.d.ts +1 -0
- package/lib/components/features/documents/TMDcmtForm.js +331 -65
- 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 +53 -53
- 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 +41 -59
- package/lib/components/features/search/TMSearchResult.js +256 -51
- package/lib/components/features/search/TMSearchResultCheckoutInfoForm.d.ts +8 -0
- package/lib/components/features/search/TMSearchResultCheckoutInfoForm.js +134 -0
- package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +3 -2
- package/lib/components/features/search/TMSearchResultsMenuItems.js +94 -59
- 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 +67 -67
- package/lib/components/features/search/TMViewHistoryDcmtForm.d.ts +18 -0
- package/lib/components/features/search/TMViewHistoryDcmtForm.js +215 -0
- 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 +52 -52
- 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 +9 -0
- package/lib/helper/SDKUI_Globals.js +10 -1
- package/lib/helper/SDKUI_Localizator.d.ts +59 -2
- package/lib/helper/SDKUI_Localizator.js +617 -22
- package/lib/helper/TMCustomSearchBar.js +1 -1
- package/lib/helper/TMIcons.d.ts +6 -1
- package/lib/helper/TMIcons.js +22 -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/cicoHelper.d.ts +31 -0
- package/lib/helper/cicoHelper.js +155 -0
- package/lib/helper/dcmtsHelper.d.ts +2 -1
- package/lib/helper/dcmtsHelper.js +56 -17
- package/lib/helper/helpers.d.ts +8 -1
- package/lib/helper/helpers.js +43 -21
- 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
|
@@ -3,10 +3,10 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import RecipientList, { WorkItemActorTypes } from './RecipientList';
|
|
5
5
|
import { SDKUI_Localizator } from '../../../../helper';
|
|
6
|
-
export const RecipientsContainer = styled.div `
|
|
7
|
-
display: flex;
|
|
8
|
-
gap: 20px;
|
|
9
|
-
flex-wrap: wrap;
|
|
6
|
+
export const RecipientsContainer = styled.div `
|
|
7
|
+
display: flex;
|
|
8
|
+
gap: 20px;
|
|
9
|
+
flex-wrap: wrap;
|
|
10
10
|
`;
|
|
11
11
|
export const tosToActors = (tosString) => {
|
|
12
12
|
const andRecipients = [];
|
|
@@ -6,44 +6,44 @@ import TextBox from "./TextBox";
|
|
|
6
6
|
import { createPortal } from 'react-dom';
|
|
7
7
|
import { IconSearch, SDKUI_Localizator, IconArrowLeft, IconApply } from "../../../helper";
|
|
8
8
|
import TMButton from "../../base/TMButton";
|
|
9
|
-
const PopupContainer = styled.div `
|
|
10
|
-
position: absolute;
|
|
11
|
-
top: 0;
|
|
12
|
-
left: 0;
|
|
13
|
-
width: 100%;
|
|
14
|
-
height: 100%;
|
|
15
|
-
background: rgba(0, 0, 0, 0.4);
|
|
16
|
-
display: flex;
|
|
17
|
-
justify-content: center;
|
|
18
|
-
align-items: center;
|
|
19
|
-
z-index: 100;
|
|
9
|
+
const PopupContainer = styled.div `
|
|
10
|
+
position: absolute;
|
|
11
|
+
top: 0;
|
|
12
|
+
left: 0;
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 100%;
|
|
15
|
+
background: rgba(0, 0, 0, 0.4);
|
|
16
|
+
display: flex;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
align-items: center;
|
|
19
|
+
z-index: 100;
|
|
20
20
|
`;
|
|
21
|
-
const PopupHeaderContainer = styled.div `
|
|
22
|
-
display: flex;
|
|
23
|
-
padding: 10px;
|
|
24
|
-
align-items: center;
|
|
25
|
-
justify-content: space-between;
|
|
21
|
+
const PopupHeaderContainer = styled.div `
|
|
22
|
+
display: flex;
|
|
23
|
+
padding: 10px;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: space-between;
|
|
26
26
|
`;
|
|
27
|
-
const DropdownContainer = styled.div `
|
|
28
|
-
position: fixed;
|
|
29
|
-
background: white;
|
|
30
|
-
border: 1px solid #ccc;
|
|
31
|
-
border-radius: 4px;
|
|
32
|
-
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
|
|
33
|
-
max-height: 35vh;
|
|
34
|
-
overflow-y: auto;
|
|
35
|
-
z-index: 9999;
|
|
36
|
-
width: fit-content;
|
|
37
|
-
resize: both;
|
|
27
|
+
const DropdownContainer = styled.div `
|
|
28
|
+
position: fixed;
|
|
29
|
+
background: white;
|
|
30
|
+
border: 1px solid #ccc;
|
|
31
|
+
border-radius: 4px;
|
|
32
|
+
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
|
|
33
|
+
max-height: 35vh;
|
|
34
|
+
overflow-y: auto;
|
|
35
|
+
z-index: 9999;
|
|
36
|
+
width: fit-content;
|
|
37
|
+
resize: both;
|
|
38
38
|
`;
|
|
39
|
-
const PopupContent = styled.div `
|
|
40
|
-
background: white;
|
|
41
|
-
padding: 20px;
|
|
42
|
-
border-radius: 8px;
|
|
43
|
-
width: 100%;
|
|
44
|
-
height: 100%;
|
|
45
|
-
display: flex;
|
|
46
|
-
flex-direction: column;
|
|
39
|
+
const PopupContent = styled.div `
|
|
40
|
+
background: white;
|
|
41
|
+
padding: 20px;
|
|
42
|
+
border-radius: 8px;
|
|
43
|
+
width: 100%;
|
|
44
|
+
height: 100%;
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
47
|
`;
|
|
48
48
|
const Chooser = ({ dataSource, columns, value, additionalIcons = [], validationItems = [], title, label = '', icon, placeHolder, disabled, selectedRow, onChooserClick, onSelectionChanged, onClose, isDropDown = false }) => {
|
|
49
49
|
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef } from "react";
|
|
3
3
|
import styled, { keyframes } from "styled-components";
|
|
4
|
-
const fadeIn = keyframes `
|
|
5
|
-
from {
|
|
6
|
-
opacity: 0;
|
|
7
|
-
transform: scale(0.9);
|
|
8
|
-
}
|
|
9
|
-
to {
|
|
10
|
-
opacity: 1;
|
|
11
|
-
transform: scale(1);
|
|
12
|
-
}
|
|
4
|
+
const fadeIn = keyframes `
|
|
5
|
+
from {
|
|
6
|
+
opacity: 0;
|
|
7
|
+
transform: scale(0.9);
|
|
8
|
+
}
|
|
9
|
+
to {
|
|
10
|
+
opacity: 1;
|
|
11
|
+
transform: scale(1);
|
|
12
|
+
}
|
|
13
13
|
`;
|
|
14
|
-
const MenuContainer = styled.div `
|
|
15
|
-
position: absolute;
|
|
16
|
-
top: ${(props) => (typeof props.$y === "number" ? `${props.$y}px` : props.$y)};
|
|
17
|
-
left: ${(props) => (typeof props.$x === "number" ? `${props.$x}px` : props.$x)};
|
|
18
|
-
background: #2559A5 0% 0% no-repeat padding-box;
|
|
19
|
-
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
|
|
20
|
-
border-radius: 8px;
|
|
21
|
-
padding: 10px;
|
|
22
|
-
opacity: ${(props) => (props.$visible ? 1 : 0)};
|
|
23
|
-
transform-origin: top left;
|
|
24
|
-
animation: ${(props) => (props.$visible ? fadeIn : "none")} 0.3s ease-out;
|
|
25
|
-
transition: opacity 0.2s ease-out;
|
|
26
|
-
z-index:1000;
|
|
14
|
+
const MenuContainer = styled.div `
|
|
15
|
+
position: absolute;
|
|
16
|
+
top: ${(props) => (typeof props.$y === "number" ? `${props.$y}px` : props.$y)};
|
|
17
|
+
left: ${(props) => (typeof props.$x === "number" ? `${props.$x}px` : props.$x)};
|
|
18
|
+
background: #2559A5 0% 0% no-repeat padding-box;
|
|
19
|
+
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
|
|
20
|
+
border-radius: 8px;
|
|
21
|
+
padding: 10px;
|
|
22
|
+
opacity: ${(props) => (props.$visible ? 1 : 0)};
|
|
23
|
+
transform-origin: top left;
|
|
24
|
+
animation: ${(props) => (props.$visible ? fadeIn : "none")} 0.3s ease-out;
|
|
25
|
+
transition: opacity 0.2s ease-out;
|
|
26
|
+
z-index:1000;
|
|
27
27
|
`;
|
|
28
28
|
const Menu = ({ visible = false, children, x, y, onClose }) => {
|
|
29
29
|
const menuRef = useRef(null);
|
|
@@ -4,58 +4,58 @@ import styled from "styled-components";
|
|
|
4
4
|
import { ResultTypes } from '@topconsultnpm/sdk-ts';
|
|
5
5
|
import { TMColors } from "../../../utils/theme";
|
|
6
6
|
import { SDKUI_Globals } from "../../../helper";
|
|
7
|
-
const Container = styled.div `
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
gap: 2px;
|
|
11
|
-
width: 100%;
|
|
12
|
-
position: relative;
|
|
7
|
+
const Container = styled.div `
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: 2px;
|
|
11
|
+
width: 100%;
|
|
12
|
+
position: relative;
|
|
13
13
|
`;
|
|
14
|
-
const Label = styled.label `
|
|
15
|
-
font-size: 12px;
|
|
16
|
-
font-weight: 500;
|
|
17
|
-
color: #313131;
|
|
14
|
+
const Label = styled.label `
|
|
15
|
+
font-size: 12px;
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
color: #313131;
|
|
18
18
|
`;
|
|
19
|
-
const SelectContainer = styled.div `
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: center;
|
|
22
|
-
gap: 8px;
|
|
23
|
-
border: 1px solid #99999A;
|
|
24
|
-
border-radius: 5px;
|
|
25
|
-
background: ${(props) => (props.$disabled ? "#f0f0f0" : "white")};
|
|
26
|
-
opacity: ${(props) => (props.$disabled ? 0.6 : 1)};
|
|
27
|
-
cursor: ${(props) => (props.$disabled ? "not-allowed" : "pointer")};
|
|
28
|
-
position: relative;
|
|
29
|
-
border-bottom: ${(props) => (props.$focused ? "2px" : props.$borderThickness)} solid ${(props) => props.$borderColor};
|
|
19
|
+
const SelectContainer = styled.div `
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: 8px;
|
|
23
|
+
border: 1px solid #99999A;
|
|
24
|
+
border-radius: 5px;
|
|
25
|
+
background: ${(props) => (props.$disabled ? "#f0f0f0" : "white")};
|
|
26
|
+
opacity: ${(props) => (props.$disabled ? 0.6 : 1)};
|
|
27
|
+
cursor: ${(props) => (props.$disabled ? "not-allowed" : "pointer")};
|
|
28
|
+
position: relative;
|
|
29
|
+
border-bottom: ${(props) => (props.$focused ? "2px" : props.$borderThickness)} solid ${(props) => props.$borderColor};
|
|
30
30
|
`;
|
|
31
|
-
const Select = styled.select `
|
|
32
|
-
flex: 1;
|
|
33
|
-
border: none;
|
|
34
|
-
outline: none;
|
|
35
|
-
font-size: ${SDKUI_Globals.userSettings?.themeSettings.fontSize ?? '12px'};
|
|
36
|
-
padding: 6px 0;
|
|
37
|
-
background: transparent;
|
|
38
|
-
color: ${props => props.$color ?? '#313131'};
|
|
39
|
-
${(props) => props.$readOnly && "pointer-events: none; background: #f8f8f8;"}
|
|
40
|
-
cursor: ${props => props.$cursor};
|
|
31
|
+
const Select = styled.select `
|
|
32
|
+
flex: 1;
|
|
33
|
+
border: none;
|
|
34
|
+
outline: none;
|
|
35
|
+
font-size: ${SDKUI_Globals.userSettings?.themeSettings.fontSize ?? '12px'};
|
|
36
|
+
padding: 6px 0;
|
|
37
|
+
background: transparent;
|
|
38
|
+
color: ${props => props.$color ?? '#313131'};
|
|
39
|
+
${(props) => props.$readOnly && "pointer-events: none; background: #f8f8f8;"}
|
|
40
|
+
cursor: ${props => props.$cursor};
|
|
41
41
|
`;
|
|
42
|
-
const IconWrapper = styled.div `
|
|
43
|
-
color: ${(props) => props.$color};
|
|
44
|
-
display: flex;
|
|
45
|
-
align-items: center;
|
|
46
|
-
position: absolute;
|
|
47
|
-
left: -30px;
|
|
48
|
-
cursor: default;
|
|
42
|
+
const IconWrapper = styled.div `
|
|
43
|
+
color: ${(props) => props.$color};
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
position: absolute;
|
|
47
|
+
left: -30px;
|
|
48
|
+
cursor: default;
|
|
49
49
|
`;
|
|
50
|
-
const ValidationMessageContainer = styled.div `
|
|
51
|
-
display: flex;
|
|
52
|
-
flex-direction: column;
|
|
53
|
-
gap: 2px;
|
|
54
|
-
margin-top: 2px;
|
|
50
|
+
const ValidationMessageContainer = styled.div `
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
gap: 2px;
|
|
54
|
+
margin-top: 2px;
|
|
55
55
|
`;
|
|
56
|
-
const ValidationMessage = styled.span `
|
|
57
|
-
font-size: 12px;
|
|
58
|
-
color: ${(props) => props.$color};
|
|
56
|
+
const ValidationMessage = styled.span `
|
|
57
|
+
font-size: 12px;
|
|
58
|
+
color: ${(props) => props.$color};
|
|
59
59
|
`;
|
|
60
60
|
const SelectBox = ({ cursor = 'pointer', onClick, value, onValueChanged, label, icon, additionalIcons = [], options, placeHolder, validationItems = [], disabled, readOnly }) => {
|
|
61
61
|
const [isFocused, setIsFocused] = useState(false);
|
|
@@ -708,21 +708,21 @@ const StyledForgetPassword = styled.div ` position: absolute; bottom: ${props =>
|
|
|
708
708
|
const StyledBackButton = styled.div ` position: absolute; top: 20px; left: 20px; `;
|
|
709
709
|
const StyledLanguageChooser = styled.button ` border: none; border-radius: 50px; background-color: transparent; cursor: pointer; `;
|
|
710
710
|
const StyledLangChooser = styled.img ` cursor: pointer; border: 3px solid white; border-radius: 50px; `;
|
|
711
|
-
const StyledSummaryContainer = styled.div `
|
|
712
|
-
display: flex;
|
|
713
|
-
align-items: center;
|
|
714
|
-
gap: 10px;
|
|
711
|
+
const StyledSummaryContainer = styled.div `
|
|
712
|
+
display: flex;
|
|
713
|
+
align-items: center;
|
|
714
|
+
gap: 10px;
|
|
715
715
|
`;
|
|
716
|
-
const StyledCredentialContainer = styled.div `
|
|
717
|
-
width: 100%;
|
|
718
|
-
display: flex;
|
|
719
|
-
flex-direction: ${props => getFlexDirection(props.$isMobile, props.$authMode)};
|
|
720
|
-
gap: 10px;
|
|
721
|
-
|
|
722
|
-
& > * {
|
|
723
|
-
flex: ${props => props.$authMode === AuthenticationModes.TopMediaOnBehalfOf && !props.$isMobile ? '1' : 'unset'};
|
|
724
|
-
min-width: 0;
|
|
725
|
-
}
|
|
716
|
+
const StyledCredentialContainer = styled.div `
|
|
717
|
+
width: 100%;
|
|
718
|
+
display: flex;
|
|
719
|
+
flex-direction: ${props => getFlexDirection(props.$isMobile, props.$authMode)};
|
|
720
|
+
gap: 10px;
|
|
721
|
+
|
|
722
|
+
& > * {
|
|
723
|
+
flex: ${props => props.$authMode === AuthenticationModes.TopMediaOnBehalfOf && !props.$isMobile ? '1' : 'unset'};
|
|
724
|
+
min-width: 0;
|
|
725
|
+
}
|
|
726
726
|
`;
|
|
727
727
|
const StyledCredentialWrapper = styled.div ` width: 100%; display: flex; flex-direction: column; gap: 10px; `;
|
|
728
728
|
const StyledToolbarContainer = styled.div ` display: flex; gap: 10px; align-items: center; position: absolute; top: 20px; right: 20px; `;
|
|
@@ -5,71 +5,71 @@ import { ResultTypes } from '@topconsultnpm/sdk-ts';
|
|
|
5
5
|
import { IconShow, IconHide, SDKUI_Globals } from "../../../helper";
|
|
6
6
|
import { TMColors } from "../../../utils/theme";
|
|
7
7
|
import TMTooltip from "../../base/TMTooltip";
|
|
8
|
-
const Container = styled.div `
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
width: 100%;
|
|
12
|
-
position: relative;
|
|
13
|
-
gap: 2px;
|
|
8
|
+
const Container = styled.div `
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
width: 100%;
|
|
12
|
+
position: relative;
|
|
13
|
+
gap: 2px;
|
|
14
14
|
`;
|
|
15
|
-
const Label = styled.label `
|
|
16
|
-
font-size: 12px;
|
|
17
|
-
font-weight: 500;
|
|
18
|
-
color: #313131;
|
|
15
|
+
const Label = styled.label `
|
|
16
|
+
font-size: 12px;
|
|
17
|
+
font-weight: 500;
|
|
18
|
+
color: #313131;
|
|
19
19
|
`;
|
|
20
|
-
const InputContainer = styled.div `
|
|
21
|
-
display: flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
gap: 8px;
|
|
24
|
-
border: 1px solid #99999A;
|
|
25
|
-
border-radius: 5px;
|
|
26
|
-
background: ${(props) => (props.$disabled ? "#f0f0f0" : "white")};
|
|
27
|
-
opacity: ${(props) => (props.$disabled ? 0.6 : 1)};
|
|
28
|
-
cursor: ${(props) => (props.$disabled ? "not-allowed" : "text")};
|
|
29
|
-
position: relative;
|
|
30
|
-
border-bottom: ${(props) => (props.$focused ? "2px" : props.$borderThickness)} solid ${(props) => props.$borderColor};
|
|
20
|
+
const InputContainer = styled.div `
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: 8px;
|
|
24
|
+
border: 1px solid #99999A;
|
|
25
|
+
border-radius: 5px;
|
|
26
|
+
background: ${(props) => (props.$disabled ? "#f0f0f0" : "white")};
|
|
27
|
+
opacity: ${(props) => (props.$disabled ? 0.6 : 1)};
|
|
28
|
+
cursor: ${(props) => (props.$disabled ? "not-allowed" : "text")};
|
|
29
|
+
position: relative;
|
|
30
|
+
border-bottom: ${(props) => (props.$focused ? "2px" : props.$borderThickness)} solid ${(props) => props.$borderColor};
|
|
31
31
|
`;
|
|
32
|
-
const Input = styled.input `
|
|
33
|
-
flex: 1;
|
|
34
|
-
border: none;
|
|
35
|
-
outline: none;
|
|
36
|
-
font-size: ${SDKUI_Globals.userSettings?.themeSettings.fontSize ?? '12px'};
|
|
37
|
-
padding: 6px 30px 6px 10px;
|
|
38
|
-
background: transparent;
|
|
39
|
-
color: ${props => props.$color ?? '#313131'};
|
|
40
|
-
${(props) => props.$readOnly && "pointer-events: none; background: #f8f8f8;"}
|
|
41
|
-
cursor: ${props => props.$cursor};
|
|
32
|
+
const Input = styled.input `
|
|
33
|
+
flex: 1;
|
|
34
|
+
border: none;
|
|
35
|
+
outline: none;
|
|
36
|
+
font-size: ${SDKUI_Globals.userSettings?.themeSettings.fontSize ?? '12px'};
|
|
37
|
+
padding: 6px 30px 6px 10px;
|
|
38
|
+
background: transparent;
|
|
39
|
+
color: ${props => props.$color ?? '#313131'};
|
|
40
|
+
${(props) => props.$readOnly && "pointer-events: none; background: #f8f8f8;"}
|
|
41
|
+
cursor: ${props => props.$cursor};
|
|
42
42
|
`;
|
|
43
|
-
const ValidationMessageContainer = styled.div `
|
|
44
|
-
display: flex;
|
|
45
|
-
flex-direction: column;
|
|
46
|
-
gap: 2px;
|
|
47
|
-
margin-top: 2px;
|
|
43
|
+
const ValidationMessageContainer = styled.div `
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
gap: 2px;
|
|
47
|
+
margin-top: 2px;
|
|
48
48
|
`;
|
|
49
|
-
const ValidationMessage = styled.span `
|
|
50
|
-
font-size: 12px;
|
|
51
|
-
color: ${(props) => props.$color};
|
|
49
|
+
const ValidationMessage = styled.span `
|
|
50
|
+
font-size: 12px;
|
|
51
|
+
color: ${(props) => props.$color};
|
|
52
52
|
`;
|
|
53
|
-
const IconWrapper = styled.div `
|
|
54
|
-
color: ${(props) => props.$color};
|
|
55
|
-
display: flex;
|
|
56
|
-
align-items: center;
|
|
57
|
-
position: absolute;
|
|
58
|
-
left: -30px;
|
|
59
|
-
cursor: default;
|
|
53
|
+
const IconWrapper = styled.div `
|
|
54
|
+
color: ${(props) => props.$color};
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
position: absolute;
|
|
58
|
+
left: -30px;
|
|
59
|
+
cursor: default;
|
|
60
60
|
`;
|
|
61
|
-
const IconsRow = styled.div `
|
|
62
|
-
display: flex;
|
|
63
|
-
align-items: center;
|
|
64
|
-
gap: 5px;
|
|
65
|
-
position: absolute;
|
|
66
|
-
right: 10px;
|
|
61
|
+
const IconsRow = styled.div `
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
gap: 5px;
|
|
65
|
+
position: absolute;
|
|
66
|
+
right: 10px;
|
|
67
67
|
`;
|
|
68
|
-
const IconButton = styled.div `
|
|
69
|
-
color: ${(props) => props.$color};
|
|
70
|
-
display: flex;
|
|
71
|
-
align-items: center;
|
|
72
|
-
cursor: ${props => !props.$disabled ? 'pointer' : 'default'};
|
|
68
|
+
const IconButton = styled.div `
|
|
69
|
+
color: ${(props) => props.$color};
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
cursor: ${props => !props.$disabled ? 'pointer' : 'default'};
|
|
73
73
|
`;
|
|
74
74
|
const TextBox = forwardRef(({ label, type, additionalIcons = [], cursor = 'text', disabled, icon, onClick, onKeyDown, onValueChanged, placeHolder, readOnly, showSuccess, validationItems = [], value }, ref) => {
|
|
75
75
|
const [showPassword, setShowPassword] = useState(false);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ResultTypes } from '@topconsultnpm/sdk-ts';
|
|
3
|
-
import DataGrid, { Column, HeaderFilter, Pager, Paging, Scrolling } from 'devextreme-react/
|
|
3
|
+
import DataGrid, { Column, HeaderFilter, Pager, Paging, Scrolling } from 'devextreme-react/data-grid';
|
|
4
4
|
import ReactDOM from 'react-dom/client';
|
|
5
5
|
import { IconSuccessCirlce, IconWarning, IconCloseCircle, IconInfo, SDKUI_Globals, SDKUI_Localizator } from '../../helper';
|
|
6
6
|
import { TMColors } from '../../utils/theme';
|
|
@@ -8,6 +8,7 @@ import ShowAlert from '../base/TMAlert';
|
|
|
8
8
|
import { TMDeviceProvider } from '../base/TMDeviceProvider';
|
|
9
9
|
import TMLayoutContainer from '../base/TMLayout';
|
|
10
10
|
import TMModal from '../base/TMModal';
|
|
11
|
+
import { TMExceptionBoxManager } from '../base/TMPopUp';
|
|
11
12
|
const cellRender = (cellData) => {
|
|
12
13
|
const resultType = cellData.data.resultType;
|
|
13
14
|
switch (resultType) {
|
|
@@ -19,7 +20,12 @@ const cellRender = (cellData) => {
|
|
|
19
20
|
}
|
|
20
21
|
};
|
|
21
22
|
const TMResultDialog = ({ title, result, id1Caption, id2Caption }) => {
|
|
22
|
-
|
|
23
|
+
const handleRowDblClick = (e) => {
|
|
24
|
+
if (e.data && e.data.description) {
|
|
25
|
+
TMExceptionBoxManager.show({ exception: e.data.description });
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
return (_jsx(TMModal, { height: '65%', width: '75%', title: `${SDKUI_Localizator.OperationResult} - ${title}`, children: _jsxs(TMLayoutContainer, { children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'row', gap: '5px', padding: '5px', justifyContent: 'center', alignItems: 'center' }, children: [_jsx("p", { children: `${SDKUI_Localizator.ProcessedItems}: ${result.length}` }), _jsx(IconSuccessCirlce, { fontSize: 22, color: TMColors.success }), _jsx("p", { children: result.filter(o => o.resultType == ResultTypes.SUCCESS).length ?? 0 }), _jsx(IconWarning, { fontSize: 22, color: TMColors.warning }), _jsx("p", { children: result.filter(o => o.resultType == ResultTypes.WARNING).length ?? 0 }), _jsx(IconCloseCircle, { fontSize: 22, color: TMColors.error }), _jsx("p", { children: result.filter(o => o.resultType == ResultTypes.ERROR).length ?? 0 })] }), _jsxs(DataGrid, { dataSource: result.filter(o => o.resultType != ResultTypes.SUCCESS), showColumnLines: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.showRowLines) === 1, showRowLines: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.showColumnLines) === 1, keyExpr: "rowIndex", width: "100%", height: "100%", columnResizingMode: "widget", allowColumnResizing: true, focusedRowEnabled: true, hoverStateEnabled: true, rowAlternationEnabled: true, onRowDblClick: handleRowDblClick, children: [_jsx(Column, { dataField: 'resultType', caption: '', width: "5%", allowResizing: true, allowSorting: true, cellRender: cellRender }), _jsx(Column, { dataField: 'id1', caption: id1Caption, width: "10%" }), id2Caption && _jsx(Column, { dataField: 'id2', caption: id2Caption, width: "10%" }), _jsx(Column, { dataField: 'description', allowResizing: true, caption: SDKUI_Localizator.Description, allowSorting: true, width: id2Caption ? "75%" : "85%" }), _jsx(HeaderFilter, { visible: true }), _jsx(Paging, { enabled: true, pageSize: 30 }), _jsx(Pager, { visible: true, showInfo: true, showNavigationButtons: true }), _jsx(Scrolling, { mode: 'standard', useNative: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.useNativeScrollbar) === 1 })] })] }) }));
|
|
23
29
|
};
|
|
24
30
|
export default TMResultDialog;
|
|
25
31
|
export class TMResultManager {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useState } from 'react';
|
|
3
3
|
import { ResultTypes } from '@topconsultnpm/sdk-ts';
|
|
4
4
|
import { FormModes } from '../../ts/types';
|
|
5
5
|
import { IconArrowDown, IconArrowLeft, IconArrowUp, IconCloseCircle, IconHide, IconSave, IconShow, IconUndo, IconWarning, LocalizeFormModes, SDKUI_Localizator, getColor } from '../../helper';
|
|
@@ -11,7 +11,7 @@ import { TMColors } from '../../utils/theme';
|
|
|
11
11
|
import TMValidationItemsList from '../grids/TMValidationItemsList';
|
|
12
12
|
import TMModal from '../base/TMModal';
|
|
13
13
|
import { DeviceType, useDeviceType } from '../base/TMDeviceProvider';
|
|
14
|
-
const TMSaveForm = ({ id, formMode = FormModes.Update, showToolbar = true, skipIsModifiedCheck = false, title, children, isModal, exception, customToolbarElements, hasNavigation, showSaveButton = true, customSaveButton, customTooltipSaveButton, showBackButton, showWarningsCount = true, showErrorCount = true, showUndoButton = true, onClose, onSaveAsync, onNext, onPrev, canNext, canPrev, isModified, onShowList, validationItems = [], onUndo, onCancel, width, height, askClosingConfirm = false, showTitleFormMode = true }) => {
|
|
14
|
+
const TMSaveForm = ({ id, formMode = FormModes.Update, showToolbar = true, skipIsModifiedCheck = false, title, children, isModal, exception, customToolbarElements, hasNavigation, showSaveButton = true, customSaveButton, customTooltipSaveButton, showBackButton, showWarningsCount = true, showErrorCount = true, showUndoButton = true, onClose, onSaveAsync, onNext, onPrev, canNext, canPrev, isModified, onShowList, validationItems = [], onUndo, onCancel, width, height, askClosingConfirm = false, showTitleFormMode = true, showCloseButton = true }) => {
|
|
15
15
|
const [showList, setShowList] = useState(true);
|
|
16
16
|
const [showErrorGrid, setShowErrorGrid] = useState(false);
|
|
17
17
|
const deviceType = useDeviceType();
|
|
@@ -90,14 +90,6 @@ const TMSaveForm = ({ id, formMode = FormModes.Update, showToolbar = true, skipI
|
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
92
|
};
|
|
93
|
-
useEffect(() => {
|
|
94
|
-
const handleKeyDown = (e) => {
|
|
95
|
-
if (e.key === 'Escape')
|
|
96
|
-
doClose();
|
|
97
|
-
};
|
|
98
|
-
window.addEventListener('keydown', handleKeyDown);
|
|
99
|
-
return () => window.removeEventListener('keydown', handleKeyDown);
|
|
100
|
-
}, [doClose]);
|
|
101
93
|
const warningsCount = validationItems.filter(o => o.ResultType == ResultTypes.WARNING).length;
|
|
102
94
|
const errorsCount = validationItems.filter(o => o.ResultType == ResultTypes.ERROR).length;
|
|
103
95
|
const renderSaveForm = () => {
|
|
@@ -110,7 +102,7 @@ const TMSaveForm = ({ id, formMode = FormModes.Update, showToolbar = true, skipI
|
|
|
110
102
|
_jsx("div", { style: { width: '100%', height: '100%', marginTop: '50px', display: 'flex', alignItems: 'center', justifyContent: 'center', flexDirection: 'column', color: getColor('error') }, children: 'Si è verificato un errore' })
|
|
111
103
|
: _jsx(_Fragment, { children: children }) }), showErrorGrid && validationItems.length > 0 ? _jsx(TMCard, { scrollY: true, padding: false, showBorder: false, children: _jsx(TMValidationItemsList, { validationItems: validationItems }) }) : _jsx(_Fragment, {})] }) }), (isModal && onClose) && _jsx("div", { id: "TMSaveFormShowConfirmForClose-" + id })] }));
|
|
112
104
|
};
|
|
113
|
-
return (_jsx(_Fragment, { children: (isModal && onClose) ? _jsx(_Fragment, { children: _jsx(TMModal, { title: `${title}${showTitleFormMode ? ` - ${LocalizeFormModes(formMode)}` : ''}`, onClose: doClose, width: width ?? '100%', height: height ?? '100%', hidePopup: false, askClosingConfirm: askClosingConfirm, children: _jsx("div", { style: { width: "100%", height: "100%", display: 'block' }, children: renderSaveForm() }) }) })
|
|
105
|
+
return (_jsx(_Fragment, { children: (isModal && onClose) ? _jsx(_Fragment, { children: _jsx(TMModal, { title: `${title}${showTitleFormMode ? ` - ${LocalizeFormModes(formMode)}` : ''}`, onClose: doClose, width: width ?? '100%', height: height ?? '100%', hidePopup: false, askClosingConfirm: askClosingConfirm, showCloseButton: showCloseButton, children: _jsx("div", { style: { width: "100%", height: "100%", display: 'block' }, children: renderSaveForm() }) }) })
|
|
114
106
|
: renderSaveForm() }));
|
|
115
107
|
};
|
|
116
108
|
export default TMSaveForm;
|
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
import { BlogPostAttachment, DcmtTypeDescriptor } from "@topconsultnpm/sdk-ts";
|
|
2
|
-
import { TMBlogContextDescriptor } from "./TMBlogsPostUtils";
|
|
3
2
|
import { DcmtInfo } from "../../ts";
|
|
4
3
|
import { FileItem } from "../base/TMFileManagerUtils";
|
|
5
4
|
interface TMBlogAttachmentsProps {
|
|
6
|
-
contextMenuParams?: {
|
|
7
|
-
isShowHideFilterEnabled: boolean;
|
|
8
|
-
isShowHideIDEnaled: boolean;
|
|
9
|
-
isCommentEnabled: boolean;
|
|
10
|
-
isDownloadAttachmentEnabled: boolean;
|
|
11
|
-
isViewEditMetadata: boolean;
|
|
12
|
-
isDeleteEnabled: boolean;
|
|
13
|
-
isCopyToClipboardEnabled: boolean;
|
|
14
|
-
isRestoreEnabled: boolean;
|
|
15
|
-
isRefreshEnabled: boolean;
|
|
16
|
-
isCreateContextualTask: boolean;
|
|
17
|
-
};
|
|
18
5
|
layoutMode: "compact" | "extended";
|
|
19
6
|
attachments: Array<BlogPostAttachment>;
|
|
20
7
|
isSelected: boolean;
|
|
@@ -34,7 +21,6 @@ interface TMBlogAttachmentsProps {
|
|
|
34
21
|
fileExt: string;
|
|
35
22
|
fileSize: string;
|
|
36
23
|
}> | undefined;
|
|
37
|
-
context?: TMBlogContextDescriptor;
|
|
38
24
|
handleAttachmentFocus: (attachment: DcmtInfo | undefined) => void;
|
|
39
25
|
openDcmtForm: (dcmtInfo: DcmtInfo) => void;
|
|
40
26
|
}
|
|
@@ -4,7 +4,7 @@ import { getAttachmentInfo, lightenColor, removeFileExtension } from "./TMBlogsP
|
|
|
4
4
|
import TMDcmtIcon from "../features/documents/TMDcmtIcon";
|
|
5
5
|
import { IconAttachment } from "../../helper";
|
|
6
6
|
const TMBlogAttachments = (props) => {
|
|
7
|
-
const { attachments, isSelected, searchText, dcmtTypeDescriptors, treeFs, draftLatestInfoMap, archivedDocumentMap, handleAttachmentFocus, openDcmtForm } = props;
|
|
7
|
+
const { layoutMode, attachments, isSelected, searchText, dcmtTypeDescriptors, treeFs, draftLatestInfoMap, archivedDocumentMap, handleAttachmentFocus, openDcmtForm } = props;
|
|
8
8
|
const handleMouseEnter = (e, blogPostAttachment, name, fileExt) => {
|
|
9
9
|
e.currentTarget.style.boxShadow = '0 4px 8px rgba(0, 0, 0, 0.15)';
|
|
10
10
|
e.currentTarget.style.backgroundColor = isSelected ? lightenColor("#135596", 40) : '#cfcfcf';
|
|
@@ -25,7 +25,7 @@ const TMBlogAttachments = (props) => {
|
|
|
25
25
|
return _jsx("div", { style: { width: "100%", marginTop: "5px", overflow: "hidden" }, children: attachments.map((blogPostAttachment, index) => {
|
|
26
26
|
const { name, nameElement, tooltipContent, fileExt, archivedDocumentsExist, draftExist } = getAttachmentInfo(blogPostAttachment, treeFs, draftLatestInfoMap, archivedDocumentMap, dcmtTypeDescriptors, isSelected, searchText);
|
|
27
27
|
return _jsx("div", { onDoubleClick: (e) => onDoubleClick(e, blogPostAttachment, name, fileExt), onMouseEnter: (e) => handleMouseEnter(e, blogPostAttachment, name, fileExt), onMouseLeave: (e) => handleMouseLeave(e), style: {
|
|
28
|
-
display:
|
|
28
|
+
display: layoutMode === "extended" ? "inline-flex" : "flex",
|
|
29
29
|
padding: '4px 8px',
|
|
30
30
|
margin: '4px',
|
|
31
31
|
border: '1px solid #ddd',
|
|
@@ -35,9 +35,14 @@ const TMBlogAttachments = (props) => {
|
|
|
35
35
|
cursor: "pointer",
|
|
36
36
|
fontSize: '0.9rem',
|
|
37
37
|
color: isSelected ? "#ffffff" : "#000000",
|
|
38
|
-
}, children: _jsxs("div", { style: { alignItems: 'center', display: 'flex' }, children: [(!archivedDocumentsExist && !draftExist) ?
|
|
39
|
-
_jsx(IconAttachment, { style: { marginRight: "5px" } }) :
|
|
40
|
-
_jsx("div", { style: { marginRight: "10px" }, children: _jsx(TMDcmtIcon, { tid: blogPostAttachment.tid, did: blogPostAttachment.did, fileExtension: fileExt, downloadMode: 'openInNewWindow', tooltipContent: tooltipContent }) }), _jsx("span", {
|
|
38
|
+
}, children: _jsxs("div", { style: { alignItems: 'center', display: 'flex', minWidth: 0 }, children: [(!archivedDocumentsExist && !draftExist) ?
|
|
39
|
+
_jsx(IconAttachment, { style: { marginRight: "5px", flexShrink: 0 } }) :
|
|
40
|
+
_jsx("div", { style: { marginRight: "10px", flexShrink: 0 }, children: _jsx(TMDcmtIcon, { tid: blogPostAttachment.tid, did: blogPostAttachment.did, fileExtension: fileExt, downloadMode: 'openInNewWindow', tooltipContent: tooltipContent }) }), _jsx("span", { title: layoutMode === 'compact' ? name + " (DID: " + blogPostAttachment.did + ")" : undefined, style: {
|
|
41
|
+
whiteSpace: 'nowrap',
|
|
42
|
+
overflow: 'hidden',
|
|
43
|
+
textOverflow: 'ellipsis',
|
|
44
|
+
minWidth: 0,
|
|
45
|
+
}, children: nameElement })] }) }, blogPostAttachment.did + "_" + index);
|
|
41
46
|
}) });
|
|
42
47
|
};
|
|
43
48
|
export default TMBlogAttachments;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { BlogPost, HomeBlogPost, TaskDescriptor } from "@topconsultnpm/sdk-ts";
|
|
3
|
-
import { DcmtInfo } from "../../ts";
|
|
2
|
+
import { BlogPost, HomeBlogPost, TaskDescriptor, UserDescriptor } from "@topconsultnpm/sdk-ts";
|
|
3
|
+
import { DcmtInfo, FormModes } from "../../ts";
|
|
4
4
|
import { FileItem } from "../base/TMFileManagerUtils";
|
|
5
5
|
import { TMBlogsPostHeader, TMBlogContextDescriptor } from "./TMBlogsPostUtils";
|
|
6
6
|
interface TMBlogsPostProps {
|
|
@@ -41,6 +41,10 @@ interface TMBlogsPostProps {
|
|
|
41
41
|
}>;
|
|
42
42
|
/** Context descriptor for the blog component */
|
|
43
43
|
context?: TMBlogContextDescriptor;
|
|
44
|
+
/** Array of participants */
|
|
45
|
+
participants?: Array<UserDescriptor>;
|
|
46
|
+
/** Callback function to be executed when a task is saved */
|
|
47
|
+
afterTaskSaved?: (task: TaskDescriptor | undefined, formMode: FormModes | undefined, forceRefresh?: boolean) => Promise<void>;
|
|
44
48
|
/** Optional context menu params */
|
|
45
49
|
contextMenuParams?: {
|
|
46
50
|
isShowHideFilterEnabled: boolean;
|
|
@@ -74,11 +78,12 @@ interface TMBlogsPostProps {
|
|
|
74
78
|
externalBlogPost?: BlogPost;
|
|
75
79
|
/** Optional function to reset the external blog post */
|
|
76
80
|
resetExternalBlogPost?: () => void;
|
|
81
|
+
visible?: boolean;
|
|
77
82
|
allTasks?: Array<TaskDescriptor>;
|
|
78
83
|
getAllTasks?: () => Promise<void>;
|
|
79
84
|
deleteTaskByIdsCallback?: (deletedTaskIds: Array<number>) => Promise<void>;
|
|
80
|
-
addTaskCallback?: (task: TaskDescriptor) => Promise<void>;
|
|
81
85
|
editTaskCallback?: (task: TaskDescriptor) => Promise<void>;
|
|
86
|
+
addTaskCallback?: (task: TaskDescriptor) => Promise<void>;
|
|
82
87
|
handleNavigateToWGs?: (value: HomeBlogPost | number) => Promise<void>;
|
|
83
88
|
handleNavigateToDossiers?: (value: HomeBlogPost | number) => Promise<void>;
|
|
84
89
|
}
|