@acorex-platform/module-organization-management-client 0.0.21

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 (53) hide show
  1. package/fesm2022/acorex-platform-module-organization-management-client-acorex-platform-module-organization-management-client-Dn8Ss1nL.mjs +433 -0
  2. package/fesm2022/acorex-platform-module-organization-management-client-acorex-platform-module-organization-management-client-Dn8Ss1nL.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-organization-management-client-add-business-unit-to-business-unit.command-CA2uZQyC.mjs +161 -0
  4. package/fesm2022/acorex-platform-module-organization-management-client-add-business-unit-to-business-unit.command-CA2uZQyC.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-module-organization-management-client-add-position-to-business-unit.command-F7jD3jKs.mjs +137 -0
  6. package/fesm2022/acorex-platform-module-organization-management-client-add-position-to-business-unit.command-F7jD3jKs.mjs.map +1 -0
  7. package/fesm2022/acorex-platform-module-organization-management-client-add-team-to-business-unit.command-BLQFjhS5.mjs +127 -0
  8. package/fesm2022/acorex-platform-module-organization-management-client-add-team-to-business-unit.command-BLQFjhS5.mjs.map +1 -0
  9. package/fesm2022/acorex-platform-module-organization-management-client-contracts.mjs +468 -0
  10. package/fesm2022/acorex-platform-module-organization-management-client-contracts.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-module-organization-management-client-feature-definition.provider-BQKtvXOM.mjs +19 -0
  12. package/fesm2022/acorex-platform-module-organization-management-client-feature-definition.provider-BQKtvXOM.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-module-organization-management-client-generate-org-chart.command-DJnFJKuo.mjs +91 -0
  14. package/fesm2022/acorex-platform-module-organization-management-client-generate-org-chart.command-DJnFJKuo.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-organization-management-client-job-definition-matrix-page.utils-DD3jLujN.mjs +61 -0
  16. package/fesm2022/acorex-platform-module-organization-management-client-job-definition-matrix-page.utils-DD3jLujN.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-module-organization-management-client-job-definition-pages-component.provider-BNhXJfjr.mjs +28 -0
  18. package/fesm2022/acorex-platform-module-organization-management-client-job-definition-pages-component.provider-BNhXJfjr.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-module-organization-management-client-job-definition-responsibilities-page.component-BlUzsSy3.mjs +237 -0
  20. package/fesm2022/acorex-platform-module-organization-management-client-job-definition-responsibilities-page.component-BlUzsSy3.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-module-organization-management-client-job-definition-skills-page.component--pyAaXB4.mjs +233 -0
  22. package/fesm2022/acorex-platform-module-organization-management-client-job-definition-skills-page.component--pyAaXB4.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-module-organization-management-client-menu.provider-BgRoEC48.mjs +175 -0
  24. package/fesm2022/acorex-platform-module-organization-management-client-menu.provider-BgRoEC48.mjs.map +1 -0
  25. package/fesm2022/acorex-platform-module-organization-management-client-org-chart-default-node-contribution.provider-BQ0ihb43.mjs +229 -0
  26. package/fesm2022/acorex-platform-module-organization-management-client-org-chart-default-node-contribution.provider-BQ0ihb43.mjs.map +1 -0
  27. package/fesm2022/acorex-platform-module-organization-management-client-org-chart-employee-flyout-contribution.provider-Bz8nVm04.mjs +179 -0
  28. package/fesm2022/acorex-platform-module-organization-management-client-org-chart-employee-flyout-contribution.provider-Bz8nVm04.mjs.map +1 -0
  29. package/fesm2022/acorex-platform-module-organization-management-client-org-chart-position-employee-node-contribution.provider-BTicXn9n.mjs +168 -0
  30. package/fesm2022/acorex-platform-module-organization-management-client-org-chart-position-employee-node-contribution.provider-BTicXn9n.mjs.map +1 -0
  31. package/fesm2022/acorex-platform-module-organization-management-client-org-chart-ux-node-contribution.provider-C5TItnOp.mjs +338 -0
  32. package/fesm2022/acorex-platform-module-organization-management-client-org-chart-ux-node-contribution.provider-C5TItnOp.mjs.map +1 -0
  33. package/fesm2022/acorex-platform-module-organization-management-client-org-chart.page-g_3oPPH0.mjs +3744 -0
  34. package/fesm2022/acorex-platform-module-organization-management-client-org-chart.page-g_3oPPH0.mjs.map +1 -0
  35. package/fesm2022/acorex-platform-module-organization-management-client-permission-definition.provider-CiCdTBGo.mjs +43 -0
  36. package/fesm2022/acorex-platform-module-organization-management-client-permission-definition.provider-CiCdTBGo.mjs.map +1 -0
  37. package/fesm2022/acorex-platform-module-organization-management-client-remove-position-from-business-unit.command-BFQVTpfy.mjs +91 -0
  38. package/fesm2022/acorex-platform-module-organization-management-client-remove-position-from-business-unit.command-BFQVTpfy.mjs.map +1 -0
  39. package/fesm2022/acorex-platform-module-organization-management-client-replace-position-assignee.command-CSgERqLG.mjs +64 -0
  40. package/fesm2022/acorex-platform-module-organization-management-client-replace-position-assignee.command-CSgERqLG.mjs.map +1 -0
  41. package/fesm2022/acorex-platform-module-organization-management-client-responsibilities-matrix-widget-edit.component-DHmUxlnu.mjs +143 -0
  42. package/fesm2022/acorex-platform-module-organization-management-client-responsibilities-matrix-widget-edit.component-DHmUxlnu.mjs.map +1 -0
  43. package/fesm2022/acorex-platform-module-organization-management-client-responsibilities-matrix-widget-view.component-BkLZhXhM.mjs +65 -0
  44. package/fesm2022/acorex-platform-module-organization-management-client-responsibilities-matrix-widget-view.component-BkLZhXhM.mjs.map +1 -0
  45. package/fesm2022/acorex-platform-module-organization-management-client-responsibilities-matrix.component-DqO6xE2p.mjs +400 -0
  46. package/fesm2022/acorex-platform-module-organization-management-client-responsibilities-matrix.component-DqO6xE2p.mjs.map +1 -0
  47. package/fesm2022/acorex-platform-module-organization-management-client-settings.provider-Dnrkq9Ku.mjs +432 -0
  48. package/fesm2022/acorex-platform-module-organization-management-client-settings.provider-Dnrkq9Ku.mjs.map +1 -0
  49. package/fesm2022/acorex-platform-module-organization-management-client.mjs +2 -0
  50. package/fesm2022/acorex-platform-module-organization-management-client.mjs.map +1 -0
  51. package/package.json +28 -0
  52. package/types/acorex-platform-module-organization-management-client-contracts.d.ts +501 -0
  53. package/types/acorex-platform-module-organization-management-client.d.ts +273 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-organization-management-client-org-chart-position-employee-node-contribution.provider-BTicXn9n.mjs","sources":["../../../../libs/modules/organization-management/client/src/lib/features/organization-chart/contributions/org-chart-position-employee-node-contribution.provider.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport { inject, Injectable } from '@angular/core';\nimport {\n AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND,\n AXMOrganizationManagementCommandKeys,\n AXPPeopleOrganizationPermissionKeys\n} from '@acorex-platform/module-organization-management-client/contracts';\nimport { RootConfig } from '@acorex-platform/module-organization-management-client/contracts';\n\nimport {\n AXMOrgChartNodeContributionContext,\n AXMOrgChartNodeContributionProvider,\n AXMOrgChartNodeMenuAction,\n} from '../tokens/org-chart-node-contribution.token';\n\n//#endregion\n\n//#region ---- Module Constants ----\n\nconst orgChartNodeActionKey = (suffix: string): string =>\n `@organization-management:organization-chart.node-actions.${suffix}`;\n\nconst POSITION_ENTITY_SOURCE = RootConfig.entities.position.source;\n\n//#endregion\n\n/**\n * Context menu actions for org chart **position** nodes (structure / location / etc.).\n */\n@Injectable()\nexport class AXMOrgChartPositionEmployeeNodeContributionProvider implements AXMOrgChartNodeContributionProvider {\n //#region ---- Services & Dependencies ----\n\n private readonly commandService = inject(AXPCommandService);\n private readonly sessionService = inject(AXPSessionService);\n\n //#endregion\n\n //#region ---- AXMOrgChartNodeContributionProvider Implementation ----\n\n async getMenuActions(context: AXMOrgChartNodeContributionContext): Promise<AXMOrgChartNodeMenuAction[]> {\n if (context.nodeKind === 'position') {\n return this.getPositionNodeActions(context);\n }\n return [];\n }\n\n //#endregion\n\n //#region ---- Position Node Actions ----\n\n private getPositionNodeActions(context: AXMOrgChartNodeContributionContext): AXMOrgChartNodeMenuAction[] {\n const positionId = this.resolvePositionId(context);\n if (!positionId) {\n return [];\n }\n\n const businessUnitId = this.resolveBusinessUnitIdForPosition(context);\n const vacant = context.node.metadata?.['vacant'] === true;\n const occupant = context.node.metadata?.['occupant'] as Record<string, unknown> | undefined;\n const occupantEmployeeId =\n typeof occupant?.['employeeId'] === 'string' && occupant['employeeId'].trim().length > 0\n ? occupant['employeeId'].trim()\n : undefined;\n\n const canMaintainOrganization = this.authorize(AXPPeopleOrganizationPermissionKeys.MaintainOrganization);\n const canUpdateBusinessUnit = canMaintainOrganization;\n const canCreateAssignment = canMaintainOrganization;\n const canEditAssignment = canMaintainOrganization;\n\n const actions: AXMOrgChartNodeMenuAction[] = [];\n\n if (vacant && businessUnitId) {\n actions.push({\n id: 'organization-management.assign-employee-to-position-from-chart',\n title: orgChartNodeActionKey('assign-employee-to-position'),\n icon: 'fa-light fa-user-plus',\n order: 110,\n disabled: !canCreateAssignment,\n execute: async (ctx) => {\n const pid = this.resolvePositionId(ctx);\n const buId = this.resolveBusinessUnitIdForPosition(ctx);\n if (!pid || !buId) {\n return;\n }\n const result = await this.commandService.execute(AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND, {\n data: {\n businessUnitId: buId,\n positionId: pid,\n isPrimary: false,\n },\n });\n if (result?.success) {\n await ctx.refreshChart();\n }\n },\n });\n }\n\n if (!vacant && occupantEmployeeId && businessUnitId) {\n actions.push({\n id: 'organization-management.replace-position-assignee-from-chart',\n title: orgChartNodeActionKey('assign-new-employee-to-position'),\n icon: 'fa-light fa-arrows-rotate',\n order: 115,\n disabled: !canCreateAssignment || !canEditAssignment,\n execute: async (ctx) => {\n const pid = this.resolvePositionId(ctx);\n const buId = this.resolveBusinessUnitIdForPosition(ctx);\n const occ = ctx.node.metadata?.['occupant'] as Record<string, unknown> | undefined;\n const eid =\n typeof occ?.['employeeId'] === 'string' && occ['employeeId'].trim().length > 0\n ? occ['employeeId'].trim()\n : '';\n if (!pid || !buId || !eid) {\n return;\n }\n const result = await this.commandService.execute(\n AXMOrganizationManagementCommandKeys.OrganizationChart.ReplacePositionAssignee,\n { businessUnitId: buId, positionId: pid, currentEmployeeId: eid },\n );\n if (result?.success) {\n await ctx.refreshChart();\n }\n },\n });\n }\n\n if (businessUnitId) {\n actions.push({\n id: 'organization-management.remove-position-from-unit-from-chart',\n title: orgChartNodeActionKey('remove-from-unit'),\n icon: 'fa-light fa-link-slash',\n color: 'danger',\n order: 120,\n disabled: !canUpdateBusinessUnit,\n execute: async (ctx) => {\n const pid = this.resolvePositionId(ctx);\n const buId = this.resolveBusinessUnitIdForPosition(ctx);\n if (!pid || !buId) {\n return;\n }\n const occ = ctx.node.metadata?.['occupant'] as Record<string, unknown> | undefined;\n const occId =\n typeof occ?.['employeeId'] === 'string' && occ['employeeId'].trim().length > 0\n ? occ['employeeId'].trim()\n : undefined;\n const result = await this.commandService.execute(\n AXMOrganizationManagementCommandKeys.OrganizationChart.RemovePositionFromBusinessUnit,\n {\n businessUnitId: buId,\n positionId: pid,\n ...(occId ? { occupantEmployeeId: occId } : {}),\n },\n );\n if (result?.success) {\n await ctx.refreshChart();\n }\n },\n });\n }\n\n return actions;\n }\n\n //#endregion\n\n //#region ---- Resolvers & Authorization ----\n\n private authorize(permission: string): boolean {\n return this.sessionService.authorize(permission);\n }\n\n private resolvePositionId(context: AXMOrgChartNodeContributionContext): string | undefined {\n const entity = context.node.entity;\n if (entity?.id != null && this.isPositionEntityType(entity.type)) {\n const id = String(entity.id).trim();\n return id.length > 0 ? id : undefined;\n }\n const metaPid = context.node.metadata?.['positionId'];\n if (typeof metaPid === 'string' && metaPid.trim().length > 0) {\n return metaPid.trim();\n }\n return undefined;\n }\n\n private isPositionEntityType(entityType: string | undefined): boolean {\n if (!entityType || typeof entityType !== 'string') {\n return false;\n }\n return entityType === POSITION_ENTITY_SOURCE || entityType.endsWith('.Position');\n }\n\n private resolveBusinessUnitIdForPosition(context: AXMOrgChartNodeContributionContext): string | undefined {\n const meta = context.node.metadata ?? {};\n const a = meta['businessUnitId'];\n const b = meta['organizationalUnitId'];\n const raw = (typeof a === 'string' && a.trim().length > 0 ? a : typeof b === 'string' ? b : '') as string;\n const id = String(raw).trim();\n return id.length > 0 ? id : undefined;\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;AAAA;AAkBA;AAEA;AAEA,MAAM,qBAAqB,GAAG,CAAC,MAAc,KAC3C,CAAA,yDAAA,EAA4D,MAAM,CAAA,CAAE;AAEtE,MAAM,sBAAsB,GAAG,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM;AAElE;AAEA;;AAEG;MAEU,mDAAmD,CAAA;AADhE,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAyK5D,IAAA;;;IAnKC,MAAM,cAAc,CAAC,OAA2C,EAAA;AAC9D,QAAA,IAAI,OAAO,CAAC,QAAQ,KAAK,UAAU,EAAE;AACnC,YAAA,OAAO,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC;QAC7C;AACA,QAAA,OAAO,EAAE;IACX;;;AAMQ,IAAA,sBAAsB,CAAC,OAA2C,EAAA;QACxE,MAAM,UAAU,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC;QAClD,IAAI,CAAC,UAAU,EAAE;AACf,YAAA,OAAO,EAAE;QACX;QAEA,MAAM,cAAc,GAAG,IAAI,CAAC,gCAAgC,CAAC,OAAO,CAAC;AACrE,QAAA,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,KAAK,IAAI;QACzD,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAwC;QAC3F,MAAM,kBAAkB,GACtB,OAAO,QAAQ,GAAG,YAAY,CAAC,KAAK,QAAQ,IAAI,QAAQ,CAAC,YAAY,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG;AACrF,cAAE,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,QAAA,OAAO,EAAE,CAAC,MAAM,GAAG,CAAC,GAAG,EAAE,GAAG,SAAS;IACvC;8GA1KW,mDAAmD,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAnD,mDAAmD,EAAA,CAAA,CAAA;;2FAAnD,mDAAmD,EAAA,UAAA,EAAA,CAAA;kBAD/D;;;;;"}
@@ -0,0 +1,338 @@
1
+ import { AXPSessionService } from '@acorex-platform/framework-client/auth';
2
+ import { AXPCommandService } from '@acorex-platform/framework-client/runtime';
3
+ import * as i0 from '@angular/core';
4
+ import { inject, Injectable } from '@angular/core';
5
+ import { RootConfig, AXPPeopleOrganizationPermissionKeys, AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND } from '@acorex-platform/module-organization-management-client/contracts';
6
+ import { h as AXM_ORG_CHART_LAYOUT_SUBMENU_ICON, i as AXM_ORG_CHART_LAYOUT_SUBMENU_TITLE_I18N_KEY, j as AXM_ORG_CHART_LAYOUT_SUBMENU_GROUP_ID, A as AXMOrgChartNodeType } from './acorex-platform-module-organization-management-client-acorex-platform-module-organization-management-client-Dn8Ss1nL.mjs';
7
+
8
+ //#region ---- Imports ----
9
+ //#endregion
10
+ //#region ---- Constants ----
11
+ const actionKey = (suffix) => `@organization-management:organization-chart.node-actions.${suffix}`;
12
+ const TENANT_VIEW_PERMISSION = 'ApplicationsPlatform:Permission:MaintainTenants';
13
+ const POSITION_ENTITY_SOURCE = RootConfig.entities.position.source;
14
+ const BUSINESS_UNIT_ENTITY_SOURCE = RootConfig.entities.businessUnit.source;
15
+ const TENANT_ENTITY_SOURCE = 'TenantManagement.Tenant';
16
+ const COMPANY_ENTITY_SOURCE = RootConfig.entities.company.source;
17
+ //#endregion
18
+ /**
19
+ * Org chart context menus: open record details, nested expand/collapse, multi-seat assign, HR stubs.
20
+ */
21
+ class AXMOrgChartUxNodeContributionProvider {
22
+ constructor() {
23
+ //#region ---- Services & Dependencies ----
24
+ this.commandService = inject(AXPCommandService);
25
+ this.sessionService = inject(AXPSessionService);
26
+ this.tenantEntityInfo = {
27
+ module: 'TenantManagement',
28
+ name: 'Tenant',
29
+ title: '@tenant-management:tenants.entities.tenant.title',
30
+ };
31
+ this.companyEntityInfo = {
32
+ module: RootConfig.module.name,
33
+ name: RootConfig.entities.company.name,
34
+ title: RootConfig.entities.company.title,
35
+ };
36
+ }
37
+ //#endregion
38
+ //#region ---- AXMOrgChartNodeContributionProvider ----
39
+ async getMenuActions(context) {
40
+ const actions = [
41
+ ...this.getCrossCuttingActions(context),
42
+ ...this.getKindSpecificActions(context),
43
+ ];
44
+ return actions;
45
+ }
46
+ //#endregion
47
+ //#region ---- Cross-cutting ----
48
+ getCrossCuttingActions(context) {
49
+ const hasChildren = (context.node.children?.length ?? 0) > 0;
50
+ const expanded = context.node.isExpanded !== false;
51
+ return [
52
+ {
53
+ id: 'organization-management.org-chart.toggle-detail-panel',
54
+ title: actionKey('toggle-detail-panel'),
55
+ icon: 'fa-light fa-sidebar',
56
+ /** After Communication and structure actions; before Remove (120). */
57
+ order: 117,
58
+ break: 'before',
59
+ submenuGroupId: AXM_ORG_CHART_LAYOUT_SUBMENU_GROUP_ID,
60
+ submenuGroupTitle: AXM_ORG_CHART_LAYOUT_SUBMENU_TITLE_I18N_KEY,
61
+ submenuGroupIcon: AXM_ORG_CHART_LAYOUT_SUBMENU_ICON,
62
+ /** Separator before expand/collapse nested rows (never on the last row — that leaves a stray rule and gap). */
63
+ submenuSectionBreak: true,
64
+ execute: async (ctx) => {
65
+ ctx.host.toggleDetailPanel();
66
+ },
67
+ },
68
+ {
69
+ id: 'organization-management.org-chart.expand-branch',
70
+ title: actionKey('expand'),
71
+ icon: 'fa-light fa-square-plus',
72
+ order: 118,
73
+ submenuGroupId: AXM_ORG_CHART_LAYOUT_SUBMENU_GROUP_ID,
74
+ submenuGroupTitle: AXM_ORG_CHART_LAYOUT_SUBMENU_TITLE_I18N_KEY,
75
+ submenuGroupIcon: AXM_ORG_CHART_LAYOUT_SUBMENU_ICON,
76
+ disabled: !hasChildren || expanded,
77
+ execute: async (ctx) => {
78
+ ctx.host.setNodeBranchExpanded(ctx.node, true);
79
+ },
80
+ },
81
+ {
82
+ id: 'organization-management.org-chart.collapse-branch',
83
+ title: actionKey('collapse'),
84
+ icon: 'fa-light fa-square-minus',
85
+ order: 119,
86
+ submenuGroupId: AXM_ORG_CHART_LAYOUT_SUBMENU_GROUP_ID,
87
+ submenuGroupTitle: AXM_ORG_CHART_LAYOUT_SUBMENU_TITLE_I18N_KEY,
88
+ submenuGroupIcon: AXM_ORG_CHART_LAYOUT_SUBMENU_ICON,
89
+ /** Trailing group break: separator after the View & Layout row on the root menu (inner last-row break is normalized away). */
90
+ break: 'after',
91
+ disabled: !hasChildren || !expanded,
92
+ execute: async (ctx) => {
93
+ ctx.host.setNodeBranchExpanded(ctx.node, false);
94
+ },
95
+ },
96
+ ];
97
+ }
98
+ //#endregion
99
+ //#region ---- Kind-specific ----
100
+ /**
101
+ * **Open** — `Entity:OpenDetails` (navigate to entity view route).
102
+ */
103
+ buildOpenDetailsAction(args) {
104
+ return {
105
+ id: args.id,
106
+ title: actionKey('open'),
107
+ icon: 'fa-light fa-arrow-up-right-from-square',
108
+ order: args.order ?? 20,
109
+ break: args.breakAfter,
110
+ disabled: !args.canOpen,
111
+ execute: async (ctx) => {
112
+ const spec = args.resolve(ctx);
113
+ if (!spec) {
114
+ return;
115
+ }
116
+ await this.commandService.execute('Entity:OpenDetails', {
117
+ entity: spec.entity,
118
+ data: { id: spec.id },
119
+ });
120
+ },
121
+ };
122
+ }
123
+ getKindSpecificActions(context) {
124
+ switch (context.nodeKind) {
125
+ case 'company-root':
126
+ return this.getCompanyRootActions(context);
127
+ case 'business-unit':
128
+ return this.getBusinessUnitActions(context);
129
+ case 'position':
130
+ return this.getPositionActions(context);
131
+ default:
132
+ return [];
133
+ }
134
+ }
135
+ getCompanyRootActions(context) {
136
+ const viewTarget = this.resolveCompanyRootViewTarget(context.node);
137
+ if (!viewTarget) {
138
+ return [];
139
+ }
140
+ let canOpen = true;
141
+ if (viewTarget.kind === 'tenant') {
142
+ canOpen =
143
+ canOpen &&
144
+ (this.authorize(TENANT_VIEW_PERMISSION) ||
145
+ this.authorize(AXPPeopleOrganizationPermissionKeys.ViewOrganization) ||
146
+ this.authorize(AXPPeopleOrganizationPermissionKeys.MaintainOrganization));
147
+ }
148
+ else if (viewTarget.kind === 'company') {
149
+ canOpen =
150
+ canOpen &&
151
+ (this.authorize(AXPPeopleOrganizationPermissionKeys.ViewOrganization) ||
152
+ this.authorize(AXPPeopleOrganizationPermissionKeys.MaintainOrganization));
153
+ }
154
+ return [
155
+ this.buildOpenDetailsAction({
156
+ id: 'organization-management.org-chart.open-details',
157
+ canOpen,
158
+ breakAfter: 'after',
159
+ resolve: (ctx) => {
160
+ const target = this.resolveCompanyRootViewTarget(ctx.node);
161
+ return target ? { entity: target.source, id: target.id } : null;
162
+ },
163
+ }),
164
+ ];
165
+ }
166
+ getBusinessUnitActions(context) {
167
+ const businessUnitId = this.resolveBusinessUnitId(context);
168
+ const canView = this.authorize(AXPPeopleOrganizationPermissionKeys.ViewOrganization) ||
169
+ this.authorize(AXPPeopleOrganizationPermissionKeys.MaintainOrganization);
170
+ return [
171
+ ...(businessUnitId
172
+ ? [
173
+ this.buildOpenDetailsAction({
174
+ id: 'organization-management.org-chart.open-details',
175
+ canOpen: canView,
176
+ breakAfter: 'after',
177
+ resolve: (ctx) => {
178
+ const id = this.resolveBusinessUnitId(ctx);
179
+ return id ? { entity: BUSINESS_UNIT_ENTITY_SOURCE, id } : null;
180
+ },
181
+ }),
182
+ ]
183
+ : []),
184
+ ];
185
+ }
186
+ getPositionActions(context) {
187
+ const positionId = this.resolvePositionId(context);
188
+ const businessUnitId = this.resolveBusinessUnitIdForPosition(context);
189
+ const capacity = this.resolvePositionCapacity(context.node);
190
+ const filled = this.resolveFilledAssignmentCount(context.node);
191
+ const canViewPosition = this.authorize(AXPPeopleOrganizationPermissionKeys.ViewOrganization) ||
192
+ this.authorize(AXPPeopleOrganizationPermissionKeys.MaintainOrganization);
193
+ const canAssignMore = this.authorize(AXPPeopleOrganizationPermissionKeys.MaintainOrganization) &&
194
+ capacity > 1 &&
195
+ filled < capacity &&
196
+ Boolean(positionId) &&
197
+ Boolean(businessUnitId);
198
+ return [
199
+ ...(positionId
200
+ ? [
201
+ this.buildOpenDetailsAction({
202
+ id: 'organization-management.org-chart.open-details',
203
+ canOpen: canViewPosition,
204
+ breakAfter: 'after',
205
+ resolve: (ctx) => {
206
+ const id = this.resolvePositionId(ctx);
207
+ return id ? { entity: POSITION_ENTITY_SOURCE, id } : null;
208
+ },
209
+ }),
210
+ ]
211
+ : []),
212
+ {
213
+ id: 'organization-management.org-chart.add-additional-assignee',
214
+ title: actionKey('add-additional-assignee'),
215
+ icon: 'fa-light fa-user-plus',
216
+ order: 108,
217
+ disabled: !canAssignMore,
218
+ execute: async (ctx) => {
219
+ const pid = this.resolvePositionId(ctx);
220
+ const buId = this.resolveBusinessUnitIdForPosition(ctx);
221
+ if (!pid || !buId) {
222
+ return;
223
+ }
224
+ const result = await this.commandService.execute(AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND, {
225
+ data: {
226
+ businessUnitId: buId,
227
+ positionId: pid,
228
+ isPrimary: false,
229
+ },
230
+ });
231
+ if (result?.success) {
232
+ await ctx.refreshChart();
233
+ }
234
+ },
235
+ },
236
+ ];
237
+ }
238
+ //#endregion
239
+ //#region ---- Resolvers ----
240
+ authorize(permission) {
241
+ return this.sessionService.authorize(permission);
242
+ }
243
+ resolveCompanyRootViewTarget(node) {
244
+ const ent = node.entity;
245
+ if (!ent?.id) {
246
+ return null;
247
+ }
248
+ const id = String(ent.id).trim();
249
+ if (!id) {
250
+ return null;
251
+ }
252
+ const rawType = String(ent.type ?? '').trim();
253
+ if (rawType === 'tenant' || rawType.endsWith('.Tenant')) {
254
+ return { kind: 'tenant', source: TENANT_ENTITY_SOURCE, entityInfo: this.tenantEntityInfo, id };
255
+ }
256
+ if (rawType === COMPANY_ENTITY_SOURCE || rawType.endsWith('.Company')) {
257
+ return { kind: 'company', source: COMPANY_ENTITY_SOURCE, entityInfo: this.companyEntityInfo, id };
258
+ }
259
+ return null;
260
+ }
261
+ resolveBusinessUnitId(context) {
262
+ if (context.nodeKind === 'business-unit') {
263
+ const fromEntity = context.node.entity?.id;
264
+ const entityId = fromEntity != null && String(fromEntity).trim().length > 0 ? String(fromEntity).trim() : undefined;
265
+ return (entityId ??
266
+ context.node.metadata?.['businessUnitId']?.trim() ??
267
+ context.node.metadata?.['unitId']?.trim());
268
+ }
269
+ return undefined;
270
+ }
271
+ resolvePositionId(context) {
272
+ const entity = context.node.entity;
273
+ if (entity?.id != null && this.isPositionEntityType(entity.type)) {
274
+ const id = String(entity.id).trim();
275
+ return id.length > 0 ? id : undefined;
276
+ }
277
+ const metaPid = context.node.metadata?.['positionId'];
278
+ if (typeof metaPid === 'string' && metaPid.trim().length > 0) {
279
+ return metaPid.trim();
280
+ }
281
+ return undefined;
282
+ }
283
+ isPositionEntityType(entityType) {
284
+ if (!entityType || typeof entityType !== 'string') {
285
+ return false;
286
+ }
287
+ return entityType === POSITION_ENTITY_SOURCE || entityType.endsWith('.Position');
288
+ }
289
+ resolveBusinessUnitIdForPosition(context) {
290
+ const meta = context.node.metadata ?? {};
291
+ const a = meta['businessUnitId'];
292
+ const b = meta['organizationalUnitId'];
293
+ const raw = (typeof a === 'string' && a.trim().length > 0 ? a : typeof b === 'string' ? b : '');
294
+ const id = String(raw).trim();
295
+ return id.length > 0 ? id : undefined;
296
+ }
297
+ resolvePositionCapacity(node) {
298
+ const meta = node.metadata ?? {};
299
+ const raw = meta['capacity'];
300
+ if (typeof raw === 'number' && Number.isFinite(raw) && raw >= 1) {
301
+ return Math.floor(raw);
302
+ }
303
+ if (typeof raw === 'string') {
304
+ const n = Number(raw.trim());
305
+ if (Number.isFinite(n) && n >= 1) {
306
+ return Math.floor(n);
307
+ }
308
+ }
309
+ return 1;
310
+ }
311
+ resolveFilledAssignmentCount(node) {
312
+ const meta = node.metadata ?? {};
313
+ const fromMeta = meta['activeAssignmentCount'];
314
+ if (typeof fromMeta === 'number' && Number.isFinite(fromMeta) && fromMeta >= 0) {
315
+ return Math.floor(fromMeta);
316
+ }
317
+ const employeeChildren = node.children?.filter((c) => c.type === AXMOrgChartNodeType.Employee).length ?? 0;
318
+ if (employeeChildren > 0) {
319
+ return employeeChildren;
320
+ }
321
+ if (meta['vacant'] === true) {
322
+ return 0;
323
+ }
324
+ const occ = meta['occupant'];
325
+ if (typeof occ?.['employeeId'] === 'string' && occ['employeeId'].trim().length > 0) {
326
+ return 1;
327
+ }
328
+ return 0;
329
+ }
330
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMOrgChartUxNodeContributionProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
331
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMOrgChartUxNodeContributionProvider }); }
332
+ }
333
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMOrgChartUxNodeContributionProvider, decorators: [{
334
+ type: Injectable
335
+ }] });
336
+
337
+ export { AXMOrgChartUxNodeContributionProvider };
338
+ //# sourceMappingURL=acorex-platform-module-organization-management-client-org-chart-ux-node-contribution.provider-C5TItnOp.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-organization-management-client-org-chart-ux-node-contribution.provider-C5TItnOp.mjs","sources":["../../../../libs/modules/organization-management/client/src/lib/features/organization-chart/contributions/org-chart-ux-node-contribution.provider.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport { inject, Injectable } from '@angular/core';\nimport {\n AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND,\n AXPPeopleOrganizationPermissionKeys\n} from '@acorex-platform/module-organization-management-client/contracts';\nimport { RootConfig } from '@acorex-platform/module-organization-management-client/contracts';\n\nimport {\n AXM_ORG_CHART_LAYOUT_SUBMENU_GROUP_ID,\n AXM_ORG_CHART_LAYOUT_SUBMENU_ICON,\n AXM_ORG_CHART_LAYOUT_SUBMENU_TITLE_I18N_KEY,\n} from '../constants/org-chart-layout-submenu.const';\nimport {\n AXMOrgChartNodeContributionContext,\n AXMOrgChartNodeContributionProvider,\n AXMOrgChartNodeMenuAction,\n} from '../tokens/org-chart-node-contribution.token';\nimport { AXMOrgChartNodeType, AXMOrganizationNode } from '../model/org-chart.type';\n\n//#endregion\n\n//#region ---- Constants ----\n\nconst actionKey = (suffix: string): string =>\n `@organization-management:organization-chart.node-actions.${suffix}`;\n\nconst TENANT_VIEW_PERMISSION = 'ApplicationsPlatform:Permission:MaintainTenants';\n\nconst POSITION_ENTITY_SOURCE = RootConfig.entities.position.source;\n\nconst BUSINESS_UNIT_ENTITY_SOURCE = RootConfig.entities.businessUnit.source;\n\nconst TENANT_ENTITY_SOURCE = 'TenantManagement.Tenant';\n\nconst COMPANY_ENTITY_SOURCE = RootConfig.entities.company.source;\n\n//#endregion\n\n/**\n * Org chart context menus: open record details, nested expand/collapse, multi-seat assign, HR stubs.\n */\n@Injectable()\nexport class AXMOrgChartUxNodeContributionProvider implements AXMOrgChartNodeContributionProvider {\n //#region ---- Services & Dependencies ----\n\n private readonly commandService = inject(AXPCommandService);\n private readonly sessionService = inject(AXPSessionService);\n\n private readonly tenantEntityInfo = {\n module: 'TenantManagement',\n name: 'Tenant',\n title: '@tenant-management:tenants.entities.tenant.title',\n };\n\n private readonly companyEntityInfo = {\n module: RootConfig.module.name,\n name: RootConfig.entities.company.name,\n title: RootConfig.entities.company.title,\n };\n\n //#endregion\n\n //#region ---- AXMOrgChartNodeContributionProvider ----\n\n async getMenuActions(context: AXMOrgChartNodeContributionContext): Promise<AXMOrgChartNodeMenuAction[]> {\n const actions: AXMOrgChartNodeMenuAction[] = [\n ...this.getCrossCuttingActions(context),\n ...this.getKindSpecificActions(context),\n ];\n return actions;\n }\n\n //#endregion\n\n //#region ---- Cross-cutting ----\n\n private getCrossCuttingActions(context: AXMOrgChartNodeContributionContext): AXMOrgChartNodeMenuAction[] {\n const hasChildren = (context.node.children?.length ?? 0) > 0;\n const expanded = context.node.isExpanded !== false;\n\n return [\n {\n id: 'organization-management.org-chart.toggle-detail-panel',\n title: actionKey('toggle-detail-panel'),\n icon: 'fa-light fa-sidebar',\n /** After Communication and structure actions; before Remove (120). */\n order: 117,\n break: 'before',\n submenuGroupId: AXM_ORG_CHART_LAYOUT_SUBMENU_GROUP_ID,\n submenuGroupTitle: AXM_ORG_CHART_LAYOUT_SUBMENU_TITLE_I18N_KEY,\n submenuGroupIcon: AXM_ORG_CHART_LAYOUT_SUBMENU_ICON,\n /** Separator before expand/collapse nested rows (never on the last row — that leaves a stray rule and gap). */\n submenuSectionBreak: true,\n execute: async (ctx) => {\n ctx.host.toggleDetailPanel();\n },\n },\n {\n id: 'organization-management.org-chart.expand-branch',\n title: actionKey('expand'),\n icon: 'fa-light fa-square-plus',\n order: 118,\n submenuGroupId: AXM_ORG_CHART_LAYOUT_SUBMENU_GROUP_ID,\n submenuGroupTitle: AXM_ORG_CHART_LAYOUT_SUBMENU_TITLE_I18N_KEY,\n submenuGroupIcon: AXM_ORG_CHART_LAYOUT_SUBMENU_ICON,\n disabled: !hasChildren || expanded,\n execute: async (ctx) => {\n ctx.host.setNodeBranchExpanded(ctx.node, true);\n },\n },\n {\n id: 'organization-management.org-chart.collapse-branch',\n title: actionKey('collapse'),\n icon: 'fa-light fa-square-minus',\n order: 119,\n submenuGroupId: AXM_ORG_CHART_LAYOUT_SUBMENU_GROUP_ID,\n submenuGroupTitle: AXM_ORG_CHART_LAYOUT_SUBMENU_TITLE_I18N_KEY,\n submenuGroupIcon: AXM_ORG_CHART_LAYOUT_SUBMENU_ICON,\n /** Trailing group break: separator after the View & Layout row on the root menu (inner last-row break is normalized away). */\n break: 'after',\n disabled: !hasChildren || !expanded,\n execute: async (ctx) => {\n ctx.host.setNodeBranchExpanded(ctx.node, false);\n },\n },\n ];\n }\n\n //#endregion\n\n //#region ---- Kind-specific ----\n\n /**\n * **Open** — `Entity:OpenDetails` (navigate to entity view route).\n */\n private buildOpenDetailsAction(args: {\n id: string;\n canOpen: boolean;\n breakAfter?: 'after';\n order?: number;\n resolve: (ctx: AXMOrgChartNodeContributionContext) => { entity: string; id: string } | null;\n }): AXMOrgChartNodeMenuAction {\n return {\n id: args.id,\n title: actionKey('open'),\n icon: 'fa-light fa-arrow-up-right-from-square',\n order: args.order ?? 20,\n break: args.breakAfter,\n disabled: !args.canOpen,\n execute: async (ctx) => {\n const spec = args.resolve(ctx);\n if (!spec) {\n return;\n }\n await this.commandService.execute('Entity:OpenDetails', {\n entity: spec.entity,\n data: { id: spec.id },\n });\n },\n };\n }\n\n private getKindSpecificActions(context: AXMOrgChartNodeContributionContext): AXMOrgChartNodeMenuAction[] {\n switch (context.nodeKind) {\n case 'company-root':\n return this.getCompanyRootActions(context);\n case 'business-unit':\n return this.getBusinessUnitActions(context);\n case 'position':\n return this.getPositionActions(context);\n default:\n return [];\n }\n }\n\n private getCompanyRootActions(context: AXMOrgChartNodeContributionContext): AXMOrgChartNodeMenuAction[] {\n const viewTarget = this.resolveCompanyRootViewTarget(context.node);\n if (!viewTarget) {\n return [];\n }\n let canOpen = true;\n if (viewTarget.kind === 'tenant') {\n canOpen =\n canOpen &&\n (this.authorize(TENANT_VIEW_PERMISSION) ||\n this.authorize(AXPPeopleOrganizationPermissionKeys.ViewOrganization) ||\n this.authorize(AXPPeopleOrganizationPermissionKeys.MaintainOrganization));\n } else if (viewTarget.kind === 'company') {\n canOpen =\n canOpen &&\n (this.authorize(AXPPeopleOrganizationPermissionKeys.ViewOrganization) ||\n this.authorize(AXPPeopleOrganizationPermissionKeys.MaintainOrganization));\n }\n\n return [\n this.buildOpenDetailsAction({\n id: 'organization-management.org-chart.open-details',\n canOpen,\n breakAfter: 'after',\n resolve: (ctx) => {\n const target = this.resolveCompanyRootViewTarget(ctx.node);\n return target ? { entity: target.source, id: target.id } : null;\n },\n }),\n ];\n }\n\n private getBusinessUnitActions(context: AXMOrgChartNodeContributionContext): AXMOrgChartNodeMenuAction[] {\n const businessUnitId = this.resolveBusinessUnitId(context);\n const canView =\n this.authorize(AXPPeopleOrganizationPermissionKeys.ViewOrganization) ||\n this.authorize(AXPPeopleOrganizationPermissionKeys.MaintainOrganization);\n\n return [\n ...(businessUnitId\n ? [\n this.buildOpenDetailsAction({\n id: 'organization-management.org-chart.open-details',\n canOpen: canView,\n breakAfter: 'after',\n resolve: (ctx) => {\n const id = this.resolveBusinessUnitId(ctx);\n return id ? { entity: BUSINESS_UNIT_ENTITY_SOURCE, id } : null;\n },\n }),\n ]\n : []),\n ];\n }\n\n private getPositionActions(context: AXMOrgChartNodeContributionContext): AXMOrgChartNodeMenuAction[] {\n const positionId = this.resolvePositionId(context);\n const businessUnitId = this.resolveBusinessUnitIdForPosition(context);\n const capacity = this.resolvePositionCapacity(context.node);\n const filled = this.resolveFilledAssignmentCount(context.node);\n const canViewPosition =\n this.authorize(AXPPeopleOrganizationPermissionKeys.ViewOrganization) ||\n this.authorize(AXPPeopleOrganizationPermissionKeys.MaintainOrganization);\n const canAssignMore =\n this.authorize(AXPPeopleOrganizationPermissionKeys.MaintainOrganization) &&\n capacity > 1 &&\n filled < capacity &&\n Boolean(positionId) &&\n Boolean(businessUnitId);\n\n return [\n ...(positionId\n ? [\n this.buildOpenDetailsAction({\n id: 'organization-management.org-chart.open-details',\n canOpen: canViewPosition,\n breakAfter: 'after',\n resolve: (ctx) => {\n const id = this.resolvePositionId(ctx);\n return id ? { entity: POSITION_ENTITY_SOURCE, id } : null;\n },\n }),\n ]\n : []),\n {\n id: 'organization-management.org-chart.add-additional-assignee',\n title: actionKey('add-additional-assignee'),\n icon: 'fa-light fa-user-plus',\n order: 108,\n disabled: !canAssignMore,\n execute: async (ctx) => {\n const pid = this.resolvePositionId(ctx);\n const buId = this.resolveBusinessUnitIdForPosition(ctx);\n if (!pid || !buId) {\n return;\n }\n const result = await this.commandService.execute(AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND, {\n data: {\n businessUnitId: buId,\n positionId: pid,\n isPrimary: false,\n },\n });\n if (result?.success) {\n await ctx.refreshChart();\n }\n },\n },\n ];\n }\n\n //#endregion\n\n //#region ---- Resolvers ----\n\n private authorize(permission: string): boolean {\n return this.sessionService.authorize(permission);\n }\n\n private resolveCompanyRootViewTarget(\n node: AXMOrganizationNode,\n ): { kind: 'tenant' | 'company'; source: string; entityInfo: Record<string, string>; id: string } | null {\n const ent = node.entity;\n if (!ent?.id) {\n return null;\n }\n const id = String(ent.id).trim();\n if (!id) {\n return null;\n }\n const rawType = String(ent.type ?? '').trim();\n if (rawType === 'tenant' || rawType.endsWith('.Tenant')) {\n return { kind: 'tenant', source: TENANT_ENTITY_SOURCE, entityInfo: this.tenantEntityInfo, id };\n }\n if (rawType === COMPANY_ENTITY_SOURCE || rawType.endsWith('.Company')) {\n return { kind: 'company', source: COMPANY_ENTITY_SOURCE, entityInfo: this.companyEntityInfo, id };\n }\n return null;\n }\n\n private resolveBusinessUnitId(context: AXMOrgChartNodeContributionContext): string | undefined {\n if (context.nodeKind === 'business-unit') {\n const fromEntity = context.node.entity?.id;\n const entityId =\n fromEntity != null && String(fromEntity).trim().length > 0 ? String(fromEntity).trim() : undefined;\n return (\n entityId ??\n (context.node.metadata?.['businessUnitId'] as string | undefined)?.trim() ??\n (context.node.metadata?.['unitId'] as string | undefined)?.trim()\n );\n }\n return undefined;\n }\n\n private resolvePositionId(context: AXMOrgChartNodeContributionContext): string | undefined {\n const entity = context.node.entity;\n if (entity?.id != null && this.isPositionEntityType(entity.type)) {\n const id = String(entity.id).trim();\n return id.length > 0 ? id : undefined;\n }\n const metaPid = context.node.metadata?.['positionId'];\n if (typeof metaPid === 'string' && metaPid.trim().length > 0) {\n return metaPid.trim();\n }\n return undefined;\n }\n\n private isPositionEntityType(entityType: string | undefined): boolean {\n if (!entityType || typeof entityType !== 'string') {\n return false;\n }\n return entityType === POSITION_ENTITY_SOURCE || entityType.endsWith('.Position');\n }\n\n private resolveBusinessUnitIdForPosition(context: AXMOrgChartNodeContributionContext): string | undefined {\n const meta = context.node.metadata ?? {};\n const a = meta['businessUnitId'];\n const b = meta['organizationalUnitId'];\n const raw = (typeof a === 'string' && a.trim().length > 0 ? a : typeof b === 'string' ? b : '') as string;\n const id = String(raw).trim();\n return id.length > 0 ? id : undefined;\n }\n\n private resolvePositionCapacity(node: AXMOrganizationNode): number {\n const meta = node.metadata ?? {};\n const raw = meta['capacity'];\n if (typeof raw === 'number' && Number.isFinite(raw) && raw >= 1) {\n return Math.floor(raw);\n }\n if (typeof raw === 'string') {\n const n = Number(raw.trim());\n if (Number.isFinite(n) && n >= 1) {\n return Math.floor(n);\n }\n }\n return 1;\n }\n\n private resolveFilledAssignmentCount(node: AXMOrganizationNode): number {\n const meta = node.metadata ?? {};\n const fromMeta = meta['activeAssignmentCount'];\n if (typeof fromMeta === 'number' && Number.isFinite(fromMeta) && fromMeta >= 0) {\n return Math.floor(fromMeta);\n }\n const employeeChildren =\n node.children?.filter((c) => c.type === AXMOrgChartNodeType.Employee).length ?? 0;\n if (employeeChildren > 0) {\n return employeeChildren;\n }\n if (meta['vacant'] === true) {\n return 0;\n }\n const occ = meta['occupant'] as Record<string, unknown> | undefined;\n if (typeof occ?.['employeeId'] === 'string' && occ['employeeId'].trim().length > 0) {\n return 1;\n }\n return 0;\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;;AAAA;AAuBA;AAEA;AAEA,MAAM,SAAS,GAAG,CAAC,MAAc,KAC/B,CAAA,yDAAA,EAA4D,MAAM,CAAA,CAAE;AA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