@bravura/ui 6.0.1 → 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.
Files changed (128) hide show
  1. package/CHANGELOG.md +15 -1
  2. package/README.md +1 -0
  3. package/alert/index.d.ts +126 -3
  4. package/alert/testing/index.d.ts +28 -5
  5. package/behavior/index.d.ts +231 -3
  6. package/clip-note/index.d.ts +125 -3
  7. package/common/index.d.ts +24 -3
  8. package/currency-input/index.d.ts +69 -3
  9. package/decimal-input/index.d.ts +39 -3
  10. package/discrete-input/index.d.ts +139 -3
  11. package/fesm2022/bravura-ui-alert.mjs +18 -21
  12. package/fesm2022/bravura-ui-alert.mjs.map +1 -1
  13. package/fesm2022/bravura-ui-behavior.mjs +18 -18
  14. package/fesm2022/bravura-ui-behavior.mjs.map +1 -1
  15. package/fesm2022/bravura-ui-clip-note.mjs +10 -10
  16. package/fesm2022/bravura-ui-clip-note.mjs.map +1 -1
  17. package/fesm2022/bravura-ui-common.mjs +5 -6
  18. package/fesm2022/bravura-ui-common.mjs.map +1 -1
  19. package/fesm2022/bravura-ui-currency-input.mjs +7 -7
  20. package/fesm2022/bravura-ui-currency-input.mjs.map +1 -1
  21. package/fesm2022/bravura-ui-decimal-input.mjs +7 -7
  22. package/fesm2022/bravura-ui-decimal-input.mjs.map +1 -1
  23. package/fesm2022/bravura-ui-discrete-input.mjs +14 -39
  24. package/fesm2022/bravura-ui-discrete-input.mjs.map +1 -1
  25. package/fesm2022/bravura-ui-file-upload.mjs +18 -18
  26. package/fesm2022/bravura-ui-file-upload.mjs.map +1 -1
  27. package/fesm2022/bravura-ui-form-field.mjs +10 -10
  28. package/fesm2022/bravura-ui-form-field.mjs.map +1 -1
  29. package/fesm2022/bravura-ui-icon-font.mjs +7 -7
  30. package/fesm2022/bravura-ui-icon-font.mjs.map +1 -1
  31. package/fesm2022/bravura-ui-panel.mjs +16 -16
  32. package/fesm2022/bravura-ui-panel.mjs.map +1 -1
  33. package/fesm2022/bravura-ui-phone-number.mjs +13 -13
  34. package/fesm2022/bravura-ui-phone-number.mjs.map +1 -1
  35. package/fesm2022/bravura-ui-radio-panel.mjs +12 -14
  36. package/fesm2022/bravura-ui-radio-panel.mjs.map +1 -1
  37. package/fesm2022/bravura-ui-selection-panel.mjs +11 -11
  38. package/fesm2022/bravura-ui-selection-panel.mjs.map +1 -1
  39. package/fesm2022/bravura-ui-skeletons.mjs +10 -10
  40. package/fesm2022/bravura-ui-skeletons.mjs.map +1 -1
  41. package/fesm2022/bravura-ui-stepper.mjs +18 -18
  42. package/fesm2022/bravura-ui-stepper.mjs.map +1 -1
  43. package/fesm2022/bravura-ui-tooltip.mjs +13 -13
  44. package/fesm2022/bravura-ui-tooltip.mjs.map +1 -1
  45. package/file-upload/index.d.ts +200 -3
  46. package/form-field/index.d.ts +49 -3
  47. package/icon-font/index.d.ts +79 -3
  48. package/index.d.ts +3 -5
  49. package/package.json +20 -20
  50. package/panel/index.d.ts +107 -3
  51. package/phone-number/index.d.ts +108 -3
  52. package/radio-panel/index.d.ts +71 -3
  53. package/radio-panel/testing/index.d.ts +32 -5
  54. package/selection-panel/index.d.ts +149 -3
  55. package/skeletons/index.d.ts +79 -3
  56. package/stepper/index.d.ts +106 -3
  57. package/tooltip/index.d.ts +83 -3
  58. package/alert/alert-container.component.d.ts +0 -71
  59. package/alert/alert-message.component.d.ts +0 -47
  60. package/alert/alert.module.d.ts +0 -14
  61. package/alert/public-api.d.ts +0 -1
  62. package/alert/testing/test-api.d.ts +0 -24
  63. package/behavior/await.directive.d.ts +0 -71
  64. package/behavior/behavior.module.d.ts +0 -17
  65. package/behavior/observe-content-class.directive.d.ts +0 -29
  66. package/behavior/public-api.d.ts +0 -5
  67. package/behavior/sizing-monitor.directive.d.ts +0 -23
  68. package/behavior/sizing.directive.d.ts +0 -98
  69. package/clip-note/clip-note.component.d.ts +0 -45
  70. package/clip-note/clip-note.directive.d.ts +0 -69
  71. package/clip-note/clip-note.module.d.ts +0 -19
  72. package/clip-note/public-api.d.ts +0 -1
  73. package/common/common-utils.d.ts +0 -11
  74. package/common/common.module.d.ts +0 -11
  75. package/common/public-api.d.ts +0 -2
  76. package/currency-input/currency-input.directive.d.ts +0 -62
  77. package/currency-input/currency-input.module.d.ts +0 -10
  78. package/currency-input/public-api.d.ts +0 -1
  79. package/decimal-input/decimal-input.directive.d.ts +0 -32
  80. package/decimal-input/decimal-input.module.d.ts +0 -10
  81. package/decimal-input/public-api.d.ts +0 -1
  82. package/discrete-input/discrete-input.component.d.ts +0 -141
  83. package/discrete-input/discrete-input.module.d.ts +0 -11
  84. package/discrete-input/public-api.d.ts +0 -2
  85. package/file-upload/file-upload.component.d.ts +0 -148
  86. package/file-upload/file-upload.module.d.ts +0 -14
  87. package/file-upload/file-upload.service.d.ts +0 -42
  88. package/file-upload/public-api.d.ts +0 -6
  89. package/form-field/form-field.component.d.ts +0 -39
  90. package/form-field/form-field.module.d.ts +0 -13
  91. package/form-field/public-api.d.ts +0 -2
  92. package/icon-font/icon-font.module.d.ts +0 -12
  93. package/icon-font/icon.directive.d.ts +0 -46
  94. package/icon-font/public-api.d.ts +0 -3
  95. package/icon-font/utilities.d.ts +0 -20
  96. package/panel/panel-section.component.d.ts +0 -15
  97. package/panel/panel.component.d.ts +0 -60
  98. package/panel/panel.module.d.ts +0 -16
  99. package/panel/public-api.d.ts +0 -1
  100. package/panel/tinted.directive.d.ts +0 -26
  101. package/phone-number/phone-number.directive.d.ts +0 -66
  102. package/phone-number/phone-number.module.d.ts +0 -17
  103. package/phone-number/phone-number.pipe.d.ts +0 -13
  104. package/phone-number/phone-number.validator.d.ts +0 -31
  105. package/phone-number/public-api.d.ts +0 -1
  106. package/public-api.d.ts +0 -1
  107. package/radio-panel/public-api.d.ts +0 -3
  108. package/radio-panel/radio-panel-item.component.d.ts +0 -22
  109. package/radio-panel/radio-panel.component.d.ts +0 -38
  110. package/radio-panel/radio-panel.module.d.ts +0 -15
  111. package/radio-panel/testing/test-api.d.ts +0 -27
  112. package/selection-panel/public-api.d.ts +0 -3
  113. package/selection-panel/selection-panel-item.component.d.ts +0 -77
  114. package/selection-panel/selection-panel.directive.d.ts +0 -67
  115. package/selection-panel/selection-panel.module.d.ts +0 -13
  116. package/skeletons/public-api.d.ts +0 -3
  117. package/skeletons/skeleton-loader-presets.directive.d.ts +0 -23
  118. package/skeletons/skeleton-loader.component.d.ts +0 -44
  119. package/skeletons/skeletons.module.d.ts +0 -16
  120. package/stepper/public-api.d.ts +0 -3
  121. package/stepper/step-label-top.directive.d.ts +0 -17
  122. package/stepper/stepper-animation.d.ts +0 -6
  123. package/stepper/stepper.component.d.ts +0 -75
  124. package/stepper/stepper.module.d.ts +0 -17
  125. package/tooltip/public-api.d.ts +0 -3
  126. package/tooltip/tooltip.component.d.ts +0 -26
  127. package/tooltip/tooltip.directive.d.ts +0 -48
  128. package/tooltip/tooltip.module.d.ts +0 -13
package/CHANGELOG.md CHANGED
@@ -1,8 +1,22 @@
1
1
  # Change history
2
2
 
3
+ ## 7.0.0 (2025-12-30)
4
+
5
+ * fix: published version to angular version ([70668b7](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/70668b7))
6
+ * build: angular upgrade ([475b99e](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/475b99e))
7
+
8
+
9
+ ### BREAKING CHANGE
10
+
11
+ * upgrade angular to 20
12
+
13
+ ## 6.1.0 (2025-12-30)
14
+
15
+ - feat: upgrade angular material to 19 ([b115af0](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/b115af0))
16
+
3
17
  ## <small>6.0.1 (2025-12-30)</small>
4
18
 
5
- * fix: add version mapping to angular version ([0262a77](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/0262a77))
19
+ - fix: add version mapping to angular version ([0262a77](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/0262a77))
6
20
 
7
21
  ## 6.0.0 (2025-12-30)
8
22
 
package/README.md CHANGED
@@ -8,6 +8,7 @@ This package contains a set of UI components built on top of [Angular Material l
8
8
 
9
9
  | BUI versions | Compatible Angular versions |
10
10
  | ------------ | --------------------------- |
11
+ | ^7.0.0 | 20 |
11
12
  | ^6.0.0 | 19 |
12
13
  | ^5.0.0 | 18 |
13
14
  | ^4.0.0 | 17 |
package/alert/index.d.ts CHANGED
@@ -1,5 +1,128 @@
1
+ import { AnimationEvent } from '@angular/animations';
2
+ import { ScrollDispatcher } from '@angular/cdk/scrolling';
3
+ import * as i0 from '@angular/core';
4
+ import { OnInit, OnDestroy, NgZone, ChangeDetectorRef, ElementRef, EventEmitter } from '@angular/core';
5
+ import { Subject } from 'rxjs';
6
+ import * as i3 from '@angular/common';
7
+ import * as i4 from '@bravura/ui/icon-font';
8
+ import * as i5 from '@angular/material/button';
9
+
10
+ /**@internal */
11
+ declare class InternalAlertOject {
12
+ readonly type: 'success' | 'info' | 'warn' | 'error';
13
+ readonly message: string;
14
+ id: string;
15
+ deleted: boolean;
16
+ constructor(type: 'success' | 'info' | 'warn' | 'error', message: string);
17
+ }
1
18
  /**
2
- * Generated bundle index. Do not edit.
19
+ * Use this component in a designated area of a page for displaying notification messages
20
+ *
3
21
  */
4
- /// <amd-module name="@bravura/ui/alert" />
5
- export * from './public-api';
22
+ declare class AlertContainerComponent implements OnInit, OnDestroy {
23
+ private zone;
24
+ private cdRef;
25
+ private _elementRef;
26
+ private scroll;
27
+ /** The maximum number of messages displayed in the container area. */
28
+ max: number;
29
+ /**
30
+ * This property determines the behavior for displaying the notifications when the container is outside the viewport.
31
+ *
32
+ * `scroll`: The component will try to scroll to reveal the new notifications.
33
+ * `float`: The component will float the alert panel to the center of the screen for a couple of seconds and move it back to the original position.
34
+ */
35
+ outsideViewportBehavior: 'scroll' | 'float';
36
+ /**
37
+ * The number of milliseconds for which the alert container will be floated when new notification arrives.
38
+ *
39
+ * This will only take effect when `outsideViewportBehavior` is set to `float` and the container is outside the viewport.
40
+ */
41
+ floatDuration: number;
42
+ /**@internal */
43
+ _alerts: InternalAlertOject[];
44
+ /**@internal */
45
+ _floated: boolean;
46
+ /**@internal */
47
+ _floatPanelHidden: boolean;
48
+ /** @ignore Emits whenever the animation is started. */
49
+ readonly _animationStarted: Subject<AnimationEvent>;
50
+ /** @ignore Emits whenever the animation is done. */
51
+ readonly _animationEnded: Subject<AnimationEvent>;
52
+ private _destroyed$;
53
+ private _endFloatingSub?;
54
+ /** Emits the component instance after initialisation. */
55
+ private init;
56
+ constructor(zone: NgZone, cdRef: ChangeDetectorRef, _elementRef: ElementRef<HTMLElement>, scroll: ScrollDispatcher);
57
+ ngOnInit(): void;
58
+ ngOnDestroy(): void;
59
+ /**@internal */
60
+ get _remaining(): InternalAlertOject[];
61
+ /**@internal */
62
+ get _width(): number;
63
+ /** Add a message to the notification area */
64
+ notify(type: 'success' | 'info' | 'warn' | 'error', message: string): Promise<void>;
65
+ /**@ignore */
66
+ _checkViewport(): Promise<void>;
67
+ /**@ignore */
68
+ _dismiss(a: InternalAlertOject): Promise<void>;
69
+ /** Remove all messages currently displayed. */
70
+ clear(): Promise<void>;
71
+ private _endFloating;
72
+ static ɵfac: i0.ɵɵFactoryDeclaration<AlertContainerComponent, never>;
73
+ static ɵcmp: i0.ɵɵComponentDeclaration<AlertContainerComponent, "bui-alert-container", never, { "max": { "alias": "max"; "required": false; }; "outsideViewportBehavior": { "alias": "outsideViewportBehavior"; "required": false; }; "floatDuration": { "alias": "floatDuration"; "required": false; }; }, { "init": "init"; }, never, never, false, never>;
74
+ }
75
+
76
+ /**
77
+ * An alert style message usually appears in a global notification area.
78
+ *
79
+ * The base color of the message is determined by the `type` of the message and a list of predefined
80
+ * CSS custom properties.
81
+ *
82
+ * ```scss
83
+ * --bui-color-success: #519602;
84
+ * --bui-color-info: #0dcaf0;
85
+ * --bui-color-warning: #ffc107;
86
+ * --bui-color-error: #dc3545;
87
+ * ```
88
+ *
89
+ *
90
+ */
91
+ declare class AlertMessageComponent implements OnInit {
92
+ /** @ignore */
93
+ static ngAcceptInputType_dismissible: boolean | string | null | undefined;
94
+ /** @ignore */
95
+ static ngAcceptInputType_blink: boolean | string | null | undefined;
96
+ /** The type of the message, used to derive the icon and base color. */
97
+ type: 'success' | 'info' | 'warn' | 'error';
98
+ /** The message to be displayed, HTML supported. */
99
+ message: string;
100
+ /** Specifies the ARIA live region politeness. */
101
+ politeness: 'off' | 'polite' | 'assertive';
102
+ /** Whether to display the button to fire the `dismissed` event. */
103
+ get dismissible(): any;
104
+ set dismissible(value: any);
105
+ /** To be emitted when the user choose to dismiss the message. The event object is the ID of the element. */
106
+ dismissed: EventEmitter<string>;
107
+ /** To be emitted when the component finishes initialisation. The event object is the ID of the element. */
108
+ initialised: EventEmitter<string>;
109
+ /** @ignore */
110
+ _id: string;
111
+ private _dismissible;
112
+ constructor();
113
+ ngOnInit(): void;
114
+ /** @ignore */
115
+ get iconName(): string;
116
+ /** @ignore */
117
+ _dismiss(): void;
118
+ static ɵfac: i0.ɵɵFactoryDeclaration<AlertMessageComponent, never>;
119
+ static ɵcmp: i0.ɵɵComponentDeclaration<AlertMessageComponent, "bui-alert", never, { "type": { "alias": "type"; "required": false; }; "message": { "alias": "message"; "required": false; }; "politeness": { "alias": "politeness"; "required": false; }; "dismissible": { "alias": "dismissible"; "required": false; }; "_id": { "alias": "id"; "required": false; }; }, { "dismissed": "dismissed"; "initialised": "initialised"; }, never, ["*"], false, never>;
120
+ }
121
+
122
+ declare class AlertModule {
123
+ static ɵfac: i0.ɵɵFactoryDeclaration<AlertModule, never>;
124
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AlertModule, [typeof AlertMessageComponent, typeof AlertContainerComponent], [typeof i3.CommonModule, typeof i4.IconFontModule, typeof i5.MatButtonModule], [typeof AlertMessageComponent, typeof AlertContainerComponent]>;
125
+ static ɵinj: i0.ɵɵInjectorDeclaration<AlertModule>;
126
+ }
127
+
128
+ export { AlertContainerComponent, AlertMessageComponent, AlertModule };
@@ -1,5 +1,28 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@bravura/ui/alert/testing" />
5
- export * from './test-api';
1
+ import { BaseHarnessFilters, ComponentHarness, ComponentHarnessConstructor, HarnessPredicate, TextOptions } from '@angular/cdk/testing';
2
+
3
+ interface AlertMessageHarnessFilters extends BaseHarnessFilters {
4
+ /** only select the alert with the content matching this regular expression */
5
+ content?: RegExp;
6
+ }
7
+ declare class AlertMessageHarness extends ComponentHarness {
8
+ static hostSelector: string;
9
+ private _getBackdrop;
10
+ private _getDeleteButton;
11
+ private _getContentDiv;
12
+ static with<T extends AlertMessageHarness>(this: ComponentHarnessConstructor<T>, options?: AlertMessageHarnessFilters): HarnessPredicate<T>;
13
+ getColor(): Promise<string>;
14
+ delete(): Promise<void>;
15
+ getContent(options?: TextOptions): Promise<string>;
16
+ private static filterByContent;
17
+ }
18
+ declare class AlertContainerHarness extends ComponentHarness {
19
+ static hostSelector: string;
20
+ private _items;
21
+ private _floatingFrame;
22
+ getAlertItem(content: RegExp): Promise<AlertMessageHarness | null>;
23
+ countAlertItems(): Promise<number>;
24
+ isFloated(): Promise<boolean>;
25
+ }
26
+
27
+ export { AlertContainerHarness, AlertMessageHarness };
28
+ export type { AlertMessageHarnessFilters };
@@ -1,5 +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
+
1
11
  /**
2
- * Generated bundle index. Do not edit.
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
+ * ```
3
25
  */
4
- /// <amd-module name="@bravura/ui/behavior" />
5
- export * from './public-api';
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,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
- * Generated bundle index. Do not edit.
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
- /// <amd-module name="@bravura/ui/clip-note" />
5
- export * from './public-api';
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
- * Generated bundle index. Do not edit.
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
- /// <amd-module name="@bravura/ui/common" />
5
- export * from './public-api';
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 };