@topconsultnpm/sdkui-react-beta 6.14.113 → 6.14.114

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.
@@ -37,10 +37,19 @@ export const TMDcmtTypeChooserForm = (props) => {
37
37
  if (props.ShowOnlyDcmtTypes)
38
38
  return dtdList?.filter(d => d.isView === false);
39
39
  else if (props.ShowOnlySAP)
40
- return dtdList?.filter(d => d.name?.startsWith('SAP'));
40
+ return dtdList?.filter(d => isSAPDcmtTypeName(d.name));
41
41
  if (props.filterTemplateTID)
42
42
  return dtdList?.filter(d => d.templateTID && props.filterTemplateTID?.includes(d.templateTID));
43
43
  return dtdList;
44
44
  };
45
+ const isSAPDcmtTypeName = (dcmtTypeName) => {
46
+ if (!dcmtTypeName || dcmtTypeName.trim().length === 0)
47
+ return false;
48
+ if (dcmtTypeName.length !== 5)
49
+ return false;
50
+ if (!dcmtTypeName.startsWith("SAP"))
51
+ return false;
52
+ return true;
53
+ };
45
54
  return (_jsx(TMChooserForm, { title: SDK_Localizator.ListDcmtTypeOrView, allowMultipleSelection: props.allowMultipleSelection, hasShowOnlySelectedItems: true, width: props.width, height: props.height, selectedIDs: props.selectedIDs, cellRenderIcon: cellRenderIcon, cellRenderNameAndDesc: cellRenderNameAndDesc, dataSource: props.dataSource, getItems: getItems, onClose: props.onClose, onChoose: (IDs) => props.onChoose?.(IDs) }));
46
55
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.14.113",
3
+ "version": "6.14.114",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",