@topconsultnpm/sdkui-react-beta 6.16.3 → 6.16.5
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/editors/TMLocalizedTextBox.d.ts +15 -0
- package/lib/components/editors/TMLocalizedTextBox.js +95 -0
- package/lib/components/features/archive/TMArchive.d.ts +1 -0
- package/lib/components/features/archive/TMArchive.js +4 -2
- package/lib/components/features/workflow/diagram/DiagramItemComponent.js +0 -1
- package/lib/components/features/workflow/diagram/DiagramItemForm.d.ts +2 -1
- package/lib/components/features/workflow/diagram/DiagramItemForm.js +175 -12
- package/lib/components/features/workflow/diagram/WFDiagram.js +1 -2
- package/lib/components/features/workflow/diagram/interfaces.d.ts +13 -1
- package/lib/components/features/workflow/diagram/queryDescriptorParser.js +35 -37
- package/lib/components/features/workflow/diagram/xmlParser.js +13 -1
- package/lib/components/forms/TMChooserForm.js +2 -2
- package/lib/components/query/TMQuerySummary.js +5 -2
- package/lib/helper/SDKUI_Localizator.d.ts +5 -0
- package/lib/helper/SDKUI_Localizator.js +50 -0
- package/lib/utils/theme.js +10 -2
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CultureIDs } from '@topconsultnpm/sdk-ts-beta';
|
|
3
|
+
interface TMLocalizedTextBoxProps {
|
|
4
|
+
label: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
value_IT?: string;
|
|
7
|
+
value_EN?: string;
|
|
8
|
+
value_FR?: string;
|
|
9
|
+
value_PT?: string;
|
|
10
|
+
value_ES?: string;
|
|
11
|
+
value_DE?: string;
|
|
12
|
+
onValueChanged: (lang: CultureIDs, value: string) => void;
|
|
13
|
+
}
|
|
14
|
+
declare const TMLocalizedTextBox: React.FC<TMLocalizedTextBoxProps>;
|
|
15
|
+
export default TMLocalizedTextBox;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// TMLocalizedTextBox.tsx
|
|
3
|
+
import { useEffect, useRef, useState } from 'react';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import TMTextBox from './TMTextBox';
|
|
6
|
+
import { IconLanguage, SDKUI_Localizator } from '../../helper';
|
|
7
|
+
import { CultureIDs } from '@topconsultnpm/sdk-ts-beta';
|
|
8
|
+
import it from '../../assets/italy.svg';
|
|
9
|
+
import en from '../../assets/united-kingdom.svg';
|
|
10
|
+
import es from '../../assets/spain.svg';
|
|
11
|
+
import fr from '../../assets/france.svg';
|
|
12
|
+
import de from '../../assets/german.svg';
|
|
13
|
+
import pt from '../../assets/portugal.svg';
|
|
14
|
+
const LocalizedContainer = styled.div `
|
|
15
|
+
position: relative;
|
|
16
|
+
width: 100%;
|
|
17
|
+
`;
|
|
18
|
+
const Popover = styled.div `
|
|
19
|
+
display: ${props => props.$isVisible ? 'flex' : 'none'};
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
position: absolute;
|
|
22
|
+
top: 100%; /* Position below the TMTextBox */
|
|
23
|
+
left: 0;
|
|
24
|
+
width: 100%;
|
|
25
|
+
border: 1px solid #ccc;
|
|
26
|
+
border-radius: 4px;
|
|
27
|
+
background-color: #fff;
|
|
28
|
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
29
|
+
z-index: 1000;
|
|
30
|
+
padding: 8px;
|
|
31
|
+
`;
|
|
32
|
+
const Badge = styled.span `
|
|
33
|
+
position: absolute;
|
|
34
|
+
top: -8px;
|
|
35
|
+
right: -8px;
|
|
36
|
+
background-color: #ff9800;
|
|
37
|
+
color: white;
|
|
38
|
+
border-radius: 50%;
|
|
39
|
+
padding: 2px 6px;
|
|
40
|
+
font-size: 10px;
|
|
41
|
+
font-weight: bold;
|
|
42
|
+
pointer-events: none;
|
|
43
|
+
`;
|
|
44
|
+
const IconContainer = styled.div `
|
|
45
|
+
position: relative;
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
`;
|
|
49
|
+
// Helper function to get image path
|
|
50
|
+
const getCultureIDImg = (cultureID) => {
|
|
51
|
+
switch (cultureID) {
|
|
52
|
+
case CultureIDs.En_US: return en;
|
|
53
|
+
case CultureIDs.De_DE: return de;
|
|
54
|
+
case CultureIDs.Es_ES: return es;
|
|
55
|
+
case CultureIDs.Fr_FR: return fr;
|
|
56
|
+
case CultureIDs.Pt_PT: return pt;
|
|
57
|
+
default: return it;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const TMLocalizedTextBox = ({ label, value, value_IT, value_EN, value_FR, value_PT, value_ES, value_DE, onValueChanged, }) => {
|
|
61
|
+
// const [isModalOpen, setIsModalOpen] = useState(false);
|
|
62
|
+
const [isPopoverVisible, setIsPopoverVisible] = useState(false);
|
|
63
|
+
const popoverRef = useRef(null);
|
|
64
|
+
const languages = [
|
|
65
|
+
{ code: CultureIDs.It_IT, label: 'Italiano', value: value_IT },
|
|
66
|
+
{ code: CultureIDs.En_US, label: 'English', value: value_EN },
|
|
67
|
+
{ code: CultureIDs.Fr_FR, label: 'Français', value: value_FR },
|
|
68
|
+
{ code: CultureIDs.Pt_PT, label: 'Português', value: value_PT },
|
|
69
|
+
{ code: CultureIDs.Es_ES, label: 'Español', value: value_ES },
|
|
70
|
+
{ code: CultureIDs.De_DE, label: 'Deutsch', value: value_DE },
|
|
71
|
+
];
|
|
72
|
+
// Calcola il numero di lingue con valori non nulli o vuoti
|
|
73
|
+
const localizedCount = languages.filter(lang => lang.value && lang.value.trim() !== '').length;
|
|
74
|
+
const handleTogglePopover = () => setIsPopoverVisible(prev => !prev);
|
|
75
|
+
const handleClosePopover = () => setIsPopoverVisible(false);
|
|
76
|
+
// Close popover when clicking outside
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
const handleClickOutside = (event) => {
|
|
79
|
+
if (popoverRef.current && !popoverRef.current.contains(event.target)) {
|
|
80
|
+
handleClosePopover();
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
84
|
+
return () => {
|
|
85
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
86
|
+
};
|
|
87
|
+
}, []);
|
|
88
|
+
const localizationButton = {
|
|
89
|
+
text: SDKUI_Localizator.Localization,
|
|
90
|
+
icon: (_jsxs(IconContainer, { children: [_jsx(IconLanguage, {}), localizedCount > 0 && _jsx(Badge, { children: localizedCount })] })),
|
|
91
|
+
onClick: handleTogglePopover,
|
|
92
|
+
};
|
|
93
|
+
return (_jsxs(LocalizedContainer, { ref: popoverRef, children: [_jsx(TMTextBox, { type: "text", label: label, value: value, buttons: [localizationButton], onValueChanged: (e) => onValueChanged(CultureIDs.None, e.target.value) }), _jsx(Popover, { "$isVisible": isPopoverVisible, children: languages.map((lang) => (_jsx(TMTextBox, { label: `${lang.label}`, showClearButton: true, icon: _jsx("img", { src: getCultureIDImg(lang.code), alt: "Lang", width: 18, height: 18 }), value: lang.value || '', onValueChanged: (e) => onValueChanged(lang.code, e.target.value) }, lang.code))) })] }));
|
|
94
|
+
};
|
|
95
|
+
export default TMLocalizedTextBox;
|
|
@@ -6,6 +6,7 @@ interface ITMArchiveProps {
|
|
|
6
6
|
value: string;
|
|
7
7
|
}>;
|
|
8
8
|
inputTID?: number;
|
|
9
|
+
onDcmtTypeSelect?: (tid: number | undefined) => void;
|
|
9
10
|
connectorFileSave?: () => Promise<File>;
|
|
10
11
|
onSavedAsyncCallback?: (tid: number | undefined, did: number | undefined) => Promise<void>;
|
|
11
12
|
}
|
|
@@ -12,7 +12,7 @@ import TMTreeSelector from '../search/TMTreeSelector';
|
|
|
12
12
|
import TMPanel from '../../base/TMPanel';
|
|
13
13
|
import { TMPanelManagerProvider, useTMPanelManagerContext } from '../../layout/panelManager/TMPanelManagerContext';
|
|
14
14
|
import TMPanelManagerContainer from '../../layout/panelManager/TMPanelManagerContainer';
|
|
15
|
-
const TMArchive = ({ inputTID, inputFile = null, connectorFileSave = undefined, onSavedAsyncCallback, inputMids = [] }) => {
|
|
15
|
+
const TMArchive = ({ onDcmtTypeSelect = undefined, inputTID, inputFile = null, connectorFileSave = undefined, onSavedAsyncCallback, inputMids = [] }) => {
|
|
16
16
|
const [currentTID, setCurrentTID] = useState(inputTID ?? 0);
|
|
17
17
|
const [mruTIDs, setMruTIDs] = useState([]);
|
|
18
18
|
const [currentMruTID, setCurrentMruTID] = useState(0);
|
|
@@ -28,10 +28,12 @@ const TMArchive = ({ inputTID, inputFile = null, connectorFileSave = undefined,
|
|
|
28
28
|
if (!currentTID || currentTID <= 0) {
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
+
if (onDcmtTypeSelect && currentTID !== inputTID)
|
|
32
|
+
onDcmtTypeSelect(currentTID);
|
|
31
33
|
DcmtTypeListCacheService.GetAsync(currentTID).then(async (dtd) => {
|
|
32
34
|
setFromDTD(dtd);
|
|
33
35
|
});
|
|
34
|
-
}, [currentTID]);
|
|
36
|
+
}, [currentTID, onDcmtTypeSelect, inputTID]);
|
|
35
37
|
const isMobile = deviceType === DeviceType.MOBILE;
|
|
36
38
|
const tmTreeSelectorElement = useMemo(() => _jsx(TMTreeSelectorWrapper, { isMobile: isMobile, onSelectedTIDChanged: (tid) => {
|
|
37
39
|
setCurrentTID(tid);
|
|
@@ -233,7 +233,6 @@ const DiagramItemComponent = ({ item, isSelected, isCurrent, readOnly, onClick,
|
|
|
233
233
|
textLines = wrapText(item.ItemName, MAX_ITEM_WIDTH - (PADDING_HORIZONTAL * 2), MAX_LINES, context);
|
|
234
234
|
// Check if the last line contains an ellipsis to determine truncation
|
|
235
235
|
isTruncated = textLines[textLines.length - 1].endsWith('...');
|
|
236
|
-
console.log('isTruncated ', isTruncated);
|
|
237
236
|
}
|
|
238
237
|
}
|
|
239
238
|
return (_jsxs(_Fragment, { children: [isTruncated && _jsx("title", { children: item.ItemName }), _jsx("rect", { x: "0", y: "0", width: calculatedWidth, height: calculatedHeight, className: "item-main-shape" }), _jsx("g", { transform: `translate(${svgX}, ${svgY})`, children: _jsx(DiagramItemSvgContent, { itemType: item.Type, width: iconRenderWidth, height: iconRenderHeight }) }), textLines.length > 0 && (_jsx("text", { ref: textRef, x: calculatedWidth / 2, dominantBaseline: "central", className: "item-text", children: textLines.map((line, index) => (_jsx("tspan", { x: calculatedWidth / 2, dy: index === 0 ? PADDING_TOP + SVG_ICON_SIZE + SPACING_SVG_TEXT : FONT_SIZE + 1, children: line }, index))) })), connectors] }));
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DiagramItem } from './interfaces';
|
|
2
|
+
import { DiagramItem, WfInfo } from './interfaces';
|
|
3
3
|
interface DiagramItemFormProps {
|
|
4
4
|
itemToEdit: DiagramItem;
|
|
5
|
+
wf: WfInfo | null | undefined;
|
|
5
6
|
onClose: () => void;
|
|
6
7
|
onApply: (updatedItem: DiagramItem) => void;
|
|
7
8
|
}
|
|
@@ -1,25 +1,188 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react'; // Importa useState
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useMemo, useState } from 'react'; // Importa useState
|
|
3
3
|
import TMModal from '../../../base/TMModal';
|
|
4
4
|
import { DiagramItemTypes } from './interfaces';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import TMCheckBox from '../../../editors/TMCheckBox';
|
|
6
|
+
import { SDKUI_Localizator } from '../../../../helper';
|
|
7
|
+
import TMMetadataChooser from '../../../choosers/TMMetadataChooser';
|
|
8
|
+
import TMButton from '../../../base/TMButton';
|
|
9
|
+
import styled from 'styled-components';
|
|
10
|
+
import TMQuerySummary from '../../../query/TMQuerySummary';
|
|
11
|
+
import { CultureIDs } from '@topconsultnpm/sdk-ts-beta';
|
|
12
|
+
import TMLocalizedTextBox from '../../../editors/TMLocalizedTextBox';
|
|
13
|
+
const FormContainer = styled.div `
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: 5px;
|
|
17
|
+
padding: 10px;
|
|
18
|
+
`;
|
|
19
|
+
const ButtonsContainer = styled.div `
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
gap: 10px;
|
|
23
|
+
margin-top: auto;
|
|
24
|
+
padding-top: 20px;
|
|
25
|
+
`;
|
|
26
|
+
const DiagramItemForm = ({ itemToEdit, wf, onClose, onApply }) => {
|
|
7
27
|
const [localItem, setLocalItem] = useState(itemToEdit);
|
|
28
|
+
const [localItemOrig] = useState(structuredClone(itemToEdit));
|
|
8
29
|
if (!localItem) {
|
|
9
30
|
return null;
|
|
10
31
|
}
|
|
11
|
-
//
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
32
|
+
// Calcola dinamicamente larghezza e altezza del modal con useMemo
|
|
33
|
+
const { calculatedWidth, calculatedHeight } = useMemo(() => {
|
|
34
|
+
let width = '50%';
|
|
35
|
+
let height = '50%';
|
|
36
|
+
switch (localItem.Type) {
|
|
37
|
+
case DiagramItemTypes.Start:
|
|
38
|
+
width = '30%';
|
|
39
|
+
height = '40%';
|
|
40
|
+
break;
|
|
41
|
+
case DiagramItemTypes.End:
|
|
42
|
+
case DiagramItemTypes.Exit:
|
|
43
|
+
width = '30%';
|
|
44
|
+
height = '40%';
|
|
45
|
+
break;
|
|
46
|
+
case DiagramItemTypes.Condition:
|
|
47
|
+
width = '40%';
|
|
48
|
+
height = '60%';
|
|
49
|
+
break;
|
|
50
|
+
default:
|
|
51
|
+
width = '50%';
|
|
52
|
+
height = '50%';
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
return { calculatedWidth: width, calculatedHeight: height };
|
|
56
|
+
}, [localItem.Type]);
|
|
57
|
+
const handleNameChange = useCallback((event) => {
|
|
58
|
+
const newValue = event.target.value;
|
|
59
|
+
setLocalItem(prevLocalItem => ({
|
|
60
|
+
...prevLocalItem,
|
|
61
|
+
ItemName: newValue
|
|
62
|
+
}));
|
|
63
|
+
}, []);
|
|
64
|
+
const handleStartAfterArchiveChange = useCallback((newValue) => {
|
|
65
|
+
setLocalItem(prevLocalItem => ({
|
|
66
|
+
...prevLocalItem,
|
|
67
|
+
StartAfterArchive: newValue
|
|
68
|
+
}));
|
|
69
|
+
}, []);
|
|
70
|
+
const handleStartAfterUpdateChange = useCallback((newValue) => {
|
|
71
|
+
setLocalItem(prevLocalItem => ({
|
|
72
|
+
...prevLocalItem,
|
|
73
|
+
StartAfterUpdate: newValue
|
|
74
|
+
}));
|
|
75
|
+
}, []);
|
|
76
|
+
const handleStartAfterUpdateMIDsChange = useCallback((selectedMetadata) => {
|
|
77
|
+
const mids = selectedMetadata.map((item) => item.mid).filter((mid) => mid !== undefined);
|
|
78
|
+
setLocalItem(prevLocalItem => ({
|
|
79
|
+
...prevLocalItem,
|
|
80
|
+
StartAfterUpdateMIDs: mids
|
|
81
|
+
}));
|
|
82
|
+
}, []);
|
|
83
|
+
const handleHistChange = useCallback((newValue) => {
|
|
84
|
+
setLocalItem(prevLocalItem => ({
|
|
85
|
+
...prevLocalItem,
|
|
86
|
+
Hist: newValue
|
|
87
|
+
}));
|
|
88
|
+
}, []);
|
|
89
|
+
const handleEndWFInstanceChange = useCallback((newValue) => {
|
|
90
|
+
setLocalItem(prevLocalItem => ({
|
|
91
|
+
...prevLocalItem,
|
|
92
|
+
EndWFInstance: newValue
|
|
93
|
+
}));
|
|
94
|
+
}, []);
|
|
95
|
+
const handleQDChange = useCallback((newValue) => {
|
|
96
|
+
setLocalItem(prevLocalItem => ({
|
|
97
|
+
...prevLocalItem,
|
|
98
|
+
QD: newValue
|
|
99
|
+
}));
|
|
100
|
+
}, []);
|
|
18
101
|
// Gestore per il salvataggio
|
|
19
102
|
const handleSave = () => {
|
|
20
103
|
onApply(localItem);
|
|
21
104
|
onClose();
|
|
22
105
|
};
|
|
23
|
-
|
|
106
|
+
const handleLocalizedNameChange = useCallback((lang, newValue) => {
|
|
107
|
+
setLocalItem(prevLocalItem => {
|
|
108
|
+
const updatedItem = { ...prevLocalItem };
|
|
109
|
+
// Aggiungi la logica per aggiornare il campo corretto
|
|
110
|
+
switch (lang) {
|
|
111
|
+
case CultureIDs.It_IT:
|
|
112
|
+
updatedItem.ItemName_IT = newValue;
|
|
113
|
+
break;
|
|
114
|
+
case CultureIDs.En_US:
|
|
115
|
+
updatedItem.ItemName_EN = newValue;
|
|
116
|
+
break;
|
|
117
|
+
case CultureIDs.Fr_FR:
|
|
118
|
+
updatedItem.ItemName_FR = newValue;
|
|
119
|
+
break;
|
|
120
|
+
case CultureIDs.Pt_PT:
|
|
121
|
+
updatedItem.ItemName_PT = newValue;
|
|
122
|
+
break;
|
|
123
|
+
case CultureIDs.Es_ES:
|
|
124
|
+
updatedItem.ItemName_ES = newValue;
|
|
125
|
+
break;
|
|
126
|
+
case CultureIDs.De_DE:
|
|
127
|
+
updatedItem.ItemName_DE = newValue;
|
|
128
|
+
break;
|
|
129
|
+
default:
|
|
130
|
+
updatedItem.ItemName = newValue;
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
return updatedItem;
|
|
134
|
+
});
|
|
135
|
+
}, []);
|
|
136
|
+
// Function to render common elements like the name textbox
|
|
137
|
+
const renderCommonFields = () => {
|
|
138
|
+
if (localItem.Type !== DiagramItemTypes.Start && localItem.Type !== DiagramItemTypes.End && localItem.Type !== DiagramItemTypes.Exit) {
|
|
139
|
+
return (_jsx(TMLocalizedTextBox, { label: SDKUI_Localizator.Name, value: localItem.ItemName, value_IT: localItem.ItemName_IT, value_EN: localItem.ItemName_EN, value_FR: localItem.ItemName_FR, value_PT: localItem.ItemName_PT, value_ES: localItem.ItemName_ES, value_DE: localItem.ItemName_DE, onValueChanged: handleLocalizedNameChange })
|
|
140
|
+
// <TMTextBox
|
|
141
|
+
// type="text"
|
|
142
|
+
// label={SDKUI_Localizator.Name}
|
|
143
|
+
// value={localItem.ItemName}
|
|
144
|
+
// isModifiedWhen={localItem.ItemName !== localItemOrig.ItemName}
|
|
145
|
+
// onValueChanged={handleNameChange}
|
|
146
|
+
// />
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
return null;
|
|
150
|
+
};
|
|
151
|
+
// Function to render Start-specific fields
|
|
152
|
+
const renderStartFields = () => {
|
|
153
|
+
return (_jsxs(_Fragment, { children: [_jsx(TMCheckBox, { value: localItem.StartAfterArchive ?? 0, label: SDKUI_Localizator.WorkflowStartAfterArchive, isModifiedWhen: localItem.StartAfterArchive !== localItemOrig.StartAfterArchive, onValueChanged: handleStartAfterArchiveChange }), _jsx(TMCheckBox, { value: localItem.StartAfterUpdate ?? 0, label: SDKUI_Localizator.WorkflowStartAfterUpdate, isModifiedWhen: localItem.StartAfterUpdate !== localItemOrig.StartAfterUpdate, onValueChanged: handleStartAfterUpdateChange }), _jsx(TMMetadataChooser, { tids: wf?.MTID ? [wf.MTID] : [], allowMultipleSelection: true, allowSysMetadata: false, showClearButton: true, disabled: localItem.StartAfterUpdate !== 1, values: localItem.StartAfterUpdateMIDs?.map((mid) => ({ tid: wf?.MTID, mid: mid })) ?? [], onValueChanged: handleStartAfterUpdateMIDsChange, width: "100%" })] }));
|
|
154
|
+
};
|
|
155
|
+
// Function to render End-specific fields
|
|
156
|
+
const renderEndFields = () => {
|
|
157
|
+
return (_jsx(TMCheckBox, { value: localItem.Hist ?? 0, label: SDKUI_Localizator.WorkflowHistWI, isModifiedWhen: localItem.Hist !== localItemOrig.Hist, onValueChanged: handleHistChange }));
|
|
158
|
+
};
|
|
159
|
+
// Function to render Exit-specific fields
|
|
160
|
+
const renderExitFields = () => {
|
|
161
|
+
return (_jsx(TMCheckBox, { value: localItem.EndWFInstance ?? 0, label: SDKUI_Localizator.WorkflowEndInstance, isModifiedWhen: localItem.EndWFInstance !== localItemOrig.EndWFInstance, onValueChanged: handleEndWFInstanceChange }));
|
|
162
|
+
};
|
|
163
|
+
const renderConditionFields = () => {
|
|
164
|
+
return (_jsx(TMQuerySummary, { qd: localItem.QD, onValueChanged: handleQDChange }));
|
|
165
|
+
};
|
|
166
|
+
const renderForm = () => {
|
|
167
|
+
let specificFields;
|
|
168
|
+
switch (localItem.Type) {
|
|
169
|
+
case DiagramItemTypes.Start:
|
|
170
|
+
specificFields = renderStartFields();
|
|
171
|
+
break;
|
|
172
|
+
case DiagramItemTypes.End:
|
|
173
|
+
specificFields = renderEndFields();
|
|
174
|
+
break;
|
|
175
|
+
case DiagramItemTypes.Exit:
|
|
176
|
+
specificFields = renderExitFields();
|
|
177
|
+
break;
|
|
178
|
+
case DiagramItemTypes.Condition:
|
|
179
|
+
specificFields = renderConditionFields();
|
|
180
|
+
break;
|
|
181
|
+
default:
|
|
182
|
+
specificFields = null;
|
|
183
|
+
}
|
|
184
|
+
return (_jsxs(FormContainer, { children: [renderCommonFields(), specificFields, _jsx(ButtonsContainer, { children: _jsx(TMButton, { caption: 'Applica', color: 'success', showTooltip: false, onClick: handleSave }) })] }));
|
|
185
|
+
};
|
|
186
|
+
return (_jsx(TMModal, { title: DiagramItemTypes[localItem.Type].toString(), onClose: onClose, isModal: true, width: calculatedWidth, height: calculatedHeight, children: renderForm() }));
|
|
24
187
|
};
|
|
25
188
|
export default DiagramItemForm;
|
|
@@ -1297,7 +1297,6 @@ const WFDiagram = ({ xmlDiagramString, currentSetID, readOnly = false, zoomLevel
|
|
|
1297
1297
|
setDraggedItemType(null);
|
|
1298
1298
|
};
|
|
1299
1299
|
const handleItemDimensionsChange = useCallback((itemId, width, height) => {
|
|
1300
|
-
console.log('itemId', itemId, 'width', width, 'height', height);
|
|
1301
1300
|
setWfDiagram(prevDiagram => {
|
|
1302
1301
|
if (!prevDiagram)
|
|
1303
1302
|
return null;
|
|
@@ -1391,6 +1390,6 @@ const WFDiagram = ({ xmlDiagramString, currentSetID, readOnly = false, zoomLevel
|
|
|
1391
1390
|
// Determina se questa è la connessione che stiamo trascinando
|
|
1392
1391
|
const isThisConnectionBeingDragged = isDraggingExistingConnectionEndpoint && draggingConnectionId === connection.ID;
|
|
1393
1392
|
return (_jsx(ConnectionComponent, { connection: connection, isSelected: selectedConnections.has(connection.ID), sourcePoint: sourcePoint, sinkPoint: sinkPoint, isTemporary: isThisConnectionBeingDragged, onClick: handleConnectionClick, onConnectionEndpointMouseDown: handleConnectionEndpointMouseDown }, connection.ID));
|
|
1394
|
-
}), isDrawingConnection && tempConnectionPathData && (_jsx(TempConnectionPath, { d: tempConnectionPathData })), isDraggingExistingConnectionEndpoint && tempConnectionPathData && (_jsx(TempConnectionPath, { d: tempConnectionPathData })), isDrawingSelectionRect && currentSelectionRect && (_jsx(SelectionRect, { x: currentSelectionRect.x, y: currentSelectionRect.y, width: currentSelectionRect.width, height: currentSelectionRect.height }))] }) })) : (_jsx(DiagramMessage, { children: `${SDKUI_Localizator.WorkflowDiagramMissingOrInvalid} ...` })) }), isModalOpen && itemToEdit && (_jsx(DiagramItemForm, { itemToEdit: itemToEdit, onClose: handleCloseModal, onApply: handleUpdateDiagramItem }))] }));
|
|
1393
|
+
}), isDrawingConnection && tempConnectionPathData && (_jsx(TempConnectionPath, { d: tempConnectionPathData })), isDraggingExistingConnectionEndpoint && tempConnectionPathData && (_jsx(TempConnectionPath, { d: tempConnectionPathData })), isDrawingSelectionRect && currentSelectionRect && (_jsx(SelectionRect, { x: currentSelectionRect.x, y: currentSelectionRect.y, width: currentSelectionRect.width, height: currentSelectionRect.height }))] }) })) : (_jsx(DiagramMessage, { children: `${SDKUI_Localizator.WorkflowDiagramMissingOrInvalid} ...` })) }), isModalOpen && itemToEdit && (_jsx(DiagramItemForm, { itemToEdit: itemToEdit, wf: wfDiagram?.Info, onClose: handleCloseModal, onApply: handleUpdateDiagramItem }))] }));
|
|
1395
1394
|
};
|
|
1396
1395
|
export default WFDiagram;
|
|
@@ -38,7 +38,19 @@ export interface DiagramItem {
|
|
|
38
38
|
Height: number;
|
|
39
39
|
Type: DiagramItemTypes;
|
|
40
40
|
ItemName: string;
|
|
41
|
+
ItemName_IT?: string;
|
|
42
|
+
ItemName_EN?: string;
|
|
43
|
+
ItemName_FR?: string;
|
|
44
|
+
ItemName_PT?: string;
|
|
45
|
+
ItemName_ES?: string;
|
|
46
|
+
ItemName_DE?: string;
|
|
41
47
|
Description: string;
|
|
48
|
+
Description_IT?: string;
|
|
49
|
+
Description_EN?: string;
|
|
50
|
+
Description_FR?: string;
|
|
51
|
+
Description_PT?: string;
|
|
52
|
+
Description_ES?: string;
|
|
53
|
+
Description_DE?: string;
|
|
42
54
|
StatusValue?: string;
|
|
43
55
|
RegisterPost?: boolean;
|
|
44
56
|
AllowZeroTos?: boolean;
|
|
@@ -46,7 +58,7 @@ export interface DiagramItem {
|
|
|
46
58
|
SetRule?: number;
|
|
47
59
|
StartAfterArchive?: number;
|
|
48
60
|
StartAfterUpdate?: number;
|
|
49
|
-
StartAfterUpdateMIDs?:
|
|
61
|
+
StartAfterUpdateMIDs?: number[];
|
|
50
62
|
StartManual?: number;
|
|
51
63
|
Hist?: number;
|
|
52
64
|
EndWFInstance?: number;
|
|
@@ -39,9 +39,9 @@ const getString = (element, selector) => {
|
|
|
39
39
|
const parseSelectItem = (itemXML) => {
|
|
40
40
|
const selectItem = new SelectItem();
|
|
41
41
|
selectItem.function = getString(itemXML, "Function");
|
|
42
|
-
selectItem.tid = getNumber(itemXML, "
|
|
42
|
+
selectItem.tid = getNumber(itemXML, "TID");
|
|
43
43
|
selectItem.alias = getString(itemXML, "Alias");
|
|
44
|
-
selectItem.mid = getNumber(itemXML, "
|
|
44
|
+
selectItem.mid = getNumber(itemXML, "MID");
|
|
45
45
|
selectItem.as = getString(itemXML, "As");
|
|
46
46
|
selectItem.visibility = getString(itemXML, "Visibility");
|
|
47
47
|
return selectItem;
|
|
@@ -51,7 +51,7 @@ const parseSelectItem = (itemXML) => {
|
|
|
51
51
|
*/
|
|
52
52
|
const parseFromItem = (itemXML) => {
|
|
53
53
|
const fromItem = new FromItem();
|
|
54
|
-
fromItem.tid = getNumber(itemXML, "
|
|
54
|
+
fromItem.tid = getNumber(itemXML, "TID");
|
|
55
55
|
return fromItem;
|
|
56
56
|
};
|
|
57
57
|
/**
|
|
@@ -59,16 +59,16 @@ const parseFromItem = (itemXML) => {
|
|
|
59
59
|
*/
|
|
60
60
|
const parseOnJoinItem = (itemXML) => {
|
|
61
61
|
const onJoinItem = new OnJoinItem();
|
|
62
|
-
onJoinItem.leftBrackets = getString(itemXML, "
|
|
63
|
-
onJoinItem.leftTID = getNumber(itemXML, "
|
|
64
|
-
onJoinItem.leftAlias = getString(itemXML, "
|
|
65
|
-
onJoinItem.leftMID = getNumber(itemXML, "
|
|
66
|
-
onJoinItem.operator = getString(itemXML, "
|
|
67
|
-
onJoinItem.rightTID = getNumber(itemXML, "
|
|
68
|
-
onJoinItem.rightAlias = getString(itemXML, "
|
|
69
|
-
onJoinItem.rightMID = getNumber(itemXML, "
|
|
70
|
-
onJoinItem.rightBrackets = getString(itemXML, "
|
|
71
|
-
onJoinItem.or = getBoolean(itemXML, "
|
|
62
|
+
onJoinItem.leftBrackets = getString(itemXML, "LeftBrackets");
|
|
63
|
+
onJoinItem.leftTID = getNumber(itemXML, "LeftTID");
|
|
64
|
+
onJoinItem.leftAlias = getString(itemXML, "LeftAlias");
|
|
65
|
+
onJoinItem.leftMID = getNumber(itemXML, "LeftMID");
|
|
66
|
+
onJoinItem.operator = getString(itemXML, "Operator");
|
|
67
|
+
onJoinItem.rightTID = getNumber(itemXML, "RightTID");
|
|
68
|
+
onJoinItem.rightAlias = getString(itemXML, "RightAlias");
|
|
69
|
+
onJoinItem.rightMID = getNumber(itemXML, "RightMID");
|
|
70
|
+
onJoinItem.rightBrackets = getString(itemXML, "RightBrackets");
|
|
71
|
+
onJoinItem.or = getBoolean(itemXML, "Or");
|
|
72
72
|
return onJoinItem;
|
|
73
73
|
};
|
|
74
74
|
/**
|
|
@@ -76,9 +76,9 @@ const parseOnJoinItem = (itemXML) => {
|
|
|
76
76
|
*/
|
|
77
77
|
const parseJoinItem = (itemXML) => {
|
|
78
78
|
const joinItem = new JoinItem();
|
|
79
|
-
joinItem.joinType = getString(itemXML, "
|
|
80
|
-
joinItem.tid = getNumber(itemXML, "
|
|
81
|
-
joinItem.alias = getString(itemXML, "
|
|
79
|
+
joinItem.joinType = getString(itemXML, "JoinType");
|
|
80
|
+
joinItem.tid = getNumber(itemXML, "TID");
|
|
81
|
+
joinItem.alias = getString(itemXML, "Alias");
|
|
82
82
|
const onItems = [];
|
|
83
83
|
itemXML.querySelectorAll("On > OnJoinItem").forEach(onItemXML => {
|
|
84
84
|
onItems.push(parseOnJoinItem(onItemXML));
|
|
@@ -91,15 +91,15 @@ const parseJoinItem = (itemXML) => {
|
|
|
91
91
|
*/
|
|
92
92
|
const parseWhereItem = (itemXML) => {
|
|
93
93
|
const whereItem = new WhereItem();
|
|
94
|
-
whereItem.leftBrackets = getString(itemXML, "
|
|
95
|
-
whereItem.tid = getNumber(itemXML, "
|
|
96
|
-
whereItem.alias = getString(itemXML, "
|
|
97
|
-
whereItem.mid = getNumber(itemXML, "
|
|
98
|
-
whereItem.operator = getString(itemXML, "
|
|
99
|
-
whereItem.value1 = getString(itemXML, "
|
|
100
|
-
whereItem.value2 = getString(itemXML, "
|
|
101
|
-
whereItem.rightBrackets = getString(itemXML, "
|
|
102
|
-
whereItem.or = getBoolean(itemXML, "
|
|
94
|
+
whereItem.leftBrackets = getString(itemXML, "LeftBrackets");
|
|
95
|
+
whereItem.tid = getNumber(itemXML, "TID");
|
|
96
|
+
whereItem.alias = getString(itemXML, "Alias");
|
|
97
|
+
whereItem.mid = getNumber(itemXML, "MID");
|
|
98
|
+
whereItem.operator = getString(itemXML, "Operator");
|
|
99
|
+
whereItem.value1 = getString(itemXML, "Value1");
|
|
100
|
+
whereItem.value2 = getString(itemXML, "Value2");
|
|
101
|
+
whereItem.rightBrackets = getString(itemXML, "RightBrackets");
|
|
102
|
+
whereItem.or = getBoolean(itemXML, "Or");
|
|
103
103
|
return whereItem;
|
|
104
104
|
};
|
|
105
105
|
/**
|
|
@@ -107,10 +107,10 @@ const parseWhereItem = (itemXML) => {
|
|
|
107
107
|
*/
|
|
108
108
|
const parseOrderByItem = (itemXML) => {
|
|
109
109
|
const orderByItem = new OrderByItem();
|
|
110
|
-
orderByItem.tid = getNumber(itemXML, "
|
|
111
|
-
orderByItem.alias = getString(itemXML, "
|
|
112
|
-
orderByItem.mid = getNumber(itemXML, "
|
|
113
|
-
orderByItem.asc = getBoolean(itemXML, "
|
|
110
|
+
orderByItem.tid = getNumber(itemXML, "TID");
|
|
111
|
+
orderByItem.alias = getString(itemXML, "Alias");
|
|
112
|
+
orderByItem.mid = getNumber(itemXML, "MID");
|
|
113
|
+
orderByItem.asc = getBoolean(itemXML, "Asc");
|
|
114
114
|
return orderByItem;
|
|
115
115
|
};
|
|
116
116
|
/**
|
|
@@ -120,16 +120,17 @@ const parseOrderByItem = (itemXML) => {
|
|
|
120
120
|
const parseQueryParameterDescriptor = (itemXML) => {
|
|
121
121
|
const paramDescriptor = new QueryParameterDescriptor();
|
|
122
122
|
// For 'value', you might need more sophisticated parsing depending on its type (string, number, boolean, etc.)
|
|
123
|
-
const valueElement = itemXML.querySelector("
|
|
123
|
+
const valueElement = itemXML.querySelector("Value");
|
|
124
124
|
paramDescriptor.value = valueElement ? valueElement.textContent : undefined;
|
|
125
|
-
paramDescriptor.mappedTID = getNumber(itemXML, "
|
|
126
|
-
paramDescriptor.mappedMID = getNumber(itemXML, "
|
|
125
|
+
paramDescriptor.mappedTID = getNumber(itemXML, "MappedTID");
|
|
126
|
+
paramDescriptor.mappedMID = getNumber(itemXML, "MappedMID");
|
|
127
127
|
return paramDescriptor;
|
|
128
128
|
};
|
|
129
129
|
export const parseQueryDescriptorXml = (xmlString) => {
|
|
130
130
|
if (!xmlString || xmlString.trim() === '') {
|
|
131
131
|
return undefined;
|
|
132
132
|
}
|
|
133
|
+
console.log('QD xmlString', xmlString);
|
|
133
134
|
const parser = new DOMParser();
|
|
134
135
|
const xmlDoc = parser.parseFromString(xmlString, "application/xml");
|
|
135
136
|
let queryDescriptorElement = xmlDoc.querySelector("QueryDescriptor");
|
|
@@ -142,11 +143,7 @@ export const parseQueryDescriptorXml = (xmlString) => {
|
|
|
142
143
|
return undefined;
|
|
143
144
|
}
|
|
144
145
|
const queryDescriptor = new QueryDescriptor();
|
|
145
|
-
queryDescriptor.maxDcmtsToBeReturned = getNumber(queryDescriptorElement, "
|
|
146
|
-
queryDescriptor.isDistinct = getBoolean(queryDescriptorElement, "isDistinct");
|
|
147
|
-
queryDescriptor.offset = getNumber(queryDescriptorElement, "offset");
|
|
148
|
-
queryDescriptor.fetch = getNumber(queryDescriptorElement, "fetch");
|
|
149
|
-
queryDescriptor.isLexProt = getNumber(queryDescriptorElement, "isLexProt");
|
|
146
|
+
queryDescriptor.maxDcmtsToBeReturned = getNumber(queryDescriptorElement, "MaxDcmtsToBeReturned");
|
|
150
147
|
const selectItems = [];
|
|
151
148
|
queryDescriptorElement.querySelectorAll("Select > SelectItem").forEach(itemXML => {
|
|
152
149
|
selectItems.push(parseSelectItem(itemXML));
|
|
@@ -176,5 +173,6 @@ export const parseQueryDescriptorXml = (xmlString) => {
|
|
|
176
173
|
paramsItems.push(parseQueryParameterDescriptor(itemXML));
|
|
177
174
|
});
|
|
178
175
|
queryDescriptor.params = paramsItems.length > 0 ? paramsItems : undefined;
|
|
176
|
+
console.log('queryDescriptor', queryDescriptor);
|
|
179
177
|
return queryDescriptor;
|
|
180
178
|
};
|
|
@@ -75,7 +75,19 @@ export const parseWfDiagramXml = (xmlString) => {
|
|
|
75
75
|
Height: height,
|
|
76
76
|
Type: parseInt(itemXML.querySelector("Type")?.textContent || "0", 10),
|
|
77
77
|
ItemName: itemXML.querySelector("Name")?.textContent || "",
|
|
78
|
+
ItemName_IT: itemXML.querySelector("Name_IT")?.textContent || "",
|
|
79
|
+
ItemName_EN: itemXML.querySelector("Name_EN")?.textContent || "",
|
|
80
|
+
ItemName_FR: itemXML.querySelector("Name_FR")?.textContent || "",
|
|
81
|
+
ItemName_PT: itemXML.querySelector("Name_PT")?.textContent || "",
|
|
82
|
+
ItemName_ES: itemXML.querySelector("Name_ES")?.textContent || "",
|
|
83
|
+
ItemName_DE: itemXML.querySelector("Name_DE")?.textContent || "",
|
|
78
84
|
Description: itemXML.querySelector("Description")?.textContent || "",
|
|
85
|
+
Description_IT: itemXML.querySelector("Description_IT")?.textContent || "",
|
|
86
|
+
Description_EN: itemXML.querySelector("Description_EN")?.textContent || "",
|
|
87
|
+
Description_FR: itemXML.querySelector("Description_FR")?.textContent || "",
|
|
88
|
+
Description_PT: itemXML.querySelector("Description_PT")?.textContent || "",
|
|
89
|
+
Description_ES: itemXML.querySelector("Description_ES")?.textContent || "",
|
|
90
|
+
Description_DE: itemXML.querySelector("Description_DE")?.textContent || "",
|
|
79
91
|
StatusValue: itemXML.querySelector("StatusValue")?.textContent || undefined,
|
|
80
92
|
RegisterPost: itemXML.querySelector("RegisterPost")?.textContent === "true",
|
|
81
93
|
AllowZeroTos: itemXML.querySelector("AllowZeroTos")?.textContent === "true",
|
|
@@ -83,7 +95,7 @@ export const parseWfDiagramXml = (xmlString) => {
|
|
|
83
95
|
SetRule: parseInt(itemXML.querySelector("SetRule")?.textContent || "0", 10),
|
|
84
96
|
StartAfterArchive: parseInt(itemXML.querySelector("StartAfterArchive")?.textContent || "0", 10),
|
|
85
97
|
StartAfterUpdate: parseInt(itemXML.querySelector("StartAfterUpdate")?.textContent || "0", 10),
|
|
86
|
-
StartAfterUpdateMIDs: itemXML.querySelector("StartAfterUpdateMIDs")?.textContent || undefined,
|
|
98
|
+
StartAfterUpdateMIDs: itemXML.querySelector("StartAfterUpdateMIDs")?.textContent?.split(';').map(Number) || undefined,
|
|
87
99
|
StartManual: parseInt(itemXML.querySelector("StartManual")?.textContent || "0", 10),
|
|
88
100
|
Hist: parseInt(itemXML.querySelector("Hist")?.textContent || "0", 10),
|
|
89
101
|
EndWFInstance: parseInt(itemXML.querySelector("EndWFInstance")?.textContent || "0", 10),
|
|
@@ -86,8 +86,8 @@ const TMChooserForm = ({ children, title, allowMultipleSelection = false, allowA
|
|
|
86
86
|
...summaryItems ?? {}
|
|
87
87
|
});
|
|
88
88
|
}, [manageUseLocalizedName, summaryItems]);
|
|
89
|
-
return (_jsx(TMModal, { title: renderTitle(), width: width ?? '550px', height: height ?? '600px', toolbar: _jsx(ToolbarButtons, {}), onClose: onClose, children:
|
|
90
|
-
filteredItems.length > 0
|
|
89
|
+
return (_jsx(TMModal, { title: renderTitle(), width: width ?? '550px', height: height ?? '600px', toolbar: _jsx(ToolbarButtons, {}), onClose: onClose, children: children ??
|
|
90
|
+
filteredItems.length > 0
|
|
91
91
|
? _jsx(TMDataGrid, { dataSource: filteredItems, keyExpr: keyName, dataColumns: dataColumns, focusedRowKey: focusedRowKey, selectedRowKeys: selectedRowKeys, searchPanelFocusStarting: true, headerFilter: { visible: true }, selection: { mode: allowMultipleSelection ? 'multiple' : 'single', showCheckBoxesMode: 'always', selectAllMode: 'allPages' }, grouping: allowGrouping ? { autoExpandAll: false, expandMode: 'rowClick' } : undefined, summary: customSummary, onFocusedRowChanged: handleFocusedRowChange, onSelectionChanged: handleSelectionChanged, onRowDblClick: handleRowDoubleClick })
|
|
92
92
|
: _jsx(TMLayoutContainer, { gap: 30, alignItems: 'center', justifyContent: 'center', children: _jsx(TMLayoutItem, { children: _jsx("p", { style: { height: "100%", color: TMColors.primaryColor, fontSize: "1.5rem", display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: SDKUI_Localizator.NoDataToDisplay }) }) }) }));
|
|
93
93
|
};
|
|
@@ -8,6 +8,7 @@ import TMButton from '../base/TMButton';
|
|
|
8
8
|
import { getQueryCountAsync, IconCount, IconEraser, IconPencil, SDKUI_Localizator } from '../../helper';
|
|
9
9
|
import TMVilViewer from '../base/TMVilViewer';
|
|
10
10
|
import { FormModes } from '../../ts';
|
|
11
|
+
import TMModal from '../base/TMModal';
|
|
11
12
|
// #region Style
|
|
12
13
|
const StyledWrapper = styled.div `
|
|
13
14
|
display: flex;
|
|
@@ -26,7 +27,9 @@ const StyledQueryToolbar = styled.div `
|
|
|
26
27
|
const TMQuerySummary = ({ children, qd, validateSelect = true, validateOrderBy = true, raiseWarningForOnlyMetadataDcmtTypes = false, validationItems = [], onValueChanged, onEditClick, onClose }) => {
|
|
27
28
|
const [showEditor, setShowEditor] = useState(false);
|
|
28
29
|
const validationItemsQd = validationItems.filter(o => o.PropertyScopes.includes(TMScopeNames.qd) || o.PropertyName == TMScopeNames.qd);
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
const useInternalEditor = onEditClick === undefined;
|
|
31
|
+
return (_jsxs(StyledWrapper, { children: [_jsxs(StyledQueryToolbar, { children: [_jsx(TMButton, { caption: SDKUI_Localizator.QueryDefine, icon: _jsx(IconPencil, { fontSize: 16 }), btnStyle: 'toolbar', onClick: () => onEditClick ? onEditClick() : setShowEditor(true) }), _jsx(TMButton, { caption: SDKUI_Localizator.QueryCount, icon: _jsx(IconCount, { fontSize: 16 }), disabled: validationItemsQd.filter(o => o.ResultType == ResultTypes.ERROR).length > 0, btnStyle: 'toolbar', onClick: () => getQueryCountAsync(qd, true) }), _jsx(TMButton, { caption: SDKUI_Localizator.QueryClear, icon: _jsx(IconEraser, { fontSize: 16 }), btnStyle: 'toolbar', onClick: () => onValueChanged?.(new QueryDescriptor()) }), children] }), _jsxs("div", { style: { display: 'flex', flexDirection: 'column', width: '100%', overflowX: 'auto' }, children: [qd && qd.from &&
|
|
32
|
+
_jsx(TMQueryEditor, { formMode: FormModes.ReadOnly, inputData: qd, isModal: false, showToolbar: false, validateSelect: validateSelect, validateOrderBy: validateOrderBy, raiseWarningForOnlyMetadataDcmtTypes: raiseWarningForOnlyMetadataDcmtTypes }), _jsx("div", { style: { padding: '0px 5px' }, children: _jsx(TMVilViewer, { vil: validationItemsQd }) })] }), useInternalEditor && showEditor &&
|
|
33
|
+
_jsx(TMModal, { title: SDKUI_Localizator.QueryDefine, children: _jsx(TMQueryEditor, { formMode: FormModes.Update, inputData: qd, isModal: true, raiseWarningForOnlyMetadataDcmtTypes: raiseWarningForOnlyMetadataDcmtTypes, validateSelect: validateSelect, validateOrderBy: validateOrderBy, onApplied: (newValue) => onValueChanged?.(newValue), onClose: () => { setShowEditor(false); } }) })] }));
|
|
31
34
|
};
|
|
32
35
|
export default TMQuerySummary;
|
|
@@ -254,6 +254,7 @@ export declare class SDKUI_Localizator {
|
|
|
254
254
|
static get List_Hide(): "Liste ausblenden" | "Hide list" | "Ocultar lista" | "Masquer la liste" | "Nascondi la lista";
|
|
255
255
|
static get List_Show(): "liste anzeigen" | "Show list" | "Ver lista" | "Afficher la liste" | "Visualizza la lista";
|
|
256
256
|
static get Loading(): "Laden" | "Loading" | "Carga" | "Chargement" | "Caricamento";
|
|
257
|
+
static get Localization(): "Lokalisierung" | "Localization" | "Localización" | "Localisation" | "Localização" | "Localizzazione";
|
|
257
258
|
static get LoadingWorkGroups(): string;
|
|
258
259
|
static get LoadingParticipants(): string;
|
|
259
260
|
static get Login(): string;
|
|
@@ -531,7 +532,11 @@ export declare class SDKUI_Localizator {
|
|
|
531
532
|
static get WelcomeTo(): "Willkommen bei {{0}}" | "Welcome to {{0}}" | "Bienvenido a {{0}}" | "Bienvenue sur {{0}}" | "Bem-vindo à {{0}}" | "Benvenuto su {{0}}";
|
|
532
533
|
static get WorkflowApproval(): "Workflow-Genehmigung" | "Workflow approval" | "Aprobación de flujo de trabajo" | "Approbation de workflow" | "Aprovação de fluxo de trabalho" | "Approvazione workflow";
|
|
533
534
|
static get WorkflowDiagramMissingOrInvalid(): "Diagramm fehlt oder ist ungültig" | "Diagram missing or invalid" | "Diagrama no presente o no válido" | "Schéma manquant ou invalide" | "Diagrama ausente ou inválido" | "Diagramma non presente o non valido";
|
|
535
|
+
static get WorkflowEndInstance(): "Instanz beenden" | "End instance" | "Finalizar instancia" | "Termine l'instance" | "Pare a instância" | "Termina istanza";
|
|
536
|
+
static get WorkflowHistWI(): "Workitems historisieren" | "Historicize workitems" | "Incluir en historial los workitem" | "Historiser le workitems" | "Historicize workItem" | "Storicizza i workitem";
|
|
534
537
|
static get WorkflowNoInstances(): "Keine Instanzen aktiv" | "No running instances" | "Ninguna instancia en curso" | "Aucune instance en cours" | "Nenhuma instância em execução" | "Nessuna istanza in corso";
|
|
538
|
+
static get WorkflowStartAfterArchive(): "Starten Sie die Instanz beim Archivieren des Dokuments" | "Start the instance when you archive the document" | "Iniciar la instancia cuando se almacena el documento" | "Démarrer l'instance lorsque vous archivez le document" | "Inicie a instância quando você fizer check in no documento" | "Avviare l'istanza quando si archivia il documento";
|
|
539
|
+
static get WorkflowStartAfterUpdate(): "Starten Sie die Instanz beim Bearbeiten der folgenden Methadaten" | "Start the instance when updating the following metadata" | "Iniciar la instancia cuando se modifican los siguientes metadatos" | "Démarrer l'instance lors de l'édition des métadonnées suivantes" | "Inicie a instância ao editar os seguintes metadados" | "Avviare l'istanza quando si modificano i seguenti metadati";
|
|
535
540
|
static get WorkGroup(): "Arbeitsgruppe" | "Work Group" | "Grupo de Trabajo" | "Groupe de travail" | "Grupo de Trabalho" | "Gruppo di lavoro";
|
|
536
541
|
static get WorkgroupOperations(): string;
|
|
537
542
|
static get WorkingGroups(): "Arbeitsgruppen" | "Work groups" | "Grupos de trabajo" | "Groupes de travail" | "Grupos de trabalho" | "Gruppi di lavoro";
|
|
@@ -2506,6 +2506,16 @@ export class SDKUI_Localizator {
|
|
|
2506
2506
|
default: return "Caricamento";
|
|
2507
2507
|
}
|
|
2508
2508
|
}
|
|
2509
|
+
static get Localization() {
|
|
2510
|
+
switch (this._cultureID) {
|
|
2511
|
+
case CultureIDs.De_DE: return "Lokalisierung";
|
|
2512
|
+
case CultureIDs.En_US: return "Localization";
|
|
2513
|
+
case CultureIDs.Es_ES: return "Localización";
|
|
2514
|
+
case CultureIDs.Fr_FR: return "Localisation";
|
|
2515
|
+
case CultureIDs.Pt_PT: return "Localização";
|
|
2516
|
+
default: return "Localizzazione";
|
|
2517
|
+
}
|
|
2518
|
+
}
|
|
2509
2519
|
static get LoadingWorkGroups() {
|
|
2510
2520
|
switch (this._cultureID) {
|
|
2511
2521
|
case CultureIDs.De_DE: return "Laden von Arbeitsgruppen";
|
|
@@ -5275,6 +5285,26 @@ export class SDKUI_Localizator {
|
|
|
5275
5285
|
default: return "Diagramma non presente o non valido";
|
|
5276
5286
|
}
|
|
5277
5287
|
}
|
|
5288
|
+
static get WorkflowEndInstance() {
|
|
5289
|
+
switch (this._cultureID) {
|
|
5290
|
+
case CultureIDs.De_DE: return "Instanz beenden";
|
|
5291
|
+
case CultureIDs.En_US: return "End instance";
|
|
5292
|
+
case CultureIDs.Es_ES: return "Finalizar instancia";
|
|
5293
|
+
case CultureIDs.Fr_FR: return "Termine l'instance";
|
|
5294
|
+
case CultureIDs.Pt_PT: return "Pare a instância";
|
|
5295
|
+
default: return "Termina istanza";
|
|
5296
|
+
}
|
|
5297
|
+
}
|
|
5298
|
+
static get WorkflowHistWI() {
|
|
5299
|
+
switch (this._cultureID) {
|
|
5300
|
+
case CultureIDs.De_DE: return "Workitems historisieren";
|
|
5301
|
+
case CultureIDs.En_US: return "Historicize workitems";
|
|
5302
|
+
case CultureIDs.Es_ES: return "Incluir en historial los workitem";
|
|
5303
|
+
case CultureIDs.Fr_FR: return "Historiser le workitems";
|
|
5304
|
+
case CultureIDs.Pt_PT: return "Historicize workItem";
|
|
5305
|
+
default: return "Storicizza i workitem";
|
|
5306
|
+
}
|
|
5307
|
+
}
|
|
5278
5308
|
static get WorkflowNoInstances() {
|
|
5279
5309
|
switch (this._cultureID) {
|
|
5280
5310
|
case CultureIDs.De_DE: return "Keine Instanzen aktiv";
|
|
@@ -5285,6 +5315,26 @@ export class SDKUI_Localizator {
|
|
|
5285
5315
|
default: return "Nessuna istanza in corso";
|
|
5286
5316
|
}
|
|
5287
5317
|
}
|
|
5318
|
+
static get WorkflowStartAfterArchive() {
|
|
5319
|
+
switch (this._cultureID) {
|
|
5320
|
+
case CultureIDs.De_DE: return "Starten Sie die Instanz beim Archivieren des Dokuments";
|
|
5321
|
+
case CultureIDs.En_US: return "Start the instance when you archive the document";
|
|
5322
|
+
case CultureIDs.Es_ES: return "Iniciar la instancia cuando se almacena el documento";
|
|
5323
|
+
case CultureIDs.Fr_FR: return "Démarrer l'instance lorsque vous archivez le document";
|
|
5324
|
+
case CultureIDs.Pt_PT: return "Inicie a instância quando você fizer check in no documento";
|
|
5325
|
+
default: return "Avviare l'istanza quando si archivia il documento";
|
|
5326
|
+
}
|
|
5327
|
+
}
|
|
5328
|
+
static get WorkflowStartAfterUpdate() {
|
|
5329
|
+
switch (this._cultureID) {
|
|
5330
|
+
case CultureIDs.De_DE: return "Starten Sie die Instanz beim Bearbeiten der folgenden Methadaten";
|
|
5331
|
+
case CultureIDs.En_US: return "Start the instance when updating the following metadata";
|
|
5332
|
+
case CultureIDs.Es_ES: return "Iniciar la instancia cuando se modifican los siguientes metadatos";
|
|
5333
|
+
case CultureIDs.Fr_FR: return "Démarrer l'instance lors de l'édition des métadonnées suivantes";
|
|
5334
|
+
case CultureIDs.Pt_PT: return "Inicie a instância ao editar os seguintes metadados";
|
|
5335
|
+
default: return "Avviare l'istanza quando si modificano i seguenti metadati";
|
|
5336
|
+
}
|
|
5337
|
+
}
|
|
5288
5338
|
static get WorkGroup() {
|
|
5289
5339
|
switch (this._cultureID) {
|
|
5290
5340
|
case CultureIDs.De_DE: return "Arbeitsgruppe";
|
package/lib/utils/theme.js
CHANGED
|
@@ -21,8 +21,16 @@ Colors.toolbar_color = '#F0F4FA';
|
|
|
21
21
|
Colors.black = '#000000';
|
|
22
22
|
Colors.white = '#ffffff';
|
|
23
23
|
class TMColors {
|
|
24
|
-
static get primaryColor() {
|
|
25
|
-
|
|
24
|
+
static get primaryColor() {
|
|
25
|
+
return this._primaryColor;
|
|
26
|
+
}
|
|
27
|
+
static set primaryColor(thePrimaryColor) {
|
|
28
|
+
this._primaryColor = thePrimaryColor;
|
|
29
|
+
// Verifica se il codice sta girando in un ambiente browser e aggiorno la variabile CSS
|
|
30
|
+
if (typeof document !== 'undefined' && this._primaryColor) {
|
|
31
|
+
document.documentElement.style.setProperty('--primary-color', this._primaryColor);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
26
34
|
static get backgroundColorHeader() { return this._backgroundColorHeader; }
|
|
27
35
|
static set backgroundColorHeader(theBackgroundColorHeader) { this._backgroundColorHeader = theBackgroundColorHeader; }
|
|
28
36
|
static get colorHeader() { return this._colorHeader; }
|