@acorex-platform/module-common-client 1.0.2 → 2.0.0-beta.1

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 (87) hide show
  1. package/README.md +34 -0
  2. package/fesm2022/{acorex-platform-module-common-client-acorex-platform-module-common-client-C_NblzG7.mjs → acorex-platform-module-common-client-acorex-platform-module-common-client-DctPmGJ6.mjs} +4036 -3882
  3. package/fesm2022/acorex-platform-module-common-client-acorex-platform-module-common-client-DctPmGJ6.mjs.map +1 -0
  4. package/fesm2022/{acorex-platform-module-common-client-archive-entity.command-BJi7V9qA.mjs → acorex-platform-module-common-client-archive-entity.command-Cch8STm7.mjs} +3 -3
  5. package/fesm2022/acorex-platform-module-common-client-archive-entity.command-Cch8STm7.mjs.map +1 -0
  6. package/fesm2022/{acorex-platform-module-common-client-archive-entity.command.util-DoXkO9DT.mjs → acorex-platform-module-common-client-archive-entity.command.util-Cy1H1Gn8.mjs} +7 -6
  7. package/fesm2022/acorex-platform-module-common-client-archive-entity.command.util-Cy1H1Gn8.mjs.map +1 -0
  8. package/fesm2022/{acorex-platform-module-common-client-audit-info-column.component-Cn2vJ2qK.mjs → acorex-platform-module-common-client-audit-info-column.component-Lta_QYvp.mjs} +3 -3
  9. package/fesm2022/{acorex-platform-module-common-client-audit-info-column.component-Cn2vJ2qK.mjs.map → acorex-platform-module-common-client-audit-info-column.component-Lta_QYvp.mjs.map} +1 -1
  10. package/fesm2022/{acorex-platform-module-common-client-audit-info-edit.component-aCgPXlef.mjs → acorex-platform-module-common-client-audit-info-edit.component-CQxZaIsN.mjs} +2 -2
  11. package/fesm2022/{acorex-platform-module-common-client-audit-info-edit.component-aCgPXlef.mjs.map → acorex-platform-module-common-client-audit-info-edit.component-CQxZaIsN.mjs.map} +1 -1
  12. package/fesm2022/{acorex-platform-module-common-client-audit-info-view.component-lgzqcHCv.mjs → acorex-platform-module-common-client-audit-info-view.component-BAHOvZvl.mjs} +2 -2
  13. package/fesm2022/{acorex-platform-module-common-client-audit-info-view.component-lgzqcHCv.mjs.map → acorex-platform-module-common-client-audit-info-view.component-BAHOvZvl.mjs.map} +1 -1
  14. package/fesm2022/{acorex-platform-module-common-client-audit-info.util-CUlUTX8l.mjs → acorex-platform-module-common-client-audit-info.util-DG-xYAal.mjs} +1 -1
  15. package/fesm2022/{acorex-platform-module-common-client-audit-info.util-CUlUTX8l.mjs.map → acorex-platform-module-common-client-audit-info.util-DG-xYAal.mjs.map} +1 -1
  16. package/fesm2022/{acorex-platform-module-common-client-bulk-archive-entity.command-DPFiA8I2.mjs → acorex-platform-module-common-client-bulk-archive-entity.command-CZgAvnBe.mjs} +4 -2
  17. package/fesm2022/acorex-platform-module-common-client-bulk-archive-entity.command-CZgAvnBe.mjs.map +1 -0
  18. package/fesm2022/{acorex-platform-module-common-client-bulk-disable-entity.command-DgoZVXQA.mjs → acorex-platform-module-common-client-bulk-disable-entity.command-Bh-kJscd.mjs} +4 -2
  19. package/fesm2022/acorex-platform-module-common-client-bulk-disable-entity.command-Bh-kJscd.mjs.map +1 -0
  20. package/fesm2022/{acorex-platform-module-common-client-bulk-enable-entity.command-C6fba__g.mjs → acorex-platform-module-common-client-bulk-enable-entity.command-CEeSvggU.mjs} +4 -2
  21. package/fesm2022/acorex-platform-module-common-client-bulk-enable-entity.command-CEeSvggU.mjs.map +1 -0
  22. package/fesm2022/{acorex-platform-module-common-client-bulk-restore-archive-entity.command-C2BTAz4o.mjs → acorex-platform-module-common-client-bulk-restore-archive-entity.command-fqb5ArcI.mjs} +4 -2
  23. package/fesm2022/acorex-platform-module-common-client-bulk-restore-archive-entity.command-fqb5ArcI.mjs.map +1 -0
  24. package/fesm2022/{acorex-platform-module-common-client-clone-entity.command-BVzVgOEh.mjs → acorex-platform-module-common-client-clone-entity.command-B6Qh3-Dc.mjs} +2 -2
  25. package/fesm2022/{acorex-platform-module-common-client-clone-entity.command-BVzVgOEh.mjs.map → acorex-platform-module-common-client-clone-entity.command-B6Qh3-Dc.mjs.map} +1 -1
  26. package/fesm2022/acorex-platform-module-common-client-contracts-entities-record-lock.mjs +1 -1
  27. package/fesm2022/acorex-platform-module-common-client-contracts-entities-record-lock.mjs.map +1 -1
  28. package/fesm2022/acorex-platform-module-common-client-contracts-entities-version-entry.mjs +12 -1
  29. package/fesm2022/acorex-platform-module-common-client-contracts-entities-version-entry.mjs.map +1 -1
  30. package/fesm2022/acorex-platform-module-common-client-contracts-entities-version-stream.mjs +6 -1
  31. package/fesm2022/acorex-platform-module-common-client-contracts-entities-version-stream.mjs.map +1 -1
  32. package/fesm2022/{acorex-platform-module-common-client-contracts-entity-catalog-acorex-platform-module-common-client-contracts-entity-catalog-8_tVyorm.mjs → acorex-platform-module-common-client-contracts-entity-catalog-acorex-platform-module-common-client-contracts-entity-catalog-DXSFzx6y.mjs} +4 -4
  33. package/fesm2022/{acorex-platform-module-common-client-contracts-entity-catalog-acorex-platform-module-common-client-contracts-entity-catalog-8_tVyorm.mjs.map → acorex-platform-module-common-client-contracts-entity-catalog-acorex-platform-module-common-client-contracts-entity-catalog-DXSFzx6y.mjs.map} +1 -1
  34. package/fesm2022/{acorex-platform-module-common-client-contracts-entity-catalog-record-lock.entity-DLA5qjPs.mjs → acorex-platform-module-common-client-contracts-entity-catalog-record-lock.entity-B1DYeWEA.mjs} +3 -3
  35. package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-record-lock.entity-B1DYeWEA.mjs.map +1 -0
  36. package/fesm2022/{acorex-platform-module-common-client-contracts-entity-catalog-version-entry.entity-C07SlyK0.mjs → acorex-platform-module-common-client-contracts-entity-catalog-version-entry.entity-CrkyGd48.mjs} +14 -3
  37. package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-version-entry.entity-CrkyGd48.mjs.map +1 -0
  38. package/fesm2022/{acorex-platform-module-common-client-contracts-entity-catalog-version-stream.entity-C7LJK2Gt.mjs → acorex-platform-module-common-client-contracts-entity-catalog-version-stream.entity-Bg87yGRN.mjs} +8 -3
  39. package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-version-stream.entity-Bg87yGRN.mjs.map +1 -0
  40. package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog.mjs +1 -1
  41. package/fesm2022/acorex-platform-module-common-client-contracts.mjs +20 -9
  42. package/fesm2022/acorex-platform-module-common-client-contracts.mjs.map +1 -1
  43. package/fesm2022/{acorex-platform-module-common-client-create-entity-version-draft.command-CbLI7jvZ.mjs → acorex-platform-module-common-client-create-entity-version-draft.command-BSEut8OA.mjs} +2 -2
  44. package/fesm2022/{acorex-platform-module-common-client-create-entity-version-draft.command-CbLI7jvZ.mjs.map → acorex-platform-module-common-client-create-entity-version-draft.command-BSEut8OA.mjs.map} +1 -1
  45. package/fesm2022/{acorex-platform-module-common-client-delete-entity-version-draft.command-CLWHs4DO.mjs → acorex-platform-module-common-client-delete-entity-version-draft.command-dqyL50pr.mjs} +2 -2
  46. package/fesm2022/{acorex-platform-module-common-client-delete-entity-version-draft.command-CLWHs4DO.mjs.map → acorex-platform-module-common-client-delete-entity-version-draft.command-dqyL50pr.mjs.map} +1 -1
  47. package/fesm2022/{acorex-platform-module-common-client-disable-entity.command-Bc1uH38V.mjs → acorex-platform-module-common-client-disable-entity.command-Bw8_VjZb.mjs} +3 -3
  48. package/fesm2022/acorex-platform-module-common-client-disable-entity.command-Bw8_VjZb.mjs.map +1 -0
  49. package/fesm2022/{acorex-platform-module-common-client-disable-entity.command.util-DQl6u2nj.mjs → acorex-platform-module-common-client-disable-entity.command.util-BmYWDNV6.mjs} +6 -5
  50. package/fesm2022/acorex-platform-module-common-client-disable-entity.command.util-BmYWDNV6.mjs.map +1 -0
  51. package/fesm2022/{acorex-platform-module-common-client-enable-entity.command-DeTumWIj.mjs → acorex-platform-module-common-client-enable-entity.command-Dkh_SjIl.mjs} +3 -3
  52. package/fesm2022/acorex-platform-module-common-client-enable-entity.command-Dkh_SjIl.mjs.map +1 -0
  53. package/fesm2022/{acorex-platform-module-common-client-get-current-time.command-Ck_SC5Bu.mjs → acorex-platform-module-common-client-get-current-time.command-BIa1Tift.mjs} +1 -1
  54. package/fesm2022/{acorex-platform-module-common-client-get-current-time.command-Ck_SC5Bu.mjs.map → acorex-platform-module-common-client-get-current-time.command-BIa1Tift.mjs.map} +1 -1
  55. package/fesm2022/{acorex-platform-module-common-client-publish-entity-version.command-JNy0K1ZR.mjs → acorex-platform-module-common-client-publish-entity-version.command-BCsalr4s.mjs} +2 -2
  56. package/fesm2022/{acorex-platform-module-common-client-publish-entity-version.command-JNy0K1ZR.mjs.map → acorex-platform-module-common-client-publish-entity-version.command-BCsalr4s.mjs.map} +1 -1
  57. package/fesm2022/{acorex-platform-module-common-client-restore-archive-entity.command-DXY_piiw.mjs → acorex-platform-module-common-client-restore-archive-entity.command-BfIV7Xvo.mjs} +3 -3
  58. package/fesm2022/acorex-platform-module-common-client-restore-archive-entity.command-BfIV7Xvo.mjs.map +1 -0
  59. package/fesm2022/{acorex-platform-module-common-client-search-popup.component-BaSC4-wz.mjs → acorex-platform-module-common-client-search-popup.component-CzzajSnd.mjs} +4 -4
  60. package/fesm2022/{acorex-platform-module-common-client-search-popup.component-BaSC4-wz.mjs.map → acorex-platform-module-common-client-search-popup.component-CzzajSnd.mjs.map} +1 -1
  61. package/fesm2022/{acorex-platform-module-common-client-show-entity-version-history.command-CoFbuUYP.mjs → acorex-platform-module-common-client-show-entity-version-history.command-DzXsd2UV.mjs} +2 -2
  62. package/fesm2022/{acorex-platform-module-common-client-show-entity-version-history.command-CoFbuUYP.mjs.map → acorex-platform-module-common-client-show-entity-version-history.command-DzXsd2UV.mjs.map} +1 -1
  63. package/fesm2022/{acorex-platform-module-common-client-timeline-version-history-popup.component-CB9s1X3B.mjs → acorex-platform-module-common-client-timeline-version-history-popup.component-BzYK-zvE.mjs} +2 -2
  64. package/fesm2022/{acorex-platform-module-common-client-timeline-version-history-popup.component-CB9s1X3B.mjs.map → acorex-platform-module-common-client-timeline-version-history-popup.component-BzYK-zvE.mjs.map} +1 -1
  65. package/fesm2022/{acorex-platform-module-common-client-versioning-entity.command.util-Bibv8EgV.mjs → acorex-platform-module-common-client-versioning-entity.command.util-CIpyMuIs.mjs} +1 -1
  66. package/fesm2022/{acorex-platform-module-common-client-versioning-entity.command.util-Bibv8EgV.mjs.map → acorex-platform-module-common-client-versioning-entity.command.util-CIpyMuIs.mjs.map} +1 -1
  67. package/fesm2022/acorex-platform-module-common-client.mjs +1 -1
  68. package/i18n/en-AU/common.json +25 -5
  69. package/i18n/en-US/common.json +25 -5
  70. package/i18n/fa-IR/common.json +21 -1
  71. package/package.json +1 -1
  72. package/types/acorex-platform-module-common-client-contracts.d.ts +9 -7
  73. package/types/acorex-platform-module-common-client.d.ts +43 -4
  74. package/fesm2022/acorex-platform-module-common-client-acorex-platform-module-common-client-C_NblzG7.mjs.map +0 -1
  75. package/fesm2022/acorex-platform-module-common-client-archive-entity.command-BJi7V9qA.mjs.map +0 -1
  76. package/fesm2022/acorex-platform-module-common-client-archive-entity.command.util-DoXkO9DT.mjs.map +0 -1
  77. package/fesm2022/acorex-platform-module-common-client-bulk-archive-entity.command-DPFiA8I2.mjs.map +0 -1
  78. package/fesm2022/acorex-platform-module-common-client-bulk-disable-entity.command-DgoZVXQA.mjs.map +0 -1
  79. package/fesm2022/acorex-platform-module-common-client-bulk-enable-entity.command-C6fba__g.mjs.map +0 -1
  80. package/fesm2022/acorex-platform-module-common-client-bulk-restore-archive-entity.command-C2BTAz4o.mjs.map +0 -1
  81. package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-record-lock.entity-DLA5qjPs.mjs.map +0 -1
  82. package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-version-entry.entity-C07SlyK0.mjs.map +0 -1
  83. package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-version-stream.entity-C7LJK2Gt.mjs.map +0 -1
  84. package/fesm2022/acorex-platform-module-common-client-disable-entity.command-Bc1uH38V.mjs.map +0 -1
  85. package/fesm2022/acorex-platform-module-common-client-disable-entity.command.util-DQl6u2nj.mjs.map +0 -1
  86. package/fesm2022/acorex-platform-module-common-client-enable-entity.command-DeTumWIj.mjs.map +0 -1
  87. package/fesm2022/acorex-platform-module-common-client-restore-archive-entity.command-DXY_piiw.mjs.map +0 -1
@@ -1 +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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,kCAAkC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAlC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kCAAkC,cADrB,MAAM,EAAA,CAAA,CAAA;;2FACnB,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBAD9C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
1
+ {"version":3,"file":"acorex-platform-module-common-client-show-entity-version-history.command-DzXsd2UV.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,IAAI,CAAC,EAAE;AAC1C,QAAA,OAAO,IAAI;IACb;IACA,OAAO,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,KAAK,aAAa;AAC3D;AAEA,SAAS,gBAAgB,CAAC,QAA2B,EAAA;AACnD,IAAA,OAAO,QAAQ,CAAC,MAAM,EAAE,OAAO,KAAK,KAAK;AAC3C;AAEA,SAAS,kBAAkB,CAAC,QAA2B,EAAA;AACrD,IAAA,IAAI,gBAAgB,CAAC,QAAQ,CAAC,EAAE;AAC9B,QAAA,OAAO,IAAI;IACb;IACA,IAAI,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;AACxC,QAAA,OAAO,IAAI;IACb;IACA,IAAI,8BAA8B,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;AACrD,QAAA,OAAO,IAAI;IACb;IACA,IAAI,QAAQ,CAAC,IAAI,KAAK,kBAAkB,CAAC,QAAQ,EAAE;AACjD,QAAA,OAAO,IAAI;IACb;AACA,IAAA,IAAI,4BAA4B,CAAC,QAAQ,CAAC,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CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC;AACjE,YAAA,IAAI,KAAK,IAAI,IAAI,EAAE;AACjB,gBAAA,OAAO,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;YACtC;QACF;AACA,QAAA,OAAO,EAAE;IACX;8GA9RW,kCAAkC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAlC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kCAAkC,cADrB,MAAM,EAAA,CAAA,CAAA;;2FACnB,kCAAkC,EAAA,UAAA,EAAA,CAAA;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-C_NblzG7.mjs';
14
+ import { v as versionEntriesToActivityLogs, o as openActivityLogVersionCompare } from './acorex-platform-module-common-client-acorex-platform-module-common-client-DctPmGJ6.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-CB9s1X3B.mjs.map
63
+ //# sourceMappingURL=acorex-platform-module-common-client-timeline-version-history-popup.component-BzYK-zvE.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-common-client-timeline-version-history-popup.component-CB9s1X3B.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/history-plugin/components/timeline-version-history-popup/timeline-version-history-popup.component.ts","../../../../libs/modules/common/client/src/lib/features/history-plugin/components/timeline-version-history-popup/timeline-version-history-popup.component.html"],"sourcesContent":["import { Component, inject, Injector, signal, ViewEncapsulation, computed, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport {\n AXPActivityLogCompareRequest,\n AXPActivityLogComponent,\n} from '@acorex-platform/framework-client/layout/components';\nimport { AXPVersionEntry, AXPVersioningService } from '@acorex-platform/framework-client/common';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { versionEntriesToActivityLogs } from '../../utils/version-history.utils';\nimport { openActivityLogVersionCompare } from '../../utils/open-activity-log-compare.util';\n\n@Component({\n selector: 'axp-timeline-version-history-popup',\n templateUrl: './timeline-version-history-popup.component.html',\n imports: [\n CommonModule,\n AXDecoratorModule,\n AXButtonModule,\n AXTranslationModule,\n AXPActivityLogComponent,\n ],\n changeDetection: ChangeDetectionStrategy.Eager,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXMTimelineVersionHistoryPopupComponent extends AXBasePageComponent {\n refId!: string;\n refType!: string;\n fieldTitles?: Record<string, string>;\n fromDate!: Date;\n toDate!: Date;\n limit!: number;\n offset!: number;\n\n protected isBusy = signal(false);\n\n protected versioning = inject(AXPVersioningService);\n private readonly injector = inject(Injector);\n private readonly translation = inject(AXTranslationService);\n protected versions = signal<AXPVersionEntry[]>([]);\n protected activities = computed(() =>\n versionEntriesToActivityLogs(\n this.versions(),\n this.refId,\n this.refType,\n this.fieldTitles,\n undefined,\n this.translation.getActiveLang?.() ?? 'en-US',\n )\n );\n\n override async ngOnInit(): Promise<void> {\n this.isBusy.set(true);\n super.ngOnInit();\n const streamId = await this.versioning.getStreamIdIfExists(this.refType, this.refId);\n if (streamId) {\n const entries = await this.versioning.listEntries(streamId, {\n limit: this.limit,\n offset: this.offset,\n });\n this.versions.set(entries);\n } else {\n this.versions.set([]);\n }\n this.isBusy.set(false);\n }\n\n protected async onCompareRequested(event: AXPActivityLogCompareRequest): Promise<void> {\n await openActivityLogVersionCompare(this.injector, event);\n }\n}\n","<ax-content>\n <div class=\"p-6 min-h-[30vh] overflow-y-auto\">\n <axp-activity-log\n [activities]=\"activities()\"\n [loading]=\"isBusy()\"\n [enableCompare]=\"true\"\n [showActionType]=\"false\"\n (compareRequested)=\"onCompareRequested($event)\"\n ></axp-activity-log>\n </div>\n</ax-content>\n<ax-footer>\n <ax-prefix></ax-prefix>\n <ax-suffix>\n <ax-button\n [text]=\"'@general:actions.close.title' | translate | async\"\n look=\"solid\"\n color=\"primary\"\n (onClick)=\"close()\"\n >\n </ax-button>\n </ax-suffix>\n</ax-footer>\n"],"names":["i3"],"mappings":";;;;;;;;;;;;;;;AA4BM,MAAO,uCAAwC,SAAQ,mBAAmB,CAAA;AAbhF,IAAA,WAAA,GAAA;;QAsBY,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,KAAK;mFAAC;AAEtB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAClC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,oBAAoB,CAAC;QACjD,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAoB,EAAE;qFAAC;AACxC,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAC9B,4BAA4B,CAC1B,IAAI,CAAC,QAAQ,EAAE,EACf,IAAI,CAA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,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oCAAoC,EAAA,OAAA,EAErC;wBACP,YAAY;wBACZ,iBAAiB;wBACjB,cAAc;wBACd,mBAAmB;wBACnB,uBAAuB;AACxB,qBAAA,EAAA,eAAA,EACgB,uBAAuB,CAAC,KAAK,EAAA,aAAA,EAC/B,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,2lBAAA,EAAA;;;"}
1
+ {"version":3,"file":"acorex-platform-module-common-client-timeline-version-history-popup.component-BzYK-zvE.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/history-plugin/components/timeline-version-history-popup/timeline-version-history-popup.component.ts","../../../../libs/modules/common/client/src/lib/features/history-plugin/components/timeline-version-history-popup/timeline-version-history-popup.component.html"],"sourcesContent":["import { Component, inject, Injector, signal, ViewEncapsulation, computed, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport {\n AXPActivityLogCompareRequest,\n AXPActivityLogComponent,\n} from '@acorex-platform/framework-client/layout/components';\nimport { AXPVersionEntry, AXPVersioningService } from '@acorex-platform/framework-client/common';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { versionEntriesToActivityLogs } from '../../utils/version-history.utils';\nimport { openActivityLogVersionCompare } from '../../utils/open-activity-log-compare.util';\n\n@Component({\n selector: 'axp-timeline-version-history-popup',\n templateUrl: './timeline-version-history-popup.component.html',\n imports: [\n CommonModule,\n AXDecoratorModule,\n AXButtonModule,\n AXTranslationModule,\n AXPActivityLogComponent,\n ],\n changeDetection: ChangeDetectionStrategy.Eager,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXMTimelineVersionHistoryPopupComponent extends AXBasePageComponent {\n refId!: string;\n refType!: string;\n fieldTitles?: Record<string, string>;\n fromDate!: Date;\n toDate!: Date;\n limit!: number;\n offset!: number;\n\n protected isBusy = signal(false);\n\n protected versioning = inject(AXPVersioningService);\n private readonly injector = inject(Injector);\n private readonly translation = inject(AXTranslationService);\n protected versions = signal<AXPVersionEntry[]>([]);\n protected activities = computed(() =>\n versionEntriesToActivityLogs(\n this.versions(),\n this.refId,\n this.refType,\n this.fieldTitles,\n undefined,\n this.translation.getActiveLang?.() ?? 'en-US',\n )\n );\n\n override async ngOnInit(): Promise<void> {\n this.isBusy.set(true);\n super.ngOnInit();\n const streamId = await this.versioning.getStreamIdIfExists(this.refType, this.refId);\n if (streamId) {\n const entries = await this.versioning.listEntries(streamId, {\n limit: this.limit,\n offset: this.offset,\n });\n this.versions.set(entries);\n } else {\n this.versions.set([]);\n }\n this.isBusy.set(false);\n }\n\n protected async onCompareRequested(event: AXPActivityLogCompareRequest): Promise<void> {\n await openActivityLogVersionCompare(this.injector, event);\n }\n}\n","<ax-content>\n <div class=\"p-6 min-h-[30vh] overflow-y-auto\">\n <axp-activity-log\n [activities]=\"activities()\"\n [loading]=\"isBusy()\"\n [enableCompare]=\"true\"\n [showActionType]=\"false\"\n (compareRequested)=\"onCompareRequested($event)\"\n ></axp-activity-log>\n </div>\n</ax-content>\n<ax-footer>\n <ax-prefix></ax-prefix>\n <ax-suffix>\n <ax-button\n [text]=\"'@general:actions.close.title' | translate | async\"\n look=\"solid\"\n color=\"primary\"\n (onClick)=\"close()\"\n >\n </ax-button>\n </ax-suffix>\n</ax-footer>\n"],"names":["i3"],"mappings":";;;;;;;;;;;;;;;AA4BM,MAAO,uCAAwC,SAAQ,mBAAmB,CAAA;AAbhF,IAAA,WAAA,GAAA;;QAsBY,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,KAAK;mFAAC;AAEtB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAClC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,WAAW,GAA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AA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,KAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAKd,uCAAuC,EAAA,UAAA,EAAA,CAAA;kBAbnD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oCAAoC,EAAA,OAAA,EAErC;wBACP,YAAY;wBACZ,iBAAiB;wBACjB,cAAc;wBACd,mBAAmB;wBACnB,uBAAuB;AACxB,qBAAA,EAAA,eAAA,EACgB,uBAAuB,CAAC,KAAK,EAAA,aAAA,EAC/B,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,2lBAAA,EAAA;;;"}
@@ -136,4 +136,4 @@ function normalizeVersioningInput(input) {
136
136
  }
137
137
 
138
138
  export { AXPVersioningEntityCommandHelper as A, normalizeVersioningInput as n };
139
- //# sourceMappingURL=acorex-platform-module-common-client-versioning-entity.command.util-Bibv8EgV.mjs.map
139
+ //# sourceMappingURL=acorex-platform-module-common-client-versioning-entity.command.util-CIpyMuIs.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-common-client-versioning-entity.command.util-Bibv8EgV.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/versioning-plugin/commands/versioning-entity.command.helper.ts","../../../../libs/modules/common/client/src/lib/features/versioning-plugin/commands/versioning-entity.command.util.ts"],"sourcesContent":["import { AXDialogService } from '@acorex/components/dialog';\nimport { AXLoadingDialogService } from '@acorex/components/loading-dialog';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport {\n AXPCommonSettings,\n AXPSettingsService,\n extractRequestErrorInfo,\n} from '@acorex-platform/framework-client/common';\nimport { AXPEntityBroadcastService } from '@acorex-platform/framework-client/core';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport {\n AXPVersioningField,\n AXPVersioningStatus,\n AXP_VERSIONING_ERROR_I18N,\n type AXPVersioningCompanionDto,\n type AXPVersioningHostDto,\n} from '@acorex-platform/module-common-client/contracts';\nimport { inject, Injectable } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPVersioningEntityCommandHelper {\n private readonly entityService = inject(AXPEntityService);\n private readonly dialogService = inject(AXDialogService);\n private readonly loadingDialog = inject(AXLoadingDialogService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n private readonly settingsService = inject(AXPSettingsService);\n private readonly entityEvents = inject(AXPEntityBroadcastService);\n\n hostData(refType: string) {\n const [moduleName, entityName] = refType.split('.');\n return this.entityService\n .withEntity(moduleName, entityName)\n .data<string, AXPVersioningHostDto, AXPVersioningHostDto>();\n }\n\n companionData(companionEntity: string) {\n const [moduleName, entityName] = companionEntity.split('.');\n return this.entityService\n .withEntity(moduleName, entityName)\n .data<string, AXPVersioningCompanionDto, AXPVersioningCompanionDto>();\n }\n\n async listCompanions(\n companionEntity: string,\n sourceId: string,\n ): Promise<AXPVersioningCompanionDto[]> {\n const result = await this.companionData(companionEntity).query({\n skip: 0,\n take: 200,\n sort: [{ field: AXPVersioningField.VersionNumber, dir: 'desc' }],\n filter: {\n field: AXPVersioningField.SourceId,\n operator: { type: 'equal' },\n value: sourceId,\n },\n });\n return [...(result?.items ?? [])].sort((left, right) => {\n const leftNumber = Number(left.versionNumber ?? 0);\n const rightNumber = Number(right.versionNumber ?? 0);\n return rightNumber - leftNumber;\n });\n }\n\n async findDraft(companionEntity: string, sourceId: string): Promise<AXPVersioningCompanionDto | null> {\n const result = await this.companionData(companionEntity).query({\n skip: 0,\n take: 1,\n filter: {\n logic: 'and',\n filters: [\n { field: AXPVersioningField.SourceId, operator: { type: 'equal' }, value: sourceId },\n {\n field: AXPVersioningField.VersioningStatus,\n operator: { type: 'equal' },\n value: AXPVersioningStatus.Draft,\n },\n ],\n },\n });\n const row = result?.items?.[0];\n return row ?? null;\n }\n\n async confirm(titleKey: string, messageKey: string): Promise<boolean> {\n const dialogResult = await this.dialogService.confirm(\n await this.translationService.translateAsync(titleKey),\n await this.translationService.translateAsync(messageKey),\n 'warning',\n 'horizontal',\n false,\n 'cancel',\n );\n return dialogResult.result === true;\n }\n\n showLoading(title: string, status: string) {\n return this.loadingDialog.show({\n title,\n mode: 'indeterminate',\n status,\n });\n }\n\n async showSuccessToast(titleKey: string, contentKey?: string): Promise<void> {\n const enabled = await this.settingsService.get<boolean>(AXPCommonSettings.EnableOperationToasts);\n if (!enabled) {\n return;\n }\n this.toastService.show({\n color: 'success',\n title: await this.translationService.translateAsync(titleKey),\n content: contentKey ? await this.translationService.translateAsync(contentKey) : undefined,\n });\n }\n\n async showErrorToastFor(error: unknown, fallbackKey: string): Promise<void> {\n const enabled = await this.settingsService.get<boolean>(AXPCommonSettings.EnableOperationToasts);\n if (!enabled) {\n return;\n }\n const info = extractRequestErrorInfo(error);\n const contentKey =\n (info?.code ? AXP_VERSIONING_ERROR_I18N[info.code] : undefined) ??\n (typeof info?.message === 'string' && info.message.startsWith('@') ? info.message : null) ??\n fallbackKey;\n const content = contentKey.startsWith('@')\n ? await this.translationService.translateAsync(contentKey)\n : contentKey;\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content,\n closeButton: true,\n timeOut: 6000,\n timeOutProgress: true,\n });\n }\n\n dispatchRefresh(refType: string): void {\n this.entityEvents.publishLayoutRefresh(refType);\n }\n}\n","import type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { pickInputOrOptionsField, resolveEntityActionRef } from '@acorex-platform/framework-shared/runtime';\nimport { versionCompanionEntityName } from '@acorex-platform/module-common-client/contracts';\n\nexport interface AXPVersioningCommandContext {\n refId: string;\n refType: string;\n companionEntity: string;\n /** When true, skip the command’s own confirm (caller already asked). */\n skipConfirm?: boolean;\n}\n\nexport function normalizeVersioningInput(input: AXPContextData): AXPVersioningCommandContext | null {\n const resolved = resolveEntityActionRef(input);\n if (!resolved) {\n return null;\n }\n return {\n refId: resolved.refId,\n refType: resolved.refType,\n companionEntity: versionCompanionEntityName(resolved.refType),\n skipConfirm: Boolean(pickInputOrOptionsField(input, 'skipConfirm')),\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;MAqBa,gCAAgC,CAAA;AAD7C,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAC9C,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC5C,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,yBAAyB,CAAC;AAmHlE,IAAA;AAjHC,IAAA,QAAQ,CAAC,OAAe,EAAA;AACtB,QAAA,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC;QACnD,OAAO,IAAI,CAAC;AACT,aAAA,UAAU,CAAC,UAAU,EAAE,UAAU;AACjC,aAAA,IAAI,EAAsD;IAC/D;AAEA,IAAA,aAAa,CAAC,eAAuB,EAAA;AACnC,QAAA,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC;QAC3D,OAAO,IAAI,CAAC;AACT,aAAA,UAAU,CAAC,UAAU,EAAE,UAAU;AACjC,aAAA,IAAI,EAAgE;IACzE;AAEA,IAAA,MAAM,cAAc,CAClB,eAAuB,EACvB,QAAgB,EAAA;QAEhB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,eA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,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,cADnB,MAAM,EAAA,CAAA,CAAA;;2FACnB,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAD5C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACR5B,SAAU,wBAAwB,CAAC,KAAqB,EAAA;AAC5D,IAAA,MAAM,QAAQ,GAAG,sBAAsB,CAAC,KAAK,CAAC;IAC9C,IAAI,CAAC,QAAQ,EAAE;AACb,QAAA,OAAO,IAAI;IACb;IACA,OAAO;QACL,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,OAAO,EAAE,QAAQ,CAAC,OAAO;AACzB,QAAA,eAAe,EAAE,0BAA0B,CAAC,QAAQ,CAAC,OAAO,CAAC;QAC7D,WAAW,EAAE,OAAO,CAAC,uBAAuB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;KACpE;AACH;;"}
1
+ {"version":3,"file":"acorex-platform-module-common-client-versioning-entity.command.util-CIpyMuIs.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/versioning-plugin/commands/versioning-entity.command.helper.ts","../../../../libs/modules/common/client/src/lib/features/versioning-plugin/commands/versioning-entity.command.util.ts"],"sourcesContent":["import { AXDialogService } from '@acorex/components/dialog';\nimport { AXLoadingDialogService } from '@acorex/components/loading-dialog';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport {\n AXPCommonSettings,\n AXPSettingsService,\n extractRequestErrorInfo,\n} from '@acorex-platform/framework-client/common';\nimport { AXPEntityBroadcastService } from '@acorex-platform/framework-client/core';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport {\n AXPVersioningField,\n AXPVersioningStatus,\n AXP_VERSIONING_ERROR_I18N,\n type AXPVersioningCompanionDto,\n type AXPVersioningHostDto,\n} from '@acorex-platform/module-common-client/contracts';\nimport { inject, Injectable } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPVersioningEntityCommandHelper {\n private readonly entityService = inject(AXPEntityService);\n private readonly dialogService = inject(AXDialogService);\n private readonly loadingDialog = inject(AXLoadingDialogService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n private readonly settingsService = inject(AXPSettingsService);\n private readonly entityEvents = inject(AXPEntityBroadcastService);\n\n hostData(refType: string) {\n const [moduleName, entityName] = refType.split('.');\n return this.entityService\n .withEntity(moduleName, entityName)\n .data<string, AXPVersioningHostDto, AXPVersioningHostDto>();\n }\n\n companionData(companionEntity: string) {\n const [moduleName, entityName] = companionEntity.split('.');\n return this.entityService\n .withEntity(moduleName, entityName)\n .data<string, AXPVersioningCompanionDto, AXPVersioningCompanionDto>();\n }\n\n async listCompanions(\n companionEntity: string,\n sourceId: string,\n ): Promise<AXPVersioningCompanionDto[]> {\n const result = await this.companionData(companionEntity).query({\n skip: 0,\n take: 200,\n sort: [{ field: AXPVersioningField.VersionNumber, dir: 'desc' }],\n filter: {\n field: AXPVersioningField.SourceId,\n operator: { type: 'equal' },\n value: sourceId,\n },\n });\n return [...(result?.items ?? [])].sort((left, right) => {\n const leftNumber = Number(left.versionNumber ?? 0);\n const rightNumber = Number(right.versionNumber ?? 0);\n return rightNumber - leftNumber;\n });\n }\n\n async findDraft(companionEntity: string, sourceId: string): Promise<AXPVersioningCompanionDto | null> {\n const result = await this.companionData(companionEntity).query({\n skip: 0,\n take: 1,\n filter: {\n logic: 'and',\n filters: [\n { field: AXPVersioningField.SourceId, operator: { type: 'equal' }, value: sourceId },\n {\n field: AXPVersioningField.VersioningStatus,\n operator: { type: 'equal' },\n value: AXPVersioningStatus.Draft,\n },\n ],\n },\n });\n const row = result?.items?.[0];\n return row ?? null;\n }\n\n async confirm(titleKey: string, messageKey: string): Promise<boolean> {\n const dialogResult = await this.dialogService.confirm(\n await this.translationService.translateAsync(titleKey),\n await this.translationService.translateAsync(messageKey),\n 'warning',\n 'horizontal',\n false,\n 'cancel',\n );\n return dialogResult.result === true;\n }\n\n showLoading(title: string, status: string) {\n return this.loadingDialog.show({\n title,\n mode: 'indeterminate',\n status,\n });\n }\n\n async showSuccessToast(titleKey: string, contentKey?: string): Promise<void> {\n const enabled = await this.settingsService.get<boolean>(AXPCommonSettings.EnableOperationToasts);\n if (!enabled) {\n return;\n }\n this.toastService.show({\n color: 'success',\n title: await this.translationService.translateAsync(titleKey),\n content: contentKey ? await this.translationService.translateAsync(contentKey) : undefined,\n });\n }\n\n async showErrorToastFor(error: unknown, fallbackKey: string): Promise<void> {\n const enabled = await this.settingsService.get<boolean>(AXPCommonSettings.EnableOperationToasts);\n if (!enabled) {\n return;\n }\n const info = extractRequestErrorInfo(error);\n const contentKey =\n (info?.code ? AXP_VERSIONING_ERROR_I18N[info.code] : undefined) ??\n (typeof info?.message === 'string' && info.message.startsWith('@') ? info.message : null) ??\n fallbackKey;\n const content = contentKey.startsWith('@')\n ? await this.translationService.translateAsync(contentKey)\n : contentKey;\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content,\n closeButton: true,\n timeOut: 6000,\n timeOutProgress: true,\n });\n }\n\n dispatchRefresh(refType: string): void {\n this.entityEvents.publishLayoutRefresh(refType);\n }\n}\n","import type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { pickInputOrOptionsField, resolveEntityActionRef } from '@acorex-platform/framework-shared/runtime';\nimport { versionCompanionEntityName } from '@acorex-platform/module-common-client/contracts';\n\nexport interface AXPVersioningCommandContext {\n refId: string;\n refType: string;\n companionEntity: string;\n /** When true, skip the command’s own confirm (caller already asked). */\n skipConfirm?: boolean;\n}\n\nexport function normalizeVersioningInput(input: AXPContextData): AXPVersioningCommandContext | null {\n const resolved = resolveEntityActionRef(input);\n if (!resolved) {\n return null;\n }\n return {\n refId: resolved.refId,\n refType: resolved.refType,\n companionEntity: versionCompanionEntityName(resolved.refType),\n skipConfirm: Boolean(pickInputOrOptionsField(input, 'skipConfirm')),\n };\n}\n"],"names":[],"mappings":";;;;;;;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E;;;ACR5B,SAAU,wBAAwB,CAAC,KAAqB,EAAA;AAC5D,IAAA,MAAM,QAAQ,GAAG,sBAAsB,CAAC,KAAK,CAAC;IAC9C,IAAI,CAAC,QAAQ,EAAE;AACb,QAAA,OAAO,IAAI;IACb;IACA,OAAO;QACL,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,OAAO,EAAE,QAAQ,CAAC,OAAO;AACzB,QAAA,eAAe,EAAE,0BAA0B,CAAC,QAAQ,CAAC,OAAO,CAAC;QAC7D,WAAW,EAAE,OAAO,CAAC,uBAAuB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;KACpE;AACH;;"}
@@ -1,3 +1,3 @@
1
- export { b as AXMCommonModule, c as AXMMenuProvider, d as AXMSettingProvider, e as AXMVersionHistoryPageComponent, f as AXPArchivePluginModule, g as AXPCommonFeatureDefinitionProvider, h as AXPDerivedNamePluginModule, j as AXPDisablePluginModule, k as AXPGlobalSearchModule, a as AXPGlobalSearchViewModel, l as AXPHistoryAuditInfoWidget, m as AXPHistoryModule, n as AXPLockEntityCommand, p as AXPResourceAppointmentPageComponent, q as AXPStatusPluginModule, r as AXPUniqueFieldsPluginModule, s as AXPUnlockEntityCommand, u as AXPValidationRulesModule, w as AXPVersioningPluginModule, A as AXP_ENTITY_ARCHIVE_OVERRIDES, x as AXP_GLOBAL_SEARCH_CONFIG_TOKEN, y as AXP_RESOURCE_APPOINTMENT_PAGE_CONFIG, z as ApprovalStatusProvider, B as AtLeastOneOfValidationRule, H as HISTORY_PAGE_COMPONENT_KEY, S as ShowVersionHistoryPopupCommand, C as StateStatusProvider, T as TaskStatusProvider, U as UniqueValidationRule, V as VARIABLE_NAME_VALIDATION_PATTERN, D as VariableNameValidationRule, E as aggregateVersionHistoryBarChartItems, F as archivePlugin, G as buildEntityFieldHistoryLineChartSeries, I as buildProductBasePriceHistoryLineChartSeries, J as derivedNamePlugin, K as disablePlugin, L as formatVersionHistoryReplaceSummary, M as getActiveStatuses, N as getFinalStatuses, O as getInitialStatuses, P as getStatusByName, Q as getTransitionsFromStatus, R as getTransitionsToStatus, W as historyPlugin, X as humanizeChange, Y as isRtlHistoryLocale, Z as isValidTransition, i as isValidVariableName, _ as mapChangeType, $ as mapOpToAction, a0 as resolvePathKey, a1 as statusPlugin, t as toVariableName, a2 as uniqueFieldsPlugin, v as versionEntriesToActivityLogs, a3 as versioningPlugin } from './acorex-platform-module-common-client-acorex-platform-module-common-client-C_NblzG7.mjs';
1
+ export { b as AXMCommonModule, c as AXMMenuProvider, d as AXMSettingProvider, e as AXMVersionHistoryPageComponent, f as AXPArchivePluginModule, g as AXPCommonFeatureDefinitionProvider, h as AXPDerivedNamePluginModule, j as AXPDisablePluginModule, k as AXPEntityEvaluatorScopeProvider, l as AXPEntityExpressionService, m as AXPGlobalSearchModule, a as AXPGlobalSearchViewModel, n as AXPHistoryAuditInfoWidget, p as AXPHistoryModule, q as AXPLockEntityCommand, r as AXPResourceAppointmentPageComponent, s as AXPStatusPluginModule, u as AXPSubjectEvaluatorScopeProvider, w as AXPUniqueFieldsPluginModule, x as AXPUnlockEntityCommand, y as AXPValidationRulesModule, z as AXPVersioningPluginModule, A as AXP_ENTITY_ARCHIVE_OVERRIDES, B as AXP_GLOBAL_SEARCH_CONFIG_TOKEN, C as AXP_RESOURCE_APPOINTMENT_PAGE_CONFIG, D as ApprovalStatusProvider, E as AtLeastOneOfValidationRule, H as HISTORY_PAGE_COMPONENT_KEY, S as ShowVersionHistoryPopupCommand, F as StateStatusProvider, T as TaskStatusProvider, U as UniqueValidationRule, V as VARIABLE_NAME_VALIDATION_PATTERN, G as VariableNameValidationRule, I as aggregateVersionHistoryBarChartItems, J as archivePlugin, K as buildEntityFieldHistoryLineChartSeries, L as buildProductBasePriceHistoryLineChartSeries, M as derivedNamePlugin, N as disablePlugin, O as formatVersionHistoryReplaceSummary, P as getActiveStatuses, Q as getFinalStatuses, R as getInitialStatuses, W as getStatusByName, X as getTransitionsFromStatus, Y as getTransitionsToStatus, Z as historyPlugin, _ as humanizeChange, $ as isRtlHistoryLocale, a0 as isValidTransition, i as isValidVariableName, a1 as mapChangeType, a2 as mapOpToAction, a3 as resolvePathKey, a4 as statusPlugin, t as toVariableName, a5 as uniqueFieldsPlugin, v as versionEntriesToActivityLogs, a6 as versioningPlugin } from './acorex-platform-module-common-client-acorex-platform-module-common-client-DctPmGJ6.mjs';
2
2
  export { CommonManifest } from '@acorex-platform/module-common-client/contracts';
3
3
  //# sourceMappingURL=acorex-platform-module-common-client.mjs.map
@@ -319,7 +319,7 @@
319
319
  },
320
320
  "collaboration": {
321
321
  "title": "Collaboration",
322
- "description": "Conversations, meetings, calendars, communications, reservations, and help desk."
322
+ "description": "Conversations, meetings, calendars, communications, bookings, and help desk."
323
323
  },
324
324
  "content-documents": {
325
325
  "title": "Content & Documents",
@@ -459,7 +459,7 @@
459
459
  },
460
460
  "collaboration-scheduling": {
461
461
  "title": "Scheduling",
462
- "description": "Calendars, meetings, and reservations."
462
+ "description": "Calendars, meetings, and bookings."
463
463
  },
464
464
  "collaboration-communications": {
465
465
  "title": "Communications",
@@ -660,6 +660,10 @@
660
660
  "title": "Maintain Suppliers",
661
661
  "description": "Create and maintain suppliers."
662
662
  },
663
+ "maintain-contractors": {
664
+ "title": "Maintain Contractors",
665
+ "description": "Create and maintain contractors."
666
+ },
663
667
  "maintain-procurement": {
664
668
  "title": "Maintain Procurement",
665
669
  "description": "Create and maintain procurement items and purchasing data."
@@ -712,14 +716,30 @@
712
716
  "title": "Maintain Communications",
713
717
  "description": "Send and manage communications such as email."
714
718
  },
715
- "maintain-reservations": {
716
- "title": "Maintain Reservations",
717
- "description": "Create and maintain reservations."
719
+ "maintain-bookings": {
720
+ "title": "Maintain Bookings",
721
+ "description": "Create and maintain bookings."
718
722
  },
719
723
  "maintain-help-desk": {
720
724
  "title": "Maintain Help Desk",
721
725
  "description": "Create and maintain help desk issues."
722
726
  },
727
+ "request-support": {
728
+ "title": "Request Support",
729
+ "description": "Create and follow your own support tickets."
730
+ },
731
+ "handle-tickets": {
732
+ "title": "Handle Tickets",
733
+ "description": "Work tickets in queues you belong to."
734
+ },
735
+ "manage-ticket-queue": {
736
+ "title": "Manage Ticket Queue",
737
+ "description": "Manage members and assignments for your queues."
738
+ },
739
+ "manage-support": {
740
+ "title": "Manage Support",
741
+ "description": "Manage support queues within your tenant and application."
742
+ },
723
743
  "view-bulletins": {
724
744
  "title": "View Announcements",
725
745
  "description": "Open the organisation announcement feed and read addressed posts."
@@ -319,7 +319,7 @@
319
319
  },
320
320
  "collaboration": {
321
321
  "title": "Collaboration",
322
- "description": "Conversations, meetings, calendars, communications, reservations, and help desk."
322
+ "description": "Conversations, meetings, calendars, communications, bookings, and help desk."
323
323
  },
324
324
  "content-documents": {
325
325
  "title": "Content & Documents",
@@ -459,7 +459,7 @@
459
459
  },
460
460
  "collaboration-scheduling": {
461
461
  "title": "Scheduling",
462
- "description": "Calendars, meetings, and reservations."
462
+ "description": "Calendars, meetings, and bookings."
463
463
  },
464
464
  "collaboration-communications": {
465
465
  "title": "Communications",
@@ -660,6 +660,10 @@
660
660
  "title": "Maintain Suppliers",
661
661
  "description": "Create and maintain suppliers."
662
662
  },
663
+ "maintain-contractors": {
664
+ "title": "Maintain Contractors",
665
+ "description": "Create and maintain contractors."
666
+ },
663
667
  "maintain-procurement": {
664
668
  "title": "Maintain Procurement",
665
669
  "description": "Create and maintain procurement items and purchasing data."
@@ -712,14 +716,30 @@
712
716
  "title": "Maintain Communications",
713
717
  "description": "Send and manage communications such as email."
714
718
  },
715
- "maintain-reservations": {
716
- "title": "Maintain Reservations",
717
- "description": "Create and maintain reservations."
719
+ "maintain-bookings": {
720
+ "title": "Maintain Bookings",
721
+ "description": "Create and maintain bookings."
718
722
  },
719
723
  "maintain-help-desk": {
720
724
  "title": "Maintain Help Desk",
721
725
  "description": "Create and maintain help desk issues."
722
726
  },
727
+ "request-support": {
728
+ "title": "Request Support",
729
+ "description": "Create and follow your own support tickets."
730
+ },
731
+ "handle-tickets": {
732
+ "title": "Handle Tickets",
733
+ "description": "Work tickets in queues you belong to."
734
+ },
735
+ "manage-ticket-queue": {
736
+ "title": "Manage Ticket Queue",
737
+ "description": "Manage members and assignments for your queues."
738
+ },
739
+ "manage-support": {
740
+ "title": "Manage Support",
741
+ "description": "Manage support queues within your tenant and application."
742
+ },
723
743
  "view-bulletins": {
724
744
  "title": "View Announcements",
725
745
  "description": "Open the organization announcement feed and read addressed posts."
@@ -660,6 +660,10 @@
660
660
  "title": "نگهداری تأمین‌کنندگان",
661
661
  "description": "ایجاد و نگهداری تأمین‌کنندگان."
662
662
  },
663
+ "maintain-contractors": {
664
+ "title": "نگهداری پیمانکاران",
665
+ "description": "ایجاد و نگهداری پیمانکاران."
666
+ },
663
667
  "maintain-procurement": {
664
668
  "title": "نگهداری تدارکات",
665
669
  "description": "ایجاد و نگهداری اقلام تدارکات و داده‌های خرید."
@@ -712,7 +716,7 @@
712
716
  "title": "نگهداری ارتباطات",
713
717
  "description": "ارسال و مدیریت ارتباطات مانند ایمیل."
714
718
  },
715
- "maintain-reservations": {
719
+ "maintain-bookings": {
716
720
  "title": "نگهداری رزروها",
717
721
  "description": "ایجاد و نگهداری رزروها."
718
722
  },
@@ -720,6 +724,22 @@
720
724
  "title": "نگهداری میز خدمت",
721
725
  "description": "ایجاد و نگهداری درخواست‌های میز خدمت."
722
726
  },
727
+ "request-support": {
728
+ "title": "درخواست پشتیبانی",
729
+ "description": "ثبت و پیگیری تیکت‌های خود."
730
+ },
731
+ "handle-tickets": {
732
+ "title": "رسیدگی به تیکت",
733
+ "description": "کار روی تیکت‌های صف‌هایی که عضو آن‌ها هستید."
734
+ },
735
+ "manage-ticket-queue": {
736
+ "title": "مدیریت صف تیکت",
737
+ "description": "مدیریت اعضا و ارجاع‌های صف خود."
738
+ },
739
+ "manage-support": {
740
+ "title": "مدیریت پشتیبانی",
741
+ "description": "مدیریت صف‌های پشتیبانی در محدوده سازمان و برنامه خود."
742
+ },
723
743
  "view-bulletins": {
724
744
  "title": "مشاهده اطلاعیه‌ها",
725
745
  "description": "باز کردن فید اطلاعیه‌های سازمان و خواندن پست‌های مربوط به کاربر."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acorex-platform/module-common-client",
3
- "version": "1.0.2",
3
+ "version": "2.0.0-beta.1",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
6
  "@acorex/cdk": ">=22.0.0",
@@ -70,14 +70,16 @@ declare const AXPCommonMenuKeys: {
70
70
  readonly Organization: "Common:Menu:Organization";
71
71
  /** Configuration > Organization (Job Definitions, Employment Types, etc.) */
72
72
  readonly OrganizationConfig: "Common:Menu:Configuration:Organization";
73
- /** Configuration > Help Desk (Issue Types) */
73
+ /** Configuration > Help Desk (Issue Types, ticket queues, categories) */
74
74
  readonly HelpDeskConfig: "Common:Menu:Configuration:HelpDesk";
75
+ /** Administration > Help Desk (ticket inbox) */
76
+ readonly HelpDeskAdmin: "Common:Menu:Administration:HelpDesk";
75
77
  /** Configuration > Document Management (Document Types) */
76
78
  readonly DocumentManagementConfig: "Common:Menu:Configuration:DocumentManagement";
77
79
  /** Configuration > Forms & Assessments (Question Bank, Questionnaires, Form Templates) */
78
80
  readonly FormsAndAssessments: "Common:Menu:Configuration:FormsAndAssessments";
79
- /** Configuration > Reservation (Types, Statuses, Classes) */
80
- readonly ReservationConfig: "Common:Menu:Configuration:Reservation";
81
+ /** Configuration > Booking (types, statuses, booking policies, actions, resource settings) */
82
+ readonly ResourceBookingConfig: "Common:Menu:Configuration:ResourceBooking";
81
83
  /** Configuration > Date and Time (Timezones, Calendars, Calendar Event Types) */
82
84
  readonly DateAndTime: "Common:Menu:Configuration:DateAndTime";
83
85
  /** Configuration > Region and Locale (Location Types, Geographic Regions, Languages) */
@@ -88,7 +90,7 @@ declare const AXPCommonMenuKeys: {
88
90
  readonly Health: "Common:Menu:Configuration:Health";
89
91
  /** Configuration > Projects (Project + Task reference data) */
90
92
  readonly Projects: "Common:Menu:Configuration:Projects";
91
- /** Configuration > Scheduling and Events (Meeting + Reservation types) */
93
+ /** Configuration > Scheduling and Events (Meeting + Booking types) */
92
94
  readonly SchedulingAndEvents: "Common:Menu:Configuration:SchedulingAndEvents";
93
95
  /** Configuration > Data and Content (Documents + Data Definitions) */
94
96
  readonly DataAndContent: "Common:Menu:Configuration:DataAndContent";
@@ -238,11 +240,11 @@ declare const AXPPermissionDomainModules: {
238
240
  readonly SafetyRisk: readonly ["WorkplaceSafetyManagement", "RiskManagement", "HealthCore", "AssessmentManagement"];
239
241
  readonly ProjectsWork: readonly ["ProjectManagement", "TaskManagement", "TimesheetManagement"];
240
242
  readonly AssetsMaintenance: readonly ["AssetManagement", "MaintenanceManagement", "MeasurementCore"];
241
- readonly Collaboration: readonly ["Conversation", "CalendarManagement", "MeetingManagement", "CommunicationManagement", "BulletinManagement", "ReservationManagement", "HelpDesk", "ContactCore"];
243
+ readonly Collaboration: readonly ["Conversation", "CalendarManagement", "MeetingManagement", "CommunicationManagement", "BulletinManagement", "ResourceBookingManagement", "HelpDesk", "ContactCore"];
242
244
  readonly ContentDocuments: readonly ["DocumentManagement", "ContentManagement", "AssessmentManagement"];
243
- readonly InsightsReporting: readonly ["ReportManagement", "DataManagement", "ActivityInsight", "TestManagement"];
245
+ readonly InsightsReporting: readonly ["ReportManagement", "DataManagement", "DataInterchange", "ActivityInsight", "TestManagement"];
244
246
  readonly SalesCustomers: readonly ["CustomerManagement", "ProductCatalog", "OrderManagement", "SubscriptionManagement", "BusinessCore"];
245
- readonly Procurement: readonly ["SupplierManagement", "ProcurementManagement"];
247
+ readonly Procurement: readonly ["SupplierManagement", "ContractorManagement", "ProcurementManagement"];
246
248
  readonly Learning: readonly ["LearningManagement"];
247
249
  readonly Finance: readonly ["FinancialCore"];
248
250
  };