@ieeesa-npm/dashboard 0.0.6 → 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.
@@ -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
- /** Section-level page size — 5 events/meetings per page per the design. */
75
- readonly sectionPageSize = 5;
76
- /** The current zero-based page index of the section list. */
77
- sectionPageIndex: number;
78
- /** The total number of events/meetings in the section (paginator length). */
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 slice of events/meetings for the current section page (5 per page),
82
- * used by the card `*ngFor`.
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
- * The section paginator range label (e.g. "1-5 of 20 Meetings & Events")
93
- * built from the `constants.json` template.
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,12 +102,6 @@ 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;
111
106
  noMeetingsMessage: string;
112
107
  openForAttendanceTemplate: string;
@@ -213,6 +208,12 @@ export declare class DashboardComponent implements OnInit, OnDestroy {
213
208
  dashboardNavigate: EventEmitter<DashboardNavigationIntent>;
214
209
  /** The user's upcoming events, bound to the upcoming section (Req 13.1, 13.2). */
215
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;
216
217
  /** The user's groups, bound to the groups section (Req 13.1, 13.2). */
217
218
  groups: GroupRow[];
218
219
  /** The upcoming-events section's load/empty/error state (Req 13.1, 13.2, 13.5). */
@@ -419,6 +420,16 @@ export declare class DashboardComponent implements OnInit, OnDestroy {
419
420
  * @memberof DashboardComponent
420
421
  */
421
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;
422
433
  /**
423
434
  * Triggers the groups load, setting the section to `ERROR` on failure so only
424
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ieeesa-npm/dashboard",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.1.0",
6
6
  "@angular/core": "^16.1.0",
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';