@acorex-platform/module-common-client 0.0.54 → 0.0.56

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.
Files changed (65) hide show
  1. package/fesm2022/{acorex-platform-module-common-client-acorex-platform-module-common-client-Cd7vTe3G.mjs → acorex-platform-module-common-client-acorex-platform-module-common-client-BtSt1xRl.mjs} +232 -39
  2. package/fesm2022/acorex-platform-module-common-client-acorex-platform-module-common-client-BtSt1xRl.mjs.map +1 -0
  3. package/fesm2022/{acorex-platform-module-common-client-archive-entity.command-DiOJ6IkD.mjs → acorex-platform-module-common-client-archive-entity.command-BOV-yh5h.mjs} +2 -2
  4. package/fesm2022/{acorex-platform-module-common-client-archive-entity.command-DiOJ6IkD.mjs.map → acorex-platform-module-common-client-archive-entity.command-BOV-yh5h.mjs.map} +1 -1
  5. package/fesm2022/{acorex-platform-module-common-client-archive-entity.command.util-DhCNqo2R.mjs → acorex-platform-module-common-client-archive-entity.command.util-Cd65r7rb.mjs} +2 -2
  6. package/fesm2022/{acorex-platform-module-common-client-archive-entity.command.util-DhCNqo2R.mjs.map → acorex-platform-module-common-client-archive-entity.command.util-Cd65r7rb.mjs.map} +1 -1
  7. package/fesm2022/{acorex-platform-module-common-client-audit-info-column.component-DihrUmRM.mjs → acorex-platform-module-common-client-audit-info-column.component-DhYUlBgr.mjs} +9 -4
  8. package/fesm2022/acorex-platform-module-common-client-audit-info-column.component-DhYUlBgr.mjs.map +1 -0
  9. package/fesm2022/{acorex-platform-module-common-client-audit-info-edit.component-COMMBgsX.mjs → acorex-platform-module-common-client-audit-info-edit.component-aCgPXlef.mjs} +23 -2
  10. package/fesm2022/acorex-platform-module-common-client-audit-info-edit.component-aCgPXlef.mjs.map +1 -0
  11. package/fesm2022/{acorex-platform-module-common-client-audit-info-view.component-UOTT-ir_.mjs → acorex-platform-module-common-client-audit-info-view.component-lgzqcHCv.mjs} +23 -2
  12. package/fesm2022/acorex-platform-module-common-client-audit-info-view.component-lgzqcHCv.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-module-common-client-audit-info.util-CUlUTX8l.mjs +9 -0
  14. package/fesm2022/acorex-platform-module-common-client-audit-info.util-CUlUTX8l.mjs.map +1 -0
  15. package/fesm2022/{acorex-platform-module-common-client-bulk-archive-entity.command-D01227SB.mjs → acorex-platform-module-common-client-bulk-archive-entity.command-B-S45xY1.mjs} +2 -2
  16. package/fesm2022/{acorex-platform-module-common-client-bulk-archive-entity.command-D01227SB.mjs.map → acorex-platform-module-common-client-bulk-archive-entity.command-B-S45xY1.mjs.map} +1 -1
  17. package/fesm2022/{acorex-platform-module-common-client-bulk-restore-archive-entity.command-CaTT2Rqd.mjs → acorex-platform-module-common-client-bulk-restore-archive-entity.command-CqZxZrkm.mjs} +2 -2
  18. package/fesm2022/{acorex-platform-module-common-client-bulk-restore-archive-entity.command-CaTT2Rqd.mjs.map → acorex-platform-module-common-client-bulk-restore-archive-entity.command-CqZxZrkm.mjs.map} +1 -1
  19. package/fesm2022/{acorex-platform-module-common-client-clone-entity.command-BxT9kdpw.mjs → acorex-platform-module-common-client-clone-entity.command-DmmdZyoL.mjs} +2 -2
  20. package/fesm2022/{acorex-platform-module-common-client-clone-entity.command-BxT9kdpw.mjs.map → acorex-platform-module-common-client-clone-entity.command-DmmdZyoL.mjs.map} +1 -1
  21. package/fesm2022/acorex-platform-module-common-client-contracts.mjs +57 -1
  22. package/fesm2022/acorex-platform-module-common-client-contracts.mjs.map +1 -1
  23. package/fesm2022/{acorex-platform-module-common-client-create-entity-version-draft.command-DLNMbq3M.mjs → acorex-platform-module-common-client-create-entity-version-draft.command-CbLI7jvZ.mjs} +14 -2
  24. package/fesm2022/acorex-platform-module-common-client-create-entity-version-draft.command-CbLI7jvZ.mjs.map +1 -0
  25. package/fesm2022/{acorex-platform-module-common-client-delete-entity-version-draft.command-Dq0zjfak.mjs → acorex-platform-module-common-client-delete-entity-version-draft.command-CLWHs4DO.mjs} +14 -2
  26. package/fesm2022/acorex-platform-module-common-client-delete-entity-version-draft.command-CLWHs4DO.mjs.map +1 -0
  27. package/fesm2022/{acorex-platform-module-common-client-publish-entity-version.command-BtyWjtJj.mjs → acorex-platform-module-common-client-publish-entity-version.command-JNy0K1ZR.mjs} +14 -2
  28. package/fesm2022/acorex-platform-module-common-client-publish-entity-version.command-JNy0K1ZR.mjs.map +1 -0
  29. package/fesm2022/{acorex-platform-module-common-client-restore-archive-entity.command-BWF8iH1Z.mjs → acorex-platform-module-common-client-restore-archive-entity.command-Bami3ybY.mjs} +2 -2
  30. package/fesm2022/{acorex-platform-module-common-client-restore-archive-entity.command-BWF8iH1Z.mjs.map → acorex-platform-module-common-client-restore-archive-entity.command-Bami3ybY.mjs.map} +1 -1
  31. package/fesm2022/{acorex-platform-module-common-client-search-popup.component-B4LA5yh1.mjs → acorex-platform-module-common-client-search-popup.component-DVE0Hc3g.mjs} +2 -2
  32. package/fesm2022/{acorex-platform-module-common-client-search-popup.component-B4LA5yh1.mjs.map → acorex-platform-module-common-client-search-popup.component-DVE0Hc3g.mjs.map} +1 -1
  33. package/fesm2022/acorex-platform-module-common-client-show-entity-version-history.command-CoFbuUYP.mjs +553 -0
  34. package/fesm2022/acorex-platform-module-common-client-show-entity-version-history.command-CoFbuUYP.mjs.map +1 -0
  35. package/fesm2022/{acorex-platform-module-common-client-timeline-version-history-popup.component-CPmN0kme.mjs → acorex-platform-module-common-client-timeline-version-history-popup.component-Ap83-gMD.mjs} +2 -2
  36. package/fesm2022/{acorex-platform-module-common-client-timeline-version-history-popup.component-CPmN0kme.mjs.map → acorex-platform-module-common-client-timeline-version-history-popup.component-Ap83-gMD.mjs.map} +1 -1
  37. package/fesm2022/{acorex-platform-module-common-client-versioning-entity.command.util-CKlJNPHa.mjs → acorex-platform-module-common-client-versioning-entity.command.util-Bibv8EgV.mjs} +18 -1
  38. package/fesm2022/acorex-platform-module-common-client-versioning-entity.command.util-Bibv8EgV.mjs.map +1 -0
  39. package/fesm2022/acorex-platform-module-common-client.mjs +1 -1
  40. package/i18n/en-AU/_feature-sample.json +47 -0
  41. package/i18n/en-AU/_module-sample.json +114 -0
  42. package/i18n/en-AU/common.json +1164 -0
  43. package/i18n/en-AU/global-search.json +38 -0
  44. package/i18n/en-AU/lock-system.json +66 -0
  45. package/i18n/en-US/_feature-sample.json +47 -0
  46. package/i18n/en-US/_module-sample.json +114 -0
  47. package/i18n/en-US/common.json +1164 -0
  48. package/i18n/en-US/global-search.json +38 -0
  49. package/i18n/en-US/lock-system.json +66 -0
  50. package/i18n/fa-IR/_feature-sample.json +48 -0
  51. package/i18n/fa-IR/_module-sample.json +115 -0
  52. package/i18n/fa-IR/common.json +1164 -0
  53. package/i18n/fa-IR/global-search.json +38 -0
  54. package/i18n/fa-IR/lock-system.json +66 -0
  55. package/package.json +1 -1
  56. package/types/acorex-platform-module-common-client-contracts.d.ts +42 -2
  57. package/types/acorex-platform-module-common-client.d.ts +5 -1
  58. package/fesm2022/acorex-platform-module-common-client-acorex-platform-module-common-client-Cd7vTe3G.mjs.map +0 -1
  59. package/fesm2022/acorex-platform-module-common-client-audit-info-column.component-DihrUmRM.mjs.map +0 -1
  60. package/fesm2022/acorex-platform-module-common-client-audit-info-edit.component-COMMBgsX.mjs.map +0 -1
  61. package/fesm2022/acorex-platform-module-common-client-audit-info-view.component-UOTT-ir_.mjs.map +0 -1
  62. package/fesm2022/acorex-platform-module-common-client-create-entity-version-draft.command-DLNMbq3M.mjs.map +0 -1
  63. package/fesm2022/acorex-platform-module-common-client-delete-entity-version-draft.command-Dq0zjfak.mjs.map +0 -1
  64. package/fesm2022/acorex-platform-module-common-client-publish-entity-version.command-BtyWjtJj.mjs.map +0 -1
  65. package/fesm2022/acorex-platform-module-common-client-versioning-entity.command.util-CKlJNPHa.mjs.map +0 -1
@@ -0,0 +1,553 @@
1
+ import { AXPFileStorageService } from '@acorex-platform/framework-client/common';
2
+ import { AXPLayoutBuilderService } from '@acorex-platform/framework-client/layout/builder';
3
+ import { AXPEntityDefinitionRegistryService } from '@acorex-platform/framework-client/layout/entity';
4
+ import { AXP_ROW_EXPR_PREFIX } from '@acorex-platform/framework-client/layout/widgets';
5
+ import { pickInputOrOptionsField } from '@acorex-platform/framework-shared/runtime';
6
+ import { AXP_VERSIONING_HOST_OWN_FIELDS, AXPVersioningField, versionCompanionEntityName, AXPVersioningStatus } from '@acorex-platform/module-common-client/contracts';
7
+ import { AXTranslationService } from '@acorex/core/translation';
8
+ import * as i0 from '@angular/core';
9
+ import { inject, Injectable } from '@angular/core';
10
+ import { isEmpty } from 'lodash';
11
+ import { A as AXPVersioningEntityCommandHelper, n as normalizeVersioningInput } from './acorex-platform-module-common-client-versioning-entity.command.util-Bibv8EgV.mjs';
12
+
13
+ //#region ----- Imports -----
14
+ //#endregion
15
+ //#region ----- Constants -----
16
+ const STRUCTURAL_FIELDS = new Set([
17
+ 'id',
18
+ 'parentId',
19
+ 'refType',
20
+ 'refId',
21
+ 'scopeInfo',
22
+ 'stateInfo',
23
+ 'auditInfo',
24
+ 'statusId',
25
+ 'metaDataForm',
26
+ ]);
27
+ const VERSION_HISTORY_MODIFIED_BY = '_modifiedBy';
28
+ const VERSION_HISTORY_MODIFIED_AT = '_modifiedAt';
29
+ const FILE_PROPERTY_NAMES = new Set(['fileInfo', 'file']);
30
+ //#endregion
31
+ //#region ----- Property filters -----
32
+ function isFileVersionHistoryProperty(property) {
33
+ if (FILE_PROPERTY_NAMES.has(property.name)) {
34
+ return true;
35
+ }
36
+ return property.schema?.interface?.type === 'attachments';
37
+ }
38
+ function isHiddenProperty(property) {
39
+ return property.schema?.visible === false;
40
+ }
41
+ function isExcludedProperty(property) {
42
+ if (isHiddenProperty(property)) {
43
+ return true;
44
+ }
45
+ if (STRUCTURAL_FIELDS.has(property.name)) {
46
+ return true;
47
+ }
48
+ if (AXP_VERSIONING_HOST_OWN_FIELDS.has(property.name)) {
49
+ return true;
50
+ }
51
+ if (property.name === AXPVersioningField.SourceId) {
52
+ return true;
53
+ }
54
+ if (isFileVersionHistoryProperty(property)) {
55
+ return true;
56
+ }
57
+ return false;
58
+ }
59
+ function columnKindForProperty(property) {
60
+ if (property.name === AXPVersioningField.VersioningStatus) {
61
+ return 'status';
62
+ }
63
+ const dataType = String(property.schema?.dataType ?? '').toLowerCase();
64
+ if (dataType === 'date' || dataType === 'datetime' || dataType === 'time') {
65
+ return 'date';
66
+ }
67
+ if (dataType === 'boolean') {
68
+ return 'boolean';
69
+ }
70
+ return 'text';
71
+ }
72
+ function columnWidthFor(property, kind) {
73
+ if (property.name === AXPVersioningField.VersionNumber) {
74
+ return '110px';
75
+ }
76
+ if (kind === 'status') {
77
+ return '130px';
78
+ }
79
+ if (kind === 'date') {
80
+ return '160px';
81
+ }
82
+ if (kind === 'boolean') {
83
+ return '110px';
84
+ }
85
+ return '180px';
86
+ }
87
+ //#endregion
88
+ //#region ----- Metadata -----
89
+ function asRecord(value) {
90
+ if (!value || typeof value !== 'object' || Array.isArray(value)) {
91
+ return null;
92
+ }
93
+ return value;
94
+ }
95
+ function flattenMetadataForm(value) {
96
+ const record = asRecord(value);
97
+ if (!record || Array.isArray(record['groups'])) {
98
+ return {};
99
+ }
100
+ const flattened = {};
101
+ for (const [key, nested] of Object.entries(record)) {
102
+ if (!key || key === 'id' || key === 'groups') {
103
+ continue;
104
+ }
105
+ const nestedRecord = asRecord(nested);
106
+ if (nestedRecord && 'value' in nestedRecord) {
107
+ flattened[key] = nestedRecord['value'];
108
+ continue;
109
+ }
110
+ flattened[key] = nested;
111
+ }
112
+ return flattened;
113
+ }
114
+ function collectMetadataFieldTitles(rows) {
115
+ const titles = new Map();
116
+ for (const row of rows) {
117
+ const documentType = asRecord(row['documentType']);
118
+ const metaDataList = asRecord(documentType?.['metaDataList']);
119
+ const groups = metaDataList?.['groups'];
120
+ if (!Array.isArray(groups)) {
121
+ continue;
122
+ }
123
+ for (const group of groups) {
124
+ const groupRecord = asRecord(group);
125
+ const fields = groupRecord?.['fields'];
126
+ if (!Array.isArray(fields)) {
127
+ continue;
128
+ }
129
+ for (const field of fields) {
130
+ const fieldRecord = asRecord(field);
131
+ const name = String(fieldRecord?.['name'] ?? '').trim();
132
+ if (!name || titles.has(name)) {
133
+ continue;
134
+ }
135
+ const title = fieldRecord?.['title'];
136
+ if (typeof title === 'string' && title.trim()) {
137
+ titles.set(name, title.trim());
138
+ }
139
+ }
140
+ }
141
+ }
142
+ return titles;
143
+ }
144
+ function metadataColumnName(fieldName) {
145
+ return `meta:${fieldName}`;
146
+ }
147
+ //#endregion
148
+ //#region ----- Columns -----
149
+ function collectVersionHistoryColumns(entity, rows) {
150
+ const columns = [];
151
+ const properties = entity.properties ?? [];
152
+ const pinned = new Set([AXPVersioningField.VersionNumber, AXPVersioningField.VersioningStatus]);
153
+ columns.push({
154
+ name: AXPVersioningField.VersionNumber,
155
+ title: '@general:versioning.fields.version.title',
156
+ kind: 'text',
157
+ width: '110px',
158
+ });
159
+ const versionStatus = properties.find((property) => property.name === AXPVersioningField.VersioningStatus);
160
+ columns.push({
161
+ name: AXPVersioningField.VersioningStatus,
162
+ title: versionStatus?.title ?? '@general:versioning.fields.versioning-status.title',
163
+ kind: 'status',
164
+ width: '130px',
165
+ });
166
+ columns.push({
167
+ name: VERSION_HISTORY_MODIFIED_BY,
168
+ title: '@general:versioning.history.modified-by.title',
169
+ kind: 'text',
170
+ width: '160px',
171
+ });
172
+ columns.push({
173
+ name: VERSION_HISTORY_MODIFIED_AT,
174
+ title: '@general:versioning.history.modified-at.title',
175
+ kind: 'date',
176
+ width: '180px',
177
+ });
178
+ for (const property of properties) {
179
+ if (pinned.has(property.name) || isExcludedProperty(property)) {
180
+ continue;
181
+ }
182
+ const kind = columnKindForProperty(property);
183
+ columns.push({
184
+ name: property.name,
185
+ title: property.title,
186
+ kind,
187
+ width: columnWidthFor(property, kind),
188
+ });
189
+ }
190
+ const metadataTitles = collectMetadataFieldTitles(rows);
191
+ const metadataKeys = new Set(metadataTitles.keys());
192
+ for (const row of rows) {
193
+ for (const key of Object.keys(flattenMetadataForm(row['metaDataForm']))) {
194
+ metadataKeys.add(key);
195
+ }
196
+ }
197
+ for (const fieldName of metadataKeys) {
198
+ columns.push({
199
+ name: metadataColumnName(fieldName),
200
+ title: metadataTitles.get(fieldName) ?? fieldName,
201
+ kind: 'text',
202
+ width: '160px',
203
+ });
204
+ }
205
+ const hasFileProperty = properties.some((property) => isFileVersionHistoryProperty(property));
206
+ const hasFileValue = rows.some((row) => row['fileInfo'] != null || row['file'] != null);
207
+ if (hasFileProperty || hasFileValue) {
208
+ columns.push({
209
+ name: '_file',
210
+ title: '@general:versioning.history.file.title',
211
+ kind: 'file',
212
+ width: '180px',
213
+ });
214
+ }
215
+ return columns;
216
+ }
217
+ function resolveVersionModifiedAudit(row) {
218
+ const audit = asRecord(row['auditInfo']);
219
+ const updated = asRecord(audit?.['updated']);
220
+ if (!updated) {
221
+ return null;
222
+ }
223
+ return { by: updated['by'], at: updated['at'] };
224
+ }
225
+ function formatVersionModifiedUser(user) {
226
+ if (!user || typeof user !== 'object' || Array.isArray(user)) {
227
+ return '';
228
+ }
229
+ const record = user;
230
+ const fullName = typeof record['fullName'] === 'string' ? record['fullName'].trim() : '';
231
+ if (fullName) {
232
+ return fullName;
233
+ }
234
+ const username = typeof record['username'] === 'string' ? record['username'].trim() : '';
235
+ if (username) {
236
+ return username;
237
+ }
238
+ const id = typeof record['id'] === 'string' ? record['id'].trim() : '';
239
+ return id;
240
+ }
241
+ function resolveVersionFileInfo(row) {
242
+ return row['fileInfo'] ?? row['file'];
243
+ }
244
+ function metadataColumnFieldName(columnName) {
245
+ return columnName.startsWith('meta:') ? columnName.slice('meta:'.length) : null;
246
+ }
247
+ //#endregion
248
+
249
+ //#region ----- Types -----
250
+ //#endregion
251
+ //#region ----- File id / name -----
252
+ function asFileLike(value) {
253
+ if (!value || typeof value !== 'object' || Array.isArray(value)) {
254
+ return null;
255
+ }
256
+ return value;
257
+ }
258
+ function resolveVersionStorageFileId(fileInfo) {
259
+ if (!fileInfo) {
260
+ return undefined;
261
+ }
262
+ if (typeof fileInfo === 'string') {
263
+ const trimmed = fileInfo.replace(/^file:/, '').trim();
264
+ return trimmed || undefined;
265
+ }
266
+ const item = asFileLike(fileInfo);
267
+ if (!item) {
268
+ return undefined;
269
+ }
270
+ if (item.source?.kind === 'fileId' && typeof item.source.value === 'string') {
271
+ const storedId = item.source.value.replace(/^file:/, '').trim();
272
+ return storedId || undefined;
273
+ }
274
+ if (item.source?.kind === 'blob') {
275
+ return undefined;
276
+ }
277
+ if (typeof item.id === 'string' && item.id.trim()) {
278
+ return item.id.replace(/^file:/, '').trim() || undefined;
279
+ }
280
+ return undefined;
281
+ }
282
+ function resolveVersionFileName(fileInfo, fallback) {
283
+ const item = asFileLike(fileInfo);
284
+ if (typeof item?.name === 'string' && item.name.trim()) {
285
+ return item.name.trim();
286
+ }
287
+ if (typeof item?.title === 'string' && item.title.trim()) {
288
+ return item.title.trim();
289
+ }
290
+ if (typeof fallback === 'string' && fallback.trim()) {
291
+ return fallback.trim();
292
+ }
293
+ return 'download';
294
+ }
295
+ //#endregion
296
+
297
+ //#region ----- Imports -----
298
+ //#endregion
299
+ //#region ----- Command -----
300
+ class AXPShowEntityVersionHistoryCommand {
301
+ constructor() {
302
+ //#region ----- Services & Dependencies -----
303
+ this.layoutBuilder = inject(AXPLayoutBuilderService);
304
+ this.helper = inject(AXPVersioningEntityCommandHelper);
305
+ this.entityRegistry = inject(AXPEntityDefinitionRegistryService);
306
+ this.translationService = inject(AXTranslationService);
307
+ this.fileStorage = inject(AXPFileStorageService);
308
+ }
309
+ //#endregion
310
+ //#region ----- Command Implementation -----
311
+ async execute(input) {
312
+ const context = normalizeVersioningInput(input);
313
+ const refId = context?.refId ?? pickInputOrOptionsField(input, 'refId');
314
+ const refType = context?.refType ?? pickInputOrOptionsField(input, 'refType');
315
+ if (!refId || !refType) {
316
+ return {
317
+ success: false,
318
+ message: {
319
+ text: await this.translationService.translateAsync('@general:messages.entity.invalid-data'),
320
+ },
321
+ };
322
+ }
323
+ try {
324
+ const { rows, columns } = await this.loadHistory(refId, refType);
325
+ await this.openHistoryDialog(rows, columns);
326
+ }
327
+ catch (error) {
328
+ await this.helper.showErrorToastFor(error, '@general:messages.generic.error.description');
329
+ return {
330
+ success: false,
331
+ message: {
332
+ text: await this.translationService.translateAsync('@general:messages.generic.error.description'),
333
+ },
334
+ };
335
+ }
336
+ return {
337
+ success: true,
338
+ kind: 'object',
339
+ data: undefined,
340
+ metadata: { refresh: false },
341
+ };
342
+ }
343
+ //#endregion
344
+ //#region ----- Dialog -----
345
+ async openHistoryDialog(rows, columns) {
346
+ const dialogTitle = await this.translationService.translateAsync('@general:actions.versioning.show-history.title');
347
+ const listColumns = this.toListColumns(columns);
348
+ const hasAnyFile = rows.some((row) => row.hasFile);
349
+ await this.layoutBuilder
350
+ .create()
351
+ .dialog((dialog) => {
352
+ dialog.setTitle(dialogTitle).setSize('lg').setCloseButton(true);
353
+ if (isEmpty(rows)) {
354
+ dialog.setMessage('@general:versioning.history.empty');
355
+ return;
356
+ }
357
+ dialog.content((layout) => {
358
+ layout.list((list) => {
359
+ list
360
+ .setDataSource(rows)
361
+ .setColumns(listColumns)
362
+ .setPaging(true)
363
+ .setShowHeader(true)
364
+ .setAllowSelection(false)
365
+ .setMinHeight(360);
366
+ if (!hasAnyFile) {
367
+ return;
368
+ }
369
+ list
370
+ .setPrimaryCommands([
371
+ {
372
+ name: 'download',
373
+ text: '@general:actions.download.title',
374
+ icon: 'fa-light fa-download',
375
+ hidden: `${AXP_ROW_EXPR_PREFIX}{{ !context.eval("hasFile") }}`,
376
+ },
377
+ ])
378
+ .setOnRowCommand(async (event) => {
379
+ const name = event?.name;
380
+ const row = event?.data;
381
+ if (name !== 'download' || !row) {
382
+ return;
383
+ }
384
+ await this.downloadVersionFile(row);
385
+ });
386
+ });
387
+ });
388
+ })
389
+ .show();
390
+ }
391
+ //#endregion
392
+ //#region ----- Data Loading -----
393
+ async loadHistory(refId, refType) {
394
+ const companionEntity = versionCompanionEntityName(refType);
395
+ const [moduleName, entityName] = companionEntity.split('.');
396
+ const entity = await this.entityRegistry.resolve(moduleName, entityName);
397
+ const companions = await this.helper.listCompanions(companionEntity, refId);
398
+ const sourceRows = companions.map((item) => item);
399
+ const columns = collectVersionHistoryColumns(entity, sourceRows);
400
+ const rows = [];
401
+ for (const row of sourceRows) {
402
+ rows.push(await this.mapRow(row, columns));
403
+ }
404
+ return { rows, columns };
405
+ }
406
+ async mapRow(row, columns) {
407
+ const fileInfo = resolveVersionFileInfo(row);
408
+ const versioningStatus = typeof row['versioningStatus'] === 'string' ? row['versioningStatus'] : undefined;
409
+ const mapped = {
410
+ id: String(row['id'] ?? ''),
411
+ versioningStatus,
412
+ statusLabel: versioningStatus
413
+ ? await this.translationService.translateAsync(this.statusTextKey(versioningStatus))
414
+ : '',
415
+ hasFile: fileInfo != null && resolveVersionStorageFileId(fileInfo) != null,
416
+ fileInfo,
417
+ fileName: resolveVersionFileName(fileInfo, await this.displayText(row['title'] ?? row['name'])),
418
+ };
419
+ const metadata = flattenMetadataForm(row['metaDataForm']);
420
+ const modifiedAudit = resolveVersionModifiedAudit(row);
421
+ mapped[VERSION_HISTORY_MODIFIED_BY] = formatVersionModifiedUser(modifiedAudit?.by);
422
+ mapped[VERSION_HISTORY_MODIFIED_AT] = this.asDateValue(modifiedAudit?.at);
423
+ for (const column of columns) {
424
+ if (column.kind === 'file' || column.kind === 'status') {
425
+ continue;
426
+ }
427
+ if (column.name === VERSION_HISTORY_MODIFIED_BY || column.name === VERSION_HISTORY_MODIFIED_AT) {
428
+ continue;
429
+ }
430
+ const metadataField = metadataColumnFieldName(column.name);
431
+ const raw = metadataField ? metadata[metadataField] : row[column.name];
432
+ mapped[column.name] = column.kind === 'date' ? this.asDateValue(raw) : await this.displayText(raw);
433
+ }
434
+ return mapped;
435
+ }
436
+ //#endregion
437
+ //#region ----- File Download -----
438
+ async downloadVersionFile(row) {
439
+ const fileId = resolveVersionStorageFileId(row.fileInfo);
440
+ const fileName = row.fileName ?? resolveVersionFileName(row.fileInfo);
441
+ if (!fileId) {
442
+ await this.helper.showErrorToastFor({ code: 'NOT_FOUND' }, '@general:versioning.history.file-unavailable');
443
+ return;
444
+ }
445
+ try {
446
+ const blob = await this.fileStorage.download(fileId);
447
+ const url = URL.createObjectURL(blob);
448
+ const link = document.createElement('a');
449
+ link.href = url;
450
+ link.download = fileName;
451
+ document.body.appendChild(link);
452
+ link.click();
453
+ document.body.removeChild(link);
454
+ URL.revokeObjectURL(url);
455
+ }
456
+ catch (error) {
457
+ await this.helper.showErrorToastFor(error, '@general:versioning.history.file-unavailable');
458
+ }
459
+ }
460
+ //#endregion
461
+ //#region ----- Display Helpers -----
462
+ toListColumns(columns) {
463
+ return columns.map((column) => {
464
+ if (column.kind === 'status') {
465
+ return {
466
+ name: column.name,
467
+ title: column.title,
468
+ width: column.width,
469
+ widget: { type: 'text-editor', path: 'statusLabel', options: { readOnly: true } },
470
+ };
471
+ }
472
+ if (column.kind === 'file') {
473
+ return {
474
+ name: column.name,
475
+ title: column.title,
476
+ width: column.width,
477
+ widget: { type: 'text-editor', path: 'fileName', options: { readOnly: true } },
478
+ };
479
+ }
480
+ if (column.kind === 'date') {
481
+ return {
482
+ name: column.name,
483
+ title: column.title,
484
+ width: column.width,
485
+ widget: {
486
+ type: 'date-time-editor',
487
+ path: column.name,
488
+ options: { format: 'datetime', readOnly: true },
489
+ },
490
+ };
491
+ }
492
+ return {
493
+ name: column.name,
494
+ title: column.title,
495
+ width: column.width,
496
+ widget: { type: 'text-editor', path: column.name, options: { readOnly: true } },
497
+ };
498
+ });
499
+ }
500
+ statusTextKey(status) {
501
+ return status === AXPVersioningStatus.Draft
502
+ ? '@general:versioning.status.draft'
503
+ : '@general:versioning.status.published';
504
+ }
505
+ asDateValue(value) {
506
+ if (value == null || value === '') {
507
+ return '';
508
+ }
509
+ if (value instanceof Date) {
510
+ return Number.isNaN(value.getTime()) ? '' : value;
511
+ }
512
+ const date = new Date(String(value));
513
+ return Number.isNaN(date.getTime()) ? '' : date;
514
+ }
515
+ async displayText(value) {
516
+ if (value == null || value === '') {
517
+ return '';
518
+ }
519
+ if (typeof value === 'boolean') {
520
+ return await this.translationService.translateAsync(value === true ? '@general:widgets.toggle.yes' : '@general:widgets.toggle.no');
521
+ }
522
+ if (typeof value === 'number') {
523
+ return String(value);
524
+ }
525
+ if (typeof value === 'string') {
526
+ if (value.startsWith('@')) {
527
+ return await this.translationService.translateAsync(value);
528
+ }
529
+ return this.translationService.resolve(value) ?? value;
530
+ }
531
+ if (typeof value === 'object') {
532
+ const resolved = this.translationService.resolve(value);
533
+ if (typeof resolved === 'string' && resolved.trim()) {
534
+ return resolved;
535
+ }
536
+ const record = value;
537
+ const title = record['title'] ?? record['name'] ?? record['text'];
538
+ if (title != null) {
539
+ return await this.displayText(title);
540
+ }
541
+ }
542
+ return '';
543
+ }
544
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPShowEntityVersionHistoryCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
545
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPShowEntityVersionHistoryCommand, providedIn: 'root' }); }
546
+ }
547
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPShowEntityVersionHistoryCommand, decorators: [{
548
+ type: Injectable,
549
+ args: [{ providedIn: 'root' }]
550
+ }] });
551
+
552
+ export { AXPShowEntityVersionHistoryCommand };
553
+ //# sourceMappingURL=acorex-platform-module-common-client-show-entity-version-history.command-CoFbuUYP.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-common-client-show-entity-version-history.command-CoFbuUYP.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/versioning-plugin/components/version-history-popup/version-history-columns.util.ts","../../../../libs/modules/common/client/src/lib/features/versioning-plugin/components/version-history-popup/version-history-file.util.ts","../../../../libs/modules/common/client/src/lib/features/versioning-plugin/commands/show-entity-version-history.command.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport type { AXPEntity, AXPEntityProperty } from '@acorex-platform/framework-shared/entity';\nimport {\n AXP_VERSIONING_HOST_OWN_FIELDS,\n AXPVersioningField,\n} from '@acorex-platform/module-common-client/contracts';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport type AXPVersionHistoryColumnKind = 'text' | 'status' | 'file' | 'date' | 'boolean';\n\nexport interface AXPVersionHistoryColumn {\n name: string;\n title: string;\n kind: AXPVersionHistoryColumnKind;\n width?: string;\n}\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst STRUCTURAL_FIELDS = new Set<string>([\n 'id',\n 'parentId',\n 'refType',\n 'refId',\n 'scopeInfo',\n 'stateInfo',\n 'auditInfo',\n 'statusId',\n 'metaDataForm',\n]);\n\nexport const VERSION_HISTORY_MODIFIED_BY = '_modifiedBy';\nexport const VERSION_HISTORY_MODIFIED_AT = '_modifiedAt';\n\nconst FILE_PROPERTY_NAMES = new Set(['fileInfo', 'file']);\n\n//#endregion\n\n//#region ----- Property filters -----\n\nexport function isFileVersionHistoryProperty(property: AXPEntityProperty): boolean {\n if (FILE_PROPERTY_NAMES.has(property.name)) {\n return true;\n }\n return property.schema?.interface?.type === 'attachments';\n}\n\nfunction isHiddenProperty(property: AXPEntityProperty): boolean {\n return property.schema?.visible === false;\n}\n\nfunction isExcludedProperty(property: AXPEntityProperty): boolean {\n if (isHiddenProperty(property)) {\n return true;\n }\n if (STRUCTURAL_FIELDS.has(property.name)) {\n return true;\n }\n if (AXP_VERSIONING_HOST_OWN_FIELDS.has(property.name)) {\n return true;\n }\n if (property.name === AXPVersioningField.SourceId) {\n return true;\n }\n if (isFileVersionHistoryProperty(property)) {\n return true;\n }\n return false;\n}\n\nfunction columnKindForProperty(property: AXPEntityProperty): AXPVersionHistoryColumnKind {\n if (property.name === AXPVersioningField.VersioningStatus) {\n return 'status';\n }\n const dataType = String(property.schema?.dataType ?? '').toLowerCase();\n if (dataType === 'date' || dataType === 'datetime' || dataType === 'time') {\n return 'date';\n }\n if (dataType === 'boolean') {\n return 'boolean';\n }\n return 'text';\n}\n\nfunction columnWidthFor(property: AXPEntityProperty, kind: AXPVersionHistoryColumnKind): string | undefined {\n if (property.name === AXPVersioningField.VersionNumber) {\n return '110px';\n }\n if (kind === 'status') {\n return '130px';\n }\n if (kind === 'date') {\n return '160px';\n }\n if (kind === 'boolean') {\n return '110px';\n }\n return '180px';\n}\n\n//#endregion\n\n//#region ----- Metadata -----\n\nfunction asRecord(value: unknown): Record<string, unknown> | null {\n if (!value || typeof value !== 'object' || Array.isArray(value)) {\n return null;\n }\n return value as Record<string, unknown>;\n}\n\nexport function flattenMetadataForm(value: unknown): Record<string, unknown> {\n const record = asRecord(value);\n if (!record || Array.isArray(record['groups'])) {\n return {};\n }\n const flattened: Record<string, unknown> = {};\n for (const [key, nested] of Object.entries(record)) {\n if (!key || key === 'id' || key === 'groups') {\n continue;\n }\n const nestedRecord = asRecord(nested);\n if (nestedRecord && 'value' in nestedRecord) {\n flattened[key] = nestedRecord['value'];\n continue;\n }\n flattened[key] = nested;\n }\n return flattened;\n}\n\nexport function collectMetadataFieldTitles(rows: Array<Record<string, unknown>>): Map<string, string> {\n const titles = new Map<string, string>();\n for (const row of rows) {\n const documentType = asRecord(row['documentType']);\n const metaDataList = asRecord(documentType?.['metaDataList']);\n const groups = metaDataList?.['groups'];\n if (!Array.isArray(groups)) {\n continue;\n }\n for (const group of groups) {\n const groupRecord = asRecord(group);\n const fields = groupRecord?.['fields'];\n if (!Array.isArray(fields)) {\n continue;\n }\n for (const field of fields) {\n const fieldRecord = asRecord(field);\n const name = String(fieldRecord?.['name'] ?? '').trim();\n if (!name || titles.has(name)) {\n continue;\n }\n const title = fieldRecord?.['title'];\n if (typeof title === 'string' && title.trim()) {\n titles.set(name, title.trim());\n }\n }\n }\n }\n return titles;\n}\n\nfunction metadataColumnName(fieldName: string): string {\n return `meta:${fieldName}`;\n}\n\n//#endregion\n\n//#region ----- Columns -----\n\nexport function collectVersionHistoryColumns(\n entity: AXPEntity,\n rows: Array<Record<string, unknown>>,\n): AXPVersionHistoryColumn[] {\n const columns: AXPVersionHistoryColumn[] = [];\n const properties = entity.properties ?? [];\n const pinned = new Set<string>([AXPVersioningField.VersionNumber, AXPVersioningField.VersioningStatus]);\n\n columns.push({\n name: AXPVersioningField.VersionNumber,\n title: '@general:versioning.fields.version.title',\n kind: 'text',\n width: '110px',\n });\n\n const versionStatus = properties.find((property) => property.name === AXPVersioningField.VersioningStatus);\n columns.push({\n name: AXPVersioningField.VersioningStatus,\n title: versionStatus?.title ?? '@general:versioning.fields.versioning-status.title',\n kind: 'status',\n width: '130px',\n });\n\n columns.push({\n name: VERSION_HISTORY_MODIFIED_BY,\n title: '@general:versioning.history.modified-by.title',\n kind: 'text',\n width: '160px',\n });\n columns.push({\n name: VERSION_HISTORY_MODIFIED_AT,\n title: '@general:versioning.history.modified-at.title',\n kind: 'date',\n width: '180px',\n });\n\n for (const property of properties) {\n if (pinned.has(property.name) || isExcludedProperty(property)) {\n continue;\n }\n const kind = columnKindForProperty(property);\n columns.push({\n name: property.name,\n title: property.title,\n kind,\n width: columnWidthFor(property, kind),\n });\n }\n\n const metadataTitles = collectMetadataFieldTitles(rows);\n const metadataKeys = new Set<string>(metadataTitles.keys());\n for (const row of rows) {\n for (const key of Object.keys(flattenMetadataForm(row['metaDataForm']))) {\n metadataKeys.add(key);\n }\n }\n for (const fieldName of metadataKeys) {\n columns.push({\n name: metadataColumnName(fieldName),\n title: metadataTitles.get(fieldName) ?? fieldName,\n kind: 'text',\n width: '160px',\n });\n }\n\n const hasFileProperty = properties.some((property) => isFileVersionHistoryProperty(property));\n const hasFileValue = rows.some((row) => row['fileInfo'] != null || row['file'] != null);\n if (hasFileProperty || hasFileValue) {\n columns.push({\n name: '_file',\n title: '@general:versioning.history.file.title',\n kind: 'file',\n width: '180px',\n });\n }\n\n return columns;\n}\n\nexport function resolveVersionModifiedAudit(row: Record<string, unknown>): {\n by?: unknown;\n at?: unknown;\n} | null {\n const audit = asRecord(row['auditInfo']);\n const updated = asRecord(audit?.['updated']);\n if (!updated) {\n return null;\n }\n return { by: updated['by'], at: updated['at'] };\n}\n\nexport function formatVersionModifiedUser(user: unknown): string {\n if (!user || typeof user !== 'object' || Array.isArray(user)) {\n return '';\n }\n const record = user as Record<string, unknown>;\n const fullName = typeof record['fullName'] === 'string' ? record['fullName'].trim() : '';\n if (fullName) {\n return fullName;\n }\n const username = typeof record['username'] === 'string' ? record['username'].trim() : '';\n if (username) {\n return username;\n }\n const id = typeof record['id'] === 'string' ? record['id'].trim() : '';\n return id;\n}\n\nexport function resolveVersionFileInfo(row: Record<string, unknown>): unknown {\n return row['fileInfo'] ?? row['file'];\n}\n\nexport function metadataColumnFieldName(columnName: string): string | null {\n return columnName.startsWith('meta:') ? columnName.slice('meta:'.length) : null;\n}\n\n//#endregion\n","//#region ----- Types -----\n\ntype FileSource = {\n kind?: string;\n value?: unknown;\n};\n\ntype FileLike = {\n id?: unknown;\n name?: unknown;\n title?: unknown;\n source?: FileSource;\n};\n\n//#endregion\n\n//#region ----- File id / name -----\n\nfunction asFileLike(value: unknown): FileLike | null {\n if (!value || typeof value !== 'object' || Array.isArray(value)) {\n return null;\n }\n return value as FileLike;\n}\n\nexport function resolveVersionStorageFileId(fileInfo: unknown): string | undefined {\n if (!fileInfo) {\n return undefined;\n }\n if (typeof fileInfo === 'string') {\n const trimmed = fileInfo.replace(/^file:/, '').trim();\n return trimmed || undefined;\n }\n const item = asFileLike(fileInfo);\n if (!item) {\n return undefined;\n }\n if (item.source?.kind === 'fileId' && typeof item.source.value === 'string') {\n const storedId = item.source.value.replace(/^file:/, '').trim();\n return storedId || undefined;\n }\n if (item.source?.kind === 'blob') {\n return undefined;\n }\n if (typeof item.id === 'string' && item.id.trim()) {\n return item.id.replace(/^file:/, '').trim() || undefined;\n }\n return undefined;\n}\n\nexport function resolveVersionFileName(fileInfo: unknown, fallback?: string): string {\n const item = asFileLike(fileInfo);\n if (typeof item?.name === 'string' && item.name.trim()) {\n return item.name.trim();\n }\n if (typeof item?.title === 'string' && item.title.trim()) {\n return item.title.trim();\n }\n if (typeof fallback === 'string' && fallback.trim()) {\n return fallback.trim();\n }\n return 'download';\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { AXPFileStorageService } from '@acorex-platform/framework-client/common';\nimport {\n AXPLayoutBuilderService,\n type AXPListWidgetColumn,\n} from '@acorex-platform/framework-client/layout/builder';\nimport { AXPEntityDefinitionRegistryService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXP_ROW_EXPR_PREFIX } from '@acorex-platform/framework-client/layout/widgets';\nimport type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport {\n AXPCommand,\n pickInputOrOptionsField,\n type AXPCommandExecuteResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n AXPVersioningStatus,\n versionCompanionEntityName,\n} from '@acorex-platform/module-common-client/contracts';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { inject, Injectable } from '@angular/core';\nimport { isEmpty } from 'lodash';\n\nimport {\n collectVersionHistoryColumns,\n flattenMetadataForm,\n formatVersionModifiedUser,\n metadataColumnFieldName,\n resolveVersionFileInfo,\n resolveVersionModifiedAudit,\n VERSION_HISTORY_MODIFIED_AT,\n VERSION_HISTORY_MODIFIED_BY,\n type AXPVersionHistoryColumn,\n} from '../components/version-history-popup/version-history-columns.util';\nimport {\n resolveVersionFileName,\n resolveVersionStorageFileId,\n} from '../components/version-history-popup/version-history-file.util';\nimport { AXPVersioningEntityCommandHelper } from './versioning-entity.command.helper';\nimport { normalizeVersioningInput } from './versioning-entity.command.util';\n\n//#endregion\n\n//#region ----- Types -----\n\ninterface VersionHistoryListRow {\n id: string;\n versioningStatus?: string;\n statusLabel?: string;\n hasFile: boolean;\n fileInfo?: unknown;\n fileName?: string;\n [field: string]: unknown;\n}\n\n//#endregion\n\n//#region ----- Command -----\n\n@Injectable({ providedIn: 'root' })\nexport class AXPShowEntityVersionHistoryCommand implements AXPCommand<AXPContextData, void> {\n //#region ----- Services & Dependencies -----\n\n private readonly layoutBuilder = inject(AXPLayoutBuilderService);\n private readonly helper = inject(AXPVersioningEntityCommandHelper);\n private readonly entityRegistry = inject(AXPEntityDefinitionRegistryService);\n private readonly translationService = inject(AXTranslationService);\n private readonly fileStorage = inject(AXPFileStorageService);\n\n //#endregion\n\n //#region ----- Command Implementation -----\n\n async execute(input: AXPContextData): AXPCommandExecuteResultPromise<void> {\n const context = normalizeVersioningInput(input);\n const refId = context?.refId ?? pickInputOrOptionsField<string>(input, 'refId');\n const refType = context?.refType ?? pickInputOrOptionsField<string>(input, 'refType');\n if (!refId || !refType) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.entity.invalid-data'),\n },\n };\n }\n\n try {\n const { rows, columns } = await this.loadHistory(refId, refType);\n await this.openHistoryDialog(rows, columns);\n } catch (error) {\n await this.helper.showErrorToastFor(error, '@general:messages.generic.error.description');\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.generic.error.description'),\n },\n };\n }\n\n return {\n success: true,\n kind: 'object',\n data: undefined,\n metadata: { refresh: false },\n };\n }\n\n //#endregion\n\n //#region ----- Dialog -----\n\n private async openHistoryDialog(\n rows: VersionHistoryListRow[],\n columns: AXPVersionHistoryColumn[],\n ): Promise<void> {\n const dialogTitle = await this.translationService.translateAsync(\n '@general:actions.versioning.show-history.title',\n );\n const listColumns = this.toListColumns(columns);\n const hasAnyFile = rows.some((row) => row.hasFile);\n\n await this.layoutBuilder\n .create()\n .dialog((dialog) => {\n dialog.setTitle(dialogTitle).setSize('lg').setCloseButton(true);\n\n if (isEmpty(rows)) {\n dialog.setMessage('@general:versioning.history.empty');\n return;\n }\n\n dialog.content((layout) => {\n layout.list((list) => {\n list\n .setDataSource(rows)\n .setColumns(listColumns)\n .setPaging(true)\n .setShowHeader(true)\n .setAllowSelection(false)\n .setMinHeight(360);\n\n if (!hasAnyFile) {\n return;\n }\n\n list\n .setPrimaryCommands([\n {\n name: 'download',\n text: '@general:actions.download.title',\n icon: 'fa-light fa-download',\n hidden: `${AXP_ROW_EXPR_PREFIX}{{ !context.eval(\"hasFile\") }}`,\n },\n ])\n .setOnRowCommand(async (event) => {\n const name = event?.name;\n const row = event?.data as VersionHistoryListRow | undefined;\n if (name !== 'download' || !row) {\n return;\n }\n await this.downloadVersionFile(row);\n });\n });\n });\n })\n .show();\n }\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private async loadHistory(\n refId: string,\n refType: string,\n ): Promise<{ rows: VersionHistoryListRow[]; columns: AXPVersionHistoryColumn[] }> {\n const companionEntity = versionCompanionEntityName(refType);\n const [moduleName, entityName] = companionEntity.split('.');\n const entity = await this.entityRegistry.resolve(moduleName, entityName);\n const companions = await this.helper.listCompanions(companionEntity, refId);\n const sourceRows = companions.map((item) => item as unknown as Record<string, unknown>);\n const columns = collectVersionHistoryColumns(entity, sourceRows);\n const rows: VersionHistoryListRow[] = [];\n for (const row of sourceRows) {\n rows.push(await this.mapRow(row, columns));\n }\n return { rows, columns };\n }\n\n private async mapRow(\n row: Record<string, unknown>,\n columns: AXPVersionHistoryColumn[],\n ): Promise<VersionHistoryListRow> {\n const fileInfo = resolveVersionFileInfo(row);\n const versioningStatus =\n typeof row['versioningStatus'] === 'string' ? row['versioningStatus'] : undefined;\n const mapped: VersionHistoryListRow = {\n id: String(row['id'] ?? ''),\n versioningStatus,\n statusLabel: versioningStatus\n ? await this.translationService.translateAsync(this.statusTextKey(versioningStatus))\n : '',\n hasFile: fileInfo != null && resolveVersionStorageFileId(fileInfo) != null,\n fileInfo,\n fileName: resolveVersionFileName(\n fileInfo,\n await this.displayText(row['title'] ?? row['name']),\n ),\n };\n const metadata = flattenMetadataForm(row['metaDataForm']);\n const modifiedAudit = resolveVersionModifiedAudit(row);\n mapped[VERSION_HISTORY_MODIFIED_BY] = formatVersionModifiedUser(modifiedAudit?.by);\n mapped[VERSION_HISTORY_MODIFIED_AT] = this.asDateValue(modifiedAudit?.at);\n for (const column of columns) {\n if (column.kind === 'file' || column.kind === 'status') {\n continue;\n }\n if (column.name === VERSION_HISTORY_MODIFIED_BY || column.name === VERSION_HISTORY_MODIFIED_AT) {\n continue;\n }\n const metadataField = metadataColumnFieldName(column.name);\n const raw = metadataField ? metadata[metadataField] : row[column.name];\n mapped[column.name] = column.kind === 'date' ? this.asDateValue(raw) : await this.displayText(raw);\n }\n return mapped;\n }\n\n //#endregion\n\n //#region ----- File Download -----\n\n private async downloadVersionFile(row: VersionHistoryListRow): Promise<void> {\n const fileId = resolveVersionStorageFileId(row.fileInfo);\n const fileName = row.fileName ?? resolveVersionFileName(row.fileInfo);\n if (!fileId) {\n await this.helper.showErrorToastFor(\n { code: 'NOT_FOUND' },\n '@general:versioning.history.file-unavailable',\n );\n return;\n }\n try {\n const blob = await this.fileStorage.download(fileId);\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = url;\n link.download = fileName;\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n URL.revokeObjectURL(url);\n } catch (error) {\n await this.helper.showErrorToastFor(error, '@general:versioning.history.file-unavailable');\n }\n }\n\n //#endregion\n\n //#region ----- Display Helpers -----\n\n private toListColumns(columns: AXPVersionHistoryColumn[]): AXPListWidgetColumn[] {\n return columns.map((column) => {\n if (column.kind === 'status') {\n return {\n name: column.name,\n title: column.title,\n width: column.width,\n widget: { type: 'text-editor', path: 'statusLabel', options: { readOnly: true } },\n };\n }\n if (column.kind === 'file') {\n return {\n name: column.name,\n title: column.title,\n width: column.width,\n widget: { type: 'text-editor', path: 'fileName', options: { readOnly: true } },\n };\n }\n if (column.kind === 'date') {\n return {\n name: column.name,\n title: column.title,\n width: column.width,\n widget: {\n type: 'date-time-editor',\n path: column.name,\n options: { format: 'datetime', readOnly: true },\n },\n };\n }\n return {\n name: column.name,\n title: column.title,\n width: column.width,\n widget: { type: 'text-editor', path: column.name, options: { readOnly: true } },\n };\n });\n }\n\n private statusTextKey(status: string): string {\n return status === AXPVersioningStatus.Draft\n ? '@general:versioning.status.draft'\n : '@general:versioning.status.published';\n }\n\n private asDateValue(value: unknown): Date | string {\n if (value == null || value === '') {\n return '';\n }\n if (value instanceof Date) {\n return Number.isNaN(value.getTime()) ? '' : value;\n }\n const date = new Date(String(value));\n return Number.isNaN(date.getTime()) ? '' : date;\n }\n\n private async displayText(value: unknown): Promise<string> {\n if (value == null || value === '') {\n return '';\n }\n if (typeof value === 'boolean') {\n return await this.translationService.translateAsync(\n value === true ? '@general:widgets.toggle.yes' : '@general:widgets.toggle.no',\n );\n }\n if (typeof value === 'number') {\n return String(value);\n }\n if (typeof value === 'string') {\n if (value.startsWith('@')) {\n return await this.translationService.translateAsync(value);\n }\n return this.translationService.resolve(value) ?? value;\n }\n if (typeof value === 'object') {\n const resolved = this.translationService.resolve(value as never);\n if (typeof resolved === 'string' && resolved.trim()) {\n return resolved;\n }\n const record = value as Record<string, unknown>;\n const title = record['title'] ?? record['name'] ?? record['text'];\n if (title != null) {\n return await this.displayText(title);\n }\n }\n return '';\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;AAqBA;AAEA;AAEA,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAS;IACxC,IAAI;IACJ,UAAU;IACV,SAAS;IACT,OAAO;IACP,WAAW;IACX,WAAW;IACX,WAAW;IACX,UAAU;IACV,cAAc;AACf,CAAA,CAAC;AAEK,MAAM,2BAA2B,GAAG,aAAa;AACjD,MAAM,2BAA2B,GAAG,aAAa;AAExD,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAEzD;AAEA;AAEM,SAAU,4BAA4B,CAAC,QAA2B,EAAA;IACtE,IAAI,mBAAmB,CAAC,GAAG,CAAC,QAAQ,CAAC,IA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A;kBAD9C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -11,7 +11,7 @@ import { AXPActivityLogComponent } from '@acorex-platform/framework-client/layou
11
11
  import { AXPVersioningService } from '@acorex-platform/framework-client/common';
12
12
  import * as i4 from '@acorex/core/translation';
13
13
  import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
14
- import { v as versionEntriesToActivityLogs, o as openActivityLogVersionCompare } from './acorex-platform-module-common-client-acorex-platform-module-common-client-Cd7vTe3G.mjs';
14
+ import { v as versionEntriesToActivityLogs, o as openActivityLogVersionCompare } from './acorex-platform-module-common-client-acorex-platform-module-common-client-BtSt1xRl.mjs';
15
15
 
16
16
  class AXMTimelineVersionHistoryPopupComponent extends AXBasePageComponent {
17
17
  constructor() {
@@ -60,4 +60,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
60
60
  }] });
61
61
 
62
62
  export { AXMTimelineVersionHistoryPopupComponent };
63
- //# sourceMappingURL=acorex-platform-module-common-client-timeline-version-history-popup.component-CPmN0kme.mjs.map
63
+ //# sourceMappingURL=acorex-platform-module-common-client-timeline-version-history-popup.component-Ap83-gMD.mjs.map