cmat 0.0.111 → 0.0.112
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 +2751 -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 +1131 -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,194 +1,247 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { CmatMediaWatcherService } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { DOCUMENT, Directive, HostListener, computed, inject, input, output, signal } from "@angular/core";
|
|
3
|
+
import { CmatMediaWatcherService } from "cmat/services/media-watcher";
|
|
4
|
+
var CmatArrowCursorDirective = class CmatArrowCursorDirective {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.animationDuration = input(.3, ...ngDevMode ? [{ debugName: "animationDuration" }] : /* istanbul ignore next */ []);
|
|
7
|
+
this.orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
|
|
8
|
+
this.enabled = input(false, ...ngDevMode ? [{ debugName: "enabled" }] : /* istanbul ignore next */ []);
|
|
9
|
+
this.selector = input(".carousel-arrow-cursor", ...ngDevMode ? [{ debugName: "selector" }] : /* istanbul ignore next */ []);
|
|
10
|
+
this.clickEvent = output();
|
|
11
|
+
this._arrowCursor = null;
|
|
12
|
+
this._cursorAnimationFrame = signal(null, ...ngDevMode ? [{ debugName: "_cursorAnimationFrame" }] : /* istanbul ignore next */ []);
|
|
13
|
+
this._cursorClientX = signal(0, ...ngDevMode ? [{ debugName: "_cursorClientX" }] : /* istanbul ignore next */ []);
|
|
14
|
+
this._cursorClientY = signal(0, ...ngDevMode ? [{ debugName: "_cursorClientY" }] : /* istanbul ignore next */ []);
|
|
15
|
+
this._cursorSide = signal(null, ...ngDevMode ? [{ debugName: "_cursorSide" }] : /* istanbul ignore next */ []);
|
|
16
|
+
this._oldCursorSide = signal(null, ...ngDevMode ? [{ debugName: "_oldCursorSide" }] : /* istanbul ignore next */ []);
|
|
17
|
+
this._document = inject(DOCUMENT);
|
|
18
|
+
this._cmatMediaWatcherService = inject(CmatMediaWatcherService);
|
|
19
|
+
this._isCursorActive = false;
|
|
20
|
+
this._boundMoveCursor = this.moveCursor.bind(this);
|
|
21
|
+
this.isPhone = computed(() => {
|
|
22
|
+
return !this._cmatMediaWatcherService.mediaChange().matchingAliases.includes("lg");
|
|
23
|
+
}, ...ngDevMode ? [{ debugName: "isPhone" }] : /* istanbul ignore next */ []);
|
|
24
|
+
}
|
|
25
|
+
onMouseEnter(event) {
|
|
26
|
+
if (!this.isPhone() && this.enabled()) {
|
|
27
|
+
this._arrowCursor = this._document.querySelector(this.selector());
|
|
28
|
+
if (this._cursorIcon == null) {
|
|
29
|
+
this._cursorIcon = this._arrowCursor?.querySelector(".arrow-cursor-icon") ?? null;
|
|
30
|
+
this._cursorSide.set(null);
|
|
31
|
+
if (this._cursorIcon) {
|
|
32
|
+
this._cursorIcon.style.transform = "rotate3d(0,0,1,-135deg) scale3d(0.5,0.5,1)";
|
|
33
|
+
this._cursorIcon.style.opacity = "0";
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
this._cursorClientX.set(event.clientX);
|
|
37
|
+
this._cursorClientY.set(event.clientY);
|
|
38
|
+
let t;
|
|
39
|
+
if (this.orientation() === "horizontal") {
|
|
40
|
+
this._cursorSide.set(this._cursorClientX() > window.innerWidth / 2 ? "right" : "left");
|
|
41
|
+
const target = event.target;
|
|
42
|
+
if (target) t = this._cursorClientY() < target.getBoundingClientRect().top + target.getBoundingClientRect().height / 2 ? -135 : this._cursorSide() === "right" ? 135 : -315;
|
|
43
|
+
else t = -135;
|
|
44
|
+
} else {
|
|
45
|
+
this._cursorSide.set(this._cursorClientY() > window.innerHeight / 2 ? "down" : "up");
|
|
46
|
+
const target = event.target;
|
|
47
|
+
if (target) t = this._cursorClientX() < target.getBoundingClientRect().left + target.getBoundingClientRect().width / 2 ? 135 : this._cursorSide() === "down" ? -135 : 45;
|
|
48
|
+
else t = 135;
|
|
49
|
+
}
|
|
50
|
+
if (this._cursorIcon) {
|
|
51
|
+
this._cursorIcon.style.transform = "rotate3d(0,0,1," + t + "deg)";
|
|
52
|
+
this._cursorIcon.style.transition = this.animationDuration() + "s";
|
|
53
|
+
this._applyCursorRotation(this._cursorSide());
|
|
54
|
+
this._cursorIcon.style.opacity = "1";
|
|
55
|
+
}
|
|
56
|
+
this._startCursorLoop();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
onMouseLeave(event) {
|
|
60
|
+
if (!this.isPhone() && this.enabled()) {
|
|
61
|
+
let t;
|
|
62
|
+
const target = event.target;
|
|
63
|
+
if (!target) return;
|
|
64
|
+
if (this.orientation() === "horizontal") t = this._cursorClientY() < target.getBoundingClientRect().top + target.getBoundingClientRect().height / 2 ? "right" === this._cursorSide() ? -135 : -45 : "right" === this._cursorSide() ? 135 : -315;
|
|
65
|
+
else t = this._cursorClientX() < target.getBoundingClientRect().left + target.getBoundingClientRect().width / 2 ? "down" === this._cursorSide() ? 225 : -225 : "down" === this._cursorSide() ? -45 : 45;
|
|
66
|
+
if (this._cursorIcon) {
|
|
67
|
+
this._cursorIcon.style.transition = this.animationDuration() + "s";
|
|
68
|
+
this._cursorIcon.style.transform = "rotate3d(0,0,1," + t + "deg) scale3d(0.3,0.3,1)";
|
|
69
|
+
this._cursorIcon.style.opacity = "0";
|
|
70
|
+
}
|
|
71
|
+
this._stopCursorLoop();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
onMouseOver(event) {
|
|
75
|
+
if (!this.isPhone() && this._cursorIcon && this.enabled()) {
|
|
76
|
+
this._cursorClientX.set(event.clientX);
|
|
77
|
+
this._cursorClientY.set(event.clientY);
|
|
78
|
+
if (this.orientation() === "horizontal") this._cursorSide.set(this._cursorClientX() > window.innerWidth / 2 ? "right" : "left");
|
|
79
|
+
else this._cursorSide.set(this._cursorClientY() > window.innerHeight / 2 ? "down" : "up");
|
|
80
|
+
if (this._oldCursorSide() !== this._cursorSide()) {
|
|
81
|
+
this._cursorIcon.style.transition = this.animationDuration() + "s";
|
|
82
|
+
this._applyCursorRotation(this._cursorSide());
|
|
83
|
+
this._oldCursorSide.set(this._cursorSide());
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
onClick(event) {
|
|
88
|
+
if (!this.isPhone() && this._cursorIcon && this.enabled()) {
|
|
89
|
+
this.clickEvent.emit(this._cursorSide());
|
|
90
|
+
event.stopPropagation();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
ngOnDestroy() {
|
|
94
|
+
this._stopCursorLoop();
|
|
95
|
+
}
|
|
96
|
+
moveCursor() {
|
|
97
|
+
if (this._isCursorActive && this._arrowCursor) {
|
|
98
|
+
this._arrowCursor.style.transform = "translate3d(" + this._cursorClientX() + "px," + this._cursorClientY() + "px,0px)";
|
|
99
|
+
this._cursorAnimationFrame.set(requestAnimationFrame(this._boundMoveCursor));
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
_startCursorLoop() {
|
|
103
|
+
this._isCursorActive = true;
|
|
104
|
+
this._cursorAnimationFrame.set(requestAnimationFrame(this._boundMoveCursor));
|
|
105
|
+
}
|
|
106
|
+
_stopCursorLoop() {
|
|
107
|
+
this._isCursorActive = false;
|
|
108
|
+
if (this._cursorAnimationFrame() !== null) {
|
|
109
|
+
window.cancelAnimationFrame(this._cursorAnimationFrame() ?? 0);
|
|
110
|
+
this._cursorAnimationFrame.set(null);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
_applyCursorRotation(side) {
|
|
114
|
+
if (!this._cursorIcon) return;
|
|
115
|
+
const transform = side ? {
|
|
116
|
+
"left": "rotate3d(0,0,1,-180deg)",
|
|
117
|
+
"up": "rotate3d(0,0,1,-90deg)",
|
|
118
|
+
"right": "rotate3d(0,0,1,0deg)",
|
|
119
|
+
"down": "rotate3d(0,0,1,90deg)"
|
|
120
|
+
}[side] : null;
|
|
121
|
+
if (transform) this._cursorIcon.style.transform = transform;
|
|
122
|
+
}
|
|
123
|
+
static {
|
|
124
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
125
|
+
minVersion: "12.0.0",
|
|
126
|
+
version: "22.2.3",
|
|
127
|
+
ngImport: i0,
|
|
128
|
+
type: CmatArrowCursorDirective,
|
|
129
|
+
deps: [],
|
|
130
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
static {
|
|
134
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
135
|
+
minVersion: "17.1.0",
|
|
136
|
+
version: "22.2.3",
|
|
137
|
+
type: CmatArrowCursorDirective,
|
|
138
|
+
isStandalone: true,
|
|
139
|
+
selector: "[cmatArrowCursor]",
|
|
140
|
+
inputs: {
|
|
141
|
+
animationDuration: {
|
|
142
|
+
classPropertyName: "animationDuration",
|
|
143
|
+
publicName: "animationDuration",
|
|
144
|
+
isSignal: true,
|
|
145
|
+
isRequired: false,
|
|
146
|
+
transformFunction: null
|
|
147
|
+
},
|
|
148
|
+
orientation: {
|
|
149
|
+
classPropertyName: "orientation",
|
|
150
|
+
publicName: "orientation",
|
|
151
|
+
isSignal: true,
|
|
152
|
+
isRequired: false,
|
|
153
|
+
transformFunction: null
|
|
154
|
+
},
|
|
155
|
+
enabled: {
|
|
156
|
+
classPropertyName: "enabled",
|
|
157
|
+
publicName: "enabled",
|
|
158
|
+
isSignal: true,
|
|
159
|
+
isRequired: false,
|
|
160
|
+
transformFunction: null
|
|
161
|
+
},
|
|
162
|
+
selector: {
|
|
163
|
+
classPropertyName: "selector",
|
|
164
|
+
publicName: "selector",
|
|
165
|
+
isSignal: true,
|
|
166
|
+
isRequired: false,
|
|
167
|
+
transformFunction: null
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
outputs: { clickEvent: "clickEvent" },
|
|
171
|
+
host: { listeners: {
|
|
172
|
+
"mouseenter": "onMouseEnter($event)",
|
|
173
|
+
"mouseleave": "onMouseLeave($event)",
|
|
174
|
+
"mousemove": "onMouseOver($event)",
|
|
175
|
+
"click": "onClick($event)"
|
|
176
|
+
} },
|
|
177
|
+
ngImport: i0
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
182
|
+
minVersion: "12.0.0",
|
|
183
|
+
version: "22.2.3",
|
|
184
|
+
ngImport: i0,
|
|
185
|
+
type: CmatArrowCursorDirective,
|
|
186
|
+
decorators: [{
|
|
187
|
+
type: Directive,
|
|
188
|
+
args: [{ selector: "[cmatArrowCursor]" }]
|
|
189
|
+
}],
|
|
190
|
+
propDecorators: {
|
|
191
|
+
animationDuration: [{
|
|
192
|
+
type: i0.Input,
|
|
193
|
+
args: [{
|
|
194
|
+
isSignal: true,
|
|
195
|
+
alias: "animationDuration",
|
|
196
|
+
required: false
|
|
197
|
+
}]
|
|
198
|
+
}],
|
|
199
|
+
orientation: [{
|
|
200
|
+
type: i0.Input,
|
|
201
|
+
args: [{
|
|
202
|
+
isSignal: true,
|
|
203
|
+
alias: "orientation",
|
|
204
|
+
required: false
|
|
205
|
+
}]
|
|
206
|
+
}],
|
|
207
|
+
enabled: [{
|
|
208
|
+
type: i0.Input,
|
|
209
|
+
args: [{
|
|
210
|
+
isSignal: true,
|
|
211
|
+
alias: "enabled",
|
|
212
|
+
required: false
|
|
213
|
+
}]
|
|
214
|
+
}],
|
|
215
|
+
selector: [{
|
|
216
|
+
type: i0.Input,
|
|
217
|
+
args: [{
|
|
218
|
+
isSignal: true,
|
|
219
|
+
alias: "selector",
|
|
220
|
+
required: false
|
|
221
|
+
}]
|
|
222
|
+
}],
|
|
223
|
+
clickEvent: [{
|
|
224
|
+
type: i0.Output,
|
|
225
|
+
args: ["clickEvent"]
|
|
226
|
+
}],
|
|
227
|
+
onMouseEnter: [{
|
|
228
|
+
type: HostListener,
|
|
229
|
+
args: ["mouseenter", ["$event"]]
|
|
230
|
+
}],
|
|
231
|
+
onMouseLeave: [{
|
|
232
|
+
type: HostListener,
|
|
233
|
+
args: ["mouseleave", ["$event"]]
|
|
234
|
+
}],
|
|
235
|
+
onMouseOver: [{
|
|
236
|
+
type: HostListener,
|
|
237
|
+
args: ["mousemove", ["$event"]]
|
|
238
|
+
}],
|
|
239
|
+
onClick: [{
|
|
240
|
+
type: HostListener,
|
|
241
|
+
args: ["click", ["$event"]]
|
|
242
|
+
}]
|
|
243
|
+
}
|
|
244
|
+
});
|
|
193
245
|
export { CmatArrowCursorDirective };
|
|
194
|
-
|
|
246
|
+
|
|
247
|
+
//# sourceMappingURL=cmat-directives-arrow-cursor.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-directives-arrow-cursor.mjs","sources":["../../../projects/cmat/directives/arrow-cursor/arrow-cursor.directive.ts","../../../projects/cmat/directives/arrow-cursor/cmat-directives-arrow-cursor.ts"],"sourcesContent":["import {\r\n Directive,\r\n HostListener,\r\n DOCUMENT,\r\n inject,\r\n input,\r\n output,\r\n OnDestroy,\r\n computed,\r\n signal,\r\n} from '@angular/core';\r\nimport { CmatMediaWatcherService } from 'cmat/services/media-watcher';\r\n\r\n@Directive({\r\n selector: '[cmatArrowCursor]'\r\n})\r\nexport class CmatArrowCursorDirective implements OnDestroy {\r\n readonly animationDuration = input<number>(0.3);\r\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\r\n readonly enabled = input<boolean>(false);\r\n readonly selector = input<string>('.carousel-arrow-cursor');\r\n\r\n readonly clickEvent = output<string | null>();\r\n\r\n private _arrowCursor: HTMLDivElement | null = null;\r\n private _cursorIcon: SVGElement | null;\r\n\r\n private readonly _cursorAnimationFrame = signal<number | null>(null);\r\n private readonly _cursorClientX = signal(0);\r\n private readonly _cursorClientY = signal(0);\r\n private readonly _cursorSide = signal<string | null>(null);\r\n private readonly _oldCursorSide = signal<string | null>(null);\r\n\r\n private _document = inject<Document>(DOCUMENT);\r\n private _cmatMediaWatcherService = inject(CmatMediaWatcherService);\r\n private _isCursorActive = false;\r\n private readonly _boundMoveCursor = this.moveCursor.bind(this);\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n readonly isPhone = computed(() => {\r\n return !this._cmatMediaWatcherService.mediaChange().matchingAliases.includes('lg')\r\n });\r\n\r\n @HostListener('mouseenter', ['$event'])\r\n public onMouseEnter(event: MouseEvent): void {\r\n if (!this.isPhone() && this.enabled()) {\r\n this._arrowCursor = this._document.querySelector(this.selector());\r\n if (this._cursorIcon == null) {\r\n this._cursorIcon = this._arrowCursor?.querySelector('.arrow-cursor-icon') ?? null;\r\n this._cursorSide.set(null);\r\n\r\n if (this._cursorIcon) {\r\n this._cursorIcon.style.transform = 'rotate3d(0,0,1,-135deg) scale3d(0.5,0.5,1)';\r\n this._cursorIcon.style.opacity = '0';\r\n }\r\n }\r\n\r\n this._cursorClientX.set(event.clientX);\r\n this._cursorClientY.set(event.clientY);\r\n\r\n let t;\r\n\r\n if (this.orientation() === 'horizontal') {\r\n this._cursorSide.set(this._cursorClientX() > window.innerWidth / 2 ? 'right' : 'left');\r\n\r\n const target = event.target as HTMLElement | null;\r\n if (target) {\r\n t = (this._cursorClientY() < (target.getBoundingClientRect().top + target.getBoundingClientRect().height / 2))\r\n ? -135\r\n : (this._cursorSide() === 'right' ? 135 : -315);\r\n } else {\r\n t = -135;\r\n }\r\n } else {\r\n this._cursorSide.set(this._cursorClientY() > window.innerHeight / 2 ? 'down' : 'up');\r\n\r\n const target = event.target as HTMLElement | null;\r\n if (target) {\r\n t = (this._cursorClientX() < (target.getBoundingClientRect().left + target.getBoundingClientRect().width / 2))\r\n ? 135\r\n : (this._cursorSide() === 'down' ? -135 : 45);\r\n } else {\r\n t = 135;\r\n }\r\n }\r\n\r\n if (this._cursorIcon) {\r\n this._cursorIcon.style.transform = 'rotate3d(0,0,1,' + t + 'deg)';\r\n this._cursorIcon.style.transition = this.animationDuration() + 's';\r\n this._applyCursorRotation(this._cursorSide());\r\n this._cursorIcon.style.opacity = '1';\r\n }\r\n\r\n this._startCursorLoop();\r\n }\r\n }\r\n\r\n @HostListener('mouseleave', ['$event'])\r\n public onMouseLeave(event: MouseEvent): void {\r\n if (!this.isPhone() && this.enabled()) {\r\n let t;\r\n\r\n const target = event.target as HTMLElement | null;\r\n if (!target) {\r\n return;\r\n }\r\n\r\n if (this.orientation() === 'horizontal') {\r\n t = (this._cursorClientY() < (target.getBoundingClientRect().top + target.getBoundingClientRect().height / 2))\r\n ? (('right' === this._cursorSide()) ? -135 : -45)\r\n : (('right' === this._cursorSide()) ? 135 : -315);\r\n } else {\r\n t = (this._cursorClientX() < (target.getBoundingClientRect().left + target.getBoundingClientRect().width / 2))\r\n ? (('down' === this._cursorSide()) ? 225 : -225)\r\n : (('down' === this._cursorSide()) ? -45 : 45);\r\n }\r\n\r\n if (this._cursorIcon) {\r\n this._cursorIcon.style.transition = this.animationDuration() + 's';\r\n this._cursorIcon.style.transform = 'rotate3d(0,0,1,' + t + 'deg) scale3d(0.3,0.3,1)';\r\n this._cursorIcon.style.opacity = '0';\r\n }\r\n\r\n this._stopCursorLoop();\r\n }\r\n }\r\n\r\n @HostListener('mousemove', ['$event'])\r\n public onMouseOver(event: MouseEvent): void {\r\n if (!this.isPhone() && this._cursorIcon && this.enabled()) {\r\n this._cursorClientX.set(event.clientX);\r\n this._cursorClientY.set(event.clientY);\r\n\r\n if (this.orientation() === 'horizontal') {\r\n this._cursorSide.set(this._cursorClientX() > window.innerWidth / 2 ? 'right' : 'left');\r\n } else {\r\n this._cursorSide.set(this._cursorClientY() > window.innerHeight / 2 ? 'down' : 'up');\r\n }\r\n\r\n if (this._oldCursorSide() !== this._cursorSide()) {\r\n this._cursorIcon.style.transition = this.animationDuration() + 's';\r\n this._applyCursorRotation(this._cursorSide());\r\n this._oldCursorSide.set(this._cursorSide());\r\n }\r\n }\r\n }\r\n\r\n @HostListener('click', ['$event'])\r\n onClick(event: Event): void {\r\n if (!this.isPhone() && this._cursorIcon && this.enabled()) {\r\n this.clickEvent.emit(this._cursorSide());\r\n\r\n event.stopPropagation();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._stopCursorLoop();\r\n }\r\n\r\n moveCursor(): void {\r\n if (this._isCursorActive && this._arrowCursor) {\r\n this._arrowCursor.style.transform = 'translate3d(' + this._cursorClientX() + 'px,' + this._cursorClientY() + 'px,0px)';\r\n this._cursorAnimationFrame.set(requestAnimationFrame(this._boundMoveCursor));\r\n }\r\n }\r\n\r\n private _startCursorLoop(): void {\r\n this._isCursorActive = true;\r\n this._cursorAnimationFrame.set(requestAnimationFrame(this._boundMoveCursor));\r\n }\r\n\r\n private _stopCursorLoop(): void {\r\n this._isCursorActive = false;\r\n if (this._cursorAnimationFrame() !== null) {\r\n window.cancelAnimationFrame(this._cursorAnimationFrame() ?? 0);\r\n this._cursorAnimationFrame.set(null);\r\n }\r\n }\r\n\r\n private _applyCursorRotation(side: string | null): void {\r\n if (!this._cursorIcon) {\r\n return;\r\n }\r\n const rotationMap: Record<string, string> = {\r\n 'left': 'rotate3d(0,0,1,-180deg)',\r\n 'up': 'rotate3d(0,0,1,-90deg)',\r\n 'right': 'rotate3d(0,0,1,0deg)',\r\n 'down': 'rotate3d(0,0,1,90deg)'\r\n };\r\n const transform = side ? rotationMap[side] : null;\r\n if (transform) {\r\n this._cursorIcon.style.transform = transform;\r\n }\r\n }\r\n\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAgBa,wBAAwB,CAAA;AAHrC,IAAA,WAAA,GAAA;QAIa,IAAA,CAAA,iBAAiB,GAAG,KAAK,CAAS,GAAG;8FAAC;QACtC,IAAA,CAAA,WAAW,GAAG,KAAK,CAA4B,YAAY;wFAAC;QAC5D,IAAA,CAAA,OAAO,GAAG,KAAK,CAAU,KAAK;oFAAC;QAC/B,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,wBAAwB;qFAAC;QAElD,IAAA,CAAA,UAAU,GAAG,MAAM,EAAiB;QAErC,IAAA,CAAA,YAAY,GAA0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,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,YAAA,EAAA,sBAAA,EAAA,YAAA,EAAA,sBAAA,EAAA,WAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,iBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE;AACb,iBAAA;;sBA4BI,YAAY;uBAAC,YAAY,EAAE,CAAC,QAAQ,CAAC;;sBAsDrC,YAAY;uBAAC,YAAY,EAAE,CAAC,QAAQ,CAAC;;sBA8BrC,YAAY;uBAAC,WAAW,EAAE,CAAC,QAAQ,CAAC;;sBAoBpC,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;;;ACnJrC;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"cmat-directives-arrow-cursor.mjs","names":[],"sources":["../../../projects/cmat/directives/arrow-cursor/arrow-cursor.directive.ts"],"sourcesContent":["import {\r\n Directive,\r\n HostListener,\r\n DOCUMENT,\r\n inject,\r\n input,\r\n output,\r\n OnDestroy,\r\n computed,\r\n signal,\r\n} from '@angular/core';\r\nimport { CmatMediaWatcherService } from 'cmat/services/media-watcher';\r\n\r\n@Directive({\r\n selector: '[cmatArrowCursor]'\r\n})\r\nexport class CmatArrowCursorDirective implements OnDestroy {\r\n readonly animationDuration = input<number>(0.3);\r\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\r\n readonly enabled = input<boolean>(false);\r\n readonly selector = input<string>('.carousel-arrow-cursor');\r\n\r\n readonly clickEvent = output<string | null>();\r\n\r\n private _arrowCursor: HTMLDivElement | null = null;\r\n private _cursorIcon: SVGElement | null;\r\n\r\n private readonly _cursorAnimationFrame = signal<number | null>(null);\r\n private readonly _cursorClientX = signal(0);\r\n private readonly _cursorClientY = signal(0);\r\n private readonly _cursorSide = signal<string | null>(null);\r\n private readonly _oldCursorSide = signal<string | null>(null);\r\n\r\n private _document = inject<Document>(DOCUMENT);\r\n private _cmatMediaWatcherService = inject(CmatMediaWatcherService);\r\n private _isCursorActive = false;\r\n private readonly _boundMoveCursor = this.moveCursor.bind(this);\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n readonly isPhone = computed(() => {\r\n return !this._cmatMediaWatcherService.mediaChange().matchingAliases.includes('lg')\r\n });\r\n\r\n @HostListener('mouseenter', ['$event'])\r\n public onMouseEnter(event: MouseEvent): void {\r\n if (!this.isPhone() && this.enabled()) {\r\n this._arrowCursor = this._document.querySelector(this.selector());\r\n if (this._cursorIcon == null) {\r\n this._cursorIcon = this._arrowCursor?.querySelector('.arrow-cursor-icon') ?? null;\r\n this._cursorSide.set(null);\r\n\r\n if (this._cursorIcon) {\r\n this._cursorIcon.style.transform = 'rotate3d(0,0,1,-135deg) scale3d(0.5,0.5,1)';\r\n this._cursorIcon.style.opacity = '0';\r\n }\r\n }\r\n\r\n this._cursorClientX.set(event.clientX);\r\n this._cursorClientY.set(event.clientY);\r\n\r\n let t;\r\n\r\n if (this.orientation() === 'horizontal') {\r\n this._cursorSide.set(this._cursorClientX() > window.innerWidth / 2 ? 'right' : 'left');\r\n\r\n const target = event.target as HTMLElement | null;\r\n if (target) {\r\n t = (this._cursorClientY() < (target.getBoundingClientRect().top + target.getBoundingClientRect().height / 2))\r\n ? -135\r\n : (this._cursorSide() === 'right' ? 135 : -315);\r\n } else {\r\n t = -135;\r\n }\r\n } else {\r\n this._cursorSide.set(this._cursorClientY() > window.innerHeight / 2 ? 'down' : 'up');\r\n\r\n const target = event.target as HTMLElement | null;\r\n if (target) {\r\n t = (this._cursorClientX() < (target.getBoundingClientRect().left + target.getBoundingClientRect().width / 2))\r\n ? 135\r\n : (this._cursorSide() === 'down' ? -135 : 45);\r\n } else {\r\n t = 135;\r\n }\r\n }\r\n\r\n if (this._cursorIcon) {\r\n this._cursorIcon.style.transform = 'rotate3d(0,0,1,' + t + 'deg)';\r\n this._cursorIcon.style.transition = this.animationDuration() + 's';\r\n this._applyCursorRotation(this._cursorSide());\r\n this._cursorIcon.style.opacity = '1';\r\n }\r\n\r\n this._startCursorLoop();\r\n }\r\n }\r\n\r\n @HostListener('mouseleave', ['$event'])\r\n public onMouseLeave(event: MouseEvent): void {\r\n if (!this.isPhone() && this.enabled()) {\r\n let t;\r\n\r\n const target = event.target as HTMLElement | null;\r\n if (!target) {\r\n return;\r\n }\r\n\r\n if (this.orientation() === 'horizontal') {\r\n t = (this._cursorClientY() < (target.getBoundingClientRect().top + target.getBoundingClientRect().height / 2))\r\n ? (('right' === this._cursorSide()) ? -135 : -45)\r\n : (('right' === this._cursorSide()) ? 135 : -315);\r\n } else {\r\n t = (this._cursorClientX() < (target.getBoundingClientRect().left + target.getBoundingClientRect().width / 2))\r\n ? (('down' === this._cursorSide()) ? 225 : -225)\r\n : (('down' === this._cursorSide()) ? -45 : 45);\r\n }\r\n\r\n if (this._cursorIcon) {\r\n this._cursorIcon.style.transition = this.animationDuration() + 's';\r\n this._cursorIcon.style.transform = 'rotate3d(0,0,1,' + t + 'deg) scale3d(0.3,0.3,1)';\r\n this._cursorIcon.style.opacity = '0';\r\n }\r\n\r\n this._stopCursorLoop();\r\n }\r\n }\r\n\r\n @HostListener('mousemove', ['$event'])\r\n public onMouseOver(event: MouseEvent): void {\r\n if (!this.isPhone() && this._cursorIcon && this.enabled()) {\r\n this._cursorClientX.set(event.clientX);\r\n this._cursorClientY.set(event.clientY);\r\n\r\n if (this.orientation() === 'horizontal') {\r\n this._cursorSide.set(this._cursorClientX() > window.innerWidth / 2 ? 'right' : 'left');\r\n } else {\r\n this._cursorSide.set(this._cursorClientY() > window.innerHeight / 2 ? 'down' : 'up');\r\n }\r\n\r\n if (this._oldCursorSide() !== this._cursorSide()) {\r\n this._cursorIcon.style.transition = this.animationDuration() + 's';\r\n this._applyCursorRotation(this._cursorSide());\r\n this._oldCursorSide.set(this._cursorSide());\r\n }\r\n }\r\n }\r\n\r\n @HostListener('click', ['$event'])\r\n onClick(event: Event): void {\r\n if (!this.isPhone() && this._cursorIcon && this.enabled()) {\r\n this.clickEvent.emit(this._cursorSide());\r\n\r\n event.stopPropagation();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._stopCursorLoop();\r\n }\r\n\r\n moveCursor(): void {\r\n if (this._isCursorActive && this._arrowCursor) {\r\n this._arrowCursor.style.transform = 'translate3d(' + this._cursorClientX() + 'px,' + this._cursorClientY() + 'px,0px)';\r\n this._cursorAnimationFrame.set(requestAnimationFrame(this._boundMoveCursor));\r\n }\r\n }\r\n\r\n private _startCursorLoop(): void {\r\n this._isCursorActive = true;\r\n this._cursorAnimationFrame.set(requestAnimationFrame(this._boundMoveCursor));\r\n }\r\n\r\n private _stopCursorLoop(): void {\r\n this._isCursorActive = false;\r\n if (this._cursorAnimationFrame() !== null) {\r\n window.cancelAnimationFrame(this._cursorAnimationFrame() ?? 0);\r\n this._cursorAnimationFrame.set(null);\r\n }\r\n }\r\n\r\n private _applyCursorRotation(side: string | null): void {\r\n if (!this._cursorIcon) {\r\n return;\r\n }\r\n const rotationMap: Record<string, string> = {\r\n 'left': 'rotate3d(0,0,1,-180deg)',\r\n 'up': 'rotate3d(0,0,1,-90deg)',\r\n 'right': 'rotate3d(0,0,1,0deg)',\r\n 'down': 'rotate3d(0,0,1,90deg)'\r\n };\r\n const transform = side ? rotationMap[side] : null;\r\n if (transform) {\r\n this._cursorIcon.style.transform = transform;\r\n }\r\n }\r\n\r\n}"],"mappings":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A,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,SAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,UAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;GAAA;GAAA,SAAA,EAAA,YAAA,aAAA;GAAA,MAAA,EAAA,WAAA;IAAA,cAAA;IAAA,cAAA;IAAA,aAAA;IAAA,SAAA;GAAA,EAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAAxB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAwB,YAAA,CAAA;EAHpC,MAAA;EAAU,MAAA,CAAA,EACP,UAAU,oBACb,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BI,MAAA;GAAa,MAAA,CAAA,cAAc,CAAC,QAAQ,CAAC;;;GAsDrC,MAAA;GAAa,MAAA,CAAA,cAAc,CAAC,QAAQ,CAAC;;;GA8BrC,MAAA;GAAa,MAAA,CAAA,aAAa,CAAC,QAAQ,CAAC;;;GAoBpC,MAAA;GAAa,MAAA,CAAA,SAAS,CAAC,QAAQ,CAAC"}
|
|
@@ -1,26 +1,44 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Directive, ElementRef, inject } from "@angular/core";
|
|
3
|
+
var CmatAutofocusDirective = class CmatAutofocusDirective {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.element = inject(ElementRef);
|
|
6
|
+
setTimeout(() => {
|
|
7
|
+
this.element.nativeElement.focus();
|
|
8
|
+
}, 0);
|
|
9
|
+
}
|
|
10
|
+
static {
|
|
11
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
12
|
+
minVersion: "12.0.0",
|
|
13
|
+
version: "22.2.3",
|
|
14
|
+
ngImport: i0,
|
|
15
|
+
type: CmatAutofocusDirective,
|
|
16
|
+
deps: [],
|
|
17
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
static {
|
|
21
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
22
|
+
minVersion: "14.0.0",
|
|
23
|
+
version: "22.2.3",
|
|
24
|
+
type: CmatAutofocusDirective,
|
|
25
|
+
isStandalone: true,
|
|
26
|
+
selector: "[cmatAutofocus]",
|
|
27
|
+
ngImport: i0
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
32
|
+
minVersion: "12.0.0",
|
|
33
|
+
version: "22.2.3",
|
|
34
|
+
ngImport: i0,
|
|
35
|
+
type: CmatAutofocusDirective,
|
|
36
|
+
decorators: [{
|
|
37
|
+
type: Directive,
|
|
38
|
+
args: [{ selector: "[cmatAutofocus]" }]
|
|
39
|
+
}],
|
|
40
|
+
ctorParameters: () => []
|
|
41
|
+
});
|
|
25
42
|
export { CmatAutofocusDirective };
|
|
26
|
-
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=cmat-directives-autofocus.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-directives-autofocus.mjs","sources":["../../../projects/cmat/directives/autofocus/autofocus.directive.ts"
|
|
1
|
+
{"version":3,"file":"cmat-directives-autofocus.mjs","names":[],"sources":["../../../projects/cmat/directives/autofocus/autofocus.directive.ts"],"sourcesContent":["import { Directive, ElementRef, inject } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[cmatAutofocus]'\r\n})\r\nexport class CmatAutofocusDirective {\r\n element = inject<ElementRef<HTMLElement>>(ElementRef);\r\n\r\n constructor() {\r\n setTimeout(() => {\r\n this.element.nativeElement.focus();\r\n }, 0);\r\n\r\n }\r\n}\r\n"],"mappings":";;AAKA,IAAa,yBAAb,MAAa,uBAAsB;CAGjC,cAAA;EAFA,KAAA,UAAU,OAAgC,UAAU;EAGlD,iBAAgB;GACd,KAAK,QAAQ,cAAc,MAAK;EAClC,GAAG,CAAC;CAEN;CARW;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAsB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAtB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAsB,cAAA;GAAA,UAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAAtB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAsB,YAAA,CAAA;EAHlC,MAAA;EAAU,MAAA,CAAA,EACT,UAAU,kBACX,CAAA"}
|