@ieeesa-npm/dashboard 0.0.5 → 0.0.7
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/assets/constants.json +1 -0
- package/esm2022/lib/components/event-group-card/event-group-card.component.mjs +3 -3
- package/esm2022/lib/components/meeting-attendance-row/meeting-attendance-row.component.mjs +3 -3
- package/esm2022/lib/components/upcoming-meetings-events/upcoming-meetings-events.component.mjs +46 -87
- package/esm2022/lib/components/your-groups/your-groups.component.mjs +3 -3
- package/esm2022/lib/dashboard.component.mjs +32 -4
- package/esm2022/lib/models/event-meeting-list-item.model.mjs +1 -1
- package/esm2022/lib/models/upcoming-summary.model.mjs +2 -0
- package/esm2022/lib/services/dashboard.service.mjs +23 -6
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/ieeesa-npm-dashboard.mjs +118 -112
- package/fesm2022/ieeesa-npm-dashboard.mjs.map +1 -1
- package/lib/components/member-level-badge/member-level-badge.component.d.ts +1 -0
- package/lib/components/upcoming-meetings-events/upcoming-meetings-events.component.d.ts +22 -44
- package/lib/dashboard.component.d.ts +19 -7
- package/lib/models/event-meeting-list-item.model.d.ts +7 -0
- package/lib/models/upcoming-summary.model.d.ts +16 -0
- package/lib/services/dashboard.service.d.ts +5 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/esm2022/lib/utils/attendance-action.util.mjs +0 -53
- package/lib/utils/attendance-action.util.d.ts +0 -38
|
@@ -42,6 +42,14 @@ export declare class UpcomingMeetingsEventsComponent {
|
|
|
42
42
|
inFlightMeetingIds: ReadonlySet<string>;
|
|
43
43
|
/** Whether the host has determined the viewport is at/below the mobile breakpoint. */
|
|
44
44
|
isMobileView: boolean;
|
|
45
|
+
/** Server total across all pages — the main paginator length (from `totalRecords`). */
|
|
46
|
+
totalRecords: number;
|
|
47
|
+
/** Server count of EVENT rows across all pages (collapsed summary). */
|
|
48
|
+
eventCount: number;
|
|
49
|
+
/** Server count of STANDALONE MEETING rows across all pages (collapsed summary). */
|
|
50
|
+
standaloneMeetingCount: number;
|
|
51
|
+
/** Server count of standalone meetings open for attendance across all pages (collapsed summary). */
|
|
52
|
+
standaloneMeetingsOpenForAttendanceCount: number;
|
|
45
53
|
/** Emits when the "View All" link is activated (Req 5.2). */
|
|
46
54
|
viewAll: EventEmitter<void>;
|
|
47
55
|
/** Bubbles the event id when a card's "View Event" button is activated (Req 6.4). */
|
|
@@ -71,61 +79,31 @@ export declare class UpcomingMeetingsEventsComponent {
|
|
|
71
79
|
}>;
|
|
72
80
|
/** Whether the section's card list is currently expanded; starts collapsed. */
|
|
73
81
|
isExpanded: boolean;
|
|
74
|
-
/**
|
|
75
|
-
readonly
|
|
76
|
-
/** The current zero-based page index of the section list. */
|
|
77
|
-
|
|
78
|
-
/** The
|
|
82
|
+
/** Selectable "Items per page" page sizes, matching the Your Groups card. */
|
|
83
|
+
readonly pageSizeOptions: number[];
|
|
84
|
+
/** The current zero-based page index of the section list (host/server-driven). */
|
|
85
|
+
pageIndex: number;
|
|
86
|
+
/** The current page size of the section list (host/server-driven). */
|
|
87
|
+
pageSize: number;
|
|
88
|
+
/** Emits the requested page when the section paginator changes (server-paged). */
|
|
89
|
+
sectionPageChange: EventEmitter<PageChange>;
|
|
90
|
+
/** The total number of events/meetings in the section (paginator length), from the server. */
|
|
79
91
|
get totalItems(): number;
|
|
80
92
|
/**
|
|
81
|
-
* The
|
|
82
|
-
*
|
|
93
|
+
* The events for the current page. The list endpoint is server-paged, so the
|
|
94
|
+
* component renders the events it was given directly (no client-side slicing).
|
|
83
95
|
* @return {UpcomingEvent[]} The events on the current page.
|
|
84
96
|
* @memberof UpcomingMeetingsEventsComponent
|
|
85
97
|
*/
|
|
86
98
|
get pagedEvents(): UpcomingEvent[];
|
|
87
|
-
/** The one-based index of the first item shown on the current page. */
|
|
88
|
-
get sectionRangeStart(): number;
|
|
89
|
-
/** The one-based index of the last item shown on the current page. */
|
|
90
|
-
get sectionRangeEnd(): number;
|
|
91
99
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* @return {string} The formatted range label.
|
|
95
|
-
* @memberof UpcomingMeetingsEventsComponent
|
|
96
|
-
*/
|
|
97
|
-
get sectionRangeLabel(): string;
|
|
98
|
-
/**
|
|
99
|
-
* Handles the section paginator change, updating the current section page.
|
|
100
|
+
* Handles the section paginator change, emitting the requested page/size so
|
|
101
|
+
* the container can load the matching server page (no client-side slicing).
|
|
100
102
|
* @param {PageEvent} event - The Material paginator page event.
|
|
101
103
|
* @return {void}
|
|
102
104
|
* @memberof UpcomingMeetingsEventsComponent
|
|
103
105
|
*/
|
|
104
106
|
onSectionPageChange(event: PageEvent): void;
|
|
105
|
-
/** Number of EVENT rows in the list (for the collapsed summary). */
|
|
106
|
-
get eventCount(): number;
|
|
107
|
-
/**
|
|
108
|
-
* Total number of meetings across the list: each event's `meetingCount` plus
|
|
109
|
-
* one per standalone meeting (for the collapsed summary).
|
|
110
|
-
* @return {number} The total meeting count.
|
|
111
|
-
* @memberof UpcomingMeetingsEventsComponent
|
|
112
|
-
*/
|
|
113
|
-
get totalMeetingCount(): number;
|
|
114
|
-
/**
|
|
115
|
-
* Total number of meetings open for attendance across the list (for the
|
|
116
|
-
* collapsed summary): each event's open count plus any standalone meeting that
|
|
117
|
-
* is attendance-eligible.
|
|
118
|
-
* @return {number} The total open-for-attendance count.
|
|
119
|
-
* @memberof UpcomingMeetingsEventsComponent
|
|
120
|
-
*/
|
|
121
|
-
get totalOpenForAttendanceCount(): number;
|
|
122
|
-
/**
|
|
123
|
-
* The collapsed summary line (e.g. "3 events · 50 meetings · 21 open for
|
|
124
|
-
* attendance") built from the `constants.json` template and the counts.
|
|
125
|
-
* @return {string} The formatted collapsed summary.
|
|
126
|
-
* @memberof UpcomingMeetingsEventsComponent
|
|
127
|
-
*/
|
|
128
|
-
get collapsedSummary(): string;
|
|
129
107
|
/**
|
|
130
108
|
* Allows the host/container to open or close the section (e.g. a "Jump to"
|
|
131
109
|
* shortcut opens it). Writing the input mirrors the value onto the internal
|
|
@@ -217,5 +195,5 @@ export declare class UpcomingMeetingsEventsComponent {
|
|
|
217
195
|
leaveMeeting?: boolean;
|
|
218
196
|
}): void;
|
|
219
197
|
static ɵfac: i0.ɵɵFactoryDeclaration<UpcomingMeetingsEventsComponent, never>;
|
|
220
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<UpcomingMeetingsEventsComponent, "ieeesa-upcoming-meetings-events", never, { "events": { "alias": "events"; "required": false; }; "sectionState": { "alias": "sectionState"; "required": false; }; "permissions": { "alias": "permissions"; "required": false; }; "attendanceStates": { "alias": "attendanceStates"; "required": false; }; "inFlightMeetingIds": { "alias": "inFlightMeetingIds"; "required": false; }; "isMobileView": { "alias": "isMobileView"; "required": false; }; "expanded": { "alias": "expanded"; "required": false; }; }, { "viewAll": "viewAll"; "viewEvent": "viewEvent"; "openMeeting": "openMeeting"; "logAttendance": "logAttendance"; "leaveMeeting": "leaveMeeting"; "meetingPageChange": "meetingPageChange"; "loadEventMeetings": "loadEventMeetings"; "navigateToMeeting": "navigateToMeeting"; "expandedChange": "expandedChange"; }, never, never, true, never>;
|
|
198
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UpcomingMeetingsEventsComponent, "ieeesa-upcoming-meetings-events", never, { "events": { "alias": "events"; "required": false; }; "sectionState": { "alias": "sectionState"; "required": false; }; "permissions": { "alias": "permissions"; "required": false; }; "attendanceStates": { "alias": "attendanceStates"; "required": false; }; "inFlightMeetingIds": { "alias": "inFlightMeetingIds"; "required": false; }; "isMobileView": { "alias": "isMobileView"; "required": false; }; "totalRecords": { "alias": "totalRecords"; "required": false; }; "eventCount": { "alias": "eventCount"; "required": false; }; "standaloneMeetingCount": { "alias": "standaloneMeetingCount"; "required": false; }; "standaloneMeetingsOpenForAttendanceCount": { "alias": "standaloneMeetingsOpenForAttendanceCount"; "required": false; }; "pageIndex": { "alias": "pageIndex"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "expanded": { "alias": "expanded"; "required": false; }; }, { "viewAll": "viewAll"; "viewEvent": "viewEvent"; "openMeeting": "openMeeting"; "logAttendance": "logAttendance"; "leaveMeeting": "leaveMeeting"; "meetingPageChange": "meetingPageChange"; "loadEventMeetings": "loadEventMeetings"; "navigateToMeeting": "navigateToMeeting"; "sectionPageChange": "sectionPageChange"; "expandedChange": "expandedChange"; }, never, never, true, never>;
|
|
221
199
|
}
|
|
@@ -10,6 +10,7 @@ import { DashboardUserInfo } from './models/dashboard-user-info.model';
|
|
|
10
10
|
import { GroupRow } from './models/group-row.model';
|
|
11
11
|
import { PageChange } from './models/page-change.model';
|
|
12
12
|
import { UpcomingEvent } from './models/upcoming-event.model';
|
|
13
|
+
import { UpcomingSummary } from './models/upcoming-summary.model';
|
|
13
14
|
import { DashboardService } from './services/dashboard.service';
|
|
14
15
|
import { UserPermissionsService } from './services/user-permissions.service';
|
|
15
16
|
import { DashboardJumpTarget } from './components/welcome-header/dashboard-welcome-header.component';
|
|
@@ -101,13 +102,8 @@ export declare class DashboardComponent implements OnInit, OnDestroy {
|
|
|
101
102
|
eventDatesLabel: string;
|
|
102
103
|
meetingDateLabel: string;
|
|
103
104
|
timeTimezoneLabel: string;
|
|
104
|
-
/**
|
|
105
|
-
* A navigation intent emitted by {@link DashboardComponent} for the host
|
|
106
|
-
* application to act on. The library never performs navigation itself; it emits
|
|
107
|
-
* the resolved target `path` (from the {@link DashboardRouteConfig}) together
|
|
108
|
-
* with the triggering identifier so the host can route accordingly (Req 11.1).
|
|
109
|
-
*/
|
|
110
105
|
meetingsLabel: string;
|
|
106
|
+
noMeetingsMessage: string;
|
|
111
107
|
openForAttendanceTemplate: string;
|
|
112
108
|
meetingListToggle: {
|
|
113
109
|
showLabel: string;
|
|
@@ -118,7 +114,7 @@ export declare class DashboardComponent implements OnInit, OnDestroy {
|
|
|
118
114
|
ariaLabel: {
|
|
119
115
|
view: string;
|
|
120
116
|
viewEvent: string;
|
|
121
|
-
meetingListToggle: string;
|
|
117
|
+
meetingListToggle: string;
|
|
122
118
|
};
|
|
123
119
|
paginator: {
|
|
124
120
|
rangeTemplate: string;
|
|
@@ -212,6 +208,12 @@ export declare class DashboardComponent implements OnInit, OnDestroy {
|
|
|
212
208
|
dashboardNavigate: EventEmitter<DashboardNavigationIntent>;
|
|
213
209
|
/** The user's upcoming events, bound to the upcoming section (Req 13.1, 13.2). */
|
|
214
210
|
upcomingEvents: UpcomingEvent[];
|
|
211
|
+
/** Server-provided summary counts (paginator length + collapsed-summary counts). */
|
|
212
|
+
upcomingSummary: UpcomingSummary;
|
|
213
|
+
/** Zero-based page index of the upcoming section's server-paged list. */
|
|
214
|
+
upcomingPageIndex: number;
|
|
215
|
+
/** Page size of the upcoming section's server-paged list. */
|
|
216
|
+
upcomingPageSize: number;
|
|
215
217
|
/** The user's groups, bound to the groups section (Req 13.1, 13.2). */
|
|
216
218
|
groups: GroupRow[];
|
|
217
219
|
/** The upcoming-events section's load/empty/error state (Req 13.1, 13.2, 13.5). */
|
|
@@ -418,6 +420,16 @@ export declare class DashboardComponent implements OnInit, OnDestroy {
|
|
|
418
420
|
* @memberof DashboardComponent
|
|
419
421
|
*/
|
|
420
422
|
private loadUpcomingEvents;
|
|
423
|
+
/**
|
|
424
|
+
* Handles the upcoming section's paginator change by requesting the matching
|
|
425
|
+
* server page. The list endpoint is server-paged, so the paginator length is
|
|
426
|
+
* the response `totalRecords`; page/size are converted to the one-based API
|
|
427
|
+
* page and a fresh page is loaded (no client-side slicing) (Req 3.x).
|
|
428
|
+
* @param {PageChange} page - The requested zero-based page index and size.
|
|
429
|
+
* @return {void}
|
|
430
|
+
* @memberof DashboardComponent
|
|
431
|
+
*/
|
|
432
|
+
onUpcomingPageChange(page: PageChange): void;
|
|
421
433
|
/**
|
|
422
434
|
* Triggers the groups load, setting the section to `ERROR` on failure so only
|
|
423
435
|
* the section error region renders. Isolated from the upcoming-events load so
|
|
@@ -49,7 +49,14 @@ export interface EventMeetingListItem {
|
|
|
49
49
|
}
|
|
50
50
|
/** Body of the home events-&-meetings list response. */
|
|
51
51
|
export interface EventMeetingListBody {
|
|
52
|
+
/** Total number of rows across all pages (paginator length). */
|
|
52
53
|
totalRecords: number;
|
|
54
|
+
/** Number of EVENT rows across all pages (collapsed-summary count). */
|
|
55
|
+
eventCount: number;
|
|
56
|
+
/** Number of STANDALONE MEETING rows across all pages (collapsed-summary count). */
|
|
57
|
+
standaloneMeetingCount: number;
|
|
58
|
+
/** Number of standalone meetings open for attendance across all pages (collapsed-summary count). */
|
|
59
|
+
standaloneMeetingsOpenForAttendanceCount: number;
|
|
53
60
|
eventMeetingList: EventMeetingListItem[];
|
|
54
61
|
}
|
|
55
62
|
/** Response envelope for the home events-&-meetings list endpoint. */
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-provided summary counts for the "Upcoming Meetings & Events" section,
|
|
3
|
+
* taken directly from the home events-&-meetings list response body. These back
|
|
4
|
+
* the paginator length and the collapsed-summary line so no counts are computed
|
|
5
|
+
* (or hardcoded) on the frontend.
|
|
6
|
+
*/
|
|
7
|
+
export interface UpcomingSummary {
|
|
8
|
+
/** Total number of rows across all pages — the main paginator length. */
|
|
9
|
+
totalRecords: number;
|
|
10
|
+
/** Number of EVENT rows across all pages. */
|
|
11
|
+
eventCount: number;
|
|
12
|
+
/** Number of STANDALONE MEETING rows across all pages. */
|
|
13
|
+
standaloneMeetingCount: number;
|
|
14
|
+
/** Number of standalone meetings open for attendance across all pages. */
|
|
15
|
+
standaloneMeetingsOpenForAttendanceCount: number;
|
|
16
|
+
}
|
|
@@ -7,6 +7,7 @@ import { DashboardSectionState } from '../models/dashboard-section-state.model';
|
|
|
7
7
|
import { GroupRow } from '../models/group-row.model';
|
|
8
8
|
import { MyGroupsView } from '../models/my-groups-view.model';
|
|
9
9
|
import { UpcomingEvent } from '../models/upcoming-event.model';
|
|
10
|
+
import { UpcomingSummary } from '../models/upcoming-summary.model';
|
|
10
11
|
import { EventMeetingDetailResponse, EventMeetingListResponse } from '../models/event-meeting-list-item.model';
|
|
11
12
|
import * as i0 from "@angular/core";
|
|
12
13
|
/**
|
|
@@ -32,6 +33,7 @@ export declare class DashboardService {
|
|
|
32
33
|
apiBaseUrl: string;
|
|
33
34
|
userPermissions: UserPermission[];
|
|
34
35
|
private readonly upcomingEvents;
|
|
36
|
+
private readonly upcomingSummary;
|
|
35
37
|
private readonly groups;
|
|
36
38
|
private readonly upcomingState;
|
|
37
39
|
private readonly groupsState;
|
|
@@ -39,6 +41,8 @@ export declare class DashboardService {
|
|
|
39
41
|
private readonly inFlightMeetingIds;
|
|
40
42
|
/** Emits the list of the user's upcoming events. */
|
|
41
43
|
upcomingEvents$: Observable<UpcomingEvent[]>;
|
|
44
|
+
/** Emits the server-provided summary counts (paginator length + collapsed-summary counts). */
|
|
45
|
+
upcomingSummary$: Observable<UpcomingSummary>;
|
|
42
46
|
/** Emits the list of the user's groups. */
|
|
43
47
|
groups$: Observable<GroupRow[]>;
|
|
44
48
|
/** Emits the load/empty/error state of the upcoming-events section. */
|
|
@@ -72,7 +76,7 @@ export declare class DashboardService {
|
|
|
72
76
|
* @return {Observable<EventMeetingListResponse>} The home events-&-meetings response envelope.
|
|
73
77
|
* @memberof DashboardService
|
|
74
78
|
*/
|
|
75
|
-
loadUpcomingEvents(): Observable<EventMeetingListResponse>;
|
|
79
|
+
loadUpcomingEvents(page?: number, size?: number): Observable<EventMeetingListResponse>;
|
|
76
80
|
/**
|
|
77
81
|
* Lazily loads (and paginates) the child meetings of an EVENT via
|
|
78
82
|
* `POST {apiBaseUrl}/meetings/home/events/{eventId}/meetings` (the drill-down
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export * from './lib/models/page-change.model';
|
|
|
14
14
|
export * from './lib/models/dashboard-user-info.model';
|
|
15
15
|
export * from './lib/models/meeting-row.model';
|
|
16
16
|
export * from './lib/models/upcoming-event.model';
|
|
17
|
+
export * from './lib/models/upcoming-summary.model';
|
|
17
18
|
export * from './lib/models/event-meeting-list-item.model';
|
|
18
19
|
export * from './lib/models/event-meeting-list-payload.model';
|
|
19
20
|
export * from './lib/models/group-row.model';
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pure helpers for the per-meeting attendance action state machine. No Angular /
|
|
3
|
-
* service dependencies so they are trivially testable (property-tested as
|
|
4
|
-
* Property 1) and reusable by `MeetingAttendanceRowComponent`.
|
|
5
|
-
*
|
|
6
|
-
* The handler is the single source of truth for what a meeting row's action
|
|
7
|
-
* button should emit when activated. The displayed `AttendanceState` only
|
|
8
|
-
* advances on a successful resolution (handled by the service reducers), so this
|
|
9
|
-
* function is a pure mapping from the current inputs to the action to emit.
|
|
10
|
-
*/
|
|
11
|
-
import { AttendanceState } from '../models/attendance-state.model';
|
|
12
|
-
/* eslint-disable no-unused-vars */
|
|
13
|
-
/**
|
|
14
|
-
* The action a meeting row's action button should emit when activated.
|
|
15
|
-
* `NONE` means the activation is non-actionable (empty id or in-flight) and the
|
|
16
|
-
* row must emit no `logAttendance` / `leaveMeeting` / navigation event.
|
|
17
|
-
*/
|
|
18
|
-
export var AttendanceAction;
|
|
19
|
-
(function (AttendanceAction) {
|
|
20
|
-
AttendanceAction["LOG_ATTENDANCE"] = "LOG_ATTENDANCE";
|
|
21
|
-
AttendanceAction["LEAVE_MEETING"] = "LEAVE_MEETING";
|
|
22
|
-
AttendanceAction["NONE"] = "NONE";
|
|
23
|
-
})(AttendanceAction || (AttendanceAction = {}));
|
|
24
|
-
/* eslint-enable no-unused-vars */
|
|
25
|
-
/**
|
|
26
|
-
* Resolves the attendance action to emit for a meeting row, following the
|
|
27
|
-
* attendance action state machine (see design: Attendance Action State Machine).
|
|
28
|
-
*
|
|
29
|
-
* Behavior:
|
|
30
|
-
* - Returns `NONE` when `meetingId` is empty or undefined (non-actionable row).
|
|
31
|
-
* - Returns `NONE` while the row is in-flight (re-entrancy guard — no further
|
|
32
|
-
* event is emitted until the current action resolves).
|
|
33
|
-
* - Returns `LEAVE_MEETING` when the state is `CURRENTLY_ATTENDING`.
|
|
34
|
-
* - Returns `LOG_ATTENDANCE` when the state is `NOT_ATTENDING` or undefined.
|
|
35
|
-
*
|
|
36
|
-
* @param {AttendanceState | undefined} attendanceState The row's current attendance state.
|
|
37
|
-
* @param {boolean} isInFlight Whether an attendance action for this row is awaiting resolution.
|
|
38
|
-
* @param {string | undefined} meetingId The row's meeting identifier.
|
|
39
|
-
* @return {AttendanceAction} The action to emit, or `NONE` when non-actionable.
|
|
40
|
-
*/
|
|
41
|
-
export function resolveAttendanceAction(attendanceState, isInFlight, meetingId) {
|
|
42
|
-
if (!meetingId) {
|
|
43
|
-
return AttendanceAction.NONE;
|
|
44
|
-
}
|
|
45
|
-
if (isInFlight) {
|
|
46
|
-
return AttendanceAction.NONE;
|
|
47
|
-
}
|
|
48
|
-
if (attendanceState === AttendanceState.CURRENTLY_ATTENDING) {
|
|
49
|
-
return AttendanceAction.LEAVE_MEETING;
|
|
50
|
-
}
|
|
51
|
-
return AttendanceAction.LOG_ATTENDANCE;
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXR0ZW5kYW5jZS1hY3Rpb24udXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Rhc2hib2FyZC9zcmMvbGliL3V0aWxzL2F0dGVuZGFuY2UtYWN0aW9uLnV0aWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7OztHQVNHO0FBQ0gsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLGtDQUFrQyxDQUFDO0FBRW5FLG1DQUFtQztBQUNuQzs7OztHQUlHO0FBQ0gsTUFBTSxDQUFOLElBQVksZ0JBSVg7QUFKRCxXQUFZLGdCQUFnQjtJQUMxQix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WV0aW5nIGlkZW50aWZpZXIuXHJcbiAqIEByZXR1cm4ge0F0dGVuZGFuY2VBY3Rpb259IFRoZSBhY3Rpb24gdG8gZW1pdCwgb3IgYE5PTkVgIHdoZW4gbm9uLWFjdGlvbmFibGUuXHJcbiAqL1xyXG5leHBvcnQgZnVuY3Rpb24gcmVzb2x2ZUF0dGVuZGFuY2VBY3Rpb24oXHJcbiAgYXR0ZW5kYW5jZVN0YXRlOiBBdHRlbmRhbmNlU3RhdGUgfCB1bmRlZmluZWQsXHJcbiAgaXNJbkZsaWdodDogYm9vbGVhbixcclxuICBtZWV0aW5nSWQ6IHN0cmluZyB8IHVuZGVmaW5lZFxyXG4pOiBBdHRlbmRhbmNlQWN0aW9uIHtcclxuICBpZiAoIW1lZXRpbmdJZCkge1xyXG4gICAgcmV0dXJuIEF0dGVuZGFuY2VBY3Rpb24uTk9ORTtcclxuICB9XHJcblxyXG4gIGlmIChpc0luRmxpZ2h0KSB7XHJcbiAgICByZXR1cm4gQXR0ZW5kYW5jZUFjdGlvbi5OT05FO1xyXG4gIH1cclxuXHJcbiAgaWYgKGF0dGVuZGFuY2VTdGF0ZSA9PT0gQXR0ZW5kYW5jZVN0YXRlLkNVUlJFTlRMWV9BVFRFTkRJTkcpIHtcclxuICAgIHJldHVybiBBdHRlbmRhbmNlQWN0aW9uLkxFQVZFX01FRVRJTkc7XHJcbiAgfVxyXG5cclxuICByZXR1cm4gQXR0ZW5kYW5jZUFjdGlvbi5MT0dfQVRURU5EQU5DRTtcclxufVxyXG4iXX0=
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pure helpers for the per-meeting attendance action state machine. No Angular /
|
|
3
|
-
* service dependencies so they are trivially testable (property-tested as
|
|
4
|
-
* Property 1) and reusable by `MeetingAttendanceRowComponent`.
|
|
5
|
-
*
|
|
6
|
-
* The handler is the single source of truth for what a meeting row's action
|
|
7
|
-
* button should emit when activated. The displayed `AttendanceState` only
|
|
8
|
-
* advances on a successful resolution (handled by the service reducers), so this
|
|
9
|
-
* function is a pure mapping from the current inputs to the action to emit.
|
|
10
|
-
*/
|
|
11
|
-
import { AttendanceState } from '../models/attendance-state.model';
|
|
12
|
-
/**
|
|
13
|
-
* The action a meeting row's action button should emit when activated.
|
|
14
|
-
* `NONE` means the activation is non-actionable (empty id or in-flight) and the
|
|
15
|
-
* row must emit no `logAttendance` / `leaveMeeting` / navigation event.
|
|
16
|
-
*/
|
|
17
|
-
export declare enum AttendanceAction {
|
|
18
|
-
LOG_ATTENDANCE = "LOG_ATTENDANCE",
|
|
19
|
-
LEAVE_MEETING = "LEAVE_MEETING",
|
|
20
|
-
NONE = "NONE"
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Resolves the attendance action to emit for a meeting row, following the
|
|
24
|
-
* attendance action state machine (see design: Attendance Action State Machine).
|
|
25
|
-
*
|
|
26
|
-
* Behavior:
|
|
27
|
-
* - Returns `NONE` when `meetingId` is empty or undefined (non-actionable row).
|
|
28
|
-
* - Returns `NONE` while the row is in-flight (re-entrancy guard — no further
|
|
29
|
-
* event is emitted until the current action resolves).
|
|
30
|
-
* - Returns `LEAVE_MEETING` when the state is `CURRENTLY_ATTENDING`.
|
|
31
|
-
* - Returns `LOG_ATTENDANCE` when the state is `NOT_ATTENDING` or undefined.
|
|
32
|
-
*
|
|
33
|
-
* @param {AttendanceState | undefined} attendanceState The row's current attendance state.
|
|
34
|
-
* @param {boolean} isInFlight Whether an attendance action for this row is awaiting resolution.
|
|
35
|
-
* @param {string | undefined} meetingId The row's meeting identifier.
|
|
36
|
-
* @return {AttendanceAction} The action to emit, or `NONE` when non-actionable.
|
|
37
|
-
*/
|
|
38
|
-
export declare function resolveAttendanceAction(attendanceState: AttendanceState | undefined, isInFlight: boolean, meetingId: string | undefined): AttendanceAction;
|