@ieeesa-npm/presentation 0.33.17 → 0.33.19
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/autocomplete/autocomplete.component.mjs +104 -6
- package/esm2022/lib/components/credit-selection/credit-selection.component.mjs +100 -0
- package/esm2022/lib/components/date-picker/date-picker.component.mjs +91 -7
- package/esm2022/lib/components/dynamic-form/dynamic-form.component.mjs +6 -3
- package/esm2022/lib/components/home-group-selection/home-group-selection.component.mjs +3 -3
- package/esm2022/lib/components/select/select.component.mjs +125 -7
- package/esm2022/lib/components/stepper/stepper.component.mjs +5 -3
- package/esm2022/lib/components/tabs/tabs.component.mjs +3 -3
- package/esm2022/lib/components/time-picker/time-picker.component.mjs +65 -6
- package/esm2022/lib/models/credit-selection.model.mjs +9 -0
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/ieeesa-npm-presentation.mjs +493 -33
- package/fesm2022/ieeesa-npm-presentation.mjs.map +1 -1
- package/lib/components/autocomplete/autocomplete.component.d.ts +13 -1
- package/lib/components/credit-selection/credit-selection.component.d.ts +57 -0
- package/lib/components/date-picker/date-picker.component.d.ts +12 -3
- package/lib/components/select/select.component.d.ts +16 -3
- package/lib/components/time-picker/time-picker.component.d.ts +12 -2
- package/lib/models/credit-selection.model.d.ts +70 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -17,6 +17,7 @@ import * as i0 from "@angular/core";
|
|
|
17
17
|
*/
|
|
18
18
|
export declare class AutocompleteComponent implements OnInit, FormField, OnDestroy, AfterViewInit {
|
|
19
19
|
private formUtilityService;
|
|
20
|
+
private elementRef;
|
|
20
21
|
config: FieldConfig;
|
|
21
22
|
group: FormGroup;
|
|
22
23
|
value: string;
|
|
@@ -30,7 +31,11 @@ export declare class AutocompleteComponent implements OnInit, FormField, OnDestr
|
|
|
30
31
|
autoComplete: ElementRef;
|
|
31
32
|
destroy$: Subject<boolean>;
|
|
32
33
|
autocompleteConstInfo: any;
|
|
33
|
-
constructor(formUtilityService: FormUtilityService);
|
|
34
|
+
constructor(formUtilityService: FormUtilityService, elementRef: ElementRef<HTMLElement>);
|
|
35
|
+
private formOverlayScrollContainer?;
|
|
36
|
+
private readonly preferredAutocompleteOverlayHeight;
|
|
37
|
+
private readonly overlayWheelListener;
|
|
38
|
+
private readonly formScrollListener;
|
|
34
39
|
/**
|
|
35
40
|
* Implementation of ngOnInit lifecycle hook method to initialize components instance properties.
|
|
36
41
|
* @memberof AutocompleteComponent
|
|
@@ -73,6 +78,13 @@ export declare class AutocompleteComponent implements OnInit, FormField, OnDestr
|
|
|
73
78
|
* @memberof AutocompleteComponent
|
|
74
79
|
*/
|
|
75
80
|
ngOnDestroy(): void;
|
|
81
|
+
onAutocompleteOpen(): void;
|
|
82
|
+
onAutocompleteClose(): void;
|
|
83
|
+
private setOverlayClipBounds;
|
|
84
|
+
private getFormOverlayScrollContainer;
|
|
85
|
+
private updateOverlayClipBounds;
|
|
86
|
+
private makeRoomForAutocompleteOverlay;
|
|
87
|
+
private clearOverlayClipBounds;
|
|
76
88
|
static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteComponent, never>;
|
|
77
89
|
static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteComponent, "ieeesa-autocomplete", never, { "autoCompleteOptions": { "alias": "autoCompleteOptions"; "required": false; }; "isSelectedOptionsVisible": { "alias": "isSelectedOptionsVisible"; "required": false; }; }, { "autoCompleteSearchValue": "autoCompleteSearchValue"; "autoCompleteClearSearchValue": "autoCompleteClearSearchValue"; "autoCompleteOptionSelected": "autoCompleteOptionSelected"; }, never, never, true, never>;
|
|
78
90
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
|
+
import { CreditSelectionData, CreditSelectionTimeslotOption } from '../../models/credit-selection.model';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* CreditSelectionComponent is a generic, reusable dialog shown when the
|
|
7
|
+
* attendance log-in APIs (Pass 1) return a non-null creditSelectionPrompt.
|
|
8
|
+
*
|
|
9
|
+
* For each timeslot the user must choose which meeting receives attendance
|
|
10
|
+
* credit — the prior (credit-holding) meeting or the target meeting being
|
|
11
|
+
* attended. The prior meeting is pre-selected per timeslot. Save is enabled
|
|
12
|
+
* only when every timeslot has a selection (the backend rejects partial
|
|
13
|
+
* submissions).
|
|
14
|
+
*
|
|
15
|
+
* Footer (SP3M-677 — no Cancel button; the dialog is non-dismissable and a
|
|
16
|
+
* valid meeting is always pre-selected, so credit is resolved via Save):
|
|
17
|
+
* - Save → closes with { creditSelections: [{ timeslotId, creditedMeetingId }] }
|
|
18
|
+
*
|
|
19
|
+
* This component is feature-agnostic — all display text is supplied by the
|
|
20
|
+
* caller via MAT_DIALOG_DATA (CreditSelectionData). It performs no API calls;
|
|
21
|
+
* it collects selections and returns them so the caller can re-submit Pass 2.
|
|
22
|
+
* @export
|
|
23
|
+
* @class CreditSelectionComponent
|
|
24
|
+
* @implements {OnInit}
|
|
25
|
+
*/
|
|
26
|
+
export declare class CreditSelectionComponent implements OnInit {
|
|
27
|
+
data: CreditSelectionData;
|
|
28
|
+
private dialogRef;
|
|
29
|
+
/** Timeslots the user must resolve, each with prior/target meeting options. */
|
|
30
|
+
timeslotOptions: CreditSelectionTimeslotOption[];
|
|
31
|
+
/** Map of timeslotId → selected creditedMeetingId. */
|
|
32
|
+
selections: Record<string, string>;
|
|
33
|
+
constructor(data: CreditSelectionData, dialogRef: MatDialogRef<CreditSelectionComponent>);
|
|
34
|
+
ngOnInit(): void;
|
|
35
|
+
/**
|
|
36
|
+
* trackBy for the timeslot list.
|
|
37
|
+
* @param {number} _index
|
|
38
|
+
* @param {CreditSelectionTimeslotOption} timeslot
|
|
39
|
+
* @return {string}
|
|
40
|
+
* @memberof CreditSelectionComponent
|
|
41
|
+
*/
|
|
42
|
+
trackByTimeslotId(_index: number, timeslot: CreditSelectionTimeslotOption): string;
|
|
43
|
+
/**
|
|
44
|
+
* Whether Save should be enabled — true once every timeslot has a selection.
|
|
45
|
+
* @return {boolean}
|
|
46
|
+
* @memberof CreditSelectionComponent
|
|
47
|
+
*/
|
|
48
|
+
get canSave(): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Save handler — builds one entry per timeslot and closes with the result.
|
|
51
|
+
* No-ops if any timeslot is unselected (backend rejects partial submissions).
|
|
52
|
+
* @memberof CreditSelectionComponent
|
|
53
|
+
*/
|
|
54
|
+
onSave(): void;
|
|
55
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CreditSelectionComponent, never>;
|
|
56
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CreditSelectionComponent, "ieeesa-credit-selection", never, {}, {}, never, never, true, never>;
|
|
57
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
3
3
|
import { MomentDateAdapter } from '@angular/material-moment-adapter';
|
|
4
4
|
import { DatePickerHeaderComponent } from '../../components/date-picker-header/date-picker-header.component';
|
|
@@ -27,11 +27,12 @@ export declare class CustomDateAdapter extends MomentDateAdapter {
|
|
|
27
27
|
* @implements {OnInit}
|
|
28
28
|
* @implements {AfterViewInit}
|
|
29
29
|
*/
|
|
30
|
-
export declare class DatePickerComponent implements FormField, OnInit {
|
|
30
|
+
export declare class DatePickerComponent implements FormField, OnInit, OnDestroy {
|
|
31
31
|
private fb;
|
|
32
32
|
private changeDetectorRef;
|
|
33
33
|
private datepickerService;
|
|
34
34
|
private formUtilityService;
|
|
35
|
+
private elementRef;
|
|
35
36
|
config: FieldConfig;
|
|
36
37
|
group: FormGroup;
|
|
37
38
|
datePickerHeader: typeof DatePickerHeaderComponent;
|
|
@@ -81,7 +82,9 @@ export declare class DatePickerComponent implements FormField, OnInit {
|
|
|
81
82
|
}>;
|
|
82
83
|
calendarSelectedDate: Date;
|
|
83
84
|
buttonActionsInfo: any;
|
|
84
|
-
|
|
85
|
+
private formOverlayScrollContainer?;
|
|
86
|
+
private readonly overlayWheelListener;
|
|
87
|
+
constructor(fb: FormBuilder, changeDetectorRef: ChangeDetectorRef, datepickerService: DatepickerService, formUtilityService: FormUtilityService, elementRef: ElementRef<HTMLElement>);
|
|
85
88
|
/**
|
|
86
89
|
* Implementation of ngOnInit lifecycle hook method to creates config if its undefined and sets components instance variables if config is defined. Sets the form group value if form group is defined.
|
|
87
90
|
* @memberof DatePickerComponent
|
|
@@ -134,6 +137,12 @@ export declare class DatePickerComponent implements FormField, OnInit {
|
|
|
134
137
|
* @memberof DatePickerComponent
|
|
135
138
|
*/
|
|
136
139
|
onDatePickerOpen(controlName: string): void;
|
|
140
|
+
onDatePickerClose(): void;
|
|
141
|
+
ngOnDestroy(): void;
|
|
142
|
+
private setOverlayClipBounds;
|
|
143
|
+
private scrollFieldIntoViewForCalendar;
|
|
144
|
+
private getFormOverlayScrollContainer;
|
|
145
|
+
private clearOverlayClipBounds;
|
|
137
146
|
static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerComponent, never>;
|
|
138
147
|
static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerComponent, "ieeesa-date-picker", never, { "selectedDates": { "alias": "selectedDates"; "required": false; }; "selectedRange": { "alias": "selectedRange"; "required": false; }; "calendarType": { "alias": "calendarType"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "placeholderLabel": { "alias": "placeholderLabel"; "required": false; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; "isLabelAlignedLeft": { "alias": "isLabelAlignedLeft"; "required": false; }; "datepickerLabel": { "alias": "datepickerLabel"; "required": false; }; "dateRange": { "alias": "dateRange"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; }, { "selectedDate": "selectedDate"; "selectedDateRange": "selectedDateRange"; }, never, never, true, never>;
|
|
139
148
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter, OnInit, AfterViewInit, QueryList } from '@angular/core';
|
|
1
|
+
import { ElementRef, EventEmitter, OnInit, AfterViewInit, OnDestroy, QueryList } from '@angular/core';
|
|
2
2
|
import { FormGroup } from '@angular/forms';
|
|
3
3
|
import { SelectOption } from '@ieeesa-npm/models';
|
|
4
4
|
import { FieldConfig } from '../../models/field-config.model';
|
|
@@ -15,8 +15,9 @@ import * as i0 from "@angular/core";
|
|
|
15
15
|
* @implements {AfterViewInit}
|
|
16
16
|
* @implements {OnDestroy}
|
|
17
17
|
*/
|
|
18
|
-
export declare class SelectComponent implements OnInit, AfterViewInit {
|
|
18
|
+
export declare class SelectComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
19
19
|
private formUtilityService;
|
|
20
|
+
private elementRef;
|
|
20
21
|
formFields: QueryList<SearchComponent>;
|
|
21
22
|
group: FormGroup;
|
|
22
23
|
config: FieldConfig;
|
|
@@ -28,6 +29,8 @@ export declare class SelectComponent implements OnInit, AfterViewInit {
|
|
|
28
29
|
private _selectedOptions;
|
|
29
30
|
private _isSortNeeded;
|
|
30
31
|
private unsortedDropdownOptions;
|
|
32
|
+
private formOverlayScrollContainer?;
|
|
33
|
+
private readonly overlayWheelListener;
|
|
31
34
|
/**
|
|
32
35
|
* Takes isSortNeeded as input to check if the passed options are sorted or not.
|
|
33
36
|
* @memberof SelectComponent
|
|
@@ -57,7 +60,7 @@ export declare class SelectComponent implements OnInit, AfterViewInit {
|
|
|
57
60
|
optionSelected: EventEmitter<SelectOption>;
|
|
58
61
|
optionSearched: EventEmitter<string>;
|
|
59
62
|
dropdownOpenedChange: EventEmitter<SelectOpenedState>;
|
|
60
|
-
constructor(formUtilityService: FormUtilityService);
|
|
63
|
+
constructor(formUtilityService: FormUtilityService, elementRef: ElementRef<HTMLElement>);
|
|
61
64
|
/**
|
|
62
65
|
* Initializes components instance properties from config if its defined otherwise creates form group and config.
|
|
63
66
|
* @memberof SelectComponent
|
|
@@ -75,6 +78,16 @@ export declare class SelectComponent implements OnInit, AfterViewInit {
|
|
|
75
78
|
* @memberof SelectComponent
|
|
76
79
|
*/
|
|
77
80
|
updateArrowDirection(opened: boolean): void;
|
|
81
|
+
prepareSelectOverlayPosition(): void;
|
|
82
|
+
/**
|
|
83
|
+
* Clears form overlay bounds when the component is destroyed while open.
|
|
84
|
+
* @memberof SelectComponent
|
|
85
|
+
*/
|
|
86
|
+
ngOnDestroy(): void;
|
|
87
|
+
private setOverlayClipBounds;
|
|
88
|
+
private getFormOverlayScrollContainer;
|
|
89
|
+
private clearOverlayClipBounds;
|
|
90
|
+
private keepTopSelectPanelInsideFormBody;
|
|
78
91
|
/**
|
|
79
92
|
* Takes the index and the current option as arguments and needs to return the unique identifier for this option.
|
|
80
93
|
* @param {number} index
|
|
@@ -1,20 +1,30 @@
|
|
|
1
|
-
import { ElementRef, EventEmitter } from '@angular/core';
|
|
1
|
+
import { ElementRef, EventEmitter, OnDestroy } from '@angular/core';
|
|
2
2
|
import { FormGroup } from '@angular/forms';
|
|
3
3
|
import { FieldConfig } from '../../models/field-config.model';
|
|
4
4
|
import { SelectedTime } from '../../models/selected-time.model';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class TimePickerComponent {
|
|
6
|
+
export declare class TimePickerComponent implements OnDestroy {
|
|
7
|
+
private elementRef;
|
|
7
8
|
config: FieldConfig;
|
|
8
9
|
group: FormGroup;
|
|
9
10
|
formTimeSelected: EventEmitter<SelectedTime>;
|
|
10
11
|
constants: any;
|
|
11
12
|
picker: ElementRef;
|
|
13
|
+
private formOverlayScrollContainer?;
|
|
14
|
+
private readonly overlayWheelListener;
|
|
15
|
+
constructor(elementRef: ElementRef<HTMLElement>);
|
|
12
16
|
/**
|
|
13
17
|
* Handles form time selection event
|
|
14
18
|
* @type {void}
|
|
15
19
|
* @memberof TimePickerComponent
|
|
16
20
|
*/
|
|
17
21
|
onTimeSelection(time: string): void;
|
|
22
|
+
onTimePickerOpen(): void;
|
|
23
|
+
onTimePickerClose(): void;
|
|
24
|
+
ngOnDestroy(): void;
|
|
25
|
+
private setOverlayClipBounds;
|
|
26
|
+
private getFormOverlayScrollContainer;
|
|
27
|
+
private clearOverlayClipBounds;
|
|
18
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<TimePickerComponent, never>;
|
|
19
29
|
static ɵcmp: i0.ɵɵComponentDeclaration<TimePickerComponent, "ieeesa-time-picker", never, {}, { "formTimeSelected": "formTimeSelected"; }, never, never, true, never>;
|
|
20
30
|
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared models for the reusable Credit Selection dialog.
|
|
3
|
+
*
|
|
4
|
+
* The dialog is generic and feature-agnostic: all display text is supplied by
|
|
5
|
+
* the calling feature library (e.g. attendance, attendees) via MAT_DIALOG_DATA,
|
|
6
|
+
* so this presentation-layer component never depends on any feature's constants.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* A single selectable meeting option shown in the credit-selection dialog.
|
|
10
|
+
* Represents either the prior (credit-holding) meeting or the target meeting
|
|
11
|
+
* being attended, as returned per timeslot by the backend credit prompt.
|
|
12
|
+
*/
|
|
13
|
+
export interface CreditSelectionMeetingOption {
|
|
14
|
+
meetingId: string;
|
|
15
|
+
meetingName: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A single timeslot the user must resolve credit for. Contains the prior
|
|
19
|
+
* (credit-holding) meeting and the target meeting being attended. The user
|
|
20
|
+
* picks exactly one of these two per timeslot.
|
|
21
|
+
* Mirrors creditSelectionPrompt.timeslotOptions[] from the attendance log-in APIs.
|
|
22
|
+
*/
|
|
23
|
+
export interface CreditSelectionTimeslotOption {
|
|
24
|
+
timeslotId: string;
|
|
25
|
+
timeslotName: string;
|
|
26
|
+
priorMeeting: CreditSelectionMeetingOption;
|
|
27
|
+
targetMeeting: CreditSelectionMeetingOption;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The creditSelectionPrompt object returned by Pass 1 of the attendance log-in
|
|
31
|
+
* APIs. When present (non-null), the credit-selection dialog must be shown
|
|
32
|
+
* before the attendance can be finalized (Pass 2).
|
|
33
|
+
*/
|
|
34
|
+
export interface CreditSelectionPrompt {
|
|
35
|
+
eventId: string;
|
|
36
|
+
timeslotOptions: CreditSelectionTimeslotOption[];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Data passed to the CreditSelectionComponent via MAT_DIALOG_DATA.
|
|
40
|
+
* All text is provided by the caller so the component stays generic.
|
|
41
|
+
*/
|
|
42
|
+
export interface CreditSelectionData {
|
|
43
|
+
/** Timeslots the user must resolve, each with prior/target meeting options. */
|
|
44
|
+
timeslotOptions: CreditSelectionTimeslotOption[];
|
|
45
|
+
/** Dialog title. */
|
|
46
|
+
title: string;
|
|
47
|
+
/** First instruction paragraph (context — why credit must be chosen). */
|
|
48
|
+
messageLine1: string;
|
|
49
|
+
/** Second instruction paragraph (the actual "please select" prompt). */
|
|
50
|
+
messageLine2: string;
|
|
51
|
+
/** Save button label. */
|
|
52
|
+
saveLabel: string;
|
|
53
|
+
/** Accessibility label for each timeslot's radio group. */
|
|
54
|
+
meetingOptionAriaLabel: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* One credit selection the user made — which meeting should receive credit for
|
|
58
|
+
* a given timeslot. Sent in Pass 2 as creditSelections[].
|
|
59
|
+
*/
|
|
60
|
+
export interface CreditSelectionEntry {
|
|
61
|
+
timeslotId: string;
|
|
62
|
+
creditedMeetingId: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Result returned by CreditSelectionComponent when the user clicks Save.
|
|
66
|
+
* Contains one entry per timeslot.
|
|
67
|
+
*/
|
|
68
|
+
export interface CreditSelectionResult {
|
|
69
|
+
creditSelections: CreditSelectionEntry[];
|
|
70
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export * from './lib/components/filter-popover/filter-popover.component';
|
|
|
46
46
|
export * from './lib/components/policy-confirmation-dialog/policy-confirmation-dialog.component';
|
|
47
47
|
export * from './lib/components/export-success-dialog/export-success-dialog.component';
|
|
48
48
|
export * from './lib/components/home-group-selection/home-group-selection.component';
|
|
49
|
+
export * from './lib/components/credit-selection/credit-selection.component';
|
|
49
50
|
export * from './lib/directives/dynamic-form-field/dynamic-form-field.directive';
|
|
50
51
|
export * from './lib/directives/set-background/set-background.directive';
|
|
51
52
|
export * from './lib/directives/text-truncated/text-truncated.directive';
|
|
@@ -107,6 +108,7 @@ export * from './lib/models/filter-popover.model';
|
|
|
107
108
|
export * from './lib/models/policy-confirmation-dialog.model';
|
|
108
109
|
export * from './lib/models/export-success-dialog.model';
|
|
109
110
|
export * from './lib/models/home-group-selection.model';
|
|
111
|
+
export * from './lib/models/credit-selection.model';
|
|
110
112
|
export * from './lib/services/datepicker.service';
|
|
111
113
|
export * from './lib/services/form-utility.service';
|
|
112
114
|
export * from './lib/services/file-upload.service';
|