@topconsultnpm/sdkui-react 6.20.0-dev2.15 → 6.20.0-dev2.16

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.
@@ -9,18 +9,16 @@ import { isXMLFileExt } from '../helper/dcmtsHelper';
9
9
  import { ShowConfirm } from '../components/base/TMConfirm';
10
10
  let abortController = new AbortController();
11
11
  const downloadCountMap = new Map();
12
- const compoundExts = ['.p7m', '.p7s', '.p7c', '.p7b'];
13
12
  const getDownloadFileName = (fileName) => {
14
- const lower = fileName.toLowerCase();
15
- const isCompound = compoundExts.some(ext => lower.endsWith(ext) && lower.slice(0, -ext.length).includes('.'));
16
- if (!isCompound)
13
+ const firstDot = fileName.indexOf('.');
14
+ const lastDot = fileName.lastIndexOf('.');
15
+ if (firstDot === -1 || firstDot === lastDot)
17
16
  return fileName;
18
17
  const count = downloadCountMap.get(fileName) ?? 0;
19
18
  downloadCountMap.set(fileName, count + 1);
20
19
  if (count === 0)
21
20
  return fileName;
22
- const dotIndex = fileName.indexOf('.');
23
- return `${fileName.slice(0, dotIndex)}(${count})${fileName.slice(dotIndex)}`;
21
+ return `${fileName.slice(0, firstDot)}(${count})${fileName.slice(firstDot)}`;
24
22
  };
25
23
  export function useDcmtOperations() {
26
24
  const [showWaitPanel, setShowWaitPanel] = useState(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.20.0-dev2.15",
3
+ "version": "6.20.0-dev2.16",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",