@ieeesa-npm/dashboard 0.0.4 → 0.0.6
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 -7
- package/esm2022/lib/components/upcoming-meetings-events/upcoming-meetings-events.component.mjs +3 -7
- package/esm2022/lib/components/your-groups/your-groups.component.mjs +3 -3
- package/esm2022/lib/dashboard.component.mjs +9 -42
- package/fesm2022/ieeesa-npm-dashboard.mjs +15 -55
- package/fesm2022/ieeesa-npm-dashboard.mjs.map +1 -1
- package/lib/components/event-group-card/event-group-card.component.d.ts +1 -3
- 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 +1 -3
- package/lib/dashboard.component.d.ts +6 -22
- package/package.json +1 -1
- package/esm2022/lib/utils/attendance-action.util.mjs +0 -53
- package/lib/utils/attendance-action.util.d.ts +0 -38
|
@@ -44,8 +44,6 @@ export declare class EventGroupCardComponent {
|
|
|
44
44
|
inFlightMeetingIds: ReadonlySet<string>;
|
|
45
45
|
/** Whether the host has determined the viewport is at/below the mobile breakpoint. */
|
|
46
46
|
isMobileView: boolean;
|
|
47
|
-
/** Whether this event's child meetings are currently loading (drill-down API). */
|
|
48
|
-
meetingsLoading: boolean;
|
|
49
47
|
/** Emits the event id when the "View Event" button is activated (Req 6.4). */
|
|
50
48
|
viewEvent: EventEmitter<string>;
|
|
51
49
|
/** Bubbles the meeting id when a row's meeting-name link is activated (Req 6.7, 7.4). */
|
|
@@ -333,5 +331,5 @@ export declare class EventGroupCardComponent {
|
|
|
333
331
|
*/
|
|
334
332
|
private formatDate;
|
|
335
333
|
static ɵfac: i0.ɵɵFactoryDeclaration<EventGroupCardComponent, never>;
|
|
336
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<EventGroupCardComponent, "ieeesa-event-group-card", never, { "event": { "alias": "event"; "required": false; }; "permissions": { "alias": "permissions"; "required": false; }; "attendanceStates": { "alias": "attendanceStates"; "required": false; }; "inFlightMeetingIds": { "alias": "inFlightMeetingIds"; "required": false; }; "isMobileView": { "alias": "isMobileView"; "required": false; };
|
|
334
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EventGroupCardComponent, "ieeesa-event-group-card", never, { "event": { "alias": "event"; "required": false; }; "permissions": { "alias": "permissions"; "required": false; }; "attendanceStates": { "alias": "attendanceStates"; "required": false; }; "inFlightMeetingIds": { "alias": "inFlightMeetingIds"; "required": false; }; "isMobileView": { "alias": "isMobileView"; "required": false; }; }, { "viewEvent": "viewEvent"; "openMeeting": "openMeeting"; "logAttendance": "logAttendance"; "leaveMeeting": "leaveMeeting"; "pageChange": "pageChange"; "loadMeetings": "loadMeetings"; "navigateToMeeting": "navigateToMeeting"; }, never, never, true, never>;
|
|
337
335
|
}
|
|
@@ -42,8 +42,6 @@ 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
|
-
/** Event ids whose drill-down meetings are currently loading (spinner). */
|
|
46
|
-
loadingEventIds: ReadonlySet<string>;
|
|
47
45
|
/** Emits when the "View All" link is activated (Req 5.2). */
|
|
48
46
|
viewAll: EventEmitter<void>;
|
|
49
47
|
/** Bubbles the event id when a card's "View Event" button is activated (Req 6.4). */
|
|
@@ -219,5 +217,5 @@ export declare class UpcomingMeetingsEventsComponent {
|
|
|
219
217
|
leaveMeeting?: boolean;
|
|
220
218
|
}): void;
|
|
221
219
|
static ɵfac: i0.ɵɵFactoryDeclaration<UpcomingMeetingsEventsComponent, never>;
|
|
222
|
-
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; }; "
|
|
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>;
|
|
223
221
|
}
|
|
@@ -108,6 +108,7 @@ export declare class DashboardComponent implements OnInit, OnDestroy {
|
|
|
108
108
|
* with the triggering identifier so the host can route accordingly (Req 11.1).
|
|
109
109
|
*/
|
|
110
110
|
meetingsLabel: string;
|
|
111
|
+
noMeetingsMessage: string;
|
|
111
112
|
openForAttendanceTemplate: string;
|
|
112
113
|
meetingListToggle: {
|
|
113
114
|
showLabel: string;
|
|
@@ -118,7 +119,7 @@ export declare class DashboardComponent implements OnInit, OnDestroy {
|
|
|
118
119
|
ariaLabel: {
|
|
119
120
|
view: string;
|
|
120
121
|
viewEvent: string;
|
|
121
|
-
meetingListToggle: string;
|
|
122
|
+
meetingListToggle: string;
|
|
122
123
|
};
|
|
123
124
|
paginator: {
|
|
124
125
|
rangeTemplate: string;
|
|
@@ -226,9 +227,7 @@ export declare class DashboardComponent implements OnInit, OnDestroy {
|
|
|
226
227
|
attendancePermissions: AttendanceActionPermissions;
|
|
227
228
|
/** Whether the viewport is at/below the mobile breakpoint (Req 15.1, 15.2). */
|
|
228
229
|
isMobileView: boolean;
|
|
229
|
-
/**
|
|
230
|
-
loadingEventIds: ReadonlySet<string>;
|
|
231
|
-
/** Whether the Upcoming Meetings & Events card is expanded. Starts collapsed. */
|
|
230
|
+
/** Whether the Upcoming Meetings & Events card is expanded. Starts expanded. */
|
|
232
231
|
meetingsExpanded: boolean;
|
|
233
232
|
/** Whether the Your Groups card is expanded. Starts collapsed. */
|
|
234
233
|
groupsExpanded: boolean;
|
|
@@ -345,8 +344,9 @@ export declare class DashboardComponent implements OnInit, OnDestroy {
|
|
|
345
344
|
/**
|
|
346
345
|
* Lazily loads (or paginates) the child meetings of an expanded EVENT card via
|
|
347
346
|
* the service, surfacing the attendance error message on failure. Each event
|
|
348
|
-
* paginates independently.
|
|
349
|
-
*
|
|
347
|
+
* paginates independently. Loading feedback is handled by the host
|
|
348
|
+
* application's global spinner, so no per-event loading state is tracked here.
|
|
349
|
+
* @param {{ eventId: string; page: number; size: number }} request - The event id and one-based page to load.
|
|
350
350
|
* @return {void}
|
|
351
351
|
* @memberof DashboardComponent
|
|
352
352
|
*/
|
|
@@ -355,22 +355,6 @@ export declare class DashboardComponent implements OnInit, OnDestroy {
|
|
|
355
355
|
page: number;
|
|
356
356
|
size: number;
|
|
357
357
|
}): void;
|
|
358
|
-
/**
|
|
359
|
-
* Updates the set of events whose drill-down meetings are currently loading,
|
|
360
|
-
* so each event card can show a spinner while its page resolves.
|
|
361
|
-
* @param {string} eventId - The event being loaded.
|
|
362
|
-
* @param {boolean} loading - Whether the load is in progress.
|
|
363
|
-
* @return {void}
|
|
364
|
-
* @memberof DashboardComponent
|
|
365
|
-
*/
|
|
366
|
-
private setEventLoading;
|
|
367
|
-
/**
|
|
368
|
-
* Whether the given event's drill-down meetings are currently loading.
|
|
369
|
-
* @param {string} eventId - The event id.
|
|
370
|
-
* @return {boolean} True while the event's meetings are loading.
|
|
371
|
-
* @memberof DashboardComponent
|
|
372
|
-
*/
|
|
373
|
-
isEventLoading(eventId: string): boolean;
|
|
374
358
|
/**
|
|
375
359
|
* Handles an attendance-button activation for an In-Progress meeting by
|
|
376
360
|
* emitting a navigation intent to the view-meeting screen with `eventId`,
|
package/package.json
CHANGED
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXR0ZW5kYW5jZS1hY3Rpb24udXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Rhc2hib2FyZC9zcmMvbGliL3V0aWxzL2F0dGVuZGFuY2UtYWN0aW9uLnV0aWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7OztHQVNHO0FBQ0gsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLGtDQUFrQyxDQUFDO0FBRW5FLG1DQUFtQztBQUNuQzs7OztHQUlHO0FBQ0gsTU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0ge3N0cmluZyB8IHVuZGVmaW5lZH0gbWVldGluZ0lkIFRoZSByb3cncyBtZWV0aW5nIGlkZW50aWZpZXIuXHJcbiAqIEByZXR1cm4ge0F0dGVuZGFuY2VBY3Rpb259IFRoZSBhY3Rpb24gdG8gZW1pdCwgb3IgYE5PTkVgIHdoZW4gbm9uLWFjdGlvbmFibGUuXHJcbiAqL1xyXG5leHBvcnQgZnVuY3Rpb24gcmVzb2x2ZUF0dGVuZGFuY2VBY3Rpb24oXHJcbiAgYXR0ZW5kYW5jZVN0YXRlOiBBdHRlbmRhbmNlU3RhdGUgfCB1bmRlZmluZWQsXHJcbiAgaXNJbkZsaWdodDogYm9vbGVhbixcclxuICBtZWV0aW5nSWQ6IHN0cmluZyB8IHVuZGVmaW5lZFxyXG4pOiBBdHRlbmRhbmNlQWN0aW9uIHtcclxuICBpZiAoIW1lZXRpbmdJZCkge1xyXG4gICAgcmV0dXJuIEF0dGVuZGFuY2VBY3Rpb24uTk9ORTtcclxuICB9XHJcblxyXG4gIGlmIChpc0luRmxpZ2h0KSB7XHJcbiAgICByZXR1cm4gQXR0ZW5kYW5jZUFjdGlvbi5OT05FO1xyXG4gIH1cclxuXHJcbiAgaWYgKGF0dGVuZGFuY2VTdGF0ZSA9PT0gQXR0ZW5kYW5jZVN0YXRlLkNVUlJFTlRMWV9BVFRFTkRJTkcpIHtcclxuICAgIHJldHVybiBBdHRlbmRhbmNlQWN0aW9uLkxFQVZFX01FRVRJTkc7XHJcbiAgfVxyXG5cclxuICByZXR1cm4gQXR0ZW5kYW5jZUFjdGlvbi5MT0dfQVRURU5EQU5DRTtcclxufVxyXG4iXX0=
|
|
@@ -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;
|