@topconsultnpm/sdkui-react 6.22.0-t1 → 6.22.0-t2
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 +1 -1
- package/lib/components/NewComponents/ContextMenu/styles.d.ts +45 -43
- package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +1 -1
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +67 -60
- package/lib/components/base/Styled.d.ts +92 -76
- package/lib/components/base/TMButton.d.ts +13 -0
- package/lib/components/base/TMButton.js +137 -5
- package/lib/components/base/TMDataGrid.d.ts +2 -0
- package/lib/components/base/TMDataGrid.js +260 -8
- package/lib/components/base/TMDataGridExportForm.js +39 -30
- package/lib/components/base/TMEditorBase.d.ts +2 -0
- package/lib/components/base/TMFileManager.js +5 -3
- package/lib/components/base/TMFileManagerDataGridView.js +11 -2
- package/lib/components/base/TMFileManagerThumbnailItems.js +19 -9
- package/lib/components/base/TMFileManagerUtils.d.ts +6 -6
- package/lib/components/base/TMFileManagerUtils.js +37 -1
- package/lib/components/base/TMModal.d.ts +11 -0
- package/lib/components/base/TMModal.js +47 -13
- package/lib/components/base/TMPanel.d.ts +6 -0
- package/lib/components/base/TMPanel.js +138 -25
- package/lib/components/base/TMPopUp.js +3 -0
- package/lib/components/base/TMTooltip.d.ts +2 -1
- package/lib/components/base/TMTooltip.js +24 -8
- package/lib/components/base/TMTreeView.d.ts +13 -7
- package/lib/components/base/TMTreeView.js +108 -67
- package/lib/components/choosers/TMDcmtTypeChooser.js +4 -3
- package/lib/components/choosers/TMDistinctValues.d.ts +9 -7
- package/lib/components/choosers/TMDistinctValues.js +149 -142
- package/lib/components/choosers/TMMetadataChooser.js +1 -1
- package/lib/components/choosers/TMQuickSearchInfo.d.ts +13 -0
- package/lib/components/choosers/TMQuickSearchInfo.js +279 -0
- package/lib/components/choosers/TMQuickSearchSettingsForm.d.ts +16 -0
- package/lib/components/choosers/TMQuickSearchSettingsForm.js +94 -0
- package/lib/components/choosers/TMSelectedValuesSummary.d.ts +13 -0
- package/lib/components/choosers/TMSelectedValuesSummary.js +91 -0
- package/lib/components/editors/TMDateBox.d.ts +16 -1
- package/lib/components/editors/TMDateBox.js +90 -22
- package/lib/components/editors/TMDropDown.d.ts +3 -0
- package/lib/components/editors/TMDropDown.js +197 -5
- package/lib/components/editors/TMEditorStyled.d.ts +20 -42
- package/lib/components/editors/TMMetadataEditor.d.ts +5 -1
- package/lib/components/editors/TMMetadataEditor.js +27 -23
- package/lib/components/editors/TMTextArea.d.ts +1 -0
- package/lib/components/editors/TMTextArea.js +23 -15
- package/lib/components/editors/TMTextBox.d.ts +2 -0
- package/lib/components/editors/TMTextBox.js +30 -19
- package/lib/components/features/archive/TMArchive.js +17 -3
- package/lib/components/features/documents/TMBatchUpdateForm.js +19 -5
- package/lib/components/features/documents/TMDcmtBlog.d.ts +3 -0
- package/lib/components/features/documents/TMDcmtBlog.js +4 -4
- package/lib/components/features/documents/TMDcmtForm.d.ts +7 -0
- package/lib/components/features/documents/TMDcmtForm.js +232 -53
- package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +11 -0
- package/lib/components/features/documents/TMDcmtFormActionButtons.js +77 -7
- package/lib/components/features/documents/TMDcmtIcon.js +5 -3
- package/lib/components/features/documents/TMDcmtPreview.d.ts +7 -5
- package/lib/components/features/documents/TMDcmtPreview.js +10 -6
- package/lib/components/features/documents/TMMasterDetailDcmts.js +95 -33
- package/lib/components/features/documents/TMMasterInfoFields.d.ts +20 -0
- package/lib/components/features/documents/TMMasterInfoFields.js +186 -0
- package/lib/components/features/documents/TMMergeToPdfForm.d.ts +1 -2
- package/lib/components/features/documents/TMMergeToPdfForm.js +30 -5
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.d.ts +46 -0
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.js +323 -0
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +370 -0
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.js +283 -0
- package/lib/components/features/documents/TMRelationViewer.d.ts +14 -1
- package/lib/components/features/documents/TMRelationViewer.js +82 -52
- package/lib/components/features/search/TMSearch.js +103 -24
- package/lib/components/features/search/TMSearchQueryEditor.js +5 -3
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +14 -4
- package/lib/components/features/search/TMSearchQueryPanel.js +152 -57
- package/lib/components/features/search/TMSearchResult.d.ts +16 -0
- package/lib/components/features/search/TMSearchResult.js +438 -145
- package/lib/components/features/search/TMTreeSelector.js +109 -64
- package/lib/components/features/workflow/TMWorkflowPopup.d.ts +10 -0
- package/lib/components/features/workflow/TMWorkflowPopup.js +8 -4
- package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.d.ts +3 -1
- package/lib/components/forms/Login/ChangePasswordInputs.d.ts +3 -1
- package/lib/components/grids/TMBlogAttachments.js +13 -2
- package/lib/components/grids/TMBlogHeader.js +5 -1
- package/lib/components/grids/TMBlogsPost.d.ts +2 -0
- package/lib/components/grids/TMBlogsPost.js +31 -4
- package/lib/components/grids/TMBlogsPostUtils.d.ts +1 -0
- package/lib/components/grids/TMBlogsPostUtils.js +14 -3
- package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +1 -0
- package/lib/components/layout/panelManager/TMPanelManagerContainer.js +24 -14
- package/lib/components/layout/panelManager/TMPanelManagerContext.js +68 -93
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +4 -5
- package/lib/components/layout/panelManager/TMPanelWrapper.js +2 -2
- package/lib/components/layout/panelManager/types.d.ts +3 -0
- package/lib/components/layout/panelManager/utils.js +13 -11
- package/lib/components/query/TMQueryEditor.d.ts +14 -10
- package/lib/components/sidebar/TMCommandsPanel.d.ts +4 -4
- package/lib/components/sidebar/TMHeader.js +30 -20
- package/lib/components/viewers/TMMidViewer.js +5 -2
- package/lib/components/viewers/TMTidViewer.js +86 -25
- package/lib/css/tm-sdkui.css +1 -1
- package/lib/devextreme-license.d.ts +1 -0
- package/lib/devextreme-license.js +3 -0
- package/lib/helper/Globalization.d.ts +1 -1
- package/lib/helper/SDKUI_Globals.d.ts +110 -0
- package/lib/helper/SDKUI_Globals.js +151 -0
- package/lib/helper/SDKUI_Localizator.d.ts +55 -0
- package/lib/helper/SDKUI_Localizator.js +550 -0
- package/lib/helper/TMAppUpdatedModal.d.ts +2 -0
- package/lib/helper/TMAppUpdatedModal.js +134 -0
- package/lib/helper/TMIcons.d.ts +1 -0
- package/lib/helper/TMIcons.js +3 -0
- package/lib/helper/TMUtils.d.ts +51 -4
- package/lib/helper/TMUtils.js +272 -11
- package/lib/helper/dataGridSearchHelper.d.ts +28 -0
- package/lib/helper/dataGridSearchHelper.js +51 -0
- package/lib/helper/dcmtsHelper.d.ts +20 -0
- package/lib/helper/dcmtsHelper.js +58 -1
- package/lib/helper/helpers.d.ts +23 -1
- package/lib/helper/helpers.js +57 -1
- package/lib/helper/index.d.ts +2 -0
- package/lib/helper/index.js +2 -0
- package/lib/helper/queryHelper.d.ts +6 -1
- package/lib/helper/queryHelper.js +8 -3
- package/lib/hooks/tmDistinctValuesGridHelper.d.ts +16 -0
- package/lib/hooks/tmDistinctValuesGridHelper.js +31 -0
- package/lib/hooks/useArchiveListForm.d.ts +39 -0
- package/lib/hooks/useArchiveListForm.js +46 -0
- package/lib/hooks/useCaseFlowApprove.d.ts +56 -0
- package/lib/hooks/useCaseFlowApprove.js +157 -0
- package/lib/hooks/useDataUserIdItem.d.ts +1 -0
- package/lib/hooks/useDataUserIdItem.js +1 -0
- package/lib/hooks/useDocumentOperations.d.ts +4 -0
- package/lib/hooks/useDocumentOperations.js +52 -10
- package/lib/hooks/useMultiMasterDetailDcmts.d.ts +113 -0
- package/lib/hooks/useMultiMasterDetailDcmts.js +760 -0
- package/lib/hooks/useRelatedDocuments.d.ts +1 -0
- package/lib/hooks/useRelatedDocuments.js +22 -27
- package/lib/hooks/useShowDossiersV5.d.ts +12 -0
- package/lib/hooks/useShowDossiersV5.js +37 -0
- package/lib/hooks/useTMDistinctValuesMetadataDisplay.d.ts +18 -0
- package/lib/hooks/useTMDistinctValuesMetadataDisplay.js +103 -0
- package/lib/hooks/useTMDistinctValuesQuickSearch.d.ts +49 -0
- package/lib/hooks/useTMDistinctValuesQuickSearch.js +307 -0
- package/lib/hooks/useTMDistinctValuesSelection.d.ts +42 -0
- package/lib/hooks/useTMDistinctValuesSelection.js +103 -0
- package/lib/hooks/useTMDistinctValuesSource.d.ts +29 -0
- package/lib/hooks/useTMDistinctValuesSource.js +105 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +5 -2
- package/lib/services/caseflow/CaseFlowService.d.ts +236 -0
- package/lib/services/caseflow/CaseFlowService.js +693 -0
- package/lib/services/caseflow/CaseFlowTemplateCacheService.d.ts +28 -0
- package/lib/services/caseflow/CaseFlowTemplateCacheService.js +121 -0
- package/lib/services/caseflow/caseFlowNameCache.d.ts +32 -0
- package/lib/services/caseflow/caseFlowNameCache.js +116 -0
- package/lib/services/caseflow/caseFlowWorkItemUtils.d.ts +61 -0
- package/lib/services/caseflow/caseFlowWorkItemUtils.js +113 -0
- package/lib/services/index.d.ts +4 -0
- package/lib/services/index.js +4 -0
- package/lib/services/platform_services.d.ts +1 -1
- package/package.json +9 -5
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
|
-
import { getDTDDisplayNameInfo, IconDcmtType, IconDcmtTypeOnlyMetadata, IconLocked, IconView, isCreateCertificateEnabled, isPdfEditorEnabled, isSign4TopEnabled, LocalizeArchiveConstraints, LocalizeParametricFilterTypes, SDKUI_Localizator, TMImageLibrary } from '../../helper';
|
|
3
|
+
import { getDTDDisplayNameInfo, IconDcmtType, IconDcmtTypeOnlyMetadata, IconLocked, IconView, isCreateCertificateEnabled, isPdfEditorEnabled, isSign4TopEnabled, LocalizeArchiveConstraints, isNotGrantedDTD, LocalizeParametricFilterTypes, SDKUI_Localizator, TMImageLibrary } from '../../helper';
|
|
4
4
|
import { AccessLevels, AccessLevelsEx, ArchiveConstraints, DcmtTypeListCacheService, OwnershipLevels, ParametricFilterTypes, SDK_Globals, SDK_Localizator, TemplateTIDs } from '@topconsultnpm/sdk-ts';
|
|
5
5
|
import TMSpinner from '../base/TMSpinner';
|
|
6
6
|
import { StyledDivHorizontal, StyledTooltipContainer, StyledTooltipItem, StyledTooltipSeparatorItem } from '../base/Styled';
|
|
7
7
|
import TMTooltip from '../base/TMTooltip';
|
|
8
8
|
import { TMColors } from '../../utils/theme';
|
|
9
|
+
import styled, { keyframes } from 'styled-components';
|
|
9
10
|
export var ImageIDList;
|
|
10
11
|
(function (ImageIDList) {
|
|
11
12
|
ImageIDList["arrow_001"] = "arrow_001";
|
|
@@ -242,7 +243,7 @@ export const TMDcmtTypeIcon = ({ dtd }) => {
|
|
|
242
243
|
if (!dtd)
|
|
243
244
|
return null;
|
|
244
245
|
let icon = null;
|
|
245
|
-
if (dtd
|
|
246
|
+
if (isNotGrantedDTD(dtd))
|
|
246
247
|
icon = _jsx(IconLocked, { fontSize: 16 });
|
|
247
248
|
else if (dtd.imageID && dtd.imageID.length > 0)
|
|
248
249
|
icon = _jsx(TMImageLibrary, { imageID: dtd.imageID });
|
|
@@ -259,33 +260,77 @@ export const TMDcmtTypeIcon = ({ dtd }) => {
|
|
|
259
260
|
return (_jsx(TMDcmtTypeTooltip, { dtd: dtd, children: icon }));
|
|
260
261
|
};
|
|
261
262
|
export const TMDcmtTypeTooltip = ({ dtd, children }) => {
|
|
262
|
-
return (_jsx("div", { style: { pointerEvents: 'all' }, children: _jsx(TMTooltip, { content: renderDTDTooltipContent(dtd), children: children }) }));
|
|
263
|
+
return (_jsx("div", { style: { pointerEvents: 'all' }, children: _jsx(TMTooltip, { allowContentInteraction: true, content: renderDTDTooltipContent(dtd), children: children }) }));
|
|
263
264
|
};
|
|
265
|
+
/** Legge il tipo documento dalle cache dell'SDK senza passare dal mutex. Serve perché
|
|
266
|
+
* l'espansione di una cartella nell'albero ricrea tutte le celle: senza una lettura sincrona
|
|
267
|
+
* ogni riga tornerebbe a mostrare il testo di "nessuna selezione" fino alla fine delle
|
|
268
|
+
* richieste (una per TID, serializzate dal mutex).
|
|
269
|
+
* GetCache restituisce le mappe vive usate dall'SDK, quindi le invalidazioni
|
|
270
|
+
* (RemoveAllWithMetadata, RemoveAllWithoutMetadata, logout) hanno effetto immediato. */
|
|
271
|
+
const getCachedDTD = (tid, tmSession) => {
|
|
272
|
+
if (!tid || tid <= 0)
|
|
273
|
+
return undefined;
|
|
274
|
+
const accessToken = (tmSession ?? SDK_Globals.tmSession)?.SessionDescr?.accessToken;
|
|
275
|
+
if (!accessToken)
|
|
276
|
+
return undefined;
|
|
277
|
+
// La cache senza metadati è popolata dalla login: copre già i tipi documento autorizzati
|
|
278
|
+
return DcmtTypeListCacheService.GetCache(false).get(accessToken)?.find(o => o.id === tid)
|
|
279
|
+
?? DcmtTypeListCacheService.GetCache(true).get(accessToken)?.find(o => o.id === tid);
|
|
280
|
+
};
|
|
281
|
+
const shimmer = keyframes `
|
|
282
|
+
0% { background-position: 200% 0; }
|
|
283
|
+
100% { background-position: -200% 0; }
|
|
284
|
+
`;
|
|
285
|
+
/** Segnaposto animato mostrato al posto del nome durante il caricamento.
|
|
286
|
+
* Grigio semitrasparente: leggibile sia su sfondo chiaro che scuro. */
|
|
287
|
+
const StyledTidSkeleton = styled.span `
|
|
288
|
+
display: inline-block;
|
|
289
|
+
flex: 0 0 auto;
|
|
290
|
+
width: 90px;
|
|
291
|
+
height: 0.9em;
|
|
292
|
+
border-radius: 4px;
|
|
293
|
+
background-image: linear-gradient(90deg, rgba(127, 127, 127, 0.12) 25%, rgba(127, 127, 127, 0.28) 50%, rgba(127, 127, 127, 0.12) 75%);
|
|
294
|
+
background-size: 200% 100%;
|
|
295
|
+
animation: ${shimmer} 1.4s ease-in-out infinite;
|
|
296
|
+
|
|
297
|
+
@media (prefers-reduced-motion: reduce) { animation: none; }
|
|
298
|
+
`;
|
|
264
299
|
const TMTidViewer = ({ tmSession, tid, did, showIcon = false, color, showId = false, noneSelectionText = `<${SDKUI_Localizator.NoneSelection}>` }) => {
|
|
265
|
-
const
|
|
300
|
+
const accessToken = (tmSession ?? SDK_Globals.tmSession)?.SessionDescr?.accessToken;
|
|
301
|
+
const [dtd, setDtd] = useState(() => getCachedDTD(tid, tmSession));
|
|
302
|
+
const [isLoading, setIsLoading] = useState(() => !!tid && tid > 0 && !getCachedDTD(tid, tmSession));
|
|
266
303
|
const fetchData = async (tid, did) => {
|
|
267
304
|
if (!tid || tid <= 0) {
|
|
268
305
|
setDtd(undefined);
|
|
306
|
+
setIsLoading(false);
|
|
269
307
|
return;
|
|
270
308
|
}
|
|
309
|
+
const cached = getCachedDTD(tid, tmSession);
|
|
310
|
+
if (cached)
|
|
311
|
+
setDtd(cached);
|
|
312
|
+
setIsLoading(!cached);
|
|
271
313
|
let count = DcmtTypeListCacheService.CacheCount(true, 'all', tmSession);
|
|
272
314
|
if (count <= 0)
|
|
273
315
|
TMSpinner.show({ description: `${SDKUI_Localizator.Loading} - ${SDK_Localizator.ListDcmtTypeOrView} ...` });
|
|
274
316
|
try {
|
|
275
|
-
let resultDTD = await DcmtTypeListCacheService.GetAsync(tid);
|
|
317
|
+
let resultDTD = await DcmtTypeListCacheService.GetAsync(tid, true, tmSession);
|
|
276
318
|
if (!resultDTD) {
|
|
277
|
-
resultDTD = await DcmtTypeListCacheService.GetWithNotGrantedAsync(tid, did);
|
|
319
|
+
resultDTD = await DcmtTypeListCacheService.GetWithNotGrantedAsync(tid, did, undefined, true, tmSession);
|
|
278
320
|
}
|
|
279
321
|
setDtd(resultDTD);
|
|
280
322
|
}
|
|
281
323
|
finally {
|
|
282
324
|
if (count <= 0)
|
|
283
325
|
TMSpinner.hide();
|
|
326
|
+
setIsLoading(false);
|
|
284
327
|
}
|
|
285
328
|
};
|
|
329
|
+
// accessToken e non tmSession: la sessione è un oggetto e un'identità nuova a ogni render
|
|
330
|
+
// del chiamante rifarebbe la richiesta senza motivo
|
|
286
331
|
useEffect(() => {
|
|
287
332
|
fetchData(tid, did);
|
|
288
|
-
}, [tid, did]);
|
|
333
|
+
}, [tid, did, accessToken]);
|
|
289
334
|
const displayName = () => {
|
|
290
335
|
if (!dtd)
|
|
291
336
|
return noneSelectionText;
|
|
@@ -295,31 +340,47 @@ const TMTidViewer = ({ tmSession, tid, did, showIcon = false, color, showId = fa
|
|
|
295
340
|
whiteSpace: 'nowrap',
|
|
296
341
|
overflow: 'hidden',
|
|
297
342
|
textOverflow: 'ellipsis'
|
|
298
|
-
}, children: [showIcon && dtd && _jsx(TMDcmtTypeIcon, { dtd: dtd }),
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
343
|
+
}, children: [showIcon && dtd && _jsx(TMDcmtTypeIcon, { dtd: dtd }), isLoading && !dtd
|
|
344
|
+
? _jsx(StyledTidSkeleton, { title: `${SDKUI_Localizator.Loading} ...`, style: { marginLeft: showIcon ? '5px' : undefined } })
|
|
345
|
+
: _jsx("p", { title: displayName(), style: {
|
|
346
|
+
textAlign: 'left',
|
|
347
|
+
margin: 0,
|
|
348
|
+
marginLeft: showIcon ? '5px' : '',
|
|
349
|
+
color: dtd?.isView ? 'red' : (color ?? TMColors.primary),
|
|
350
|
+
whiteSpace: 'nowrap',
|
|
351
|
+
overflow: 'hidden',
|
|
352
|
+
textOverflow: 'ellipsis',
|
|
353
|
+
// paddingRight: '10px'
|
|
354
|
+
}, children: displayName() }), showId && _jsx("p", { style: { padding: '0px 3px', margin: 0 }, children: `(TID: ${tid})` })] }));
|
|
307
355
|
};
|
|
308
356
|
export default TMTidViewer;
|
|
309
357
|
export const cellRenderTID = (data, noneSelectionText) => {
|
|
310
358
|
return (_jsx(TMTidViewer, { tid: data.value, noneSelectionText: noneSelectionText }));
|
|
311
359
|
};
|
|
312
|
-
/**
|
|
360
|
+
/** Metodi di visualizzazione già richiesti, per non ricaricare i metadati ad ogni riapertura del tooltip */
|
|
361
|
+
const displayNameMethodCache = new Map();
|
|
313
362
|
const TMDisplayNameMethodItem = ({ dtd }) => {
|
|
314
|
-
const [displayNameMethod, setDisplayNameMethod] = useState(
|
|
315
|
-
|
|
316
|
-
|
|
363
|
+
const [displayNameMethod, setDisplayNameMethod] = useState(() => dtd.id ? displayNameMethodCache.get(dtd.id) : undefined);
|
|
364
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
365
|
+
const onShowClick = async (e) => {
|
|
366
|
+
/* Un click qualsiasi chiude il tooltip: senza questo il risultato non sarebbe mai visibile */
|
|
367
|
+
e.stopPropagation();
|
|
368
|
+
if (isLoading || displayNameMethod)
|
|
369
|
+
return;
|
|
370
|
+
setIsLoading(true);
|
|
371
|
+
try {
|
|
317
372
|
const method = await getDTDDisplayNameInfo(dtd);
|
|
373
|
+
if (dtd.id)
|
|
374
|
+
displayNameMethodCache.set(dtd.id, method);
|
|
318
375
|
setDisplayNameMethod(method);
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
376
|
+
}
|
|
377
|
+
finally {
|
|
378
|
+
setIsLoading(false);
|
|
379
|
+
}
|
|
380
|
+
};
|
|
381
|
+
return (_jsxs(StyledTooltipItem, { children: [`${SDKUI_Localizator.DisplayNameMethod}: `, displayNameMethod ?? (isLoading
|
|
382
|
+
? `${SDKUI_Localizator.Loading} ...`
|
|
383
|
+
: _jsx("span", { style: { color: TMColors.primary, cursor: 'pointer', textDecoration: 'underline' }, onClick: onShowClick, children: SDKUI_Localizator.Details }))] }));
|
|
323
384
|
};
|
|
324
385
|
export const renderDTDTooltipContent = (dtd) => {
|
|
325
386
|
const mapAccessLevelToLocalizedString = (level) => {
|
|
@@ -341,7 +402,7 @@ export const renderDTDTooltipContent = (dtd) => {
|
|
|
341
402
|
}
|
|
342
403
|
};
|
|
343
404
|
return (!dtd ? null
|
|
344
|
-
: _jsxs(StyledTooltipContainer, { children: [_jsx(StyledTooltipItem, { children: `${SDK_Globals.useLocalizedName ? dtd.nameLoc : dtd.name} (${dtd.isView ? 'VID' : 'TID'}: ${dtd.id}, RootTID: ${dtd.rootTID ?? 0})` }), dtd.description && _jsx(StyledTooltipItem, { children: dtd.description }), _jsx(StyledTooltipSeparatorItem, {}), dtd
|
|
405
|
+
: _jsxs(StyledTooltipContainer, { children: [_jsx(StyledTooltipItem, { children: `${SDK_Globals.useLocalizedName ? dtd.nameLoc : dtd.name} (${dtd.isView ? 'VID' : 'TID'}: ${dtd.id}, RootTID: ${dtd.rootTID ?? 0})` }), dtd.description && _jsx(StyledTooltipItem, { children: dtd.description }), _jsx(StyledTooltipSeparatorItem, {}), isNotGrantedDTD(dtd)
|
|
345
406
|
? _jsx(StyledTooltipItem, { style: { fontWeight: 600 }, children: 'Tipo documento NON autorizzato' })
|
|
346
407
|
:
|
|
347
408
|
_jsxs(_Fragment, { children: [_jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.ArchiveConstraint}: ${LocalizeArchiveConstraints(dtd.archiveConstraint)}` }), dtd.isView && dtd.parametricFilterType != ParametricFilterTypes.None && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.ParametricFilter}: ${LocalizeParametricFilterTypes(dtd.parametricFilterType)}` }), dtd.isView && dtd.withCheckOption && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.ViewWithCheckOption}: ${SDKUI_Localizator.Yes}` }), dtd.isLexProt && dtd.isLexProt > 0 && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.Yes}` }), dtd.isFreeSearchable && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Search_Free}: ${SDKUI_Localizator.Yes}` }), dtd.templateTID && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Template}: ${dtd.templateTID}` }), dtd.traceTID && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Tracing}: ${SDKUI_Localizator.Yes} - ${dtd.templateTID == TemplateTIDs.Trace_DcmtType ? SDKUI_Localizator.Destination : SDKUI_Localizator.Source} ${dtd.traceTID < 0 ? SDKUI_Localizator.Disabled : ''}` }), dtd.wfAppr && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.WorkflowApproval}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.BlogCase}: ${dtd.hasBlog ? SDKUI_Localizator.Yes : SDKUI_Localizator.No}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.CheckIn}: ${dtd.cico ? SDKUI_Localizator.Yes : SDKUI_Localizator.No}` }), dtd.perm ?
|
package/lib/css/tm-sdkui.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap";@import"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap";*{margin:0;padding:0;box-sizing:border-box;font-family:"Open Sans",sans-serif}.tm-tooltip-container-base,.tm-tooltip-container-base-right,.tm-tooltip-container-base-bottom,.tm-tooltip-container-base-left,.tm-tooltip-container-base-top{position:absolute;width:max-content;height:max-content;border-radius:5px;user-select:none;z-index:20000070}.tm-tooltip-container-base-top{top:-0.8rem;left:0;transform:translateY(-100%)}.tm-tooltip-container-base-left{left:-0.8rem;top:0;transform:translateX(-100%)}.tm-tooltip-container-base-bottom{bottom:-0.8rem;left:0;transform:translateY(100%)}.tm-tooltip-container-base-right{right:-0.8rem;top:0;transform:translateX(100%)}.tm-tooltip-arrow,.tm-tooltip-arrow-right,.tm-tooltip-arrow-left,.tm-tooltip-arrow-top,.tm-tooltip-arrow-bottom{position:absolute;width:0;height:0;z-index:50000}.tm-tooltip-arrow-bottom{top:-8px;left:8px;border-bottom:9px solid #fff;border-left:9px solid rgba(0,0,0,0);border-right:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-top{bottom:-8px;left:8px;border-top:9px solid #fff;border-left:9px solid rgba(0,0,0,0);border-right:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-left{top:8px;right:-8px;border-left:9px solid #fff;border-top:9px solid rgba(0,0,0,0);border-bottom:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-right{top:8px;left:-8px;border-right:9px solid #fff;border-top:9px solid rgba(0,0,0,0);border-bottom:9px solid rgba(0,0,0,0)}#user-credentials-popup .dx-accordion-item-title::before{content:none !important}*{margin:0;padding:0;box-sizing:border-box;font-family:"Open Sans",sans-serif}.tm-tooltip-container-base,.tm-tooltip-container-base-top,.tm-tooltip-container-base-left,.tm-tooltip-container-base-bottom,.tm-tooltip-container-base-right{position:absolute;width:max-content;height:max-content;border-radius:5px;user-select:none;z-index:20000070}.tm-tooltip-container-base-top{top:-0.8rem;left:0;transform:translateY(-100%)}.tm-tooltip-container-base-left{left:-0.8rem;top:0;transform:translateX(-100%)}.tm-tooltip-container-base-bottom{bottom:-0.8rem;left:0;transform:translateY(100%)}.tm-tooltip-container-base-right{right:-0.8rem;top:0;transform:translateX(100%)}.tm-tooltip-arrow,.tm-tooltip-arrow-bottom,.tm-tooltip-arrow-top,.tm-tooltip-arrow-left,.tm-tooltip-arrow-right{position:absolute;width:0;height:0;z-index:50000}.tm-tooltip-arrow-bottom{top:-8px;left:8px;border-bottom:9px solid #fff;border-left:9px solid rgba(0,0,0,0);border-right:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-top{bottom:-8px;left:8px;border-top:9px solid #fff;border-left:9px solid rgba(0,0,0,0);border-right:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-left{top:8px;right:-8px;border-left:9px solid #fff;border-top:9px solid rgba(0,0,0,0);border-bottom:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-right{top:8px;left:-8px;border-right:9px solid #fff;border-top:9px solid rgba(0,0,0,0);border-bottom:9px solid rgba(0,0,0,0)}#user-credentials-popup .dx-accordion-item-title::before{content:none !important}@keyframes show-error{0%{display:none;opacity:0;z-index:20000999}5%{display:block;opacity:1;z-index:20000999}95%{display:block;opacity:1;z-index:20000999}100%{opacity:0;display:none;z-index:20000999}}.tm-alert-animation-style{animation:show-error both;animation-timing-function:linear;animation-iteration-count:none;z-index:20000999}.tm-alert-container{position:absolute;width:100%;height:100%;z-index:20000999}@keyframes loading{from{width:0}to{width:100%}}.tm-alert-loading{width:100%;height:5px;position:absolute;bottom:0;left:0;animation:loading;animation-duration:5000ms}.tm-alert-icon{position:absolute;width:22px;height:22px;background-color:#fff;top:"20px";left:"20px";border-radius:50%;display:flex;align-items:center;justify-content:center}.dx-context-menu.dx-overlay-content{height:auto !important;max-height:none !important}.dx-context-menu .dx-menu-items-container{max-height:none !important}.custom-mentions-wrapper span.dx-mention span[contenteditable=false]>span:first-child{font-size:0;width:0;display:inline-block;overflow:hidden}.custom-mentions-wrapper span.dx-mention{color:#2559a5;font-weight:bold;background-color:rgba(0,0,0,0)}.dx-treeview-node.dx-treeview-item-with-checkbox.dx-state-selected.dx-treeview-root-node.dx-treeview-node-is-leaf[aria-disabled=true]{display:none !important}
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap";@import"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap";*{margin:0;padding:0;box-sizing:border-box;font-family:"Open Sans",sans-serif}.tm-tooltip-container-base,.tm-tooltip-container-base-right,.tm-tooltip-container-base-bottom,.tm-tooltip-container-base-left,.tm-tooltip-container-base-top{position:absolute;width:max-content;height:max-content;border-radius:5px;user-select:none;z-index:20000070}.tm-tooltip-container-base-top{top:-0.8rem;left:0;transform:translateY(-100%)}.tm-tooltip-container-base-left{left:-0.8rem;top:0;transform:translateX(-100%)}.tm-tooltip-container-base-bottom{bottom:-0.8rem;left:0;transform:translateY(100%)}.tm-tooltip-container-base-right{right:-0.8rem;top:0;transform:translateX(100%)}.tm-tooltip-arrow,.tm-tooltip-arrow-right,.tm-tooltip-arrow-left,.tm-tooltip-arrow-top,.tm-tooltip-arrow-bottom{position:absolute;width:0;height:0;z-index:50000}.tm-tooltip-arrow-bottom{top:-8px;left:8px;border-bottom:9px solid #fff;border-left:9px solid rgba(0,0,0,0);border-right:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-top{bottom:-8px;left:8px;border-top:9px solid #fff;border-left:9px solid rgba(0,0,0,0);border-right:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-left{top:8px;right:-8px;border-left:9px solid #fff;border-top:9px solid rgba(0,0,0,0);border-bottom:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-right{top:8px;left:-8px;border-right:9px solid #fff;border-top:9px solid rgba(0,0,0,0);border-bottom:9px solid rgba(0,0,0,0)}#user-credentials-popup .dx-accordion-item-title::before{content:none !important}*{margin:0;padding:0;box-sizing:border-box;font-family:"Open Sans",sans-serif}.tm-tooltip-container-base,.tm-tooltip-container-base-top,.tm-tooltip-container-base-left,.tm-tooltip-container-base-bottom,.tm-tooltip-container-base-right{position:absolute;width:max-content;height:max-content;border-radius:5px;user-select:none;z-index:20000070}.tm-tooltip-container-base-top{top:-0.8rem;left:0;transform:translateY(-100%)}.tm-tooltip-container-base-left{left:-0.8rem;top:0;transform:translateX(-100%)}.tm-tooltip-container-base-bottom{bottom:-0.8rem;left:0;transform:translateY(100%)}.tm-tooltip-container-base-right{right:-0.8rem;top:0;transform:translateX(100%)}.tm-tooltip-arrow,.tm-tooltip-arrow-bottom,.tm-tooltip-arrow-top,.tm-tooltip-arrow-left,.tm-tooltip-arrow-right{position:absolute;width:0;height:0;z-index:50000}.tm-tooltip-arrow-bottom{top:-8px;left:8px;border-bottom:9px solid #fff;border-left:9px solid rgba(0,0,0,0);border-right:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-top{bottom:-8px;left:8px;border-top:9px solid #fff;border-left:9px solid rgba(0,0,0,0);border-right:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-left{top:8px;right:-8px;border-left:9px solid #fff;border-top:9px solid rgba(0,0,0,0);border-bottom:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-right{top:8px;left:-8px;border-right:9px solid #fff;border-top:9px solid rgba(0,0,0,0);border-bottom:9px solid rgba(0,0,0,0)}#user-credentials-popup .dx-accordion-item-title::before{content:none !important}@keyframes show-error{0%{display:none;opacity:0;z-index:20000999}5%{display:block;opacity:1;z-index:20000999}95%{display:block;opacity:1;z-index:20000999}100%{opacity:0;display:none;z-index:20000999}}.tm-alert-animation-style{animation:show-error both;animation-timing-function:linear;animation-iteration-count:none;z-index:20000999}.tm-alert-container{position:absolute;width:100%;height:100%;z-index:20000999}@keyframes loading{from{width:0}to{width:100%}}.tm-alert-loading{width:100%;height:5px;position:absolute;bottom:0;left:0;animation:loading;animation-duration:5000ms}.tm-alert-icon{position:absolute;width:22px;height:22px;background-color:#fff;top:"20px";left:"20px";border-radius:50%;display:flex;align-items:center;justify-content:center}.dx-context-menu.dx-overlay-content{height:auto !important;max-height:none !important}.dx-context-menu .dx-menu-items-container{max-height:none !important}.custom-mentions-wrapper span.dx-mention span[contenteditable=false]>span:first-child{font-size:0;width:0;display:inline-block;overflow:hidden}.custom-mentions-wrapper span.dx-mention{color:#2559a5;font-weight:bold;background-color:rgba(0,0,0,0)}.dx-treeview-node.dx-treeview-item-with-checkbox.dx-state-selected.dx-treeview-root-node.dx-treeview-node-is-leaf[aria-disabled=true]{display:none !important}.dx-overlay-wrapper.dx-tooltip-wrapper{z-index:1540 !important}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const licenseKey = "LCPv1(%@j2<F<eQy:2N+f,7R@!i)BcQ,N374Qe%m;9etySj@gGntp77@@:<VJ77@j!_t<%yd-Siei,7FYV%!G>7a(cj%z3Ltv!ot1SeaicLr[3o,6>H:1(e,jSQt$3bREp%tv%H+4InRJ3J88Gn+aIidEee--SQVb,yVH7QRgSpm:2be9I%,;Z+Qmk%!<9jyG6%!6pLdQ6Lt<!N-Q%iR)6%fBIR+:2<)<!Qr->%X<2p@62%!F2bR62<-$2i-)2i-FI%d@G<-@!jy$2iRQ6b-v!jyvIg!:ajzvaj@Fpg!$2b-FIp9;9K-:>Q4:G_@@9Qdv6<!F6<dFI7yFI7yFI7Ll";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// Auto-generated by devextreme-license.
|
|
2
|
+
// Do not commit this file to source control.
|
|
3
|
+
export const licenseKey = 'LCPv1(%@j2<F<eQy:2N+f,7R@!i)BcQ,N374Qe%m;9etySj@gGntp77@@:<VJ77@j!_t<%yd-Siei,7FYV%!G>7a(cj%z3Ltv!ot1SeaicLr[3o,6>H:1(e,jSQt$3bREp%tv%H+4InRJ3J88Gn+aIidEee--SQVb,yVH7QRgSpm:2be9I%,;Z+Qmk%!<9jyG6%!6pLdQ6Lt<!N-Q%iR)6%fBIR+:2<)<!Qr->%X<2p@62%!F2bR62<-$2i-)2i-FI%d@G<-@!jy$2iRQ6b-v!jyvIg!:ajzvaj@Fpg!$2b-FIp9;9K-:>Q4:G_@@9Qdv6<!F6<dFI7yFI7yFI7Ll';
|
|
@@ -9,7 +9,7 @@ export declare class Globalization {
|
|
|
9
9
|
static getDateTimeDisplayValueCompact(value: Date | string | undefined, displayType?: DateDisplayTypes, metadataFormat?: MetadataFormats): string;
|
|
10
10
|
static getDateDisplayFormat(displayType?: DateDisplayTypes): string;
|
|
11
11
|
static getNumberDisplayValue(value: Number, withThousandsSeparator?: boolean, numberDisplayFormat?: string): string;
|
|
12
|
-
static metadataFormatToDateDisplayFormat(format: MetadataFormats): "" | "
|
|
12
|
+
static metadataFormatToDateDisplayFormat(format: MetadataFormats): "" | "dd/MM/yyyy" | "HH:mm" | "HH:mm:ss" | "MM/dd/yyyy" | "EEEE dd MMMM yyyy" | "MM/dd/yyyy HH:mm:ss" | "dd/MM/yyyy HH:mm:ss" | "MM/dd/yyyy HH:mm" | "dd/MM/yyyy HH:mm" | "EEEE dd MMMM yyyy HH:mm" | "EEEE dd MMMM yyyy HH:mm:ss";
|
|
13
13
|
static getDecimalSeparator(): string | undefined;
|
|
14
14
|
static getThousandsSeparator(): string | undefined;
|
|
15
15
|
}
|
|
@@ -37,6 +37,7 @@ export declare class UserSettings {
|
|
|
37
37
|
dcmtCheckoutInfo: CheckoutInfo[];
|
|
38
38
|
defaultCheckInOutFolder: string;
|
|
39
39
|
documentDownloadSettings: DocumentDownloadSettings;
|
|
40
|
+
lastSeenAppVersion: string;
|
|
40
41
|
constructor(skipCssUpdate?: boolean);
|
|
41
42
|
/** Load settings from local storage or other sources */
|
|
42
43
|
static LoadSettings(userID: number | undefined, archiveID: string | undefined): UserSettings;
|
|
@@ -67,6 +68,18 @@ export declare class ThemeSettings {
|
|
|
67
68
|
export declare const DEFAULT_PREVIEW_THRESHOLD = 500;
|
|
68
69
|
export declare const DEFAULT_PAGE_SIZE = 100;
|
|
69
70
|
export declare const DEFAULT_MAX_DCMTS_TO_BE_RETURNED = 200;
|
|
71
|
+
export declare const DEFAULT_QUICK_SEARCH_MAX_DCMTS = 1000;
|
|
72
|
+
/** Ricerca rapida configurata come sorgente alternativa dei valori distinti di un campo */
|
|
73
|
+
export declare class DistinctValuesQuickSearchSettings {
|
|
74
|
+
/** Tipo documento su cui viene eseguita la ricerca rapida */
|
|
75
|
+
tid: number | undefined;
|
|
76
|
+
/** ID della ricerca salvata (SavedQueryDescriptor) da eseguire; SYS_ALL_DCMTS_SQD_ID per la ricerca di sistema con tutti i documenti del tipo documento */
|
|
77
|
+
sqdId: number | undefined;
|
|
78
|
+
/** Metadato del risultato da cui viene prelevato il valore */
|
|
79
|
+
mid: number | undefined;
|
|
80
|
+
/** Numero massimo di documenti restituiti dalla ricerca rapida */
|
|
81
|
+
maxDcmtsToBeReturned: number;
|
|
82
|
+
}
|
|
70
83
|
export declare class SearchSettings {
|
|
71
84
|
autoFindReferences: ObjectClasses[];
|
|
72
85
|
invoiceRetrieveFormat: InvoiceRetrieveFormats;
|
|
@@ -85,7 +98,38 @@ export declare class SearchSettings {
|
|
|
85
98
|
};
|
|
86
99
|
};
|
|
87
100
|
relationExpandLevel: number;
|
|
101
|
+
relationShowZeroDcmts: boolean;
|
|
102
|
+
/** Layout dei pannelli del risultato di ricerca, condiviso dai contesti che lo gestiscono */
|
|
103
|
+
resultPanelLayout: SearchResultPanelStates;
|
|
104
|
+
/** Ricerche rapide configurate per i valori distinti: una per ogni campo, con chiave "tid_mid" */
|
|
105
|
+
distinctValuesQuickSearches: {
|
|
106
|
+
[fieldKey: string]: DistinctValuesQuickSearchSettings;
|
|
107
|
+
};
|
|
88
108
|
}
|
|
109
|
+
/** Visibilità e dimensioni dei pannelli, per id pannello */
|
|
110
|
+
export type SearchResultPanelStates = Record<string, {
|
|
111
|
+
visible: boolean;
|
|
112
|
+
width: string;
|
|
113
|
+
height: string;
|
|
114
|
+
}>;
|
|
115
|
+
/** Avvisa i risultati di ricerca già montati quando un altro salva il layout; ritorna la disiscrizione */
|
|
116
|
+
export declare const subscribeSearchResultPanelLayout: (onLayoutChanged: () => void) => (() => void);
|
|
117
|
+
/** Layout salvato; vuoto se non ne è stato salvato nessuno (anche per le impostazioni di versioni precedenti) */
|
|
118
|
+
export declare const getSearchResultPanelLayout: () => SearchResultPanelStates;
|
|
119
|
+
/** Il panel manager applica il layout salvato solo se esiste, altrimenti riparte dalle quote di default */
|
|
120
|
+
export declare const hasSearchResultPanelLayout: () => boolean;
|
|
121
|
+
/** Firma del layout salvato: un primitivo confrontabile, come richiede useSyncExternalStore */
|
|
122
|
+
export declare const getSearchResultPanelLayoutSignature: () => string;
|
|
123
|
+
/**
|
|
124
|
+
* @param disabledPanelIds Pannelli che il risultato chiamante non può mostrare: il loro stato resta quello
|
|
125
|
+
* già salvato, perché sono chiusi per via del tipo documento e non per scelta
|
|
126
|
+
* dell'utente. Sovrascriverlo li chiuderebbe anche dove sono attivi.
|
|
127
|
+
*/
|
|
128
|
+
export declare const saveSearchResultPanelLayout: (panelStates: SearchResultPanelStates, disabledPanelIds?: Array<string>) => void;
|
|
129
|
+
/** Ricerca rapida configurata per il campo, se presente */
|
|
130
|
+
export declare const getDistinctValuesQuickSearch: (tid: number | undefined, mid: number | undefined) => DistinctValuesQuickSearchSettings | undefined;
|
|
131
|
+
export declare const saveDistinctValuesQuickSearch: (tid: number | undefined, mid: number | undefined, settings: DistinctValuesQuickSearchSettings) => void;
|
|
132
|
+
export declare const removeDistinctValuesQuickSearch: (tid: number | undefined, mid: number | undefined) => void;
|
|
89
133
|
export declare class FloatingMenuBarSettings {
|
|
90
134
|
orientation?: 'horizontal' | 'vertical';
|
|
91
135
|
itemIds?: string[];
|
|
@@ -95,10 +139,68 @@ export declare class FloatingMenuBarSettings {
|
|
|
95
139
|
};
|
|
96
140
|
positionFormat?: 'pixels' | 'percentage';
|
|
97
141
|
}
|
|
142
|
+
/** Sezioni del riepilogo dell'archiviazione multipla dei dettagli, aperte o collassate */
|
|
143
|
+
export type MultiDetailSectionsOpen = {
|
|
144
|
+
masterInfo: boolean;
|
|
145
|
+
archivedDetails: boolean;
|
|
146
|
+
archiveList: boolean;
|
|
147
|
+
};
|
|
148
|
+
/** Stato persistito di un pannello del riepilogo: visibilità e dimensioni, nel formato del panel manager */
|
|
149
|
+
export type MultiDetailPanelState = {
|
|
150
|
+
visible: boolean;
|
|
151
|
+
width: string;
|
|
152
|
+
height: string;
|
|
153
|
+
};
|
|
154
|
+
/** Stato dei pannelli del riepilogo, indicizzato per id pannello */
|
|
155
|
+
export type MultiDetailPanelStates = Record<string, MultiDetailPanelState>;
|
|
156
|
+
/** Passi dell'archiviazione multipla di cui si ricordano le dimensioni del modale */
|
|
157
|
+
export type MultiDetailModalStep = 'selectDcmtType' | 'archiveSummary';
|
|
158
|
+
/** Dimensioni salvate del modale, in formato CSS (es. '1200px') */
|
|
159
|
+
export type MultiDetailModalSize = {
|
|
160
|
+
width: string;
|
|
161
|
+
height: string;
|
|
162
|
+
};
|
|
163
|
+
/** Dimensioni del modale indicizzate per passo */
|
|
164
|
+
export type MultiDetailModalSizes = Partial<Record<MultiDetailModalStep, MultiDetailModalSize>>;
|
|
98
165
|
export declare class ArchivingSettings {
|
|
99
166
|
mruTIDs: number[];
|
|
100
167
|
defaultTree: number;
|
|
168
|
+
/**
|
|
169
|
+
* Sezioni collassate dall'utente nel riepilogo, ripristinate alla riapertura. Assente finché
|
|
170
|
+
* l'utente non ne chiude una: le impostazioni di default non vanno scritte nel local storage
|
|
171
|
+
*/
|
|
172
|
+
multiDetailSectionsOpen?: MultiDetailSectionsOpen;
|
|
173
|
+
/**
|
|
174
|
+
* Altezze dei pannelli del riepilogo, gestite dal panel manager. Non comprende il collasso delle
|
|
175
|
+
* sezioni, che è in multiDetailSectionsOpen: assente finché l'utente non sposta un separatore.
|
|
176
|
+
*/
|
|
177
|
+
multiDetailPanelStates?: MultiDetailPanelStates;
|
|
178
|
+
/**
|
|
179
|
+
* Dimensioni del modale scelte dall'utente, distinte per passo (scelta del tipo e riepilogo partono
|
|
180
|
+
* da dimensioni molto diverse). Assenti finché non ridimensiona il modale in quel passo.
|
|
181
|
+
*/
|
|
182
|
+
multiDetailModalSizes?: MultiDetailModalSizes;
|
|
101
183
|
}
|
|
184
|
+
/** Stato di apertura salvato delle sezioni: i default coprono l'impostazione mai modificata dall'utente */
|
|
185
|
+
export declare const getMultiDetailSectionsOpen: () => MultiDetailSectionsOpen;
|
|
186
|
+
export declare const saveMultiDetailSectionsOpen: (sectionsOpen: MultiDetailSectionsOpen) => void;
|
|
187
|
+
/** Stato salvato dei pannelli: vuoto finché l'utente non ne ha ridimensionato nessuno */
|
|
188
|
+
export declare const getMultiDetailPanelStates: () => MultiDetailPanelStates;
|
|
189
|
+
/** Il panel manager applica lo stato salvato solo se esiste: altrimenti riparte dalle quote di default */
|
|
190
|
+
export declare const hasMultiDetailPanelStates: () => boolean;
|
|
191
|
+
export declare const saveMultiDetailPanelStates: (panelStates: MultiDetailPanelStates) => void;
|
|
192
|
+
/** Assenti se l'utente non ha mai ridimensionato il modale in quel passo */
|
|
193
|
+
export declare const getMultiDetailModalSize: (step: MultiDetailModalStep) => MultiDetailModalSize | undefined;
|
|
194
|
+
export declare const hasMultiDetailModalSizes: () => boolean;
|
|
195
|
+
/** Salva le dimensioni del passo indicato, lasciando invariate quelle degli altri */
|
|
196
|
+
export declare const saveMultiDetailModalSize: (step: MultiDetailModalStep, size: MultiDetailModalSize) => void;
|
|
197
|
+
/** C'è un layout dell'utente da cancellare: nel local storage le impostazioni ci sono solo se diverse dai default */
|
|
198
|
+
export declare const hasMultiDetailLayout: () => boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Elimina dal local storage il layout configurato dall'utente: altezze dei pannelli, sezioni
|
|
201
|
+
* collassate e dimensioni del modale. Tutto torna ai default: modale, quote e sezioni espanse.
|
|
202
|
+
*/
|
|
203
|
+
export declare const clearMultiDetailLayout: () => void;
|
|
102
204
|
export declare class FullTextSettings {
|
|
103
205
|
mruTerms: string[];
|
|
104
206
|
}
|
|
@@ -108,13 +210,21 @@ export declare class DevSettings {
|
|
|
108
210
|
export declare class AdvancedSettings {
|
|
109
211
|
private _expertMode;
|
|
110
212
|
private _scannerLicense;
|
|
213
|
+
private _showDossiersV5;
|
|
111
214
|
get expertMode(): number;
|
|
112
215
|
set expertMode(value: number);
|
|
113
216
|
get scannerLicense(): string;
|
|
114
217
|
set scannerLicense(value: string);
|
|
218
|
+
/**
|
|
219
|
+
* Mostra le pratiche "V5" (i dossier) accanto al CaseFlow che le sostituisce.
|
|
220
|
+
* 0 = nascoste (default), 1 = visibili.
|
|
221
|
+
*/
|
|
222
|
+
get showDossiersV5(): number;
|
|
223
|
+
set showDossiersV5(value: number);
|
|
115
224
|
toJSON(): {
|
|
116
225
|
expertMode: number;
|
|
117
226
|
scannerLicense: string;
|
|
227
|
+
showDossiersV5: number;
|
|
118
228
|
};
|
|
119
229
|
}
|
|
120
230
|
export declare class CtrlWfSettings {
|
|
@@ -59,6 +59,7 @@ export class UserSettings {
|
|
|
59
59
|
this.dcmtCheckoutInfo = [];
|
|
60
60
|
this.defaultCheckInOutFolder = DEFAULT_CHECK_IN_OUT_FOLDER;
|
|
61
61
|
this.documentDownloadSettings = new DocumentDownloadSettings();
|
|
62
|
+
this.lastSeenAppVersion = '';
|
|
62
63
|
this.themeSettings = new ThemeSettings(skipCssUpdate);
|
|
63
64
|
}
|
|
64
65
|
/** Load settings from local storage or other sources */
|
|
@@ -130,6 +131,20 @@ export class ThemeSettings {
|
|
|
130
131
|
export const DEFAULT_PREVIEW_THRESHOLD = 500; // KB
|
|
131
132
|
export const DEFAULT_PAGE_SIZE = 100;
|
|
132
133
|
export const DEFAULT_MAX_DCMTS_TO_BE_RETURNED = 200;
|
|
134
|
+
export const DEFAULT_QUICK_SEARCH_MAX_DCMTS = 1000;
|
|
135
|
+
/** Ricerca rapida configurata come sorgente alternativa dei valori distinti di un campo */
|
|
136
|
+
export class DistinctValuesQuickSearchSettings {
|
|
137
|
+
constructor() {
|
|
138
|
+
/** Tipo documento su cui viene eseguita la ricerca rapida */
|
|
139
|
+
this.tid = undefined;
|
|
140
|
+
/** ID della ricerca salvata (SavedQueryDescriptor) da eseguire; SYS_ALL_DCMTS_SQD_ID per la ricerca di sistema con tutti i documenti del tipo documento */
|
|
141
|
+
this.sqdId = undefined;
|
|
142
|
+
/** Metadato del risultato da cui viene prelevato il valore */
|
|
143
|
+
this.mid = undefined;
|
|
144
|
+
/** Numero massimo di documenti restituiti dalla ricerca rapida */
|
|
145
|
+
this.maxDcmtsToBeReturned = DEFAULT_QUICK_SEARCH_MAX_DCMTS;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
133
148
|
export class SearchSettings {
|
|
134
149
|
constructor() {
|
|
135
150
|
this.autoFindReferences = [];
|
|
@@ -143,16 +158,135 @@ export class SearchSettings {
|
|
|
143
158
|
this.floatingMenuBar = new FloatingMenuBarSettings();
|
|
144
159
|
this.panelLayout = {};
|
|
145
160
|
this.relationExpandLevel = 4; // Livello di espansione predefinito per le correlazioni
|
|
161
|
+
this.relationShowZeroDcmts = false;
|
|
162
|
+
/** Layout dei pannelli del risultato di ricerca, condiviso dai contesti che lo gestiscono */
|
|
163
|
+
this.resultPanelLayout = {};
|
|
164
|
+
/** Ricerche rapide configurate per i valori distinti: una per ogni campo, con chiave "tid_mid" */
|
|
165
|
+
this.distinctValuesQuickSearches = {};
|
|
146
166
|
}
|
|
147
167
|
}
|
|
168
|
+
const resultPanelLayoutSubscribers = new Set();
|
|
169
|
+
/** Avvisa i risultati di ricerca già montati quando un altro salva il layout; ritorna la disiscrizione */
|
|
170
|
+
export const subscribeSearchResultPanelLayout = (onLayoutChanged) => {
|
|
171
|
+
resultPanelLayoutSubscribers.add(onLayoutChanged);
|
|
172
|
+
return () => { resultPanelLayoutSubscribers.delete(onLayoutChanged); };
|
|
173
|
+
};
|
|
174
|
+
/** Layout salvato; vuoto se non ne è stato salvato nessuno (anche per le impostazioni di versioni precedenti) */
|
|
175
|
+
export const getSearchResultPanelLayout = () => SDKUI_Globals.userSettings.searchSettings?.resultPanelLayout ?? {};
|
|
176
|
+
/** Il panel manager applica il layout salvato solo se esiste, altrimenti riparte dalle quote di default */
|
|
177
|
+
export const hasSearchResultPanelLayout = () => Object.keys(getSearchResultPanelLayout()).length > 0;
|
|
178
|
+
/** Riassume un layout in una stringa: ordinata per id, così due layout uguali danno la stessa firma */
|
|
179
|
+
const searchResultPanelLayoutSignature = (panelStates) => Object.entries(panelStates)
|
|
180
|
+
.sort(([firstId], [secondId]) => firstId.localeCompare(secondId))
|
|
181
|
+
.map(([id, state]) => `${id}:${state?.visible ? 1 : 0}:${state?.width ?? ''}:${state?.height ?? ''}`)
|
|
182
|
+
.join('|');
|
|
183
|
+
/** Firma del layout salvato: un primitivo confrontabile, come richiede useSyncExternalStore */
|
|
184
|
+
export const getSearchResultPanelLayoutSignature = () => searchResultPanelLayoutSignature(getSearchResultPanelLayout());
|
|
185
|
+
/**
|
|
186
|
+
* @param disabledPanelIds Pannelli che il risultato chiamante non può mostrare: il loro stato resta quello
|
|
187
|
+
* già salvato, perché sono chiusi per via del tipo documento e non per scelta
|
|
188
|
+
* dell'utente. Sovrascriverlo li chiuderebbe anche dove sono attivi.
|
|
189
|
+
*/
|
|
190
|
+
export const saveSearchResultPanelLayout = (panelStates, disabledPanelIds = []) => {
|
|
191
|
+
if (!panelStates || Object.keys(panelStates).length === 0)
|
|
192
|
+
return;
|
|
193
|
+
const savedLayout = getSearchResultPanelLayout();
|
|
194
|
+
const layout = { ...panelStates };
|
|
195
|
+
disabledPanelIds.forEach(id => { if (savedLayout[id])
|
|
196
|
+
layout[id] = { ...savedLayout[id] }; });
|
|
197
|
+
// Layout identico: senza questo controllo ogni scrittura avviserebbe a vuoto gli altri risultati aperti
|
|
198
|
+
if (searchResultPanelLayoutSignature(layout) === getSearchResultPanelLayoutSignature())
|
|
199
|
+
return;
|
|
200
|
+
// Il proxy persiste solo intercettando l'assegnazione di una proprietà: va riassegnata l'intera mappa
|
|
201
|
+
SDKUI_Globals.userSettings.searchSettings.resultPanelLayout = layout;
|
|
202
|
+
resultPanelLayoutSubscribers.forEach(onLayoutChanged => onLayoutChanged());
|
|
203
|
+
};
|
|
204
|
+
/** Il campo da cui viene aperto il pannello dei valori distinti è identificato dalla coppia (tid, mid) */
|
|
205
|
+
const distinctValuesFieldKey = (tid, mid) => `${tid}_${mid}`;
|
|
206
|
+
/** Ricerca rapida configurata per il campo, se presente */
|
|
207
|
+
export const getDistinctValuesQuickSearch = (tid, mid) => {
|
|
208
|
+
if (!tid || !mid)
|
|
209
|
+
return undefined;
|
|
210
|
+
// Le impostazioni salvate da versioni precedenti non hanno la mappa: va gestita l'assenza
|
|
211
|
+
return SDKUI_Globals.userSettings.searchSettings.distinctValuesQuickSearches?.[distinctValuesFieldKey(tid, mid)];
|
|
212
|
+
};
|
|
213
|
+
export const saveDistinctValuesQuickSearch = (tid, mid, settings) => {
|
|
214
|
+
if (!tid || !mid)
|
|
215
|
+
return;
|
|
216
|
+
// Il proxy delle impostazioni persiste solo intercettando l'assegnazione di una proprietà: la mappa va riassegnata per intero
|
|
217
|
+
SDKUI_Globals.userSettings.searchSettings.distinctValuesQuickSearches = {
|
|
218
|
+
...SDKUI_Globals.userSettings.searchSettings.distinctValuesQuickSearches,
|
|
219
|
+
[distinctValuesFieldKey(tid, mid)]: settings,
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
export const removeDistinctValuesQuickSearch = (tid, mid) => {
|
|
223
|
+
if (!tid || !mid)
|
|
224
|
+
return;
|
|
225
|
+
const fieldKey = distinctValuesFieldKey(tid, mid);
|
|
226
|
+
const quickSearches = SDKUI_Globals.userSettings.searchSettings.distinctValuesQuickSearches;
|
|
227
|
+
if (!quickSearches?.[fieldKey])
|
|
228
|
+
return;
|
|
229
|
+
const { [fieldKey]: removedSettings, ...remainingQuickSearches } = quickSearches;
|
|
230
|
+
SDKUI_Globals.userSettings.searchSettings.distinctValuesQuickSearches = remainingQuickSearches;
|
|
231
|
+
};
|
|
148
232
|
export class FloatingMenuBarSettings {
|
|
149
233
|
}
|
|
234
|
+
/** Alla prima apertura le sezioni sono tutte espanse */
|
|
235
|
+
const DEFAULT_MULTI_DETAIL_SECTIONS_OPEN = { masterInfo: true, archivedDetails: true, archiveList: true };
|
|
150
236
|
export class ArchivingSettings {
|
|
151
237
|
constructor() {
|
|
152
238
|
this.mruTIDs = [];
|
|
153
239
|
this.defaultTree = -1;
|
|
154
240
|
}
|
|
155
241
|
}
|
|
242
|
+
/** Stato di apertura salvato delle sezioni: i default coprono l'impostazione mai modificata dall'utente */
|
|
243
|
+
export const getMultiDetailSectionsOpen = () => ({
|
|
244
|
+
...DEFAULT_MULTI_DETAIL_SECTIONS_OPEN,
|
|
245
|
+
...SDKUI_Globals.userSettings.archivingSettings?.multiDetailSectionsOpen,
|
|
246
|
+
});
|
|
247
|
+
export const saveMultiDetailSectionsOpen = (sectionsOpen) => {
|
|
248
|
+
const isDefault = Object.keys(DEFAULT_MULTI_DETAIL_SECTIONS_OPEN)
|
|
249
|
+
.every(section => sectionsOpen[section] === DEFAULT_MULTI_DETAIL_SECTIONS_OPEN[section]);
|
|
250
|
+
// Il proxy persiste solo intercettando l'assegnazione di una proprietà: la mappa va riassegnata per intero.
|
|
251
|
+
// Tornata ai default l'impostazione va rimossa, così nel local storage restano solo le modifiche dell'utente
|
|
252
|
+
SDKUI_Globals.userSettings.archivingSettings.multiDetailSectionsOpen = isDefault ? undefined : { ...sectionsOpen };
|
|
253
|
+
};
|
|
254
|
+
/** Stato salvato dei pannelli: vuoto finché l'utente non ne ha ridimensionato nessuno */
|
|
255
|
+
export const getMultiDetailPanelStates = () => SDKUI_Globals.userSettings.archivingSettings?.multiDetailPanelStates ?? {};
|
|
256
|
+
/** Il panel manager applica lo stato salvato solo se esiste: altrimenti riparte dalle quote di default */
|
|
257
|
+
export const hasMultiDetailPanelStates = () => Object.keys(getMultiDetailPanelStates()).length > 0;
|
|
258
|
+
export const saveMultiDetailPanelStates = (panelStates) => {
|
|
259
|
+
if (!panelStates || Object.keys(panelStates).length === 0)
|
|
260
|
+
return;
|
|
261
|
+
// Il proxy persiste solo intercettando l'assegnazione di una proprietà: la mappa va riassegnata per intero
|
|
262
|
+
SDKUI_Globals.userSettings.archivingSettings.multiDetailPanelStates = { ...panelStates };
|
|
263
|
+
};
|
|
264
|
+
/** Assenti se l'utente non ha mai ridimensionato il modale in quel passo */
|
|
265
|
+
export const getMultiDetailModalSize = (step) => SDKUI_Globals.userSettings.archivingSettings?.multiDetailModalSizes?.[step];
|
|
266
|
+
export const hasMultiDetailModalSizes = () => Object.keys(SDKUI_Globals.userSettings.archivingSettings?.multiDetailModalSizes ?? {}).length > 0;
|
|
267
|
+
/** Salva le dimensioni del passo indicato, lasciando invariate quelle degli altri */
|
|
268
|
+
export const saveMultiDetailModalSize = (step, size) => {
|
|
269
|
+
if (!size?.width || !size?.height)
|
|
270
|
+
return;
|
|
271
|
+
// Il proxy persiste solo intercettando l'assegnazione di una proprietà: la mappa va riassegnata per intero
|
|
272
|
+
SDKUI_Globals.userSettings.archivingSettings.multiDetailModalSizes = {
|
|
273
|
+
...SDKUI_Globals.userSettings.archivingSettings?.multiDetailModalSizes,
|
|
274
|
+
[step]: { ...size },
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
/** C'è un layout dell'utente da cancellare: nel local storage le impostazioni ci sono solo se diverse dai default */
|
|
278
|
+
export const hasMultiDetailLayout = () => hasMultiDetailPanelStates() || hasMultiDetailModalSizes() || SDKUI_Globals.userSettings.archivingSettings?.multiDetailSectionsOpen !== undefined;
|
|
279
|
+
/**
|
|
280
|
+
* Elimina dal local storage il layout configurato dall'utente: altezze dei pannelli, sezioni
|
|
281
|
+
* collassate e dimensioni del modale. Tutto torna ai default: modale, quote e sezioni espanse.
|
|
282
|
+
*/
|
|
283
|
+
export const clearMultiDetailLayout = () => {
|
|
284
|
+
// Il proxy persiste solo intercettando l'assegnazione di una proprietà: tutti i campi vanno riassegnati.
|
|
285
|
+
// Senza valore spariscono dal local storage e alla riapertura tornano validi i default
|
|
286
|
+
SDKUI_Globals.userSettings.archivingSettings.multiDetailPanelStates = undefined;
|
|
287
|
+
SDKUI_Globals.userSettings.archivingSettings.multiDetailSectionsOpen = undefined;
|
|
288
|
+
SDKUI_Globals.userSettings.archivingSettings.multiDetailModalSizes = undefined;
|
|
289
|
+
};
|
|
156
290
|
export class FullTextSettings {
|
|
157
291
|
constructor() {
|
|
158
292
|
this.mruTerms = [];
|
|
@@ -167,6 +301,7 @@ export class AdvancedSettings {
|
|
|
167
301
|
constructor() {
|
|
168
302
|
this._expertMode = 0;
|
|
169
303
|
this._scannerLicense = '';
|
|
304
|
+
this._showDossiersV5 = 0;
|
|
170
305
|
}
|
|
171
306
|
get expertMode() {
|
|
172
307
|
return this._expertMode;
|
|
@@ -185,11 +320,27 @@ export class AdvancedSettings {
|
|
|
185
320
|
set scannerLicense(value) {
|
|
186
321
|
this._scannerLicense = value;
|
|
187
322
|
}
|
|
323
|
+
/**
|
|
324
|
+
* Mostra le pratiche "V5" (i dossier) accanto al CaseFlow che le sostituisce.
|
|
325
|
+
* 0 = nascoste (default), 1 = visibili.
|
|
326
|
+
*/
|
|
327
|
+
get showDossiersV5() {
|
|
328
|
+
return this._showDossiersV5;
|
|
329
|
+
}
|
|
330
|
+
set showDossiersV5(value) {
|
|
331
|
+
if (this._showDossiersV5 !== value) {
|
|
332
|
+
this._showDossiersV5 = value;
|
|
333
|
+
// Come per expertMode: chi mostra la funzione può reagire subito.
|
|
334
|
+
const event = new CustomEvent('showDossiersV5Changed', { detail: value });
|
|
335
|
+
window.dispatchEvent(event);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
188
338
|
// Override toJSON to control serialization (called by JSON.stringify)
|
|
189
339
|
toJSON() {
|
|
190
340
|
return {
|
|
191
341
|
expertMode: this._expertMode,
|
|
192
342
|
scannerLicense: this._scannerLicense,
|
|
343
|
+
showDossiersV5: this._showDossiersV5,
|
|
193
344
|
};
|
|
194
345
|
}
|
|
195
346
|
}
|