@local-civics/mgmt-ui 0.1.39 → 0.1.41

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 (57) hide show
  1. package/dist/components/banners/PlaceholderBanner/PlaceholderBanner.d.ts +2 -1
  2. package/dist/components/banners/PlaceholderBanner/component.stories.d.ts +0 -1
  3. package/dist/components/banners/TenantBanner/TenantBanner.d.ts +2 -3
  4. package/dist/components/cards/CardGradient.d.ts +10 -0
  5. package/dist/{pages/Groups → components/cards}/component.stories.d.ts +3 -4
  6. package/dist/components/data/LineChart/LineChart.d.ts +0 -1
  7. package/dist/components/data/StatsGrid/StatsGrid.d.ts +0 -1
  8. package/dist/components/data/StatsGroup/StatsGroup.d.ts +1 -2
  9. package/dist/components/navigation/Navbar/Navbar.d.ts +0 -1
  10. package/dist/components/navigation/Navbar/component.stories.d.ts +0 -1
  11. package/dist/components/navigation/Tabs/Tabs.d.ts +0 -1
  12. package/dist/components/users/UserInfo/UserInfo.d.ts +2 -7
  13. package/dist/index.d.ts +3 -3
  14. package/dist/index.es.js +1 -1
  15. package/dist/index.js +1 -1
  16. package/dist/pages/Badge/Badge.d.ts +10 -8
  17. package/dist/pages/Badge/LessonTable.d.ts +31 -0
  18. package/dist/pages/Badge/Table.d.ts +0 -1
  19. package/dist/pages/Badge/component.stories.d.ts +4 -1
  20. package/dist/pages/Badges/Badges.d.ts +0 -1
  21. package/dist/pages/Badges/Table.d.ts +0 -1
  22. package/dist/pages/Badges/component.stories.d.ts +0 -1
  23. package/dist/pages/Class/Class.d.ts +27 -0
  24. package/dist/pages/{Group → Class}/Table.d.ts +7 -7
  25. package/dist/pages/Class/component.stories.d.ts +18 -0
  26. package/dist/pages/Classes/Classes.d.ts +21 -0
  27. package/dist/pages/{Groups → Classes}/Table.d.ts +2 -3
  28. package/dist/pages/Classes/component.stories.d.ts +18 -0
  29. package/dist/pages/Dashboard/BadgeTable.d.ts +32 -0
  30. package/dist/pages/Dashboard/Dashboard.d.ts +27 -8
  31. package/dist/pages/Dashboard/ImpactTable.d.ts +28 -0
  32. package/dist/pages/Dashboard/LessonTable.d.ts +32 -0
  33. package/dist/pages/Dashboard/StudentTable.d.ts +31 -0
  34. package/dist/pages/Dashboard/component.stories.d.ts +4 -1
  35. package/dist/pages/Home/Home.d.ts +11 -22
  36. package/dist/pages/Home/component.stories.d.ts +0 -1
  37. package/dist/pages/Lesson/Lesson.d.ts +11 -8
  38. package/dist/pages/Lesson/QuestionStack.d.ts +30 -0
  39. package/dist/pages/Lesson/ReflectionTable.d.ts +29 -0
  40. package/dist/pages/Lesson/Table.d.ts +0 -1
  41. package/dist/pages/Lesson/component.stories.d.ts +4 -1
  42. package/dist/pages/Lessons/Lessons.d.ts +0 -1
  43. package/dist/pages/Lessons/Table.d.ts +0 -1
  44. package/dist/pages/Lessons/component.stories.d.ts +0 -1
  45. package/dist/pages/Student/AnswerTable.d.ts +32 -0
  46. package/dist/pages/Student/BadgeTable.d.ts +31 -0
  47. package/dist/pages/Student/ReflectionTable.d.ts +32 -0
  48. package/dist/pages/Student/Student.d.ts +21 -0
  49. package/dist/pages/Student/component.stories.d.ts +18 -0
  50. package/dist/shells/App/SwitchAccount/SwitchAccount.d.ts +0 -1
  51. package/dist/shells/App/SwitchAccount/component.stories.d.ts +0 -1
  52. package/dist/shells/App/component.stories.d.ts +0 -1
  53. package/package.json +2 -1
  54. package/dist/components/data/Timeline/Timeline.d.ts +0 -22
  55. package/dist/pages/Group/Group.d.ts +0 -26
  56. package/dist/pages/GroupUser/GroupUser.d.ts +0 -28
  57. package/dist/pages/Groups/Groups.d.ts +0 -22
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Item
3
+ */
4
+ export interface Item {
5
+ studentId: string;
6
+ studentName: string;
7
+ className: string;
8
+ }
9
+ /**
10
+ * TableData
11
+ */
12
+ export type TableData = {
13
+ loading: boolean;
14
+ items: Item[];
15
+ };
16
+ /**
17
+ * TableMethods
18
+ */
19
+ export type TableMethods = {
20
+ onViewProfile: (item: Item) => void;
21
+ };
22
+ /**
23
+ * TableProps
24
+ */
25
+ export type TableProps = TableData & TableMethods;
26
+ /**
27
+ * Table
28
+ * @constructor
29
+ * @param props
30
+ */
31
+ export declare function Table(props: TableProps): JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DashboardProps } from "./Dashboard";
3
2
  import { Story } from "@storybook/react";
4
3
  /**
@@ -13,3 +12,7 @@ export default _default;
13
12
  * Component stories
14
13
  */
15
14
  export declare const Component: Story<DashboardProps>;
15
+ /**
16
+ * Component stories
17
+ */
18
+ export declare const Mock: Story<DashboardProps>;
@@ -1,32 +1,21 @@
1
- /// <reference types="react" />
2
- import { TimelineItem } from "../../components/data/Timeline/Timeline";
3
- /**
4
- * HomeUserEvent
5
- */
6
- export type HomeUserEvent = TimelineItem;
7
1
  /**
8
2
  * HomeProps
9
3
  */
10
4
  export type HomeProps = {
11
5
  loading: boolean;
12
6
  avatarURL: string;
13
- givenName: string;
14
- familyName: string;
15
- email: string;
16
- job: string;
7
+ name: string;
17
8
  impactStatement: string;
18
- tenantName: string;
19
- tenantDescription: string;
20
- tenantImage: string;
21
- tenantWebsite: string;
22
- events: HomeUserEvent[];
23
- problemsSolved: number;
24
- problemsSolvedDiff: number;
25
- lessonsCompleted: number;
26
- lessonsCompletedDiff: number;
27
- badgesCompleted: number;
28
- badgesCompletedDiff: number;
29
- onScrollBottom: () => void;
9
+ organization: {
10
+ name: string;
11
+ description: string;
12
+ image: string;
13
+ website: string;
14
+ };
15
+ onDashboardClick: () => void;
16
+ onClassesClick: () => void;
17
+ onLessonsClick: () => void;
18
+ onBadgesClick: () => void;
30
19
  };
31
20
  /**
32
21
  * Home
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { HomeProps } from "./Home";
3
2
  import { Story } from "@storybook/react";
4
3
  /**
@@ -1,14 +1,15 @@
1
- /// <reference types="react" />
1
+ import { Item as ReflectionItem } from "./ReflectionTable";
2
2
  import { Item } from "./Table";
3
+ import { Item as QuestionItem } from "./QuestionStack";
3
4
  /**
4
5
  * LessonUserItem
5
6
  */
6
7
  export type LessonUserItem = Item;
7
8
  /**
8
- * LessonGroup
9
+ * LessonClass
9
10
  */
10
- export type LessonGroup = {
11
- groupId: string;
11
+ export type LessonClass = {
12
+ classId: string;
12
13
  name: string;
13
14
  active: boolean;
14
15
  };
@@ -19,11 +20,13 @@ export type LessonProps = {
19
20
  loading: boolean;
20
21
  displayName: string;
21
22
  description: string;
22
- groupId: string;
23
- groups: LessonGroup[];
24
- users: LessonUserItem[];
23
+ classId: string;
24
+ classes: LessonClass[];
25
+ students: LessonUserItem[];
26
+ reflections: ReflectionItem[];
27
+ questions: QuestionItem[];
25
28
  onBackClick: () => void;
26
- onGroupChange: (group: string) => void;
29
+ onClassChange: (classId: string) => void;
27
30
  onPreviewClick: () => void;
28
31
  onUserClick: (user: LessonUserItem) => void;
29
32
  };
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Item
3
+ */
4
+ export interface Item {
5
+ question: string;
6
+ answers: string[][];
7
+ choices?: string[];
8
+ chart?: boolean;
9
+ }
10
+ /**
11
+ * StackData
12
+ */
13
+ export type StackData = {
14
+ loading: boolean;
15
+ items: Item[];
16
+ };
17
+ /**
18
+ * StackMethods
19
+ */
20
+ export type StackMethods = {};
21
+ /**
22
+ * StackProps
23
+ */
24
+ export type StackProps = StackData & StackMethods;
25
+ /**
26
+ * Stack
27
+ * @constructor
28
+ * @param props
29
+ */
30
+ export declare function Stack(props: StackProps): JSX.Element;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Item
3
+ */
4
+ export interface Item {
5
+ studentName: string;
6
+ reflection: string;
7
+ rating: number;
8
+ }
9
+ /**
10
+ * TableData
11
+ */
12
+ export type TableData = {
13
+ loading: boolean;
14
+ items: Item[];
15
+ };
16
+ /**
17
+ * TableMethods
18
+ */
19
+ export type TableMethods = {};
20
+ /**
21
+ * TableProps
22
+ */
23
+ export type TableProps = TableData & TableMethods;
24
+ /**
25
+ * Table
26
+ * @constructor
27
+ * @param props
28
+ */
29
+ export declare function Table(props: TableProps): JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Item
4
3
  */
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { LessonProps } from "./Lesson";
3
2
  import { Story } from "@storybook/react";
4
3
  /**
@@ -13,3 +12,7 @@ export default _default;
13
12
  * Component stories
14
13
  */
15
14
  export declare const Component: Story<LessonProps>;
15
+ /**
16
+ * Component stories
17
+ */
18
+ export declare const Mock: Story<LessonProps>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Item } from "./Table";
3
2
  /**
4
3
  * LessonItem
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Item
4
3
  */
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { LessonsProps } from "./Lessons";
3
2
  import { Story } from "@storybook/react";
4
3
  /**
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Item
3
+ */
4
+ export interface Item {
5
+ lessonId: string;
6
+ lessonName: string;
7
+ questionName: string;
8
+ answer: string[];
9
+ }
10
+ /**
11
+ * TableData
12
+ */
13
+ export type TableData = {
14
+ loading: boolean;
15
+ items: Item[];
16
+ };
17
+ /**
18
+ * TableMethods
19
+ */
20
+ export type TableMethods = {
21
+ onClick: (item: Item) => void;
22
+ };
23
+ /**
24
+ * TableProps
25
+ */
26
+ export type TableProps = TableData & TableMethods;
27
+ /**
28
+ * Table
29
+ * @constructor
30
+ * @param props
31
+ */
32
+ export declare function Table(props: TableProps): JSX.Element;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Item
3
+ */
4
+ export interface Item {
5
+ badgeId: string;
6
+ badgeName: string;
7
+ isComplete?: boolean;
8
+ }
9
+ /**
10
+ * TableData
11
+ */
12
+ export type TableData = {
13
+ loading: boolean;
14
+ items: Item[];
15
+ };
16
+ /**
17
+ * TableMethods
18
+ */
19
+ export type TableMethods = {
20
+ onClick: (item: Item) => void;
21
+ };
22
+ /**
23
+ * TableProps
24
+ */
25
+ export type TableProps = TableData & TableMethods;
26
+ /**
27
+ * Table
28
+ * @constructor
29
+ * @param props
30
+ */
31
+ export declare function Table(props: TableProps): JSX.Element;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Item
3
+ */
4
+ export interface Item {
5
+ lessonId: string;
6
+ lessonName: string;
7
+ reflection: string;
8
+ rating: number;
9
+ }
10
+ /**
11
+ * TableData
12
+ */
13
+ export type TableData = {
14
+ loading: boolean;
15
+ items: Item[];
16
+ };
17
+ /**
18
+ * TableMethods
19
+ */
20
+ export type TableMethods = {
21
+ onClick: (item: Item) => void;
22
+ };
23
+ /**
24
+ * TableProps
25
+ */
26
+ export type TableProps = TableData & TableMethods;
27
+ /**
28
+ * Table
29
+ * @constructor
30
+ * @param props
31
+ */
32
+ export declare function Table(props: TableProps): JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { Item as BadgeItem } from "./BadgeTable";
2
+ import { Item as AnswerItem } from "./AnswerTable";
3
+ import { Item as ReflectionItem } from "./ReflectionTable";
4
+ /**
5
+ * StudentProps
6
+ */
7
+ export type StudentProps = {
8
+ loading: boolean;
9
+ name: string;
10
+ impactStatement: string;
11
+ numberOfProblemsSolved: number;
12
+ percentageOfLessonsCompleted: number;
13
+ badges: BadgeItem[];
14
+ answers: AnswerItem[];
15
+ reflections: ReflectionItem[];
16
+ onBackClick: () => void;
17
+ onBadgeClick: (item: BadgeItem) => void;
18
+ onAnswerClick: (item: AnswerItem) => void;
19
+ onReflectionClick: (item: ReflectionItem) => void;
20
+ };
21
+ export declare const Student: (props: StudentProps) => JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { StudentProps } from "./Student";
2
+ import { Story } from "@storybook/react";
3
+ /**
4
+ * Storybook component configuration
5
+ */
6
+ declare const _default: {
7
+ title: string;
8
+ component: (props: StudentProps) => JSX.Element;
9
+ };
10
+ export default _default;
11
+ /**
12
+ * Component stories
13
+ */
14
+ export declare const Component: Story<StudentProps>;
15
+ /**
16
+ * Component stories
17
+ */
18
+ export declare const Mock: Story<StudentProps>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * AccountItem
4
3
  */
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SwitchAccountProps } from "./SwitchAccount";
3
2
  import { Story } from "@storybook/react";
4
3
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { AppProps } from "./App";
3
2
  import { Story } from "@storybook/react";
4
3
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@local-civics/mgmt-ui",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "scripts": {
@@ -26,6 +26,7 @@
26
26
  "@tabler/icons": "^1.111.0",
27
27
  "dayjs": "^1.11.7",
28
28
  "papaparse": "^5.3.2",
29
+ "react-charts": "3.0.0-beta.38",
29
30
  "recharts": "^2.1.9"
30
31
  },
31
32
  "devDependencies": {
@@ -1,22 +0,0 @@
1
- /// <reference types="react" />
2
- /**
3
- * TimelineItem
4
- */
5
- export type TimelineItem = {
6
- key: string;
7
- name: string;
8
- link?: string;
9
- description: string;
10
- time: string;
11
- };
12
- interface TimelineProps {
13
- items: TimelineItem[];
14
- onScrollBottom: () => void;
15
- }
16
- /**
17
- * Timeline
18
- * @param props
19
- * @constructor
20
- */
21
- export declare const Timeline: (props: TimelineProps) => JSX.Element;
22
- export {};
@@ -1,26 +0,0 @@
1
- /// <reference types="react" />
2
- import { Item } from "./Table";
3
- /**
4
- * GroupUserItem
5
- */
6
- export type GroupUserItem = Item;
7
- /**
8
- * GroupProps
9
- */
10
- export type GroupProps = {
11
- loading: boolean;
12
- displayName: string;
13
- description: string;
14
- users: GroupUserItem[];
15
- onBackClick: () => void;
16
- onCreateUsers: (users: GroupUserItem[]) => void;
17
- onDeleteUser: (user: GroupUserItem) => void;
18
- onRoleChange: (user: GroupUserItem, role: string | null) => void;
19
- onUserClick: (item: GroupUserItem) => void;
20
- };
21
- /**
22
- * Group
23
- * @param props
24
- * @constructor
25
- */
26
- export declare const Group: (props: GroupProps) => JSX.Element;
@@ -1,28 +0,0 @@
1
- /// <reference types="react" />
2
- import { TimelineItem } from "../../components/data/Timeline/Timeline";
3
- /**
4
- * GroupUserEvent
5
- */
6
- export type GroupUserEvent = TimelineItem;
7
- /**
8
- * GroupUserProps
9
- */
10
- export type GroupUserProps = {
11
- loading: boolean;
12
- avatarURL: string;
13
- givenName: string;
14
- familyName: string;
15
- email: string;
16
- job: string;
17
- impactStatement: string;
18
- events: GroupUserEvent[];
19
- problemsSolved: number;
20
- problemsSolvedDiff: number;
21
- lessonsCompleted: number;
22
- lessonsCompletedDiff: number;
23
- badgesCompleted: number;
24
- badgesCompletedDiff: number;
25
- onBackClick: () => void;
26
- onScrollBottom: () => void;
27
- };
28
- export declare const GroupUser: (props: GroupUserProps) => JSX.Element;
@@ -1,22 +0,0 @@
1
- /// <reference types="react" />
2
- import { Item } from "./Table";
3
- /**
4
- * GroupItem
5
- */
6
- export type GroupItem = Item;
7
- /**
8
- * GroupsProps
9
- */
10
- export type GroupsProps = {
11
- loading: boolean;
12
- groups: GroupItem[];
13
- onCreateGroup: (group: GroupItem) => void;
14
- onDeleteGroup: (group: GroupItem) => void;
15
- onGroupClick: (group: GroupItem) => void;
16
- };
17
- /**
18
- * Groups
19
- * @param props
20
- * @constructor
21
- */
22
- export declare const Groups: (props: GroupsProps) => JSX.Element;