@byuhbll/components 4.4.0 → 4.4.2-beta-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,36 @@
1
1
  import { EventEmitter, SimpleChanges, OnInit, OnChanges, OnDestroy } from '@angular/core';
2
- import { Status } from '../status-button/status-button.component';
2
+ import { Status, StatusButtonInputs } from '../status-button/status-button.component';
3
3
  import * as i0 from "@angular/core";
4
4
  export type SnackbarPurpose = 'default' | 'info' | 'success' | 'error' | 'warning';
5
+ export interface SnackbarInputs {
6
+ purpose?: SnackbarPurpose;
7
+ title?: string;
8
+ description?: string;
9
+ titleIcon?: string;
10
+ fieldPlaceholder?: string;
11
+ showTitle?: boolean;
12
+ showTitleIcon?: boolean;
13
+ titleIconFilled?: boolean;
14
+ showClose?: boolean;
15
+ showProgressBar?: boolean;
16
+ showField?: boolean;
17
+ showButton?: boolean;
18
+ progressMs?: number;
19
+ autoDismiss?: boolean;
20
+ y?: number;
21
+ right?: number;
22
+ zIndex?: number;
23
+ statusButtonInputs?: StatusButtonInputs;
24
+ }
5
25
  export declare class SnackbarComponent implements OnInit, OnChanges, OnDestroy {
6
26
  purpose: SnackbarPurpose;
7
27
  title: string;
8
28
  description: string;
9
29
  fieldPlaceholder: string;
10
30
  titleIcon: string;
11
- buttonLabel: string;
12
31
  showTitle: boolean;
13
32
  showTitleIcon: boolean;
33
+ titleIconFilled: boolean;
14
34
  showClose: boolean;
15
35
  showProgressBar: boolean;
16
36
  showField: boolean;
@@ -19,22 +39,25 @@ export declare class SnackbarComponent implements OnInit, OnChanges, OnDestroy {
19
39
  visible: boolean;
20
40
  progressMs: number;
21
41
  y: number;
42
+ statusButtonInputs?: StatusButtonInputs;
22
43
  closed: EventEmitter<void>;
23
44
  visibleChange: EventEmitter<boolean>;
45
+ buttonClicked: EventEmitter<void>;
24
46
  isOpen: boolean;
25
47
  private dismissTimer?;
26
48
  private readonly EXIT_MS;
27
49
  ngOnInit(): void;
28
50
  ngOnChanges(changes: SimpleChanges): void;
29
51
  ngOnDestroy(): void;
30
- close(): void;
52
+ close(emitButtonClicked?: boolean): void;
31
53
  get status(): Status;
32
54
  private startDismissTimer;
33
55
  private clearDismissTimer;
34
56
  static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarComponent, never>;
35
- static ɵcmp: i0.ɵɵComponentDeclaration<SnackbarComponent, "lib-snackbar", never, { "purpose": { "alias": "purpose"; "required": false; }; "title": { "alias": "title"; "required": false; }; "description": { "alias": "description"; "required": false; }; "fieldPlaceholder": { "alias": "fieldPlaceholder"; "required": false; }; "titleIcon": { "alias": "titleIcon"; "required": false; }; "buttonLabel": { "alias": "buttonLabel"; "required": false; }; "showTitle": { "alias": "showTitle"; "required": false; }; "showTitleIcon": { "alias": "showTitleIcon"; "required": false; }; "showClose": { "alias": "showClose"; "required": false; }; "showProgressBar": { "alias": "showProgressBar"; "required": false; }; "showField": { "alias": "showField"; "required": false; }; "showButton": { "alias": "showButton"; "required": false; }; "autoDismiss": { "alias": "autoDismiss"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "progressMs": { "alias": "progressMs"; "required": false; }; "y": { "alias": "y"; "required": false; }; }, { "closed": "closed"; "visibleChange": "visibleChange"; }, never, never, true, never>;
57
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnackbarComponent, "lib-snackbar", never, { "purpose": { "alias": "purpose"; "required": false; }; "title": { "alias": "title"; "required": false; }; "description": { "alias": "description"; "required": false; }; "fieldPlaceholder": { "alias": "fieldPlaceholder"; "required": false; }; "titleIcon": { "alias": "titleIcon"; "required": false; }; "showTitle": { "alias": "showTitle"; "required": false; }; "showTitleIcon": { "alias": "showTitleIcon"; "required": false; }; "titleIconFilled": { "alias": "titleIconFilled"; "required": false; }; "showClose": { "alias": "showClose"; "required": false; }; "showProgressBar": { "alias": "showProgressBar"; "required": false; }; "showField": { "alias": "showField"; "required": false; }; "showButton": { "alias": "showButton"; "required": false; }; "autoDismiss": { "alias": "autoDismiss"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "progressMs": { "alias": "progressMs"; "required": false; }; "y": { "alias": "y"; "required": false; }; "statusButtonInputs": { "alias": "statusButtonInputs"; "required": false; }; }, { "closed": "closed"; "visibleChange": "visibleChange"; "buttonClicked": "buttonClicked"; }, never, never, true, never>;
36
58
  static ngAcceptInputType_showTitle: unknown;
37
59
  static ngAcceptInputType_showTitleIcon: unknown;
60
+ static ngAcceptInputType_titleIconFilled: unknown;
38
61
  static ngAcceptInputType_showClose: unknown;
39
62
  static ngAcceptInputType_showProgressBar: unknown;
40
63
  static ngAcceptInputType_showField: unknown;
@@ -1,36 +1,19 @@
1
1
  import { ApplicationRef, EnvironmentInjector } from '@angular/core';
2
- import { SnackbarPurpose } from './snackbar.component';
2
+ import { SnackbarInputs } from './snackbar.component';
3
3
  import * as i0 from "@angular/core";
4
- export interface SnackbarOptions {
5
- purpose?: SnackbarPurpose;
6
- title?: string;
7
- description?: string;
8
- titleIcon?: string;
9
- fieldPlaceholder?: string;
10
- showTitle?: boolean;
11
- showTitleIcon?: boolean;
12
- showClose?: boolean;
13
- showProgressBar?: boolean;
14
- showField?: boolean;
15
- showButton?: boolean;
16
- progressMs?: number;
17
- autoDismiss?: boolean;
18
- y?: number;
19
- right?: number;
20
- zIndex?: number;
21
- }
22
4
  export declare class SnackbarService {
23
5
  private appRef;
24
6
  private env;
25
7
  constructor(appRef: ApplicationRef, env: EnvironmentInjector);
26
8
  /**
27
9
  * This open method is what consuming code will use to create a snackbar
28
- * @param snackbarOptions interface found above
10
+ * @param snackbarOptions interface
29
11
  * @param anchor HTML Element, optional. The snackbar's entrance and exit animations will happen on this element's Y axis (px)
30
12
  * @returns void.
31
13
  */
32
- open(snackbarOptions?: SnackbarOptions, anchor?: HTMLElement): {
14
+ open(snackbarOptions?: SnackbarInputs, anchor?: HTMLElement): {
33
15
  close: () => void;
16
+ buttonClicked: import("@angular/core").EventEmitter<void>;
34
17
  };
35
18
  static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarService, never>;
36
19
  static ɵprov: i0.ɵɵInjectableDeclaration<SnackbarService>;
@@ -1,5 +1,14 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export type Status = 'success' | 'info' | 'warning' | 'error' | 'disabled';
3
+ export interface StatusButtonInputs {
4
+ label: string;
5
+ status?: Status;
6
+ leftIcon?: string;
7
+ rightIcon?: string;
8
+ hideLeftIcon?: boolean;
9
+ hideRightIcon?: boolean;
10
+ clearVariant?: boolean;
11
+ }
3
12
  /**
4
13
  * A button that indicates status with color and icon.
5
14
  * Status can be one of: 'success', 'info', 'warning', 'error', or 'disabled'.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byuhbll/components",
3
- "version": "4.4.0",
3
+ "version": "4.4.2-beta-1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.0.0",
6
6
  "@angular/core": "^18.0.0"