@topconsultnpm/sdkui-react 6.21.0-dev5.8 → 6.21.0-dev6.2
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,7 @@
|
|
|
1
1
|
import { ArrowSymbol, DiagramItemTypes } from './interfaces';
|
|
2
2
|
import { CultureIDs, Severities, WFAppTypes, WorkItemSetRules, WorkItemStatus } from '@topconsultnpm/sdk-ts';
|
|
3
3
|
import { parseQueryDescriptorXml, serializeQueryDescriptorXml } from './queryDescriptorParser'; // Import the new parser
|
|
4
|
+
import { generateUUID } from '../../../../helper/helpers';
|
|
4
5
|
import { parseMetadataValuesXml, serializeMetadataValuesToXml } from './metadataParser';
|
|
5
6
|
// Funzione helper per escapare i caratteri XML speciali (necessaria per i campi stringa)
|
|
6
7
|
const escapeXml = (unsafe) => {
|
|
@@ -293,7 +294,7 @@ export const parseWfDiagramXml = (xmlString) => {
|
|
|
293
294
|
// Parsing Connections
|
|
294
295
|
const connectionsXML = rootElement.querySelectorAll("Connections > Connection");
|
|
295
296
|
connectionsXML.forEach((connectionXML) => {
|
|
296
|
-
const connectionId = connectionXML.querySelector("ID")?.textContent ||
|
|
297
|
+
const connectionId = connectionXML.querySelector("ID")?.textContent || generateUUID();
|
|
297
298
|
// Leggi il valore numerico di OutputStatus dall'XML
|
|
298
299
|
const xmlOutputStatus = parseInt(connectionXML.querySelector("OutputStatus")?.textContent || "0", 10);
|
|
299
300
|
const connection = {
|
package/lib/helper/TMIcons.d.ts
CHANGED
|
@@ -135,6 +135,7 @@ declare function IconImport(props: React.SVGProps<SVGSVGElement>): import("react
|
|
|
135
135
|
declare function IconPalette(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
136
136
|
declare function IconFastSearch(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
137
137
|
declare function IconUserGroup(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
138
|
+
export declare function IconCertificateBadge(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
138
139
|
export declare function IconShowAllUsers(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
139
140
|
export declare function IconShowAllUsersOff(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
140
141
|
declare function IconUserGroupOutline(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
package/lib/helper/TMIcons.js
CHANGED
|
@@ -408,6 +408,9 @@ function IconFastSearch(props) {
|
|
|
408
408
|
function IconUserGroup(props) {
|
|
409
409
|
return (_jsxs("svg", { fontSize: props.fontSize ? props.fontSize : FONTSIZE, viewBox: "0 0 640 512", fill: "currentColor", height: "1em", width: "1em", ...props, children: [" ", _jsx("path", { d: "M352 128c0 70.7-57.3 128-128 128S96 198.7 96 128 153.3 0 224 0s128 57.3 128 128zM0 482.3C0 383.8 79.8 304 178.3 304h91.4c98.5 0 178.3 79.8 178.3 178.3 0 16.4-13.3 29.7-29.7 29.7H29.7C13.3 512 0 498.7 0 482.3zM609.3 512H471.4c5.4-9.4 8.6-20.3 8.6-32v-8c0-60.7-27.1-115.2-69.8-151.8 2.4-.1 4.7-.2 7.1-.2h61.4c89.1 0 161.3 72.2 161.3 161.3 0 17-13.8 30.7-30.7 30.7zM432 256c-31 0-59-12.6-79.3-32.9 19.7-26.6 31.3-59.5 31.3-95.1 0-26.8-6.6-52.1-18.3-74.3C384.3 40.1 407.2 32 432 32c61.9 0 112 50.1 112 112s-50.1 112-112 112z" }), " "] }));
|
|
410
410
|
}
|
|
411
|
+
export function IconCertificateBadge(props) {
|
|
412
|
+
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fontSize: props.fontSize ? props.fontSize : FONTSIZE, viewBox: "0 -960 960 960", fill: "currentColor", height: "1em", width: "1em", ...props, children: _jsx("path", { d: "M395-475q-35-35-35-85t35-85q35-35 85-35t85 35q35 35 35 85t-35 85q-35 35-85 35t-85-35ZM240-40v-309q-38-42-59-96t-21-115q0-134 93-227t227-93q134 0 227 93t93 227q0 61-21 115t-59 96v309l-240-80-240 80Zm410-350q70-70 70-170t-70-170q-70-70-170-70t-170 70q-70 70-70 170t70 170q70 70 170 70t170-70ZM320-159l160-41 160 41v-124q-35 20-75.5 31.5T480-240q-44 0-84.5-11.5T320-283v124Zm160-62Z" }) }));
|
|
413
|
+
}
|
|
411
414
|
export function IconShowAllUsers(props) {
|
|
412
415
|
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "1em", height: "1em", fontSize: props.fontSize ? props.fontSize : FONTSIZE, ...props, children: _jsx("path", { fill: "currentColor", d: "M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5s-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5S5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05c1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5" }) }));
|
|
413
416
|
}
|
package/lib/helper/helpers.d.ts
CHANGED
|
@@ -16,6 +16,9 @@ declare const getColor: (color: ColorsType) => string;
|
|
|
16
16
|
/**
|
|
17
17
|
* Genera un Universally Unique Identifier (UUID) versione 4.
|
|
18
18
|
* Simile a Guid.NewGuid() in C#.
|
|
19
|
+
* Usa crypto.randomUUID() quando disponibile (HTTPS / localhost) e ricade
|
|
20
|
+
* su crypto.getRandomValues() — disponibile anche in contesti non sicuri (HTTP) —
|
|
21
|
+
* cosi funziona indipendentemente dal protocollo, senza dipendenze esterne.
|
|
19
22
|
* @returns {string} Un UUID in formato stringa.
|
|
20
23
|
*/
|
|
21
24
|
export declare const generateUUID: () => string;
|
package/lib/helper/helpers.js
CHANGED
|
@@ -103,10 +103,29 @@ const getColor = (color) => {
|
|
|
103
103
|
/**
|
|
104
104
|
* Genera un Universally Unique Identifier (UUID) versione 4.
|
|
105
105
|
* Simile a Guid.NewGuid() in C#.
|
|
106
|
+
* Usa crypto.randomUUID() quando disponibile (HTTPS / localhost) e ricade
|
|
107
|
+
* su crypto.getRandomValues() — disponibile anche in contesti non sicuri (HTTP) —
|
|
108
|
+
* cosi funziona indipendentemente dal protocollo, senza dipendenze esterne.
|
|
106
109
|
* @returns {string} Un UUID in formato stringa.
|
|
107
110
|
*/
|
|
108
111
|
export const generateUUID = () => {
|
|
109
|
-
|
|
112
|
+
// 1) Nativo: disponibile solo in secure context (HTTPS o localhost)
|
|
113
|
+
if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {
|
|
114
|
+
return crypto.randomUUID();
|
|
115
|
+
}
|
|
116
|
+
// 2) Fallback crittografico, funziona anche in HTTP
|
|
117
|
+
if (typeof crypto !== 'undefined' && typeof crypto.getRandomValues === 'function') {
|
|
118
|
+
const b = crypto.getRandomValues(new Uint8Array(16));
|
|
119
|
+
b[6] = (b[6] & 0x0f) | 0x40; // versione 4
|
|
120
|
+
b[8] = (b[8] & 0x3f) | 0x80; // variante 10xx
|
|
121
|
+
const h = Array.from(b, x => x.toString(16).padStart(2, '0'));
|
|
122
|
+
return `${h[0]}${h[1]}${h[2]}${h[3]}-${h[4]}${h[5]}-${h[6]}${h[7]}-${h[8]}${h[9]}-${h.slice(10).join('')}`;
|
|
123
|
+
}
|
|
124
|
+
// 3) Ultima spiaggia (ambienti senza Web Crypto)
|
|
125
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
|
|
126
|
+
const r = (Math.random() * 16) | 0;
|
|
127
|
+
return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16);
|
|
128
|
+
});
|
|
110
129
|
};
|
|
111
130
|
const makeID = (length) => {
|
|
112
131
|
let result = '';
|
|
@@ -21,7 +21,7 @@ import { useDcmtOperations } from "./useDcmtOperations";
|
|
|
21
21
|
import useFloatingBarPinnedItems from "./useFloatingBarPinnedItems";
|
|
22
22
|
import { useInputAttachmentsDialog, useInputCvtFormatDialog } from "./useInputDialog";
|
|
23
23
|
import { useRelatedDocuments } from "./useRelatedDocuments";
|
|
24
|
-
import { convertSearchResultDescriptorToFileItems, dcmtsFileCachePreview, getDcmtCicoStatus, getMoreInfoTasksForDocument, IconActivity, IconArchiveDetail, IconArchiveDoc, IconArchiveMaster, IconBatchUpdate, IconCheck, IconCheckFile, IconCheckIn, IconCircleInfo, IconCloseCircle, IconConvertFilePdf, IconCopy, IconCustom, IconDelete, IconDetailDcmts, IconDotsVerticalCircleOutline, IconDownload, IconEdit, IconExportTo, IconFileDots, IconHide,
|
|
24
|
+
import { convertSearchResultDescriptorToFileItems, dcmtsFileCachePreview, getDcmtCicoStatus, getMoreInfoTasksForDocument, IconActivity, IconArchiveDetail, IconArchiveDoc, IconArchiveMaster, IconBatchUpdate, IconCheck, IconCheckFile, IconCheckIn, IconCircleInfo, IconCloseCircle, IconConvertFilePdf, IconCopy, IconCustom, IconDelete, IconDetailDcmts, IconDotsVerticalCircleOutline, IconDownload, IconEdit, IconExportTo, IconFileDots, IconHide, IconInfo, IconMenuCAArchive, IconMoveToFolder, IconPair, IconPin, IconPlatform, IconPreview, IconRelation, IconSearch, IconShare, IconSharedDcmt, IconShow, IconSignaturePencil, IconStar, IconSubstFile, IconUndo, IconUnpair, IconUserGroupOutline, isConvertibleToPdfExt, isPdfEditorAvailable, S4T_USER_REGISTRY_MASTER, SDKUI_Globals, SDKUI_Localizator, searchResultToMetadataValues, TMImageLibrary, IconCertificateBadge } from '../helper';
|
|
25
25
|
import { isXMLFileExt } from "../helper/dcmtsHelper";
|
|
26
26
|
import TMCopyToFolderForm from "../components/features/documents/TMCopyToFolderForm";
|
|
27
27
|
import TMMergeToPdfForm from "../components/features/documents/TMMergeToPdfForm";
|
|
@@ -620,7 +620,7 @@ export const useDocumentOperations = (props) => {
|
|
|
620
620
|
},
|
|
621
621
|
{
|
|
622
622
|
id: 'sign-sync',
|
|
623
|
-
icon: _jsx(
|
|
623
|
+
icon: _jsx(IconCertificateBadge, {}),
|
|
624
624
|
name: SDKUI_Localizator.ImportCertificates,
|
|
625
625
|
operationType: 'multiRow',
|
|
626
626
|
// Visibile solo per tipo documento 'S4T_certificate_registry' con metadato 'email' e se la callback fetchRemoteCertificates è definita
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topconsultnpm/sdkui-react",
|
|
3
|
-
"version": "6.21.0-
|
|
3
|
+
"version": "6.21.0-dev6.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"lib"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@topconsultnpm/sdk-ts": "6.21.0-
|
|
42
|
+
"@topconsultnpm/sdk-ts": "6.21.0-dev6.2",
|
|
43
43
|
"@zip.js/zip.js": "2.8.26",
|
|
44
44
|
"buffer": "^6.0.3",
|
|
45
45
|
"devextreme": "^25.2.6",
|