@topconsultnpm/sdkui-react-beta 6.7.108 → 6.7.110
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,12 @@ const TMDateBox = (props) => {
|
|
|
11
11
|
if (!htmlElement)
|
|
12
12
|
return;
|
|
13
13
|
let color = props.isModifiedWhen ? TMColors.tertiary : TMColors.border_normal;
|
|
14
|
+
if (props.readOnly) {
|
|
15
|
+
let inputContainer = htmlElement.getElementsByClassName("dx-texteditor-input-container")[0];
|
|
16
|
+
if (inputContainer) {
|
|
17
|
+
inputContainer.style.background = 'linear-gradient(white 20%, #d6d6d6 80%)';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
14
20
|
let label = htmlElement.getElementsByClassName("dx-label")[0];
|
|
15
21
|
if (label) {
|
|
16
22
|
label.style.borderBottomColor = color;
|
|
@@ -36,21 +36,21 @@ const TMMetadataEditor = ({ isLexProt, layoutMode, isModifiedWhen = false, tid,
|
|
|
36
36
|
if (value?.startsWith("{@QueryParam") || value == "{@UserName}" || value == "{@UserID}")
|
|
37
37
|
return _jsx(TMTextBox, { isModifiedWhen: isModifiedWhenInternal(), readOnly: isReadOnlyResult, label: showLabelTop ? md?.nameLoc : undefined, icon: showLabelTop ? _jsx(TMMetadataIcon, { md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, type: 'text', maxLength: md?.length, autoFocus: autoFocus, value: value || '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
|
|
38
38
|
if (md?.dataDomain == MetadataDataDomains.DynamicDataList)
|
|
39
|
-
return _jsx(TMDynDataListItemChooser, { readOnly: isReadOnlyResult, isModifiedWhen: isModifiedWhenInternal(), label: showLabelTop ? md?.nameLoc : undefined, icon: showLabelTop ? _jsx(TMMetadataIcon, { md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, md: md, tid: tid, buttons: !isReadOnlyResult ? [btnDistincValues] : undefined, queryParamsDynDataList: queryParamsDynDataList, onCascadeRefreshDynDataLists: onCascadeRefreshDynDataLists, elementStyle: { width: '100%' }, backgroundColor: TMColors.default_background, allowMultipleSelection: allowMultipleSelection, values: value ? [value] : [], showClearButton: !isReadOnlyResult, onValueChanged: (IDs) => {
|
|
39
|
+
return _jsx(TMDynDataListItemChooser, { readOnly: isReadOnlyResult, isModifiedWhen: isModifiedWhenInternal(), label: showLabelTop ? md?.nameLoc : undefined, icon: showLabelTop ? _jsx(TMMetadataIcon, { md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, md: md, tid: tid, buttons: !isReadOnlyResult ? [btnDistincValues] : undefined, queryParamsDynDataList: queryParamsDynDataList, onCascadeRefreshDynDataLists: onCascadeRefreshDynDataLists, elementStyle: { width: '100%' }, backgroundColor: isReadOnlyResult ? 'linear-gradient(white 20%, #d6d6d6 80%)' : TMColors.default_background, allowMultipleSelection: allowMultipleSelection, values: value ? [value] : [], showClearButton: !isReadOnlyResult, onValueChanged: (IDs) => {
|
|
40
40
|
if (!IDs || IDs.length <= 0)
|
|
41
41
|
onValueChanged?.(undefined);
|
|
42
42
|
else
|
|
43
43
|
onValueChanged?.(IDs[0]);
|
|
44
44
|
} });
|
|
45
45
|
if (md?.dataDomain == MetadataDataDomains.DataList)
|
|
46
|
-
return _jsx(TMDataListItemChooser, { readOnly: isReadOnlyResult, isModifiedWhen: isModifiedWhenInternal(), label: showLabelTop ? md?.nameLoc : undefined, icon: showLabelTop ? _jsx(TMMetadataIcon, { md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, backgroundColor: TMColors.default_background, dataListId: md.dataListID, allowMultipleSelection: allowMultipleSelection, values: value?.split(',').map((item) => !item.startsWith("'") ? item : item.slice(1, -1)) ?? [], showClearButton: !isReadOnlyResult, buttons: !isReadOnlyResult ? [btnDistincValues] : undefined, onValueChanged: (IDs) => {
|
|
46
|
+
return _jsx(TMDataListItemChooser, { readOnly: isReadOnlyResult, isModifiedWhen: isModifiedWhenInternal(), label: showLabelTop ? md?.nameLoc : undefined, icon: showLabelTop ? _jsx(TMMetadataIcon, { md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, backgroundColor: isReadOnlyResult ? 'linear-gradient(white 20%, #d6d6d6 80%)' : TMColors.default_background, dataListId: md.dataListID, allowMultipleSelection: allowMultipleSelection, values: value?.split(',').map((item) => !item.startsWith("'") ? item : item.slice(1, -1)) ?? [], showClearButton: !isReadOnlyResult, buttons: !isReadOnlyResult ? [btnDistincValues] : undefined, onValueChanged: (IDs) => {
|
|
47
47
|
if (!IDs || IDs.length <= 0)
|
|
48
48
|
onValueChanged?.(undefined);
|
|
49
49
|
else
|
|
50
50
|
onValueChanged?.(IDs.join(","));
|
|
51
51
|
} });
|
|
52
52
|
if (md?.dataDomain == MetadataDataDomains.UserID)
|
|
53
|
-
return _jsx(TMUserChooser, { readOnly: isReadOnlyResult, isModifiedWhen: isModifiedWhenInternal(), label: showLabelTop ? md?.nameLoc : undefined, icon: showLabelTop ? _jsx(TMMetadataIcon, { md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, backgroundColor: TMColors.default_background, placeHolder: " ", showClearButton: !isReadOnlyResult, allowMultipleSelection: allowMultipleSelection, values: value?.split(',').map((item) => !item.startsWith("'") ? Number(item) : Number(item.slice(1, -1))) ?? [], buttons: !isReadOnlyResult ? [btnDistincValues] : undefined, onValueChanged: (IDs) => {
|
|
53
|
+
return _jsx(TMUserChooser, { readOnly: isReadOnlyResult, isModifiedWhen: isModifiedWhenInternal(), label: showLabelTop ? md?.nameLoc : undefined, icon: showLabelTop ? _jsx(TMMetadataIcon, { md: md, tid: tid }) : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, backgroundColor: isReadOnlyResult ? 'linear-gradient(white 20%, #d6d6d6 80%)' : TMColors.default_background, placeHolder: " ", showClearButton: !isReadOnlyResult, allowMultipleSelection: allowMultipleSelection, values: value?.split(',').map((item) => !item.startsWith("'") ? Number(item) : Number(item.slice(1, -1))) ?? [], buttons: !isReadOnlyResult ? [btnDistincValues] : undefined, onValueChanged: (IDs) => {
|
|
54
54
|
if (!IDs || IDs.length <= 0)
|
|
55
55
|
onValueChanged?.(undefined);
|
|
56
56
|
else
|
|
@@ -11,7 +11,7 @@ const StyledSummaryTemplateInput = styled.div `
|
|
|
11
11
|
height: ${props => props.$height};
|
|
12
12
|
padding: ${props => !props.$showBorder ? '0px 5px' : '4px 5px 4px 13px'};
|
|
13
13
|
border: ${props => !props.$showBorder ? '' : '1px solid'};
|
|
14
|
-
background
|
|
14
|
+
background: ${props => props.$backgroundColor};
|
|
15
15
|
border-color: ${props => props.$isModified ? TMColors.isModified : TMColors.border_normal};
|
|
16
16
|
border-bottom: ${props => !props.$showBorder ? '' : (props.$vil.length > 0) ? '3px solid' : '1px solid'} ;
|
|
17
17
|
border-bottom-color: ${props => (props.$vil.length === 0) ? !props.$isModified ? TMColors.border_normal : TMColors.isModified : editorColorManager(props.$vil)};
|