@topconsultnpm/sdkui-react 6.21.0-dev3.11 → 6.21.0-dev3.13

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.
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
- import { Workbook } from 'exceljs';
3
+ import { Workbook } from 'devextreme-exceljs-fork';
4
4
  import { buildValueToLabelMapFromDataColumns, getExceptionMessage, SDKUI_Localizator } from '../../helper';
5
5
  import TMCheckBox from '../editors/TMCheckBox';
6
6
  import TMButton from './TMButton';
@@ -164,11 +164,13 @@ const TMDataGridExportForm = (props) => {
164
164
  return;
165
165
  const headerLength = col.header.toString().length;
166
166
  // 'getColumn' accetta solo string | number, col.key è garantito perché controllato sopra
167
- const maxDataLength = worksheet.getColumn(col.key).values.reduce((max, val) => {
168
- const strVal = val !== undefined && val !== null ? val.toString() : '';
169
- const length = strVal.length;
170
- return length > max ? length : max;
171
- }, 0);
167
+ const columnValues = worksheet.getColumn(col.key).values;
168
+ const maxDataLength = Array.isArray(columnValues)
169
+ ? columnValues.reduce((max, val) => {
170
+ const strVal = val !== undefined && val !== null ? String(val) : '';
171
+ return strVal.length > max ? strVal.length : max;
172
+ }, 0)
173
+ : 0;
172
174
  col.width = Math.max(headerLength, maxDataLength) + 2;
173
175
  });
174
176
  // Apply font and border styling to all cells in all rows in a single pass
@@ -47,8 +47,12 @@ const TMMetadataValues = ({ showCheckBoxes = ShowCheckBoxesMode.Never, checkPerm
47
47
  let dynDLToBeRefreshed = dynDataListsToBeRefreshed.find(o => o.midStarter === mid);
48
48
  while (dynDLToBeRefreshed != undefined) {
49
49
  const item = newValues.find(value => value.mid === dynDLToBeRefreshed?.mid);
50
- if (item)
50
+ if (item) {
51
51
  item.value = newValue;
52
+ if (showCheckBoxes !== ShowCheckBoxesMode.Never) {
53
+ item.isSelected = false;
54
+ }
55
+ }
52
56
  dynDLToBeRefreshed = dynDataListsToBeRefreshed.find(o => o.midStarter === item?.mid);
53
57
  }
54
58
  }
@@ -287,8 +291,12 @@ const TMMetadataValues = ({ showCheckBoxes = ShowCheckBoxesMode.Never, checkPerm
287
291
  let newMetadata = structuredClone(metadataValues);
288
292
  for (const item of midsToBeUpdated) {
289
293
  const mdItem = newMetadata.find(value => value.mid === item.mid);
290
- if (mdItem)
294
+ if (mdItem) {
291
295
  mdItem.value = item.value;
296
+ if (showCheckBoxes !== ShowCheckBoxesMode.Never) {
297
+ mdItem.isSelected = !stringIsNullOrEmpty(item.value);
298
+ }
299
+ }
292
300
  }
293
301
  onValueChanged?.(newMetadata);
294
302
  }, updateIsModalOpen: updateIsModalOpen }), FormulaHelper.isFormula(item.value)
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.21.0-dev3.11",
3
+ "version": "6.21.0-dev3.13",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
7
- "clean": "powershell Remove-Item lib/ -recurse",
8
- "copy-files": "copyfiles -u 1 src/assets/*.* src/assets/ImageLibrary/*.* src/assets/thumbnails/*.* src/assets/IconsS4t/*.* src/assets/Metadata/*.* src/css/tm-sdkui.css lib/",
7
+ "clean": "node -e \"const fs=require('fs');fs.rmSync('lib',{recursive:true,force:true});fs.mkdirSync('lib')\"",
8
+ "copy-files": "cpx \"src/{assets/*.*,assets/ImageLibrary/*.*,assets/thumbnails/*.*,assets/IconsS4t/*.*,assets/Metadata/*.*,css/tm-sdkui.css}\" lib",
9
9
  "tm-build": "npm run clean && tsc && npm run copy-files",
10
10
  "tm-watch": "tsc -w",
11
11
  "tm-publish": "npm publish --tag latest",
@@ -24,7 +24,6 @@
24
24
  "@types/node": "^24.12.2",
25
25
  "@types/react": "^18.3.3",
26
26
  "@types/react-dom": "^18.3.3",
27
- "copyfiles": "^2.4.1",
28
27
  "esbuild": "^0.25.0",
29
28
  "react": "^18.3.1",
30
29
  "react-dom": "^18.3.1",
@@ -43,9 +42,10 @@
43
42
  "@topconsultnpm/sdk-ts": "6.21.0-dev3.2",
44
43
  "@zip.js/zip.js": "2.8.26",
45
44
  "buffer": "^6.0.3",
45
+ "cpx2": "^9.0.0",
46
46
  "devextreme": "^25.2.6",
47
+ "devextreme-exceljs-fork": "^4.4.10",
47
48
  "devextreme-react": "^25.2.6",
48
- "exceljs": "^4.4.0",
49
49
  "htmlparser2": "^10.0.0",
50
50
  "pdf-lib": "^1.17.1",
51
51
  "react-pdf": "^10.4.1",