@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,61 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { AccessLevels, AccessLevelsEx, AppModules, FileFormats, LayoutModes, SDK_Globals, DcmtTypeListCacheService, LicenseModuleStatus } from '@topconsultnpm/sdk-ts';
|
|
3
|
-
import { IconActivity, IconArchiveDoc, IconBatchUpdate, IconCheckFile, IconCheckIn, IconCircleInfo, IconCloseCircle, IconConvertFilePdf, IconDelete, IconDotsVerticalCircleOutline, IconDownload, IconEdit, IconExportTo, IconFileDots, IconHide, IconInfo, IconMenuCAArchive, IconPlatform, IconPreview, IconRelation, IconSearch, IconShow, IconStar, IconSubstFile, IconUndo, IconUserGroupOutline, SDKUI_Localizator, svgToString, searchResultToMetadataValues, IconSignaturePencil, IconArchiveMaster, IconArchiveDetail, IconDetailDcmts, isPdfEditorEnabled, IconPair, IconUnpair, IconSharedDcmt } from '../../../helper';
|
|
2
|
+
import { AccessLevels, AccessLevelsEx, AppModules, FileFormats, LayoutModes, SDK_Globals, DcmtTypeListCacheService, LicenseModuleStatus, CICO_MetadataNames } from '@topconsultnpm/sdk-ts';
|
|
3
|
+
import { IconActivity, IconArchiveDoc, IconBatchUpdate, IconCheckFile, IconCheckIn, IconCircleInfo, IconCloseCircle, IconConvertFilePdf, IconDelete, IconDotsVerticalCircleOutline, IconDownload, IconEdit, IconExportTo, IconFileDots, IconHide, IconInfo, IconMenuCAArchive, IconPlatform, IconPreview, IconRelation, IconSearch, IconShow, IconStar, IconSubstFile, IconUndo, IconUserGroupOutline, SDKUI_Localizator, svgToString, searchResultToMetadataValues, IconSignaturePencil, IconArchiveMaster, IconArchiveDetail, IconDetailDcmts, isPdfEditorEnabled, IconPair, IconUnpair, IconSharedDcmt, IconShare, IconCopy, IconMoveToFolder } from '../../../helper';
|
|
4
4
|
import ShowAlert from '../../base/TMAlert';
|
|
5
5
|
import { TMMessageBoxManager, ButtonNames, TMExceptionBoxManager } from '../../base/TMPopUp';
|
|
6
6
|
import TMSpinner from '../../base/TMSpinner';
|
|
7
7
|
import { DcmtOperationTypes, DownloadTypes, SearchResultContext } from '../../../ts';
|
|
8
8
|
import { isXMLFileExt } from '../../../helper/dcmtsHelper';
|
|
9
|
+
const getCicoInfo = (dtd) => {
|
|
10
|
+
const cico = {
|
|
11
|
+
CICO: 0,
|
|
12
|
+
CanCICO: AccessLevels.No,
|
|
13
|
+
CanDelChronology: AccessLevels.No,
|
|
14
|
+
UserID_MID: 0,
|
|
15
|
+
Date_MID: 0,
|
|
16
|
+
Ver_MID: 0,
|
|
17
|
+
UserID_CanViewOrUpdate: AccessLevels.No,
|
|
18
|
+
Date_CanViewOrUpdate: AccessLevels.No,
|
|
19
|
+
Ver_CanViewOrUpdate: AccessLevels.No,
|
|
20
|
+
};
|
|
21
|
+
if (dtd === undefined)
|
|
22
|
+
return cico;
|
|
23
|
+
cico.CICO = dtd.cico ?? 0;
|
|
24
|
+
cico.CanCICO = dtd.perm?.canCICO ?? AccessLevels.No;
|
|
25
|
+
cico.CanDelChronology = dtd.perm?.canDelChron ?? AccessLevels.No;
|
|
26
|
+
const mdCheckout = dtd.metadata?.find(md => md.name === CICO_MetadataNames.CICO_CheckoutUserID);
|
|
27
|
+
if (mdCheckout) {
|
|
28
|
+
cico.UserID_MID = mdCheckout.fromMID;
|
|
29
|
+
cico.UserID_CanViewOrUpdate = (mdCheckout.perm?.canView == AccessLevels.Yes || mdCheckout.perm?.canUpdate == AccessLevels.Yes) ? AccessLevels.Yes : AccessLevels.No;
|
|
30
|
+
}
|
|
31
|
+
const mdDate = dtd.metadata?.find(md => md.name === CICO_MetadataNames.CICO_CheckoutDate);
|
|
32
|
+
if (mdDate) {
|
|
33
|
+
cico.Date_MID = mdDate.fromMID;
|
|
34
|
+
cico.Date_CanViewOrUpdate = (mdDate.perm?.canView == AccessLevels.Yes || mdDate.perm?.canUpdate == AccessLevels.Yes) ? AccessLevels.Yes : AccessLevels.No;
|
|
35
|
+
}
|
|
36
|
+
const mdVer = dtd.metadata?.find(md => md.name === CICO_MetadataNames.CICO_Version);
|
|
37
|
+
if (mdVer) {
|
|
38
|
+
cico.Ver_MID = mdVer.fromMID;
|
|
39
|
+
cico.Ver_CanViewOrUpdate = (mdVer.perm?.canView == AccessLevels.Yes || mdVer.perm?.canUpdate == AccessLevels.Yes) ? AccessLevels.Yes : AccessLevels.No;
|
|
40
|
+
}
|
|
41
|
+
return cico;
|
|
42
|
+
};
|
|
43
|
+
const cicoIsEnabled = (dcmt, dtd) => {
|
|
44
|
+
const cicoInfo = getCicoInfo(dtd);
|
|
45
|
+
let isCheckout = false;
|
|
46
|
+
const CICO_CheckoutUserID = dtd?.metadata?.find(md => md.name === CICO_MetadataNames.CICO_CheckoutUserID)?.id;
|
|
47
|
+
if (dcmt && CICO_CheckoutUserID) {
|
|
48
|
+
const key = dcmt.TID + "_" + CICO_CheckoutUserID;
|
|
49
|
+
const value = dcmt[key];
|
|
50
|
+
if (value && value > 0) {
|
|
51
|
+
isCheckout = true;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
cicoEnabled: cicoInfo.CICO === 1 && cicoInfo.CanCICO === AccessLevels.Yes,
|
|
56
|
+
isCheckout: isCheckout
|
|
57
|
+
};
|
|
58
|
+
};
|
|
9
59
|
const disabledForSingleRow = (selectedItems, focusedItem) => {
|
|
10
60
|
return selectedItems.length > 1 || focusedItem === undefined;
|
|
11
61
|
};
|
|
@@ -24,8 +74,20 @@ export const getSelectedDcmtsOrFocused = (selectedItems, focusedItem, fileFormat
|
|
|
24
74
|
}
|
|
25
75
|
return [];
|
|
26
76
|
};
|
|
77
|
+
export const getAllFieldSelectedDcmtsOrFocused = (selectedItems, focusedItem, fileFormat) => {
|
|
78
|
+
if (selectedItems.length <= 0 && !focusedItem)
|
|
79
|
+
return [];
|
|
80
|
+
if (selectedItems.length > 0) {
|
|
81
|
+
return selectedItems;
|
|
82
|
+
}
|
|
83
|
+
else if (focusedItem !== undefined) {
|
|
84
|
+
return [focusedItem];
|
|
85
|
+
}
|
|
86
|
+
return [];
|
|
87
|
+
};
|
|
27
88
|
export const signatureInformationCallback = async (isMobile, inputDcmts) => {
|
|
28
89
|
try {
|
|
90
|
+
TMSpinner.show({ description: SDKUI_Localizator.Loading });
|
|
29
91
|
if (!inputDcmts || inputDcmts.length === 0) {
|
|
30
92
|
ShowAlert({
|
|
31
93
|
message: SDKUI_Localizator.NoDcmtSelected,
|
|
@@ -74,8 +136,11 @@ export const signatureInformationCallback = async (isMobile, inputDcmts) => {
|
|
|
74
136
|
console.error(error);
|
|
75
137
|
TMExceptionBoxManager.show({ exception: error });
|
|
76
138
|
}
|
|
139
|
+
finally {
|
|
140
|
+
TMSpinner.hide();
|
|
141
|
+
}
|
|
77
142
|
};
|
|
78
|
-
export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, onRefreshDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, confirmAttachments, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, hasMasterRelation, hasDetailRelation, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToManyDocuments, hasManyToManyRelation) => {
|
|
143
|
+
export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, onRefreshDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, confirmAttachments, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, hasMasterRelation, hasDetailRelation, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToManyDocuments, hasManyToManyRelation) => {
|
|
79
144
|
const isPdfEditorLicensed = SDK_Globals?.license?.dcmtArchiveLicenses?.[0]?.siX_60007?.status === LicenseModuleStatus.Licensed;
|
|
80
145
|
let pdfEditorAvailable = false;
|
|
81
146
|
if (dtd && dtd.widgets && dtd.widgets.length > 0) {
|
|
@@ -184,7 +249,7 @@ export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem,
|
|
|
184
249
|
icon: svgToString(_jsx(IconDownload, {})),
|
|
185
250
|
operationType: 'multiRow',
|
|
186
251
|
disabled: dtd?.perm?.canRetrieveFile !== AccessLevels.Yes ? true : disabledForMultiRow(selectedItems, focusedItem),
|
|
187
|
-
text: SDKUI_Localizator.DownloadFile, onClick: () => downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DownloadTypes.Dcmt, "download")
|
|
252
|
+
text: SDKUI_Localizator.DownloadFile, onClick: () => downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DownloadTypes.Dcmt, "download", undefined, undefined, true)
|
|
188
253
|
};
|
|
189
254
|
};
|
|
190
255
|
const downloadXMLAttachmentsMenuItem = () => {
|
|
@@ -192,7 +257,7 @@ export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem,
|
|
|
192
257
|
icon: svgToString(_jsx(IconDownload, {})),
|
|
193
258
|
operationType: 'singleRow',
|
|
194
259
|
disabled: !isXMLFileExt(getSelectedDcmtsOrFocused(selectedItems, focusedItem)?.[0]?.FILEEXT) ? true : disabledForSingleRow(selectedItems, focusedItem),
|
|
195
|
-
text: SDKUI_Localizator.DownloadXMLAttachments, onClick: () => downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DownloadTypes.Attachment, "download", undefined, confirmAttachments)
|
|
260
|
+
text: SDKUI_Localizator.DownloadXMLAttachments, onClick: () => downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DownloadTypes.Attachment, "download", undefined, confirmAttachments, true)
|
|
196
261
|
};
|
|
197
262
|
};
|
|
198
263
|
const duplicateDocumentMenuItem = () => {
|
|
@@ -271,6 +336,20 @@ export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem,
|
|
|
271
336
|
text: SDKUI_Localizator.Signature,
|
|
272
337
|
disabled: disabledForSingleRow(selectedItems, focusedItem) && disabledForMultiRow(selectedItems, focusedItem),
|
|
273
338
|
items: [
|
|
339
|
+
{
|
|
340
|
+
icon: svgToString(_jsx(IconSignaturePencil, {})),
|
|
341
|
+
operationType: 'singleRow',
|
|
342
|
+
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
343
|
+
text: SDKUI_Localizator.Signature,
|
|
344
|
+
onClick: handleSignApprove
|
|
345
|
+
},
|
|
346
|
+
/* {
|
|
347
|
+
icon: svgToString(<IconSettings />),
|
|
348
|
+
operationType: 'singleRow',
|
|
349
|
+
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
350
|
+
text: SDKUI_Localizator.SignatureSettings,
|
|
351
|
+
onClick: openSignSettingsForm
|
|
352
|
+
}, */
|
|
274
353
|
{
|
|
275
354
|
icon: svgToString(_jsx(IconCircleInfo, {})),
|
|
276
355
|
text: SDKUI_Localizator.SignatureInformation,
|
|
@@ -285,59 +364,37 @@ export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem,
|
|
|
285
364
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
286
365
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.VerifySign); }
|
|
287
366
|
},
|
|
288
|
-
{
|
|
289
|
-
icon: svgToString(_jsx(IconSignaturePencil, {})),
|
|
290
|
-
operationType: 'singleRow',
|
|
291
|
-
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
292
|
-
text: SDKUI_Localizator.Signature,
|
|
293
|
-
onClick: handleSignApprove
|
|
294
|
-
},
|
|
295
367
|
]
|
|
296
368
|
};
|
|
297
369
|
};
|
|
298
|
-
|
|
370
|
+
const checkinMenuItem = () => {
|
|
371
|
+
// Get the currently selected or focused documents
|
|
372
|
+
const selectedDocs = getAllFieldSelectedDcmtsOrFocused(selectedItems, focusedItem);
|
|
373
|
+
// Take the first document (used for validation checks)
|
|
374
|
+
const firstDoc = selectedDocs?.[0];
|
|
375
|
+
const { cicoEnabled, isCheckout } = cicoIsEnabled(firstDoc, dtd);
|
|
299
376
|
return {
|
|
300
|
-
icon: svgToString(
|
|
301
|
-
text: "Check in",
|
|
302
|
-
disabled: disabledForSingleRow(selectedItems, focusedItem) && disabledForMultiRow(selectedItems, focusedItem),
|
|
377
|
+
icon: svgToString(_jsx(IconFileDots, {})),
|
|
378
|
+
text: "Check in/Check out",
|
|
379
|
+
disabled: !cicoEnabled || (disabledForSingleRow(selectedItems, focusedItem) && disabledForMultiRow(selectedItems, focusedItem)),
|
|
303
380
|
items: [
|
|
304
381
|
{
|
|
305
|
-
icon:
|
|
306
|
-
|
|
307
|
-
disabled:
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
{
|
|
311
|
-
icon: svgToString(<IconCheckIn />),
|
|
312
|
-
text: "Modifica file",
|
|
313
|
-
operationType: 'singleRow',
|
|
314
|
-
disabled: fromDatagrid ? false : disabledForSingleRow(selectedItems, focusedItem),
|
|
315
|
-
onClick: () => ShowAlert({ message: "TODO Modifica file", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
icon: svgToString(<IconCheckIn />),
|
|
319
|
-
text: "Annulla check out",
|
|
320
|
-
operationType: 'singleRow',
|
|
321
|
-
disabled: fromDatagrid ? false : disabledForSingleRow(selectedItems, focusedItem),
|
|
322
|
-
onClick: () => ShowAlert({ message: "TODO Annulla check out", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
382
|
+
icon: "edit",
|
|
383
|
+
text: 'Check out',
|
|
384
|
+
disabled: !cicoEnabled || (disabledForSingleRow(selectedItems, focusedItem) && disabledForMultiRow(selectedItems, focusedItem)),
|
|
385
|
+
// disabled: isNotSingleFile || isGroupLocked || isFileCheckedOut,
|
|
386
|
+
onClick: () => handleCheckOutOperationCallback(true),
|
|
323
387
|
},
|
|
324
388
|
{
|
|
325
|
-
icon:
|
|
326
|
-
text:
|
|
327
|
-
|
|
328
|
-
disabled:
|
|
329
|
-
onClick: () =>
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
icon: svgToString(<IconCheckIn />),
|
|
333
|
-
text: "Cronologia",
|
|
334
|
-
operationType: 'singleRow',
|
|
335
|
-
disabled: fromDatagrid ? false : disabledForSingleRow(selectedItems, focusedItem),
|
|
336
|
-
onClick: () => ShowAlert({ message: "TODO Cronologia", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
389
|
+
icon: "remove",
|
|
390
|
+
text: SDKUI_Localizator.CancelCheckOut,
|
|
391
|
+
disabled: !cicoEnabled || (disabledForSingleRow(selectedItems, focusedItem) && disabledForMultiRow(selectedItems, focusedItem)),
|
|
392
|
+
// disabled: isNotSingleFile || isGroupLocked || isFileNotCheckedOut || isNotCheckedOutByCurrentUser,
|
|
393
|
+
onClick: () => handleCheckOutOperationCallback(false),
|
|
337
394
|
},
|
|
338
395
|
]
|
|
339
|
-
}
|
|
340
|
-
}
|
|
396
|
+
};
|
|
397
|
+
};
|
|
341
398
|
const relationsMenuItem = () => {
|
|
342
399
|
return {
|
|
343
400
|
icon: svgToString(_jsx(IconRelation, {})),
|
|
@@ -347,21 +404,21 @@ export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem,
|
|
|
347
404
|
items: [
|
|
348
405
|
{
|
|
349
406
|
icon: svgToString(_jsx(IconPair, {})),
|
|
350
|
-
text:
|
|
407
|
+
text: SDKUI_Localizator.MatchManyDocumentsManyToMany,
|
|
351
408
|
operationType: 'multiRow',
|
|
352
409
|
disabled: !hasManyToManyRelation || disabledForMultiRow(selectedItems, focusedItem),
|
|
353
410
|
onClick: async () => await pairManyToManyDocuments?.(true)
|
|
354
411
|
},
|
|
355
412
|
{
|
|
356
413
|
icon: svgToString(_jsx(IconUnpair, {})),
|
|
357
|
-
text:
|
|
414
|
+
text: SDKUI_Localizator.UnmatchManyDocumentsManyToMany,
|
|
358
415
|
operationType: 'multiRow',
|
|
359
416
|
disabled: !hasManyToManyRelation || disabledForMultiRow(selectedItems, focusedItem),
|
|
360
417
|
onClick: async () => await pairManyToManyDocuments?.(false)
|
|
361
418
|
},
|
|
362
419
|
{
|
|
363
420
|
icon: svgToString(_jsx(IconArchiveMaster, {})),
|
|
364
|
-
text:
|
|
421
|
+
text: SDKUI_Localizator.ArchiveMasterDocument,
|
|
365
422
|
operationType: 'multiRow',
|
|
366
423
|
beginGroup: true,
|
|
367
424
|
disabled: canArchiveMasterRelation !== true,
|
|
@@ -369,7 +426,7 @@ export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem,
|
|
|
369
426
|
},
|
|
370
427
|
{
|
|
371
428
|
icon: svgToString(_jsx(IconArchiveDetail, {})),
|
|
372
|
-
text:
|
|
429
|
+
text: SDKUI_Localizator.ArchiveDetailDocument,
|
|
373
430
|
operationType: 'multiRow',
|
|
374
431
|
disabled: canArchiveDetailRelation !== true,
|
|
375
432
|
onClick: async () => await archiveDetailDocuments?.(focusedItem?.TID)
|
|
@@ -397,22 +454,22 @@ export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem,
|
|
|
397
454
|
const sharedDcmtsMenuItem = () => {
|
|
398
455
|
return {
|
|
399
456
|
icon: svgToString(_jsx(IconSharedDcmt, {})),
|
|
400
|
-
text:
|
|
457
|
+
text: SDKUI_Localizator.SharedDocuments,
|
|
401
458
|
operationType: 'multiRow',
|
|
402
459
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
403
460
|
items: [
|
|
404
461
|
{
|
|
405
462
|
icon: svgToString(_jsx(IconSharedDcmt, {})),
|
|
406
|
-
text:
|
|
463
|
+
text: SDKUI_Localizator.SharedArchiving,
|
|
407
464
|
operationType: 'singleRow',
|
|
408
465
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
409
466
|
onClick: async () => { await openSharedArchiveHandler(); }
|
|
410
467
|
},
|
|
411
468
|
{
|
|
412
469
|
icon: svgToString(_jsx(IconSharedDcmt, {})),
|
|
413
|
-
text:
|
|
470
|
+
text: SDKUI_Localizator.ShowSharedDocuments,
|
|
414
471
|
operationType: 'multiRow',
|
|
415
|
-
disabled:
|
|
472
|
+
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
416
473
|
onClick: async () => { await showSharedDcmtsHandler(); }
|
|
417
474
|
}
|
|
418
475
|
]
|
|
@@ -555,7 +612,7 @@ export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem,
|
|
|
555
612
|
};
|
|
556
613
|
const shareFromWgMenuItem = () => {
|
|
557
614
|
return {
|
|
558
|
-
icon:
|
|
615
|
+
icon: svgToString(_jsx(IconShare, {})),
|
|
559
616
|
text: SDKUI_Localizator.Share,
|
|
560
617
|
visible: workingGroupContext !== undefined && openAddDocumentForm !== undefined,
|
|
561
618
|
disabled: workingGroupContext === undefined,
|
|
@@ -564,7 +621,7 @@ export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem,
|
|
|
564
621
|
};
|
|
565
622
|
const copyFromWgMenuItem = () => {
|
|
566
623
|
return {
|
|
567
|
-
icon:
|
|
624
|
+
icon: svgToString(_jsx(IconCopy, {})),
|
|
568
625
|
text: SDKUI_Localizator.CopyToDrafts,
|
|
569
626
|
operationType: 'multiRow',
|
|
570
627
|
visible: openWGsCopyMoveForm !== undefined,
|
|
@@ -574,7 +631,7 @@ export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem,
|
|
|
574
631
|
};
|
|
575
632
|
const movetofolderFromWgMenuItem = () => {
|
|
576
633
|
return {
|
|
577
|
-
icon:
|
|
634
|
+
icon: svgToString(_jsx(IconMoveToFolder, {})),
|
|
578
635
|
text: !isMobile ? SDKUI_Localizator.CopyToArchivedDocuments : SDKUI_Localizator.CopyToArchived,
|
|
579
636
|
operationType: 'multiRow',
|
|
580
637
|
visible: openWGsCopyMoveForm !== undefined,
|
|
@@ -649,7 +706,7 @@ export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem,
|
|
|
649
706
|
]
|
|
650
707
|
},
|
|
651
708
|
signatureMenuItem(),
|
|
652
|
-
// checkinMenuItem()
|
|
709
|
+
// checkinMenuItem(),
|
|
653
710
|
relationsMenuItem(),
|
|
654
711
|
sharedDcmtsMenuItem(),
|
|
655
712
|
// shareMenuItem(),
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DcmtTypeDescriptor, SearchResultDescriptor } from "@topconsultnpm/sdk-ts";
|
|
2
|
+
interface TMSignSettingsFormProps {
|
|
3
|
+
fromDTD: DcmtTypeDescriptor;
|
|
4
|
+
inputDcmts: any[];
|
|
5
|
+
onCloseSignSettingsForm: () => void;
|
|
6
|
+
onSavedAsyncCallback: ((tid: number | undefined, did: number | undefined, metadataResult?: SearchResultDescriptor | null) => Promise<void>);
|
|
7
|
+
}
|
|
8
|
+
declare const TMSignSettingsForm: (props: TMSignSettingsFormProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export default TMSignSettingsForm;
|