@topconsultnpm/sdkui-react 6.21.0-dev4.3 → 6.21.0-dev4.5

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.
@@ -1063,10 +1063,25 @@ const TMSearchResultGrid = ({ openInOffice, fromDTD, operationItems, allUsers, i
1063
1063
  // Recupera gli elementi della DataList dalla cache
1064
1064
  const dataListItems = dataListsCache.current.get(dataListID);
1065
1065
  if (dataListItems && dataListItems.length > 0) {
1066
- // Crea il datasource per l'headerFilter mostrando il nome (text) ma filtrando per valore (value)
1066
+ // Raccoglie i valori unici presenti nei risultati di ricerca per questa colonna
1067
+ let valuesInResults;
1068
+ try {
1069
+ valuesInResults = new Set();
1070
+ searchResult?.dtdResult?.rows?.forEach(row => {
1071
+ const cellValue = row[index];
1072
+ if (cellValue != null) {
1073
+ valuesInResults.add(String(cellValue));
1074
+ }
1075
+ });
1076
+ }
1077
+ catch {
1078
+ // Fallback: mostra tutti i valori della DataList
1079
+ valuesInResults = undefined;
1080
+ }
1081
+ // Crea il datasource per l'headerFilter
1067
1082
  headerFilterConfig = {
1068
1083
  dataSource: dataListItems
1069
- .filter(item => item.name != null && item.value != null)
1084
+ .filter(item => item.name != null && item.value != null && (valuesInResults === undefined || valuesInResults.has(String(item.value))))
1070
1085
  .map(item => ({
1071
1086
  text: item.name,
1072
1087
  value: item.value
@@ -1079,10 +1094,28 @@ const TMSearchResultGrid = ({ openInOffice, fromDTD, operationItems, allUsers, i
1079
1094
  // Recupera tutti gli utenti dalla cache
1080
1095
  const users = Array.from(usersCache.current.values());
1081
1096
  if (users.length > 0) {
1097
+ // Raccoglie gli ID utente presenti nei risultati di ricerca per questa colonna
1098
+ let userIdsInResults;
1099
+ try {
1100
+ userIdsInResults = new Set();
1101
+ searchResult?.dtdResult?.rows?.forEach(row => {
1102
+ const cellValue = row[index];
1103
+ if (cellValue != null) {
1104
+ const userId = Number(cellValue);
1105
+ if (userId > 0) {
1106
+ userIdsInResults.add(userId);
1107
+ }
1108
+ }
1109
+ });
1110
+ }
1111
+ catch {
1112
+ // Fallback: mostra tutti gli utenti
1113
+ userIdsInResults = undefined;
1114
+ }
1082
1115
  // Crea il datasource per l'headerFilter mostrando nome utente completo (dominio\nome)
1083
1116
  headerFilterConfig = {
1084
1117
  dataSource: users
1085
- .filter(user => user.name != null && user.id != null)
1118
+ .filter(user => user.name != null && user.id != null && (userIdsInResults === undefined || userIdsInResults.has(user.id)))
1086
1119
  .map(user => ({
1087
1120
  text: user.domain ? `${user.domain}\\${user.name}` : user.name,
1088
1121
  value: user.id
package/package.json CHANGED
@@ -1,64 +1,64 @@
1
1
  {
2
- "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.21.0-dev4.3",
4
- "description": "",
5
- "scripts": {
6
- "test": "echo \"Error: no test specified\" \u0026\u0026 exit 1",
7
- "clean": "node -e \"const fs=require(\u0027fs\u0027);fs.rmSync(\u0027lib\u0027,{recursive:true,force:true});fs.mkdirSync(\u0027lib\u0027)\"",
8
- "copy-files": "cpx \"src/{assets/*.*,assets/ImageLibrary/*.*,assets/thumbnails/*.*,assets/IconsS4t/*.*,assets/Metadata/*.*,css/tm-sdkui.css}\" lib",
9
- "tm-build": "npm run clean \u0026\u0026 tsc \u0026\u0026 npm run copy-files",
10
- "tm-watch": "tsc -w",
11
- "tm-publish": "npm publish --tag latest",
12
- "tm-publish_wl": "npm publish",
13
- "storybook": "storybook dev -p 6006",
14
- "build-storybook": "storybook build"
15
- },
16
- "author": "TopConsult",
17
- "license": "ISC",
18
- "devDependencies": {
19
- "@chromatic-com/storybook": "^5.1.2",
20
- "@storybook/addon-docs": "^10.3.5",
21
- "@storybook/addon-onboarding": "^10.3.5",
22
- "@storybook/react-vite": "^10.3.5",
23
- "@types/htmlparser2": "^3.10.7",
24
- "@types/node": "^24.12.2",
25
- "@types/react": "^18.3.3",
26
- "@types/react-dom": "^18.3.3",
27
- "cpx2": "^9.0.0",
28
- "esbuild": "^0.25.0",
29
- "react": "^18.3.1",
30
- "react-dom": "^18.3.1",
31
- "storybook": "^10.3.5",
32
- "typescript": "^5.9.3",
33
- "vite": "^6.1.1"
34
- },
35
- "main": "dist/cjs/index.js",
36
- "types": "./index.d.ts",
37
- "module": "lib/esm/index.js",
38
- "files": [
39
- "dist",
40
- "lib"
41
- ],
42
- "dependencies": {
43
- "react-router-dom": "^6.15.0",
44
- "react-pdf": "^10.4.1",
45
- "@zip.js/zip.js": "2.8.26",
46
- "pdf-lib": "^1.17.1",
47
- "devextreme-exceljs-fork": "^4.4.10",
48
- "buffer": "^6.0.3",
49
- "@topconsultnpm/sdk-ts": "6.21.0-t3",
50
- "devextreme": "^25.2.6",
51
- "htmlparser2": "^10.0.0",
52
- "styled-components": "^6.1.1",
53
- "devextreme-react": "^25.2.6"
54
- },
55
- "overrides": {
56
- "esbuild": "^0.25.0",
57
- "devextreme-exceljs-fork": {
58
- "archiver": "^8.0.0"
59
- },
60
- "quill-delta": {
61
- "lodash.isequal": "npm:fast-deep-equal@^3.1.3"
62
- }
63
- }
2
+ "name": "@topconsultnpm/sdkui-react",
3
+ "version": "6.21.0-dev4.5",
4
+ "description": "",
5
+ "scripts": {
6
+ "test": "echo \"Error: no test specified\" && exit 1",
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
+ "tm-build": "npm run clean && tsc && npm run copy-files",
10
+ "tm-watch": "tsc -w",
11
+ "tm-publish": "npm publish --tag latest",
12
+ "tm-publish_wl": "npm publish",
13
+ "storybook": "storybook dev -p 6006",
14
+ "build-storybook": "storybook build"
15
+ },
16
+ "author": "TopConsult",
17
+ "license": "ISC",
18
+ "devDependencies": {
19
+ "@chromatic-com/storybook": "^5.1.2",
20
+ "@storybook/addon-docs": "^10.3.5",
21
+ "@storybook/addon-onboarding": "^10.3.5",
22
+ "@storybook/react-vite": "^10.3.5",
23
+ "@types/htmlparser2": "^3.10.7",
24
+ "@types/node": "^24.12.2",
25
+ "@types/react": "^18.3.3",
26
+ "@types/react-dom": "^18.3.3",
27
+ "cpx2": "^9.0.0",
28
+ "esbuild": "^0.25.0",
29
+ "react": "^18.3.1",
30
+ "react-dom": "^18.3.1",
31
+ "storybook": "^10.3.5",
32
+ "typescript": "^5.9.3",
33
+ "vite": "^6.1.1"
34
+ },
35
+ "main": "dist/cjs/index.js",
36
+ "types": "./index.d.ts",
37
+ "module": "lib/esm/index.js",
38
+ "files": [
39
+ "dist",
40
+ "lib"
41
+ ],
42
+ "dependencies": {
43
+ "@topconsultnpm/sdk-ts": "6.21.0-dev4.2",
44
+ "@zip.js/zip.js": "2.8.26",
45
+ "buffer": "^6.0.3",
46
+ "devextreme": "^25.2.6",
47
+ "devextreme-exceljs-fork": "^4.4.10",
48
+ "devextreme-react": "^25.2.6",
49
+ "htmlparser2": "^10.0.0",
50
+ "pdf-lib": "^1.17.1",
51
+ "react-pdf": "^10.4.1",
52
+ "react-router-dom": "^6.15.0",
53
+ "styled-components": "^6.1.1"
54
+ },
55
+ "overrides": {
56
+ "esbuild": "^0.25.0",
57
+ "devextreme-exceljs-fork": {
58
+ "archiver": "^8.0.0"
59
+ },
60
+ "quill-delta": {
61
+ "lodash.isequal": "npm:fast-deep-equal@^3.1.3"
62
+ }
63
+ }
64
64
  }