@local-civics/mgmt-ui 0.1.51 → 0.1.53

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 (61) hide show
  1. package/dist/index.d.ts +486 -12
  2. package/dist/index.js +1742 -1
  3. package/dist/index.js.map +1 -0
  4. package/dist/index.mjs +1702 -0
  5. package/dist/index.mjs.map +1 -0
  6. package/package.json +5 -3
  7. package/dist/components/banners/PlaceholderBanner/PlaceholderBanner.d.ts +0 -14
  8. package/dist/components/banners/PlaceholderBanner/component.stories.d.ts +0 -14
  9. package/dist/components/banners/TenantBanner/TenantBanner.d.ts +0 -23
  10. package/dist/components/cards/CardGradient.d.ts +0 -10
  11. package/dist/components/cards/component.stories.d.ts +0 -14
  12. package/dist/components/data/LineChart/LineChart.d.ts +0 -18
  13. package/dist/components/data/StatsGrid/StatsGrid.d.ts +0 -14
  14. package/dist/components/data/StatsGroup/StatsGroup.d.ts +0 -14
  15. package/dist/components/navigation/Navbar/Navbar.d.ts +0 -15
  16. package/dist/components/navigation/Navbar/component.stories.d.ts +0 -14
  17. package/dist/components/navigation/Tabs/Tabs.d.ts +0 -18
  18. package/dist/components/users/UserInfo/UserInfo.d.ts +0 -11
  19. package/dist/hooks/notifications.d.ts +0 -1
  20. package/dist/index.es.js +0 -1
  21. package/dist/pages/Badge/Badge.d.ts +0 -37
  22. package/dist/pages/Badge/LessonTable.d.ts +0 -31
  23. package/dist/pages/Badge/Table.d.ts +0 -33
  24. package/dist/pages/Badge/component.stories.d.ts +0 -18
  25. package/dist/pages/Badges/Badges.d.ts +0 -20
  26. package/dist/pages/Badges/Table.d.ts +0 -31
  27. package/dist/pages/Badges/component.stories.d.ts +0 -14
  28. package/dist/pages/Class/Class.d.ts +0 -27
  29. package/dist/pages/Class/Table.d.ts +0 -31
  30. package/dist/pages/Class/component.stories.d.ts +0 -18
  31. package/dist/pages/Classes/Classes.d.ts +0 -21
  32. package/dist/pages/Classes/Table.d.ts +0 -23
  33. package/dist/pages/Classes/component.stories.d.ts +0 -18
  34. package/dist/pages/Dashboard/BadgeTable.d.ts +0 -32
  35. package/dist/pages/Dashboard/Dashboard.d.ts +0 -38
  36. package/dist/pages/Dashboard/ImpactTable.d.ts +0 -28
  37. package/dist/pages/Dashboard/LessonTable.d.ts +0 -32
  38. package/dist/pages/Dashboard/ReflectionTable.d.ts +0 -30
  39. package/dist/pages/Dashboard/StudentTable.d.ts +0 -31
  40. package/dist/pages/Dashboard/component.stories.d.ts +0 -18
  41. package/dist/pages/Home/Home.d.ts +0 -25
  42. package/dist/pages/Home/component.stories.d.ts +0 -14
  43. package/dist/pages/Lesson/Lesson.d.ts +0 -38
  44. package/dist/pages/Lesson/QuestionStack.d.ts +0 -30
  45. package/dist/pages/Lesson/ReflectionTable.d.ts +0 -29
  46. package/dist/pages/Lesson/Table.d.ts +0 -25
  47. package/dist/pages/Lesson/component.stories.d.ts +0 -18
  48. package/dist/pages/Lessons/Lessons.d.ts +0 -20
  49. package/dist/pages/Lessons/Table.d.ts +0 -22
  50. package/dist/pages/Lessons/component.stories.d.ts +0 -14
  51. package/dist/pages/Student/AnswerTable.d.ts +0 -32
  52. package/dist/pages/Student/BadgeTable.d.ts +0 -31
  53. package/dist/pages/Student/ReflectionTable.d.ts +0 -32
  54. package/dist/pages/Student/Student.d.ts +0 -21
  55. package/dist/pages/Student/component.stories.d.ts +0 -18
  56. package/dist/providers/AdminProvider/AdminProvider.d.ts +0 -14
  57. package/dist/shells/App/App.d.ts +0 -21
  58. package/dist/shells/App/SwitchAccount/SwitchAccount.d.ts +0 -23
  59. package/dist/shells/App/SwitchAccount/component.stories.d.ts +0 -14
  60. package/dist/shells/App/component.stories.d.ts +0 -14
  61. package/dist/utils/time.d.ts +0 -11
package/dist/index.d.ts CHANGED
@@ -1,12 +1,486 @@
1
- export * from './hooks/notifications';
2
- export * from './pages/Badge/Badge';
3
- export * from './pages/Badges/Badges';
4
- export * from './pages/Dashboard/Dashboard';
5
- export * from './pages/Class/Class';
6
- export * from './pages/Classes/Classes';
7
- export * from './pages/Student/Student';
8
- export * from './pages/Home/Home';
9
- export * from './pages/Lesson/Lesson';
10
- export * from './pages/Lessons/Lessons';
11
- export * from './providers/AdminProvider/AdminProvider';
12
- export * from './shells/App/App';
1
+ export { showNotification, updateNotification } from '@mantine/notifications';
2
+ import * as React from 'react';
3
+
4
+ /**
5
+ * Item
6
+ */
7
+ interface Item$g {
8
+ userId: string;
9
+ avatar: string;
10
+ name: string;
11
+ email: string;
12
+ isComplete?: boolean;
13
+ }
14
+
15
+ /**
16
+ * Item
17
+ */
18
+ interface Item$f {
19
+ lessonId: string;
20
+ lessonName: string;
21
+ percentageCompletion: number;
22
+ }
23
+
24
+ /**
25
+ * BadgeUserItem
26
+ */
27
+ type BadgeUserItem = Item$g;
28
+ /**
29
+ * BadgeClass
30
+ */
31
+ type BadgeClass = {
32
+ classId: string;
33
+ name: string;
34
+ active: boolean;
35
+ };
36
+ /**
37
+ * BadgeProps
38
+ */
39
+ type BadgeProps = {
40
+ loading: boolean;
41
+ displayName: string;
42
+ description: string;
43
+ classes: BadgeClass[];
44
+ lessons: Item$f[];
45
+ classId: string;
46
+ students: BadgeUserItem[];
47
+ onBackClick: () => void;
48
+ onClassChange: (classId: string) => void;
49
+ onPreviewClick: () => void;
50
+ onUserClick: (user: BadgeUserItem) => void;
51
+ onLessonClick: (lesson: Item$f) => void;
52
+ };
53
+ /**
54
+ * Badge
55
+ * @param props
56
+ * @constructor
57
+ */
58
+ declare const Badge: (props: BadgeProps) => JSX.Element;
59
+
60
+ /**
61
+ * Item
62
+ */
63
+ interface Item$e {
64
+ badgeId: string;
65
+ name: string;
66
+ description: string;
67
+ }
68
+
69
+ /**
70
+ * BadgeItem
71
+ */
72
+ type BadgeItem = Item$e;
73
+ /**
74
+ * BadgesProps
75
+ */
76
+ type BadgesProps = {
77
+ loading: boolean;
78
+ badges: BadgeItem[];
79
+ onAutocompleteChange: (value: string) => void;
80
+ onBadgeClick: (badge: BadgeItem) => void;
81
+ };
82
+ /**
83
+ * Badges
84
+ * @param props
85
+ * @constructor
86
+ */
87
+ declare const Badges: (props: BadgesProps) => JSX.Element;
88
+
89
+ /**
90
+ * Item
91
+ */
92
+ interface Item$d {
93
+ studentId: string;
94
+ studentName: string;
95
+ className: string;
96
+ }
97
+
98
+ /**
99
+ * Item
100
+ */
101
+ interface Item$c {
102
+ lessonName: string;
103
+ studentName: string;
104
+ reflection: string;
105
+ updatedAt: string;
106
+ }
107
+
108
+ /**
109
+ * Item
110
+ */
111
+ interface Item$b {
112
+ studentName: string;
113
+ impactStatement: string;
114
+ }
115
+
116
+ /**
117
+ * Item
118
+ */
119
+ interface Item$a {
120
+ badgeId: string;
121
+ name: string;
122
+ description: string;
123
+ percentageCompletion: number;
124
+ }
125
+
126
+ /**
127
+ * Item
128
+ */
129
+ interface Item$9 {
130
+ lessonId: string;
131
+ name: string;
132
+ description: string;
133
+ percentageCompletion: number;
134
+ }
135
+
136
+ /**
137
+ * DashboardClass
138
+ */
139
+ type DashboardClass = {
140
+ classId: string;
141
+ name: string;
142
+ };
143
+ /**
144
+ * DashboardProps
145
+ */
146
+ type DashboardProps = {
147
+ loading: boolean;
148
+ students: Item$d[];
149
+ impacts: Item$b[];
150
+ reflections: Item$c[];
151
+ classes: DashboardClass[];
152
+ badges: Item$a[];
153
+ lessons: Item$9[];
154
+ classId: string;
155
+ percentageOfAccountsCreated: number;
156
+ percentageOfBadgesEarned: number;
157
+ percentageOfLessonsCompleted: number;
158
+ onClassChange: (classId: string) => void;
159
+ onViewStudentProfile: (student: Item$d) => void;
160
+ onBadgeClick: (badge: Item$a) => void;
161
+ onLessonClick: (lesson: Item$9) => void;
162
+ };
163
+ /**
164
+ * Dashboard
165
+ * @param props
166
+ * @constructor
167
+ */
168
+ declare const Dashboard: (props: DashboardProps) => JSX.Element;
169
+
170
+ /**
171
+ * Item
172
+ */
173
+ type Item$8 = {
174
+ classId: string;
175
+ studentId: string;
176
+ avatar: string;
177
+ email: string;
178
+ givenName: string;
179
+ familyName: string;
180
+ lastActivity: Date | null;
181
+ readonly: boolean;
182
+ hasAccount: boolean;
183
+ badgesEarned: number;
184
+ lessonsCompleted: number;
185
+ };
186
+
187
+ /**
188
+ * StudentItem
189
+ */
190
+ type StudentItem = Item$8;
191
+ /**
192
+ * ClassProps
193
+ */
194
+ type ClassProps = {
195
+ loading: boolean;
196
+ displayName: string;
197
+ description: string;
198
+ students: StudentItem[];
199
+ percentageOfAccountsCreated: number;
200
+ percentageOfBadgesEarned: number;
201
+ percentageOfLessonsCompleted: number;
202
+ onBackClick: () => void;
203
+ onCreateStudents: (students: StudentItem[]) => void;
204
+ onDeleteStudent: (student: StudentItem) => void;
205
+ onStudentClick: (student: StudentItem) => void;
206
+ };
207
+ /**
208
+ * Class
209
+ * @param props
210
+ * @constructor
211
+ */
212
+ declare const Class: (props: ClassProps) => JSX.Element;
213
+
214
+ /**
215
+ * Item
216
+ */
217
+ type Item$7 = {
218
+ classId: string;
219
+ name: string;
220
+ description: string;
221
+ };
222
+
223
+ /**
224
+ * ClassItem
225
+ */
226
+ type ClassItem = Item$7;
227
+ /**
228
+ * ClassesProps
229
+ */
230
+ type ClassesProps = {
231
+ loading: boolean;
232
+ classes: ClassItem[];
233
+ onCreateClass: (group: ClassItem) => void;
234
+ onDeleteClass: (group: ClassItem) => void;
235
+ onClassClick: (group: ClassItem) => void;
236
+ };
237
+ /**
238
+ * Classes
239
+ * @param props
240
+ * @constructor
241
+ */
242
+ declare const Classes: (props: ClassesProps) => JSX.Element;
243
+
244
+ /**
245
+ * Item
246
+ */
247
+ interface Item$6 {
248
+ badgeId: string;
249
+ badgeName: string;
250
+ isComplete?: boolean;
251
+ }
252
+
253
+ /**
254
+ * Item
255
+ */
256
+ interface Item$5 {
257
+ lessonId: string;
258
+ lessonName: string;
259
+ questionName: string;
260
+ answer: string[];
261
+ }
262
+
263
+ /**
264
+ * Item
265
+ */
266
+ interface Item$4 {
267
+ lessonId: string;
268
+ lessonName: string;
269
+ reflection: string;
270
+ rating: number;
271
+ }
272
+
273
+ /**
274
+ * StudentProps
275
+ */
276
+ type StudentProps = {
277
+ loading: boolean;
278
+ name: string;
279
+ impactStatement: string;
280
+ numberOfProblemsSolved: number;
281
+ percentageOfLessonsCompleted: number;
282
+ badges: Item$6[];
283
+ answers: Item$5[];
284
+ reflections: Item$4[];
285
+ onBackClick: () => void;
286
+ onBadgeClick: (item: Item$6) => void;
287
+ onAnswerClick: (item: Item$5) => void;
288
+ onReflectionClick: (item: Item$4) => void;
289
+ };
290
+ declare const Student: (props: StudentProps) => JSX.Element;
291
+
292
+ /**
293
+ * HomeProps
294
+ */
295
+ type HomeProps = {
296
+ loading: boolean;
297
+ avatarURL: string;
298
+ name: string;
299
+ impactStatement: string;
300
+ organization: {
301
+ name: string;
302
+ description: string;
303
+ image: string;
304
+ website: string;
305
+ };
306
+ onDashboardClick: () => void;
307
+ onClassesClick: () => void;
308
+ onLessonsClick: () => void;
309
+ onBadgesClick: () => void;
310
+ };
311
+ /**
312
+ * Home
313
+ * @param props
314
+ * @constructor
315
+ */
316
+ declare const Home: (props: HomeProps) => JSX.Element;
317
+
318
+ /**
319
+ * Item
320
+ */
321
+ interface Item$3 {
322
+ studentName: string;
323
+ reflection: string;
324
+ rating: number;
325
+ }
326
+
327
+ /**
328
+ * Item
329
+ */
330
+ interface Item$2 {
331
+ userId: string;
332
+ avatar: string;
333
+ name: string;
334
+ email: string;
335
+ isStarted?: boolean;
336
+ isComplete?: boolean;
337
+ }
338
+
339
+ /**
340
+ * Item
341
+ */
342
+ interface Item$1 {
343
+ question: string;
344
+ answers: string[][];
345
+ choices?: string[];
346
+ chart?: boolean;
347
+ }
348
+
349
+ /**
350
+ * LessonUserItem
351
+ */
352
+ type LessonUserItem = Item$2;
353
+ /**
354
+ * LessonClass
355
+ */
356
+ type LessonClass = {
357
+ classId: string;
358
+ name: string;
359
+ active: boolean;
360
+ };
361
+ /**
362
+ * LessonProps
363
+ */
364
+ type LessonProps = {
365
+ loading: boolean;
366
+ displayName: string;
367
+ description: string;
368
+ classId: string;
369
+ classes: LessonClass[];
370
+ students: LessonUserItem[];
371
+ reflections: Item$3[];
372
+ questions: Item$1[];
373
+ onBackClick: () => void;
374
+ onClassChange: (classId: string) => void;
375
+ onPreviewClick: () => void;
376
+ onUserClick: (user: LessonUserItem) => void;
377
+ };
378
+ /**
379
+ * Lesson
380
+ * @param props
381
+ * @constructor
382
+ */
383
+ declare const Lesson: (props: LessonProps) => JSX.Element;
384
+
385
+ /**
386
+ * Item
387
+ */
388
+ interface Item {
389
+ lessonId: string;
390
+ name: string;
391
+ description: string;
392
+ }
393
+
394
+ /**
395
+ * LessonItem
396
+ */
397
+ type LessonItem = Item;
398
+ /**
399
+ * LessonsProps
400
+ */
401
+ type LessonsProps = {
402
+ loading: boolean;
403
+ lessons: LessonItem[];
404
+ onAutocompleteChange: (next: string) => void;
405
+ onLessonClick: (item: LessonItem) => void;
406
+ };
407
+ /**
408
+ * Lessons
409
+ * @param props
410
+ * @constructor
411
+ */
412
+ declare const Lessons: (props: LessonsProps) => JSX.Element;
413
+
414
+ /**
415
+ * AdminProviderProps
416
+ */
417
+ interface AdminProviderProps {
418
+ notificationLimit?: number;
419
+ children: React.ReactNode;
420
+ }
421
+ /**
422
+ * AdminProvider
423
+ * @constructor
424
+ * @param props
425
+ */
426
+ declare const AdminProvider: (props: AdminProviderProps) => JSX.Element;
427
+
428
+ /**
429
+ * AccountItem
430
+ */
431
+ type AccountItem = {
432
+ accountId: string;
433
+ name: string;
434
+ };
435
+ /**
436
+ * SwitchAccountProps
437
+ */
438
+ type SwitchAccountProps = {
439
+ opened: boolean;
440
+ account: string;
441
+ accounts: AccountItem[];
442
+ onChange: (account: string) => void;
443
+ onClose: () => void;
444
+ };
445
+ /**
446
+ * SwitchAccount
447
+ * @param props
448
+ * @constructor
449
+ */
450
+ declare const SwitchAccount: (props: SwitchAccountProps) => JSX.Element;
451
+
452
+ /**
453
+ * NavbarProps
454
+ */
455
+ interface NavbarProps {
456
+ active: string;
457
+ navigate: (to: string) => void;
458
+ onLogout: () => void;
459
+ onSwitchAccounts?: () => void;
460
+ }
461
+ /**
462
+ * Navbar
463
+ * @param props
464
+ * @constructor
465
+ */
466
+ declare const Navbar: (props: NavbarProps) => JSX.Element;
467
+
468
+ /**
469
+ * AppProps
470
+ */
471
+ type AppProps = {
472
+ loading: boolean;
473
+ account: string;
474
+ accounts: AccountItem[];
475
+ navbar: React.ReactElement<NavbarProps>;
476
+ page: React.ReactNode;
477
+ onAccountChange: (account: string) => void;
478
+ };
479
+ /**
480
+ * App
481
+ * @param props
482
+ * @constructor
483
+ */
484
+ declare const App: (props: AppProps) => JSX.Element;
485
+
486
+ export { AccountItem, AdminProvider, AdminProviderProps, App, AppProps, Badge, BadgeClass, BadgeItem, BadgeProps, BadgeUserItem, Badges, BadgesProps, Class, ClassItem, ClassProps, Classes, ClassesProps, Dashboard, DashboardClass, DashboardProps, Home, HomeProps, Lesson, LessonClass, LessonItem, LessonProps, LessonUserItem, Lessons, LessonsProps, Navbar, Student, StudentItem, StudentProps, SwitchAccount };