@ng-matero/extensions 18.0.3 → 18.1.1
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/README.md +27 -2
- package/alert/alert.scss +13 -16
- package/colorpicker/colorpicker-toggle.scss +1 -1
- package/colorpicker/colorpicker.d.ts +1 -1
- package/column-resize/resize-strategy.d.ts +1 -1
- package/core/m2/_typography.scss +172 -0
- package/core/pipes/is-template-ref.pipe.d.ts +2 -2
- package/core/style/_elevation.scss +167 -0
- package/core/tokens/_m3-tokens.scss +13 -10
- package/core/tokens/_token-utils.scss +120 -30
- package/core/tokens/m2/mtx/_alert.scss +17 -9
- package/core/tokens/m2/mtx/_datetimepicker.scss +3 -3
- package/core/tokens/m2/mtx/_drawer.scss +2 -2
- package/core/tokens/m2/mtx/_grid.scss +0 -2
- package/core/tokens/m2/mtx/_popover.scss +3 -0
- package/core/tokens/m2/mtx/_select.scss +2 -4
- package/core/tokens/m3/definitions/_index.scss +8 -0
- package/core/tokens/m3/definitions/_md-ref-palette.scss +100 -0
- package/core/tokens/m3/definitions/_md-ref-typeface.scss +14 -0
- package/core/tokens/m3/definitions/_md-sys-color.scss +126 -0
- package/core/tokens/m3/definitions/_md-sys-elevation.scss +15 -0
- package/core/tokens/m3/definitions/_md-sys-motion.scss +46 -0
- package/core/tokens/m3/definitions/_md-sys-shape.scss +24 -0
- package/core/tokens/m3/definitions/_md-sys-state.scss +13 -0
- package/core/tokens/m3/definitions/_md-sys-typescale.scss +308 -0
- package/core/tokens/m3/mtx/_alert.scss +19 -9
- package/core/tokens/m3/mtx/_datetimepicker.scss +3 -3
- package/core/tokens/m3/mtx/_drawer.scss +2 -2
- package/core/tokens/m3/mtx/_grid.scss +0 -2
- package/core/tokens/m3/mtx/_popover.scss +3 -0
- package/core/tokens/m3/mtx/_select.scss +2 -2
- package/core/typography/_all-typography.scss +2 -2
- package/datetimepicker/calendar.d.ts +4 -2
- package/datetimepicker/calendar.scss +38 -0
- package/datetimepicker/datetimepicker-actions.d.ts +32 -0
- package/datetimepicker/datetimepicker-actions.scss +18 -0
- package/datetimepicker/datetimepicker-animations.d.ts +1 -1
- package/datetimepicker/datetimepicker-content.scss +40 -22
- package/datetimepicker/datetimepicker-module.d.ts +2 -1
- package/datetimepicker/datetimepicker-toggle.scss +1 -1
- package/datetimepicker/datetimepicker.d.ts +33 -3
- package/datetimepicker/public-api.d.ts +1 -0
- package/datetimepicker/time.d.ts +12 -8
- package/datetimepicker/time.scss +6 -6
- package/dialog/dialog.d.ts +1 -1
- package/drawer/drawer-config.d.ts +8 -6
- package/drawer/drawer-container.d.ts +12 -68
- package/drawer/drawer-container.scss +4 -6
- package/drawer/drawer-module.d.ts +2 -2
- package/drawer/drawer-ref.d.ts +13 -4
- package/drawer/drawer.d.ts +24 -24
- package/esm2022/alert/alert-module.mjs +5 -5
- package/esm2022/alert/alert.mjs +6 -5
- package/esm2022/button/button-loading.mjs +3 -3
- package/esm2022/button/button-module.mjs +4 -4
- package/esm2022/checkbox-group/checkbox-group-module.mjs +4 -4
- package/esm2022/checkbox-group/checkbox-group.mjs +3 -3
- package/esm2022/colorpicker/colorpicker-input.mjs +3 -3
- package/esm2022/colorpicker/colorpicker-module.mjs +4 -4
- package/esm2022/colorpicker/colorpicker-toggle.mjs +6 -6
- package/esm2022/colorpicker/colorpicker.mjs +8 -8
- package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +3 -3
- package/esm2022/column-resize/column-resize-directives/column-resize.mjs +3 -3
- package/esm2022/column-resize/column-resize-module.mjs +4 -4
- package/esm2022/column-resize/column-resize-notifier.mjs +6 -6
- package/esm2022/column-resize/column-resize.mjs +3 -3
- package/esm2022/column-resize/column-size-store.mjs +3 -3
- package/esm2022/column-resize/event-dispatcher.mjs +3 -3
- package/esm2022/column-resize/overlay-handle.mjs +3 -3
- package/esm2022/column-resize/resizable.mjs +3 -3
- package/esm2022/column-resize/resize-strategy.mjs +9 -9
- package/esm2022/core/datetime/datetime.module.mjs +8 -8
- package/esm2022/core/datetime/native-datetime-adapter.mjs +3 -3
- package/esm2022/core/pipes/is-template-ref.pipe.mjs +3 -3
- package/esm2022/core/pipes/pipes.module.mjs +4 -4
- package/esm2022/core/pipes/to-observable.pipe.mjs +3 -3
- package/esm2022/datetimepicker/calendar-body.mjs +3 -3
- package/esm2022/datetimepicker/calendar.mjs +10 -6
- package/esm2022/datetimepicker/clock.mjs +3 -3
- package/esm2022/datetimepicker/datetimepicker-actions.mjs +88 -0
- package/esm2022/datetimepicker/datetimepicker-animations.mjs +3 -3
- package/esm2022/datetimepicker/datetimepicker-input.mjs +3 -3
- package/esm2022/datetimepicker/datetimepicker-intl.mjs +3 -3
- package/esm2022/datetimepicker/datetimepicker-module.mjs +24 -7
- package/esm2022/datetimepicker/datetimepicker-toggle.mjs +6 -6
- package/esm2022/datetimepicker/datetimepicker.mjs +92 -20
- package/esm2022/datetimepicker/month-view.mjs +7 -5
- package/esm2022/datetimepicker/multi-year-view.mjs +7 -5
- package/esm2022/datetimepicker/public-api.mjs +2 -1
- package/esm2022/datetimepicker/time.mjs +29 -20
- package/esm2022/datetimepicker/year-view.mjs +7 -5
- package/esm2022/dialog/dialog-container.mjs +3 -3
- package/esm2022/dialog/dialog-module.mjs +4 -4
- package/esm2022/dialog/dialog.mjs +3 -3
- package/esm2022/drawer/drawer-config.mjs +2 -2
- package/esm2022/drawer/drawer-container.mjs +32 -196
- package/esm2022/drawer/drawer-module.mjs +7 -7
- package/esm2022/drawer/drawer-ref.mjs +27 -18
- package/esm2022/drawer/drawer.mjs +98 -121
- package/esm2022/grid/cell.mjs +3 -3
- package/esm2022/grid/column-menu.mjs +5 -5
- package/esm2022/grid/column-resize/column-resize-directives/column-resize-flex.mjs +3 -3
- package/esm2022/grid/column-resize/column-resize-directives/column-resize.mjs +3 -3
- package/esm2022/grid/column-resize/column-resize-module.mjs +8 -8
- package/esm2022/grid/column-resize/overlay-handle.mjs +3 -3
- package/esm2022/grid/column-resize/resizable-directives/resizable.mjs +3 -3
- package/esm2022/grid/column-resize/resize-strategy.mjs +3 -3
- package/esm2022/grid/expansion-toggle.mjs +3 -3
- package/esm2022/grid/grid-module.mjs +4 -4
- package/esm2022/grid/grid-pipes.mjs +21 -21
- package/esm2022/grid/grid-utils.mjs +3 -3
- package/esm2022/grid/grid.mjs +5 -5
- package/esm2022/grid/selectable-cell.mjs +3 -3
- package/esm2022/loader/loader-module.mjs +4 -4
- package/esm2022/loader/loader.mjs +3 -3
- package/esm2022/photoviewer/photoviewer-module.mjs +4 -4
- package/esm2022/photoviewer/photoviewer.mjs +3 -3
- package/esm2022/popover/popover-content.mjs +6 -6
- package/esm2022/popover/popover-interfaces.mjs +1 -1
- package/esm2022/popover/popover-module.mjs +4 -4
- package/esm2022/popover/popover-target.mjs +3 -3
- package/esm2022/popover/popover-trigger.mjs +3 -3
- package/esm2022/popover/popover.mjs +29 -19
- package/esm2022/progress/progress-module.mjs +4 -4
- package/esm2022/progress/progress.mjs +3 -3
- package/esm2022/select/option.mjs +3 -3
- package/esm2022/select/select-module.mjs +4 -4
- package/esm2022/select/select.mjs +3 -3
- package/esm2022/select/templates.mjs +33 -33
- package/esm2022/split/split-module.mjs +4 -4
- package/esm2022/split/split-pane.mjs +3 -3
- package/esm2022/split/split.mjs +3 -3
- package/esm2022/tooltip/tooltip-module.mjs +4 -4
- package/esm2022/tooltip/tooltip.mjs +20 -18
- package/fesm2022/mtxAlert.mjs +9 -8
- package/fesm2022/mtxAlert.mjs.map +1 -1
- package/fesm2022/mtxButton.mjs +7 -7
- package/fesm2022/mtxCheckboxGroup.mjs +7 -7
- package/fesm2022/mtxColorpicker.mjs +20 -20
- package/fesm2022/mtxColorpicker.mjs.map +1 -1
- package/fesm2022/mtxColumnResize.mjs +40 -40
- package/fesm2022/mtxCore.mjs +21 -21
- package/fesm2022/mtxDatetimepicker.mjs +273 -82
- package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
- package/fesm2022/mtxDialog.mjs +10 -10
- package/fesm2022/mtxDrawer.mjs +160 -340
- package/fesm2022/mtxDrawer.mjs.map +1 -1
- package/fesm2022/mtxGrid.mjs +68 -68
- package/fesm2022/mtxGrid.mjs.map +1 -1
- package/fesm2022/mtxLoader.mjs +7 -7
- package/fesm2022/mtxPhotoviewer.mjs +7 -7
- package/fesm2022/mtxPopover.mjs +44 -34
- package/fesm2022/mtxPopover.mjs.map +1 -1
- package/fesm2022/mtxProgress.mjs +7 -7
- package/fesm2022/mtxSelect.mjs +43 -43
- package/fesm2022/mtxSplit.mjs +10 -10
- package/fesm2022/mtxTooltip.mjs +23 -21
- package/fesm2022/mtxTooltip.mjs.map +1 -1
- package/grid/column-menu.scss +0 -1
- package/grid/grid.scss +2 -0
- package/package.json +7 -7
- package/popover/popover-interfaces.d.ts +0 -1
- package/popover/popover.d.ts +2 -5
- package/prebuilt-themes/azure-blue.css +1 -1
- package/prebuilt-themes/cyan-orange.css +1 -1
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/magenta-violet.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/prebuilt-themes/rose-red.css +1 -1
- package/select/option.d.ts +1 -1
- package/select/select.scss +2 -2
- package/tooltip/_tooltip-theme.scss +19 -15
- package/tooltip/tooltip.d.ts +3 -0
- package/tooltip/tooltip.scss +61 -29
- package/core/typography/_typography.scss +0 -40
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.mtx-datetimepicker-actions {
|
|
2
|
+
$spacing: 8px;
|
|
3
|
+
|
|
4
|
+
position: relative;
|
|
5
|
+
display: flex;
|
|
6
|
+
justify-content: flex-end;
|
|
7
|
+
align-items: center;
|
|
8
|
+
padding: 0 $spacing $spacing;
|
|
9
|
+
|
|
10
|
+
.mat-mdc-button-base+.mat-mdc-button-base {
|
|
11
|
+
margin-left: $spacing;
|
|
12
|
+
|
|
13
|
+
[dir='rtl'] & {
|
|
14
|
+
margin-left: 0;
|
|
15
|
+
margin-right: $spacing;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -8,8 +8,10 @@ $non-touch-calendar-portrait-width: $non-touch-calendar-cell-size * 7 + $calenda
|
|
|
8
8
|
$non-touch-calendar-portrait-height: 424px;
|
|
9
9
|
$non-touch-calendar-landscape-width: 432px;
|
|
10
10
|
$non-touch-calendar-landscape-height: 328px;
|
|
11
|
-
$non-touch-calendar-with-time-input-portrait-height:
|
|
12
|
-
$non-touch-calendar-with-time-input-
|
|
11
|
+
$non-touch-calendar-with-time-input-portrait-height: 442px;
|
|
12
|
+
$non-touch-calendar-with-time-input-actions-portrait-height: 490px;
|
|
13
|
+
$non-touch-calendar-with-time-input-landscape-height: 356px;
|
|
14
|
+
$non-touch-calendar-with-time-input-actions-landscape-height: 404px;
|
|
13
15
|
|
|
14
16
|
// Ideally the calendar would have a constant aspect ratio, no matter its size, and we would base
|
|
15
17
|
// these measurements off the aspect ratio. Unfortunately, the aspect ratio does change a little as
|
|
@@ -21,10 +23,10 @@ $touch-landscape-mode-landscape-height: 80vh;
|
|
|
21
23
|
$touch-landscape-mode-portrait-width: 90vw;
|
|
22
24
|
$touch-landscape-mode-portrait-height: 64vw;
|
|
23
25
|
$touch-portrait-mode-landscape-width: 64vh;
|
|
24
|
-
$touch-portrait-mode-landscape-height:
|
|
26
|
+
$touch-portrait-mode-landscape-height: 80vh;
|
|
25
27
|
$touch-portrait-mode-portrait-width: 80vw;
|
|
26
28
|
$touch-portrait-mode-portrait-height: 120vw;
|
|
27
|
-
$touch-portrait-mode-portrait-height-with-actions:
|
|
29
|
+
$touch-portrait-mode-portrait-height-with-actions: 124vw;
|
|
28
30
|
$touch-min-width: 250px;
|
|
29
31
|
$touch-min-height: 300px;
|
|
30
32
|
$touch-max-width: 750px;
|
|
@@ -36,9 +38,13 @@ $touch-max-height: 850px;
|
|
|
36
38
|
height: $non-touch-calendar-landscape-height;
|
|
37
39
|
|
|
38
40
|
&.mtx-calendar-with-time-input {
|
|
39
|
-
height: $non-touch-calendar-with-time-input-landscape-height;
|
|
41
|
+
height: $non-touch-calendar-with-time-input-actions-landscape-height;
|
|
40
42
|
}
|
|
41
43
|
}
|
|
44
|
+
|
|
45
|
+
.mtx-datetimepicker-content-container-with-actions .mtx-calendar.mtx-calendar-with-time-input {
|
|
46
|
+
height: $non-touch-calendar-with-time-input-landscape-height;
|
|
47
|
+
}
|
|
42
48
|
}
|
|
43
49
|
|
|
44
50
|
.mtx-datetimepicker-content {
|
|
@@ -51,6 +57,19 @@ $touch-max-height: 850px;
|
|
|
51
57
|
@include token-utils.create-token-slot(box-shadow, container-elevation-shadow);
|
|
52
58
|
@include token-utils.create-token-slot(color, container-text-color);
|
|
53
59
|
}
|
|
60
|
+
|
|
61
|
+
.mtx-calendar {
|
|
62
|
+
width: $non-touch-calendar-portrait-width;
|
|
63
|
+
height: $non-touch-calendar-portrait-height;
|
|
64
|
+
|
|
65
|
+
&.mtx-calendar-with-time-input {
|
|
66
|
+
height: $non-touch-calendar-with-time-input-actions-portrait-height;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.mtx-datetimepicker-content-container-with-actions .mtx-calendar.mtx-calendar-with-time-input {
|
|
71
|
+
height: $non-touch-calendar-with-time-input-portrait-height;
|
|
72
|
+
}
|
|
54
73
|
}
|
|
55
74
|
|
|
56
75
|
.mtx-datetimepicker-content-container {
|
|
@@ -61,15 +80,6 @@ $touch-max-height: 850px;
|
|
|
61
80
|
justify-content: space-between;
|
|
62
81
|
}
|
|
63
82
|
|
|
64
|
-
.mtx-datetimepicker-content .mtx-calendar {
|
|
65
|
-
width: $non-touch-calendar-portrait-width;
|
|
66
|
-
height: $non-touch-calendar-portrait-height;
|
|
67
|
-
|
|
68
|
-
&.mtx-calendar-with-time-input {
|
|
69
|
-
height: $non-touch-calendar-with-time-input-portrait-height;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
83
|
.mtx-datetimepicker-content[mode='landscape'] {
|
|
74
84
|
@include landscape-calendar-size;
|
|
75
85
|
}
|
|
@@ -82,7 +92,7 @@ $touch-max-height: 850px;
|
|
|
82
92
|
|
|
83
93
|
.mtx-datetimepicker-content-touch {
|
|
84
94
|
display: block;
|
|
85
|
-
max-height:
|
|
95
|
+
max-height: 84vh;
|
|
86
96
|
|
|
87
97
|
@include token-utils.use-tokens(tokens-mtx-datetimepicker.$prefix,
|
|
88
98
|
tokens-mtx-datetimepicker.get-token-slots()) {
|
|
@@ -107,6 +117,12 @@ $touch-max-height: 850px;
|
|
|
107
117
|
width: 100%;
|
|
108
118
|
height: auto;
|
|
109
119
|
}
|
|
120
|
+
|
|
121
|
+
.mtx-clock {
|
|
122
|
+
width: 50vh;
|
|
123
|
+
max-width: 80%;
|
|
124
|
+
margin: 12px auto;
|
|
125
|
+
}
|
|
110
126
|
}
|
|
111
127
|
|
|
112
128
|
@media all and (orientation: landscape) {
|
|
@@ -116,7 +132,8 @@ $touch-max-height: 850px;
|
|
|
116
132
|
width: $touch-landscape-mode-landscape-width;
|
|
117
133
|
height: $touch-landscape-mode-landscape-height;
|
|
118
134
|
|
|
119
|
-
.mtx-calendar
|
|
135
|
+
.mtx-calendar,
|
|
136
|
+
&.mtx-datetimepicker-content-container-with-actions .mtx-calendar.mtx-calendar-with-time-input {
|
|
120
137
|
width: auto;
|
|
121
138
|
height: 100%;
|
|
122
139
|
}
|
|
@@ -145,6 +162,13 @@ $touch-max-height: 850px;
|
|
|
145
162
|
width: 100%;
|
|
146
163
|
height: auto;
|
|
147
164
|
}
|
|
165
|
+
|
|
166
|
+
// The content needs to be a bit taller when actions have
|
|
167
|
+
// been projected so that it doesn't have to scroll.
|
|
168
|
+
&.mtx-datetimepicker-content-container-with-actions,
|
|
169
|
+
&.mtx-datetimepicker-content-container-with-time-input {
|
|
170
|
+
height: $touch-portrait-mode-portrait-height-with-actions;
|
|
171
|
+
}
|
|
148
172
|
}
|
|
149
173
|
|
|
150
174
|
.mtx-datetimepicker-content-container[mode='landscape'] {
|
|
@@ -156,11 +180,5 @@ $touch-max-height: 850px;
|
|
|
156
180
|
height: 100%;
|
|
157
181
|
}
|
|
158
182
|
}
|
|
159
|
-
|
|
160
|
-
// The content needs to be a bit taller when actions have
|
|
161
|
-
// been projected so that it doesn't have to scroll.
|
|
162
|
-
.mtx-datetimepicker-content-container-with-actions {
|
|
163
|
-
height: $touch-portrait-mode-portrait-height-with-actions;
|
|
164
|
-
}
|
|
165
183
|
}
|
|
166
184
|
}
|
|
@@ -14,8 +14,9 @@ import * as i12 from "./datetimepicker-input";
|
|
|
14
14
|
import * as i13 from "./month-view";
|
|
15
15
|
import * as i14 from "./year-view";
|
|
16
16
|
import * as i15 from "./multi-year-view";
|
|
17
|
+
import * as i16 from "./datetimepicker-actions";
|
|
17
18
|
export declare class MtxDatetimepickerModule {
|
|
18
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<MtxDatetimepickerModule, never>;
|
|
19
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MtxDatetimepickerModule, never, [typeof i1.CommonModule, typeof i2.OverlayModule, typeof i3.A11yModule, typeof i4.PortalModule, typeof i5.MatButtonModule, typeof i6.MtxCalendar, typeof i7.MtxCalendarBody, typeof i8.MtxClock, typeof i9.MtxTime, typeof i9.MtxTimeInput, typeof i10.MtxDatetimepicker, typeof i11.MtxDatetimepickerToggle, typeof i11.MtxDatetimepickerToggleIcon, typeof i12.MtxDatetimepickerInput, typeof i10.MtxDatetimepickerContent, typeof i13.MtxMonthView, typeof i14.MtxYearView, typeof i15.MtxMultiYearView], [typeof i6.MtxCalendar, typeof i7.MtxCalendarBody, typeof i8.MtxClock, typeof i9.MtxTime, typeof i10.MtxDatetimepicker, typeof i11.MtxDatetimepickerToggle, typeof i11.MtxDatetimepickerToggleIcon, typeof i12.MtxDatetimepickerInput, typeof i10.MtxDatetimepickerContent, typeof i13.MtxMonthView, typeof i14.MtxYearView, typeof i15.MtxMultiYearView]>;
|
|
20
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MtxDatetimepickerModule, never, [typeof i1.CommonModule, typeof i2.OverlayModule, typeof i3.A11yModule, typeof i4.PortalModule, typeof i5.MatButtonModule, typeof i6.MtxCalendar, typeof i7.MtxCalendarBody, typeof i8.MtxClock, typeof i9.MtxTime, typeof i9.MtxTimeInput, typeof i10.MtxDatetimepicker, typeof i11.MtxDatetimepickerToggle, typeof i11.MtxDatetimepickerToggleIcon, typeof i12.MtxDatetimepickerInput, typeof i10.MtxDatetimepickerContent, typeof i13.MtxMonthView, typeof i14.MtxYearView, typeof i15.MtxMultiYearView, typeof i16.MtxDatetimepickerApply, typeof i16.MtxDatetimepickerCancel, typeof i16.MtxDatetimepickerClear, typeof i16.MtxDatetimepickerActions], [typeof i6.MtxCalendar, typeof i7.MtxCalendarBody, typeof i8.MtxClock, typeof i9.MtxTime, typeof i10.MtxDatetimepicker, typeof i11.MtxDatetimepickerToggle, typeof i11.MtxDatetimepickerToggleIcon, typeof i12.MtxDatetimepickerInput, typeof i10.MtxDatetimepickerContent, typeof i13.MtxMonthView, typeof i14.MtxYearView, typeof i15.MtxMultiYearView, typeof i16.MtxDatetimepickerApply, typeof i16.MtxDatetimepickerCancel, typeof i16.MtxDatetimepickerClear, typeof i16.MtxDatetimepickerActions]>;
|
|
20
21
|
static ɵinj: i0.ɵɵInjectorDeclaration<MtxDatetimepickerModule>;
|
|
21
22
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
$_tokens: tokens-mtx-datetimepicker.$prefix, tokens-mtx-datetimepicker.get-token-slots();
|
|
6
6
|
|
|
7
|
-
// We support the case where the form field is disabled, but the
|
|
7
|
+
// We support the case where the form field is disabled, but the datetimepicker is not.
|
|
8
8
|
// MDC sets `pointer-events: none` on disabled form fields which prevents clicks on the toggle.
|
|
9
9
|
.mtx-datetimepicker-toggle {
|
|
10
10
|
pointer-events: auto;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Directionality } from '@angular/cdk/bidi';
|
|
2
2
|
import { Overlay, ScrollStrategy } from '@angular/cdk/overlay';
|
|
3
|
-
import { ComponentType } from '@angular/cdk/portal';
|
|
3
|
+
import { ComponentType, TemplatePortal } from '@angular/cdk/portal';
|
|
4
4
|
import { AfterContentInit, ChangeDetectorRef, EventEmitter, InjectionToken, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
|
|
5
5
|
import { ThemePalette } from '@angular/material/core';
|
|
6
6
|
import { Subject } from 'rxjs';
|
|
@@ -44,11 +44,25 @@ export declare class MtxDatetimepickerContent<D> implements OnInit, AfterContent
|
|
|
44
44
|
readonly _animationDone: Subject<void>;
|
|
45
45
|
/** Id of the label for the `role="dialog"` element. */
|
|
46
46
|
_dialogLabelId: string | null;
|
|
47
|
+
/** Portal with projected action buttons. */
|
|
48
|
+
_actionsPortal: TemplatePortal | null;
|
|
49
|
+
/** The display type of datetimepicker. */
|
|
50
|
+
type: MtxDatetimepickerType;
|
|
51
|
+
/** The view of the calendar. */
|
|
52
|
+
view: MtxCalendarView;
|
|
47
53
|
constructor(_changeDetectorRef: ChangeDetectorRef);
|
|
54
|
+
_viewChanged(view: MtxCalendarView): void;
|
|
48
55
|
ngOnInit(): void;
|
|
49
56
|
ngAfterContentInit(): void;
|
|
50
|
-
_startExitAnimation(): void;
|
|
51
57
|
ngOnDestroy(): void;
|
|
58
|
+
_startExitAnimation(): void;
|
|
59
|
+
_handleUserSelection(): void;
|
|
60
|
+
/**
|
|
61
|
+
* Assigns a new portal containing the datetimepicker actions.
|
|
62
|
+
* @param portal Portal with the actions to be assigned.
|
|
63
|
+
* @param forceRerender Whether a re-render of the portal should be triggered.
|
|
64
|
+
*/
|
|
65
|
+
_assignActions(portal: TemplatePortal<any> | null, forceRerender: boolean): void;
|
|
52
66
|
static ɵfac: i0.ɵɵFactoryDeclaration<MtxDatetimepickerContent<any>, never>;
|
|
53
67
|
static ɵcmp: i0.ɵɵComponentDeclaration<MtxDatetimepickerContent<any>, "mtx-datetimepicker-content", never, { "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
|
|
54
68
|
}
|
|
@@ -113,6 +127,10 @@ export declare class MtxDatetimepicker<D> implements OnDestroy {
|
|
|
113
127
|
/** Unique class that will be added to the backdrop so that the test harnesses can look it up. */
|
|
114
128
|
private _backdropHarnessClass;
|
|
115
129
|
private _inputStateChanges;
|
|
130
|
+
/** Portal with projected action buttons. */
|
|
131
|
+
_actionsPortal: TemplatePortal | null;
|
|
132
|
+
/** Previous selected value. */
|
|
133
|
+
oldValue: D | null;
|
|
116
134
|
constructor(_overlay: Overlay, _viewContainerRef: ViewContainerRef, _scrollStrategy: any, _dateAdapter: DatetimeAdapter<D>, _dir: Directionality);
|
|
117
135
|
/** The date to open the calendar to initially. */
|
|
118
136
|
get startAt(): D | null;
|
|
@@ -154,10 +172,12 @@ export declare class MtxDatetimepicker<D> implements OnDestroy {
|
|
|
154
172
|
/** The maximum selectable date. */
|
|
155
173
|
get _maxDate(): D | null;
|
|
156
174
|
get _dateFilter(): (date: D | null, type: MtxDatetimepickerFilterType) => boolean;
|
|
157
|
-
_viewChanged(
|
|
175
|
+
_viewChanged(view: MtxCalendarView): void;
|
|
158
176
|
ngOnDestroy(): void;
|
|
159
177
|
/** Selects the given date */
|
|
160
178
|
_select(date: D): void;
|
|
179
|
+
_selectManually(): void;
|
|
180
|
+
_clearSelected(): void;
|
|
161
181
|
/**
|
|
162
182
|
* Register an input with this datetimepicker.
|
|
163
183
|
* @param input The datetimepicker input to register with this datetimepicker.
|
|
@@ -186,6 +206,16 @@ export declare class MtxDatetimepicker<D> implements OnDestroy {
|
|
|
186
206
|
private _setConnectedPositions;
|
|
187
207
|
/** Gets an observable that will emit when the overlay is supposed to be closed. */
|
|
188
208
|
private _getCloseStream;
|
|
209
|
+
/**
|
|
210
|
+
* Registers a portal containing action buttons with the datetimepicker.
|
|
211
|
+
* @param portal Portal to be registered.
|
|
212
|
+
*/
|
|
213
|
+
registerActions(portal: TemplatePortal): void;
|
|
214
|
+
/**
|
|
215
|
+
* Removes a portal containing action buttons from the datetimepicker.
|
|
216
|
+
* @param portal Portal to be removed.
|
|
217
|
+
*/
|
|
218
|
+
removeActions(portal: TemplatePortal): void;
|
|
189
219
|
static ɵfac: i0.ɵɵFactoryDeclaration<MtxDatetimepicker<any>, [null, null, null, { optional: true; }, { optional: true; }]>;
|
|
190
220
|
static ɵcmp: i0.ɵɵComponentDeclaration<MtxDatetimepicker<any>, "mtx-datetimepicker", ["mtxDatetimepicker"], { "multiYearSelector": { "alias": "multiYearSelector"; "required": false; }; "twelvehour": { "alias": "twelvehour"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "timeInterval": { "alias": "timeInterval"; "required": false; }; "preventSameDateTimeSelection": { "alias": "preventSameDateTimeSelection"; "required": false; }; "calendarHeaderComponent": { "alias": "calendarHeaderComponent"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "opened": { "alias": "opened"; "required": false; }; "color": { "alias": "color"; "required": false; }; "startAt": { "alias": "startAt"; "required": false; }; "type": { "alias": "type"; "required": false; }; "touchUi": { "alias": "touchUi"; "required": false; }; "timeInput": { "alias": "timeInput"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "xPosition": { "alias": "xPosition"; "required": false; }; "yPosition": { "alias": "yPosition"; "required": false; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; }; }, { "selectedChanged": "selectedChanged"; "openedStream": "opened"; "closedStream": "closed"; "viewChanged": "viewChanged"; }, never, never, true, never>;
|
|
191
221
|
static ngAcceptInputType_multiYearSelector: unknown;
|
package/datetimepicker/time.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NumberInput } from '@angular/cdk/coercion';
|
|
2
|
+
import { TemplatePortal } from '@angular/cdk/portal';
|
|
2
3
|
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
3
4
|
import { SubscriptionLike } from 'rxjs';
|
|
4
5
|
import { DatetimeAdapter } from '@ng-matero/extensions/core';
|
|
@@ -72,6 +73,8 @@ export declare class MtxTime<D> implements OnChanges, AfterViewInit, OnDestroy {
|
|
|
72
73
|
dateFilter: (date: D, type: MtxDatetimepickerFilterType) => boolean;
|
|
73
74
|
/** Step over minutes. */
|
|
74
75
|
interval: number;
|
|
76
|
+
/** Input for action buttons. */
|
|
77
|
+
actionsPortal: TemplatePortal | null;
|
|
75
78
|
protected hourInputElement: ElementRef<HTMLInputElement> | undefined;
|
|
76
79
|
protected hourInputDirective: MtxTimeInput | undefined;
|
|
77
80
|
protected minuteInputElement: ElementRef<HTMLInputElement> | undefined;
|
|
@@ -112,17 +115,18 @@ export declare class MtxTime<D> implements OnChanges, AfterViewInit, OnDestroy {
|
|
|
112
115
|
constructor(_adapter: DatetimeAdapter<D>, _changeDetectorRef: ChangeDetectorRef, _datetimepickerIntl: MtxDatetimepickerIntl);
|
|
113
116
|
ngOnChanges(changes: SimpleChanges): void;
|
|
114
117
|
ngAfterViewInit(): void;
|
|
118
|
+
ngOnDestroy(): void;
|
|
115
119
|
focusInputElement(): void;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
+
_handleHourInputChange(value: NumberInput): void;
|
|
121
|
+
_updateHourForAmPm(value: number): number;
|
|
122
|
+
_handleMinuteInputChange(value: NumberInput): void;
|
|
123
|
+
_handleFocus(clockView: MtxClockView): void;
|
|
120
124
|
_timeSelected(date: D): void;
|
|
121
125
|
_onActiveDateChange(date: D): void;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
126
|
+
_handleSelection(): void;
|
|
127
|
+
_handleOk(): void;
|
|
128
|
+
_handleCancel(): void;
|
|
125
129
|
static ɵfac: i0.ɵɵFactoryDeclaration<MtxTime<any>, never>;
|
|
126
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MtxTime<any>, "mtx-time", ["mtxTime"], { "dateFilter": { "alias": "dateFilter"; "required": false; }; "interval": { "alias": "interval"; "required": false; }; "twelvehour": { "alias": "twelvehour"; "required": false; }; "AMPM": { "alias": "AMPM"; "required": false; }; "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "clockView": { "alias": "clockView"; "required": false; }; }, { "selectedChange": "selectedChange"; "activeDateChange": "activeDateChange"; "_userSelection": "_userSelection"; "ampmChange": "ampmChange"; "clockViewChange": "clockViewChange"; }, never, never, true, never>;
|
|
130
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MtxTime<any>, "mtx-time", ["mtxTime"], { "dateFilter": { "alias": "dateFilter"; "required": false; }; "interval": { "alias": "interval"; "required": false; }; "actionsPortal": { "alias": "actionsPortal"; "required": false; }; "twelvehour": { "alias": "twelvehour"; "required": false; }; "AMPM": { "alias": "AMPM"; "required": false; }; "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "clockView": { "alias": "clockView"; "required": false; }; }, { "selectedChange": "selectedChange"; "activeDateChange": "activeDateChange"; "_userSelection": "_userSelection"; "ampmChange": "ampmChange"; "clockViewChange": "clockViewChange"; }, never, never, true, never>;
|
|
127
131
|
static ngAcceptInputType_twelvehour: unknown;
|
|
128
132
|
}
|
package/datetimepicker/time.scss
CHANGED
|
@@ -84,6 +84,12 @@ $_tokens: tokens-mtx-datetimepicker.$prefix, tokens-mtx-datetimepicker.get-token
|
|
|
84
84
|
.mtx-time-pm {
|
|
85
85
|
--mdc-text-button-label-text-weight: 400;
|
|
86
86
|
|
|
87
|
+
flex: 1;
|
|
88
|
+
width: $time-ampm-width;
|
|
89
|
+
min-width: auto;
|
|
90
|
+
border-width: 1px;
|
|
91
|
+
border-style: solid;
|
|
92
|
+
|
|
87
93
|
@include token-utils.use-tokens($_tokens...) {
|
|
88
94
|
@include token-utils.create-token-slot(--mdc-text-button-label-text-color, time-ampm-text-color);
|
|
89
95
|
@include token-utils.create-token-slot(--mdc-text-button-container-shape, selector-container-shape);
|
|
@@ -97,12 +103,6 @@ $_tokens: tokens-mtx-datetimepicker.$prefix, tokens-mtx-datetimepicker.get-token
|
|
|
97
103
|
}
|
|
98
104
|
}
|
|
99
105
|
|
|
100
|
-
flex: 1;
|
|
101
|
-
width: $time-ampm-width;
|
|
102
|
-
min-width: auto;
|
|
103
|
-
border-width: 1px;
|
|
104
|
-
border-style: solid;
|
|
105
|
-
|
|
106
106
|
.mat-mdc-button-touch-target {
|
|
107
107
|
height: 100%;
|
|
108
108
|
}
|
package/dialog/dialog.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
export declare class MtxDialog {
|
|
8
8
|
dialog: MatDialog;
|
|
9
9
|
constructor(dialog: MatDialog);
|
|
10
|
-
originalOpen(componentOrTemplateRef: ComponentType<any> | TemplateRef<any> | undefined, config: any): import("@angular/material/dialog").MatDialogRef<any, any>;
|
|
10
|
+
originalOpen(componentOrTemplateRef: (ComponentType<any> | TemplateRef<any>) | undefined, config: any): import("@angular/material/dialog").MatDialogRef<any, any>;
|
|
11
11
|
open(config: MtxDialogData, componentOrTemplateRef?: ComponentType<any> | TemplateRef<any>): import("@angular/material/dialog").MatDialogRef<any, any>;
|
|
12
12
|
alert(title: string | Observable<string>, description?: string | Observable<string>, onOk?: () => void): void;
|
|
13
13
|
confirm(title: string | Observable<string>, description?: string | Observable<string>, onOk?: () => void, onClose?: () => void): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Direction } from '@angular/cdk/bidi';
|
|
2
2
|
import { ScrollStrategy } from '@angular/cdk/overlay';
|
|
3
3
|
import { ViewContainerRef } from '@angular/core';
|
|
4
|
-
/** Options for where to set focus to automatically on dialog open */
|
|
4
|
+
/** Options for where to set focus to automatically on dialog open. */
|
|
5
5
|
export type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';
|
|
6
6
|
/** Possible overrides for a drawer's position. */
|
|
7
7
|
export type DrawerPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
@@ -11,6 +11,8 @@ export type DrawerPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
|
11
11
|
export declare class MtxDrawerConfig<D = any> {
|
|
12
12
|
/** The view container to place the overlay for the drawer into. */
|
|
13
13
|
viewContainerRef?: ViewContainerRef;
|
|
14
|
+
/** ID for the drawer. If omitted, a unique one will be generated. */
|
|
15
|
+
id?: string;
|
|
14
16
|
/** Extra CSS classes to be added to the drawer container. */
|
|
15
17
|
panelClass?: string | string[];
|
|
16
18
|
/** Text layout direction for the drawer. */
|
|
@@ -44,12 +46,12 @@ export declare class MtxDrawerConfig<D = any> {
|
|
|
44
46
|
restoreFocus?: boolean;
|
|
45
47
|
/** Scroll strategy to be used for the drawer. */
|
|
46
48
|
scrollStrategy?: ScrollStrategy;
|
|
47
|
-
/** Position of the drawer */
|
|
49
|
+
/** Position of the drawer. */
|
|
48
50
|
position?: DrawerPosition;
|
|
49
|
-
/** Width of the drawer.
|
|
50
|
-
width?:
|
|
51
|
-
/** Height of the drawer.
|
|
52
|
-
height?:
|
|
51
|
+
/** Width of the drawer. */
|
|
52
|
+
width?: string;
|
|
53
|
+
/** Height of the drawer. */
|
|
54
|
+
height?: string;
|
|
53
55
|
/** Min-width of the drawer. If a number is provided, assumes pixel units. */
|
|
54
56
|
minWidth?: number | string;
|
|
55
57
|
/** Min-height of the drawer. If a number is provided, assumes pixel units. */
|
|
@@ -1,91 +1,35 @@
|
|
|
1
1
|
import { AnimationEvent } from '@angular/animations';
|
|
2
|
-
import { FocusTrapFactory, InteractivityChecker } from '@angular/cdk/a11y';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { FocusMonitor, FocusTrapFactory, InteractivityChecker } from '@angular/cdk/a11y';
|
|
3
|
+
import { CdkDialogContainer } from '@angular/cdk/dialog';
|
|
4
|
+
import { OverlayRef } from '@angular/cdk/overlay';
|
|
5
|
+
import { CdkPortalOutlet } from '@angular/cdk/portal';
|
|
6
|
+
import { ElementRef, EventEmitter, NgZone, OnDestroy } from '@angular/core';
|
|
6
7
|
import { MtxDrawerConfig } from './drawer-config';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
/**
|
|
9
10
|
* Internal component that wraps user-provided drawer content.
|
|
10
11
|
* @docs-private
|
|
11
12
|
*/
|
|
12
|
-
export declare class MtxDrawerContainer extends
|
|
13
|
-
private _elementRef;
|
|
14
|
-
private _changeDetectorRef;
|
|
15
|
-
private _focusTrapFactory;
|
|
16
|
-
private readonly _interactivityChecker;
|
|
17
|
-
private readonly _ngZone;
|
|
18
|
-
/** The drawer configuration. */
|
|
19
|
-
drawerConfig: MtxDrawerConfig;
|
|
20
|
-
private _breakpointSubscription;
|
|
13
|
+
export declare class MtxDrawerContainer extends CdkDialogContainer<MtxDrawerConfig> implements OnDestroy {
|
|
21
14
|
/** The portal outlet inside of this container into which the content will be loaded. */
|
|
22
15
|
_portalOutlet: CdkPortalOutlet;
|
|
23
16
|
/** The state of the drawer animations. */
|
|
24
17
|
_animationState: 'void' | 'visible' | 'hidden';
|
|
25
18
|
/** Emits whenever the state of the animation changes. */
|
|
26
19
|
_animationStateChanged: EventEmitter<AnimationEvent>;
|
|
27
|
-
/** The class that traps and manages focus within the drawer. */
|
|
28
|
-
private _focusTrap;
|
|
29
|
-
/** Element that was focused before the drawer was opened. */
|
|
30
|
-
private _elementFocusedBeforeOpened;
|
|
31
|
-
/** Server-side rendering-compatible reference to the global document object. */
|
|
32
|
-
private _document;
|
|
33
20
|
/** Whether the component has been destroyed. */
|
|
34
21
|
private _destroyed;
|
|
35
22
|
get _drawerPosition(): string;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
width: string;
|
|
40
|
-
height: string;
|
|
41
|
-
minWidth: string;
|
|
42
|
-
minHeight: string;
|
|
43
|
-
maxWidth: string;
|
|
44
|
-
maxHeight: string;
|
|
45
|
-
};
|
|
46
|
-
constructor(_elementRef: ElementRef<HTMLElement>, _changeDetectorRef: ChangeDetectorRef, _focusTrapFactory: FocusTrapFactory, _interactivityChecker: InteractivityChecker, _ngZone: NgZone, breakpointObserver: BreakpointObserver, document: any,
|
|
47
|
-
/** The drawer configuration. */
|
|
48
|
-
drawerConfig: MtxDrawerConfig);
|
|
49
|
-
/** Attach a component portal as content to this drawer container. */
|
|
50
|
-
attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
|
|
51
|
-
/** Attach a template portal as content to this drawer container. */
|
|
52
|
-
attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;
|
|
53
|
-
/**
|
|
54
|
-
* Attaches a DOM portal to the drawer container.
|
|
55
|
-
* @deprecated To be turned into a method.
|
|
56
|
-
* @breaking-change 10.0.0
|
|
57
|
-
*/
|
|
58
|
-
attachDomPortal: (portal: DomPortal) => void;
|
|
59
|
-
/** Begin animation of drawer entrance into view. */
|
|
23
|
+
constructor(elementRef: ElementRef, focusTrapFactory: FocusTrapFactory, document: any, config: MtxDrawerConfig, checker: InteractivityChecker, ngZone: NgZone, overlayRef: OverlayRef, focusMonitor?: FocusMonitor);
|
|
24
|
+
protected _contentAttached(): void;
|
|
25
|
+
/** Begin animation of bottom sheet entrance into view. */
|
|
60
26
|
enter(): void;
|
|
61
|
-
/** Begin animation of the
|
|
27
|
+
/** Begin animation of the bottom sheet exiting from view. */
|
|
62
28
|
exit(): void;
|
|
63
29
|
ngOnDestroy(): void;
|
|
64
30
|
_onAnimationDone(event: AnimationEvent): void;
|
|
65
31
|
_onAnimationStart(event: AnimationEvent): void;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
private _setPanelClass;
|
|
69
|
-
/**
|
|
70
|
-
* Focuses the provided element. If the element is not focusable, it will add a tabIndex
|
|
71
|
-
* attribute to forcefully focus it. The attribute is removed after focus is moved.
|
|
72
|
-
* @param element The element to focus.
|
|
73
|
-
*/
|
|
74
|
-
private _forceFocus;
|
|
75
|
-
/**
|
|
76
|
-
* Focuses the first element that matches the given selector within the focus trap.
|
|
77
|
-
* @param selector The CSS selector for the element to set focus to.
|
|
78
|
-
*/
|
|
79
|
-
private _focusByCssSelector;
|
|
80
|
-
/**
|
|
81
|
-
* Moves the focus inside the focus trap. When autoFocus is not set to 'bottom-sheet',
|
|
82
|
-
* if focus cannot be moved then focus will go to the drawer container.
|
|
83
|
-
*/
|
|
84
|
-
private _trapFocus;
|
|
85
|
-
/** Restores focus to the element that was focused before the drawer was opened. */
|
|
86
|
-
private _restoreFocus;
|
|
87
|
-
/** Saves a reference to the element that was focused before the drawer was opened. */
|
|
88
|
-
private _savePreviouslyFocusedElement;
|
|
89
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MtxDrawerContainer, [null, null, null, null, null, null, { optional: true; }, null]>;
|
|
32
|
+
protected _captureInitialFocus(): void;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxDrawerContainer, [null, null, { optional: true; }, null, null, null, null, null]>;
|
|
90
34
|
static ɵcmp: i0.ɵɵComponentDeclaration<MtxDrawerContainer, "mtx-drawer-container", never, {}, {}, never, never, true, never>;
|
|
91
35
|
}
|
|
@@ -7,7 +7,11 @@ $_tokens: tokens-mtx-drawer.$prefix, tokens-mtx-drawer.get-token-slots();
|
|
|
7
7
|
|
|
8
8
|
.mtx-drawer-container {
|
|
9
9
|
display: block;
|
|
10
|
+
width: 100%;
|
|
11
|
+
padding: 8px 16px;
|
|
12
|
+
overflow: auto;
|
|
10
13
|
outline: 0;
|
|
14
|
+
box-sizing: border-box;
|
|
11
15
|
|
|
12
16
|
@include token-utils.use-tokens($_tokens...) {
|
|
13
17
|
@include token-utils.create-token-slot(background-color, container-background-color);
|
|
@@ -20,12 +24,6 @@ $_tokens: tokens-mtx-drawer.$prefix, tokens-mtx-drawer.get-token-slots();
|
|
|
20
24
|
}
|
|
21
25
|
}
|
|
22
26
|
|
|
23
|
-
.mtx-drawer-content-wrapper {
|
|
24
|
-
box-sizing: border-box;
|
|
25
|
-
padding: 8px 16px;
|
|
26
|
-
overflow: auto;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
27
|
.mtx-drawer-right {
|
|
30
28
|
transform: translateX(100%);
|
|
31
29
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "@angular/cdk/
|
|
2
|
+
import * as i1 from "@angular/cdk/dialog";
|
|
3
3
|
import * as i2 from "@angular/cdk/portal";
|
|
4
4
|
import * as i3 from "@angular/material/core";
|
|
5
5
|
import * as i4 from "./drawer-container";
|
|
6
6
|
export declare class MtxDrawerModule {
|
|
7
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<MtxDrawerModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MtxDrawerModule, never, [typeof i1.
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MtxDrawerModule, never, [typeof i1.DialogModule, typeof i2.PortalModule, typeof i3.MatCommonModule, typeof i4.MtxDrawerContainer], [typeof i4.MtxDrawerContainer, typeof i3.MatCommonModule]>;
|
|
9
9
|
static ɵinj: i0.ɵɵInjectorDeclaration<MtxDrawerModule>;
|
|
10
10
|
}
|
package/drawer/drawer-ref.d.ts
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DialogRef } from '@angular/cdk/dialog';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
+
import { MtxDrawerConfig } from './drawer-config';
|
|
3
4
|
import { MtxDrawerContainer } from './drawer-container';
|
|
5
|
+
import { ComponentRef } from '@angular/core';
|
|
4
6
|
/**
|
|
5
7
|
* Reference to a drawer dispatched from the drawer service.
|
|
6
8
|
*/
|
|
7
9
|
export declare class MtxDrawerRef<T = any, R = any> {
|
|
8
|
-
private
|
|
10
|
+
private _ref;
|
|
9
11
|
/** Instance of the component making up the content of the drawer. */
|
|
10
|
-
instance: T;
|
|
12
|
+
get instance(): T;
|
|
13
|
+
/**
|
|
14
|
+
* `ComponentRef` of the component opened into the drawer. Will be
|
|
15
|
+
* null when the drawer is opened using a `TemplateRef`.
|
|
16
|
+
*/
|
|
17
|
+
get componentRef(): ComponentRef<T> | null;
|
|
11
18
|
/**
|
|
12
19
|
* Instance of the component into which the drawer content is projected.
|
|
13
20
|
* @docs-private
|
|
@@ -15,6 +22,8 @@ export declare class MtxDrawerRef<T = any, R = any> {
|
|
|
15
22
|
containerInstance: MtxDrawerContainer;
|
|
16
23
|
/** Whether the user is allowed to close the drawer. */
|
|
17
24
|
disableClose: boolean | undefined;
|
|
25
|
+
/** Unique ID for the drawer. */
|
|
26
|
+
id: string;
|
|
18
27
|
/** Subject for notifying the user that the drawer has been dismissed. */
|
|
19
28
|
private readonly _afterDismissed;
|
|
20
29
|
/** Subject for notifying the user that the drawer has opened and appeared. */
|
|
@@ -23,7 +32,7 @@ export declare class MtxDrawerRef<T = any, R = any> {
|
|
|
23
32
|
private _result;
|
|
24
33
|
/** Handle to the timeout that's running as a fallback in case the exit animation doesn't fire. */
|
|
25
34
|
private _closeFallbackTimeout;
|
|
26
|
-
constructor(
|
|
35
|
+
constructor(_ref: DialogRef<R, T>, config: MtxDrawerConfig, containerInstance: MtxDrawerContainer);
|
|
27
36
|
/**
|
|
28
37
|
* Dismisses the drawer.
|
|
29
38
|
* @param result Data to be passed back to the drawer opener.
|
package/drawer/drawer.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Overlay } from '@angular/cdk/overlay';
|
|
2
2
|
import { ComponentType } from '@angular/cdk/portal';
|
|
3
|
-
import {
|
|
3
|
+
import { InjectionToken, Injector, OnDestroy, TemplateRef } from '@angular/core';
|
|
4
|
+
import { Observable, Subject } from 'rxjs';
|
|
4
5
|
import { MtxDrawerConfig } from './drawer-config';
|
|
5
6
|
import { MtxDrawerRef } from './drawer-ref';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
@@ -13,14 +14,23 @@ export declare const MTX_DRAWER_DEFAULT_OPTIONS: InjectionToken<MtxDrawerConfig<
|
|
|
13
14
|
*/
|
|
14
15
|
export declare class MtxDrawer implements OnDestroy {
|
|
15
16
|
private _overlay;
|
|
16
|
-
private _injector;
|
|
17
17
|
private _parentDrawer;
|
|
18
18
|
private _defaultOptions?;
|
|
19
|
-
private
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
private readonly _openDrawersAtThisLevel;
|
|
20
|
+
private readonly _afterAllDismissedAtThisLevel;
|
|
21
|
+
private readonly _afterOpenedAtThisLevel;
|
|
22
|
+
private _dialog;
|
|
23
|
+
/** Keeps track of the currently-open dialogs. */
|
|
24
|
+
get openDrawers(): MtxDrawerRef<any>[];
|
|
25
|
+
/** Stream that emits when a drawer has been opened. */
|
|
26
|
+
get afterOpened(): Subject<MtxDrawerRef<any>>;
|
|
27
|
+
private _getAfterAllDismissed;
|
|
28
|
+
/**
|
|
29
|
+
* Stream that emits when all open drawer have finished closing.
|
|
30
|
+
* Will emit on subscribe if there are no open drawers to begin with.
|
|
31
|
+
*/
|
|
32
|
+
readonly afterAllDismissed: Observable<void>;
|
|
33
|
+
constructor(_overlay: Overlay, injector: Injector, _parentDrawer: MtxDrawer, _defaultOptions?: MtxDrawerConfig | undefined);
|
|
24
34
|
/**
|
|
25
35
|
* Opens a drawer containing the given component.
|
|
26
36
|
* @param component Type of the component to load into the drawer.
|
|
@@ -36,26 +46,16 @@ export declare class MtxDrawer implements OnDestroy {
|
|
|
36
46
|
*/
|
|
37
47
|
open<T, D = any, R = any>(template: TemplateRef<T>, config?: MtxDrawerConfig<D>): MtxDrawerRef<T, R>;
|
|
38
48
|
/**
|
|
39
|
-
* Dismisses the currently-
|
|
40
|
-
* @param result Data to pass to the drawer instance.
|
|
41
|
-
*/
|
|
42
|
-
dismiss<R = any>(result?: R): void;
|
|
43
|
-
ngOnDestroy(): void;
|
|
44
|
-
/**
|
|
45
|
-
* Attaches the drawer container component to the overlay.
|
|
46
|
-
*/
|
|
47
|
-
private _attachContainer;
|
|
48
|
-
/**
|
|
49
|
-
* Creates a new overlay and places it in the correct location.
|
|
50
|
-
* @param config The user-specified drawer config.
|
|
49
|
+
* Dismisses all of the currently-open drawers.
|
|
51
50
|
*/
|
|
52
|
-
|
|
51
|
+
dismissAll(): void;
|
|
53
52
|
/**
|
|
54
|
-
*
|
|
55
|
-
* @param
|
|
56
|
-
* @param drawerRef Reference to the drawer.
|
|
53
|
+
* Finds an open drawer by its id.
|
|
54
|
+
* @param id ID to use when looking up the drawer.
|
|
57
55
|
*/
|
|
58
|
-
|
|
56
|
+
getDrawerById(id: string): MtxDrawerRef<any> | undefined;
|
|
57
|
+
ngOnDestroy(): void;
|
|
58
|
+
private _dismissDrawers;
|
|
59
59
|
static ɵfac: i0.ɵɵFactoryDeclaration<MtxDrawer, [null, null, { optional: true; skipSelf: true; }, { optional: true; }]>;
|
|
60
60
|
static ɵprov: i0.ɵɵInjectableDeclaration<MtxDrawer>;
|
|
61
61
|
}
|