@acorex/modules 19.2.4 → 19.2.5

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 (77) hide show
  1. package/fesm2022/{acorex-modules-application-management-module-designer.component-uLfQYtpy.mjs → acorex-modules-application-management-module-designer.component-kMtkkid-.mjs} +2 -2
  2. package/fesm2022/{acorex-modules-application-management-module-designer.component-uLfQYtpy.mjs.map → acorex-modules-application-management-module-designer.component-kMtkkid-.mjs.map} +1 -1
  3. package/fesm2022/acorex-modules-application-management.mjs +2 -2
  4. package/fesm2022/acorex-modules-application-management.mjs.map +1 -1
  5. package/fesm2022/{acorex-modules-auth-acorex-modules-auth-C-qPiQhk.mjs → acorex-modules-auth-acorex-modules-auth-CcRRSTGN.mjs} +11 -11
  6. package/fesm2022/{acorex-modules-auth-acorex-modules-auth-C-qPiQhk.mjs.map → acorex-modules-auth-acorex-modules-auth-CcRRSTGN.mjs.map} +1 -1
  7. package/fesm2022/{acorex-modules-auth-app-chooser.component-j3JgxtBC.mjs → acorex-modules-auth-app-chooser.component-DuRnQda8.mjs} +2 -2
  8. package/fesm2022/{acorex-modules-auth-app-chooser.component-j3JgxtBC.mjs.map → acorex-modules-auth-app-chooser.component-DuRnQda8.mjs.map} +1 -1
  9. package/fesm2022/{acorex-modules-auth-login.module-nqFBpUaE.mjs → acorex-modules-auth-login.module-ua9uEgUG.mjs} +4 -4
  10. package/fesm2022/{acorex-modules-auth-login.module-nqFBpUaE.mjs.map → acorex-modules-auth-login.module-ua9uEgUG.mjs.map} +1 -1
  11. package/fesm2022/{acorex-modules-auth-master.layout-C9eKuJgU.mjs → acorex-modules-auth-master.layout-KNzdjwP6.mjs} +2 -2
  12. package/fesm2022/{acorex-modules-auth-master.layout-C9eKuJgU.mjs.map → acorex-modules-auth-master.layout-KNzdjwP6.mjs.map} +1 -1
  13. package/fesm2022/{acorex-modules-auth-password.component-DZ6TiNI-.mjs → acorex-modules-auth-password.component-BVoPZUG9.mjs} +2 -2
  14. package/fesm2022/{acorex-modules-auth-password.component-DZ6TiNI-.mjs.map → acorex-modules-auth-password.component-BVoPZUG9.mjs.map} +1 -1
  15. package/fesm2022/{acorex-modules-auth-password.component-3t_WqB4c.mjs → acorex-modules-auth-password.component-CIwOjQRh.mjs} +3 -3
  16. package/fesm2022/{acorex-modules-auth-password.component-3t_WqB4c.mjs.map → acorex-modules-auth-password.component-CIwOjQRh.mjs.map} +1 -1
  17. package/fesm2022/{acorex-modules-auth-routes-nnrAlvkD.mjs → acorex-modules-auth-routes-hR3jePok.mjs} +2 -2
  18. package/fesm2022/{acorex-modules-auth-routes-nnrAlvkD.mjs.map → acorex-modules-auth-routes-hR3jePok.mjs.map} +1 -1
  19. package/fesm2022/{acorex-modules-auth-two-factor.module-DWtEYnHW.mjs → acorex-modules-auth-two-factor.module-CKe_H_-u.mjs} +2 -2
  20. package/fesm2022/{acorex-modules-auth-two-factor.module-DWtEYnHW.mjs.map → acorex-modules-auth-two-factor.module-CKe_H_-u.mjs.map} +1 -1
  21. package/fesm2022/acorex-modules-auth.mjs +1 -1
  22. package/fesm2022/acorex-modules-conversation.mjs +7 -7
  23. package/fesm2022/acorex-modules-conversation.mjs.map +1 -1
  24. package/fesm2022/{acorex-modules-form-template-management-template-picker.component-DW0iMqAA.mjs → acorex-modules-form-template-management-template-picker.component-CG-_1tWi.mjs} +2 -2
  25. package/fesm2022/{acorex-modules-form-template-management-template-picker.component-DW0iMqAA.mjs.map → acorex-modules-form-template-management-template-picker.component-CG-_1tWi.mjs.map} +1 -1
  26. package/fesm2022/acorex-modules-form-template-management.mjs +1 -1
  27. package/fesm2022/acorex-modules-notification-management.mjs +144 -2
  28. package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
  29. package/fesm2022/{acorex-modules-organization-managment-employee.entity-oo5Tyyp2.mjs → acorex-modules-organization-managment-employee.entity-D4BSxGAW.mjs} +40 -2
  30. package/fesm2022/acorex-modules-organization-managment-employee.entity-D4BSxGAW.mjs.map +1 -0
  31. package/fesm2022/acorex-modules-organization-managment-org-chart-configuration.page-Dc6c7GmB.mjs +310 -0
  32. package/fesm2022/acorex-modules-organization-managment-org-chart-configuration.page-Dc6c7GmB.mjs.map +1 -0
  33. package/fesm2022/acorex-modules-organization-managment-org-chart.page-CTHNSn2n.mjs +505 -0
  34. package/fesm2022/acorex-modules-organization-managment-org-chart.page-CTHNSn2n.mjs.map +1 -0
  35. package/fesm2022/acorex-modules-organization-managment-setting.keys-CF6Giykz.mjs +22 -0
  36. package/fesm2022/acorex-modules-organization-managment-setting.keys-CF6Giykz.mjs.map +1 -0
  37. package/fesm2022/{acorex-modules-organization-managment-setting.provider-BtkaTjLS.mjs → acorex-modules-organization-managment-setting.provider-nKs53GcA.mjs} +2 -20
  38. package/fesm2022/acorex-modules-organization-managment-setting.provider-nKs53GcA.mjs.map +1 -0
  39. package/fesm2022/acorex-modules-organization-managment.mjs +44 -27
  40. package/fesm2022/acorex-modules-organization-managment.mjs.map +1 -1
  41. package/fesm2022/acorex-modules-platform-management.mjs +392 -145
  42. package/fesm2022/acorex-modules-platform-management.mjs.map +1 -1
  43. package/organization-managment/lib/const.d.ts +12 -0
  44. package/organization-managment/lib/features/organization-chart/org-chart-configuration.page.d.ts +141 -0
  45. package/organization-managment/lib/features/organization-chart/org-chart-print.service.d.ts +22 -0
  46. package/organization-managment/lib/features/organization-chart/org-chart.page.d.ts +162 -0
  47. package/organization-managment/lib/features/organization-chart/org-chart.service.d.ts +35 -0
  48. package/organization-managment/lib/features/organization-chart/org-chart.type.d.ts +25 -0
  49. package/organization-managment/lib/setting.keys.d.ts +2 -1
  50. package/package.json +5 -5
  51. package/platform-management/index.d.ts +1 -0
  52. package/platform-management/lib/const.d.ts +2 -0
  53. package/platform-management/lib/entities/app-term/app-term.types.d.ts +12 -2
  54. package/platform-management/lib/entities/app-term/components/notify-app/notify-app.component.d.ts +16 -0
  55. package/platform-management/lib/entities/app-term/index.d.ts +2 -0
  56. package/platform-management/lib/entities/app-term/pages/index.d.ts +1 -0
  57. package/platform-management/lib/entities/app-term/pages/list/list-terms.component.d.ts +20 -0
  58. package/platform-management/lib/entities/app-term/workflows/index.d.ts +1 -0
  59. package/platform-management/lib/entities/app-term/workflows/notify-new-term.workflow.d.ts +15 -0
  60. package/platform-management/lib/entities/app-version/app-version.types.d.ts +7 -0
  61. package/platform-management/lib/entities/app-version/components/index.d.ts +2 -0
  62. package/platform-management/lib/entities/app-version/components/list-versions/list-version.component.d.ts +13 -0
  63. package/platform-management/lib/entities/app-version/{workflow/test/test.component.d.ts → components/notify-app/notify-app.component.d.ts} +3 -3
  64. package/platform-management/lib/entities/app-version/components/slots/app-version-slot.component.d.ts +12 -0
  65. package/platform-management/lib/entities/app-version/index.d.ts +2 -1
  66. package/platform-management/lib/entities/app-version/{workflow → workflows}/index.d.ts +0 -1
  67. package/platform-management/lib/entities/check-version.d.ts +12 -0
  68. package/platform-management/lib/entities/index.d.ts +1 -0
  69. package/platform-management/lib/platform-management.module.d.ts +2 -2
  70. package/fesm2022/acorex-modules-organization-managment-employee.entity-oo5Tyyp2.mjs.map +0 -1
  71. package/fesm2022/acorex-modules-organization-managment-org-chart.page-fOxjGb8i.mjs +0 -297
  72. package/fesm2022/acorex-modules-organization-managment-org-chart.page-fOxjGb8i.mjs.map +0 -1
  73. package/fesm2022/acorex-modules-organization-managment-setting.provider-BtkaTjLS.mjs.map +0 -1
  74. package/organization-managment/lib/pages/org-chart/org-chart.page.d.ts +0 -28
  75. package/organization-managment/lib/pages/org-chart/org-chart.type.d.ts +0 -9
  76. package/platform-management/lib/entities/app-version/check-version.d.ts +0 -11
  77. /package/platform-management/lib/entities/app-version/{workflow → workflows}/change-log.workflow.d.ts +0 -0
@@ -0,0 +1,505 @@
1
+ import { AXPanViewDirective } from '@acorex/cdk/pan-view';
2
+ import * as i3 from '@acorex/components/button';
3
+ import { AXButtonModule } from '@acorex/components/button';
4
+ import * as i5 from '@acorex/components/decorators';
5
+ import { AXDecoratorModule } from '@acorex/components/decorators';
6
+ import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
7
+ import { AXLoadingModule } from '@acorex/components/loading';
8
+ import * as i2 from '@acorex/components/menu';
9
+ import { AXContextMenuComponent, AXMenuModule } from '@acorex/components/menu';
10
+ import * as i4 from '@acorex/core/translation';
11
+ import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
12
+ import { AXPSimplePageLayout } from '@acorex/platform/themes/default';
13
+ import { AXPLayoutThemeService, AXPThemeLayoutBlockComponent, AXPThemeLayoutHeaderTemplateComponent, AXPThemeLayoutActionsComponent, AXPThemeLayoutPageSecondaryActionsComponent, AXPThemeLayoutPagePrimaryActionsComponent } from '@acorex/platform/themes/shared';
14
+ import * as i1 from '@angular/common';
15
+ import { CommonModule } from '@angular/common';
16
+ import * as i0 from '@angular/core';
17
+ import { inject, Injectable, viewChild, NgZone, ViewContainerRef, signal, afterNextRender, Component, ChangeDetectionStrategy } from '@angular/core';
18
+ import { RouterModule } from '@angular/router';
19
+ import { AXLoadingDialogService } from '@acorex/components/loading-dialog';
20
+ import { AXPExportService } from '@acorex/platform/common';
21
+ import * as i6 from '@acorex/components/breadcrumbs';
22
+ import { AXBreadcrumbsModule } from '@acorex/components/breadcrumbs';
23
+ import { RootConfig } from './acorex-modules-organization-managment.mjs';
24
+
25
+ class AXMOrgChartPrintService {
26
+ constructor() {
27
+ this.loadingDialog = inject(AXLoadingDialogService);
28
+ this.exportService = inject(AXPExportService);
29
+ this.translationService = inject(AXTranslationService);
30
+ }
31
+ async printChart(element) {
32
+ const d = this.loadingDialog.show({
33
+ title: 'Printing Organization Chart...',
34
+ mode: 'determinate',
35
+ progressColor: 'primary',
36
+ progressValue: 0,
37
+ status: '0/10',
38
+ text: 'Initializing print process...',
39
+ buttons: [
40
+ {
41
+ text: 'Cancel',
42
+ color: 'danger',
43
+ onClick: () => {
44
+ d.close();
45
+ },
46
+ },
47
+ ],
48
+ });
49
+ try {
50
+ // Step 1: Start Process
51
+ await this.HandleStep(d, await this.translateStatements('preparing-document'), 10, '1/10');
52
+ const chartElement = element;
53
+ const { originalStyles, modifiedStyles } = this.expandChart(chartElement);
54
+ // Step 2: Render the Chart
55
+ await this.HandleStep(d, await this.translateStatements('rendering-chart-image'), 25, '2.5/10');
56
+ const canvasBlob = await this.exportService.generateBlobFromElement(chartElement, {
57
+ popup: true,
58
+ bgcolor: 'transparent',
59
+ scale: 2,
60
+ quality: 1,
61
+ height: Number.parseInt(modifiedStyles.modifiedHeight),
62
+ width: Number.parseInt(modifiedStyles.modifiedWidth),
63
+ });
64
+ // Step 3: Finalizing Image Processing
65
+ await this.HandleStep(d, await this.translateStatements('finalizing-image-processing'), 50, '5/10');
66
+ this.restoreChartStyles(chartElement, originalStyles);
67
+ // Step 4: Download Image
68
+ await this.HandleStep(d, await this.translateStatements('downloading-image'), 75, '7.5/10');
69
+ this.exportService.download(canvasBlob, 'org-chart.png');
70
+ // Step 5: Completion
71
+ await this.HandleStep(d, await this.translateStatements('process-complete'), 100, '10/10');
72
+ // Close the dialog after a short delay
73
+ setTimeout(() => d.close(), 1500);
74
+ }
75
+ catch (err) {
76
+ console.error('Error capturing chart:', err);
77
+ await this.HandleStep(d, await this.translateStatements('failed-to-generate-chart-image'), 100, 'Error', 'danger');
78
+ d.close();
79
+ }
80
+ }
81
+ /**
82
+ * Expands the chart temporarily to capture the full view.
83
+ */
84
+ expandChart(chartElement) {
85
+ const originalStyles = {
86
+ originalOverflow: chartElement.style.overflow,
87
+ originalWidth: chartElement.style.width,
88
+ originalHeight: chartElement.style.height,
89
+ };
90
+ const modifiedStyles = {
91
+ modifiedOverflow: 'visible',
92
+ modifiedWidth: `${chartElement.scrollWidth}px`,
93
+ modifiedHeight: `${chartElement.scrollHeight}px`,
94
+ };
95
+ chartElement.style.overflow = modifiedStyles.modifiedOverflow;
96
+ chartElement.style.width = modifiedStyles.modifiedWidth;
97
+ chartElement.style.height = modifiedStyles.modifiedHeight;
98
+ return { originalStyles, modifiedStyles };
99
+ }
100
+ /**
101
+ * Restores chart styles after capturing.
102
+ */
103
+ restoreChartStyles(chartElement, originalStyles) {
104
+ chartElement.style.overflow = originalStyles.originalOverflow;
105
+ chartElement.style.width = originalStyles.originalWidth;
106
+ chartElement.style.height = originalStyles.originalHeight;
107
+ }
108
+ /**
109
+ * Handles updating the progress dialog step.
110
+ */
111
+ async HandleStep(dialog, text, progress, status, color = 'primary') {
112
+ return new Promise((resolve) => {
113
+ dialog.setProgressColor(color);
114
+ dialog.setProgressText(text);
115
+ dialog.setProgressValue(progress);
116
+ dialog.setProgressStatus(status);
117
+ resolve();
118
+ });
119
+ }
120
+ async translateStatements(key) {
121
+ return (await this.translationService.translateAsync(key, { scope: 'organization-management' })) + '...';
122
+ }
123
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMOrgChartPrintService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
124
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMOrgChartPrintService, providedIn: 'root' }); }
125
+ }
126
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMOrgChartPrintService, decorators: [{
127
+ type: Injectable,
128
+ args: [{
129
+ providedIn: 'root',
130
+ }]
131
+ }] });
132
+
133
+ var AXMOrganizationNodeType;
134
+ (function (AXMOrganizationNodeType) {
135
+ AXMOrganizationNodeType["Company"] = "Company";
136
+ AXMOrganizationNodeType["Location"] = "Location";
137
+ AXMOrganizationNodeType["BusinessUnit"] = "BusinessUnit";
138
+ AXMOrganizationNodeType["Role"] = "Role";
139
+ AXMOrganizationNodeType["Person"] = "Person"; // Employee
140
+ })(AXMOrganizationNodeType || (AXMOrganizationNodeType = {}));
141
+ const AXM_ALLOWED_CHILD_NODES = {
142
+ [AXMOrganizationNodeType.Company]: [AXMOrganizationNodeType.Location, AXMOrganizationNodeType.BusinessUnit],
143
+ [AXMOrganizationNodeType.Location]: [AXMOrganizationNodeType.Location, AXMOrganizationNodeType.BusinessUnit],
144
+ [AXMOrganizationNodeType.BusinessUnit]: [AXMOrganizationNodeType.BusinessUnit, AXMOrganizationNodeType.Role],
145
+ [AXMOrganizationNodeType.Role]: [AXMOrganizationNodeType.Person],
146
+ [AXMOrganizationNodeType.Person]: [] // No children allowed
147
+ };
148
+ const AXM_ORGANIZATION_DATA = {
149
+ id: '1',
150
+ title: 'CEO',
151
+ subtitle: 'Chief Executive Officer',
152
+ description: 'Responsible for the overall success of the',
153
+ icon: 'fa-user-tie',
154
+ children: [
155
+ {
156
+ id: '2',
157
+ title: 'CTO',
158
+ subtitle: 'Chief Technology Officer',
159
+ //description: 'Leads the technology team and innovation.',
160
+ icon: 'fa-microchip',
161
+ children: [
162
+ {
163
+ id: '3',
164
+ title: 'Engineering Director',
165
+ subtitle: 'Director of Engineering',
166
+ description: 'Oversees all engineering teams.',
167
+ icon: 'fa-cogs',
168
+ children: [
169
+ {
170
+ id: '4',
171
+ title: 'Dev Manager',
172
+ subtitle: 'Development Manager',
173
+ description: 'Manages the development team.',
174
+ icon: 'fa-code',
175
+ children: [
176
+ {
177
+ id: '5',
178
+ title: 'Frontend Team Lead',
179
+ subtitle: 'Leads frontend developers',
180
+ description: 'Manages the frontend development efforts.',
181
+ icon: 'fa-paint-brush',
182
+ },
183
+ {
184
+ id: '6',
185
+ title: 'Backend Team Lead',
186
+ subtitle: 'Leads backend developers',
187
+ description: 'Manages the backend development efforts.',
188
+ icon: 'fa-database',
189
+ },
190
+ ],
191
+ },
192
+ {
193
+ id: '7',
194
+ title: 'QA Manager',
195
+ subtitle: 'Quality Assurance Manager',
196
+ description: 'Ensures product quality.',
197
+ icon: 'fa-check-circle',
198
+ children: [
199
+ {
200
+ id: '8',
201
+ title: 'QA Engineer',
202
+ subtitle: 'Quality Assurance Engineer',
203
+ description: 'Tests and ensures software quality.',
204
+ icon: 'fa-bug',
205
+ },
206
+ ],
207
+ },
208
+ ],
209
+ },
210
+ {
211
+ id: '9',
212
+ title: 'Security Manager',
213
+ subtitle: 'Security & Compliance',
214
+ description: 'Ensures security policies and compliance.',
215
+ icon: 'fa-shield-alt',
216
+ },
217
+ ],
218
+ },
219
+ {
220
+ id: '10',
221
+ title: 'CFO',
222
+ subtitle: 'Chief Financial Officer',
223
+ description: 'Manages the financial health of the organization.',
224
+ icon: 'fa-chart-line',
225
+ children: [
226
+ {
227
+ id: '11',
228
+ title: 'Finance Manager',
229
+ subtitle: 'Oversees financial operations',
230
+ description: 'Handles budgets, financial planning, and reporting.',
231
+ icon: 'fa-money-bill-wave',
232
+ },
233
+ {
234
+ id: '12',
235
+ title: 'Accounting Manager',
236
+ subtitle: 'Manages accounting team',
237
+ description: 'Ensures financial accuracy and compliance.',
238
+ icon: 'fa-calculator',
239
+ },
240
+ ],
241
+ },
242
+ {
243
+ id: '13',
244
+ title: 'COO',
245
+ subtitle: 'Chief Operating Officer',
246
+ description: 'Oversees daily business operations.',
247
+ icon: 'fa-briefcase',
248
+ children: [
249
+ {
250
+ id: '14',
251
+ title: 'HR Manager',
252
+ subtitle: 'Human Resources Manager',
253
+ description: 'Manages recruitment and employee relations.',
254
+ icon: 'fa-users',
255
+ },
256
+ {
257
+ id: '15',
258
+ title: 'Operations Manager',
259
+ subtitle: 'Leads business operations',
260
+ description: 'Oversees operational efficiency and process improvements.',
261
+ icon: 'fa-industry',
262
+ },
263
+ ],
264
+ },
265
+ {
266
+ id: '16',
267
+ title: 'CMO',
268
+ subtitle: 'Chief Marketing Officer',
269
+ description: 'Leads marketing and brand strategy.',
270
+ icon: 'fa-bullhorn',
271
+ children: [
272
+ {
273
+ id: '17',
274
+ title: 'Marketing Manager',
275
+ subtitle: 'Oversees marketing team',
276
+ description: 'Handles branding, campaigns, and customer engagement.',
277
+ icon: 'fa-ad',
278
+ },
279
+ {
280
+ id: '18',
281
+ title: 'Sales Director',
282
+ subtitle: 'Leads sales initiatives',
283
+ description: 'Drives revenue and sales growth.',
284
+ icon: 'fa-handshake',
285
+ children: [
286
+ {
287
+ id: '19',
288
+ title: 'Sales Manager',
289
+ subtitle: 'Manages sales team',
290
+ description: 'Oversees sales operations and targets.',
291
+ icon: 'fa-shopping-cart',
292
+ },
293
+ ],
294
+ },
295
+ ],
296
+ },
297
+ ],
298
+ };
299
+
300
+ class AXMOrgChartPage {
301
+ constructor() {
302
+ this.layout = inject(AXPLayoutThemeService);
303
+ this.rootConfig = RootConfig;
304
+ this.nodeTemplate = viewChild.required('nodeTemplate');
305
+ this.treeContainer = viewChild.required('chart');
306
+ this.parent = viewChild.required('parent');
307
+ this.contextMenu = viewChild(AXContextMenuComponent);
308
+ this.ngzone = inject(NgZone);
309
+ this.viewContainerRef = inject(ViewContainerRef);
310
+ this.chartPrintService = inject(AXMOrgChartPrintService);
311
+ this.DATA = AXM_ORGANIZATION_DATA;
312
+ this.NODE_STROKE_COLOR = 'rgba(var(--ax-sys-color-primary-400))';
313
+ this.LINK_STROKE_WIDTH = 1;
314
+ this.isFullscreen = signal(false);
315
+ this.panX = signal(0);
316
+ this.panY = signal(0);
317
+ this.panZoomLevel = signal(100);
318
+ this.#initialize = afterNextRender(async () => {
319
+ this.d3 = await import('d3');
320
+ this.createChart(this.treeContainer().nativeElement, this.DATA);
321
+ });
322
+ }
323
+ #initialize;
324
+ // eff = effect(() => console.log(this.panX(), this.panY()));
325
+ zoomIn() {
326
+ this.panZoomLevel.update((prev) => prev + 5);
327
+ }
328
+ zoomOut() {
329
+ this.panZoomLevel.update((prev) => prev - 5);
330
+ }
331
+ zoomReset() {
332
+ this.panX.set(1);
333
+ this.panY.set(1);
334
+ this.panX.set(0);
335
+ this.panY.set(0);
336
+ this.panZoomLevel.set(100);
337
+ }
338
+ toggleFullscreen() {
339
+ if (this.isFullscreen()) {
340
+ document.exitFullscreen();
341
+ this.isFullscreen.set(false);
342
+ }
343
+ else {
344
+ this.parent().nativeElement.requestFullscreen();
345
+ this.isFullscreen.set(true);
346
+ }
347
+ }
348
+ calculateMaxDepth(node) {
349
+ if (!node.children || node.children.length === 0 || node.isExpanded === false) {
350
+ return 1; // Base case: no children or node is collapsed
351
+ }
352
+ return 1 + Math.max(...node.children.map((child) => this.calculateMaxDepth(child)));
353
+ }
354
+ calculateMaxBreadth(node) {
355
+ if (!node.children || node.children.length === 0 || node.isExpanded === false) {
356
+ return 1; // Base case: no children or node is collapsed
357
+ }
358
+ return node.children.reduce((acc, child) => acc + this.calculateMaxBreadth(child), 0);
359
+ }
360
+ createChart(el, data) {
361
+ this.ngzone.runOutsideAngular(() => {
362
+ // Constants for node dimensions and spacing
363
+ const NODE_WIDTH_BASE = 240; // Base width for each node
364
+ const NODE_HEIGHT_BASE = 120; // Base height for each node
365
+ const HORIZONTAL_SPACING = 25; // Horizontal spacing between nodes
366
+ const VERTICAL_SPACING = 50; // Vertical spacing between levels
367
+ // Clear existing SVG and create a new one
368
+ this.clearChart(el);
369
+ const newSvg = this.d3.select(el).append('svg');
370
+ // Create a hierarchy from the data
371
+ const root = this.d3.hierarchy(data);
372
+ // Filter out collapsed nodes and their descendants
373
+ root.descendants().forEach((node) => {
374
+ if (node.data.isExpanded === false) {
375
+ node.children = undefined; // Remove children for collapsed nodes
376
+ }
377
+ });
378
+ // Create a tree layout
379
+ const treeLayout = this.d3
380
+ .tree()
381
+ .nodeSize([NODE_WIDTH_BASE + HORIZONTAL_SPACING, NODE_HEIGHT_BASE + VERTICAL_SPACING]);
382
+ // Generate the tree nodes and links
383
+ treeLayout(root);
384
+ // Calculate the bounds of the tree
385
+ let minX = Infinity, maxX = -Infinity, minY = Infinity, maxY = -Infinity;
386
+ root.descendants().forEach((d) => {
387
+ if (d.x < minX)
388
+ minX = d.x;
389
+ if (d.x > maxX)
390
+ maxX = d.x;
391
+ if (d.y < minY)
392
+ minY = d.y;
393
+ if (d.y > maxY)
394
+ maxY = d.y;
395
+ });
396
+ // Calculate SVG dimensions based on tree bounds
397
+ const CONTAINER_WIDTH = maxX - minX + NODE_WIDTH_BASE + 2 * HORIZONTAL_SPACING;
398
+ const CONTAINER_HEIGHT = maxY - minY + NODE_HEIGHT_BASE + 2 * VERTICAL_SPACING;
399
+ // Set SVG dimensions
400
+ newSvg.attr('width', CONTAINER_WIDTH).attr('height', CONTAINER_HEIGHT);
401
+ // Adjust the transform of the <g> element to center the tree
402
+ const g = newSvg
403
+ .append('g')
404
+ .attr('transform', `translate(${-minX + NODE_WIDTH_BASE / 2 + HORIZONTAL_SPACING / 2}, ${-minY + NODE_HEIGHT_BASE / 2 + VERTICAL_SPACING / 2})`);
405
+ // Create links (lines with 90-degree angles)
406
+ const link = g
407
+ .selectAll('.link')
408
+ .data(root.links())
409
+ .enter()
410
+ .append('path')
411
+ .attr('class', 'link')
412
+ .attr('d', (d) => {
413
+ const source = d.source;
414
+ const target = d.target;
415
+ return `M${source.x},${source.y}V${(source.y + target.y) / 2}H${target.x}V${target.y - 10}`;
416
+ })
417
+ .attr('fill', 'none')
418
+ .attr('stroke', this.NODE_STROKE_COLOR)
419
+ .attr('stroke-width', this.LINK_STROKE_WIDTH)
420
+ .attr('from', (d) => `node-${d.source.data.id}`)
421
+ .attr('to', (d) => `node-${d.target.data.id}`);
422
+ // Create nodes
423
+ const node = g
424
+ .selectAll('.axp-org-chart-node')
425
+ .data(root.descendants())
426
+ .enter()
427
+ .append('foreignObject')
428
+ .attr('class', 'axp-org-chart-node')
429
+ .attr('node', (d) => `node-${d.data.id}`) // Unique ID for each node
430
+ .attr('x', (d) => d.x - NODE_WIDTH_BASE / 2) // Use d.x (D3 node property)
431
+ .attr('y', (d) => d.y - NODE_HEIGHT_BASE / 2 + 10) // Use d.y (D3 node property)
432
+ .attr('width', NODE_WIDTH_BASE)
433
+ .attr('height', NODE_HEIGHT_BASE)
434
+ .each((d) => this.renderNodeTemplate(d.data, d.x, d.y));
435
+ // Refresh context menu
436
+ this.contextMenu()?.refresh();
437
+ });
438
+ }
439
+ renderNodeTemplate(data, x, y) {
440
+ const viewRef = this.viewContainerRef.createEmbeddedView(this.nodeTemplate(), {
441
+ $implicit: data, // Pass the node data to the template
442
+ });
443
+ // Select node using unique ID
444
+ const nodeElement = this.d3.select(this.treeContainer().nativeElement).select(`[node="node-${data.id}"]`); // Select by unique ID instead of position
445
+ const element = nodeElement.node();
446
+ if (element) {
447
+ element.appendChild(viewRef.rootNodes[0]);
448
+ }
449
+ }
450
+ toggleNode(data) {
451
+ data.isExpanded = data.isExpanded === undefined ? false : !data.isExpanded;
452
+ this.createChart(this.treeContainer().nativeElement, this.DATA); // Re-render the chart
453
+ }
454
+ clearChart(el) {
455
+ this.d3.select(el).select('svg').remove();
456
+ this.viewContainerRef.clear();
457
+ }
458
+ handleContextMenuOnOpening(e) {
459
+ const items = [
460
+ { name: 'add', text: 'Add New Departpent', color: 'primary', icon: 'fa-light fa-plus' },
461
+ {
462
+ name: 'remove',
463
+ text: 'Remove',
464
+ color: 'danger',
465
+ icon: 'fa-light fa-trash-can',
466
+ },
467
+ ];
468
+ e.items.push(...items);
469
+ }
470
+ printChart() {
471
+ this.chartPrintService.printChart(this.treeContainer().nativeElement);
472
+ }
473
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMOrgChartPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
474
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMOrgChartPage, isStandalone: true, selector: "ng-component", providers: [], viewQueries: [{ propertyName: "nodeTemplate", first: true, predicate: ["nodeTemplate"], descendants: true, isSignal: true }, { propertyName: "treeContainer", first: true, predicate: ["chart"], descendants: true, isSignal: true }, { propertyName: "parent", first: true, predicate: ["parent"], descendants: true, isSignal: true }, { propertyName: "contextMenu", first: true, predicate: AXContextMenuComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<axp-layout-simple-page *translate=\"let t\">\n <axp-layout-header>\n <axp-layout-title> {{t(rootConfig.entities.chart.title) | async}} </axp-layout-title>\n\n <axp-layout-description> Clear and dynamic view of your organization's structure </axp-layout-description>\n\n <axp-layout-actions>\n <axp-layout-actions-primary> </axp-layout-actions-primary>\n\n <axp-layout-actions-secondary>\n <ax-button-item [text]=\"(t('print') | async)!\" (onClick)=\"printChart()\">\n <ax-prefix>\n <ax-icon [icon]=\"'fa-solid fa-print'\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n </axp-layout-actions-secondary>\n </axp-layout-actions>\n\n\n <axp-layout-breadcrumbs>\n <ax-breadcrumbs [class.ax-hidden]=\"layout.isSmall()\">\n <ng-template #divider>\n <i class=\"fa-regular fa-slash-forward\"></i>\n </ng-template>\n <ax-breadcrumbs-item>\n Home\n </ax-breadcrumbs-item>\n <ax-breadcrumbs-item>\n Organization\n </ax-breadcrumbs-item>\n </ax-breadcrumbs>\n </axp-layout-breadcrumbs>\n </axp-layout-header>\n\n <axp-layout-content>\n <div class=\"ax-h-[calc(100vh-190px)]\" #parent id=\"parent\">\n <div #chart axPanView [(panX)]=\"panX\" [(panY)]=\"panY\" [(zoom)]=\"panZoomLevel\" wrapperClasses=\"h\"></div>\n <div class=\"ax-absolute ax-bottom-2 ax-right-2 ax-z-10 ax-flex ax-gap-2\">\n <ax-button (onClick)=\"zoomOut()\">\n <ax-icon class=\"fa-solid fa-minus\"> </ax-icon>\n </ax-button>\n <ax-button [text]=\"panZoomLevel()\" (onClick)=\"zoomReset()\"></ax-button>\n <ax-button (onClick)=\"zoomIn()\">\n <ax-icon class=\"fa-solid fa-add\"> </ax-icon>\n </ax-button>\n <ax-button (onClick)=\"toggleFullscreen()\">\n <ax-icon>\n <i class=\"fa-solid\" [class]=\"isFullscreen()? 'fa-compress' : 'fa-expand'\"></i>\n </ax-icon>\n </ax-button>\n </div>\n </div>\n\n <ax-context-menu [target]=\"'.axp-org-chart-node'\" [orientation]=\"'vertical'\" [closeOn]=\"'leave'\"\n (onOpening)=\"handleContextMenuOnOpening($event)\">\n </ax-context-menu>\n </axp-layout-content>\n</axp-layout-simple-page>\n<div #chart class=\"chart-container ax-border\"></div>\n\n<!-- <ax-chart nodeTemplate=\"nodeTemplate\" nodes=\"nodes\"></ax-chart> -->\n\n<ng-template #nodeTemplate let-data>\n <div\n class=\"ax-border ax-select-none ax-shadow-md ax-border-primary-500 ax-text-primary-800 ax-rounded-md ax-bg-white ax-flex ax-flex-col ax-overflow-hidden\">\n <div class=\"ax-bg-primary-400 ax-text-on-primary ax-px-4 ax-py-2 ax-h-full ax-cursor-pointer hover:ax-brightness-90\"\n [class.ax-rounded-b-none]=\"data.description\" (dblclick)=\"toggleNode(data)\">\n <div class=\"ax-flex ax-gap-3 ax-items-center ax-justify-between ax-h-full\">\n <ax-icon><i class=\"fa-light fa-lg\" [class]=\"data.icon\"></i></ax-icon>\n <div class=\"ax-flex ax-flex-col ax-gap-1\">\n <div class=\"ax-text-xs ax-font-bold\">{{ data.title }}</div>\n @if (data.subtitle) {\n <div class=\"ax-text-xs\">{{ data.subtitle }}</div>\n }\n </div>\n @if (data.children && data.children.length > 0) {\n <div class=\"ax-flex ax-justify-center ax-items-center\" (click)=\"toggleNode(data)\">\n <ax-icon>\n <i class=\"fa-solid\" [class]=\"data.isExpanded === false ? 'fa-chevron-down' : 'fa-chevron-up'\"></i></ax-icon>\n </div>\n }@else {\n <span></span>\n }\n </div>\n </div>\n @if(data.description) {\n <div class=\"ax-text-xs ax-break-words ax-px-4 ax-py-2 ax-text-default dark:ax-text-on-ghost\">\n {{ data.description }}\n </div>\n }\n </div>\n</ng-template>", styles: [".axp-org-chart-node{overflow:visible;white-space:nowrap;display:flex;align-items:center;justify-content:center}#parent:fullscreen{background-color:rgba(var(--axp-brand-color))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: RouterModule }, { kind: "component", type:
475
+ //
476
+ AXPSimplePageLayout, selector: "axp-layout-simple-page" }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-layout-content, axp-layout-header-container, axp-layout-footer-container, axp-layout-side-container, axp-layout-sections, axp-layout-section-container, axp-layout-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title, axp-layout-nav-button, axp-layout-description, axp-layout-toolbar, axp-layout-title-bar, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "component", type: AXPThemeLayoutHeaderTemplateComponent, selector: "axp-layout-header" }, { kind: "component", type: AXPThemeLayoutActionsComponent, selector: "axp-layout-actions" }, { kind: "component", type: AXPThemeLayoutPageSecondaryActionsComponent, selector: "axp-layout-actions-secondary" }, { kind: "component", type: AXPThemeLayoutPagePrimaryActionsComponent, selector: "axp-layout-actions-primary" }, { kind: "ngmodule", type:
477
+ //
478
+ AXMenuModule }, { kind: "component", type: i2.AXContextMenuComponent, selector: "ax-context-menu", inputs: ["orientation", "openOn", "closeOn", "items", "target"], outputs: ["onItemClick", "onOpening"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i3.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i4.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i5.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i5.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "directive", type: AXPanViewDirective, selector: "[axPanView]", inputs: ["zoomStep", "minZoom", "maxZoom", "disablePan", "disableZoom", "wrapperClasses", "panX", "panY", "zoom"], outputs: ["panXChange", "panYChange", "zoomChange", "positionChange"], exportAs: ["axPanView"] }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXBreadcrumbsModule }, { kind: "component", type: i6.AXBreadCrumbsComponent, selector: "ax-breadcrumbs" }, { kind: "component", type: i6.AXBreadCrumbsItemComponent, selector: "ax-breadcrumbs-item", inputs: ["disabled", "active"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
479
+ }
480
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMOrgChartPage, decorators: [{
481
+ type: Component,
482
+ args: [{ imports: [
483
+ CommonModule,
484
+ RouterModule,
485
+ //
486
+ AXPSimplePageLayout,
487
+ AXPThemeLayoutBlockComponent,
488
+ AXPThemeLayoutHeaderTemplateComponent,
489
+ AXPThemeLayoutActionsComponent,
490
+ AXPThemeLayoutPageSecondaryActionsComponent,
491
+ AXPThemeLayoutPagePrimaryActionsComponent,
492
+ //
493
+ AXMenuModule,
494
+ AXButtonModule,
495
+ AXDropdownButtonModule,
496
+ AXTranslationModule,
497
+ AXDecoratorModule,
498
+ AXPanViewDirective,
499
+ AXLoadingModule,
500
+ AXBreadcrumbsModule
501
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [], template: "<axp-layout-simple-page *translate=\"let t\">\n <axp-layout-header>\n <axp-layout-title> {{t(rootConfig.entities.chart.title) | async}} </axp-layout-title>\n\n <axp-layout-description> Clear and dynamic view of your organization's structure </axp-layout-description>\n\n <axp-layout-actions>\n <axp-layout-actions-primary> </axp-layout-actions-primary>\n\n <axp-layout-actions-secondary>\n <ax-button-item [text]=\"(t('print') | async)!\" (onClick)=\"printChart()\">\n <ax-prefix>\n <ax-icon [icon]=\"'fa-solid fa-print'\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n </axp-layout-actions-secondary>\n </axp-layout-actions>\n\n\n <axp-layout-breadcrumbs>\n <ax-breadcrumbs [class.ax-hidden]=\"layout.isSmall()\">\n <ng-template #divider>\n <i class=\"fa-regular fa-slash-forward\"></i>\n </ng-template>\n <ax-breadcrumbs-item>\n Home\n </ax-breadcrumbs-item>\n <ax-breadcrumbs-item>\n Organization\n </ax-breadcrumbs-item>\n </ax-breadcrumbs>\n </axp-layout-breadcrumbs>\n </axp-layout-header>\n\n <axp-layout-content>\n <div class=\"ax-h-[calc(100vh-190px)]\" #parent id=\"parent\">\n <div #chart axPanView [(panX)]=\"panX\" [(panY)]=\"panY\" [(zoom)]=\"panZoomLevel\" wrapperClasses=\"h\"></div>\n <div class=\"ax-absolute ax-bottom-2 ax-right-2 ax-z-10 ax-flex ax-gap-2\">\n <ax-button (onClick)=\"zoomOut()\">\n <ax-icon class=\"fa-solid fa-minus\"> </ax-icon>\n </ax-button>\n <ax-button [text]=\"panZoomLevel()\" (onClick)=\"zoomReset()\"></ax-button>\n <ax-button (onClick)=\"zoomIn()\">\n <ax-icon class=\"fa-solid fa-add\"> </ax-icon>\n </ax-button>\n <ax-button (onClick)=\"toggleFullscreen()\">\n <ax-icon>\n <i class=\"fa-solid\" [class]=\"isFullscreen()? 'fa-compress' : 'fa-expand'\"></i>\n </ax-icon>\n </ax-button>\n </div>\n </div>\n\n <ax-context-menu [target]=\"'.axp-org-chart-node'\" [orientation]=\"'vertical'\" [closeOn]=\"'leave'\"\n (onOpening)=\"handleContextMenuOnOpening($event)\">\n </ax-context-menu>\n </axp-layout-content>\n</axp-layout-simple-page>\n<div #chart class=\"chart-container ax-border\"></div>\n\n<!-- <ax-chart nodeTemplate=\"nodeTemplate\" nodes=\"nodes\"></ax-chart> -->\n\n<ng-template #nodeTemplate let-data>\n <div\n class=\"ax-border ax-select-none ax-shadow-md ax-border-primary-500 ax-text-primary-800 ax-rounded-md ax-bg-white ax-flex ax-flex-col ax-overflow-hidden\">\n <div class=\"ax-bg-primary-400 ax-text-on-primary ax-px-4 ax-py-2 ax-h-full ax-cursor-pointer hover:ax-brightness-90\"\n [class.ax-rounded-b-none]=\"data.description\" (dblclick)=\"toggleNode(data)\">\n <div class=\"ax-flex ax-gap-3 ax-items-center ax-justify-between ax-h-full\">\n <ax-icon><i class=\"fa-light fa-lg\" [class]=\"data.icon\"></i></ax-icon>\n <div class=\"ax-flex ax-flex-col ax-gap-1\">\n <div class=\"ax-text-xs ax-font-bold\">{{ data.title }}</div>\n @if (data.subtitle) {\n <div class=\"ax-text-xs\">{{ data.subtitle }}</div>\n }\n </div>\n @if (data.children && data.children.length > 0) {\n <div class=\"ax-flex ax-justify-center ax-items-center\" (click)=\"toggleNode(data)\">\n <ax-icon>\n <i class=\"fa-solid\" [class]=\"data.isExpanded === false ? 'fa-chevron-down' : 'fa-chevron-up'\"></i></ax-icon>\n </div>\n }@else {\n <span></span>\n }\n </div>\n </div>\n @if(data.description) {\n <div class=\"ax-text-xs ax-break-words ax-px-4 ax-py-2 ax-text-default dark:ax-text-on-ghost\">\n {{ data.description }}\n </div>\n }\n </div>\n</ng-template>", styles: [".axp-org-chart-node{overflow:visible;white-space:nowrap;display:flex;align-items:center;justify-content:center}#parent:fullscreen{background-color:rgba(var(--axp-brand-color))}\n"] }]
502
+ }] });
503
+
504
+ export { AXMOrgChartPage };
505
+ //# sourceMappingURL=acorex-modules-organization-managment-org-chart.page-CTHNSn2n.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-modules-organization-managment-org-chart.page-CTHNSn2n.mjs","sources":["../../../../libs/modules/organization-managment/src/lib/features/organization-chart/org-chart-print.service.ts","../../../../libs/modules/organization-managment/src/lib/features/organization-chart/org-chart.type.ts","../../../../libs/modules/organization-managment/src/lib/features/organization-chart/org-chart.page.ts","../../../../libs/modules/organization-managment/src/lib/features/organization-chart/org-chart.page.html"],"sourcesContent":["import { AXStyleColorType } from '@acorex/components/common';\nimport { AXDialogRef, AXLoadingDialogService } from '@acorex/components/loading-dialog';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPExportService } from '@acorex/platform/common';\nimport { inject, Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXMOrgChartPrintService {\n private loadingDialog = inject(AXLoadingDialogService);\n private exportService = inject(AXPExportService);\n private translationService = inject(AXTranslationService);\n\n async printChart(element: HTMLElement): Promise<void> {\n const d = this.loadingDialog.show({\n title: 'Printing Organization Chart...',\n mode: 'determinate',\n progressColor: 'primary',\n progressValue: 0,\n status: '0/10',\n text: 'Initializing print process...',\n buttons: [\n {\n text: 'Cancel',\n color: 'danger',\n onClick: () => {\n d.close();\n },\n },\n ],\n });\n\n try {\n // Step 1: Start Process\n await this.HandleStep(d, await this.translateStatements('preparing-document'), 10, '1/10');\n const chartElement = element;\n const { originalStyles, modifiedStyles } = this.expandChart(chartElement);\n\n // Step 2: Render the Chart\n await this.HandleStep(d, await this.translateStatements('rendering-chart-image'), 25, '2.5/10');\n const canvasBlob = await this.exportService.generateBlobFromElement(chartElement, {\n popup: true,\n bgcolor: 'transparent',\n scale: 2,\n quality: 1,\n height: Number.parseInt(modifiedStyles.modifiedHeight),\n width: Number.parseInt(modifiedStyles.modifiedWidth),\n });\n\n // Step 3: Finalizing Image Processing\n await this.HandleStep(d, await this.translateStatements('finalizing-image-processing'), 50, '5/10');\n this.restoreChartStyles(chartElement, originalStyles);\n\n // Step 4: Download Image\n await this.HandleStep(d, await this.translateStatements('downloading-image'), 75, '7.5/10');\n this.exportService.download(canvasBlob, 'org-chart.png');\n\n // Step 5: Completion\n await this.HandleStep(d, await this.translateStatements('process-complete'), 100, '10/10');\n\n // Close the dialog after a short delay\n setTimeout(() => d.close(), 1500);\n } catch (err) {\n console.error('Error capturing chart:', err);\n await this.HandleStep(\n d,\n await this.translateStatements('failed-to-generate-chart-image'),\n 100,\n 'Error',\n 'danger'\n );\n d.close();\n }\n }\n\n /**\n * Expands the chart temporarily to capture the full view.\n */\n private expandChart(chartElement: HTMLElement): {\n originalStyles: {\n originalOverflow: string;\n originalWidth: string;\n originalHeight: string;\n };\n modifiedStyles: {\n modifiedOverflow: string;\n modifiedWidth: string;\n modifiedHeight: string;\n };\n } {\n const originalStyles = {\n originalOverflow: chartElement.style.overflow,\n originalWidth: chartElement.style.width,\n originalHeight: chartElement.style.height,\n };\n\n const modifiedStyles = {\n modifiedOverflow: 'visible',\n modifiedWidth: `${chartElement.scrollWidth}px`,\n modifiedHeight: `${chartElement.scrollHeight}px`,\n };\n\n chartElement.style.overflow = modifiedStyles.modifiedOverflow;\n chartElement.style.width = modifiedStyles.modifiedWidth;\n chartElement.style.height = modifiedStyles.modifiedHeight;\n\n return { originalStyles, modifiedStyles };\n }\n\n /**\n * Restores chart styles after capturing.\n */\n private restoreChartStyles(\n chartElement: HTMLElement,\n originalStyles: { originalOverflow: string; originalWidth: string; originalHeight: string }\n ): void {\n chartElement.style.overflow = originalStyles.originalOverflow;\n chartElement.style.width = originalStyles.originalWidth;\n chartElement.style.height = originalStyles.originalHeight;\n }\n\n /**\n * Handles updating the progress dialog step.\n */\n private async HandleStep(\n dialog: AXDialogRef,\n text: string,\n progress: number,\n status: string,\n color: AXStyleColorType = 'primary'\n ): Promise<void> {\n return new Promise((resolve) => {\n dialog.setProgressColor(color);\n dialog.setProgressText(text);\n dialog.setProgressValue(progress);\n dialog.setProgressStatus(status);\n resolve();\n });\n }\n\n private async translateStatements(key: string): Promise<string> {\n return (await this.translationService.translateAsync(key, { scope: 'organization-management' })) + '...';\n }\n}\n","export enum AXMOrganizationNodeType {\n Company = 'Company', // Company\n Location = 'Location', // Country, State, City\n BusinessUnit = 'BusinessUnit', // Division, Department, Branch\n Role = 'Role', // Position\n Person = 'Person' // Employee\n}\n\n\nexport const AXM_ALLOWED_CHILD_NODES: Record<AXMOrganizationNodeType, AXMOrganizationNodeType[]> = {\n [AXMOrganizationNodeType.Company]: [AXMOrganizationNodeType.Location, AXMOrganizationNodeType.BusinessUnit],\n [AXMOrganizationNodeType.Location]: [AXMOrganizationNodeType.Location, AXMOrganizationNodeType.BusinessUnit],\n [AXMOrganizationNodeType.BusinessUnit]: [AXMOrganizationNodeType.BusinessUnit, AXMOrganizationNodeType.Role],\n [AXMOrganizationNodeType.Role]: [AXMOrganizationNodeType.Person],\n [AXMOrganizationNodeType.Person]: [] // No children allowed\n};\n\n\nexport interface AXMOrganizationNode {\n id: string; // Unique identifier for the node\n title: string,// Title of the node\n subtitle?: string;\n description?: string | null,// Description of the node\n icon?: string;\n isExpanded?: boolean; // Add this property\n children?: AXMOrganizationNode[];\n type?: AXMOrganizationNodeType; // Type of the node\n parentId?: string | null; // ID of the parent node (null for root)\n entity?: {\n id: string; // ID of the linked entity\n source: string; // Source of the linked entity (e.g., 'OrganizationManagement.Branch', 'OrganizationManagement.Department', etc.)\n }\n\n metadata?: Record<string, any>; // Additional metadata (e.g., roles, counts, etc.)\n}\n\n\nexport const AXM_ORGANIZATION_DATA: AXMOrganizationNode = {\n id: '1',\n title: 'CEO',\n subtitle: 'Chief Executive Officer',\n description: 'Responsible for the overall success of the',\n icon: 'fa-user-tie',\n children: [\n {\n id: '2',\n title: 'CTO',\n subtitle: 'Chief Technology Officer',\n //description: 'Leads the technology team and innovation.',\n icon: 'fa-microchip',\n children: [\n {\n id: '3',\n title: 'Engineering Director',\n subtitle: 'Director of Engineering',\n description: 'Oversees all engineering teams.',\n icon: 'fa-cogs',\n children: [\n {\n id: '4',\n title: 'Dev Manager',\n subtitle: 'Development Manager',\n description: 'Manages the development team.',\n icon: 'fa-code',\n children: [\n {\n id: '5',\n title: 'Frontend Team Lead',\n subtitle: 'Leads frontend developers',\n description: 'Manages the frontend development efforts.',\n icon: 'fa-paint-brush',\n },\n {\n id: '6',\n title: 'Backend Team Lead',\n subtitle: 'Leads backend developers',\n description: 'Manages the backend development efforts.',\n icon: 'fa-database',\n },\n ],\n },\n {\n id: '7',\n title: 'QA Manager',\n subtitle: 'Quality Assurance Manager',\n description: 'Ensures product quality.',\n icon: 'fa-check-circle',\n children: [\n {\n id: '8',\n title: 'QA Engineer',\n subtitle: 'Quality Assurance Engineer',\n description: 'Tests and ensures software quality.',\n icon: 'fa-bug',\n },\n ],\n },\n ],\n },\n {\n id: '9',\n title: 'Security Manager',\n subtitle: 'Security & Compliance',\n description: 'Ensures security policies and compliance.',\n icon: 'fa-shield-alt',\n },\n ],\n },\n {\n id: '10',\n title: 'CFO',\n subtitle: 'Chief Financial Officer',\n description: 'Manages the financial health of the organization.',\n icon: 'fa-chart-line',\n children: [\n {\n id: '11',\n title: 'Finance Manager',\n subtitle: 'Oversees financial operations',\n description: 'Handles budgets, financial planning, and reporting.',\n icon: 'fa-money-bill-wave',\n },\n {\n id: '12',\n title: 'Accounting Manager',\n subtitle: 'Manages accounting team',\n description: 'Ensures financial accuracy and compliance.',\n icon: 'fa-calculator',\n },\n ],\n },\n {\n id: '13',\n title: 'COO',\n subtitle: 'Chief Operating Officer',\n description: 'Oversees daily business operations.',\n icon: 'fa-briefcase',\n children: [\n {\n id: '14',\n title: 'HR Manager',\n subtitle: 'Human Resources Manager',\n description: 'Manages recruitment and employee relations.',\n icon: 'fa-users',\n },\n {\n id: '15',\n title: 'Operations Manager',\n subtitle: 'Leads business operations',\n description: 'Oversees operational efficiency and process improvements.',\n icon: 'fa-industry',\n },\n ],\n },\n {\n id: '16',\n title: 'CMO',\n subtitle: 'Chief Marketing Officer',\n description: 'Leads marketing and brand strategy.',\n icon: 'fa-bullhorn',\n children: [\n {\n id: '17',\n title: 'Marketing Manager',\n subtitle: 'Oversees marketing team',\n description: 'Handles branding, campaigns, and customer engagement.',\n icon: 'fa-ad',\n },\n {\n id: '18',\n title: 'Sales Director',\n subtitle: 'Leads sales initiatives',\n description: 'Drives revenue and sales growth.',\n icon: 'fa-handshake',\n children: [\n {\n id: '19',\n title: 'Sales Manager',\n subtitle: 'Manages sales team',\n description: 'Oversees sales operations and targets.',\n icon: 'fa-shopping-cart',\n },\n ],\n },\n ],\n },\n ],\n};\n","import { AXPanViewDirective } from '@acorex/cdk/pan-view';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDropdownButtonModule } from '@acorex/components/dropdown-button';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXContextMenuComponent, AXContextMenuOpeningEvent, AXMenuItem, AXMenuModule } from '@acorex/components/menu';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPSimplePageLayout } from '@acorex/platform/themes/default';\nimport {\n AXPLayoutThemeService,\n AXPThemeLayoutActionsComponent,\n AXPThemeLayoutBlockComponent,\n AXPThemeLayoutHeaderTemplateComponent,\n AXPThemeLayoutPagePrimaryActionsComponent,\n AXPThemeLayoutPageSecondaryActionsComponent,\n} from '@acorex/platform/themes/shared';\nimport { CommonModule } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n inject,\n NgZone,\n signal,\n TemplateRef,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { AXMOrgChartPrintService } from './org-chart-print.service';\nimport { AXM_ORGANIZATION_DATA, AXMOrganizationNode } from './org-chart.type';\nimport { AXBreadcrumbsModule } from '@acorex/components/breadcrumbs';\nimport { RootConfig } from '../../const';\n\n@Component({\n templateUrl: './org-chart.page.html',\n styleUrls: ['./org-chart.page.scss'],\n imports: [\n CommonModule,\n RouterModule,\n //\n AXPSimplePageLayout,\n AXPThemeLayoutBlockComponent,\n AXPThemeLayoutHeaderTemplateComponent,\n AXPThemeLayoutActionsComponent,\n AXPThemeLayoutPageSecondaryActionsComponent,\n AXPThemeLayoutPagePrimaryActionsComponent,\n //\n AXMenuModule,\n AXButtonModule,\n AXDropdownButtonModule,\n AXTranslationModule,\n AXDecoratorModule,\n AXPanViewDirective,\n AXLoadingModule,\n AXBreadcrumbsModule\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [],\n})\nexport class AXMOrgChartPage {\n\n protected readonly layout = inject(AXPLayoutThemeService);\n protected readonly rootConfig = RootConfig;\n\n private d3!: typeof import('d3');\n\n private nodeTemplate = viewChild.required<TemplateRef<any>>('nodeTemplate');\n private treeContainer = viewChild.required<ElementRef<HTMLDivElement>>('chart');\n private parent = viewChild.required<ElementRef<HTMLDivElement>>('parent');\n private contextMenu = viewChild(AXContextMenuComponent);\n\n private ngzone = inject(NgZone);\n private viewContainerRef = inject(ViewContainerRef);\n private chartPrintService = inject(AXMOrgChartPrintService);\n\n private readonly DATA = AXM_ORGANIZATION_DATA;\n private readonly NODE_STROKE_COLOR = 'rgba(var(--ax-sys-color-primary-400))';\n private readonly LINK_STROKE_WIDTH = 1;\n\n protected isFullscreen = signal(false);\n protected panX = signal(0);\n protected panY = signal(0);\n protected panZoomLevel = signal(100);\n\n #initialize = afterNextRender(async () => {\n this.d3 = await import('d3');\n this.createChart(this.treeContainer().nativeElement, this.DATA);\n });\n\n // eff = effect(() => console.log(this.panX(), this.panY()));\n\n protected zoomIn() {\n this.panZoomLevel.update((prev) => prev + 5);\n }\n protected zoomOut() {\n this.panZoomLevel.update((prev) => prev - 5);\n }\n protected zoomReset() {\n this.panX.set(1);\n this.panY.set(1);\n this.panX.set(0);\n this.panY.set(0);\n this.panZoomLevel.set(100);\n }\n protected toggleFullscreen() {\n if (this.isFullscreen()) {\n document.exitFullscreen();\n this.isFullscreen.set(false);\n } else {\n this.parent().nativeElement.requestFullscreen();\n this.isFullscreen.set(true);\n }\n }\n\n private calculateMaxDepth(node: AXMOrganizationNode): number {\n if (!node.children || node.children.length === 0 || node.isExpanded === false) {\n return 1; // Base case: no children or node is collapsed\n }\n return 1 + Math.max(...node.children.map((child) => this.calculateMaxDepth(child)));\n }\n\n private calculateMaxBreadth(node: AXMOrganizationNode): number {\n if (!node.children || node.children.length === 0 || node.isExpanded === false) {\n return 1; // Base case: no children or node is collapsed\n }\n return node.children.reduce((acc, child) => acc + this.calculateMaxBreadth(child), 0);\n }\n\n createChart(el: Element, data: AXMOrganizationNode): void {\n this.ngzone.runOutsideAngular(() => {\n // Constants for node dimensions and spacing\n const NODE_WIDTH_BASE = 240; // Base width for each node\n const NODE_HEIGHT_BASE = 120; // Base height for each node\n const HORIZONTAL_SPACING = 25; // Horizontal spacing between nodes\n const VERTICAL_SPACING = 50; // Vertical spacing between levels\n\n // Clear existing SVG and create a new one\n this.clearChart(el);\n const newSvg = this.d3.select(el).append('svg');\n\n // Create a hierarchy from the data\n const root = this.d3.hierarchy(data);\n\n // Filter out collapsed nodes and their descendants\n root.descendants().forEach((node: any) => {\n if (node.data.isExpanded === false) {\n node.children = undefined; // Remove children for collapsed nodes\n }\n });\n\n // Create a tree layout\n const treeLayout = this.d3\n .tree<AXMOrganizationNode>()\n .nodeSize([NODE_WIDTH_BASE + HORIZONTAL_SPACING, NODE_HEIGHT_BASE + VERTICAL_SPACING]);\n\n // Generate the tree nodes and links\n treeLayout(root);\n\n // Calculate the bounds of the tree\n let minX = Infinity,\n maxX = -Infinity,\n minY = Infinity,\n maxY = -Infinity;\n root.descendants().forEach((d: any) => {\n if (d.x < minX) minX = d.x;\n if (d.x > maxX) maxX = d.x;\n if (d.y < minY) minY = d.y;\n if (d.y > maxY) maxY = d.y;\n });\n\n // Calculate SVG dimensions based on tree bounds\n const CONTAINER_WIDTH = maxX - minX + NODE_WIDTH_BASE + 2 * HORIZONTAL_SPACING;\n const CONTAINER_HEIGHT = maxY - minY + NODE_HEIGHT_BASE + 2 * VERTICAL_SPACING;\n\n // Set SVG dimensions\n newSvg.attr('width', CONTAINER_WIDTH).attr('height', CONTAINER_HEIGHT);\n\n // Adjust the transform of the <g> element to center the tree\n const g = newSvg\n .append('g')\n .attr(\n 'transform',\n `translate(${-minX + NODE_WIDTH_BASE / 2 + HORIZONTAL_SPACING / 2}, ${-minY + NODE_HEIGHT_BASE / 2 + VERTICAL_SPACING / 2\n })`\n );\n\n // Create links (lines with 90-degree angles)\n const link = g\n .selectAll('.link')\n .data(root.links())\n .enter()\n .append('path')\n .attr('class', 'link')\n .attr('d', (d: any) => {\n const source = d.source;\n const target = d.target;\n return `M${source.x},${source.y}V${(source.y + target.y) / 2}H${target.x}V${target.y - 10}`;\n })\n .attr('fill', 'none')\n .attr('stroke', this.NODE_STROKE_COLOR)\n .attr('stroke-width', this.LINK_STROKE_WIDTH)\n .attr('from', (d: any) => `node-${d.source.data.id}`)\n .attr('to', (d: any) => `node-${d.target.data.id}`);\n\n // Create nodes\n const node = g\n .selectAll('.axp-org-chart-node')\n .data(root.descendants())\n .enter()\n .append('foreignObject')\n .attr('class', 'axp-org-chart-node')\n .attr('node', (d: any) => `node-${d.data.id}`) // Unique ID for each node\n .attr('x', (d: any) => d.x - NODE_WIDTH_BASE / 2) // Use d.x (D3 node property)\n .attr('y', (d: any) => d.y - NODE_HEIGHT_BASE / 2 + 10) // Use d.y (D3 node property)\n .attr('width', NODE_WIDTH_BASE)\n .attr('height', NODE_HEIGHT_BASE)\n .each((d: any) => this.renderNodeTemplate(d.data, d.x, d.y));\n\n // Refresh context menu\n this.contextMenu()?.refresh();\n });\n }\n\n private renderNodeTemplate(data: AXMOrganizationNode, x: number, y: number): void {\n const viewRef = this.viewContainerRef.createEmbeddedView(this.nodeTemplate(), {\n $implicit: data, // Pass the node data to the template\n });\n\n // Select node using unique ID\n const nodeElement = this.d3.select(this.treeContainer().nativeElement).select(`[node=\"node-${data.id}\"]`); // Select by unique ID instead of position\n\n const element = nodeElement.node() as HTMLElement | null;\n if (element) {\n element.appendChild(viewRef.rootNodes[0]);\n }\n }\n\n protected toggleNode(data: AXMOrganizationNode) {\n data.isExpanded = data.isExpanded === undefined ? false : !data.isExpanded;\n this.createChart(this.treeContainer().nativeElement, this.DATA); // Re-render the chart\n }\n\n private clearChart(el: Element): void {\n this.d3.select(el).select('svg').remove();\n this.viewContainerRef.clear();\n }\n\n protected handleContextMenuOnOpening(e: AXContextMenuOpeningEvent) {\n const items: AXMenuItem[] = [\n { name: 'add', text: 'Add New Departpent', color: 'primary', icon: 'fa-light fa-plus' },\n\n {\n name: 'remove',\n text: 'Remove',\n color: 'danger',\n icon: 'fa-light fa-trash-can',\n },\n ];\n e.items.push(...items);\n }\n\n protected printChart() {\n this.chartPrintService.printChart(this.treeContainer().nativeElement);\n }\n}\n","<axp-layout-simple-page *translate=\"let t\">\n <axp-layout-header>\n <axp-layout-title> {{t(rootConfig.entities.chart.title) | async}} </axp-layout-title>\n\n <axp-layout-description> Clear and dynamic view of your organization's structure </axp-layout-description>\n\n <axp-layout-actions>\n <axp-layout-actions-primary> </axp-layout-actions-primary>\n\n <axp-layout-actions-secondary>\n <ax-button-item [text]=\"(t('print') | async)!\" (onClick)=\"printChart()\">\n <ax-prefix>\n <ax-icon [icon]=\"'fa-solid fa-print'\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n </axp-layout-actions-secondary>\n </axp-layout-actions>\n\n\n <axp-layout-breadcrumbs>\n <ax-breadcrumbs [class.ax-hidden]=\"layout.isSmall()\">\n <ng-template #divider>\n <i class=\"fa-regular fa-slash-forward\"></i>\n </ng-template>\n <ax-breadcrumbs-item>\n Home\n </ax-breadcrumbs-item>\n <ax-breadcrumbs-item>\n Organization\n </ax-breadcrumbs-item>\n </ax-breadcrumbs>\n </axp-layout-breadcrumbs>\n </axp-layout-header>\n\n <axp-layout-content>\n <div class=\"ax-h-[calc(100vh-190px)]\" #parent id=\"parent\">\n <div #chart axPanView [(panX)]=\"panX\" [(panY)]=\"panY\" [(zoom)]=\"panZoomLevel\" wrapperClasses=\"h\"></div>\n <div class=\"ax-absolute ax-bottom-2 ax-right-2 ax-z-10 ax-flex ax-gap-2\">\n <ax-button (onClick)=\"zoomOut()\">\n <ax-icon class=\"fa-solid fa-minus\"> </ax-icon>\n </ax-button>\n <ax-button [text]=\"panZoomLevel()\" (onClick)=\"zoomReset()\"></ax-button>\n <ax-button (onClick)=\"zoomIn()\">\n <ax-icon class=\"fa-solid fa-add\"> </ax-icon>\n </ax-button>\n <ax-button (onClick)=\"toggleFullscreen()\">\n <ax-icon>\n <i class=\"fa-solid\" [class]=\"isFullscreen()? 'fa-compress' : 'fa-expand'\"></i>\n </ax-icon>\n </ax-button>\n </div>\n </div>\n\n <ax-context-menu [target]=\"'.axp-org-chart-node'\" [orientation]=\"'vertical'\" [closeOn]=\"'leave'\"\n (onOpening)=\"handleContextMenuOnOpening($event)\">\n </ax-context-menu>\n </axp-layout-content>\n</axp-layout-simple-page>\n<div #chart class=\"chart-container ax-border\"></div>\n\n<!-- <ax-chart nodeTemplate=\"nodeTemplate\" nodes=\"nodes\"></ax-chart> -->\n\n<ng-template #nodeTemplate let-data>\n <div\n class=\"ax-border ax-select-none ax-shadow-md ax-border-primary-500 ax-text-primary-800 ax-rounded-md ax-bg-white ax-flex ax-flex-col ax-overflow-hidden\">\n <div class=\"ax-bg-primary-400 ax-text-on-primary ax-px-4 ax-py-2 ax-h-full ax-cursor-pointer hover:ax-brightness-90\"\n [class.ax-rounded-b-none]=\"data.description\" (dblclick)=\"toggleNode(data)\">\n <div class=\"ax-flex ax-gap-3 ax-items-center ax-justify-between ax-h-full\">\n <ax-icon><i class=\"fa-light fa-lg\" [class]=\"data.icon\"></i></ax-icon>\n <div class=\"ax-flex ax-flex-col ax-gap-1\">\n <div class=\"ax-text-xs ax-font-bold\">{{ data.title }}</div>\n @if (data.subtitle) {\n <div class=\"ax-text-xs\">{{ data.subtitle }}</div>\n }\n </div>\n @if (data.children && data.children.length > 0) {\n <div class=\"ax-flex ax-justify-center ax-items-center\" (click)=\"toggleNode(data)\">\n <ax-icon>\n <i class=\"fa-solid\" [class]=\"data.isExpanded === false ? 'fa-chevron-down' : 'fa-chevron-up'\"></i></ax-icon>\n </div>\n }@else {\n <span></span>\n }\n </div>\n </div>\n @if(data.description) {\n <div class=\"ax-text-xs ax-break-words ax-px-4 ax-py-2 ax-text-default dark:ax-text-on-ghost\">\n {{ data.description }}\n </div>\n }\n </div>\n</ng-template>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;MASa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