@topconsultnpm/sdkui-react-beta 6.6.105 → 6.6.106
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.
|
@@ -34,33 +34,33 @@ export const TMMetadataIcon = ({ tid, md }) => {
|
|
|
34
34
|
let icon = null;
|
|
35
35
|
switch (md.dataDomain) {
|
|
36
36
|
case MetadataDataDomains.Computed:
|
|
37
|
-
icon = _jsx(IconMetadata_Computed, { fontSize: 16, color: md.isRequired ? TMColors.error : TMColors.text_normal });
|
|
37
|
+
icon = _jsx(IconMetadata_Computed, { fontSize: 16, color: md.isRequired === 1 ? TMColors.error : TMColors.text_normal });
|
|
38
38
|
break;
|
|
39
39
|
case MetadataDataDomains.DataList:
|
|
40
|
-
icon = _jsx(IconMetadata_DataList, { fontSize: 16, color: md.isRequired ? TMColors.error : TMColors.text_normal });
|
|
40
|
+
icon = _jsx(IconMetadata_DataList, { fontSize: 16, color: md.isRequired === 1 ? TMColors.error : TMColors.text_normal });
|
|
41
41
|
break;
|
|
42
42
|
case MetadataDataDomains.DynamicDataList:
|
|
43
|
-
icon = _jsx(IconMetadata_DynamicDataList, { fontSize: 16, color: md.isRequired ? TMColors.error : TMColors.text_normal });
|
|
43
|
+
icon = _jsx(IconMetadata_DynamicDataList, { fontSize: 16, color: md.isRequired === 1 ? TMColors.error : TMColors.text_normal });
|
|
44
44
|
break;
|
|
45
45
|
case MetadataDataDomains.Numerator:
|
|
46
|
-
icon = _jsx(IconMetadata_Numerator, { fontSize: 16, color: md.isRequired ? TMColors.error : TMColors.text_normal });
|
|
46
|
+
icon = _jsx(IconMetadata_Numerator, { fontSize: 16, color: md.isRequired === 1 ? TMColors.error : TMColors.text_normal });
|
|
47
47
|
break;
|
|
48
48
|
case MetadataDataDomains.Special:
|
|
49
|
-
icon = _jsx(IconMetadata_Special, { fontSize: 16, color: md.isRequired ? TMColors.error : TMColors.text_normal });
|
|
49
|
+
icon = _jsx(IconMetadata_Special, { fontSize: 16, color: md.isRequired === 1 ? TMColors.error : TMColors.text_normal });
|
|
50
50
|
break;
|
|
51
51
|
case MetadataDataDomains.UserID:
|
|
52
|
-
icon = _jsx(IconMetadata_User, { fontSize: 16, color: md.isRequired ? TMColors.error : TMColors.text_normal });
|
|
52
|
+
icon = _jsx(IconMetadata_User, { fontSize: 16, color: md.isRequired === 1 ? TMColors.error : TMColors.text_normal });
|
|
53
53
|
break;
|
|
54
54
|
default:
|
|
55
55
|
switch (md.dataType) {
|
|
56
56
|
case MetadataDataTypes.Varchar:
|
|
57
|
-
icon = _jsx(IconMetadata_Text, { fontSize: 16, color: md.isRequired ? TMColors.error : TMColors.text_normal });
|
|
57
|
+
icon = _jsx(IconMetadata_Text, { fontSize: 16, color: md.isRequired === 1 ? TMColors.error : TMColors.text_normal });
|
|
58
58
|
break;
|
|
59
59
|
case MetadataDataTypes.Number:
|
|
60
|
-
icon = _jsx(IconMetadata_Numeric, { fontSize: 16, color: md.isRequired ? TMColors.error : TMColors.text_normal });
|
|
60
|
+
icon = _jsx(IconMetadata_Numeric, { fontSize: 16, color: md.isRequired === 1 ? TMColors.error : TMColors.text_normal });
|
|
61
61
|
break;
|
|
62
62
|
case MetadataDataTypes.DateTime:
|
|
63
|
-
icon = _jsx(IconMetadata_Date, { fontSize: 16, color: md.isRequired ? TMColors.error : TMColors.text_normal });
|
|
63
|
+
icon = _jsx(IconMetadata_Date, { fontSize: 16, color: md.isRequired === 1 ? TMColors.error : TMColors.text_normal });
|
|
64
64
|
break;
|
|
65
65
|
default:
|
|
66
66
|
icon = _jsx(_Fragment, {});
|
|
@@ -80,7 +80,7 @@ export const TMMetadataTooltip = ({ tid, md, children }) => {
|
|
|
80
80
|
};
|
|
81
81
|
const renderTooltipContent = (tid, md) => {
|
|
82
82
|
return (!md ? null
|
|
83
|
-
: _jsxs(StyledTooltipContainer, { children: [_jsx(StyledTooltipItem, { children: `${SDK_Globals.useLocalizedName ? md.nameLoc : md.name} (TID: ${tid}, MID: ${md.id})` }), md.description && _jsx(StyledTooltipItem, { children: md.description }), _jsx(StyledTooltipSeparatorItem, {}), _jsxs(StyledTooltipItem, { children: [md.dataType, " ", md.dataType == MetadataDataTypes.Varchar ? `(${md.length ?? 0})` : md.dataType == MetadataDataTypes.Number ? `(${md.length ?? 0},${md.scale ?? 0})` : '', md.isPrimaryKey === 1 ? ' (PK)' : ''] }), _jsx(StyledTooltipItem, {
|
|
83
|
+
: _jsxs(StyledTooltipContainer, { children: [_jsx(StyledTooltipItem, { children: `${SDK_Globals.useLocalizedName ? md.nameLoc : md.name} (TID: ${tid}, MID: ${md.id})` }), md.description && _jsx(StyledTooltipItem, { children: md.description }), _jsx(StyledTooltipSeparatorItem, {}), _jsxs(StyledTooltipItem, { children: [md.dataType, " ", md.dataType == MetadataDataTypes.Varchar ? `(${md.length ?? 0})` : md.dataType == MetadataDataTypes.Number ? `(${md.length ?? 0},${md.scale ?? 0})` : '', md.isPrimaryKey === 1 ? ' (PK)' : ''] }), _jsx(StyledTooltipItem, { style: { color: md.isRequired === 1 ? TMColors.error : TMColors.text_normal }, children: md.isRequired === 1 ? SDKUI_Localizator.Required : SDKUI_Localizator.RequiredNOT }), md.dataDomain && _jsx(StyledTooltipItem, { children: md.dataDomain }), md.isLexProt == 1 && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.Yes}` }), md.isLexProt == 2 && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.MetadataFlag}` }), md.isLexProt == 3 && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.Yes} (${SDKUI_Localizator.MetadataFlag})` }), md.isFreeSearchInput && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Search_Free}: ${SDKUI_Localizator.Yes}` }), md.isSpecialSearchOutput && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Search_Special}: ${SDKUI_Localizator.Yes}` }), md.format?.format && md.format.format != MetadataFormats.None && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Format}: ${LocalizeMetadataFormats(md.format.format)}` }), md.defaultValue && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Default}: ${_setDefaultValueForUI(md.defaultValue)}` }), md.fromTID && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.MetadataRoot}: ${md.isRootMID == 1 ? SDKUI_Localizator.Yes : SDKUI_Localizator.No}` }), md.templateMID && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Template}: ${md.templateMID}` }), md.perm && _jsxs(_Fragment, { children: [_jsx(StyledTooltipItem, { "$color": 'primary', "$marginTop": '5px', children: SDKUI_Localizator.Perms }), _jsx(StyledTooltipSeparatorItem, {}), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Archive}: ${md.perm.canArchive}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.View_Metadato}: ${md.perm.canView}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Search}: ${md.perm.canSearch}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Update}: ${md.perm.canUpdate}` })] })] }));
|
|
84
84
|
};
|
|
85
85
|
return (_jsx("div", { style: { pointerEvents: 'all' }, children: _jsx(TMTooltip, { content: renderTooltipContent(tid, md), children: children }) }));
|
|
86
86
|
};
|