@ieeesa-npm/presentation 0.0.9 → 0.1.2

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.
@@ -0,0 +1,34 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { FooterConfig, FooterLink } from '../../models/footer-config.model';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Implements & displays copyright information and IEEE quick access links.
6
+ * @class FooterComponent
7
+ * @implements {OnInit}
8
+ */
9
+ export declare class FooterComponent implements OnInit {
10
+ /**
11
+ * Input property to get the configuration information of footer copyright text and quick access links.
12
+ * @type {FooterConfig}
13
+ * @memberof FooterComponent
14
+ */
15
+ footerConfig: FooterConfig;
16
+ screenTexts: any;
17
+ currentYear: number;
18
+ /**
19
+ * Initializes the component with default values if not provided.
20
+ * @return -returns nothing
21
+ * @memberof FooterComponent
22
+ */
23
+ ngOnInit(): void;
24
+ /**
25
+ * TrackByFunction is called for each item in the collection and return a unique identifier for that item.
26
+ * @param {number} index -The index of the current item in the collection.
27
+ * @param {FooterLink} link -Link object with required properties.
28
+ * @return {string} -returns link label as an unique identifier.
29
+ * @memberof FooterComponent
30
+ */
31
+ trackByFunc(index: number, link: FooterLink): string;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<FooterComponent, never>;
33
+ static ɵcmp: i0.ɵɵComponentDeclaration<FooterComponent, "ieeesa-footer", never, { "footerConfig": { "alias": "footerConfig"; "required": false; }; }, {}, never, never, true, never>;
34
+ }
@@ -0,0 +1,37 @@
1
+ import { OnDestroy } from '@angular/core';
2
+ import { HeaderConfig } from '../../models/header-config.model';
3
+ import { Router } from '@angular/router';
4
+ import { BreakpointObserver } from '@angular/cdk/layout';
5
+ import { Subject } from 'rxjs';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Implements & displays application logo, title, signed in user information, sign-out link, and hamburger link for mobile view.
9
+ * @class HeaderComponent
10
+ */
11
+ export declare class HeaderComponent implements OnDestroy {
12
+ private router;
13
+ private breakpointObserver;
14
+ /**
15
+ * HeaderConfig represents the configurable properties required for header component.
16
+ * Input property of the component to get the configurable values such as logo, app title, signed in user name and logout redirect URL.
17
+ * @type {HeaderConfig}
18
+ * @memberof HeaderComponent
19
+ */
20
+ headerConfig: HeaderConfig;
21
+ destroy$: Subject<boolean>;
22
+ screenTexts: any;
23
+ isMobileView: boolean;
24
+ constructor(router: Router, breakpointObserver: BreakpointObserver);
25
+ /**
26
+ * Desktop event to navigate to logout page.
27
+ * @memberof HeaderComponent
28
+ */
29
+ logout(): void;
30
+ /**
31
+ * Cleans up resources when the component is destroyed.
32
+ * @memberof HeaderComponent
33
+ */
34
+ ngOnDestroy(): void;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<HeaderComponent, never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<HeaderComponent, "ieeesa-header", never, { "headerConfig": { "alias": "headerConfig"; "required": false; }; }, {}, never, never, true, never>;
37
+ }
@@ -0,0 +1,61 @@
1
+ import { ComponentRef, EventEmitter, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
2
+ import { MatDialogRef } from '@angular/material/dialog';
3
+ import { ModalType } from '@ieeesa-npm/feature';
4
+ import { ToggleButton } from '../../models/toggle-button.model';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * This component encapsulates the functionality of a modal dialog and implements reusable contents part of the modal components such as text content, loading another component into the modal and emitting modal events to consumed component.
8
+ * It utilizes Angular Material's MatDialog module to display the modal dialog.
9
+ * @usageNotes -Pass ModalComponent and data options as parameters to MatDialog open method as given below
10
+ this.dialog.open(ConfirmationDialogComponent, {data: {}})
11
+ * @class ModalComponent
12
+ */
13
+ export declare class ModalComponent implements OnInit, OnDestroy {
14
+ dialogRef: MatDialogRef<ModalComponent>;
15
+ modalData: any;
16
+ componentContainer: ViewContainerRef;
17
+ componentRef: ComponentRef<any>;
18
+ toggleButtonClicked: EventEmitter<any>;
19
+ isComponentLoaded: boolean;
20
+ heading: string;
21
+ subHeading: string;
22
+ promptMessage: string;
23
+ leftButtonLabel: string;
24
+ rightButtonLabel: string;
25
+ toggleButtons: ToggleButton[];
26
+ componentReference: any;
27
+ modalType: ModalType;
28
+ isCloseNeeded: boolean;
29
+ modalConfirm: EventEmitter<any>;
30
+ constructor(dialogRef: MatDialogRef<ModalComponent>, modalData: any);
31
+ /**
32
+ * Initializes the component.
33
+ * @return -returns nothing
34
+ */
35
+ ngOnInit(): void;
36
+ /**
37
+ * Emit onToggleButtonClicked event when a toggle button is selected.
38
+ * @param {ToggleButton} selected -Selected toggle button object.
39
+ */
40
+ onToggleButtonSelect(selected: ToggleButton): void;
41
+ /**
42
+ * Loads the component into the view container.
43
+ */
44
+ loadComponent(): void;
45
+ /**
46
+ * Handles the confirmation event.
47
+ * @param {boolean} value - The confirmation value.
48
+ */
49
+ onConfirm(value: boolean): void;
50
+ /**
51
+ * Returns dialog type
52
+ * @return {number} value-Dialog type enum
53
+ */
54
+ getModalType(): boolean;
55
+ /**
56
+ * Cleans up resources when the component is destroyed.
57
+ */
58
+ ngOnDestroy(): void;
59
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent, never>;
60
+ static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent, "ieeesa-modal", never, {}, {}, never, never, true, never>;
61
+ }
@@ -0,0 +1,38 @@
1
+ import { ChangeDetectorRef, OnDestroy } from '@angular/core';
2
+ import { MediaMatcher } from '@angular/cdk/layout';
3
+ import { SideMenuItem } from '../../models/navigation-menu.model';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * The component accepts menu items data as configurable input parameter and the menus are populated based on it.
7
+ * The component checks the defined mobile device resolution and accordingly updates the side navigation menu view.
8
+ * The component accepts menu opened/closed state as an input parameter. By default, the side menu is configured to open state.
9
+ * @export
10
+ * @class NavigationMenuComponent
11
+ * @implements {OnDestroy}
12
+ */
13
+ export declare class NavigationMenuComponent implements OnDestroy {
14
+ changeDetectorRef: ChangeDetectorRef;
15
+ media: MediaMatcher;
16
+ isMenuOpen: boolean;
17
+ SideMenu: SideMenuItem[];
18
+ mobileQuery: MediaQueryList;
19
+ mobileQueryListener: () => void;
20
+ constructor(changeDetectorRef: ChangeDetectorRef, media: MediaMatcher);
21
+ /**
22
+ * Takes the index and the current item as arguments and needs to return the unique identifier for this item.
23
+ * @param {number} index
24
+ * @param {array} menuItems
25
+ * @return {number}
26
+ * @memberof NavigationMenuComponent
27
+ */
28
+ trackByFn(index: number, menuItems: any): number;
29
+ /**
30
+ * This method returns the status for menu to be opened or closed by default, basis on device resolution
31
+ * @return {boolean}
32
+ * @memberof NavigationMenuComponent
33
+ */
34
+ isMenuOpened(): boolean;
35
+ ngOnDestroy(): void;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<NavigationMenuComponent, never>;
37
+ static ɵcmp: i0.ɵɵComponentDeclaration<NavigationMenuComponent, "ieeesa-navigation-menu", never, { "isMenuOpen": { "alias": "isMenuOpen"; "required": false; }; "SideMenu": { "alias": "SideMenu"; "required": false; }; }, {}, never, never, true, never>;
38
+ }
@@ -0,0 +1,47 @@
1
+ import { EventEmitter, OnInit } from "@angular/core";
2
+ import { ToggleButton } from "../../models/toggle-button.model";
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * ToggleButtonComponent allows users to select toggle between group of buttons.
6
+ * The component takes an array of ToggleButton objects as an input, where each object contains id, label and isDisabled property. Default the first button is selected when selectedLabel is not provided.
7
+ * @class ToggleButtonComponent
8
+ * @implements {OnInit}
9
+ */
10
+ export declare class ToggleButtonComponent implements OnInit {
11
+ /**
12
+ * Label of the selected button. Default is an empty string.
13
+ * @type {string}
14
+ */
15
+ selectedLabel: string;
16
+ /**
17
+ * An array of ToggleButton objects that represent the buttons in the toggle group.
18
+ * Each ToggleButton object must have properties: id, label, and isDisabled.
19
+ * @type {ToggleButton[]}
20
+ */
21
+ buttons: ToggleButton[];
22
+ /**
23
+ * Event emitter that emits the selected ToggleButton object when a button is clicked.
24
+ * @type {EventEmitter<ToggleButton>}
25
+ */
26
+ toggleSelected: EventEmitter<ToggleButton>;
27
+ /**
28
+ * By default, the first button in a group is selected when selectedLabel is not provided.
29
+ * @return -returns nothing
30
+ */
31
+ ngOnInit(): void;
32
+ /**
33
+ * Updates the selectedLabel with the clicked button label and emits the toggleSelected event with the selected ToggleButton object.
34
+ * @param {ToggleButton} button -Selected ToggleButton object.
35
+ * @return -returns nothing
36
+ */
37
+ toggleButtonClicked(button: ToggleButton): void;
38
+ /**
39
+ * TrackByFunction is called for each item in the collection and return a unique identifier for that item.
40
+ * @param {number} index -The index of the current item in the collection.
41
+ * @param {ToggleButton} button -The current button object from the collection being iterated.
42
+ * @return {number} -returns number
43
+ */
44
+ trackByFn(index: number, button: ToggleButton): number;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<ToggleButtonComponent, never>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<ToggleButtonComponent, "ieeesa-toggle-button", never, { "selectedLabel": { "alias": "selectedLabel"; "required": false; }; "buttons": { "alias": "buttons"; "required": false; }; }, { "toggleSelected": "toggleSelected"; }, never, never, true, never>;
47
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ieeesa-npm/presentation",
3
- "version": "0.0.9",
3
+ "version": "0.1.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.1.0",
6
6
  "@angular/core": "^16.1.0",
@@ -18,8 +18,7 @@
18
18
  "moment": "^2.29.4",
19
19
  "rxjs": "~7.8.0",
20
20
  "zone.js": "~0.13.0",
21
- "@ieeesa-npm/shared-styles": "^0.0.1",
22
- "@ieeesa-npm/utility": "^0.0.1"
21
+ "@ieeesa-npm/shared-styles": "^0.0.2"
23
22
  },
24
23
  "dependencies": {
25
24
  "tslib": "^2.3.0"
package/public-api.d.ts CHANGED
@@ -11,6 +11,11 @@ export * from './lib/components/search/search.component';
11
11
  export * from './lib/components/date-picker/date-picker.component';
12
12
  export * from './lib/components/date-picker-header/date-picker-header.component';
13
13
  export * from './lib/components/select/select.component';
14
+ export * from './lib/components/header/header.component';
15
+ export * from './lib/components/footer/footer.component';
16
+ export * from './lib/components/navigation-menu/navigation-menu.component';
17
+ export * from './lib/components/modal/modal.component';
18
+ export * from './lib/components/toggle-button/toggle-button.component';
14
19
  export * from './lib/directives/dynamic-form-field/dynamic-form-field.directive';
15
20
  export * from './lib/models/field-config.model';
16
21
  export * from './lib/models/form-field.model';