@instructure/platform-widget-dashboard 0.1.0 → 0.2.0

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.
Files changed (59) hide show
  1. package/dist/components/shared/CourseWorkItem.d.ts +9 -0
  2. package/dist/components/shared/CourseWorkItem.d.ts.map +1 -0
  3. package/dist/components/shared/WidgetContextMenu.d.ts +1 -0
  4. package/dist/components/shared/WidgetContextMenu.d.ts.map +1 -1
  5. package/dist/components/widgets/CourseGradesWidget/utils.d.ts +13 -0
  6. package/dist/components/widgets/CourseGradesWidget/utils.d.ts.map +1 -0
  7. package/dist/components/widgets/TemplateWidget/TemplateWidget.d.ts +6 -1
  8. package/dist/components/widgets/TemplateWidget/TemplateWidget.d.ts.map +1 -1
  9. package/dist/components/widgets/TemplateWidget/index.d.ts +2 -2
  10. package/dist/components/widgets/TemplateWidget/index.d.ts.map +1 -1
  11. package/dist/components/widgets/TodoListWidget/hooks/useCreatePlannerNote.d.ts +4 -0
  12. package/dist/components/widgets/TodoListWidget/hooks/useCreatePlannerNote.d.ts.map +1 -0
  13. package/dist/components/widgets/TodoListWidget/hooks/usePlannerOverride.d.ts +12 -0
  14. package/dist/components/widgets/TodoListWidget/hooks/usePlannerOverride.d.ts.map +1 -0
  15. package/dist/constants/index.d.ts +64 -0
  16. package/dist/constants/index.d.ts.map +1 -0
  17. package/dist/constants.d.ts +64 -0
  18. package/dist/constants.d.ts.map +1 -0
  19. package/dist/contexts/TranslationsContext.d.ts +188 -0
  20. package/dist/contexts/TranslationsContext.d.ts.map +1 -0
  21. package/dist/graphql/coursePeople.d.ts +46 -0
  22. package/dist/graphql/coursePeople.d.ts.map +1 -0
  23. package/dist/hooks/useAnnouncements.d.ts +35 -0
  24. package/dist/hooks/useAnnouncements.d.ts.map +1 -0
  25. package/dist/hooks/useCourseInstructors.d.ts +58 -0
  26. package/dist/hooks/useCourseInstructors.d.ts.map +1 -0
  27. package/dist/hooks/useCourseWork.d.ts +67 -0
  28. package/dist/hooks/useCourseWork.d.ts.map +1 -0
  29. package/dist/hooks/useCourseWorkStatistics.d.ts +11 -0
  30. package/dist/hooks/useCourseWorkStatistics.d.ts.map +1 -0
  31. package/dist/hooks/useInboxMessages.d.ts +10 -0
  32. package/dist/hooks/useInboxMessages.d.ts.map +1 -0
  33. package/dist/hooks/useRecentGrades.d.ts +31 -0
  34. package/dist/hooks/useRecentGrades.d.ts.map +1 -0
  35. package/dist/hooks/useTabState.d.ts +7 -0
  36. package/dist/hooks/useTabState.d.ts.map +1 -0
  37. package/dist/hooks/useToggleAnnouncementReadState.d.ts +17 -0
  38. package/dist/hooks/useToggleAnnouncementReadState.d.ts.map +1 -0
  39. package/dist/hooks/useWidgetDashboardContext.d.ts +48 -0
  40. package/dist/hooks/useWidgetDashboardContext.d.ts.map +1 -0
  41. package/dist/hooks/useWidgetDashboardEdit.d.ts +20 -0
  42. package/dist/hooks/useWidgetDashboardEdit.d.ts.map +1 -0
  43. package/dist/hooks/useWidgetLayout.d.ts +21 -0
  44. package/dist/hooks/useWidgetLayout.d.ts.map +1 -0
  45. package/dist/index.d.ts +3 -1
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +3944 -3795
  48. package/dist/types/env.d.ts +4 -0
  49. package/dist/types/env.d.ts.map +1 -1
  50. package/dist/utils/assignmentUtils.d.ts +17 -0
  51. package/dist/utils/assignmentUtils.d.ts.map +1 -0
  52. package/dist/utils/courseCodeUtils.d.ts +11 -0
  53. package/dist/utils/courseCodeUtils.d.ts.map +1 -0
  54. package/dist/utils/dateUtils.d.ts +18 -0
  55. package/dist/utils/dateUtils.d.ts.map +1 -0
  56. package/dist/utils/persister.d.ts +3 -0
  57. package/dist/utils/persister.d.ts.map +1 -0
  58. package/locales/en.json +170 -0
  59. package/package.json +2 -1
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { CourseWorkItem as CourseWorkItemType } from '../../hooks/useCourseWork';
3
+
4
+ interface CourseWorkItemProps {
5
+ item: CourseWorkItemType;
6
+ }
7
+ export declare function CourseWorkItem({ item }: CourseWorkItemProps): React.JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=CourseWorkItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CourseWorkItem.d.ts","sourceRoot":"","sources":["../../../src/components/shared/CourseWorkItem.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAKrF,UAAU,mBAAmB;IAC3B,IAAI,EAAE,kBAAkB,CAAA;CACzB;AAED,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,EAAE,mBAAmB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA+G/E"}
@@ -5,6 +5,7 @@ interface WidgetContextMenuProps {
5
5
  trigger: React.ReactElement;
6
6
  widget: Widget;
7
7
  config: WidgetConfig;
8
+ isStacked?: boolean;
8
9
  onSelect?: (action: string) => void;
9
10
  }
10
11
  declare const WidgetContextMenu: React.FC<WidgetContextMenuProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"WidgetContextMenu.d.ts","sourceRoot":"","sources":["../../../src/components/shared/WidgetContextMenu.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAEvD,UAAU,sBAAsB;IAC9B,OAAO,EAAE,KAAK,CAAC,YAAY,CAAA;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,YAAY,CAAA;IACpB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CACpC;AAeD,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAsDvD,CAAA;AAED,eAAe,iBAAiB,CAAA"}
1
+ {"version":3,"file":"WidgetContextMenu.d.ts","sourceRoot":"","sources":["../../../src/components/shared/WidgetContextMenu.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAEvD,UAAU,sBAAsB;IAC9B,OAAO,EAAE,KAAK,CAAC,YAAY,CAAA;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,YAAY,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CACpC;AAeD,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAuFvD,CAAA;AAED,eAAe,iBAAiB,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { TranslateFunction } from '../../../contexts/TranslationsContext';
2
+
3
+ export declare const formatUpdatedDate: (date: Date, translate: TranslateFunction) => string;
4
+ interface CourseCodeColors {
5
+ background: string;
6
+ textColor: string;
7
+ }
8
+ export declare const DEFAULT_COURSE_COLOR: CourseCodeColors;
9
+ export declare const getCourseCodeColor: () => CourseCodeColors;
10
+ export declare const createGradebookHandler: (courseId: string) => () => void;
11
+ export declare const convertToLetterGrade: (numericGrade: number, gradingStandardData: Array<[string, number]>) => string;
12
+ export {};
13
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/widgets/CourseGradesWidget/utils.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AAE9E,eAAO,MAAM,iBAAiB,GAAI,MAAM,IAAI,EAAE,WAAW,iBAAiB,KAAG,MAW5E,CAAA;AAED,UAAU,gBAAgB;IACxB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CAClB;AAID,eAAO,MAAM,oBAAoB,EAAE,gBAGlC,CAAA;AAED,eAAO,MAAM,kBAAkB,QAAO,gBAErC,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAI,UAAU,MAAM,eAEtD,CAAA;AAED,eAAO,MAAM,oBAAoB,GAC/B,cAAc,MAAM,EACpB,qBAAqB,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAC3C,MAUF,CAAA"}
@@ -8,6 +8,10 @@ export interface PaginationProps {
8
8
  ariaLabel: string;
9
9
  isLoading?: boolean;
10
10
  }
11
+ export interface LoadingOverlayProps {
12
+ isLoading: boolean;
13
+ ariaLabel?: string;
14
+ }
11
15
  export interface TemplateWidgetProps extends BaseWidgetProps {
12
16
  title?: string;
13
17
  children: React.ReactNode;
@@ -16,10 +20,11 @@ export interface TemplateWidgetProps extends BaseWidgetProps {
16
20
  headerActions?: React.ReactNode;
17
21
  loadingText?: string;
18
22
  pagination?: PaginationProps;
23
+ loadingOverlay?: LoadingOverlayProps;
19
24
  footerActions?: React.ReactNode;
20
25
  isEditMode?: boolean;
21
26
  dragHandleProps?: any;
22
27
  }
23
28
  declare const TemplateWidget: React.FC<TemplateWidgetProps>;
24
- export default TemplateWidget;
29
+ export { TemplateWidget };
25
30
  //# sourceMappingURL=TemplateWidget.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TemplateWidget.d.ts","sourceRoot":"","sources":["../../../../src/components/widgets/TemplateWidget/TemplateWidget.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAGrD,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,eAAe,CAAA;IAC5B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,eAAe,CAAC,EAAE,GAAG,CAAA;CACtB;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA+LjD,CAAA;AAED,eAAe,cAAc,CAAA"}
1
+ {"version":3,"file":"TemplateWidget.d.ts","sourceRoot":"","sources":["../../../../src/components/widgets/TemplateWidget/TemplateWidget.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAoB,MAAM,OAAO,CAAA;AASxC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAGrD,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,eAAe,CAAA;IAC5B,cAAc,CAAC,EAAE,mBAAmB,CAAA;IACpC,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB,eAAe,CAAC,EAAE,GAAG,CAAA;CACtB;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAqPjD,CAAA;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
@@ -1,3 +1,3 @@
1
- export type { PaginationProps, TemplateWidgetProps } from './TemplateWidget';
2
- export { default } from './TemplateWidget';
1
+ export type { LoadingOverlayProps, PaginationProps, TemplateWidgetProps } from './TemplateWidget';
2
+ export { TemplateWidget } from './TemplateWidget';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/widgets/TemplateWidget/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/widgets/TemplateWidget/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { CreatePlannerNoteParams } from '../api';
2
+
3
+ export declare function useCreatePlannerNote(): import('@tanstack/react-query').UseMutationResult<import('../api').PlannerNote, Error, CreatePlannerNoteParams, unknown>;
4
+ //# sourceMappingURL=useCreatePlannerNote.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCreatePlannerNote.d.ts","sourceRoot":"","sources":["../../../../../src/components/widgets/TodoListWidget/hooks/useCreatePlannerNote.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,KAAK,uBAAuB,EAAqB,MAAM,QAAQ,CAAA;AAGxE,wBAAgB,oBAAoB,6HASnC"}
@@ -0,0 +1,12 @@
1
+ import { PlannerItem } from '../types';
2
+
3
+ interface ToggleCompleteParams {
4
+ item: PlannerItem;
5
+ markedComplete: boolean;
6
+ }
7
+ export declare function usePlannerOverride(): {
8
+ toggleComplete: import('@tanstack/react-query').UseMutateFunction<import('../types').PlannerOverride, Error, ToggleCompleteParams, unknown>;
9
+ isLoading: boolean;
10
+ };
11
+ export {};
12
+ //# sourceMappingURL=usePlannerOverride.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePlannerOverride.d.ts","sourceRoot":"","sources":["../../../../../src/components/widgets/TodoListWidget/hooks/usePlannerOverride.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAG3C,UAAU,oBAAoB;IAC5B,IAAI,EAAE,WAAW,CAAA;IACjB,cAAc,EAAE,OAAO,CAAA;CACxB;AAED,wBAAgB,kBAAkB;;;EA+BjC"}
@@ -0,0 +1,64 @@
1
+ import { DocumentNode } from 'graphql';
2
+ import { WidgetConfig } from '../types';
3
+
4
+ export declare const TAB_IDS: {
5
+ readonly DASHBOARD: "dashboard";
6
+ readonly COURSES: "courses";
7
+ };
8
+ export type TabId = (typeof TAB_IDS)[keyof typeof TAB_IDS];
9
+ export declare const WIDGET_TYPES: {
10
+ readonly COURSE_WORK_SUMMARY: "course_work_summary";
11
+ readonly COURSE_WORK: "course_work";
12
+ readonly COURSE_WORK_COMBINED: "course_work_combined";
13
+ readonly COURSE_GRADES: "course_grades";
14
+ readonly ANNOUNCEMENTS: "announcements";
15
+ readonly PEOPLE: "people";
16
+ readonly TODO_LIST: "todo_list";
17
+ readonly RECENT_GRADES: "recent_grades";
18
+ readonly PROGRESS_OVERVIEW: "progress_overview";
19
+ readonly INBOX: "inbox";
20
+ };
21
+ export type WidgetType = (typeof WIDGET_TYPES)[keyof typeof WIDGET_TYPES];
22
+ export declare const LEFT_COLUMN = 1;
23
+ export declare const RIGHT_COLUMN = 2;
24
+ export declare const DEFAULT_WIDGET_CONFIG: WidgetConfig;
25
+ export declare const COURSE_GRADES_WIDGET: {
26
+ readonly MAX_GRID_ITEMS: 6;
27
+ readonly GRID_COLUMNS: 2;
28
+ readonly GRID_COL_SPACING: "small";
29
+ readonly GRID_ROW_SPACING: "small";
30
+ readonly DEFAULT_COURSE_CODE: "N/A";
31
+ readonly GRADING_SCHEMES: {
32
+ readonly LETTER: "letter";
33
+ readonly PERCENTAGE: "percentage";
34
+ };
35
+ };
36
+ export declare const QUERY_CONFIG: {
37
+ readonly STALE_TIME: {
38
+ readonly COURSES: 10;
39
+ readonly GRADES: 5;
40
+ readonly STATISTICS: 5;
41
+ readonly USERS: 10;
42
+ };
43
+ readonly RETRY: {
44
+ readonly DISABLED: false;
45
+ readonly DEFAULT: 3;
46
+ };
47
+ };
48
+ export declare const ANNOUNCEMENTS_PAGINATED_KEY = "announcementsPaginated";
49
+ export declare const DASHBOARD_NOTIFICATIONS_KEY = "dashboardNotifications";
50
+ export declare const COURSE_WORK_KEY = "courseWork";
51
+ export declare const COURSE_STATISTICS_KEY = "courseStatistics";
52
+ export declare const COURSE_INSTRUCTORS_PAGINATED_KEY = "courseInstructorsPaginated";
53
+ export declare const PROGRESS_OVERVIEW_KEY = "progressOverview";
54
+ export declare const INBOX_MESSAGES_KEY = "inboxMessages";
55
+ export declare const URL_PATTERNS: {
56
+ readonly GRADEBOOK: "/courses/{courseId}/gradebook";
57
+ readonly ALL_GRADES: "/grades";
58
+ };
59
+ export declare const ACCEPT_ENROLLMENT_INVITATION: DocumentNode;
60
+ export declare const REJECT_ENROLLMENT_INVITATION: DocumentNode;
61
+ export declare const UPDATE_LEARNER_DASHBOARD_TAB_SELECTION: DocumentNode;
62
+ export declare const UPDATE_WIDGET_DASHBOARD_CONFIG: DocumentNode;
63
+ export declare const UPDATE_WIDGET_DASHBOARD_LAYOUT: DocumentNode;
64
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE5C,eAAO,MAAM,OAAO;;;CAGV,CAAA;AAEV,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,OAAO,OAAO,CAAC,CAAA;AAE1D,eAAO,MAAM,YAAY;;;;;;;;;;;CAWf,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAA;AAEzE,eAAO,MAAM,WAAW,IAAI,CAAA;AAC5B,eAAO,MAAM,YAAY,IAAI,CAAA;AAE7B,eAAO,MAAM,qBAAqB,EAAE,YAkCnC,CAAA;AAGD,eAAO,MAAM,oBAAoB;;;;;;;;;;CAWvB,CAAA;AAGV,eAAO,MAAM,YAAY;;;;;;;;;;;CAWf,CAAA;AAGV,eAAO,MAAM,2BAA2B,2BAA2B,CAAA;AACnE,eAAO,MAAM,2BAA2B,2BAA2B,CAAA;AACnE,eAAO,MAAM,eAAe,eAAe,CAAA;AAC3C,eAAO,MAAM,qBAAqB,qBAAqB,CAAA;AACvD,eAAO,MAAM,gCAAgC,+BAA+B,CAAA;AAC5E,eAAO,MAAM,qBAAqB,qBAAqB,CAAA;AACvD,eAAO,MAAM,kBAAkB,kBAAkB,CAAA;AAGjD,eAAO,MAAM,YAAY;;;CAGf,CAAA;AAGV,eAAO,MAAM,4BAA4B,EAAE,YAgB1C,CAAA;AAED,eAAO,MAAM,4BAA4B,EAAE,YAY1C,CAAA;AAED,eAAO,MAAM,sCAAsC,EAAE,YASpD,CAAA;AAED,eAAO,MAAM,8BAA8B,EAAE,YAU5C,CAAA;AAED,eAAO,MAAM,8BAA8B,EAAE,YAS5C,CAAA"}
@@ -0,0 +1,64 @@
1
+ import { DocumentNode } from 'graphql';
2
+ import { WidgetConfig } from './types';
3
+
4
+ export declare const TAB_IDS: {
5
+ readonly DASHBOARD: "dashboard";
6
+ readonly COURSES: "courses";
7
+ };
8
+ export type TabId = (typeof TAB_IDS)[keyof typeof TAB_IDS];
9
+ export declare const WIDGET_TYPES: {
10
+ readonly COURSE_WORK_SUMMARY: "course_work_summary";
11
+ readonly COURSE_WORK: "course_work";
12
+ readonly COURSE_WORK_COMBINED: "course_work_combined";
13
+ readonly COURSE_GRADES: "course_grades";
14
+ readonly ANNOUNCEMENTS: "announcements";
15
+ readonly PEOPLE: "people";
16
+ readonly TODO_LIST: "todo_list";
17
+ readonly RECENT_GRADES: "recent_grades";
18
+ readonly PROGRESS_OVERVIEW: "progress_overview";
19
+ readonly INBOX: "inbox";
20
+ };
21
+ export type WidgetType = (typeof WIDGET_TYPES)[keyof typeof WIDGET_TYPES];
22
+ export declare const LEFT_COLUMN = 1;
23
+ export declare const RIGHT_COLUMN = 2;
24
+ export declare const DEFAULT_WIDGET_CONFIG: WidgetConfig;
25
+ export declare const COURSE_GRADES_WIDGET: {
26
+ readonly MAX_GRID_ITEMS: 6;
27
+ readonly GRID_COLUMNS: 2;
28
+ readonly GRID_COL_SPACING: "small";
29
+ readonly GRID_ROW_SPACING: "small";
30
+ readonly DEFAULT_COURSE_CODE: "N/A";
31
+ readonly GRADING_SCHEMES: {
32
+ readonly LETTER: "letter";
33
+ readonly PERCENTAGE: "percentage";
34
+ };
35
+ };
36
+ export declare const QUERY_CONFIG: {
37
+ readonly STALE_TIME: {
38
+ readonly COURSES: 10;
39
+ readonly GRADES: 5;
40
+ readonly STATISTICS: 5;
41
+ readonly USERS: 10;
42
+ };
43
+ readonly RETRY: {
44
+ readonly DISABLED: false;
45
+ readonly DEFAULT: 3;
46
+ };
47
+ };
48
+ export declare const ANNOUNCEMENTS_PAGINATED_KEY = "announcementsPaginated";
49
+ export declare const DASHBOARD_NOTIFICATIONS_KEY = "dashboardNotifications";
50
+ export declare const COURSE_WORK_KEY = "courseWork";
51
+ export declare const COURSE_STATISTICS_KEY = "courseStatistics";
52
+ export declare const COURSE_INSTRUCTORS_PAGINATED_KEY = "courseInstructorsPaginated";
53
+ export declare const PROGRESS_OVERVIEW_KEY = "progressOverview";
54
+ export declare const INBOX_MESSAGES_KEY = "inboxMessages";
55
+ export declare const URL_PATTERNS: {
56
+ readonly GRADEBOOK: "/courses/{courseId}/gradebook";
57
+ readonly ALL_GRADES: "/grades";
58
+ };
59
+ export declare const ACCEPT_ENROLLMENT_INVITATION: DocumentNode;
60
+ export declare const REJECT_ENROLLMENT_INVITATION: DocumentNode;
61
+ export declare const UPDATE_LEARNER_DASHBOARD_TAB_SELECTION: DocumentNode;
62
+ export declare const UPDATE_WIDGET_DASHBOARD_CONFIG: DocumentNode;
63
+ export declare const UPDATE_WIDGET_DASHBOARD_LAYOUT: DocumentNode;
64
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,eAAO,MAAM,OAAO;;;CAGV,CAAA;AAEV,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,OAAO,OAAO,CAAC,CAAA;AAE1D,eAAO,MAAM,YAAY;;;;;;;;;;;CAWf,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAA;AAEzE,eAAO,MAAM,WAAW,IAAI,CAAA;AAC5B,eAAO,MAAM,YAAY,IAAI,CAAA;AAE7B,eAAO,MAAM,qBAAqB,EAAE,YAkCnC,CAAA;AAGD,eAAO,MAAM,oBAAoB;;;;;;;;;;CAWvB,CAAA;AAGV,eAAO,MAAM,YAAY;;;;;;;;;;;CAWf,CAAA;AAGV,eAAO,MAAM,2BAA2B,2BAA2B,CAAA;AACnE,eAAO,MAAM,2BAA2B,2BAA2B,CAAA;AACnE,eAAO,MAAM,eAAe,eAAe,CAAA;AAC3C,eAAO,MAAM,qBAAqB,qBAAqB,CAAA;AACvD,eAAO,MAAM,gCAAgC,+BAA+B,CAAA;AAC5E,eAAO,MAAM,qBAAqB,qBAAqB,CAAA;AACvD,eAAO,MAAM,kBAAkB,kBAAkB,CAAA;AAGjD,eAAO,MAAM,YAAY;;;CAGf,CAAA;AAGV,eAAO,MAAM,4BAA4B,EAAE,YAgB1C,CAAA;AAED,eAAO,MAAM,4BAA4B,EAAE,YAY1C,CAAA;AAED,eAAO,MAAM,sCAAsC,EAAE,YASpD,CAAA;AAED,eAAO,MAAM,8BAA8B,EAAE,YAU5C,CAAA;AAED,eAAO,MAAM,8BAA8B,EAAE,YAS5C,CAAA"}
@@ -0,0 +1,188 @@
1
+ import { default as React } from 'react';
2
+
3
+ /**
4
+ * Translate function for dynamic interpolation.
5
+ * The consuming app provides this function to handle i18n with variable substitution.
6
+ *
7
+ * Example: translate('Sent by %{authorName}', { authorName: 'John' }) => 'Sent by John'
8
+ */
9
+ export type TranslateFunction = (key: string, options?: Record<string, unknown>) => string;
10
+ /**
11
+ * Translation keys used by the widget dashboard.
12
+ * The consuming app is responsible for providing translated strings.
13
+ */
14
+ export interface WidgetDashboardTranslations {
15
+ loading: string;
16
+ error: string;
17
+ retry: string;
18
+ noData: string;
19
+ save: string;
20
+ cancel: string;
21
+ dragToReorder: string;
22
+ removeWidget: string;
23
+ loadingWidgetData: string;
24
+ noContentAvailable: string;
25
+ dashboard: string;
26
+ courses: string;
27
+ customize: string;
28
+ moveToTop: string;
29
+ moveUp: string;
30
+ moveDown: string;
31
+ moveToBottom: string;
32
+ moveLeftTop: string;
33
+ moveLeftBottom: string;
34
+ moveRightTop: string;
35
+ moveRightBottom: string;
36
+ failedToSaveWidgetLayout: string;
37
+ inbox: string;
38
+ noMessages: string;
39
+ showAllMessages: string;
40
+ unread: string;
41
+ all: string;
42
+ unknownSender: string;
43
+ noSubject: string;
44
+ announcements: string;
45
+ noAnnouncements: string;
46
+ readMore: string;
47
+ markAsRead: string;
48
+ markAsUnread: string;
49
+ sentBy: string;
50
+ readFilter: string;
51
+ read: string;
52
+ noUnreadAnnouncements: string;
53
+ noReadAnnouncements: string;
54
+ noRecentAnnouncements: string;
55
+ failedToLoadAnnouncements: string;
56
+ loadingAnnouncements: string;
57
+ announcementsPagination: string;
58
+ courseWork: string;
59
+ noCourseWork: string;
60
+ dueToday: string;
61
+ dueTomorrow: string;
62
+ overdue: string;
63
+ failedToLoadCourseWork: string;
64
+ loadingCourseWorkData: string;
65
+ courseWorkPagination: string;
66
+ noUpcomingCourseWork: string;
67
+ noUpcomingCourseWorkForSelectedCourse: string;
68
+ courseFilter: string;
69
+ due: string;
70
+ missing: string;
71
+ submitted: string;
72
+ notSubmitted: string;
73
+ submissionStatus: string;
74
+ late: string;
75
+ pendingReview: string;
76
+ noDueDate: string;
77
+ today: string;
78
+ tomorrow: string;
79
+ courseGrades: string;
80
+ noCourseGrades: string;
81
+ courseGradesPagination: string;
82
+ failedToLoadCourseGrades: string;
83
+ loadingCourseGrades: string;
84
+ showAllGrades: string;
85
+ viewGradebook: string;
86
+ hideGrade: string;
87
+ showGrade: string;
88
+ updatedToday: string;
89
+ gradeUpdated1DayAgo: string;
90
+ recentGrades: string;
91
+ noRecentGrades: string;
92
+ recentGradesPagination: string;
93
+ loadingRecentGrades: string;
94
+ viewAllGrades: string;
95
+ noRecentGradesAvailable: string;
96
+ notYetGraded: string;
97
+ gradedJustNow: string;
98
+ graded: string;
99
+ notGraded: string;
100
+ expandGradeDetails: string;
101
+ progressOverview: string;
102
+ noProgressData: string;
103
+ goToCourse: string;
104
+ noCoursesFound: string;
105
+ failedToLoadProgressOverview: string;
106
+ loadingProgressOverview: string;
107
+ progressOverviewPagination: string;
108
+ people: string;
109
+ noPeople: string;
110
+ messageStudents: string;
111
+ allCourses: string;
112
+ failedToLoadCourseData: string;
113
+ failedToLoadInstructorData: string;
114
+ loadingPeopleData: string;
115
+ instructorsPagination: string;
116
+ noInstructorsFound: string;
117
+ teacher: string;
118
+ teachingAssistant: string;
119
+ todoItemCreatedSuccessfully: string;
120
+ failedToCreateTodoItem: string;
121
+ filter: string;
122
+ incomplete: string;
123
+ complete: string;
124
+ noUpcomingItems: string;
125
+ failedToLoadTodoItems: string;
126
+ loadingTodoItems: string;
127
+ newTodo: string;
128
+ todoListPagination: string;
129
+ updating: string;
130
+ titleIsRequired: string;
131
+ dateIsRequired: string;
132
+ invalidDate: string;
133
+ youMustProvideDateTime: string;
134
+ optionalAddCourse: string;
135
+ addToDo: string;
136
+ close: string;
137
+ title: string;
138
+ dateTimeTodoIsDue: string;
139
+ date: string;
140
+ nextMonth: string;
141
+ previousMonth: string;
142
+ time: string;
143
+ course: string;
144
+ useArrowKeysToNavigate: string;
145
+ details: string;
146
+ creating: string;
147
+ failedToUpdateItem: string;
148
+ dueSoon: string;
149
+ assignment: string;
150
+ quiz: string;
151
+ discussion: string;
152
+ announcement: string;
153
+ page: string;
154
+ event: string;
155
+ toDo: string;
156
+ peerReview: string;
157
+ discussionCheckpoint: string;
158
+ item: string;
159
+ reorderWidgetName: string;
160
+ removeWidgetName: string;
161
+ widgetMovedDirection: string;
162
+ widgetRemoved: string;
163
+ widgetAdded: string;
164
+ moveDirectionToTop: string;
165
+ moveDirectionUp: string;
166
+ moveDirectionDown: string;
167
+ moveDirectionToBottom: string;
168
+ moveDirectionToLeftBottom: string;
169
+ moveDirectionToLeftTop: string;
170
+ moveDirectionToRightBottom: string;
171
+ moveDirectionToRightTop: string;
172
+ widget: string;
173
+ [key: string]: string;
174
+ }
175
+ export interface WidgetDashboardContext {
176
+ translations: WidgetDashboardTranslations;
177
+ translate: TranslateFunction;
178
+ announceForScreenReader?: (message: string) => void;
179
+ }
180
+ export interface TranslationsProviderProps {
181
+ translations: WidgetDashboardTranslations;
182
+ translate: TranslateFunction;
183
+ announceForScreenReader?: (message: string) => void;
184
+ children: React.ReactNode;
185
+ }
186
+ export declare function TranslationsProvider({ translations, translate, announceForScreenReader, children, }: TranslationsProviderProps): import("react/jsx-runtime").JSX.Element;
187
+ export declare function useTranslations(): WidgetDashboardContext;
188
+ //# sourceMappingURL=TranslationsContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TranslationsContext.d.ts","sourceRoot":"","sources":["../../src/contexts/TranslationsContext.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAoC,MAAM,OAAO,CAAA;AAExD;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAA;AAE1F;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAE1C,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,MAAM,CAAA;IACpB,iBAAiB,EAAE,MAAM,CAAA;IACzB,kBAAkB,EAAE,MAAM,CAAA;IAG1B,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CA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AAC,SAAS,CAAA;CAC1B;AAED,wBAAgB,oBAAoB,CAAC,EACnC,YAAY,EACZ,SAAS,EACT,uBAAuB,EACvB,QAAQ,GACT,EAAE,yBAAyB,2CAG3B;AAED,wBAAgB,eAAe,IAAI,sBAAsB,CAMxD"}
@@ -0,0 +1,46 @@
1
+ import { DocumentNode } from 'graphql';
2
+ import { CourseInstructorForComponent } from '../hooks/useCourseInstructors';
3
+
4
+ export declare const COURSE_INSTRUCTORS_PAGINATED_QUERY: DocumentNode;
5
+ export type InstructorEnrollment = {
6
+ user: {
7
+ _id: string;
8
+ name: string;
9
+ sortableName?: string;
10
+ shortName?: string;
11
+ avatarUrl?: string;
12
+ email?: string;
13
+ };
14
+ course: {
15
+ _id: string;
16
+ name: string;
17
+ courseCode?: string;
18
+ };
19
+ type: 'TeacherEnrollment' | 'TaEnrollment';
20
+ role: {
21
+ _id: string;
22
+ name: string;
23
+ };
24
+ enrollmentState: string;
25
+ };
26
+ export interface CourseInstructorsPaginatedResponse {
27
+ courseInstructorsConnection: {
28
+ nodes: Array<InstructorEnrollment>;
29
+ pageInfo: {
30
+ hasNextPage: boolean;
31
+ hasPreviousPage: boolean;
32
+ startCursor: string | null;
33
+ endCursor: string | null;
34
+ totalCount: number | null;
35
+ };
36
+ };
37
+ }
38
+ export declare const fetchPaginatedCourseInstructors: (executeQuery: any, courseIds: string[], limit?: number, after?: string, observedUserId?: string) => Promise<{
39
+ data: CourseInstructorForComponent[];
40
+ hasNextPage: boolean;
41
+ hasPreviousPage: boolean;
42
+ endCursor: string | null;
43
+ startCursor: string | null;
44
+ totalCount: number | null;
45
+ }>;
46
+ //# sourceMappingURL=coursePeople.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coursePeople.d.ts","sourceRoot":"","sources":["../../src/graphql/coursePeople.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,OAAO,KAAK,EAAE,4BAA4B,EAAE,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AI,CAAA;IACxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B,CAkEA,CAAA"}
@@ -0,0 +1,35 @@
1
+ import { Announcement } from '../types';
2
+
3
+ interface UseAnnouncementsOptions {
4
+ limit?: number;
5
+ filter?: 'unread' | 'read' | 'all';
6
+ }
7
+ export declare function usePaginatedAnnouncements(options?: UseAnnouncementsOptions): import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/react-query').InfiniteData<{
8
+ announcements: Announcement[];
9
+ pageInfo: any;
10
+ }, unknown>, Error>;
11
+ interface AnnouncementPageInfo {
12
+ hasNextPage: boolean;
13
+ hasPreviousPage: boolean;
14
+ endCursor: string | null;
15
+ startCursor: string | null;
16
+ totalCount: number | null;
17
+ }
18
+ interface AnnouncementResult {
19
+ announcements: Announcement[];
20
+ pageInfo: AnnouncementPageInfo;
21
+ }
22
+ export declare function useAnnouncementsPaginated(options?: UseAnnouncementsOptions): {
23
+ currentPage: AnnouncementResult;
24
+ currentPageIndex: number;
25
+ totalPages: number;
26
+ totalCount: number | null;
27
+ goToPage: (pageNumber: number) => void;
28
+ resetPagination: () => void;
29
+ refetch: () => void;
30
+ isLoading: boolean;
31
+ error: Error | null;
32
+ pageSize: number;
33
+ };
34
+ export {};
35
+ //# sourceMappingURL=useAnnouncements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAnnouncements.d.ts","sourceRoot":"","sources":["../../src/hooks/useAnnouncements.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAI5C,UAAU,uBAAuB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAA;CACnC;AA2ED,wBAAgB,yBAAyB,CAAC,OAAO,GAAE,uBAA4B;mBAOlB,YAAY,EAAE;cAAY,GAAG;oBAsDzF;AAQD,UAAU,oBAAoB;IAC5B,WAAW,EAAE,OAAO,CAAA;IACpB,eAAe,EAAE,OAAO,CAAA;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B;AAED,UAAU,kBAAkB;IAC1B,aAAa,EAAE,YAAY,EAAE,CAAA;IAC7B,QAAQ,EAAE,oBAAoB,CAAA;CAC/B;AAkFD,wBAAgB,yBAAyB,CAAC,OAAO,GAAE,uBAA4B;;;;;2BA+EnC,MAAM;;;;;;EAyBjD"}
@@ -0,0 +1,58 @@
1
+ export interface CourseInstructorForComponent {
2
+ id: string;
3
+ name: string;
4
+ sortable_name?: string;
5
+ short_name?: string;
6
+ avatar_url?: string;
7
+ email?: string;
8
+ bio?: string | null;
9
+ course_name?: string;
10
+ course_code?: string;
11
+ enrollments: Array<{
12
+ id: string;
13
+ user_id: string;
14
+ course_id: string;
15
+ type: 'TeacherEnrollment' | 'TaEnrollment';
16
+ role: string;
17
+ role_id: string;
18
+ enrollment_state: string;
19
+ }>;
20
+ }
21
+ interface UseCourseInstructorsOptions {
22
+ courseIds?: string[];
23
+ limit?: number;
24
+ enabled?: boolean;
25
+ }
26
+ export declare function useCourseInstructors(options?: UseCourseInstructorsOptions): import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/react-query').InfiniteData<{
27
+ data: CourseInstructorForComponent[];
28
+ hasNextPage: boolean;
29
+ hasPreviousPage: boolean;
30
+ endCursor: string | null;
31
+ startCursor: string | null;
32
+ totalCount: number | null;
33
+ }, unknown>, Error>;
34
+ interface InstructorPageInfo {
35
+ hasNextPage: boolean;
36
+ hasPreviousPage: boolean;
37
+ endCursor: string | null;
38
+ startCursor: string | null;
39
+ totalCount: number | null;
40
+ }
41
+ interface InstructorResult {
42
+ data: CourseInstructorForComponent[];
43
+ pageInfo: InstructorPageInfo;
44
+ }
45
+ export declare function useCourseInstructorsPaginated(options?: UseCourseInstructorsOptions): {
46
+ currentPage: InstructorResult | undefined;
47
+ currentPageIndex: number;
48
+ totalPages: number;
49
+ totalCount: number | null;
50
+ goToPage: (pageNumber: number) => void;
51
+ resetPagination: () => void;
52
+ refetch: () => Promise<import('@tanstack/react-query').QueryObserverResult<InstructorResult, Error>>;
53
+ isLoading: boolean;
54
+ error: Error | null;
55
+ pageSize: number;
56
+ };
57
+ export {};
58
+ //# sourceMappingURL=useCourseInstructors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCourseInstructors.d.ts","sourceRoot":"","sources":["../../src/hooks/useCourseInstructors.ts"],"names":[],"mappings":"AA2BA,MAAM,WAAW,4BAA4B;IAC3C,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,KAAK,CAAC;QACjB,EAAE,EAAE,MAAM,CAAA;QACV,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;QACjB,IAAI,EAAE,mBAAmB,GAAG,cAAc,CAAA;QAC1C,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;QACf,gBAAgB,EAAE,MAAM,CAAA;KACzB,CAAC,CAAA;CACH;AAED,UAAU,2BAA2B;IACnC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,oBAAoB,CAAC,OAAO,GAAE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