@local-civics/mgmt-ui 0.1.231 → 0.1.233

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
@@ -879,6 +879,39 @@ interface SubmissionItem {
879
879
  pathwayId?: string;
880
880
  }
881
881
 
882
+ /**
883
+ * LeaveCommentStudentOption
884
+ */
885
+ type LeaveCommentStudentOption = {
886
+ userId: string;
887
+ name: string;
888
+ email?: string;
889
+ };
890
+ /**
891
+ * LeaveCommentBadgeOption
892
+ */
893
+ type LeaveCommentBadgeOption = {
894
+ badgeId: string;
895
+ displayName: string;
896
+ };
897
+ /**
898
+ * LeaveCommentLessonOption
899
+ */
900
+ type LeaveCommentLessonOption = {
901
+ lessonId: string;
902
+ displayName: string;
903
+ };
904
+ /**
905
+ * LeaveCommentPayload
906
+ */
907
+ type LeaveCommentPayload = {
908
+ userId: string;
909
+ commentText: string;
910
+ requireValidation: boolean;
911
+ badgeId?: string;
912
+ lessonId?: string;
913
+ };
914
+
882
915
  /**
883
916
  * FileLockerUserItem
884
917
  */
@@ -926,6 +959,7 @@ type FileLockerProps = {
926
959
  onBadgeClick?: (badgeId: string) => void;
927
960
  onLessonClick?: (lessonId: string) => void;
928
961
  onPathwayClick?: (pathwayId: string) => void;
962
+ onComment?: (comment: LeaveCommentPayload) => void;
929
963
  };
930
964
  /**
931
965
  * FileLocker
@@ -934,4 +968,104 @@ type FileLockerProps = {
934
968
  */
935
969
  declare const FileLocker: (props: FileLockerProps) => JSX.Element;
936
970
 
937
- export { AccountItem, AdminProvider, AdminProviderProps, App, AppProps, Badge, BadgeClass, BadgeItem, BadgeProps, BadgeUserItem, Badges, BadgesProps, Class, ClassItem, ClassProps, Classes, ClassesProps, Dashboard, DashboardClass, DashboardProps, FileLocker, FileLockerClass, FileLockerProps, FileLockerUserItem, GettingStarted, GettingStartedProps, Home, HomeProps, Lesson, LessonClass, LessonItem, LessonProps, LessonUserItem, Lessons, LessonsProps, MemberItem, Navbar, NavbarProps, NewTrialRegistration, Organization, OrganizationProps, Pathway, PathwayClass, PathwayProps, PathwayUserItem, Pathways, PathwaysItem, PathwaysProps, People, PeopleProps, StartAnonymousLesson, StartAnonymousLessonProps, Student, StudentProps, SwitchAccount, SwitchAccountProps, TrialHome, TrialHomeProps, TrialRegistration, TrialRegistrationProps, UserItem };
971
+ /**
972
+ * CommentCenterClass
973
+ */
974
+ type CommentCenterClass = {
975
+ classId: string;
976
+ name: string;
977
+ active: boolean;
978
+ };
979
+ /**
980
+ * CommentCenterItem
981
+ */
982
+ type CommentCenterItem = {
983
+ commentId: string;
984
+ recipientId: string;
985
+ recipientName: string;
986
+ authorId: string;
987
+ authorName?: string;
988
+ badgeId?: string;
989
+ badgeName?: string;
990
+ lessonId?: string;
991
+ lessonName?: string;
992
+ commentText: string;
993
+ requireValidation: boolean;
994
+ resolvedAt?: string;
995
+ createdAt: string;
996
+ };
997
+ /**
998
+ * CommentCenterProps
999
+ */
1000
+ type CommentCenterProps = {
1001
+ loading: boolean;
1002
+ classes: CommentCenterClass[];
1003
+ classId: string;
1004
+ comments: CommentCenterItem[];
1005
+ students: LeaveCommentStudentOption[];
1006
+ badges: LeaveCommentBadgeOption[];
1007
+ lessons: LeaveCommentLessonOption[];
1008
+ onClassChange: (classId: string) => void;
1009
+ onResolve: (commentId: string) => void;
1010
+ onLeaveComment: (comment: LeaveCommentPayload) => void;
1011
+ };
1012
+ /**
1013
+ * CommentCenter. Org-wide view of every comment left across the organization - grouped by student,
1014
+ * badge, or lesson via the same pill-tab selector and class dropdown FileLocker uses - with the
1015
+ * ability to resolve any comment that requires validation (see Comment.RequireValidation on the
1016
+ * backend) and to leave a brand new comment for any student via LeaveCommentModal.
1017
+ * @param props
1018
+ * @constructor
1019
+ */
1020
+ declare const CommentCenter: (props: CommentCenterProps) => JSX.Element;
1021
+
1022
+ /**
1023
+ * ValidationCenterClass
1024
+ */
1025
+ type ValidationCenterClass = {
1026
+ classId: string;
1027
+ name: string;
1028
+ active: boolean;
1029
+ };
1030
+ /**
1031
+ * ValidationCenterBadge
1032
+ */
1033
+ type ValidationCenterBadge = {
1034
+ badgeId: string;
1035
+ displayName: string;
1036
+ };
1037
+ /**
1038
+ * ValidationCenterStudent
1039
+ */
1040
+ type ValidationCenterStudent = {
1041
+ userId: string;
1042
+ name: string;
1043
+ avatar?: string;
1044
+ hasCredit: boolean;
1045
+ };
1046
+ /**
1047
+ * ValidationCenterProps
1048
+ */
1049
+ type ValidationCenterProps = {
1050
+ loading: boolean;
1051
+ classes: ValidationCenterClass[];
1052
+ classId: string;
1053
+ badges: ValidationCenterBadge[];
1054
+ badgeId: string;
1055
+ students: ValidationCenterStudent[];
1056
+ onClassChange: (classId: string) => void;
1057
+ onBadgeChange: (badgeId: string) => void;
1058
+ onSubmit: (userIds: string[]) => void;
1059
+ };
1060
+ /**
1061
+ * ValidationCenter. Lets an educator directly credit one or more students for a badge - superseding
1062
+ * lesson/criteria requirements and any outstanding comments, exactly like study's
1063
+ * BadgeActivity.Validate() (used via the bulk :validate endpoint). A student who already has credit
1064
+ * shows a checkmark instead of a checkbox, since re-validating an already-finished badge is a no-op
1065
+ * on the backend (Validate guards on FinishedAt != nil just like Submit).
1066
+ * @param props
1067
+ * @constructor
1068
+ */
1069
+ declare const ValidationCenter: (props: ValidationCenterProps) => JSX.Element;
1070
+
1071
+ export { AccountItem, AdminProvider, AdminProviderProps, App, AppProps, Badge, BadgeClass, BadgeItem, BadgeProps, BadgeUserItem, Badges, BadgesProps, Class, ClassItem, ClassProps, Classes, ClassesProps, CommentCenter, CommentCenterClass, CommentCenterItem, CommentCenterProps, Dashboard, DashboardClass, DashboardProps, FileLocker, FileLockerClass, FileLockerProps, FileLockerUserItem, GettingStarted, GettingStartedProps, Home, HomeProps, Lesson, LessonClass, LessonItem, LessonProps, LessonUserItem, Lessons, LessonsProps, MemberItem, Navbar, NavbarProps, NewTrialRegistration, Organization, OrganizationProps, Pathway, PathwayClass, PathwayProps, PathwayUserItem, Pathways, PathwaysItem, PathwaysProps, People, PeopleProps, StartAnonymousLesson, StartAnonymousLessonProps, Student, StudentProps, SwitchAccount, SwitchAccountProps, TrialHome, TrialHomeProps, TrialRegistration, TrialRegistrationProps, UserItem, ValidationCenter, ValidationCenterBadge, ValidationCenterClass, ValidationCenterProps, ValidationCenterStudent };