cmat 0.0.111 → 0.0.113
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/cmat-components-adapter.mjs +531 -536
- package/fesm2022/cmat-components-adapter.mjs.map +1 -1
- package/fesm2022/cmat-components-breadcrumb.mjs +521 -356
- package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/cmat-components-card.mjs +150 -42
- package/fesm2022/cmat-components-card.mjs.map +1 -1
- package/fesm2022/cmat-components-carousel.mjs +1120 -629
- package/fesm2022/cmat-components-carousel.mjs.map +1 -1
- package/fesm2022/cmat-components-cascade.mjs +861 -441
- package/fesm2022/cmat-components-cascade.mjs.map +1 -1
- package/fesm2022/cmat-components-chip-input.mjs +580 -335
- package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
- package/fesm2022/cmat-components-code-editor.mjs +197 -105
- package/fesm2022/cmat-components-code-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-color-picker.mjs +1762 -825
- package/fesm2022/cmat-components-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-custom-formly.mjs +5196 -2531
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-data-picker.mjs +1901 -1073
- package/fesm2022/cmat-components-data-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +701 -456
- package/fesm2022/cmat-components-date-range.mjs.map +1 -1
- package/fesm2022/cmat-components-date-time-display.mjs +137 -30
- package/fesm2022/cmat-components-date-time-display.mjs.map +1 -1
- package/fesm2022/cmat-components-drawer.mjs +410 -258
- package/fesm2022/cmat-components-drawer.mjs.map +1 -1
- package/fesm2022/cmat-components-empty-state.mjs +201 -41
- package/fesm2022/cmat-components-empty-state.mjs.map +1 -1
- package/fesm2022/cmat-components-file-preview.mjs +198 -35
- package/fesm2022/cmat-components-file-preview.mjs.map +1 -1
- package/fesm2022/cmat-components-filter-toolbar.mjs +320 -72
- package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-form-actions.mjs +102 -26
- package/fesm2022/cmat-components-form-actions.mjs.map +1 -1
- package/fesm2022/cmat-components-fullscreen.mjs +167 -47
- package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
- package/fesm2022/cmat-components-highlight.mjs +203 -112
- package/fesm2022/cmat-components-highlight.mjs.map +1 -1
- package/fesm2022/cmat-components-image-viewer.mjs +489 -215
- package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
- package/fesm2022/cmat-components-inline-loading.mjs +117 -27
- package/fesm2022/cmat-components-inline-loading.mjs.map +1 -1
- package/fesm2022/cmat-components-json-editor.mjs +276 -230
- package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-knob-input.mjs +615 -420
- package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
- package/fesm2022/cmat-components-loading-overlay.mjs +53 -25
- package/fesm2022/cmat-components-loading-overlay.mjs.map +1 -1
- package/fesm2022/cmat-components-masonry.mjs +120 -40
- package/fesm2022/cmat-components-masonry.mjs.map +1 -1
- package/fesm2022/cmat-components-material-color-picker.mjs +332 -155
- package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-material-datetimepicker.mjs +4283 -2504
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
- package/fesm2022/cmat-components-navigation.mjs +3080 -1404
- package/fesm2022/cmat-components-navigation.mjs.map +1 -1
- package/fesm2022/cmat-components-opt-input.mjs +540 -466
- package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
- package/fesm2022/cmat-components-org-chart.mjs +528 -125
- package/fesm2022/cmat-components-org-chart.mjs.map +1 -1
- package/fesm2022/cmat-components-page-header.mjs +141 -32
- package/fesm2022/cmat-components-page-header.mjs.map +1 -1
- package/fesm2022/cmat-components-pagination.mjs +866 -534
- package/fesm2022/cmat-components-pagination.mjs.map +1 -1
- package/fesm2022/cmat-components-password-strength.mjs +873 -434
- package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
- package/fesm2022/cmat-components-popover.mjs +1012 -731
- package/fesm2022/cmat-components-popover.mjs.map +1 -1
- package/fesm2022/cmat-components-progress-bar.mjs +98 -35
- package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
- package/fesm2022/cmat-components-qrcode.mjs +463 -287
- package/fesm2022/cmat-components-qrcode.mjs.map +1 -1
- package/fesm2022/cmat-components-rating.mjs +377 -203
- package/fesm2022/cmat-components-rating.mjs.map +1 -1
- package/fesm2022/cmat-components-rich-text-editor.mjs +153 -39
- package/fesm2022/cmat-components-rich-text-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-select-search.mjs +926 -496
- package/fesm2022/cmat-components-select-search.mjs.map +1 -1
- package/fesm2022/cmat-components-select-table.mjs +1280 -842
- package/fesm2022/cmat-components-select-table.mjs.map +1 -1
- package/fesm2022/cmat-components-select-tree.mjs +998 -690
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
- package/fesm2022/cmat-components-skeleton.mjs +143 -57
- package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
- package/fesm2022/cmat-components-speed-dial.mjs +457 -303
- package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
- package/fesm2022/cmat-components-status-tag.mjs +136 -44
- package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
- package/fesm2022/cmat-components-table-toolbar.mjs +120 -28
- package/fesm2022/cmat-components-table-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-timeline.mjs +464 -168
- package/fesm2022/cmat-components-timeline.mjs.map +1 -1
- package/fesm2022/cmat-components-toast.mjs +346 -262
- package/fesm2022/cmat-components-toast.mjs.map +1 -1
- package/fesm2022/cmat-components-transfer-picker.mjs +1427 -593
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-treetable.mjs +372 -112
- package/fesm2022/cmat-components-treetable.mjs.map +1 -1
- package/fesm2022/cmat-components-upload.mjs +904 -410
- package/fesm2022/cmat-components-upload.mjs.map +1 -1
- package/fesm2022/cmat-components-x6-angular-shape.mjs +153 -170
- package/fesm2022/cmat-components-x6-angular-shape.mjs.map +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +220 -138
- package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/cmat-directives-arrow-cursor.mjs +246 -193
- package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
- package/fesm2022/cmat-directives-autofocus.mjs +43 -25
- package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
- package/fesm2022/cmat-directives-data-exporter.mjs +537 -338
- package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
- package/fesm2022/cmat-directives-debounce.mjs +162 -76
- package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
- package/fesm2022/cmat-directives-digit-only.mjs +457 -356
- package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
- package/fesm2022/cmat-directives-equal-validator.mjs +70 -53
- package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +180 -132
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs.map +1 -1
- package/fesm2022/cmat-lib-mock-api.mjs +207 -195
- package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
- package/fesm2022/cmat-pipes-bytes.mjs +50 -30
- package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
- package/fesm2022/cmat-pipes-date-format.mjs +41 -25
- package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
- package/fesm2022/cmat-pipes-find-by-key.mjs +44 -26
- package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
- package/fesm2022/cmat-pipes-group-by.mjs +50 -38
- package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
- package/fesm2022/cmat-pipes-keys.mjs +44 -31
- package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
- package/fesm2022/cmat-pipes-secure.mjs +60 -49
- package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
- package/fesm2022/cmat-pipes-uppercase.mjs +39 -22
- package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
- package/fesm2022/cmat-reports.mjs +2761 -0
- package/fesm2022/cmat-reports.mjs.map +1 -0
- package/fesm2022/cmat-services-alert.mjs +249 -277
- package/fesm2022/cmat-services-alert.mjs.map +1 -1
- package/fesm2022/cmat-services-config.mjs +110 -81
- package/fesm2022/cmat-services-config.mjs.map +1 -1
- package/fesm2022/cmat-services-confirmation.mjs +184 -73
- package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
- package/fesm2022/cmat-services-data.mjs +136 -125
- package/fesm2022/cmat-services-data.mjs.map +1 -1
- package/fesm2022/cmat-services-export-as.mjs +165 -183
- package/fesm2022/cmat-services-export-as.mjs.map +1 -1
- package/fesm2022/cmat-services-loading.mjs +116 -95
- package/fesm2022/cmat-services-loading.mjs.map +1 -1
- package/fesm2022/cmat-services-local-storage.mjs +75 -66
- package/fesm2022/cmat-services-local-storage.mjs.map +1 -1
- package/fesm2022/cmat-services-media-watcher.mjs +69 -64
- package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
- package/fesm2022/cmat-services-platform.mjs +48 -45
- package/fesm2022/cmat-services-platform.mjs.map +1 -1
- package/fesm2022/cmat-services-print.mjs +984 -1109
- package/fesm2022/cmat-services-print.mjs.map +1 -1
- package/fesm2022/cmat-services-splash-screen.mjs +53 -38
- package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
- package/fesm2022/cmat-services-title.mjs +57 -47
- package/fesm2022/cmat-services-title.mjs.map +1 -1
- package/fesm2022/cmat-services-translation.mjs +79 -68
- package/fesm2022/cmat-services-translation.mjs.map +1 -1
- package/fesm2022/cmat-services-utils.mjs +424 -517
- package/fesm2022/cmat-services-utils.mjs.map +1 -1
- package/fesm2022/cmat-validators.mjs +23 -33
- package/fesm2022/cmat-validators.mjs.map +1 -1
- package/fesm2022/cmat-version.mjs +12 -16
- package/fesm2022/cmat-version.mjs.map +1 -1
- package/fesm2022/cmat.mjs +39805 -22511
- package/fesm2022/cmat.mjs.map +1 -1
- package/package.json +5 -1
- package/types/cmat-components-adapter.d.ts +145 -156
- package/types/cmat-components-breadcrumb.d.ts +108 -86
- package/types/cmat-components-card.d.ts +34 -18
- package/types/cmat-components-carousel.d.ts +251 -134
- package/types/cmat-components-cascade.d.ts +158 -117
- package/types/cmat-components-chip-input.d.ts +105 -71
- package/types/cmat-components-code-editor.d.ts +59 -34
- package/types/cmat-components-color-picker.d.ts +378 -236
- package/types/cmat-components-custom-formly.d.ts +776 -814
- package/types/cmat-components-data-picker.d.ts +502 -360
- package/types/cmat-components-date-range.d.ts +106 -77
- package/types/cmat-components-date-time-display.d.ts +36 -13
- package/types/cmat-components-drawer.d.ts +91 -61
- package/types/cmat-components-empty-state.d.ts +47 -17
- package/types/cmat-components-file-preview.d.ts +42 -14
- package/types/cmat-components-filter-toolbar.d.ts +57 -25
- package/types/cmat-components-form-actions.d.ts +18 -10
- package/types/cmat-components-fullscreen.d.ts +21 -13
- package/types/cmat-components-highlight.d.ts +33 -26
- package/types/cmat-components-image-viewer.d.ts +119 -58
- package/types/cmat-components-inline-loading.d.ts +24 -11
- package/types/cmat-components-json-editor.d.ts +39 -28
- package/types/cmat-components-knob-input.d.ts +172 -101
- package/types/cmat-components-loading-overlay.d.ts +8 -11
- package/types/cmat-components-masonry.d.ts +27 -14
- package/types/cmat-components-material-color-picker.d.ts +56 -42
- package/types/cmat-components-material-datetimepicker.d.ts +817 -454
- package/types/cmat-components-navigation.d.ts +295 -221
- package/types/cmat-components-opt-input.d.ts +111 -90
- package/types/cmat-components-org-chart.d.ts +53 -35
- package/types/cmat-components-page-header.d.ts +37 -14
- package/types/cmat-components-pagination.d.ts +144 -107
- package/types/cmat-components-password-strength.d.ts +197 -86
- package/types/cmat-components-popover.d.ts +264 -166
- package/types/cmat-components-progress-bar.d.ts +17 -14
- package/types/cmat-components-qrcode.d.ts +111 -42
- package/types/cmat-components-rating.d.ts +105 -59
- package/types/cmat-components-rich-text-editor.d.ts +39 -16
- package/types/cmat-components-select-search.d.ts +195 -99
- package/types/cmat-components-select-table.d.ts +241 -142
- package/types/cmat-components-select-tree.d.ts +185 -118
- package/types/cmat-components-skeleton.d.ts +55 -32
- package/types/cmat-components-speed-dial.d.ts +86 -61
- package/types/cmat-components-status-tag.d.ts +42 -24
- package/types/cmat-components-table-toolbar.d.ts +30 -12
- package/types/cmat-components-timeline.d.ts +83 -51
- package/types/cmat-components-toast.d.ts +84 -85
- package/types/cmat-components-transfer-picker.d.ts +228 -181
- package/types/cmat-components-treetable.d.ts +63 -39
- package/types/cmat-components-upload.d.ts +205 -106
- package/types/cmat-components-x6-angular-shape.d.ts +29 -37
- package/types/cmat-directives-animate-on-scroll.d.ts +48 -30
- package/types/cmat-directives-arrow-cursor.d.ts +55 -35
- package/types/cmat-directives-autofocus.d.ts +8 -11
- package/types/cmat-directives-data-exporter.d.ts +71 -40
- package/types/cmat-directives-debounce.d.ts +31 -28
- package/types/cmat-directives-digit-only.d.ts +90 -53
- package/types/cmat-directives-equal-validator.d.ts +11 -14
- package/types/cmat-directives-seamless-auto-scroll.d.ts +42 -29
- package/types/cmat-lib-mock-api.d.ts +46 -55
- package/types/cmat-pipes-bytes.d.ts +7 -10
- package/types/cmat-pipes-date-format.d.ts +7 -10
- package/types/cmat-pipes-find-by-key.d.ts +8 -12
- package/types/cmat-pipes-group-by.d.ts +11 -15
- package/types/cmat-pipes-keys.d.ts +10 -13
- package/types/cmat-pipes-secure.d.ts +14 -17
- package/types/cmat-pipes-uppercase.d.ts +7 -10
- package/types/cmat-reports.d.ts +1138 -0
- package/types/cmat-services-alert.d.ts +80 -87
- package/types/cmat-services-config.d.ts +37 -43
- package/types/cmat-services-confirmation.d.ts +31 -37
- package/types/cmat-services-data.d.ts +18 -21
- package/types/cmat-services-export-as.d.ts +28 -33
- package/types/cmat-services-loading.d.ts +27 -31
- package/types/cmat-services-local-storage.d.ts +17 -21
- package/types/cmat-services-media-watcher.d.ts +14 -18
- package/types/cmat-services-platform.d.ts +8 -11
- package/types/cmat-services-print.d.ts +97 -102
- package/types/cmat-services-splash-screen.d.ts +11 -14
- package/types/cmat-services-title.d.ts +9 -12
- package/types/cmat-services-translation.d.ts +19 -22
- package/types/cmat-services-utils.d.ts +76 -80
- package/types/cmat-validators.d.ts +5 -8
- package/types/cmat-version.d.ts +8 -10
- package/types/cmat.d.ts +7551 -5204
|
@@ -1,126 +1,529 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { NgClass } from
|
|
4
|
-
import * as i2 from
|
|
5
|
-
import { MatButtonModule } from
|
|
6
|
-
import * as i1 from
|
|
7
|
-
import { MatIconModule } from
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, HostBinding, ViewEncapsulation, computed, forwardRef, input, output } from "@angular/core";
|
|
3
|
+
import { NgClass } from "@angular/common";
|
|
4
|
+
import * as i2 from "@angular/material/button";
|
|
5
|
+
import { MatButtonModule } from "@angular/material/button";
|
|
6
|
+
import * as i1 from "@angular/material/icon";
|
|
7
|
+
import { MatIconModule } from "@angular/material/icon";
|
|
8
|
+
var CmatChartNodeComponent = class CmatChartNodeComponent {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.node = input.required(...ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []);
|
|
11
|
+
this.hasParent = input(...ngDevMode ? [void 0, { debugName: "hasParent" }] : /* istanbul ignore next */ []);
|
|
12
|
+
this.enableControlHeight = input(...ngDevMode ? [void 0, { debugName: "enableControlHeight" }] : /* istanbul ignore next */ []);
|
|
13
|
+
this.direction = input("vertical", ...ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []);
|
|
14
|
+
this.detailsBtnTitle = input(...ngDevMode ? [void 0, { debugName: "detailsBtnTitle" }] : /* istanbul ignore next */ []);
|
|
15
|
+
this.detailsBtnClick = output();
|
|
16
|
+
this.containerClass = computed(() => `cmat-org-connector-${this.direction()} `, ...ngDevMode ? [{ debugName: "containerClass" }] : /* istanbul ignore next */ []);
|
|
17
|
+
this.connectorToParentHeight = computed(() => {
|
|
18
|
+
const heightFactor = this.node().heightFactor;
|
|
19
|
+
if (this.enableControlHeight() && heightFactor !== void 0 && heightFactor > 0) {
|
|
20
|
+
let newHeight = heightFactor * 19.2;
|
|
21
|
+
if (heightFactor >= 2) newHeight -= heightFactor - 1;
|
|
22
|
+
return `${newHeight}em`;
|
|
23
|
+
}
|
|
24
|
+
return "1em";
|
|
25
|
+
}, ...ngDevMode ? [{ debugName: "connectorToParentHeight" }] : /* istanbul ignore next */ []);
|
|
26
|
+
}
|
|
27
|
+
static {
|
|
28
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
29
|
+
minVersion: "12.0.0",
|
|
30
|
+
version: "22.2.3",
|
|
31
|
+
ngImport: i0,
|
|
32
|
+
type: CmatChartNodeComponent,
|
|
33
|
+
deps: [],
|
|
34
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
static {
|
|
38
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
39
|
+
minVersion: "17.0.0",
|
|
40
|
+
version: "22.2.3",
|
|
41
|
+
type: CmatChartNodeComponent,
|
|
42
|
+
isStandalone: true,
|
|
43
|
+
selector: "cmat-org-chart-node",
|
|
44
|
+
inputs: {
|
|
45
|
+
node: {
|
|
46
|
+
classPropertyName: "node",
|
|
47
|
+
publicName: "node",
|
|
48
|
+
isSignal: true,
|
|
49
|
+
isRequired: true,
|
|
50
|
+
transformFunction: null
|
|
51
|
+
},
|
|
52
|
+
hasParent: {
|
|
53
|
+
classPropertyName: "hasParent",
|
|
54
|
+
publicName: "hasParent",
|
|
55
|
+
isSignal: true,
|
|
56
|
+
isRequired: false,
|
|
57
|
+
transformFunction: null
|
|
58
|
+
},
|
|
59
|
+
enableControlHeight: {
|
|
60
|
+
classPropertyName: "enableControlHeight",
|
|
61
|
+
publicName: "enableControlHeight",
|
|
62
|
+
isSignal: true,
|
|
63
|
+
isRequired: false,
|
|
64
|
+
transformFunction: null
|
|
65
|
+
},
|
|
66
|
+
direction: {
|
|
67
|
+
classPropertyName: "direction",
|
|
68
|
+
publicName: "direction",
|
|
69
|
+
isSignal: true,
|
|
70
|
+
isRequired: false,
|
|
71
|
+
transformFunction: null
|
|
72
|
+
},
|
|
73
|
+
detailsBtnTitle: {
|
|
74
|
+
classPropertyName: "detailsBtnTitle",
|
|
75
|
+
publicName: "detailsBtnTitle",
|
|
76
|
+
isSignal: true,
|
|
77
|
+
isRequired: false,
|
|
78
|
+
transformFunction: null
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
outputs: { detailsBtnClick: "detailsBtnClick" },
|
|
82
|
+
exportAs: ["cmatOrgChartNode"],
|
|
83
|
+
ngImport: i0,
|
|
84
|
+
template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n@if(hasParent()){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass()\" [style.height]=\"connectorToParentHeight()\"></div>\r\n}\r\n<div class=\"cmat-org-box cmat-org-border cmat-org-background\" [ngClass]=\"node().cssClass\">\r\n @if(node().image!==''){\r\n <div class=\"cmat-org-image\" [style]=\"{ 'background-image': 'url(\\'' + node().image + '\\')' }\"\r\n [style.border-color]=\"node().color\"></div>\r\n }@else {\r\n <div class=\"text-center\">\r\n <mat-icon class=\"icon-size-16\" [svgIcon]=\"'heroicons_outline:user-circle'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n\r\n <div class=\"cmat-org-container\">\r\n <div class=\"cmat-org-title\" [innerHTML]=\"node().title\" [style.color]=\"node().color\"></div>\r\n <div class=\"cmat-org-name\" [innerHTML]=\"node().name\"></div>\r\n \r\n @if(node().showDetail){\r\n <div class=\"button-container\">\r\n <button matButton=\"filled\" class=\"cmat-org-btn cmat-org-btn-details\" color=\"primary\"\r\n (click)=\"detailsBtnClick.emit(node())\">\r\n {{ detailsBtnTitle() }}\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n</div>\r\n@if(node().children.length){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass()\"></div>\r\n}",
|
|
85
|
+
styles: ["cmat-org-chart-node{display:flex;align-items:center}.cmat-org-box{width:16em;height:16em;box-sizing:border-box;overflow:overlay;position:relative}.cmat-org-container{display:flex;flex-direction:column;align-items:center}.cmat-org-title,.cmat-org-name,.button-container{flex:1}.cmat-org-title{margin-top:.5em}.cmat-org-name{margin:.3em 0}.button-container{display:flex;flex-direction:row;justify-content:center;align-items:center;position:absolute;bottom:1em;width:100%}.cmat-org-image{background-repeat:round;width:4em;height:4em;background-color:transparent!important;border-radius:50%;padding:.25em;border:3px solid var(--cmat-text-hint);margin:4px auto auto}.cmat-org-title{font-size:1.1rem;font-weight:700;text-align:center}.cmat-org-name{text-align:center;margin-bottom:8px!important}\n"],
|
|
86
|
+
dependencies: [
|
|
87
|
+
{
|
|
88
|
+
kind: "directive",
|
|
89
|
+
type: NgClass,
|
|
90
|
+
selector: "[ngClass]",
|
|
91
|
+
inputs: ["class", "ngClass"]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
kind: "ngmodule",
|
|
95
|
+
type: MatIconModule
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
kind: "component",
|
|
99
|
+
type: i1.MatIcon,
|
|
100
|
+
selector: "mat-icon",
|
|
101
|
+
inputs: [
|
|
102
|
+
"color",
|
|
103
|
+
"inline",
|
|
104
|
+
"svgIcon",
|
|
105
|
+
"fontSet",
|
|
106
|
+
"fontIcon"
|
|
107
|
+
],
|
|
108
|
+
exportAs: ["matIcon"]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
kind: "ngmodule",
|
|
112
|
+
type: MatButtonModule
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
kind: "component",
|
|
116
|
+
type: i2.MatButton,
|
|
117
|
+
selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
|
|
118
|
+
inputs: ["matButton"],
|
|
119
|
+
exportAs: ["matButton", "matAnchor"]
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
123
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
128
|
+
minVersion: "12.0.0",
|
|
129
|
+
version: "22.2.3",
|
|
130
|
+
ngImport: i0,
|
|
131
|
+
type: CmatChartNodeComponent,
|
|
132
|
+
decorators: [{
|
|
133
|
+
type: Component,
|
|
134
|
+
args: [{
|
|
135
|
+
selector: "cmat-org-chart-node",
|
|
136
|
+
encapsulation: ViewEncapsulation.None,
|
|
137
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
138
|
+
exportAs: "cmatOrgChartNode",
|
|
139
|
+
imports: [
|
|
140
|
+
NgClass,
|
|
141
|
+
MatIconModule,
|
|
142
|
+
MatButtonModule
|
|
143
|
+
],
|
|
144
|
+
template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n@if(hasParent()){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass()\" [style.height]=\"connectorToParentHeight()\"></div>\r\n}\r\n<div class=\"cmat-org-box cmat-org-border cmat-org-background\" [ngClass]=\"node().cssClass\">\r\n @if(node().image!==''){\r\n <div class=\"cmat-org-image\" [style]=\"{ 'background-image': 'url(\\'' + node().image + '\\')' }\"\r\n [style.border-color]=\"node().color\"></div>\r\n }@else {\r\n <div class=\"text-center\">\r\n <mat-icon class=\"icon-size-16\" [svgIcon]=\"'heroicons_outline:user-circle'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n\r\n <div class=\"cmat-org-container\">\r\n <div class=\"cmat-org-title\" [innerHTML]=\"node().title\" [style.color]=\"node().color\"></div>\r\n <div class=\"cmat-org-name\" [innerHTML]=\"node().name\"></div>\r\n \r\n @if(node().showDetail){\r\n <div class=\"button-container\">\r\n <button matButton=\"filled\" class=\"cmat-org-btn cmat-org-btn-details\" color=\"primary\"\r\n (click)=\"detailsBtnClick.emit(node())\">\r\n {{ detailsBtnTitle() }}\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n</div>\r\n@if(node().children.length){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass()\"></div>\r\n}",
|
|
145
|
+
styles: ["cmat-org-chart-node{display:flex;align-items:center}.cmat-org-box{width:16em;height:16em;box-sizing:border-box;overflow:overlay;position:relative}.cmat-org-container{display:flex;flex-direction:column;align-items:center}.cmat-org-title,.cmat-org-name,.button-container{flex:1}.cmat-org-title{margin-top:.5em}.cmat-org-name{margin:.3em 0}.button-container{display:flex;flex-direction:row;justify-content:center;align-items:center;position:absolute;bottom:1em;width:100%}.cmat-org-image{background-repeat:round;width:4em;height:4em;background-color:transparent!important;border-radius:50%;padding:.25em;border:3px solid var(--cmat-text-hint);margin:4px auto auto}.cmat-org-title{font-size:1.1rem;font-weight:700;text-align:center}.cmat-org-name{text-align:center;margin-bottom:8px!important}\n"]
|
|
146
|
+
}]
|
|
147
|
+
}],
|
|
148
|
+
propDecorators: {
|
|
149
|
+
node: [{
|
|
150
|
+
type: i0.Input,
|
|
151
|
+
args: [{
|
|
152
|
+
isSignal: true,
|
|
153
|
+
alias: "node",
|
|
154
|
+
required: true
|
|
155
|
+
}]
|
|
156
|
+
}],
|
|
157
|
+
hasParent: [{
|
|
158
|
+
type: i0.Input,
|
|
159
|
+
args: [{
|
|
160
|
+
isSignal: true,
|
|
161
|
+
alias: "hasParent",
|
|
162
|
+
required: false
|
|
163
|
+
}]
|
|
164
|
+
}],
|
|
165
|
+
enableControlHeight: [{
|
|
166
|
+
type: i0.Input,
|
|
167
|
+
args: [{
|
|
168
|
+
isSignal: true,
|
|
169
|
+
alias: "enableControlHeight",
|
|
170
|
+
required: false
|
|
171
|
+
}]
|
|
172
|
+
}],
|
|
173
|
+
direction: [{
|
|
174
|
+
type: i0.Input,
|
|
175
|
+
args: [{
|
|
176
|
+
isSignal: true,
|
|
177
|
+
alias: "direction",
|
|
178
|
+
required: false
|
|
179
|
+
}]
|
|
180
|
+
}],
|
|
181
|
+
detailsBtnTitle: [{
|
|
182
|
+
type: i0.Input,
|
|
183
|
+
args: [{
|
|
184
|
+
isSignal: true,
|
|
185
|
+
alias: "detailsBtnTitle",
|
|
186
|
+
required: false
|
|
187
|
+
}]
|
|
188
|
+
}],
|
|
189
|
+
detailsBtnClick: [{
|
|
190
|
+
type: i0.Output,
|
|
191
|
+
args: ["detailsBtnClick"]
|
|
192
|
+
}]
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
var CmatChartDesignerComponent = class CmatChartDesignerComponent {
|
|
196
|
+
constructor() {
|
|
197
|
+
this.node = input.required(...ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []);
|
|
198
|
+
this.hasParent = input(false, ...ngDevMode ? [{ debugName: "hasParent" }] : /* istanbul ignore next */ []);
|
|
199
|
+
this.enableControlHeight = input(...ngDevMode ? [void 0, { debugName: "enableControlHeight" }] : /* istanbul ignore next */ []);
|
|
200
|
+
this.direction = input("vertical", ...ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []);
|
|
201
|
+
this.detailsBtnTitle = input(...ngDevMode ? [void 0, { debugName: "detailsBtnTitle" }] : /* istanbul ignore next */ []);
|
|
202
|
+
this.detailsBtnClick = output();
|
|
203
|
+
this.chartNodeClass = computed(() => `cmat-org-${this.direction()}`, ...ngDevMode ? [{ debugName: "chartNodeClass" }] : /* istanbul ignore next */ []);
|
|
204
|
+
}
|
|
205
|
+
get hostFlexDirection() {
|
|
206
|
+
return this.direction() === "vertical" ? "column" : "";
|
|
207
|
+
}
|
|
208
|
+
get hostWidth() {
|
|
209
|
+
return this.direction() === "vertical" ? "fit-content" : "";
|
|
210
|
+
}
|
|
211
|
+
static {
|
|
212
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
213
|
+
minVersion: "12.0.0",
|
|
214
|
+
version: "22.2.3",
|
|
215
|
+
ngImport: i0,
|
|
216
|
+
type: CmatChartDesignerComponent,
|
|
217
|
+
deps: [],
|
|
218
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
static {
|
|
222
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
223
|
+
minVersion: "17.0.0",
|
|
224
|
+
version: "22.2.3",
|
|
225
|
+
type: CmatChartDesignerComponent,
|
|
226
|
+
isStandalone: true,
|
|
227
|
+
selector: "cmat-org-chart-designer",
|
|
228
|
+
inputs: {
|
|
229
|
+
node: {
|
|
230
|
+
classPropertyName: "node",
|
|
231
|
+
publicName: "node",
|
|
232
|
+
isSignal: true,
|
|
233
|
+
isRequired: true,
|
|
234
|
+
transformFunction: null
|
|
235
|
+
},
|
|
236
|
+
hasParent: {
|
|
237
|
+
classPropertyName: "hasParent",
|
|
238
|
+
publicName: "hasParent",
|
|
239
|
+
isSignal: true,
|
|
240
|
+
isRequired: false,
|
|
241
|
+
transformFunction: null
|
|
242
|
+
},
|
|
243
|
+
enableControlHeight: {
|
|
244
|
+
classPropertyName: "enableControlHeight",
|
|
245
|
+
publicName: "enableControlHeight",
|
|
246
|
+
isSignal: true,
|
|
247
|
+
isRequired: false,
|
|
248
|
+
transformFunction: null
|
|
249
|
+
},
|
|
250
|
+
direction: {
|
|
251
|
+
classPropertyName: "direction",
|
|
252
|
+
publicName: "direction",
|
|
253
|
+
isSignal: true,
|
|
254
|
+
isRequired: false,
|
|
255
|
+
transformFunction: null
|
|
256
|
+
},
|
|
257
|
+
detailsBtnTitle: {
|
|
258
|
+
classPropertyName: "detailsBtnTitle",
|
|
259
|
+
publicName: "detailsBtnTitle",
|
|
260
|
+
isSignal: true,
|
|
261
|
+
isRequired: false,
|
|
262
|
+
transformFunction: null
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
outputs: { detailsBtnClick: "detailsBtnClick" },
|
|
266
|
+
host: { properties: {
|
|
267
|
+
"style.flex-direction": "this.hostFlexDirection",
|
|
268
|
+
"style.width": "this.hostWidth"
|
|
269
|
+
} },
|
|
270
|
+
exportAs: ["cmatOrgChartDesigner"],
|
|
271
|
+
ngImport: i0,
|
|
272
|
+
template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<cmat-org-chart-node [class]=\"chartNodeClass()\" [node]=\"node()\" [hasParent]=\"hasParent()\"\r\n [enableControlHeight]=\"enableControlHeight()\" [direction]=\"direction()\" [detailsBtnTitle]=\"detailsBtnTitle()\"\r\n (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n</cmat-org-chart-node>\r\n\r\n<div class=\"cmat-org-reports-{{ direction() }} cmat-org-reports\">\r\n @for (childNode of node().children; track $index) {\r\n <div class=\"cmat-org-org-container cmat-org-org-container-{{ direction() }}\">\r\n <div class=\"cmat-org-connector-container cmat-org-connector-container-{{ direction() }}\">\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$first ? 'transparent' : ''\"></div>\r\n <div class=\"cmat-org-border\"></div>\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$last ? 'transparent' : ''\"></div>\r\n </div>\r\n <cmat-org-chart-designer [node]=\"childNode\" [hasParent]=\"true\" [enableControlHeight]=\"enableControlHeight()\"\r\n [direction]=\"direction()\" [detailsBtnTitle]=\"detailsBtnTitle()\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n </cmat-org-chart-designer>\r\n </div>\r\n }\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n</div>",
|
|
273
|
+
styles: ["cmat-org-chart-designer{display:flex;align-items:center;flex:1}.cmat-org-vertical{flex-direction:column}.cmat-org-org-container{display:flex}.cmat-org-org-container-vertical{flex-direction:column}.cmat-org-connector{flex:1}.cmat-org-connector-container{display:flex}.cmat-org-connector-container-horizontal{flex-direction:column}.cmat-org-reports{display:flex;flex:1}.cmat-org-reports-horizontal{flex-direction:column}.cmat-org-reports-vertical{width:100%}\n"],
|
|
274
|
+
dependencies: [{
|
|
275
|
+
kind: "component",
|
|
276
|
+
type: i0.forwardRef(() => CmatChartDesignerComponent),
|
|
277
|
+
selector: "cmat-org-chart-designer",
|
|
278
|
+
inputs: [
|
|
279
|
+
"node",
|
|
280
|
+
"hasParent",
|
|
281
|
+
"enableControlHeight",
|
|
282
|
+
"direction",
|
|
283
|
+
"detailsBtnTitle"
|
|
284
|
+
],
|
|
285
|
+
outputs: ["detailsBtnClick"],
|
|
286
|
+
exportAs: ["cmatOrgChartDesigner"]
|
|
287
|
+
}, {
|
|
288
|
+
kind: "component",
|
|
289
|
+
type: i0.forwardRef(() => CmatChartNodeComponent),
|
|
290
|
+
selector: "cmat-org-chart-node",
|
|
291
|
+
inputs: [
|
|
292
|
+
"node",
|
|
293
|
+
"hasParent",
|
|
294
|
+
"enableControlHeight",
|
|
295
|
+
"direction",
|
|
296
|
+
"detailsBtnTitle"
|
|
297
|
+
],
|
|
298
|
+
outputs: ["detailsBtnClick"],
|
|
299
|
+
exportAs: ["cmatOrgChartNode"]
|
|
300
|
+
}],
|
|
301
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
302
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
307
|
+
minVersion: "12.0.0",
|
|
308
|
+
version: "22.2.3",
|
|
309
|
+
ngImport: i0,
|
|
310
|
+
type: CmatChartDesignerComponent,
|
|
311
|
+
decorators: [{
|
|
312
|
+
type: Component,
|
|
313
|
+
args: [{
|
|
314
|
+
selector: "cmat-org-chart-designer",
|
|
315
|
+
encapsulation: ViewEncapsulation.None,
|
|
316
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
317
|
+
exportAs: "cmatOrgChartDesigner",
|
|
318
|
+
imports: [CmatChartNodeComponent, forwardRef(() => CmatChartDesignerComponent)],
|
|
319
|
+
template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<cmat-org-chart-node [class]=\"chartNodeClass()\" [node]=\"node()\" [hasParent]=\"hasParent()\"\r\n [enableControlHeight]=\"enableControlHeight()\" [direction]=\"direction()\" [detailsBtnTitle]=\"detailsBtnTitle()\"\r\n (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n</cmat-org-chart-node>\r\n\r\n<div class=\"cmat-org-reports-{{ direction() }} cmat-org-reports\">\r\n @for (childNode of node().children; track $index) {\r\n <div class=\"cmat-org-org-container cmat-org-org-container-{{ direction() }}\">\r\n <div class=\"cmat-org-connector-container cmat-org-connector-container-{{ direction() }}\">\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$first ? 'transparent' : ''\"></div>\r\n <div class=\"cmat-org-border\"></div>\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$last ? 'transparent' : ''\"></div>\r\n </div>\r\n <cmat-org-chart-designer [node]=\"childNode\" [hasParent]=\"true\" [enableControlHeight]=\"enableControlHeight()\"\r\n [direction]=\"direction()\" [detailsBtnTitle]=\"detailsBtnTitle()\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n </cmat-org-chart-designer>\r\n </div>\r\n }\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n</div>",
|
|
320
|
+
styles: ["cmat-org-chart-designer{display:flex;align-items:center;flex:1}.cmat-org-vertical{flex-direction:column}.cmat-org-org-container{display:flex}.cmat-org-org-container-vertical{flex-direction:column}.cmat-org-connector{flex:1}.cmat-org-connector-container{display:flex}.cmat-org-connector-container-horizontal{flex-direction:column}.cmat-org-reports{display:flex;flex:1}.cmat-org-reports-horizontal{flex-direction:column}.cmat-org-reports-vertical{width:100%}\n"]
|
|
321
|
+
}]
|
|
322
|
+
}],
|
|
323
|
+
propDecorators: {
|
|
324
|
+
node: [{
|
|
325
|
+
type: i0.Input,
|
|
326
|
+
args: [{
|
|
327
|
+
isSignal: true,
|
|
328
|
+
alias: "node",
|
|
329
|
+
required: true
|
|
330
|
+
}]
|
|
331
|
+
}],
|
|
332
|
+
hasParent: [{
|
|
333
|
+
type: i0.Input,
|
|
334
|
+
args: [{
|
|
335
|
+
isSignal: true,
|
|
336
|
+
alias: "hasParent",
|
|
337
|
+
required: false
|
|
338
|
+
}]
|
|
339
|
+
}],
|
|
340
|
+
enableControlHeight: [{
|
|
341
|
+
type: i0.Input,
|
|
342
|
+
args: [{
|
|
343
|
+
isSignal: true,
|
|
344
|
+
alias: "enableControlHeight",
|
|
345
|
+
required: false
|
|
346
|
+
}]
|
|
347
|
+
}],
|
|
348
|
+
direction: [{
|
|
349
|
+
type: i0.Input,
|
|
350
|
+
args: [{
|
|
351
|
+
isSignal: true,
|
|
352
|
+
alias: "direction",
|
|
353
|
+
required: false
|
|
354
|
+
}]
|
|
355
|
+
}],
|
|
356
|
+
detailsBtnTitle: [{
|
|
357
|
+
type: i0.Input,
|
|
358
|
+
args: [{
|
|
359
|
+
isSignal: true,
|
|
360
|
+
alias: "detailsBtnTitle",
|
|
361
|
+
required: false
|
|
362
|
+
}]
|
|
363
|
+
}],
|
|
364
|
+
detailsBtnClick: [{
|
|
365
|
+
type: i0.Output,
|
|
366
|
+
args: ["detailsBtnClick"]
|
|
367
|
+
}],
|
|
368
|
+
hostFlexDirection: [{
|
|
369
|
+
type: HostBinding,
|
|
370
|
+
args: ["style.flex-direction"]
|
|
371
|
+
}],
|
|
372
|
+
hostWidth: [{
|
|
373
|
+
type: HostBinding,
|
|
374
|
+
args: ["style.width"]
|
|
375
|
+
}]
|
|
376
|
+
}
|
|
377
|
+
});
|
|
378
|
+
var CmatOrgChartComponent = class CmatOrgChartComponent {
|
|
379
|
+
constructor() {
|
|
380
|
+
this.nodes = input.required(...ngDevMode ? [{ debugName: "nodes" }] : /* istanbul ignore next */ []);
|
|
381
|
+
this.enableControlHeight = input(false, ...ngDevMode ? [{ debugName: "enableControlHeight" }] : /* istanbul ignore next */ []);
|
|
382
|
+
this.direction = input("vertical", ...ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []);
|
|
383
|
+
this.detailsBtnTitle = input("查看详细", ...ngDevMode ? [{ debugName: "detailsBtnTitle" }] : /* istanbul ignore next */ []);
|
|
384
|
+
this.detailsBtnClick = output();
|
|
385
|
+
}
|
|
386
|
+
static {
|
|
387
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
388
|
+
minVersion: "12.0.0",
|
|
389
|
+
version: "22.2.3",
|
|
390
|
+
ngImport: i0,
|
|
391
|
+
type: CmatOrgChartComponent,
|
|
392
|
+
deps: [],
|
|
393
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
static {
|
|
397
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
398
|
+
minVersion: "17.0.0",
|
|
399
|
+
version: "22.2.3",
|
|
400
|
+
type: CmatOrgChartComponent,
|
|
401
|
+
isStandalone: true,
|
|
402
|
+
selector: "cmat-org-chart",
|
|
403
|
+
inputs: {
|
|
404
|
+
nodes: {
|
|
405
|
+
classPropertyName: "nodes",
|
|
406
|
+
publicName: "nodes",
|
|
407
|
+
isSignal: true,
|
|
408
|
+
isRequired: true,
|
|
409
|
+
transformFunction: null
|
|
410
|
+
},
|
|
411
|
+
enableControlHeight: {
|
|
412
|
+
classPropertyName: "enableControlHeight",
|
|
413
|
+
publicName: "enableControlHeight",
|
|
414
|
+
isSignal: true,
|
|
415
|
+
isRequired: false,
|
|
416
|
+
transformFunction: null
|
|
417
|
+
},
|
|
418
|
+
direction: {
|
|
419
|
+
classPropertyName: "direction",
|
|
420
|
+
publicName: "direction",
|
|
421
|
+
isSignal: true,
|
|
422
|
+
isRequired: false,
|
|
423
|
+
transformFunction: null
|
|
424
|
+
},
|
|
425
|
+
detailsBtnTitle: {
|
|
426
|
+
classPropertyName: "detailsBtnTitle",
|
|
427
|
+
publicName: "detailsBtnTitle",
|
|
428
|
+
isSignal: true,
|
|
429
|
+
isRequired: false,
|
|
430
|
+
transformFunction: null
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
outputs: { detailsBtnClick: "detailsBtnClick" },
|
|
434
|
+
exportAs: ["cmatOrgChart"],
|
|
435
|
+
ngImport: i0,
|
|
436
|
+
template: "<div class=\"cmat-org\">\r\n @for (node of nodes(); track $index) {\r\n <div class=\"cmat-org-self-{{ direction() }}\">\r\n <cmat-org-chart-designer [node]=\"node\" [direction]=\"direction()\" [enableControlHeight]=\"enableControlHeight()\"\r\n [detailsBtnTitle]=\"detailsBtnTitle()\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\"></cmat-org-chart-designer>\r\n </div>\r\n }\r\n</div>",
|
|
437
|
+
styles: [".cmat-org-horizontal{padding:1em 0}.cmat-org-vertical{padding:0 1em}.cmat-org-border{border:.1em solid var(--cmat-divider);box-sizing:border-box}.cmat-org-box{padding:.5em 1em;border-radius:.2em;box-shadow:0 2px 8px #00000059}.cmat-org-connector-horizontal{width:1em!important;height:0!important}.cmat-org-connector-vertical{width:0!important;height:1em!important}.cmat-org .cmat-org-self-vertical{margin-bottom:2%}\n"],
|
|
438
|
+
dependencies: [{
|
|
439
|
+
kind: "component",
|
|
440
|
+
type: CmatChartDesignerComponent,
|
|
441
|
+
selector: "cmat-org-chart-designer",
|
|
442
|
+
inputs: [
|
|
443
|
+
"node",
|
|
444
|
+
"hasParent",
|
|
445
|
+
"enableControlHeight",
|
|
446
|
+
"direction",
|
|
447
|
+
"detailsBtnTitle"
|
|
448
|
+
],
|
|
449
|
+
outputs: ["detailsBtnClick"],
|
|
450
|
+
exportAs: ["cmatOrgChartDesigner"]
|
|
451
|
+
}],
|
|
452
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
453
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
};
|
|
457
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
458
|
+
minVersion: "12.0.0",
|
|
459
|
+
version: "22.2.3",
|
|
460
|
+
ngImport: i0,
|
|
461
|
+
type: CmatOrgChartComponent,
|
|
462
|
+
decorators: [{
|
|
463
|
+
type: Component,
|
|
464
|
+
args: [{
|
|
465
|
+
selector: "cmat-org-chart",
|
|
466
|
+
encapsulation: ViewEncapsulation.None,
|
|
467
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
468
|
+
exportAs: "cmatOrgChart",
|
|
469
|
+
imports: [CmatChartDesignerComponent],
|
|
470
|
+
template: "<div class=\"cmat-org\">\r\n @for (node of nodes(); track $index) {\r\n <div class=\"cmat-org-self-{{ direction() }}\">\r\n <cmat-org-chart-designer [node]=\"node\" [direction]=\"direction()\" [enableControlHeight]=\"enableControlHeight()\"\r\n [detailsBtnTitle]=\"detailsBtnTitle()\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\"></cmat-org-chart-designer>\r\n </div>\r\n }\r\n</div>",
|
|
471
|
+
styles: [".cmat-org-horizontal{padding:1em 0}.cmat-org-vertical{padding:0 1em}.cmat-org-border{border:.1em solid var(--cmat-divider);box-sizing:border-box}.cmat-org-box{padding:.5em 1em;border-radius:.2em;box-shadow:0 2px 8px #00000059}.cmat-org-connector-horizontal{width:1em!important;height:0!important}.cmat-org-connector-vertical{width:0!important;height:1em!important}.cmat-org .cmat-org-self-vertical{margin-bottom:2%}\n"]
|
|
472
|
+
}]
|
|
473
|
+
}],
|
|
474
|
+
propDecorators: {
|
|
475
|
+
nodes: [{
|
|
476
|
+
type: i0.Input,
|
|
477
|
+
args: [{
|
|
478
|
+
isSignal: true,
|
|
479
|
+
alias: "nodes",
|
|
480
|
+
required: true
|
|
481
|
+
}]
|
|
482
|
+
}],
|
|
483
|
+
enableControlHeight: [{
|
|
484
|
+
type: i0.Input,
|
|
485
|
+
args: [{
|
|
486
|
+
isSignal: true,
|
|
487
|
+
alias: "enableControlHeight",
|
|
488
|
+
required: false
|
|
489
|
+
}]
|
|
490
|
+
}],
|
|
491
|
+
direction: [{
|
|
492
|
+
type: i0.Input,
|
|
493
|
+
args: [{
|
|
494
|
+
isSignal: true,
|
|
495
|
+
alias: "direction",
|
|
496
|
+
required: false
|
|
497
|
+
}]
|
|
498
|
+
}],
|
|
499
|
+
detailsBtnTitle: [{
|
|
500
|
+
type: i0.Input,
|
|
501
|
+
args: [{
|
|
502
|
+
isSignal: true,
|
|
503
|
+
alias: "detailsBtnTitle",
|
|
504
|
+
required: false
|
|
505
|
+
}]
|
|
506
|
+
}],
|
|
507
|
+
detailsBtnClick: [{
|
|
508
|
+
type: i0.Output,
|
|
509
|
+
args: ["detailsBtnClick"]
|
|
510
|
+
}]
|
|
511
|
+
}
|
|
512
|
+
});
|
|
513
|
+
var ChartNode = class ChartNode {
|
|
514
|
+
constructor(structure, parent) {
|
|
515
|
+
this.parent = parent;
|
|
516
|
+
const [name, ...reports] = structure;
|
|
517
|
+
this.name = name.split("(")[0].trim();
|
|
518
|
+
const titleMatch = /\(([^)]+)\)/.exec(name);
|
|
519
|
+
this.title = titleMatch?.[1].trim();
|
|
520
|
+
this.children = reports.map((r) => r.substring(1)).reduce((previous, current) => {
|
|
521
|
+
if (!current.startsWith(" ")) previous.push([]);
|
|
522
|
+
previous[previous.length - 1].push(current);
|
|
523
|
+
return previous;
|
|
524
|
+
}, []).map((r) => new ChartNode(r, this)) ?? [];
|
|
525
|
+
}
|
|
526
|
+
};
|
|
125
527
|
export { ChartNode, CmatOrgChartComponent };
|
|
126
|
-
|
|
528
|
+
|
|
529
|
+
//# sourceMappingURL=cmat-components-org-chart.mjs.map
|