@ieeesa-npm/presentation 0.31.0 → 0.31.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.
- package/esm2022/lib/components/export-format-popover/export-format-popover.component.mjs +206 -0
- package/esm2022/lib/components/export-success-dialog/export-success-dialog.component.mjs +39 -0
- package/esm2022/lib/components/modal-info/modal-info.component.mjs +41 -0
- package/esm2022/lib/components/policy-confirmation-dialog/policy-confirmation-dialog.component.mjs +58 -0
- package/esm2022/lib/models/export-format-popover.model.mjs +10 -0
- package/esm2022/lib/models/export-success-dialog.model.mjs +2 -0
- package/esm2022/lib/models/policy-confirmation-dialog.model.mjs +2 -0
- package/esm2022/public-api.mjs +8 -1
- package/fesm2022/ieeesa-npm-presentation.mjs +331 -1
- package/fesm2022/ieeesa-npm-presentation.mjs.map +1 -1
- package/lib/components/export-format-popover/export-format-popover.component.d.ts +91 -0
- package/lib/components/export-success-dialog/export-success-dialog.component.d.ts +24 -0
- package/lib/components/modal-info/modal-info.component.d.ts +23 -0
- package/lib/components/policy-confirmation-dialog/policy-confirmation-dialog.component.d.ts +36 -0
- package/lib/models/export-format-popover.model.d.ts +15 -0
- package/lib/models/export-success-dialog.model.d.ts +8 -0
- package/lib/models/policy-confirmation-dialog.model.d.ts +9 -0
- package/package.json +1 -1
- package/public-api.d.ts +8 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { Overlay, OverlayPositionBuilder } from '@angular/cdk/overlay';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import { ExportFormat, ExportFormatOption } from '../../models/export-format-popover.model';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* ExportFormatPopoverComponent renders a CDK Overlay popover anchored below
|
|
8
|
+
* a trigger element, presenting format selection cards (CSV / Excel).
|
|
9
|
+
* The popover supports keyboard navigation (Tab between options, Enter to select,
|
|
10
|
+
* Escape to close) and emits the selected format or a close event.
|
|
11
|
+
*
|
|
12
|
+
* @export
|
|
13
|
+
* @class ExportFormatPopoverComponent
|
|
14
|
+
* @implements {OnInit}
|
|
15
|
+
* @implements {OnChanges}
|
|
16
|
+
* @implements {OnDestroy}
|
|
17
|
+
*/
|
|
18
|
+
export declare class ExportFormatPopoverComponent implements OnInit, OnChanges, OnDestroy {
|
|
19
|
+
private overlay;
|
|
20
|
+
private overlayPositionBuilder;
|
|
21
|
+
private viewContainerRef;
|
|
22
|
+
/** Array of format options to display in the popover */
|
|
23
|
+
formatOptions: ExportFormatOption[];
|
|
24
|
+
/** The element the popover attaches to (anchor point) */
|
|
25
|
+
origin: ElementRef;
|
|
26
|
+
/** Controls overlay visibility */
|
|
27
|
+
isOpen: boolean;
|
|
28
|
+
/** Title text displayed at the top of the popover */
|
|
29
|
+
popoverTitle: string;
|
|
30
|
+
/** Subtitle map for format options (keyed by ExportFormat value) */
|
|
31
|
+
formatSubtitles: Record<string, string>;
|
|
32
|
+
/** Tracks the currently selected format for visual highlight */
|
|
33
|
+
selectedFormat: ExportFormat | null;
|
|
34
|
+
/** Emits when user selects a format */
|
|
35
|
+
formatSelected: EventEmitter<ExportFormat>;
|
|
36
|
+
/** Emits when popover closes without selection */
|
|
37
|
+
closed: EventEmitter<void>;
|
|
38
|
+
popoverTemplate: TemplateRef<unknown>;
|
|
39
|
+
private overlayRef;
|
|
40
|
+
private portal;
|
|
41
|
+
destroy$: Subject<boolean>;
|
|
42
|
+
constructor(overlay: Overlay, overlayPositionBuilder: OverlayPositionBuilder, viewContainerRef: ViewContainerRef);
|
|
43
|
+
/**
|
|
44
|
+
* Lifecycle hook — initial setup.
|
|
45
|
+
* @memberof ExportFormatPopoverComponent
|
|
46
|
+
*/
|
|
47
|
+
ngOnInit(): void;
|
|
48
|
+
/**
|
|
49
|
+
* Responds to input changes — opens or closes the overlay when `isOpen` changes.
|
|
50
|
+
* @param {SimpleChanges} changes
|
|
51
|
+
* @memberof ExportFormatPopoverComponent
|
|
52
|
+
*/
|
|
53
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
54
|
+
/**
|
|
55
|
+
* Creates and opens the CDK overlay positioned below the origin element.
|
|
56
|
+
* @memberof ExportFormatPopoverComponent
|
|
57
|
+
*/
|
|
58
|
+
private openOverlay;
|
|
59
|
+
/**
|
|
60
|
+
* Detaches and disposes the overlay.
|
|
61
|
+
* @memberof ExportFormatPopoverComponent
|
|
62
|
+
*/
|
|
63
|
+
private closeOverlay;
|
|
64
|
+
/**
|
|
65
|
+
* Closes the popover and emits the `closed` event.
|
|
66
|
+
* @memberof ExportFormatPopoverComponent
|
|
67
|
+
*/
|
|
68
|
+
private close;
|
|
69
|
+
/**
|
|
70
|
+
* Handles format option selection via click or Enter key.
|
|
71
|
+
* Emits the selected format and closes the overlay.
|
|
72
|
+
* @param {ExportFormat} format - The selected export format value
|
|
73
|
+
* @memberof ExportFormatPopoverComponent
|
|
74
|
+
*/
|
|
75
|
+
onFormatSelect(format: ExportFormat): void;
|
|
76
|
+
/**
|
|
77
|
+
* TrackBy function for *ngFor on format options.
|
|
78
|
+
* @param {number} index
|
|
79
|
+
* @param {ExportFormatOption} option
|
|
80
|
+
* @return {string}
|
|
81
|
+
* @memberof ExportFormatPopoverComponent
|
|
82
|
+
*/
|
|
83
|
+
trackByFormat(index: number, option: ExportFormatOption): string;
|
|
84
|
+
/**
|
|
85
|
+
* Cleans up overlay and subscriptions on component destroy.
|
|
86
|
+
* @memberof ExportFormatPopoverComponent
|
|
87
|
+
*/
|
|
88
|
+
ngOnDestroy(): void;
|
|
89
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExportFormatPopoverComponent, never>;
|
|
90
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ExportFormatPopoverComponent, "ieeesa-export-format-popover", never, { "formatOptions": { "alias": "formatOptions"; "required": false; }; "origin": { "alias": "origin"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; "popoverTitle": { "alias": "popoverTitle"; "required": false; }; "formatSubtitles": { "alias": "formatSubtitles"; "required": false; }; }, { "formatSelected": "formatSelected"; "closed": "closed"; }, never, never, true, never>;
|
|
91
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
+
import { ExportSuccessDialogData } from '../../models/export-success-dialog.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* ExportSuccessDialogComponent displays a centered success message after
|
|
6
|
+
* a file export completes. Shows the filename in bold and a single "Close" button.
|
|
7
|
+
*
|
|
8
|
+
* Opens via `MatDialog.open(ExportSuccessDialogComponent, { data: ExportSuccessDialogData })`.
|
|
9
|
+
*
|
|
10
|
+
* @export
|
|
11
|
+
* @class ExportSuccessDialogComponent
|
|
12
|
+
*/
|
|
13
|
+
export declare class ExportSuccessDialogComponent {
|
|
14
|
+
data: ExportSuccessDialogData;
|
|
15
|
+
private dialogRef;
|
|
16
|
+
constructor(data: ExportSuccessDialogData, dialogRef: MatDialogRef<ExportSuccessDialogComponent>);
|
|
17
|
+
/**
|
|
18
|
+
* Handles the Close button click — closes the dialog.
|
|
19
|
+
* @memberof ExportSuccessDialogComponent
|
|
20
|
+
*/
|
|
21
|
+
onClose(): void;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExportSuccessDialogComponent, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ExportSuccessDialogComponent, "ieeesa-export-success-dialog", never, {}, {}, never, never, true, never>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
+
import { InfoModalData } from '@ieeesa-npm/models';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* ModalInfoComponent is a simple informational dialog that displays a centered message
|
|
6
|
+
* with a single dismissal button.
|
|
7
|
+
*
|
|
8
|
+
* @usageNotes - Pass ModalInfoComponent and data options as parameters to MatDialog open method:
|
|
9
|
+
* this.dialog.open(ModalInfoComponent, { data: { message: '...', buttonLabel: 'OK' } })
|
|
10
|
+
* @class ModalInfoComponent
|
|
11
|
+
*/
|
|
12
|
+
export declare class ModalInfoComponent {
|
|
13
|
+
data: InfoModalData;
|
|
14
|
+
private dialogRef;
|
|
15
|
+
constructor(data: InfoModalData, dialogRef: MatDialogRef<ModalInfoComponent>);
|
|
16
|
+
/**
|
|
17
|
+
* Closes the info dialog.
|
|
18
|
+
* @memberof ModalInfoComponent
|
|
19
|
+
*/
|
|
20
|
+
onClose(): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ModalInfoComponent, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ModalInfoComponent, "ieeesa-modal-info", never, {}, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
+
import { PolicyConfirmationDialogData } from '../../models/policy-confirmation-dialog.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* PolicyConfirmationDialogComponent is a reusable confirmation dialog that displays
|
|
6
|
+
* a configurable title, body text, and Cancel/Confirm action buttons.
|
|
7
|
+
* Used for the IEEE Data Access and Use Policy confirmation in the attendance export flow.
|
|
8
|
+
*
|
|
9
|
+
* Opens via `MatDialog.open(PolicyConfirmationDialogComponent, { data: PolicyConfirmationDialogData })`.
|
|
10
|
+
* Returns `true` on confirm, `false` on cancel or close.
|
|
11
|
+
*
|
|
12
|
+
* @export
|
|
13
|
+
* @class PolicyConfirmationDialogComponent
|
|
14
|
+
*/
|
|
15
|
+
export declare class PolicyConfirmationDialogComponent {
|
|
16
|
+
data: PolicyConfirmationDialogData;
|
|
17
|
+
private dialogRef;
|
|
18
|
+
constructor(data: PolicyConfirmationDialogData, dialogRef: MatDialogRef<PolicyConfirmationDialogComponent>);
|
|
19
|
+
/**
|
|
20
|
+
* Handles the Confirm button click — closes the dialog returning `true`.
|
|
21
|
+
* @memberof PolicyConfirmationDialogComponent
|
|
22
|
+
*/
|
|
23
|
+
onConfirm(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Handles the Cancel button click — closes the dialog returning `false`.
|
|
26
|
+
* @memberof PolicyConfirmationDialogComponent
|
|
27
|
+
*/
|
|
28
|
+
onCancel(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Handles the X (close) button click — closes the dialog returning `false`.
|
|
31
|
+
* @memberof PolicyConfirmationDialogComponent
|
|
32
|
+
*/
|
|
33
|
+
onClose(): void;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PolicyConfirmationDialogComponent, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PolicyConfirmationDialogComponent, "ieeesa-policy-confirmation-dialog", never, {}, {}, never, never, true, never>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Available export file formats for attendance data
|
|
3
|
+
*/
|
|
4
|
+
export declare enum ExportFormat {
|
|
5
|
+
CSV = "csv",
|
|
6
|
+
EXCEL = "xls"
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Configuration option for a format selection card in the export format popover
|
|
10
|
+
*/
|
|
11
|
+
export interface ExportFormatOption {
|
|
12
|
+
label: string;
|
|
13
|
+
value: ExportFormat;
|
|
14
|
+
ariaLabel: string;
|
|
15
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export * from './lib/components/list/list.component';
|
|
|
14
14
|
export * from './lib/components/menu/menu.component';
|
|
15
15
|
export * from './lib/components/modal/modal.component';
|
|
16
16
|
export * from './lib/components/modal-confirmation/modal-confirmation.component';
|
|
17
|
+
export * from './lib/components/modal-info/modal-info.component';
|
|
17
18
|
export * from './lib/components/navigation-menu/navigation-menu.component';
|
|
18
19
|
export * from './lib/components/notification/notification.component';
|
|
19
20
|
export * from './lib/components/radio/radio.component';
|
|
@@ -40,6 +41,9 @@ export * from './lib/components/inactive-tenant/inactive-tenant.component';
|
|
|
40
41
|
export * from './lib/components/image-preview/image-preview.component';
|
|
41
42
|
export * from './lib/components/rich-text-editor/rich-text-editor.component';
|
|
42
43
|
export * from './lib/components/multi-select-autocomplete/multi-select-autocomplete.component';
|
|
44
|
+
export * from './lib/components/export-format-popover/export-format-popover.component';
|
|
45
|
+
export * from './lib/components/policy-confirmation-dialog/policy-confirmation-dialog.component';
|
|
46
|
+
export * from './lib/components/export-success-dialog/export-success-dialog.component';
|
|
43
47
|
export * from './lib/directives/dynamic-form-field/dynamic-form-field.directive';
|
|
44
48
|
export * from './lib/directives/set-background/set-background.directive';
|
|
45
49
|
export * from './lib/directives/text-truncated/text-truncated.directive';
|
|
@@ -96,10 +100,13 @@ export * from './lib/models/file-upload-presigned-url-res.model';
|
|
|
96
100
|
export * from './lib/models/file-upload-response.model';
|
|
97
101
|
export * from './lib/models/inactive-tenant.model';
|
|
98
102
|
export * from './lib/models/table-column-menu-info.model';
|
|
103
|
+
export * from './lib/models/export-format-popover.model';
|
|
104
|
+
export * from './lib/models/policy-confirmation-dialog.model';
|
|
105
|
+
export * from './lib/models/export-success-dialog.model';
|
|
99
106
|
export * from './lib/services/datepicker.service';
|
|
100
107
|
export * from './lib/services/form-utility.service';
|
|
101
108
|
export * from './lib/services/file-upload.service';
|
|
102
109
|
export * from './lib/services/break-point-observer.service';
|
|
103
110
|
export * from './lib/pipes/safe.pipe';
|
|
104
111
|
export * from './lib/presentation.module';
|
|
105
|
-
export { SelectOption, CheckboxOption, IconButton, AlignType, ConfirmationModalData, MessagePart } from '@ieeesa-npm/models';
|
|
112
|
+
export { SelectOption, CheckboxOption, IconButton, AlignType, ConfirmationModalData, MessagePart, InfoModalData } from '@ieeesa-npm/models';
|