@bravura/ui 6.1.0 → 8.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.
Files changed (134) hide show
  1. package/CHANGELOG.md +19 -1
  2. package/README.md +58 -57
  3. package/fesm2022/bravura-ui-alert.mjs +19 -22
  4. package/fesm2022/bravura-ui-alert.mjs.map +1 -1
  5. package/fesm2022/bravura-ui-behavior.mjs +18 -18
  6. package/fesm2022/bravura-ui-behavior.mjs.map +1 -1
  7. package/fesm2022/bravura-ui-clip-note.mjs +10 -10
  8. package/fesm2022/bravura-ui-clip-note.mjs.map +1 -1
  9. package/fesm2022/bravura-ui-common.mjs +5 -6
  10. package/fesm2022/bravura-ui-common.mjs.map +1 -1
  11. package/fesm2022/bravura-ui-currency-input.mjs +7 -7
  12. package/fesm2022/bravura-ui-currency-input.mjs.map +1 -1
  13. package/fesm2022/bravura-ui-decimal-input.mjs +7 -7
  14. package/fesm2022/bravura-ui-decimal-input.mjs.map +1 -1
  15. package/fesm2022/bravura-ui-discrete-input.mjs +10 -11
  16. package/fesm2022/bravura-ui-discrete-input.mjs.map +1 -1
  17. package/fesm2022/bravura-ui-file-upload.mjs +18 -18
  18. package/fesm2022/bravura-ui-file-upload.mjs.map +1 -1
  19. package/fesm2022/bravura-ui-form-field.mjs +10 -10
  20. package/fesm2022/bravura-ui-form-field.mjs.map +1 -1
  21. package/fesm2022/bravura-ui-icon-font.mjs +7 -7
  22. package/fesm2022/bravura-ui-icon-font.mjs.map +1 -1
  23. package/fesm2022/bravura-ui-panel.mjs +16 -16
  24. package/fesm2022/bravura-ui-panel.mjs.map +1 -1
  25. package/fesm2022/bravura-ui-phone-number.mjs +13 -13
  26. package/fesm2022/bravura-ui-phone-number.mjs.map +1 -1
  27. package/fesm2022/bravura-ui-radio-panel.mjs +12 -14
  28. package/fesm2022/bravura-ui-radio-panel.mjs.map +1 -1
  29. package/fesm2022/bravura-ui-selection-panel.mjs +11 -11
  30. package/fesm2022/bravura-ui-selection-panel.mjs.map +1 -1
  31. package/fesm2022/bravura-ui-skeletons.mjs +10 -10
  32. package/fesm2022/bravura-ui-skeletons.mjs.map +1 -1
  33. package/fesm2022/bravura-ui-stepper.mjs +18 -18
  34. package/fesm2022/bravura-ui-stepper.mjs.map +1 -1
  35. package/fesm2022/bravura-ui-tooltip.mjs +13 -31
  36. package/fesm2022/bravura-ui-tooltip.mjs.map +1 -1
  37. package/package.json +39 -39
  38. package/{alert/testing/test-api.d.ts → types/bravura-ui-alert-testing.d.ts} +8 -4
  39. package/{alert/alert-container.component.d.ts → types/bravura-ui-alert.d.ts} +61 -4
  40. package/types/bravura-ui-behavior.d.ts +233 -0
  41. package/{clip-note/clip-note.directive.d.ts → types/bravura-ui-clip-note.d.ts} +64 -6
  42. package/types/bravura-ui-common.d.ts +26 -0
  43. package/{currency-input/currency-input.directive.d.ts → types/bravura-ui-currency-input.d.ts} +17 -8
  44. package/{decimal-input/decimal-input.directive.d.ts → types/bravura-ui-decimal-input.d.ts} +17 -8
  45. package/{discrete-input/discrete-input.component.d.ts → types/bravura-ui-discrete-input.d.ts} +18 -5
  46. package/{file-upload/file-upload.component.d.ts → types/bravura-ui-file-upload.d.ts} +61 -7
  47. package/{form-field/form-field.component.d.ts → types/bravura-ui-form-field.d.ts} +18 -6
  48. package/{icon-font/icon.directive.d.ts → types/bravura-ui-icon-font.d.ts} +38 -3
  49. package/{panel/panel.component.d.ts → types/bravura-ui-panel.d.ts} +53 -4
  50. package/{phone-number/phone-number.directive.d.ts → types/bravura-ui-phone-number.d.ts} +49 -5
  51. package/{radio-panel/testing/test-api.d.ts → types/bravura-ui-radio-panel-testing.d.ts} +12 -7
  52. package/types/bravura-ui-radio-panel.d.ts +73 -0
  53. package/types/bravura-ui-selection-panel.d.ts +151 -0
  54. package/types/bravura-ui-skeletons.d.ts +81 -0
  55. package/{stepper/stepper.component.d.ts → types/bravura-ui-stepper.d.ts} +37 -4
  56. package/{tooltip/tooltip.directive.d.ts → types/bravura-ui-tooltip.d.ts} +19 -4
  57. package/types/bravura-ui.d.ts +3 -0
  58. package/alert/alert-message.component.d.ts +0 -47
  59. package/alert/alert.module.d.ts +0 -14
  60. package/alert/index.d.ts +0 -5
  61. package/alert/public-api.d.ts +0 -1
  62. package/alert/testing/index.d.ts +0 -5
  63. package/behavior/await.directive.d.ts +0 -71
  64. package/behavior/behavior.module.d.ts +0 -17
  65. package/behavior/index.d.ts +0 -5
  66. package/behavior/observe-content-class.directive.d.ts +0 -29
  67. package/behavior/public-api.d.ts +0 -5
  68. package/behavior/sizing-monitor.directive.d.ts +0 -23
  69. package/behavior/sizing.directive.d.ts +0 -98
  70. package/clip-note/clip-note.component.d.ts +0 -45
  71. package/clip-note/clip-note.module.d.ts +0 -19
  72. package/clip-note/index.d.ts +0 -5
  73. package/clip-note/public-api.d.ts +0 -1
  74. package/common/common-utils.d.ts +0 -11
  75. package/common/common.module.d.ts +0 -11
  76. package/common/index.d.ts +0 -5
  77. package/common/public-api.d.ts +0 -2
  78. package/currency-input/currency-input.module.d.ts +0 -10
  79. package/currency-input/index.d.ts +0 -5
  80. package/currency-input/public-api.d.ts +0 -1
  81. package/decimal-input/decimal-input.module.d.ts +0 -10
  82. package/decimal-input/index.d.ts +0 -5
  83. package/decimal-input/public-api.d.ts +0 -1
  84. package/discrete-input/discrete-input.module.d.ts +0 -11
  85. package/discrete-input/index.d.ts +0 -5
  86. package/discrete-input/public-api.d.ts +0 -2
  87. package/file-upload/file-upload.module.d.ts +0 -14
  88. package/file-upload/file-upload.service.d.ts +0 -42
  89. package/file-upload/index.d.ts +0 -5
  90. package/file-upload/public-api.d.ts +0 -6
  91. package/form-field/form-field.module.d.ts +0 -13
  92. package/form-field/index.d.ts +0 -5
  93. package/form-field/public-api.d.ts +0 -2
  94. package/icon-font/icon-font.module.d.ts +0 -12
  95. package/icon-font/index.d.ts +0 -5
  96. package/icon-font/public-api.d.ts +0 -3
  97. package/icon-font/utilities.d.ts +0 -20
  98. package/index.d.ts +0 -5
  99. package/panel/index.d.ts +0 -5
  100. package/panel/panel-section.component.d.ts +0 -15
  101. package/panel/panel.module.d.ts +0 -16
  102. package/panel/public-api.d.ts +0 -1
  103. package/panel/tinted.directive.d.ts +0 -26
  104. package/phone-number/index.d.ts +0 -5
  105. package/phone-number/phone-number.module.d.ts +0 -17
  106. package/phone-number/phone-number.pipe.d.ts +0 -13
  107. package/phone-number/phone-number.validator.d.ts +0 -31
  108. package/phone-number/public-api.d.ts +0 -1
  109. package/public-api.d.ts +0 -1
  110. package/radio-panel/index.d.ts +0 -5
  111. package/radio-panel/public-api.d.ts +0 -3
  112. package/radio-panel/radio-panel-item.component.d.ts +0 -22
  113. package/radio-panel/radio-panel.component.d.ts +0 -38
  114. package/radio-panel/radio-panel.module.d.ts +0 -15
  115. package/radio-panel/testing/index.d.ts +0 -5
  116. package/selection-panel/index.d.ts +0 -5
  117. package/selection-panel/public-api.d.ts +0 -3
  118. package/selection-panel/selection-panel-item.component.d.ts +0 -77
  119. package/selection-panel/selection-panel.directive.d.ts +0 -67
  120. package/selection-panel/selection-panel.module.d.ts +0 -13
  121. package/skeletons/index.d.ts +0 -5
  122. package/skeletons/public-api.d.ts +0 -3
  123. package/skeletons/skeleton-loader-presets.directive.d.ts +0 -23
  124. package/skeletons/skeleton-loader.component.d.ts +0 -44
  125. package/skeletons/skeletons.module.d.ts +0 -16
  126. package/stepper/index.d.ts +0 -5
  127. package/stepper/public-api.d.ts +0 -3
  128. package/stepper/step-label-top.directive.d.ts +0 -17
  129. package/stepper/stepper-animation.d.ts +0 -6
  130. package/stepper/stepper.module.d.ts +0 -17
  131. package/tooltip/index.d.ts +0 -5
  132. package/tooltip/public-api.d.ts +0 -3
  133. package/tooltip/tooltip.component.d.ts +0 -26
  134. package/tooltip/tooltip.module.d.ts +0 -13
@@ -0,0 +1,233 @@
1
+ import * as i0 from '@angular/core';
2
+ import { ElementRef, OnChanges, OnDestroy, EventEmitter, NgZone, SimpleChanges, AfterViewInit, DoCheck, ViewContainerRef, OnInit } from '@angular/core';
3
+ import * as i6 from '@angular/material/button';
4
+ import { MatButton, MatIconButton, MatIconAnchor, MatFabButton, MatFabAnchor, MatMiniFabButton, MatMiniFabAnchor } from '@angular/material/button';
5
+ import { Subscription } from 'rxjs';
6
+ import * as i8 from '@angular/cdk/observers';
7
+ import { ContentObserver } from '@angular/cdk/observers';
8
+ import * as i5 from '@angular/common';
9
+ import * as i7 from '@angular/material/progress-spinner';
10
+
11
+ /**
12
+ * Use this directive to designate a target HTML element, based on which the child elements'
13
+ * `[buiSizing]` directives will calculate the sizes.
14
+ *
15
+ * ```html
16
+ * <div [buiSizingMonitor]>
17
+ * <div [buiSizing]="...">
18
+ * </div>
19
+ * <div>
20
+ * <div [buiSizing]="...">
21
+ * </div>
22
+ * </div>
23
+ * <div>
24
+ * ```
25
+ */
26
+ declare class SizingMonitorDirective {
27
+ readonly element: ElementRef<HTMLElement>;
28
+ constructor(element: ElementRef<HTMLElement>);
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<SizingMonitorDirective, never>;
30
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SizingMonitorDirective, "[buiSizingMonitor]", never, {}, {}, never, never, false, never>;
31
+ }
32
+
33
+ /**
34
+ * This directive monitors the changes in the width of the `sizingBy` target, and apply specified style
35
+ * classes and/or inline styles to the current element dynamically.
36
+ *
37
+ * In order for the layout engine to efficiently calculate and stabilize the dimensions, the effective style property
38
+ * `box-sizing` of the `sizingBy` target element must be set to `border-box`.
39
+ *
40
+ * The directive uses [ResizeObserver API](https://developer.mozilla.org/en-US/docs/Web/API/Resize_Observer_API)
41
+ * to capture the events of element resizing. Please use a polyfill if you want to support older browsers
42
+ * that do not implement ResizeObserver API.
43
+ *
44
+ * Examples:
45
+ *
46
+ * ```html
47
+ * <div #parentElement>
48
+ * <div [buiSizing]="{'400': 'small', '800': 'medium', '~': 'large'}" [buiSizingBy]="parentElement"></div>
49
+ * <div [buiSizing]="['small', 'medium', 'large']" [buiSizingBy]="'root'"></div>
50
+ * <div [buiSizing]="{'650': 'border-color: #28569', '~': 'bg-muted; border-style: dotted'}" [buiSizingBy]="parentElement"></div>
51
+ * </div>
52
+ * ```
53
+ */
54
+ declare class SizingDirective implements OnChanges, OnDestroy {
55
+ private _doc;
56
+ private _defaultTarget;
57
+ private _zone;
58
+ /**
59
+ * @ignore
60
+ */
61
+ static defaultSizingBreakpoints: string[];
62
+ /**
63
+ * Specifies the breakpoint widths and the style classes.
64
+ *
65
+ * The sizing spec `{"400": "small", "800": "medium", "~": "large"}` tells the directive to apply
66
+ * a style class `small` when the width of the monitored target is smaller than 400 pixels,
67
+ * `medium` when the width is between 400 and 800 pixels, and `large` when above.
68
+ *
69
+ * @example {'400': 'small', '800': 'medium', '~': 'large'}
70
+ */
71
+ buiSizing: string | Array<string> | {
72
+ [key: string]: string;
73
+ };
74
+ /**
75
+ * The alias of `buiSizingBy`.
76
+ * @default 'root'
77
+ * @deprecated
78
+ * @ignore
79
+ */
80
+ sizingBy: 'root' | 'parent' | HTMLElement;
81
+ /**
82
+ * Designate an element to be monitored for recalculating the style classes of the current element.
83
+ *
84
+ * - `root` specifies the document root or the enclosing shadow host. This is the default value.
85
+ * - `parent` specifies the parent element.
86
+ *
87
+ * @default 'root'
88
+ * @alias sizingBy
89
+ */
90
+ get buiSizingBy(): 'root' | 'parent' | HTMLElement;
91
+ set buiSizingBy(target: 'root' | 'parent' | HTMLElement);
92
+ /**
93
+ * Emits `{width, height}` when the monitor target element resizes.
94
+ *
95
+ * Note that the dimensions emitted are of the [sizingBy] target, but not the current element.
96
+ */
97
+ buiResized: EventEmitter<{
98
+ width: number;
99
+ height: number;
100
+ }>;
101
+ /**
102
+ * Recalculate the height of this element according to the height of the monitored target.
103
+ */
104
+ buiFixedHeight: boolean;
105
+ private _monitorTarget;
106
+ private _observer;
107
+ private _sizingSpec;
108
+ private _width;
109
+ private _height;
110
+ private _reflowFrameCount;
111
+ private _element;
112
+ private _frameHandlerId;
113
+ constructor(_doc: Document, _defaultTarget: SizingMonitorDirective, elemRef: ElementRef<HTMLElement>, _zone: NgZone);
114
+ ngOnChanges(_: SimpleChanges): void;
115
+ ngOnDestroy(): void;
116
+ private _initOrReset;
117
+ private _setUpNodeMonitor;
118
+ private _tearDownNodeMonitor;
119
+ private _runWithObserver;
120
+ private _calculateSize;
121
+ private _applyClassesOrStyles;
122
+ private _removeClassesOrStyles;
123
+ private _reflowHeight;
124
+ private _toNumber;
125
+ static ɵfac: i0.ɵɵFactoryDeclaration<SizingDirective, [null, { optional: true; }, null, null]>;
126
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SizingDirective, "[buiSizing],[buiResized],[buiSizingBy],[buiFixedHeight]", never, { "buiSizing": { "alias": "buiSizing"; "required": false; }; "sizingBy": { "alias": "sizingBy"; "required": false; }; "buiSizingBy": { "alias": "buiSizingBy"; "required": false; }; "buiFixedHeight": { "alias": "buiFixedHeight"; "required": false; }; }, { "buiResized": "buiResized"; }, never, never, false, never>;
127
+ }
128
+
129
+ /**
130
+ * Use this directive on a `MatButton` element to provide an alternative view when an async operation is in progress.
131
+ *
132
+ * For example:
133
+ *
134
+ * ```
135
+ * <button (click)="submit();" [buiAwait]="submitSubscription" buiAwaitAriaLabel="submitting">Submit</button>
136
+ * ```
137
+ *
138
+ * Please refer to [Material Design](https://material.io/components/progress-indicators#circular-progress-indicators)
139
+ * for more details of integrating circular spinner component with action buttons.
140
+ *
141
+ * The operation is considered 'in progress' when the bound property `buiAwait` evaluates to
142
+ *
143
+ * - `true`; or
144
+ * - a `number` within 0 - 100; or
145
+ * - an instance of `rxjs/Subscription` and `buiAwait.closed` is falsy
146
+ *
147
+ * When in progress
148
+ *
149
+ * - the button's caption will be hidden;
150
+ * - a `<mat-progress-spinner>` will be displayed in place of the caption;
151
+ * - the button will be disabled by setting the property `disabled` of the `MatButton` instance.
152
+ */
153
+ declare class AwaitDirective implements AfterViewInit, DoCheck {
154
+ private readonly _eRef;
155
+ readonly _button: MatButton;
156
+ readonly _iconButton: MatIconButton;
157
+ readonly _iconAnchor: MatIconAnchor;
158
+ readonly _fab: MatFabButton;
159
+ readonly _fabAnchor: MatFabAnchor;
160
+ readonly _miniFab: MatMiniFabButton;
161
+ readonly _miniFabAnchor: MatMiniFabAnchor;
162
+ private readonly doc;
163
+ private _viewCont;
164
+ /**
165
+ * Indicates the `in progress` status of an async operation.
166
+ *
167
+ * The operation is considered 'in progress' when the property evaluates to
168
+ *
169
+ * - `true`; or
170
+ * - a `number` within 0 - 100; or
171
+ * - an instance of `rxjs/Subscription` and `buiAwait.closed` is falsy
172
+ *
173
+ * When it is a number, it represets the progress in percentage term.
174
+ */
175
+ buiAwait: null | undefined | boolean | Subscription | number;
176
+ /** The ARIA label to be put on the spinner. The default value is `"In progress"`. */
177
+ buiAwaitAriaLabel: string;
178
+ /** The diameter of the in-progress spinner. The default value is `20`. */
179
+ buiAwaitDiameter: number;
180
+ private _overlayEl;
181
+ private _processing;
182
+ private _spinnerRef;
183
+ private _captionWrapper;
184
+ private button;
185
+ constructor(_eRef: ElementRef<HTMLElement>, _button: MatButton, _iconButton: MatIconButton, _iconAnchor: MatIconAnchor, _fab: MatFabButton, _fabAnchor: MatFabAnchor, _miniFab: MatMiniFabButton, _miniFabAnchor: MatMiniFabAnchor, doc: Document, _viewCont: ViewContainerRef);
186
+ /** @ignore */
187
+ ngAfterViewInit(): void;
188
+ /** @ignore */
189
+ ngDoCheck(): void;
190
+ /** @ignore */
191
+ private get _isDeterminate();
192
+ private _statusChanged;
193
+ static ɵfac: i0.ɵɵFactoryDeclaration<AwaitDirective, [null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, null, null]>;
194
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AwaitDirective, "[buiAwait]", never, { "buiAwait": { "alias": "buiAwait"; "required": false; }; "buiAwaitAriaLabel": { "alias": "buiAwaitAriaLabel"; "required": false; }; "buiAwaitDiameter": { "alias": "buiAwaitDiameter"; "required": false; }; }, {}, never, never, false, never>;
195
+ }
196
+
197
+ /**
198
+ * Use `[bui-class.not-empty]` to specify a style class activated only when the host element has DOM children;
199
+ *
200
+ * use `[bui-class.empty]` for a style class activated when it has no DOM children.
201
+ *
202
+ * Use `[bui-class.no-text]` to specify a style class activated only when the host element has text content;
203
+ *
204
+ * use `[bui-class.has-text]` for a style class activated when it has no text content.
205
+ */
206
+ declare class ObserveContentClassDirective implements OnDestroy, OnInit {
207
+ private readonly subscription;
208
+ private readonly element;
209
+ private classToRemove;
210
+ private classEmpty?;
211
+ private classNotEmpty?;
212
+ private classNoText?;
213
+ private classHasText?;
214
+ constructor(observer: ContentObserver, elementRef: ElementRef<HTMLElement>);
215
+ ngOnInit(): void;
216
+ ngOnDestroy(): void;
217
+ private checkClass;
218
+ private checkClassWith;
219
+ private addClass;
220
+ static ɵfac: i0.ɵɵFactoryDeclaration<ObserveContentClassDirective, never>;
221
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ObserveContentClassDirective, "[bui-class.empty],[bui-class.not-empty],[bui-class.no-text],[bui-class.has-text]", never, { "classEmpty": { "alias": "bui-class.empty"; "required": false; }; "classNotEmpty": { "alias": "bui-class.not-empty"; "required": false; }; "classNoText": { "alias": "bui-class.no-text"; "required": false; }; "classHasText": { "alias": "bui-class.has-text"; "required": false; }; }, {}, never, never, false, never>;
222
+ }
223
+
224
+ /**
225
+ * For functionality that cannot be easily achieved via CSS.
226
+ */
227
+ declare class BehaviorModule {
228
+ static ɵfac: i0.ɵɵFactoryDeclaration<BehaviorModule, never>;
229
+ static ɵmod: i0.ɵɵNgModuleDeclaration<BehaviorModule, [typeof SizingDirective, typeof SizingMonitorDirective, typeof AwaitDirective, typeof ObserveContentClassDirective], [typeof i5.CommonModule, typeof i6.MatButtonModule, typeof i7.MatProgressSpinnerModule, typeof i8.ObserversModule], [typeof SizingDirective, typeof SizingMonitorDirective, typeof AwaitDirective, typeof i7.MatProgressSpinnerModule, typeof ObserveContentClassDirective]>;
230
+ static ɵinj: i0.ɵɵInjectorDeclaration<BehaviorModule>;
231
+ }
232
+
233
+ export { AwaitDirective, BehaviorModule, ObserveContentClassDirective, SizingDirective, SizingMonitorDirective };
@@ -1,12 +1,19 @@
1
- import { AfterViewInit, ElementRef, EventEmitter, InjectionToken, TemplateRef, ViewContainerRef } from '@angular/core';
1
+ import * as i0 from '@angular/core';
2
+ import { AfterViewInit, TemplateRef, EventEmitter, ElementRef, ViewContainerRef, OnInit, OnDestroy, EmbeddedViewRef, ChangeDetectorRef, ModuleWithProviders } from '@angular/core';
2
3
  import { ThemePalette } from '@angular/material/core';
3
- import * as i0 from "@angular/core";
4
- export interface ClipNoteDefaultConfig {
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 {
5
14
  color: ThemePalette;
6
15
  caption: string;
7
16
  }
8
- /** Used to provide default config for clip notes. */
9
- export declare const CLIP_NOTE_DEFAULT_CONFIG: InjectionToken<ClipNoteDefaultConfig>;
10
17
  /**
11
18
  * A clip note consists of a toggle button and a floating 'notepad' element, attached to the top end of the host element's
12
19
  * viewable area. The 'notepad' normally collapses away and only reveals itself when the toggle button is active.
@@ -21,7 +28,7 @@ export declare const CLIP_NOTE_DEFAULT_CONFIG: InjectionToken<ClipNoteDefaultCon
21
28
  * can optionally be provided by the `ClipNoteModule.forConfig()` method.
22
29
  *
23
30
  */
24
- export declare class ClipNoteDirective implements AfterViewInit {
31
+ declare class ClipNoteDirective implements AfterViewInit {
25
32
  private _elementRef;
26
33
  private _vc;
27
34
  /**
@@ -67,3 +74,54 @@ export declare class ClipNoteDirective implements AfterViewInit {
67
74
  static ɵfac: i0.ɵɵFactoryDeclaration<ClipNoteDirective, [{ host: true; }, null, null]>;
68
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>;
69
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 };
@@ -0,0 +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;
7
+ /**
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
14
+ */
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,12 +1,13 @@
1
- import { ElementRef, OnChanges, OnInit, Renderer2 } from '@angular/core';
1
+ import * as i0 from '@angular/core';
2
+ import { OnInit, OnChanges, ElementRef, Renderer2 } from '@angular/core';
2
3
  import { ControlValueAccessor } from '@angular/forms';
3
4
  import { MatFormField } from '@angular/material/form-field';
4
- import * as i0 from "@angular/core";
5
- export declare const noop_consumer: (_: any) => void;
5
+ import * as i2 from '@angular/common';
6
+
6
7
  /**
7
8
  * This directive will enhance an input element to format the numbers entered to a currency amount.
8
9
  */
9
- export declare class CurrencyInputDirective implements OnInit, OnChanges, ControlValueAccessor {
10
+ declare class CurrencyInputDirective implements OnInit, OnChanges, ControlValueAccessor {
10
11
  private _el;
11
12
  private _renderer;
12
13
  private _locale;
@@ -31,10 +32,10 @@ export declare class CurrencyInputDirective implements OnInit, OnChanges, Contro
31
32
  * The format the of the amount either in wide or narrow.
32
33
  */
33
34
  format: 'narrow' | 'wide';
34
- private placeholder;
35
- private autocomplete;
36
- private type;
37
- private inputMode;
35
+ placeholder: string;
36
+ autocomplete: string;
37
+ type: string;
38
+ inputMode: string;
38
39
  private change;
39
40
  private onTouch;
40
41
  private _safari;
@@ -60,3 +61,11 @@ export declare class CurrencyInputDirective implements OnInit, OnChanges, Contro
60
61
  static ɵfac: i0.ɵɵFactoryDeclaration<CurrencyInputDirective, [{ self: true; }, null, null, null, { optional: true; }]>;
61
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>;
62
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 };
@@ -1,21 +1,22 @@
1
- import { ElementRef, OnChanges, Renderer2 } from '@angular/core';
1
+ import * as i0 from '@angular/core';
2
+ import { OnChanges, ElementRef, Renderer2 } from '@angular/core';
2
3
  import { ControlValueAccessor } from '@angular/forms';
3
- import * as i0 from "@angular/core";
4
- export declare const noop_consumer: (_: any) => void;
4
+ import * as i2 from '@angular/common';
5
+
5
6
  /**
6
7
  * This directive will enhance an input element to format the numbers entered to a decimal amount.
7
8
  */
8
- export declare class DecimalInputDirective implements OnChanges, ControlValueAccessor {
9
+ declare class DecimalInputDirective implements OnChanges, ControlValueAccessor {
9
10
  private _el;
10
11
  private _renderer;
11
12
  /**
12
13
  * number of decimal places allowed
13
14
  */
14
15
  buiDecimalInput: number;
15
- private placeholder;
16
- private autocomplete;
17
- private type;
18
- private inputMode;
16
+ placeholder: string;
17
+ autocomplete: string;
18
+ type: string;
19
+ inputMode: string;
19
20
  private change;
20
21
  private onTouch;
21
22
  constructor(_el: ElementRef<HTMLInputElement>, _renderer: Renderer2);
@@ -30,3 +31,11 @@ export declare class DecimalInputDirective implements OnChanges, ControlValueAcc
30
31
  static ɵfac: i0.ɵɵFactoryDeclaration<DecimalInputDirective, [{ self: true; }, null]>;
31
32
  static ɵdir: i0.ɵɵDirectiveDeclaration<DecimalInputDirective, "input[buiDecimalInput]", never, { "buiDecimalInput": { "alias": "buiDecimalInput"; "required": false; }; }, {}, never, never, false, never>;
32
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,10 +1,15 @@
1
+ import * as i0 from '@angular/core';
2
+ import { OnDestroy, ElementRef } from '@angular/core';
3
+ import * as i5 from '@angular/cdk/a11y';
1
4
  import { FocusMonitor } from '@angular/cdk/a11y';
2
- import { ElementRef, OnDestroy } from '@angular/core';
3
- import { AbstractControl, ControlValueAccessor, FormGroupDirective, NgControl, NgForm, UntypedFormArray, UntypedFormGroup } from '@angular/forms';
5
+ import * as i4 from '@angular/forms';
6
+ import { ControlValueAccessor, UntypedFormArray, UntypedFormGroup, NgControl, NgForm, FormGroupDirective, AbstractControl } from '@angular/forms';
4
7
  import { ErrorStateMatcher } from '@angular/material/core';
5
- import { MatFormField, MatFormFieldControl } from '@angular/material/form-field';
8
+ import * as i3 from '@angular/material/form-field';
9
+ import { MatFormFieldControl, MatFormField } from '@angular/material/form-field';
6
10
  import { Subject } from 'rxjs';
7
- import * as i0 from "@angular/core";
11
+ import * as i2 from '@angular/common';
12
+
8
13
  /**
9
14
  * Custom `MatFormFieldControl` with an individual input box for each character, suitable for fixed-length fields,
10
15
  * such as secondary PIN inputs, TFNs, or BSB code etc.
@@ -20,7 +25,7 @@ import * as i0 from "@angular/core";
20
25
  * ```
21
26
  *
22
27
  */
23
- export declare class DiscreteInputComponent implements MatFormFieldControl<string>, ControlValueAccessor, OnDestroy {
28
+ declare class DiscreteInputComponent implements MatFormFieldControl<string>, ControlValueAccessor, OnDestroy {
24
29
  private _focusMonitor;
25
30
  private _elementRef;
26
31
  /** @ignore */
@@ -126,3 +131,11 @@ export declare class DiscreteInputComponent implements MatFormFieldControl<strin
126
131
  static ɵfac: i0.ɵɵFactoryDeclaration<DiscreteInputComponent, [null, null, { optional: true; }, { optional: true; self: true; }, { optional: true; }, { optional: true; }, null]>;
127
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>;
128
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,9 +1,56 @@
1
+ import * as i0 from '@angular/core';
2
+ import { OnInit, OnDestroy } from '@angular/core';
1
3
  import { HttpEvent } from '@angular/common/http';
2
- import { OnDestroy, OnInit } from '@angular/core';
3
4
  import { ControlValueAccessor } from '@angular/forms';
4
- import { Observable, Subject, Subscription } from 'rxjs';
5
- import { FileUploadItem, FileUploadService } from './file-upload.service';
6
- import * as i0 from "@angular/core";
5
+ import { Observable, Subscription, Subject } from 'rxjs';
6
+ import * as i2 from '@angular/common';
7
+ import * as i3 from '@angular/material/icon';
8
+ import * as i4 from '@bravura/ui/icon-font';
9
+ import * as i5 from '@angular/material/progress-bar';
10
+ import * as i6 from '@angular/material/button';
11
+ import * as i7 from '@angular/material/divider';
12
+ import * as i8 from '@angular/material/tooltip';
13
+
14
+ /**
15
+ * This type represents a file or form item that has been sent as part of a multipart/form-data POST request.
16
+ */
17
+ declare class FileUploadItem {
18
+ /** The original filename in the client's filesystem, as provided by the browser. */
19
+ name: string;
20
+ /** The size of the file item. */
21
+ size: number;
22
+ /** An alpha-numeric string that uniquely identifies the file item. */
23
+ id: string;
24
+ /** The content type (MIME type) of the file. */
25
+ type: string;
26
+ /** @internal */
27
+ constructor(_id: string, _name: string, _size: number, _type: string);
28
+ }
29
+ /**
30
+ * This is an API for processing file upload requests.
31
+ *
32
+ * A sub class of this type handles multiple file requests, sent using multipart/form-data encoding type, as specified by RFC 1867.
33
+ *
34
+ * Please extend this type and provide it in an injector at the same level, or ancestral to that, of the `FileUploadComponent`.
35
+ */
36
+ declare abstract class FileUploadService {
37
+ /**
38
+ * Upload a list of selected files from the browser. The returned `Observable` array provides the update of the uploading progress
39
+ * through HTTP events.
40
+ */
41
+ abstract upload(files: File[]): Array<Observable<HttpEvent<FileUploadItem>>>;
42
+ /** List all the uploaded file items in the current HTTP session. This list excludes the files still in the process of being uploaded*/
43
+ abstract list(): Observable<FileUploadItem[]>;
44
+ /** Get the content of an uploaded file item as a `Blob`. */
45
+ abstract get(id: string): Observable<Blob>;
46
+ /** Delete an uploaded file item from the server. */
47
+ abstract delete(id: string): Observable<void>;
48
+ /** Delete all uploaded file items in the current HTTP session. */
49
+ abstract clear?(): Observable<void>;
50
+ static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadService, never>;
51
+ static ɵprov: i0.ɵɵInjectableDeclaration<FileUploadService>;
52
+ }
53
+
7
54
  /** @ignore */
8
55
  declare class UploadingItem {
9
56
  private oncancel?;
@@ -36,7 +83,7 @@ declare class UploadingItem {
36
83
  *
37
84
  * @see FileUploadService
38
85
  */
39
- export declare class FileUploadComponent implements OnInit, OnDestroy, ControlValueAccessor {
86
+ declare class FileUploadComponent implements OnInit, OnDestroy, ControlValueAccessor {
40
87
  private _service;
41
88
  /** @ignore */
42
89
  _value: string[] | null;
@@ -93,7 +140,7 @@ export declare class FileUploadComponent implements OnInit, OnDestroy, ControlVa
93
140
  private _typeRegExps;
94
141
  private _types;
95
142
  private _initSubs?;
96
- private _numberOfFilesDragged;
143
+ protected _numberOfFilesDragged: number;
97
144
  private _fileInput;
98
145
  constructor(_service: FileUploadService);
99
146
  /** @internal */
@@ -145,4 +192,11 @@ export declare class FileUploadComponent implements OnInit, OnDestroy, ControlVa
145
192
  static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, never>;
146
193
  static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "bui-file-upload", never, { "uploadActionText": { "alias": "uploadActionText"; "required": false; }; "fileUploadedLabel": { "alias": "fileUploadedLabel"; "required": false; }; "dragHint": { "alias": "dragHint"; "required": false; }; "dropHint": { "alias": "dropHint"; "required": false; }; "limit": { "alias": "limit"; "required": false; }; "fileSize": { "alias": "fileSize"; "required": false; }; "types": { "alias": "types"; "required": false; }; }, {}, never, never, false, never>;
147
194
  }
148
- export {};
195
+
196
+ declare class FileUploadModule {
197
+ static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadModule, never>;
198
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FileUploadModule, [typeof FileUploadComponent], [typeof i2.CommonModule, typeof i3.MatIconModule, typeof i4.IconFontModule, typeof i5.MatProgressBarModule, typeof i6.MatButtonModule, typeof i7.MatDividerModule, typeof i8.MatTooltipModule], [typeof FileUploadComponent]>;
199
+ static ɵinj: i0.ɵɵInjectorDeclaration<FileUploadModule>;
200
+ }
201
+
202
+ export { FileUploadComponent, FileUploadItem, FileUploadModule, FileUploadService };
@@ -1,10 +1,13 @@
1
- import { ElementRef, InjectionToken } from '@angular/core';
1
+ import * as i0 from '@angular/core';
2
+ import { ElementRef, ModuleWithProviders } from '@angular/core';
3
+ import * as i3 from '@angular/material/form-field';
2
4
  import { MatFormField } from '@angular/material/form-field';
3
- import * as i0 from "@angular/core";
4
- export interface BuiFormFieldConfig {
5
+ import * as i2 from '@angular/common';
6
+ import * as i4 from '@angular/cdk/observers';
7
+
8
+ interface BuiFormFieldConfig {
5
9
  appearance?: 'fill' | 'outline' | 'bound';
6
10
  }
7
- export declare const BUI_FORM_FIELD_CONFIG: InjectionToken<BuiFormFieldConfig>;
8
11
  /**
9
12
  * Container for form controls that applies Material Design styling and behavior.
10
13
  *
@@ -18,14 +21,14 @@ export declare const BUI_FORM_FIELD_CONFIG: InjectionToken<BuiFormFieldConfig>;
18
21
  * for the new appearances. As long as you import the `NgModule` from this package, the new appearances will be supported by Material's `mat-form-field`
19
22
  * component.
20
23
  */
21
- export declare class FormFieldComponent extends MatFormField {
24
+ declare class FormFieldComponent extends MatFormField {
22
25
  static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldComponent, never>;
23
26
  static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldComponent, "bui-dummy-component", never, {}, {}, never, never, false, never>;
24
27
  }
25
28
  /**
26
29
  * @ignore
27
30
  */
28
- export declare class FormFieldStyleDirective {
31
+ declare class FormFieldStyleDirective {
29
32
  private matFormField;
30
33
  private elemRef;
31
34
  private _appearance;
@@ -37,3 +40,12 @@ export declare class FormFieldStyleDirective {
37
40
  static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldStyleDirective, [{ host: true; }, null, null]>;
38
41
  static ɵdir: i0.ɵɵDirectiveDeclaration<FormFieldStyleDirective, "bui-form-field, mat-form-field", never, { "appearance": { "alias": "appearance"; "required": false; }; }, {}, never, never, false, never>;
39
42
  }
43
+
44
+ declare class FormFieldModule {
45
+ static forConfig(config: BuiFormFieldConfig): ModuleWithProviders<FormFieldModule>;
46
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldModule, never>;
47
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FormFieldModule, [typeof FormFieldComponent, typeof FormFieldStyleDirective], [typeof i2.CommonModule, typeof i3.MatFormFieldModule, typeof i4.ObserversModule], [typeof FormFieldComponent, typeof FormFieldStyleDirective, typeof i3.MatFormFieldModule]>;
48
+ static ɵinj: i0.ɵɵInjectorDeclaration<FormFieldModule>;
49
+ }
50
+
51
+ export { FormFieldComponent, FormFieldModule, FormFieldStyleDirective };