@topconsultnpm/sdkui-react 6.21.0-dev3.4 → 6.21.0-dev3.41
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 +22 -1
- package/lib/components/NewComponents/ContextMenu/styles.d.ts +4 -4
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +6 -6
- package/lib/components/base/TMAreaManager.js +11 -0
- package/lib/components/base/TMDataGrid.js +12 -2
- package/lib/components/base/TMDataGridExportForm.js +19 -8
- package/lib/components/base/TMFileManagerDataGridView.js +4 -4
- package/lib/components/base/TMFileManagerThumbnailItems.js +3 -3
- package/lib/components/base/TMFileManagerUtils.d.ts +7 -0
- package/lib/components/base/TMFileManagerUtils.js +14 -1
- package/lib/components/base/TMModal.js +2 -2
- package/lib/components/base/TMPopUp.d.ts +1 -0
- package/lib/components/base/TMPopUp.js +59 -2
- package/lib/components/base/TMSpinner.d.ts +4 -2
- package/lib/components/base/TMSpinner.js +33 -6
- package/lib/components/base/TMTreeView.js +12 -15
- package/lib/components/choosers/TMDynDataListItemChooser.js +6 -1
- package/lib/components/choosers/TMGroupChooser.js +1 -1
- package/lib/components/editors/TMEditorStyled.d.ts +6 -6
- package/lib/components/editors/TMFormulaEditor.d.ts +1 -0
- package/lib/components/editors/TMFormulaEditor.js +98 -49
- package/lib/components/editors/TMMetadataEditor.js +6 -2
- package/lib/components/editors/TMMetadataValues.js +23 -6
- package/lib/components/features/blog/TMBlogCommentForm.js +5 -2
- package/lib/components/features/documents/TMCopyToFolderForm.js +2 -2
- package/lib/components/features/documents/TMDcmtIcon.js +1 -1
- package/lib/components/features/documents/TMMasterDetailDcmts.js +1 -1
- package/lib/components/features/documents/TMMergeToPdfForm.js +1 -1
- package/lib/components/features/documents/TMRelationViewer.js +8 -3
- package/lib/components/features/documents/copyAndMergeDcmtsShared.d.ts +0 -13
- package/lib/components/features/documents/copyAndMergeDcmtsShared.js +1 -39
- package/lib/components/features/search/TMMetadataOutputForm.d.ts +17 -0
- package/lib/components/features/search/TMMetadataOutputForm.js +225 -0
- package/lib/components/features/search/TMMetadataSorterForm.d.ts +17 -0
- package/lib/components/features/search/TMMetadataSorterForm.js +243 -0
- package/lib/components/features/search/TMSearchQueryEditor.js +14 -8
- package/lib/components/features/search/TMSearchQueryPanel.js +249 -58
- package/lib/components/features/search/TMSearchResult.d.ts +1 -0
- package/lib/components/features/search/TMSearchResult.js +39 -18
- package/lib/components/features/search/TMViewHistoryDcmt.js +1 -1
- package/lib/components/features/search/metadataFormHelper.d.ts +16 -0
- package/lib/components/features/search/metadataFormHelper.js +77 -0
- package/lib/components/forms/Login/TMLoginForm.js +15 -3
- package/lib/components/grids/TMBlogAttachments.js +2 -2
- package/lib/components/grids/TMBlogsPost.js +5 -3
- package/lib/components/grids/TMBlogsPostUtils.d.ts +1 -0
- package/lib/components/grids/TMBlogsPostUtils.js +3 -1
- package/lib/components/wizard/TMWizard.d.ts +1 -0
- package/lib/components/wizard/TMWizard.js +5 -3
- package/lib/helper/Enum_Localizator.js +1 -0
- package/lib/helper/SDKUI_Localizator.d.ts +4 -0
- package/lib/helper/SDKUI_Localizator.js +40 -0
- package/lib/helper/TMUtils.d.ts +23 -0
- package/lib/helper/TMUtils.js +55 -0
- package/lib/helper/checkinCheckoutManager.d.ts +4 -3
- package/lib/helper/checkinCheckoutManager.js +29 -11
- package/lib/helper/helpers.d.ts +2 -1
- package/lib/helper/helpers.js +1 -0
- package/lib/hooks/useCheckInOutOperations.d.ts +4 -3
- package/lib/hooks/useDataUserIdItem.js +1 -1
- package/lib/hooks/useDcmtOperations.d.ts +18 -1
- package/lib/hooks/useDcmtOperations.js +235 -24
- package/lib/hooks/useDocumentOperations.js +22 -3
- package/lib/services/platform_services.d.ts +4 -4
- package/lib/ts/types.d.ts +2 -1
- package/lib/ts/types.js +1 -0
- package/package.json +13 -7
|
@@ -32,7 +32,7 @@ const StyledSpinnerWrapper = styled.div `
|
|
|
32
32
|
width: ${props => props.$width || 'fit-content'};
|
|
33
33
|
height: fit-content;
|
|
34
34
|
max-width: 250px;
|
|
35
|
-
max-height: 200px;
|
|
35
|
+
max-height: ${props => props.$hasCancel ? '280px' : '200px'};
|
|
36
36
|
padding: 10px;
|
|
37
37
|
border-radius: 5px;
|
|
38
38
|
background-color: ${props => props.$flat ? 'transparent' : '#fcfcfc'};
|
|
@@ -134,22 +134,49 @@ const StyledSpinnerAnimation = styled.div `
|
|
|
134
134
|
const StyledSpinnerDescription = styled.div `
|
|
135
135
|
font-size: ${props => props.$fontSize || FontSize.defaultFontSize};
|
|
136
136
|
text-align: center;
|
|
137
|
+
white-space: pre-line;
|
|
137
138
|
`;
|
|
138
|
-
|
|
139
|
-
|
|
139
|
+
// Pulsante Annulla sotto lo spinner
|
|
140
|
+
const StyledCancelButton = styled.button `
|
|
141
|
+
margin-top: 15px;
|
|
142
|
+
padding: 8px 20px;
|
|
143
|
+
font-size: 14px;
|
|
144
|
+
font-weight: 500;
|
|
145
|
+
color: #fff;
|
|
146
|
+
background-color: #d12a1c;
|
|
147
|
+
border: none;
|
|
148
|
+
border-radius: 5px;
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
transition: background-color 0.2s ease, transform 0.1s ease;
|
|
151
|
+
|
|
152
|
+
&:hover {
|
|
153
|
+
background-color: #b8241a;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&:active {
|
|
157
|
+
transform: scale(0.98);
|
|
158
|
+
}
|
|
159
|
+
`;
|
|
160
|
+
const Spinner = ({ backgroundColor = 'transparent', description = '', fontSize = FontSize.defaultFontSize, width = 'fit-content', flat = false, onCancel, cancelText = 'Annulla' }) => {
|
|
161
|
+
return (_jsx(StyledSpinnerContainer, { "$backgroundColor": backgroundColor, children: _jsxs(StyledSpinnerWrapper, { "$width": width, "$flat": flat, "$hasCancel": !!onCancel, children: [_jsxs("div", { style: { position: 'relative', width: '80px', height: '80px' }, children: [_jsx("img", { style: {
|
|
140
162
|
position: 'absolute',
|
|
141
163
|
top: '50%',
|
|
142
164
|
left: '50%',
|
|
143
165
|
transform: 'translate(-54%, -54%)'
|
|
144
|
-
}, src: six, width: 35, alt: "" }), _jsxs(StyledSpinnerAnimation, { children: [_jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {})] })] }), _jsx(StyledSpinnerDescription, { "$fontSize": fontSize, children: description })] }) }));
|
|
166
|
+
}, src: six, width: 35, alt: "" }), _jsxs(StyledSpinnerAnimation, { children: [_jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {})] })] }), _jsx(StyledSpinnerDescription, { "$fontSize": fontSize, children: description }), onCancel && (_jsx(StyledCancelButton, { onClick: onCancel, children: cancelText }))] }) }));
|
|
145
167
|
};
|
|
146
168
|
class TMSpinner {
|
|
147
|
-
static show({ description, backgroundColor, fontSize, flat
|
|
169
|
+
static show({ description, backgroundColor, fontSize, flat, onCancel, cancelText } = {
|
|
170
|
+
backgroundColor: 'transparent',
|
|
171
|
+
description: '',
|
|
172
|
+
fontSize: FontSize.defaultFontSize,
|
|
173
|
+
flat: false
|
|
174
|
+
}) {
|
|
148
175
|
let container = document.createElement('div');
|
|
149
176
|
container.setAttribute("id", 'tm-spinner-temporary-container');
|
|
150
177
|
document.body.appendChild(container);
|
|
151
178
|
const root = ReactDOM.createRoot(container);
|
|
152
|
-
root.render(_jsx(React.StrictMode, { children: _jsx(Spinner, { backgroundColor: backgroundColor, fontSize: fontSize, description: description, flat: flat }) }));
|
|
179
|
+
root.render(_jsx(React.StrictMode, { children: _jsx(Spinner, { backgroundColor: backgroundColor, fontSize: fontSize, description: description, flat: flat, onCancel: onCancel, cancelText: cancelText }) }));
|
|
153
180
|
}
|
|
154
181
|
static hide() {
|
|
155
182
|
let container = document.getElementById('tm-spinner-temporary-container');
|
|
@@ -138,22 +138,19 @@ const TMTreeView = ({ dataSource = [], focusedItem, selectedItems = [], allowMul
|
|
|
138
138
|
}
|
|
139
139
|
if (delayFocus) {
|
|
140
140
|
// Logica per il ritardo del focus (es. click singolo su icona desktop, gestito dal padre)
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
141
|
+
// Il focus viene ritardato per permettere al doppio click di registrarsi sull'icona,
|
|
142
|
+
// ma il focus avviene comunque (sia con click singolo che doppio)
|
|
143
|
+
if (!clickTimeoutRef.current) {
|
|
144
|
+
// Primo click: imposta il timer per il focus
|
|
145
|
+
lastClickedNodeKeyRef.current = node.key;
|
|
146
|
+
clickTimeoutRef.current = setTimeout(() => {
|
|
147
|
+
onFocusedItemChanged?.(node);
|
|
148
|
+
clickTimeoutRef.current = null;
|
|
149
|
+
lastClickedNodeKeyRef.current = undefined;
|
|
150
|
+
}, 200);
|
|
148
151
|
}
|
|
149
|
-
//
|
|
150
|
-
|
|
151
|
-
clickTimeoutRef.current = setTimeout(() => {
|
|
152
|
-
// Se il timer scade, significa che è stato solo un click singolo.
|
|
153
|
-
onFocusedItemChanged?.(node);
|
|
154
|
-
clickTimeoutRef.current = null;
|
|
155
|
-
lastClickedNodeKeyRef.current = undefined;
|
|
156
|
-
}, 200);
|
|
152
|
+
// Se c'è già un timer attivo (secondo click di doppio click), non fare nulla
|
|
153
|
+
// Il focus avverrà comunque quando scade il timer del primo click
|
|
157
154
|
}
|
|
158
155
|
else {
|
|
159
156
|
// Logica per il focus immediato (per tutti gli altri click, o se shouldDelayFocusOnEvent è false)
|
|
@@ -84,10 +84,15 @@ const TMDynDataListItemChooser = ({ tid, md, width = '100%', titleForm, openChoo
|
|
|
84
84
|
_jsx(TMTooltip, { content: SDKUI_Localizator.ValueNotPresent, children: _jsx(IconWarning, { color: TMColors.warning }) });
|
|
85
85
|
};
|
|
86
86
|
const renderTemplate = () => {
|
|
87
|
+
const isPlaceholder = values?.[0] === placeHolder;
|
|
88
|
+
// Selezione singola: mostra direttamente il primo valore
|
|
89
|
+
if (!allowMultipleSelection) {
|
|
90
|
+
const singleDescription = getValueDescription(values?.[0]);
|
|
91
|
+
return (_jsx(StyledDivHorizontal, { style: { width: '100%', color: isPlaceholder ? '#a9a9a9' : 'inherit', alignItems: 'center' }, children: dataSource && singleDescription && _jsxs(StyledDivHorizontal, { style: { alignItems: 'center', gap: '8px' }, children: [getIcon(), _jsx("p", { children: singleDescription })] }) }));
|
|
92
|
+
}
|
|
87
93
|
const MIN_COUNT_FOR_BADGE = 1;
|
|
88
94
|
const MAX_VISIBLE_ITEMS = 3;
|
|
89
95
|
const MAX_TOOLTIP_ITEMS = 50;
|
|
90
|
-
const isPlaceholder = values?.[0] === placeHolder;
|
|
91
96
|
const descriptions = getDescriptions(MAX_VISIBLE_ITEMS);
|
|
92
97
|
const remainingCount = (values?.length ?? 0) - MAX_VISIBLE_ITEMS;
|
|
93
98
|
const totalCount = values?.length ?? 0;
|
|
@@ -11,7 +11,7 @@ export const TMGroupChooserForm = (props) => {
|
|
|
11
11
|
TMSpinner.hide();
|
|
12
12
|
return items ?? [];
|
|
13
13
|
};
|
|
14
|
-
return (_jsx(TMChooserForm, { title: SDK_Localizator.Groups, allowMultipleSelection: props.allowMultipleSelection, width: props.width, height: props.height, manageUseLocalizedName: true, hasShowOnlySelectedItems: true, selectedIDs: props.selectedIDs, startWithShowOnlySelectedItems: false, cellRenderIcon: () => _jsx(IconUserGroup, { color: '#767676' }), dataSource: props.dataSource, getItems: getItems, onClose: props.onClose, onChoose: (IDs) => { props.onChoose?.(IDs); } }));
|
|
14
|
+
return (_jsx(TMChooserForm, { title: SDK_Localizator.Groups, allowMultipleSelection: props.allowMultipleSelection, width: props.width, height: props.height, manageUseLocalizedName: props.manageUseLocalizedName ?? true, hasShowOnlySelectedItems: true, selectedIDs: props.selectedIDs, startWithShowOnlySelectedItems: false, cellRenderIcon: () => _jsx(IconUserGroup, { color: '#767676' }), dataSource: props.dataSource, getItems: getItems, onClose: props.onClose, onChoose: (IDs) => { props.onChoose?.(IDs); } }));
|
|
15
15
|
};
|
|
16
16
|
export const TMGroupIdViewer = (props) => {
|
|
17
17
|
const [group, setGroup] = useState(null);
|
|
@@ -7,7 +7,7 @@ export declare const StyledEditorContainer: import("styled-components/dist/types
|
|
|
7
7
|
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$width"> & {
|
|
8
8
|
$width: string;
|
|
9
9
|
}, never>>> & string;
|
|
10
|
-
export declare const StyledEditor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "$
|
|
10
|
+
export declare const StyledEditor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "$width" | "$borderRadius" | "$fontSize" | "$type" | "$disabled" | "$vil" | "$isModified" | "$maxValue" | "$isMobile"> & {
|
|
11
11
|
$vil: ValidationItem[];
|
|
12
12
|
$width: string;
|
|
13
13
|
$type: string;
|
|
@@ -17,7 +17,7 @@ export declare const StyledEditor: import("styled-components/dist/types").IStyle
|
|
|
17
17
|
$disabled: boolean;
|
|
18
18
|
$isMobile?: boolean;
|
|
19
19
|
$borderRadius?: string;
|
|
20
|
-
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "$
|
|
20
|
+
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "$width" | "$borderRadius" | "$fontSize" | "$type" | "$disabled" | "$vil" | "$isModified" | "$maxValue" | "$isMobile"> & {
|
|
21
21
|
$vil: ValidationItem[];
|
|
22
22
|
$width: string;
|
|
23
23
|
$type: string;
|
|
@@ -37,20 +37,20 @@ export declare const StyledEditorIcon: import("styled-components/dist/types").IS
|
|
|
37
37
|
$disabled: boolean;
|
|
38
38
|
$isModified: boolean;
|
|
39
39
|
}, never>>> & string;
|
|
40
|
-
export declare const StyledEditorLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$color" | "$
|
|
40
|
+
export declare const StyledEditorLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$color" | "$fontSize" | "$disabled" | "$isFocused" | "$labelPosition"> & {
|
|
41
41
|
$isFocused: boolean;
|
|
42
42
|
$labelPosition: "right" | "left" | "top";
|
|
43
43
|
$disabled: boolean;
|
|
44
44
|
$fontSize?: string;
|
|
45
45
|
$color?: string;
|
|
46
|
-
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$color" | "$
|
|
46
|
+
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$color" | "$fontSize" | "$disabled" | "$isFocused" | "$labelPosition"> & {
|
|
47
47
|
$isFocused: boolean;
|
|
48
48
|
$labelPosition: "right" | "left" | "top";
|
|
49
49
|
$disabled: boolean;
|
|
50
50
|
$fontSize?: string;
|
|
51
51
|
$color?: string;
|
|
52
52
|
}, never>>> & string;
|
|
53
|
-
export declare const StyledTextareaEditor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "$
|
|
53
|
+
export declare const StyledTextareaEditor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "$width" | "$maxHeight" | "$borderRadius" | "$fontSize" | "$disabled" | "$vil" | "$isModified" | "$isMobile" | "$resize"> & {
|
|
54
54
|
$vil: ValidationItem[];
|
|
55
55
|
$width: string;
|
|
56
56
|
$isModified: boolean;
|
|
@@ -60,7 +60,7 @@ export declare const StyledTextareaEditor: import("styled-components/dist/types"
|
|
|
60
60
|
$maxHeight?: string;
|
|
61
61
|
$borderRadius?: string;
|
|
62
62
|
$resize?: boolean;
|
|
63
|
-
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "$
|
|
63
|
+
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "$width" | "$maxHeight" | "$borderRadius" | "$fontSize" | "$disabled" | "$vil" | "$isModified" | "$isMobile" | "$resize"> & {
|
|
64
64
|
$vil: ValidationItem[];
|
|
65
65
|
$width: string;
|
|
66
66
|
$isModified: boolean;
|
|
@@ -28,6 +28,7 @@ export declare class FormulaDescriptor {
|
|
|
28
28
|
metadataDataTypeDest?: MetadataDataTypes;
|
|
29
29
|
tid?: number;
|
|
30
30
|
description?: string;
|
|
31
|
+
syntax?: string;
|
|
31
32
|
}
|
|
32
33
|
export declare const renderFormulaIcon: (iconType: FormulaIconTypes, tid?: number, md?: MetadataDescriptor) => import("react/jsx-runtime").JSX.Element;
|
|
33
34
|
declare const TMFormulaEditor: React.FunctionComponent<ITMApplyFormProps<FormulaDescriptor>>;
|