@oaknational/google-classroom-addon 1.20.0 → 1.22.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.
package/dist/views.d.ts CHANGED
@@ -7,6 +7,7 @@ type LessonListItem = {
7
7
  programmeSlug: string;
8
8
  unitSlug: string;
9
9
  lessonSlug: string;
10
+ exitQuizCount: number;
10
11
  isLegacy: boolean;
11
12
  lessonData: {
12
13
  keyLearningPoints?: {
@@ -101,7 +102,7 @@ declare enum AuthCookieKeys {
101
102
  PupilSession = "oak-gclassroom-pupil-session"
102
103
  }
103
104
 
104
- type Props$9 = {
105
+ type Props$a = {
105
106
  getGoogleSignInLink: (subscribeToNewsletter?: boolean) => Promise<string | null>;
106
107
  onSuccessfulSignIn: (signUpToNewsletter: boolean) => Promise<void> | void;
107
108
  privacyPolicyUrl: string;
@@ -111,21 +112,21 @@ type Props$9 = {
111
112
  AuthCookieKeys.Session | AuthCookieKeys.PupilSession
112
113
  ];
113
114
  };
114
- declare const GoogleSignInView: ({ getGoogleSignInLink, onSuccessfulSignIn, privacyPolicyUrl, showMailingListOption, cookieKeys, }: Props$9) => React.JSX.Element;
115
+ declare const GoogleSignInView: ({ getGoogleSignInLink, onSuccessfulSignIn, privacyPolicyUrl, showMailingListOption, cookieKeys, }: Props$a) => React.JSX.Element;
115
116
 
116
- type Props$8 = {
117
+ type Props$9 = {
117
118
  session: string;
118
119
  accessToken: string;
119
120
  };
120
- declare const GoogleClassroomAuthSuccessView: React.FC<Props$8>;
121
+ declare const GoogleClassroomAuthSuccessView: React.FC<Props$9>;
121
122
 
122
- type Props$7 = {
123
+ type Props$8 = {
123
124
  years: Year[];
124
125
  subjectsUrlTemplate: string;
125
126
  };
126
- declare const GoogleClassroomBrowseView: ({ years, subjectsUrlTemplate, }: Props$7) => React.JSX.Element;
127
+ declare const GoogleClassroomBrowseView: ({ years, subjectsUrlTemplate, }: Props$8) => React.JSX.Element;
127
128
 
128
- type Props$6 = {
129
+ type Props$7 = {
129
130
  children: React.ReactNode;
130
131
  verifySessionAction: () => Promise<{
131
132
  authenticated: boolean;
@@ -140,15 +141,15 @@ type Props$6 = {
140
141
  ];
141
142
  onVerifySuccess?: () => void | Promise<void>;
142
143
  };
143
- declare const WithGoogleClassroomAuth: React.FC<Props$6>;
144
+ declare const WithGoogleClassroomAuth: React.FC<Props$7>;
144
145
 
145
- type Props$5 = {
146
+ type Props$6 = {
146
147
  children: React.ReactNode;
147
148
  createAttachmentAction: (attachment: NewAttachment) => Promise<void>;
148
149
  };
149
- declare const BrowseLayout: ({ children, createAttachmentAction }: Props$5) => React.JSX.Element;
150
+ declare const BrowseLayout: ({ children, createAttachmentAction }: Props$6) => React.JSX.Element;
150
151
 
151
- type Props$4 = {
152
+ type Props$5 = {
152
153
  browseData?: LessonListItem[];
153
154
  programmeSlug: string;
154
155
  unitData?: UnitData;
@@ -157,9 +158,9 @@ type Props$4 = {
157
158
  programmeUrlTemplate: string;
158
159
  pupilLessonUrlTemplate: string;
159
160
  };
160
- declare const LessonListingView: ({ browseData, programmeSlug, unitData, programmeFields, headerLeftSlot, programmeUrlTemplate, pupilLessonUrlTemplate, }: Props$4) => React.JSX.Element;
161
+ declare const LessonListingView: ({ browseData, programmeSlug, unitData, programmeFields, headerLeftSlot, programmeUrlTemplate, pupilLessonUrlTemplate, }: Props$5) => React.JSX.Element;
161
162
 
162
- type Props$3<programme = Programme> = {
163
+ type Props$4<programme = Programme> = {
163
164
  yearSlug?: string;
164
165
  programmes: Programme[];
165
166
  baseSlug: string;
@@ -170,33 +171,39 @@ type Props$3<programme = Programme> = {
170
171
  programmes: programme[];
171
172
  }) => Promise<FactorData[]>;
172
173
  };
173
- declare const OptionsView: ({ yearSlug, programmes, baseSlug, programmeUrlTemplate, backUrlTemplate, getAvailableProgrammeFactorAction, }: Props$3<never>) => React.JSX.Element;
174
+ declare const OptionsView: ({ yearSlug, programmes, baseSlug, programmeUrlTemplate, backUrlTemplate, getAvailableProgrammeFactorAction, }: Props$4<never>) => React.JSX.Element;
174
175
 
175
- type Props$2 = {
176
+ type Props$3 = {
176
177
  subjects: Subject[];
177
178
  optionsUrlTemplate: string;
178
179
  unitsUrlTemplate: string;
179
180
  };
180
- declare const SubjectsPageView: ({ subjects, optionsUrlTemplate, unitsUrlTemplate, }: Props$2) => React.JSX.Element;
181
+ declare const SubjectsPageView: ({ subjects, optionsUrlTemplate, unitsUrlTemplate, }: Props$3) => React.JSX.Element;
181
182
 
182
- type Props$1 = {
183
- programmeSlug: string;
183
+ type Props$2 = {
184
184
  yearSlug: string;
185
185
  programmeUnits: Unit[][];
186
186
  programmeData: ProgrammeFields;
187
- unitsLessonListUrlTemplate: string;
188
187
  subjectsUrlTemplate: string;
189
188
  headerLeftSlot?: React.ReactElement;
189
+ children?: React.ReactElement;
190
190
  };
191
- declare const UnitsListingView: ({ programmeSlug, programmeUnits, programmeData, yearSlug, unitsLessonListUrlTemplate, subjectsUrlTemplate, headerLeftSlot, }: Props$1) => React.JSX.Element;
191
+ declare const UnitsListingView: ({ programmeUnits, programmeData, yearSlug, subjectsUrlTemplate, headerLeftSlot, children, }: Props$2) => React.JSX.Element;
192
192
 
193
- type Props = {
193
+ type Props$1 = {
194
194
  children: React.ReactNode;
195
195
  courseId: string;
196
196
  itemId: string;
197
197
  addOnToken: string;
198
198
  };
199
- declare const OakGoogleClassroomProvider: ({ children, courseId, itemId, addOnToken, }: Props) => React.ReactNode;
199
+ declare const OakGoogleClassroomProvider: ({ children, courseId, itemId, addOnToken, }: Props$1) => React.ReactNode;
200
+
201
+ type Props = {
202
+ units: Unit[][];
203
+ programmeSlug: string;
204
+ unitsLessonListUrlTemplate: string;
205
+ };
206
+ declare const UnitCards: ({ units, programmeSlug, unitsLessonListUrlTemplate, }: Props) => React.JSX.Element;
200
207
 
201
- export { AuthCookieKeys, BrowseLayout, GoogleClassroomAuthSuccessView, GoogleClassroomBrowseView, GoogleSignInView, LessonListingView, OakGoogleClassroomProvider, OptionsView, SubjectsPageView, UnitsListingView, WithGoogleClassroomAuth };
208
+ export { AuthCookieKeys, BrowseLayout, GoogleClassroomAuthSuccessView, GoogleClassroomBrowseView, GoogleSignInView, LessonListingView, OakGoogleClassroomProvider, OptionsView, SubjectsPageView, UnitCards, UnitsListingView, WithGoogleClassroomAuth };
202
209
  export type { FactorData, LessonListItem, NewAttachment, Programme, ProgrammeFields, Subject, Unit, UnitData, Year };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oaknational/google-classroom-addon",
3
- "version": "1.20.0",
3
+ "version": "1.22.0",
4
4
  "description": "Components and helpers for the Oak Google Classroom Add-on",
5
5
  "exports": {
6
6
  "./ui": {
@@ -55,13 +55,13 @@
55
55
  "peerDependencies": {
56
56
  "@google-cloud/firestore": ">=7.11.2",
57
57
  "@googleapis/classroom": "4.9.0",
58
- "@oaknational/oak-components": ">=1.173.0",
58
+ "@oaknational/oak-components": "^2.5.0",
59
59
  "google-auth-library": "9.15.1",
60
60
  "next": ">=15.4.3",
61
61
  "react": ">=18.3.1",
62
62
  "react-dom": ">=18.3.1",
63
- "zustand": ">=5.0.9",
64
- "zod": ">=3.25.76"
63
+ "zod": ">=3.25.76",
64
+ "zustand": ">=5.0.9"
65
65
  },
66
66
  "dependencies": {
67
67
  "iron-session": "^8.0.4",