cmat 0.0.110 → 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 +985 -669
- 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 +39806 -22071
- 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 -92
- 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 -5194
|
@@ -1,422 +1,617 @@
|
|
|
1
|
-
import { coerceBooleanProperty } from
|
|
2
|
-
import { NgStyle } from
|
|
3
|
-
import * as i0 from
|
|
4
|
-
import {
|
|
5
|
-
import { NgControl } from
|
|
6
|
-
import { MatFormFieldControl } from
|
|
7
|
-
import { isNil } from
|
|
8
|
-
import { Subject } from
|
|
9
|
-
|
|
10
|
-
/* eslint-disable @typescript-eslint/member-ordering */
|
|
1
|
+
import { coerceBooleanProperty } from "@angular/cdk/coercion";
|
|
2
|
+
import { NgStyle } from "@angular/common";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import { ChangeDetectionStrategy, Component, DOCUMENT, ElementRef, HostListener, Input, Renderer2, ViewEncapsulation, inject, input, output, signal, viewChild } from "@angular/core";
|
|
5
|
+
import { NgControl } from "@angular/forms";
|
|
6
|
+
import { MatFormFieldControl } from "@angular/material/form-field";
|
|
7
|
+
import { isNil } from "lodash-es";
|
|
8
|
+
import { Subject } from "rxjs";
|
|
11
9
|
let NEXT_ID = 0;
|
|
12
|
-
class CmatKnobInputComponent {
|
|
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
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
10
|
+
var CmatKnobInputComponent = class CmatKnobInputComponent {
|
|
11
|
+
get value() {
|
|
12
|
+
return this._valueSignal() ?? this.min();
|
|
13
|
+
}
|
|
14
|
+
set value(val) {
|
|
15
|
+
if (val !== this._valueSignal()) {
|
|
16
|
+
this._valueSignal.set(val);
|
|
17
|
+
this.stateChanges.next();
|
|
18
|
+
this._onModelChange(val);
|
|
19
|
+
this.valueChange.emit(val);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
get placeholder() {
|
|
23
|
+
return this._placeholderSignal();
|
|
24
|
+
}
|
|
25
|
+
set placeholder(plh) {
|
|
26
|
+
this._placeholderSignal.set(plh);
|
|
27
|
+
this.stateChanges.next();
|
|
28
|
+
}
|
|
29
|
+
get required() {
|
|
30
|
+
return this._requiredSignal();
|
|
31
|
+
}
|
|
32
|
+
set required(req) {
|
|
33
|
+
this._requiredSignal.set(coerceBooleanProperty(req));
|
|
34
|
+
this.stateChanges.next();
|
|
35
|
+
}
|
|
36
|
+
get disabled() {
|
|
37
|
+
if (!isNil(this.ngControl?.disabled)) return this.ngControl.disabled;
|
|
38
|
+
return this._disabledSignal();
|
|
39
|
+
}
|
|
40
|
+
set disabled(val) {
|
|
41
|
+
const coerced = coerceBooleanProperty(val);
|
|
42
|
+
this._disabledSignal.set(coerced);
|
|
43
|
+
if (this._focused && coerced) this._focused = false;
|
|
44
|
+
this.stateChanges.next();
|
|
45
|
+
}
|
|
46
|
+
get empty() {
|
|
47
|
+
return this._valueSignal() == null;
|
|
48
|
+
}
|
|
49
|
+
get errorState() {
|
|
50
|
+
if (this.ngControl == null) return false;
|
|
51
|
+
return (this.touched() && !!this.ngControl?.invalid) ?? false;
|
|
52
|
+
}
|
|
53
|
+
get shouldLabelFloat() {
|
|
54
|
+
return this._focused || !this.empty;
|
|
55
|
+
}
|
|
56
|
+
get focused() {
|
|
57
|
+
return this._focused;
|
|
58
|
+
}
|
|
59
|
+
constructor() {
|
|
60
|
+
this.knobElementRef = viewChild("knob", ...ngDevMode ? [{ debugName: "knobElementRef" }] : /* istanbul ignore next */ []);
|
|
61
|
+
this.valueColor = input("var(--cmat-primary)", ...ngDevMode ? [{ debugName: "valueColor" }] : /* istanbul ignore next */ []);
|
|
62
|
+
this.rangeColor = input("var(--cmat-border)", ...ngDevMode ? [{ debugName: "rangeColor" }] : /* istanbul ignore next */ []);
|
|
63
|
+
this.textColor = input("var(--cmat-text-default)", ...ngDevMode ? [{ debugName: "textColor" }] : /* istanbul ignore next */ []);
|
|
64
|
+
this.valueTemplate = input("{value}", ...ngDevMode ? [{ debugName: "valueTemplate" }] : /* istanbul ignore next */ []);
|
|
65
|
+
this.name = input(...ngDevMode ? [void 0, { debugName: "name" }] : /* istanbul ignore next */ []);
|
|
66
|
+
this.size = input(100, ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
67
|
+
this.step = input(1, ...ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []);
|
|
68
|
+
this.min = input(0, ...ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []);
|
|
69
|
+
this.max = input(100, ...ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []);
|
|
70
|
+
this.strokeWidth = input(14, ...ngDevMode ? [{ debugName: "strokeWidth" }] : /* istanbul ignore next */ []);
|
|
71
|
+
this.showValue = input(true, ...ngDevMode ? [{ debugName: "showValue" }] : /* istanbul ignore next */ []);
|
|
72
|
+
this.valueChange = output();
|
|
73
|
+
this.id = `cmat-knob-input-${NEXT_ID++}`;
|
|
74
|
+
this.stateChanges = new Subject();
|
|
75
|
+
this._valueSignal = signal(null, ...ngDevMode ? [{ debugName: "_valueSignal" }] : /* istanbul ignore next */ []);
|
|
76
|
+
this._placeholderSignal = signal("", ...ngDevMode ? [{ debugName: "_placeholderSignal" }] : /* istanbul ignore next */ []);
|
|
77
|
+
this._requiredSignal = signal(false, ...ngDevMode ? [{ debugName: "_requiredSignal" }] : /* istanbul ignore next */ []);
|
|
78
|
+
this._disabledSignal = signal(false, ...ngDevMode ? [{ debugName: "_disabledSignal" }] : /* istanbul ignore next */ []);
|
|
79
|
+
this._focused = false;
|
|
80
|
+
this.touched = signal(false, ...ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []);
|
|
81
|
+
this.refreshVersion = signal(0, ...ngDevMode ? [{ debugName: "refreshVersion" }] : /* istanbul ignore next */ []);
|
|
82
|
+
this.radius = 40;
|
|
83
|
+
this.midX = 50;
|
|
84
|
+
this.midY = 50;
|
|
85
|
+
this.minRadians = 4 * Math.PI / 3;
|
|
86
|
+
this.maxRadians = -Math.PI / 3;
|
|
87
|
+
this.ngControl = inject(NgControl, {
|
|
88
|
+
optional: true,
|
|
89
|
+
self: true
|
|
90
|
+
});
|
|
91
|
+
this._document = inject(DOCUMENT);
|
|
92
|
+
this._renderer = inject(Renderer2);
|
|
93
|
+
this._el = inject(ElementRef);
|
|
94
|
+
this.windowMouseMoveListener = null;
|
|
95
|
+
this.windowMouseUpListener = null;
|
|
96
|
+
this.windowTouchMoveListener = null;
|
|
97
|
+
this.windowTouchEndListener = null;
|
|
98
|
+
this._onModelChange = () => {};
|
|
99
|
+
this._onTouchedChange = () => {};
|
|
100
|
+
if (this.ngControl != null) this.ngControl.valueAccessor = this;
|
|
101
|
+
}
|
|
102
|
+
ngOnDestroy() {
|
|
103
|
+
this.stateChanges.complete();
|
|
104
|
+
this._cleanupListeners();
|
|
105
|
+
}
|
|
106
|
+
_cleanupListeners() {
|
|
107
|
+
if (this.windowMouseMoveListener) this.windowMouseMoveListener();
|
|
108
|
+
if (this.windowMouseUpListener) this.windowMouseUpListener();
|
|
109
|
+
if (this.windowTouchMoveListener) this.windowTouchMoveListener();
|
|
110
|
+
if (this.windowTouchEndListener) this.windowTouchEndListener();
|
|
111
|
+
this.windowMouseMoveListener = null;
|
|
112
|
+
this.windowMouseUpListener = null;
|
|
113
|
+
this.windowTouchMoveListener = null;
|
|
114
|
+
this.windowTouchEndListener = null;
|
|
115
|
+
}
|
|
116
|
+
writeValue(value) {
|
|
117
|
+
this._valueSignal.set(value ?? this.min());
|
|
118
|
+
this.refreshVersion.update((v) => v + 1);
|
|
119
|
+
this.stateChanges.next();
|
|
120
|
+
}
|
|
121
|
+
registerOnChange(fn) {
|
|
122
|
+
this._onModelChange = fn;
|
|
123
|
+
}
|
|
124
|
+
registerOnTouched(fn) {
|
|
125
|
+
this._onTouchedChange = fn;
|
|
126
|
+
}
|
|
127
|
+
setDisabledState(val) {
|
|
128
|
+
this.disabled = val;
|
|
129
|
+
this.refreshVersion.update((v) => v + 1);
|
|
130
|
+
this.stateChanges.next();
|
|
131
|
+
}
|
|
132
|
+
setDescribedByIds(ids) {
|
|
133
|
+
this.userAriaDescribedBy = ids.length ? ids.join(" ") : void 0;
|
|
134
|
+
const knobEl = this.knobElementRef()?.nativeElement;
|
|
135
|
+
if (knobEl) {
|
|
136
|
+
if (ids.length) knobEl.setAttribute("aria-describedby", ids.join(" "));
|
|
137
|
+
else knobEl.removeAttribute("aria-describedby");
|
|
138
|
+
}
|
|
139
|
+
this.stateChanges.next();
|
|
140
|
+
}
|
|
141
|
+
onContainerClick() {
|
|
142
|
+
if (!this.focused) this.knobElementRef()?.nativeElement.focus();
|
|
143
|
+
}
|
|
144
|
+
onKeyDown(event) {
|
|
145
|
+
const keyboardEvent = event;
|
|
146
|
+
if (!this.disabled) switch (keyboardEvent.code) {
|
|
147
|
+
case "Enter":
|
|
148
|
+
case "Space":
|
|
149
|
+
keyboardEvent.preventDefault();
|
|
150
|
+
break;
|
|
151
|
+
case "ArrowRight":
|
|
152
|
+
case "ArrowUp":
|
|
153
|
+
keyboardEvent.preventDefault();
|
|
154
|
+
this.updateModelValue(this.value + 1);
|
|
155
|
+
break;
|
|
156
|
+
case "ArrowLeft":
|
|
157
|
+
case "ArrowDown":
|
|
158
|
+
keyboardEvent.preventDefault();
|
|
159
|
+
this.updateModelValue(this.value - 1);
|
|
160
|
+
break;
|
|
161
|
+
case "Home":
|
|
162
|
+
keyboardEvent.preventDefault();
|
|
163
|
+
this.updateModelValue(this.min());
|
|
164
|
+
break;
|
|
165
|
+
case "End":
|
|
166
|
+
keyboardEvent.preventDefault();
|
|
167
|
+
this.updateModelValue(this.max());
|
|
168
|
+
break;
|
|
169
|
+
case "PageUp":
|
|
170
|
+
keyboardEvent.preventDefault();
|
|
171
|
+
this.updateModelValue(this.value + 10);
|
|
172
|
+
break;
|
|
173
|
+
case "PageDown":
|
|
174
|
+
keyboardEvent.preventDefault();
|
|
175
|
+
this.updateModelValue(this.value - 10);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
onMouseDown(event) {
|
|
179
|
+
if (!this.disabled) {
|
|
180
|
+
this._cleanupListeners();
|
|
181
|
+
const win = this._document.defaultView ?? window;
|
|
182
|
+
this.windowMouseMoveListener = this._renderer.listen(win, "mousemove", this.onMouseMove.bind(this));
|
|
183
|
+
this.windowMouseUpListener = this._renderer.listen(win, "mouseup", this.onMouseUp.bind(this));
|
|
184
|
+
event.preventDefault();
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
onMouseUp(event) {
|
|
188
|
+
if (!this.disabled) {
|
|
189
|
+
this._cleanupListeners();
|
|
190
|
+
event.preventDefault();
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
onTouchStart(event) {
|
|
194
|
+
if (!this.disabled) {
|
|
195
|
+
this._cleanupListeners();
|
|
196
|
+
const win = this._document.defaultView ?? window;
|
|
197
|
+
this.windowTouchMoveListener = this._renderer.listen(win, "touchmove", this.onTouchMove.bind(this));
|
|
198
|
+
this.windowTouchEndListener = this._renderer.listen(win, "touchend", this.onTouchEnd.bind(this));
|
|
199
|
+
event.preventDefault();
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
onTouchEnd(event) {
|
|
203
|
+
if (!this.disabled) {
|
|
204
|
+
this._cleanupListeners();
|
|
205
|
+
event.preventDefault();
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
onFocusIn() {
|
|
209
|
+
if (!this._focused) {
|
|
210
|
+
this._focused = true;
|
|
211
|
+
this.stateChanges.next();
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
onFocusOut(event) {
|
|
215
|
+
const knobEl = this.knobElementRef()?.nativeElement;
|
|
216
|
+
if (knobEl && !knobEl.contains(event.relatedTarget)) {
|
|
217
|
+
this.touched.set(true);
|
|
218
|
+
this._focused = false;
|
|
219
|
+
this._onTouchedChange();
|
|
220
|
+
this.stateChanges.next();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
mapRange(x, inMin, inMax, outMin, outMax) {
|
|
224
|
+
return (x - inMin) * (outMax - outMin) / (inMax - inMin) + outMin;
|
|
225
|
+
}
|
|
226
|
+
onClick(event) {
|
|
227
|
+
if (!this.disabled) this.updateValue(event.offsetX, event.offsetY);
|
|
228
|
+
}
|
|
229
|
+
updateValue(offsetX, offsetY) {
|
|
230
|
+
let dx = offsetX - this.size() / 2;
|
|
231
|
+
let dy = this.size() / 2 - offsetY;
|
|
232
|
+
let angle = Math.atan2(dy, dx);
|
|
233
|
+
let start = -Math.PI / 2 - Math.PI / 6;
|
|
234
|
+
this.updateModel(angle, start);
|
|
235
|
+
}
|
|
236
|
+
updateModel(angle, start) {
|
|
237
|
+
let mappedValue;
|
|
238
|
+
if (angle > this.maxRadians) mappedValue = this.mapRange(angle, this.minRadians, this.maxRadians, this.min(), this.max());
|
|
239
|
+
else if (angle < start) mappedValue = this.mapRange(angle + 2 * Math.PI, this.minRadians, this.maxRadians, this.min(), this.max());
|
|
240
|
+
else return;
|
|
241
|
+
let newValue = Math.round((mappedValue - this.min()) / this.step()) * this.step() + this.min();
|
|
242
|
+
this.value = newValue;
|
|
243
|
+
}
|
|
244
|
+
onMouseMove(event) {
|
|
245
|
+
if (!this.disabled) {
|
|
246
|
+
this.updateValue(event.offsetX, event.offsetY);
|
|
247
|
+
event.preventDefault();
|
|
248
|
+
this.refreshVersion.update((v) => v + 1);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
onTouchMove(event) {
|
|
252
|
+
if (!this.disabled && event instanceof TouchEvent && event.touches.length === 1) {
|
|
253
|
+
const rect = this._el.nativeElement.firstElementChild?.getBoundingClientRect();
|
|
254
|
+
const touch = event.targetTouches.item(0);
|
|
255
|
+
if (touch && rect) {
|
|
256
|
+
const offsetX = touch.clientX - rect.left;
|
|
257
|
+
const offsetY = touch.clientY - rect.top;
|
|
258
|
+
this.updateValue(offsetX, offsetY);
|
|
259
|
+
this.refreshVersion.update((v) => v + 1);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
updateModelValue(newValue) {
|
|
264
|
+
if (newValue > this.max()) this.value = this.max();
|
|
265
|
+
else if (newValue < this.min()) this.value = this.min();
|
|
266
|
+
else this.value = newValue;
|
|
267
|
+
}
|
|
268
|
+
rangePath() {
|
|
269
|
+
return `M ${this.minX()} ${this.minY()} A ${this.radius} ${this.radius} 0 1 1 ${this.maxX()} ${this.maxY()}`;
|
|
270
|
+
}
|
|
271
|
+
valuePath() {
|
|
272
|
+
return `M ${this.zeroX()} ${this.zeroY()} A ${this.radius} ${this.radius} 0 ${this.largeArc()} ${this.sweep()} ${this.valueX()} ${this.valueY()}`;
|
|
273
|
+
}
|
|
274
|
+
zeroRadians() {
|
|
275
|
+
if (this.min() > 0 && this.max() > 0) return this.mapRange(this.min(), this.min(), this.max(), this.minRadians, this.maxRadians);
|
|
276
|
+
else return this.mapRange(0, this.min(), this.max(), this.minRadians, this.maxRadians);
|
|
277
|
+
}
|
|
278
|
+
valueRadians() {
|
|
279
|
+
return this.mapRange(this.value, this.min(), this.max(), this.minRadians, this.maxRadians);
|
|
280
|
+
}
|
|
281
|
+
minX() {
|
|
282
|
+
return this.midX + Math.cos(this.minRadians) * this.radius;
|
|
283
|
+
}
|
|
284
|
+
minY() {
|
|
285
|
+
return this.midY - Math.sin(this.minRadians) * this.radius;
|
|
286
|
+
}
|
|
287
|
+
maxX() {
|
|
288
|
+
return this.midX + Math.cos(this.maxRadians) * this.radius;
|
|
289
|
+
}
|
|
290
|
+
maxY() {
|
|
291
|
+
return this.midY - Math.sin(this.maxRadians) * this.radius;
|
|
292
|
+
}
|
|
293
|
+
zeroX() {
|
|
294
|
+
return this.midX + Math.cos(this.zeroRadians()) * this.radius;
|
|
295
|
+
}
|
|
296
|
+
zeroY() {
|
|
297
|
+
return this.midY - Math.sin(this.zeroRadians()) * this.radius;
|
|
298
|
+
}
|
|
299
|
+
valueX() {
|
|
300
|
+
return this.midX + Math.cos(this.valueRadians()) * this.radius;
|
|
301
|
+
}
|
|
302
|
+
valueY() {
|
|
303
|
+
return this.midY - Math.sin(this.valueRadians()) * this.radius;
|
|
304
|
+
}
|
|
305
|
+
largeArc() {
|
|
306
|
+
return Math.abs(this.zeroRadians() - this.valueRadians()) < Math.PI ? 0 : 1;
|
|
307
|
+
}
|
|
308
|
+
sweep() {
|
|
309
|
+
return this.valueRadians() > this.zeroRadians() ? 0 : 1;
|
|
310
|
+
}
|
|
311
|
+
valueToDisplay() {
|
|
312
|
+
return this.valueTemplate().replace("{value}", this.value.toString());
|
|
313
|
+
}
|
|
314
|
+
static {
|
|
315
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
316
|
+
minVersion: "12.0.0",
|
|
317
|
+
version: "22.2.3",
|
|
318
|
+
ngImport: i0,
|
|
319
|
+
type: CmatKnobInputComponent,
|
|
320
|
+
deps: [],
|
|
321
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
static {
|
|
325
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
326
|
+
minVersion: "17.0.0",
|
|
327
|
+
version: "22.2.3",
|
|
328
|
+
type: CmatKnobInputComponent,
|
|
329
|
+
isStandalone: true,
|
|
330
|
+
selector: "cmat-knob-input",
|
|
331
|
+
inputs: {
|
|
332
|
+
valueColor: {
|
|
333
|
+
classPropertyName: "valueColor",
|
|
334
|
+
publicName: "valueColor",
|
|
335
|
+
isSignal: true,
|
|
336
|
+
isRequired: false,
|
|
337
|
+
transformFunction: null
|
|
338
|
+
},
|
|
339
|
+
rangeColor: {
|
|
340
|
+
classPropertyName: "rangeColor",
|
|
341
|
+
publicName: "rangeColor",
|
|
342
|
+
isSignal: true,
|
|
343
|
+
isRequired: false,
|
|
344
|
+
transformFunction: null
|
|
345
|
+
},
|
|
346
|
+
textColor: {
|
|
347
|
+
classPropertyName: "textColor",
|
|
348
|
+
publicName: "textColor",
|
|
349
|
+
isSignal: true,
|
|
350
|
+
isRequired: false,
|
|
351
|
+
transformFunction: null
|
|
352
|
+
},
|
|
353
|
+
valueTemplate: {
|
|
354
|
+
classPropertyName: "valueTemplate",
|
|
355
|
+
publicName: "valueTemplate",
|
|
356
|
+
isSignal: true,
|
|
357
|
+
isRequired: false,
|
|
358
|
+
transformFunction: null
|
|
359
|
+
},
|
|
360
|
+
name: {
|
|
361
|
+
classPropertyName: "name",
|
|
362
|
+
publicName: "name",
|
|
363
|
+
isSignal: true,
|
|
364
|
+
isRequired: false,
|
|
365
|
+
transformFunction: null
|
|
366
|
+
},
|
|
367
|
+
size: {
|
|
368
|
+
classPropertyName: "size",
|
|
369
|
+
publicName: "size",
|
|
370
|
+
isSignal: true,
|
|
371
|
+
isRequired: false,
|
|
372
|
+
transformFunction: null
|
|
373
|
+
},
|
|
374
|
+
step: {
|
|
375
|
+
classPropertyName: "step",
|
|
376
|
+
publicName: "step",
|
|
377
|
+
isSignal: true,
|
|
378
|
+
isRequired: false,
|
|
379
|
+
transformFunction: null
|
|
380
|
+
},
|
|
381
|
+
min: {
|
|
382
|
+
classPropertyName: "min",
|
|
383
|
+
publicName: "min",
|
|
384
|
+
isSignal: true,
|
|
385
|
+
isRequired: false,
|
|
386
|
+
transformFunction: null
|
|
387
|
+
},
|
|
388
|
+
max: {
|
|
389
|
+
classPropertyName: "max",
|
|
390
|
+
publicName: "max",
|
|
391
|
+
isSignal: true,
|
|
392
|
+
isRequired: false,
|
|
393
|
+
transformFunction: null
|
|
394
|
+
},
|
|
395
|
+
strokeWidth: {
|
|
396
|
+
classPropertyName: "strokeWidth",
|
|
397
|
+
publicName: "strokeWidth",
|
|
398
|
+
isSignal: true,
|
|
399
|
+
isRequired: false,
|
|
400
|
+
transformFunction: null
|
|
401
|
+
},
|
|
402
|
+
showValue: {
|
|
403
|
+
classPropertyName: "showValue",
|
|
404
|
+
publicName: "showValue",
|
|
405
|
+
isSignal: true,
|
|
406
|
+
isRequired: false,
|
|
407
|
+
transformFunction: null
|
|
408
|
+
},
|
|
409
|
+
value: {
|
|
410
|
+
classPropertyName: "value",
|
|
411
|
+
publicName: "value",
|
|
412
|
+
isSignal: false,
|
|
413
|
+
isRequired: false,
|
|
414
|
+
transformFunction: null
|
|
415
|
+
},
|
|
416
|
+
placeholder: {
|
|
417
|
+
classPropertyName: "placeholder",
|
|
418
|
+
publicName: "placeholder",
|
|
419
|
+
isSignal: false,
|
|
420
|
+
isRequired: false,
|
|
421
|
+
transformFunction: null
|
|
422
|
+
},
|
|
423
|
+
required: {
|
|
424
|
+
classPropertyName: "required",
|
|
425
|
+
publicName: "required",
|
|
426
|
+
isSignal: false,
|
|
427
|
+
isRequired: false,
|
|
428
|
+
transformFunction: null
|
|
429
|
+
},
|
|
430
|
+
disabled: {
|
|
431
|
+
classPropertyName: "disabled",
|
|
432
|
+
publicName: "disabled",
|
|
433
|
+
isSignal: false,
|
|
434
|
+
isRequired: false,
|
|
435
|
+
transformFunction: null
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
outputs: { valueChange: "valueChange" },
|
|
439
|
+
host: {
|
|
440
|
+
listeners: {
|
|
441
|
+
"keydown": "onKeyDown($event)",
|
|
442
|
+
"mousedown": "onMouseDown($event)",
|
|
443
|
+
"mouseup": "onMouseUp($event)",
|
|
444
|
+
"touchstart": "onTouchStart($event)",
|
|
445
|
+
"touchend": "onTouchEnd($event)"
|
|
446
|
+
},
|
|
447
|
+
properties: { "attr.id": "id" }
|
|
448
|
+
},
|
|
449
|
+
providers: [{
|
|
450
|
+
provide: MatFormFieldControl,
|
|
451
|
+
useExisting: CmatKnobInputComponent
|
|
452
|
+
}],
|
|
453
|
+
viewQueries: [{
|
|
454
|
+
propertyName: "knobElementRef",
|
|
455
|
+
first: true,
|
|
456
|
+
predicate: ["knob"],
|
|
457
|
+
descendants: true,
|
|
458
|
+
isSignal: true
|
|
459
|
+
}],
|
|
460
|
+
exportAs: ["cmatKnobInput"],
|
|
461
|
+
ngImport: i0,
|
|
462
|
+
template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<div\r\n #knob\r\n tabindex=\"-1\"\r\n [attr.data-refresh]=\"refreshVersion()\"\r\n [class.cmat-knob-disabled]=\"disabled\"\r\n (focusin)=\"onFocusIn()\"\r\n (focusout)=\"onFocusOut($event)\"\r\n>\r\n <svg\r\n viewBox=\"0 0 100 100\"\r\n role=\"slider\"\r\n [style.width]=\"size() + 'px'\"\r\n [style.height]=\"size() + 'px'\"\r\n [attr.aria-valuemin]=\"min()\"\r\n [attr.aria-valuemax]=\"max()\"\r\n [attr.aria-valuenow]=\"value\"\r\n [attr.tabindex]=\"disabled ? -1 : 0\"\r\n (click)=\"onClick($event)\"\r\n (keydown.enter)=\"onKeyDown($event)\"\r\n (keydown.space)=\"onKeyDown($event)\"\r\n >\r\n <path\r\n class=\"knob-range\"\r\n [attr.d]=\"rangePath()\"\r\n [attr.stroke-width]=\"strokeWidth()\"\r\n [attr.stroke]=\"rangeColor()\"\r\n ></path>\r\n <path\r\n class=\"knob-value\"\r\n [attr.d]=\"valuePath()\"\r\n [attr.stroke-width]=\"strokeWidth()\"\r\n [attr.stroke]=\"valueColor()\"\r\n ></path>\r\n @if (showValue()) {\r\n <text\r\n text-anchor=\"middle\"\r\n class=\"knob-text\"\r\n [attr.x]=\"50\"\r\n [attr.y]=\"57\"\r\n [attr.fill]=\"textColor()\"\r\n [attr.name]=\"name()\"\r\n >\r\n {{ valueToDisplay() }}\r\n </text>\r\n }\r\n </svg>\r\n</div>",
|
|
463
|
+
styles: ["cmat-knob-input .knob-range{fill:none;transition:stroke .1s ease-in}cmat-knob-input .knob-value{animation-name:dash-frame;animation-fill-mode:forwards;fill:none}cmat-knob-input .knob-text{font-size:1.3rem;text-align:center}cmat-knob-input .cmat-knob-disabled{opacity:.6}\n"],
|
|
464
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
465
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
};
|
|
469
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
470
|
+
minVersion: "12.0.0",
|
|
471
|
+
version: "22.2.3",
|
|
472
|
+
ngImport: i0,
|
|
473
|
+
type: CmatKnobInputComponent,
|
|
474
|
+
decorators: [{
|
|
475
|
+
type: Component,
|
|
476
|
+
args: [{
|
|
477
|
+
selector: "cmat-knob-input",
|
|
478
|
+
providers: [{
|
|
479
|
+
provide: MatFormFieldControl,
|
|
480
|
+
useExisting: CmatKnobInputComponent
|
|
481
|
+
}],
|
|
482
|
+
exportAs: "cmatKnobInput",
|
|
483
|
+
imports: [NgStyle],
|
|
484
|
+
encapsulation: ViewEncapsulation.None,
|
|
485
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
486
|
+
host: { "[attr.id]": "id" },
|
|
487
|
+
template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<div\r\n #knob\r\n tabindex=\"-1\"\r\n [attr.data-refresh]=\"refreshVersion()\"\r\n [class.cmat-knob-disabled]=\"disabled\"\r\n (focusin)=\"onFocusIn()\"\r\n (focusout)=\"onFocusOut($event)\"\r\n>\r\n <svg\r\n viewBox=\"0 0 100 100\"\r\n role=\"slider\"\r\n [style.width]=\"size() + 'px'\"\r\n [style.height]=\"size() + 'px'\"\r\n [attr.aria-valuemin]=\"min()\"\r\n [attr.aria-valuemax]=\"max()\"\r\n [attr.aria-valuenow]=\"value\"\r\n [attr.tabindex]=\"disabled ? -1 : 0\"\r\n (click)=\"onClick($event)\"\r\n (keydown.enter)=\"onKeyDown($event)\"\r\n (keydown.space)=\"onKeyDown($event)\"\r\n >\r\n <path\r\n class=\"knob-range\"\r\n [attr.d]=\"rangePath()\"\r\n [attr.stroke-width]=\"strokeWidth()\"\r\n [attr.stroke]=\"rangeColor()\"\r\n ></path>\r\n <path\r\n class=\"knob-value\"\r\n [attr.d]=\"valuePath()\"\r\n [attr.stroke-width]=\"strokeWidth()\"\r\n [attr.stroke]=\"valueColor()\"\r\n ></path>\r\n @if (showValue()) {\r\n <text\r\n text-anchor=\"middle\"\r\n class=\"knob-text\"\r\n [attr.x]=\"50\"\r\n [attr.y]=\"57\"\r\n [attr.fill]=\"textColor()\"\r\n [attr.name]=\"name()\"\r\n >\r\n {{ valueToDisplay() }}\r\n </text>\r\n }\r\n </svg>\r\n</div>",
|
|
488
|
+
styles: ["cmat-knob-input .knob-range{fill:none;transition:stroke .1s ease-in}cmat-knob-input .knob-value{animation-name:dash-frame;animation-fill-mode:forwards;fill:none}cmat-knob-input .knob-text{font-size:1.3rem;text-align:center}cmat-knob-input .cmat-knob-disabled{opacity:.6}\n"]
|
|
489
|
+
}]
|
|
490
|
+
}],
|
|
491
|
+
ctorParameters: () => [],
|
|
492
|
+
propDecorators: {
|
|
493
|
+
knobElementRef: [{
|
|
494
|
+
type: i0.ViewChild,
|
|
495
|
+
args: ["knob", { isSignal: true }]
|
|
496
|
+
}],
|
|
497
|
+
valueColor: [{
|
|
498
|
+
type: i0.Input,
|
|
499
|
+
args: [{
|
|
500
|
+
isSignal: true,
|
|
501
|
+
alias: "valueColor",
|
|
502
|
+
required: false
|
|
503
|
+
}]
|
|
504
|
+
}],
|
|
505
|
+
rangeColor: [{
|
|
506
|
+
type: i0.Input,
|
|
507
|
+
args: [{
|
|
508
|
+
isSignal: true,
|
|
509
|
+
alias: "rangeColor",
|
|
510
|
+
required: false
|
|
511
|
+
}]
|
|
512
|
+
}],
|
|
513
|
+
textColor: [{
|
|
514
|
+
type: i0.Input,
|
|
515
|
+
args: [{
|
|
516
|
+
isSignal: true,
|
|
517
|
+
alias: "textColor",
|
|
518
|
+
required: false
|
|
519
|
+
}]
|
|
520
|
+
}],
|
|
521
|
+
valueTemplate: [{
|
|
522
|
+
type: i0.Input,
|
|
523
|
+
args: [{
|
|
524
|
+
isSignal: true,
|
|
525
|
+
alias: "valueTemplate",
|
|
526
|
+
required: false
|
|
527
|
+
}]
|
|
528
|
+
}],
|
|
529
|
+
name: [{
|
|
530
|
+
type: i0.Input,
|
|
531
|
+
args: [{
|
|
532
|
+
isSignal: true,
|
|
533
|
+
alias: "name",
|
|
534
|
+
required: false
|
|
535
|
+
}]
|
|
536
|
+
}],
|
|
537
|
+
size: [{
|
|
538
|
+
type: i0.Input,
|
|
539
|
+
args: [{
|
|
540
|
+
isSignal: true,
|
|
541
|
+
alias: "size",
|
|
542
|
+
required: false
|
|
543
|
+
}]
|
|
544
|
+
}],
|
|
545
|
+
step: [{
|
|
546
|
+
type: i0.Input,
|
|
547
|
+
args: [{
|
|
548
|
+
isSignal: true,
|
|
549
|
+
alias: "step",
|
|
550
|
+
required: false
|
|
551
|
+
}]
|
|
552
|
+
}],
|
|
553
|
+
min: [{
|
|
554
|
+
type: i0.Input,
|
|
555
|
+
args: [{
|
|
556
|
+
isSignal: true,
|
|
557
|
+
alias: "min",
|
|
558
|
+
required: false
|
|
559
|
+
}]
|
|
560
|
+
}],
|
|
561
|
+
max: [{
|
|
562
|
+
type: i0.Input,
|
|
563
|
+
args: [{
|
|
564
|
+
isSignal: true,
|
|
565
|
+
alias: "max",
|
|
566
|
+
required: false
|
|
567
|
+
}]
|
|
568
|
+
}],
|
|
569
|
+
strokeWidth: [{
|
|
570
|
+
type: i0.Input,
|
|
571
|
+
args: [{
|
|
572
|
+
isSignal: true,
|
|
573
|
+
alias: "strokeWidth",
|
|
574
|
+
required: false
|
|
575
|
+
}]
|
|
576
|
+
}],
|
|
577
|
+
showValue: [{
|
|
578
|
+
type: i0.Input,
|
|
579
|
+
args: [{
|
|
580
|
+
isSignal: true,
|
|
581
|
+
alias: "showValue",
|
|
582
|
+
required: false
|
|
583
|
+
}]
|
|
584
|
+
}],
|
|
585
|
+
valueChange: [{
|
|
586
|
+
type: i0.Output,
|
|
587
|
+
args: ["valueChange"]
|
|
588
|
+
}],
|
|
589
|
+
value: [{ type: Input }],
|
|
590
|
+
placeholder: [{ type: Input }],
|
|
591
|
+
required: [{ type: Input }],
|
|
592
|
+
disabled: [{ type: Input }],
|
|
593
|
+
onKeyDown: [{
|
|
594
|
+
type: HostListener,
|
|
595
|
+
args: ["keydown", ["$event"]]
|
|
596
|
+
}],
|
|
597
|
+
onMouseDown: [{
|
|
598
|
+
type: HostListener,
|
|
599
|
+
args: ["mousedown", ["$event"]]
|
|
600
|
+
}],
|
|
601
|
+
onMouseUp: [{
|
|
602
|
+
type: HostListener,
|
|
603
|
+
args: ["mouseup", ["$event"]]
|
|
604
|
+
}],
|
|
605
|
+
onTouchStart: [{
|
|
606
|
+
type: HostListener,
|
|
607
|
+
args: ["touchstart", ["$event"]]
|
|
608
|
+
}],
|
|
609
|
+
onTouchEnd: [{
|
|
610
|
+
type: HostListener,
|
|
611
|
+
args: ["touchend", ["$event"]]
|
|
612
|
+
}]
|
|
613
|
+
}
|
|
614
|
+
});
|
|
421
615
|
export { CmatKnobInputComponent };
|
|
422
|
-
|
|
616
|
+
|
|
617
|
+
//# sourceMappingURL=cmat-components-knob-input.mjs.map
|