@acorex/modules 19.2.3 → 19.2.4
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.
- package/fesm2022/acorex-modules-organization-managment-org-chart.page-fOxjGb8i.mjs +297 -0
- package/fesm2022/acorex-modules-organization-managment-org-chart.page-fOxjGb8i.mjs.map +1 -0
- package/fesm2022/acorex-modules-organization-managment.mjs +1 -1
- package/organization-managment/lib/pages/org-chart/org-chart.page.d.ts +23 -3
- package/organization-managment/lib/pages/org-chart/org-chart.type.d.ts +9 -0
- package/package.json +1 -1
- package/fesm2022/acorex-modules-organization-managment-org-chart.page-ubxepOmw.mjs +0 -55
- package/fesm2022/acorex-modules-organization-managment-org-chart.page-ubxepOmw.mjs.map +0 -1
@@ -0,0 +1,297 @@
|
|
1
|
+
import * as i6 from '@acorex/cdk/pan-view';
|
2
|
+
import { AXPanViewModule } from '@acorex/cdk/pan-view';
|
3
|
+
import * as i3 from '@acorex/components/button';
|
4
|
+
import { AXButtonModule } from '@acorex/components/button';
|
5
|
+
import * as i5 from '@acorex/components/decorators';
|
6
|
+
import { AXDecoratorModule } from '@acorex/components/decorators';
|
7
|
+
import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
|
8
|
+
import * as i2 from '@acorex/components/menu';
|
9
|
+
import { AXMenuModule } from '@acorex/components/menu';
|
10
|
+
import * as i4 from '@acorex/core/translation';
|
11
|
+
import { AXTranslationModule } from '@acorex/core/translation';
|
12
|
+
import { AXPSimplePageLayout } from '@acorex/platform/themes/default';
|
13
|
+
import { 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 { viewChild, inject, ViewContainerRef, afterNextRender, signal, Component, ChangeDetectionStrategy } from '@angular/core';
|
18
|
+
import { RouterModule } from '@angular/router';
|
19
|
+
import * as d3 from 'd3';
|
20
|
+
|
21
|
+
const AXM_ORGANIZATION_DATA = {
|
22
|
+
id: '1',
|
23
|
+
title: 'CEO',
|
24
|
+
subtitle: 'Chief Executive Officer',
|
25
|
+
description: 'Responsible for the overall success of the',
|
26
|
+
icon: 'fa-user-tie',
|
27
|
+
children: [
|
28
|
+
{
|
29
|
+
id: '2',
|
30
|
+
title: 'CTO',
|
31
|
+
subtitle: 'Chief Technology Officer',
|
32
|
+
//description: 'Leads the technology team and innovation.',
|
33
|
+
icon: 'fa-microchip',
|
34
|
+
children: [
|
35
|
+
{
|
36
|
+
id: '3',
|
37
|
+
title: 'Engineering Director',
|
38
|
+
subtitle: 'Director of Engineering',
|
39
|
+
description: 'Oversees all engineering teams.',
|
40
|
+
icon: 'fa-cogs',
|
41
|
+
children: [
|
42
|
+
{
|
43
|
+
id: '4',
|
44
|
+
title: 'Dev Manager',
|
45
|
+
subtitle: 'Development Manager',
|
46
|
+
description: 'Manages the development team.',
|
47
|
+
icon: 'fa-code',
|
48
|
+
children: [
|
49
|
+
{
|
50
|
+
id: '5',
|
51
|
+
title: 'Frontend Team Lead',
|
52
|
+
subtitle: 'Leads frontend developers',
|
53
|
+
description: 'Manages the frontend development efforts.',
|
54
|
+
icon: 'fa-paint-brush',
|
55
|
+
},
|
56
|
+
{
|
57
|
+
id: '6',
|
58
|
+
title: 'Backend Team Lead',
|
59
|
+
subtitle: 'Leads backend developers',
|
60
|
+
description: 'Manages the backend development efforts.',
|
61
|
+
icon: 'fa-database',
|
62
|
+
},
|
63
|
+
],
|
64
|
+
},
|
65
|
+
{
|
66
|
+
id: '7',
|
67
|
+
title: 'QA Manager',
|
68
|
+
subtitle: 'Quality Assurance Manager',
|
69
|
+
description: 'Ensures product quality.',
|
70
|
+
icon: 'fa-check-circle',
|
71
|
+
children: [
|
72
|
+
{
|
73
|
+
id: '8',
|
74
|
+
title: 'QA Engineer',
|
75
|
+
subtitle: 'Quality Assurance Engineer',
|
76
|
+
description: 'Tests and ensures software quality.',
|
77
|
+
icon: 'fa-bug',
|
78
|
+
},
|
79
|
+
],
|
80
|
+
},
|
81
|
+
],
|
82
|
+
},
|
83
|
+
{
|
84
|
+
id: '9',
|
85
|
+
title: 'Security Manager',
|
86
|
+
subtitle: 'Security & Compliance',
|
87
|
+
description: 'Ensures security policies and compliance.',
|
88
|
+
icon: 'fa-shield-alt',
|
89
|
+
},
|
90
|
+
],
|
91
|
+
},
|
92
|
+
{
|
93
|
+
id: '10',
|
94
|
+
title: 'CFO',
|
95
|
+
subtitle: 'Chief Financial Officer',
|
96
|
+
description: 'Manages the financial health of the organization.',
|
97
|
+
icon: 'fa-chart-line',
|
98
|
+
children: [
|
99
|
+
{
|
100
|
+
id: '11',
|
101
|
+
title: 'Finance Manager',
|
102
|
+
subtitle: 'Oversees financial operations',
|
103
|
+
description: 'Handles budgets, financial planning, and reporting.',
|
104
|
+
icon: 'fa-money-bill-wave',
|
105
|
+
},
|
106
|
+
{
|
107
|
+
id: '12',
|
108
|
+
title: 'Accounting Manager',
|
109
|
+
subtitle: 'Manages accounting team',
|
110
|
+
description: 'Ensures financial accuracy and compliance.',
|
111
|
+
icon: 'fa-calculator',
|
112
|
+
},
|
113
|
+
],
|
114
|
+
},
|
115
|
+
{
|
116
|
+
id: '13',
|
117
|
+
title: 'COO',
|
118
|
+
subtitle: 'Chief Operating Officer',
|
119
|
+
description: 'Oversees daily business operations.',
|
120
|
+
icon: 'fa-briefcase',
|
121
|
+
children: [
|
122
|
+
{
|
123
|
+
id: '14',
|
124
|
+
title: 'HR Manager',
|
125
|
+
subtitle: 'Human Resources Manager',
|
126
|
+
description: 'Manages recruitment and employee relations.',
|
127
|
+
icon: 'fa-users',
|
128
|
+
},
|
129
|
+
{
|
130
|
+
id: '15',
|
131
|
+
title: 'Operations Manager',
|
132
|
+
subtitle: 'Leads business operations',
|
133
|
+
description: 'Oversees operational efficiency and process improvements.',
|
134
|
+
icon: 'fa-industry',
|
135
|
+
},
|
136
|
+
],
|
137
|
+
},
|
138
|
+
{
|
139
|
+
id: '16',
|
140
|
+
title: 'CMO',
|
141
|
+
subtitle: 'Chief Marketing Officer',
|
142
|
+
description: 'Leads marketing and brand strategy.',
|
143
|
+
icon: 'fa-bullhorn',
|
144
|
+
children: [
|
145
|
+
{
|
146
|
+
id: '17',
|
147
|
+
title: 'Marketing Manager',
|
148
|
+
subtitle: 'Oversees marketing team',
|
149
|
+
description: 'Handles branding, campaigns, and customer engagement.',
|
150
|
+
icon: 'fa-ad',
|
151
|
+
},
|
152
|
+
{
|
153
|
+
id: '18',
|
154
|
+
title: 'Sales Director',
|
155
|
+
subtitle: 'Leads sales initiatives',
|
156
|
+
description: 'Drives revenue and sales growth.',
|
157
|
+
icon: 'fa-handshake',
|
158
|
+
children: [
|
159
|
+
{
|
160
|
+
id: '19',
|
161
|
+
title: 'Sales Manager',
|
162
|
+
subtitle: 'Manages sales team',
|
163
|
+
description: 'Oversees sales operations and targets.',
|
164
|
+
icon: 'fa-shopping-cart',
|
165
|
+
},
|
166
|
+
],
|
167
|
+
},
|
168
|
+
],
|
169
|
+
},
|
170
|
+
],
|
171
|
+
};
|
172
|
+
|
173
|
+
class AXMOrgChartPage {
|
174
|
+
constructor() {
|
175
|
+
this.nodeTemplate = viewChild.required('nodeTemplate');
|
176
|
+
this.treeContainer = viewChild.required('chart');
|
177
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
178
|
+
this.data = AXM_ORGANIZATION_DATA;
|
179
|
+
// Constants for dynamic sizing
|
180
|
+
this.CONTAINER_WIDTH = 2400;
|
181
|
+
this.CONTAINER_HEIGHT = 1200;
|
182
|
+
this.NODE_WIDTH_BASE = 240;
|
183
|
+
this.NODE_HEIGHT_BASE = 120;
|
184
|
+
this.NODE_STROKE_COLOR = 'rgba(var(--ax-sys-color-primary-400))';
|
185
|
+
this.LINK_STROKE_WIDTH = 1;
|
186
|
+
this.#af = afterNextRender(() => {
|
187
|
+
this.createChart(this.treeContainer().nativeElement, this.data);
|
188
|
+
});
|
189
|
+
this.panX = signal(0);
|
190
|
+
this.panY = signal(0);
|
191
|
+
this.panZoomLevel = signal(100);
|
192
|
+
}
|
193
|
+
#af;
|
194
|
+
zoomIn() {
|
195
|
+
this.panZoomLevel.update((prev) => prev + 5);
|
196
|
+
}
|
197
|
+
zoomOut() {
|
198
|
+
this.panZoomLevel.update((prev) => prev - 5);
|
199
|
+
}
|
200
|
+
zoomReset() {
|
201
|
+
this.panX.set(1);
|
202
|
+
this.panY.set(1);
|
203
|
+
this.panX.set(0);
|
204
|
+
this.panY.set(0);
|
205
|
+
this.panZoomLevel.set(100);
|
206
|
+
}
|
207
|
+
createChart(el, data) {
|
208
|
+
const svg = d3.select(el).append('svg').attr('width', this.CONTAINER_WIDTH).attr('height', this.CONTAINER_HEIGHT);
|
209
|
+
const g = svg.append('g').attr('transform', `translate(${this.NODE_HEIGHT_BASE}, ${this.NODE_HEIGHT_BASE})`);
|
210
|
+
// Create a hierarchy from the data
|
211
|
+
const root = d3.hierarchy(data);
|
212
|
+
// Create a tree layout
|
213
|
+
const treeLayout = d3.tree().size([this.CONTAINER_WIDTH - 100, this.CONTAINER_HEIGHT / 2]);
|
214
|
+
// Generate the tree nodes and links
|
215
|
+
treeLayout(root);
|
216
|
+
// Create links (lines with 90-degree angles)
|
217
|
+
const link = g
|
218
|
+
.selectAll('.link')
|
219
|
+
.data(root.links())
|
220
|
+
.enter()
|
221
|
+
.append('path')
|
222
|
+
.attr('class', 'link')
|
223
|
+
.attr('d', (d) => {
|
224
|
+
const source = d.source;
|
225
|
+
const target = d.target;
|
226
|
+
return `M${source.x},${source.y}V${(source.y + target.y) / 2}H${target.x}V${target.y}`;
|
227
|
+
})
|
228
|
+
.attr('fill', 'none')
|
229
|
+
.attr('stroke', this.NODE_STROKE_COLOR)
|
230
|
+
.attr('stroke-width', this.LINK_STROKE_WIDTH);
|
231
|
+
// Create nodes
|
232
|
+
const node = g
|
233
|
+
.selectAll('.axp-org-chart-node')
|
234
|
+
.data(root.descendants())
|
235
|
+
.enter()
|
236
|
+
.append('foreignObject')
|
237
|
+
.attr('class', 'axp-org-chart-node')
|
238
|
+
.attr('id', (d) => `node-${d.data.id}`) // Unique ID for each node
|
239
|
+
.attr('x', (d) => d.x - this.NODE_WIDTH_BASE / 2) // Use d.x (D3 node property)
|
240
|
+
.attr('y', (d) => d.y - this.NODE_HEIGHT_BASE / 2) // Use d.y (D3 node property)
|
241
|
+
.attr('width', this.NODE_WIDTH_BASE)
|
242
|
+
.attr('height', this.NODE_HEIGHT_BASE)
|
243
|
+
.each((d) => this.renderNodeTemplate(d.data, d.x, d.y)); // Pass x and y to renderNodeTemplate
|
244
|
+
}
|
245
|
+
renderNodeTemplate(data, x, y) {
|
246
|
+
const viewRef = this.viewContainerRef.createEmbeddedView(this.nodeTemplate(), {
|
247
|
+
$implicit: data, // Pass the node data to the template
|
248
|
+
});
|
249
|
+
// Select node using unique ID
|
250
|
+
const nodeElement = d3.select(this.treeContainer().nativeElement).select(`#node-${data.id}`); // Select by unique ID instead of position
|
251
|
+
const element = nodeElement.node();
|
252
|
+
if (element) {
|
253
|
+
element.appendChild(viewRef.rootNodes[0]);
|
254
|
+
}
|
255
|
+
}
|
256
|
+
handleContextMenuOnOpening(e) {
|
257
|
+
const items = [
|
258
|
+
{
|
259
|
+
text: 'Add New Departpent',
|
260
|
+
break: true,
|
261
|
+
icon: 'fa-light fa-plus'
|
262
|
+
},
|
263
|
+
{
|
264
|
+
text: "Remove",
|
265
|
+
color: 'danger',
|
266
|
+
name: 'remove',
|
267
|
+
icon: 'fa-light fa-trash-can'
|
268
|
+
}
|
269
|
+
];
|
270
|
+
e.items.push(...items);
|
271
|
+
console.log(e);
|
272
|
+
}
|
273
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMOrgChartPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
274
|
+
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 }], ngImport: i0, template: "<axp-layout-simple-page *translate=\"let t\">\n <axp-layout-header>\n <axp-layout-title> {{t('org-chart',{ scope:'organization-management' }) | 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('settings.restore-defaults',{scope:'platform-management'}) | async)!\">\n <ax-prefix>\n <ax-icon [icon]=\"'fa-solid fa-rotate'\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n <ax-divider></ax-divider>\n <ax-button-item [text]=\"(t('export') | async)!\">\n <ax-prefix>\n <ax-icon [icon]=\"'fa-solid fa-file-export'\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n </axp-layout-actions-secondary>\n </axp-layout-actions>\n </axp-layout-header>\n\n <axp-layout-content>\n <div class=\"ax-h-[calc(100vh-56px)]\" #parent>\n <div #chart axPanView [(panX)]=\"panX\" [(panY)]=\"panY\" [(zoom)]=\"panZoomLevel\" wrapperClasses=\"ax-pan-view-wrapper\"\n class=\"ax-w-[800px] ax-h-[600px]\"></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 </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\n<ng-template #nodeTemplate let-data>\n <div\n class=\"ax-border 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-p-2 ax-h-full\" [class.ax-rounded-b-none]=\"data.description\">\n <div class=\"ax-flex ax-gap-3 ax-items-center ax-justify-center ax-h-full\">\n <i class=\"fa-light fa-lg\" [class]=\"data.icon\"></i>\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 </div>\n </div>\n @if(data.description)\n {\n <div class=\"ax-text-xs ax-break-words ax-px-4 ax-py-2 ax-text-default dark:ax-text-on-ghost\">{{ data.description }}\n </div>\n }\n </div>\n</ng-template>", styles: [".link{stroke:#999;stroke-width:2px}.axp-org-chart-node{overflow:visible}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: RouterModule }, { kind: "component", type: 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-suffix, axp-layout-prefix, axp-layout-title, axp-layout-nav-button, axp-layout-description, axp-layout-toolbar, axp-layout-title-bar, axp-layout-breadcrumbs " }, { 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: 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-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXPanViewModule }, { kind: "directive", type: i6.AXPanViewDirective, selector: "[axPanView]", inputs: ["zoomStep", "minZoom", "maxZoom", "disablePan", "disableZoom", "wrapperClasses", "panX", "panY", "zoom"], outputs: ["panXChange", "panYChange", "zoomChange", "positionChange"], exportAs: ["axPanView"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
275
|
+
}
|
276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMOrgChartPage, decorators: [{
|
277
|
+
type: Component,
|
278
|
+
args: [{ imports: [
|
279
|
+
CommonModule,
|
280
|
+
RouterModule,
|
281
|
+
AXPSimplePageLayout,
|
282
|
+
AXPThemeLayoutBlockComponent,
|
283
|
+
AXPThemeLayoutHeaderTemplateComponent,
|
284
|
+
AXPThemeLayoutActionsComponent,
|
285
|
+
AXPThemeLayoutPageSecondaryActionsComponent,
|
286
|
+
AXPThemeLayoutPagePrimaryActionsComponent,
|
287
|
+
AXMenuModule,
|
288
|
+
AXButtonModule,
|
289
|
+
AXDropdownButtonModule,
|
290
|
+
AXTranslationModule,
|
291
|
+
AXDecoratorModule,
|
292
|
+
AXPanViewModule,
|
293
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [], template: "<axp-layout-simple-page *translate=\"let t\">\n <axp-layout-header>\n <axp-layout-title> {{t('org-chart',{ scope:'organization-management' }) | 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('settings.restore-defaults',{scope:'platform-management'}) | async)!\">\n <ax-prefix>\n <ax-icon [icon]=\"'fa-solid fa-rotate'\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n <ax-divider></ax-divider>\n <ax-button-item [text]=\"(t('export') | async)!\">\n <ax-prefix>\n <ax-icon [icon]=\"'fa-solid fa-file-export'\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n </axp-layout-actions-secondary>\n </axp-layout-actions>\n </axp-layout-header>\n\n <axp-layout-content>\n <div class=\"ax-h-[calc(100vh-56px)]\" #parent>\n <div #chart axPanView [(panX)]=\"panX\" [(panY)]=\"panY\" [(zoom)]=\"panZoomLevel\" wrapperClasses=\"ax-pan-view-wrapper\"\n class=\"ax-w-[800px] ax-h-[600px]\"></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 </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\n<ng-template #nodeTemplate let-data>\n <div\n class=\"ax-border 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-p-2 ax-h-full\" [class.ax-rounded-b-none]=\"data.description\">\n <div class=\"ax-flex ax-gap-3 ax-items-center ax-justify-center ax-h-full\">\n <i class=\"fa-light fa-lg\" [class]=\"data.icon\"></i>\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 </div>\n </div>\n @if(data.description)\n {\n <div class=\"ax-text-xs ax-break-words ax-px-4 ax-py-2 ax-text-default dark:ax-text-on-ghost\">{{ data.description }}\n </div>\n }\n </div>\n</ng-template>", styles: [".link{stroke:#999;stroke-width:2px}.axp-org-chart-node{overflow:visible}\n"] }]
|
294
|
+
}], ctorParameters: () => [] });
|
295
|
+
|
296
|
+
export { AXMOrgChartPage };
|
297
|
+
//# sourceMappingURL=acorex-modules-organization-managment-org-chart.page-fOxjGb8i.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-modules-organization-managment-org-chart.page-fOxjGb8i.mjs","sources":["../../../../libs/modules/organization-managment/src/lib/pages/org-chart/org-chart.type.ts","../../../../libs/modules/organization-managment/src/lib/pages/org-chart/org-chart.page.ts","../../../../libs/modules/organization-managment/src/lib/pages/org-chart/org-chart.page.html"],"sourcesContent":["export interface AXMOrganizationNode {\n id: string;\n title: string;\n subtitle?: string;\n description?: string;\n icon?: string;\n children?: AXMOrganizationNode[];\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 { AXPanViewModule } 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 { AXContextMenuOpeningEvent, AXMenuItem, AXMenuModule } from '@acorex/components/menu';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPSimplePageLayout } from '@acorex/platform/themes/default';\nimport {\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 signal,\n TemplateRef,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport * as d3 from 'd3';\nimport { AXM_ORGANIZATION_DATA, AXMOrganizationNode } from './org-chart.type';\n\n@Component({\n templateUrl: './org-chart.page.html',\n styleUrls: ['./org-chart.page.scss'],\n imports: [\n CommonModule,\n RouterModule,\n AXPSimplePageLayout,\n AXPThemeLayoutBlockComponent,\n AXPThemeLayoutHeaderTemplateComponent,\n AXPThemeLayoutActionsComponent,\n AXPThemeLayoutPageSecondaryActionsComponent,\n AXPThemeLayoutPagePrimaryActionsComponent,\n AXMenuModule,\n AXButtonModule,\n AXDropdownButtonModule,\n AXTranslationModule,\n AXDecoratorModule,\n AXPanViewModule,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [],\n})\nexport class AXMOrgChartPage {\n\n private nodeTemplate = viewChild.required<TemplateRef<any>>('nodeTemplate');\n private treeContainer = viewChild.required<ElementRef<HTMLDivElement>>('chart');\n private viewContainerRef = inject(ViewContainerRef);\n private data = AXM_ORGANIZATION_DATA;\n\n // Constants for dynamic sizing\n private readonly CONTAINER_WIDTH = 2400;\n private readonly CONTAINER_HEIGHT = 1200;\n private readonly NODE_WIDTH_BASE = 240;\n private readonly NODE_HEIGHT_BASE = 120;\n private readonly NODE_STROKE_COLOR = 'rgba(var(--ax-sys-color-primary-400))';\n private readonly LINK_STROKE_WIDTH = 1;\n\n constructor() { }\n\n #af = afterNextRender(() => {\n this.createChart(this.treeContainer().nativeElement, this.data);\n });\n\n panX = signal(0);\n panY = signal(0);\n panZoomLevel = signal(100);\n\n zoomIn() {\n this.panZoomLevel.update((prev) => prev + 5);\n }\n zoomOut() {\n this.panZoomLevel.update((prev) => prev - 5);\n }\n 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\n createChart(el: Element, data: AXMOrganizationNode): void {\n const svg = d3.select(el).append('svg').attr('width', this.CONTAINER_WIDTH).attr('height', this.CONTAINER_HEIGHT);\n\n const g = svg.append('g').attr('transform', `translate(${this.NODE_HEIGHT_BASE}, ${this.NODE_HEIGHT_BASE})`);\n\n // Create a hierarchy from the data\n const root = d3.hierarchy(data);\n\n // Create a tree layout\n const treeLayout = d3.tree<AXMOrganizationNode>().size([this.CONTAINER_WIDTH - 100, this.CONTAINER_HEIGHT / 2]);\n\n // Generate the tree nodes and links\n treeLayout(root);\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}`;\n })\n .attr('fill', 'none')\n .attr('stroke', this.NODE_STROKE_COLOR)\n .attr('stroke-width', this.LINK_STROKE_WIDTH);\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('id', (d: any) => `node-${d.data.id}`) // Unique ID for each node\n .attr('x', (d: any) => d.x - this.NODE_WIDTH_BASE / 2) // Use d.x (D3 node property)\n .attr('y', (d: any) => d.y - this.NODE_HEIGHT_BASE / 2) // Use d.y (D3 node property)\n .attr('width', this.NODE_WIDTH_BASE)\n .attr('height', this.NODE_HEIGHT_BASE)\n .each((d: any) => this.renderNodeTemplate(d.data, d.x, d.y)); // Pass x and y to renderNodeTemplate\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 = d3.select(this.treeContainer().nativeElement).select(`#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\n protected handleContextMenuOnOpening(e: AXContextMenuOpeningEvent) {\n const items: AXMenuItem[] = [\n {\n text: 'Add New Departpent',\n break: true,\n icon: 'fa-light fa-plus'\n },\n {\n text: \"Remove\",\n color: 'danger',\n name: 'remove',\n icon: 'fa-light fa-trash-can'\n }\n ];\n e.items.push(...items);\n console.log(e);\n }\n}\n","<axp-layout-simple-page *translate=\"let t\">\n <axp-layout-header>\n <axp-layout-title> {{t('org-chart',{ scope:'organization-management' }) | 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('settings.restore-defaults',{scope:'platform-management'}) | async)!\">\n <ax-prefix>\n <ax-icon [icon]=\"'fa-solid fa-rotate'\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n <ax-divider></ax-divider>\n <ax-button-item [text]=\"(t('export') | async)!\">\n <ax-prefix>\n <ax-icon [icon]=\"'fa-solid fa-file-export'\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n </axp-layout-actions-secondary>\n </axp-layout-actions>\n </axp-layout-header>\n\n <axp-layout-content>\n <div class=\"ax-h-[calc(100vh-56px)]\" #parent>\n <div #chart axPanView [(panX)]=\"panX\" [(panY)]=\"panY\" [(zoom)]=\"panZoomLevel\" wrapperClasses=\"ax-pan-view-wrapper\"\n class=\"ax-w-[800px] ax-h-[600px]\"></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 </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\n<ng-template #nodeTemplate let-data>\n <div\n class=\"ax-border 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-p-2 ax-h-full\" [class.ax-rounded-b-none]=\"data.description\">\n <div class=\"ax-flex ax-gap-3 ax-items-center ax-justify-center ax-h-full\">\n <i class=\"fa-light fa-lg\" [class]=\"data.icon\"></i>\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 </div>\n </div>\n @if(data.description)\n {\n <div class=\"ax-text-xs ax-break-words ax-px-4 ax-py-2 ax-text-default dark:ax-text-on-ghost\">{{ data.description }}\n </div>\n }\n </div>\n</ng-template>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AASO,MAAM,qBAAqB,GAAwB;AACxD,IAAA,EAAE,EAAE,GAAG;AACP,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,QAAQ,EAAE,yBAAyB;AACnC,IAAA,WAAW,EAAE,4CAA4C;AACzD,IAAA,IAAI,EAAE,aAAa;AACnB,IAAA,QAAQ,EAAE;AACR,QAAA;AACE,YAAA,EAAE,EAAE,GAAG;AACP,YAAA,KAAK,EAAE,KAAK;AACZ,YAAA,QAAQ,EAAE,0BAA0B;;AAEpC,YAAA,IAAI,EAAE,cAAc;AACpB,YAAA,QAAQ,EAAE;AACR,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,EAAA,YAAA,EAAA,YAAA,EAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAKN,eAAe,EAAA,UAAA,EAAA,CAAA;kBAtB3B,SAAS;AAGC,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA;wBACP,YAAY;wBACZ,YAAY;wBACZ,mBAAmB;wBACnB,4BAA4B;wBAC5B,qCAAqC;wBACrC,8BAA8B;wBAC9B,2CAA2C;wBAC3C,yCAAyC;wBACzC,YAAY;wBACZ,cAAc;wBACd,sBAAsB;wBACtB,mBAAmB;wBACnB,iBAAiB;wBACjB,eAAe;AAChB,qBAAA,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC,EAAE,EAAA,QAAA,EAAA,q0FAAA,EAAA,MAAA,EAAA,CAAA,4EAAA,CAAA,EAAA;;;;;"}
|
@@ -502,7 +502,7 @@ function routesFacory() {
|
|
502
502
|
children: [
|
503
503
|
{
|
504
504
|
path: 'chart',
|
505
|
-
loadComponent: () => import('./acorex-modules-organization-managment-org-chart.page-
|
505
|
+
loadComponent: () => import('./acorex-modules-organization-managment-org-chart.page-fOxjGb8i.mjs').then((c) => c.AXMOrgChartPage),
|
506
506
|
},
|
507
507
|
],
|
508
508
|
},
|
@@ -1,8 +1,28 @@
|
|
1
|
+
import { AXContextMenuOpeningEvent } from '@acorex/components/menu';
|
2
|
+
import { AXMOrganizationNode } from './org-chart.type';
|
1
3
|
import * as i0 from "@angular/core";
|
2
4
|
export declare class AXMOrgChartPage {
|
3
|
-
private
|
4
|
-
|
5
|
-
private
|
5
|
+
#private;
|
6
|
+
private nodeTemplate;
|
7
|
+
private treeContainer;
|
8
|
+
private viewContainerRef;
|
9
|
+
private data;
|
10
|
+
private readonly CONTAINER_WIDTH;
|
11
|
+
private readonly CONTAINER_HEIGHT;
|
12
|
+
private readonly NODE_WIDTH_BASE;
|
13
|
+
private readonly NODE_HEIGHT_BASE;
|
14
|
+
private readonly NODE_STROKE_COLOR;
|
15
|
+
private readonly LINK_STROKE_WIDTH;
|
16
|
+
constructor();
|
17
|
+
panX: import("@angular/core").WritableSignal<number>;
|
18
|
+
panY: import("@angular/core").WritableSignal<number>;
|
19
|
+
panZoomLevel: import("@angular/core").WritableSignal<number>;
|
20
|
+
zoomIn(): void;
|
21
|
+
zoomOut(): void;
|
22
|
+
zoomReset(): void;
|
23
|
+
createChart(el: Element, data: AXMOrganizationNode): void;
|
24
|
+
private renderNodeTemplate;
|
25
|
+
protected handleContextMenuOnOpening(e: AXContextMenuOpeningEvent): void;
|
6
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXMOrgChartPage, never>;
|
7
27
|
static ɵcmp: i0.ɵɵComponentDeclaration<AXMOrgChartPage, "ng-component", never, {}, {}, never, never, true, never>;
|
8
28
|
}
|
package/package.json
CHANGED
@@ -1,55 +0,0 @@
|
|
1
|
-
import * as i2 from '@acorex/components/button';
|
2
|
-
import { AXButtonModule } from '@acorex/components/button';
|
3
|
-
import * as i4 from '@acorex/components/decorators';
|
4
|
-
import { AXDecoratorModule } from '@acorex/components/decorators';
|
5
|
-
import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
|
6
|
-
import { AXMenuModule } from '@acorex/components/menu';
|
7
|
-
import * as i3 from '@acorex/core/translation';
|
8
|
-
import { AXTranslationModule } from '@acorex/core/translation';
|
9
|
-
import { AXPSimplePageLayout } from '@acorex/platform/themes/default';
|
10
|
-
import { AXPThemeLayoutBlockComponent, AXPThemeLayoutHeaderTemplateComponent, AXPThemeLayoutActionsComponent, AXPThemeLayoutPageSecondaryActionsComponent, AXPThemeLayoutPagePrimaryActionsComponent } from '@acorex/platform/themes/shared';
|
11
|
-
import * as i1 from '@angular/common';
|
12
|
-
import { CommonModule } from '@angular/common';
|
13
|
-
import * as i0 from '@angular/core';
|
14
|
-
import { viewChild, Component, ChangeDetectionStrategy } from '@angular/core';
|
15
|
-
import { RouterModule } from '@angular/router';
|
16
|
-
|
17
|
-
class AXMOrgChartPage {
|
18
|
-
constructor() {
|
19
|
-
this.chart = viewChild('chart');
|
20
|
-
}
|
21
|
-
ngOnInit() {
|
22
|
-
this.createChart();
|
23
|
-
}
|
24
|
-
createChart() {
|
25
|
-
}
|
26
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMOrgChartPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
27
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.0.3", type: AXMOrgChartPage, isStandalone: true, selector: "ng-component", providers: [], viewQueries: [{ propertyName: "chart", first: true, predicate: ["chart"], descendants: true, isSignal: true }], ngImport: i0, template: "<axp-layout-simple-page *translate=\"let t\">\n\n <axp-layout-header>\n <axp-layout-title>\n {{t('org-chart',{ scope:'organization-management' }) | async}}\n </axp-layout-title>\n\n <axp-layout-description>\n Clear and dynamic view of your organization's structure\n </axp-layout-description>\n\n <axp-layout-actions>\n\n <axp-layout-actions-primary>\n\n </axp-layout-actions-primary>\n\n\n <axp-layout-actions-secondary>\n <ax-button-item [text]=\"(t('settings.restore-defaults',{scope:'platform-management'}) | async)!\">\n <ax-prefix>\n <ax-icon [icon]=\"'fa-solid fa-rotate'\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n <ax-divider></ax-divider>\n <ax-button-item [text]=\"(t('export') | async)!\">\n <ax-prefix>\n <ax-icon [icon]=\"'fa-solid fa-file-export'\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n </axp-layout-actions-secondary>\n\n </axp-layout-actions>\n </axp-layout-header>\n\n\n\n\n <axp-layout-content>\n Hi\n <div class=\"chart\" #chart></div>\n <!-- <ax-context-menu\n (onItemClick)=\"handleContextMenuOnItemClick($event)\"\n [items]=\"menuItem()\"\n [target]=\"'.ctx'\"\n [orientation]=\"'vertical'\"\n [closeOn]=\"'leave'\"\n (onOpening)=\"handleOpenContext($event)\"\n>\n</ax-context-menu> -->\n </axp-layout-content>\n\n</axp-layout-simple-page>", styles: [".chart{display:flex;justify-content:center;align-items:center}.link{stroke-width:2px;stroke:#ccc}.node rect{rx:6;ry:6;stroke-width:2px}.node text{font:14px sans-serif;pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: RouterModule }, { kind: "component", type:
|
28
|
-
//
|
29
|
-
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-suffix, axp-layout-prefix, axp-layout-title, axp-layout-nav-button, axp-layout-description, axp-layout-toolbar, axp-layout-title-bar, axp-layout-breadcrumbs " }, { 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:
|
30
|
-
//
|
31
|
-
AXMenuModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.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: i3.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
32
|
-
}
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMOrgChartPage, decorators: [{
|
34
|
-
type: Component,
|
35
|
-
args: [{ imports: [
|
36
|
-
CommonModule,
|
37
|
-
RouterModule,
|
38
|
-
//
|
39
|
-
AXPSimplePageLayout,
|
40
|
-
AXPThemeLayoutBlockComponent,
|
41
|
-
AXPThemeLayoutHeaderTemplateComponent,
|
42
|
-
AXPThemeLayoutActionsComponent,
|
43
|
-
AXPThemeLayoutPageSecondaryActionsComponent,
|
44
|
-
AXPThemeLayoutPagePrimaryActionsComponent,
|
45
|
-
//
|
46
|
-
AXMenuModule,
|
47
|
-
AXButtonModule,
|
48
|
-
AXDropdownButtonModule,
|
49
|
-
AXTranslationModule,
|
50
|
-
AXDecoratorModule
|
51
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [], template: "<axp-layout-simple-page *translate=\"let t\">\n\n <axp-layout-header>\n <axp-layout-title>\n {{t('org-chart',{ scope:'organization-management' }) | async}}\n </axp-layout-title>\n\n <axp-layout-description>\n Clear and dynamic view of your organization's structure\n </axp-layout-description>\n\n <axp-layout-actions>\n\n <axp-layout-actions-primary>\n\n </axp-layout-actions-primary>\n\n\n <axp-layout-actions-secondary>\n <ax-button-item [text]=\"(t('settings.restore-defaults',{scope:'platform-management'}) | async)!\">\n <ax-prefix>\n <ax-icon [icon]=\"'fa-solid fa-rotate'\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n <ax-divider></ax-divider>\n <ax-button-item [text]=\"(t('export') | async)!\">\n <ax-prefix>\n <ax-icon [icon]=\"'fa-solid fa-file-export'\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n </axp-layout-actions-secondary>\n\n </axp-layout-actions>\n </axp-layout-header>\n\n\n\n\n <axp-layout-content>\n Hi\n <div class=\"chart\" #chart></div>\n <!-- <ax-context-menu\n (onItemClick)=\"handleContextMenuOnItemClick($event)\"\n [items]=\"menuItem()\"\n [target]=\"'.ctx'\"\n [orientation]=\"'vertical'\"\n [closeOn]=\"'leave'\"\n (onOpening)=\"handleOpenContext($event)\"\n>\n</ax-context-menu> -->\n </axp-layout-content>\n\n</axp-layout-simple-page>", styles: [".chart{display:flex;justify-content:center;align-items:center}.link{stroke-width:2px;stroke:#ccc}.node rect{rx:6;ry:6;stroke-width:2px}.node text{font:14px sans-serif;pointer-events:none}\n"] }]
|
52
|
-
}] });
|
53
|
-
|
54
|
-
export { AXMOrgChartPage };
|
55
|
-
//# sourceMappingURL=acorex-modules-organization-managment-org-chart.page-ubxepOmw.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"acorex-modules-organization-managment-org-chart.page-ubxepOmw.mjs","sources":["../../../../libs/modules/organization-managment/src/lib/pages/org-chart/org-chart.page.ts","../../../../libs/modules/organization-managment/src/lib/pages/org-chart/org-chart.page.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDropdownButtonModule } from '@acorex/components/dropdown-button';\nimport { AXMenuModule } from '@acorex/components/menu';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPSimplePageLayout } from '@acorex/platform/themes/default';\nimport {\n AXPThemeLayoutActionsComponent,\n AXPThemeLayoutBlockComponent,\n AXPThemeLayoutHeaderTemplateComponent,\n AXPThemeLayoutPagePrimaryActionsComponent,\n AXPThemeLayoutPageSecondaryActionsComponent,\n} from '@acorex/platform/themes/shared';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, viewChild } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport * as d3 from 'd3';\n\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 ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [],\n})\nexport class AXMOrgChartPage {\n\n private chart = viewChild<HTMLDivElement>('chart');\n\n ngOnInit(): void {\n this.createChart();\n }\n\n private createChart(): void {\n\n }\n\n}\n","<axp-layout-simple-page *translate=\"let t\">\n\n <axp-layout-header>\n <axp-layout-title>\n {{t('org-chart',{ scope:'organization-management' }) | async}}\n </axp-layout-title>\n\n <axp-layout-description>\n Clear and dynamic view of your organization's structure\n </axp-layout-description>\n\n <axp-layout-actions>\n\n <axp-layout-actions-primary>\n\n </axp-layout-actions-primary>\n\n\n <axp-layout-actions-secondary>\n <ax-button-item [text]=\"(t('settings.restore-defaults',{scope:'platform-management'}) | async)!\">\n <ax-prefix>\n <ax-icon [icon]=\"'fa-solid fa-rotate'\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n <ax-divider></ax-divider>\n <ax-button-item [text]=\"(t('export') | async)!\">\n <ax-prefix>\n <ax-icon [icon]=\"'fa-solid fa-file-export'\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n </axp-layout-actions-secondary>\n\n </axp-layout-actions>\n </axp-layout-header>\n\n\n\n\n <axp-layout-content>\n Hi\n <div class=\"chart\" #chart></div>\n <!-- <ax-context-menu\n (onItemClick)=\"handleContextMenuOnItemClick($event)\"\n [items]=\"menuItem()\"\n [target]=\"'.ctx'\"\n [orientation]=\"'vertical'\"\n [closeOn]=\"'leave'\"\n (onOpening)=\"handleOpenContext($event)\"\n>\n</ax-context-menu> -->\n </axp-layout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