cmat 0.0.117 → 0.0.119
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 +9 -9
- package/fesm2022/cmat-components-breadcrumb.mjs +10 -9
- package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/cmat-components-card.mjs +6 -6
- package/fesm2022/cmat-components-card.mjs.map +1 -1
- package/fesm2022/cmat-components-carousel.mjs +16 -16
- package/fesm2022/cmat-components-carousel.mjs.map +1 -1
- package/fesm2022/cmat-components-cascade.mjs +1 -863
- package/fesm2022/cmat-components-chip-input.mjs +11 -11
- package/fesm2022/cmat-components-code-editor.mjs +3 -3
- package/fesm2022/cmat-components-color-picker.mjs +45 -45
- package/fesm2022/cmat-components-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-custom-formly.mjs +214 -214
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-data-picker.mjs +43 -40
- package/fesm2022/cmat-components-data-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +15 -16
- package/fesm2022/cmat-components-date-range.mjs.map +1 -1
- package/fesm2022/cmat-components-date-time-display.mjs +4 -4
- package/fesm2022/cmat-components-drawer.mjs +9 -9
- package/fesm2022/cmat-components-drawer.mjs.map +1 -1
- package/fesm2022/cmat-components-empty-state.mjs +4 -4
- package/fesm2022/cmat-components-file-preview.mjs +4 -4
- package/fesm2022/cmat-components-filter-toolbar.mjs +12 -13
- package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-form-actions.mjs +6 -6
- package/fesm2022/cmat-components-fullscreen.mjs +4 -4
- package/fesm2022/cmat-components-highlight.mjs +7 -7
- package/fesm2022/cmat-components-image-viewer.mjs +7 -7
- package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
- package/fesm2022/cmat-components-inline-loading.mjs +3 -3
- package/fesm2022/cmat-components-json-editor.mjs +7 -7
- package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-knob-input.mjs +6 -6
- package/fesm2022/cmat-components-loading-overlay.mjs +5 -5
- package/fesm2022/cmat-components-loading-overlay.mjs.map +1 -1
- package/fesm2022/cmat-components-masonry.mjs +4 -4
- package/fesm2022/cmat-components-material-color-picker.mjs +1 -337
- package/fesm2022/cmat-components-material-datetimepicker.mjs +1 -4312
- package/fesm2022/cmat-components-navigation.mjs +1 -3081
- package/fesm2022/cmat-components-opt-input.mjs +1 -542
- package/fesm2022/cmat-components-org-chart.mjs +1 -529
- package/fesm2022/cmat-components-page-header.mjs +4 -4
- package/fesm2022/cmat-components-pagination.mjs +21 -21
- package/fesm2022/cmat-components-pagination.mjs.map +1 -1
- package/fesm2022/cmat-components-password-strength.mjs +1 -880
- package/fesm2022/cmat-components-popover.mjs +1 -1022
- package/fesm2022/cmat-components-progress-bar.mjs +4 -4
- package/fesm2022/cmat-components-qrcode.mjs +3 -3
- package/fesm2022/cmat-components-rating.mjs +8 -8
- package/fesm2022/cmat-components-rich-text-editor.mjs +3 -3
- package/fesm2022/cmat-components-select-search.mjs +1 -930
- package/fesm2022/cmat-components-select-table.mjs +39 -39
- package/fesm2022/cmat-components-select-table.mjs.map +1 -1
- package/fesm2022/cmat-components-select-tree.mjs +28 -27
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
- package/fesm2022/cmat-components-skeleton.mjs +5 -5
- package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
- package/fesm2022/cmat-components-speed-dial.mjs +12 -12
- package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
- package/fesm2022/cmat-components-status-tag.mjs +6 -6
- package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
- package/fesm2022/cmat-components-table-toolbar.mjs +4 -4
- package/fesm2022/cmat-components-timeline.mjs +19 -19
- package/fesm2022/cmat-components-timeline.mjs.map +1 -1
- package/fesm2022/cmat-components-toast.mjs +14 -14
- package/fesm2022/cmat-components-toast.mjs.map +1 -1
- package/fesm2022/cmat-components-transfer-picker.mjs +48 -49
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-treetable.mjs +8 -8
- package/fesm2022/cmat-components-upload.mjs +17 -17
- package/fesm2022/cmat-components-x6-angular-shape.mjs +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +1 -221
- package/fesm2022/cmat-directives-arrow-cursor.mjs +3 -3
- package/fesm2022/cmat-directives-autofocus.mjs +3 -3
- package/fesm2022/cmat-directives-data-exporter.mjs +1 -544
- package/fesm2022/cmat-directives-debounce.mjs +1 -163
- package/fesm2022/cmat-directives-digit-only.mjs +6 -6
- package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +3 -3
- package/fesm2022/cmat-lib-mock-api.mjs +8 -8
- package/fesm2022/cmat-pipes-bytes.mjs +3 -3
- package/fesm2022/cmat-pipes-date-format.mjs +3 -3
- package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
- package/fesm2022/cmat-pipes-group-by.mjs +3 -3
- package/fesm2022/cmat-pipes-keys.mjs +3 -3
- package/fesm2022/cmat-pipes-secure.mjs +6 -6
- package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
- package/fesm2022/cmat-reports.mjs +86 -80
- package/fesm2022/cmat-reports.mjs.map +1 -1
- package/fesm2022/cmat-services-alert.mjs +4 -4
- package/fesm2022/cmat-services-config.mjs +6 -6
- package/fesm2022/cmat-services-confirmation.mjs +1 -185
- package/fesm2022/cmat-services-data.mjs +5 -5
- package/fesm2022/cmat-services-export-as.mjs +4 -4
- package/fesm2022/cmat-services-loading.mjs +6 -6
- package/fesm2022/cmat-services-local-storage.mjs +3 -3
- package/fesm2022/cmat-services-media-watcher.mjs +4 -4
- package/fesm2022/cmat-services-platform.mjs +4 -4
- package/fesm2022/cmat-services-print.mjs +3 -3
- package/fesm2022/cmat-services-splash-screen.mjs +4 -4
- package/fesm2022/cmat-services-title.mjs +6 -6
- package/fesm2022/cmat-services-translation.mjs +4 -4
- package/fesm2022/cmat-services-utils.mjs +7 -7
- package/fesm2022/cmat.mjs +77 -39579
- package/fesm2022/public-api-BE83BHd7.mjs +930 -0
- package/fesm2022/public-api-BE83BHd7.mjs.map +1 -0
- package/fesm2022/public-api-BcmOSkgf.mjs +542 -0
- package/fesm2022/public-api-BcmOSkgf.mjs.map +1 -0
- package/fesm2022/public-api-BmMqKDzm.mjs +4312 -0
- package/fesm2022/public-api-BmMqKDzm.mjs.map +1 -0
- package/fesm2022/public-api-BnRFazGR.mjs +221 -0
- package/fesm2022/public-api-BnRFazGR.mjs.map +1 -0
- package/fesm2022/public-api-C9N9rKkB.mjs +185 -0
- package/fesm2022/public-api-C9N9rKkB.mjs.map +1 -0
- package/fesm2022/public-api-CXmCX9ZQ.mjs +863 -0
- package/fesm2022/public-api-CXmCX9ZQ.mjs.map +1 -0
- package/fesm2022/public-api-CfILyvuV.mjs +880 -0
- package/fesm2022/public-api-CfILyvuV.mjs.map +1 -0
- package/fesm2022/public-api-CgtBw-7O.mjs +163 -0
- package/fesm2022/public-api-CgtBw-7O.mjs.map +1 -0
- package/fesm2022/public-api-DEtzrfqy.mjs +544 -0
- package/fesm2022/public-api-DEtzrfqy.mjs.map +1 -0
- package/fesm2022/public-api-EK51WC1y.mjs +1022 -0
- package/fesm2022/public-api-EK51WC1y.mjs.map +1 -0
- package/fesm2022/public-api-IpTsAgZ4.mjs +3081 -0
- package/fesm2022/public-api-IpTsAgZ4.mjs.map +1 -0
- package/fesm2022/public-api-iRaKIVmd.mjs +338 -0
- package/fesm2022/public-api-iRaKIVmd.mjs.map +1 -0
- package/fesm2022/public-api-nzzDLiDj.mjs +529 -0
- package/fesm2022/public-api-nzzDLiDj.mjs.map +1 -0
- package/fesm2022/{cmat-quill-docx-exporter-D9Eo73Wq.mjs → quill-docx-exporter-D9Eo73Wq.mjs} +1 -1
- package/fesm2022/quill-docx-exporter-D9Eo73Wq.mjs.map +1 -0
- package/package.json +23 -22
- package/types/cmat-components-breadcrumb.d.ts +1 -1
- package/types/cmat-components-chip-input.d.ts +3 -3
- package/types/cmat-components-custom-formly.d.ts +2 -857
- package/types/cmat-components-data-picker.d.ts +12 -6
- package/types/cmat-components-date-range.d.ts +1 -1
- package/types/cmat-components-drawer.d.ts +1 -1
- package/types/cmat-components-form-actions.d.ts +1 -1
- package/types/cmat-components-knob-input.d.ts +1 -1
- package/types/cmat-components-masonry.d.ts +2 -1
- package/types/cmat-components-material-color-picker.d.ts +1 -1
- package/types/cmat-components-material-datetimepicker.d.ts +2 -836
- package/types/cmat-components-navigation.d.ts +1 -1
- package/types/cmat-components-opt-input.d.ts +2 -113
- package/types/cmat-components-org-chart.d.ts +1 -1
- package/types/cmat-components-page-header.d.ts +1 -1
- package/types/cmat-components-password-strength.d.ts +2 -201
- package/types/cmat-components-popover.d.ts +2 -270
- package/types/cmat-components-qrcode.d.ts +2 -113
- package/types/cmat-components-rating.d.ts +1 -1
- package/types/cmat-components-rich-text-editor.d.ts +1 -1
- package/types/cmat-components-select-search.d.ts +2 -200
- package/types/cmat-components-select-table.d.ts +3 -3
- package/types/cmat-components-select-tree.d.ts +6 -5
- package/types/cmat-components-status-tag.d.ts +2 -2
- package/types/cmat-components-toast.d.ts +2 -1
- package/types/cmat-components-transfer-picker.d.ts +2 -2
- package/types/cmat-components-upload.d.ts +1 -1
- package/types/cmat-components-x6-angular-shape.d.ts +1 -1
- package/types/cmat-directives-data-exporter.d.ts +1 -1
- package/types/cmat-directives-debounce.d.ts +2 -34
- package/types/cmat-directives-equal-validator.d.ts +1 -1
- package/types/cmat-directives-seamless-auto-scroll.d.ts +1 -1
- package/types/cmat-lib-mock-api.d.ts +3 -2
- package/types/cmat-pipes-secure.d.ts +1 -1
- package/types/cmat-reports.d.ts +6 -6
- package/types/cmat-services-alert.d.ts +1 -1
- package/types/cmat-services-confirmation.d.ts +2 -36
- package/types/cmat-services-data.d.ts +1 -1
- package/types/cmat-services-export-as.d.ts +1 -1
- package/types/cmat-services-loading.d.ts +1 -1
- package/types/cmat-services-translation.d.ts +1 -1
- package/types/cmat-services-utils.d.ts +2 -2
- package/types/cmat.d.ts +78 -7676
- package/types/public-api-BFGGDRK3.d.ts +201 -0
- package/types/public-api-BXS379ev.d.ts +202 -0
- package/types/public-api-C4CvABGO.d.ts +114 -0
- package/types/public-api-CSYz4G5Z.d.ts +271 -0
- package/types/public-api-NSrmlKKH.d.ts +114 -0
- package/types/public-api-PfNpHSSm.d.ts +837 -0
- package/types/public-api-f3WtygQS.d.ts +35 -0
- package/types/public-api-nBuSXSMJ.d.ts +858 -0
- package/types/public-api-yYeZrUAV.d.ts +37 -0
- package/fesm2022/cmat-components-cascade.mjs.map +0 -1
- package/fesm2022/cmat-components-custom-formly-quill-docx-exporter-BwwGX2Ie.mjs +0 -294
- package/fesm2022/cmat-components-custom-formly-quill-docx-exporter-BwwGX2Ie.mjs.map +0 -1
- package/fesm2022/cmat-components-material-color-picker.mjs.map +0 -1
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +0 -1
- package/fesm2022/cmat-components-navigation.mjs.map +0 -1
- package/fesm2022/cmat-components-opt-input.mjs.map +0 -1
- package/fesm2022/cmat-components-org-chart.mjs.map +0 -1
- package/fesm2022/cmat-components-password-strength.mjs.map +0 -1
- package/fesm2022/cmat-components-popover.mjs.map +0 -1
- package/fesm2022/cmat-components-select-search.mjs.map +0 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +0 -1
- package/fesm2022/cmat-directives-data-exporter.mjs.map +0 -1
- package/fesm2022/cmat-directives-debounce.mjs.map +0 -1
- package/fesm2022/cmat-quill-docx-exporter-D9Eo73Wq.mjs.map +0 -1
- package/fesm2022/cmat-services-confirmation.mjs.map +0 -1
- package/fesm2022/cmat.mjs.map +0 -1
|
@@ -0,0 +1,1022 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, Directive, ElementRef, EventEmitter, HostBinding, HostListener, Input, TemplateRef, ViewContainerRef, ViewEncapsulation, effect, inject, input, model, output, signal, untracked, viewChild } from "@angular/core";
|
|
3
|
+
import { NgClass, NgStyle } from "@angular/common";
|
|
4
|
+
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
5
|
+
import { coerceBooleanProperty } from "@angular/cdk/coercion";
|
|
6
|
+
import { Overlay, OverlayConfig } from "@angular/cdk/overlay";
|
|
7
|
+
import { TemplatePortal } from "@angular/cdk/portal";
|
|
8
|
+
import * as i1 from "@angular/cdk/a11y";
|
|
9
|
+
import { A11yModule, isFakeMousedownFromScreenReader } from "@angular/cdk/a11y";
|
|
10
|
+
import { Directionality } from "@angular/cdk/bidi";
|
|
11
|
+
function throwCmatPopoverMissingError() {
|
|
12
|
+
throw Error(`cmat-popover-trigger: must pass in an cmat-popover instance.
|
|
13
|
+
|
|
14
|
+
Example:
|
|
15
|
+
<cmat-popover #popover="cmatPopover"></cmat-popover>
|
|
16
|
+
<button [cmatPopoverTriggerFor]="popover"></button>`);
|
|
17
|
+
}
|
|
18
|
+
function throwCmatPopoverInvalidPositionStart() {
|
|
19
|
+
throw Error(`cmatPopoverPosition[0] value must be either 'above', 'below', 'before' or 'after'.
|
|
20
|
+
Example: <cmat-popover [position]="['below', 'after']" #popover="cmatPopover"></cmat-popover>`);
|
|
21
|
+
}
|
|
22
|
+
function throwCmatPopoverInvalidPositionEnd() {
|
|
23
|
+
throw Error(`cmatPopoverPosition[1] value must be either 'above', 'below', 'before', 'after' or 'center'.
|
|
24
|
+
Example: <cmat-popover [position]="['below', 'after']" #popover="cmatPopover"></cmat-popover>`);
|
|
25
|
+
}
|
|
26
|
+
var CmatPopoverComponent = class CmatPopoverComponent {
|
|
27
|
+
constructor() {
|
|
28
|
+
this.closed = output();
|
|
29
|
+
this.templateRef = viewChild(TemplateRef, ...ngDevMode ? [{ debugName: "templateRef" }] : /* istanbul ignore next */ []);
|
|
30
|
+
this.popoverPanelStyles = input({}, ...ngDevMode ? [{ debugName: "popoverPanelStyles" }] : /* istanbul ignore next */ []);
|
|
31
|
+
this.popoverContentStyles = input({}, ...ngDevMode ? [{ debugName: "popoverContentStyles" }] : /* istanbul ignore next */ []);
|
|
32
|
+
this.popoverArrowStyles = model({}, ...ngDevMode ? [{ debugName: "popoverArrowStyles" }] : /* istanbul ignore next */ []);
|
|
33
|
+
this.containerPositioning = false;
|
|
34
|
+
this.closeDisabled = false;
|
|
35
|
+
this.classList = {};
|
|
36
|
+
this._onAnimationStateChange = new EventEmitter();
|
|
37
|
+
this._hostElementRef = inject(ElementRef);
|
|
38
|
+
this._dir = inject(Directionality, { optional: true });
|
|
39
|
+
this._position = signal(["below", "after"], ...ngDevMode ? [{ debugName: "_position" }] : /* istanbul ignore next */ []);
|
|
40
|
+
this._triggerEvent = signal("hover", ...ngDevMode ? [{ debugName: "_triggerEvent" }] : /* istanbul ignore next */ []);
|
|
41
|
+
this._scrollStrategy = signal("reposition", ...ngDevMode ? [{ debugName: "_scrollStrategy" }] : /* istanbul ignore next */ []);
|
|
42
|
+
this._enterDelay = signal(100, ...ngDevMode ? [{ debugName: "_enterDelay" }] : /* istanbul ignore next */ []);
|
|
43
|
+
this._leaveDelay = signal(100, ...ngDevMode ? [{ debugName: "_leaveDelay" }] : /* istanbul ignore next */ []);
|
|
44
|
+
this._panelOffsetX = signal(0, ...ngDevMode ? [{ debugName: "_panelOffsetX" }] : /* istanbul ignore next */ []);
|
|
45
|
+
this._panelOffsetY = signal(0, ...ngDevMode ? [{ debugName: "_panelOffsetY" }] : /* istanbul ignore next */ []);
|
|
46
|
+
this._closeOnPanelClick = signal(false, ...ngDevMode ? [{ debugName: "_closeOnPanelClick" }] : /* istanbul ignore next */ []);
|
|
47
|
+
this._closeOnBackdropClick = signal(true, ...ngDevMode ? [{ debugName: "_closeOnBackdropClick" }] : /* istanbul ignore next */ []);
|
|
48
|
+
this._disableAnimation = signal(false, ...ngDevMode ? [{ debugName: "_disableAnimation" }] : /* istanbul ignore next */ []);
|
|
49
|
+
this._focusTrapEnabled = signal(true, ...ngDevMode ? [{ debugName: "_focusTrapEnabled" }] : /* istanbul ignore next */ []);
|
|
50
|
+
this._focusTrapAutoCaptureEnabled = signal(true, ...ngDevMode ? [{ debugName: "_focusTrapAutoCaptureEnabled" }] : /* istanbul ignore next */ []);
|
|
51
|
+
this._arrowOffsetX = signal(20, ...ngDevMode ? [{ debugName: "_arrowOffsetX" }] : /* istanbul ignore next */ []);
|
|
52
|
+
this._arrowOffsetY = signal(20, ...ngDevMode ? [{ debugName: "_arrowOffsetY" }] : /* istanbul ignore next */ []);
|
|
53
|
+
this._arrowWidth = signal(16, ...ngDevMode ? [{ debugName: "_arrowWidth" }] : /* istanbul ignore next */ []);
|
|
54
|
+
this._arrowHeight = signal(16, ...ngDevMode ? [{ debugName: "_arrowHeight" }] : /* istanbul ignore next */ []);
|
|
55
|
+
this.setPositionClasses();
|
|
56
|
+
}
|
|
57
|
+
get position() {
|
|
58
|
+
return this._position();
|
|
59
|
+
}
|
|
60
|
+
set position(value) {
|
|
61
|
+
if (![
|
|
62
|
+
"before",
|
|
63
|
+
"after",
|
|
64
|
+
"above",
|
|
65
|
+
"below"
|
|
66
|
+
].includes(value[0])) throwCmatPopoverInvalidPositionStart();
|
|
67
|
+
if (![
|
|
68
|
+
"before",
|
|
69
|
+
"after",
|
|
70
|
+
"above",
|
|
71
|
+
"below",
|
|
72
|
+
"center"
|
|
73
|
+
].includes(value[1])) throwCmatPopoverInvalidPositionEnd();
|
|
74
|
+
this._position.set(value);
|
|
75
|
+
this.setPositionClasses();
|
|
76
|
+
}
|
|
77
|
+
get triggerEvent() {
|
|
78
|
+
return this._triggerEvent();
|
|
79
|
+
}
|
|
80
|
+
set triggerEvent(value) {
|
|
81
|
+
this._triggerEvent.set(value);
|
|
82
|
+
}
|
|
83
|
+
get scrollStrategy() {
|
|
84
|
+
return this._scrollStrategy();
|
|
85
|
+
}
|
|
86
|
+
set scrollStrategy(value) {
|
|
87
|
+
this._scrollStrategy.set(value);
|
|
88
|
+
}
|
|
89
|
+
get enterDelay() {
|
|
90
|
+
return this._enterDelay();
|
|
91
|
+
}
|
|
92
|
+
set enterDelay(value) {
|
|
93
|
+
this._enterDelay.set(value);
|
|
94
|
+
}
|
|
95
|
+
get leaveDelay() {
|
|
96
|
+
return this._leaveDelay();
|
|
97
|
+
}
|
|
98
|
+
set leaveDelay(value) {
|
|
99
|
+
this._leaveDelay.set(value);
|
|
100
|
+
}
|
|
101
|
+
get xOffset() {
|
|
102
|
+
return this._panelOffsetX();
|
|
103
|
+
}
|
|
104
|
+
set xOffset(value) {
|
|
105
|
+
this._panelOffsetX.set(value);
|
|
106
|
+
}
|
|
107
|
+
get yOffset() {
|
|
108
|
+
return this._panelOffsetY();
|
|
109
|
+
}
|
|
110
|
+
set yOffset(value) {
|
|
111
|
+
this._panelOffsetY.set(value);
|
|
112
|
+
}
|
|
113
|
+
get arrowOffsetX() {
|
|
114
|
+
return this._arrowOffsetX();
|
|
115
|
+
}
|
|
116
|
+
set arrowOffsetX(value) {
|
|
117
|
+
this._arrowOffsetX.set(value);
|
|
118
|
+
}
|
|
119
|
+
get arrowOffsetY() {
|
|
120
|
+
return this._arrowOffsetY();
|
|
121
|
+
}
|
|
122
|
+
set arrowOffsetY(value) {
|
|
123
|
+
this._arrowOffsetY.set(value);
|
|
124
|
+
}
|
|
125
|
+
get arrowWidth() {
|
|
126
|
+
return this._arrowWidth();
|
|
127
|
+
}
|
|
128
|
+
set arrowWidth(value) {
|
|
129
|
+
this._arrowWidth.set(value);
|
|
130
|
+
}
|
|
131
|
+
get arrowHeight() {
|
|
132
|
+
return this._arrowHeight();
|
|
133
|
+
}
|
|
134
|
+
set arrowHeight(value) {
|
|
135
|
+
this._arrowHeight.set(value);
|
|
136
|
+
}
|
|
137
|
+
get closeOnPanelClick() {
|
|
138
|
+
return this._closeOnPanelClick();
|
|
139
|
+
}
|
|
140
|
+
set closeOnPanelClick(value) {
|
|
141
|
+
this._closeOnPanelClick.set(coerceBooleanProperty(value));
|
|
142
|
+
}
|
|
143
|
+
get closeOnBackdropClick() {
|
|
144
|
+
return this._closeOnBackdropClick();
|
|
145
|
+
}
|
|
146
|
+
set closeOnBackdropClick(value) {
|
|
147
|
+
this._closeOnBackdropClick.set(coerceBooleanProperty(value));
|
|
148
|
+
}
|
|
149
|
+
get disableAnimation() {
|
|
150
|
+
return this._disableAnimation();
|
|
151
|
+
}
|
|
152
|
+
set disableAnimation(value) {
|
|
153
|
+
this._disableAnimation.set(coerceBooleanProperty(value));
|
|
154
|
+
}
|
|
155
|
+
get focusTrapEnabled() {
|
|
156
|
+
return this._focusTrapEnabled();
|
|
157
|
+
}
|
|
158
|
+
set focusTrapEnabled(value) {
|
|
159
|
+
this._focusTrapEnabled.set(coerceBooleanProperty(value));
|
|
160
|
+
}
|
|
161
|
+
get focusTrapAutoCaptureEnabled() {
|
|
162
|
+
return this._focusTrapAutoCaptureEnabled();
|
|
163
|
+
}
|
|
164
|
+
set focusTrapAutoCaptureEnabled(value) {
|
|
165
|
+
this._focusTrapAutoCaptureEnabled.set(coerceBooleanProperty(value));
|
|
166
|
+
}
|
|
167
|
+
set panelClass(classes) {
|
|
168
|
+
if (classes?.length) {
|
|
169
|
+
this.classList = classes.split(" ").reduce((obj, className) => {
|
|
170
|
+
obj[className] = true;
|
|
171
|
+
return obj;
|
|
172
|
+
}, {});
|
|
173
|
+
this._hostElementRef.nativeElement.setAttribute("class", "");
|
|
174
|
+
this.setPositionClasses();
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
ngOnDestroy() {
|
|
178
|
+
this.emitCloseEvent();
|
|
179
|
+
}
|
|
180
|
+
handleKeydown(event) {
|
|
181
|
+
switch (event.code) {
|
|
182
|
+
case "Escape":
|
|
183
|
+
this.emitCloseEvent();
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
emitCloseEvent() {
|
|
188
|
+
this.closed.emit();
|
|
189
|
+
}
|
|
190
|
+
onClick() {
|
|
191
|
+
if (this.closeOnPanelClick) this.emitCloseEvent();
|
|
192
|
+
}
|
|
193
|
+
onMouseOver() {
|
|
194
|
+
if (this.triggerEvent === "hover") this.closeDisabled = true;
|
|
195
|
+
}
|
|
196
|
+
onFocus() {}
|
|
197
|
+
onMouseLeave() {
|
|
198
|
+
if (this.triggerEvent === "hover") {
|
|
199
|
+
this.closeDisabled = false;
|
|
200
|
+
this.emitCloseEvent();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
setCurrentStyles(pos = this.position) {
|
|
204
|
+
const left = pos[1] === "after" ? `${this.arrowOffsetX - this.arrowWidth / 2}px` : pos[1] === "center" ? `calc(50% - ${this.arrowWidth / 2}px)` : "";
|
|
205
|
+
const right = pos[1] === "before" ? `${this.arrowOffsetX - this.arrowWidth / 2}px` : "";
|
|
206
|
+
const bottom = pos[1] === "above" ? `${this.arrowOffsetY - this.arrowHeight / 2}px` : pos[1] === "center" ? `calc(50% - ${this.arrowHeight / 2}px)` : "";
|
|
207
|
+
const top = pos[1] === "below" ? `${this.arrowOffsetY - this.arrowHeight / 2}px` : "";
|
|
208
|
+
this.popoverArrowStyles.set(pos[0] === "above" || pos[0] === "below" ? {
|
|
209
|
+
left: this._dir.value === "ltr" ? left : right,
|
|
210
|
+
right: this._dir.value === "ltr" ? right : left
|
|
211
|
+
} : {
|
|
212
|
+
top,
|
|
213
|
+
bottom
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
setPositionClasses(pos = this.position) {
|
|
217
|
+
this.classList["cmat-popover-before-above"] = pos[0] === "before" && pos[1] === "above";
|
|
218
|
+
this.classList["cmat-popover-before-center"] = pos[0] === "before" && pos[1] === "center";
|
|
219
|
+
this.classList["cmat-popover-before-below"] = pos[0] === "before" && pos[1] === "below";
|
|
220
|
+
this.classList["cmat-popover-after-above"] = pos[0] === "after" && pos[1] === "above";
|
|
221
|
+
this.classList["cmat-popover-after-center"] = pos[0] === "after" && pos[1] === "center";
|
|
222
|
+
this.classList["cmat-popover-after-below"] = pos[0] === "after" && pos[1] === "below";
|
|
223
|
+
this.classList["cmat-popover-above-before"] = pos[0] === "above" && pos[1] === "before";
|
|
224
|
+
this.classList["cmat-popover-above-center"] = pos[0] === "above" && pos[1] === "center";
|
|
225
|
+
this.classList["cmat-popover-above-after"] = pos[0] === "above" && pos[1] === "after";
|
|
226
|
+
this.classList["cmat-popover-below-before"] = pos[0] === "below" && pos[1] === "before";
|
|
227
|
+
this.classList["cmat-popover-below-center"] = pos[0] === "below" && pos[1] === "center";
|
|
228
|
+
this.classList["cmat-popover-below-after"] = pos[0] === "below" && pos[1] === "after";
|
|
229
|
+
}
|
|
230
|
+
static {
|
|
231
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
232
|
+
minVersion: "12.0.0",
|
|
233
|
+
version: "22.3.0",
|
|
234
|
+
ngImport: i0,
|
|
235
|
+
type: CmatPopoverComponent,
|
|
236
|
+
deps: [],
|
|
237
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
static {
|
|
241
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
242
|
+
minVersion: "17.2.0",
|
|
243
|
+
version: "22.3.0",
|
|
244
|
+
type: CmatPopoverComponent,
|
|
245
|
+
isStandalone: true,
|
|
246
|
+
selector: "cmat-popover",
|
|
247
|
+
inputs: {
|
|
248
|
+
popoverPanelStyles: {
|
|
249
|
+
classPropertyName: "popoverPanelStyles",
|
|
250
|
+
publicName: "popoverPanelStyles",
|
|
251
|
+
isSignal: true,
|
|
252
|
+
isRequired: false,
|
|
253
|
+
transformFunction: null
|
|
254
|
+
},
|
|
255
|
+
popoverContentStyles: {
|
|
256
|
+
classPropertyName: "popoverContentStyles",
|
|
257
|
+
publicName: "popoverContentStyles",
|
|
258
|
+
isSignal: true,
|
|
259
|
+
isRequired: false,
|
|
260
|
+
transformFunction: null
|
|
261
|
+
},
|
|
262
|
+
popoverArrowStyles: {
|
|
263
|
+
classPropertyName: "popoverArrowStyles",
|
|
264
|
+
publicName: "popoverArrowStyles",
|
|
265
|
+
isSignal: true,
|
|
266
|
+
isRequired: false,
|
|
267
|
+
transformFunction: null
|
|
268
|
+
},
|
|
269
|
+
position: {
|
|
270
|
+
classPropertyName: "position",
|
|
271
|
+
publicName: "position",
|
|
272
|
+
isSignal: false,
|
|
273
|
+
isRequired: false,
|
|
274
|
+
transformFunction: null
|
|
275
|
+
},
|
|
276
|
+
triggerEvent: {
|
|
277
|
+
classPropertyName: "triggerEvent",
|
|
278
|
+
publicName: "triggerEvent",
|
|
279
|
+
isSignal: false,
|
|
280
|
+
isRequired: false,
|
|
281
|
+
transformFunction: null
|
|
282
|
+
},
|
|
283
|
+
scrollStrategy: {
|
|
284
|
+
classPropertyName: "scrollStrategy",
|
|
285
|
+
publicName: "scrollStrategy",
|
|
286
|
+
isSignal: false,
|
|
287
|
+
isRequired: false,
|
|
288
|
+
transformFunction: null
|
|
289
|
+
},
|
|
290
|
+
enterDelay: {
|
|
291
|
+
classPropertyName: "enterDelay",
|
|
292
|
+
publicName: "enterDelay",
|
|
293
|
+
isSignal: false,
|
|
294
|
+
isRequired: false,
|
|
295
|
+
transformFunction: null
|
|
296
|
+
},
|
|
297
|
+
leaveDelay: {
|
|
298
|
+
classPropertyName: "leaveDelay",
|
|
299
|
+
publicName: "leaveDelay",
|
|
300
|
+
isSignal: false,
|
|
301
|
+
isRequired: false,
|
|
302
|
+
transformFunction: null
|
|
303
|
+
},
|
|
304
|
+
xOffset: {
|
|
305
|
+
classPropertyName: "xOffset",
|
|
306
|
+
publicName: "xOffset",
|
|
307
|
+
isSignal: false,
|
|
308
|
+
isRequired: false,
|
|
309
|
+
transformFunction: null
|
|
310
|
+
},
|
|
311
|
+
yOffset: {
|
|
312
|
+
classPropertyName: "yOffset",
|
|
313
|
+
publicName: "yOffset",
|
|
314
|
+
isSignal: false,
|
|
315
|
+
isRequired: false,
|
|
316
|
+
transformFunction: null
|
|
317
|
+
},
|
|
318
|
+
arrowOffsetX: {
|
|
319
|
+
classPropertyName: "arrowOffsetX",
|
|
320
|
+
publicName: "arrowOffsetX",
|
|
321
|
+
isSignal: false,
|
|
322
|
+
isRequired: false,
|
|
323
|
+
transformFunction: null
|
|
324
|
+
},
|
|
325
|
+
arrowOffsetY: {
|
|
326
|
+
classPropertyName: "arrowOffsetY",
|
|
327
|
+
publicName: "arrowOffsetY",
|
|
328
|
+
isSignal: false,
|
|
329
|
+
isRequired: false,
|
|
330
|
+
transformFunction: null
|
|
331
|
+
},
|
|
332
|
+
arrowWidth: {
|
|
333
|
+
classPropertyName: "arrowWidth",
|
|
334
|
+
publicName: "arrowWidth",
|
|
335
|
+
isSignal: false,
|
|
336
|
+
isRequired: false,
|
|
337
|
+
transformFunction: null
|
|
338
|
+
},
|
|
339
|
+
arrowHeight: {
|
|
340
|
+
classPropertyName: "arrowHeight",
|
|
341
|
+
publicName: "arrowHeight",
|
|
342
|
+
isSignal: false,
|
|
343
|
+
isRequired: false,
|
|
344
|
+
transformFunction: null
|
|
345
|
+
},
|
|
346
|
+
closeOnPanelClick: {
|
|
347
|
+
classPropertyName: "closeOnPanelClick",
|
|
348
|
+
publicName: "closeOnPanelClick",
|
|
349
|
+
isSignal: false,
|
|
350
|
+
isRequired: false,
|
|
351
|
+
transformFunction: null
|
|
352
|
+
},
|
|
353
|
+
closeOnBackdropClick: {
|
|
354
|
+
classPropertyName: "closeOnBackdropClick",
|
|
355
|
+
publicName: "closeOnBackdropClick",
|
|
356
|
+
isSignal: false,
|
|
357
|
+
isRequired: false,
|
|
358
|
+
transformFunction: null
|
|
359
|
+
},
|
|
360
|
+
disableAnimation: {
|
|
361
|
+
classPropertyName: "disableAnimation",
|
|
362
|
+
publicName: "disableAnimation",
|
|
363
|
+
isSignal: false,
|
|
364
|
+
isRequired: false,
|
|
365
|
+
transformFunction: null
|
|
366
|
+
},
|
|
367
|
+
focusTrapEnabled: {
|
|
368
|
+
classPropertyName: "focusTrapEnabled",
|
|
369
|
+
publicName: "focusTrapEnabled",
|
|
370
|
+
isSignal: false,
|
|
371
|
+
isRequired: false,
|
|
372
|
+
transformFunction: null
|
|
373
|
+
},
|
|
374
|
+
focusTrapAutoCaptureEnabled: {
|
|
375
|
+
classPropertyName: "focusTrapAutoCaptureEnabled",
|
|
376
|
+
publicName: "focusTrapAutoCaptureEnabled",
|
|
377
|
+
isSignal: false,
|
|
378
|
+
isRequired: false,
|
|
379
|
+
transformFunction: null
|
|
380
|
+
},
|
|
381
|
+
panelClass: {
|
|
382
|
+
classPropertyName: "panelClass",
|
|
383
|
+
publicName: "panelClass",
|
|
384
|
+
isSignal: false,
|
|
385
|
+
isRequired: false,
|
|
386
|
+
transformFunction: null
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
outputs: {
|
|
390
|
+
closed: "closed",
|
|
391
|
+
popoverArrowStyles: "popoverArrowStylesChange"
|
|
392
|
+
},
|
|
393
|
+
viewQueries: [{
|
|
394
|
+
propertyName: "templateRef",
|
|
395
|
+
first: true,
|
|
396
|
+
predicate: TemplateRef,
|
|
397
|
+
descendants: true,
|
|
398
|
+
isSignal: true
|
|
399
|
+
}],
|
|
400
|
+
exportAs: ["cmatPopover"],
|
|
401
|
+
ngImport: i0,
|
|
402
|
+
template: "<ng-template>\r\n <div\r\n class=\"cmat-popover-panel shadow\"\r\n role=\"dialog\"\r\n [ngClass]=\"classList\"\r\n [ngStyle]=\"popoverPanelStyles()\"\r\n [class.zoom-in-animation]=\"!disableAnimation\"\r\n (keydown)=\"handleKeydown($event)\"\r\n (click)=\"onClick()\"\r\n (focus)=\"onFocus()\"\r\n (mouseover)=\"onMouseOver()\"\r\n (mouseleave)=\"onMouseLeave()\"\r\n >\r\n <div\r\n class=\"cmat-popover-direction-arrow\"\r\n [ngStyle]=\"popoverArrowStyles()\"\r\n ></div>\r\n <div\r\n class=\"cmat-popover-content\"\r\n [ngStyle]=\"popoverContentStyles()\"\r\n [cdkTrapFocus]=\"focusTrapEnabled\"\r\n [cdkTrapFocusAutoCapture]=\"focusTrapAutoCaptureEnabled\"\r\n >\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</ng-template>\r\n",
|
|
403
|
+
styles: [".cmat-popover-panel{max-height:calc(100vh - 48px);padding:.5rem;border-radius:.5rem;font-size:1rem;border-top-width:1px;transform:scale(1)}.cmat-popover-panel[class*=cmat-popover-below]{border-top-width:0;margin-top:calc(.5em + 2px)}.cmat-popover-panel[class*=cmat-popover-above]{margin-bottom:calc(.5em + 2px)}.cmat-popover-panel[class*=cmat-popover-before]{margin-right:calc(.5em + 2px)}[dir=rtl] .cmat-popover-panel[class*=cmat-popover-before]{margin-right:auto;margin-left:calc(.5em + 2px)}.cmat-popover-panel[class*=cmat-popover-after]{margin-left:calc(.5em + 2px)}[dir=rtl] .cmat-popover-panel[class*=cmat-popover-after]{margin-left:auto;margin-right:calc(.5em + 2px)}.cmat-popover-direction-arrow{position:absolute}.cmat-popover-direction-arrow:after,.cmat-popover-direction-arrow:before{position:absolute;display:inline-block;border-style:solid;content:\"\"}.cmat-popover-direction-arrow:before{border-width:.5em;border-color:var(--cmat-divider)}.cmat-popover-direction-arrow:after{border-width:calc(.5em - 1px);border-color:var(--cmat-bg-card)}:is([class*=cmat-popover-above],[class*=cmat-popover-below]) .cmat-popover-direction-arrow{width:1em}:is([class*=cmat-popover-above],[class*=cmat-popover-below]) .cmat-popover-direction-arrow:after{left:1px}[dir=rtl] :is([class*=cmat-popover-above],[class*=cmat-popover-below]) .cmat-popover-direction-arrow:after{right:1px;left:auto}:is([class*=cmat-popover-above],[class*=cmat-popover-below]) .cmat-popover-direction-arrow:after,:is([class*=cmat-popover-above],[class*=cmat-popover-below]) .cmat-popover-direction-arrow:before{border-left-color:#0000;border-right-color:#0000}[class*=cmat-popover-below] .cmat-popover-direction-arrow{top:0}[class*=cmat-popover-below] .cmat-popover-direction-arrow:after,[class*=cmat-popover-below] .cmat-popover-direction-arrow:before{bottom:0;border-top-width:0}[class*=cmat-popover-above] .cmat-popover-direction-arrow{bottom:0}[class*=cmat-popover-above] .cmat-popover-direction-arrow:after,[class*=cmat-popover-above] .cmat-popover-direction-arrow:before{top:0;border-bottom-width:0}:is([class*=cmat-popover-after],[class*=cmat-popover-before]) .cmat-popover-direction-arrow{height:1em}:is([class*=cmat-popover-after],[class*=cmat-popover-before]) .cmat-popover-direction-arrow:after{top:1px}:is([class*=cmat-popover-after],[class*=cmat-popover-before]) .cmat-popover-direction-arrow:after,:is([class*=cmat-popover-after],[class*=cmat-popover-before]) .cmat-popover-direction-arrow:before{border-top-color:#0000;border-bottom-color:#0000}[class*=cmat-popover-before] .cmat-popover-direction-arrow{right:0}[class*=cmat-popover-before] .cmat-popover-direction-arrow:after,[class*=cmat-popover-before] .cmat-popover-direction-arrow:before{left:0;border-right-width:0}[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow{right:auto;left:0}[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow:after,[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow:before{left:auto;right:0;border-left-width:0}[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow:before{border-right-width:.5em}[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow:after{border-right-width:calc(.5em - 1px)}[class*=cmat-popover-after] .cmat-popover-direction-arrow{left:0}[class*=cmat-popover-after] .cmat-popover-direction-arrow:after,[class*=cmat-popover-after] .cmat-popover-direction-arrow:before{right:0;border-left-width:0}[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow{left:auto;right:0}[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow:after,[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow:before{right:auto;left:0;border-right-width:0}[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow:before{border-left-width:.5em}[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow:after{border-left-width:calc(.5em - 1px)}\n", ".zoom-in-animation{opacity:1;transform:scale(1);transition:all 225ms cubic-bezier(0,0,.2,1)}@starting-style{.zoom-in-animation{opacity:0;transform:scale(.5)}}.zoom-out-animation{opacity:0;transform:scale(.5);transition:all 195ms cubic-bezier(.4,0,1,1)}@starting-style{.zoom-out-animation{opacity:1;transform:scale(1)}}\n"],
|
|
404
|
+
dependencies: [
|
|
405
|
+
{
|
|
406
|
+
kind: "directive",
|
|
407
|
+
type: NgStyle,
|
|
408
|
+
selector: "[ngStyle]",
|
|
409
|
+
inputs: ["ngStyle"]
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
kind: "directive",
|
|
413
|
+
type: NgClass,
|
|
414
|
+
selector: "[ngClass]",
|
|
415
|
+
inputs: ["class", "ngClass"]
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
kind: "ngmodule",
|
|
419
|
+
type: A11yModule
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
kind: "directive",
|
|
423
|
+
type: i1.CdkTrapFocus,
|
|
424
|
+
selector: "[cdkTrapFocus]",
|
|
425
|
+
inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"],
|
|
426
|
+
exportAs: ["cdkTrapFocus"]
|
|
427
|
+
}
|
|
428
|
+
],
|
|
429
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
430
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
435
|
+
minVersion: "12.0.0",
|
|
436
|
+
version: "22.3.0",
|
|
437
|
+
ngImport: i0,
|
|
438
|
+
type: CmatPopoverComponent,
|
|
439
|
+
decorators: [{
|
|
440
|
+
type: Component,
|
|
441
|
+
args: [{
|
|
442
|
+
selector: "cmat-popover",
|
|
443
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
444
|
+
encapsulation: ViewEncapsulation.None,
|
|
445
|
+
exportAs: "cmatPopover",
|
|
446
|
+
imports: [
|
|
447
|
+
NgStyle,
|
|
448
|
+
NgClass,
|
|
449
|
+
A11yModule
|
|
450
|
+
],
|
|
451
|
+
template: "<ng-template>\r\n <div\r\n class=\"cmat-popover-panel shadow\"\r\n role=\"dialog\"\r\n [ngClass]=\"classList\"\r\n [ngStyle]=\"popoverPanelStyles()\"\r\n [class.zoom-in-animation]=\"!disableAnimation\"\r\n (keydown)=\"handleKeydown($event)\"\r\n (click)=\"onClick()\"\r\n (focus)=\"onFocus()\"\r\n (mouseover)=\"onMouseOver()\"\r\n (mouseleave)=\"onMouseLeave()\"\r\n >\r\n <div\r\n class=\"cmat-popover-direction-arrow\"\r\n [ngStyle]=\"popoverArrowStyles()\"\r\n ></div>\r\n <div\r\n class=\"cmat-popover-content\"\r\n [ngStyle]=\"popoverContentStyles()\"\r\n [cdkTrapFocus]=\"focusTrapEnabled\"\r\n [cdkTrapFocusAutoCapture]=\"focusTrapAutoCaptureEnabled\"\r\n >\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</ng-template>\r\n",
|
|
452
|
+
styles: [".cmat-popover-panel{max-height:calc(100vh - 48px);padding:.5rem;border-radius:.5rem;font-size:1rem;border-top-width:1px;transform:scale(1)}.cmat-popover-panel[class*=cmat-popover-below]{border-top-width:0;margin-top:calc(.5em + 2px)}.cmat-popover-panel[class*=cmat-popover-above]{margin-bottom:calc(.5em + 2px)}.cmat-popover-panel[class*=cmat-popover-before]{margin-right:calc(.5em + 2px)}[dir=rtl] .cmat-popover-panel[class*=cmat-popover-before]{margin-right:auto;margin-left:calc(.5em + 2px)}.cmat-popover-panel[class*=cmat-popover-after]{margin-left:calc(.5em + 2px)}[dir=rtl] .cmat-popover-panel[class*=cmat-popover-after]{margin-left:auto;margin-right:calc(.5em + 2px)}.cmat-popover-direction-arrow{position:absolute}.cmat-popover-direction-arrow:after,.cmat-popover-direction-arrow:before{position:absolute;display:inline-block;border-style:solid;content:\"\"}.cmat-popover-direction-arrow:before{border-width:.5em;border-color:var(--cmat-divider)}.cmat-popover-direction-arrow:after{border-width:calc(.5em - 1px);border-color:var(--cmat-bg-card)}:is([class*=cmat-popover-above],[class*=cmat-popover-below]) .cmat-popover-direction-arrow{width:1em}:is([class*=cmat-popover-above],[class*=cmat-popover-below]) .cmat-popover-direction-arrow:after{left:1px}[dir=rtl] :is([class*=cmat-popover-above],[class*=cmat-popover-below]) .cmat-popover-direction-arrow:after{right:1px;left:auto}:is([class*=cmat-popover-above],[class*=cmat-popover-below]) .cmat-popover-direction-arrow:after,:is([class*=cmat-popover-above],[class*=cmat-popover-below]) .cmat-popover-direction-arrow:before{border-left-color:#0000;border-right-color:#0000}[class*=cmat-popover-below] .cmat-popover-direction-arrow{top:0}[class*=cmat-popover-below] .cmat-popover-direction-arrow:after,[class*=cmat-popover-below] .cmat-popover-direction-arrow:before{bottom:0;border-top-width:0}[class*=cmat-popover-above] .cmat-popover-direction-arrow{bottom:0}[class*=cmat-popover-above] .cmat-popover-direction-arrow:after,[class*=cmat-popover-above] .cmat-popover-direction-arrow:before{top:0;border-bottom-width:0}:is([class*=cmat-popover-after],[class*=cmat-popover-before]) .cmat-popover-direction-arrow{height:1em}:is([class*=cmat-popover-after],[class*=cmat-popover-before]) .cmat-popover-direction-arrow:after{top:1px}:is([class*=cmat-popover-after],[class*=cmat-popover-before]) .cmat-popover-direction-arrow:after,:is([class*=cmat-popover-after],[class*=cmat-popover-before]) .cmat-popover-direction-arrow:before{border-top-color:#0000;border-bottom-color:#0000}[class*=cmat-popover-before] .cmat-popover-direction-arrow{right:0}[class*=cmat-popover-before] .cmat-popover-direction-arrow:after,[class*=cmat-popover-before] .cmat-popover-direction-arrow:before{left:0;border-right-width:0}[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow{right:auto;left:0}[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow:after,[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow:before{left:auto;right:0;border-left-width:0}[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow:before{border-right-width:.5em}[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow:after{border-right-width:calc(.5em - 1px)}[class*=cmat-popover-after] .cmat-popover-direction-arrow{left:0}[class*=cmat-popover-after] .cmat-popover-direction-arrow:after,[class*=cmat-popover-after] .cmat-popover-direction-arrow:before{right:0;border-left-width:0}[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow{left:auto;right:0}[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow:after,[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow:before{right:auto;left:0;border-right-width:0}[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow:before{border-left-width:.5em}[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow:after{border-left-width:calc(.5em - 1px)}\n", ".zoom-in-animation{opacity:1;transform:scale(1);transition:all 225ms cubic-bezier(0,0,.2,1)}@starting-style{.zoom-in-animation{opacity:0;transform:scale(.5)}}.zoom-out-animation{opacity:0;transform:scale(.5);transition:all 195ms cubic-bezier(.4,0,1,1)}@starting-style{.zoom-out-animation{opacity:1;transform:scale(1)}}\n"]
|
|
453
|
+
}]
|
|
454
|
+
}],
|
|
455
|
+
ctorParameters: () => [],
|
|
456
|
+
propDecorators: {
|
|
457
|
+
closed: [{
|
|
458
|
+
type: i0.Output,
|
|
459
|
+
args: ["closed"]
|
|
460
|
+
}],
|
|
461
|
+
templateRef: [{
|
|
462
|
+
type: i0.ViewChild,
|
|
463
|
+
args: [i0.forwardRef(() => TemplateRef), { isSignal: true }]
|
|
464
|
+
}],
|
|
465
|
+
popoverPanelStyles: [{
|
|
466
|
+
type: i0.Input,
|
|
467
|
+
args: [{
|
|
468
|
+
isSignal: true,
|
|
469
|
+
alias: "popoverPanelStyles",
|
|
470
|
+
required: false
|
|
471
|
+
}]
|
|
472
|
+
}],
|
|
473
|
+
popoverContentStyles: [{
|
|
474
|
+
type: i0.Input,
|
|
475
|
+
args: [{
|
|
476
|
+
isSignal: true,
|
|
477
|
+
alias: "popoverContentStyles",
|
|
478
|
+
required: false
|
|
479
|
+
}]
|
|
480
|
+
}],
|
|
481
|
+
popoverArrowStyles: [{
|
|
482
|
+
type: i0.Input,
|
|
483
|
+
args: [{
|
|
484
|
+
isSignal: true,
|
|
485
|
+
alias: "popoverArrowStyles",
|
|
486
|
+
required: false
|
|
487
|
+
}]
|
|
488
|
+
}, {
|
|
489
|
+
type: i0.Output,
|
|
490
|
+
args: ["popoverArrowStylesChange"]
|
|
491
|
+
}],
|
|
492
|
+
position: [{ type: Input }],
|
|
493
|
+
triggerEvent: [{ type: Input }],
|
|
494
|
+
scrollStrategy: [{ type: Input }],
|
|
495
|
+
enterDelay: [{ type: Input }],
|
|
496
|
+
leaveDelay: [{ type: Input }],
|
|
497
|
+
xOffset: [{ type: Input }],
|
|
498
|
+
yOffset: [{ type: Input }],
|
|
499
|
+
arrowOffsetX: [{ type: Input }],
|
|
500
|
+
arrowOffsetY: [{ type: Input }],
|
|
501
|
+
arrowWidth: [{ type: Input }],
|
|
502
|
+
arrowHeight: [{ type: Input }],
|
|
503
|
+
closeOnPanelClick: [{ type: Input }],
|
|
504
|
+
closeOnBackdropClick: [{ type: Input }],
|
|
505
|
+
disableAnimation: [{ type: Input }],
|
|
506
|
+
focusTrapEnabled: [{ type: Input }],
|
|
507
|
+
focusTrapAutoCaptureEnabled: [{ type: Input }],
|
|
508
|
+
panelClass: [{ type: Input }]
|
|
509
|
+
}
|
|
510
|
+
});
|
|
511
|
+
var CmatPopoverTriggerDirective = class CmatPopoverTriggerDirective {
|
|
512
|
+
constructor() {
|
|
513
|
+
this.ariaHaspopup = true;
|
|
514
|
+
this.popoverOpened = output();
|
|
515
|
+
this.popoverClosed = output();
|
|
516
|
+
this.popover = input.required({
|
|
517
|
+
...ngDevMode ? { debugName: "popover" } : /* istanbul ignore next */ {},
|
|
518
|
+
alias: "cmatPopoverTriggerFor"
|
|
519
|
+
});
|
|
520
|
+
this.targetElement = input(void 0, {
|
|
521
|
+
...ngDevMode ? { debugName: "targetElement" } : /* istanbul ignore next */ {},
|
|
522
|
+
alias: "cmatPopoverTargetAt"
|
|
523
|
+
});
|
|
524
|
+
this.triggerEvent = input.required({
|
|
525
|
+
...ngDevMode ? { debugName: "triggerEvent" } : /* istanbul ignore next */ {},
|
|
526
|
+
alias: "cmatPopoverTriggerOn"
|
|
527
|
+
});
|
|
528
|
+
this._overlay = inject(Overlay);
|
|
529
|
+
this._elementRef = inject(ElementRef);
|
|
530
|
+
this._viewContainerRef = inject(ViewContainerRef);
|
|
531
|
+
this._dir = inject(Directionality, { optional: true });
|
|
532
|
+
this._destroyRef = inject(DestroyRef);
|
|
533
|
+
this._overlayRef = null;
|
|
534
|
+
this._popoverOpen = false;
|
|
535
|
+
this._halt = false;
|
|
536
|
+
this._positionSubscription = null;
|
|
537
|
+
this._leaveTimeoutId = null;
|
|
538
|
+
this._mouseoverTimer = null;
|
|
539
|
+
this._openedByMouse = false;
|
|
540
|
+
effect(() => {
|
|
541
|
+
const triggerEvent = this.triggerEvent();
|
|
542
|
+
untracked(() => {
|
|
543
|
+
this._setCurrentConfig(triggerEvent);
|
|
544
|
+
});
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
get popoverOpen() {
|
|
548
|
+
return this._popoverOpen;
|
|
549
|
+
}
|
|
550
|
+
get dir() {
|
|
551
|
+
return this._dir?.value === "rtl" ? "rtl" : "ltr";
|
|
552
|
+
}
|
|
553
|
+
onClick() {
|
|
554
|
+
if (this.popover().triggerEvent === "click") this.togglePopover();
|
|
555
|
+
}
|
|
556
|
+
onMouseEnter() {
|
|
557
|
+
this._halt = false;
|
|
558
|
+
const popover = this.popover();
|
|
559
|
+
if (popover.triggerEvent === "hover") this._mouseoverTimer = Number(setTimeout(() => {
|
|
560
|
+
this.openPopover();
|
|
561
|
+
}, popover.enterDelay));
|
|
562
|
+
}
|
|
563
|
+
onMouseLeave() {
|
|
564
|
+
const popover = this.popover();
|
|
565
|
+
if (popover.triggerEvent === "hover") {
|
|
566
|
+
if (this._mouseoverTimer !== null) {
|
|
567
|
+
clearTimeout(this._mouseoverTimer);
|
|
568
|
+
this._mouseoverTimer = null;
|
|
569
|
+
}
|
|
570
|
+
if (this._popoverOpen) this._leaveTimeoutId = window.setTimeout(() => {
|
|
571
|
+
this._leaveTimeoutId = null;
|
|
572
|
+
if (!this.popover().closeDisabled) this.closePopover();
|
|
573
|
+
}, popover.leaveDelay);
|
|
574
|
+
else this._halt = true;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
handleMousedown(event) {
|
|
578
|
+
if (event && !isFakeMousedownFromScreenReader(event)) this._openedByMouse = true;
|
|
579
|
+
}
|
|
580
|
+
ngAfterViewInit() {
|
|
581
|
+
this._checkPopover();
|
|
582
|
+
this.popover().closed.subscribe(() => this.closePopover());
|
|
583
|
+
}
|
|
584
|
+
ngOnDestroy() {
|
|
585
|
+
this._clearLeaveTimeout();
|
|
586
|
+
this.destroyPopover();
|
|
587
|
+
}
|
|
588
|
+
togglePopover() {
|
|
589
|
+
return this._popoverOpen ? this.closePopover() : this.openPopover();
|
|
590
|
+
}
|
|
591
|
+
openPopover() {
|
|
592
|
+
if (!this._popoverOpen && !this._halt) {
|
|
593
|
+
this._createOverlay().attach(this._portal);
|
|
594
|
+
this._subscribeToBackdrop();
|
|
595
|
+
this._subscribeToDetachments();
|
|
596
|
+
this._initPopover();
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
closePopover() {
|
|
600
|
+
if (this._overlayRef) {
|
|
601
|
+
this._overlayRef.detach();
|
|
602
|
+
this._resetPopover();
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
destroyPopover() {
|
|
606
|
+
if (this._mouseoverTimer !== null) {
|
|
607
|
+
clearTimeout(this._mouseoverTimer);
|
|
608
|
+
this._mouseoverTimer = null;
|
|
609
|
+
}
|
|
610
|
+
this._clearLeaveTimeout();
|
|
611
|
+
this._cleanUpPositionSubscription();
|
|
612
|
+
if (this._overlayRef) {
|
|
613
|
+
this._overlayRef.dispose();
|
|
614
|
+
this._overlayRef = null;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
focus() {
|
|
618
|
+
this._elementRef.nativeElement.focus();
|
|
619
|
+
}
|
|
620
|
+
_subscribeToBackdrop() {
|
|
621
|
+
if (this._overlayRef) {
|
|
622
|
+
if (this.triggerEvent() === "click" && this.popover().closeOnBackdropClick === true) this._overlayRef.backdropClick().pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {
|
|
623
|
+
this.popover().emitCloseEvent();
|
|
624
|
+
});
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
_subscribeToDetachments() {
|
|
628
|
+
if (this._overlayRef) this._overlayRef.detachments().pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {
|
|
629
|
+
this._setPopoverClosed();
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
_initPopover() {
|
|
633
|
+
this._setPopoverOpened();
|
|
634
|
+
}
|
|
635
|
+
_resetPopover() {
|
|
636
|
+
this._setPopoverClosed();
|
|
637
|
+
if (!this._openedByMouse) this.focus();
|
|
638
|
+
this._openedByMouse = false;
|
|
639
|
+
}
|
|
640
|
+
_setPopoverOpened() {
|
|
641
|
+
if (!this._popoverOpen) {
|
|
642
|
+
this._popoverOpen = true;
|
|
643
|
+
this.popoverOpened.emit();
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
_setPopoverClosed() {
|
|
647
|
+
if (this._popoverOpen) {
|
|
648
|
+
this._popoverOpen = false;
|
|
649
|
+
this.popoverClosed.emit();
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
_checkPopover() {
|
|
653
|
+
if (!this.popover()) throwCmatPopoverMissingError();
|
|
654
|
+
}
|
|
655
|
+
_createOverlay() {
|
|
656
|
+
if (!this._overlayRef) {
|
|
657
|
+
const templateRef = this.popover().templateRef();
|
|
658
|
+
if (!templateRef) throw new Error("Popover templateRef is not available");
|
|
659
|
+
this._portal = new TemplatePortal(templateRef, this._viewContainerRef);
|
|
660
|
+
const config = this._getOverlayConfig();
|
|
661
|
+
this._subscribeToPositions(config.positionStrategy);
|
|
662
|
+
this._overlayRef = this._overlay.create(config);
|
|
663
|
+
}
|
|
664
|
+
return this._overlayRef;
|
|
665
|
+
}
|
|
666
|
+
_getOverlayConfig() {
|
|
667
|
+
const overlayState = new OverlayConfig();
|
|
668
|
+
overlayState.positionStrategy = this._getPosition();
|
|
669
|
+
if (this.triggerEvent() === "click") {
|
|
670
|
+
overlayState.hasBackdrop = true;
|
|
671
|
+
overlayState.backdropClass = "cdk-overlay-transparent-backdrop";
|
|
672
|
+
}
|
|
673
|
+
overlayState.direction = this._dir;
|
|
674
|
+
overlayState.scrollStrategy = this._getOverlayScrollStrategy(this.popover().scrollStrategy);
|
|
675
|
+
return overlayState;
|
|
676
|
+
}
|
|
677
|
+
_getOverlayScrollStrategy(strategy) {
|
|
678
|
+
switch (strategy) {
|
|
679
|
+
case "noop": return this._overlay.scrollStrategies.noop();
|
|
680
|
+
case "close": return this._overlay.scrollStrategies.close();
|
|
681
|
+
case "block": return this._overlay.scrollStrategies.block();
|
|
682
|
+
default: return this._overlay.scrollStrategies.reposition();
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
_subscribeToPositions(position) {
|
|
686
|
+
this._cleanUpPositionSubscription();
|
|
687
|
+
this._positionSubscription = position.positionChanges.subscribe((change) => {
|
|
688
|
+
const posX = change.connectionPair.overlayX === "start" ? "after" : change.connectionPair.overlayX === "end" ? "before" : "center";
|
|
689
|
+
const posY = change.connectionPair.overlayY === "top" ? "below" : change.connectionPair.overlayY === "bottom" ? "above" : "center";
|
|
690
|
+
const popover = this.popover();
|
|
691
|
+
const pos = popover.position[0] === "above" || popover.position[0] === "below" ? [posY, posX] : [posX, posY];
|
|
692
|
+
this.popover().setCurrentStyles(pos);
|
|
693
|
+
this.popover().setPositionClasses(pos);
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
_getPosition() {
|
|
697
|
+
const popover = this.popover();
|
|
698
|
+
const [originX, origin2ndX, origin3rdX] = popover.position[0] === "before" || popover.position[1] === "after" ? [
|
|
699
|
+
"start",
|
|
700
|
+
"center",
|
|
701
|
+
"end"
|
|
702
|
+
] : popover.position[0] === "after" || popover.position[1] === "before" ? [
|
|
703
|
+
"end",
|
|
704
|
+
"center",
|
|
705
|
+
"start"
|
|
706
|
+
] : [
|
|
707
|
+
"center",
|
|
708
|
+
"start",
|
|
709
|
+
"end"
|
|
710
|
+
];
|
|
711
|
+
const popoverValue = this.popover();
|
|
712
|
+
const [originY, origin2ndY, origin3rdY] = popoverValue.position[0] === "above" || popoverValue.position[1] === "below" ? [
|
|
713
|
+
"top",
|
|
714
|
+
"center",
|
|
715
|
+
"bottom"
|
|
716
|
+
] : popoverValue.position[0] === "below" || popoverValue.position[1] === "above" ? [
|
|
717
|
+
"bottom",
|
|
718
|
+
"center",
|
|
719
|
+
"top"
|
|
720
|
+
] : [
|
|
721
|
+
"center",
|
|
722
|
+
"top",
|
|
723
|
+
"bottom"
|
|
724
|
+
];
|
|
725
|
+
const popoverVal = this.popover();
|
|
726
|
+
const [overlayX, overlayFallbackX] = popoverVal.position[0] === "below" || popoverVal.position[0] === "above" ? [originX, originX] : popoverVal.position[0] === "before" ? ["end", "start"] : ["start", "end"];
|
|
727
|
+
const popoverInput = this.popover();
|
|
728
|
+
const [overlayY, overlayFallbackY] = popoverInput.position[0] === "before" || popoverInput.position[0] === "after" ? [originY, originY] : popoverInput.position[0] === "below" ? ["top", "bottom"] : ["bottom", "top"];
|
|
729
|
+
const originFallbackX = overlayX;
|
|
730
|
+
const originFallbackY = overlayY;
|
|
731
|
+
const popover1 = this.popover();
|
|
732
|
+
const offsetX = popover1.xOffset && !isNaN(Number(popover1.xOffset)) ? Number(this.dir === "ltr" ? popover1.xOffset : -popover1.xOffset) : 0;
|
|
733
|
+
const popover2 = this.popover();
|
|
734
|
+
const offsetY = popover2.yOffset && !isNaN(Number(popover2.yOffset)) ? Number(popover2.yOffset) : 0;
|
|
735
|
+
let element = this._elementRef;
|
|
736
|
+
const popover3 = this.popover();
|
|
737
|
+
const targetElement = this.targetElement();
|
|
738
|
+
if (typeof targetElement !== "undefined") {
|
|
739
|
+
popover3.containerPositioning = true;
|
|
740
|
+
element = targetElement._elementRef;
|
|
741
|
+
}
|
|
742
|
+
let positions = [{
|
|
743
|
+
originX,
|
|
744
|
+
originY,
|
|
745
|
+
overlayX,
|
|
746
|
+
overlayY
|
|
747
|
+
}];
|
|
748
|
+
if (popover3.position[0] === "above" || popover3.position[0] === "below") positions = [
|
|
749
|
+
{
|
|
750
|
+
originX,
|
|
751
|
+
originY,
|
|
752
|
+
overlayX,
|
|
753
|
+
overlayY,
|
|
754
|
+
offsetY
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
originX: origin2ndX,
|
|
758
|
+
originY,
|
|
759
|
+
overlayX: origin2ndX,
|
|
760
|
+
overlayY,
|
|
761
|
+
offsetY
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
originX: origin3rdX,
|
|
765
|
+
originY,
|
|
766
|
+
overlayX: origin3rdX,
|
|
767
|
+
overlayY,
|
|
768
|
+
offsetY
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
originX,
|
|
772
|
+
originY: originFallbackY,
|
|
773
|
+
overlayX,
|
|
774
|
+
overlayY: overlayFallbackY,
|
|
775
|
+
offsetY: -offsetY
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
originX: origin2ndX,
|
|
779
|
+
originY: originFallbackY,
|
|
780
|
+
overlayX: origin2ndX,
|
|
781
|
+
overlayY: overlayFallbackY,
|
|
782
|
+
offsetY: -offsetY
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
originX: origin3rdX,
|
|
786
|
+
originY: originFallbackY,
|
|
787
|
+
overlayX: origin3rdX,
|
|
788
|
+
overlayY: overlayFallbackY,
|
|
789
|
+
offsetY: -offsetY
|
|
790
|
+
}
|
|
791
|
+
];
|
|
792
|
+
if (popover3.position[0] === "before" || popover3.position[0] === "after") positions = [
|
|
793
|
+
{
|
|
794
|
+
originX,
|
|
795
|
+
originY,
|
|
796
|
+
overlayX,
|
|
797
|
+
overlayY,
|
|
798
|
+
offsetX
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
originX,
|
|
802
|
+
originY: origin2ndY,
|
|
803
|
+
overlayX,
|
|
804
|
+
overlayY: origin2ndY,
|
|
805
|
+
offsetX
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
originX,
|
|
809
|
+
originY: origin3rdY,
|
|
810
|
+
overlayX,
|
|
811
|
+
overlayY: origin3rdY,
|
|
812
|
+
offsetX
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
originX: originFallbackX,
|
|
816
|
+
originY,
|
|
817
|
+
overlayX: overlayFallbackX,
|
|
818
|
+
overlayY,
|
|
819
|
+
offsetX: -offsetX
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
originX: originFallbackX,
|
|
823
|
+
originY: origin2ndY,
|
|
824
|
+
overlayX: overlayFallbackX,
|
|
825
|
+
overlayY: origin2ndY,
|
|
826
|
+
offsetX: -offsetX
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
originX: originFallbackX,
|
|
830
|
+
originY: origin3rdY,
|
|
831
|
+
overlayX: overlayFallbackX,
|
|
832
|
+
overlayY: origin3rdY,
|
|
833
|
+
offsetX: -offsetX
|
|
834
|
+
}
|
|
835
|
+
];
|
|
836
|
+
return this._overlay.position().flexibleConnectedTo(element).withLockedPosition().withPositions(positions).withDefaultOffsetX(offsetX).withDefaultOffsetY(offsetY);
|
|
837
|
+
}
|
|
838
|
+
_cleanUpPositionSubscription() {
|
|
839
|
+
if (this._positionSubscription) {
|
|
840
|
+
this._positionSubscription.unsubscribe();
|
|
841
|
+
this._positionSubscription = null;
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
_clearLeaveTimeout() {
|
|
845
|
+
if (this._leaveTimeoutId !== null) {
|
|
846
|
+
clearTimeout(this._leaveTimeoutId);
|
|
847
|
+
this._leaveTimeoutId = null;
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
_setCurrentConfig(triggerEvent) {
|
|
851
|
+
const popover = this.popover();
|
|
852
|
+
if (triggerEvent) popover.triggerEvent = triggerEvent;
|
|
853
|
+
popover.setCurrentStyles();
|
|
854
|
+
}
|
|
855
|
+
static {
|
|
856
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
857
|
+
minVersion: "12.0.0",
|
|
858
|
+
version: "22.3.0",
|
|
859
|
+
ngImport: i0,
|
|
860
|
+
type: CmatPopoverTriggerDirective,
|
|
861
|
+
deps: [],
|
|
862
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
static {
|
|
866
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
867
|
+
minVersion: "17.1.0",
|
|
868
|
+
version: "22.3.0",
|
|
869
|
+
type: CmatPopoverTriggerDirective,
|
|
870
|
+
isStandalone: true,
|
|
871
|
+
selector: "[cmatPopoverTriggerFor],[cmatPopoverTargetAt],[cmatPopoverTriggerOn]",
|
|
872
|
+
inputs: {
|
|
873
|
+
popover: {
|
|
874
|
+
classPropertyName: "popover",
|
|
875
|
+
publicName: "cmatPopoverTriggerFor",
|
|
876
|
+
isSignal: true,
|
|
877
|
+
isRequired: true,
|
|
878
|
+
transformFunction: null
|
|
879
|
+
},
|
|
880
|
+
targetElement: {
|
|
881
|
+
classPropertyName: "targetElement",
|
|
882
|
+
publicName: "cmatPopoverTargetAt",
|
|
883
|
+
isSignal: true,
|
|
884
|
+
isRequired: false,
|
|
885
|
+
transformFunction: null
|
|
886
|
+
},
|
|
887
|
+
triggerEvent: {
|
|
888
|
+
classPropertyName: "triggerEvent",
|
|
889
|
+
publicName: "cmatPopoverTriggerOn",
|
|
890
|
+
isSignal: true,
|
|
891
|
+
isRequired: true,
|
|
892
|
+
transformFunction: null
|
|
893
|
+
}
|
|
894
|
+
},
|
|
895
|
+
outputs: {
|
|
896
|
+
popoverOpened: "popoverOpened",
|
|
897
|
+
popoverClosed: "popoverClosed"
|
|
898
|
+
},
|
|
899
|
+
host: {
|
|
900
|
+
listeners: {
|
|
901
|
+
"click": "onClick($event)",
|
|
902
|
+
"mouseenter": "onMouseEnter($event)",
|
|
903
|
+
"mouseleave": "onMouseLeave($event)",
|
|
904
|
+
"mousedown": "handleMousedown($event)"
|
|
905
|
+
},
|
|
906
|
+
properties: { "attr.aria-haspopup": "this.ariaHaspopup" }
|
|
907
|
+
},
|
|
908
|
+
exportAs: ["cmatPopoverTrigger"],
|
|
909
|
+
ngImport: i0
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
};
|
|
913
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
914
|
+
minVersion: "12.0.0",
|
|
915
|
+
version: "22.3.0",
|
|
916
|
+
ngImport: i0,
|
|
917
|
+
type: CmatPopoverTriggerDirective,
|
|
918
|
+
decorators: [{
|
|
919
|
+
type: Directive,
|
|
920
|
+
args: [{
|
|
921
|
+
selector: "[cmatPopoverTriggerFor],[cmatPopoverTargetAt],[cmatPopoverTriggerOn]",
|
|
922
|
+
exportAs: "cmatPopoverTrigger"
|
|
923
|
+
}]
|
|
924
|
+
}],
|
|
925
|
+
ctorParameters: () => [],
|
|
926
|
+
propDecorators: {
|
|
927
|
+
ariaHaspopup: [{
|
|
928
|
+
type: HostBinding,
|
|
929
|
+
args: ["attr.aria-haspopup"]
|
|
930
|
+
}],
|
|
931
|
+
popoverOpened: [{
|
|
932
|
+
type: i0.Output,
|
|
933
|
+
args: ["popoverOpened"]
|
|
934
|
+
}],
|
|
935
|
+
popoverClosed: [{
|
|
936
|
+
type: i0.Output,
|
|
937
|
+
args: ["popoverClosed"]
|
|
938
|
+
}],
|
|
939
|
+
popover: [{
|
|
940
|
+
type: i0.Input,
|
|
941
|
+
args: [{
|
|
942
|
+
isSignal: true,
|
|
943
|
+
alias: "cmatPopoverTriggerFor",
|
|
944
|
+
required: true
|
|
945
|
+
}]
|
|
946
|
+
}],
|
|
947
|
+
targetElement: [{
|
|
948
|
+
type: i0.Input,
|
|
949
|
+
args: [{
|
|
950
|
+
isSignal: true,
|
|
951
|
+
alias: "cmatPopoverTargetAt",
|
|
952
|
+
required: false
|
|
953
|
+
}]
|
|
954
|
+
}],
|
|
955
|
+
triggerEvent: [{
|
|
956
|
+
type: i0.Input,
|
|
957
|
+
args: [{
|
|
958
|
+
isSignal: true,
|
|
959
|
+
alias: "cmatPopoverTriggerOn",
|
|
960
|
+
required: true
|
|
961
|
+
}]
|
|
962
|
+
}],
|
|
963
|
+
onClick: [{
|
|
964
|
+
type: HostListener,
|
|
965
|
+
args: ["click", ["$event"]]
|
|
966
|
+
}],
|
|
967
|
+
onMouseEnter: [{
|
|
968
|
+
type: HostListener,
|
|
969
|
+
args: ["mouseenter", ["$event"]]
|
|
970
|
+
}],
|
|
971
|
+
onMouseLeave: [{
|
|
972
|
+
type: HostListener,
|
|
973
|
+
args: ["mouseleave", ["$event"]]
|
|
974
|
+
}],
|
|
975
|
+
handleMousedown: [{
|
|
976
|
+
type: HostListener,
|
|
977
|
+
args: ["mousedown", ["$event"]]
|
|
978
|
+
}]
|
|
979
|
+
}
|
|
980
|
+
});
|
|
981
|
+
var CmatPopoverTargetDirective = class CmatPopoverTargetDirective {
|
|
982
|
+
constructor() {
|
|
983
|
+
this.elementRef = inject(ElementRef);
|
|
984
|
+
}
|
|
985
|
+
static {
|
|
986
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
987
|
+
minVersion: "12.0.0",
|
|
988
|
+
version: "22.3.0",
|
|
989
|
+
ngImport: i0,
|
|
990
|
+
type: CmatPopoverTargetDirective,
|
|
991
|
+
deps: [],
|
|
992
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
993
|
+
});
|
|
994
|
+
}
|
|
995
|
+
static {
|
|
996
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
997
|
+
minVersion: "14.0.0",
|
|
998
|
+
version: "22.3.0",
|
|
999
|
+
type: CmatPopoverTargetDirective,
|
|
1000
|
+
isStandalone: true,
|
|
1001
|
+
selector: "cmat-popover-target, [cmatPopoverTarget]",
|
|
1002
|
+
exportAs: ["cmatPopoverTarget"],
|
|
1003
|
+
ngImport: i0
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
};
|
|
1007
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1008
|
+
minVersion: "12.0.0",
|
|
1009
|
+
version: "22.3.0",
|
|
1010
|
+
ngImport: i0,
|
|
1011
|
+
type: CmatPopoverTargetDirective,
|
|
1012
|
+
decorators: [{
|
|
1013
|
+
type: Directive,
|
|
1014
|
+
args: [{
|
|
1015
|
+
selector: "cmat-popover-target, [cmatPopoverTarget]",
|
|
1016
|
+
exportAs: "cmatPopoverTarget"
|
|
1017
|
+
}]
|
|
1018
|
+
}]
|
|
1019
|
+
});
|
|
1020
|
+
export { CmatPopoverTriggerDirective as n, CmatPopoverComponent as r, CmatPopoverTargetDirective as t };
|
|
1021
|
+
|
|
1022
|
+
//# sourceMappingURL=public-api-EK51WC1y.mjs.map
|