@topconsultnpm/sdkui-react 6.19.0-test2 → 6.20.0-dev1.10
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.
- package/lib/components/base/TMAccordion.js +2 -2
- package/lib/components/choosers/TMDynDataListItemChooser.js +5 -4
- package/lib/components/editors/TMHtmlEditor.js +1 -1
- package/lib/components/editors/TMMetadataValues.js +34 -12
- package/lib/components/features/assistant/ToppyDraggableHelpCenter.js +74 -63
- package/lib/components/features/documents/TMDcmtBlog.d.ts +1 -7
- package/lib/components/features/documents/TMDcmtBlog.js +29 -2
- package/lib/components/features/documents/TMDcmtForm.d.ts +1 -0
- package/lib/components/features/documents/TMDcmtForm.js +24 -34
- package/lib/components/features/documents/TMDcmtPreview.js +93 -64
- package/lib/components/features/search/TMSavedQuerySelector.js +1 -1
- package/lib/components/features/search/TMSearchQueryPanel.js +1 -1
- package/lib/components/features/search/TMSearchResult.js +249 -58
- package/lib/components/features/search/TMSearchResultCheckoutInfoForm.d.ts +8 -0
- package/lib/components/features/search/TMSearchResultCheckoutInfoForm.js +129 -0
- package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +2 -2
- package/lib/components/features/search/TMSearchResultsMenuItems.js +41 -63
- package/lib/components/features/search/TMTreeSelector.js +1 -1
- package/lib/components/features/search/TMViewHistoryDcmt.d.ts +18 -0
- package/lib/components/features/search/TMViewHistoryDcmt.js +285 -0
- package/lib/components/grids/TMRecentsManager.js +1 -1
- package/lib/helper/SDKUI_Globals.d.ts +3 -7
- package/lib/helper/SDKUI_Globals.js +1 -0
- package/lib/helper/SDKUI_Localizator.d.ts +16 -0
- package/lib/helper/SDKUI_Localizator.js +209 -6
- package/lib/helper/TMIcons.d.ts +3 -1
- package/lib/helper/TMIcons.js +9 -1
- package/lib/helper/TMUtils.d.ts +3 -1
- package/lib/helper/TMUtils.js +51 -0
- package/lib/helper/checkinCheckoutManager.d.ts +55 -0
- package/lib/helper/checkinCheckoutManager.js +266 -0
- package/lib/helper/helpers.d.ts +7 -0
- package/lib/helper/helpers.js +37 -5
- package/lib/helper/index.d.ts +1 -0
- package/lib/helper/index.js +1 -0
- package/lib/helper/queryHelper.js +13 -1
- package/lib/services/platform_services.d.ts +1 -1
- package/package.json +52 -52
package/lib/helper/TMUtils.js
CHANGED
|
@@ -382,3 +382,54 @@ export const parseSignatureConfiguration = (did, informationSign, firstName, las
|
|
|
382
382
|
throw error;
|
|
383
383
|
}
|
|
384
384
|
};
|
|
385
|
+
export const convertSearchResultDescriptorToFileItems = (documents) => {
|
|
386
|
+
const fileItems = [];
|
|
387
|
+
documents.forEach((doc, docIndex) => {
|
|
388
|
+
const columns = doc.dtdResult?.columns || [];
|
|
389
|
+
const rows = doc.dtdResult?.rows || [];
|
|
390
|
+
// Map column captions to their indexes for quick lookup
|
|
391
|
+
const colIndexMap = {};
|
|
392
|
+
columns.forEach((col, i) => {
|
|
393
|
+
if (col.caption !== undefined) {
|
|
394
|
+
colIndexMap[col.caption] = i;
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
const getVal = (row, caption) => {
|
|
398
|
+
const idx = colIndexMap[caption];
|
|
399
|
+
return idx !== undefined ? row[idx] : undefined;
|
|
400
|
+
};
|
|
401
|
+
rows.forEach((row, rowIndex) => {
|
|
402
|
+
let baseName = doc.fromName || `Document ${docIndex + 1}`;
|
|
403
|
+
const did = getVal(row, 'DID');
|
|
404
|
+
const fileExt = getVal(row, 'FileExt');
|
|
405
|
+
const tid = getVal(row, 'TID');
|
|
406
|
+
const fileSize = getVal(row, 'FileSize');
|
|
407
|
+
if (did) {
|
|
408
|
+
baseName += ` (DID: ${did})`;
|
|
409
|
+
}
|
|
410
|
+
if (fileExt) {
|
|
411
|
+
baseName += `.${fileExt}`;
|
|
412
|
+
}
|
|
413
|
+
fileItems.push({
|
|
414
|
+
id: did ? Number(did) : Number(`${docIndex}${rowIndex}`),
|
|
415
|
+
name: baseName,
|
|
416
|
+
isDirectory: false,
|
|
417
|
+
items: [],
|
|
418
|
+
tid: tid !== undefined ? Number(tid) : undefined,
|
|
419
|
+
did: did !== undefined ? Number(did) : undefined,
|
|
420
|
+
ext: fileExt ?? undefined,
|
|
421
|
+
size: fileSize !== undefined ? Number(fileSize) : 1,
|
|
422
|
+
creationTime: undefined,
|
|
423
|
+
lastUpdateTime: undefined,
|
|
424
|
+
updaterID: undefined,
|
|
425
|
+
updaterName: undefined,
|
|
426
|
+
description: undefined,
|
|
427
|
+
checkOutUserID: undefined,
|
|
428
|
+
checkOutUserName: undefined,
|
|
429
|
+
checkoutDate: null,
|
|
430
|
+
version: undefined,
|
|
431
|
+
});
|
|
432
|
+
});
|
|
433
|
+
});
|
|
434
|
+
return fileItems;
|
|
435
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DcmtTypeDescriptor, FileDescriptor, UserDescriptor } from "@topconsultnpm/sdk-ts";
|
|
3
|
+
import { DcmtInfo, DownloadModes, DownloadTypes } from "../ts/types";
|
|
4
|
+
import { FileItem } from "../components";
|
|
5
|
+
/**
|
|
6
|
+
* Check-in/Check-out Manager
|
|
7
|
+
* Questo modulo gestisce tutte le operazioni di check-in e check-out
|
|
8
|
+
* dei documenti e delle bozze dei gruppi di lavoro.
|
|
9
|
+
*/
|
|
10
|
+
export interface CheckoutInfo {
|
|
11
|
+
DID: string;
|
|
12
|
+
TID: string;
|
|
13
|
+
checkoutFolder: string;
|
|
14
|
+
checkoutName: string;
|
|
15
|
+
}
|
|
16
|
+
interface CheckoutStatusResult {
|
|
17
|
+
isCheckedOut: boolean;
|
|
18
|
+
mode: 'editMode' | 'lockMode' | '';
|
|
19
|
+
version: number;
|
|
20
|
+
icon: React.ReactNode | null;
|
|
21
|
+
}
|
|
22
|
+
export type DownloadSource = {
|
|
23
|
+
type: 'fileItem';
|
|
24
|
+
fileItem: FileItem;
|
|
25
|
+
} | {
|
|
26
|
+
type: 'dcmtInfo';
|
|
27
|
+
dcmtInfo: DcmtInfo;
|
|
28
|
+
originalFileName: string;
|
|
29
|
+
};
|
|
30
|
+
export declare const getCicoDownloadFileName: (source: DownloadSource, checkout: boolean, withTimestampAndExt: boolean) => string;
|
|
31
|
+
export declare const cicoDownloadFilesCallback: (sources: Array<DownloadSource>, checkout: boolean, downloadDcmtsAsync: (inputDcmts: Array<DcmtInfo> | undefined, downloadType?: DownloadTypes, downloadMode?: DownloadModes, onFileDownloaded?: (dcmtFile: File) => void, confirmAttachments?: (list: FileDescriptor[]) => Promise<string[] | undefined>, skipConfirmation?: boolean) => Promise<void>) => Promise<void>;
|
|
32
|
+
export declare const updateCicoCheckoutStorageItem: (item: CheckoutInfo, type: "fileItem" | "dcmtInfo", action?: "addOrUpdate" | "remove") => void;
|
|
33
|
+
export declare const validateCicoFileName: (source: DownloadSource, fileName: string) => FileNameValidation;
|
|
34
|
+
type ValidationResult = {
|
|
35
|
+
expected: string | number | undefined;
|
|
36
|
+
current: string | number | undefined;
|
|
37
|
+
isValid: boolean;
|
|
38
|
+
};
|
|
39
|
+
type FileNameValidationItems = {
|
|
40
|
+
name: ValidationResult;
|
|
41
|
+
archiveID: ValidationResult;
|
|
42
|
+
did: ValidationResult;
|
|
43
|
+
tid: ValidationResult;
|
|
44
|
+
fileExtension: ValidationResult;
|
|
45
|
+
};
|
|
46
|
+
type FileNameValidation = {
|
|
47
|
+
isValid: boolean;
|
|
48
|
+
validationResults?: FileNameValidationItems;
|
|
49
|
+
};
|
|
50
|
+
export declare const renderCicoCheckInContent: (source: DownloadSource, selectedFilename: File, isValid: boolean, validationItems: FileNameValidationItems | undefined, color?: string) => React.ReactNode;
|
|
51
|
+
export declare const getDcmtCicoStatus: (dcmt: any, allUsers: Array<UserDescriptor>, dtd: DcmtTypeDescriptor | undefined) => {
|
|
52
|
+
cicoEnabled: boolean;
|
|
53
|
+
checkoutStatus: CheckoutStatusResult;
|
|
54
|
+
};
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { AccessLevels, CICO_MetadataNames, SDK_Globals } from "@topconsultnpm/sdk-ts";
|
|
3
|
+
import TMTooltip from "../components/base/TMTooltip";
|
|
4
|
+
import { Globalization, SDKUI_Globals, SDKUI_Localizator } from "./index";
|
|
5
|
+
import { DownloadTypes } from "../ts/types";
|
|
6
|
+
const findCheckOutUserName = (users, checkoutUserId) => {
|
|
7
|
+
let checkOutUser = users.find(user => user.id === checkoutUserId);
|
|
8
|
+
return checkOutUser ? checkOutUser.name : '-';
|
|
9
|
+
};
|
|
10
|
+
const colors = {
|
|
11
|
+
MEDIUM_GREEN: "#28a745",
|
|
12
|
+
};
|
|
13
|
+
export const getCicoDownloadFileName = (source, checkout, withTimestampAndExt) => {
|
|
14
|
+
const archiveID = SDK_Globals.tmSession?.SessionDescr?.archiveID;
|
|
15
|
+
if (!archiveID)
|
|
16
|
+
return '';
|
|
17
|
+
let baseName;
|
|
18
|
+
let tid;
|
|
19
|
+
let did;
|
|
20
|
+
let ext;
|
|
21
|
+
if (source.type === 'fileItem') {
|
|
22
|
+
// fileItem source
|
|
23
|
+
const { name, tid: tidValue, did: didValue, ext: extValue } = source.fileItem;
|
|
24
|
+
baseName = name.includes('.') ? name.substring(0, name.lastIndexOf('.')) : name;
|
|
25
|
+
tid = Number(tidValue);
|
|
26
|
+
did = Number(didValue);
|
|
27
|
+
ext = extValue;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
// dcmtInfo source
|
|
31
|
+
const { dcmtInfo, originalFileName } = source;
|
|
32
|
+
const { TID, DID, FILEEXT } = dcmtInfo;
|
|
33
|
+
baseName = originalFileName.includes('.') ? originalFileName.substring(0, originalFileName.lastIndexOf('.')) : originalFileName;
|
|
34
|
+
tid = TID;
|
|
35
|
+
did = DID;
|
|
36
|
+
ext = FILEEXT;
|
|
37
|
+
}
|
|
38
|
+
const fileIdentifier = `${archiveID}~${baseName}~${tid}~${did}`;
|
|
39
|
+
const extension = withTimestampAndExt && ext ? `.${ext}` : '';
|
|
40
|
+
let timestamp = '';
|
|
41
|
+
if (checkout && withTimestampAndExt) {
|
|
42
|
+
const now = new Date();
|
|
43
|
+
const pad = (n) => n.toString().padStart(2, '0');
|
|
44
|
+
timestamp = `~${now.getFullYear()}${pad(now.getMonth() + 1)}${pad(now.getDate())}${pad(now.getHours())}${pad(now.getMinutes())}${pad(now.getSeconds())}`;
|
|
45
|
+
}
|
|
46
|
+
return `${checkout ? 'checkout~' : ''}${fileIdentifier}${timestamp}${extension}`;
|
|
47
|
+
};
|
|
48
|
+
export const cicoDownloadFilesCallback = async (sources, checkout, downloadDcmtsAsync) => {
|
|
49
|
+
const files = [];
|
|
50
|
+
sources.forEach(source => {
|
|
51
|
+
let tid;
|
|
52
|
+
let did;
|
|
53
|
+
let ext;
|
|
54
|
+
if (source.type === 'fileItem') {
|
|
55
|
+
tid = Number(source.fileItem.tid);
|
|
56
|
+
did = Number(source.fileItem.did);
|
|
57
|
+
ext = source.fileItem.ext;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
tid = source.dcmtInfo.TID;
|
|
61
|
+
did = source.dcmtInfo.DID;
|
|
62
|
+
ext = source.dcmtInfo.FILEEXT;
|
|
63
|
+
}
|
|
64
|
+
if (tid && did && ext) {
|
|
65
|
+
let fileName = getCicoDownloadFileName(source, checkout, true);
|
|
66
|
+
if (checkout) {
|
|
67
|
+
const newItem = { TID: tid.toString(), DID: did.toString(), checkoutFolder: "", checkoutName: fileName };
|
|
68
|
+
updateCicoCheckoutStorageItem(newItem, source.type, "addOrUpdate");
|
|
69
|
+
}
|
|
70
|
+
files.push({ TID: tid, DID: did, FILEEXT: ext, fileName });
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
if (files.length > 0)
|
|
74
|
+
await downloadDcmtsAsync(files, DownloadTypes.Dcmt, "download");
|
|
75
|
+
};
|
|
76
|
+
export const updateCicoCheckoutStorageItem = (item, type, action = "addOrUpdate") => {
|
|
77
|
+
// Select the appropriate array based on type
|
|
78
|
+
const currentItems = type === 'dcmtInfo' ? [...SDKUI_Globals.userSettings.dcmtCheckoutInfo] : [...SDKUI_Globals.userSettings.wgDraftCheckoutInfo];
|
|
79
|
+
// Find the index of an existing item that has the same TID and DID as the new item
|
|
80
|
+
const index = currentItems.findIndex(i => i.TID === item.TID && i.DID === item.DID);
|
|
81
|
+
// If the action is to add a new item or update an existing one
|
|
82
|
+
if (action === "addOrUpdate") {
|
|
83
|
+
if (index >= 0) {
|
|
84
|
+
// If the item exists, overwrite it with the new values
|
|
85
|
+
currentItems[index] = item;
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
// If the item does not exist, push it into the array
|
|
89
|
+
currentItems.push(item);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
else if (action === "remove" && index >= 0) {
|
|
93
|
+
// If the action is to remove an item, remove it from the array
|
|
94
|
+
currentItems.splice(index, 1);
|
|
95
|
+
}
|
|
96
|
+
// Update the global array with the modified copy
|
|
97
|
+
if (type === 'dcmtInfo') {
|
|
98
|
+
SDKUI_Globals.userSettings.dcmtCheckoutInfo = currentItems;
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
SDKUI_Globals.userSettings.wgDraftCheckoutInfo = currentItems;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
export const validateCicoFileName = (source, fileName) => {
|
|
105
|
+
const archiveID = SDK_Globals.tmSession?.SessionDescr?.archiveID;
|
|
106
|
+
let baseName;
|
|
107
|
+
let tid;
|
|
108
|
+
let did;
|
|
109
|
+
let ext;
|
|
110
|
+
if (source.type === 'fileItem') {
|
|
111
|
+
// fileItem source
|
|
112
|
+
const { name: originalName, tid: tidValue, did: didValue, ext: extValue } = source.fileItem;
|
|
113
|
+
baseName = originalName.includes('.') ? originalName.substring(0, originalName.lastIndexOf('.')) : originalName;
|
|
114
|
+
tid = Number(tidValue);
|
|
115
|
+
did = Number(didValue);
|
|
116
|
+
ext = extValue;
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
// dcmtInfo source
|
|
120
|
+
const { dcmtInfo, originalFileName } = source;
|
|
121
|
+
const { TID, DID, FILEEXT } = dcmtInfo;
|
|
122
|
+
baseName = originalFileName.includes('.') ? originalFileName.substring(0, originalFileName.lastIndexOf('.')) : originalFileName;
|
|
123
|
+
tid = TID;
|
|
124
|
+
did = DID;
|
|
125
|
+
ext = FILEEXT;
|
|
126
|
+
}
|
|
127
|
+
// Ensure originalName has the extension
|
|
128
|
+
const normalizedExt = ext?.toLowerCase() ?? '';
|
|
129
|
+
const name = baseName.toLowerCase().endsWith(`.${normalizedExt}`) ? baseName : `${baseName}.${normalizedExt}`;
|
|
130
|
+
let fileNameToValidate = fileName;
|
|
131
|
+
const fileExtensionCheck = fileNameToValidate.split('.').pop() ?? '';
|
|
132
|
+
// Remove extension part
|
|
133
|
+
fileNameToValidate = fileNameToValidate.slice(0, -fileExtensionCheck.length - 1);
|
|
134
|
+
// Check and remove 'checkout~' prefix if present
|
|
135
|
+
const hasCheckoutPrefix = fileNameToValidate.startsWith('checkout~');
|
|
136
|
+
if (hasCheckoutPrefix) {
|
|
137
|
+
fileNameToValidate = fileNameToValidate.replace(/^checkout~/, '');
|
|
138
|
+
}
|
|
139
|
+
// Split the remaining string by underscores (~)
|
|
140
|
+
const parts = fileNameToValidate.split('~');
|
|
141
|
+
if (parts.length !== 5) {
|
|
142
|
+
return {
|
|
143
|
+
isValid: false,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
// Extract components starting from the end
|
|
147
|
+
const archiveCheck = parts[0];
|
|
148
|
+
const nameCheck = parts[1];
|
|
149
|
+
const tidCheck = parts[2];
|
|
150
|
+
const didCheck = parts[3];
|
|
151
|
+
// Validation checks
|
|
152
|
+
const expectedFullName = `${nameCheck}.${fileExtensionCheck}`.toLowerCase();
|
|
153
|
+
const isValidName = expectedFullName === name.toLowerCase();
|
|
154
|
+
const isValidDid = didCheck ? did.toString() === parseInt(didCheck, 10).toString() : false;
|
|
155
|
+
const isValidTid = tidCheck ? tid.toString() === parseInt(tidCheck, 10).toString() : false;
|
|
156
|
+
const isValidArchive = archiveCheck ? archiveCheck === archiveID : false;
|
|
157
|
+
const isValidExt = ext ? ext.toLowerCase() === fileExtensionCheck.toLowerCase() : false;
|
|
158
|
+
// Return validation results as an object
|
|
159
|
+
return {
|
|
160
|
+
isValid: !!(isValidName && isValidArchive && isValidDid && isValidTid && isValidExt),
|
|
161
|
+
validationResults: {
|
|
162
|
+
archiveID: {
|
|
163
|
+
expected: archiveID,
|
|
164
|
+
current: archiveCheck,
|
|
165
|
+
isValid: isValidArchive
|
|
166
|
+
},
|
|
167
|
+
name: {
|
|
168
|
+
expected: name.toLowerCase(),
|
|
169
|
+
current: expectedFullName,
|
|
170
|
+
isValid: isValidName
|
|
171
|
+
},
|
|
172
|
+
did: {
|
|
173
|
+
expected: did?.toString(),
|
|
174
|
+
current: didCheck,
|
|
175
|
+
isValid: isValidDid
|
|
176
|
+
},
|
|
177
|
+
tid: {
|
|
178
|
+
expected: tid.toString(),
|
|
179
|
+
current: tidCheck,
|
|
180
|
+
isValid: isValidTid
|
|
181
|
+
},
|
|
182
|
+
fileExtension: {
|
|
183
|
+
expected: ext?.toLowerCase(),
|
|
184
|
+
current: fileExtensionCheck.toLowerCase(),
|
|
185
|
+
isValid: isValidExt
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
export const renderCicoCheckInContent = (source, selectedFilename, isValid, validationItems, color = "#996300") => {
|
|
191
|
+
const fileName = source.type === 'fileItem' ? source.fileItem.name : (source.dcmtInfo.fileName ?? SDKUI_Localizator.SearchResult);
|
|
192
|
+
return _jsxs("div", { style: { width: "100%", height: "100%" }, children: [SDKUI_Localizator.CheckInElementConfirm.replaceParams(fileName), !isValid && _jsxs("div", { style: { width: "100%", height: "100%", marginTop: '15px' }, children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'column' }, children: [_jsx("div", { style: { fontSize: '12px', color, marginBottom: '12px' }, children: SDKUI_Localizator.ElementNameConventionError }), _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '6px' }, children: [_jsxs("div", { style: { color }, children: [_jsx("strong", { style: { color }, children: SDKUI_Localizator.Expected }), ":", ' ', _jsx("span", { style: { fontStyle: 'italic' }, children: getCicoDownloadFileName(source, true, false) })] }), _jsxs("div", { style: { color }, children: [_jsx("strong", { style: { color }, children: SDKUI_Localizator.SelectedSingular }), ":", ' ', _jsx("span", { style: { fontStyle: 'italic' }, children: selectedFilename.name })] })] })] }), validationItems && Object.entries(validationItems).filter(([_, value]) => !value.isValid).length > 0 && (_jsxs("div", { style: { width: "100%", height: "100%", marginTop: '15px' }, children: [_jsx("hr", {}), _jsxs("table", { style: { width: "100%", borderCollapse: "collapse", color }, children: [_jsx("caption", { style: { textAlign: "center", fontWeight: "bold", marginBottom: "5px" }, children: SDKUI_Localizator.Anomalies }), _jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { style: { textAlign: "left", borderBottom: "1px solid #eee" }, children: SDKUI_Localizator.Value }), _jsx("th", { style: { textAlign: "left", borderBottom: "1px solid #eee" }, children: SDKUI_Localizator.Expected }), _jsx("th", { style: { textAlign: "left", borderBottom: "1px solid #eee" }, children: SDKUI_Localizator.Current })] }) }), _jsx("tbody", { children: Object.entries(validationItems).filter(([_, value]) => !value.isValid).map(([key, result]) => (_jsxs("tr", { children: [_jsx("td", { style: { borderBottom: "1px solid #eee" }, children: _jsx("strong", { style: { textTransform: "capitalize" }, children: key }) }), _jsxs("td", { style: { borderBottom: "1px solid #eee" }, children: [" ", result.expected || "-"] }), _jsxs("td", { style: { borderBottom: "1px solid #eee" }, children: [" ", result.current || "-"] })] }, key))) })] }), _jsx("hr", {})] })), _jsx("div", { style: { fontSize: '12px', marginTop: '15px', marginBottom: '15px' }, children: SDKUI_Localizator.ProceedAnyway })] })] });
|
|
193
|
+
};
|
|
194
|
+
const getDcmtCicoInfo = (dtd) => {
|
|
195
|
+
const cico = {
|
|
196
|
+
CICO: 0,
|
|
197
|
+
CanCICO: AccessLevels.No,
|
|
198
|
+
CanDelChronology: AccessLevels.No,
|
|
199
|
+
UserID_MID: 0,
|
|
200
|
+
Date_MID: 0,
|
|
201
|
+
Ver_MID: 0,
|
|
202
|
+
UserID_CanViewOrUpdate: AccessLevels.No,
|
|
203
|
+
Date_CanViewOrUpdate: AccessLevels.No,
|
|
204
|
+
Ver_CanViewOrUpdate: AccessLevels.No,
|
|
205
|
+
};
|
|
206
|
+
if (dtd === undefined)
|
|
207
|
+
return cico;
|
|
208
|
+
cico.CICO = dtd.cico ?? 0;
|
|
209
|
+
cico.CanCICO = dtd.perm?.canCICO ?? AccessLevels.No;
|
|
210
|
+
cico.CanDelChronology = dtd.perm?.canDelChron ?? AccessLevels.No;
|
|
211
|
+
const mdCheckout = dtd.metadata?.find(md => md.name === CICO_MetadataNames.CICO_CheckoutUserID);
|
|
212
|
+
if (mdCheckout) {
|
|
213
|
+
cico.UserID_MID = mdCheckout.fromMID;
|
|
214
|
+
cico.UserID_CanViewOrUpdate = (mdCheckout.perm?.canView == AccessLevels.Yes || mdCheckout.perm?.canUpdate == AccessLevels.Yes) ? AccessLevels.Yes : AccessLevels.No;
|
|
215
|
+
}
|
|
216
|
+
const mdDate = dtd.metadata?.find(md => md.name === CICO_MetadataNames.CICO_CheckoutDate);
|
|
217
|
+
if (mdDate) {
|
|
218
|
+
cico.Date_MID = mdDate.fromMID;
|
|
219
|
+
cico.Date_CanViewOrUpdate = (mdDate.perm?.canView == AccessLevels.Yes || mdDate.perm?.canUpdate == AccessLevels.Yes) ? AccessLevels.Yes : AccessLevels.No;
|
|
220
|
+
}
|
|
221
|
+
const mdVer = dtd.metadata?.find(md => md.name === CICO_MetadataNames.CICO_Version);
|
|
222
|
+
if (mdVer) {
|
|
223
|
+
cico.Ver_MID = mdVer.fromMID;
|
|
224
|
+
cico.Ver_CanViewOrUpdate = (mdVer.perm?.canView == AccessLevels.Yes || mdVer.perm?.canUpdate == AccessLevels.Yes) ? AccessLevels.Yes : AccessLevels.No;
|
|
225
|
+
}
|
|
226
|
+
return cico;
|
|
227
|
+
};
|
|
228
|
+
export const getDcmtCicoStatus = (dcmt, allUsers, dtd) => {
|
|
229
|
+
if (dcmt === undefined || dtd === undefined) {
|
|
230
|
+
return {
|
|
231
|
+
cicoEnabled: false,
|
|
232
|
+
checkoutStatus: { isCheckedOut: false, mode: '', version: 1, icon: null }
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
const cicoInfo = getDcmtCicoInfo(dtd);
|
|
236
|
+
const CICO_CheckoutUserID_Meta = dtd?.metadata?.find(md => md.name === CICO_MetadataNames.CICO_CheckoutUserID);
|
|
237
|
+
const CICO_CheckoutDate_Meta = dtd?.metadata?.find(md => md.name === CICO_MetadataNames.CICO_CheckoutDate);
|
|
238
|
+
const CICO_Version_Meta = dtd?.metadata?.find(md => md.name === CICO_MetadataNames.CICO_Version);
|
|
239
|
+
const keyVersion = dcmt.TID + "_" + (CICO_Version_Meta?.id ?? 0);
|
|
240
|
+
const versionRaw = CICO_Version_Meta?.id ? dcmt[keyVersion] : undefined;
|
|
241
|
+
const version = (versionRaw != null && !isNaN(Number(versionRaw))) ? Number(versionRaw) : 1;
|
|
242
|
+
let checkoutStatus = { isCheckedOut: false, mode: '', version: version, icon: null, };
|
|
243
|
+
const userID = SDK_Globals.tmSession?.SessionDescr?.userID;
|
|
244
|
+
if (dcmt && CICO_CheckoutUserID_Meta?.id) {
|
|
245
|
+
const keyUserID = dcmt.TID + "_" + CICO_CheckoutUserID_Meta.id;
|
|
246
|
+
const checkoutUserIdValue = dcmt[keyUserID];
|
|
247
|
+
const checkoutUserId = Number(checkoutUserIdValue);
|
|
248
|
+
if (userID && checkoutUserIdValue && !isNaN(checkoutUserId) && checkoutUserId > 0) {
|
|
249
|
+
// editMode: l'utente corrente è quello che ha fatto il checkout
|
|
250
|
+
// lockMode: un altro utente ha fatto il checkout
|
|
251
|
+
const mode = (userID && userID === checkoutUserId) ? 'editMode' : 'lockMode';
|
|
252
|
+
// Recupera i dati aggiuntivi per il tooltip
|
|
253
|
+
const keyDate = dcmt.TID + "_" + (CICO_CheckoutDate_Meta?.id ?? 0);
|
|
254
|
+
const checkoutDate = CICO_CheckoutDate_Meta?.id ? dcmt[keyDate] : undefined;
|
|
255
|
+
const editLockTooltipText = _jsxs(_Fragment, { children: [_jsxs("div", { style: { textAlign: "center" }, children: [mode === 'editMode' && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: colors.MEDIUM_GREEN, fontWeight: "bold" }, className: "dx-icon-edit" }), SDKUI_Localizator.CurrentUserExtract] })), mode === 'lockMode' && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: colors.MEDIUM_GREEN, fontWeight: "bold" }, className: "dx-icon-lock" }), SDKUI_Localizator.ExtractedFromOtherUser] }))] }), _jsx("hr", {}), _jsxs("div", { style: { textAlign: "left" }, children: [_jsxs("ul", { children: [_jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedBy }), ": ", findCheckOutUserName(allUsers, checkoutUserId), " (ID: ", checkoutUserId, ")"] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedOn }), ": ", Globalization.getDateTimeDisplayValue(checkoutDate?.toString())] })] }), _jsx("hr", {}), _jsx("ul", { children: _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.Version }), ": ", version ?? 1] }) })] })] });
|
|
256
|
+
const icon = mode === 'editMode'
|
|
257
|
+
? _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: colors.MEDIUM_GREEN, fontWeight: "bold" }, className: "dx-icon-edit" }) })
|
|
258
|
+
: _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: colors.MEDIUM_GREEN, fontWeight: "bold" }, className: "dx-icon-lock" }) });
|
|
259
|
+
checkoutStatus = { isCheckedOut: true, mode: mode, icon: icon, version: version };
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
return {
|
|
263
|
+
cicoEnabled: cicoInfo.CICO === 1 && cicoInfo.CanCICO === AccessLevels.Yes,
|
|
264
|
+
checkoutStatus: checkoutStatus
|
|
265
|
+
};
|
|
266
|
+
};
|
package/lib/helper/helpers.d.ts
CHANGED
|
@@ -20,6 +20,13 @@ export declare const truncateText: (text: string, maxLength: number) => string;
|
|
|
20
20
|
declare function genUniqueId(): string;
|
|
21
21
|
export declare const captionToDataField: (caption: string | undefined) => string;
|
|
22
22
|
export declare const getDataColumnName: (fromTID: number | undefined, dtColumn: DataColumnDescriptor | undefined) => string;
|
|
23
|
+
/**
|
|
24
|
+
* Generates unique column keys handling duplicates by adding incremental suffixes.
|
|
25
|
+
* @param columns Array of DataColumnDescriptor
|
|
26
|
+
* @param fromTID The TID to use for column name generation
|
|
27
|
+
* @returns Array of unique column keys
|
|
28
|
+
*/
|
|
29
|
+
export declare const generateUniqueColumnKeys: (columns: DataColumnDescriptor[] | undefined, fromTID: number | undefined) => string[];
|
|
23
30
|
export declare const searchResultDescriptorToSimpleArray: (searchResult: SearchResultDescriptor | undefined) => any[] | undefined;
|
|
24
31
|
export declare const getCompleteMetadataName: (dcmtTypeName: string | undefined, metadataName: string | undefined) => string;
|
|
25
32
|
export declare const getQueryCountAsync: (qd: QueryDescriptor, showSpinner: boolean) => Promise<void>;
|
package/lib/helper/helpers.js
CHANGED
|
@@ -38,7 +38,12 @@ const openApps = async (appModule, tmSession, appRoutes) => {
|
|
|
38
38
|
};
|
|
39
39
|
export const setSDK_GlobalsInfoAsync = async (tms) => {
|
|
40
40
|
try {
|
|
41
|
-
|
|
41
|
+
const result = await SetGlobalsInfoAsync(tms);
|
|
42
|
+
if (result?.SessionDescr?.userID && result?.SessionDescr?.archiveID) {
|
|
43
|
+
const { UserSettings } = await import('./SDKUI_Globals');
|
|
44
|
+
UserSettings.LoadSettings(result.SessionDescr.userID, result.SessionDescr.archiveID);
|
|
45
|
+
}
|
|
46
|
+
return result;
|
|
42
47
|
}
|
|
43
48
|
catch (e) {
|
|
44
49
|
TMExceptionBoxManager.show({ exception: e.message });
|
|
@@ -162,16 +167,43 @@ export const getDataColumnName = (fromTID, dtColumn) => {
|
|
|
162
167
|
return MIDtoColName(tid, mid);
|
|
163
168
|
return `${tid}_${mid}`;
|
|
164
169
|
};
|
|
170
|
+
/**
|
|
171
|
+
* Generates unique column keys handling duplicates by adding incremental suffixes.
|
|
172
|
+
* @param columns Array of DataColumnDescriptor
|
|
173
|
+
* @param fromTID The TID to use for column name generation
|
|
174
|
+
* @returns Array of unique column keys
|
|
175
|
+
*/
|
|
176
|
+
export const generateUniqueColumnKeys = (columns, fromTID) => {
|
|
177
|
+
if (!columns)
|
|
178
|
+
return [];
|
|
179
|
+
const usedKeys = {};
|
|
180
|
+
const uniqueKeys = [];
|
|
181
|
+
for (let i = 0; i < columns.length; i++) {
|
|
182
|
+
let baseKey = getDataColumnName(fromTID, columns[i]);
|
|
183
|
+
let key = baseKey;
|
|
184
|
+
// If key already exists, add incremental suffix
|
|
185
|
+
if (usedKeys[baseKey] !== undefined) {
|
|
186
|
+
usedKeys[baseKey]++;
|
|
187
|
+
key = `${baseKey}_${usedKeys[baseKey]}`;
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
usedKeys[baseKey] = 0;
|
|
191
|
+
}
|
|
192
|
+
uniqueKeys.push(key);
|
|
193
|
+
}
|
|
194
|
+
return uniqueKeys;
|
|
195
|
+
};
|
|
165
196
|
export const searchResultDescriptorToSimpleArray = (searchResult) => {
|
|
166
|
-
|
|
197
|
+
// Generate unique keys for all columns
|
|
198
|
+
const uniqueKeys = generateUniqueColumnKeys(searchResult?.dtdResult?.columns, searchResult?.fromTID);
|
|
199
|
+
let result = searchResult?.dtdResult?.rows?.map((row, index) => {
|
|
167
200
|
let item = { rowIndex: index };
|
|
168
201
|
for (let i = 0; i < row.length; i++) {
|
|
169
|
-
|
|
170
|
-
let value = row[i];
|
|
171
|
-
item[key] = value;
|
|
202
|
+
item[uniqueKeys[i]] = row[i];
|
|
172
203
|
}
|
|
173
204
|
return item;
|
|
174
205
|
});
|
|
206
|
+
return result;
|
|
175
207
|
};
|
|
176
208
|
export const getCompleteMetadataName = (dcmtTypeName, metadataName) => `${dcmtTypeName}...${metadataName}`;
|
|
177
209
|
export const getQueryCountAsync = async (qd, showSpinner) => {
|
package/lib/helper/index.d.ts
CHANGED
package/lib/helper/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AccessLevels, MetadataDataDomains, DcmtTypeListCacheService, SystemMIDsAsNumber, MetadataDataTypes, QueryDescriptor, QueryFunctions, SelectItem, SelectItemVisibilities, FromItem, LayoutModes, QueryOperators, SavedQueryDescriptor, SearchEngine, WhereItem, OrderByItem, SDK_Globals, AppModules, SystemTIDs, WorkItemMetadataNames, PlatformObjectValidator } from '@topconsultnpm/sdk-ts';
|
|
2
2
|
import { DateDisplayTypes, Globalization } from './Globalization';
|
|
3
|
-
import { DraftsMIDs, MetadataValueDescriptorEx } from '../ts';
|
|
3
|
+
import { ChronologyMIDs, DraftsMIDs, MetadataValueDescriptorEx } from '../ts';
|
|
4
4
|
import { SDKUI_Localizator } from './SDKUI_Localizator';
|
|
5
5
|
export const getTIDsByQd = (qd) => {
|
|
6
6
|
let tids = [];
|
|
@@ -301,6 +301,18 @@ export const searchResultToMetadataValues = (tid, dtd, rows, mids, metadata, lay
|
|
|
301
301
|
break;
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
|
+
if (tid === SystemTIDs.Chronology) {
|
|
305
|
+
switch (mvd.mid) {
|
|
306
|
+
case ChronologyMIDs.Ver:
|
|
307
|
+
mvd.customName = SDKUI_Localizator.Version;
|
|
308
|
+
mvd.isReadOnly = true;
|
|
309
|
+
break;
|
|
310
|
+
case ChronologyMIDs.AuthorID:
|
|
311
|
+
mvd.customName = SDKUI_Localizator.Author;
|
|
312
|
+
mvd.isReadOnly = true;
|
|
313
|
+
break;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
304
316
|
return mvd;
|
|
305
317
|
};
|
|
306
318
|
metadata.forEach(md => {
|
|
@@ -6,7 +6,7 @@ export declare class PlatformObjectService {
|
|
|
6
6
|
static readonly retrieveAllAdminAsync: (objClass: ObjectClasses, jobType?: JobTypes) => Promise<import("@topconsultnpm/sdk-ts").UserDescriptor[] | DcmtTypeDescriptor[] | import("@topconsultnpm/sdk-ts").AreaDescriptor[] | import("@topconsultnpm/sdk-ts").RelationDescriptor[] | import("@topconsultnpm/sdk-ts").FEDistillerJobDescriptor[] | import("@topconsultnpm/sdk-ts").DataListDescriptor[] | import("@topconsultnpm/sdk-ts").DiskDescriptor[] | import("@topconsultnpm/sdk-ts").GroupDescriptor[] | import("@topconsultnpm/sdk-ts").LDAPDescriptor[] | import("@topconsultnpm/sdk-ts").NumeratorDescriptor[] | ProcessDescriptor[] | import("@topconsultnpm/sdk-ts").SAPLoginDescriptor[] | import("@topconsultnpm/sdk-ts").SignCertDescriptor[] | import("@topconsultnpm/sdk-ts").SignServerDescriptor[] | import("@topconsultnpm/sdk-ts").TreeDescriptor[] | import("@topconsultnpm/sdk-ts").TSADescriptor[] | import("@topconsultnpm/sdk-ts").WFDescriptor[] | undefined>;
|
|
7
7
|
private static readonly loadCacheForJobAsync;
|
|
8
8
|
private static readonly retrieveAdminJobAsync;
|
|
9
|
-
static readonly retrieveAdminAsync: (objClass: ObjectClasses, jobType: JobTypes, id: number) => Promise<import("@topconsultnpm/sdk-ts").UserDescriptor | import("@topconsultnpm/sdk-ts").MailSenderJobDescriptor |
|
|
9
|
+
static readonly retrieveAdminAsync: (objClass: ObjectClasses, jobType: JobTypes, id: number) => Promise<import("@topconsultnpm/sdk-ts").UserDescriptor | DcmtTypeDescriptor | import("@topconsultnpm/sdk-ts").MailSenderJobDescriptor | import("@topconsultnpm/sdk-ts").SavedQueryDescriptor | import("@topconsultnpm/sdk-ts").DataListDescriptor | import("@topconsultnpm/sdk-ts").AreaDescriptor | import("@topconsultnpm/sdk-ts").BasketTypeDescriptor | import("@topconsultnpm/sdk-ts").RelationDescriptor | import("@topconsultnpm/sdk-ts").TaskDescriptor | import("@topconsultnpm/sdk-ts").WorkingGroupDescriptor | import("@topconsultnpm/sdk-ts").BarcodeArchiverJobDescriptor | import("@topconsultnpm/sdk-ts").BatchUpdaterJobDescriptor | import("@topconsultnpm/sdk-ts").CassettoDoganaleJobDescriptor | import("@topconsultnpm/sdk-ts").CassettoDoganalePlusJobDescriptor | import("@topconsultnpm/sdk-ts").CassettoFiscaleQueryJobDescriptor | import("@topconsultnpm/sdk-ts").CassettoFiscaleSenderJobDescriptor | import("@topconsultnpm/sdk-ts").CheckSequenceJobDescriptor | import("@topconsultnpm/sdk-ts").COSCheckerJobDescriptor | import("@topconsultnpm/sdk-ts").DcmtConverterJobDescriptor | import("@topconsultnpm/sdk-ts").DcmtDeleterJobDescriptor | import("@topconsultnpm/sdk-ts").DcmtNoteJobDescriptor | import("@topconsultnpm/sdk-ts").DcmtPrinterJobDescriptor | import("@topconsultnpm/sdk-ts").FEAttacherJobDescriptor | import("@topconsultnpm/sdk-ts").FECreatorTxtJobDescriptor | import("@topconsultnpm/sdk-ts").FEDetacherJobDescriptor | import("@topconsultnpm/sdk-ts").FEDistillerJobDescriptor | import("@topconsultnpm/sdk-ts").FESenderWsJobDescriptor | import("@topconsultnpm/sdk-ts").FESplitterJobDescriptor | import("@topconsultnpm/sdk-ts").FEValidatorJobDescriptor | import("@topconsultnpm/sdk-ts").FileArchiverJobDescriptor | import("@topconsultnpm/sdk-ts").FileCheckerJobDescriptor | import("@topconsultnpm/sdk-ts").FileExecJobDescriptor | import("@topconsultnpm/sdk-ts").FileExportJobDescriptor | import("@topconsultnpm/sdk-ts").FileMoverJobDescriptor | import("@topconsultnpm/sdk-ts").LexJobDescriptor | import("@topconsultnpm/sdk-ts").LinkerJobDescriptor | import("@topconsultnpm/sdk-ts").MailArchiverJobDescriptor | import("@topconsultnpm/sdk-ts").MailQueryJobDescriptor | import("@topconsultnpm/sdk-ts").MigrationJobDescriptor | import("@topconsultnpm/sdk-ts").PdDCreatorJobDescriptor | import("@topconsultnpm/sdk-ts").PDFArchiverJobDescriptor | import("@topconsultnpm/sdk-ts").PdVArchiverJobDescriptor | import("@topconsultnpm/sdk-ts").PdVQueryJobDescriptor | import("@topconsultnpm/sdk-ts").PdVSenderJobDescriptor | import("@topconsultnpm/sdk-ts").PeppolQueryJobDescriptor | import("@topconsultnpm/sdk-ts").PeppolSenderJobDescriptor | import("@topconsultnpm/sdk-ts").PostelQueryJobDescriptor | import("@topconsultnpm/sdk-ts").PostelSenderJobDescriptor | import("@topconsultnpm/sdk-ts").ReplicatorJobDescriptor | import("@topconsultnpm/sdk-ts").SAPAlignerJobDescriptor | import("@topconsultnpm/sdk-ts").SAPBarcodeJobDescriptor | import("@topconsultnpm/sdk-ts").SAPDataReaderJobDescriptor | import("@topconsultnpm/sdk-ts").SAPDataWriterJobDescriptor | import("@topconsultnpm/sdk-ts").SignerJobDescriptor | import("@topconsultnpm/sdk-ts").SpoolArchiverJobDescriptor | import("@topconsultnpm/sdk-ts").UpdaterJobDescriptor | import("@topconsultnpm/sdk-ts").DiskDescriptor | import("@topconsultnpm/sdk-ts").GroupDescriptor | import("@topconsultnpm/sdk-ts").LDAPDescriptor | import("@topconsultnpm/sdk-ts").NumeratorDescriptor | ProcessDescriptor | import("@topconsultnpm/sdk-ts").SAPLoginDescriptor | import("@topconsultnpm/sdk-ts").SignCertDescriptor | import("@topconsultnpm/sdk-ts").SignServerDescriptor | import("@topconsultnpm/sdk-ts").TreeDescriptor | import("@topconsultnpm/sdk-ts").TSADescriptor | import("@topconsultnpm/sdk-ts").WFDescriptor | undefined>;
|
|
10
10
|
private static readonly updateJobAsync;
|
|
11
11
|
static readonly updateAsync: (objClass: ObjectClasses, jobType: JobTypes, d: any, ...args: any[]) => Promise<number | undefined>;
|
|
12
12
|
private static readonly createJobAsync;
|
package/package.json
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
2
|
+
"name": "@topconsultnpm/sdkui-react",
|
|
3
|
+
"version": "6.20.0-dev1.10",
|
|
4
|
+
"description": "",
|
|
5
|
+
"scripts": {
|
|
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/",
|
|
9
|
+
"tm-build": "npm run clean && tsc && npm run copy-files",
|
|
10
|
+
"tm-watch": "tsc -w",
|
|
11
|
+
"tm-publish": "npm publish --tag latest",
|
|
12
|
+
"storybook": "storybook dev -p 6006",
|
|
13
|
+
"build-storybook": "storybook build"
|
|
14
|
+
},
|
|
15
|
+
"author": "TopConsult",
|
|
16
|
+
"license": "ISC",
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@chromatic-com/storybook": "^4.1.3",
|
|
19
|
+
"@storybook/addon-docs": "^10.1.0",
|
|
20
|
+
"@storybook/addon-onboarding": "^10.1.0",
|
|
21
|
+
"@storybook/react-vite": "^10.1.0",
|
|
22
|
+
"@types/htmlparser2": "^3.10.7",
|
|
23
|
+
"@types/node": "^20.2.5",
|
|
24
|
+
"@types/react": "^18.3.3",
|
|
25
|
+
"@types/react-dom": "^18.3.3",
|
|
26
|
+
"copyfiles": "^2.4.1",
|
|
27
|
+
"esbuild": "^0.25.0",
|
|
28
|
+
"react": "^18.3.1",
|
|
29
|
+
"react-dom": "^18.3.1",
|
|
30
|
+
"storybook": "^10.1.0",
|
|
31
|
+
"typescript": "^5.9.3",
|
|
32
|
+
"vite": "^6.1.1"
|
|
33
|
+
},
|
|
34
|
+
"main": "dist/cjs/index.js",
|
|
35
|
+
"types": "./index.d.ts",
|
|
36
|
+
"module": "lib/esm/index.js",
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"lib"
|
|
40
|
+
],
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@topconsultnpm/sdk-ts": "6.20.0-dev1.1",
|
|
43
|
+
"buffer": "^6.0.3",
|
|
44
|
+
"devextreme": "25.1.7",
|
|
45
|
+
"devextreme-react": "25.1.7",
|
|
46
|
+
"exceljs": "^4.4.0",
|
|
47
|
+
"htmlparser2": "^10.0.0",
|
|
48
|
+
"react-router-dom": "^6.15.0",
|
|
49
|
+
"styled-components": "^6.1.1"
|
|
50
|
+
},
|
|
51
|
+
"overrides": {
|
|
52
|
+
"esbuild": "^0.25.0"
|
|
53
|
+
}
|
|
54
54
|
}
|