@topconsultnpm/sdkui-react 6.22.0-t2 → 6.22.0-t3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +3 -3
- package/lib/components/NewComponents/ContextMenu/hooks.d.ts +1 -1
- package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +6 -6
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +15 -15
- package/lib/components/base/Styled.js +7 -5
- package/lib/components/base/TMAccordionNew.js +7 -7
- package/lib/components/base/TMAlert.d.ts +32 -32
- package/lib/components/base/TMAlert.js +6 -8
- package/lib/components/base/TMAreaManager.js +53 -55
- package/lib/components/base/TMButton.js +4 -4
- package/lib/components/base/TMClosableList.js +3 -3
- package/lib/components/base/TMCustomButton.js +40 -48
- package/lib/components/base/TMDataGrid.d.ts +2 -0
- package/lib/components/base/TMDataGrid.js +35 -7
- package/lib/components/base/TMDropDownMenu.js +1 -1
- package/lib/components/base/TMFileManagerDataGridView.js +1 -1
- package/lib/components/base/TMFileManagerThumbnailItems.js +2 -2
- package/lib/components/base/TMLayout.d.ts +2 -2
- package/lib/components/base/TMLayout.js +3 -3
- package/lib/components/base/TMList.js +1 -1
- package/lib/components/base/TMListView.js +3 -3
- package/lib/components/base/TMModal.js +1 -1
- package/lib/components/base/TMPanel.js +8 -8
- package/lib/components/base/TMPopUp.js +2 -2
- package/lib/components/base/TMResizableMenu.js +2 -2
- package/lib/components/base/TMRightSidebar.js +1 -1
- package/lib/components/base/TMShowAllOrMaxItemsButton.js +1 -1
- package/lib/components/base/TMSpinner.d.ts +2 -1
- package/lib/components/base/TMSpinner.js +9 -7
- package/lib/components/base/TMTab.js +2 -2
- package/lib/components/base/TMTabControl.d.ts +106 -0
- package/lib/components/base/TMTabControl.js +664 -0
- package/lib/components/base/TMToggleButton.js +2 -2
- package/lib/components/base/TMToolbarCard.js +3 -3
- package/lib/components/base/TMTreeView.js +35 -3
- package/lib/components/base/TMWaitPanel.js +3 -3
- package/lib/components/base/waitPanel/TMWaitPanelConfirm.d.ts +12 -0
- package/lib/components/base/waitPanel/TMWaitPanelConfirm.js +185 -0
- package/lib/components/base/waitPanel/TMWaitPanelManager.d.ts +169 -0
- package/lib/components/base/waitPanel/TMWaitPanelManager.js +320 -0
- package/lib/components/base/waitPanel/TMWaitPanelView.d.ts +53 -0
- package/lib/components/base/waitPanel/TMWaitPanelView.js +274 -0
- package/lib/components/base/waitPanel/index.d.ts +1 -0
- package/lib/components/base/waitPanel/index.js +1 -0
- package/lib/components/choosers/TMCultureIDPicker.js +2 -2
- package/lib/components/choosers/TMDataListItemChooser.js +1 -1
- package/lib/components/choosers/TMDataListItemPicker.js +2 -2
- package/lib/components/choosers/TMDcmtTypeChooser.js +1 -1
- package/lib/components/choosers/TMDiskChooser.js +1 -1
- package/lib/components/choosers/TMDistinctValues.js +28 -19
- package/lib/components/choosers/TMDynDataListItemChooser.js +1 -1
- package/lib/components/choosers/TMImageIDChooser.js +1 -1
- package/lib/components/choosers/TMMetadataChooser.js +2 -2
- package/lib/components/choosers/TMPathChooser.js +17 -34
- package/lib/components/choosers/TMQuickSearchInfo.js +4 -4
- package/lib/components/choosers/TMQuickSearchSettingsForm.js +1 -1
- package/lib/components/choosers/TMRelationChooser.js +1 -1
- package/lib/components/choosers/TMSelectedValuesSummary.js +1 -3
- package/lib/components/choosers/TMUserChooser.js +1 -1
- package/lib/components/editors/TMCheckBox.js +1 -1
- package/lib/components/editors/TMDropDown.js +7 -7
- package/lib/components/editors/TMEditorStyled.d.ts +1 -1
- package/lib/components/editors/TMFormulaEditor.js +1 -1
- package/lib/components/editors/TMHtmlContentDisplay.js +1 -1
- package/lib/components/editors/TMLocalizedTextBox.js +1 -1
- package/lib/components/editors/TMMetadataValues.js +6 -6
- package/lib/components/editors/TMRadioButton.js +2 -2
- package/lib/components/editors/TMSummary.js +3 -3
- package/lib/components/editors/TMTextArea.js +3 -3
- package/lib/components/editors/TMTextBox.js +3 -3
- package/lib/components/editors/TMTextExpression.js +1 -1
- package/lib/components/features/archive/TMArchive.js +7 -2
- package/lib/components/features/assistant/TMHelpOnLineChat.d.ts +29 -0
- package/lib/components/features/assistant/TMHelpOnLineChat.js +1384 -0
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +4 -4
- package/lib/components/features/assistant/TMToppySpeechBubble.js +1 -1
- package/lib/components/features/assistant/dataset/Designer-Suggested-Questions.json +102 -0
- package/lib/components/features/assistant/dataset/Login-Suggested-Questions.json +32 -0
- package/lib/components/features/assistant/dataset/Surfer-Suggested-Questions.json +102 -0
- package/lib/components/features/documents/TMBatchUpdateForm.js +4 -5
- package/lib/components/features/documents/TMCopyToFolderForm.js +50 -42
- package/lib/components/features/documents/TMDcmtForm.js +53 -64
- package/lib/components/features/documents/TMDcmtFormActionButtons.js +2 -2
- package/lib/components/features/documents/TMDcmtIcon.d.ts +1 -3
- package/lib/components/features/documents/TMDcmtIcon.js +3 -5
- package/lib/components/features/documents/TMDcmtPreview.js +6 -4
- package/lib/components/features/documents/TMDcmtTasks.js +2 -9
- package/lib/components/features/documents/TMDownloadRelationViewerSection.js +1 -1
- package/lib/components/features/documents/TMFileUploader.js +7 -7
- package/lib/components/features/documents/TMMasterDetailDcmts.d.ts +2 -0
- package/lib/components/features/documents/TMMasterDetailDcmts.js +55 -130
- package/lib/components/features/documents/TMMasterInfoFields.js +4 -5
- package/lib/components/features/documents/TMMergeToPdfForm.js +56 -54
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.js +3 -6
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +1 -1
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.js +4 -4
- package/lib/components/features/documents/TMRelationViewer.d.ts +16 -9
- package/lib/components/features/documents/TMRelationViewer.js +240 -168
- package/lib/components/features/documents/copyAndMergeDcmtsShared.d.ts +1 -1
- package/lib/components/features/documents/relationTreeState.d.ts +32 -0
- package/lib/components/features/documents/relationTreeState.js +89 -0
- package/lib/components/features/search/TMMetadataOutputForm.js +1 -1
- package/lib/components/features/search/TMMetadataSorterForm.js +1 -1
- package/lib/components/features/search/TMSavedQuerySelector.js +2 -2
- package/lib/components/features/search/TMSearch.d.ts +1 -1
- package/lib/components/features/search/TMSearch.js +71 -12
- package/lib/components/features/search/TMSearchQueryEditor.js +2 -2
- package/lib/components/features/search/TMSearchQueryPanel.js +1 -5
- package/lib/components/features/search/TMSearchResult.d.ts +5 -0
- package/lib/components/features/search/TMSearchResult.js +34 -18
- package/lib/components/features/search/TMSignatureInfoContent.js +1 -1
- package/lib/components/features/search/TMTreeSelector.js +38 -36
- package/lib/components/features/search/TMViewHistoryDcmt.js +14 -25
- package/lib/components/features/tasks/TMTaskForm.js +1 -1
- package/lib/components/features/tasks/TMTaskFormUtils.js +3 -3
- package/lib/components/features/tasks/TMTasksAgenda.js +1 -1
- package/lib/components/features/tasks/TMTasksCalendar.js +1 -1
- package/lib/components/features/tasks/TMTasksHeader.js +1 -1
- package/lib/components/features/tasks/TMTasksUtilsView.js +1 -1
- package/lib/components/features/tasks/TMTasksView.js +97 -102
- package/lib/components/features/wg/TMWGsCopyMoveForm.js +92 -92
- package/lib/components/features/workflow/TMWorkflowPopup.js +2 -2
- package/lib/components/features/workflow/diagram/ConnectionComponent.js +3 -3
- package/lib/components/features/workflow/diagram/DiagramItemComponent.js +3 -3
- package/lib/components/features/workflow/diagram/DiagramItemForm.js +1 -1
- package/lib/components/features/workflow/diagram/DiagramItemSvgContent.js +1 -1
- package/lib/components/features/workflow/diagram/RecipientList.js +1 -1
- package/lib/components/features/workflow/diagram/WFDiagram.js +4 -4
- package/lib/components/forms/Login/Menu.js +1 -1
- package/lib/components/forms/Login/OTPReader.js +1 -1
- package/lib/components/forms/Login/PasswordStrengthChecker.js +1 -1
- package/lib/components/forms/Login/RapidAccessLogin.js +2 -2
- package/lib/components/forms/Login/RecoverPasswordFlow.js +2 -2
- package/lib/components/forms/Login/SelectBox.js +1 -1
- package/lib/components/forms/Login/StepIndicator.js +1 -1
- package/lib/components/forms/Login/TMLoginForm.js +7 -7
- package/lib/components/forms/Login/TextBox.js +1 -1
- package/lib/components/forms/TMApplyForm.js +3 -3
- package/lib/components/forms/TMChooserForm.js +1 -1
- package/lib/components/forms/TMResultDialog.js +1 -1
- package/lib/components/forms/TMSaveForm.js +3 -3
- package/lib/components/grids/TMBlogAttachments.js +1 -1
- package/lib/components/grids/TMBlogsPost.js +92 -96
- package/lib/components/grids/TMBlogsPostUtils.js +1 -1
- package/lib/components/grids/TMRecentsManager.js +4 -4
- package/lib/components/grids/TMValidationItemsList.js +1 -1
- package/lib/components/index.d.ts +6 -0
- package/lib/components/index.js +5 -0
- package/lib/components/layout/panelManager/TMPanelManagerContainer.js +3 -3
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +1 -1
- package/lib/components/layout/panelManager/TMPanelWrapper.js +1 -1
- package/lib/components/pages/TMPage.js +30 -32
- package/lib/components/query/TMQueryCountButton.js +1 -1
- package/lib/components/query/TMQueryEditor.d.ts +3 -0
- package/lib/components/query/TMQueryEditor.js +9 -8
- package/lib/components/sidebar/TMCommandsPanel.js +1 -1
- package/lib/components/sidebar/TMHeader.d.ts +1 -0
- package/lib/components/sidebar/TMHeader.js +9 -9
- package/lib/components/sidebar/TMSidebar.js +1 -1
- package/lib/components/sidebar/TMSidebarItem.js +1 -1
- package/lib/components/viewers/TMMidViewer.js +2 -2
- package/lib/components/viewers/TMTidViewer.js +3 -3
- package/lib/components/wizard/TMStepIndicator.js +3 -3
- package/lib/helper/Enum_Localizator.d.ts +4 -4
- package/lib/helper/Enum_Localizator.js +1 -0
- package/lib/helper/Globalization.d.ts +1 -1
- package/lib/helper/SDKUI_Localizator.d.ts +736 -712
- package/lib/helper/SDKUI_Localizator.js +240 -0
- package/lib/helper/TMAppUpdatedModal.js +2 -2
- package/lib/helper/TMIcons.js +1 -3
- package/lib/helper/TMPdfViewer.js +1 -1
- package/lib/helper/TMToppyMessage.js +1 -1
- package/lib/helper/TMUtils.js +1 -1
- package/lib/helper/ZipManager.d.ts +1 -1
- package/lib/helper/ZipManager.js +2 -1
- package/lib/helper/checkinCheckoutManager.d.ts +1 -1
- package/lib/helper/checkinCheckoutManager.js +1 -1
- package/lib/helper/dcmtsHelper.d.ts +4 -2
- package/lib/helper/dcmtsHelper.js +3 -1
- package/lib/helper/helpers.d.ts +1 -1
- package/lib/helper/helpers.js +2 -2
- package/lib/hooks/tmDistinctValuesGridHelper.d.ts +1 -1
- package/lib/hooks/useCaseFlowApprove.d.ts +3 -3
- package/lib/hooks/useCheckInOutOperations.d.ts +0 -6
- package/lib/hooks/useCheckInOutOperations.js +14 -34
- package/lib/hooks/useDcmtOperations.d.ts +3 -12
- package/lib/hooks/useDcmtOperations.js +187 -179
- package/lib/hooks/useDocumentOperations.d.ts +1 -0
- package/lib/hooks/useDocumentOperations.js +16 -27
- package/lib/hooks/useInputDialog.js +1 -1
- package/lib/hooks/useMultiMasterDetailDcmts.d.ts +1 -16
- package/lib/hooks/useMultiMasterDetailDcmts.js +65 -67
- package/lib/hooks/usePreventFileDrop.js +9 -0
- package/lib/hooks/useQueryParametersDialog.js +1 -1
- package/lib/hooks/useWorkflowApprove.js +33 -17
- package/lib/services/caseflow/CaseFlowService.d.ts +47 -6
- package/lib/services/caseflow/CaseFlowService.js +82 -14
- package/lib/services/platform_services.d.ts +4 -4
- package/package.json +9 -10
|
@@ -2,9 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
3
|
import { ResultTypes, SDK_Globals, WorkingGroupCacheService, WorkingGroupEngine } from "@topconsultnpm/sdk-ts";
|
|
4
4
|
import { TreeView } from 'devextreme-react';
|
|
5
|
+
import { LoadIndicator } from 'devextreme-react/load-indicator';
|
|
5
6
|
import styled from 'styled-components';
|
|
6
7
|
import { buildFolderHierarchy, findFileItems, setFolderTreeViewItems } from '../../base/TMFileManagerUtils';
|
|
7
|
-
import TMSpinner from '../../base/TMSpinner';
|
|
8
8
|
import { TMExceptionBoxManager } from '../../base/TMPopUp';
|
|
9
9
|
import { useDeviceType } from '../../base/TMDeviceProvider';
|
|
10
10
|
import { SDKUI_Localizator, getExceptionMessage, Globalization, IconUserGroup, IconFolder, calcResponsiveSizes } from '../../../helper';
|
|
@@ -13,7 +13,8 @@ import { FormModes } from '../../../ts';
|
|
|
13
13
|
import { TMColors } from '../../../utils/theme';
|
|
14
14
|
import TMDataGrid from '../../base/TMDataGrid';
|
|
15
15
|
import TMTooltip from '../../base/TMTooltip';
|
|
16
|
-
import
|
|
16
|
+
import TMLayoutContainer from '../../base/TMLayout';
|
|
17
|
+
import TMWaitPanelManager from '../../base/waitPanel/TMWaitPanelManager';
|
|
17
18
|
import { TMResultManager } from '../../forms/TMResultDialog';
|
|
18
19
|
import TMSaveForm from '../../forms/TMSaveForm';
|
|
19
20
|
// Returns a formatted name and optional description based on document type and item DID.
|
|
@@ -34,7 +35,6 @@ export const getDocumentDisplayInfo = (descriptor, item) => {
|
|
|
34
35
|
: '';
|
|
35
36
|
return { name, description };
|
|
36
37
|
};
|
|
37
|
-
let abortController = new AbortController();
|
|
38
38
|
const TMWGsCopyMoveForm = (props) => {
|
|
39
39
|
const { mode, workingGroups, context, folder, onClose, focusedWorkingGroupId = undefined, fetchTreeFileSystemForWorkingGroup, fetchArchivedDocumentsForWorkingGroup } = props;
|
|
40
40
|
// Destructure context to get the current working group descriptor or document type descriptor based on the engine type
|
|
@@ -58,18 +58,10 @@ const TMWGsCopyMoveForm = (props) => {
|
|
|
58
58
|
const [treeViewData, setTreeViewData] = useState([]);
|
|
59
59
|
// State to manage the selected file
|
|
60
60
|
const [selectedFolder, setSelectedFolder] = useState(undefined);
|
|
61
|
-
//
|
|
62
|
-
const [
|
|
63
|
-
//
|
|
64
|
-
const [
|
|
65
|
-
// State variable to control the visibility of the primary section of the wait panel
|
|
66
|
-
const [showPrimary, setShowPrimary] = useState(false);
|
|
67
|
-
// State variable to store the primary text of the wait panel
|
|
68
|
-
const [waitPanelTextPrimary, setWaitPanelTextPrimary] = useState('');
|
|
69
|
-
// State variable to track the current value of the primary progress indicator in the wait panel
|
|
70
|
-
const [waitPanelValuePrimary, setWaitPanelValuePrimary] = useState(0);
|
|
71
|
-
// State variable to define the maximum value for the primary progress indicator in the wait panel
|
|
72
|
-
const [waitPanelMaxValuePrimary, setWaitPanelMaxValuePrimary] = useState(0);
|
|
61
|
+
// True until the list of working groups is ready
|
|
62
|
+
const [isLoadingWgs, setIsLoadingWgs] = useState(true);
|
|
63
|
+
// Id of the working group whose folder tree has been loaded
|
|
64
|
+
const [loadedTreeWgId, setLoadedTreeWgId] = useState(undefined);
|
|
73
65
|
// State to manage the current working group descriptor, initially set to the one from context
|
|
74
66
|
const steps = useMemo(() => {
|
|
75
67
|
return mode === 'copyToWgArchivedDoc'
|
|
@@ -104,7 +96,6 @@ const TMWGsCopyMoveForm = (props) => {
|
|
|
104
96
|
let groupsToUse = workingGroups;
|
|
105
97
|
if (!groupsToUse) {
|
|
106
98
|
try {
|
|
107
|
-
TMSpinner.show({ description: SDKUI_Localizator.LoadingWorkGroups });
|
|
108
99
|
// Clear cache and fetch working groups
|
|
109
100
|
WorkingGroupCacheService.RemoveAll();
|
|
110
101
|
const fetchedGroups = await WorkingGroupCacheService.GetAllAsync();
|
|
@@ -113,9 +104,6 @@ const TMWGsCopyMoveForm = (props) => {
|
|
|
113
104
|
catch (error) {
|
|
114
105
|
TMExceptionBoxManager.show({ exception: error });
|
|
115
106
|
}
|
|
116
|
-
finally {
|
|
117
|
-
TMSpinner.hide();
|
|
118
|
-
}
|
|
119
107
|
}
|
|
120
108
|
if (groupsToUse) {
|
|
121
109
|
const sortedGroups = [...groupsToUse].sort((a, b) => {
|
|
@@ -134,6 +122,7 @@ const TMWGsCopyMoveForm = (props) => {
|
|
|
134
122
|
setCurrentStep(1);
|
|
135
123
|
}
|
|
136
124
|
}
|
|
125
|
+
setIsLoadingWgs(false);
|
|
137
126
|
};
|
|
138
127
|
loadWorkingGroups();
|
|
139
128
|
}, [workingGroups, currentWorkingGroupDescriptor]);
|
|
@@ -154,11 +143,16 @@ const TMWGsCopyMoveForm = (props) => {
|
|
|
154
143
|
catch (error) {
|
|
155
144
|
TMExceptionBoxManager.show({ exception: error });
|
|
156
145
|
}
|
|
146
|
+
finally {
|
|
147
|
+
setLoadedTreeWgId(selectedWg.id);
|
|
148
|
+
}
|
|
157
149
|
};
|
|
158
150
|
if (selectedWg && wgs.length) {
|
|
159
151
|
fetchWgTree();
|
|
160
152
|
}
|
|
161
153
|
}, [selectedWg, wgs]);
|
|
154
|
+
// Loading while the working groups are fetched, or while the folder tree of the selected working group is not loaded yet
|
|
155
|
+
const isLoading = isLoadingWgs || (currentStep === 1 && mode !== 'copyToWgArchivedDoc' && !!selectedWg?.id && loadedTreeWgId !== selectedWg.id);
|
|
162
156
|
// When the current step resets to the first step (index 0), clear the selected folder by setting it to undefined
|
|
163
157
|
useEffect(() => {
|
|
164
158
|
if (currentStep === 0) {
|
|
@@ -235,86 +229,91 @@ const TMWGsCopyMoveForm = (props) => {
|
|
|
235
229
|
if (missingWgOrFolder) {
|
|
236
230
|
return Promise.resolve();
|
|
237
231
|
}
|
|
238
|
-
setWaitPanelTitle(mode !== 'move' ? SDKUI_Localizator.Copy : SDKUI_Localizator.Move);
|
|
239
|
-
setShowWaitPanel(true);
|
|
240
|
-
setShowPrimary(true);
|
|
241
|
-
abortController = new AbortController();
|
|
242
232
|
let result = [];
|
|
243
233
|
const totalDrafts = context.selectedDrafts.length;
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
234
|
+
const waitPanel = TMWaitPanelManager.show({
|
|
235
|
+
title: mode !== 'move' ? SDKUI_Localizator.Copy : SDKUI_Localizator.Move,
|
|
236
|
+
max: totalDrafts,
|
|
237
|
+
cancelable: true,
|
|
238
|
+
});
|
|
239
|
+
try {
|
|
240
|
+
const workingGroupEngine = new WorkingGroupEngine(SDK_Globals.tmSession);
|
|
241
|
+
const selectedFolderId = selectedFolder?.id === -1 ? 0 : selectedFolder?.id ?? 0;
|
|
242
|
+
const isWgEngine = context.engine === 'WorkingGroupEngine';
|
|
243
|
+
const isSearchEngine = context.engine === 'SearchEngine';
|
|
244
|
+
for (let i = 0; i < totalDrafts; i++) {
|
|
245
|
+
if (waitPanel.aborted) {
|
|
246
|
+
result.push({
|
|
247
|
+
rowIndex: i + 1,
|
|
248
|
+
id1: i + 1,
|
|
249
|
+
id2: i + 1,
|
|
250
|
+
resultType: ResultTypes.WARNING,
|
|
251
|
+
description: SDKUI_Localizator.OperationFilesInterrupted.replaceParams(i + 1)
|
|
252
|
+
});
|
|
253
|
+
waitPanel.warning();
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
256
|
+
waitPanel.setSubtitle(`${i + 1}/${totalDrafts}`);
|
|
257
|
+
const item = context.selectedDrafts[i];
|
|
258
|
+
try {
|
|
259
|
+
if (isWgEngine && targetWorkingGroup && targetWorkingGroup.id && currentWorkingGroupDescriptor && currentWorkingGroupDescriptor.id && selectedFolder && item.did) {
|
|
260
|
+
const draft = item;
|
|
261
|
+
const did = draft.did ?? 0;
|
|
262
|
+
if (mode === 'copy') {
|
|
263
|
+
await workingGroupEngine.DraftsCopyAsync(currentWorkingGroupDescriptor.id, did, targetWorkingGroup.id, selectedFolderId);
|
|
264
|
+
if (fetchTreeFileSystemForWorkingGroup) {
|
|
265
|
+
await fetchTreeFileSystemForWorkingGroup(targetWorkingGroup.id);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
else if (mode === 'move') {
|
|
269
|
+
await workingGroupEngine.DraftsMoveAsync(currentWorkingGroupDescriptor.id, did, targetWorkingGroup.id, selectedFolderId);
|
|
270
|
+
if (fetchTreeFileSystemForWorkingGroup) {
|
|
271
|
+
await fetchTreeFileSystemForWorkingGroup(targetWorkingGroup.id);
|
|
272
|
+
await fetchTreeFileSystemForWorkingGroup(currentWorkingGroupDescriptor.id);
|
|
273
|
+
}
|
|
271
274
|
}
|
|
272
275
|
}
|
|
273
|
-
else if (
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
await
|
|
277
|
-
|
|
276
|
+
else if (isSearchEngine) {
|
|
277
|
+
if (mode === 'copyToWgDraft' && targetWorkingGroup && targetWorkingGroup.id && selectedFolder && currentDcmtTypeDescriptor) {
|
|
278
|
+
const documentDisplayInfo = getDocumentDisplayInfo(currentDcmtTypeDescriptor, item);
|
|
279
|
+
await workingGroupEngine.DraftsAddByIDAsync(targetWorkingGroup.id, selectedFolderId, documentDisplayInfo.name, documentDisplayInfo.description, item.TID, item.DID);
|
|
280
|
+
if (fetchTreeFileSystemForWorkingGroup)
|
|
281
|
+
await fetchTreeFileSystemForWorkingGroup(targetWorkingGroup.id);
|
|
282
|
+
}
|
|
283
|
+
else if (mode === 'copyToWgArchivedDoc' && targetWorkingGroup && targetWorkingGroup.id) {
|
|
284
|
+
await workingGroupEngine.DcmtsAddOrRemoveAsync(targetWorkingGroup.id, item.TID, item.DID, false);
|
|
285
|
+
if (fetchArchivedDocumentsForWorkingGroup)
|
|
286
|
+
await fetchArchivedDocumentsForWorkingGroup(targetWorkingGroup.id);
|
|
278
287
|
}
|
|
279
288
|
}
|
|
289
|
+
result.push({
|
|
290
|
+
rowIndex: i + 1,
|
|
291
|
+
id1: item.DID ?? i + 1,
|
|
292
|
+
id2: item.TID ?? i + 1,
|
|
293
|
+
description: SDKUI_Localizator.UpdateCompletedSuccessfully,
|
|
294
|
+
resultType: ResultTypes.SUCCESS
|
|
295
|
+
});
|
|
296
|
+
waitPanel.ok();
|
|
280
297
|
}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
if (fetchArchivedDocumentsForWorkingGroup)
|
|
291
|
-
await fetchArchivedDocumentsForWorkingGroup(targetWorkingGroup.id);
|
|
292
|
-
}
|
|
298
|
+
catch (err) {
|
|
299
|
+
result.push({
|
|
300
|
+
rowIndex: i + 1,
|
|
301
|
+
id1: item.DID ?? i + 1,
|
|
302
|
+
id2: item.TID ?? i + 1,
|
|
303
|
+
resultType: ResultTypes.ERROR,
|
|
304
|
+
description: getExceptionMessage(err)
|
|
305
|
+
});
|
|
306
|
+
waitPanel.error();
|
|
293
307
|
}
|
|
294
|
-
|
|
295
|
-
rowIndex: i + 1,
|
|
296
|
-
id1: item.DID ?? i + 1,
|
|
297
|
-
id2: item.TID ?? i + 1,
|
|
298
|
-
description: SDKUI_Localizator.UpdateCompletedSuccessfully,
|
|
299
|
-
resultType: ResultTypes.SUCCESS
|
|
300
|
-
});
|
|
301
|
-
}
|
|
302
|
-
catch (err) {
|
|
303
|
-
result.push({
|
|
304
|
-
rowIndex: i + 1,
|
|
305
|
-
id1: item.DID ?? i + 1,
|
|
306
|
-
id2: item.TID ?? i + 1,
|
|
307
|
-
resultType: ResultTypes.ERROR,
|
|
308
|
-
description: getExceptionMessage(err)
|
|
309
|
-
});
|
|
308
|
+
await waitPanel.step();
|
|
310
309
|
}
|
|
311
310
|
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
setShowWaitPanel(false);
|
|
316
|
-
TMResultManager.show(result, mode !== 'move' ? SDKUI_Localizator.Copy : SDKUI_Localizator.Move, "ID", undefined);
|
|
311
|
+
finally {
|
|
312
|
+
waitPanel.close();
|
|
313
|
+
}
|
|
317
314
|
onClose();
|
|
315
|
+
// Shown after the modal has closed: the alert animation is time-based, so it must not start while the page is still busy re-rendering
|
|
316
|
+
setTimeout(() => TMResultManager.show(result, mode !== 'move' ? SDKUI_Localizator.Copy : SDKUI_Localizator.Move, "ID", undefined), 0);
|
|
318
317
|
}
|
|
319
318
|
catch (e) {
|
|
320
319
|
TMExceptionBoxManager.show({ exception: e });
|
|
@@ -365,7 +364,7 @@ const TMWGsCopyMoveForm = (props) => {
|
|
|
365
364
|
const tooltipContent = _jsxs("div", { style: { textAlign: "center" }, children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "ID" }), ": ", itemData.id] });
|
|
366
365
|
return (_jsxs("div", { style: { whiteSpace: "nowrap", display: "flex", alignItems: "center" }, className: isSelected ? 'treeview-selected-item-manager' : '', children: [_jsx(TMTooltip, { content: tooltipContent, children: _jsx(IconFolder, { fontSize: 24, style: { marginRight: 5, color: TMColors.iconLight } }) }), itemData.text] }));
|
|
367
366
|
};
|
|
368
|
-
return _jsx(TMSaveForm, { title: getTitle(), showTitleFormMode: false, showErrorCount: false, showUndoButton: false, hasNavigation: false, skipIsModifiedCheck: true, isModal: true, width: calcResponsiveSizes(deviceType, '800px', '800px', '95%'), height: '550px', validationItems: validationItems, exception: exception, isModified: isLocalSelectionModified(), showToolbar: false, showSaveButton: false, onClose: onClose, children: _jsxs(
|
|
367
|
+
return _jsx(TMSaveForm, { title: getTitle(), showTitleFormMode: false, showErrorCount: false, showUndoButton: false, hasNavigation: false, skipIsModifiedCheck: true, isModal: true, width: calcResponsiveSizes(deviceType, '800px', '800px', '95%'), height: '550px', validationItems: validationItems, exception: exception, isModified: isLocalSelectionModified(), showToolbar: false, showSaveButton: false, onClose: onClose, children: _jsxs(TMLayoutContainer, { direction: 'vertical', children: [_jsx("div", { style: { width: "100%", height: '48px' }, children: _jsx(TMStepNavigator, { steps: steps, currentStep: adjustedCurrentStep, onStepChange: (stepIndex) => { setCurrentStep(stepIndex); } }) }), _jsxs("div", { style: {
|
|
369
368
|
marginTop: '10px',
|
|
370
369
|
padding: '10px',
|
|
371
370
|
borderRadius: '8px',
|
|
@@ -374,8 +373,9 @@ const TMWGsCopyMoveForm = (props) => {
|
|
|
374
373
|
width: '100%',
|
|
375
374
|
height: 'calc(100% - 113px)',
|
|
376
375
|
overflow: 'auto',
|
|
377
|
-
}, children: [
|
|
378
|
-
|
|
376
|
+
}, children: [isLoading &&
|
|
377
|
+
_jsxs("div", { style: { width: '100%', height: '100%', display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center', gap: '10px' }, children: [_jsx(LoadIndicator, { height: 40, width: 40 }), _jsx("div", { children: currentStep === 0 ? SDKUI_Localizator.LoadingWorkGroups : SDKUI_Localizator.Loading })] }), (!isLoading && currentStep === 0 && wgs.length > 0) &&
|
|
378
|
+
_jsx(TMDataGrid, { dataColumns: dataColumns, dataSource: wgs, selection: selection, focusedRowKey: focusedRowKey, onFocusedRowChanged: onFocusedRowChanged, selectedRowKeys: [...selectedRowKeys], onSelectionChanged: onSelectionChanged, onRowClick: onRowClick, onRowDblClick: onRowDblClick, autoNavigateToFocusedRow: true, showColumnHeaders: false }), (!isLoading && currentStep === 1) &&
|
|
379
379
|
_jsx(TreeView, { dataSource: treeViewData, displayExpr: "text", itemRender: renderTreeViewItem, onItemClick: handleTreeViewItemClick })] }), _jsxs("div", { style: {
|
|
380
380
|
width: "100%",
|
|
381
381
|
height: '45px',
|
|
@@ -434,6 +434,6 @@ export const TMStepNavigator = (props) => {
|
|
|
434
434
|
return (_jsx("div", { style: { display: 'flex', justifyContent: 'center' }, children: _jsx("div", { style: { display: 'flex', alignItems: 'center', backgroundColor: '#f9f9f9', padding: '6px 16px', borderRadius: '999px', boxShadow: '0 1px 4px rgba(0, 0, 0, 0.05)' }, children: steps.map((step, index) => {
|
|
435
435
|
const isPastStep = index < currentStep;
|
|
436
436
|
const isCurrent = currentStep === index;
|
|
437
|
-
return _jsxs("div", { style: { display: 'flex', alignItems: 'center' }, children: [_jsx(StepSpan, {
|
|
437
|
+
return _jsxs("div", { style: { display: 'flex', alignItems: 'center' }, children: [_jsx(StepSpan, { $isCurrent: isCurrent, $isPast: isPastStep, onClick: isPastStep ? () => onStepChange(index) : undefined, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'center' }, children: [_jsx("span", { children: step.title }), step.subtitle && _jsxs("span", { style: { fontSize: '0.90em', fontStyle: "italic" }, children: ["\"", step.subtitle, "\""] })] }) }), index < steps.length - 1 && (_jsx("span", { style: { margin: '0 8px', color: '#ddd' }, children: _jsx("i", { className: 'dx-icon-greater' }) }))] }, step.id);
|
|
438
438
|
}) }) }));
|
|
439
439
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useMemo, useState } from "react";
|
|
3
3
|
import { ResultTypes, SDK_Globals, UserListCacheService, ValidationItem, WFEvents, WorkflowCacheService } from '@topconsultnpm/sdk-ts';
|
|
4
4
|
import styled from "styled-components";
|
|
@@ -66,7 +66,7 @@ export const WorkFlowOperationButtons = (props) => {
|
|
|
66
66
|
}
|
|
67
67
|
return false;
|
|
68
68
|
}, [dtd, signFlow]);
|
|
69
|
-
return (_jsx(StyledWorkFlowOperationButtonsContainer, {
|
|
69
|
+
return (_jsx(StyledWorkFlowOperationButtonsContainer, { $isMobile: isMobile, children: isSignWorkflow ? (_jsxs(_Fragment, { children: [_jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconSignaturePencil, {}), caption: SDKUI_Localizator.SignatureAndApprove, width: "160px", disabled: signApproveDisable, onClick: () => !signApproveDisable && onSignApprove?.(), onMouseDown: e => e.stopPropagation(), advancedColor: "#1a9a49", color: "success" }), _jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconCloseOutline, {}), caption: SDKUI_Localizator.Reject, disabled: rejectDisable, onClick: () => !rejectDisable && onReject?.(), onMouseDown: e => e.stopPropagation(), advancedColor: TMColors.error, color: "error" }), onMoreInfo && (_jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconInfo, { fontSize: 16 }), caption: SDKUI_Localizator.MoreInformation, width: "180px", disabled: infoDisable, onClick: () => !infoDisable && onMoreInfo?.(), onMouseDown: e => e.stopPropagation(), advancedColor: TMColors.info, color: "info" }))] })) : (_jsxs(_Fragment, { children: [_jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconApply, {}), caption: SDKUI_Localizator.Approve, disabled: approveDisable, onClick: () => !approveDisable && onApprove?.(), advancedColor: "#1a9a49", color: "success" }), _jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconCloseOutline, {}), caption: SDKUI_Localizator.Reject, disabled: rejectDisable, onClick: () => !rejectDisable && onReject?.(), advancedColor: TMColors.error, color: "error" }), onReAssign && (_jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconUser, { fontSize: 16 }), caption: SDKUI_Localizator.Reassign, disabled: reassignDisable, onClick: () => !reassignDisable && onReAssign?.(), advancedColor: TMColors.tertiary, color: "tertiary" })), onMoreInfo && (_jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconInfo, { fontSize: 16 }), caption: SDKUI_Localizator.MoreInformation, width: "180px", disabled: infoDisable, onClick: () => !infoDisable && onMoreInfo?.(), advancedColor: TMColors.info, color: "info" }))] })) }));
|
|
70
70
|
};
|
|
71
71
|
export const WorkFlowApproveRejectPopUp = ({ TID = 0, DID = 0, deviceType = DeviceType.DESKTOP, isReject, selectedItems = [], onClose, onCompleted }) => {
|
|
72
72
|
const { refreshWorkflowApprove } = useWorkflowApprove();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React, { useCallback } from 'react';
|
|
3
3
|
import { ArrowSymbol } from './interfaces';
|
|
4
4
|
import styled, { css } from 'styled-components';
|
|
@@ -56,7 +56,7 @@ const ConnectionComponent = ({ connection, isSelected, sourcePoint, sinkPoint, i
|
|
|
56
56
|
default:
|
|
57
57
|
return null;
|
|
58
58
|
}
|
|
59
|
-
return _jsx(StyledArrow, { d: pathData,
|
|
59
|
+
return _jsx(StyledArrow, { d: pathData, $color: connectionColor });
|
|
60
60
|
}, [connectionColor]);
|
|
61
61
|
// Calcola la trasformazione per posizionare e ruotare la freccia
|
|
62
62
|
const calculateArrowTransform = useCallback((isSink) => {
|
|
@@ -86,7 +86,7 @@ const ConnectionComponent = ({ connection, isSelected, sourcePoint, sinkPoint, i
|
|
|
86
86
|
event.stopPropagation();
|
|
87
87
|
onContextMenu?.(connection.ID, event);
|
|
88
88
|
}, [onContextMenu, connection.ID]);
|
|
89
|
-
return (_jsxs("g", { children: [_jsx(StyledPathHitArea, { d: connection.PathGeometry, onClick: (e) => onClick(connection.ID, e), onDoubleClick: handleDoubleClick, onContextMenu: handleContextMenu }), _jsx(StyledPath, { d: connection.PathGeometry,
|
|
89
|
+
return (_jsxs("g", { children: [_jsx(StyledPathHitArea, { d: connection.PathGeometry, onClick: (e) => onClick(connection.ID, e), onDoubleClick: handleDoubleClick, onContextMenu: handleContextMenu }), _jsx(StyledPath, { d: connection.PathGeometry, $isSelected: isSelected, $isTemporary: isTemporary, $outputStatus: connection.OutputStatus, onClick: (e) => onClick(connection.ID, e), onDoubleClick: handleDoubleClick, onContextMenu: handleContextMenu }), connection.SinkArrowSymbol !== ArrowSymbol.None && (_jsxs("g", { transform: calculateArrowTransform(true), children: [renderArrow(connection.SinkArrowSymbol, 0), " "] })), connection.SourceArrowSymbol !== ArrowSymbol.None && (_jsx("g", { transform: calculateArrowTransform(false) + ' rotate(180)', children: renderArrow(connection.SourceArrowSymbol, 0) })), isSelected && (_jsxs(_Fragment, { children: [_jsx(StyledSquareConnector, { $color: connectionColor, x: sourcePoint.x - 5, y: sourcePoint.y - 5, width: 10, height: 10 }), _jsx(StyledSquareConnector, { $color: connectionColor, x: sinkPoint.x - 5, y: sinkPoint.y - 5, width: 10, height: 10, cursor: 'move', onMouseDown: (e) => {
|
|
90
90
|
e.stopPropagation(); // Impedisce la propagazione dell'evento a elementi sottostanti
|
|
91
91
|
onConnectionEndpointMouseDown?.(connection.ID, 'sink', e);
|
|
92
92
|
} })] }))] }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React, { useState, useCallback, useRef, useEffect, useMemo } from 'react';
|
|
3
3
|
import { DiagramItemTypes } from './interfaces';
|
|
4
4
|
import styled, { keyframes, css } from 'styled-components';
|
|
@@ -230,7 +230,7 @@ const DiagramItemComponent = ({ wf, item, isSelected, isCurrent, readOnly, allow
|
|
|
230
230
|
onDoubleClick?.(item.ID);
|
|
231
231
|
}, [onDoubleClick, item.ID]);
|
|
232
232
|
const renderContent = () => {
|
|
233
|
-
const renderConnectorWithHitArea = (cx, cy, connectorName) => (_jsxs(_Fragment, { children: [_jsx(Connector, { cx: cx, cy: cy, r: 4,
|
|
233
|
+
const renderConnectorWithHitArea = (cx, cy, connectorName) => (_jsxs(_Fragment, { children: [_jsx(Connector, { cx: cx, cy: cy, r: 4, $isVisible: isHovered && !readOnly, $isReadOnly: readOnly }), _jsx(ConnectorHitArea, { cx: cx, cy: cy, r: 15, $isVisible: isHovered && !readOnly, $isReadOnly: readOnly, "data-is-connector": "true", onMouseDown: (e) => {
|
|
234
234
|
if (readOnly)
|
|
235
235
|
return;
|
|
236
236
|
e.stopPropagation();
|
|
@@ -266,6 +266,6 @@ const DiagramItemComponent = ({ wf, item, isSelected, isCurrent, readOnly, allow
|
|
|
266
266
|
}
|
|
267
267
|
return (_jsxs(_Fragment, { children: [isTruncated && _jsx("title", { children: item.ItemName }), backgroundColor && (_jsx("rect", { x: "-5", y: "-5", width: calculatedWidth + 10, height: calculatedHeight + 10, rx: "12", ry: "12", fill: backgroundColor, opacity: "0.4", style: { filter: 'blur(3px)' } })), _jsx("rect", { x: "0", y: "0", width: calculatedWidth, height: calculatedHeight, className: "item-main-shape", fill: "transparent" }), _jsx("g", { transform: `translate(${svgX}, ${svgY})`, children: _jsx(DiagramItemSvgContent, { itemType: item.Type, width: iconRenderWidth, height: iconRenderHeight, statusData: statusData }) }), textLines.length > 0 && (_jsx("text", { ref: textRef, x: calculatedWidth / 2, dominantBaseline: "central", className: "item-text", children: textLines.map((line, index) => (_jsx("tspan", { x: calculatedWidth / 2, dy: index === 0 ? PADDING_TOP + SVG_ICON_SIZE + SPACING_SVG_TEXT : FONT_SIZE + 1, children: line }, index))) })), connectors] }));
|
|
268
268
|
};
|
|
269
|
-
return (_jsx(StyledDiagramItem, { ref: diagramItemRef, transform: `translate(${currentPosition.x}, ${currentPosition.y})`,
|
|
269
|
+
return (_jsx(StyledDiagramItem, { ref: diagramItemRef, transform: `translate(${currentPosition.x}, ${currentPosition.y})`, $isSelected: isSelected, $itemType: item.Type, $isDragging: isDragging, $isHovered: isHovered, $isReadOnly: readOnly, $allowItemClick: allowItemClick, onMouseDown: handleMouseDown, onClick: handleItemClick, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onDoubleClick: handleDoubleClick, children: _jsx(AnimatingGroup, { $isCurrent: isCurrent, children: renderContent() }) }));
|
|
270
270
|
};
|
|
271
271
|
export default React.memo(DiagramItemComponent);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useMemo, useState } from 'react'; // Importa useState
|
|
3
3
|
import TMModal from '../../../base/TMModal';
|
|
4
4
|
import { DiagramItemTypes } from './interfaces';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { DiagramItemTypes } from './interfaces'; // Assicurati che il percorso sia corretto
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { TMImageLibrary } from '../../../../helper';
|
|
@@ -199,7 +199,7 @@ const RecipientList = ({ recipients, title, tid, qd, maxRecipients, validationIt
|
|
|
199
199
|
document.removeEventListener('keydown', handleKeyPress);
|
|
200
200
|
};
|
|
201
201
|
}, [handleKeyPress]);
|
|
202
|
-
return (_jsxs(RecipientsColumn, { children: [_jsxs(HeaderContainer, { children: [_jsx("p", { style: { fontWeight: 600 }, children: title }), _jsx(TMButton, { btnStyle: 'icon', caption: SDKUI_Localizator.AddRecipient, icon: _jsx(IconAdd, {}), onClick: handleAddClick, disabled: isMaxReached }), uiState.isMenuOpen && !isMaxReached && renderFloatingMenu()] }), _jsx(TMVilViewer, { vil: validationItems }), _jsx("div", { style: { height: '150px', overflowY: 'auto', gap: '5px', display: 'flex', flexDirection: 'column' }, children: recipients.map((recipient, index) => (_jsxs(RecipientItem, {
|
|
202
|
+
return (_jsxs(RecipientsColumn, { children: [_jsxs(HeaderContainer, { children: [_jsx("p", { style: { fontWeight: 600 }, children: title }), _jsx(TMButton, { btnStyle: 'icon', caption: SDKUI_Localizator.AddRecipient, icon: _jsx(IconAdd, {}), onClick: handleAddClick, disabled: isMaxReached }), uiState.isMenuOpen && !isMaxReached && renderFloatingMenu()] }), _jsx(TMVilViewer, { vil: validationItems }), _jsx("div", { style: { height: '150px', overflowY: 'auto', gap: '5px', display: 'flex', flexDirection: 'column' }, children: recipients.map((recipient, index) => (_jsxs(RecipientItem, { $isSelected: uiState.selectedRecipientIndex === index, onClick: () => handleRecipientClick(index), tabIndex: 0, children: [_jsx("span", { style: { display: 'flex', alignItems: 'center', flexShrink: 0 }, children: _jsx(IconDelete, { color: '#c00', cursor: 'pointer', onClick: (e) => {
|
|
203
203
|
e.stopPropagation();
|
|
204
204
|
onRemove(recipient);
|
|
205
205
|
setUiState(prevState => ({ ...prevState, selectedRecipientIndex: null }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect, useCallback, useRef, useMemo, useLayoutEffect } from 'react';
|
|
3
3
|
import { DiagramItemTypes, ArrowSymbol } from './interfaces';
|
|
4
4
|
import { parseWfDiagramXml, serializeWfDiagramToXml } from './xmlParser';
|
|
@@ -1925,13 +1925,13 @@ const WFDiagram = ({ xmlDiagramString, currentSetID, allowEdit = true, onDiagram
|
|
|
1925
1925
|
{ icon: _jsx(IconZoomIn, {}), name: SDKUI_Localizator.ZoomIn, disabled: isAutoZoomEnabled, onClick: () => { handleZoomIn(); }, id: 'zoom-in', isPinned: true },
|
|
1926
1926
|
{ icon: _jsx(IconZoomOut, {}), name: SDKUI_Localizator.ZoomOut, disabled: isAutoZoomEnabled, onClick: () => { handleZoomOut(); }, id: 'zoom-out', isPinned: true },
|
|
1927
1927
|
{ icon: _jsx(IconZoomAuto, {}), name: 'AutoZoom', onClick: () => { handleToggleAutoZoom(); }, id: 'zoom-auto', isPinned: true, isToggle: isAutoZoomEnabled },
|
|
1928
|
-
{ icon: _jsx(_Fragment, {}), name: 'Zoom Level', onClick: () => { }, id: 'zoom-level', isPinned: true, staticItem: _jsx(ZoomLevelText, {
|
|
1928
|
+
{ icon: _jsx(_Fragment, {}), name: 'Zoom Level', onClick: () => { }, id: 'zoom-level', isPinned: true, staticItem: _jsx(ZoomLevelText, { $isFloating: isToolbarFloating, $isCollapsed: isToolbarCollapsed, children: formattedZoomLevel }) }
|
|
1929
1929
|
], isConstrained: true }) :
|
|
1930
|
-
_jsxs(ToolbarContainer, {
|
|
1930
|
+
_jsxs(ToolbarContainer, { $isCollapsed: isToolbarCollapsed, $isFloating: isToolbarFloating, $isToolboxVisible: isToolboxVisible, $isReadOnly: isReadOnly, children: [allowEdit && _jsx(ButtonGroup, { $isFloating: isToolbarFloating, children: _jsxs("button", { onClick: toggleReadOnlyMode, title: isReadOnly ? SDKUI_Localizator.Design : SDKUI_Localizator.ReadOnly, children: [isReadOnly ? _jsx(IconPencil, {}) : _jsx(IconLock, {}), !isToolbarCollapsed && _jsx("span", { children: isReadOnly ? SDKUI_Localizator.Design : SDKUI_Localizator.ReadOnly })] }) }), allowEdit && _jsxs(ButtonGroup, { $isFloating: isToolbarFloating, children: [!isReadOnly && _jsxs("button", { onClick: handleToggleToolboxVisibility, title: SDKUI_Localizator.ShowToolbox, children: [_jsx(IconFlowChart, {}), !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.ShowToolboxToggle })] }), _jsxs("button", { onClick: toggleFullScreenMode, title: SDKUI_Localizator.ShowFullScreen, children: [isFullScreen ? _jsx(IconWindowMinimize, {}) : _jsx(IconWindowMaximize, {}), !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.ShowFullScreen })] })] }), _jsxs(ButtonGroup, { $isFloating: isToolbarFloating, children: [_jsxs("button", { onClick: handleZoomIn, title: SDKUI_Localizator.ZoomIn, disabled: isAutoZoomEnabled, children: [_jsx(IconZoomIn, {}), !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.ZoomIn })] }), _jsxs("button", { onClick: handleZoomOut, title: SDKUI_Localizator.ZoomOut, disabled: isAutoZoomEnabled, children: [_jsx(IconZoomOut, {}), !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.ZoomOut })] }), _jsxs("button", { onClick: handleToggleAutoZoom, title: "AutoZoom", style: { backgroundColor: isAutoZoomEnabled ? '#66b3ff' : undefined }, children: [_jsx(IconZoomAuto, {}), !isToolbarCollapsed && _jsx("span", { children: "AutoZoom" })] }), _jsx(ZoomLevelText, { $isFloating: isToolbarFloating, $isCollapsed: isToolbarCollapsed, children: formattedZoomLevel })] }), !isReadOnly && _jsxs(ButtonGroup, { $isFloating: isToolbarFloating, children: [_jsxs("button", { onClick: handleUndo, disabled: historyIndex === 0, title: SDKUI_Localizator.Undo, children: [_jsx(IconUndo, {}), " ", !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.Undo })] }), _jsxs("button", { onClick: handleRedo, disabled: historyIndex === wfDiagramHistory.length - 1, title: SDKUI_Localizator.Redo, children: [_jsx(IconUndo, { style: { transform: 'scaleX(-1)' } }), " ", !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.Redo })] }), _jsxs("button", { onClick: handleRestore, title: SDKUI_Localizator.Restore, children: [_jsx(IconRestore, {}), " ", !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.Restore })] }), _jsxs("button", { onClick: handleNew, title: SDKUI_Localizator.DiagramNew, disabled: isReadOnly, children: [_jsx(IconNew, {}), " ", !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.DiagramNew })] }), _jsxs("button", { onClick: handleExportDiagram, disabled: isReadOnly || !wfDiagram, title: SDKUI_Localizator.Export, children: [_jsx(IconExport, {}), _jsx("span", { children: SDKUI_Localizator.Export })] }), _jsxs("button", { onClick: handleImportDiagramClick, disabled: isReadOnly, title: SDKUI_Localizator.Import, children: [_jsx(IconImport, {}), _jsx("span", { children: SDKUI_Localizator.Import })] })] }), !isReadOnly && _jsx(ButtonGroup, { $isFloating: isToolbarFloating, children: _jsxs("button", { onClick: handleAutoAdjust, title: SDKUI_Localizator.AutoAdjust, children: [_jsx(IconAdjust, {}), " ", !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.AutoAdjust })] }) }), !isReadOnly && _jsxs(ButtonGroup, { $isFloating: isToolbarFloating, children: [_jsxs("button", { onClick: handleCopy, disabled: selectedItems.size === 0, title: SDKUI_Localizator.Copy, children: [_jsx(IconCopy, {}), " ", !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.Copy })] }), _jsxs("button", { onClick: handleCut, disabled: selectedItems.size === 0, title: SDKUI_Localizator.Cut, children: [_jsx(IconCut, {}), " ", !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.Cut })] }), _jsxs("button", { onClick: handlePaste, disabled: copiedItems.length === 0 && copiedConnections.length === 0, title: SDKUI_Localizator.Paste, children: [_jsx(IconPaste, {}), " ", !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.Paste })] })] }), allowEdit && _jsxs("button", { onClick: handleToggleToolbarMode, title: isToolbarFloating ? SDKUI_Localizator.ToolbarDock : SDKUI_Localizator.ToolbarFloat, children: [isToolbarFloating ? _jsx(IconPin, {}) : _jsx(IconUnpin, {}), !isToolbarCollapsed && !isToolbarFloating && _jsx("span", { children: SDKUI_Localizator.ToggleMode })] }), !isToolbarFloating && _jsx(ToolbarToggle, { onClick: () => setIsToolbarCollapsed(!isToolbarCollapsed), title: isToolbarCollapsed ? SDKUI_Localizator.ToolbarExpand : SDKUI_Localizator.ToolbarCollapse, children: isToolbarCollapsed ? _jsx(IconChevronRight, {}) : _jsx(IconCloseOutline, {}) })] }), !isReadOnly && (_jsx(ToolboxContainer, { $isVisible: isToolboxVisible, children: isToolboxVisible && availableItemTypes.map(type => (_jsxs(ToolboxItem, { draggable: true, onDragStart: (e) => handleToolboxDragStart(e, type), onDragEnd: handleToolboxDragEnd, children: [_jsx(ToolboxIconWrapper, { children: _jsx(DiagramItemSvgContent, { itemType: type, width: 38, height: 38, isToolboxPreview: true }) }), _jsx("span", { children: LocalizeDiagramItemType(type) })] }, type))) })), _jsx(SvgScrollContainer, { ref: containerRef, children: isLoading ?
|
|
1931
1931
|
(_jsxs(StyledLoadingContainer, { children: [_jsx(StyledSpinner, {}), _jsx("span", { children: `${'Caricamento diagramma'}...` })] })) : wfDiagram ? (_jsx(StyledSvg, { ref: svgRef, tabIndex: 0, onKeyDownCapture: handleKeyDown, onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, onMouseDown: handleMouseDown, onDrop: handleDropOnCanvas, onDragOver: handleDragOver, width: svgWidth, height: svgHeight, style: {
|
|
1932
1932
|
opacity: (defaultAutoZoom && !isInitialZoomCalculated) ? 0 : 1,
|
|
1933
1933
|
transition: 'opacity 0.15s ease-in'
|
|
1934
|
-
}, children: _jsxs(ScalableGroup, {
|
|
1934
|
+
}, children: _jsxs(ScalableGroup, { $scale: zoomLevel, $translateX: translateX, $translateY: translateY, children: [wfDiagram?.DiagramItems.map(item => (_jsx(DiagramItemComponent, { wf: wfDiagram?.Info, readOnly: isReadOnly, allowItemClick: !allowEdit && workitems && workitems.length > 0 && !!onDiagramItemClick, item: item, isSelected: selectedItems.has(item.ID), isCurrent: item.ID === currentSetID, onClick: handleDiagramItemClick, onDrag: handleDrag, onDragEnd: handleDragEnd, onConnectorMouseDown: handleConnectorMouseDown, onConnectorMouseUp: handleConnectorMouseUp, onDimensionsChange: handleItemDimensionsChange, onDoubleClick: handleDoubleClickItem, backgroundColor: getWorkItemBackgroundColor(item.ID) }, item.ID))), calculatedConnections.map(connection => {
|
|
1935
1935
|
const sourceItem = wfDiagram?.DiagramItems.find(item => item.ID === connection.Source.ParentDiagramItem.ID);
|
|
1936
1936
|
const sinkItem = wfDiagram?.DiagramItems.find(item => item.ID === connection.Sink.ParentDiagramItem.ID);
|
|
1937
1937
|
if (!sourceItem || !sinkItem)
|
|
@@ -43,6 +43,6 @@ const Menu = ({ visible = false, children, x, y, onClose }) => {
|
|
|
43
43
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
44
44
|
};
|
|
45
45
|
}, [visible, onClose]);
|
|
46
|
-
return visible ? (_jsx(MenuContainer, { ref: menuRef,
|
|
46
|
+
return visible ? (_jsx(MenuContainer, { ref: menuRef, $x: x, $y: y, $visible: visible, children: children })) : null;
|
|
47
47
|
};
|
|
48
48
|
export default Menu;
|
|
@@ -79,7 +79,7 @@ const OTPReader = ({ digits, onChange, onFullChange, onResendOTP, resendCooldown
|
|
|
79
79
|
}, 1000);
|
|
80
80
|
};
|
|
81
81
|
const safeDigits = digits.length === 6 ? digits : Array(6).fill('');
|
|
82
|
-
return (_jsxs(Container, { children: [_jsx(LargeTitle, { children: header ?? LOGINLocalizator.EnterOtpCode }), _jsx(Title, { children: text ?? LOGINLocalizator.EnterOtpEmailOnly }), _jsx(InputsWrapper, { children: safeDigits.map((digit, i) => (_jsx(DigitBox, {
|
|
82
|
+
return (_jsxs(Container, { children: [_jsx(LargeTitle, { children: header ?? LOGINLocalizator.EnterOtpCode }), _jsx(Title, { children: text ?? LOGINLocalizator.EnterOtpEmailOnly }), _jsx(InputsWrapper, { children: safeDigits.map((digit, i) => (_jsx(DigitBox, { $isMobile: isMobile, $filled: !!digit, maxLength: 1, value: digit, onChange: (e) => handleChange(e.target.value, i), onKeyDown: (e) => handleKeyDown(e, i), onPaste: handlePaste, ref: (el) => (inputRefs.current[i] = el), inputMode: "numeric" }, i * 2))) }), _jsxs(ControlsRow, { $isMobile: isMobile, children: [_jsx(TMButton, { btnStyle: 'text', disabled: clearBtnDisabled, caption: SDKUI_Localizator.ClearOTP, showTooltip: false, onClick: handleClearOTP, color: 'tertiary' }), onResendOTP && (_jsx(TMButton, { btnStyle: 'text', disabled: resendTimer > 0, caption: resendTimer > 0 ? `${LOGINLocalizator.ResendIn + ' ' + resendTimer}s` : LOGINLocalizator.ResendOtp, showTooltip: false, onClick: handleResendOTP, color: 'success' })), additionalButtons.map((btn, index) => (_jsx("div", { children: btn }, index * 2)))] })] }));
|
|
83
83
|
};
|
|
84
84
|
export default OTPReader;
|
|
85
85
|
const Container = styled.div ` display: flex; flex-direction: column; align-items: center; gap: 2px; `;
|
|
@@ -36,7 +36,7 @@ const PasswordStrengthChecker = ({ password, onValidationChange }) => {
|
|
|
36
36
|
const unmetRules = rules.filter((_, i) => !res[i]).map(r => r.label);
|
|
37
37
|
onValidationChange?.(isValid, unmetRules);
|
|
38
38
|
}, [password]);
|
|
39
|
-
return (_jsxs(Wrapper, { children: [_jsxs(Title, { children: [_jsxs(CircleContainer, { children: [" ", _jsx(IconInfo, { color: '#f9c1a8' }), " "] }), SDKUI_Localizator.PasswordRule_Requirement] }), rules.map((rule, i) => (_jsxs(Rule, {
|
|
39
|
+
return (_jsxs(Wrapper, { children: [_jsxs(Title, { children: [_jsxs(CircleContainer, { children: [" ", _jsx(IconInfo, { color: '#f9c1a8' }), " "] }), SDKUI_Localizator.PasswordRule_Requirement] }), rules.map((rule, i) => (_jsxs(Rule, { $passed: results[i], children: [" ", rule.label, " "] }, i * 2)))] }));
|
|
40
40
|
};
|
|
41
41
|
export default PasswordStrengthChecker;
|
|
42
42
|
const Wrapper = styled.div ` padding: 10px; border-radius: 12px; background: linear-gradient(135deg, #f9c1a8 0%, white 40%, white 100%); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); max-width: 400px; `;
|
|
@@ -273,8 +273,8 @@ const RapidAccessItem = ({ rapidAccess, isMobile = false, onRemove, onSelect, on
|
|
|
273
273
|
handleClose();
|
|
274
274
|
};
|
|
275
275
|
const expandedAriaHandler = () => setIsExpanded(!isExpanded);
|
|
276
|
-
return (_jsxs(Container, { children: [_jsxs(ItemWrapper, { children: [_jsxs(ItemProfileWrapper, { style: { zIndex: 100 - index }, onDoubleClick: () => onSelect(rapidAccess.id), children: [_jsx(PreferredIconContainer, { onClick: () => onDefault(rapidAccess.id), children: _jsx(TMTooltip, { content: SDKUI_Localizator.Default, children: rapidAccess.preferred ? _jsx(IconStarSolid, { color: TMColors.tertiary, fontSize: 20 }) : _jsx(IconStarOutline, { fontSize: 20 }) }) }), _jsx(ProfileCircle, {
|
|
277
|
-
_jsxs(ExpandedAria, { children: [_jsxs(InputContainer, {
|
|
276
|
+
return (_jsxs(Container, { children: [_jsxs(ItemWrapper, { children: [_jsxs(ItemProfileWrapper, { style: { zIndex: 100 - index }, onDoubleClick: () => onSelect(rapidAccess.id), children: [_jsx(PreferredIconContainer, { onClick: () => onDefault(rapidAccess.id), children: _jsx(TMTooltip, { content: SDKUI_Localizator.Default, children: rapidAccess.preferred ? _jsx(IconStarSolid, { color: TMColors.tertiary, fontSize: 20 }) : _jsx(IconStarOutline, { fontSize: 20 }) }) }), _jsx(ProfileCircle, { $color: rapidAccess.color ?? TMColors.primary, onClick: () => setIsMenuOpen(true), children: iconMap[rapidAccess.icon] ?? _jsx(IconUser, { fontSize: 20 }) }), _jsxs(RapidAccessName, { onClick: expandedAriaHandler, children: [" ", truncateText(rapidAccess.name, 50)] })] }), _jsxs(ItemOperationsWrapper, { children: [_jsx(ExpandButton, { onClick: expandedAriaHandler, children: isExpanded ? _jsx(IconCollapse, { fontSize: 16 }) : _jsx(IconExpand, { fontSize: 16 }) }), _jsx(TMButton, { color: 'primary', caption: SDKUI_Localizator.Select, showTooltip: false, onClick: () => onSelect(rapidAccess.id) }), _jsx(TMButton, { color: 'tertiary', caption: SDKUI_Localizator.Remove, showTooltip: false, onClick: onRemovePopup })] }), _jsx(Menu, { x: isMobile ? 0 : 80, y: isMobile ? -40 : 0, onClose: () => handleClose(), visible: isMenuOpen, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '10px' }, children: [_jsxs(StyledMenuItemContainer, { style: { flexWrap: 'wrap' }, children: [colors.map((color, index) => (_jsx(ColorWrapper, { onClick: () => onColorPick(color), children: _jsx(ColorPicker, { $color: color }) }, index * 2))), _jsx(ColorWrapper, { onClick: () => setShowIconMenu(!showIconMenu), children: icons.find(icon => icon[0] === rapidAccess.icon)?.[1] ?? _jsx(IconUser, {}) })] }), showIconMenu && _jsx(StyledMenuItemContainer, { style: { flexWrap: 'wrap' }, children: icons.map(([key, icon]) => (_jsx(ColorWrapper, { onClick: () => onIconPick(key), children: _jsx(ColorPicker, { $color: "white", children: icon }) }, key))) })] }) })] }), isExpanded &&
|
|
277
|
+
_jsxs(ExpandedAria, { children: [_jsxs(InputContainer, { $isMobile: isMobile, children: [_jsx(TextBox, { value: name, onValueChanged: (value) => setName(value), type: 'text', label: SDKUI_Localizator.NameForAccess, additionalIcons: additionalSaveBtn }), _jsx(TextBox, { value: rapidAccess.endpoint?.Description, type: 'text', label: SDKUI_Localizator.Endpoint, disabled: true })] }), _jsxs(InputContainer, { $isMobile: isMobile, children: [_jsx(TextBox, { value: rapidAccess.archive?.description, type: 'text', label: SDKUI_Localizator.ArchiveID, disabled: true }), _jsx(TextBox, { value: rapidAccess.authenticationMode, type: 'text', label: SDKUI_Localizator.AuthMode, disabled: true })] }), _jsxs(InputContainer, { $isMobile: isMobile, children: [_jsx(TextBox, { value: rapidAccess.username, type: 'text', label: SDKUI_Localizator.UserName, disabled: true }), _jsx(TextBox, { value: cultureIDsDataSource.find(cid => cid.value === rapidAccess.language)?.display, type: 'text', label: SDKUI_Localizator.CultureID, disabled: true })] }), hasAuthDomain && _jsxs(InputContainer, { $isMobile: isMobile, children: [_jsx(TextBox, { value: domainValue, type: 'text', label: SDKUI_Localizator.Domain, disabled: true }), rapidAccess.authenticationMode === AuthenticationModes.TopMediaOnBehalfOf &&
|
|
278
278
|
_jsx(TextBox, { value: rapidAccess.onBehalfUsername, type: 'text', label: SDKUI_Localizator.UserName + ' ' + `(${SDKUI_Localizator.OnBehalfOf})`, disabled: true })] })] })] }));
|
|
279
279
|
};
|
|
280
280
|
const ColorWrapper = styled.div ` cursor: pointer; width: 30px; height: 30px; background-color: white; border-radius: 30px; display: flex; align-items: center; justify-content: center; `;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import OTPReader from './OTPReader';
|
|
@@ -101,7 +101,7 @@ const RecoverPasswordFlow = ({ onClose, tmSession, windowHeight = 800, isMobile
|
|
|
101
101
|
window.removeEventListener('keydown', handleKeyDown);
|
|
102
102
|
};
|
|
103
103
|
}, [step, email, otpCode, getOTPAsync, verifyOTPAsync]);
|
|
104
|
-
return (_jsxs(Wrapper, {
|
|
104
|
+
return (_jsxs(Wrapper, { $windowHeight: windowHeight, children: [_jsx(Title, { children: SDKUI_Localizator.ForgetPassword + ` (${tmSession.SessionDescr?.userName})` }), _jsx(Divider, {}), (!isMobile || windowHeight === WindowHeight.LARGE) && _jsxs(StepIndicatorContainer, { $windowHeight: windowHeight, children: [" ", _jsx(StepIndicator, { steps: steps, currentStep: step }), " "] }), step === 1 && (_jsxs(Card, { children: [_jsx(Title, { children: SDKUI_Localizator.InsertYourEmail }), _jsx(TextBox, { ref: emailRef, type: "email", showSuccess: true, value: email, onValueChanged: (e) => setEmail(e), placeHolder: 'Email...', validationItems: fieldValidations('email') }), _jsx(TMButton, { fontSize: "1.1rem", caption: LOGINLocalizator.SendOtp, showTooltip: false, disabled: !email, onClick: async () => await getOTPAsync() })] })), step === 2 && (_jsxs(_Fragment, { children: [_jsx(OTPReader, { digits: otpCode, onChange: handleDigitChange, onFullChange: handleFullChange }), _jsx(TMButton, { fontSize: "1.2rem", caption: LOGINLocalizator.Continue, disabled: otpCode.join('').length !== 6, showTooltip: false, onClick: async () => await verifyOTPAsync() })] })), step === 3 && (_jsx(ChangePasswordInputs, { tmSession: tmSession, cpd: cpd, otp: otpCode.join(''), onClose: onClose })), _jsx(BackButtonWrapper, { children: _jsx(TMButton, { onClick: onClose, btnStyle: "icon", icon: _jsx(IconArrowLeft, { fontSize: 20 }), caption: SDKUI_Localizator.Back }) })] }));
|
|
105
105
|
};
|
|
106
106
|
export default RecoverPasswordFlow;
|
|
107
107
|
const Wrapper = styled.div ` width: 100%; background-color: white; position: absolute; top: 0; left: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: ${props => props.$windowHeight === WindowHeight.LARGE ? '20px' : '10px'}; padding: 20px 65px; `;
|
|
@@ -91,6 +91,6 @@ const SelectBox = ({ cursor = 'pointer', onClick, value, onValueChanged, label,
|
|
|
91
91
|
}
|
|
92
92
|
return color;
|
|
93
93
|
}, [mainValidation]);
|
|
94
|
-
return (_jsxs(Container, { children: [label && _jsx(Label, {
|
|
94
|
+
return (_jsxs(Container, { children: [label && _jsx(Label, { $color: borderColor, children: label }), _jsxs(SelectContainer, { $borderColor: borderColor, $borderThickness: borderThickness, $focused: isFocused, $disabled: disabled, children: [icon && _jsx(IconWrapper, { $color: validationItems.length > 0 ? borderColor : TMColors.primary, children: icon }), _jsxs(Select, { onClick: onClick, onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false), value: value, onChange: (e) => onValueChanged?.(e.target.value), $readOnly: readOnly, disabled: disabled, $color: fontColor, $cursor: !disabled ? cursor : 'default', children: [placeHolder && _jsx("option", { value: "", disabled: true, children: placeHolder }), options.map((option, index) => (_jsx("option", { value: option.value, children: option.display }, index * 2)))] })] }), _jsx(ValidationMessageContainer, { children: validationMessages.map((val, index) => (_jsx(ValidationMessage, { $color: val.color, children: val.message }, index * 2))) })] }));
|
|
95
95
|
};
|
|
96
96
|
export default SelectBox;
|
|
@@ -5,7 +5,7 @@ const StepIndicator = ({ steps, currentStep }) => {
|
|
|
5
5
|
return (_jsx(StepIndicatorWrapper, { children: steps.map((label, index) => {
|
|
6
6
|
const stepIndex = index + 1;
|
|
7
7
|
const isLast = index === steps.length - 1;
|
|
8
|
-
return (_jsxs(StepItemWrapper, { children: [_jsxs(StepItem, {
|
|
8
|
+
return (_jsxs(StepItemWrapper, { children: [_jsxs(StepItem, { $active: currentStep === stepIndex, $completed: currentStep > stepIndex, children: [_jsx(Circle, { $active: currentStep === stepIndex, $completed: currentStep > stepIndex, children: currentStep > stepIndex ? '✓' : stepIndex }), _jsx(StepLabel, { children: label })] }), !isLast && (_jsxs(StepConnectorWrapper, { children: [_jsx(StepConnector, {}), _jsx(StepFiller, { $filled: currentStep > stepIndex })] }))] }, label));
|
|
9
9
|
}) }));
|
|
10
10
|
};
|
|
11
11
|
export default StepIndicator;
|