@bravura/ui 6.1.0 → 7.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/CHANGELOG.md +11 -1
- package/README.md +58 -57
- package/alert/index.d.ts +126 -3
- package/alert/testing/index.d.ts +28 -5
- package/behavior/index.d.ts +231 -3
- package/clip-note/index.d.ts +125 -3
- package/common/index.d.ts +24 -3
- package/currency-input/index.d.ts +69 -3
- package/decimal-input/index.d.ts +39 -3
- package/discrete-input/index.d.ts +139 -3
- package/fesm2022/bravura-ui-alert.mjs +18 -21
- package/fesm2022/bravura-ui-alert.mjs.map +1 -1
- package/fesm2022/bravura-ui-behavior.mjs +18 -18
- package/fesm2022/bravura-ui-behavior.mjs.map +1 -1
- package/fesm2022/bravura-ui-clip-note.mjs +10 -10
- package/fesm2022/bravura-ui-clip-note.mjs.map +1 -1
- package/fesm2022/bravura-ui-common.mjs +5 -6
- package/fesm2022/bravura-ui-common.mjs.map +1 -1
- package/fesm2022/bravura-ui-currency-input.mjs +7 -7
- package/fesm2022/bravura-ui-currency-input.mjs.map +1 -1
- package/fesm2022/bravura-ui-decimal-input.mjs +7 -7
- package/fesm2022/bravura-ui-decimal-input.mjs.map +1 -1
- package/fesm2022/bravura-ui-discrete-input.mjs +10 -11
- package/fesm2022/bravura-ui-discrete-input.mjs.map +1 -1
- package/fesm2022/bravura-ui-file-upload.mjs +18 -18
- package/fesm2022/bravura-ui-file-upload.mjs.map +1 -1
- package/fesm2022/bravura-ui-form-field.mjs +10 -10
- package/fesm2022/bravura-ui-form-field.mjs.map +1 -1
- package/fesm2022/bravura-ui-icon-font.mjs +7 -7
- package/fesm2022/bravura-ui-icon-font.mjs.map +1 -1
- package/fesm2022/bravura-ui-panel.mjs +16 -16
- package/fesm2022/bravura-ui-panel.mjs.map +1 -1
- package/fesm2022/bravura-ui-phone-number.mjs +13 -13
- package/fesm2022/bravura-ui-phone-number.mjs.map +1 -1
- package/fesm2022/bravura-ui-radio-panel.mjs +12 -14
- package/fesm2022/bravura-ui-radio-panel.mjs.map +1 -1
- package/fesm2022/bravura-ui-selection-panel.mjs +11 -11
- package/fesm2022/bravura-ui-selection-panel.mjs.map +1 -1
- package/fesm2022/bravura-ui-skeletons.mjs +10 -10
- package/fesm2022/bravura-ui-skeletons.mjs.map +1 -1
- package/fesm2022/bravura-ui-stepper.mjs +18 -18
- package/fesm2022/bravura-ui-stepper.mjs.map +1 -1
- package/fesm2022/bravura-ui-tooltip.mjs +13 -13
- package/fesm2022/bravura-ui-tooltip.mjs.map +1 -1
- package/file-upload/index.d.ts +200 -3
- package/form-field/index.d.ts +49 -3
- package/icon-font/index.d.ts +79 -3
- package/index.d.ts +3 -5
- package/package.json +24 -24
- package/panel/index.d.ts +107 -3
- package/phone-number/index.d.ts +108 -3
- package/radio-panel/index.d.ts +71 -3
- package/radio-panel/testing/index.d.ts +32 -5
- package/selection-panel/index.d.ts +149 -3
- package/skeletons/index.d.ts +79 -3
- package/stepper/index.d.ts +106 -3
- package/tooltip/index.d.ts +83 -3
- package/alert/alert-container.component.d.ts +0 -71
- package/alert/alert-message.component.d.ts +0 -47
- package/alert/alert.module.d.ts +0 -14
- package/alert/public-api.d.ts +0 -1
- package/alert/testing/test-api.d.ts +0 -24
- package/behavior/await.directive.d.ts +0 -71
- package/behavior/behavior.module.d.ts +0 -17
- package/behavior/observe-content-class.directive.d.ts +0 -29
- package/behavior/public-api.d.ts +0 -5
- package/behavior/sizing-monitor.directive.d.ts +0 -23
- package/behavior/sizing.directive.d.ts +0 -98
- package/clip-note/clip-note.component.d.ts +0 -45
- package/clip-note/clip-note.directive.d.ts +0 -69
- package/clip-note/clip-note.module.d.ts +0 -19
- package/clip-note/public-api.d.ts +0 -1
- package/common/common-utils.d.ts +0 -11
- package/common/common.module.d.ts +0 -11
- package/common/public-api.d.ts +0 -2
- package/currency-input/currency-input.directive.d.ts +0 -62
- package/currency-input/currency-input.module.d.ts +0 -10
- package/currency-input/public-api.d.ts +0 -1
- package/decimal-input/decimal-input.directive.d.ts +0 -32
- package/decimal-input/decimal-input.module.d.ts +0 -10
- package/decimal-input/public-api.d.ts +0 -1
- package/discrete-input/discrete-input.component.d.ts +0 -128
- package/discrete-input/discrete-input.module.d.ts +0 -11
- package/discrete-input/public-api.d.ts +0 -2
- package/file-upload/file-upload.component.d.ts +0 -148
- package/file-upload/file-upload.module.d.ts +0 -14
- package/file-upload/file-upload.service.d.ts +0 -42
- package/file-upload/public-api.d.ts +0 -6
- package/form-field/form-field.component.d.ts +0 -39
- package/form-field/form-field.module.d.ts +0 -13
- package/form-field/public-api.d.ts +0 -2
- package/icon-font/icon-font.module.d.ts +0 -12
- package/icon-font/icon.directive.d.ts +0 -46
- package/icon-font/public-api.d.ts +0 -3
- package/icon-font/utilities.d.ts +0 -20
- package/panel/panel-section.component.d.ts +0 -15
- package/panel/panel.component.d.ts +0 -60
- package/panel/panel.module.d.ts +0 -16
- package/panel/public-api.d.ts +0 -1
- package/panel/tinted.directive.d.ts +0 -26
- package/phone-number/phone-number.directive.d.ts +0 -66
- package/phone-number/phone-number.module.d.ts +0 -17
- package/phone-number/phone-number.pipe.d.ts +0 -13
- package/phone-number/phone-number.validator.d.ts +0 -31
- package/phone-number/public-api.d.ts +0 -1
- package/public-api.d.ts +0 -1
- package/radio-panel/public-api.d.ts +0 -3
- package/radio-panel/radio-panel-item.component.d.ts +0 -22
- package/radio-panel/radio-panel.component.d.ts +0 -38
- package/radio-panel/radio-panel.module.d.ts +0 -15
- package/radio-panel/testing/test-api.d.ts +0 -27
- package/selection-panel/public-api.d.ts +0 -3
- package/selection-panel/selection-panel-item.component.d.ts +0 -77
- package/selection-panel/selection-panel.directive.d.ts +0 -67
- package/selection-panel/selection-panel.module.d.ts +0 -13
- package/skeletons/public-api.d.ts +0 -3
- package/skeletons/skeleton-loader-presets.directive.d.ts +0 -23
- package/skeletons/skeleton-loader.component.d.ts +0 -44
- package/skeletons/skeletons.module.d.ts +0 -16
- package/stepper/public-api.d.ts +0 -3
- package/stepper/step-label-top.directive.d.ts +0 -17
- package/stepper/stepper-animation.d.ts +0 -6
- package/stepper/stepper.component.d.ts +0 -75
- package/stepper/stepper.module.d.ts +0 -17
- package/tooltip/public-api.d.ts +0 -3
- package/tooltip/tooltip.component.d.ts +0 -26
- package/tooltip/tooltip.directive.d.ts +0 -48
- package/tooltip/tooltip.module.d.ts +0 -13
package/clip-note/index.d.ts
CHANGED
|
@@ -1,5 +1,127 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { AfterViewInit, TemplateRef, EventEmitter, ElementRef, ViewContainerRef, OnInit, OnDestroy, EmbeddedViewRef, ChangeDetectorRef, ModuleWithProviders } from '@angular/core';
|
|
3
|
+
import { ThemePalette } from '@angular/material/core';
|
|
4
|
+
import * as i6 from '@angular/cdk/bidi';
|
|
5
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
6
|
+
import * as i3 from '@angular/common';
|
|
7
|
+
import * as i4 from '@angular/material/button';
|
|
8
|
+
import * as i5 from '@angular/material/icon';
|
|
9
|
+
import * as i7 from '@bravura/ui/common';
|
|
10
|
+
import * as i8 from '@angular/cdk/observers';
|
|
11
|
+
import * as i9 from '@bravura/ui/icon-font';
|
|
12
|
+
|
|
13
|
+
interface ClipNoteDefaultConfig {
|
|
14
|
+
color: ThemePalette;
|
|
15
|
+
caption: string;
|
|
16
|
+
}
|
|
1
17
|
/**
|
|
2
|
-
*
|
|
18
|
+
* A clip note consists of a toggle button and a floating 'notepad' element, attached to the top end of the host element's
|
|
19
|
+
* viewable area. The 'notepad' normally collapses away and only reveals itself when the toggle button is active.
|
|
20
|
+
*
|
|
21
|
+
* The toggle button clips on the edge of the host element and expands to display the full caption when hovered. It hides itself
|
|
22
|
+
* automatically when there is no content provided via the `buiClipNote` property of the directive.
|
|
23
|
+
*
|
|
24
|
+
* The clip note component is suitable for large page container elements with visible boundaries. It can present contextual
|
|
25
|
+
* information regarding and in addition to the content displayed in the main view area.
|
|
26
|
+
*
|
|
27
|
+
* The properties `buiClipNoteColor` and `buiClipNoteCaption` customise the appearance of the clip note, the default values of which
|
|
28
|
+
* can optionally be provided by the `ClipNoteModule.forConfig()` method.
|
|
29
|
+
*
|
|
3
30
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
31
|
+
declare class ClipNoteDirective implements AfterViewInit {
|
|
32
|
+
private _elementRef;
|
|
33
|
+
private _vc;
|
|
34
|
+
/**
|
|
35
|
+
* Provide content to the clip note's floating notepad element.
|
|
36
|
+
* It accepts a `string` of HTML content or a `TemplateRef` object.
|
|
37
|
+
*/
|
|
38
|
+
get buiClipNote(): string | TemplateRef<any> | undefined;
|
|
39
|
+
set buiClipNote(note: string | TemplateRef<any> | undefined);
|
|
40
|
+
/**
|
|
41
|
+
* Customise the theme color alias.
|
|
42
|
+
* @default 'primary'
|
|
43
|
+
*/
|
|
44
|
+
get buiClipNoteColor(): ThemePalette;
|
|
45
|
+
set buiClipNoteColor(color: ThemePalette);
|
|
46
|
+
/**
|
|
47
|
+
* Customise the icon on the toggle button. With this property specified, the animation on the icon
|
|
48
|
+
* will not be active.
|
|
49
|
+
*/
|
|
50
|
+
get buiClipNoteIcon(): string | undefined;
|
|
51
|
+
set buiClipNoteIcon(icon: string | undefined);
|
|
52
|
+
/**
|
|
53
|
+
* The caption of the toggle button when expanded.
|
|
54
|
+
*/
|
|
55
|
+
get buiClipNoteCaption(): string;
|
|
56
|
+
set buiClipNoteCaption(text: string);
|
|
57
|
+
/** Emits when the panel opens */
|
|
58
|
+
readonly buiClipNoteOpened: EventEmitter<void>;
|
|
59
|
+
/** Emits when the panel closes */
|
|
60
|
+
readonly buiClipNoteClosed: EventEmitter<void>;
|
|
61
|
+
private _content?;
|
|
62
|
+
private _color;
|
|
63
|
+
private _compRef;
|
|
64
|
+
private _caption;
|
|
65
|
+
private _icon?;
|
|
66
|
+
constructor(_elementRef: ElementRef<HTMLElement>, _vc: ViewContainerRef, _config: ClipNoteDefaultConfig);
|
|
67
|
+
ngAfterViewInit(): void;
|
|
68
|
+
ngOnDestroy(): void;
|
|
69
|
+
/** Open the note panel */
|
|
70
|
+
open(): void;
|
|
71
|
+
/** Close the note panel */
|
|
72
|
+
close(): void;
|
|
73
|
+
private _processContent;
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClipNoteDirective, [{ host: true; }, null, null]>;
|
|
75
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ClipNoteDirective, "[buiClipNote]", ["buiClipNote"], { "buiClipNote": { "alias": "buiClipNote"; "required": false; }; "buiClipNoteColor": { "alias": "buiClipNoteColor"; "required": false; }; "buiClipNoteIcon": { "alias": "buiClipNoteIcon"; "required": false; }; "buiClipNoteCaption": { "alias": "buiClipNoteCaption"; "required": false; }; }, { "buiClipNoteOpened": "buiClipNoteOpened"; "buiClipNoteClosed": "buiClipNoteClosed"; }, never, never, false, never>;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare class ClipNoteComponent implements OnInit, OnDestroy {
|
|
79
|
+
private _cd;
|
|
80
|
+
private _dir;
|
|
81
|
+
private _elemRef;
|
|
82
|
+
buttonText: string;
|
|
83
|
+
get buttonState(): string;
|
|
84
|
+
get buttonIconState(): string;
|
|
85
|
+
panelState: 'open' | 'closed-ltr' | 'closed-rtl';
|
|
86
|
+
direction: string;
|
|
87
|
+
_contentView?: EmbeddedViewRef<any>;
|
|
88
|
+
_content?: string;
|
|
89
|
+
_color: ThemePalette;
|
|
90
|
+
_buttonAnimating: boolean;
|
|
91
|
+
_icon?: string;
|
|
92
|
+
_hasContent: boolean;
|
|
93
|
+
readonly opened: EventEmitter<void>;
|
|
94
|
+
readonly closed: EventEmitter<void>;
|
|
95
|
+
private _hovering;
|
|
96
|
+
private _destroyed$;
|
|
97
|
+
private _toggleQueue;
|
|
98
|
+
private _viewDiv;
|
|
99
|
+
private _noteViewRef;
|
|
100
|
+
private _fallbackTemplate;
|
|
101
|
+
constructor(_cd: ChangeDetectorRef, _dir: Directionality, _elemRef: ElementRef<HTMLElement>);
|
|
102
|
+
ngOnInit(): void;
|
|
103
|
+
ngOnDestroy(): void;
|
|
104
|
+
_mouseOverButton(hovering: boolean): void;
|
|
105
|
+
toggle(): void;
|
|
106
|
+
_scheduleToggle(): void;
|
|
107
|
+
_checkToggle(): void;
|
|
108
|
+
open(): void;
|
|
109
|
+
close(): void;
|
|
110
|
+
_emit(): void;
|
|
111
|
+
_contentChanged(content?: string | TemplateRef<any>): void;
|
|
112
|
+
_checkContent(initial?: boolean): void;
|
|
113
|
+
_assignColor(color: ThemePalette): void;
|
|
114
|
+
_assignButtonText(text: string): void;
|
|
115
|
+
_assignButtonIcon(icon?: string): void;
|
|
116
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClipNoteComponent, [null, null, { host: true; }]>;
|
|
117
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ClipNoteComponent, "bui-clip-note", never, {}, {}, never, never, false, never>;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
declare class ClipNoteModule {
|
|
121
|
+
static forConfig(config: ClipNoteDefaultConfig): ModuleWithProviders<ClipNoteModule>;
|
|
122
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClipNoteModule, never>;
|
|
123
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ClipNoteModule, [typeof ClipNoteComponent, typeof ClipNoteDirective], [typeof i3.CommonModule, typeof i4.MatButtonModule, typeof i5.MatIconModule, typeof i6.BidiModule, typeof i7.BuiCommonModule, typeof i8.ObserversModule, typeof i9.IconFontModule], [typeof ClipNoteDirective]>;
|
|
124
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ClipNoteModule>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export { ClipNoteDirective, ClipNoteModule };
|
package/common/index.d.ts
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
|
+
import * as i1 from '@angular/cdk/bidi';
|
|
2
|
+
import { Direction, Directionality } from '@angular/cdk/bidi';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
|
|
5
|
+
declare function generateID(): string;
|
|
6
|
+
declare function isElementInViewport(el: HTMLElement): boolean;
|
|
1
7
|
/**
|
|
2
|
-
*
|
|
8
|
+
* Uses canvas.measureText to compute and return the width of the given text of given font in pixels.
|
|
9
|
+
*
|
|
10
|
+
* @param {String} text The text to be rendered.
|
|
11
|
+
* @param el the element used to compute the font styles
|
|
12
|
+
*
|
|
13
|
+
* @see https://stackoverflow.com/questions/118241/calculate-text-width-with-javascript/21015393#21015393
|
|
3
14
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
15
|
+
declare function getTextWidth(text: string, el?: HTMLElement): number;
|
|
16
|
+
|
|
17
|
+
/** Resolves a string value to a specific direction. */
|
|
18
|
+
declare function _resolveDirectionality(rawValue: string): Direction;
|
|
19
|
+
declare class BuiCommonModule {
|
|
20
|
+
constructor(dir: Directionality, thisModule: BuiCommonModule, document: Document);
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BuiCommonModule, [null, { optional: true; skipSelf: true; }, null]>;
|
|
22
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<BuiCommonModule, never, [typeof i1.BidiModule], [typeof i1.BidiModule]>;
|
|
23
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<BuiCommonModule>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { BuiCommonModule, _resolveDirectionality, generateID, getTextWidth, isElementInViewport };
|
|
@@ -1,5 +1,71 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnInit, OnChanges, ElementRef, Renderer2 } from '@angular/core';
|
|
3
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
4
|
+
import { MatFormField } from '@angular/material/form-field';
|
|
5
|
+
import * as i2 from '@angular/common';
|
|
6
|
+
|
|
1
7
|
/**
|
|
2
|
-
*
|
|
8
|
+
* This directive will enhance an input element to format the numbers entered to a currency amount.
|
|
3
9
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
10
|
+
declare class CurrencyInputDirective implements OnInit, OnChanges, ControlValueAccessor {
|
|
11
|
+
private _el;
|
|
12
|
+
private _renderer;
|
|
13
|
+
private _locale;
|
|
14
|
+
private _defaultCurrencyCode;
|
|
15
|
+
private _field?;
|
|
16
|
+
/**
|
|
17
|
+
* true to allow negative input, otherwise false
|
|
18
|
+
* Default to false.
|
|
19
|
+
*/
|
|
20
|
+
allowNegative: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Provide the currency code to format the entered amount.
|
|
23
|
+
* Uses angular token DEFAULT_CURRENCY_CODE by default.
|
|
24
|
+
*/
|
|
25
|
+
currencyCode: string;
|
|
26
|
+
/**
|
|
27
|
+
* true if no decimal digits allowed, otherwise false.
|
|
28
|
+
* Default to false.
|
|
29
|
+
*/
|
|
30
|
+
baseUnitOnly: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The format the of the amount either in wide or narrow.
|
|
33
|
+
*/
|
|
34
|
+
format: 'narrow' | 'wide';
|
|
35
|
+
private placeholder;
|
|
36
|
+
private autocomplete;
|
|
37
|
+
private type;
|
|
38
|
+
private inputMode;
|
|
39
|
+
private change;
|
|
40
|
+
private onTouch;
|
|
41
|
+
private _safari;
|
|
42
|
+
private _symbol;
|
|
43
|
+
private _decimalPipe;
|
|
44
|
+
private _ds;
|
|
45
|
+
private _trailing;
|
|
46
|
+
constructor(_el: ElementRef<HTMLInputElement>, _renderer: Renderer2, _locale: string, _defaultCurrencyCode: string, _field?: MatFormField | undefined);
|
|
47
|
+
ngOnInit(): void;
|
|
48
|
+
ngOnChanges(): void;
|
|
49
|
+
onInput(): void;
|
|
50
|
+
onFocus(): void;
|
|
51
|
+
onblur(): void;
|
|
52
|
+
writeValue(value: any): void;
|
|
53
|
+
registerOnChange(fn: any): void;
|
|
54
|
+
registerOnTouched(fn: any): void;
|
|
55
|
+
private _updatePlaceholder;
|
|
56
|
+
private _currencyUpdated;
|
|
57
|
+
private _formatCurrency;
|
|
58
|
+
private _formatNumber;
|
|
59
|
+
private _convert;
|
|
60
|
+
private get _0Text();
|
|
61
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CurrencyInputDirective, [{ self: true; }, null, null, null, { optional: true; }]>;
|
|
62
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CurrencyInputDirective, "input[buiCurrencyInput],input[currencyCode],input[data-type=currency]", never, { "allowNegative": { "alias": "allowNegative"; "required": false; }; "currencyCode": { "alias": "currencyCode"; "required": false; }; "baseUnitOnly": { "alias": "baseUnitOnly"; "required": false; }; "format": { "alias": "format"; "required": false; }; }, {}, never, never, false, never>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
declare class CurrencyInputModule {
|
|
66
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CurrencyInputModule, never>;
|
|
67
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CurrencyInputModule, [typeof CurrencyInputDirective], [typeof i2.CommonModule], [typeof CurrencyInputDirective]>;
|
|
68
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<CurrencyInputModule>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { CurrencyInputDirective, CurrencyInputModule };
|
package/decimal-input/index.d.ts
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnChanges, ElementRef, Renderer2 } from '@angular/core';
|
|
3
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
4
|
+
import * as i2 from '@angular/common';
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
|
-
*
|
|
7
|
+
* This directive will enhance an input element to format the numbers entered to a decimal amount.
|
|
3
8
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
9
|
+
declare class DecimalInputDirective implements OnChanges, ControlValueAccessor {
|
|
10
|
+
private _el;
|
|
11
|
+
private _renderer;
|
|
12
|
+
/**
|
|
13
|
+
* number of decimal places allowed
|
|
14
|
+
*/
|
|
15
|
+
buiDecimalInput: number;
|
|
16
|
+
private placeholder;
|
|
17
|
+
private autocomplete;
|
|
18
|
+
private type;
|
|
19
|
+
private inputMode;
|
|
20
|
+
private change;
|
|
21
|
+
private onTouch;
|
|
22
|
+
constructor(_el: ElementRef<HTMLInputElement>, _renderer: Renderer2);
|
|
23
|
+
ngOnChanges(): void;
|
|
24
|
+
onInput(): void;
|
|
25
|
+
onKeypress(evt: KeyboardEvent): void;
|
|
26
|
+
onblur(): void;
|
|
27
|
+
writeValue(value: any): void;
|
|
28
|
+
registerOnChange(fn: any): void;
|
|
29
|
+
registerOnTouched(fn: any): void;
|
|
30
|
+
private _resetDecimalPlaces;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DecimalInputDirective, [{ self: true; }, null]>;
|
|
32
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DecimalInputDirective, "input[buiDecimalInput]", never, { "buiDecimalInput": { "alias": "buiDecimalInput"; "required": false; }; }, {}, never, never, false, never>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare class DecimalInputModule {
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DecimalInputModule, never>;
|
|
37
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DecimalInputModule, [typeof DecimalInputDirective], [typeof i2.CommonModule], [typeof DecimalInputDirective]>;
|
|
38
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DecimalInputModule>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { DecimalInputDirective, DecimalInputModule };
|
|
@@ -1,5 +1,141 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnDestroy, ElementRef } from '@angular/core';
|
|
3
|
+
import * as i5 from '@angular/cdk/a11y';
|
|
4
|
+
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
5
|
+
import * as i4 from '@angular/forms';
|
|
6
|
+
import { ControlValueAccessor, UntypedFormArray, UntypedFormGroup, NgControl, NgForm, FormGroupDirective, AbstractControl } from '@angular/forms';
|
|
7
|
+
import { ErrorStateMatcher } from '@angular/material/core';
|
|
8
|
+
import * as i3 from '@angular/material/form-field';
|
|
9
|
+
import { MatFormFieldControl, MatFormField } from '@angular/material/form-field';
|
|
10
|
+
import { Subject } from 'rxjs';
|
|
11
|
+
import * as i2 from '@angular/common';
|
|
12
|
+
|
|
1
13
|
/**
|
|
2
|
-
*
|
|
14
|
+
* Custom `MatFormFieldControl` with an individual input box for each character, suitable for fixed-length fields,
|
|
15
|
+
* such as secondary PIN inputs, TFNs, or BSB code etc.
|
|
16
|
+
*
|
|
17
|
+
* Accessibility features are not yet fully implemented.
|
|
18
|
+
*
|
|
19
|
+
* Example:
|
|
20
|
+
*
|
|
21
|
+
* ```html
|
|
22
|
+
* <mat-form-field>
|
|
23
|
+
* <bui-discrete-input></bui-discrete-input>
|
|
24
|
+
* </mat-form-field>
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
3
27
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
28
|
+
declare class DiscreteInputComponent implements MatFormFieldControl<string>, ControlValueAccessor, OnDestroy {
|
|
29
|
+
private _focusMonitor;
|
|
30
|
+
private _elementRef;
|
|
31
|
+
/** @ignore */
|
|
32
|
+
static nextId: number;
|
|
33
|
+
/** @ignore */
|
|
34
|
+
static ngAcceptInputType_disabled: boolean | string | null | undefined;
|
|
35
|
+
/** @ignore */
|
|
36
|
+
static ngAcceptInputType_required: boolean | string | null | undefined;
|
|
37
|
+
/** @ignore */ parts: UntypedFormArray;
|
|
38
|
+
/** @ignore */ group: UntypedFormGroup;
|
|
39
|
+
/** Emits whenever the component state changes. */
|
|
40
|
+
stateChanges: Subject<void>;
|
|
41
|
+
/** Whether the control is focused. */
|
|
42
|
+
focused: boolean;
|
|
43
|
+
/** The type of input boxes */
|
|
44
|
+
type: 'text' | 'number' | 'password';
|
|
45
|
+
/** Input boxes are separated in groups. This specifies the characters displayed between two groups. */
|
|
46
|
+
separator: string;
|
|
47
|
+
/**
|
|
48
|
+
* A list of characters accepted in the inputs, for example `0-9`, `a-zA-Z0-9`
|
|
49
|
+
* @example '0-9'
|
|
50
|
+
*/
|
|
51
|
+
accept?: string;
|
|
52
|
+
/** @ignore */ id: string;
|
|
53
|
+
/** Value of aria-describedby that should be merged with the described-by ids which are set by the form-field. */
|
|
54
|
+
userAriaDescribedBy?: string;
|
|
55
|
+
private inputParts;
|
|
56
|
+
/**@ignore */
|
|
57
|
+
_formField: MatFormField;
|
|
58
|
+
/**@ignore */
|
|
59
|
+
ngControl: NgControl;
|
|
60
|
+
autocomplete?: string;
|
|
61
|
+
private _sizeSpec;
|
|
62
|
+
private _required;
|
|
63
|
+
private _placeholder?;
|
|
64
|
+
private _disabled;
|
|
65
|
+
private _separatorPos;
|
|
66
|
+
/** @ignore */ onChange: (_: any) => void;
|
|
67
|
+
/** @ignore */ onTouched: () => void;
|
|
68
|
+
/** @ignore */
|
|
69
|
+
get shouldLabelFloat(): boolean;
|
|
70
|
+
/** @ignore */
|
|
71
|
+
get empty(): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Defines the length and grouping of the input.
|
|
74
|
+
* @default [2, 2, 2]
|
|
75
|
+
*/
|
|
76
|
+
get sizeSpec(): number[];
|
|
77
|
+
set sizeSpec(spec: number[]);
|
|
78
|
+
/** The placeholder for this control. */
|
|
79
|
+
get placeholder(): string;
|
|
80
|
+
set placeholder(value: string);
|
|
81
|
+
/** Whether the control is required. */
|
|
82
|
+
get required(): boolean;
|
|
83
|
+
set required(value: boolean);
|
|
84
|
+
/** Whether the control is disabled. */
|
|
85
|
+
get disabled(): boolean;
|
|
86
|
+
set disabled(value: boolean);
|
|
87
|
+
/** The value of the control. */
|
|
88
|
+
get value(): string;
|
|
89
|
+
set value(v: string);
|
|
90
|
+
/** @ignore */
|
|
91
|
+
get _colorSuffix(): string;
|
|
92
|
+
constructor(_focusMonitor: FocusMonitor, _elementRef: ElementRef<HTMLElement>, formField: MatFormField, control: NgControl, _parentForm: NgForm, _parentFormGroup: FormGroupDirective, _defaultErrorStateMatcher: ErrorStateMatcher);
|
|
93
|
+
/** @ignore */ errorState: boolean;
|
|
94
|
+
/** @ignore */ controlType?: string | undefined;
|
|
95
|
+
/** @ignore */ autofilled?: boolean | undefined;
|
|
96
|
+
/** @ignore */
|
|
97
|
+
ngOnDestroy(): void;
|
|
98
|
+
/** @ignore */
|
|
99
|
+
setDescribedByIds(ids: string[]): void;
|
|
100
|
+
/** @ignore */
|
|
101
|
+
onContainerClick(): void;
|
|
102
|
+
/** @ignore */
|
|
103
|
+
writeValue(v: string): void;
|
|
104
|
+
/** @ignore */
|
|
105
|
+
registerOnChange(fn: any): void;
|
|
106
|
+
/** @ignore */
|
|
107
|
+
registerOnTouched(fn: any): void;
|
|
108
|
+
/** @ignore */
|
|
109
|
+
setDisabledState(isDisabled: boolean): void;
|
|
110
|
+
/** @ignore */
|
|
111
|
+
_handleInput(control: AbstractControl, index: number, event: Event): void;
|
|
112
|
+
/** @ignore */
|
|
113
|
+
_handleBeforeInput(index: number, event: InputEvent): void;
|
|
114
|
+
/** @ignore */
|
|
115
|
+
_focusPart(elemRef: ElementRef<HTMLInputElement>): void;
|
|
116
|
+
/** @ignore */
|
|
117
|
+
_consumeKey(event: Event): void;
|
|
118
|
+
/** @ignore */
|
|
119
|
+
_leftArrow(index: number, event: Event): void;
|
|
120
|
+
/** @ignore */
|
|
121
|
+
_rightArrow(index: number, event: Event): void;
|
|
122
|
+
/** @ignore */
|
|
123
|
+
_handleBackspace(control: AbstractControl, index: number): void;
|
|
124
|
+
/** @ignore */
|
|
125
|
+
_onPaste(event: ClipboardEvent): void;
|
|
126
|
+
/** @ignore */
|
|
127
|
+
_separatorRequired(index: number): boolean;
|
|
128
|
+
/** @ignore */
|
|
129
|
+
_placeholderAt(index: number): string | undefined;
|
|
130
|
+
private _replaceText;
|
|
131
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DiscreteInputComponent, [null, null, { optional: true; }, { optional: true; self: true; }, { optional: true; }, { optional: true; }, null]>;
|
|
132
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DiscreteInputComponent, "bui-discrete-input", never, { "type": { "alias": "type"; "required": false; }; "separator": { "alias": "separator"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "userAriaDescribedBy": { "alias": "aria-describedby"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "sizeSpec": { "alias": "sizeSpec"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, never, false, never>;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
declare class DiscreteInputModule {
|
|
136
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DiscreteInputModule, never>;
|
|
137
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DiscreteInputModule, [typeof DiscreteInputComponent], [typeof i2.CommonModule, typeof i3.MatFormFieldModule, typeof i4.ReactiveFormsModule, typeof i5.A11yModule], [typeof DiscreteInputComponent]>;
|
|
138
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DiscreteInputModule>;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export { DiscreteInputComponent, DiscreteInputModule };
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import * as i2 from '@angular/common';
|
|
2
1
|
import { CommonModule } from '@angular/common';
|
|
3
2
|
import * as i0 from '@angular/core';
|
|
4
3
|
import { EventEmitter, Input, HostBinding, Output, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
5
|
-
import * as
|
|
4
|
+
import * as i3 from '@angular/material/button';
|
|
6
5
|
import { MatButtonModule } from '@angular/material/button';
|
|
7
|
-
import * as
|
|
6
|
+
import * as i2 from '@bravura/ui/icon-font';
|
|
8
7
|
import { IconFontModule } from '@bravura/ui/icon-font';
|
|
9
8
|
import { trigger, transition, style, animate, state } from '@angular/animations';
|
|
10
9
|
import { generateID, isElementInViewport } from '@bravura/ui/common';
|
|
11
10
|
import { Subject, timer } from 'rxjs';
|
|
12
11
|
import { takeUntil, take, tap, delay } from 'rxjs/operators';
|
|
13
|
-
import * as i1 from '@angular/cdk/scrolling';
|
|
12
|
+
import * as i1$1 from '@angular/cdk/scrolling';
|
|
14
13
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
15
|
-
import * as
|
|
14
|
+
import * as i1 from '@angular/material/icon';
|
|
16
15
|
|
|
17
16
|
/** @ignore */
|
|
18
17
|
const ICONS = {
|
|
@@ -75,16 +74,16 @@ class AlertMessageComponent {
|
|
|
75
74
|
_dismiss() {
|
|
76
75
|
this.dismissed.emit(this._id);
|
|
77
76
|
}
|
|
78
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
79
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
77
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlertMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
78
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AlertMessageComponent, isStandalone: false, selector: "bui-alert", inputs: { type: "type", message: "message", politeness: "politeness", dismissible: "dismissible", _id: ["id", "_id"] }, outputs: { dismissed: "dismissed", initialised: "initialised" }, host: { properties: { "class": "'bui-alert bui-host bui-alert-' + (type === 'warn' ? 'warning' : type) + (dismissible ? ' bui-alert-dismissible' : '')", "role": "politeness === 'off' ? 'region' : 'alert'", "attr.aria-live": "politeness === 'assertive' ? undefined : politeness", "id": "this._id" } }, ngImport: i0, template: "<div class=\"bui-alert-backdrop\"></div>\n<div class=\"bui-alert-frame\"></div>\n\n<div class=\"bui-alert-wrapper\">\n\t<div class=\"bui-alert-icon-area\">\n\t\t<mat-icon [buiIcon]=\"iconName\" variant=\"outlined\"></mat-icon>\n\t</div>\n\t<div class=\"bui-alert-content\">\n\t\t@if (message) {\n\t\t\t<div [innerHTML]=\"message\"></div>\n\t\t}\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n\n@if (dismissible) {\n\t<div class=\"bui-alert-button-area\">\n\t\t<div class=\"bui-alert-button-backdrop\"></div>\n\t\t<button mat-icon-button class=\"bui-alert-button\" (click)=\"_dismiss()\" aria-label=\"dismiss alert\">\n\t\t\t<mat-icon>cancel</mat-icon>\n\t\t</button>\n\t</div>\n}\n", styles: [":host(:not([hidden])){display:block;padding:12px 14px 12px 19px;position:relative;border-radius:5px}:host-context([dir=rtl]) :host(:not([hidden])){padding:12px 19px 12px 14px}:host(:not([hidden])),:host(:not([hidden])) *{box-sizing:border-box}.bui-alert-backdrop,.bui-alert-frame{position:absolute;inset:0}.bui-alert-backdrop{opacity:.1}:host(.bui-alert-dismissible) .bui-alert-backdrop{clip-path:polygon(0 0,calc(100% - 25px) 0,calc(100% - 18.75px) 18.75px,100% 25px,100% 100%,0 100%)}:host-context([dir=rtl]) :host(.bui-alert-dismissible) .bui-alert-backdrop{clip-path:polygon(0 25px,0 100%,100% 100%,100% 0,25px 0,18.75px 18.75px)}.bui-alert-frame{border-radius:5px;border-width:1px 1px 1px 5px;border-style:solid}:host-context([dir=rtl]) .bui-alert-frame{border-width:1px 5px 1px 1px}:host(.bui-alert-dismissible) .bui-alert-frame{clip-path:polygon(0 0,calc(100% - 25px) 0,calc(100% - 25px) 25px,100% 25px,100% 100%,0 100%)}:host-context([dir=rtl]) :host(.bui-alert-dismissible) .bui-alert-frame{clip-path:polygon(0 25px,0 100%,100% 100%,100% 0,25px 0)}.bui-alert-button-area{position:absolute;right:-15px;top:-15px;width:40px;height:40px;border-radius:20px;display:flex;align-items:center;justify-content:center}:host-context([dir=rtl]) .bui-alert-button-area{right:unset;left:-15px}.bui-alert-button-backdrop{position:absolute;border-radius:20px;width:100%;height:100%;clip-path:polygon(0 15px,25px 15px,25px 100%,0% 100%)}:host-context([dir=rtl]) .bui-alert-button-backdrop{clip-path:polygon(15px 15px,15px 100%,100% 100%,100% 15px)}.bui-alert-wrapper{display:flex;align-items:stretch}.bui-alert-icon-area{flex-shrink:0;display:flex;justify-content:center;align-items:center;border-radius:5px;width:30px;height:30px;margin-right:14px;color:var(--bui-bg-card)}:host-context([dir=rtl]) .bui-alert-icon-area{margin-right:unset;margin-left:14px}.bui-alert-content{z-index:1;flex-grow:1;display:flex;flex-direction:column;justify-content:center;gap:1rem}:host(.bui-alert-dismissible) .bui-alert-content{clip-path:polygon(0 0,calc(100% - 11px) 0,100% 13px,100% 100%,0 100%)}:host-context([dir=rtl]) :host(.bui-alert-dismissible) .bui-alert-content{clip-path:polygon(0 13px,0 100%,100% 100%,100% 0,11px 0)}:host(.bui-alert-success) .bui-alert-frame{border-color:var(--bui-color-success)}:host(.bui-alert-success) .bui-alert-backdrop,:host(.bui-alert-success) .bui-alert-icon-area{background-color:var(--bui-color-success)}:host(.bui-alert-success) .bui-alert-button-backdrop{border:1px var(--bui-color-success) solid}:host(.bui-alert-success) .bui-alert-button{color:var(--bui-color-success)}:host(.bui-alert-info) .bui-alert-frame{border-color:var(--bui-color-info)}:host(.bui-alert-info) .bui-alert-backdrop,:host(.bui-alert-info) .bui-alert-icon-area{background-color:var(--bui-color-info)}:host(.bui-alert-info) .bui-alert-button-backdrop{border:1px var(--bui-color-info) solid}:host(.bui-alert-info) .bui-alert-button{color:var(--bui-color-info)}:host(.bui-alert-warning) .bui-alert-frame{border-color:var(--bui-color-warning)}:host(.bui-alert-warning) .bui-alert-backdrop,:host(.bui-alert-warning) .bui-alert-icon-area{background-color:var(--bui-color-warning)}:host(.bui-alert-warning) .bui-alert-button-backdrop{border:1px var(--bui-color-warning) solid}:host(.bui-alert-warning) .bui-alert-button{color:var(--bui-color-warning)}:host(.bui-alert-error) .bui-alert-frame{border-color:var(--bui-color-error)}:host(.bui-alert-error) .bui-alert-backdrop,:host(.bui-alert-error) .bui-alert-icon-area{background-color:var(--bui-color-error)}:host(.bui-alert-error) .bui-alert-button-backdrop{border:1px var(--bui-color-error) solid}:host(.bui-alert-error) .bui-alert-button{color:var(--bui-color-error)}.bui-alert-button{width:40px;height:40px;padding:8px;overflow:hidden}@polyfill-unscoped-rule{content: \".bui-alert .bui-alert-content > div > *:first-child\"; margin-top: 0;}@polyfill-unscoped-rule{content: \".bui-alert .bui-alert-content > div > *:last-child\"; margin-bottom: 0;}@polyfill-unscoped-rule{content: \".bui-alert .bui-alert-content > *:first-child\"; margin-top: 0;}@polyfill-unscoped-rule{content: \".bui-alert .bui-alert-content > *:last-child\"; margin-bottom: 0;}\n"], dependencies: [{ kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2.IconDirective, selector: "[buiIcon]", inputs: ["buiIcon", "size", "variant"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
80
79
|
}
|
|
81
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlertMessageComponent, decorators: [{
|
|
82
81
|
type: Component,
|
|
83
82
|
args: [{ selector: 'bui-alert', host: {
|
|
84
83
|
'[class]': `'bui-alert bui-host bui-alert-' + (type === 'warn' ? 'warning' : type) + (dismissible ? ' bui-alert-dismissible' : '')`,
|
|
85
84
|
'[role]': `politeness === 'off' ? 'region' : 'alert'`,
|
|
86
85
|
'[attr.aria-live]': `politeness === 'assertive' ? undefined : politeness`
|
|
87
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"bui-alert-backdrop\"></div>\
|
|
86
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"bui-alert-backdrop\"></div>\n<div class=\"bui-alert-frame\"></div>\n\n<div class=\"bui-alert-wrapper\">\n\t<div class=\"bui-alert-icon-area\">\n\t\t<mat-icon [buiIcon]=\"iconName\" variant=\"outlined\"></mat-icon>\n\t</div>\n\t<div class=\"bui-alert-content\">\n\t\t@if (message) {\n\t\t\t<div [innerHTML]=\"message\"></div>\n\t\t}\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n\n@if (dismissible) {\n\t<div class=\"bui-alert-button-area\">\n\t\t<div class=\"bui-alert-button-backdrop\"></div>\n\t\t<button mat-icon-button class=\"bui-alert-button\" (click)=\"_dismiss()\" aria-label=\"dismiss alert\">\n\t\t\t<mat-icon>cancel</mat-icon>\n\t\t</button>\n\t</div>\n}\n", styles: [":host(:not([hidden])){display:block;padding:12px 14px 12px 19px;position:relative;border-radius:5px}:host-context([dir=rtl]) :host(:not([hidden])){padding:12px 19px 12px 14px}:host(:not([hidden])),:host(:not([hidden])) *{box-sizing:border-box}.bui-alert-backdrop,.bui-alert-frame{position:absolute;inset:0}.bui-alert-backdrop{opacity:.1}:host(.bui-alert-dismissible) .bui-alert-backdrop{clip-path:polygon(0 0,calc(100% - 25px) 0,calc(100% - 18.75px) 18.75px,100% 25px,100% 100%,0 100%)}:host-context([dir=rtl]) :host(.bui-alert-dismissible) .bui-alert-backdrop{clip-path:polygon(0 25px,0 100%,100% 100%,100% 0,25px 0,18.75px 18.75px)}.bui-alert-frame{border-radius:5px;border-width:1px 1px 1px 5px;border-style:solid}:host-context([dir=rtl]) .bui-alert-frame{border-width:1px 5px 1px 1px}:host(.bui-alert-dismissible) .bui-alert-frame{clip-path:polygon(0 0,calc(100% - 25px) 0,calc(100% - 25px) 25px,100% 25px,100% 100%,0 100%)}:host-context([dir=rtl]) :host(.bui-alert-dismissible) .bui-alert-frame{clip-path:polygon(0 25px,0 100%,100% 100%,100% 0,25px 0)}.bui-alert-button-area{position:absolute;right:-15px;top:-15px;width:40px;height:40px;border-radius:20px;display:flex;align-items:center;justify-content:center}:host-context([dir=rtl]) .bui-alert-button-area{right:unset;left:-15px}.bui-alert-button-backdrop{position:absolute;border-radius:20px;width:100%;height:100%;clip-path:polygon(0 15px,25px 15px,25px 100%,0% 100%)}:host-context([dir=rtl]) .bui-alert-button-backdrop{clip-path:polygon(15px 15px,15px 100%,100% 100%,100% 15px)}.bui-alert-wrapper{display:flex;align-items:stretch}.bui-alert-icon-area{flex-shrink:0;display:flex;justify-content:center;align-items:center;border-radius:5px;width:30px;height:30px;margin-right:14px;color:var(--bui-bg-card)}:host-context([dir=rtl]) .bui-alert-icon-area{margin-right:unset;margin-left:14px}.bui-alert-content{z-index:1;flex-grow:1;display:flex;flex-direction:column;justify-content:center;gap:1rem}:host(.bui-alert-dismissible) .bui-alert-content{clip-path:polygon(0 0,calc(100% - 11px) 0,100% 13px,100% 100%,0 100%)}:host-context([dir=rtl]) :host(.bui-alert-dismissible) .bui-alert-content{clip-path:polygon(0 13px,0 100%,100% 100%,100% 0,11px 0)}:host(.bui-alert-success) .bui-alert-frame{border-color:var(--bui-color-success)}:host(.bui-alert-success) .bui-alert-backdrop,:host(.bui-alert-success) .bui-alert-icon-area{background-color:var(--bui-color-success)}:host(.bui-alert-success) .bui-alert-button-backdrop{border:1px var(--bui-color-success) solid}:host(.bui-alert-success) .bui-alert-button{color:var(--bui-color-success)}:host(.bui-alert-info) .bui-alert-frame{border-color:var(--bui-color-info)}:host(.bui-alert-info) .bui-alert-backdrop,:host(.bui-alert-info) .bui-alert-icon-area{background-color:var(--bui-color-info)}:host(.bui-alert-info) .bui-alert-button-backdrop{border:1px var(--bui-color-info) solid}:host(.bui-alert-info) .bui-alert-button{color:var(--bui-color-info)}:host(.bui-alert-warning) .bui-alert-frame{border-color:var(--bui-color-warning)}:host(.bui-alert-warning) .bui-alert-backdrop,:host(.bui-alert-warning) .bui-alert-icon-area{background-color:var(--bui-color-warning)}:host(.bui-alert-warning) .bui-alert-button-backdrop{border:1px var(--bui-color-warning) solid}:host(.bui-alert-warning) .bui-alert-button{color:var(--bui-color-warning)}:host(.bui-alert-error) .bui-alert-frame{border-color:var(--bui-color-error)}:host(.bui-alert-error) .bui-alert-backdrop,:host(.bui-alert-error) .bui-alert-icon-area{background-color:var(--bui-color-error)}:host(.bui-alert-error) .bui-alert-button-backdrop{border:1px var(--bui-color-error) solid}:host(.bui-alert-error) .bui-alert-button{color:var(--bui-color-error)}.bui-alert-button{width:40px;height:40px;padding:8px;overflow:hidden}@polyfill-unscoped-rule{content: \".bui-alert .bui-alert-content > div > *:first-child\"; margin-top: 0;}@polyfill-unscoped-rule{content: \".bui-alert .bui-alert-content > div > *:last-child\"; margin-bottom: 0;}@polyfill-unscoped-rule{content: \".bui-alert .bui-alert-content > *:first-child\"; margin-top: 0;}@polyfill-unscoped-rule{content: \".bui-alert .bui-alert-content > *:last-child\"; margin-bottom: 0;}\n"] }]
|
|
88
87
|
}], ctorParameters: () => [], propDecorators: { type: [{
|
|
89
88
|
type: Input
|
|
90
89
|
}], message: [{
|
|
@@ -97,9 +96,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
97
96
|
type: Output
|
|
98
97
|
}], initialised: [{
|
|
99
98
|
type: Output
|
|
100
|
-
}],
|
|
101
|
-
/** @ignore */
|
|
102
|
-
_id: [{
|
|
99
|
+
}], _id: [{
|
|
103
100
|
type: Input,
|
|
104
101
|
args: ['id']
|
|
105
102
|
}, {
|
|
@@ -247,8 +244,8 @@ class AlertContainerComponent {
|
|
|
247
244
|
this.zone.run(() => this.cdRef.markForCheck());
|
|
248
245
|
});
|
|
249
246
|
}
|
|
250
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
251
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
247
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlertContainerComponent, deps: [{ token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1$1.ScrollDispatcher }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
248
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AlertContainerComponent, isStandalone: false, selector: "bui-alert-container", inputs: { max: "max", outsideViewportBehavior: "outsideViewportBehavior", floatDuration: "floatDuration" }, outputs: { init: "init" }, host: { properties: { "class": "'bui-alert-container bui-host bui-alert-container-' + (_remaining.length ? 'not-empty': 'empty')" } }, ngImport: i0, template: "<div\n\tclass=\"bui-alert-fixed-panel\"\n\t[style.opacity]=\"_floatPanelHidden ? 1 : 0\"\n\t[class.bui-alert-fixed-panel-blink]=\"outsideViewportBehavior === 'scroll'\"\n>\n\t@for (a of _alerts; track a) {\n\t\t<bui-alert\n\t\t\t[id]=\"a.id\"\n\t\t\t[type]=\"a.type\"\n\t\t\t[message]=\"a.message\"\n\t\t\tdismissible\n\t\t\t[@alertTransition]=\"a.deleted ? 'hidden' : 'visible'\"\n\t\t\t(@alertTransition.start)=\"_animationStarted.next($event)\"\n\t\t\t(@alertTransition.done)=\"_animationEnded.next($event)\"\n\t\t\t(dismissed)=\"_dismiss(a)\"\n\t\t></bui-alert>\n\t}\n</div>\n\n<div class=\"bui-alert-float-panel-frame\" [hidden]=\"_floatPanelHidden\" [class.bui-alert-float-panel-shaded]=\"_floated\">\n\t@if (_floated) {\n\t\t<div class=\"bui-alert-float-panel\" [style.max-width]=\"_width + 'px'\" [@floatTransition]=\"'visible'\">\n\t\t\t@for (a of _alerts; track a) {\n\t\t\t\t<bui-alert\n\t\t\t\t\t[id]=\"a.id\"\n\t\t\t\t\t[type]=\"a.type\"\n\t\t\t\t\t[message]=\"a.message\"\n\t\t\t\t\t[@alertTransition]=\"a.deleted ? 'hidden' : 'visible'\"\n\t\t\t\t></bui-alert>\n\t\t\t}\n\t\t</div>\n\t}\n</div>\n", styles: [".bui-alert:not(:first-of-type){margin-top:.5rem}:host(:not([hidden])){display:block}.bui-alert-fixed-panel{transition:opacity .2s ease-in}.bui-alert-fixed-panel.bui-alert-fixed-panel-blink .bui-alert:last-of-type{animation:blink 1s ease-in forwards}.bui-alert-float-panel-frame{position:fixed;z-index:1000;inset:0;justify-content:center;align-items:center;flex-direction:column;transition:background-color .4s cubic-bezier(.25,0,.55,.2)}.bui-alert-float-panel-frame:not([hidden]){display:flex}.bui-alert-float-panel-frame.bui-alert-float-panel-shaded{background-color:#00000080}.bui-alert-float-panel-frame .bui-alert{background-color:var(--bui-bg-card)}@keyframes blink{60%{opacity:1}70%{opacity:0}80%{opacity:1}90%{opacity:0}}\n"], dependencies: [{ kind: "component", type: AlertMessageComponent, selector: "bui-alert", inputs: ["type", "message", "politeness", "dismissible", "id"], outputs: ["dismissed", "initialised"] }], animations: [
|
|
252
249
|
trigger('floatTransition', [
|
|
253
250
|
transition(':enter', [style({ opacity: '0', transform: 'translateY(-10vh)' }), animate('.3s ease-in')]),
|
|
254
251
|
transition(':leave', [animate('.4s ease-out', style({ transform: 'translateY(-10vh)', opacity: '0' }))])
|
|
@@ -270,7 +267,7 @@ class AlertContainerComponent {
|
|
|
270
267
|
])
|
|
271
268
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
272
269
|
}
|
|
273
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
270
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlertContainerComponent, decorators: [{
|
|
274
271
|
type: Component,
|
|
275
272
|
args: [{ selector: 'bui-alert-container', host: {
|
|
276
273
|
'[class]': `'bui-alert-container bui-host bui-alert-container-' + (_remaining.length ? 'not-empty': 'empty')`
|
|
@@ -294,8 +291,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
294
291
|
]),
|
|
295
292
|
transition('visible => hidden', [animate('250ms cubic-bezier(0.25, 0, 0.3, 1.0)')])
|
|
296
293
|
])
|
|
297
|
-
], standalone: false, template: "<div\
|
|
298
|
-
}], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1.ScrollDispatcher }], propDecorators: { max: [{
|
|
294
|
+
], standalone: false, template: "<div\n\tclass=\"bui-alert-fixed-panel\"\n\t[style.opacity]=\"_floatPanelHidden ? 1 : 0\"\n\t[class.bui-alert-fixed-panel-blink]=\"outsideViewportBehavior === 'scroll'\"\n>\n\t@for (a of _alerts; track a) {\n\t\t<bui-alert\n\t\t\t[id]=\"a.id\"\n\t\t\t[type]=\"a.type\"\n\t\t\t[message]=\"a.message\"\n\t\t\tdismissible\n\t\t\t[@alertTransition]=\"a.deleted ? 'hidden' : 'visible'\"\n\t\t\t(@alertTransition.start)=\"_animationStarted.next($event)\"\n\t\t\t(@alertTransition.done)=\"_animationEnded.next($event)\"\n\t\t\t(dismissed)=\"_dismiss(a)\"\n\t\t></bui-alert>\n\t}\n</div>\n\n<div class=\"bui-alert-float-panel-frame\" [hidden]=\"_floatPanelHidden\" [class.bui-alert-float-panel-shaded]=\"_floated\">\n\t@if (_floated) {\n\t\t<div class=\"bui-alert-float-panel\" [style.max-width]=\"_width + 'px'\" [@floatTransition]=\"'visible'\">\n\t\t\t@for (a of _alerts; track a) {\n\t\t\t\t<bui-alert\n\t\t\t\t\t[id]=\"a.id\"\n\t\t\t\t\t[type]=\"a.type\"\n\t\t\t\t\t[message]=\"a.message\"\n\t\t\t\t\t[@alertTransition]=\"a.deleted ? 'hidden' : 'visible'\"\n\t\t\t\t></bui-alert>\n\t\t\t}\n\t\t</div>\n\t}\n</div>\n", styles: [".bui-alert:not(:first-of-type){margin-top:.5rem}:host(:not([hidden])){display:block}.bui-alert-fixed-panel{transition:opacity .2s ease-in}.bui-alert-fixed-panel.bui-alert-fixed-panel-blink .bui-alert:last-of-type{animation:blink 1s ease-in forwards}.bui-alert-float-panel-frame{position:fixed;z-index:1000;inset:0;justify-content:center;align-items:center;flex-direction:column;transition:background-color .4s cubic-bezier(.25,0,.55,.2)}.bui-alert-float-panel-frame:not([hidden]){display:flex}.bui-alert-float-panel-frame.bui-alert-float-panel-shaded{background-color:#00000080}.bui-alert-float-panel-frame .bui-alert{background-color:var(--bui-bg-card)}@keyframes blink{60%{opacity:1}70%{opacity:0}80%{opacity:1}90%{opacity:0}}\n"] }]
|
|
295
|
+
}], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1$1.ScrollDispatcher }], propDecorators: { max: [{
|
|
299
296
|
type: Input
|
|
300
297
|
}], outsideViewportBehavior: [{
|
|
301
298
|
type: Input
|
|
@@ -306,11 +303,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
306
303
|
}] } });
|
|
307
304
|
|
|
308
305
|
class AlertModule {
|
|
309
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
310
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
311
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
306
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
307
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: AlertModule, declarations: [AlertMessageComponent, AlertContainerComponent], imports: [CommonModule, IconFontModule, MatButtonModule], exports: [AlertMessageComponent, AlertContainerComponent] }); }
|
|
308
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlertModule, imports: [CommonModule, IconFontModule, MatButtonModule] }); }
|
|
312
309
|
}
|
|
313
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
310
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AlertModule, decorators: [{
|
|
314
311
|
type: NgModule,
|
|
315
312
|
args: [{
|
|
316
313
|
declarations: [AlertMessageComponent, AlertContainerComponent],
|