@topconsultnpm/sdkui-react-beta 6.5.55 → 6.5.57
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.
|
@@ -11,6 +11,7 @@ import { StyledBadge, StyledDivHorizontal, StyledDxGridGroupHeader } from '../ba
|
|
|
11
11
|
import TMButton from '../base/TMButton';
|
|
12
12
|
import TMSummary from '../editors/TMSummary';
|
|
13
13
|
import TMChooserForm from '../forms/TMChooserForm';
|
|
14
|
+
import TMSpinner from '../base/TMSpinner';
|
|
14
15
|
const TMMetadataChooser = ({ tmSession, dataSource, inputDcmtTypesList, disabled, validationItems, getColorIndex, showCompleteMetadataName, qdShowOnlySelectItems, borderRadius = '4px', fontSize = FontSize.defaultFontSize, backgroundColor, openEditorOnSummaryClick, showBorder = true, showId = false, elementStyle, allowMultipleSelection, allowSysMetadata, value, values, isModifiedWhen, tids, label, width, height, onValueChanged, hasClear, qd, placeHolder }) => {
|
|
15
16
|
const [showChooser, setShowChooser] = useState(false);
|
|
16
17
|
const renderTemplate = () => {
|
|
@@ -33,13 +34,11 @@ export const TMMetadataChooserForm = ({ tmSession, tids, inputDcmtTypesList, qd,
|
|
|
33
34
|
if (qd) {
|
|
34
35
|
let tids = getTIDsByQd(qd);
|
|
35
36
|
let inputTIDs = tids.map((item) => item.tid);
|
|
36
|
-
|
|
37
|
-
if (refreshCache) {
|
|
38
|
-
console.log('refreshCache');
|
|
37
|
+
if (refreshCache)
|
|
39
38
|
DcmtTypeListCacheService.RemoveWithMetadata(inputTIDs);
|
|
40
|
-
}
|
|
39
|
+
TMSpinner.show({ description: `${SDKUI_Localizator.Loading} - ${SDK_Localizator.DcmtType} ...` });
|
|
41
40
|
let dtds = await DcmtTypeListCacheService.GetFromTIDsAsync(inputTIDs, true, tmSession);
|
|
42
|
-
|
|
41
|
+
TMSpinner.hide();
|
|
43
42
|
for (let i = 0; i < dtds.length; i++) {
|
|
44
43
|
const dtd = new DcmtTypeDescriptor();
|
|
45
44
|
dtd.init({ ...dtds[i] });
|
|
@@ -63,11 +62,11 @@ export const TMMetadataChooserForm = ({ tmSession, tids, inputDcmtTypesList, qd,
|
|
|
63
62
|
}
|
|
64
63
|
}
|
|
65
64
|
else if (inputDcmtTypesList) {
|
|
66
|
-
for (
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
dtdList.push(
|
|
65
|
+
for (const dtd of inputDcmtTypesList) {
|
|
66
|
+
const newDtd = new DcmtTypeDescriptor();
|
|
67
|
+
newDtd.init({ ...dtd });
|
|
68
|
+
newDtd.metadata?.forEach((md) => { md.customData1 = newDtd.id; });
|
|
69
|
+
dtdList.push(newDtd);
|
|
71
70
|
}
|
|
72
71
|
}
|
|
73
72
|
else if (tids) {
|
|
@@ -75,12 +74,14 @@ export const TMMetadataChooserForm = ({ tmSession, tids, inputDcmtTypesList, qd,
|
|
|
75
74
|
return [];
|
|
76
75
|
if (refreshCache)
|
|
77
76
|
DcmtTypeListCacheService.RemoveWithMetadata(tids);
|
|
78
|
-
for (
|
|
79
|
-
if (!
|
|
77
|
+
for (const tid of tids) {
|
|
78
|
+
if (!tid)
|
|
80
79
|
continue;
|
|
81
|
-
|
|
80
|
+
TMSpinner.show({ description: `${SDKUI_Localizator.Loading} - ${SDK_Localizator.DcmtType} ...` });
|
|
81
|
+
let dtd = await DcmtTypeListCacheService.GetAsync(tid, true, tmSession);
|
|
82
|
+
TMSpinner.hide();
|
|
82
83
|
if (!dtd)
|
|
83
|
-
throw new Error(`TID sconosciuto (${
|
|
84
|
+
throw new Error(`TID sconosciuto (${tid})`);
|
|
84
85
|
dtd?.metadata?.forEach((md) => { md.customData1 = dtd?.id; });
|
|
85
86
|
dtdList.push(dtd);
|
|
86
87
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topconsultnpm/sdkui-react-beta",
|
|
3
|
-
"version": "6.5.
|
|
3
|
+
"version": "6.5.57",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@topconsultnpm/sdk-ts-beta": "^6.5.54",
|
|
32
32
|
"buffer": "^6.0.3",
|
|
33
|
-
"devextreme": "24.1.
|
|
34
|
-
"devextreme-react": "24.1.
|
|
33
|
+
"devextreme": "24.1.6",
|
|
34
|
+
"devextreme-react": "24.1.6",
|
|
35
35
|
"react-router-dom": "^6.15.0",
|
|
36
36
|
"styled-components": "^6.1.1"
|
|
37
37
|
}
|