@topconsultnpm/sdkui-react 6.21.0-dev2.5 → 6.21.0-dev2.7

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.
@@ -77,7 +77,6 @@ const TMViewHistoryDcmt = (props) => {
77
77
  UpdaterDisplayName: user?.name ?? updaterID.toString(),
78
78
  CreationTime: row.CreationTime,
79
79
  LastUpdateTime: row.LastUpdateTime,
80
- LastUpdateTimeDisplay: row.LastUpdateTime ? Globalization.getDateTimeDisplayValue(new Date(row.LastUpdateTime)) : '-',
81
80
  Version: row.Version,
82
81
  CheckInTime: row.CheckInTime,
83
82
  IsLex: row.IsLex ? row.IsLex.toString() === '1' : false,
@@ -277,7 +276,7 @@ const TMViewHistoryDcmt = (props) => {
277
276
  { dataField: "Version", caption: "V.", dataType: 'number' },
278
277
  { dataField: "FileSizeDisplay", caption: SDKUI_Localizator.Size },
279
278
  { dataField: "UpdaterDisplayName", caption: SDKUI_Localizator.Author },
280
- { dataField: "LastUpdateTimeDisplay", caption: SDKUI_Localizator.LastUpdateTime },
279
+ { dataField: "LastUpdateTime", caption: SDKUI_Localizator.LastUpdateTime, dataType: 'datetime', format: 'dd/MM/yyyy HH:mm:ss', },
281
280
  ]);
282
281
  }, [showId]);
283
282
  return _jsx(TMModal, { title: `${SDKUI_Localizator.SearchResult} \u2014 ${SDKUI_Localizator.History + ": " + (fromDTD.nameLoc ?? SDKUI_Localizator.Document) + " (DID:" + inputDcmt.DID})`, width: calcResponsiveSizes(deviceType, '700px', '700px', '95%'), height: calcResponsiveSizes(deviceType, '80%', '80%', '95%'), onClose: onClose, children: _jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, showWaitPanelSecondary: showSecondary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, waitPanelTextSecondary: waitPanelTextSecondary, waitPanelValueSecondary: waitPanelValueSecondary, waitPanelMaxValueSecondary: waitPanelMaxValueSecondary, isCancelable: true, abortController: abortController, children: _jsxs(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showLocalWaitPanel, showWaitPanelPrimary: showLocalPrimary, waitPanelTitle: waitLocalPanelTitle, waitPanelTextPrimary: waitLocalPanelTextPrimary, waitPanelValuePrimary: waitLocalPanelValuePrimary, waitPanelMaxValuePrimary: waitLocalPanelMaxValuePrimary, isCancelable: true, abortController: abortLocalController, children: [_jsx(TMDataGrid, { dataSource: dcmtHistory, dataColumns: dataColumns, focusedRowKey: focusedRowKey, selection: selection, customContextMenuItems: customContextMenuItems, onFocusedRowChanged: onFocusedRowChanged, onCellDblClick: onCellDblClick, noDataText: SDKUI_Localizator.NoDataToDisplay, showSearchPanel: showSearch }), (showDcmtForm && selectedDcmt !== undefined) &&
@@ -142,27 +142,21 @@ export const getAttachmentInfo = (attachment, treeFs, draftLatestInfoMap, archiv
142
142
  return { name, nameElement, tooltipContent, folderId, fileExt, draftExist, archivedDocumentsExist };
143
143
  };
144
144
  export const getDcmtTypeDescriptor = async (blogPosts) => {
145
- // Create a Map to store tid as key and DcmtTypeDescriptor as value
146
145
  const dcmtTypeMap = new Map();
147
- // Collect unique tids first to avoid duplicate HTTP calls
148
- const uniqueTids = new Set();
149
- for (const blogPost of blogPosts) {
150
- if (blogPost.attachments) {
151
- for (const attachment of blogPost.attachments) {
152
- if (attachment.tid) {
153
- uniqueTids.add(attachment.tid);
154
- }
155
- }
146
+ // Collect unique tid-did pairs to avoid duplicate HTTP calls
147
+ const tidDidMap = new Map();
148
+ for (const { tid, did } of blogPosts.flatMap(bp => bp.attachments ?? [])) {
149
+ if (tid !== undefined && !tidDidMap.has(tid)) {
150
+ tidDidMap.set(tid, did);
156
151
  }
157
152
  }
158
- // Fetch all descriptors in parallel instead of sequentially
159
- const promises = Array.from(uniqueTids).map(async (tid) => {
160
- const dcmtTypeDescriptor = await DcmtTypeListCacheService.GetAsync(tid, true);
161
- if (dcmtTypeDescriptor) {
162
- dcmtTypeMap.set(tid, dcmtTypeDescriptor);
153
+ // Fetch all descriptors in parallel
154
+ await Promise.all(Array.from(tidDidMap.entries()).map(async ([tid, did]) => {
155
+ const descriptor = await DcmtTypeListCacheService.GetWithNotGrantedAsync(tid, did);
156
+ if (descriptor) {
157
+ dcmtTypeMap.set(tid, descriptor);
163
158
  }
164
- });
165
- await Promise.all(promises);
159
+ }));
166
160
  return dcmtTypeMap;
167
161
  };
168
162
  export const BlogPostHomeHeader = (header, classId, isSelected, searchText, headerClickCallback) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.21.0-dev2.5",
3
+ "version": "6.21.0-dev2.7",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",