@ieeesa-npm/dashboard 0.0.0-stage → 0.0.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/README.md +75 -3
- package/esm2022/ieeesa-npm-dashboard.mjs +5 -0
- package/esm2022/lib/assets/constants.json +141 -0
- package/esm2022/lib/assets/dashboard-mock.mjs +217 -0
- package/esm2022/lib/assets/dashboard-route-paths.mock.mjs +12 -0
- package/esm2022/lib/assets/dashboard-user-permissions.mock.mjs +23 -0
- package/esm2022/lib/assets/date-formats.mjs +28 -0
- package/esm2022/lib/components/event-group-card/event-group-card.component.mjs +277 -0
- package/esm2022/lib/components/meeting-attendance-row/meeting-attendance-row.component.mjs +181 -0
- package/esm2022/lib/components/member-level-badge/member-level-badge.component.mjs +79 -0
- package/esm2022/lib/components/upcoming-meetings-events/upcoming-meetings-events.component.mjs +163 -0
- package/esm2022/lib/components/welcome-header/dashboard-welcome-header.component.mjs +151 -0
- package/esm2022/lib/components/your-groups/your-groups.component.mjs +206 -0
- package/esm2022/lib/dashboard.component.mjs +377 -0
- package/esm2022/lib/dashboard.module.mjs +16 -0
- package/esm2022/lib/dashboard.routes.mjs +7 -0
- package/esm2022/lib/models/attendance-action-permissions.model.mjs +2 -0
- package/esm2022/lib/models/attendance-state.model.mjs +7 -0
- package/esm2022/lib/models/dashboard-list-response.model.mjs +2 -0
- package/esm2022/lib/models/dashboard-route-config.model.mjs +2 -0
- package/esm2022/lib/models/dashboard-section-state.model.mjs +9 -0
- package/esm2022/lib/models/dashboard-user-info.model.mjs +2 -0
- package/esm2022/lib/models/group-row.model.mjs +2 -0
- package/esm2022/lib/models/meeting-row.model.mjs +2 -0
- package/esm2022/lib/models/page-change.model.mjs +2 -0
- package/esm2022/lib/models/upcoming-event.model.mjs +2 -0
- package/esm2022/lib/services/attendance-reducers.mjs +54 -0
- package/esm2022/lib/services/dashboard.service.mjs +208 -0
- package/esm2022/lib/services/user-permissions.service.mjs +50 -0
- package/esm2022/lib/utils/attendance-action.util.mjs +53 -0
- package/esm2022/public-api.mjs +34 -0
- package/fesm2022/ieeesa-npm-dashboard.mjs +2234 -0
- package/fesm2022/ieeesa-npm-dashboard.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/assets/dashboard-mock.d.ts +31 -0
- package/lib/assets/dashboard-route-paths.mock.d.ts +2 -0
- package/lib/assets/dashboard-user-permissions.mock.d.ts +2 -0
- package/lib/assets/date-formats.d.ts +27 -0
- package/lib/components/event-group-card/event-group-card.component.d.ts +300 -0
- package/lib/components/meeting-attendance-row/meeting-attendance-row.component.d.ts +239 -0
- package/lib/components/member-level-badge/member-level-badge.component.d.ts +161 -0
- package/lib/components/upcoming-meetings-events/upcoming-meetings-events.component.d.ts +238 -0
- package/lib/components/welcome-header/dashboard-welcome-header.component.d.ts +98 -0
- package/lib/components/your-groups/your-groups.component.d.ts +110 -0
- package/lib/dashboard.component.d.ts +376 -0
- package/lib/dashboard.module.d.ts +7 -0
- package/lib/dashboard.routes.d.ts +2 -0
- package/lib/models/attendance-action-permissions.model.d.ts +4 -0
- package/lib/models/attendance-state.model.d.ts +4 -0
- package/lib/models/dashboard-list-response.model.d.ts +5 -0
- package/lib/models/dashboard-route-config.model.d.ts +7 -0
- package/lib/models/dashboard-section-state.model.d.ts +6 -0
- package/lib/models/dashboard-user-info.model.d.ts +5 -0
- package/lib/models/group-row.model.d.ts +8 -0
- package/lib/models/meeting-row.model.d.ts +12 -0
- package/lib/models/page-change.model.d.ts +4 -0
- package/lib/models/upcoming-event.model.d.ts +13 -0
- package/lib/services/attendance-reducers.d.ts +43 -0
- package/lib/services/dashboard.service.d.ts +119 -0
- package/lib/services/user-permissions.service.d.ts +31 -0
- package/lib/utils/attendance-action.util.d.ts +38 -0
- package/package.json +30 -3
- package/public-api.d.ts +24 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { Legend } from '@ieeesa-npm/presentation';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Member_Level_Badge renders a single member-level value as a colored pill.
|
|
5
|
+
* It reuses the Presentation_Library Legend component for the pill primitive,
|
|
6
|
+
* sourcing the level-to-color mapping from `constants.json` (`memberLevel.colorMap`)
|
|
7
|
+
* with a nullish-coalescing fallback to the configured default color.
|
|
8
|
+
* @export
|
|
9
|
+
* @class MemberLevelBadgeComponent
|
|
10
|
+
*/
|
|
11
|
+
export declare class MemberLevelBadgeComponent {
|
|
12
|
+
constants: {
|
|
13
|
+
welcomeHeader: {
|
|
14
|
+
greeting: string;
|
|
15
|
+
fallbackGreeting: string;
|
|
16
|
+
helperText: string;
|
|
17
|
+
jumpToLabel: string;
|
|
18
|
+
shortcuts: {
|
|
19
|
+
meetings: {
|
|
20
|
+
label: string;
|
|
21
|
+
iconUrl: string;
|
|
22
|
+
ariaLabel: string;
|
|
23
|
+
};
|
|
24
|
+
groups: {
|
|
25
|
+
label: string;
|
|
26
|
+
iconUrl: string;
|
|
27
|
+
ariaLabel: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
upcomingSection: {
|
|
32
|
+
title: string;
|
|
33
|
+
viewAllLabel: string;
|
|
34
|
+
expandLabel: string;
|
|
35
|
+
collapseLabel: string;
|
|
36
|
+
ariaLabel: {
|
|
37
|
+
viewAll: string;
|
|
38
|
+
toggle: string;
|
|
39
|
+
};
|
|
40
|
+
emptyMessage: string;
|
|
41
|
+
errorMessage: string;
|
|
42
|
+
};
|
|
43
|
+
eventGroupCard: {
|
|
44
|
+
viewEventLabel: string;
|
|
45
|
+
meetingListToggle: {
|
|
46
|
+
showLabelPrefix: string;
|
|
47
|
+
showLabelSuffix: string;
|
|
48
|
+
hideLabel: string;
|
|
49
|
+
};
|
|
50
|
+
/** The Legend input consumed by the Presentation_Library Legend component. */
|
|
51
|
+
ariaLabel: {
|
|
52
|
+
viewEvent: string;
|
|
53
|
+
meetingListToggle: string;
|
|
54
|
+
};
|
|
55
|
+
paginator: {
|
|
56
|
+
rangeTemplate: string;
|
|
57
|
+
totalTemplate: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
meetingRow: {
|
|
61
|
+
emptyFieldPlaceholder: string;
|
|
62
|
+
currentlyAttendingIndicator: string;
|
|
63
|
+
logAttendanceLabel: string;
|
|
64
|
+
leaveMeetingLabel: string;
|
|
65
|
+
ariaLabel: {
|
|
66
|
+
meetingNameLink: string;
|
|
67
|
+
logAttendance: string;
|
|
68
|
+
leaveMeeting: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
groupsSection: {
|
|
72
|
+
title: string;
|
|
73
|
+
viewAllLabel: string;
|
|
74
|
+
expandLabel: string;
|
|
75
|
+
collapseLabel: string;
|
|
76
|
+
countSuffix: string;
|
|
77
|
+
emptyValue: string;
|
|
78
|
+
ariaLabel: {
|
|
79
|
+
viewAll: string;
|
|
80
|
+
toggle: string;
|
|
81
|
+
groupLink: string;
|
|
82
|
+
};
|
|
83
|
+
columns: {
|
|
84
|
+
group: string;
|
|
85
|
+
type: string;
|
|
86
|
+
officerRole: string;
|
|
87
|
+
affiliation: string;
|
|
88
|
+
memberLevel: string;
|
|
89
|
+
};
|
|
90
|
+
paginator: {
|
|
91
|
+
rangeTemplate: string;
|
|
92
|
+
totalTemplate: string;
|
|
93
|
+
};
|
|
94
|
+
memberLevelBadge: {
|
|
95
|
+
votingMember: string;
|
|
96
|
+
default: string;
|
|
97
|
+
};
|
|
98
|
+
emptyMessage: string;
|
|
99
|
+
errorMessage: string;
|
|
100
|
+
};
|
|
101
|
+
memberLevel: {
|
|
102
|
+
colorMap: {
|
|
103
|
+
"Voting Member": string;
|
|
104
|
+
Observer: string;
|
|
105
|
+
"Associate Member": string;
|
|
106
|
+
Member: string;
|
|
107
|
+
default: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
attendance: {
|
|
111
|
+
errorMessage: string;
|
|
112
|
+
};
|
|
113
|
+
footer: {
|
|
114
|
+
links: {
|
|
115
|
+
label: string;
|
|
116
|
+
target: string;
|
|
117
|
+
}[];
|
|
118
|
+
copyright: string;
|
|
119
|
+
};
|
|
120
|
+
defaultRouteConfig: {
|
|
121
|
+
eventDetail: string;
|
|
122
|
+
meetingDetail: string;
|
|
123
|
+
groupDetail: string;
|
|
124
|
+
viewAllEvents: string;
|
|
125
|
+
viewAllGroups: string;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
private memberLevelValue;
|
|
129
|
+
set memberLevel(value: string);
|
|
130
|
+
get memberLevel(): string;
|
|
131
|
+
/** The Legend input consumed by the Presentation_Library Legend component. */
|
|
132
|
+
legends: Legend[];
|
|
133
|
+
/**
|
|
134
|
+
* Builds the single-item Legend list for the supplied member level, resolving
|
|
135
|
+
* the pill color from the `constants.json` color map and falling back to the
|
|
136
|
+
* configured default color when the level has no explicit mapping.
|
|
137
|
+
* @param {string} memberLevel - The member-level label to render.
|
|
138
|
+
* @return {Legend[]} A single-element Legend array for the Legend component.
|
|
139
|
+
* @memberof MemberLevelBadgeComponent
|
|
140
|
+
*/
|
|
141
|
+
private buildLegends;
|
|
142
|
+
/**
|
|
143
|
+
* Resolves the CSS modifier class for a member level from the `constants.json`
|
|
144
|
+
* color map, using the `??` fallback to the `default` entry when the level is
|
|
145
|
+
* missing from the map.
|
|
146
|
+
* @param {string} memberLevel - The member-level label to resolve a color for.
|
|
147
|
+
* @return {string} The CSS modifier class applied to the pill.
|
|
148
|
+
* @memberof MemberLevelBadgeComponent
|
|
149
|
+
*/
|
|
150
|
+
private resolveColorClass;
|
|
151
|
+
/**
|
|
152
|
+
* Converts a shared-styles color token (for example `$ieeesa-color-success`)
|
|
153
|
+
* into a valid BEM-style CSS modifier class defined in this component's SCSS.
|
|
154
|
+
* @param {string} token - The color token from the color map.
|
|
155
|
+
* @return {string} A valid CSS class name.
|
|
156
|
+
* @memberof MemberLevelBadgeComponent
|
|
157
|
+
*/
|
|
158
|
+
private toColorClass;
|
|
159
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MemberLevelBadgeComponent, never>;
|
|
160
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MemberLevelBadgeComponent, "ieeesa-member-level-badge", never, { "memberLevel": { "alias": "memberLevel"; "required": false; }; }, {}, never, never, true, never>;
|
|
161
|
+
}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { AttendanceActionPermissions } from '../../models/attendance-action-permissions.model';
|
|
3
|
+
import { AttendanceState } from '../../models/attendance-state.model';
|
|
4
|
+
import { DashboardSectionState } from '../../models/dashboard-section-state.model';
|
|
5
|
+
import { PageChange } from '../../models/page-change.model';
|
|
6
|
+
import { UpcomingEvent } from '../../models/upcoming-event.model';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* Upcoming_Meetings_Events renders the "Upcoming Meetings & Events" dashboard
|
|
10
|
+
* section: a section title and "View All" link, a collapse/expand toggle that
|
|
11
|
+
* starts expanded, and one {@link EventGroupCardComponent} per upcoming event.
|
|
12
|
+
*
|
|
13
|
+
* The section is driven by its `sectionState` input: it shows the Loader while
|
|
14
|
+
* `LOADING`, the event-group cards while `LOADED`, the empty-state message while
|
|
15
|
+
* `EMPTY`, and the error message while `ERROR` — the four regions are mutually
|
|
16
|
+
* exclusive (Req 13.1, 13.2, 13.3, 13.5). The component is purely
|
|
17
|
+
* presentational: "View All" emits `viewAll` (Req 5.1, 5.2), the collapse toggle
|
|
18
|
+
* flips `isExpanded` and the card-list visibility while exposing
|
|
19
|
+
* `[attr.aria-expanded]` (Req 5.3, 5.4, 14.3), and each card is rendered via
|
|
20
|
+
* `*ngFor` with {@link trackByEventId} to preserve input order (Req 5.5, 5.6,
|
|
21
|
+
* 14.4). Card outputs (`viewEvent`/`openMeeting`/`logAttendance`/`leaveMeeting`)
|
|
22
|
+
* are bubbled upward unchanged, and each card's `pageChange` is mapped to
|
|
23
|
+
* `meetingPageChange` tagged with the originating event id (Req 6.9).
|
|
24
|
+
* @export
|
|
25
|
+
* @class UpcomingMeetingsEventsComponent
|
|
26
|
+
*/
|
|
27
|
+
export declare class UpcomingMeetingsEventsComponent {
|
|
28
|
+
/** User-facing strings sourced from `constants.json`. */
|
|
29
|
+
constants: {
|
|
30
|
+
welcomeHeader: {
|
|
31
|
+
greeting: string;
|
|
32
|
+
fallbackGreeting: string;
|
|
33
|
+
helperText: string;
|
|
34
|
+
jumpToLabel: string;
|
|
35
|
+
shortcuts: {
|
|
36
|
+
meetings: {
|
|
37
|
+
label: string;
|
|
38
|
+
iconUrl: string;
|
|
39
|
+
ariaLabel: string;
|
|
40
|
+
};
|
|
41
|
+
groups: {
|
|
42
|
+
label: string;
|
|
43
|
+
iconUrl: string;
|
|
44
|
+
ariaLabel: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
upcomingSection: {
|
|
49
|
+
title: string;
|
|
50
|
+
viewAllLabel: string;
|
|
51
|
+
expandLabel: string;
|
|
52
|
+
collapseLabel: string;
|
|
53
|
+
ariaLabel: {
|
|
54
|
+
viewAll: string;
|
|
55
|
+
toggle: string;
|
|
56
|
+
};
|
|
57
|
+
emptyMessage: string;
|
|
58
|
+
errorMessage: string;
|
|
59
|
+
};
|
|
60
|
+
eventGroupCard: {
|
|
61
|
+
viewEventLabel: string;
|
|
62
|
+
meetingListToggle: {
|
|
63
|
+
showLabelPrefix: string;
|
|
64
|
+
showLabelSuffix: string;
|
|
65
|
+
hideLabel: string;
|
|
66
|
+
};
|
|
67
|
+
ariaLabel: {
|
|
68
|
+
viewEvent: string;
|
|
69
|
+
meetingListToggle: string;
|
|
70
|
+
};
|
|
71
|
+
paginator: {
|
|
72
|
+
rangeTemplate: string;
|
|
73
|
+
totalTemplate: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
meetingRow: {
|
|
77
|
+
emptyFieldPlaceholder: string;
|
|
78
|
+
currentlyAttendingIndicator: string;
|
|
79
|
+
logAttendanceLabel: string;
|
|
80
|
+
leaveMeetingLabel: string;
|
|
81
|
+
ariaLabel: {
|
|
82
|
+
meetingNameLink: string;
|
|
83
|
+
logAttendance: string;
|
|
84
|
+
leaveMeeting: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
groupsSection: {
|
|
88
|
+
title: string;
|
|
89
|
+
viewAllLabel: string;
|
|
90
|
+
expandLabel: string;
|
|
91
|
+
collapseLabel: string;
|
|
92
|
+
countSuffix: string;
|
|
93
|
+
emptyValue: string;
|
|
94
|
+
ariaLabel: {
|
|
95
|
+
viewAll: string;
|
|
96
|
+
toggle: string;
|
|
97
|
+
groupLink: string;
|
|
98
|
+
};
|
|
99
|
+
columns: {
|
|
100
|
+
group: string;
|
|
101
|
+
type: string;
|
|
102
|
+
officerRole: string;
|
|
103
|
+
/** Enum reference for template comparisons against `sectionState`. */
|
|
104
|
+
affiliation: string;
|
|
105
|
+
memberLevel: string;
|
|
106
|
+
};
|
|
107
|
+
paginator: {
|
|
108
|
+
rangeTemplate: string;
|
|
109
|
+
totalTemplate: string;
|
|
110
|
+
};
|
|
111
|
+
memberLevelBadge: {
|
|
112
|
+
votingMember: string;
|
|
113
|
+
default: string;
|
|
114
|
+
};
|
|
115
|
+
emptyMessage: string; /** Host permissions gating the per-row log-attendance / leave-meeting buttons. */
|
|
116
|
+
errorMessage: string;
|
|
117
|
+
};
|
|
118
|
+
memberLevel: {
|
|
119
|
+
colorMap: {
|
|
120
|
+
"Voting Member": string;
|
|
121
|
+
Observer: string;
|
|
122
|
+
/** Map of meeting id to current attendance state, passed down to each card. */
|
|
123
|
+
"Associate Member": string;
|
|
124
|
+
Member: string;
|
|
125
|
+
default: string;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
attendance: {
|
|
129
|
+
errorMessage: string;
|
|
130
|
+
};
|
|
131
|
+
footer: {
|
|
132
|
+
links: {
|
|
133
|
+
label: string;
|
|
134
|
+
target: string;
|
|
135
|
+
}[];
|
|
136
|
+
copyright: string;
|
|
137
|
+
};
|
|
138
|
+
defaultRouteConfig: {
|
|
139
|
+
eventDetail: string;
|
|
140
|
+
meetingDetail: string;
|
|
141
|
+
groupDetail: string;
|
|
142
|
+
/**
|
|
143
|
+
* `trackBy` for the event-group-card `*ngFor`, keyed by the stable event id so
|
|
144
|
+
* Angular renders exactly one card per event in input order (Req 5.5, 5.6, 14.4).
|
|
145
|
+
* @param {number} index - The iteration index (fallback key).
|
|
146
|
+
* @param {UpcomingEvent} event - The event for this card.
|
|
147
|
+
* @return {string} The stable track key (event id).
|
|
148
|
+
* @memberof UpcomingMeetingsEventsComponent
|
|
149
|
+
*/
|
|
150
|
+
viewAllEvents: string;
|
|
151
|
+
viewAllGroups: string;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
/** Enum reference for template comparisons against `sectionState`. */
|
|
155
|
+
readonly sectionStates: typeof DashboardSectionState;
|
|
156
|
+
/** The upcoming events rendered as event-group cards (Req 5.5, 5.6). */
|
|
157
|
+
events: UpcomingEvent[];
|
|
158
|
+
/** The load/empty/error status driving the section's mutually exclusive regions. */
|
|
159
|
+
sectionState: DashboardSectionState;
|
|
160
|
+
/** Host permissions gating the per-row log-attendance / leave-meeting buttons. */
|
|
161
|
+
permissions: AttendanceActionPermissions;
|
|
162
|
+
/** Map of meeting id to current attendance state, passed down to each card. */
|
|
163
|
+
attendanceStates: Record<string, AttendanceState>;
|
|
164
|
+
/** Set of meeting ids with an attendance action awaiting resolution. */
|
|
165
|
+
inFlightMeetingIds: ReadonlySet<string>;
|
|
166
|
+
/** Whether the host has determined the viewport is at/below the mobile breakpoint. */
|
|
167
|
+
isMobileView: boolean;
|
|
168
|
+
/** Emits when the "View All" link is activated (Req 5.2). */
|
|
169
|
+
viewAll: EventEmitter<void>;
|
|
170
|
+
/** Bubbles the event id when a card's "View Event" button is activated (Req 6.4). */
|
|
171
|
+
viewEvent: EventEmitter<string>;
|
|
172
|
+
/** Bubbles the meeting id when a card's meeting-name link is activated (Req 7.4). */
|
|
173
|
+
openMeeting: EventEmitter<string>;
|
|
174
|
+
/** Bubbles the meeting id when a card requests logging attendance (Req 7.7). */
|
|
175
|
+
logAttendance: EventEmitter<string>;
|
|
176
|
+
/** Bubbles the meeting id when a card requests leaving the meeting (Req 7.8). */
|
|
177
|
+
leaveMeeting: EventEmitter<string>;
|
|
178
|
+
/** Emits the requested page tagged with its event id when a card paginates (Req 6.9). */
|
|
179
|
+
meetingPageChange: EventEmitter<{
|
|
180
|
+
eventId: string;
|
|
181
|
+
} & PageChange>;
|
|
182
|
+
/** Whether the section's card list is currently expanded; starts collapsed. */
|
|
183
|
+
isExpanded: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* `trackBy` for the event-group-card `*ngFor`, keyed by the stable event id so
|
|
186
|
+
* Angular renders exactly one card per event in input order (Req 5.5, 5.6, 14.4).
|
|
187
|
+
* @param {number} index - The iteration index (fallback key).
|
|
188
|
+
* @param {UpcomingEvent} event - The event for this card.
|
|
189
|
+
* @return {string} The stable track key (event id).
|
|
190
|
+
* @memberof UpcomingMeetingsEventsComponent
|
|
191
|
+
*/
|
|
192
|
+
trackByEventId(index: number, event: UpcomingEvent): string;
|
|
193
|
+
/**
|
|
194
|
+
* Toggles the section's expanded/collapsed state, inverting the card-list
|
|
195
|
+
* visibility and the exposed `aria-expanded` value (Req 5.4, 14.3).
|
|
196
|
+
* @memberof UpcomingMeetingsEventsComponent
|
|
197
|
+
*/
|
|
198
|
+
onToggleExpanded(): void;
|
|
199
|
+
/**
|
|
200
|
+
* Handles the "View All" link, emitting the `viewAll` intent to the host (Req 5.2).
|
|
201
|
+
* @memberof UpcomingMeetingsEventsComponent
|
|
202
|
+
*/
|
|
203
|
+
onViewAll(): void;
|
|
204
|
+
/**
|
|
205
|
+
* Bubbles a card's "View Event" activation upward (Req 6.4).
|
|
206
|
+
* @param {string} eventId - The event id emitted by the card.
|
|
207
|
+
* @memberof UpcomingMeetingsEventsComponent
|
|
208
|
+
*/
|
|
209
|
+
onViewEvent(eventId: string): void;
|
|
210
|
+
/**
|
|
211
|
+
* Bubbles a card's meeting-name link activation upward (Req 7.4).
|
|
212
|
+
* @param {string} meetingId - The meeting id emitted by the card.
|
|
213
|
+
* @memberof UpcomingMeetingsEventsComponent
|
|
214
|
+
*/
|
|
215
|
+
onOpenMeeting(meetingId: string): void;
|
|
216
|
+
/**
|
|
217
|
+
* Bubbles a card's log-attendance request upward (Req 7.7).
|
|
218
|
+
* @param {string} meetingId - The meeting id emitted by the card.
|
|
219
|
+
* @memberof UpcomingMeetingsEventsComponent
|
|
220
|
+
*/
|
|
221
|
+
onLogAttendance(meetingId: string): void;
|
|
222
|
+
/**
|
|
223
|
+
* Bubbles a card's leave-meeting request upward (Req 7.8).
|
|
224
|
+
* @param {string} meetingId - The meeting id emitted by the card.
|
|
225
|
+
* @memberof UpcomingMeetingsEventsComponent
|
|
226
|
+
*/
|
|
227
|
+
onLeaveMeeting(meetingId: string): void;
|
|
228
|
+
/**
|
|
229
|
+
* Maps a card's `pageChange` into a `meetingPageChange` tagged with the
|
|
230
|
+
* originating event id so the host can page the correct event (Req 6.9).
|
|
231
|
+
* @param {string} eventId - The id of the event whose card paginated.
|
|
232
|
+
* @param {PageChange} page - The requested page from the card paginator.
|
|
233
|
+
* @memberof UpcomingMeetingsEventsComponent
|
|
234
|
+
*/
|
|
235
|
+
onMeetingPageChange(eventId: string, page: PageChange): void;
|
|
236
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UpcomingMeetingsEventsComponent, never>;
|
|
237
|
+
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; }; }, { "viewAll": "viewAll"; "viewEvent": "viewEvent"; "openMeeting": "openMeeting"; "logAttendance": "logAttendance"; "leaveMeeting": "leaveMeeting"; "meetingPageChange": "meetingPageChange"; }, never, never, true, never>;
|
|
238
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Identifies which dashboard section a "Jump to" shortcut targets, emitted via
|
|
5
|
+
* {@link DashboardWelcomeHeaderComponent.shortcutSelected} for the host/container
|
|
6
|
+
* to scroll to or navigate.
|
|
7
|
+
*/
|
|
8
|
+
export declare enum DashboardJumpTarget {
|
|
9
|
+
MEETINGS = "MEETINGS",
|
|
10
|
+
GROUPS = "GROUPS"
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A single "Jump to" shortcut rendered in the welcome header: a circular icon
|
|
14
|
+
* that expands on hover/focus into a pill showing the section label and its
|
|
15
|
+
* count badge.
|
|
16
|
+
*/
|
|
17
|
+
interface JumpShortcut {
|
|
18
|
+
target: DashboardJumpTarget;
|
|
19
|
+
label: string;
|
|
20
|
+
iconUrl: string;
|
|
21
|
+
ariaLabel: string;
|
|
22
|
+
count: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Welcome_Header renders the personalized greeting and the "Jump to" shortcut
|
|
26
|
+
* control at the top of the dashboard.
|
|
27
|
+
*
|
|
28
|
+
* The greeting is composed from the greeting label in `constants.json` and the
|
|
29
|
+
* supplied `userName`, falling back to the configured fallback greeting when the
|
|
30
|
+
* name is empty or undefined. The "Jump to" control shows one circular icon per
|
|
31
|
+
* dashboard section (Upcoming Meetings & Events, Your Groups); hovering or
|
|
32
|
+
* focusing an icon expands it into a pill with the section label and a count
|
|
33
|
+
* badge (the counts are supplied by the host via `meetingsCount` /
|
|
34
|
+
* `groupsCount`). Activating a shortcut emits {@link shortcutSelected} with the
|
|
35
|
+
* target section for the host to act on. Purely presentational — no API work.
|
|
36
|
+
* @export
|
|
37
|
+
* @class DashboardWelcomeHeaderComponent
|
|
38
|
+
*/
|
|
39
|
+
export declare class DashboardWelcomeHeaderComponent {
|
|
40
|
+
private readonly constants;
|
|
41
|
+
/** User-facing strings sourced from `constants.json`. */
|
|
42
|
+
readonly texts: any;
|
|
43
|
+
/** Enum reference for template comparisons. */
|
|
44
|
+
readonly jumpTarget: typeof DashboardJumpTarget;
|
|
45
|
+
private userNameValue;
|
|
46
|
+
/**
|
|
47
|
+
* The signed-in user's display name. Drives the personalized greeting; when
|
|
48
|
+
* empty or undefined the greeting falls back to the configured fallback text.
|
|
49
|
+
* @memberof DashboardWelcomeHeaderComponent
|
|
50
|
+
*/
|
|
51
|
+
set userName(value: string);
|
|
52
|
+
get userName(): string;
|
|
53
|
+
private meetingsCountValue;
|
|
54
|
+
/** Count shown in the Upcoming Meetings & Events shortcut badge. */
|
|
55
|
+
set meetingsCount(value: number);
|
|
56
|
+
get meetingsCount(): number;
|
|
57
|
+
private groupsCountValue;
|
|
58
|
+
/** Count shown in the Your Groups shortcut badge. */
|
|
59
|
+
set groupsCount(value: number);
|
|
60
|
+
get groupsCount(): number;
|
|
61
|
+
/** Emits the selected "Jump to" target for the host to act on. */
|
|
62
|
+
shortcutSelected: EventEmitter<DashboardJumpTarget>;
|
|
63
|
+
/** The jump shortcuts rendered in the control, rebuilt when counts change. */
|
|
64
|
+
shortcuts: JumpShortcut[];
|
|
65
|
+
/**
|
|
66
|
+
* The personalized greeting: the greeting label plus the user's name when
|
|
67
|
+
* present, otherwise the configured fallback greeting.
|
|
68
|
+
* @readonly
|
|
69
|
+
* @memberof DashboardWelcomeHeaderComponent
|
|
70
|
+
*/
|
|
71
|
+
get greeting(): string;
|
|
72
|
+
/**
|
|
73
|
+
* Emits the chosen shortcut's target for the host to scroll/navigate to.
|
|
74
|
+
* @param {DashboardJumpTarget} target - The selected section.
|
|
75
|
+
* @memberof DashboardWelcomeHeaderComponent
|
|
76
|
+
*/
|
|
77
|
+
onShortcutClick(target: DashboardJumpTarget): void;
|
|
78
|
+
/**
|
|
79
|
+
* TrackBy for the shortcut list.
|
|
80
|
+
* @param {number} _index
|
|
81
|
+
* @param {JumpShortcut} shortcut
|
|
82
|
+
* @return {string}
|
|
83
|
+
* @memberof DashboardWelcomeHeaderComponent
|
|
84
|
+
*/
|
|
85
|
+
trackByTarget(_index: number, shortcut: JumpShortcut): string;
|
|
86
|
+
/** Rebuilds the shortcut list so the template reflects the latest counts. */
|
|
87
|
+
private buildShortcuts;
|
|
88
|
+
/**
|
|
89
|
+
* Builds the shortcut view models from `constants.json` and the current
|
|
90
|
+
* counts.
|
|
91
|
+
* @return {JumpShortcut[]}
|
|
92
|
+
* @memberof DashboardWelcomeHeaderComponent
|
|
93
|
+
*/
|
|
94
|
+
private buildShortcutList;
|
|
95
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DashboardWelcomeHeaderComponent, never>;
|
|
96
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DashboardWelcomeHeaderComponent, "ieeesa-dashboard-welcome-header", never, { "userName": { "alias": "userName"; "required": false; }; "meetingsCount": { "alias": "meetingsCount"; "required": false; }; "groupsCount": { "alias": "groupsCount"; "required": false; }; }, { "shortcutSelected": "shortcutSelected"; }, never, never, true, never>;
|
|
97
|
+
}
|
|
98
|
+
export {};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { PageEvent } from '@angular/material/paginator';
|
|
3
|
+
import { PaginatorConfig, TableActions, TableColumnSchema } from '@ieeesa-npm/presentation';
|
|
4
|
+
import { DashboardSectionState } from '../../models/dashboard-section-state.model';
|
|
5
|
+
import { GroupRow } from '../../models/group-row.model';
|
|
6
|
+
import { PageChange } from '../../models/page-change.model';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* Groups_Section (`ieeesa-your-groups`) renders the signed-in user's groups as a
|
|
10
|
+
* paginated table inside a collapsible card. It shows the section title and a
|
|
11
|
+
* "{n} Groups" count, a "View All" link, and a collapse/expand toggle that
|
|
12
|
+
* controls the table's visibility (reflected via `[attr.aria-expanded]`). When
|
|
13
|
+
* loaded it renders the groups table with the Presentation_Library
|
|
14
|
+
* {@link DataTableComponent} using the columns Group, Type, Officer Role,
|
|
15
|
+
* Affiliation, and Member Level (labels sourced from `constants.json`). The
|
|
16
|
+
* Group cell is a LINK column that emits `groupSelected(groupId)`, and the
|
|
17
|
+
* Member Level cell renders as a colored pill via the data-table's inline-badge
|
|
18
|
+
* mechanism (green for voting-type levels, amber otherwise).
|
|
19
|
+
*
|
|
20
|
+
* The section is purely presentational: it emits navigation and pagination
|
|
21
|
+
* intents via `@Output()` and never performs navigation or HTTP itself. The
|
|
22
|
+
* Loader / empty-state / error regions are mutually exclusive and driven solely
|
|
23
|
+
* by the `sectionState` input.
|
|
24
|
+
* @export
|
|
25
|
+
* @class YourGroupsComponent
|
|
26
|
+
*/
|
|
27
|
+
export declare class YourGroupsComponent {
|
|
28
|
+
private readonly constants;
|
|
29
|
+
/** User-facing strings sourced from `constants.json`. */
|
|
30
|
+
readonly texts: any;
|
|
31
|
+
/** Enum reference for template comparisons against `sectionState`. */
|
|
32
|
+
readonly sectionStates: typeof DashboardSectionState;
|
|
33
|
+
/**
|
|
34
|
+
* The groups rendered in the table. Defaults to the dummy fixture so the
|
|
35
|
+
* table shows immediately while the API integration is pending; the host can
|
|
36
|
+
* override it once real data is wired in.
|
|
37
|
+
*/
|
|
38
|
+
groups: GroupRow[];
|
|
39
|
+
/**
|
|
40
|
+
* The section's load/empty/error state driving the mutually-exclusive
|
|
41
|
+
* regions. Defaults to LOADED (no loader) since the component renders dummy
|
|
42
|
+
* data for now; the host can set LOADING/EMPTY/ERROR once the API is wired.
|
|
43
|
+
*/
|
|
44
|
+
sectionState: DashboardSectionState;
|
|
45
|
+
/** Total number of groups (for the "{n} Groups" count and paginator). */
|
|
46
|
+
totalGroups: number;
|
|
47
|
+
/** Current zero-based page index. */
|
|
48
|
+
pageIndex: number;
|
|
49
|
+
/** Current page size. */
|
|
50
|
+
pageSize: number;
|
|
51
|
+
/** Emits the selected group's id when its name link is clicked. */
|
|
52
|
+
groupSelected: EventEmitter<string>;
|
|
53
|
+
/** Emits when the "View All" link is activated. */
|
|
54
|
+
viewAllGroups: EventEmitter<void>;
|
|
55
|
+
/** Emits the requested page when the paginator changes. */
|
|
56
|
+
pageChange: EventEmitter<PageChange>;
|
|
57
|
+
/** Whether the card is expanded (table visible). Starts collapsed. */
|
|
58
|
+
isExpanded: boolean;
|
|
59
|
+
/** Data-table action flags: pagination only (no search/filter/add/edit). */
|
|
60
|
+
readonly tableActions: TableActions;
|
|
61
|
+
/**
|
|
62
|
+
* The count shown in the header subtitle, preferring the server total and
|
|
63
|
+
* falling back to the current page length.
|
|
64
|
+
* @readonly
|
|
65
|
+
* @memberof YourGroupsComponent
|
|
66
|
+
*/
|
|
67
|
+
get groupCount(): number;
|
|
68
|
+
/**
|
|
69
|
+
* The paginator config derived from the total/pageSize inputs.
|
|
70
|
+
* @readonly
|
|
71
|
+
* @memberof YourGroupsComponent
|
|
72
|
+
*/
|
|
73
|
+
get paginatorConfig(): PaginatorConfig;
|
|
74
|
+
/** Column schema for the groups data table. */
|
|
75
|
+
readonly columnSchema: TableColumnSchema[];
|
|
76
|
+
/**
|
|
77
|
+
* Toggles the card's expanded/collapsed state (table visibility).
|
|
78
|
+
* @memberof YourGroupsComponent
|
|
79
|
+
*/
|
|
80
|
+
onToggleExpand(): void;
|
|
81
|
+
/**
|
|
82
|
+
* Emits the "View All" intent for the host.
|
|
83
|
+
* @memberof YourGroupsComponent
|
|
84
|
+
*/
|
|
85
|
+
onViewAll(): void;
|
|
86
|
+
/**
|
|
87
|
+
* Emits the selected group's id from the data-table link click.
|
|
88
|
+
* @param {{ row: GroupRow }} event - The data-table link-click payload.
|
|
89
|
+
* @memberof YourGroupsComponent
|
|
90
|
+
*/
|
|
91
|
+
onGroupLinkClick(event: {
|
|
92
|
+
row: GroupRow;
|
|
93
|
+
}): void;
|
|
94
|
+
/**
|
|
95
|
+
* Re-emits the paginator change as a {@link PageChange}.
|
|
96
|
+
* @param {PageEvent} event - The Material paginator event.
|
|
97
|
+
* @memberof YourGroupsComponent
|
|
98
|
+
*/
|
|
99
|
+
onPageChange(event: PageEvent): void;
|
|
100
|
+
/**
|
|
101
|
+
* Resolves the pill CSS class for a member level: the configured "success"
|
|
102
|
+
* (green) class for voting-type levels, otherwise the "warning" (amber) class.
|
|
103
|
+
* @param {string} memberLevel - The member level label.
|
|
104
|
+
* @return {string}
|
|
105
|
+
* @memberof YourGroupsComponent
|
|
106
|
+
*/
|
|
107
|
+
private resolveBadgeClass;
|
|
108
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<YourGroupsComponent, never>;
|
|
109
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<YourGroupsComponent, "ieeesa-your-groups", never, { "groups": { "alias": "groups"; "required": false; }; "sectionState": { "alias": "sectionState"; "required": false; }; "totalGroups": { "alias": "totalGroups"; "required": false; }; "pageIndex": { "alias": "pageIndex"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; }, { "groupSelected": "groupSelected"; "viewAllGroups": "viewAllGroups"; "pageChange": "pageChange"; }, never, never, true, never>;
|
|
110
|
+
}
|