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,308 +1,462 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { MatMiniFabButton } from
|
|
4
|
-
import {
|
|
5
|
-
import { take } from
|
|
6
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, ElementRef, HostListener, Renderer2, ViewEncapsulation, computed, contentChild, contentChildren, effect, inject, input, output, signal, untracked } from "@angular/core";
|
|
3
|
+
import { MatMiniFabButton } from "@angular/material/button";
|
|
4
|
+
import { forkJoin, fromEvent } from "rxjs";
|
|
5
|
+
import { take } from "rxjs/operators";
|
|
7
6
|
const Z_INDEX_ITEM = 23;
|
|
8
7
|
function getHostElement(button) {
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
class CmatSpeedDialActionsComponent {
|
|
12
|
-
constructor() {
|
|
13
|
-
this.miniFabVisible = signal(false, /* @ts-ignore */
|
|
14
|
-
...(ngDevMode ? [{ debugName: "miniFabVisible" }] : /* istanbul ignore next */ []));
|
|
15
|
-
this._buttons = contentChildren(MatMiniFabButton, /* @ts-ignore */
|
|
16
|
-
...(ngDevMode ? [{ debugName: "_buttons" }] : /* istanbul ignore next */ []));
|
|
17
|
-
this._renderer = inject(Renderer2);
|
|
18
|
-
this._parent = inject(CmatSpeedDialComponent);
|
|
19
|
-
this._showMiniFabAnimation = null;
|
|
20
|
-
this._hideMiniFab = null;
|
|
21
|
-
this._hideTimeoutId = null;
|
|
22
|
-
effect(() => {
|
|
23
|
-
const buttons = this._buttons();
|
|
24
|
-
untracked(() => {
|
|
25
|
-
if (buttons.length > 0) {
|
|
26
|
-
this._initButtonStates();
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
ngAfterContentInit() {
|
|
32
|
-
this._parent.setActionsVisibility();
|
|
33
|
-
}
|
|
34
|
-
show() {
|
|
35
|
-
this._resetAnimationState();
|
|
36
|
-
this._clearHideTimeout();
|
|
37
|
-
this.miniFabVisible.set(true);
|
|
38
|
-
this._showMiniFabAnimation = window.setTimeout(() => {
|
|
39
|
-
this._showMiniFabAnimation = null;
|
|
40
|
-
const buttons = this._buttons();
|
|
41
|
-
buttons.forEach((button, i) => {
|
|
42
|
-
let transitionDelay = 0;
|
|
43
|
-
let transform;
|
|
44
|
-
if (this._parent.animationMode() === 'scale') {
|
|
45
|
-
transitionDelay = 3 + 65 * i;
|
|
46
|
-
transform = 'scale(1)';
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
transform = this._getTranslateFunction('0');
|
|
50
|
-
}
|
|
51
|
-
const hostElement = getHostElement(button);
|
|
52
|
-
this._changeElementStyle(hostElement, 'transition-delay', transitionDelay.toString() + 'ms');
|
|
53
|
-
this._changeElementStyle(hostElement, 'opacity', '1');
|
|
54
|
-
this._changeElementStyle(hostElement, 'transform', transform);
|
|
55
|
-
});
|
|
56
|
-
}, 50);
|
|
57
|
-
}
|
|
58
|
-
hide() {
|
|
59
|
-
this._resetAnimationState();
|
|
60
|
-
this._clearHideTimeout();
|
|
61
|
-
const buttons = this._buttons();
|
|
62
|
-
if (buttons.length === 0) {
|
|
63
|
-
this.miniFabVisible.set(false);
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
const obs = buttons.map((button, i) => {
|
|
67
|
-
let opacity = '1';
|
|
68
|
-
let transitionDelay = 0;
|
|
69
|
-
let transform;
|
|
70
|
-
if (this._parent.animationMode() === 'scale') {
|
|
71
|
-
transitionDelay = 3 - 65 * i;
|
|
72
|
-
transform = 'scale(0)';
|
|
73
|
-
opacity = '0';
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
transform = this._getTranslateFunction((55 * (i + 1) - i * 5).toString() + 'px');
|
|
77
|
-
}
|
|
78
|
-
const hostElement = getHostElement(button);
|
|
79
|
-
this._changeElementStyle(hostElement, 'transition-delay', transitionDelay.toString() + 'ms');
|
|
80
|
-
this._changeElementStyle(hostElement, 'opacity', opacity);
|
|
81
|
-
this._changeElementStyle(hostElement, 'transform', transform);
|
|
82
|
-
return fromEvent(hostElement, 'transitionend').pipe(take(1));
|
|
83
|
-
});
|
|
84
|
-
this._hideMiniFab = forkJoin(obs).subscribe(() => {
|
|
85
|
-
this._clearHideTimeout();
|
|
86
|
-
this.miniFabVisible.set(false);
|
|
87
|
-
});
|
|
88
|
-
this._hideTimeoutId = window.setTimeout(() => {
|
|
89
|
-
this._hideTimeoutId = null;
|
|
90
|
-
if (this._hideMiniFab) {
|
|
91
|
-
this._hideMiniFab.unsubscribe();
|
|
92
|
-
this._hideMiniFab = null;
|
|
93
|
-
}
|
|
94
|
-
this.miniFabVisible.set(false);
|
|
95
|
-
}, 500);
|
|
96
|
-
}
|
|
97
|
-
_initButtonStates() {
|
|
98
|
-
const buttons = this._buttons();
|
|
99
|
-
buttons.forEach((button, i) => {
|
|
100
|
-
this._renderer.addClass(getHostElement(button), 'cmat-action-item');
|
|
101
|
-
this._changeElementStyle(getHostElement(button), 'z-index', '' + (Z_INDEX_ITEM - i).toString());
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
_resetAnimationState() {
|
|
105
|
-
if (this._showMiniFabAnimation !== null) {
|
|
106
|
-
clearTimeout(this._showMiniFabAnimation);
|
|
107
|
-
this._showMiniFabAnimation = null;
|
|
108
|
-
}
|
|
109
|
-
if (this._hideMiniFab) {
|
|
110
|
-
this._hideMiniFab.unsubscribe();
|
|
111
|
-
this._hideMiniFab = null;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
_clearHideTimeout() {
|
|
115
|
-
if (this._hideTimeoutId !== null) {
|
|
116
|
-
clearTimeout(this._hideTimeoutId);
|
|
117
|
-
this._hideTimeoutId = null;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
_getTranslateFunction(value) {
|
|
121
|
-
const dir = this._parent.direction();
|
|
122
|
-
const translateFn = dir === 'up' || dir === 'down' ? 'translateY' : 'translateX';
|
|
123
|
-
const sign = dir === 'down' || dir === 'right' ? '-' : '';
|
|
124
|
-
return translateFn + '(' + sign + value + ')';
|
|
125
|
-
}
|
|
126
|
-
_changeElementStyle(elem, style, value) {
|
|
127
|
-
this._renderer.setStyle(elem, style, value);
|
|
128
|
-
}
|
|
129
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatSpeedDialActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
130
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.0", type: CmatSpeedDialActionsComponent, isStandalone: true, selector: "cmat-speed-dial-actions", queries: [{ propertyName: "_buttons", predicate: MatMiniFabButton, isSignal: true }], ngImport: i0, template: `@if (miniFabVisible()) {
|
|
131
|
-
<ng-content select="[matFab], [matButton], [matIconButton], [matMiniFab]" />
|
|
132
|
-
}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
8
|
+
return button._elementRef.nativeElement;
|
|
133
9
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
10
|
+
var CmatSpeedDialActionsComponent = class CmatSpeedDialActionsComponent {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.miniFabVisible = signal(false, ...ngDevMode ? [{ debugName: "miniFabVisible" }] : /* istanbul ignore next */ []);
|
|
13
|
+
this._buttons = contentChildren(MatMiniFabButton, ...ngDevMode ? [{ debugName: "_buttons" }] : /* istanbul ignore next */ []);
|
|
14
|
+
this._renderer = inject(Renderer2);
|
|
15
|
+
this._parent = inject(CmatSpeedDialComponent);
|
|
16
|
+
this._showMiniFabAnimation = null;
|
|
17
|
+
this._hideMiniFab = null;
|
|
18
|
+
this._hideTimeoutId = null;
|
|
19
|
+
effect(() => {
|
|
20
|
+
const buttons = this._buttons();
|
|
21
|
+
untracked(() => {
|
|
22
|
+
if (buttons.length > 0) this._initButtonStates();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
ngAfterContentInit() {
|
|
27
|
+
this._parent.setActionsVisibility();
|
|
28
|
+
}
|
|
29
|
+
show() {
|
|
30
|
+
this._resetAnimationState();
|
|
31
|
+
this._clearHideTimeout();
|
|
32
|
+
this.miniFabVisible.set(true);
|
|
33
|
+
this._showMiniFabAnimation = window.setTimeout(() => {
|
|
34
|
+
this._showMiniFabAnimation = null;
|
|
35
|
+
this._buttons().forEach((button, i) => {
|
|
36
|
+
let transitionDelay = 0;
|
|
37
|
+
let transform;
|
|
38
|
+
if (this._parent.animationMode() === "scale") {
|
|
39
|
+
transitionDelay = 3 + 65 * i;
|
|
40
|
+
transform = "scale(1)";
|
|
41
|
+
} else transform = this._getTranslateFunction("0");
|
|
42
|
+
const hostElement = getHostElement(button);
|
|
43
|
+
this._changeElementStyle(hostElement, "transition-delay", transitionDelay.toString() + "ms");
|
|
44
|
+
this._changeElementStyle(hostElement, "opacity", "1");
|
|
45
|
+
this._changeElementStyle(hostElement, "transform", transform);
|
|
46
|
+
});
|
|
47
|
+
}, 50);
|
|
48
|
+
}
|
|
49
|
+
hide() {
|
|
50
|
+
this._resetAnimationState();
|
|
51
|
+
this._clearHideTimeout();
|
|
52
|
+
const buttons = this._buttons();
|
|
53
|
+
if (buttons.length === 0) {
|
|
54
|
+
this.miniFabVisible.set(false);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const obs = buttons.map((button, i) => {
|
|
58
|
+
let opacity = "1";
|
|
59
|
+
let transitionDelay = 0;
|
|
60
|
+
let transform;
|
|
61
|
+
if (this._parent.animationMode() === "scale") {
|
|
62
|
+
transitionDelay = 3 - 65 * i;
|
|
63
|
+
transform = "scale(0)";
|
|
64
|
+
opacity = "0";
|
|
65
|
+
} else transform = this._getTranslateFunction((55 * (i + 1) - i * 5).toString() + "px");
|
|
66
|
+
const hostElement = getHostElement(button);
|
|
67
|
+
this._changeElementStyle(hostElement, "transition-delay", transitionDelay.toString() + "ms");
|
|
68
|
+
this._changeElementStyle(hostElement, "opacity", opacity);
|
|
69
|
+
this._changeElementStyle(hostElement, "transform", transform);
|
|
70
|
+
return fromEvent(hostElement, "transitionend").pipe(take(1));
|
|
71
|
+
});
|
|
72
|
+
this._hideMiniFab = forkJoin(obs).subscribe(() => {
|
|
73
|
+
this._clearHideTimeout();
|
|
74
|
+
this.miniFabVisible.set(false);
|
|
75
|
+
});
|
|
76
|
+
this._hideTimeoutId = window.setTimeout(() => {
|
|
77
|
+
this._hideTimeoutId = null;
|
|
78
|
+
if (this._hideMiniFab) {
|
|
79
|
+
this._hideMiniFab.unsubscribe();
|
|
80
|
+
this._hideMiniFab = null;
|
|
81
|
+
}
|
|
82
|
+
this.miniFabVisible.set(false);
|
|
83
|
+
}, 500);
|
|
84
|
+
}
|
|
85
|
+
_initButtonStates() {
|
|
86
|
+
this._buttons().forEach((button, i) => {
|
|
87
|
+
this._renderer.addClass(getHostElement(button), "cmat-action-item");
|
|
88
|
+
this._changeElementStyle(getHostElement(button), "z-index", "" + (Z_INDEX_ITEM - i).toString());
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
_resetAnimationState() {
|
|
92
|
+
if (this._showMiniFabAnimation !== null) {
|
|
93
|
+
clearTimeout(this._showMiniFabAnimation);
|
|
94
|
+
this._showMiniFabAnimation = null;
|
|
95
|
+
}
|
|
96
|
+
if (this._hideMiniFab) {
|
|
97
|
+
this._hideMiniFab.unsubscribe();
|
|
98
|
+
this._hideMiniFab = null;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
_clearHideTimeout() {
|
|
102
|
+
if (this._hideTimeoutId !== null) {
|
|
103
|
+
clearTimeout(this._hideTimeoutId);
|
|
104
|
+
this._hideTimeoutId = null;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
_getTranslateFunction(value) {
|
|
108
|
+
const dir = this._parent.direction();
|
|
109
|
+
const translateFn = dir === "up" || dir === "down" ? "translateY" : "translateX";
|
|
110
|
+
const sign = dir === "down" || dir === "right" ? "-" : "";
|
|
111
|
+
return translateFn + "(" + sign + value + ")";
|
|
112
|
+
}
|
|
113
|
+
_changeElementStyle(elem, style, value) {
|
|
114
|
+
this._renderer.setStyle(elem, style, value);
|
|
115
|
+
}
|
|
116
|
+
static {
|
|
117
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
118
|
+
minVersion: "12.0.0",
|
|
119
|
+
version: "22.2.3",
|
|
120
|
+
ngImport: i0,
|
|
121
|
+
type: CmatSpeedDialActionsComponent,
|
|
122
|
+
deps: [],
|
|
123
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
static {
|
|
127
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
128
|
+
minVersion: "17.0.0",
|
|
129
|
+
version: "22.2.3",
|
|
130
|
+
type: CmatSpeedDialActionsComponent,
|
|
131
|
+
isStandalone: true,
|
|
132
|
+
selector: "cmat-speed-dial-actions",
|
|
133
|
+
queries: [{
|
|
134
|
+
propertyName: "_buttons",
|
|
135
|
+
predicate: MatMiniFabButton,
|
|
136
|
+
isSignal: true
|
|
137
|
+
}],
|
|
138
|
+
ngImport: i0,
|
|
139
|
+
template: `@if (miniFabVisible()) {
|
|
140
|
+
<ng-content select="[matFab], [matButton], [matIconButton], [matMiniFab]" />
|
|
140
141
|
}`,
|
|
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
|
-
|
|
142
|
+
isInline: true,
|
|
143
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
144
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
149
|
+
minVersion: "12.0.0",
|
|
150
|
+
version: "22.2.3",
|
|
151
|
+
ngImport: i0,
|
|
152
|
+
type: CmatSpeedDialActionsComponent,
|
|
153
|
+
decorators: [{
|
|
154
|
+
type: Component,
|
|
155
|
+
args: [{
|
|
156
|
+
selector: "cmat-speed-dial-actions",
|
|
157
|
+
template: `@if (miniFabVisible()) {
|
|
158
|
+
<ng-content select="[matFab], [matButton], [matIconButton], [matMiniFab]" />
|
|
159
|
+
}`,
|
|
160
|
+
encapsulation: ViewEncapsulation.None,
|
|
161
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
162
|
+
}]
|
|
163
|
+
}],
|
|
164
|
+
ctorParameters: () => [],
|
|
165
|
+
propDecorators: { _buttons: [{
|
|
166
|
+
type: i0.ContentChildren,
|
|
167
|
+
args: [i0.forwardRef(() => MatMiniFabButton), { isSignal: true }]
|
|
168
|
+
}] }
|
|
169
|
+
});
|
|
170
|
+
var CmatSpeedDialComponent = class CmatSpeedDialComponent {
|
|
171
|
+
constructor() {
|
|
172
|
+
this.openChange = output();
|
|
173
|
+
this.fixed = input(false, ...ngDevMode ? [{ debugName: "fixed" }] : /* istanbul ignore next */ []);
|
|
174
|
+
this.direction = input("up", ...ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []);
|
|
175
|
+
this.animationMode = input("fling", ...ngDevMode ? [{ debugName: "animationMode" }] : /* istanbul ignore next */ []);
|
|
176
|
+
this.open = input(false, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
|
|
177
|
+
this.dialOpened = computed(() => this._open(), ...ngDevMode ? [{ debugName: "dialOpened" }] : /* istanbul ignore next */ []);
|
|
178
|
+
this._childActions = contentChild.required(CmatSpeedDialActionsComponent, ...ngDevMode ? [{ debugName: "_childActions" }] : /* istanbul ignore next */ []);
|
|
179
|
+
this._elementRef = inject(ElementRef);
|
|
180
|
+
this._renderer = inject(Renderer2);
|
|
181
|
+
this._document = inject(DOCUMENT);
|
|
182
|
+
this._destroyRef = inject(DestroyRef);
|
|
183
|
+
this._isInitialized = false;
|
|
184
|
+
this._documentClickUnlistener = null;
|
|
185
|
+
this._openChangeTimeoutId = null;
|
|
186
|
+
this._open = signal(false, ...ngDevMode ? [{ debugName: "_open" }] : /* istanbul ignore next */ []);
|
|
187
|
+
effect(() => {
|
|
188
|
+
const externalOpen = this.open();
|
|
189
|
+
setTimeout(() => {
|
|
190
|
+
if (untracked(() => this._open()) !== externalOpen) {
|
|
191
|
+
this._open.set(externalOpen);
|
|
192
|
+
if (this._isInitialized) untracked(() => this.setActionsVisibility());
|
|
193
|
+
}
|
|
194
|
+
}, 200);
|
|
195
|
+
});
|
|
196
|
+
this._destroyRef.onDestroy(() => {
|
|
197
|
+
this._unsetDocumentClickListener();
|
|
198
|
+
if (this._openChangeTimeoutId !== null) {
|
|
199
|
+
clearTimeout(this._openChangeTimeoutId);
|
|
200
|
+
this._openChangeTimeoutId = null;
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
ngAfterContentInit() {
|
|
205
|
+
this._isInitialized = true;
|
|
206
|
+
this._setElementClass(this.direction(), true);
|
|
207
|
+
this._setElementClass(this.animationMode(), true);
|
|
208
|
+
}
|
|
209
|
+
toggle() {
|
|
210
|
+
this._open.update((v) => !v);
|
|
211
|
+
this.setActionsVisibility();
|
|
212
|
+
this.emitOpenChange();
|
|
213
|
+
}
|
|
214
|
+
setActionsVisibility() {
|
|
215
|
+
if (this._open()) this._childActions().show();
|
|
216
|
+
else this._childActions().hide();
|
|
217
|
+
this._processOutsideClickState();
|
|
218
|
+
}
|
|
219
|
+
emitOpenChange() {
|
|
220
|
+
if (this._openChangeTimeoutId !== null) clearTimeout(this._openChangeTimeoutId);
|
|
221
|
+
this._openChangeTimeoutId = window.setTimeout(() => {
|
|
222
|
+
this._openChangeTimeoutId = null;
|
|
223
|
+
this.openChange.emit(this._open());
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
_setElementClass(elemClass, isAdd) {
|
|
227
|
+
const finalClass = `dial-${elemClass}`;
|
|
228
|
+
if (isAdd) this._renderer.addClass(this._elementRef.nativeElement, finalClass);
|
|
229
|
+
else this._renderer.removeClass(this._elementRef.nativeElement, finalClass);
|
|
230
|
+
}
|
|
231
|
+
_processOutsideClickState() {
|
|
232
|
+
if (!this.fixed() && this._open()) this._setDocumentClickListener();
|
|
233
|
+
else this._unsetDocumentClickListener();
|
|
234
|
+
}
|
|
235
|
+
_setDocumentClickListener() {
|
|
236
|
+
this._documentClickUnlistener ??= this._renderer.listen(this._document, "click", () => {
|
|
237
|
+
this._open.set(false);
|
|
238
|
+
this.setActionsVisibility();
|
|
239
|
+
this.emitOpenChange();
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
_unsetDocumentClickListener() {
|
|
243
|
+
if (this._documentClickUnlistener) {
|
|
244
|
+
this._documentClickUnlistener();
|
|
245
|
+
this._documentClickUnlistener = null;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
static {
|
|
249
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
250
|
+
minVersion: "12.0.0",
|
|
251
|
+
version: "22.2.3",
|
|
252
|
+
ngImport: i0,
|
|
253
|
+
type: CmatSpeedDialComponent,
|
|
254
|
+
deps: [],
|
|
255
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
static {
|
|
259
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
260
|
+
minVersion: "17.2.0",
|
|
261
|
+
version: "22.2.3",
|
|
262
|
+
type: CmatSpeedDialComponent,
|
|
263
|
+
isStandalone: true,
|
|
264
|
+
selector: "cmat-speed-dial",
|
|
265
|
+
inputs: {
|
|
266
|
+
fixed: {
|
|
267
|
+
classPropertyName: "fixed",
|
|
268
|
+
publicName: "fixed",
|
|
269
|
+
isSignal: true,
|
|
270
|
+
isRequired: false,
|
|
271
|
+
transformFunction: null
|
|
272
|
+
},
|
|
273
|
+
direction: {
|
|
274
|
+
classPropertyName: "direction",
|
|
275
|
+
publicName: "direction",
|
|
276
|
+
isSignal: true,
|
|
277
|
+
isRequired: false,
|
|
278
|
+
transformFunction: null
|
|
279
|
+
},
|
|
280
|
+
animationMode: {
|
|
281
|
+
classPropertyName: "animationMode",
|
|
282
|
+
publicName: "animationMode",
|
|
283
|
+
isSignal: true,
|
|
284
|
+
isRequired: false,
|
|
285
|
+
transformFunction: null
|
|
286
|
+
},
|
|
287
|
+
open: {
|
|
288
|
+
classPropertyName: "open",
|
|
289
|
+
publicName: "open",
|
|
290
|
+
isSignal: true,
|
|
291
|
+
isRequired: false,
|
|
292
|
+
transformFunction: null
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
outputs: { openChange: "openChange" },
|
|
296
|
+
host: { properties: { "class.dial-opened": "dialOpened()" } },
|
|
297
|
+
queries: [{
|
|
298
|
+
propertyName: "_childActions",
|
|
299
|
+
first: true,
|
|
300
|
+
predicate: CmatSpeedDialActionsComponent,
|
|
301
|
+
descendants: true,
|
|
302
|
+
isSignal: true
|
|
303
|
+
}],
|
|
304
|
+
ngImport: i0,
|
|
305
|
+
template: `
|
|
306
|
+
<div class="cmat-speed-dial-container">
|
|
307
|
+
<ng-content select="cmat-speed-dial-trigger" />
|
|
308
|
+
<ng-content select="cmat-speed-dial-actions" />
|
|
309
|
+
</div>
|
|
310
|
+
`,
|
|
311
|
+
isInline: true,
|
|
312
|
+
styles: ["cmat-speed-dial{display:inline-block}cmat-speed-dial.dial-opened .cmat-speed-dial-container cmat-speed-dial-trigger.dial-spin .spin180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}cmat-speed-dial.dial-opened .cmat-speed-dial-container cmat-speed-dial-trigger.dial-spin .spin360{-webkit-transform:rotate(360deg);transform:rotate(360deg)}cmat-speed-dial .cmat-speed-dial-container{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;z-index:20}cmat-speed-dial .cmat-speed-dial-container cmat-speed-dial-trigger{pointer-events:auto;z-index:24}cmat-speed-dial .cmat-speed-dial-container cmat-speed-dial-trigger.dial-spin .spin180,cmat-speed-dial .cmat-speed-dial-container cmat-speed-dial-trigger.dial-spin .spin360{-webkit-transition:all .6s cubic-bezier(.4,0,.2,1);transition:all .6s cubic-bezier(.4,0,.2,1)}cmat-speed-dial .cmat-speed-dial-container cmat-speed-dial-actions{display:-webkit-box;display:-webkit-flex;display:flex;position:absolute;height:0;width:0}cmat-speed-dial.dial-fling .cmat-speed-dial-container cmat-speed-dial-actions .cmat-action-item{display:block;opacity:1;-webkit-transition:all .3s cubic-bezier(.55,0,.55,.2);transition:all .3s cubic-bezier(.55,0,.55,.2)}cmat-speed-dial.dial-scale .cmat-speed-dial-container cmat-speed-dial-actions .cmat-action-item{-webkit-transform:scale(0);transform:scale(0);-webkit-transition:all .3s cubic-bezier(.55,0,.55,.2);transition:all .3s cubic-bezier(.55,0,.55,.2);-webkit-transition-duration:.14286s;transition-duration:.14286s}cmat-speed-dial.dial-down cmat-speed-dial-actions{bottom:2px;left:0}cmat-speed-dial.dial-down .cmat-speed-dial-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}cmat-speed-dial.dial-down .cmat-speed-dial-container cmat-speed-dial-trigger{-webkit-box-ordinal-group:2;-webkit-order:1;order:1}cmat-speed-dial.dial-down .cmat-speed-dial-container cmat-speed-dial-actions{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-ordinal-group:3;-webkit-order:2;order:2}cmat-speed-dial.dial-down .cmat-speed-dial-container cmat-speed-dial-actions .cmat-action-item{margin-top:10px}cmat-speed-dial.dial-up cmat-speed-dial-actions{top:2px;left:0}cmat-speed-dial.dial-up .cmat-speed-dial-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}cmat-speed-dial.dial-up .cmat-speed-dial-container cmat-speed-dial-trigger{-webkit-box-ordinal-group:3;-webkit-order:2;order:2}cmat-speed-dial.dial-up .cmat-speed-dial-container cmat-speed-dial-actions{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-webkit-flex-direction:column-reverse;flex-direction:column-reverse;-webkit-box-ordinal-group:2;-webkit-order:1;order:1}cmat-speed-dial.dial-up .cmat-speed-dial-container cmat-speed-dial-actions .cmat-action-item{margin-bottom:10px}cmat-speed-dial.dial-left cmat-speed-dial-actions{top:0;left:2px}cmat-speed-dial.dial-left .cmat-speed-dial-container{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row}cmat-speed-dial.dial-left .cmat-speed-dial-container cmat-speed-dial-trigger{-webkit-box-ordinal-group:3;-webkit-order:2;order:2}cmat-speed-dial.dial-left .cmat-speed-dial-container cmat-speed-dial-actions{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;-webkit-box-ordinal-group:2;-webkit-order:1;order:1}cmat-speed-dial.dial-left .cmat-speed-dial-container cmat-speed-dial-actions .cmat-action-item{margin-right:10px}cmat-speed-dial.dial-right cmat-speed-dial-actions{top:0;right:2px}cmat-speed-dial.dial-right .cmat-speed-dial-container{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row}cmat-speed-dial.dial-right .cmat-speed-dial-container cmat-speed-dial-trigger{-webkit-box-ordinal-group:2;-webkit-order:1;order:1}cmat-speed-dial.dial-right .cmat-speed-dial-container cmat-speed-dial-actions{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-webkit-box-ordinal-group:3;-webkit-order:2;order:2}cmat-speed-dial.dial-right .cmat-speed-dial-container cmat-speed-dial-actions .cmat-action-item{margin-left:10px}\n"],
|
|
313
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
314
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
319
|
+
minVersion: "12.0.0",
|
|
320
|
+
version: "22.2.3",
|
|
321
|
+
ngImport: i0,
|
|
322
|
+
type: CmatSpeedDialComponent,
|
|
323
|
+
decorators: [{
|
|
324
|
+
type: Component,
|
|
325
|
+
args: [{
|
|
326
|
+
selector: "cmat-speed-dial",
|
|
327
|
+
template: `
|
|
328
|
+
<div class="cmat-speed-dial-container">
|
|
329
|
+
<ng-content select="cmat-speed-dial-trigger" />
|
|
330
|
+
<ng-content select="cmat-speed-dial-actions" />
|
|
331
|
+
</div>
|
|
332
|
+
`,
|
|
333
|
+
encapsulation: ViewEncapsulation.None,
|
|
334
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
335
|
+
host: { "[class.dial-opened]": "dialOpened()" },
|
|
336
|
+
styles: ["cmat-speed-dial{display:inline-block}cmat-speed-dial.dial-opened .cmat-speed-dial-container cmat-speed-dial-trigger.dial-spin .spin180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}cmat-speed-dial.dial-opened .cmat-speed-dial-container cmat-speed-dial-trigger.dial-spin .spin360{-webkit-transform:rotate(360deg);transform:rotate(360deg)}cmat-speed-dial .cmat-speed-dial-container{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;z-index:20}cmat-speed-dial .cmat-speed-dial-container cmat-speed-dial-trigger{pointer-events:auto;z-index:24}cmat-speed-dial .cmat-speed-dial-container cmat-speed-dial-trigger.dial-spin .spin180,cmat-speed-dial .cmat-speed-dial-container cmat-speed-dial-trigger.dial-spin .spin360{-webkit-transition:all .6s cubic-bezier(.4,0,.2,1);transition:all .6s cubic-bezier(.4,0,.2,1)}cmat-speed-dial .cmat-speed-dial-container cmat-speed-dial-actions{display:-webkit-box;display:-webkit-flex;display:flex;position:absolute;height:0;width:0}cmat-speed-dial.dial-fling .cmat-speed-dial-container cmat-speed-dial-actions .cmat-action-item{display:block;opacity:1;-webkit-transition:all .3s cubic-bezier(.55,0,.55,.2);transition:all .3s cubic-bezier(.55,0,.55,.2)}cmat-speed-dial.dial-scale .cmat-speed-dial-container cmat-speed-dial-actions .cmat-action-item{-webkit-transform:scale(0);transform:scale(0);-webkit-transition:all .3s cubic-bezier(.55,0,.55,.2);transition:all .3s cubic-bezier(.55,0,.55,.2);-webkit-transition-duration:.14286s;transition-duration:.14286s}cmat-speed-dial.dial-down cmat-speed-dial-actions{bottom:2px;left:0}cmat-speed-dial.dial-down .cmat-speed-dial-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}cmat-speed-dial.dial-down .cmat-speed-dial-container cmat-speed-dial-trigger{-webkit-box-ordinal-group:2;-webkit-order:1;order:1}cmat-speed-dial.dial-down .cmat-speed-dial-container cmat-speed-dial-actions{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-ordinal-group:3;-webkit-order:2;order:2}cmat-speed-dial.dial-down .cmat-speed-dial-container cmat-speed-dial-actions .cmat-action-item{margin-top:10px}cmat-speed-dial.dial-up cmat-speed-dial-actions{top:2px;left:0}cmat-speed-dial.dial-up .cmat-speed-dial-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}cmat-speed-dial.dial-up .cmat-speed-dial-container cmat-speed-dial-trigger{-webkit-box-ordinal-group:3;-webkit-order:2;order:2}cmat-speed-dial.dial-up .cmat-speed-dial-container cmat-speed-dial-actions{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-webkit-flex-direction:column-reverse;flex-direction:column-reverse;-webkit-box-ordinal-group:2;-webkit-order:1;order:1}cmat-speed-dial.dial-up .cmat-speed-dial-container cmat-speed-dial-actions .cmat-action-item{margin-bottom:10px}cmat-speed-dial.dial-left cmat-speed-dial-actions{top:0;left:2px}cmat-speed-dial.dial-left .cmat-speed-dial-container{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row}cmat-speed-dial.dial-left .cmat-speed-dial-container cmat-speed-dial-trigger{-webkit-box-ordinal-group:3;-webkit-order:2;order:2}cmat-speed-dial.dial-left .cmat-speed-dial-container cmat-speed-dial-actions{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;-webkit-box-ordinal-group:2;-webkit-order:1;order:1}cmat-speed-dial.dial-left .cmat-speed-dial-container cmat-speed-dial-actions .cmat-action-item{margin-right:10px}cmat-speed-dial.dial-right cmat-speed-dial-actions{top:0;right:2px}cmat-speed-dial.dial-right .cmat-speed-dial-container{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row}cmat-speed-dial.dial-right .cmat-speed-dial-container cmat-speed-dial-trigger{-webkit-box-ordinal-group:2;-webkit-order:1;order:1}cmat-speed-dial.dial-right .cmat-speed-dial-container cmat-speed-dial-actions{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-webkit-box-ordinal-group:3;-webkit-order:2;order:2}cmat-speed-dial.dial-right .cmat-speed-dial-container cmat-speed-dial-actions .cmat-action-item{margin-left:10px}\n"]
|
|
337
|
+
}]
|
|
338
|
+
}],
|
|
339
|
+
ctorParameters: () => [],
|
|
340
|
+
propDecorators: {
|
|
341
|
+
openChange: [{
|
|
342
|
+
type: i0.Output,
|
|
343
|
+
args: ["openChange"]
|
|
344
|
+
}],
|
|
345
|
+
fixed: [{
|
|
346
|
+
type: i0.Input,
|
|
347
|
+
args: [{
|
|
348
|
+
isSignal: true,
|
|
349
|
+
alias: "fixed",
|
|
350
|
+
required: false
|
|
351
|
+
}]
|
|
352
|
+
}],
|
|
353
|
+
direction: [{
|
|
354
|
+
type: i0.Input,
|
|
355
|
+
args: [{
|
|
356
|
+
isSignal: true,
|
|
357
|
+
alias: "direction",
|
|
358
|
+
required: false
|
|
359
|
+
}]
|
|
360
|
+
}],
|
|
361
|
+
animationMode: [{
|
|
362
|
+
type: i0.Input,
|
|
363
|
+
args: [{
|
|
364
|
+
isSignal: true,
|
|
365
|
+
alias: "animationMode",
|
|
366
|
+
required: false
|
|
367
|
+
}]
|
|
368
|
+
}],
|
|
369
|
+
open: [{
|
|
370
|
+
type: i0.Input,
|
|
371
|
+
args: [{
|
|
372
|
+
isSignal: true,
|
|
373
|
+
alias: "open",
|
|
374
|
+
required: false
|
|
375
|
+
}]
|
|
376
|
+
}],
|
|
377
|
+
_childActions: [{
|
|
378
|
+
type: i0.ContentChild,
|
|
379
|
+
args: [i0.forwardRef(() => CmatSpeedDialActionsComponent), { isSignal: true }]
|
|
380
|
+
}]
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
var CmatSpeedDialTriggerComponent = class CmatSpeedDialTriggerComponent {
|
|
384
|
+
constructor() {
|
|
385
|
+
this.spin = input(false, ...ngDevMode ? [{ debugName: "spin" }] : /* istanbul ignore next */ []);
|
|
386
|
+
this._parent = inject(CmatSpeedDialComponent);
|
|
387
|
+
}
|
|
388
|
+
onClick(event) {
|
|
389
|
+
if (!this._parent.fixed()) {
|
|
390
|
+
this._parent.toggle();
|
|
391
|
+
event.stopPropagation();
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
static {
|
|
395
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
396
|
+
minVersion: "12.0.0",
|
|
397
|
+
version: "22.2.3",
|
|
398
|
+
ngImport: i0,
|
|
399
|
+
type: CmatSpeedDialTriggerComponent,
|
|
400
|
+
deps: [],
|
|
401
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
static {
|
|
405
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
406
|
+
minVersion: "17.1.0",
|
|
407
|
+
version: "22.2.3",
|
|
408
|
+
type: CmatSpeedDialTriggerComponent,
|
|
409
|
+
isStandalone: true,
|
|
410
|
+
selector: "cmat-speed-dial-trigger",
|
|
411
|
+
inputs: { spin: {
|
|
412
|
+
classPropertyName: "spin",
|
|
413
|
+
publicName: "spin",
|
|
414
|
+
isSignal: true,
|
|
415
|
+
isRequired: false,
|
|
416
|
+
transformFunction: null
|
|
417
|
+
} },
|
|
418
|
+
host: {
|
|
419
|
+
listeners: { "click": "onClick($event)" },
|
|
420
|
+
properties: { "class.dial-spin": "spin()" }
|
|
421
|
+
},
|
|
422
|
+
ngImport: i0,
|
|
423
|
+
template: " <ng-content select=\"[matFab], [matButton], [matIconButton], [matMiniFab]\" />",
|
|
424
|
+
isInline: true,
|
|
425
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
426
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
};
|
|
430
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
431
|
+
minVersion: "12.0.0",
|
|
432
|
+
version: "22.2.3",
|
|
433
|
+
ngImport: i0,
|
|
434
|
+
type: CmatSpeedDialTriggerComponent,
|
|
435
|
+
decorators: [{
|
|
436
|
+
type: Component,
|
|
437
|
+
args: [{
|
|
438
|
+
selector: "cmat-speed-dial-trigger",
|
|
439
|
+
template: " <ng-content select=\"[matFab], [matButton], [matIconButton], [matMiniFab]\" />",
|
|
440
|
+
encapsulation: ViewEncapsulation.None,
|
|
441
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
442
|
+
host: { "[class.dial-spin]": "spin()" }
|
|
443
|
+
}]
|
|
444
|
+
}],
|
|
445
|
+
propDecorators: {
|
|
446
|
+
spin: [{
|
|
447
|
+
type: i0.Input,
|
|
448
|
+
args: [{
|
|
449
|
+
isSignal: true,
|
|
450
|
+
alias: "spin",
|
|
451
|
+
required: false
|
|
452
|
+
}]
|
|
453
|
+
}],
|
|
454
|
+
onClick: [{
|
|
455
|
+
type: HostListener,
|
|
456
|
+
args: ["click", ["$event"]]
|
|
457
|
+
}]
|
|
458
|
+
}
|
|
459
|
+
});
|
|
307
460
|
export { CmatSpeedDialActionsComponent, CmatSpeedDialComponent, CmatSpeedDialTriggerComponent };
|
|
308
|
-
|
|
461
|
+
|
|
462
|
+
//# sourceMappingURL=cmat-components-speed-dial.mjs.map
|