@topconsultnpm/sdkui-react 6.22.0-dev3.9 → 6.22.0-dev4.11
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/base/TMAlert.js +6 -8
- package/lib/components/base/TMAreaManager.js +53 -55
- package/lib/components/base/TMButton.js +4 -2
- package/lib/components/base/TMCounterContainer.d.ts +3 -1
- package/lib/components/base/TMCounterContainer.js +16 -1
- package/lib/components/base/TMCustomButton.js +40 -48
- package/lib/components/base/TMDataGrid.js +24 -4
- package/lib/components/base/TMPanel.js +173 -170
- package/lib/components/base/TMSpinner.d.ts +2 -1
- package/lib/components/base/TMSpinner.js +9 -7
- package/lib/components/base/TMTabControl.d.ts +5 -0
- package/lib/components/base/TMTabControl.js +18 -7
- package/lib/components/base/TMTreeView.js +20 -0
- package/lib/components/base/TMWaitPanel.js +1 -1
- package/lib/components/base/waitPanel/TMWaitPanelConfirm.d.ts +12 -0
- package/lib/components/base/waitPanel/TMWaitPanelConfirm.js +185 -0
- package/lib/components/base/waitPanel/TMWaitPanelManager.d.ts +179 -0
- package/lib/components/base/waitPanel/TMWaitPanelManager.js +373 -0
- package/lib/components/base/waitPanel/TMWaitPanelView.d.ts +58 -0
- package/lib/components/base/waitPanel/TMWaitPanelView.js +346 -0
- package/lib/components/base/waitPanel/index.d.ts +1 -0
- package/lib/components/base/waitPanel/index.js +1 -0
- package/lib/components/choosers/TMDistinctValues.js +3 -3
- package/lib/components/choosers/TMPathChooser.js +17 -34
- package/lib/components/editors/TMTextBox.d.ts +4 -0
- package/lib/components/editors/TMTextBox.js +99 -11
- package/lib/components/features/archive/TMArchive.js +7 -2
- package/lib/components/features/assistant/TMHelpOnLineChat.d.ts +28 -0
- package/lib/components/features/assistant/TMHelpOnLineChat.js +1231 -0
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +2 -2
- package/lib/components/features/documents/TMBatchUpdateForm.js +3 -4
- package/lib/components/features/documents/TMCopyToFolderForm.js +53 -84
- package/lib/components/features/documents/TMDcmtForm.js +50 -61
- package/lib/components/features/documents/TMDcmtIcon.d.ts +1 -3
- package/lib/components/features/documents/TMDcmtIcon.js +3 -5
- package/lib/components/features/documents/TMDcmtPreview.js +5 -3
- package/lib/components/features/documents/TMDcmtTasks.js +2 -9
- package/lib/components/features/documents/TMFileUploader.js +26 -26
- package/lib/components/features/documents/TMMasterDetailDcmts.d.ts +2 -0
- package/lib/components/features/documents/TMMasterDetailDcmts.js +53 -148
- package/lib/components/features/documents/TMMasterInfoFields.js +3 -2
- package/lib/components/features/documents/TMMergeToPdfForm.js +52 -56
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.js +14 -15
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +1 -1
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.js +3 -3
- package/lib/components/features/documents/TMRelationViewer.d.ts +13 -14
- package/lib/components/features/documents/TMRelationViewer.js +206 -143
- package/lib/components/features/documents/relationTreeState.d.ts +32 -0
- package/lib/components/features/documents/relationTreeState.js +89 -0
- package/lib/components/features/search/TMSearch.js +3 -4
- package/lib/components/features/search/TMSearchQueryPanel.js +0 -4
- package/lib/components/features/search/TMSearchResult.d.ts +5 -0
- package/lib/components/features/search/TMSearchResult.js +51 -24
- package/lib/components/features/search/TMTreeSelector.js +23 -27
- package/lib/components/features/search/TMViewHistoryDcmt.js +15 -26
- package/lib/components/features/tasks/TMTasksView.js +97 -90
- package/lib/components/features/wg/TMWGsCopyMoveForm.js +104 -100
- package/lib/components/forms/TMResultDialog.js +1 -1
- package/lib/components/grids/TMBlogsPost.js +93 -97
- package/lib/components/index.d.ts +5 -1
- package/lib/components/index.js +4 -1
- package/lib/components/layout/panelManager/TMPanelManagerContainer.js +16 -15
- package/lib/components/layout/panelManager/TMPanelManagerContext.d.ts +1 -0
- package/lib/components/layout/panelManager/TMPanelManagerContext.js +5 -1
- package/lib/components/layout/panelManager/TMPanelManagerLoader.d.ts +6 -0
- package/lib/components/layout/panelManager/TMPanelManagerLoader.js +18 -0
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +4 -8
- package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.d.ts +1 -1
- package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.js +2 -1
- package/lib/components/pages/TMPage.js +32 -31
- package/lib/components/query/TMQueryEditor.d.ts +3 -0
- package/lib/components/query/TMQueryEditor.js +2 -1
- package/lib/components/sidebar/TMHeader.d.ts +1 -0
- package/lib/components/sidebar/TMHeader.js +2 -2
- package/lib/helper/Enum_Localizator.js +1 -0
- package/lib/helper/SDKUI_Globals.d.ts +7 -2
- package/lib/helper/SDKUI_Globals.js +7 -2
- package/lib/helper/SDKUI_Localizator.d.ts +31 -6
- package/lib/helper/SDKUI_Localizator.js +301 -51
- package/lib/helper/ZipManager.d.ts +1 -1
- package/lib/helper/ZipManager.js +2 -1
- package/lib/helper/checkinCheckoutManager.js +2 -3
- package/lib/helper/dcmtsHelper.d.ts +2 -0
- package/lib/helper/dcmtsHelper.js +3 -1
- package/lib/hooks/useCheckInOutOperations.d.ts +0 -6
- package/lib/hooks/useCheckInOutOperations.js +16 -37
- package/lib/hooks/useDcmtOperations.d.ts +3 -19
- package/lib/hooks/useDcmtOperations.js +175 -229
- package/lib/hooks/useDocumentOperations.d.ts +1 -0
- package/lib/hooks/useDocumentOperations.js +16 -29
- package/lib/hooks/useMultiMasterDetailDcmts.d.ts +0 -15
- package/lib/hooks/useMultiMasterDetailDcmts.js +70 -68
- package/lib/hooks/usePreventFileDrop.js +9 -0
- package/lib/hooks/useWorkflowApprove.js +33 -17
- package/lib/services/caseflow/CaseFlowService.d.ts +69 -9
- package/lib/services/caseflow/CaseFlowService.js +126 -58
- package/package.json +2 -2
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect, useRef } from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
+
import { ResultTypes, ValidationItem } from '@topconsultnpm/sdk-ts';
|
|
4
5
|
import { StyledEditor, StyledEditorContainer, StyledEditorIcon, StyledEditorLabel, editorColorManager } from './TMEditorStyled';
|
|
5
6
|
import { FontSize, TMColors } from '../../utils/theme';
|
|
6
|
-
import { genUniqueId, IconClearButton, IconDataList, IconHide, IconShow, SDKUI_Localizator } from '../../helper';
|
|
7
|
+
import { genUniqueId, IconClearButton, IconDataList, IconHide, IconInfo, IconShow, SDKUI_Localizator } from '../../helper';
|
|
7
8
|
import ShowAlert from '../base/TMAlert';
|
|
8
9
|
import { TMExceptionBoxManager } from '../base/TMPopUp';
|
|
9
10
|
import TMLayoutContainer, { TMLayoutItem } from '../base/TMLayout';
|
|
@@ -34,7 +35,7 @@ const StyledTextBoxEditorButton = styled.div `
|
|
|
34
35
|
border-bottom-color: ${TMColors.primary};
|
|
35
36
|
}
|
|
36
37
|
`;
|
|
37
|
-
const TMTextBox = ({ autoComplete = 'off', autoFocus, maxLength, labelColor, precision, fromModal = false, scale, showClearButton, validationItems = [], label = '', readOnly = false, formulaItems = [], buttons = [], isModifiedWhen, placeHolder, elementStyle, width = '100%', maxValue, minValue, fontSize = FontSize.defaultFontSize, icon, labelPosition = 'left', value, disabled = false, type = 'text', onClick, onValueChanged, onBlur, onKeyDown, borderRadius, allowedPattern, textTransform, currencySymbol }) => {
|
|
38
|
+
const TMTextBox = ({ autoComplete = 'off', autoFocus, maxLength, labelColor, precision, fromModal = false, scale, showClearButton, validationItems = [], label = '', readOnly = false, formulaItems = [], buttons = [], isModifiedWhen, placeHolder, elementStyle, width = '100%', maxValue, minValue, fontSize = FontSize.defaultFontSize, icon, labelPosition = 'left', value, disabled = false, type = 'text', onClick, onValueChanged, onBlur, onKeyDown, borderRadius, allowedPattern, textTransform, currencySymbol, rangeValidationMode = 'alert', infoText }) => {
|
|
38
39
|
const [initialType, setInitialType] = useState(type);
|
|
39
40
|
const [currentType, setCurrentType] = useState(type);
|
|
40
41
|
const [currentValue, setCurrentValue] = useState(value);
|
|
@@ -52,8 +53,28 @@ const TMTextBox = ({ autoComplete = 'off', autoFocus, maxLength, labelColor, pre
|
|
|
52
53
|
setCurrentType('password');
|
|
53
54
|
}
|
|
54
55
|
}, [value]);
|
|
56
|
+
const isInlineRange = currentType === 'number' && rangeValidationMode === 'inline';
|
|
57
|
+
// Modalità inline: i valori validi vengono propagati con un debounce durante la digitazione
|
|
58
|
+
const inlineTimerRef = useRef();
|
|
59
|
+
const inlinePendingRef = useRef();
|
|
60
|
+
const valueRef = useRef(value);
|
|
61
|
+
valueRef.current = value;
|
|
62
|
+
const onValueChangedRef = useRef(onValueChanged);
|
|
63
|
+
onValueChangedRef.current = onValueChanged;
|
|
64
|
+
const commitInlineValue = (newValue) => {
|
|
65
|
+
clearTimeout(inlineTimerRef.current);
|
|
66
|
+
inlinePendingRef.current = undefined;
|
|
67
|
+
if (newValue != valueRef.current)
|
|
68
|
+
onValueChangedRef.current?.({ target: { value: newValue } });
|
|
69
|
+
};
|
|
70
|
+
// Alla chiusura (es. Esc) non si perde il valore in attesa
|
|
71
|
+
useEffect(() => () => {
|
|
72
|
+
clearTimeout(inlineTimerRef.current);
|
|
73
|
+
if (inlinePendingRef.current !== undefined)
|
|
74
|
+
commitInlineValue(inlinePendingRef.current);
|
|
75
|
+
}, []);
|
|
55
76
|
useEffect(() => {
|
|
56
|
-
if (currentType === 'number') {
|
|
77
|
+
if (currentType === 'number' && !isInlineRange) {
|
|
57
78
|
if (currentValue) {
|
|
58
79
|
const numericValue = parseFloat(currentValue);
|
|
59
80
|
// Check maxValue
|
|
@@ -78,7 +99,7 @@ const TMTextBox = ({ autoComplete = 'off', autoFocus, maxLength, labelColor, pre
|
|
|
78
99
|
}
|
|
79
100
|
}
|
|
80
101
|
}
|
|
81
|
-
}, [maxValue, minValue, currentValue, currentType]);
|
|
102
|
+
}, [maxValue, minValue, currentValue, currentType, isInlineRange]);
|
|
82
103
|
// Handle autofocus behavior on mount
|
|
83
104
|
useEffect(() => {
|
|
84
105
|
if (!autoFocus || !inputRef.current)
|
|
@@ -149,6 +170,45 @@ const TMTextBox = ({ autoComplete = 'off', autoFocus, maxLength, labelColor, pre
|
|
|
149
170
|
return Number("9".repeat((precision ?? 0) - (scale ?? 0)) + '.' + "9".repeat(scale ?? 0));
|
|
150
171
|
return Number(curValue);
|
|
151
172
|
};
|
|
173
|
+
const formatNumber = (n) => n.toLocaleString(navigator.language);
|
|
174
|
+
// Modalità inline: messaggio di range fuori limite (undefined se valido)
|
|
175
|
+
const getRangeError = (curValue) => {
|
|
176
|
+
if (curValue === undefined || curValue === null || curValue === '')
|
|
177
|
+
return undefined;
|
|
178
|
+
const number = Number(curValue);
|
|
179
|
+
if (isNaN(number))
|
|
180
|
+
return undefined;
|
|
181
|
+
if (maxValue !== undefined && number > maxValue)
|
|
182
|
+
return SDKUI_Localizator.Max_Value.replaceParams(formatNumber(maxValue));
|
|
183
|
+
if (minValue !== undefined && number < minValue)
|
|
184
|
+
return SDKUI_Localizator.Min_Value.replaceParams(formatNumber(minValue));
|
|
185
|
+
return undefined;
|
|
186
|
+
};
|
|
187
|
+
// Modalità inline: testo del tooltip accanto alla label
|
|
188
|
+
const getRangeInfo = () => {
|
|
189
|
+
if (minValue !== undefined && maxValue !== undefined)
|
|
190
|
+
return SDKUI_Localizator.AllowedValuesRange.replaceParams(formatNumber(minValue), formatNumber(maxValue));
|
|
191
|
+
if (maxValue !== undefined)
|
|
192
|
+
return SDKUI_Localizator.Max_Value.replaceParams(formatNumber(maxValue));
|
|
193
|
+
if (minValue !== undefined)
|
|
194
|
+
return SDKUI_Localizator.Min_Value.replaceParams(formatNumber(minValue));
|
|
195
|
+
return undefined;
|
|
196
|
+
};
|
|
197
|
+
// Modalità inline: riporta il valore nel range (vuoto -> ultimo valore valido)
|
|
198
|
+
const clampToRange = (curValue) => {
|
|
199
|
+
if (curValue === undefined || curValue === null || curValue === '')
|
|
200
|
+
return minValue !== undefined ? (value?.toString() ?? minValue.toString()) : curValue;
|
|
201
|
+
let number = Number(curValue);
|
|
202
|
+
if (isNaN(number))
|
|
203
|
+
return value?.toString();
|
|
204
|
+
if (maxValue !== undefined)
|
|
205
|
+
number = Math.min(maxValue, number);
|
|
206
|
+
if (minValue !== undefined)
|
|
207
|
+
number = Math.max(minValue, number);
|
|
208
|
+
return number.toString();
|
|
209
|
+
};
|
|
210
|
+
const rangeError = isInlineRange ? getRangeError(currentValue) : undefined;
|
|
211
|
+
const effectiveVil = rangeError ? [...validationItems, new ValidationItem(ResultTypes.ERROR, label, rangeError)] : validationItems;
|
|
152
212
|
const handleInputChange = (e) => {
|
|
153
213
|
let inputValue = e.target.value;
|
|
154
214
|
// Applica textTransform direttamente durante la digitazione (non per i numeri)
|
|
@@ -187,7 +247,7 @@ const TMTextBox = ({ autoComplete = 'off', autoFocus, maxLength, labelColor, pre
|
|
|
187
247
|
let number = Number(inputValue);
|
|
188
248
|
let max = getMaxValue(inputValue);
|
|
189
249
|
// Check maxValue
|
|
190
|
-
if (number > max) {
|
|
250
|
+
if (!isInlineRange && number > max) {
|
|
191
251
|
ShowAlert({
|
|
192
252
|
mode: 'warning',
|
|
193
253
|
message: `Max value is ${max}`,
|
|
@@ -198,7 +258,7 @@ const TMTextBox = ({ autoComplete = 'off', autoFocus, maxLength, labelColor, pre
|
|
|
198
258
|
return;
|
|
199
259
|
}
|
|
200
260
|
// Check minValue
|
|
201
|
-
if (minValue && number < minValue) {
|
|
261
|
+
if (!isInlineRange && minValue && number < minValue) {
|
|
202
262
|
ShowAlert({
|
|
203
263
|
mode: 'warning',
|
|
204
264
|
message: `Min value is ${minValue}`,
|
|
@@ -229,6 +289,14 @@ const TMTextBox = ({ autoComplete = 'off', autoFocus, maxLength, labelColor, pre
|
|
|
229
289
|
}
|
|
230
290
|
}
|
|
231
291
|
setCurrentValue(inputValue);
|
|
292
|
+
if (isInlineRange) {
|
|
293
|
+
clearTimeout(inlineTimerRef.current);
|
|
294
|
+
const isValid = !getRangeError(inputValue) && !(inputValue === '' && minValue !== undefined);
|
|
295
|
+
inlinePendingRef.current = isValid ? inputValue : undefined;
|
|
296
|
+
if (isValid)
|
|
297
|
+
inlineTimerRef.current = setTimeout(() => commitInlineValue(inputValue), 800);
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
232
300
|
onValueChanged?.({ target: { value: inputValue } }); // Passa il valore filtrato
|
|
233
301
|
};
|
|
234
302
|
function getFormulaDataSorce() {
|
|
@@ -296,24 +364,44 @@ const TMTextBox = ({ autoComplete = 'off', autoFocus, maxLength, labelColor, pre
|
|
|
296
364
|
// Stima la larghezza del simbolo (circa 10px per carattere + margine)
|
|
297
365
|
return 6 + (currencySymbol.length * 10) + 4;
|
|
298
366
|
};
|
|
299
|
-
return (_jsx("div", { style: { width: '100%', height: 'fit-content', cursor: onClick ? 'pointer' : undefined, display: 'flex', alignItems: 'center' }, id: `text-${id}`, onClick: onClick, children: _jsxs("div", { style: { flex: 1 }, children: [_jsxs("div", { style: { position: 'relative' }, children: [currencySymbol && initialType !== 'password' && initialType !== 'secureText' && _jsx("span", { style: { position: 'absolute', left: '6px', top: '50%', transform: 'translateY(-50%)', color: disabled ? TMColors.disabled : TMColors.text_normal, fontSize: fontSize, pointerEvents: 'none', zIndex: 1 }, children: currencySymbol }), _jsx(StyledEditor, { ref: inputRef, onContextMenu: (e) => e.stopPropagation(), id: `text-${label}-${id}`, name: label, autoFocus: autoFocus, readOnly: readOnly, type: currentType, disabled: disabled, value: displayedValue, width: width || '100%', placeholder: placeHolder, maxLength: maxLength, autoComplete: autoComplete, spellCheck: false, onFocus: () => setIsFocused(true), onBlur: (e) => {
|
|
300
|
-
|
|
367
|
+
return (_jsx("div", { style: { width: '100%', height: 'fit-content', cursor: onClick ? 'pointer' : undefined, display: 'flex', alignItems: 'center' }, id: `text-${id}`, onClick: onClick, children: _jsxs("div", { style: { flex: 1 }, children: [_jsxs("div", { style: { position: 'relative' }, children: [currencySymbol && initialType !== 'password' && initialType !== 'secureText' && _jsx("span", { style: { position: 'absolute', left: '6px', top: '50%', transform: 'translateY(-50%)', color: disabled ? TMColors.disabled : TMColors.text_normal, fontSize: fontSize, pointerEvents: 'none', zIndex: 1 }, children: currencySymbol }), _jsx(StyledEditor, { ref: inputRef, onContextMenu: (e) => e.stopPropagation(), id: `text-${label}-${id}`, name: label, autoFocus: autoFocus, readOnly: readOnly, type: currentType, disabled: disabled, value: displayedValue, width: width || '100%', placeholder: placeHolder, maxLength: maxLength, autoComplete: autoComplete, spellCheck: false, onFocus: () => setIsFocused(true), onBlur: (e) => {
|
|
368
|
+
setIsFocused(false);
|
|
369
|
+
let blurValue = currentValue;
|
|
370
|
+
if (isInlineRange) {
|
|
371
|
+
const clamped = clampToRange(currentValue);
|
|
372
|
+
if (clamped !== currentValue) {
|
|
373
|
+
blurValue = clamped;
|
|
374
|
+
setCurrentValue(blurValue);
|
|
375
|
+
}
|
|
376
|
+
commitInlineValue(blurValue);
|
|
377
|
+
}
|
|
378
|
+
if (blurValue != value)
|
|
379
|
+
onBlur?.(blurValue);
|
|
380
|
+
}, onChange: handleInputChange, onKeyDown: (e) => {
|
|
301
381
|
if (currentType === 'number') {
|
|
302
382
|
if (!scale && (e.key == "." || e.key == ","))
|
|
303
383
|
e.preventDefault();
|
|
384
|
+
if (isInlineRange && e.key === 'Enter')
|
|
385
|
+
inputRef.current?.blur();
|
|
304
386
|
}
|
|
305
387
|
onKeyDown?.(e);
|
|
306
|
-
}, $isMobile: deviceType === DeviceType.MOBILE, $disabled: disabled, $vil:
|
|
388
|
+
}, $isMobile: deviceType === DeviceType.MOBILE, $disabled: disabled, $vil: effectiveVil, $isModified: isModifiedWhen, $fontSize: fontSize, $maxValue: maxValue, $width: width, $type: currentType, $borderRadius: borderRadius, style: { paddingLeft: `${calculateLeftPadding()}px`, paddingRight: `${calculateRightPadding()}px`, cursor: onClick ? 'pointer' : undefined } }), (initialType === 'password' || initialType === 'secureText') && _jsx(StyledShowPasswordIcon, { onClick: toggleShowPassword, $disabled: disabled, $vil: validationItems, $isModified: isModifiedWhen, children: showPasswordIcon() }), (formulaItems.length > 0 || (showClearButton && currentValue) || buttons.length > 0) &&
|
|
307
389
|
_jsxs("div", { style: { display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', position: 'absolute', right: type === 'number' ? '25px' : (initialType === 'password' ? '34px' : '6px'), top: '50%', transform: 'translateY(-50%)', pointerEvents: disabled ? 'none' : 'auto', opacity: disabled ? 0.4 : 1 }, children: [formulaItems.length > 0 &&
|
|
308
390
|
_jsx(StyledTextBoxEditorButton, { onClick: () => {
|
|
309
391
|
setShowFormulaItemsChooser(true);
|
|
310
392
|
}, children: _jsx(IconDataList, {}) }), (showClearButton && currentValue) &&
|
|
311
393
|
_jsx(StyledTextBoxEditorButton, { onClick: () => { onValueChanged?.({ target: { value: undefined } }); onBlur?.(undefined); }, children: _jsx(IconClearButton, {}) }), buttons.map((buttonItem, index) => {
|
|
312
394
|
return (_jsx(StyledTextBoxEditorButton, { onClick: buttonItem.onClick, children: _jsx(TMTooltip, { content: buttonItem.text, children: buttonItem.icon }) }, buttonItem.text));
|
|
313
|
-
})] }), openFormulaItemsChooser(), formulaItems.length > 0 && (_jsx(TMContextMenu, { items: formulaMenuItems, target: `#text-${id}` }))] }), _jsx(TMVilViewer, { vil:
|
|
395
|
+
})] }), openFormulaItemsChooser(), formulaItems.length > 0 && (_jsx(TMContextMenu, { items: formulaMenuItems, target: `#text-${id}` }))] }), _jsx(TMVilViewer, { vil: effectiveVil })] }) }));
|
|
314
396
|
};
|
|
315
397
|
const renderedLeftLabelTextBox = () => {
|
|
316
|
-
|
|
398
|
+
const rangeInfo = isInlineRange ? getRangeInfo() : undefined;
|
|
399
|
+
const tooltipContent = (infoText || rangeInfo)
|
|
400
|
+
? _jsxs("div", { style: { maxWidth: '280px', whiteSpace: 'normal', textAlign: 'left', lineHeight: 1.4 }, children: [infoText && _jsx("div", { children: infoText }), rangeInfo && _jsx("div", { style: { marginTop: infoText ? '6px' : 0, fontWeight: infoText ? 600 : undefined }, children: rangeInfo })] })
|
|
401
|
+
: undefined;
|
|
402
|
+
return (_jsxs(TMLayoutContainer, { direction: 'horizontal', children: [icon && _jsx(TMLayoutItem, { width: '20px', children: _jsx(StyledEditorIcon, { $disabled: disabled, $vil: validationItems, $isModified: isModifiedWhen, children: icon }) }), _jsx(TMLayoutItem, { children: _jsxs(StyledEditorContainer, { $width: width, children: [label && _jsx(StyledEditorLabel, { $color: labelColor, $isFocused: isFocused, $labelPosition: labelPosition, $disabled: disabled, children: tooltipContent
|
|
403
|
+
? _jsxs("span", { style: { display: 'inline-flex', alignItems: 'center', gap: '4px' }, children: [label, _jsx(TMTooltip, { content: tooltipContent, parentStyle: { display: 'inline-flex' }, children: _jsx(IconInfo, { fontSize: 11, style: { color: disabled ? TMColors.disabled : TMColors.label_normal, opacity: 0.5 } }) })] })
|
|
404
|
+
: label }), renderInputField()] }) })] }));
|
|
317
405
|
};
|
|
318
406
|
return (_jsx("div", { style: elementStyle, children: renderedLeftLabelTextBox() }));
|
|
319
407
|
};
|
|
@@ -22,12 +22,17 @@ const TMArchive = ({ onDcmtTypeSelect = undefined, inputTID, inputFile = null, c
|
|
|
22
22
|
const pendingMidsRef = React.useRef(null);
|
|
23
23
|
const deviceType = useDeviceType();
|
|
24
24
|
useEffect(() => { setMruTIDs(SDKUI_Globals.userSettings.archivingSettings.mruTIDs); }, []);
|
|
25
|
+
// Applica inputTID solo quando cambia davvero: non deve sovrascrivere il tipo documento
|
|
26
|
+
// selezionato dall'utente.
|
|
25
27
|
useEffect(() => {
|
|
26
28
|
if (!inputTID)
|
|
27
29
|
return;
|
|
28
30
|
setCurrentTID(inputTID);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
}, [inputTID]);
|
|
32
|
+
// Evidenzia la scorciatoia del tipo documento corrente, anche quando mruTIDs cambia.
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
setCurrentMruTID(currentTID && mruTIDs.includes(currentTID) ? currentTID : 0);
|
|
35
|
+
}, [currentTID, mruTIDs]);
|
|
31
36
|
useEffect(() => {
|
|
32
37
|
pendingMidsRef.current = inputMids;
|
|
33
38
|
if (currentTID && currentTID > 0 && inputMids && inputMids.length > 0) {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface HolChatMessage {
|
|
3
|
+
id: string;
|
|
4
|
+
text: string;
|
|
5
|
+
isUser: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ITMHelpOnLineChatProps {
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
showChatButton: boolean;
|
|
10
|
+
isLogged: boolean;
|
|
11
|
+
messages: HolChatMessage[];
|
|
12
|
+
conversationId?: string;
|
|
13
|
+
isThinking: boolean;
|
|
14
|
+
endpointUrl?: string;
|
|
15
|
+
onClose: () => void;
|
|
16
|
+
onToggle: () => void;
|
|
17
|
+
onNewConversation: () => void;
|
|
18
|
+
onAddMessage: (message: HolChatMessage) => void;
|
|
19
|
+
onSetThinking: (isThinking: boolean) => void;
|
|
20
|
+
onSetConversationId: (id: string) => void;
|
|
21
|
+
}
|
|
22
|
+
export interface ITMToppyHeaderButtonProps {
|
|
23
|
+
showChatButton: boolean;
|
|
24
|
+
onToggle: () => void;
|
|
25
|
+
}
|
|
26
|
+
declare const TMHelpOnLineChat: React.FC<ITMHelpOnLineChatProps>;
|
|
27
|
+
export default TMHelpOnLineChat;
|
|
28
|
+
export declare const TMToppyHeaderButton: React.FC<ITMToppyHeaderButtonProps>;
|