@local-civics/mgmt-ui 0.1.256 → 0.1.257

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/dist/index.d.ts CHANGED
@@ -76,6 +76,37 @@ type SwitchAccountProps = {
76
76
  */
77
77
  declare const SwitchAccount: (props: SwitchAccountProps) => JSX.Element;
78
78
 
79
+ /**
80
+ * StudentStatusFilter - "all" is the default. Callers keep this as controlled state (one level
81
+ * above the page component) because the same value also decides who belongs in the Prev/Next
82
+ * grading queue built for a "By student" tab's rows.
83
+ */
84
+ type StudentStatusFilter = "all" | "submitted" | "active" | "inactive";
85
+ /**
86
+ * The one rule behind the status pills: "submitted" = complete, "active" = started but not
87
+ * complete, "inactive" = neither. Exported so hub's grading-queue filter and the table stay in
88
+ * lockstep instead of each re-deriving it.
89
+ */
90
+ declare const matchesStudentStatus: (student: {
91
+ isComplete?: boolean;
92
+ isStarted?: boolean;
93
+ }, filter: StudentStatusFilter) => boolean;
94
+ /**
95
+ * StudentStatusFilterBarProps
96
+ */
97
+ type StudentStatusFilterBarProps = {
98
+ statusFilter: StudentStatusFilter;
99
+ onStatusFilterChange?: (filter: StudentStatusFilter) => void;
100
+ search: string;
101
+ onSearchChange: (search: string) => void;
102
+ };
103
+ /**
104
+ * Status pills plus a name search, shown above a "By student" table (Lesson and Badge Overview).
105
+ * @param props
106
+ * @constructor
107
+ */
108
+ declare const StudentStatusFilterBar: (props: StudentStatusFilterBarProps) => JSX.Element;
109
+
79
110
  /**
80
111
  * PageHeaderBreadcrumbSegment
81
112
  */
@@ -104,6 +135,7 @@ interface Item$g {
104
135
  name: string;
105
136
  email: string;
106
137
  isComplete?: boolean;
138
+ isStarted?: boolean;
107
139
  lessons: Item$h[];
108
140
  }
109
141
 
@@ -121,6 +153,10 @@ interface Item$f {
121
153
  * BadgeUserItem
122
154
  */
123
155
  type BadgeUserItem = Item$g;
156
+ /**
157
+ * BadgeStudentStatusFilter - an alias of the shared StudentStatusFilter, matching Lesson's.
158
+ */
159
+ type BadgeStudentStatusFilter = StudentStatusFilter;
124
160
  /**
125
161
  * BadgeClass
126
162
  */
@@ -135,6 +171,7 @@ type BadgeClass = {
135
171
  type BadgeProps = {
136
172
  loading: boolean;
137
173
  exportDisabled?: boolean;
174
+ activityLoading?: boolean;
138
175
  displayName: string;
139
176
  description: string;
140
177
  imageURL?: string;
@@ -149,6 +186,9 @@ type BadgeProps = {
149
186
  pathwayId?: string;
150
187
  breadcrumb?: PageHeaderBreadcrumbSegment[];
151
188
  linkState?: any;
189
+ statusFilter?: BadgeStudentStatusFilter;
190
+ onStatusFilterChange?: (filter: BadgeStudentStatusFilter) => void;
191
+ onStudentClick?: (userId: string) => void;
152
192
  onBackClick: () => void;
153
193
  onClassChange: (classId: string) => void;
154
194
  onCopyLinkClick: () => void;
@@ -413,18 +453,17 @@ type LessonClass = {
413
453
  active: boolean;
414
454
  };
415
455
  /**
416
- * LessonStudentStatusFilter - "all" is the default. Controlled (not local) state, unlike the
417
- * name search below - the caller also uses this same value to decide who belongs in the
418
- * Prev/Next grading queue built for the "By student" tab's rows, so it has to live one level up
419
- * rather than being a purely presentational concern of this component.
456
+ * LessonStudentStatusFilter - kept as an alias of the shared StudentStatusFilter, since hub
457
+ * imports it by this name.
420
458
  */
421
- type LessonStudentStatusFilter = "all" | "submitted" | "active" | "inactive";
459
+ type LessonStudentStatusFilter = StudentStatusFilter;
422
460
  /**
423
461
  * LessonProps
424
462
  */
425
463
  type LessonProps = {
426
464
  loading: boolean;
427
465
  exportDisabled?: boolean;
466
+ activityLoading?: boolean;
428
467
  displayName: string;
429
468
  description: string;
430
469
  href: string;
@@ -441,6 +480,7 @@ type LessonProps = {
441
480
  linkState?: any;
442
481
  statusFilter?: LessonStudentStatusFilter;
443
482
  onStatusFilterChange?: (filter: LessonStudentStatusFilter) => void;
483
+ onStudentClick?: (userId: string) => void;
444
484
  onBackClick: () => void;
445
485
  onClassChange: (classId: string) => void;
446
486
  onCopyLinkClick: () => void;
@@ -760,6 +800,7 @@ type PathwayClass = {
760
800
  type PathwayProps = {
761
801
  loading: boolean;
762
802
  exportDisabled?: boolean;
803
+ activityLoading?: boolean;
763
804
  title: string;
764
805
  description: string;
765
806
  imageURL?: string;
@@ -1023,7 +1064,7 @@ type ValidationCenterProps = {
1023
1064
  students: ValidationCenterStudent[];
1024
1065
  onClassChange: (classId: string) => void;
1025
1066
  onBadgeChange: (badgeId: string) => void;
1026
- onSubmit: (userIds: string[]) => void;
1067
+ onSubmit: (userIds: string[]) => void | Promise<boolean | void>;
1027
1068
  };
1028
1069
  /**
1029
1070
  * ValidationCenter. Lets an educator directly credit one or more students for a badge - superseding
@@ -1077,4 +1118,4 @@ type SubmissionCommentPanelProps = {
1077
1118
  */
1078
1119
  declare function SubmissionCommentPanel(props: SubmissionCommentPanelProps): JSX.Element;
1079
1120
 
1080
- export { AccountItem, AdminProvider, AdminProviderProps, App, AppProps, Badge, BadgeClass, BadgeItem, BadgeProps, BadgeUserItem, Badges, BadgesProps, Class, ClassItem, ClassProps, Classes, ClassesProps, CommentCenter, CommentCenterClass, CommentCenterItem, CommentCenterProps, CommentCenterStudentClickContext, FileLocker, FileLockerClass, FileLockerProps, FileLockerUserItem, GettingStarted, GettingStartedProps, Home, HomeProps, Lesson, LessonClass, LessonItem, LessonProps, LessonStudentStatusFilter, LessonUserItem, Lessons, LessonsProps, MemberItem, Navbar, NavbarProps, NewTrialRegistration, Organization, OrganizationProps, Pathway, PathwayClass, PathwayProps, PathwayUserItem, Pathways, PathwaysItem, PathwaysProps, People, PeopleProps, StartAnonymousLesson, StartAnonymousLessonProps, Student, StudentProps, SubmissionComment, SubmissionCommentPanel, SubmissionCommentPanelProps, SwitchAccount, SwitchAccountProps, TrialHome, TrialHomeProps, TrialRegistration, TrialRegistrationProps, UserItem, ValidationCenter, ValidationCenterBadge, ValidationCenterClass, ValidationCenterProps, ValidationCenterStudent };
1121
+ export { AccountItem, AdminProvider, AdminProviderProps, App, AppProps, Badge, BadgeClass, BadgeItem, BadgeProps, BadgeStudentStatusFilter, BadgeUserItem, Badges, BadgesProps, Class, ClassItem, ClassProps, Classes, ClassesProps, CommentCenter, CommentCenterClass, CommentCenterItem, CommentCenterProps, CommentCenterStudentClickContext, FileLocker, FileLockerClass, FileLockerProps, FileLockerUserItem, GettingStarted, GettingStartedProps, Home, HomeProps, Lesson, LessonClass, LessonItem, LessonProps, LessonStudentStatusFilter, LessonUserItem, Lessons, LessonsProps, MemberItem, Navbar, NavbarProps, NewTrialRegistration, Organization, OrganizationProps, Pathway, PathwayClass, PathwayProps, PathwayUserItem, Pathways, PathwaysItem, PathwaysProps, People, PeopleProps, StartAnonymousLesson, StartAnonymousLessonProps, Student, StudentProps, StudentStatusFilter, StudentStatusFilterBar, StudentStatusFilterBarProps, SubmissionComment, SubmissionCommentPanel, SubmissionCommentPanelProps, SwitchAccount, SwitchAccountProps, TrialHome, TrialHomeProps, TrialRegistration, TrialRegistrationProps, UserItem, ValidationCenter, ValidationCenterBadge, ValidationCenterClass, ValidationCenterProps, ValidationCenterStudent, matchesStudentStatus };