@topconsultnpm/sdkui-react-beta 6.12.43 → 6.12.44
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/features/archive/TMArchive.d.ts +6 -0
- package/lib/components/features/archive/TMArchive.js +57 -0
- package/lib/components/{query → features/documents}/TMBatchUpdateForm.d.ts +1 -1
- package/lib/components/{query → features/documents}/TMBatchUpdateForm.js +18 -18
- package/lib/components/{query → features/documents}/TMDcmtBlog.js +4 -4
- package/lib/components/{query → features/documents}/TMDcmtForm.d.ts +2 -2
- package/lib/components/{query → features/documents}/TMDcmtForm.js +22 -22
- package/lib/components/{query → features/documents}/TMDcmtIcon.js +2 -2
- package/lib/components/{query → features/documents}/TMDcmtPreview.d.ts +1 -1
- package/lib/components/{query → features/documents}/TMDcmtPreview.js +14 -14
- package/lib/components/{query → features/documents}/TMFileUploader.d.ts +1 -1
- package/lib/components/{query → features/documents}/TMFileUploader.js +10 -10
- package/lib/components/{query → features/documents}/TMMasterDetailDcmts.d.ts +2 -2
- package/lib/components/{query → features/documents}/TMMasterDetailDcmts.js +20 -20
- package/lib/components/{search → features/search}/TMSavedQueryForm.d.ts +1 -1
- package/lib/components/{search → features/search}/TMSavedQueryForm.js +10 -10
- package/lib/components/{search → features/search}/TMSavedQuerySelector.js +9 -9
- package/lib/components/{search → features/search}/TMSearch.d.ts +1 -1
- package/lib/components/{search → features/search}/TMSearch.js +6 -6
- package/lib/components/{search → features/search}/TMSearchQueryEditor.d.ts +1 -1
- package/lib/components/{search → features/search}/TMSearchQueryEditor.js +11 -11
- package/lib/components/{search → features/search}/TMSearchQueryPanel.d.ts +2 -2
- package/lib/components/{search → features/search}/TMSearchQueryPanel.js +16 -16
- package/lib/components/{search → features/search}/TMSearchResult.d.ts +1 -1
- package/lib/components/{search → features/search}/TMSearchResult.js +30 -30
- package/lib/components/{search → features/search}/TMSearchResultsMenuItems.d.ts +2 -2
- package/lib/components/{search → features/search}/TMSearchResultsMenuItems.js +5 -5
- package/lib/components/{search → features/search}/TMTreeSelector.js +7 -7
- package/lib/components/{query → features/workflow}/TMWorkflowPopup.d.ts +1 -1
- package/lib/components/{query → features/workflow}/TMWorkflowPopup.js +8 -8
- package/lib/components/grids/TMBlogsUtils.d.ts +2 -1
- package/lib/components/index.d.ts +5 -2
- package/lib/components/index.js +8 -2
- package/lib/components/query/TMQueryEditor.js +5 -8
- package/package.json +1 -1
- package/lib/components/query/TMQueryResult.d.ts +0 -10
- package/lib/components/query/TMQueryResult.js +0 -42
- package/lib/components/query/TMQueryResultForm.d.ts +0 -17
- package/lib/components/query/TMQueryResultForm.js +0 -318
- /package/lib/components/{query → features/documents}/TMDcmtBlog.d.ts +0 -0
- /package/lib/components/{query → features/documents}/TMDcmtIcon.d.ts +0 -0
- /package/lib/components/{search → features/search}/TMSavedQuerySelector.d.ts +0 -0
- /package/lib/components/{search → features/search}/TMTreeSelector.d.ts +0 -0
@@ -0,0 +1,57 @@
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
3
|
+
import Logo from '../../../assets/Toppy-generico.png';
|
4
|
+
import { LayoutModes, LocalStorageService, SDK_Globals } from '@topconsultnpm/sdk-ts-beta';
|
5
|
+
import { IconTree, IconProgressReady } from '../../../helper';
|
6
|
+
import { useDeviceType, DeviceType } from '../../base/TMDeviceProvider';
|
7
|
+
import TMLayoutContainer, { TMSplitterLayout, TMLayoutItem } from '../../base/TMLayout';
|
8
|
+
import TMToolbarCard from '../../base/TMToolbarCard';
|
9
|
+
import TMRecentsManager from '../../grids/TMRecentsManager';
|
10
|
+
import TMDcmtForm from '../documents/TMDcmtForm';
|
11
|
+
import { StyledToppyTextContainer, StyledToppyText } from '../search/TMSearchQueryPanel';
|
12
|
+
import TMTreeSelector from '../search/TMTreeSelector';
|
13
|
+
const TMArchive = ({ inputTID }) => {
|
14
|
+
const TIDs = LocalStorageService.getItem(`ARCHIVEPAGE_MRU_TIDS_${SDK_Globals.tmSession?.SessionDescr?.archiveID}_${SDK_Globals.tmSession?.SessionDescr?.userID}`) ?? [];
|
15
|
+
const [currentTID, setCurrentTID] = useState(0);
|
16
|
+
const [mruTIDs, setMruTIDs] = useState(TIDs);
|
17
|
+
const [showRecentsPanel, setShowRecentsPanel] = useState(true);
|
18
|
+
const [showTreesPanel, setShowTreesPanel] = useState(true);
|
19
|
+
const deviceType = useDeviceType();
|
20
|
+
useEffect(() => { setMruTIDs(TIDs); }, []);
|
21
|
+
useEffect(() => {
|
22
|
+
if (!inputTID)
|
23
|
+
return;
|
24
|
+
setCurrentTID(inputTID);
|
25
|
+
}, [inputTID]);
|
26
|
+
const setSearchByTID = (tid) => { setCurrentTID(tid); };
|
27
|
+
const getPrimarySplitterStartValues = useCallback(() => {
|
28
|
+
if (deviceType === DeviceType.MOBILE) {
|
29
|
+
return ['0%', '100%'];
|
30
|
+
}
|
31
|
+
return showTreesPanel ? ['20%', '80%'] : ['0', '100%'];
|
32
|
+
}, [deviceType, showTreesPanel]);
|
33
|
+
const getSecondarySplitterStartValues = useCallback(() => {
|
34
|
+
if (deviceType === DeviceType.MOBILE) {
|
35
|
+
return currentTID ? ['0', '100%'] : ['100%', '0%'];
|
36
|
+
}
|
37
|
+
return showRecentsPanel ? ['25%', '75%'] : ['0', '100%'];
|
38
|
+
}, [deviceType, currentTID, showRecentsPanel]);
|
39
|
+
let customSidebarItems = useMemo(() => {
|
40
|
+
return ([
|
41
|
+
{ icon: _jsx(IconTree, {}), id: 'trees', visibleName: 'Alberi', isActive: showTreesPanel, onClick: () => { setShowTreesPanel(!showTreesPanel); } },
|
42
|
+
{ icon: _jsx(IconProgressReady, {}), id: 'recents', visibleName: 'Recenti', isActive: showRecentsPanel, onClick: () => { setShowRecentsPanel(!showRecentsPanel); } }
|
43
|
+
]);
|
44
|
+
}, [showTreesPanel, showRecentsPanel]);
|
45
|
+
return (_jsxs(TMSplitterLayout, { direction: 'horizontal', separatorSize: 10, showSeparator: deviceType !== DeviceType.MOBILE && showTreesPanel, separatorColor: 'transparent', separatorActiveColor: 'transparent', min: ['0', '0'], start: getPrimarySplitterStartValues(), children: [showTreesPanel ? _jsx(TMLayoutItem, { children: deviceType !== DeviceType.MOBILE && _jsx(TMTreeSelector, { onClose: () => setShowTreesPanel(false), layoutMode: LayoutModes.Ark, onSelectedTIDChanged: (tid) => { setSearchByTID(tid); } }) }) : _jsx(_Fragment, {}), _jsx(TMLayoutItem, { children: _jsxs(TMSplitterLayout, { separatorSize: 10, direction: 'horizontal', showSeparator: deviceType !== DeviceType.MOBILE && showRecentsPanel, separatorColor: 'transparent', separatorActiveColor: 'transparent', min: ['0', '0'], start: getSecondarySplitterStartValues(), children: [showRecentsPanel ? _jsx(TMLayoutItem, { children: _jsx(TMToolbarCard, { onClose: () => setShowRecentsPanel(false), title: 'Recenti', totalItems: mruTIDs.length, children: _jsx(TMRecentsManager, { mruTIDs: mruTIDs, deviceType: deviceType, onSelectedTID: (tid) => setCurrentTID(tid), onDeletedTID: (tid) => {
|
46
|
+
let newMruTIDS = mruTIDs.slice();
|
47
|
+
let index = newMruTIDS.findIndex(o => o == tid);
|
48
|
+
if (index >= 0)
|
49
|
+
newMruTIDS.splice(index, 1);
|
50
|
+
LocalStorageService.setItem(`ARCHIVEPAGE_MRU_TIDS_${SDK_Globals.tmSession?.SessionDescr?.archiveID}_${SDK_Globals.tmSession?.SessionDescr?.userID}`, newMruTIDS.filter(tid => tid != undefined && tid != null));
|
51
|
+
setMruTIDs(newMruTIDS);
|
52
|
+
} }) }) }) : _jsx(_Fragment, {}), _jsx(TMLayoutItem, { children: currentTID ?
|
53
|
+
_jsx(TMDcmtForm, { TID: currentTID, DID: undefined, layoutMode: LayoutModes.Ark, customRightSidebarItems: customSidebarItems, showPreview: deviceType !== DeviceType.MOBILE, onClose: deviceType === DeviceType.MOBILE ? () => setCurrentTID(undefined) : undefined, onSaveRecents: (TIDs) => setMruTIDs(TIDs) })
|
54
|
+
:
|
55
|
+
_jsx(TMToolbarCard, { items: customSidebarItems, 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: [" ", 'Selezionare un tipo documento', " "] }), " "] }), " "] }), _jsxs(TMLayoutItem, { width: 'max-content', height: 'max-content', children: [" ", _jsx("img", { src: Logo, width: 120, alt: '' }), " "] })] }) }) })] }) })] }));
|
56
|
+
};
|
57
|
+
export default TMArchive;
|
@@ -1,24 +1,24 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import { useEffect, useState } from 'react';
|
3
3
|
import { AccessLevels, DcmtTypeListCacheService, LayoutModes, MetadataDataDomains, ResultTypes, SDK_Globals, ValidationItem } from '@topconsultnpm/sdk-ts-beta';
|
4
|
-
import { searchResultToMetadataValues, getSystemMetadata, calcIsModified, getListMaxItems, SDKUI_Localizator, IconHide, IconShow } from '
|
5
|
-
import { useDcmtOperations } from '
|
6
|
-
import { DcmtOperationTypes, FormModes } from '
|
7
|
-
import { TMColors } from '
|
8
|
-
import { StyledToolbarCardContainer, StyledFormButtonsContainer } from '
|
9
|
-
import TMButton from '
|
10
|
-
import { useDeviceType, DeviceType } from '
|
11
|
-
import { TMSplitterLayout } from '
|
12
|
-
import { TMExceptionBoxManager } from '
|
13
|
-
import TMShowAllOrMaxItemsButton from '
|
14
|
-
import TMSpinner from '
|
15
|
-
import TMToolbarCard from '
|
16
|
-
import { TMLayoutWaitingContainer } from '
|
17
|
-
import TMDistinctValues from '
|
18
|
-
import TMFormulaEditor, { FormulaDescriptor, FormulaHelper, FormulaTargets } from '
|
19
|
-
import { useMetadataEditableList } from '
|
20
|
-
import TMMetadataValues, { ShowCheckBoxesMode, AdvancedMenuButtons } from '
|
21
|
-
import { TMSaveFormButtonSave, TMSaveFormButtonUndo } from '
|
4
|
+
import { searchResultToMetadataValues, getSystemMetadata, calcIsModified, getListMaxItems, SDKUI_Localizator, IconHide, IconShow } from '../../../helper';
|
5
|
+
import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
|
6
|
+
import { DcmtOperationTypes, FormModes } from '../../../ts';
|
7
|
+
import { TMColors } from '../../../utils/theme';
|
8
|
+
import { StyledToolbarCardContainer, StyledFormButtonsContainer } from '../../base/Styled';
|
9
|
+
import TMButton from '../../base/TMButton';
|
10
|
+
import { useDeviceType, DeviceType } from '../../base/TMDeviceProvider';
|
11
|
+
import { TMSplitterLayout } from '../../base/TMLayout';
|
12
|
+
import { TMExceptionBoxManager } from '../../base/TMPopUp';
|
13
|
+
import TMShowAllOrMaxItemsButton from '../../base/TMShowAllOrMaxItemsButton';
|
14
|
+
import TMSpinner from '../../base/TMSpinner';
|
15
|
+
import TMToolbarCard from '../../base/TMToolbarCard';
|
16
|
+
import { TMLayoutWaitingContainer } from '../../base/TMWaitPanel';
|
17
|
+
import TMDistinctValues from '../../choosers/TMDistinctValues';
|
18
|
+
import TMFormulaEditor, { FormulaDescriptor, FormulaHelper, FormulaTargets } from '../../editors/TMFormulaEditor';
|
19
|
+
import { useMetadataEditableList } from '../../editors/TMMetadataEditor';
|
20
|
+
import TMMetadataValues, { ShowCheckBoxesMode, AdvancedMenuButtons } from '../../editors/TMMetadataValues';
|
21
|
+
import { TMSaveFormButtonSave, TMSaveFormButtonUndo } from '../../forms/TMSaveForm';
|
22
22
|
const TMBatchUpdateForm = ({ inputDcmts, TID, DID, onSavedCallbackAsync, onBack, onStatusChanged }) => {
|
23
23
|
const [metadataValues, setMetadataValues] = useState([]);
|
24
24
|
const [metadataValuesOrig, setMetadataValuesOrig] = useState([]);
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { SDK_Globals } from '@topconsultnpm/sdk-ts-beta';
|
3
2
|
import { useEffect, useState } from 'react';
|
4
3
|
import styled from 'styled-components';
|
5
|
-
import {
|
6
|
-
import
|
7
|
-
import
|
4
|
+
import { SDK_Globals } from '@topconsultnpm/sdk-ts-beta';
|
5
|
+
import { TMExceptionBoxManager } from '../../base/TMPopUp';
|
6
|
+
import TMSpinner from '../../base/TMSpinner';
|
7
|
+
import TMBlogs from '../../grids/TMBlogs';
|
8
8
|
const TMDcmtBlog = ({ tid, did }) => {
|
9
9
|
const [blogsDatasource, setBlogsDatasource] = useState([]);
|
10
10
|
useEffect(() => {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { LayoutModes } from '@topconsultnpm/sdk-ts-beta';
|
3
|
-
import { FormModes } from '
|
4
|
-
import { ITMRightSidebarItem } from '
|
3
|
+
import { FormModes } from '../../../ts';
|
4
|
+
import { ITMRightSidebarItem } from '../../base/TMRightSidebar';
|
5
5
|
interface ITMDcmtFormProps {
|
6
6
|
TID?: number;
|
7
7
|
DID?: number;
|
@@ -4,28 +4,28 @@ import styled from 'styled-components';
|
|
4
4
|
import TMDcmtPreview from './TMDcmtPreview';
|
5
5
|
import { ArchiveConstraints, ArchiveEngineByID, DcmtTypeListCacheService, LayoutModes, LocalStorageService, MetadataDataTypes, ResultTypes, SDK_Globals, SystemMIDsAsNumber, TemplateTIDs, UpdateEngineByID, ValidationItem } from '@topconsultnpm/sdk-ts-beta';
|
6
6
|
import { ContextMenu } from 'devextreme-react';
|
7
|
-
import { WorkFlowApproveRejectPopUp, WorkFlowOperationButtons, WorkFlowReAssignPopUp } from '
|
8
|
-
import { FormModes } from '
|
9
|
-
import { DeviceType, useDeviceType } from '
|
10
|
-
import { useDcmtOperations } from '
|
11
|
-
import { handleArchiveVisibility, searchResultToMetadataValues } from '
|
12
|
-
import { genUniqueId, IconCloseCircle, IconShow, SDKUI_Localizator, IconBoard, IconDcmtTypeSys, IconDataList, IconDetailDcmts, svgToString, IconDownload, IconHide, calcIsModified, IconMenuVertical, Globalization, getListMaxItems, getSystemMetadata, IconBoxArchiveIn, IconClear, IconUndo } from '
|
13
|
-
import { hasDetailRelations, hasMasterRelations } from '
|
14
|
-
import { TMColors } from '
|
15
|
-
import { StyledFormButtonsContainer, StyledModalContainer, StyledToolbarCardContainer } from '
|
16
|
-
import ShowAlert from '
|
17
|
-
import TMButton from '
|
18
|
-
import { TMSplitterLayout, TMLayoutItem } from '
|
19
|
-
import { TMExceptionBoxManager, TMMessageBoxManager, ButtonNames } from '
|
20
|
-
import TMSpinner from '
|
21
|
-
import TMToolbarCard from '
|
22
|
-
import { TMLayoutWaitingContainer } from '
|
23
|
-
import TMDistinctValues from '
|
24
|
-
import TMFormulaEditor, { FormulaDescriptor, FormulaHelper, FormulaTargets } from '
|
25
|
-
import TMMetadataValues, { AdvancedMenuButtons } from '
|
26
|
-
import { TMSaveFormButtonPrevious, TMSaveFormButtonNext, TMSaveFormButtonSave, TMSaveFormButtonUndo } from '
|
27
|
-
import TMShowAllOrMaxItemsButton from '
|
28
|
-
import TMFileUploader from '
|
7
|
+
import { WorkFlowApproveRejectPopUp, WorkFlowOperationButtons, WorkFlowReAssignPopUp } from '../workflow/TMWorkflowPopup';
|
8
|
+
import { FormModes } from '../../../ts';
|
9
|
+
import { DeviceType, useDeviceType } from '../../base/TMDeviceProvider';
|
10
|
+
import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
|
11
|
+
import { handleArchiveVisibility, searchResultToMetadataValues } from '../../../helper/queryHelper';
|
12
|
+
import { genUniqueId, IconCloseCircle, IconShow, SDKUI_Localizator, IconBoard, IconDcmtTypeSys, IconDataList, IconDetailDcmts, svgToString, IconDownload, IconHide, calcIsModified, IconMenuVertical, Globalization, getListMaxItems, getSystemMetadata, IconBoxArchiveIn, IconClear, IconUndo } from '../../../helper';
|
13
|
+
import { hasDetailRelations, hasMasterRelations } from '../../../helper/dcmtsHelper';
|
14
|
+
import { TMColors } from '../../../utils/theme';
|
15
|
+
import { StyledFormButtonsContainer, StyledModalContainer, StyledToolbarCardContainer } from '../../base/Styled';
|
16
|
+
import ShowAlert from '../../base/TMAlert';
|
17
|
+
import TMButton from '../../base/TMButton';
|
18
|
+
import { TMSplitterLayout, TMLayoutItem } from '../../base/TMLayout';
|
19
|
+
import { TMExceptionBoxManager, TMMessageBoxManager, ButtonNames } from '../../base/TMPopUp';
|
20
|
+
import TMSpinner from '../../base/TMSpinner';
|
21
|
+
import TMToolbarCard from '../../base/TMToolbarCard';
|
22
|
+
import { TMLayoutWaitingContainer } from '../../base/TMWaitPanel';
|
23
|
+
import TMDistinctValues from '../../choosers/TMDistinctValues';
|
24
|
+
import TMFormulaEditor, { FormulaDescriptor, FormulaHelper, FormulaTargets } from '../../editors/TMFormulaEditor';
|
25
|
+
import TMMetadataValues, { AdvancedMenuButtons } from '../../editors/TMMetadataValues';
|
26
|
+
import { TMSaveFormButtonPrevious, TMSaveFormButtonNext, TMSaveFormButtonSave, TMSaveFormButtonUndo } from '../../forms/TMSaveForm';
|
27
|
+
import TMShowAllOrMaxItemsButton from '../../base/TMShowAllOrMaxItemsButton';
|
28
|
+
import TMFileUploader from '../../features/documents/TMFileUploader';
|
29
29
|
import TMMasterDetailDcmts from './TMMasterDetailDcmts';
|
30
30
|
import TMDcmtBlog from './TMDcmtBlog';
|
31
31
|
let abortControllerLocal = new AbortController();
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import styled from 'styled-components';
|
3
|
-
import { getFileIcon } from '
|
4
|
-
import TMTooltip from '
|
3
|
+
import { getFileIcon } from '../../../helper';
|
4
|
+
import TMTooltip from '../../base/TMTooltip';
|
5
5
|
const StyledCellRenderDcmtIcon = styled.div `
|
6
6
|
display: flex;
|
7
7
|
flex-direction: row;
|
@@ -2,20 +2,20 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useState } from 'react';
|
3
3
|
import styled from 'styled-components';
|
4
4
|
import { RetrieveFileOptions, DcmtOpers, GeneralRetrieveFormats, FileFormats, InvoiceRetrieveFormats, OrderRetrieveFormats } from '@topconsultnpm/sdk-ts-beta';
|
5
|
-
import { extensionHandler, sleep, getExceptionMessage, formatBytes, IconMenuVertical, IconCloseCircle, IconClear, SDKUI_Localizator, IconCloseOutline, IconPreview } from '
|
6
|
-
import { useDcmtOperations } from '
|
7
|
-
import { FileExtensionHandler, FormModes } from '
|
8
|
-
import { TMColors } from '
|
9
|
-
import ShowAlert from '
|
10
|
-
import TMButton from '
|
11
|
-
import TMDropDownMenu from '
|
12
|
-
import { TMLayoutItem } from '
|
13
|
-
import { TMExceptionBoxManager } from '
|
14
|
-
import TMToolbarCard from '
|
15
|
-
import TMTooltip from '
|
16
|
-
import { TMLayoutWaitingContainer } from '
|
17
|
-
import { TMSaveFormButtonPrevious, TMSaveFormButtonNext } from '
|
18
|
-
import { StyledAnimatedComponentOpacity } from '
|
5
|
+
import { extensionHandler, sleep, getExceptionMessage, formatBytes, IconMenuVertical, IconCloseCircle, IconClear, SDKUI_Localizator, IconCloseOutline, IconPreview } from '../../../helper';
|
6
|
+
import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
|
7
|
+
import { FileExtensionHandler, FormModes } from '../../../ts';
|
8
|
+
import { TMColors } from '../../../utils/theme';
|
9
|
+
import ShowAlert from '../../base/TMAlert';
|
10
|
+
import TMButton from '../../base/TMButton';
|
11
|
+
import TMDropDownMenu from '../../base/TMDropDownMenu';
|
12
|
+
import { TMLayoutItem } from '../../base/TMLayout';
|
13
|
+
import { TMExceptionBoxManager } from '../../base/TMPopUp';
|
14
|
+
import TMToolbarCard from '../../base/TMToolbarCard';
|
15
|
+
import TMTooltip from '../../base/TMTooltip';
|
16
|
+
import { TMLayoutWaitingContainer } from '../../base/TMWaitPanel';
|
17
|
+
import { TMSaveFormButtonPrevious, TMSaveFormButtonNext } from '../../forms/TMSaveForm';
|
18
|
+
import { StyledAnimatedComponentOpacity } from '../../base/Styled';
|
19
19
|
const TMDcmtPreview = ({ dcmtData, onClose, canNext, canPrev, onNext, onPrev }) => {
|
20
20
|
const [dcmtBlob, setDcmtBlob] = useState(undefined);
|
21
21
|
const [showPreview, setShowPreview] = useState(false);
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import styled from 'styled-components';
|
3
2
|
import { useEffect, useRef, useState } from 'react';
|
4
|
-
import
|
5
|
-
import { IconFolderOpen, SDKUI_Localizator, formatBytes, IconClear, extensionHandler, IconCloseOutline } from '
|
6
|
-
import
|
7
|
-
import {
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import
|
11
|
-
import
|
12
|
-
import
|
3
|
+
import styled from 'styled-components';
|
4
|
+
import { IconFolderOpen, SDKUI_Localizator, formatBytes, IconClear, extensionHandler, IconCloseOutline } from '../../../helper';
|
5
|
+
import usePreventFileDrop from '../../../hooks/usePreventFileDrop';
|
6
|
+
import { FileExtensionHandler } from '../../../ts';
|
7
|
+
import { TMColors } from '../../../utils/theme';
|
8
|
+
import TMButton from '../../base/TMButton';
|
9
|
+
import { DeviceType } from '../../base/TMDeviceProvider';
|
10
|
+
import TMToolbarCard from '../../base/TMToolbarCard';
|
11
|
+
import TMTooltip from '../../base/TMTooltip';
|
12
|
+
import { TMFileViewer, StyledHeaderIcon } from './TMDcmtPreview';
|
13
13
|
const TMFileUploader = ({ deviceType = DeviceType.DESKTOP, onClose, onFileUpload, isRequired = false, defaultBlob = null }) => {
|
14
14
|
const [dragOver, setDragOver] = useState(false);
|
15
15
|
const [uploadedFile, setUploadedFile] = useState(defaultBlob);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { DcmtInfo, TaskContext } from '
|
3
|
-
import { DeviceContextProps } from '
|
2
|
+
import { DcmtInfo, TaskContext } from '../../../ts';
|
3
|
+
import { DeviceContextProps } from '../../base/TMDeviceProvider';
|
4
4
|
interface ITMMasterDetailDcmtsProps extends DeviceContextProps {
|
5
5
|
inputDcmts?: DcmtInfo[];
|
6
6
|
isForMaster?: boolean;
|
@@ -1,30 +1,30 @@
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import { useCallback, useEffect, useState } from 'react';
|
3
3
|
import { DataColumnTypes, DcmtTypeListCacheService, MetadataDataDomains, MetadataFormats, RelationCacheService, RelationTypes, ResultTypes, SDK_Globals, SystemMIDs } from '@topconsultnpm/sdk-ts-beta';
|
4
|
-
import TMDcmtIcon from './TMDcmtIcon';
|
5
4
|
import { ContextMenu } from 'devextreme-react';
|
6
5
|
import { TMNothingToShow } from './TMDcmtPreview';
|
7
6
|
import TMDcmtForm from './TMDcmtForm';
|
8
7
|
import TMSearchResult from '../search/TMSearchResult';
|
9
|
-
import { genUniqueId, getExceptionMessage, IconFolder, IconShow, IconPreview, IconBoard, IconDcmtTypeSys, IconCheckFile, IconDetailDcmts, SDKUI_Localizator, svgToString, IconMail, IconDcmtTypeOnlyMetadata, IconCopy, IconMultipleSelection, IconMenuVertical } from '
|
10
|
-
import { hasDetailRelations } from '
|
11
|
-
import { FormModes, SearchResultContext } from '
|
12
|
-
import { TMColors } from '
|
13
|
-
import { StyledDivHorizontal, StyledBadge } from '
|
14
|
-
import ShowAlert from '
|
15
|
-
import TMButton from '
|
16
|
-
import { DeviceType } from '
|
17
|
-
import { TMSplitterLayout, TMLayoutItem } from '
|
18
|
-
import { TMExceptionBoxManager } from '
|
19
|
-
import TMSpinner from '
|
20
|
-
import TMToolbarCard from '
|
21
|
-
import { TMLayoutWaitingContainer } from '
|
22
|
-
import { TMUserIdViewer } from '
|
23
|
-
import { TMResultManager } from '
|
24
|
-
import { TMSaveFormButtonPrevious, TMSaveFormButtonNext } from '
|
25
|
-
import TMDataListItemViewer from '
|
26
|
-
import { TMDcmtTypeTooltip } from '
|
27
|
-
import TMTreeView from '
|
8
|
+
import { genUniqueId, getExceptionMessage, IconFolder, IconShow, IconPreview, IconBoard, IconDcmtTypeSys, IconCheckFile, IconDetailDcmts, SDKUI_Localizator, svgToString, IconMail, IconDcmtTypeOnlyMetadata, IconCopy, IconMultipleSelection, IconMenuVertical } from '../../../helper';
|
9
|
+
import { hasDetailRelations } from '../../../helper/dcmtsHelper';
|
10
|
+
import { FormModes, SearchResultContext } from '../../../ts';
|
11
|
+
import { TMColors } from '../../../utils/theme';
|
12
|
+
import { StyledDivHorizontal, StyledBadge } from '../../base/Styled';
|
13
|
+
import ShowAlert from '../../base/TMAlert';
|
14
|
+
import TMButton from '../../base/TMButton';
|
15
|
+
import { DeviceType } from '../../base/TMDeviceProvider';
|
16
|
+
import { TMSplitterLayout, TMLayoutItem } from '../../base/TMLayout';
|
17
|
+
import { TMExceptionBoxManager } from '../../base/TMPopUp';
|
18
|
+
import TMSpinner from '../../base/TMSpinner';
|
19
|
+
import TMToolbarCard from '../../base/TMToolbarCard';
|
20
|
+
import { TMLayoutWaitingContainer } from '../../base/TMWaitPanel';
|
21
|
+
import { TMUserIdViewer } from '../../choosers/TMUserChooser';
|
22
|
+
import { TMResultManager } from '../../forms/TMResultDialog';
|
23
|
+
import { TMSaveFormButtonPrevious, TMSaveFormButtonNext } from '../../forms/TMSaveForm';
|
24
|
+
import TMDataListItemViewer from '../../viewers/TMDataListItemViewer';
|
25
|
+
import { TMDcmtTypeTooltip } from '../../viewers/TMTidViewer';
|
26
|
+
import TMTreeView from '../../base/TMTreeView';
|
27
|
+
import TMDcmtIcon from './TMDcmtIcon';
|
28
28
|
let abortController = new AbortController();
|
29
29
|
const TMMasterDetailDcmts = ({ deviceType, inputDcmts, isForMaster, showCurrentDcmtIndicator = true, allowNavigation, canNext, canPrev, onNext, onPrev, onBack, appendMasterDcmts, onTaskCreateRequest }) => {
|
30
30
|
const [id, setID] = useState('');
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { FC } from 'react';
|
2
2
|
import { QueryDescriptor, SavedQueryDescriptor } from '@topconsultnpm/sdk-ts-beta';
|
3
|
-
import { ITMSaveFormProps } from '
|
3
|
+
import { ITMSaveFormProps } from '../../../ts';
|
4
4
|
interface ISavedQueryFormProps extends ITMSaveFormProps<SavedQueryDescriptor> {
|
5
5
|
qd?: QueryDescriptor;
|
6
6
|
isAdvancedSearch?: boolean;
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import { ObjectClasses, PlatformObjectValidator, SharingModes, SDK_Localizator, ValidationItem, ResultTypes, TMPropertyNames, SearchEngine } from '@topconsultnpm/sdk-ts-beta';
|
3
|
-
import { LocalizeSharingModes } from '
|
4
|
-
import { deepCompare, SDKUI_Localizator } from '
|
5
|
-
import { SaveFormOptions, useSaveForm } from '
|
6
|
-
import { FormModes } from '
|
7
|
-
import TMLayoutContainer, { TMLayoutItem } from '
|
8
|
-
import TMUserChooser from '
|
9
|
-
import TMCheckBox from '
|
10
|
-
import TMRadioButton from '
|
11
|
-
import TMTextBox from '
|
12
|
-
import TMSaveForm from '
|
3
|
+
import { LocalizeSharingModes } from '../../../helper/Enum_Localizator';
|
4
|
+
import { deepCompare, SDKUI_Localizator } from '../../../helper';
|
5
|
+
import { SaveFormOptions, useSaveForm } from '../../../hooks/useForm';
|
6
|
+
import { FormModes } from '../../../ts';
|
7
|
+
import TMLayoutContainer, { TMLayoutItem } from '../../base/TMLayout';
|
8
|
+
import TMUserChooser from '../../choosers/TMUserChooser';
|
9
|
+
import TMCheckBox from '../../editors/TMCheckBox';
|
10
|
+
import TMRadioButton from '../../editors/TMRadioButton';
|
11
|
+
import TMTextBox from '../../editors/TMTextBox';
|
12
|
+
import TMSaveForm from '../../forms/TMSaveForm';
|
13
13
|
const TMSavedQueryForm = ({ id, qd, isAdvancedSearch = false, title, width, height, onSaved, onCancel, onClose, onStatusChanged, isModal, formMode = FormModes.Update, showBackButton }) => {
|
14
14
|
const validator = async (d) => {
|
15
15
|
let vil = [];
|
@@ -2,16 +2,16 @@ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-run
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
3
3
|
import styled from 'styled-components';
|
4
4
|
import { SharingModes, SDK_Globals, SDK_Localizator } from '@topconsultnpm/sdk-ts-beta';
|
5
|
-
import { LocalizeSharingModes } from '
|
5
|
+
import { LocalizeSharingModes } from '../../../helper/Enum_Localizator';
|
6
6
|
import ContextMenu from 'devextreme-react/cjs/context-menu';
|
7
|
-
import { SDKUI_Localizator, Globalization, svgToString, IconStar, IconDelete, IconDashboard, IconSavedQuery, IconAdvanced, IconLightningFill, IconApply } from '
|
8
|
-
import { TMColors } from '
|
9
|
-
import ShowAlert from '
|
10
|
-
import TMButton from '
|
11
|
-
import { TMMessageBoxManager, ButtonNames, TMExceptionBoxManager } from '
|
12
|
-
import TMSpinner from '
|
13
|
-
import TMTooltip from '
|
14
|
-
import { TMSearchBar } from '
|
7
|
+
import { SDKUI_Localizator, Globalization, svgToString, IconStar, IconDelete, IconDashboard, IconSavedQuery, IconAdvanced, IconLightningFill, IconApply } from '../../../helper';
|
8
|
+
import { TMColors } from '../../../utils/theme';
|
9
|
+
import ShowAlert from '../../base/TMAlert';
|
10
|
+
import TMButton from '../../base/TMButton';
|
11
|
+
import { TMMessageBoxManager, ButtonNames, TMExceptionBoxManager } from '../../base/TMPopUp';
|
12
|
+
import TMSpinner from '../../base/TMSpinner';
|
13
|
+
import TMTooltip from '../../base/TMTooltip';
|
14
|
+
import { TMSearchBar } from '../../sidebar/TMHeader';
|
15
15
|
const StyledSavedQueryListItem = styled.div `
|
16
16
|
display: flex;
|
17
17
|
flex-direction: row;
|
@@ -5,13 +5,13 @@ import TMSavedQuerySelector from './TMSavedQuerySelector';
|
|
5
5
|
import TMTreeSelector from './TMTreeSelector';
|
6
6
|
import { TabPanel, Item } from 'devextreme-react/tab-panel';
|
7
7
|
import TMSearchQueryPanel, { refreshLastSearch } from './TMSearchQueryPanel';
|
8
|
-
import { getSysAllDcmtsSQD, IconDataList, IconProgressReady, IconSavedQuery, IconTree, SDKUI_Globals, SDKUI_Localizator } from '
|
9
|
-
import TMLayoutContainer, { TMLayoutItem, TMSplitterLayout } from '
|
10
|
-
import TMToolbarCard from '
|
8
|
+
import { getSysAllDcmtsSQD, IconDataList, IconProgressReady, IconSavedQuery, IconTree, SDKUI_Globals, SDKUI_Localizator } from '../../../helper';
|
9
|
+
import TMLayoutContainer, { TMLayoutItem, TMSplitterLayout } from '../../base/TMLayout';
|
10
|
+
import TMToolbarCard from '../../base/TMToolbarCard';
|
11
11
|
import TMSearchResult from './TMSearchResult';
|
12
|
-
import TMRecentsManager from '
|
13
|
-
import { SearchResultContext } from '
|
14
|
-
import { useDeviceType, DeviceType } from '
|
12
|
+
import TMRecentsManager from '../../grids/TMRecentsManager';
|
13
|
+
import { SearchResultContext } from '../../../ts';
|
14
|
+
import { useDeviceType, DeviceType } from '../../base/TMDeviceProvider';
|
15
15
|
var TMSearchViews;
|
16
16
|
(function (TMSearchViews) {
|
17
17
|
TMSearchViews[TMSearchViews["None"] = 0] = "None";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { DcmtTypeDescriptor, QueryDescriptor } from '@topconsultnpm/sdk-ts-beta';
|
3
|
-
import { TID_MID } from '
|
3
|
+
import { TID_MID } from '../../../ts';
|
4
4
|
interface ITMSearchQueryEditorProps {
|
5
5
|
qd: QueryDescriptor | undefined;
|
6
6
|
fromDTD?: DcmtTypeDescriptor;
|
@@ -2,17 +2,17 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
3
3
|
import { LayoutModes, DcmtTypeListCacheService, PlatformObjectValidator, MetadataDataTypes, QueryOperators, DataListCacheService, MetadataDataDomains, SDK_Localizator, UserListCacheService } from '@topconsultnpm/sdk-ts-beta';
|
4
4
|
import styled from 'styled-components';
|
5
|
-
import { LocalizeQueryOperators, getDefaultOperator, SDKUI_Localizator, IconUndo, IconPencil, IconDataList, IconFunction, IconMenuVertical, IconClearButton, displayMetadataValue } from '
|
6
|
-
import { TMColors } from '
|
7
|
-
import { StyledDivHorizontal } from '
|
8
|
-
import TMButton from '
|
9
|
-
import { useDeviceType, DeviceType } from '
|
10
|
-
import TMDropDownMenu from '
|
11
|
-
import TMSpinner from '
|
12
|
-
import { FormulaHelper } from '
|
13
|
-
import TMMetadataEditor, { useMetadataEditableList } from '
|
14
|
-
import { colorOperator, StyledItemWrapper, StyledRowItem } from '
|
15
|
-
import { TMMidViewer } from '
|
5
|
+
import { LocalizeQueryOperators, getDefaultOperator, SDKUI_Localizator, IconUndo, IconPencil, IconDataList, IconFunction, IconMenuVertical, IconClearButton, displayMetadataValue } from '../../../helper';
|
6
|
+
import { TMColors } from '../../../utils/theme';
|
7
|
+
import { StyledDivHorizontal } from '../../base/Styled';
|
8
|
+
import TMButton from '../../base/TMButton';
|
9
|
+
import { useDeviceType, DeviceType } from '../../base/TMDeviceProvider';
|
10
|
+
import TMDropDownMenu from '../../base/TMDropDownMenu';
|
11
|
+
import TMSpinner from '../../base/TMSpinner';
|
12
|
+
import { FormulaHelper } from '../../editors/TMFormulaEditor';
|
13
|
+
import TMMetadataEditor, { useMetadataEditableList } from '../../editors/TMMetadataEditor';
|
14
|
+
import { colorOperator, StyledItemWrapper, StyledRowItem } from '../../query/TMQueryEditor';
|
15
|
+
import { TMMidViewer } from '../../viewers/TMMidViewer';
|
16
16
|
const StyledMetadataListItem = styled.div `
|
17
17
|
padding: 5px;
|
18
18
|
border-radius: 8px;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { DcmtTypeDescriptor, QueryDescriptor, SavedQueryDescriptor, SearchResultDescriptor } from '@topconsultnpm/sdk-ts-beta';
|
3
|
-
import { TID_MID } from '
|
4
|
-
import { ITMRightSidebarItem } from '
|
3
|
+
import { TID_MID } from '../../../ts';
|
4
|
+
import { ITMRightSidebarItem } from '../../base/TMRightSidebar';
|
5
5
|
interface ITMSearchQueryPanelProps {
|
6
6
|
fromDTD?: DcmtTypeDescriptor;
|
7
7
|
SQD?: SavedQueryDescriptor;
|
@@ -4,22 +4,22 @@ import { PlatformObjectValidator, WhereItem, SDK_Localizator, OrderByItem, Selec
|
|
4
4
|
import styled from 'styled-components';
|
5
5
|
import TMSearchQueryEditor from './TMSearchQueryEditor';
|
6
6
|
import Logo from '../../assets/Toppy-generico.png';
|
7
|
-
import { getDcmtTypesByQdAsync, SDKUI_Localizator, getQD, IconMenuVertical, IconAddCircleOutline, IconEdit, IconArchiveDoc, IconEasy, IconAdvanced, IconHide, IconShow, deepCompare, IconSearch, IconClear, getDefaultOperator, prepareQdForSearchAsync, IsParametricQuery } from '
|
8
|
-
import { useQueryParametersDialog } from '
|
9
|
-
import { FormModes } from '
|
10
|
-
import { TMColors } from '
|
11
|
-
import { StyledModalContainer } from '
|
12
|
-
import ShowAlert from '
|
13
|
-
import TMButton from '
|
14
|
-
import { useDeviceType, DeviceType } from '
|
15
|
-
import TMDropDownMenu from '
|
16
|
-
import TMLayoutContainer, { TMSplitterLayout, TMLayoutItem } from '
|
17
|
-
import { TMExceptionBoxManager } from '
|
18
|
-
import TMSpinner from '
|
19
|
-
import TMToolbarCard from '
|
20
|
-
import TMDistinctValues from '
|
21
|
-
import { TMMetadataChooserForm } from '
|
22
|
-
import TMQueryEditor from '
|
7
|
+
import { getDcmtTypesByQdAsync, SDKUI_Localizator, getQD, IconMenuVertical, IconAddCircleOutline, IconEdit, IconArchiveDoc, IconEasy, IconAdvanced, IconHide, IconShow, deepCompare, IconSearch, IconClear, getDefaultOperator, prepareQdForSearchAsync, IsParametricQuery } from '../../../helper';
|
8
|
+
import { useQueryParametersDialog } from '../../../hooks/useQueryParametersDialog';
|
9
|
+
import { FormModes } from '../../../ts';
|
10
|
+
import { TMColors } from '../../../utils/theme';
|
11
|
+
import { StyledModalContainer } from '../../base/Styled';
|
12
|
+
import ShowAlert from '../../base/TMAlert';
|
13
|
+
import TMButton from '../../base/TMButton';
|
14
|
+
import { useDeviceType, DeviceType } from '../../base/TMDeviceProvider';
|
15
|
+
import TMDropDownMenu from '../../base/TMDropDownMenu';
|
16
|
+
import TMLayoutContainer, { TMSplitterLayout, TMLayoutItem } from '../../base/TMLayout';
|
17
|
+
import { TMExceptionBoxManager } from '../../base/TMPopUp';
|
18
|
+
import TMSpinner from '../../base/TMSpinner';
|
19
|
+
import TMToolbarCard from '../../base/TMToolbarCard';
|
20
|
+
import TMDistinctValues from '../../choosers/TMDistinctValues';
|
21
|
+
import { TMMetadataChooserForm } from '../../choosers/TMMetadataChooser';
|
22
|
+
import TMQueryEditor from '../../query/TMQueryEditor';
|
23
23
|
import TMSavedQueryForm from './TMSavedQueryForm';
|
24
24
|
const TMSearchQueryPanel = ({ fromDTD, rightSidebarItems, isOpenDistinctValuesPanel = false, SQD, onRightSidebarItemClick, onSearchCompleted, onFocusedMetadataChanged, onCloseDistinctValuesPanel, onSqdSaved }) => {
|
25
25
|
const [confirmQueryParams, ConfirmQueryParamsDialog] = useQueryParametersDialog();
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { SearchResultDescriptor } from '@topconsultnpm/sdk-ts-beta';
|
3
|
-
import { SearchResultContext, TaskContext } from '
|
3
|
+
import { SearchResultContext, TaskContext } from '../../../ts';
|
4
4
|
interface ITMSearchResultProps {
|
5
5
|
context?: SearchResultContext;
|
6
6
|
title?: string;
|