@topconsultnpm/sdkui-react-beta 6.14.7 → 6.14.9
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/icomoon.svg +96 -96
- package/lib/assets/italy.svg +16 -16
- package/lib/assets/topmedia-six.svg +65 -65
- package/lib/assets/topmeida-six-bianco.svg +65 -65
- package/lib/components/features/archive/TMArchive.d.ts +1 -0
- package/lib/components/features/archive/TMArchive.js +3 -2
- package/lib/components/features/documents/TMDcmtForm.d.ts +1 -0
- package/lib/components/features/documents/TMDcmtForm.js +7 -1
- package/package.json +1 -1
|
@@ -12,12 +12,13 @@ import TMTreeSelector from '../search/TMTreeSelector';
|
|
|
12
12
|
import TMPanel from '../../base/TMPanel';
|
|
13
13
|
import { TMPanelManagerProvider, useTMPanelManagerContext } from '../../layout/panelManager/TMPanelManagerContext';
|
|
14
14
|
import TMPanelManagerContainer from '../../layout/panelManager/TMPanelManagerContainer';
|
|
15
|
-
const TMArchive = ({ inputTID }) => {
|
|
15
|
+
const TMArchive = ({ inputTID, fileFromConnector = null }) => {
|
|
16
16
|
const TIDs = SDKUI_Globals.userSettings.archivingSettings.mruTIDs;
|
|
17
17
|
const [currentTID, setCurrentTID] = useState(0);
|
|
18
18
|
const [mruTIDs, setMruTIDs] = useState(TIDs);
|
|
19
19
|
const [currentMruTID, setCurrentMruTID] = useState(0);
|
|
20
20
|
const [fromDTD, setFromDTD] = useState();
|
|
21
|
+
console.log(fileFromConnector, "File from connector in TMArchive");
|
|
21
22
|
const deviceType = useDeviceType();
|
|
22
23
|
useEffect(() => { setMruTIDs(TIDs); }, []);
|
|
23
24
|
useEffect(() => {
|
|
@@ -54,7 +55,7 @@ const TMArchive = ({ inputTID }) => {
|
|
|
54
55
|
setMruTIDs(newMruTIDS);
|
|
55
56
|
} }), [mruTIDs, currentMruTID, deviceType]);
|
|
56
57
|
const tmFormElement = useMemo(() => currentTID ?
|
|
57
|
-
_jsx(TMDcmtForm, { TID: currentTID, DID: undefined, groupId: 'tmForm', layoutMode: LayoutModes.Ark, onClose: deviceType === DeviceType.MOBILE ? () => setCurrentTID(undefined) : undefined, onSaveRecents: (TIDs) => setMruTIDs(TIDs), showDcmtFormSidebar: false })
|
|
58
|
+
_jsx(TMDcmtForm, { TID: currentTID, DID: undefined, groupId: 'tmForm', layoutMode: LayoutModes.Ark, onClose: deviceType === DeviceType.MOBILE ? () => setCurrentTID(undefined) : undefined, onSaveRecents: (TIDs) => setMruTIDs(TIDs), showDcmtFormSidebar: false, fileFromConnector: fileFromConnector })
|
|
58
59
|
:
|
|
59
60
|
_jsx(TMPanel, { title: 'Archiviazione', children: _jsxs(TMLayoutContainer, { gap: 30, alignItems: 'center', justifyContent: 'center', children: [_jsxs(TMLayoutItem, { width: 'max-content', height: 'max-content', children: [" ", _jsxs(StyledToppyTextContainer, { children: [" ", _jsxs(StyledToppyText, { children: [" ", SDKUI_Localizator.DcmtTypeSelect, " "] }), " "] }), " "] }), _jsxs(TMLayoutItem, { width: 'max-content', height: 'max-content', children: [" ", _jsx("img", { src: Logo, width: 120, alt: '' }), " "] })] }) }), [currentTID, deviceType, mruTIDs]);
|
|
60
61
|
const allInitialPanelVisibility = {
|
|
@@ -33,7 +33,7 @@ import { TMPanelManagerProvider, useTMPanelManagerContext } from '../../layout/p
|
|
|
33
33
|
import TMPanelManagerContainer from '../../layout/panelManager/TMPanelManagerContainer';
|
|
34
34
|
let abortControllerLocal = new AbortController();
|
|
35
35
|
//#endregion
|
|
36
|
-
const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes.Update, onClose, onSavedAsyncCallback, TID, DID, formMode = FormModes.Update, canNext, canPrev, count, itemIndex, onNext, onPrev, allowNavigation = true, allowRelations = true, isClosable = false, isExpertMode = SDKUI_Globals.userSettings.advancedSettings.expertMode === 1, showDcmtFormSidebar = true, invokedByTodo = false, titleModal, isModal = false, widthModal = "100%", heightModal = "100%", groupId, onWFOperationCompleted }) => {
|
|
36
|
+
const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes.Update, onClose, onSavedAsyncCallback, TID, DID, formMode = FormModes.Update, canNext, canPrev, count, itemIndex, onNext, onPrev, allowNavigation = true, allowRelations = true, isClosable = false, isExpertMode = SDKUI_Globals.userSettings.advancedSettings.expertMode === 1, showDcmtFormSidebar = true, invokedByTodo = false, titleModal, isModal = false, widthModal = "100%", heightModal = "100%", groupId, onWFOperationCompleted, fileFromConnector = null, }) => {
|
|
37
37
|
const mruTIDs = SDKUI_Globals.userSettings.archivingSettings.mruTIDs;
|
|
38
38
|
const [id, setID] = useState('');
|
|
39
39
|
const [showWaitPanelLocal, setShowWaitPanelLocal] = useState(false);
|
|
@@ -92,6 +92,12 @@ const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes
|
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
94
|
useEffect(() => { setID(genUniqueId()); }, []);
|
|
95
|
+
useEffect(() => {
|
|
96
|
+
if (!fileFromConnector || fileFromConnector === null)
|
|
97
|
+
return;
|
|
98
|
+
console.log("File from connector:", fileFromConnector);
|
|
99
|
+
setDcmtFile(fileFromConnector);
|
|
100
|
+
}, [fileFromConnector]);
|
|
95
101
|
useEffect(() => {
|
|
96
102
|
retrieveMetadataAsync();
|
|
97
103
|
}, [TID, DID]);
|