@ng-matero/extensions 19.4.1 → 20.0.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/_index.scss +1 -1
- package/alert/_alert-theme.scss +26 -31
- package/alert/_m2-alert.scss +59 -0
- package/alert/_m3-alert.scss +41 -0
- package/alert/alert.scss +27 -31
- package/alert/index.d.ts +30 -5
- package/button/index.d.ts +31 -5
- package/checkbox-group/index.d.ts +117 -5
- package/colorpicker/_colorpicker-theme.scss +31 -36
- package/{core/tokens/m2/mtx/_colorpicker.scss → colorpicker/_m2-colorpicker.scss} +6 -10
- package/colorpicker/_m3-colorpicker.scss +23 -0
- package/colorpicker/colorpicker-toggle.scss +4 -9
- package/colorpicker/index.d.ts +285 -3
- package/column-resize/index.d.ts +456 -3
- package/core/index.d.ts +147 -5
- package/core/theming/_color-api-backwards-compatibility.scss +8 -15
- package/core/theming/_definition.scss +81 -75
- package/core/theming/_palettes.scss +1036 -0
- package/core/tokens/{m2/_index.scss → _m2-tokens.scss} +22 -22
- package/core/tokens/_m2-utils.scss +108 -0
- package/core/tokens/_m3-system.scss +128 -106
- package/core/tokens/_m3-tokens.scss +36 -282
- package/core/tokens/_m3-utils.scss +48 -0
- package/core/tokens/_token-utils.scss +67 -239
- package/core/tokens/m3/_index.scss +7 -0
- package/core/tokens/m3/_md-sys-color.scss +156 -0
- package/core/tokens/m3/_md-sys-elevation.scss +15 -0
- package/core/tokens/m3/_md-sys-motion.scss +35 -0
- package/core/tokens/m3/_md-sys-shape.scss +21 -0
- package/core/tokens/m3/_md-sys-state.scss +13 -0
- package/core/tokens/m3/_md-sys-typescale.scss +128 -0
- package/core/tokens/m3/_theme.scss +47 -0
- package/datetimepicker/_datetimepicker-theme.scss +29 -39
- package/datetimepicker/_m2-datetimepicker.scss +149 -0
- package/datetimepicker/_m3-datetimepicker.scss +81 -0
- package/datetimepicker/calendar-body.scss +31 -56
- package/datetimepicker/calendar.scss +43 -79
- package/datetimepicker/clock.scss +28 -47
- package/datetimepicker/datetimepicker-content.scss +9 -15
- package/datetimepicker/datetimepicker-toggle.scss +4 -9
- package/datetimepicker/index.d.ts +1208 -3
- package/datetimepicker/time-view.scss +26 -32
- package/dialog/index.d.ts +54 -5
- package/drawer/_drawer-theme.scss +25 -30
- package/{core/tokens/m2/mtx/_drawer.scss → drawer/_m2-drawer.scss} +9 -12
- package/drawer/_m3-drawer.scss +24 -0
- package/drawer/drawer-container.scss +13 -24
- package/drawer/index.d.ts +221 -3
- package/fesm2022/mtxAlert.mjs +7 -7
- package/fesm2022/mtxAlert.mjs.map +1 -1
- package/fesm2022/mtxButton.mjs +11 -11
- package/fesm2022/mtxButton.mjs.map +1 -1
- package/fesm2022/mtxCheckboxGroup.mjs +7 -7
- package/fesm2022/mtxColorpicker.mjs +21 -21
- package/fesm2022/mtxColorpicker.mjs.map +1 -1
- package/fesm2022/mtxColumnResize.mjs +232 -103
- package/fesm2022/mtxColumnResize.mjs.map +1 -1
- package/fesm2022/mtxCore.mjs +21 -21
- package/fesm2022/mtxDatetimepicker.mjs +63 -67
- package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
- package/fesm2022/mtxDialog.mjs +10 -10
- package/fesm2022/mtxDialog.mjs.map +1 -1
- package/fesm2022/mtxDrawer.mjs +10 -10
- package/fesm2022/mtxGrid.mjs +78 -77
- package/fesm2022/mtxGrid.mjs.map +1 -1
- package/fesm2022/mtxLoader.mjs +7 -7
- package/fesm2022/mtxPhotoviewer.mjs +7 -7
- package/fesm2022/mtxPopover.mjs +24 -25
- package/fesm2022/mtxPopover.mjs.map +1 -1
- package/fesm2022/mtxProgress.mjs +7 -7
- package/fesm2022/mtxSelect.mjs +54 -54
- package/fesm2022/mtxSelect.mjs.map +1 -1
- package/fesm2022/mtxSplit.mjs +10 -10
- package/fesm2022/mtxTooltip.mjs +13 -13
- package/fesm2022/mtxTooltip.mjs.map +1 -1
- package/grid/_grid-theme.scss +24 -34
- package/grid/_m2-grid.scss +66 -0
- package/grid/_m3-grid.scss +35 -0
- package/grid/column-menu.scss +6 -23
- package/grid/column-resize/_column-resize.scss +35 -30
- package/grid/grid.scss +41 -74
- package/grid/index.d.ts +799 -3
- package/index.d.ts +2 -5
- package/loader/_loader-theme.scss +26 -31
- package/{core/tokens/m2/mtx/_loader.scss → loader/_m2-loader.scss} +5 -10
- package/loader/_m3-loader.scss +20 -0
- package/loader/index.d.ts +43 -5
- package/loader/loader.scss +4 -5
- package/package.json +28 -28
- package/photoviewer/index.d.ts +26 -5
- package/{core/tokens/m2/mtx/_popover.scss → popover/_m2-popover.scss} +9 -12
- package/popover/_m3-popover.scss +26 -0
- package/popover/_popover-theme.scss +26 -31
- package/popover/index.d.ts +399 -3
- package/popover/popover.scss +23 -29
- 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/_m2-progress.scss +53 -0
- package/progress/_m3-progress.scss +33 -0
- package/progress/_progress-theme.scss +22 -34
- package/progress/index.d.ts +35 -5
- package/progress/progress.scss +28 -43
- package/select/_m2-select.scss +79 -0
- package/select/_m3-select.scss +46 -0
- package/select/_select-theme.scss +27 -37
- package/select/index.d.ts +381 -3
- package/select/select.scss +189 -205
- package/{core/tokens/m2/mtx/_split.scss → split/_m2-split.scss} +6 -9
- package/split/_m3-split.scss +23 -0
- package/split/_split-theme.scss +31 -34
- package/split/index.d.ts +255 -3
- package/split/split.scss +8 -11
- package/tooltip/_m2-tooltip.scss +50 -0
- package/tooltip/_m3-tooltip.scss +28 -0
- package/tooltip/_tooltip-theme.scss +23 -47
- package/tooltip/index.d.ts +345 -3
- package/tooltip/tooltip.scss +11 -15
- package/alert/alert-module.d.ts +0 -8
- package/alert/alert.d.ts +0 -19
- package/alert/public-api.d.ts +0 -2
- package/button/button-loading.d.ts +0 -19
- package/button/button-module.d.ts +0 -10
- package/button/public-api.d.ts +0 -2
- package/checkbox-group/checkbox-group-module.d.ts +0 -11
- package/checkbox-group/checkbox-group.d.ts +0 -86
- package/checkbox-group/interfaces.d.ts +0 -17
- package/checkbox-group/public-api.d.ts +0 -3
- package/colorpicker/colorpicker-animations.d.ts +0 -9
- package/colorpicker/colorpicker-input.d.ts +0 -88
- package/colorpicker/colorpicker-module.d.ts +0 -15
- package/colorpicker/colorpicker-toggle.d.ts +0 -39
- package/colorpicker/colorpicker.d.ts +0 -140
- package/colorpicker/public-api.d.ts +0 -5
- package/column-resize/column-resize-directives/column-resize-flex.d.ts +0 -29
- package/column-resize/column-resize-directives/column-resize.d.ts +0 -29
- package/column-resize/column-resize-directives/constants.d.ts +0 -10
- package/column-resize/column-resize-module.d.ts +0 -12
- package/column-resize/column-resize-notifier.d.ts +0 -48
- package/column-resize/column-resize.d.ts +0 -39
- package/column-resize/column-size-store.d.ts +0 -12
- package/column-resize/event-dispatcher.d.ts +0 -35
- package/column-resize/overlay-handle.d.ts +0 -43
- package/column-resize/polyfill.d.ts +0 -9
- package/column-resize/public-api.d.ts +0 -12
- package/column-resize/resizable.d.ts +0 -63
- package/column-resize/resize-ref.d.ts +0 -17
- package/column-resize/resize-strategy.d.ts +0 -84
- package/column-resize/selectors.d.ts +0 -10
- package/core/datetime/datetime-adapter.d.ts +0 -45
- package/core/datetime/datetime-formats.d.ts +0 -22
- package/core/datetime/datetime.module.d.ts +0 -15
- package/core/datetime/index.d.ts +0 -5
- package/core/datetime/native-datetime-adapter.d.ts +0 -40
- package/core/datetime/native-datetime-formats.d.ts +0 -2
- package/core/pipes/index.d.ts +0 -3
- package/core/pipes/is-template-ref.pipe.d.ts +0 -7
- package/core/pipes/pipes.module.d.ts +0 -9
- package/core/pipes/to-observable.pipe.d.ts +0 -8
- package/core/public-api.d.ts +0 -2
- package/core/theming/_inspection.scss +0 -38
- package/core/theming/_validation.scss +0 -5
- package/core/tokens/_density.scss +0 -49
- package/core/tokens/_format-tokens.scss +0 -5
- package/core/tokens/_token-definition.scss +0 -271
- package/core/tokens/m2/mdc/_plain-tooltip.scss +0 -63
- package/core/tokens/m2/mtx/_alert.scss +0 -62
- package/core/tokens/m2/mtx/_datetimepicker.scss +0 -152
- package/core/tokens/m2/mtx/_grid.scss +0 -69
- package/core/tokens/m2/mtx/_progress.scss +0 -56
- package/core/tokens/m2/mtx/_select.scss +0 -82
- package/core/tokens/m3/definitions/_index.scss +0 -9
- package/core/tokens/m3/definitions/_md-comp-plain-tooltip.scss +0 -51
- package/core/tokens/m3/definitions/_md-ref-palette.scss +0 -100
- package/core/tokens/m3/definitions/_md-ref-typeface.scss +0 -14
- package/core/tokens/m3/definitions/_md-sys-color.scss +0 -126
- package/core/tokens/m3/definitions/_md-sys-elevation.scss +0 -15
- package/core/tokens/m3/definitions/_md-sys-motion.scss +0 -46
- package/core/tokens/m3/definitions/_md-sys-shape.scss +0 -24
- package/core/tokens/m3/definitions/_md-sys-state.scss +0 -13
- package/core/tokens/m3/definitions/_md-sys-typescale.scss +0 -308
- package/core/tokens/m3/index.scss +0 -47
- package/core/tokens/m3/mdc/_plain-tooltip.scss +0 -15
- package/core/tokens/m3/mtx/_alert.scss +0 -41
- package/core/tokens/m3/mtx/_colorpicker.scss +0 -19
- package/core/tokens/m3/mtx/_datetimepicker.scss +0 -140
- package/core/tokens/m3/mtx/_drawer.scss +0 -22
- package/core/tokens/m3/mtx/_grid.scss +0 -32
- package/core/tokens/m3/mtx/_loader.scss +0 -22
- package/core/tokens/m3/mtx/_popover.scss +0 -25
- package/core/tokens/m3/mtx/_progress.scss +0 -32
- package/core/tokens/m3/mtx/_select.scss +0 -76
- package/core/tokens/m3/mtx/_split.scss +0 -30
- package/datetimepicker/calendar-body.d.ts +0 -66
- package/datetimepicker/calendar.d.ts +0 -157
- package/datetimepicker/clock.d.ts +0 -101
- package/datetimepicker/datetimepicker-actions.d.ts +0 -36
- package/datetimepicker/datetimepicker-animations.d.ts +0 -11
- package/datetimepicker/datetimepicker-errors.d.ts +0 -2
- package/datetimepicker/datetimepicker-filtertype.d.ts +0 -5
- package/datetimepicker/datetimepicker-input.d.ts +0 -105
- package/datetimepicker/datetimepicker-intl.d.ts +0 -53
- package/datetimepicker/datetimepicker-module.d.ts +0 -22
- package/datetimepicker/datetimepicker-toggle.d.ts +0 -42
- package/datetimepicker/datetimepicker-types.d.ts +0 -6
- package/datetimepicker/datetimepicker.d.ts +0 -274
- package/datetimepicker/month-view.d.ts +0 -80
- package/datetimepicker/multi-year-view.d.ts +0 -86
- package/datetimepicker/public-api.d.ts +0 -16
- package/datetimepicker/time-view.d.ts +0 -147
- package/datetimepicker/year-view.d.ts +0 -68
- package/dialog/dialog-config.d.ts +0 -17
- package/dialog/dialog-container.d.ts +0 -11
- package/dialog/dialog-module.d.ts +0 -12
- package/dialog/dialog.d.ts +0 -15
- package/dialog/public-api.d.ts +0 -4
- package/drawer/drawer-animations.d.ts +0 -8
- package/drawer/drawer-config.d.ts +0 -63
- package/drawer/drawer-container.d.ts +0 -35
- package/drawer/drawer-module.d.ts +0 -10
- package/drawer/drawer-ref.d.ts +0 -53
- package/drawer/drawer.d.ts +0 -59
- package/drawer/public-api.d.ts +0 -6
- package/grid/cell.d.ts +0 -32
- package/grid/column-menu.d.ts +0 -39
- package/grid/column-resize/column-resize-directives/column-resize-flex.d.ts +0 -24
- package/grid/column-resize/column-resize-directives/column-resize.d.ts +0 -24
- package/grid/column-resize/column-resize-directives/common.d.ts +0 -13
- package/grid/column-resize/column-resize-module.d.ts +0 -17
- package/grid/column-resize/index.d.ts +0 -7
- package/grid/column-resize/overlay-handle.d.ts +0 -32
- package/grid/column-resize/resizable-directives/common.d.ts +0 -19
- package/grid/column-resize/resizable-directives/resizable.d.ts +0 -32
- package/grid/column-resize/resize-strategy.d.ts +0 -20
- package/grid/expansion-toggle.d.ts +0 -17
- package/grid/grid-module.d.ts +0 -31
- package/grid/grid-pipes.d.ts +0 -39
- package/grid/grid-utils.d.ts +0 -33
- package/grid/grid.d.ts +0 -268
- package/grid/interfaces.d.ts +0 -180
- package/grid/public-api.d.ts +0 -17
- package/grid/selectable-cell.d.ts +0 -16
- package/loader/loader-module.d.ts +0 -10
- package/loader/loader.d.ts +0 -30
- package/loader/public-api.d.ts +0 -2
- package/photoviewer/photoviewer-module.d.ts +0 -7
- package/photoviewer/photoviewer.d.ts +0 -17
- package/photoviewer/public-api.d.ts +0 -2
- package/popover/popover-animations.d.ts +0 -11
- package/popover/popover-content.d.ts +0 -43
- package/popover/popover-errors.d.ts +0 -14
- package/popover/popover-interfaces.d.ts +0 -50
- package/popover/popover-module.d.ts +0 -13
- package/popover/popover-target.d.ts +0 -7
- package/popover/popover-trigger.d.ts +0 -132
- package/popover/popover-types.d.ts +0 -10
- package/popover/popover.d.ts +0 -147
- package/popover/public-api.d.ts +0 -8
- package/progress/progress-module.d.ts +0 -8
- package/progress/progress.d.ts +0 -24
- package/progress/public-api.d.ts +0 -2
- package/public-api.d.ts +0 -2
- package/select/option.d.ts +0 -21
- package/select/public-api.d.ts +0 -5
- package/select/select-intl.d.ts +0 -18
- package/select/select-module.d.ts +0 -12
- package/select/select.d.ts +0 -270
- package/select/templates.d.ts +0 -67
- package/split/interfaces.d.ts +0 -52
- package/split/public-api.d.ts +0 -5
- package/split/split-module.d.ts +0 -9
- package/split/split-pane.d.ts +0 -53
- package/split/split.d.ts +0 -133
- package/split/utils.d.ts +0 -13
- package/tooltip/public-api.d.ts +0 -3
- package/tooltip/tooltip-animations.d.ts +0 -9
- package/tooltip/tooltip-module.d.ts +0 -13
- package/tooltip/tooltip.d.ts +0 -321
package/tooltip/index.d.ts
CHANGED
|
@@ -1,5 +1,347 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, OnDestroy, AfterViewInit, TemplateRef, ElementRef } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/cdk/a11y';
|
|
4
|
+
import * as i2 from '@angular/common';
|
|
5
|
+
import * as i3 from '@angular/cdk/overlay';
|
|
6
|
+
import { ScrollStrategy, Overlay, OverlayRef, ConnectedPosition, OriginConnectionPosition, OverlayConnectionPosition } from '@angular/cdk/overlay';
|
|
7
|
+
import * as i4 from '@angular/material/core';
|
|
8
|
+
import * as i5 from '@ng-matero/extensions/core';
|
|
9
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
10
|
+
import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
|
|
11
|
+
import { Observable } from 'rxjs';
|
|
12
|
+
import * as i7 from '@angular/cdk/scrolling';
|
|
13
|
+
|
|
14
|
+
/** Possible positions for a tooltip. */
|
|
15
|
+
type TooltipPosition = 'left' | 'right' | 'above' | 'below' | 'before' | 'after';
|
|
1
16
|
/**
|
|
2
|
-
*
|
|
17
|
+
* Options for how the tooltip trigger should handle touch gestures.
|
|
18
|
+
* See `MtxTooltip.touchGestures` for more information.
|
|
3
19
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
20
|
+
type TooltipTouchGestures = 'auto' | 'on' | 'off';
|
|
21
|
+
/** Possible visibility states of a tooltip. */
|
|
22
|
+
type TooltipVisibility = 'initial' | 'visible' | 'hidden';
|
|
23
|
+
/** Time in ms to throttle repositioning after scroll events. */
|
|
24
|
+
declare const SCROLL_THROTTLE_MS = 20;
|
|
25
|
+
/**
|
|
26
|
+
* Creates an error to be thrown if the user supplied an invalid tooltip position.
|
|
27
|
+
* @docs-private
|
|
28
|
+
*/
|
|
29
|
+
declare function getMtxTooltipInvalidPositionError(position: string): Error;
|
|
30
|
+
/** Injection token that determines the scroll handling while a tooltip is visible. */
|
|
31
|
+
declare const MTX_TOOLTIP_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
|
|
32
|
+
/**
|
|
33
|
+
* @docs-private
|
|
34
|
+
* @deprecated No longer used, will be removed.
|
|
35
|
+
* @breaking-change 21.0.0
|
|
36
|
+
*/
|
|
37
|
+
declare function MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy;
|
|
38
|
+
/**
|
|
39
|
+
* @docs-private
|
|
40
|
+
* @deprecated No longer used, will be removed.
|
|
41
|
+
* @breaking-change 21.0.0
|
|
42
|
+
*/
|
|
43
|
+
declare const MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER: {
|
|
44
|
+
provide: InjectionToken<() => ScrollStrategy>;
|
|
45
|
+
deps: (typeof Overlay)[];
|
|
46
|
+
useFactory: typeof MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* @docs-private
|
|
50
|
+
* @deprecated No longer used, will be removed.
|
|
51
|
+
* @breaking-change 21.0.0
|
|
52
|
+
*/
|
|
53
|
+
declare function MTX_TOOLTIP_DEFAULT_OPTIONS_FACTORY(): MtxTooltipDefaultOptions;
|
|
54
|
+
/** Injection token to be used to override the default options for `mtxTooltip`. */
|
|
55
|
+
declare const MTX_TOOLTIP_DEFAULT_OPTIONS: InjectionToken<MtxTooltipDefaultOptions>;
|
|
56
|
+
/** Default `mtxTooltip` options that can be overridden. */
|
|
57
|
+
interface MtxTooltipDefaultOptions {
|
|
58
|
+
/** Default delay when the tooltip is shown. */
|
|
59
|
+
showDelay: number;
|
|
60
|
+
/** Default delay when the tooltip is hidden. */
|
|
61
|
+
hideDelay: number;
|
|
62
|
+
/** Default delay when hiding the tooltip on a touch device. */
|
|
63
|
+
touchendHideDelay: number;
|
|
64
|
+
/** Time between the user putting the pointer on a tooltip trigger and the long press event being fired on a touch device. */
|
|
65
|
+
touchLongPressShowDelay?: number;
|
|
66
|
+
/** Default touch gesture handling for tooltips. */
|
|
67
|
+
touchGestures?: TooltipTouchGestures;
|
|
68
|
+
/** Default position for tooltips. */
|
|
69
|
+
position?: TooltipPosition;
|
|
70
|
+
/**
|
|
71
|
+
* Default value for whether tooltips should be positioned near the click or touch origin
|
|
72
|
+
* instead of outside the element bounding box.
|
|
73
|
+
*/
|
|
74
|
+
positionAtOrigin?: boolean;
|
|
75
|
+
/** Disables the ability for the user to interact with the tooltip element. */
|
|
76
|
+
disableTooltipInteractivity?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Default classes to be applied to the tooltip. These default classes will not be applied if
|
|
79
|
+
* `tooltipClass` is defined directly on the tooltip element, as it will override the default.
|
|
80
|
+
*/
|
|
81
|
+
tooltipClass?: string | string[];
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* CSS class that will be attached to the overlay panel.
|
|
85
|
+
* @deprecated
|
|
86
|
+
* @breaking-change 13.0.0 remove this variable
|
|
87
|
+
*/
|
|
88
|
+
declare const TOOLTIP_PANEL_CLASS = "mtx-mdc-tooltip-panel";
|
|
89
|
+
/**
|
|
90
|
+
* Directive that attaches a material design tooltip to the host element. Animates the showing and
|
|
91
|
+
* hiding of a tooltip provided position (defaults to below the element).
|
|
92
|
+
*
|
|
93
|
+
* https://material.io/design/components/tooltips.html
|
|
94
|
+
*/
|
|
95
|
+
declare class MtxTooltip implements OnDestroy, AfterViewInit {
|
|
96
|
+
private _elementRef;
|
|
97
|
+
private _ngZone;
|
|
98
|
+
private _platform;
|
|
99
|
+
private _ariaDescriber;
|
|
100
|
+
private _focusMonitor;
|
|
101
|
+
protected _dir: Directionality;
|
|
102
|
+
private _injector;
|
|
103
|
+
private _viewContainerRef;
|
|
104
|
+
private _defaultOptions;
|
|
105
|
+
_overlayRef: OverlayRef | null;
|
|
106
|
+
_tooltipInstance: TooltipComponent | null;
|
|
107
|
+
private _portal;
|
|
108
|
+
private _position;
|
|
109
|
+
private _positionAtOrigin;
|
|
110
|
+
private _disabled;
|
|
111
|
+
private _tooltipClass;
|
|
112
|
+
private _viewInitialized;
|
|
113
|
+
private _pointerExitEventsInitialized;
|
|
114
|
+
private readonly _tooltipComponent;
|
|
115
|
+
private _viewportMargin;
|
|
116
|
+
private _currentPosition;
|
|
117
|
+
private readonly _cssClassPrefix;
|
|
118
|
+
private _ariaDescriptionPending;
|
|
119
|
+
private _dirSubscribed;
|
|
120
|
+
/** Allows the user to define the position of the tooltip relative to the parent element */
|
|
121
|
+
get position(): TooltipPosition;
|
|
122
|
+
set position(value: TooltipPosition);
|
|
123
|
+
/**
|
|
124
|
+
* Whether tooltip should be relative to the click or touch origin
|
|
125
|
+
* instead of outside the element bounding box.
|
|
126
|
+
*/
|
|
127
|
+
get positionAtOrigin(): boolean;
|
|
128
|
+
set positionAtOrigin(value: BooleanInput);
|
|
129
|
+
/** Disables the display of the tooltip. */
|
|
130
|
+
get disabled(): boolean;
|
|
131
|
+
set disabled(value: BooleanInput);
|
|
132
|
+
/** The default delay in ms before showing the tooltip after show is called */
|
|
133
|
+
get showDelay(): number;
|
|
134
|
+
set showDelay(value: NumberInput);
|
|
135
|
+
private _showDelay;
|
|
136
|
+
/** The default delay in ms before hiding the tooltip after hide is called */
|
|
137
|
+
get hideDelay(): number;
|
|
138
|
+
set hideDelay(value: NumberInput);
|
|
139
|
+
private _hideDelay;
|
|
140
|
+
/**
|
|
141
|
+
* How touch gestures should be handled by the tooltip. On touch devices the tooltip directive
|
|
142
|
+
* uses a long press gesture to show and hide, however it can conflict with the native browser
|
|
143
|
+
* gestures. To work around the conflict, Angular Material disables native gestures on the
|
|
144
|
+
* trigger, but that might not be desirable on particular elements (e.g. inputs and draggable
|
|
145
|
+
* elements). The different values for this option configure the touch event handling as follows:
|
|
146
|
+
* - `auto` - Enables touch gestures for all elements, but tries to avoid conflicts with native
|
|
147
|
+
* browser gestures on particular elements. In particular, it allows text selection on inputs
|
|
148
|
+
* and textareas, and preserves the native browser dragging on elements marked as `draggable`.
|
|
149
|
+
* - `on` - Enables touch gestures for all elements and disables native
|
|
150
|
+
* browser gestures with no exceptions.
|
|
151
|
+
* - `off` - Disables touch gestures. Note that this will prevent the tooltip from
|
|
152
|
+
* showing on touch devices.
|
|
153
|
+
*/
|
|
154
|
+
touchGestures: TooltipTouchGestures;
|
|
155
|
+
/** The message to be displayed in the tooltip */
|
|
156
|
+
get message(): string | TemplateRef<any>;
|
|
157
|
+
set message(value: string | TemplateRef<any>);
|
|
158
|
+
private _message;
|
|
159
|
+
/** Context to be passed to the tooltip. */
|
|
160
|
+
get tooltipContext(): any;
|
|
161
|
+
set tooltipContext(value: any);
|
|
162
|
+
private _tooltipContext;
|
|
163
|
+
/** Classes to be passed to the tooltip. Supports the same syntax as `ngClass`. */
|
|
164
|
+
get tooltipClass(): string | string[] | Set<string> | {
|
|
165
|
+
[key: string]: any;
|
|
166
|
+
};
|
|
167
|
+
set tooltipClass(value: string | string[] | Set<string> | {
|
|
168
|
+
[key: string]: any;
|
|
169
|
+
});
|
|
170
|
+
/** Manually-bound passive event listeners. */
|
|
171
|
+
private readonly _passiveListeners;
|
|
172
|
+
/** Timer started at the last `touchstart` event. */
|
|
173
|
+
private _touchstartTimeout;
|
|
174
|
+
/** Emits when the component is destroyed. */
|
|
175
|
+
private readonly _destroyed;
|
|
176
|
+
/** Whether ngOnDestroyed has been called. */
|
|
177
|
+
private _isDestroyed;
|
|
178
|
+
constructor(...args: unknown[]);
|
|
179
|
+
ngAfterViewInit(): void;
|
|
180
|
+
/**
|
|
181
|
+
* Dispose the tooltip when destroyed.
|
|
182
|
+
*/
|
|
183
|
+
ngOnDestroy(): void;
|
|
184
|
+
/** Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input */
|
|
185
|
+
show(delay?: number, origin?: {
|
|
186
|
+
x: number;
|
|
187
|
+
y: number;
|
|
188
|
+
}): void;
|
|
189
|
+
/** Hides the tooltip after the delay in ms, defaults to tooltip-delay-hide or 0ms if no input */
|
|
190
|
+
hide(delay?: number): void;
|
|
191
|
+
/** Shows/hides the tooltip */
|
|
192
|
+
toggle(origin?: {
|
|
193
|
+
x: number;
|
|
194
|
+
y: number;
|
|
195
|
+
}): void;
|
|
196
|
+
/** Returns true if the tooltip is currently visible to the user */
|
|
197
|
+
_isTooltipVisible(): boolean;
|
|
198
|
+
/** Create the overlay config and position strategy */
|
|
199
|
+
private _createOverlay;
|
|
200
|
+
/** Detaches the currently-attached tooltip. */
|
|
201
|
+
private _detach;
|
|
202
|
+
/** Updates the position of the current tooltip. */
|
|
203
|
+
private _updatePosition;
|
|
204
|
+
/** Adds the configured offset to a position. Used as a hook for child classes. */
|
|
205
|
+
protected _addOffset(position: ConnectedPosition): ConnectedPosition;
|
|
206
|
+
/**
|
|
207
|
+
* Returns the origin position and a fallback position based on the user's position preference.
|
|
208
|
+
* The fallback position is the inverse of the origin (e.g. `'below' -> 'above'`).
|
|
209
|
+
*/
|
|
210
|
+
_getOrigin(): {
|
|
211
|
+
main: OriginConnectionPosition;
|
|
212
|
+
fallback: OriginConnectionPosition;
|
|
213
|
+
};
|
|
214
|
+
/** Returns the overlay position and a fallback position based on the user's preference */
|
|
215
|
+
_getOverlayPosition(): {
|
|
216
|
+
main: OverlayConnectionPosition;
|
|
217
|
+
fallback: OverlayConnectionPosition;
|
|
218
|
+
};
|
|
219
|
+
/** Updates the tooltip message and repositions the overlay according to the new message length */
|
|
220
|
+
private _updateTooltipMessage;
|
|
221
|
+
/** Updates the tooltip context */
|
|
222
|
+
private _setTooltipContext;
|
|
223
|
+
/** Updates the tooltip class */
|
|
224
|
+
private _setTooltipClass;
|
|
225
|
+
/** Inverts an overlay position. */
|
|
226
|
+
private _invertPosition;
|
|
227
|
+
/** Updates the class on the overlay panel based on the current position of the tooltip. */
|
|
228
|
+
private _updateCurrentPositionClass;
|
|
229
|
+
/** Binds the pointer events to the tooltip trigger. */
|
|
230
|
+
private _setupPointerEnterEventsIfNeeded;
|
|
231
|
+
private _setupPointerExitEventsIfNeeded;
|
|
232
|
+
private _addListeners;
|
|
233
|
+
private _platformSupportsMouseEvents;
|
|
234
|
+
/** Listener for the `wheel` event on the element. */
|
|
235
|
+
private _wheelListener;
|
|
236
|
+
/** Disables the native browser gestures, based on how the tooltip has been configured. */
|
|
237
|
+
private _disableNativeGesturesIfNecessary;
|
|
238
|
+
/** Updates the tooltip's ARIA description based on it current state. */
|
|
239
|
+
private _syncAriaDescription;
|
|
240
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxTooltip, never>;
|
|
241
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MtxTooltip, "[mtxTooltip]", ["mtxTooltip"], { "position": { "alias": "mtxTooltipPosition"; "required": false; }; "positionAtOrigin": { "alias": "mtxTooltipPositionAtOrigin"; "required": false; }; "disabled": { "alias": "mtxTooltipDisabled"; "required": false; }; "showDelay": { "alias": "mtxTooltipShowDelay"; "required": false; }; "hideDelay": { "alias": "mtxTooltipHideDelay"; "required": false; }; "touchGestures": { "alias": "mtxTooltipTouchGestures"; "required": false; }; "message": { "alias": "mtxTooltip"; "required": false; }; "tooltipContext": { "alias": "mtxTooltipContext"; "required": false; }; "tooltipClass": { "alias": "mtxTooltipClass"; "required": false; }; }, {}, never, never, true, never>;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Internal component that wraps the tooltip's content.
|
|
245
|
+
* @docs-private
|
|
246
|
+
*/
|
|
247
|
+
declare class TooltipComponent implements OnDestroy {
|
|
248
|
+
private _changeDetectorRef;
|
|
249
|
+
protected _elementRef: ElementRef<HTMLElement>;
|
|
250
|
+
_isMultiline: boolean;
|
|
251
|
+
/** Message to display in the tooltip */
|
|
252
|
+
message: string | TemplateRef<any>;
|
|
253
|
+
/** Context to be added to the tooltip */
|
|
254
|
+
tooltipContext: any;
|
|
255
|
+
/** Classes to be added to the tooltip. Supports the same syntax as `ngClass`. */
|
|
256
|
+
tooltipClass: string | string[] | Set<string> | {
|
|
257
|
+
[key: string]: any;
|
|
258
|
+
};
|
|
259
|
+
/** The timeout ID of any current timer set to show the tooltip */
|
|
260
|
+
private _showTimeoutId;
|
|
261
|
+
/** The timeout ID of any current timer set to hide the tooltip */
|
|
262
|
+
private _hideTimeoutId;
|
|
263
|
+
/** Element that caused the tooltip to open. */
|
|
264
|
+
_triggerElement: HTMLElement;
|
|
265
|
+
/** Amount of milliseconds to delay the closing sequence. */
|
|
266
|
+
_mouseLeaveHideDelay: number;
|
|
267
|
+
/** Whether animations are currently disabled. */
|
|
268
|
+
private _animationsDisabled;
|
|
269
|
+
/** Reference to the internal tooltip element. */
|
|
270
|
+
_tooltip: ElementRef<HTMLElement>;
|
|
271
|
+
/** Whether interactions on the page should close the tooltip */
|
|
272
|
+
private _closeOnInteraction;
|
|
273
|
+
/** Whether the tooltip is currently visible. */
|
|
274
|
+
private _isVisible;
|
|
275
|
+
/** Subject for notifying that the tooltip has been hidden from the view */
|
|
276
|
+
private readonly _onHide;
|
|
277
|
+
/** Name of the show animation and the class that toggles it. */
|
|
278
|
+
private readonly _showAnimation;
|
|
279
|
+
/** Name of the hide animation and the class that toggles it. */
|
|
280
|
+
private readonly _hideAnimation;
|
|
281
|
+
constructor(...args: unknown[]);
|
|
282
|
+
/**
|
|
283
|
+
* Shows the tooltip with an animation originating from the provided origin
|
|
284
|
+
* @param delay Amount of milliseconds to the delay showing the tooltip.
|
|
285
|
+
*/
|
|
286
|
+
show(delay: number): void;
|
|
287
|
+
/**
|
|
288
|
+
* Begins the animation to hide the tooltip after the provided delay in ms.
|
|
289
|
+
* @param delay Amount of milliseconds to delay showing the tooltip.
|
|
290
|
+
*/
|
|
291
|
+
hide(delay: number): void;
|
|
292
|
+
/** Returns an observable that notifies when the tooltip has been hidden from view. */
|
|
293
|
+
afterHidden(): Observable<void>;
|
|
294
|
+
/** Whether the tooltip is being displayed. */
|
|
295
|
+
isVisible(): boolean;
|
|
296
|
+
ngOnDestroy(): void;
|
|
297
|
+
/**
|
|
298
|
+
* Interactions on the HTML body should close the tooltip immediately as defined in the
|
|
299
|
+
* material design spec.
|
|
300
|
+
* https://material.io/design/components/tooltips.html#behavior
|
|
301
|
+
*/
|
|
302
|
+
_handleBodyInteraction(): void;
|
|
303
|
+
/**
|
|
304
|
+
* Marks that the tooltip needs to be checked in the next change detection run.
|
|
305
|
+
* Mainly used for rendering the initial text before positioning a tooltip, which
|
|
306
|
+
* can be problematic in components with OnPush change detection.
|
|
307
|
+
*/
|
|
308
|
+
_markForCheck(): void;
|
|
309
|
+
_handleMouseLeave({ relatedTarget }: MouseEvent): void;
|
|
310
|
+
/**
|
|
311
|
+
* Callback for when the timeout in this.show() gets completed.
|
|
312
|
+
* This method is only needed by the mdc-tooltip, and so it is only implemented
|
|
313
|
+
* in the mdc-tooltip, not here.
|
|
314
|
+
*/
|
|
315
|
+
protected _onShow(): void;
|
|
316
|
+
/** Whether the tooltip text has overflown to the next line */
|
|
317
|
+
private _isTooltipMultiline;
|
|
318
|
+
/** Event listener dispatched when an animation on the tooltip finishes. */
|
|
319
|
+
_handleAnimationEnd({ animationName }: AnimationEvent): void;
|
|
320
|
+
/** Cancels any pending animation sequences. */
|
|
321
|
+
_cancelPendingAnimations(): void;
|
|
322
|
+
/** Handles the cleanup after an animation has finished. */
|
|
323
|
+
private _finalizeAnimation;
|
|
324
|
+
/** Toggles the visibility of the tooltip element. */
|
|
325
|
+
private _toggleVisibility;
|
|
326
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent, never>;
|
|
327
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "mtx-tooltip-component", never, {}, {}, never, never, true, never>;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
declare class MtxTooltipModule {
|
|
331
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxTooltipModule, never>;
|
|
332
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MtxTooltipModule, never, [typeof i1.A11yModule, typeof i2.CommonModule, typeof i3.OverlayModule, typeof i4.MatCommonModule, typeof i5.MtxPipesModule, typeof MtxTooltip, typeof TooltipComponent], [typeof MtxTooltip, typeof TooltipComponent, typeof i4.MatCommonModule, typeof i7.CdkScrollableModule]>;
|
|
333
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<MtxTooltipModule>;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Animations used by MatTooltip.
|
|
338
|
+
* @docs-private
|
|
339
|
+
* @deprecated No longer being used, to be removed.
|
|
340
|
+
* @breaking-change 21.0.0
|
|
341
|
+
*/
|
|
342
|
+
declare const matTooltipAnimations: {
|
|
343
|
+
readonly tooltipState: any;
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
export { MTX_TOOLTIP_DEFAULT_OPTIONS, MTX_TOOLTIP_DEFAULT_OPTIONS_FACTORY, MTX_TOOLTIP_SCROLL_STRATEGY, MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY, MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER, MtxTooltip, MtxTooltipModule, SCROLL_THROTTLE_MS, TOOLTIP_PANEL_CLASS, TooltipComponent, getMtxTooltipInvalidPositionError, matTooltipAnimations };
|
|
347
|
+
export type { MtxTooltipDefaultOptions, TooltipPosition, TooltipTouchGestures, TooltipVisibility };
|
package/tooltip/tooltip.scss
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
@use '
|
|
1
|
+
@use './m3-tooltip';
|
|
2
2
|
@use '../core/tokens/token-utils';
|
|
3
3
|
|
|
4
|
+
$fallbacks: m3-tooltip.get-tokens();
|
|
5
|
+
|
|
4
6
|
.mtx-mdc-tooltip {
|
|
5
7
|
// We don't use MDC's positioning so this has to be relative.
|
|
6
8
|
position: relative;
|
|
@@ -58,20 +60,14 @@
|
|
|
58
60
|
// TODO(crisbeto): these styles aren't necessary, but they were present in
|
|
59
61
|
// MDC and removing them is likely to cause screenshot differences.
|
|
60
62
|
will-change: transform, opacity;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
)
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
@include token-utils.create-token-slot(font-family, supporting-text-font);
|
|
70
|
-
@include token-utils.create-token-slot(font-size, supporting-text-size);
|
|
71
|
-
@include token-utils.create-token-slot(font-weight, supporting-text-weight);
|
|
72
|
-
@include token-utils.create-token-slot(line-height, supporting-text-line-height);
|
|
73
|
-
@include token-utils.create-token-slot(letter-spacing, supporting-text-tracking);
|
|
74
|
-
}
|
|
63
|
+
background-color: token-utils.slot(tooltip-container-color, $fallbacks);
|
|
64
|
+
color: token-utils.slot(tooltip-supporting-text-color, $fallbacks);
|
|
65
|
+
border-radius: token-utils.slot(tooltip-container-shape, $fallbacks);
|
|
66
|
+
font-family: token-utils.slot(tooltip-supporting-text-font, $fallbacks);
|
|
67
|
+
font-size: token-utils.slot(tooltip-supporting-text-size, $fallbacks);
|
|
68
|
+
font-weight: token-utils.slot(tooltip-supporting-text-weight, $fallbacks);
|
|
69
|
+
line-height: token-utils.slot(tooltip-supporting-text-line-height, $fallbacks);
|
|
70
|
+
letter-spacing: token-utils.slot(tooltip-supporting-text-tracking, $fallbacks);
|
|
75
71
|
|
|
76
72
|
// Renders an outline in high contrast mode.
|
|
77
73
|
&::before {
|
package/alert/alert-module.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "@angular/common";
|
|
3
|
-
import * as i2 from "./alert";
|
|
4
|
-
export declare class MtxAlertModule {
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MtxAlertModule, never>;
|
|
6
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MtxAlertModule, never, [typeof i1.CommonModule, typeof i2.MtxAlert], [typeof i2.MtxAlert]>;
|
|
7
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<MtxAlertModule>;
|
|
8
|
-
}
|
package/alert/alert.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export type MtxAlertType = 'default' | 'info' | 'success' | 'warning' | 'danger';
|
|
4
|
-
export declare class MtxAlert {
|
|
5
|
-
private _changeDetectorRef;
|
|
6
|
-
get hostClassList(): string;
|
|
7
|
-
/** The alert's type. Can be `default`, `info`, `success`, `warning` or `danger`. */
|
|
8
|
-
type: MtxAlertType;
|
|
9
|
-
/** Whether to display an inline close button. */
|
|
10
|
-
dismissible: boolean;
|
|
11
|
-
/** The alert's elevation (0~24). */
|
|
12
|
-
elevation: number;
|
|
13
|
-
/** Event emitted when the alert closed. */
|
|
14
|
-
closed: EventEmitter<MtxAlert>;
|
|
15
|
-
_onClosed(): void;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MtxAlert, never>;
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MtxAlert, "mtx-alert", ["mtxAlert"], { "type": { "alias": "type"; "required": false; }; "dismissible": { "alias": "dismissible"; "required": false; }; "elevation": { "alias": "elevation"; "required": false; }; }, { "closed": "closed"; }, never, ["*"], true, never>;
|
|
18
|
-
static ngAcceptInputType_dismissible: unknown;
|
|
19
|
-
}
|
package/alert/public-api.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { ThemePalette } from '@angular/material/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class MatButtonLoading implements OnChanges {
|
|
5
|
-
private _elementRef;
|
|
6
|
-
private _viewContainerRef;
|
|
7
|
-
private _renderer;
|
|
8
|
-
private spinner;
|
|
9
|
-
loading: boolean;
|
|
10
|
-
disabled: boolean;
|
|
11
|
-
color: ThemePalette;
|
|
12
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
13
|
-
private createSpinner;
|
|
14
|
-
private destroySpinner;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MatButtonLoading, never>;
|
|
16
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<MatButtonLoading, "[mat-button][loading], [mat-raised-button][loading], [mat-stroked-button][loading], [mat-flat-button][loading], [mat-icon-button][loading], [mat-fab][loading], [mat-mini-fab][loading]", never, { "loading": { "alias": "loading"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
|
|
17
|
-
static ngAcceptInputType_loading: unknown;
|
|
18
|
-
static ngAcceptInputType_disabled: unknown;
|
|
19
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "@angular/common";
|
|
3
|
-
import * as i2 from "@angular/material/button";
|
|
4
|
-
import * as i3 from "@angular/material/progress-spinner";
|
|
5
|
-
import * as i4 from "./button-loading";
|
|
6
|
-
export declare class MtxButtonModule {
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MtxButtonModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MtxButtonModule, never, [typeof i1.CommonModule, typeof i2.MatButtonModule, typeof i3.MatProgressSpinnerModule, typeof i4.MatButtonLoading], [typeof i4.MatButtonLoading]>;
|
|
9
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<MtxButtonModule>;
|
|
10
|
-
}
|
package/button/public-api.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "@angular/common";
|
|
3
|
-
import * as i2 from "@angular/forms";
|
|
4
|
-
import * as i3 from "@angular/material/checkbox";
|
|
5
|
-
import * as i4 from "@ng-matero/extensions/core";
|
|
6
|
-
import * as i5 from "./checkbox-group";
|
|
7
|
-
export declare class MtxCheckboxGroupModule {
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MtxCheckboxGroupModule, never>;
|
|
9
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MtxCheckboxGroupModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i3.MatCheckboxModule, typeof i4.MtxPipesModule, typeof i5.MtxCheckboxGroup], [typeof i5.MtxCheckboxGroup, typeof i4.MtxPipesModule]>;
|
|
10
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<MtxCheckboxGroupModule>;
|
|
11
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, EventEmitter, OnDestroy, QueryList, TrackByFunction } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
-
import { MatCheckbox, MatCheckboxChange } from '@angular/material/checkbox';
|
|
4
|
-
import { MtxCheckboxGroupOption } from './interfaces';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class MtxCheckboxBase {
|
|
7
|
-
label?: any | undefined;
|
|
8
|
-
value?: any | undefined;
|
|
9
|
-
constructor(label?: any | undefined, value?: any | undefined);
|
|
10
|
-
}
|
|
11
|
-
export declare class MtxCheckboxGroup implements AfterViewInit, OnDestroy, ControlValueAccessor {
|
|
12
|
-
private _changeDetectorRef;
|
|
13
|
-
private _focusMonitor;
|
|
14
|
-
private _elementRef;
|
|
15
|
-
_checkboxes: QueryList<MatCheckbox>;
|
|
16
|
-
/**
|
|
17
|
-
* Tracking function that will be used to check the differences in data changes. Used similarly
|
|
18
|
-
* to `ngFor` `trackBy` function. Optimize row operations by identifying a row based on its data
|
|
19
|
-
* relative to the function to know if a row should be added/removed/moved.
|
|
20
|
-
* Accepts a function that takes two parameters, `index` and `item`.
|
|
21
|
-
*/
|
|
22
|
-
get trackBy(): TrackByFunction<any> | undefined;
|
|
23
|
-
set trackBy(fn: TrackByFunction<any> | undefined);
|
|
24
|
-
private _trackByFn?;
|
|
25
|
-
get items(): any[];
|
|
26
|
-
set items(value: any[]);
|
|
27
|
-
private _items;
|
|
28
|
-
private _originalItems;
|
|
29
|
-
bindLabel: string;
|
|
30
|
-
bindValue: string;
|
|
31
|
-
showSelectAll: boolean;
|
|
32
|
-
selectAllLabel: string;
|
|
33
|
-
get compareWith(): ((o1: any, o2: any) => boolean) | undefined;
|
|
34
|
-
set compareWith(fn: ((o1: any, o2: any) => boolean) | undefined);
|
|
35
|
-
private _compareWith?;
|
|
36
|
-
disabled: boolean;
|
|
37
|
-
change: EventEmitter<{
|
|
38
|
-
model: MtxCheckboxGroupOption[];
|
|
39
|
-
index: number;
|
|
40
|
-
}>;
|
|
41
|
-
selectAll: boolean;
|
|
42
|
-
selectAllIndeterminate: boolean;
|
|
43
|
-
selectedItems: MtxCheckboxGroupOption[];
|
|
44
|
-
_onChange: (value: MtxCheckboxGroupOption[]) => void;
|
|
45
|
-
_onTouched: () => void;
|
|
46
|
-
ngAfterViewInit(): void;
|
|
47
|
-
ngOnDestroy(): void;
|
|
48
|
-
/**
|
|
49
|
-
* Finds and selects and option based on its value.
|
|
50
|
-
* @returns Option that has the corresponding value.
|
|
51
|
-
*/
|
|
52
|
-
private _selectValue;
|
|
53
|
-
/**
|
|
54
|
-
* Sets the model value. Implemented as part of ControlValueAccessor.
|
|
55
|
-
* @param value New value to be written to the model.
|
|
56
|
-
*/
|
|
57
|
-
writeValue(value: any[]): void;
|
|
58
|
-
/**
|
|
59
|
-
* Registers a callback to be triggered when the model value changes.
|
|
60
|
-
* Implemented as part of ControlValueAccessor.
|
|
61
|
-
* @param fn Callback to be registered.
|
|
62
|
-
*/
|
|
63
|
-
registerOnChange(fn: (value: MtxCheckboxGroupOption[]) => Record<string, unknown>): void;
|
|
64
|
-
/**
|
|
65
|
-
* Registers a callback to be triggered when the control is touched.
|
|
66
|
-
* Implemented as part of ControlValueAccessor.
|
|
67
|
-
* @param fn Callback to be registered.
|
|
68
|
-
*/
|
|
69
|
-
registerOnTouched(fn: () => Record<string, unknown>): void;
|
|
70
|
-
/**
|
|
71
|
-
* Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.
|
|
72
|
-
* @param isDisabled Whether the control should be disabled.
|
|
73
|
-
*/
|
|
74
|
-
setDisabledState(isDisabled: boolean): void;
|
|
75
|
-
private _checkMasterCheckboxState;
|
|
76
|
-
private _getSelectedItems;
|
|
77
|
-
/** Handle normal checkbox toggle */
|
|
78
|
-
_updateNormalCheckboxState(e: MatCheckboxChange, index: number): void;
|
|
79
|
-
/** Handle master checkbox toggle */
|
|
80
|
-
_updateMasterCheckboxState(e: MatCheckboxChange, index: number): void;
|
|
81
|
-
_trackBy: (index: number, item: any) => any;
|
|
82
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MtxCheckboxGroup, never>;
|
|
83
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MtxCheckboxGroup, "mtx-checkbox-group", ["mtxCheckboxGroup"], { "trackBy": { "alias": "trackBy"; "required": false; }; "items": { "alias": "items"; "required": false; }; "bindLabel": { "alias": "bindLabel"; "required": false; }; "bindValue": { "alias": "bindValue"; "required": false; }; "showSelectAll": { "alias": "showSelectAll"; "required": false; }; "selectAllLabel": { "alias": "selectAllLabel"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "change": "change"; }, ["_checkboxes"], never, true, never>;
|
|
84
|
-
static ngAcceptInputType_showSelectAll: unknown;
|
|
85
|
-
static ngAcceptInputType_disabled: unknown;
|
|
86
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface MtxCheckboxGroupOption {
|
|
2
|
-
ariaDescribedby?: string;
|
|
3
|
-
ariaLabel?: string;
|
|
4
|
-
ariaLabelledby?: string;
|
|
5
|
-
label?: any;
|
|
6
|
-
value?: any;
|
|
7
|
-
color?: string;
|
|
8
|
-
checked?: boolean;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
disableRipple?: boolean;
|
|
11
|
-
indeterminate?: boolean;
|
|
12
|
-
labelPosition?: 'before' | 'after';
|
|
13
|
-
id?: string;
|
|
14
|
-
name?: string | null;
|
|
15
|
-
required?: boolean;
|
|
16
|
-
[k: string]: any;
|
|
17
|
-
}
|