@ieeesa-npm/presentation 0.12.1 → 0.12.3

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.
@@ -33,6 +33,11 @@ export declare class ChipsComponent implements OnInit, OnDestroy {
33
33
  ok: string;
34
34
  add: string;
35
35
  };
36
+ modalConfig: {
37
+ ariaLabel: string;
38
+ autoFocus: string;
39
+ width: string;
40
+ };
36
41
  chips: {
37
42
  noOfDefaultVisibleChips: number;
38
43
  label: {
@@ -94,6 +99,11 @@ export declare class ChipsComponent implements OnInit, OnDestroy {
94
99
  clearAll: string;
95
100
  };
96
101
  buttons: {
102
+ /**
103
+ * Onclick the chip, it emits selectedChip event with selected chip.
104
+ * @param {ChipOption} chip
105
+ * @memberof ChipComponent
106
+ */
97
107
  id: number;
98
108
  iconURL: string;
99
109
  toolTip: string;
@@ -139,10 +149,7 @@ export declare class ChipsComponent implements OnInit, OnDestroy {
139
149
  logo: string;
140
150
  };
141
151
  links: {
142
- label: string; /**
143
- * Sets the isViewMoreNeeded value based on hasViewMore and isMobileView values.
144
- * @memberof ChipsComponent
145
- */
152
+ label: string;
146
153
  ariaLabel: string;
147
154
  redirectUrl: string;
148
155
  }[];
@@ -1,27 +1,52 @@
1
- import { ComponentRef, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
1
+ import { ComponentRef, EventEmitter, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
2
+ import { MatTabChangeEvent, MatTabGroup } from '@angular/material/tabs';
2
3
  import { Tab } from '../../models/tab.model';
4
+ import { MatDialog } from '@angular/material/dialog';
5
+ import { ConfirmationModalData } from '../../models/confirmation-modal-data.model';
6
+ import { Subject } from 'rxjs';
7
+ import { FormGroup } from '@angular/forms';
3
8
  import * as i0 from "@angular/core";
4
9
  export declare class TabsComponent implements OnInit, OnDestroy {
10
+ dialog: MatDialog;
5
11
  componentContainer: ViewContainerRef;
6
12
  componentRef: ComponentRef<any>;
7
13
  isComponentLoaded: boolean;
14
+ previousTabIndex: number;
15
+ private isFormValuesChanged;
8
16
  selectedTabIndex: number;
9
17
  private _tabs;
10
18
  set tabs(tab: Tab[]);
11
19
  get tabs(): Tab[];
20
+ set isFormChanged(status: boolean);
21
+ get isFormChanged(): boolean;
22
+ confirmationModalConfig: ConfirmationModalData;
23
+ selectedIndexChange: EventEmitter<MatTabChangeEvent>;
24
+ destroy$: Subject<boolean>;
25
+ formCancel: EventEmitter<any>;
26
+ formSubmit: EventEmitter<FormGroup<any>[]>;
27
+ constants: any;
28
+ modalConfigTexts: any;
29
+ constructor(dialog: MatDialog);
12
30
  /**
13
- * Verifies tabs count and calls createComponent() to load selected component
31
+ * Verifies tabs count and calls createComponent() to load selected component.
14
32
  * @memberof TabsComponent
15
33
  */
16
34
  ngOnInit(): void;
35
+ /**
36
+ * Opens confirmation modal on tab change event when leaving with unsaved changes.
37
+ * @param {MatTabGroup} tab
38
+ * @param event
39
+ * @memberof TabsComponent
40
+ */
41
+ onTabChange(tab: MatTabGroup, event: MatTabChangeEvent): void;
17
42
  /**
18
43
  * Loads the respective component on tab change event when componentRef is available.
19
- * @param {number} index
44
+ * @param {MatTabChangeEvent} event
20
45
  * @memberof TabsComponent
21
46
  */
22
- onTabChange(index: number): void;
47
+ loadSelectedTabContent(event: MatTabChangeEvent): void;
23
48
  /**
24
- * Dynamically loads the component in the DOM container based on the passed tab and clears the previously loaded component before loading the new one
49
+ * Dynamically loads the component in the DOM container based on the passed tab and clears the previously loaded component before loading the new one.
25
50
  * @param {Tab} tab
26
51
  * @memberof TabsComponent
27
52
  */
@@ -40,5 +65,5 @@ export declare class TabsComponent implements OnInit, OnDestroy {
40
65
  */
41
66
  ngOnDestroy(): void;
42
67
  static ɵfac: i0.ɵɵFactoryDeclaration<TabsComponent, never>;
43
- static ɵcmp: i0.ɵɵComponentDeclaration<TabsComponent, "ieeesa-tabs", never, { "selectedTabIndex": { "alias": "selectedTabIndex"; "required": false; }; "tabs": { "alias": "tabs"; "required": false; }; }, {}, never, never, true, never>;
68
+ static ɵcmp: i0.ɵɵComponentDeclaration<TabsComponent, "ieeesa-tabs", never, { "selectedTabIndex": { "alias": "selectedTabIndex"; "required": false; }; "tabs": { "alias": "tabs"; "required": false; }; "isFormChanged": { "alias": "isFormChanged"; "required": false; }; "confirmationModalConfig": { "alias": "confirmationModalConfig"; "required": false; }; }, { "selectedIndexChange": "selectedIndexChange"; }, never, never, true, never>;
44
69
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ieeesa-npm/presentation",
3
- "version": "0.12.1",
3
+ "version": "0.12.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.1.0",
6
6
  "@angular/core": "^16.1.0",
@@ -14,6 +14,11 @@
14
14
  "ok": "OK",
15
15
  "add": "Add"
16
16
  },
17
+ "modalConfig": {
18
+ "ariaLabel": "Alert",
19
+ "autoFocus": "dialog",
20
+ "width": "25%"
21
+ },
17
22
  "chips": {
18
23
  "noOfDefaultVisibleChips": 3,
19
24
  "label": {