@ng-matero/extensions 18.4.1 → 19.0.0
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/_index.scss +3 -1
- package/alert/_alert-theme.scss +19 -8
- package/alert/alert.d.ts +1 -2
- package/button/button-loading.d.ts +1 -2
- package/checkbox-group/checkbox-group.d.ts +12 -4
- package/colorpicker/_colorpicker-theme.scss +19 -8
- package/colorpicker/colorpicker-input.d.ts +1 -3
- package/colorpicker/colorpicker-toggle.d.ts +3 -3
- package/colorpicker/colorpicker.d.ts +4 -7
- package/column-resize/column-resize-directives/column-resize-flex.d.ts +2 -1
- package/column-resize/column-resize-directives/column-resize.d.ts +2 -1
- package/column-resize/column-resize-notifier.d.ts +0 -1
- package/column-resize/column-resize.d.ts +1 -1
- package/column-resize/event-dispatcher.d.ts +0 -9
- package/column-resize/overlay-handle.d.ts +1 -1
- package/column-resize/resizable.d.ts +1 -1
- package/column-resize/resize-strategy.d.ts +4 -4
- package/core/datetime/datetime-adapter.d.ts +1 -2
- package/core/datetime/native-datetime-adapter.d.ts +3 -3
- package/core/style/_button-common.scss +18 -0
- package/core/theming/_config-validation.scss +4 -4
- package/core/theming/_definition.scss +12 -2
- package/core/theming/prebuilt/azure-blue.scss +10 -22
- package/core/theming/prebuilt/cyan-orange.scss +10 -22
- package/core/theming/prebuilt/magenta-violet.scss +10 -22
- package/core/theming/prebuilt/rose-red.scss +10 -22
- package/core/tokens/_m3-system.scss +273 -0
- package/core/tokens/_m3-tokens.scss +8 -151
- package/core/tokens/_token-utils.scss +102 -43
- package/core/tokens/m2/_index.scss +2 -0
- package/core/tokens/m3/definitions/_index.scss +1 -0
- package/core/tokens/m3/definitions/_md-comp-plain-tooltip.scss +51 -0
- package/core/tokens/m3/index.scss +2 -0
- package/core/tokens/m3/mdc/_plain-tooltip.scss +15 -0
- package/core/tokens/m3/mtx/_alert.scss +14 -14
- package/core/tokens/m3/mtx/_colorpicker.scss +2 -2
- package/core/tokens/m3/mtx/_datetimepicker.scss +2 -2
- package/core/tokens/m3/mtx/_drawer.scss +2 -2
- package/core/tokens/m3/mtx/_grid.scss +2 -2
- package/core/tokens/m3/mtx/_loader.scss +2 -2
- package/core/tokens/m3/mtx/_popover.scss +2 -2
- package/core/tokens/m3/mtx/_progress.scss +2 -2
- package/core/tokens/m3/mtx/_select.scss +2 -2
- package/core/tokens/m3/mtx/_split.scss +2 -2
- package/datetimepicker/_datetimepicker-theme.scss +23 -10
- package/datetimepicker/calendar-body.d.ts +26 -4
- package/datetimepicker/calendar-body.scss +58 -9
- package/datetimepicker/calendar.d.ts +31 -31
- package/datetimepicker/clock.d.ts +11 -5
- package/datetimepicker/datetimepicker-actions.d.ts +9 -5
- package/datetimepicker/datetimepicker-content.scss +15 -0
- package/datetimepicker/datetimepicker-input.d.ts +4 -5
- package/datetimepicker/datetimepicker-module.d.ts +2 -2
- package/datetimepicker/datetimepicker-toggle.d.ts +4 -3
- package/datetimepicker/datetimepicker.d.ts +12 -8
- package/datetimepicker/month-view.d.ts +22 -7
- package/datetimepicker/multi-year-view.d.ts +20 -20
- package/datetimepicker/public-api.d.ts +2 -2
- package/datetimepicker/{time.d.ts → time-view.d.ts} +21 -9
- package/datetimepicker/{time.scss → time-view.scss} +1 -1
- package/datetimepicker/year-view.d.ts +21 -11
- package/dialog/dialog-container.d.ts +1 -2
- package/dialog/dialog.d.ts +0 -1
- package/drawer/_drawer-theme.scss +19 -8
- package/drawer/drawer-container.d.ts +2 -5
- package/drawer/drawer.d.ts +3 -5
- package/fesm2022/mtxAlert.mjs +15 -15
- package/fesm2022/mtxAlert.mjs.map +1 -1
- package/fesm2022/mtxButton.mjs +13 -14
- package/fesm2022/mtxButton.mjs.map +1 -1
- package/fesm2022/mtxCheckboxGroup.mjs +51 -31
- package/fesm2022/mtxCheckboxGroup.mjs.map +1 -1
- package/fesm2022/mtxColorpicker.mjs +91 -109
- package/fesm2022/mtxColorpicker.mjs.map +1 -1
- package/fesm2022/mtxColumnResize.mjs +79 -96
- package/fesm2022/mtxColumnResize.mjs.map +1 -1
- package/fesm2022/mtxCore.mjs +31 -36
- package/fesm2022/mtxCore.mjs.map +1 -1
- package/fesm2022/mtxDatetimepicker.mjs +1179 -1092
- package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
- package/fesm2022/mtxDialog.mjs +30 -41
- package/fesm2022/mtxDialog.mjs.map +1 -1
- package/fesm2022/mtxDrawer.mjs +36 -52
- package/fesm2022/mtxDrawer.mjs.map +1 -1
- package/fesm2022/mtxGrid.mjs +168 -204
- package/fesm2022/mtxGrid.mjs.map +1 -1
- package/fesm2022/mtxLoader.mjs +12 -12
- package/fesm2022/mtxLoader.mjs.map +1 -1
- package/fesm2022/mtxPhotoviewer.mjs +11 -12
- package/fesm2022/mtxPhotoviewer.mjs.map +1 -1
- package/fesm2022/mtxPopover.mjs +106 -119
- package/fesm2022/mtxPopover.mjs.map +1 -1
- package/fesm2022/mtxProgress.mjs +8 -8
- package/fesm2022/mtxProgress.mjs.map +1 -1
- package/fesm2022/mtxSelect.mjs +157 -169
- package/fesm2022/mtxSelect.mjs.map +1 -1
- package/fesm2022/mtxSplit.mjs +39 -40
- package/fesm2022/mtxSplit.mjs.map +1 -1
- package/fesm2022/mtxTooltip.mjs +105 -91
- package/fesm2022/mtxTooltip.mjs.map +1 -1
- package/grid/_grid-theme.scss +23 -10
- package/grid/cell.d.ts +1 -4
- package/grid/column-resize/column-resize-directives/column-resize-flex.d.ts +0 -1
- package/grid/column-resize/column-resize-directives/column-resize.d.ts +0 -1
- package/grid/column-resize/overlay-handle.d.ts +1 -2
- package/grid/column-resize/resizable-directives/resizable.d.ts +2 -3
- package/grid/column-resize/resize-strategy.d.ts +2 -4
- package/grid/grid-pipes.d.ts +0 -2
- package/grid/grid.d.ts +5 -5
- package/loader/_loader-theme.scss +19 -8
- package/loader/loader.d.ts +0 -2
- package/package.json +11 -47
- package/photoviewer/photoviewer.d.ts +1 -2
- package/popover/_popover-theme.scss +19 -8
- package/popover/popover-content.d.ts +1 -1
- package/popover/popover-target.d.ts +1 -2
- package/popover/popover-trigger.d.ts +5 -6
- package/popover/popover.d.ts +1 -2
- 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/progress/_progress-theme.scss +23 -10
- package/select/_select-theme.scss +23 -10
- package/select/option.d.ts +0 -1
- package/select/select-intl.d.ts +2 -4
- package/select/select.d.ts +8 -7
- package/select/select.scss +3 -3
- package/select/templates.d.ts +0 -12
- package/split/_split-theme.scss +19 -8
- package/split/split-pane.d.ts +3 -4
- package/split/split.d.ts +4 -4
- package/split/split.scss +1 -1
- package/tooltip/_tooltip-theme.scss +11 -4
- package/tooltip/tooltip.d.ts +17 -9
- package/tooltip/tooltip.scss +8 -3
- package/esm2022/alert/alert-module.mjs +0 -17
- package/esm2022/alert/alert.mjs +0 -46
- package/esm2022/alert/mtxAlert.mjs +0 -5
- package/esm2022/alert/public-api.mjs +0 -3
- package/esm2022/button/button-loading.mjs +0 -66
- package/esm2022/button/button-module.mjs +0 -19
- package/esm2022/button/mtxButton.mjs +0 -5
- package/esm2022/button/public-api.mjs +0 -3
- package/esm2022/checkbox-group/checkbox-group-module.mjs +0 -20
- package/esm2022/checkbox-group/checkbox-group.mjs +0 -222
- package/esm2022/checkbox-group/interfaces.mjs +0 -2
- package/esm2022/checkbox-group/mtxCheckboxGroup.mjs +0 -5
- package/esm2022/checkbox-group/public-api.mjs +0 -4
- package/esm2022/colorpicker/colorpicker-animations.mjs +0 -16
- package/esm2022/colorpicker/colorpicker-input.mjs +0 -228
- package/esm2022/colorpicker/colorpicker-module.mjs +0 -64
- package/esm2022/colorpicker/colorpicker-toggle.mjs +0 -102
- package/esm2022/colorpicker/colorpicker.mjs +0 -363
- package/esm2022/colorpicker/mtxColorpicker.mjs +0 -5
- package/esm2022/colorpicker/public-api.mjs +0 -6
- package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +0 -40
- package/esm2022/column-resize/column-resize-directives/column-resize.mjs +0 -40
- package/esm2022/column-resize/column-resize-directives/constants.mjs +0 -21
- package/esm2022/column-resize/column-resize-module.mjs +0 -28
- package/esm2022/column-resize/column-resize-notifier.mjs +0 -52
- package/esm2022/column-resize/column-resize.mjs +0 -82
- package/esm2022/column-resize/column-size-store.mjs +0 -20
- package/esm2022/column-resize/event-dispatcher.mjs +0 -70
- package/esm2022/column-resize/mtxColumnResize.mjs +0 -5
- package/esm2022/column-resize/overlay-handle.mjs +0 -146
- package/esm2022/column-resize/polyfill.mjs +0 -19
- package/esm2022/column-resize/public-api.mjs +0 -13
- package/esm2022/column-resize/resizable.mjs +0 -199
- package/esm2022/column-resize/resize-ref.mjs +0 -17
- package/esm2022/column-resize/resize-strategy.mjs +0 -238
- package/esm2022/column-resize/selectors.mjs +0 -13
- package/esm2022/core/datetime/datetime-adapter.mjs +0 -132
- package/esm2022/core/datetime/datetime-formats.mjs +0 -3
- package/esm2022/core/datetime/datetime.module.mjs +0 -38
- package/esm2022/core/datetime/index.mjs +0 -6
- package/esm2022/core/datetime/native-datetime-adapter.mjs +0 -138
- package/esm2022/core/datetime/native-datetime-formats.mjs +0 -20
- package/esm2022/core/mtxCore.mjs +0 -5
- package/esm2022/core/pipes/index.mjs +0 -4
- package/esm2022/core/pipes/is-template-ref.pipe.mjs +0 -14
- package/esm2022/core/pipes/pipes.module.mjs +0 -18
- package/esm2022/core/pipes/to-observable.pipe.mjs +0 -15
- package/esm2022/core/public-api.mjs +0 -3
- package/esm2022/datetimepicker/calendar-body.mjs +0 -77
- package/esm2022/datetimepicker/calendar.mjs +0 -661
- package/esm2022/datetimepicker/clock.mjs +0 -362
- package/esm2022/datetimepicker/datetimepicker-actions.mjs +0 -88
- package/esm2022/datetimepicker/datetimepicker-animations.mjs +0 -44
- package/esm2022/datetimepicker/datetimepicker-errors.mjs +0 -8
- package/esm2022/datetimepicker/datetimepicker-filtertype.mjs +0 -7
- package/esm2022/datetimepicker/datetimepicker-input.mjs +0 -349
- package/esm2022/datetimepicker/datetimepicker-intl.mjs +0 -63
- package/esm2022/datetimepicker/datetimepicker-module.mjs +0 -116
- package/esm2022/datetimepicker/datetimepicker-toggle.mjs +0 -105
- package/esm2022/datetimepicker/datetimepicker-types.mjs +0 -2
- package/esm2022/datetimepicker/datetimepicker.mjs +0 -580
- package/esm2022/datetimepicker/month-view.mjs +0 -148
- package/esm2022/datetimepicker/mtxDatetimepicker.mjs +0 -5
- package/esm2022/datetimepicker/multi-year-view.mjs +0 -215
- package/esm2022/datetimepicker/public-api.mjs +0 -17
- package/esm2022/datetimepicker/time.mjs +0 -470
- package/esm2022/datetimepicker/year-view.mjs +0 -139
- package/esm2022/dialog/dialog-config.mjs +0 -2
- package/esm2022/dialog/dialog-container.mjs +0 -43
- package/esm2022/dialog/dialog-module.mjs +0 -40
- package/esm2022/dialog/dialog.mjs +0 -75
- package/esm2022/dialog/mtxDialog.mjs +0 -5
- package/esm2022/dialog/public-api.mjs +0 -5
- package/esm2022/drawer/drawer-animations.mjs +0 -18
- package/esm2022/drawer/drawer-config.mjs +0 -35
- package/esm2022/drawer/drawer-container.mjs +0 -88
- package/esm2022/drawer/drawer-module.mjs +0 -21
- package/esm2022/drawer/drawer-ref.mjs +0 -99
- package/esm2022/drawer/drawer.mjs +0 -144
- package/esm2022/drawer/mtxDrawer.mjs +0 -5
- package/esm2022/drawer/public-api.mjs +0 -7
- package/esm2022/grid/cell.mjs +0 -132
- package/esm2022/grid/column-menu.mjs +0 -133
- package/esm2022/grid/column-resize/column-resize-directives/column-resize-flex.mjs +0 -38
- package/esm2022/grid/column-resize/column-resize-directives/column-resize.mjs +0 -38
- package/esm2022/grid/column-resize/column-resize-directives/common.mjs +0 -27
- package/esm2022/grid/column-resize/column-resize-module.mjs +0 -42
- package/esm2022/grid/column-resize/index.mjs +0 -8
- package/esm2022/grid/column-resize/overlay-handle.mjs +0 -66
- package/esm2022/grid/column-resize/resizable-directives/common.mjs +0 -29
- package/esm2022/grid/column-resize/resizable-directives/resizable.mjs +0 -64
- package/esm2022/grid/column-resize/resize-strategy.mjs +0 -47
- package/esm2022/grid/expansion-toggle.mjs +0 -65
- package/esm2022/grid/grid-module.mjs +0 -151
- package/esm2022/grid/grid-pipes.mjs +0 -129
- package/esm2022/grid/grid-utils.mjs +0 -56
- package/esm2022/grid/grid.mjs +0 -644
- package/esm2022/grid/interfaces.mjs +0 -2
- package/esm2022/grid/mtxGrid.mjs +0 -5
- package/esm2022/grid/public-api.mjs +0 -18
- package/esm2022/grid/selectable-cell.mjs +0 -53
- package/esm2022/loader/loader-module.mjs +0 -19
- package/esm2022/loader/loader.mjs +0 -57
- package/esm2022/loader/mtxLoader.mjs +0 -5
- package/esm2022/loader/public-api.mjs +0 -3
- package/esm2022/ng-matero-extensions.mjs +0 -5
- package/esm2022/photoviewer/mtxPhotoviewer.mjs +0 -5
- package/esm2022/photoviewer/photoviewer-module.mjs +0 -16
- package/esm2022/photoviewer/photoviewer.mjs +0 -64
- package/esm2022/photoviewer/public-api.mjs +0 -3
- package/esm2022/popover/mtxPopover.mjs +0 -5
- package/esm2022/popover/popover-animations.mjs +0 -25
- package/esm2022/popover/popover-content.mjs +0 -91
- package/esm2022/popover/popover-errors.mjs +0 -27
- package/esm2022/popover/popover-interfaces.mjs +0 -2
- package/esm2022/popover/popover-module.mjs +0 -39
- package/esm2022/popover/popover-target.mjs +0 -18
- package/esm2022/popover/popover-trigger.mjs +0 -480
- package/esm2022/popover/popover-types.mjs +0 -2
- package/esm2022/popover/popover.mjs +0 -325
- package/esm2022/popover/public-api.mjs +0 -9
- package/esm2022/progress/mtxProgress.mjs +0 -5
- package/esm2022/progress/progress-module.mjs +0 -17
- package/esm2022/progress/progress.mjs +0 -43
- package/esm2022/progress/public-api.mjs +0 -3
- package/esm2022/public-api.mjs +0 -5
- package/esm2022/select/mtxSelect.mjs +0 -5
- package/esm2022/select/option.mjs +0 -52
- package/esm2022/select/public-api.mjs +0 -6
- package/esm2022/select/select-intl.mjs +0 -32
- package/esm2022/select/select-module.mjs +0 -89
- package/esm2022/select/select.mjs +0 -611
- package/esm2022/select/templates.mjs +0 -135
- package/esm2022/split/interfaces.mjs +0 -2
- package/esm2022/split/mtxSplit.mjs +0 -5
- package/esm2022/split/public-api.mjs +0 -6
- package/esm2022/split/split-module.mjs +0 -18
- package/esm2022/split/split-pane.mjs +0 -161
- package/esm2022/split/split.mjs +0 -634
- package/esm2022/split/utils.mjs +0 -219
- package/esm2022/tooltip/mtxTooltip.mjs +0 -5
- package/esm2022/tooltip/public-api.mjs +0 -4
- package/esm2022/tooltip/tooltip-animations.mjs +0 -17
- package/esm2022/tooltip/tooltip-module.mjs +0 -41
- package/esm2022/tooltip/tooltip.mjs +0 -915
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AfterContentInit, EventEmitter } from '@angular/core';
|
|
2
|
-
import { DatetimeAdapter
|
|
3
|
-
import { MtxCalendarCell } from './calendar-body';
|
|
2
|
+
import { DatetimeAdapter } from '@ng-matero/extensions/core';
|
|
3
|
+
import { MtxCalendarBody, MtxCalendarCell } from './calendar-body';
|
|
4
4
|
import { MtxDatetimepickerType } from './datetimepicker-types';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare const yearsPerPage = 24;
|
|
@@ -11,6 +11,7 @@ export declare const yearsPerRow = 4;
|
|
|
11
11
|
*/
|
|
12
12
|
export declare class MtxMultiYearView<D> implements AfterContentInit {
|
|
13
13
|
_adapter: DatetimeAdapter<D>;
|
|
14
|
+
private _dir;
|
|
14
15
|
private _dateFormats;
|
|
15
16
|
type: MtxDatetimepickerType;
|
|
16
17
|
/** A function used to filter which dates are selectable. */
|
|
@@ -19,6 +20,10 @@ export declare class MtxMultiYearView<D> implements AfterContentInit {
|
|
|
19
20
|
selectedChange: EventEmitter<D>;
|
|
20
21
|
/** Emits when any date is selected. */
|
|
21
22
|
readonly _userSelection: EventEmitter<void>;
|
|
23
|
+
/** Emits when any date is activated. */
|
|
24
|
+
readonly activeDateChange: EventEmitter<D>;
|
|
25
|
+
/** The body of calendar table */
|
|
26
|
+
_mtxCalendarBody: MtxCalendarBody;
|
|
22
27
|
/** Grid of calendar cells representing the years in the range. */
|
|
23
28
|
_years: MtxCalendarCell[][];
|
|
24
29
|
/** The label for this year range (e.g. "2000-2020"). */
|
|
@@ -30,15 +35,15 @@ export declare class MtxMultiYearView<D> implements AfterContentInit {
|
|
|
30
35
|
* Null if the selected Date is in a different range.
|
|
31
36
|
*/
|
|
32
37
|
_selectedYear: number | null;
|
|
33
|
-
|
|
34
|
-
constructor(
|
|
38
|
+
/** Inserted by Angular inject() migration for backwards compatibility */
|
|
39
|
+
constructor(...args: unknown[]);
|
|
35
40
|
/** The date to display in this multi year view */
|
|
36
41
|
get activeDate(): D;
|
|
37
42
|
set activeDate(value: D);
|
|
38
43
|
private _activeDate;
|
|
39
44
|
/** The currently selected date. */
|
|
40
|
-
get selected(): D;
|
|
41
|
-
set selected(value: D);
|
|
45
|
+
get selected(): D | null;
|
|
46
|
+
set selected(value: D | null);
|
|
42
47
|
private _selected;
|
|
43
48
|
/** The minimum selectable date. */
|
|
44
49
|
get minDate(): D | null;
|
|
@@ -52,30 +57,25 @@ export declare class MtxMultiYearView<D> implements AfterContentInit {
|
|
|
52
57
|
/** Handles when a new year is selected. */
|
|
53
58
|
_yearSelected(year: number): void;
|
|
54
59
|
_getActiveCell(): number;
|
|
55
|
-
_calendarStateDone(): void;
|
|
56
60
|
/** Initializes this year view. */
|
|
57
61
|
private _init;
|
|
58
62
|
/** Creates an MtxCalendarCell for the given year. */
|
|
59
63
|
private _createCellForYear;
|
|
60
64
|
/** Whether the given year is enabled. */
|
|
61
65
|
private _shouldEnableYear;
|
|
62
|
-
/**
|
|
63
|
-
* Gets the year in this years range that the given Date falls on.
|
|
64
|
-
* Returns null if the given Date is not in this range.
|
|
65
|
-
*/
|
|
66
|
-
private _getYearInCurrentRange;
|
|
67
|
-
/**
|
|
68
|
-
* Validate if the current year is in the current range
|
|
69
|
-
* Returns true if is in range else returns false
|
|
70
|
-
*/
|
|
71
|
-
private _isInRange;
|
|
72
66
|
/**
|
|
73
67
|
* @param obj The object to check.
|
|
74
68
|
* @returns The given object if it is both a date instance and valid, otherwise null.
|
|
75
69
|
*/
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
70
|
+
_getValidDateOrNull(obj: any): D | null;
|
|
71
|
+
/** Handles keydown events on the calendar body when calendar is in multi-year view. */
|
|
72
|
+
_handleCalendarBodyKeydown(event: KeyboardEvent): void;
|
|
73
|
+
/** Focuses the active cell after the microtask queue is empty. */
|
|
74
|
+
_focusActiveCell(): void;
|
|
75
|
+
/** Determines whether the user has the RTL layout direction. */
|
|
76
|
+
private _isRtl;
|
|
77
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxMultiYearView<any>, never>;
|
|
78
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MtxMultiYearView<any>, "mtx-multi-year-view", ["mtxMultiYearView"], { "type": { "alias": "type"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; }, { "selectedChange": "selectedChange"; "_userSelection": "_userSelection"; "activeDateChange": "activeDateChange"; }, never, never, true, never>;
|
|
79
79
|
}
|
|
80
80
|
export declare function isSameMultiYearView<D>(dateAdapter: DatetimeAdapter<D>, date1: D, date2: D, minDate: D | null, maxDate: D | null): boolean;
|
|
81
81
|
/**
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export * from './datetimepicker-module';
|
|
2
|
-
export * from './clock';
|
|
3
|
-
export * from './time';
|
|
4
2
|
export * from './calendar';
|
|
5
3
|
export * from './calendar-body';
|
|
6
4
|
export * from './datetimepicker';
|
|
@@ -10,6 +8,8 @@ export * from './datetimepicker-toggle';
|
|
|
10
8
|
export * from './month-view';
|
|
11
9
|
export * from './year-view';
|
|
12
10
|
export * from './multi-year-view';
|
|
11
|
+
export * from './time-view';
|
|
12
|
+
export * from './clock';
|
|
13
13
|
export * from './datetimepicker-animations';
|
|
14
14
|
export * from './datetimepicker-types';
|
|
15
15
|
export * from './datetimepicker-intl';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { NumberInput } from '@angular/cdk/coercion';
|
|
2
2
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
3
|
-
import {
|
|
3
|
+
import { ElementRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
4
4
|
import { SubscriptionLike } from 'rxjs';
|
|
5
|
-
import { DatetimeAdapter } from '@ng-matero/extensions/core';
|
|
6
5
|
import { MtxClockView } from './clock';
|
|
7
6
|
import { MtxDatetimepickerFilterType } from './datetimepicker-filtertype';
|
|
8
7
|
import { MtxDatetimepickerIntl } from './datetimepicker-intl';
|
|
@@ -23,7 +22,8 @@ export declare class MtxTimeInput implements OnDestroy {
|
|
|
23
22
|
private keyDownListener;
|
|
24
23
|
private keyPressListener;
|
|
25
24
|
private inputEventListener;
|
|
26
|
-
|
|
25
|
+
/** Inserted by Angular inject() migration for backwards compatibility */
|
|
26
|
+
constructor(...args: unknown[]);
|
|
27
27
|
get hasFocus(): any;
|
|
28
28
|
get inputElement(): HTMLInputElement;
|
|
29
29
|
get valid(): boolean;
|
|
@@ -55,9 +55,10 @@ export declare class MtxTimeInput implements OnDestroy {
|
|
|
55
55
|
static ɵfac: i0.ɵɵFactoryDeclaration<MtxTimeInput, never>;
|
|
56
56
|
static ɵdir: i0.ɵɵDirectiveDeclaration<MtxTimeInput, "input.mtx-time-input", ["mtxTimeInput"], { "timeInterval": { "alias": "timeInterval"; "required": false; }; "timeMin": { "alias": "timeMin"; "required": false; }; "timeMax": { "alias": "timeMax"; "required": false; }; "timeValue": { "alias": "timeValue"; "required": false; }; }, { "timeValueChanged": "timeValueChanged"; }, never, never, true, never>;
|
|
57
57
|
}
|
|
58
|
-
export declare class
|
|
58
|
+
export declare class MtxTimeView<D> implements OnChanges, OnDestroy {
|
|
59
59
|
private _adapter;
|
|
60
60
|
private _changeDetectorRef;
|
|
61
|
+
private _elementRef;
|
|
61
62
|
protected _datetimepickerIntl: MtxDatetimepickerIntl;
|
|
62
63
|
/** Emits when the currently selected date changes. */
|
|
63
64
|
readonly selectedChange: EventEmitter<D>;
|
|
@@ -71,10 +72,14 @@ export declare class MtxTime<D> implements OnChanges, AfterViewInit, OnDestroy {
|
|
|
71
72
|
readonly clockViewChange: EventEmitter<MtxClockView>;
|
|
72
73
|
/** A function used to filter which dates are selectable. */
|
|
73
74
|
dateFilter: (date: D, type: MtxDatetimepickerFilterType) => boolean;
|
|
75
|
+
/** Input for action buttons. */
|
|
76
|
+
timeInput: boolean;
|
|
74
77
|
/** Step over minutes. */
|
|
75
78
|
interval: number;
|
|
76
79
|
/** Input for action buttons. */
|
|
77
80
|
actionsPortal: TemplatePortal | null;
|
|
81
|
+
/** Prevent user to select same date time */
|
|
82
|
+
preventSameDateTimeSelection: boolean;
|
|
78
83
|
/** Whether the time input should be auto-focused after view init. */
|
|
79
84
|
autoFocus: boolean;
|
|
80
85
|
protected hourInputElement: ElementRef<HTMLInputElement> | undefined;
|
|
@@ -112,22 +117,29 @@ export declare class MtxTime<D> implements OnChanges, AfterViewInit, OnDestroy {
|
|
|
112
117
|
get hour(): string;
|
|
113
118
|
get minute(): string;
|
|
114
119
|
prefixWithZero(value: number): string;
|
|
115
|
-
|
|
120
|
+
/** Inserted by Angular inject() migration for backwards compatibility */
|
|
121
|
+
constructor(...args: unknown[]);
|
|
116
122
|
ngOnChanges(changes: SimpleChanges): void;
|
|
117
|
-
ngAfterViewInit(): void;
|
|
118
123
|
ngOnDestroy(): void;
|
|
119
|
-
|
|
124
|
+
/** Handles keydown events on the calendar body when calendar is in clock view. */
|
|
125
|
+
_handleCalendarBodyKeydown(event: KeyboardEvent): void;
|
|
126
|
+
_focusInputElement(): void;
|
|
120
127
|
_handleHourInputChange(value: NumberInput): void;
|
|
121
128
|
_updateHourForAmPm(value: number): number;
|
|
122
129
|
_handleMinuteInputChange(value: NumberInput): void;
|
|
123
130
|
_handleFocus(clockView: MtxClockView): void;
|
|
131
|
+
_dialTimeSelected(date: D): void;
|
|
124
132
|
_timeSelected(date: D): void;
|
|
125
133
|
_onActiveDateChange(date: D): void;
|
|
126
134
|
_handleSelection(): void;
|
|
127
135
|
_handleOk(): void;
|
|
128
136
|
_handleCancel(): void;
|
|
129
|
-
|
|
130
|
-
|
|
137
|
+
/** Focuses the active cell after the microtask queue is empty. */
|
|
138
|
+
_focusActiveCell(): void;
|
|
139
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxTimeView<any>, never>;
|
|
140
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MtxTimeView<any>, "mtx-time-view", ["mtxTime"], { "dateFilter": { "alias": "dateFilter"; "required": false; }; "timeInput": { "alias": "timeInput"; "required": false; }; "interval": { "alias": "interval"; "required": false; }; "actionsPortal": { "alias": "actionsPortal"; "required": false; }; "preventSameDateTimeSelection": { "alias": "preventSameDateTimeSelection"; "required": false; }; "autoFocus": { "alias": "autoFocus"; "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>;
|
|
141
|
+
static ngAcceptInputType_timeInput: unknown;
|
|
142
|
+
static ngAcceptInputType_preventSameDateTimeSelection: unknown;
|
|
131
143
|
static ngAcceptInputType_autoFocus: unknown;
|
|
132
144
|
static ngAcceptInputType_twelvehour: unknown;
|
|
133
145
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AfterContentInit, EventEmitter } from '@angular/core';
|
|
2
|
-
import { DatetimeAdapter
|
|
3
|
-
import { MtxCalendarCell } from './calendar-body';
|
|
2
|
+
import { DatetimeAdapter } from '@ng-matero/extensions/core';
|
|
3
|
+
import { MtxCalendarBody, MtxCalendarCell } from './calendar-body';
|
|
4
4
|
import { MtxDatetimepickerType } from './datetimepicker-types';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
/**
|
|
@@ -9,6 +9,7 @@ import * as i0 from "@angular/core";
|
|
|
9
9
|
*/
|
|
10
10
|
export declare class MtxYearView<D> implements AfterContentInit {
|
|
11
11
|
_adapter: DatetimeAdapter<D>;
|
|
12
|
+
private _dir;
|
|
12
13
|
private _dateFormats;
|
|
13
14
|
type: MtxDatetimepickerType;
|
|
14
15
|
/** A function used to filter which dates are selectable. */
|
|
@@ -17,6 +18,10 @@ export declare class MtxYearView<D> implements AfterContentInit {
|
|
|
17
18
|
selectedChange: EventEmitter<D>;
|
|
18
19
|
/** Emits when any date is selected. */
|
|
19
20
|
readonly _userSelection: EventEmitter<void>;
|
|
21
|
+
/** Emits when any date is activated. */
|
|
22
|
+
readonly activeDateChange: EventEmitter<D>;
|
|
23
|
+
/** The body of calendar table */
|
|
24
|
+
_mtxCalendarBody: MtxCalendarBody;
|
|
20
25
|
/** Grid of calendar cells representing the months of the year. */
|
|
21
26
|
_months: MtxCalendarCell[][];
|
|
22
27
|
/** The label for this year (e.g. "2017"). */
|
|
@@ -28,20 +33,19 @@ export declare class MtxYearView<D> implements AfterContentInit {
|
|
|
28
33
|
* Null if the selected Date is in a different year.
|
|
29
34
|
*/
|
|
30
35
|
_selectedMonth: number | null;
|
|
31
|
-
|
|
32
|
-
constructor(
|
|
33
|
-
private _activeDate;
|
|
36
|
+
/** Inserted by Angular inject() migration for backwards compatibility */
|
|
37
|
+
constructor(...args: unknown[]);
|
|
34
38
|
/** The date to display in this year view (everything other than the year is ignored). */
|
|
35
39
|
get activeDate(): D;
|
|
36
40
|
set activeDate(value: D);
|
|
37
|
-
private
|
|
41
|
+
private _activeDate;
|
|
38
42
|
/** The currently selected date. */
|
|
39
|
-
get selected(): D;
|
|
40
|
-
set selected(value: D);
|
|
43
|
+
get selected(): D | null;
|
|
44
|
+
set selected(value: D | null);
|
|
45
|
+
private _selected;
|
|
41
46
|
ngAfterContentInit(): void;
|
|
42
47
|
/** Handles when a new month is selected. */
|
|
43
48
|
_monthSelected(month: number): void;
|
|
44
|
-
_calendarStateDone(): void;
|
|
45
49
|
/** Initializes this month view. */
|
|
46
50
|
private _init;
|
|
47
51
|
/**
|
|
@@ -53,6 +57,12 @@ export declare class MtxYearView<D> implements AfterContentInit {
|
|
|
53
57
|
private _createCellForMonth;
|
|
54
58
|
/** Whether the given month is enabled. */
|
|
55
59
|
private _isMonthEnabled;
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
/** Handles keydown events on the calendar body when calendar is in year view. */
|
|
61
|
+
_handleCalendarBodyKeydown(event: KeyboardEvent): void;
|
|
62
|
+
/** Focuses the active cell after the microtask queue is empty. */
|
|
63
|
+
_focusActiveCell(): void;
|
|
64
|
+
/** Determines whether the user has the RTL layout direction. */
|
|
65
|
+
private _isRtl;
|
|
66
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxYearView<any>, never>;
|
|
67
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MtxYearView<any>, "mtx-year-view", ["mtxYearView"], { "type": { "alias": "type"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; }, { "selectedChange": "selectedChange"; "_userSelection": "_userSelection"; "activeDateChange": "activeDateChange"; }, never, never, true, never>;
|
|
58
68
|
}
|
|
@@ -2,9 +2,8 @@ import { MatDialogRef } from '@angular/material/dialog';
|
|
|
2
2
|
import { MtxDialogData } from './dialog-config';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class MtxDialogContainer {
|
|
5
|
-
dialogRef: MatDialogRef<MtxDialogContainer>;
|
|
5
|
+
dialogRef: MatDialogRef<MtxDialogContainer, any>;
|
|
6
6
|
data: MtxDialogData;
|
|
7
|
-
constructor(dialogRef: MatDialogRef<MtxDialogContainer>, data: MtxDialogData);
|
|
8
7
|
_onClick(fn: () => void): void;
|
|
9
8
|
_onClose(): void;
|
|
10
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<MtxDialogContainer, never>;
|
package/dialog/dialog.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import { MtxDialogData } from './dialog-config';
|
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class MtxDialog {
|
|
8
8
|
dialog: MatDialog;
|
|
9
|
-
constructor(dialog: MatDialog);
|
|
10
9
|
originalOpen(componentOrTemplateRef: (ComponentType<any> | TemplateRef<any>) | undefined, config: any): import("@angular/material/dialog").MatDialogRef<any, any>;
|
|
11
10
|
open(config: MtxDialogData, componentOrTemplateRef?: ComponentType<any> | TemplateRef<any>): import("@angular/material/dialog").MatDialogRef<any, any>;
|
|
12
11
|
alert(title: string | Observable<string>, description?: string | Observable<string>, onOk?: () => void): void;
|
|
@@ -11,8 +11,10 @@
|
|
|
11
11
|
}
|
|
12
12
|
@else {
|
|
13
13
|
@include mat.private-current-selector-or-root() {
|
|
14
|
-
@include token-utils.create-token-values(
|
|
15
|
-
tokens-mtx-drawer
|
|
14
|
+
@include token-utils.create-token-values(
|
|
15
|
+
tokens-mtx-drawer.$prefix,
|
|
16
|
+
tokens-mtx-drawer.get-unthemable-tokens()
|
|
17
|
+
);
|
|
16
18
|
}
|
|
17
19
|
}
|
|
18
20
|
}
|
|
@@ -23,8 +25,10 @@
|
|
|
23
25
|
}
|
|
24
26
|
@else {
|
|
25
27
|
@include mat.private-current-selector-or-root() {
|
|
26
|
-
@include token-utils.create-token-values(
|
|
27
|
-
tokens-mtx-drawer
|
|
28
|
+
@include token-utils.create-token-values(
|
|
29
|
+
tokens-mtx-drawer.$prefix,
|
|
30
|
+
tokens-mtx-drawer.get-color-tokens($theme)
|
|
31
|
+
);
|
|
28
32
|
}
|
|
29
33
|
}
|
|
30
34
|
}
|
|
@@ -43,13 +47,20 @@
|
|
|
43
47
|
@else {}
|
|
44
48
|
}
|
|
45
49
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
(
|
|
50
|
+
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
51
|
+
@function _define-overrides() {
|
|
52
|
+
@return (
|
|
53
|
+
(
|
|
54
|
+
namespace: tokens-mtx-drawer.$prefix,
|
|
55
|
+
tokens: tokens-mtx-drawer.get-token-slots(),
|
|
56
|
+
),
|
|
50
57
|
);
|
|
51
58
|
}
|
|
52
59
|
|
|
60
|
+
@mixin overrides($tokens: ()) {
|
|
61
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides()...);
|
|
62
|
+
}
|
|
63
|
+
|
|
53
64
|
@mixin theme($theme) {
|
|
54
65
|
@include mat.private-check-duplicate-theme-styles($theme, 'mtx-drawer') {
|
|
55
66
|
@if mat.get-theme-version($theme) == 1 {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { AnimationEvent } from '@angular/animations';
|
|
2
|
-
import { FocusMonitor, FocusTrapFactory, InteractivityChecker } from '@angular/cdk/a11y';
|
|
3
2
|
import { CdkDialogContainer } from '@angular/cdk/dialog';
|
|
4
|
-
import { OverlayRef } from '@angular/cdk/overlay';
|
|
5
3
|
import { CdkPortalOutlet } from '@angular/cdk/portal';
|
|
6
|
-
import {
|
|
4
|
+
import { EventEmitter, OnDestroy } from '@angular/core';
|
|
7
5
|
import { MtxDrawerConfig } from './drawer-config';
|
|
8
6
|
import * as i0 from "@angular/core";
|
|
9
7
|
/**
|
|
@@ -20,7 +18,6 @@ export declare class MtxDrawerContainer extends CdkDialogContainer<MtxDrawerConf
|
|
|
20
18
|
/** Whether the component has been destroyed. */
|
|
21
19
|
private _destroyed;
|
|
22
20
|
get _drawerPosition(): string;
|
|
23
|
-
constructor(elementRef: ElementRef, focusTrapFactory: FocusTrapFactory, document: any, config: MtxDrawerConfig, checker: InteractivityChecker, ngZone: NgZone, overlayRef: OverlayRef, focusMonitor?: FocusMonitor);
|
|
24
21
|
protected _contentAttached(): void;
|
|
25
22
|
/** Begin animation of bottom sheet entrance into view. */
|
|
26
23
|
enter(): void;
|
|
@@ -30,6 +27,6 @@ export declare class MtxDrawerContainer extends CdkDialogContainer<MtxDrawerConf
|
|
|
30
27
|
_onAnimationDone(event: AnimationEvent): void;
|
|
31
28
|
_onAnimationStart(event: AnimationEvent): void;
|
|
32
29
|
protected _captureInitialFocus(): void;
|
|
33
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MtxDrawerContainer,
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxDrawerContainer, never>;
|
|
34
31
|
static ɵcmp: i0.ɵɵComponentDeclaration<MtxDrawerContainer, "mtx-drawer-container", never, {}, {}, never, never, true, never>;
|
|
35
32
|
}
|
package/drawer/drawer.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Overlay } from '@angular/cdk/overlay';
|
|
2
1
|
import { ComponentType } from '@angular/cdk/portal';
|
|
3
|
-
import { InjectionToken,
|
|
2
|
+
import { InjectionToken, OnDestroy, TemplateRef } from '@angular/core';
|
|
4
3
|
import { Observable, Subject } from 'rxjs';
|
|
5
4
|
import { MtxDrawerConfig } from './drawer-config';
|
|
6
5
|
import { MtxDrawerRef } from './drawer-ref';
|
|
@@ -15,7 +14,7 @@ export declare const MTX_DRAWER_DEFAULT_OPTIONS: InjectionToken<MtxDrawerConfig<
|
|
|
15
14
|
export declare class MtxDrawer implements OnDestroy {
|
|
16
15
|
private _overlay;
|
|
17
16
|
private _parentDrawer;
|
|
18
|
-
private _defaultOptions
|
|
17
|
+
private _defaultOptions;
|
|
19
18
|
private readonly _openDrawersAtThisLevel;
|
|
20
19
|
private readonly _afterAllDismissedAtThisLevel;
|
|
21
20
|
private readonly _afterOpenedAtThisLevel;
|
|
@@ -30,7 +29,6 @@ export declare class MtxDrawer implements OnDestroy {
|
|
|
30
29
|
* Will emit on subscribe if there are no open drawers to begin with.
|
|
31
30
|
*/
|
|
32
31
|
readonly afterAllDismissed: Observable<void>;
|
|
33
|
-
constructor(_overlay: Overlay, injector: Injector, _parentDrawer: MtxDrawer, _defaultOptions?: MtxDrawerConfig | undefined);
|
|
34
32
|
/**
|
|
35
33
|
* Opens a drawer containing the given component.
|
|
36
34
|
* @param component Type of the component to load into the drawer.
|
|
@@ -56,6 +54,6 @@ export declare class MtxDrawer implements OnDestroy {
|
|
|
56
54
|
getDrawerById(id: string): MtxDrawerRef<any> | undefined;
|
|
57
55
|
ngOnDestroy(): void;
|
|
58
56
|
private _dismissDrawers;
|
|
59
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MtxDrawer,
|
|
57
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxDrawer, never>;
|
|
60
58
|
static ɵprov: i0.ɵɵInjectableDeclaration<MtxDrawer>;
|
|
61
59
|
}
|
package/fesm2022/mtxAlert.mjs
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, booleanAttribute, Component, ViewEncapsulation, ChangeDetectionStrategy, HostBinding, Input, Output, NgModule } from '@angular/core';
|
|
2
|
+
import { inject, ChangeDetectorRef, EventEmitter, booleanAttribute, Component, ViewEncapsulation, ChangeDetectionStrategy, HostBinding, Input, Output, NgModule } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { MatIconButton } from '@angular/material/button';
|
|
5
5
|
|
|
6
6
|
class MtxAlert {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
constructor(_changeDetectorRef) {
|
|
11
|
-
this._changeDetectorRef = _changeDetectorRef;
|
|
7
|
+
constructor() {
|
|
8
|
+
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
12
9
|
/** The alert's type. Can be `default`, `info`, `success`, `warning` or `danger`. */
|
|
13
10
|
this.type = 'default';
|
|
14
11
|
/** Whether to display an inline close button. */
|
|
@@ -18,21 +15,24 @@ class MtxAlert {
|
|
|
18
15
|
/** Event emitted when the alert closed. */
|
|
19
16
|
this.closed = new EventEmitter();
|
|
20
17
|
}
|
|
18
|
+
get _hostClassList() {
|
|
19
|
+
return `mtx-alert-${this.type} mat-elevation-z${this.elevation}`;
|
|
20
|
+
}
|
|
21
21
|
_onClosed() {
|
|
22
22
|
this._changeDetectorRef.markForCheck();
|
|
23
23
|
this.closed.emit(this);
|
|
24
24
|
}
|
|
25
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
26
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
25
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: MtxAlert, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
26
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: MtxAlert, isStandalone: true, selector: "mtx-alert", inputs: { type: "type", dismissible: ["dismissible", "dismissible", booleanAttribute], elevation: "elevation" }, outputs: { closed: "closed" }, host: { attributes: { "role": "alert" }, properties: { "class.mtx-alert-dismissible": "dismissible", "class": "this._hostClassList" }, classAttribute: "mtx-alert" }, exportAs: ["mtxAlert"], ngImport: i0, template: "<ng-content></ng-content>\n@if (dismissible) {\n <div class=\"mtx-alert-close\">\n <button mat-icon-button type=\"button\" aria-label=\"Close\" (click)=\"_onClosed()\">\n <svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\n <path\n d=\"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z\"\n />\n </svg>\n </button>\n </div>\n}\n", styles: [".mtx-alert{position:relative;display:block;padding:.75rem 1rem;margin-bottom:1rem;line-height:1.5;border:1px solid var(--mtx-alert-outline-color, var(--mat-sys-outline-variant));border-radius:var(--mtx-alert-container-shape, var(--mat-sys-corner-small));background-color:var(--mtx-alert-background-color, var(--mat-sys-surface-container));color:var(--mtx-alert-text-color, var(--mat-sys-on-surface))}.mtx-alert.mtx-alert-info{border-color:var(--mtx-alert-info-outline-color, light-dark(#abc7ff, #005cbb));background-color:var(--mtx-alert-info-background-color, light-dark(#d7e3ff, #002f65));color:var(--mtx-alert-info-text-color, light-dark(#002f65, #d7e3ff))}.mtx-alert.mtx-alert-success{border-color:var(--mtx-alert-success-outline-color, light-dark(#02e600, #026e00));background-color:var(--mtx-alert-success-background-color, light-dark(#cbffb8, #013a00));color:var(--mtx-alert-success-text-color, light-dark(#013a00, #cbffb8))}.mtx-alert.mtx-alert-warning{border-color:var(--mtx-alert-warning-outline-color, light-dark(#cdcd00, #626200));background-color:var(--mtx-alert-warning-background-color, light-dark(#fffeac, #323200));color:var(--mtx-alert-warning-text-color, light-dark(#323200, #fffeac))}.mtx-alert.mtx-alert-danger{border-color:var(--mtx-alert-danger-outline-color, light-dark(#ffb4a8, #c00100));background-color:var(--mtx-alert-danger-background-color, light-dark(#ffdad4, #690100));color:var(--mtx-alert-danger-text-color, light-dark(#690100, #ffdad4))}.mtx-alert-close{position:absolute;top:0;right:0;display:flex;align-items:center;justify-content:center;width:3rem;height:3rem}[dir=rtl] .mtx-alert-close{right:auto;left:0}.mtx-alert-dismissible{padding-right:3rem}\n"], dependencies: [{ kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
27
27
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: MtxAlert, decorators: [{
|
|
29
29
|
type: Component,
|
|
30
30
|
args: [{ selector: 'mtx-alert', exportAs: 'mtxAlert', host: {
|
|
31
31
|
'class': 'mtx-alert',
|
|
32
32
|
'[class.mtx-alert-dismissible]': 'dismissible',
|
|
33
33
|
'role': 'alert',
|
|
34
|
-
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
35
|
-
}],
|
|
34
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatIconButton], template: "<ng-content></ng-content>\n@if (dismissible) {\n <div class=\"mtx-alert-close\">\n <button mat-icon-button type=\"button\" aria-label=\"Close\" (click)=\"_onClosed()\">\n <svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\n <path\n d=\"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z\"\n />\n </svg>\n </button>\n </div>\n}\n", styles: [".mtx-alert{position:relative;display:block;padding:.75rem 1rem;margin-bottom:1rem;line-height:1.5;border:1px solid var(--mtx-alert-outline-color, var(--mat-sys-outline-variant));border-radius:var(--mtx-alert-container-shape, var(--mat-sys-corner-small));background-color:var(--mtx-alert-background-color, var(--mat-sys-surface-container));color:var(--mtx-alert-text-color, var(--mat-sys-on-surface))}.mtx-alert.mtx-alert-info{border-color:var(--mtx-alert-info-outline-color, light-dark(#abc7ff, #005cbb));background-color:var(--mtx-alert-info-background-color, light-dark(#d7e3ff, #002f65));color:var(--mtx-alert-info-text-color, light-dark(#002f65, #d7e3ff))}.mtx-alert.mtx-alert-success{border-color:var(--mtx-alert-success-outline-color, light-dark(#02e600, #026e00));background-color:var(--mtx-alert-success-background-color, light-dark(#cbffb8, #013a00));color:var(--mtx-alert-success-text-color, light-dark(#013a00, #cbffb8))}.mtx-alert.mtx-alert-warning{border-color:var(--mtx-alert-warning-outline-color, light-dark(#cdcd00, #626200));background-color:var(--mtx-alert-warning-background-color, light-dark(#fffeac, #323200));color:var(--mtx-alert-warning-text-color, light-dark(#323200, #fffeac))}.mtx-alert.mtx-alert-danger{border-color:var(--mtx-alert-danger-outline-color, light-dark(#ffb4a8, #c00100));background-color:var(--mtx-alert-danger-background-color, light-dark(#ffdad4, #690100));color:var(--mtx-alert-danger-text-color, light-dark(#690100, #ffdad4))}.mtx-alert-close{position:absolute;top:0;right:0;display:flex;align-items:center;justify-content:center;width:3rem;height:3rem}[dir=rtl] .mtx-alert-close{right:auto;left:0}.mtx-alert-dismissible{padding-right:3rem}\n"] }]
|
|
35
|
+
}], propDecorators: { _hostClassList: [{
|
|
36
36
|
type: HostBinding,
|
|
37
37
|
args: ['class']
|
|
38
38
|
}], type: [{
|
|
@@ -47,11 +47,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
47
47
|
}] } });
|
|
48
48
|
|
|
49
49
|
class MtxAlertModule {
|
|
50
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
51
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
52
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
50
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: MtxAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
51
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.4", ngImport: i0, type: MtxAlertModule, imports: [CommonModule, MtxAlert], exports: [MtxAlert] }); }
|
|
52
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: MtxAlertModule, imports: [CommonModule, MtxAlert] }); }
|
|
53
53
|
}
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: MtxAlertModule, decorators: [{
|
|
55
55
|
type: NgModule,
|
|
56
56
|
args: [{
|
|
57
57
|
imports: [CommonModule, MtxAlert],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mtxAlert.mjs","sources":["../../../projects/extensions/alert/alert.ts","../../../projects/extensions/alert/alert.html","../../../projects/extensions/alert/alert-module.ts","../../../projects/extensions/alert/mtxAlert.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n HostBinding,\n Input,\n Output,\n ViewEncapsulation,\n booleanAttribute,\n} from '@angular/core';\nimport { MatIconButton } from '@angular/material/button';\n\nexport type MtxAlertType = 'default' | 'info' | 'success' | 'warning' | 'danger';\n\n@Component({\n selector: 'mtx-alert',\n exportAs: 'mtxAlert',\n host: {\n 'class': 'mtx-alert',\n '[class.mtx-alert-dismissible]': 'dismissible',\n 'role': 'alert',\n },\n templateUrl: './alert.html',\n styleUrl: './alert.scss',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n
|
|
1
|
+
{"version":3,"file":"mtxAlert.mjs","sources":["../../../projects/extensions/alert/alert.ts","../../../projects/extensions/alert/alert.html","../../../projects/extensions/alert/alert-module.ts","../../../projects/extensions/alert/mtxAlert.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n HostBinding,\n Input,\n Output,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n} from '@angular/core';\nimport { MatIconButton } from '@angular/material/button';\n\nexport type MtxAlertType = 'default' | 'info' | 'success' | 'warning' | 'danger';\n\n@Component({\n selector: 'mtx-alert',\n exportAs: 'mtxAlert',\n host: {\n 'class': 'mtx-alert',\n '[class.mtx-alert-dismissible]': 'dismissible',\n 'role': 'alert',\n },\n templateUrl: './alert.html',\n styleUrl: './alert.scss',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MatIconButton],\n})\nexport class MtxAlert {\n private _changeDetectorRef = inject(ChangeDetectorRef);\n\n @HostBinding('class')\n get _hostClassList() {\n return `mtx-alert-${this.type} mat-elevation-z${this.elevation}`;\n }\n\n /** The alert's type. Can be `default`, `info`, `success`, `warning` or `danger`. */\n @Input() type: MtxAlertType = 'default';\n\n /** Whether to display an inline close button. */\n @Input({ transform: booleanAttribute }) dismissible = false;\n\n /** The alert's elevation (0~24). */\n @Input() elevation = 0;\n\n /** Event emitted when the alert closed. */\n @Output() closed = new EventEmitter<MtxAlert>();\n\n _onClosed(): void {\n this._changeDetectorRef.markForCheck();\n this.closed.emit(this);\n }\n}\n","<ng-content></ng-content>\n@if (dismissible) {\n <div class=\"mtx-alert-close\">\n <button mat-icon-button type=\"button\" aria-label=\"Close\" (click)=\"_onClosed()\">\n <svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\n <path\n d=\"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z\"\n />\n </svg>\n </button>\n </div>\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MtxAlert } from './alert';\n\n@NgModule({\n imports: [CommonModule, MtxAlert],\n exports: [MtxAlert],\n})\nexport class MtxAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"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"}
|
package/fesm2022/mtxButton.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { booleanAttribute, Directive, Input, NgModule } from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, ViewContainerRef, Renderer2, booleanAttribute, Directive, Input, NgModule } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { MatButtonModule } from '@angular/material/button';
|
|
5
5
|
import { MatProgressSpinner, MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
6
6
|
|
|
7
7
|
class MatButtonLoading {
|
|
8
|
-
constructor(
|
|
9
|
-
this._elementRef =
|
|
10
|
-
this._viewContainerRef =
|
|
11
|
-
this._renderer =
|
|
8
|
+
constructor() {
|
|
9
|
+
this._elementRef = inject(ElementRef);
|
|
10
|
+
this._viewContainerRef = inject(ViewContainerRef);
|
|
11
|
+
this._renderer = inject(Renderer2);
|
|
12
12
|
this.loading = false;
|
|
13
13
|
this.disabled = false;
|
|
14
14
|
}
|
|
@@ -42,10 +42,10 @@ class MatButtonLoading {
|
|
|
42
42
|
this.spinner = null;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
46
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "
|
|
45
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: MatButtonLoading, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
46
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.4", type: MatButtonLoading, isStandalone: true, selector: "[mat-button][loading],\n [mat-raised-button][loading],\n [mat-stroked-button][loading],\n [mat-flat-button][loading],\n [mat-icon-button][loading],\n [mat-fab][loading],\n [mat-mini-fab][loading]", inputs: { loading: ["loading", "loading", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute], color: "color" }, usesOnChanges: true, ngImport: i0 }); }
|
|
47
47
|
}
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: MatButtonLoading, decorators: [{
|
|
49
49
|
type: Directive,
|
|
50
50
|
args: [{
|
|
51
51
|
selector: `[mat-button][loading],
|
|
@@ -55,9 +55,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
55
55
|
[mat-icon-button][loading],
|
|
56
56
|
[mat-fab][loading],
|
|
57
57
|
[mat-mini-fab][loading]`,
|
|
58
|
-
standalone: true,
|
|
59
58
|
}]
|
|
60
|
-
}],
|
|
59
|
+
}], propDecorators: { loading: [{
|
|
61
60
|
type: Input,
|
|
62
61
|
args: [{ transform: booleanAttribute }]
|
|
63
62
|
}], disabled: [{
|
|
@@ -68,11 +67,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
68
67
|
}] } });
|
|
69
68
|
|
|
70
69
|
class MtxButtonModule {
|
|
71
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
72
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
73
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
70
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: MtxButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
71
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.4", ngImport: i0, type: MtxButtonModule, imports: [CommonModule, MatButtonModule, MatProgressSpinnerModule, MatButtonLoading], exports: [MatButtonLoading] }); }
|
|
72
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: MtxButtonModule, imports: [CommonModule, MatButtonModule, MatProgressSpinnerModule] }); }
|
|
74
73
|
}
|
|
75
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: MtxButtonModule, decorators: [{
|
|
76
75
|
type: NgModule,
|
|
77
76
|
args: [{
|
|
78
77
|
imports: [CommonModule, MatButtonModule, MatProgressSpinnerModule, MatButtonLoading],
|