@local-civics/mgmt-ui 0.1.124 → 0.1.126
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 +116 -46
- package/dist/index.js +305 -108
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +359 -163
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import { createStyles, Group, Avatar, Text, Box, Badge as Badge$1, ThemeIcon, Collapse, Navbar as Navbar$1, Center, Image, Code, Burger, ScrollArea, Modal, Loader, Container, Button, Title, UnstyledButton, Card, SimpleGrid, Tabs as Tabs$1, Menu, ActionIcon, Grid, Table as Table$
|
|
3
|
+
import { createStyles, Group, Avatar, Text, Box, Badge as Badge$1, ThemeIcon, Collapse, Navbar as Navbar$1, Center, Image, Code, Burger, ScrollArea, Modal, Loader, Container, Button, Title, UnstyledButton, Card, SimpleGrid, Tabs as Tabs$1, Menu, ActionIcon, Grid, Table as Table$k, Stack as Stack$4, LoadingOverlay, Select, Autocomplete, Drawer, Divider, TextInput, Tooltip, Paper, Overlay, Anchor, Checkbox, createEmotionCache, MantineProvider, AppShell } from '@mantine/core';
|
|
4
4
|
import { IconChevronRight, IconChevronLeft, IconVideo, IconSwitchHorizontal, IconLogout, IconHome2, IconGauge, IconCategory2, IconAlbum, IconLambda, IconRoute, IconBuilding, IconBatteryEco, IconBooks, IconBackpack, IconChevronDown, IconClipboardCopy, IconTableExport, IconArrowLeft, IconPlaylistAdd, IconCheck, IconTrash, IconDownload, IconX, IconCloudUpload, IconInfoCircle, IconColorSwatch, IconPointer, IconScribble, IconSchool, IconPodium, IconBriefcase, IconPresentation, IconNews, IconTools, IconBrandInstagram, IconBrandLinkedin, IconBrandFacebook } from '@tabler/icons';
|
|
5
5
|
import { Link } from 'react-router-dom';
|
|
6
6
|
import { NotificationsProvider } from '@mantine/notifications';
|
|
@@ -42,7 +42,7 @@ var __objRest$2 = (source, exclude) => {
|
|
|
42
42
|
}
|
|
43
43
|
return target;
|
|
44
44
|
};
|
|
45
|
-
const useStyles$
|
|
45
|
+
const useStyles$t = createStyles((theme) => ({
|
|
46
46
|
user: {
|
|
47
47
|
display: "block",
|
|
48
48
|
width: "100%",
|
|
@@ -53,7 +53,7 @@ const useStyles$r = createStyles((theme) => ({
|
|
|
53
53
|
}));
|
|
54
54
|
function UserButton(_a) {
|
|
55
55
|
var _b = _a, { image, name, email, icon } = _b, others = __objRest$2(_b, ["image", "name", "email", "icon"]);
|
|
56
|
-
const { classes } = useStyles$
|
|
56
|
+
const { classes } = useStyles$t();
|
|
57
57
|
return /* @__PURE__ */ React.createElement(Group, __spreadValues$9({ className: classes.user }, others), /* @__PURE__ */ React.createElement(Avatar, { src: image, radius: "xl" }), /* @__PURE__ */ React.createElement("div", { style: { flex: 1 } }, /* @__PURE__ */ React.createElement(Text, { size: "sm", weight: 500 }, name), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", size: "xs" }, email)));
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -64,7 +64,7 @@ const compact = (num) => {
|
|
|
64
64
|
}).format(num || 0);
|
|
65
65
|
};
|
|
66
66
|
|
|
67
|
-
const useStyles$
|
|
67
|
+
const useStyles$s = createStyles((theme, _params, getRef) => {
|
|
68
68
|
const icon = getRef("icon");
|
|
69
69
|
return {
|
|
70
70
|
control: {
|
|
@@ -117,7 +117,7 @@ const useStyles$q = createStyles((theme, _params, getRef) => {
|
|
|
117
117
|
};
|
|
118
118
|
});
|
|
119
119
|
function LinksGroup({ icon: Icon, href, label, initiallyOpened, links, active, notifications }) {
|
|
120
|
-
const { classes, theme, cx } = useStyles$
|
|
120
|
+
const { classes, theme, cx } = useStyles$s();
|
|
121
121
|
const hasLinks = Array.isArray(links) && links.length > 0;
|
|
122
122
|
const hasActiveLinks = Array.isArray(links) && links.map((l) => !!active && active === `${label}/${l.label}`).reduce((a, b) => a || b, false);
|
|
123
123
|
const [opened, setOpened] = useState(initiallyOpened || hasActiveLinks || false);
|
|
@@ -181,7 +181,7 @@ var __spreadValues$8 = (a, b) => {
|
|
|
181
181
|
return a;
|
|
182
182
|
};
|
|
183
183
|
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
184
|
-
const useStyles$
|
|
184
|
+
const useStyles$r = createStyles((theme, _params, getRef) => {
|
|
185
185
|
const icon = getRef("icon");
|
|
186
186
|
return {
|
|
187
187
|
navbar: {
|
|
@@ -281,7 +281,7 @@ const TRIAL_PAGES = [
|
|
|
281
281
|
"Badges"
|
|
282
282
|
];
|
|
283
283
|
function Navbar(props) {
|
|
284
|
-
const { classes, cx } = useStyles$
|
|
284
|
+
const { classes, cx } = useStyles$r();
|
|
285
285
|
const [burgerOpen, setBurgerOpen] = React.useState(false);
|
|
286
286
|
const toggle = () => setBurgerOpen(!burgerOpen);
|
|
287
287
|
const links = data.map((item) => {
|
|
@@ -324,7 +324,7 @@ function Navbar(props) {
|
|
|
324
324
|
} }, /* @__PURE__ */ React.createElement(IconLogout, { className: classes.linkIcon, stroke: 1.5 }), /* @__PURE__ */ React.createElement("span", null, "Logout"))))));
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
-
const useStyles$
|
|
327
|
+
const useStyles$q = createStyles((theme) => ({
|
|
328
328
|
inner: {
|
|
329
329
|
paddingTop: theme.spacing.xl,
|
|
330
330
|
paddingBottom: theme.spacing.xl * 4
|
|
@@ -360,7 +360,7 @@ const useStyles$o = createStyles((theme) => ({
|
|
|
360
360
|
}
|
|
361
361
|
}));
|
|
362
362
|
const GettingStarted = (props) => {
|
|
363
|
-
const { classes } = useStyles$
|
|
363
|
+
const { classes } = useStyles$q();
|
|
364
364
|
return /* @__PURE__ */ React.createElement(
|
|
365
365
|
Modal,
|
|
366
366
|
{
|
|
@@ -374,7 +374,7 @@ const GettingStarted = (props) => {
|
|
|
374
374
|
);
|
|
375
375
|
};
|
|
376
376
|
|
|
377
|
-
const useStyles$
|
|
377
|
+
const useStyles$p = createStyles((theme) => ({
|
|
378
378
|
title: {
|
|
379
379
|
fontSize: 34,
|
|
380
380
|
fontWeight: 900,
|
|
@@ -415,7 +415,7 @@ const useStyles$n = createStyles((theme) => ({
|
|
|
415
415
|
}
|
|
416
416
|
}));
|
|
417
417
|
const SwitchAccount = (props) => {
|
|
418
|
-
const { classes, theme } = useStyles$
|
|
418
|
+
const { classes, theme } = useStyles$p();
|
|
419
419
|
const options = props.accounts.map((a) => {
|
|
420
420
|
return /* @__PURE__ */ React.createElement(UnstyledButton, { onClick: () => props.onClick && props.onClick(a.accountId), key: a.accountId, p: theme.spacing.md }, /* @__PURE__ */ React.createElement(Card, { withBorder: true, shadow: "md", radius: "md", className: classes.card, p: "xl" }, a.isAdmin && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(IconBatteryEco, { size: 50, stroke: 2, color: theme.fn.primaryColor() })), a.isGroupAdmin && !a.isAdmin && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(IconBooks, { size: 50, stroke: 2, color: theme.fn.primaryColor() })), !a.isAdmin && !a.isGroupAdmin && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(IconBackpack, { size: 50, stroke: 2, color: theme.fn.primaryColor() })), /* @__PURE__ */ React.createElement(Text, { size: "lg", weight: 500, className: classes.cardTitle, mt: "md" }, a.name), /* @__PURE__ */ React.createElement(Text, { size: "sm", color: "dimmed", mt: "sm" }, a.isAdmin ? "Admin" : a.isGroupAdmin ? "Educator" : "Student")));
|
|
421
421
|
});
|
|
@@ -432,7 +432,7 @@ const SwitchAccount = (props) => {
|
|
|
432
432
|
);
|
|
433
433
|
};
|
|
434
434
|
|
|
435
|
-
const useStyles$
|
|
435
|
+
const useStyles$o = createStyles((theme) => ({
|
|
436
436
|
root: {
|
|
437
437
|
display: "flex",
|
|
438
438
|
backgroundImage: `linear-gradient(-60deg, ${theme.colors[theme.primaryColor][4]} 0%, ${theme.colors[theme.primaryColor][7]} 100%)`,
|
|
@@ -476,7 +476,7 @@ const useStyles$m = createStyles((theme) => ({
|
|
|
476
476
|
}
|
|
477
477
|
}));
|
|
478
478
|
const StatsGroup = ({ data, footer }) => {
|
|
479
|
-
const { classes } = useStyles$
|
|
479
|
+
const { classes } = useStyles$o();
|
|
480
480
|
const stats = data.map((stat) => {
|
|
481
481
|
const value = (() => {
|
|
482
482
|
if (stat.unit === "%") {
|
|
@@ -495,7 +495,7 @@ const Tabs = (props) => {
|
|
|
495
495
|
return /* @__PURE__ */ React.createElement(Tabs$1, { value: props.value, onTabChange: props.onChange }, /* @__PURE__ */ React.createElement(Tabs$1.List, null, tabs));
|
|
496
496
|
};
|
|
497
497
|
|
|
498
|
-
const useStyles$
|
|
498
|
+
const useStyles$n = createStyles((theme) => ({
|
|
499
499
|
button: {
|
|
500
500
|
borderTopRightRadius: 0,
|
|
501
501
|
borderBottomRightRadius: 0,
|
|
@@ -509,8 +509,8 @@ const useStyles$l = createStyles((theme) => ({
|
|
|
509
509
|
borderLeft: `1px solid ${theme.colorScheme === "dark" ? theme.colors.dark[7] : theme.white}`
|
|
510
510
|
}
|
|
511
511
|
}));
|
|
512
|
-
const SplitButton$
|
|
513
|
-
const { classes, theme } = useStyles$
|
|
512
|
+
const SplitButton$4 = (props) => {
|
|
513
|
+
const { classes, theme } = useStyles$n();
|
|
514
514
|
const menuIconColor = theme.colors[theme.primaryColor][theme.colorScheme === "dark" ? 5 : 6];
|
|
515
515
|
return /* @__PURE__ */ React.createElement(Group, { noWrap: true, spacing: 0 }, /* @__PURE__ */ React.createElement(
|
|
516
516
|
Button,
|
|
@@ -547,7 +547,7 @@ const SplitButton$3 = (props) => {
|
|
|
547
547
|
))));
|
|
548
548
|
};
|
|
549
549
|
|
|
550
|
-
const useStyles$
|
|
550
|
+
const useStyles$m = createStyles((theme) => ({
|
|
551
551
|
wrapper: {
|
|
552
552
|
display: "flex",
|
|
553
553
|
alignItems: "center",
|
|
@@ -598,13 +598,13 @@ const useStyles$k = createStyles((theme) => ({
|
|
|
598
598
|
}
|
|
599
599
|
}));
|
|
600
600
|
const PlaceholderBanner = (props) => {
|
|
601
|
-
const { classes } = useStyles$
|
|
601
|
+
const { classes } = useStyles$m();
|
|
602
602
|
const title = props.title || "Nothing to display";
|
|
603
603
|
const description = props.description || "We don't have anything to show you here just yet. Add data, check back later, or adjust your search.";
|
|
604
604
|
return /* @__PURE__ */ React.createElement("div", { className: classes.wrapper }, /* @__PURE__ */ React.createElement("div", { className: classes.body }, /* @__PURE__ */ React.createElement(Title, { className: classes.title }, props.loading ? "Loading..." : title), /* @__PURE__ */ React.createElement(Text, { size: "sm", color: "dimmed" }, props.loading ? "Hold on, we're loading your data." : description)), /* @__PURE__ */ React.createElement(Image, { src: `https://cdn.localcivics.io/illustrations/${props.icon}.svg`, className: classes.image }));
|
|
605
605
|
};
|
|
606
606
|
|
|
607
|
-
function Stack$
|
|
607
|
+
function Stack$3(props) {
|
|
608
608
|
if (props.items.length === 0) {
|
|
609
609
|
return null;
|
|
610
610
|
}
|
|
@@ -612,7 +612,7 @@ function Stack$2(props) {
|
|
|
612
612
|
return /* @__PURE__ */ React.createElement(Grid, { grow: true, gutter: "lg", sx: { padding: 20, minWidth: 700 } }, rows);
|
|
613
613
|
}
|
|
614
614
|
|
|
615
|
-
function Table$
|
|
615
|
+
function Table$j(props) {
|
|
616
616
|
if (props.items.length === 0) {
|
|
617
617
|
return /* @__PURE__ */ React.createElement(
|
|
618
618
|
PlaceholderBanner,
|
|
@@ -645,13 +645,13 @@ function Table$h(props) {
|
|
|
645
645
|
render: (row) => /* @__PURE__ */ React.createElement(React.Fragment, null, !!row.isComplete && /* @__PURE__ */ React.createElement(Badge$1, { variant: "filled" }, "Complete"), !row.isComplete && /* @__PURE__ */ React.createElement(Badge$1, { color: "red", variant: "filled" }, "Incomplete"))
|
|
646
646
|
}],
|
|
647
647
|
rowExpansion: {
|
|
648
|
-
content: ({ record }) => /* @__PURE__ */ React.createElement(Stack$
|
|
648
|
+
content: ({ record }) => /* @__PURE__ */ React.createElement(Stack$3, { items: record.lessons })
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
651
|
));
|
|
652
652
|
}
|
|
653
653
|
|
|
654
|
-
function Table$
|
|
654
|
+
function Table$i(props) {
|
|
655
655
|
if (props.items.length === 0) {
|
|
656
656
|
return /* @__PURE__ */ React.createElement(
|
|
657
657
|
PlaceholderBanner,
|
|
@@ -667,10 +667,10 @@ function Table$g(props) {
|
|
|
667
667
|
const percentageCompletion = Math.round((row.percentageCompletion + Number.EPSILON) * 100);
|
|
668
668
|
return /* @__PURE__ */ React.createElement("tr", { key: row.lessonName }, /* @__PURE__ */ React.createElement("td", null, /* @__PURE__ */ React.createElement(Text, { component: Link, to: row.href }, row.lessonName)), /* @__PURE__ */ React.createElement("td", null, percentageCompletion, "%"));
|
|
669
669
|
});
|
|
670
|
-
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$
|
|
670
|
+
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$k, { verticalSpacing: "sm", sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", null, "Lesson Name"), /* @__PURE__ */ React.createElement("th", null, "Lesson Completion"))), /* @__PURE__ */ React.createElement("tbody", null, rows)));
|
|
671
671
|
}
|
|
672
672
|
|
|
673
|
-
const useStyles$
|
|
673
|
+
const useStyles$l = createStyles((theme) => ({
|
|
674
674
|
title: {
|
|
675
675
|
fontSize: 34,
|
|
676
676
|
fontWeight: 900,
|
|
@@ -683,11 +683,11 @@ const useStyles$j = createStyles((theme) => ({
|
|
|
683
683
|
}
|
|
684
684
|
}));
|
|
685
685
|
const Badge = (props) => {
|
|
686
|
-
const { classes } = useStyles$
|
|
686
|
+
const { classes } = useStyles$l();
|
|
687
687
|
const [tab, setTab] = useState("lessons");
|
|
688
688
|
const numberOfStudents = props.students.length;
|
|
689
689
|
const percentageOfBadgesEarned = numberOfStudents > 0 ? props.students.filter((u) => u.isComplete).length / numberOfStudents : 0;
|
|
690
|
-
return /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$
|
|
690
|
+
return /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$4, { spacing: "md" }, /* @__PURE__ */ React.createElement(Grid, null, /* @__PURE__ */ React.createElement(Grid.Col, { sm: "auto" }, /* @__PURE__ */ React.createElement(UnstyledButton, { onClick: props.onBackClick }, /* @__PURE__ */ React.createElement(
|
|
691
691
|
Badge$1,
|
|
692
692
|
{
|
|
693
693
|
variant: "filled",
|
|
@@ -695,14 +695,14 @@ const Badge = (props) => {
|
|
|
695
695
|
size: "lg"
|
|
696
696
|
},
|
|
697
697
|
"Back"
|
|
698
|
-
)), /* @__PURE__ */ React.createElement(Group, null, /* @__PURE__ */ React.createElement(Stack$
|
|
699
|
-
SplitButton$
|
|
698
|
+
)), /* @__PURE__ */ React.createElement(Group, null, /* @__PURE__ */ React.createElement(Stack$4, { spacing: 0 }, /* @__PURE__ */ React.createElement(Title, { order: 2, className: classes.title, mt: "md" }, props.displayName || "Badge"), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", className: classes.description, mt: "sm" }, props.description || "No description")), !props.trial && /* @__PURE__ */ React.createElement(Stack$4, { ml: "auto" }, /* @__PURE__ */ React.createElement(
|
|
699
|
+
SplitButton$4,
|
|
700
700
|
{
|
|
701
701
|
href: props.href,
|
|
702
702
|
onCopyLinkClick: props.onCopyLinkClick,
|
|
703
703
|
onExportDataClick: props.onExportDataClick
|
|
704
704
|
}
|
|
705
|
-
))))), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React.createElement(Stack$
|
|
705
|
+
))))), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React.createElement(Stack$4, null, /* @__PURE__ */ React.createElement(StatsGroup, { data: [
|
|
706
706
|
{
|
|
707
707
|
title: props.trial ? "LESSONS SUBMITTED" : "BADGE COMPLETION",
|
|
708
708
|
value: props.trial ? props.lessonsCompleted || 0 : percentageOfBadgesEarned,
|
|
@@ -723,7 +723,7 @@ const Badge = (props) => {
|
|
|
723
723
|
return { value: g.classId, label: g.name };
|
|
724
724
|
})
|
|
725
725
|
}
|
|
726
|
-
), /* @__PURE__ */ React.createElement(Stack$
|
|
726
|
+
), /* @__PURE__ */ React.createElement(Stack$4, { spacing: 0 }, !props.trial && /* @__PURE__ */ React.createElement(
|
|
727
727
|
Tabs,
|
|
728
728
|
{
|
|
729
729
|
value: tab,
|
|
@@ -734,13 +734,13 @@ const Badge = (props) => {
|
|
|
734
734
|
onChange: setTab
|
|
735
735
|
}
|
|
736
736
|
), (!!props.trial || tab === "lessons") && /* @__PURE__ */ React.createElement(
|
|
737
|
-
Table$
|
|
737
|
+
Table$i,
|
|
738
738
|
{
|
|
739
739
|
loading: props.loading,
|
|
740
740
|
items: props.lessons
|
|
741
741
|
}
|
|
742
742
|
), !props.trial && tab === "students" && /* @__PURE__ */ React.createElement(
|
|
743
|
-
Table$
|
|
743
|
+
Table$j,
|
|
744
744
|
{
|
|
745
745
|
loading: props.loading,
|
|
746
746
|
items: props.students
|
|
@@ -748,7 +748,7 @@ const Badge = (props) => {
|
|
|
748
748
|
)))))));
|
|
749
749
|
};
|
|
750
750
|
|
|
751
|
-
function Table$
|
|
751
|
+
function Table$h(props) {
|
|
752
752
|
if (props.items.length === 0) {
|
|
753
753
|
return /* @__PURE__ */ React.createElement(
|
|
754
754
|
PlaceholderBanner,
|
|
@@ -777,10 +777,10 @@ function Table$f(props) {
|
|
|
777
777
|
},
|
|
778
778
|
/* @__PURE__ */ React.createElement(Group, null, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Text, { size: "sm", weight: 500 }, row.name), /* @__PURE__ */ React.createElement(Text, { size: "xs", color: "dimmed" }, row.description)))
|
|
779
779
|
))));
|
|
780
|
-
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$
|
|
780
|
+
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$k, { horizontalSpacing: 0, verticalSpacing: 0, sx: { minWidth: 700 } }, /* @__PURE__ */ React.createElement("tbody", null, rows)));
|
|
781
781
|
}
|
|
782
782
|
|
|
783
|
-
const useStyles$
|
|
783
|
+
const useStyles$k = createStyles((theme) => ({
|
|
784
784
|
title: {
|
|
785
785
|
fontSize: 34,
|
|
786
786
|
fontWeight: 900,
|
|
@@ -793,8 +793,8 @@ const useStyles$i = createStyles((theme) => ({
|
|
|
793
793
|
}
|
|
794
794
|
}));
|
|
795
795
|
const Badges = (props) => {
|
|
796
|
-
const { classes } = useStyles$
|
|
797
|
-
return /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$
|
|
796
|
+
const { classes } = useStyles$k();
|
|
797
|
+
return /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$4, { spacing: "md" }, /* @__PURE__ */ React.createElement(Grid, null, /* @__PURE__ */ React.createElement(Grid.Col, { sm: "auto" }, /* @__PURE__ */ React.createElement(Badge$1, { variant: "filled", size: "lg" }, "Badges"), /* @__PURE__ */ React.createElement(Title, { order: 2, className: classes.title, mt: "md" }, "Badges and micro-credentials"), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", className: classes.description, mt: "sm" }, "Project-sized skills acquisition and standards alignment."))), /* @__PURE__ */ React.createElement(
|
|
798
798
|
Autocomplete,
|
|
799
799
|
{
|
|
800
800
|
placeholder: "Search for a badge that fits your needs",
|
|
@@ -802,7 +802,7 @@ const Badges = (props) => {
|
|
|
802
802
|
onChange: props.onAutocompleteChange
|
|
803
803
|
}
|
|
804
804
|
), /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React.createElement(
|
|
805
|
-
Table$
|
|
805
|
+
Table$h,
|
|
806
806
|
{
|
|
807
807
|
loading: props.loading,
|
|
808
808
|
items: props.badges
|
|
@@ -810,7 +810,7 @@ const Badges = (props) => {
|
|
|
810
810
|
))));
|
|
811
811
|
};
|
|
812
812
|
|
|
813
|
-
function Table$
|
|
813
|
+
function Table$g(props) {
|
|
814
814
|
if (props.items.length === 0) {
|
|
815
815
|
return /* @__PURE__ */ React.createElement(
|
|
816
816
|
PlaceholderBanner,
|
|
@@ -823,7 +823,7 @@ function Table$e(props) {
|
|
|
823
823
|
);
|
|
824
824
|
}
|
|
825
825
|
const rows = props.items.map((row) => /* @__PURE__ */ React.createElement("tr", { key: row.studentName }, /* @__PURE__ */ React.createElement("td", null, /* @__PURE__ */ React.createElement(UnstyledButton, { onClick: () => props.onViewProfile(row) }, row.studentName)), /* @__PURE__ */ React.createElement("td", null, row.className)));
|
|
826
|
-
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$
|
|
826
|
+
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$k, { verticalSpacing: "sm", sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", null, "Student Name"), /* @__PURE__ */ React.createElement("th", null, "Class Name"))), /* @__PURE__ */ React.createElement("tbody", null, rows)));
|
|
827
827
|
}
|
|
828
828
|
|
|
829
829
|
const units = [
|
|
@@ -850,7 +850,7 @@ function relativeTimeFromElapsed(elapsed) {
|
|
|
850
850
|
return "";
|
|
851
851
|
}
|
|
852
852
|
|
|
853
|
-
function Table$
|
|
853
|
+
function Table$f(props) {
|
|
854
854
|
if (props.items.length === 0) {
|
|
855
855
|
return /* @__PURE__ */ React.createElement(
|
|
856
856
|
PlaceholderBanner,
|
|
@@ -863,10 +863,10 @@ function Table$d(props) {
|
|
|
863
863
|
);
|
|
864
864
|
}
|
|
865
865
|
const rows = props.items.map((row) => /* @__PURE__ */ React.createElement("tr", { key: row.studentName + row.lessonName }, /* @__PURE__ */ React.createElement("td", null, row.studentName), /* @__PURE__ */ React.createElement("td", null, row.lessonName), /* @__PURE__ */ React.createElement("td", null, row.reflection), /* @__PURE__ */ React.createElement("td", null, relativeTimeFromDates(new Date(row.updatedAt)))));
|
|
866
|
-
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$
|
|
866
|
+
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$k, { verticalSpacing: "sm", sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", null, "Student Name"), /* @__PURE__ */ React.createElement("th", null, "Lesson Name"), /* @__PURE__ */ React.createElement("th", null, "Reflection"), /* @__PURE__ */ React.createElement("th", null, "Updated At"))), /* @__PURE__ */ React.createElement("tbody", null, rows)));
|
|
867
867
|
}
|
|
868
868
|
|
|
869
|
-
function Table$
|
|
869
|
+
function Table$e(props) {
|
|
870
870
|
if (props.items.length === 0) {
|
|
871
871
|
return /* @__PURE__ */ React.createElement(
|
|
872
872
|
PlaceholderBanner,
|
|
@@ -879,10 +879,10 @@ function Table$c(props) {
|
|
|
879
879
|
);
|
|
880
880
|
}
|
|
881
881
|
const rows = props.items.map((row) => /* @__PURE__ */ React.createElement("tr", { key: row.studentName }, /* @__PURE__ */ React.createElement("td", null, row.studentName), /* @__PURE__ */ React.createElement("td", null, row.impactStatement)));
|
|
882
|
-
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$
|
|
882
|
+
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$k, { verticalSpacing: "sm", sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", null, "Student Name"), /* @__PURE__ */ React.createElement("th", null, "Impact Statement"))), /* @__PURE__ */ React.createElement("tbody", null, rows)));
|
|
883
883
|
}
|
|
884
884
|
|
|
885
|
-
function Table$
|
|
885
|
+
function Table$d(props) {
|
|
886
886
|
if (props.items.length === 0) {
|
|
887
887
|
return /* @__PURE__ */ React.createElement(
|
|
888
888
|
PlaceholderBanner,
|
|
@@ -895,10 +895,10 @@ function Table$b(props) {
|
|
|
895
895
|
);
|
|
896
896
|
}
|
|
897
897
|
const rows = props.items.map((row) => /* @__PURE__ */ React.createElement("tr", { key: row.badgeId }, /* @__PURE__ */ React.createElement("td", null, /* @__PURE__ */ React.createElement(UnstyledButton, { onClick: () => props.onClick && props.onClick(row) }, row.name)), /* @__PURE__ */ React.createElement("td", null, row.description), /* @__PURE__ */ React.createElement("td", null, Math.round((row.percentageCompletion + Number.EPSILON) * 100), "%")));
|
|
898
|
-
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$
|
|
898
|
+
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$k, { verticalSpacing: "sm", sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", null, "Badge Name"), /* @__PURE__ */ React.createElement("th", null, "Description"), /* @__PURE__ */ React.createElement("th", null, "Completion"))), /* @__PURE__ */ React.createElement("tbody", null, rows)));
|
|
899
899
|
}
|
|
900
900
|
|
|
901
|
-
function Table$
|
|
901
|
+
function Table$c(props) {
|
|
902
902
|
if (props.items.length === 0) {
|
|
903
903
|
return /* @__PURE__ */ React.createElement(
|
|
904
904
|
PlaceholderBanner,
|
|
@@ -911,12 +911,12 @@ function Table$a(props) {
|
|
|
911
911
|
);
|
|
912
912
|
}
|
|
913
913
|
const rows = props.items.map((row) => /* @__PURE__ */ React.createElement("tr", { key: row.lessonId }, /* @__PURE__ */ React.createElement("td", null, /* @__PURE__ */ React.createElement(UnstyledButton, { onClick: () => props.onClick && props.onClick(row) }, row.name)), /* @__PURE__ */ React.createElement("td", null, row.description), /* @__PURE__ */ React.createElement("td", null, Math.round((row.percentageCompletion + Number.EPSILON) * 100), "%")));
|
|
914
|
-
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$
|
|
914
|
+
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$k, { verticalSpacing: "sm", sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", null, "Lesson Name"), /* @__PURE__ */ React.createElement("th", null, "Description"), /* @__PURE__ */ React.createElement("th", null, "Completion"))), /* @__PURE__ */ React.createElement("tbody", null, rows)));
|
|
915
915
|
}
|
|
916
916
|
|
|
917
917
|
const Dashboard = (props) => {
|
|
918
918
|
const [tab, setTab] = useState("students");
|
|
919
|
-
return /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$
|
|
919
|
+
return /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$4, null, /* @__PURE__ */ React.createElement(Stack$4, { spacing: 0 }, /* @__PURE__ */ React.createElement(Title, { size: "h3" }, "Dashboard"), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", size: "sm", mt: "md" }, "Fast-track learning for your students.")), /* @__PURE__ */ React.createElement(Stack$4, null, /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React.createElement(Stack$4, { spacing: "sm" }, /* @__PURE__ */ React.createElement(StatsGroup, { data: [
|
|
920
920
|
{
|
|
921
921
|
title: "# OF STUDENTS",
|
|
922
922
|
value: props.students.length
|
|
@@ -949,7 +949,7 @@ const Dashboard = (props) => {
|
|
|
949
949
|
return { value: g.classId, label: g.name };
|
|
950
950
|
})
|
|
951
951
|
}
|
|
952
|
-
), /* @__PURE__ */ React.createElement(Stack$
|
|
952
|
+
), /* @__PURE__ */ React.createElement(Stack$4, { spacing: 0 }, /* @__PURE__ */ React.createElement(
|
|
953
953
|
Tabs,
|
|
954
954
|
{
|
|
955
955
|
value: tab,
|
|
@@ -963,33 +963,33 @@ const Dashboard = (props) => {
|
|
|
963
963
|
onChange: setTab
|
|
964
964
|
}
|
|
965
965
|
), tab === "impact" && /* @__PURE__ */ React.createElement(
|
|
966
|
-
Table$
|
|
966
|
+
Table$e,
|
|
967
967
|
{
|
|
968
968
|
loading: props.loading,
|
|
969
969
|
items: props.impacts
|
|
970
970
|
}
|
|
971
971
|
), tab === "reflections" && /* @__PURE__ */ React.createElement(
|
|
972
|
-
Table$
|
|
972
|
+
Table$f,
|
|
973
973
|
{
|
|
974
974
|
loading: props.loading,
|
|
975
975
|
items: props.reflections
|
|
976
976
|
}
|
|
977
977
|
), tab === "badges" && /* @__PURE__ */ React.createElement(
|
|
978
|
-
Table$
|
|
978
|
+
Table$d,
|
|
979
979
|
{
|
|
980
980
|
loading: props.loading,
|
|
981
981
|
items: props.badges,
|
|
982
982
|
onClick: props.onBadgeClick
|
|
983
983
|
}
|
|
984
984
|
), tab === "lessons" && /* @__PURE__ */ React.createElement(
|
|
985
|
-
Table$
|
|
985
|
+
Table$c,
|
|
986
986
|
{
|
|
987
987
|
loading: props.loading,
|
|
988
988
|
items: props.lessons,
|
|
989
989
|
onClick: props.onLessonClick
|
|
990
990
|
}
|
|
991
991
|
), tab === "students" && /* @__PURE__ */ React.createElement(
|
|
992
|
-
Table$
|
|
992
|
+
Table$g,
|
|
993
993
|
{
|
|
994
994
|
loading: props.loading,
|
|
995
995
|
items: props.students,
|
|
@@ -998,8 +998,8 @@ const Dashboard = (props) => {
|
|
|
998
998
|
)))))));
|
|
999
999
|
};
|
|
1000
1000
|
|
|
1001
|
-
const SplitButton$
|
|
1002
|
-
return /* @__PURE__ */ React.createElement(Stack$
|
|
1001
|
+
const SplitButton$3 = (props) => {
|
|
1002
|
+
return /* @__PURE__ */ React.createElement(Stack$4, { spacing: "sm" }, /* @__PURE__ */ React.createElement(
|
|
1003
1003
|
Button,
|
|
1004
1004
|
{
|
|
1005
1005
|
leftIcon: /* @__PURE__ */ React.createElement(IconPlaylistAdd, { size: 14 }),
|
|
@@ -1016,7 +1016,7 @@ const SplitButton$2 = (props) => {
|
|
|
1016
1016
|
));
|
|
1017
1017
|
};
|
|
1018
1018
|
|
|
1019
|
-
function Table$
|
|
1019
|
+
function Table$b(props) {
|
|
1020
1020
|
if (props.items.length === 0) {
|
|
1021
1021
|
return /* @__PURE__ */ React.createElement(
|
|
1022
1022
|
PlaceholderBanner,
|
|
@@ -1045,7 +1045,7 @@ function Table$9(props) {
|
|
|
1045
1045
|
data: [{ value: "student", label: "Student" }, { value: "educator", label: "Educator" }]
|
|
1046
1046
|
}
|
|
1047
1047
|
))), /* @__PURE__ */ React.createElement("td", null, row.badgesEarned), /* @__PURE__ */ React.createElement("td", null, row.lessonsCompleted), /* @__PURE__ */ React.createElement("td", null, row.hasAccount && /* @__PURE__ */ React.createElement(IconCheck, { color: "green" })), /* @__PURE__ */ React.createElement("td", null, row.lastActivity ? relativeTimeFromDates(row.lastActivity) : ""), /* @__PURE__ */ React.createElement("td", null, /* @__PURE__ */ React.createElement(Group, { noWrap: true, spacing: 0, position: "right" }, !row.readonly && !!props.onDelete && /* @__PURE__ */ React.createElement(ActionIcon, { color: "red" }, /* @__PURE__ */ React.createElement(IconTrash, { onClick: () => openDeleteModal(row), size: 16, stroke: 1.5 }))))));
|
|
1048
|
-
return /* @__PURE__ */ React.createElement(ScrollArea, null, /* @__PURE__ */ React.createElement(Table$
|
|
1048
|
+
return /* @__PURE__ */ React.createElement(ScrollArea, null, /* @__PURE__ */ React.createElement(Table$k, { verticalSpacing: 20, sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", null, "Name"), /* @__PURE__ */ React.createElement("th", null, "Role"), /* @__PURE__ */ React.createElement("th", null, "Badges Earned"), /* @__PURE__ */ React.createElement("th", null, "Lessons Completed"), /* @__PURE__ */ React.createElement("th", null, "Account Created?"), /* @__PURE__ */ React.createElement("th", null, "Last Active"), /* @__PURE__ */ React.createElement("th", null))), /* @__PURE__ */ React.createElement("tbody", null, rows)));
|
|
1049
1049
|
}
|
|
1050
1050
|
|
|
1051
1051
|
var __defProp$7 = Object.defineProperty;
|
|
@@ -1067,7 +1067,7 @@ var __spreadValues$7 = (a, b) => {
|
|
|
1067
1067
|
return a;
|
|
1068
1068
|
};
|
|
1069
1069
|
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
1070
|
-
const useStyles$
|
|
1070
|
+
const useStyles$j = createStyles((theme) => ({
|
|
1071
1071
|
title: {
|
|
1072
1072
|
fontSize: 34,
|
|
1073
1073
|
fontWeight: 900,
|
|
@@ -1100,7 +1100,7 @@ const useStyles$h = createStyles((theme) => ({
|
|
|
1100
1100
|
}
|
|
1101
1101
|
}));
|
|
1102
1102
|
const Class = (props) => {
|
|
1103
|
-
const { classes } = useStyles$
|
|
1103
|
+
const { classes } = useStyles$j();
|
|
1104
1104
|
const form = useForm({
|
|
1105
1105
|
initialValues: {
|
|
1106
1106
|
classId: "",
|
|
@@ -1132,12 +1132,12 @@ const Class = (props) => {
|
|
|
1132
1132
|
padding: "xl",
|
|
1133
1133
|
size: "xl"
|
|
1134
1134
|
},
|
|
1135
|
-
/* @__PURE__ */ React.createElement(Stack$
|
|
1135
|
+
/* @__PURE__ */ React.createElement(Stack$4, { spacing: "md" }, /* @__PURE__ */ React.createElement(DropzoneButton$1, __spreadProps$4(__spreadValues$7({}, props), { close: () => setOpened(false) })), /* @__PURE__ */ React.createElement(Divider, { label: "or", labelPosition: "center", my: "md", variant: "dashed" }), /* @__PURE__ */ React.createElement("form", { onSubmit: form.onSubmit(() => {
|
|
1136
1136
|
const values = form.values;
|
|
1137
1137
|
form.reset();
|
|
1138
1138
|
setOpened(false);
|
|
1139
1139
|
props.onCreateMembers && props.onCreateMembers([values]);
|
|
1140
|
-
}) }, /* @__PURE__ */ React.createElement(Stack$
|
|
1140
|
+
}) }, /* @__PURE__ */ React.createElement(Stack$4, null, /* @__PURE__ */ React.createElement(
|
|
1141
1141
|
TextInput,
|
|
1142
1142
|
__spreadValues$7({
|
|
1143
1143
|
withAsterisk: true,
|
|
@@ -1157,7 +1157,7 @@ const Class = (props) => {
|
|
|
1157
1157
|
placeholder: "Family name"
|
|
1158
1158
|
}, form.getInputProps("familyName"))
|
|
1159
1159
|
)), /* @__PURE__ */ React.createElement(Button, { type: "submit", fullWidth: true, mt: "md" }, "Submit"))))
|
|
1160
|
-
), /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$
|
|
1160
|
+
), /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$4, { spacing: "md" }, /* @__PURE__ */ React.createElement(Grid, null, /* @__PURE__ */ React.createElement(Grid.Col, { sm: "auto" }, /* @__PURE__ */ React.createElement(UnstyledButton, { onClick: props.onBackClick }, /* @__PURE__ */ React.createElement(
|
|
1161
1161
|
Badge$1,
|
|
1162
1162
|
{
|
|
1163
1163
|
variant: "filled",
|
|
@@ -1166,12 +1166,12 @@ const Class = (props) => {
|
|
|
1166
1166
|
},
|
|
1167
1167
|
"Back"
|
|
1168
1168
|
)), /* @__PURE__ */ React.createElement(Title, { order: 2, className: classes.title, mt: "md" }, props.displayName || "Class"), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", className: classes.description, mt: "sm" }, props.description || "No description")), /* @__PURE__ */ React.createElement(Grid.Col, { sm: "content" }, !props.loading && /* @__PURE__ */ React.createElement(
|
|
1169
|
-
SplitButton$
|
|
1169
|
+
SplitButton$3,
|
|
1170
1170
|
{
|
|
1171
1171
|
onAddMembersClick: () => setOpened(true),
|
|
1172
1172
|
onCopyClassLinkClick: props.onCopyLinkClick
|
|
1173
1173
|
}
|
|
1174
|
-
))), /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React.createElement(Stack$
|
|
1174
|
+
))), /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React.createElement(Stack$4, { spacing: "sm" }, /* @__PURE__ */ React.createElement(StatsGroup, { data: [
|
|
1175
1175
|
{
|
|
1176
1176
|
title: "# OF STUDENTS",
|
|
1177
1177
|
value: props.members.filter((a) => !a.isAdmin).length
|
|
@@ -1190,7 +1190,7 @@ const Class = (props) => {
|
|
|
1190
1190
|
value: props.numberOfLessonsCompleted
|
|
1191
1191
|
}
|
|
1192
1192
|
] }), /* @__PURE__ */ React.createElement(
|
|
1193
|
-
Table$
|
|
1193
|
+
Table$b,
|
|
1194
1194
|
{
|
|
1195
1195
|
loading: props.loading,
|
|
1196
1196
|
items: props.members,
|
|
@@ -1200,7 +1200,7 @@ const Class = (props) => {
|
|
|
1200
1200
|
))))));
|
|
1201
1201
|
};
|
|
1202
1202
|
const DropzoneButton$1 = (props) => {
|
|
1203
|
-
const { classes, theme } = useStyles$
|
|
1203
|
+
const { classes, theme } = useStyles$j();
|
|
1204
1204
|
const openRef = React.useRef(null);
|
|
1205
1205
|
const [loading, setLoading] = React.useState(false);
|
|
1206
1206
|
const onDrop = React.useCallback((acceptedFiles) => {
|
|
@@ -1246,7 +1246,7 @@ const DropzoneButton$1 = (props) => {
|
|
|
1246
1246
|
} }, "Select file"));
|
|
1247
1247
|
};
|
|
1248
1248
|
|
|
1249
|
-
function Table$
|
|
1249
|
+
function Table$a(props) {
|
|
1250
1250
|
if (props.items.length === 0) {
|
|
1251
1251
|
return /* @__PURE__ */ React.createElement(
|
|
1252
1252
|
PlaceholderBanner,
|
|
@@ -1267,7 +1267,7 @@ function Table$8(props) {
|
|
|
1267
1267
|
onConfirm: () => props.onDeleteClass(group)
|
|
1268
1268
|
});
|
|
1269
1269
|
const rows = props.items.map((row) => /* @__PURE__ */ React.createElement("tr", { key: row.classId }, /* @__PURE__ */ React.createElement("td", null, /* @__PURE__ */ React.createElement(UnstyledButton, { component: Link, to: row.href }, /* @__PURE__ */ React.createElement(Text, { size: 14 }, row.name))), /* @__PURE__ */ React.createElement("td", null, /* @__PURE__ */ React.createElement(Text, { size: 14 }, row.description)), /* @__PURE__ */ React.createElement("td", null, /* @__PURE__ */ React.createElement(Text, { size: 14 }, row.numberOfStudents || 0)), /* @__PURE__ */ React.createElement("td", null, /* @__PURE__ */ React.createElement(Group, { noWrap: true, spacing: 0, position: "right" }, /* @__PURE__ */ React.createElement(ActionIcon, { color: "red" }, /* @__PURE__ */ React.createElement(IconTrash, { onClick: () => openDeleteModal(row), size: 16, stroke: 1.5 }))))));
|
|
1270
|
-
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$
|
|
1270
|
+
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$k, { verticalSpacing: 20, sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", null, "Class Name"), /* @__PURE__ */ React.createElement("th", null, "Description"), /* @__PURE__ */ React.createElement("th", null, "# of Students"), /* @__PURE__ */ React.createElement("th", null))), /* @__PURE__ */ React.createElement("tbody", null, rows)));
|
|
1271
1271
|
}
|
|
1272
1272
|
|
|
1273
1273
|
var __defProp$6 = Object.defineProperty;
|
|
@@ -1286,7 +1286,7 @@ var __spreadValues$6 = (a, b) => {
|
|
|
1286
1286
|
}
|
|
1287
1287
|
return a;
|
|
1288
1288
|
};
|
|
1289
|
-
const useStyles$
|
|
1289
|
+
const useStyles$i = createStyles((theme) => ({
|
|
1290
1290
|
title: {
|
|
1291
1291
|
fontSize: 34,
|
|
1292
1292
|
fontWeight: 900,
|
|
@@ -1299,7 +1299,7 @@ const useStyles$g = createStyles((theme) => ({
|
|
|
1299
1299
|
}
|
|
1300
1300
|
}));
|
|
1301
1301
|
const Classes = (props) => {
|
|
1302
|
-
const { classes } = useStyles$
|
|
1302
|
+
const { classes } = useStyles$i();
|
|
1303
1303
|
const form = useForm({
|
|
1304
1304
|
initialValues: {
|
|
1305
1305
|
classId: "",
|
|
@@ -1327,7 +1327,7 @@ const Classes = (props) => {
|
|
|
1327
1327
|
form.reset();
|
|
1328
1328
|
setOpened(false);
|
|
1329
1329
|
props.onCreateClass && props.onCreateClass(values);
|
|
1330
|
-
}) }, /* @__PURE__ */ React.createElement(Stack$
|
|
1330
|
+
}) }, /* @__PURE__ */ React.createElement(Stack$4, null, /* @__PURE__ */ React.createElement(
|
|
1331
1331
|
TextInput,
|
|
1332
1332
|
__spreadValues$6({
|
|
1333
1333
|
withAsterisk: true,
|
|
@@ -1341,14 +1341,14 @@ const Classes = (props) => {
|
|
|
1341
1341
|
placeholder: "A class for my first period English students"
|
|
1342
1342
|
}, form.getInputProps("description"))
|
|
1343
1343
|
)), /* @__PURE__ */ React.createElement(Button, { type: "submit", fullWidth: true, mt: "md" }, "Submit"))
|
|
1344
|
-
), /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$
|
|
1344
|
+
), /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$4, { spacing: "md" }, /* @__PURE__ */ React.createElement(Grid, null, /* @__PURE__ */ React.createElement(Grid.Col, { sm: "auto" }, /* @__PURE__ */ React.createElement(Badge$1, { variant: "filled", size: "lg" }, "Classes"), /* @__PURE__ */ React.createElement(Title, { order: 2, className: classes.title, mt: "md" }, "Organize people into classes"), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", className: classes.description, mt: "sm" }, "A class can be for a specific period of time, grade, team, or other cohorts.")), /* @__PURE__ */ React.createElement(Grid.Col, { sm: "content" }, !props.loading && /* @__PURE__ */ React.createElement(
|
|
1345
1345
|
Button,
|
|
1346
1346
|
{
|
|
1347
1347
|
onClick: () => setOpened(true),
|
|
1348
1348
|
leftIcon: /* @__PURE__ */ React.createElement(IconPlaylistAdd, { size: 14 })
|
|
1349
1349
|
},
|
|
1350
1350
|
"Create class"
|
|
1351
|
-
))), /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React.createElement(Stack$
|
|
1351
|
+
))), /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React.createElement(Stack$4, { spacing: "sm" }, /* @__PURE__ */ React.createElement(StatsGroup, { data: [
|
|
1352
1352
|
{
|
|
1353
1353
|
title: "# OF CLASSES",
|
|
1354
1354
|
value: props.classes.length
|
|
@@ -1361,7 +1361,7 @@ const Classes = (props) => {
|
|
|
1361
1361
|
onChange: props.onAutocompleteChange
|
|
1362
1362
|
}
|
|
1363
1363
|
), /* @__PURE__ */ React.createElement(
|
|
1364
|
-
Table$
|
|
1364
|
+
Table$a,
|
|
1365
1365
|
{
|
|
1366
1366
|
loading: props.loading,
|
|
1367
1367
|
items: props.classes,
|
|
@@ -1370,7 +1370,7 @@ const Classes = (props) => {
|
|
|
1370
1370
|
))))));
|
|
1371
1371
|
};
|
|
1372
1372
|
|
|
1373
|
-
const useStyles$
|
|
1373
|
+
const useStyles$h = createStyles((theme) => ({
|
|
1374
1374
|
title: {
|
|
1375
1375
|
fontSize: 34,
|
|
1376
1376
|
fontWeight: 900,
|
|
@@ -1384,11 +1384,11 @@ const useStyles$f = createStyles((theme) => ({
|
|
|
1384
1384
|
}
|
|
1385
1385
|
}));
|
|
1386
1386
|
const UserInfo = (props) => {
|
|
1387
|
-
const { classes } = useStyles$
|
|
1387
|
+
const { classes } = useStyles$h();
|
|
1388
1388
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Title, { className: classes.title }, props.name), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", className: classes.description, mt: "xs" }, props.impactStatement));
|
|
1389
1389
|
};
|
|
1390
1390
|
|
|
1391
|
-
function Table$
|
|
1391
|
+
function Table$9(props) {
|
|
1392
1392
|
if (props.items.length === 0) {
|
|
1393
1393
|
return /* @__PURE__ */ React.createElement(
|
|
1394
1394
|
PlaceholderBanner,
|
|
@@ -1424,7 +1424,7 @@ function Table$7(props) {
|
|
|
1424
1424
|
));
|
|
1425
1425
|
}
|
|
1426
1426
|
|
|
1427
|
-
function Table$
|
|
1427
|
+
function Table$8(props) {
|
|
1428
1428
|
if (props.items.length === 0) {
|
|
1429
1429
|
return /* @__PURE__ */ React.createElement(
|
|
1430
1430
|
PlaceholderBanner,
|
|
@@ -1437,10 +1437,10 @@ function Table$6(props) {
|
|
|
1437
1437
|
);
|
|
1438
1438
|
}
|
|
1439
1439
|
const rows = props.items.map((row) => /* @__PURE__ */ React.createElement("tr", { key: row.questionName }, /* @__PURE__ */ React.createElement("td", null, /* @__PURE__ */ React.createElement(Text, { component: Link, to: row.href }, row.lessonName)), /* @__PURE__ */ React.createElement("td", null, row.questionName), /* @__PURE__ */ React.createElement("td", null, row.answer.join(","))));
|
|
1440
|
-
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$
|
|
1440
|
+
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$k, { verticalSpacing: "sm", sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", null, "Lesson Name"), /* @__PURE__ */ React.createElement("th", null, "Question"), /* @__PURE__ */ React.createElement("th", null, "Answer"))), /* @__PURE__ */ React.createElement("tbody", null, rows)));
|
|
1441
1441
|
}
|
|
1442
1442
|
|
|
1443
|
-
function Table$
|
|
1443
|
+
function Table$7(props) {
|
|
1444
1444
|
if (props.items.length === 0) {
|
|
1445
1445
|
return /* @__PURE__ */ React.createElement(
|
|
1446
1446
|
PlaceholderBanner,
|
|
@@ -1453,14 +1453,14 @@ function Table$5(props) {
|
|
|
1453
1453
|
);
|
|
1454
1454
|
}
|
|
1455
1455
|
const rows = props.items.map((row) => /* @__PURE__ */ React.createElement("tr", { key: row.lessonName }, /* @__PURE__ */ React.createElement("td", null, /* @__PURE__ */ React.createElement(Text, { component: Link, to: row.href }, row.lessonName)), /* @__PURE__ */ React.createElement("td", null, row.reflection), /* @__PURE__ */ React.createElement("td", null, row.rating.toLocaleString())));
|
|
1456
|
-
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$
|
|
1456
|
+
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$k, { verticalSpacing: "sm", sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", null, "Lesson Name"), /* @__PURE__ */ React.createElement("th", null, "Reflection"), /* @__PURE__ */ React.createElement("th", null, "Rating"))), /* @__PURE__ */ React.createElement("tbody", null, rows)));
|
|
1457
1457
|
}
|
|
1458
1458
|
|
|
1459
1459
|
const Student = (props) => {
|
|
1460
1460
|
const [tab, setTab] = useState("badges");
|
|
1461
1461
|
const numberOfBadges = props.badges.length;
|
|
1462
1462
|
const percentageOfBadgesEarned = numberOfBadges > 0 ? props.badges.filter((b) => b.isComplete).length / numberOfBadges : 0;
|
|
1463
|
-
return /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$
|
|
1463
|
+
return /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$4, { spacing: "md" }, /* @__PURE__ */ React.createElement(Grid, { gutter: "md" }, /* @__PURE__ */ React.createElement(Grid.Col, { sm: "auto" }, /* @__PURE__ */ React.createElement(UnstyledButton, { onClick: props.onBackClick }, /* @__PURE__ */ React.createElement(
|
|
1464
1464
|
Badge$1,
|
|
1465
1465
|
{
|
|
1466
1466
|
variant: "filled",
|
|
@@ -1475,7 +1475,7 @@ const Student = (props) => {
|
|
|
1475
1475
|
name: props.name,
|
|
1476
1476
|
impactStatement: props.impactStatement
|
|
1477
1477
|
}
|
|
1478
|
-
))), /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React.createElement(Stack$
|
|
1478
|
+
))), /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React.createElement(Stack$4, { spacing: "lg" }, /* @__PURE__ */ React.createElement(StatsGroup, { data: [
|
|
1479
1479
|
{
|
|
1480
1480
|
title: "PROBLEMS SOLVED",
|
|
1481
1481
|
value: props.numberOfProblemsSolved
|
|
@@ -1490,7 +1490,7 @@ const Student = (props) => {
|
|
|
1490
1490
|
value: percentageOfBadgesEarned,
|
|
1491
1491
|
unit: "%"
|
|
1492
1492
|
}
|
|
1493
|
-
] }), /* @__PURE__ */ React.createElement(Stack$
|
|
1493
|
+
] }), /* @__PURE__ */ React.createElement(Stack$4, { spacing: 0 }, /* @__PURE__ */ React.createElement(
|
|
1494
1494
|
Tabs,
|
|
1495
1495
|
{
|
|
1496
1496
|
value: tab,
|
|
@@ -1502,19 +1502,19 @@ const Student = (props) => {
|
|
|
1502
1502
|
onChange: setTab
|
|
1503
1503
|
}
|
|
1504
1504
|
), tab === "badges" && /* @__PURE__ */ React.createElement(
|
|
1505
|
-
Table$
|
|
1505
|
+
Table$9,
|
|
1506
1506
|
{
|
|
1507
1507
|
loading: props.loading,
|
|
1508
1508
|
items: props.badges
|
|
1509
1509
|
}
|
|
1510
1510
|
), tab === "answers" && /* @__PURE__ */ React.createElement(
|
|
1511
|
-
Table$
|
|
1511
|
+
Table$8,
|
|
1512
1512
|
{
|
|
1513
1513
|
loading: props.loading,
|
|
1514
1514
|
items: props.answers
|
|
1515
1515
|
}
|
|
1516
1516
|
), tab === "reflections" && /* @__PURE__ */ React.createElement(
|
|
1517
|
-
Table$
|
|
1517
|
+
Table$7,
|
|
1518
1518
|
{
|
|
1519
1519
|
loading: props.loading,
|
|
1520
1520
|
items: props.reflections
|
|
@@ -1522,7 +1522,7 @@ const Student = (props) => {
|
|
|
1522
1522
|
))))));
|
|
1523
1523
|
};
|
|
1524
1524
|
|
|
1525
|
-
const useStyles$
|
|
1525
|
+
const useStyles$g = createStyles((theme, props) => {
|
|
1526
1526
|
const from = props.from || "blue";
|
|
1527
1527
|
const to = props.to || "green";
|
|
1528
1528
|
return {
|
|
@@ -1550,7 +1550,7 @@ const useStyles$e = createStyles((theme, props) => {
|
|
|
1550
1550
|
};
|
|
1551
1551
|
});
|
|
1552
1552
|
function CardGradient(props) {
|
|
1553
|
-
const { classes } = useStyles$
|
|
1553
|
+
const { classes } = useStyles$g(props);
|
|
1554
1554
|
const from = props.from || "blue";
|
|
1555
1555
|
const to = props.to || "green";
|
|
1556
1556
|
const icon = props.icon || /* @__PURE__ */ React.createElement(IconColorSwatch, { size: 28, stroke: 1.5 });
|
|
@@ -1594,7 +1594,7 @@ var __objRest$1 = (source, exclude) => {
|
|
|
1594
1594
|
}
|
|
1595
1595
|
return target;
|
|
1596
1596
|
};
|
|
1597
|
-
const useStyles$
|
|
1597
|
+
const useStyles$f = createStyles((theme) => ({
|
|
1598
1598
|
card: {
|
|
1599
1599
|
height: 240,
|
|
1600
1600
|
backgroundSize: "cover",
|
|
@@ -1633,7 +1633,7 @@ const TenantBanner = (_a) => {
|
|
|
1633
1633
|
"style",
|
|
1634
1634
|
"className"
|
|
1635
1635
|
]);
|
|
1636
|
-
const { classes, cx, theme } = useStyles$
|
|
1636
|
+
const { classes, cx, theme } = useStyles$f();
|
|
1637
1637
|
return /* @__PURE__ */ React.createElement(
|
|
1638
1638
|
Card,
|
|
1639
1639
|
__spreadValues$5({
|
|
@@ -1654,7 +1654,7 @@ const TenantBanner = (_a) => {
|
|
|
1654
1654
|
};
|
|
1655
1655
|
|
|
1656
1656
|
const Home = (props) => {
|
|
1657
|
-
return /* @__PURE__ */ React.createElement(Container, { size: "lg" }, /* @__PURE__ */ React.createElement(Stack$
|
|
1657
|
+
return /* @__PURE__ */ React.createElement(Container, { size: "lg" }, /* @__PURE__ */ React.createElement(Stack$4, { spacing: "lg" }, /* @__PURE__ */ React.createElement(Grid, { gutter: "md" }, /* @__PURE__ */ React.createElement(Grid.Col, { md: 6 }, /* @__PURE__ */ React.createElement(
|
|
1658
1658
|
UserInfo,
|
|
1659
1659
|
{
|
|
1660
1660
|
variant: "compact",
|
|
@@ -1699,7 +1699,7 @@ const Home = (props) => {
|
|
|
1699
1699
|
)))));
|
|
1700
1700
|
};
|
|
1701
1701
|
|
|
1702
|
-
function Table$
|
|
1702
|
+
function Table$6(props) {
|
|
1703
1703
|
if (props.items.length === 0) {
|
|
1704
1704
|
return /* @__PURE__ */ React.createElement(
|
|
1705
1705
|
PlaceholderBanner,
|
|
@@ -1712,10 +1712,10 @@ function Table$4(props) {
|
|
|
1712
1712
|
);
|
|
1713
1713
|
}
|
|
1714
1714
|
const rows = props.items.map((row) => /* @__PURE__ */ React.createElement("tr", { key: row.studentName }, /* @__PURE__ */ React.createElement("td", null, row.studentName), /* @__PURE__ */ React.createElement("td", null, row.reflection), /* @__PURE__ */ React.createElement("td", null, row.rating.toLocaleString())));
|
|
1715
|
-
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$
|
|
1715
|
+
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$k, { verticalSpacing: "sm", sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", null, "Student Name"), /* @__PURE__ */ React.createElement("th", null, "Reflection"), /* @__PURE__ */ React.createElement("th", null, "Rating"))), /* @__PURE__ */ React.createElement("tbody", null, rows)));
|
|
1716
1716
|
}
|
|
1717
1717
|
|
|
1718
|
-
const useStyles$
|
|
1718
|
+
const useStyles$e = createStyles((theme) => ({
|
|
1719
1719
|
button: {
|
|
1720
1720
|
borderTopRightRadius: 0,
|
|
1721
1721
|
borderBottomRightRadius: 0,
|
|
@@ -1729,10 +1729,10 @@ const useStyles$c = createStyles((theme) => ({
|
|
|
1729
1729
|
borderLeft: `1px solid ${theme.colorScheme === "dark" ? theme.colors.dark[7] : theme.white}`
|
|
1730
1730
|
}
|
|
1731
1731
|
}));
|
|
1732
|
-
const SplitButton$
|
|
1733
|
-
const { classes, theme } = useStyles$
|
|
1732
|
+
const SplitButton$2 = (props) => {
|
|
1733
|
+
const { classes, theme } = useStyles$e();
|
|
1734
1734
|
const menuIconColor = theme.colors[theme.primaryColor][theme.colorScheme === "dark" ? 5 : 6];
|
|
1735
|
-
return /* @__PURE__ */ React.createElement(Stack$
|
|
1735
|
+
return /* @__PURE__ */ React.createElement(Stack$4, { spacing: "sm" }, /* @__PURE__ */ React.createElement(
|
|
1736
1736
|
Button,
|
|
1737
1737
|
{
|
|
1738
1738
|
variant: "gradient",
|
|
@@ -1768,15 +1768,15 @@ const SplitButton$1 = (props) => {
|
|
|
1768
1768
|
)))));
|
|
1769
1769
|
};
|
|
1770
1770
|
|
|
1771
|
-
function Stack$
|
|
1771
|
+
function Stack$2(props) {
|
|
1772
1772
|
if (props.items.length === 0) {
|
|
1773
1773
|
return null;
|
|
1774
1774
|
}
|
|
1775
|
-
const rows = props.items.map((row) => /* @__PURE__ */ React.createElement(Stack$
|
|
1776
|
-
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(UnstyledButton, { component: Link, to: props.href }, /* @__PURE__ */ React.createElement(Stack$
|
|
1775
|
+
const rows = props.items.map((row) => /* @__PURE__ */ React.createElement(Stack$4, { spacing: 0, key: row.questionName }, /* @__PURE__ */ React.createElement(Title, { color: "dark.4", size: "lg" }, row.questionName), /* @__PURE__ */ React.createElement(Text, null, row.answer.join(",") || "No answer.")));
|
|
1776
|
+
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(UnstyledButton, { component: Link, to: props.href }, /* @__PURE__ */ React.createElement(Stack$4, { spacing: 24, sx: { padding: 20, minWidth: 700 } }, rows)));
|
|
1777
1777
|
}
|
|
1778
1778
|
|
|
1779
|
-
function Table$
|
|
1779
|
+
function Table$5(props) {
|
|
1780
1780
|
if (props.items.length === 0) {
|
|
1781
1781
|
return /* @__PURE__ */ React.createElement(
|
|
1782
1782
|
PlaceholderBanner,
|
|
@@ -1809,13 +1809,13 @@ function Table$3(props) {
|
|
|
1809
1809
|
render: (row) => /* @__PURE__ */ React.createElement(React.Fragment, null, !!row.isComplete && /* @__PURE__ */ React.createElement(Badge$1, { variant: "filled" }, "Complete"), !row.isComplete && !row.isStarted && /* @__PURE__ */ React.createElement(Badge$1, { color: "red", variant: "filled" }, "Not started"), !row.isComplete && !!row.isStarted && /* @__PURE__ */ React.createElement(Badge$1, { color: "violet", variant: "filled" }, "In progress"))
|
|
1810
1810
|
}],
|
|
1811
1811
|
rowExpansion: {
|
|
1812
|
-
content: ({ record }) => /* @__PURE__ */ React.createElement(Stack$
|
|
1812
|
+
content: ({ record }) => /* @__PURE__ */ React.createElement(Stack$2, { href: record.href, items: record.answers })
|
|
1813
1813
|
}
|
|
1814
1814
|
}
|
|
1815
1815
|
));
|
|
1816
1816
|
}
|
|
1817
1817
|
|
|
1818
|
-
function Stack(props) {
|
|
1818
|
+
function Stack$1(props) {
|
|
1819
1819
|
const primaryAxis = React.useMemo(
|
|
1820
1820
|
() => ({
|
|
1821
1821
|
position: "left",
|
|
@@ -1855,7 +1855,7 @@ function Stack(props) {
|
|
|
1855
1855
|
labelMap[r] = labelMap[r] ? labelMap[r] + 1 : 1;
|
|
1856
1856
|
}
|
|
1857
1857
|
}));
|
|
1858
|
-
return /* @__PURE__ */ React.createElement(Card, { key: row.question, withBorder: true, p: "xl", radius: "md" }, /* @__PURE__ */ React.createElement(Stack$
|
|
1858
|
+
return /* @__PURE__ */ React.createElement(Card, { key: row.question, withBorder: true, p: "xl", radius: "md" }, /* @__PURE__ */ React.createElement(Stack$4, { spacing: 4 }, /* @__PURE__ */ React.createElement(Title, { size: "lg" }, row.question), /* @__PURE__ */ React.createElement(Text, { size: "sm" }, row.answers.length, " answers"), /* @__PURE__ */ React.createElement("div", { style: { background: "white", height: "300px", width: "100%", position: "relative" } }, /* @__PURE__ */ React.createElement(
|
|
1859
1859
|
Chart,
|
|
1860
1860
|
{
|
|
1861
1861
|
options: {
|
|
@@ -1874,16 +1874,16 @@ function Stack(props) {
|
|
|
1874
1874
|
}
|
|
1875
1875
|
))));
|
|
1876
1876
|
}
|
|
1877
|
-
return /* @__PURE__ */ React.createElement(Card, { key: row.question, withBorder: true, p: "xl", radius: "md" }, /* @__PURE__ */ React.createElement(Stack$
|
|
1877
|
+
return /* @__PURE__ */ React.createElement(Card, { key: row.question, withBorder: true, p: "xl", radius: "md" }, /* @__PURE__ */ React.createElement(Stack$4, { spacing: 4 }, /* @__PURE__ */ React.createElement(Title, { size: "lg" }, row.question), /* @__PURE__ */ React.createElement(Text, { size: "sm" }, row.answers.length, " answers"), /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Stack$4, { spacing: 4 }, row.answers.map((a) => {
|
|
1878
1878
|
const answerText = a.join("\n");
|
|
1879
1879
|
return /* @__PURE__ */ React.createElement(Card, { key: answerText, p: 5, radius: 0, bg: "gray.0" }, /* @__PURE__ */ React.createElement(Text, null, answerText));
|
|
1880
1880
|
})))));
|
|
1881
1881
|
});
|
|
1882
|
-
return /* @__PURE__ */ React.createElement(Stack$
|
|
1882
|
+
return /* @__PURE__ */ React.createElement(Stack$4, { py: 4, spacing: 10, sx: { minWidth: 700 } }, rows);
|
|
1883
1883
|
}
|
|
1884
1884
|
const truncateWithEllipses = (text, max) => text.substr(0, max - 1) + (text.length > max ? "…" : "");
|
|
1885
1885
|
|
|
1886
|
-
const useStyles$
|
|
1886
|
+
const useStyles$d = createStyles((theme) => ({
|
|
1887
1887
|
title: {
|
|
1888
1888
|
fontSize: 34,
|
|
1889
1889
|
fontWeight: 900,
|
|
@@ -1896,7 +1896,7 @@ const useStyles$b = createStyles((theme) => ({
|
|
|
1896
1896
|
}
|
|
1897
1897
|
}));
|
|
1898
1898
|
const Lesson = (props) => {
|
|
1899
|
-
const { classes } = useStyles$
|
|
1899
|
+
const { classes } = useStyles$d();
|
|
1900
1900
|
const [tab, setTab] = useState("question");
|
|
1901
1901
|
const numberOfStudents = props.students.length;
|
|
1902
1902
|
const percentageOfLessonsCompleted = numberOfStudents > 0 ? props.students.filter((u) => u.isComplete).length / numberOfStudents : 0;
|
|
@@ -1937,7 +1937,7 @@ const Lesson = (props) => {
|
|
|
1937
1937
|
{ label: "By student", value: "students" },
|
|
1938
1938
|
{ label: "By reflection", value: "reflections" }
|
|
1939
1939
|
];
|
|
1940
|
-
return /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$
|
|
1940
|
+
return /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$4, { spacing: "md" }, /* @__PURE__ */ React.createElement(Grid, null, /* @__PURE__ */ React.createElement(Grid.Col, { sm: "auto" }, /* @__PURE__ */ React.createElement(UnstyledButton, { onClick: props.onBackClick }, /* @__PURE__ */ React.createElement(
|
|
1941
1941
|
Badge$1,
|
|
1942
1942
|
{
|
|
1943
1943
|
variant: "filled",
|
|
@@ -1945,15 +1945,15 @@ const Lesson = (props) => {
|
|
|
1945
1945
|
size: "lg"
|
|
1946
1946
|
},
|
|
1947
1947
|
"Back"
|
|
1948
|
-
)), /* @__PURE__ */ React.createElement(Group, null, /* @__PURE__ */ React.createElement(Stack$
|
|
1949
|
-
SplitButton$
|
|
1948
|
+
)), /* @__PURE__ */ React.createElement(Group, null, /* @__PURE__ */ React.createElement(Stack$4, { spacing: 0 }, /* @__PURE__ */ React.createElement(Title, { order: 2, className: classes.title, mt: "md" }, props.displayName || "Lesson"), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", className: classes.description, mt: "sm" }, props.description || "No description")), /* @__PURE__ */ React.createElement(Stack$4, { ml: "auto" }, /* @__PURE__ */ React.createElement(
|
|
1949
|
+
SplitButton$2,
|
|
1950
1950
|
{
|
|
1951
1951
|
href: props.href,
|
|
1952
1952
|
noExport: props.trial,
|
|
1953
1953
|
onCopyLinkClick: props.onCopyLinkClick,
|
|
1954
1954
|
onExportDataClick: props.onExportDataClick
|
|
1955
1955
|
}
|
|
1956
|
-
))))), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React.createElement(Stack$
|
|
1956
|
+
))))), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React.createElement(Stack$4, null, /* @__PURE__ */ React.createElement(
|
|
1957
1957
|
StatsGroup,
|
|
1958
1958
|
{
|
|
1959
1959
|
data: [
|
|
@@ -1979,7 +1979,7 @@ const Lesson = (props) => {
|
|
|
1979
1979
|
return { value: g.classId, label: g.name };
|
|
1980
1980
|
})
|
|
1981
1981
|
}
|
|
1982
|
-
), /* @__PURE__ */ React.createElement(Stack$
|
|
1982
|
+
), /* @__PURE__ */ React.createElement(Stack$4, { spacing: 0 }, /* @__PURE__ */ React.createElement(
|
|
1983
1983
|
Tabs,
|
|
1984
1984
|
{
|
|
1985
1985
|
value: tab,
|
|
@@ -1987,19 +1987,19 @@ const Lesson = (props) => {
|
|
|
1987
1987
|
onChange: setTab
|
|
1988
1988
|
}
|
|
1989
1989
|
), tab === "question" && /* @__PURE__ */ React.createElement(
|
|
1990
|
-
Stack,
|
|
1990
|
+
Stack$1,
|
|
1991
1991
|
{
|
|
1992
1992
|
loading: props.loading,
|
|
1993
1993
|
items: props.questions
|
|
1994
1994
|
}
|
|
1995
1995
|
), tab === "reflections" && /* @__PURE__ */ React.createElement(
|
|
1996
|
-
Table$
|
|
1996
|
+
Table$6,
|
|
1997
1997
|
{
|
|
1998
1998
|
loading: props.loading,
|
|
1999
1999
|
items: props.reflections
|
|
2000
2000
|
}
|
|
2001
2001
|
), tab === "students" && /* @__PURE__ */ React.createElement(
|
|
2002
|
-
Table$
|
|
2002
|
+
Table$5,
|
|
2003
2003
|
{
|
|
2004
2004
|
loading: props.loading,
|
|
2005
2005
|
items: props.students
|
|
@@ -2007,7 +2007,7 @@ const Lesson = (props) => {
|
|
|
2007
2007
|
)))))));
|
|
2008
2008
|
};
|
|
2009
2009
|
|
|
2010
|
-
function Table$
|
|
2010
|
+
function Table$4(props) {
|
|
2011
2011
|
if (props.items.length === 0) {
|
|
2012
2012
|
return /* @__PURE__ */ React.createElement(
|
|
2013
2013
|
PlaceholderBanner,
|
|
@@ -2036,10 +2036,10 @@ function Table$2(props) {
|
|
|
2036
2036
|
},
|
|
2037
2037
|
/* @__PURE__ */ React.createElement(Group, null, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Text, { size: "sm", weight: 500 }, row.name), /* @__PURE__ */ React.createElement(Text, { size: "xs", color: "dimmed" }, row.description)))
|
|
2038
2038
|
))));
|
|
2039
|
-
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$
|
|
2039
|
+
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$k, { horizontalSpacing: 0, verticalSpacing: 0, sx: { minWidth: 700 } }, /* @__PURE__ */ React.createElement("tbody", null, rows)));
|
|
2040
2040
|
}
|
|
2041
2041
|
|
|
2042
|
-
const useStyles$
|
|
2042
|
+
const useStyles$c = createStyles((theme) => ({
|
|
2043
2043
|
title: {
|
|
2044
2044
|
fontSize: 34,
|
|
2045
2045
|
fontWeight: 900,
|
|
@@ -2052,8 +2052,8 @@ const useStyles$a = createStyles((theme) => ({
|
|
|
2052
2052
|
}
|
|
2053
2053
|
}));
|
|
2054
2054
|
const Lessons = (props) => {
|
|
2055
|
-
const { classes } = useStyles$
|
|
2056
|
-
return /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$
|
|
2055
|
+
const { classes } = useStyles$c();
|
|
2056
|
+
return /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$4, { spacing: "md" }, /* @__PURE__ */ React.createElement(Grid, null, /* @__PURE__ */ React.createElement(Grid.Col, { sm: "auto" }, /* @__PURE__ */ React.createElement(Badge$1, { variant: "filled", size: "lg" }, "Lessons"), /* @__PURE__ */ React.createElement(Title, { order: 2, className: classes.title, mt: "md" }, "Lessons"), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", className: classes.description, mt: "sm" }, "Explore units of instruction and/or see corresponding class progress."))), /* @__PURE__ */ React.createElement(
|
|
2057
2057
|
Autocomplete,
|
|
2058
2058
|
{
|
|
2059
2059
|
placeholder: "Search for a lesson that fits your needs",
|
|
@@ -2061,7 +2061,7 @@ const Lessons = (props) => {
|
|
|
2061
2061
|
onChange: props.onAutocompleteChange
|
|
2062
2062
|
}
|
|
2063
2063
|
), /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React.createElement(
|
|
2064
|
-
Table$
|
|
2064
|
+
Table$4,
|
|
2065
2065
|
{
|
|
2066
2066
|
loading: props.loading,
|
|
2067
2067
|
items: props.lessons
|
|
@@ -2069,7 +2069,7 @@ const Lessons = (props) => {
|
|
|
2069
2069
|
))));
|
|
2070
2070
|
};
|
|
2071
2071
|
|
|
2072
|
-
const useStyles$
|
|
2072
|
+
const useStyles$b = createStyles((theme) => ({
|
|
2073
2073
|
title: {
|
|
2074
2074
|
fontSize: 22,
|
|
2075
2075
|
fontWeight: 900,
|
|
@@ -2088,7 +2088,7 @@ const useStyles$9 = createStyles((theme) => ({
|
|
|
2088
2088
|
}
|
|
2089
2089
|
}));
|
|
2090
2090
|
function AccessCode(props) {
|
|
2091
|
-
const { classes } = useStyles$
|
|
2091
|
+
const { classes } = useStyles$b();
|
|
2092
2092
|
return /* @__PURE__ */ React.createElement(Container, { mx: "0", px: "0", size: 460, my: 30 }, /* @__PURE__ */ React.createElement(Title, { className: classes.title }, "Access code"), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", size: "sm" }, "Grant access to join your organization"), /* @__PURE__ */ React.createElement(Paper, { withBorder: true, shadow: "md", p: 30, radius: "md", mt: "xl" }, /* @__PURE__ */ React.createElement(TextInput, { value: props.value, readOnly: true }), /* @__PURE__ */ React.createElement(Group, { position: "apart", mt: "lg", className: classes.controls }, /* @__PURE__ */ React.createElement(
|
|
2093
2093
|
Anchor,
|
|
2094
2094
|
{
|
|
@@ -2116,7 +2116,7 @@ const monthNames = [
|
|
|
2116
2116
|
"November",
|
|
2117
2117
|
"December"
|
|
2118
2118
|
];
|
|
2119
|
-
const useStyles$
|
|
2119
|
+
const useStyles$a = createStyles((theme) => ({
|
|
2120
2120
|
title: {
|
|
2121
2121
|
fontSize: 34,
|
|
2122
2122
|
fontWeight: 900,
|
|
@@ -2146,8 +2146,8 @@ const useStyles$8 = createStyles((theme) => ({
|
|
|
2146
2146
|
}
|
|
2147
2147
|
}));
|
|
2148
2148
|
const Organization = (props) => {
|
|
2149
|
-
const { classes } = useStyles$
|
|
2150
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$
|
|
2149
|
+
const { classes } = useStyles$a();
|
|
2150
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$4, { spacing: "md" }, /* @__PURE__ */ React.createElement(Grid, null, /* @__PURE__ */ React.createElement(Grid.Col, { sm: "auto" }, /* @__PURE__ */ React.createElement(UnstyledButton, { onClick: props.onBackClick }, /* @__PURE__ */ React.createElement(
|
|
2151
2151
|
Badge$1,
|
|
2152
2152
|
{
|
|
2153
2153
|
variant: "filled",
|
|
@@ -2155,7 +2155,7 @@ const Organization = (props) => {
|
|
|
2155
2155
|
size: "lg"
|
|
2156
2156
|
},
|
|
2157
2157
|
"Back"
|
|
2158
|
-
)), /* @__PURE__ */ React.createElement(Title, { order: 2, className: classes.title, mt: "md" }, props.displayName || "Overview"), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", className: classes.description, mt: "sm" }, props.description || "No description"))), /* @__PURE__ */ React.createElement(AccessCode, { value: props.accessCode, onCopyCode: props.onCopyAccessCode, peopleLink: props.peopleLink }), /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React.createElement(Stack$
|
|
2158
|
+
)), /* @__PURE__ */ React.createElement(Title, { order: 2, className: classes.title, mt: "md" }, props.displayName || "Overview"), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", className: classes.description, mt: "sm" }, props.description || "No description"))), /* @__PURE__ */ React.createElement(AccessCode, { value: props.accessCode, onCopyCode: props.onCopyAccessCode, peopleLink: props.peopleLink }), /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React.createElement(Stack$4, { spacing: "sm" }, /* @__PURE__ */ React.createElement(StatsGroup, { data: [
|
|
2159
2159
|
{
|
|
2160
2160
|
title: "# OF STUDENTS",
|
|
2161
2161
|
value: props.numberOfStudents || 0
|
|
@@ -2172,7 +2172,7 @@ const Organization = (props) => {
|
|
|
2172
2172
|
] }))))));
|
|
2173
2173
|
};
|
|
2174
2174
|
|
|
2175
|
-
const useStyles$
|
|
2175
|
+
const useStyles$9 = createStyles((theme) => ({
|
|
2176
2176
|
button: {
|
|
2177
2177
|
borderTopRightRadius: 0,
|
|
2178
2178
|
borderBottomRightRadius: 0,
|
|
@@ -2186,8 +2186,8 @@ const useStyles$7 = createStyles((theme) => ({
|
|
|
2186
2186
|
borderLeft: `1px solid ${theme.colorScheme === "dark" ? theme.colors.dark[7] : theme.white}`
|
|
2187
2187
|
}
|
|
2188
2188
|
}));
|
|
2189
|
-
const SplitButton = (props) => {
|
|
2190
|
-
const { classes, theme } = useStyles$
|
|
2189
|
+
const SplitButton$1 = (props) => {
|
|
2190
|
+
const { classes, theme } = useStyles$9();
|
|
2191
2191
|
const menuIconColor = theme.colors[theme.primaryColor][theme.colorScheme === "dark" ? 5 : 6];
|
|
2192
2192
|
const hasMenu = !!props.withOrganizationLink;
|
|
2193
2193
|
return /* @__PURE__ */ React.createElement(Group, { noWrap: true, spacing: 0 }, /* @__PURE__ */ React.createElement(
|
|
@@ -2217,7 +2217,7 @@ const SplitButton = (props) => {
|
|
|
2217
2217
|
))));
|
|
2218
2218
|
};
|
|
2219
2219
|
|
|
2220
|
-
function Table$
|
|
2220
|
+
function Table$3(props) {
|
|
2221
2221
|
if (props.items.length === 0) {
|
|
2222
2222
|
return /* @__PURE__ */ React.createElement(
|
|
2223
2223
|
PlaceholderBanner,
|
|
@@ -2246,7 +2246,7 @@ function Table$1(props) {
|
|
|
2246
2246
|
data: [{ value: "student", label: "Student" }, { value: "educator", label: "Educator" }, { value: "admin", label: "Admin" }]
|
|
2247
2247
|
}
|
|
2248
2248
|
))), /* @__PURE__ */ React.createElement("td", null, row.hasAccount && /* @__PURE__ */ React.createElement(IconCheck, { color: "green" })), /* @__PURE__ */ React.createElement("td", null, row.numberOfClasses), /* @__PURE__ */ React.createElement("td", null, row.lastActivity ? relativeTimeFromDates(row.lastActivity) : ""), /* @__PURE__ */ React.createElement("td", null, /* @__PURE__ */ React.createElement(Group, { noWrap: true, spacing: 0, position: "right" }, !row.readonly && !!props.onDelete && /* @__PURE__ */ React.createElement(ActionIcon, { color: "red" }, /* @__PURE__ */ React.createElement(IconTrash, { onClick: () => openDeleteModal(row), size: 16, stroke: 1.5 }))))));
|
|
2249
|
-
return /* @__PURE__ */ React.createElement(ScrollArea, null, /* @__PURE__ */ React.createElement(Table$
|
|
2249
|
+
return /* @__PURE__ */ React.createElement(ScrollArea, null, /* @__PURE__ */ React.createElement(Table$k, { verticalSpacing: 20, sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", null, "Name"), /* @__PURE__ */ React.createElement("th", null, "Role"), /* @__PURE__ */ React.createElement("th", null, "Account Created?"), /* @__PURE__ */ React.createElement("th", null, "# of Classes"), /* @__PURE__ */ React.createElement("th", null, "Last Active"), /* @__PURE__ */ React.createElement("th", null))), /* @__PURE__ */ React.createElement("tbody", null, rows)));
|
|
2250
2250
|
}
|
|
2251
2251
|
|
|
2252
2252
|
var __defProp$4 = Object.defineProperty;
|
|
@@ -2268,7 +2268,7 @@ var __spreadValues$4 = (a, b) => {
|
|
|
2268
2268
|
return a;
|
|
2269
2269
|
};
|
|
2270
2270
|
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
2271
|
-
const useStyles$
|
|
2271
|
+
const useStyles$8 = createStyles((theme) => ({
|
|
2272
2272
|
title: {
|
|
2273
2273
|
fontSize: 34,
|
|
2274
2274
|
fontWeight: 900,
|
|
@@ -2298,7 +2298,7 @@ const useStyles$6 = createStyles((theme) => ({
|
|
|
2298
2298
|
}
|
|
2299
2299
|
}));
|
|
2300
2300
|
const People = (props) => {
|
|
2301
|
-
const { classes } = useStyles$
|
|
2301
|
+
const { classes } = useStyles$8();
|
|
2302
2302
|
const form = useForm({
|
|
2303
2303
|
initialValues: {
|
|
2304
2304
|
userId: "",
|
|
@@ -2329,12 +2329,12 @@ const People = (props) => {
|
|
|
2329
2329
|
padding: "xl",
|
|
2330
2330
|
size: "xl"
|
|
2331
2331
|
},
|
|
2332
|
-
/* @__PURE__ */ React.createElement(Stack$
|
|
2332
|
+
/* @__PURE__ */ React.createElement(Stack$4, { spacing: "md" }, /* @__PURE__ */ React.createElement(DropzoneButton, __spreadProps$3(__spreadValues$4({}, props), { close: () => setOpened(false) })), /* @__PURE__ */ React.createElement(Divider, { label: "or", labelPosition: "center", my: "md", variant: "dashed" }), /* @__PURE__ */ React.createElement("form", { onSubmit: form.onSubmit(() => {
|
|
2333
2333
|
const values = form.values;
|
|
2334
2334
|
form.reset();
|
|
2335
2335
|
setOpened(false);
|
|
2336
2336
|
props.onCreateUsers && props.onCreateUsers([values]);
|
|
2337
|
-
}) }, /* @__PURE__ */ React.createElement(Stack$
|
|
2337
|
+
}) }, /* @__PURE__ */ React.createElement(Stack$4, null, /* @__PURE__ */ React.createElement(
|
|
2338
2338
|
TextInput,
|
|
2339
2339
|
__spreadValues$4({
|
|
2340
2340
|
withAsterisk: true,
|
|
@@ -2354,7 +2354,7 @@ const People = (props) => {
|
|
|
2354
2354
|
placeholder: "Family name"
|
|
2355
2355
|
}, form.getInputProps("familyName"))
|
|
2356
2356
|
)), /* @__PURE__ */ React.createElement(Button, { type: "submit", fullWidth: true, mt: "md" }, "Submit"))))
|
|
2357
|
-
), /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$
|
|
2357
|
+
), /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$4, { spacing: "md" }, /* @__PURE__ */ React.createElement(Grid, null, /* @__PURE__ */ React.createElement(Grid.Col, { sm: "auto" }, /* @__PURE__ */ React.createElement(UnstyledButton, { onClick: props.onBackClick }, /* @__PURE__ */ React.createElement(
|
|
2358
2358
|
Badge$1,
|
|
2359
2359
|
{
|
|
2360
2360
|
variant: "filled",
|
|
@@ -2363,13 +2363,13 @@ const People = (props) => {
|
|
|
2363
2363
|
},
|
|
2364
2364
|
"Back"
|
|
2365
2365
|
)), /* @__PURE__ */ React.createElement(Title, { order: 2, className: classes.title, mt: "md" }, "People"), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", className: classes.description, mt: "sm" }, "Manage members of your organization")), /* @__PURE__ */ React.createElement(Grid.Col, { sm: "content" }, !props.loading && /* @__PURE__ */ React.createElement(
|
|
2366
|
-
SplitButton,
|
|
2366
|
+
SplitButton$1,
|
|
2367
2367
|
{
|
|
2368
2368
|
withOrganizationLink: props.withOrganizationLink,
|
|
2369
2369
|
onAddUsersClick: () => setOpened(true),
|
|
2370
2370
|
onCopyOrganizationLinkClick: props.onCopyLinkClick
|
|
2371
2371
|
}
|
|
2372
|
-
))), /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React.createElement(Stack$
|
|
2372
|
+
))), /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React.createElement(Stack$4, { spacing: "sm" }, /* @__PURE__ */ React.createElement(StatsGroup, { data: [
|
|
2373
2373
|
{
|
|
2374
2374
|
title: "# OF PEOPLE",
|
|
2375
2375
|
value: props.users.length
|
|
@@ -2392,7 +2392,7 @@ const People = (props) => {
|
|
|
2392
2392
|
onChange: props.onAutocompleteChange
|
|
2393
2393
|
}
|
|
2394
2394
|
), /* @__PURE__ */ React.createElement(
|
|
2395
|
-
Table$
|
|
2395
|
+
Table$3,
|
|
2396
2396
|
{
|
|
2397
2397
|
loading: props.loading,
|
|
2398
2398
|
items: props.users,
|
|
@@ -2402,7 +2402,7 @@ const People = (props) => {
|
|
|
2402
2402
|
))))));
|
|
2403
2403
|
};
|
|
2404
2404
|
const DropzoneButton = (props) => {
|
|
2405
|
-
const { classes, theme } = useStyles$
|
|
2405
|
+
const { classes, theme } = useStyles$8();
|
|
2406
2406
|
const openRef = React.useRef(null);
|
|
2407
2407
|
const [loading, setLoading] = React.useState(false);
|
|
2408
2408
|
const onDrop = React.useCallback((acceptedFiles) => {
|
|
@@ -2448,7 +2448,7 @@ const DropzoneButton = (props) => {
|
|
|
2448
2448
|
} }, "Select file"));
|
|
2449
2449
|
};
|
|
2450
2450
|
|
|
2451
|
-
const useStyles$
|
|
2451
|
+
const useStyles$7 = createStyles((theme) => ({
|
|
2452
2452
|
form: {
|
|
2453
2453
|
backgroundColor: theme.white,
|
|
2454
2454
|
padding: theme.spacing.xl,
|
|
@@ -2511,7 +2511,7 @@ const useStyles$5 = createStyles((theme) => ({
|
|
|
2511
2511
|
}
|
|
2512
2512
|
}));
|
|
2513
2513
|
const StartAnonymousLesson = (props) => {
|
|
2514
|
-
const { classes } = useStyles$
|
|
2514
|
+
const { classes } = useStyles$7();
|
|
2515
2515
|
const [name, setName] = React.useState("");
|
|
2516
2516
|
return /* @__PURE__ */ React.createElement("div", { className: classes.wrapper }, /* @__PURE__ */ React.createElement(Container, null, /* @__PURE__ */ React.createElement(SimpleGrid, { maw: 960, cols: 2, spacing: 15, breakpoints: [{ maxWidth: "sm", cols: 1 }] }, /* @__PURE__ */ React.createElement("div", { className: classes.content }, /* @__PURE__ */ React.createElement(Badge$1, { color: "violet" }, "Community"), /* @__PURE__ */ React.createElement(Title, { className: classes.title }, props.title), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", mt: "md" }, props.description), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", mt: "md" }, "You are now part of ", `${props.educatorName}'s`, " Class")), /* @__PURE__ */ React.createElement("div", { className: classes.form }, /* @__PURE__ */ React.createElement(
|
|
2517
2517
|
TextInput,
|
|
@@ -2568,7 +2568,7 @@ function TaskCard(props) {
|
|
|
2568
2568
|
));
|
|
2569
2569
|
}
|
|
2570
2570
|
|
|
2571
|
-
const useStyles$
|
|
2571
|
+
const useStyles$6 = createStyles((theme) => ({
|
|
2572
2572
|
action: {
|
|
2573
2573
|
backgroundColor: "inherit",
|
|
2574
2574
|
":hover": {
|
|
@@ -2587,7 +2587,7 @@ const useStyles$4 = createStyles((theme) => ({
|
|
|
2587
2587
|
}
|
|
2588
2588
|
}));
|
|
2589
2589
|
const TrialHome = (props) => {
|
|
2590
|
-
const { classes } = useStyles$
|
|
2590
|
+
const { classes } = useStyles$6();
|
|
2591
2591
|
return /* @__PURE__ */ React.createElement(Container, { size: "lg" }, /* @__PURE__ */ React.createElement(Badge$1, null, props.daysRemaining, " day", props.daysRemaining !== 1 ? "s" : "", " left"), /* @__PURE__ */ React.createElement(
|
|
2592
2592
|
Button,
|
|
2593
2593
|
{
|
|
@@ -2599,7 +2599,7 @@ const TrialHome = (props) => {
|
|
|
2599
2599
|
target: "_blank"
|
|
2600
2600
|
},
|
|
2601
2601
|
"UPGRADE NOW"
|
|
2602
|
-
), /* @__PURE__ */ React.createElement(Stack$
|
|
2602
|
+
), /* @__PURE__ */ React.createElement(Stack$4, { spacing: "sm" }, /* @__PURE__ */ React.createElement(Stack$4, { spacing: 0 }, /* @__PURE__ */ React.createElement(
|
|
2603
2603
|
UserInfo,
|
|
2604
2604
|
{
|
|
2605
2605
|
variant: "compact",
|
|
@@ -2647,7 +2647,7 @@ var __objRest = (source, exclude) => {
|
|
|
2647
2647
|
}
|
|
2648
2648
|
return target;
|
|
2649
2649
|
};
|
|
2650
|
-
const useStyles$
|
|
2650
|
+
const useStyles$5 = createStyles((theme, { checked }) => ({
|
|
2651
2651
|
button: {
|
|
2652
2652
|
display: "flex",
|
|
2653
2653
|
alignItems: "center",
|
|
@@ -2689,7 +2689,7 @@ function ImageCheckbox(_a) {
|
|
|
2689
2689
|
finalValue: false,
|
|
2690
2690
|
onChange
|
|
2691
2691
|
});
|
|
2692
|
-
const { classes, cx } = useStyles$
|
|
2692
|
+
const { classes, cx } = useStyles$5({ checked: value });
|
|
2693
2693
|
return /* @__PURE__ */ React.createElement(
|
|
2694
2694
|
UnstyledButton,
|
|
2695
2695
|
__spreadProps$2(__spreadValues$2({}, others), {
|
|
@@ -2750,7 +2750,7 @@ var __spreadValues$1 = (a, b) => {
|
|
|
2750
2750
|
return a;
|
|
2751
2751
|
};
|
|
2752
2752
|
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
2753
|
-
const useStyles$
|
|
2753
|
+
const useStyles$4 = createStyles((theme) => ({
|
|
2754
2754
|
wrapper: {
|
|
2755
2755
|
minHeight: "100%",
|
|
2756
2756
|
boxSizing: "border-box",
|
|
@@ -2813,7 +2813,7 @@ const OPTIONS = [
|
|
|
2813
2813
|
{ description: "project-based learning", title: "Project-Based Learning", icon: IconTools }
|
|
2814
2814
|
];
|
|
2815
2815
|
const TrialRegistration = (props) => {
|
|
2816
|
-
const { classes } = useStyles$
|
|
2816
|
+
const { classes } = useStyles$4();
|
|
2817
2817
|
const [firstName, setFirstName] = React.useState("");
|
|
2818
2818
|
const [lastName, setLastName] = React.useState("");
|
|
2819
2819
|
const [organization, setOrganization] = React.useState({ organizationId: "", displayName: "" });
|
|
@@ -2928,7 +2928,7 @@ var __spreadValues = (a, b) => {
|
|
|
2928
2928
|
return a;
|
|
2929
2929
|
};
|
|
2930
2930
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
2931
|
-
const useStyles$
|
|
2931
|
+
const useStyles$3 = createStyles((theme, props) => ({
|
|
2932
2932
|
footer: {
|
|
2933
2933
|
paddingTop: theme.spacing.md,
|
|
2934
2934
|
paddingBottom: theme.spacing.md,
|
|
@@ -3015,7 +3015,7 @@ const useStyles$1 = createStyles((theme, props) => ({
|
|
|
3015
3015
|
}
|
|
3016
3016
|
}));
|
|
3017
3017
|
const App = (props) => {
|
|
3018
|
-
const { classes } = useStyles$
|
|
3018
|
+
const { classes } = useStyles$3(props);
|
|
3019
3019
|
const account = useAccount(props.account, props.accounts, props.onAccountChange);
|
|
3020
3020
|
return /* @__PURE__ */ React.createElement(
|
|
3021
3021
|
AppShell,
|
|
@@ -3110,7 +3110,7 @@ const useAccount = (account, accounts, onAccountChange) => {
|
|
|
3110
3110
|
};
|
|
3111
3111
|
};
|
|
3112
3112
|
|
|
3113
|
-
function Table(props) {
|
|
3113
|
+
function Table$2(props) {
|
|
3114
3114
|
if (props.items.length === 0) {
|
|
3115
3115
|
return /* @__PURE__ */ React.createElement(
|
|
3116
3116
|
PlaceholderBanner,
|
|
@@ -3139,10 +3139,10 @@ function Table(props) {
|
|
|
3139
3139
|
},
|
|
3140
3140
|
/* @__PURE__ */ React.createElement(Group, null, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Text, { size: "sm", weight: 500 }, row.name), /* @__PURE__ */ React.createElement(Text, { size: "xs", color: "dimmed" }, row.description)))
|
|
3141
3141
|
))));
|
|
3142
|
-
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$
|
|
3142
|
+
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$k, { horizontalSpacing: 0, verticalSpacing: 0, sx: { minWidth: 700 } }, /* @__PURE__ */ React.createElement("tbody", null, rows)));
|
|
3143
3143
|
}
|
|
3144
3144
|
|
|
3145
|
-
const useStyles = createStyles((theme) => ({
|
|
3145
|
+
const useStyles$2 = createStyles((theme) => ({
|
|
3146
3146
|
title: {
|
|
3147
3147
|
fontSize: 34,
|
|
3148
3148
|
fontWeight: 900,
|
|
@@ -3155,9 +3155,9 @@ const useStyles = createStyles((theme) => ({
|
|
|
3155
3155
|
}
|
|
3156
3156
|
}));
|
|
3157
3157
|
const Pathways = (props) => {
|
|
3158
|
-
const { classes } = useStyles();
|
|
3159
|
-
return /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$
|
|
3160
|
-
Table,
|
|
3158
|
+
const { classes } = useStyles$2();
|
|
3159
|
+
return /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$4, { spacing: "md" }, /* @__PURE__ */ React.createElement(Grid, null, /* @__PURE__ */ React.createElement(Grid.Col, { sm: "auto" }, /* @__PURE__ */ React.createElement(Badge$1, { variant: "filled", size: "lg" }, "Pathways"), /* @__PURE__ */ React.createElement(Title, { order: 2, className: classes.title, mt: "md" }, "Pathways"), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", className: classes.description, mt: "sm" }, "Curated learning experiences for skill-building"))), /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React.createElement(
|
|
3160
|
+
Table$2,
|
|
3161
3161
|
{
|
|
3162
3162
|
loading: props.loading,
|
|
3163
3163
|
items: props.pathways
|
|
@@ -3165,5 +3165,201 @@ const Pathways = (props) => {
|
|
|
3165
3165
|
))));
|
|
3166
3166
|
};
|
|
3167
3167
|
|
|
3168
|
-
|
|
3168
|
+
const useStyles$1 = createStyles((theme) => ({
|
|
3169
|
+
button: {
|
|
3170
|
+
borderTopRightRadius: 0,
|
|
3171
|
+
borderBottomRightRadius: 0,
|
|
3172
|
+
marginLeft: 0,
|
|
3173
|
+
marginRight: 0
|
|
3174
|
+
},
|
|
3175
|
+
menuControl: {
|
|
3176
|
+
borderTopLeftRadius: 0,
|
|
3177
|
+
borderBottomLeftRadius: 0,
|
|
3178
|
+
border: 0,
|
|
3179
|
+
borderLeft: `1px solid ${theme.colorScheme === "dark" ? theme.colors.dark[7] : theme.white}`
|
|
3180
|
+
}
|
|
3181
|
+
}));
|
|
3182
|
+
const SplitButton = (props) => {
|
|
3183
|
+
const { classes, theme } = useStyles$1();
|
|
3184
|
+
const menuIconColor = theme.colors[theme.primaryColor][theme.colorScheme === "dark" ? 5 : 6];
|
|
3185
|
+
return /* @__PURE__ */ React.createElement(Group, { noWrap: true, spacing: 0 }, /* @__PURE__ */ React.createElement(
|
|
3186
|
+
Button,
|
|
3187
|
+
{
|
|
3188
|
+
component: Link,
|
|
3189
|
+
to: props.href,
|
|
3190
|
+
className: classes.button,
|
|
3191
|
+
variant: "gradient"
|
|
3192
|
+
},
|
|
3193
|
+
"Preview"
|
|
3194
|
+
), /* @__PURE__ */ React.createElement(Menu, { transition: "pop", position: "bottom-end" }, /* @__PURE__ */ React.createElement(Menu.Target, null, /* @__PURE__ */ React.createElement(
|
|
3195
|
+
ActionIcon,
|
|
3196
|
+
{
|
|
3197
|
+
variant: "gradient",
|
|
3198
|
+
color: theme.primaryColor,
|
|
3199
|
+
size: 36,
|
|
3200
|
+
className: classes.menuControl
|
|
3201
|
+
},
|
|
3202
|
+
/* @__PURE__ */ React.createElement(IconChevronDown, { size: 16, stroke: 1.5 })
|
|
3203
|
+
)), /* @__PURE__ */ React.createElement(Menu.Dropdown, null, /* @__PURE__ */ React.createElement(
|
|
3204
|
+
Menu.Item,
|
|
3205
|
+
{
|
|
3206
|
+
icon: /* @__PURE__ */ React.createElement(IconClipboardCopy, { size: 16, stroke: 1.5, color: menuIconColor }),
|
|
3207
|
+
onClick: props.onCopyLinkClick
|
|
3208
|
+
},
|
|
3209
|
+
"Copy link"
|
|
3210
|
+
), /* @__PURE__ */ React.createElement(
|
|
3211
|
+
Menu.Item,
|
|
3212
|
+
{
|
|
3213
|
+
icon: /* @__PURE__ */ React.createElement(IconTableExport, { size: 16, stroke: 1.5, color: menuIconColor }),
|
|
3214
|
+
onClick: props.onExportDataClick
|
|
3215
|
+
},
|
|
3216
|
+
"Export data (.csv)"
|
|
3217
|
+
))));
|
|
3218
|
+
};
|
|
3219
|
+
|
|
3220
|
+
function Stack(props) {
|
|
3221
|
+
if (props.items.length === 0) {
|
|
3222
|
+
return null;
|
|
3223
|
+
}
|
|
3224
|
+
const rows = props.items.map((row) => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Grid.Col, { span: 6 }, /* @__PURE__ */ React.createElement(Text, { component: Link, to: row.href, color: "dark.4", weight: "bold", size: "md" }, row.lessonName)), /* @__PURE__ */ React.createElement(Grid.Col, { span: 6 }, row.completion >= 1 && /* @__PURE__ */ React.createElement(Badge$1, { variant: "filled" }, "Complete"), row.completion === 0 && !row.isStarted && /* @__PURE__ */ React.createElement(Badge$1, { color: "red", variant: "filled" }, "Not started"), row.completion > 0 && row.completion < 1 && /* @__PURE__ */ React.createElement(Badge$1, { color: "violet", variant: "filled" }, Math.round((row.completion + Number.EPSILON) * 100), "% Complete"))));
|
|
3225
|
+
return /* @__PURE__ */ React.createElement(Grid, { grow: true, gutter: "lg", sx: { padding: 20, minWidth: 700 } }, rows);
|
|
3226
|
+
}
|
|
3227
|
+
|
|
3228
|
+
function Table$1(props) {
|
|
3229
|
+
if (props.items.length === 0) {
|
|
3230
|
+
return /* @__PURE__ */ React.createElement(
|
|
3231
|
+
PlaceholderBanner,
|
|
3232
|
+
{
|
|
3233
|
+
title: "No badges to display",
|
|
3234
|
+
description: "There has not been any badge progress just yet.",
|
|
3235
|
+
loading: props.loading,
|
|
3236
|
+
icon: "badges"
|
|
3237
|
+
}
|
|
3238
|
+
);
|
|
3239
|
+
}
|
|
3240
|
+
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(
|
|
3241
|
+
DataTable,
|
|
3242
|
+
{
|
|
3243
|
+
verticalSpacing: "sm",
|
|
3244
|
+
sx: { minWidth: 700 },
|
|
3245
|
+
withBorder: false,
|
|
3246
|
+
borderRadius: "sm",
|
|
3247
|
+
withColumnBorders: true,
|
|
3248
|
+
striped: true,
|
|
3249
|
+
highlightOnHover: true,
|
|
3250
|
+
records: props.items,
|
|
3251
|
+
idAccessor: "userId",
|
|
3252
|
+
columns: [{
|
|
3253
|
+
accessor: "name",
|
|
3254
|
+
title: "Student Name",
|
|
3255
|
+
render: (row) => /* @__PURE__ */ React.createElement(Group, { spacing: "sm" }, /* @__PURE__ */ React.createElement(Avatar, { size: 40, src: row.avatar, radius: 40 }), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Text, { size: "sm", weight: 500 }, row.name), /* @__PURE__ */ React.createElement(Text, { size: "xs", color: "dimmed" }, row.email)))
|
|
3256
|
+
}, {
|
|
3257
|
+
accessor: "status",
|
|
3258
|
+
render: (row) => /* @__PURE__ */ React.createElement(React.Fragment, null, !!row.isComplete && /* @__PURE__ */ React.createElement(Badge$1, { variant: "filled" }, "Complete"), !row.isComplete && /* @__PURE__ */ React.createElement(Badge$1, { color: "red", variant: "filled" }, "Incomplete"))
|
|
3259
|
+
}],
|
|
3260
|
+
rowExpansion: {
|
|
3261
|
+
content: ({ record }) => /* @__PURE__ */ React.createElement(Stack, { items: record.lessons })
|
|
3262
|
+
}
|
|
3263
|
+
}
|
|
3264
|
+
));
|
|
3265
|
+
}
|
|
3266
|
+
|
|
3267
|
+
function Table(props) {
|
|
3268
|
+
if (props.items.length === 0) {
|
|
3269
|
+
return /* @__PURE__ */ React.createElement(
|
|
3270
|
+
PlaceholderBanner,
|
|
3271
|
+
{
|
|
3272
|
+
title: "No badges to display",
|
|
3273
|
+
description: "There are no badges in this pathway.",
|
|
3274
|
+
loading: props.loading,
|
|
3275
|
+
icon: "badges"
|
|
3276
|
+
}
|
|
3277
|
+
);
|
|
3278
|
+
}
|
|
3279
|
+
const rows = props.items.map((row) => {
|
|
3280
|
+
const percentageCompletion = Math.round((row.percentageCompletion + Number.EPSILON) * 100);
|
|
3281
|
+
return /* @__PURE__ */ React.createElement("tr", { key: row.lessonName }, /* @__PURE__ */ React.createElement("td", null, /* @__PURE__ */ React.createElement(Text, { component: Link, to: row.href }, row.lessonName)), /* @__PURE__ */ React.createElement("td", null, percentageCompletion, "%"));
|
|
3282
|
+
});
|
|
3283
|
+
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$k, { verticalSpacing: "sm", sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", null, "Badge Name"), /* @__PURE__ */ React.createElement("th", null, "Badge Completion"))), /* @__PURE__ */ React.createElement("tbody", null, rows)));
|
|
3284
|
+
}
|
|
3285
|
+
|
|
3286
|
+
const useStyles = createStyles((theme) => ({
|
|
3287
|
+
title: {
|
|
3288
|
+
fontSize: 34,
|
|
3289
|
+
fontWeight: 900,
|
|
3290
|
+
[theme.fn.smallerThan("sm")]: {
|
|
3291
|
+
fontSize: 24
|
|
3292
|
+
}
|
|
3293
|
+
},
|
|
3294
|
+
description: {
|
|
3295
|
+
maxWidth: 600
|
|
3296
|
+
}
|
|
3297
|
+
}));
|
|
3298
|
+
const Pathway = (props) => {
|
|
3299
|
+
const { classes } = useStyles();
|
|
3300
|
+
const [tab, setTab] = useState("lessons");
|
|
3301
|
+
const numberOfStudents = props.students.length;
|
|
3302
|
+
const percentageOfBadgesEarned = numberOfStudents > 0 ? props.students.filter((u) => u.isComplete).length / numberOfStudents : 0;
|
|
3303
|
+
return /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$4, { spacing: "md" }, /* @__PURE__ */ React.createElement(Grid, null, /* @__PURE__ */ React.createElement(Grid.Col, { sm: "auto" }, /* @__PURE__ */ React.createElement(UnstyledButton, { onClick: props.onBackClick }, /* @__PURE__ */ React.createElement(
|
|
3304
|
+
Badge$1,
|
|
3305
|
+
{
|
|
3306
|
+
variant: "filled",
|
|
3307
|
+
leftSection: /* @__PURE__ */ React.createElement(ActionIcon, { color: "blue", size: "xs", radius: "xl", variant: "filled" }, /* @__PURE__ */ React.createElement(IconArrowLeft, { size: 14 })),
|
|
3308
|
+
size: "lg"
|
|
3309
|
+
},
|
|
3310
|
+
"Back"
|
|
3311
|
+
)), /* @__PURE__ */ React.createElement(Group, null, /* @__PURE__ */ React.createElement(Stack$4, { spacing: 0 }, /* @__PURE__ */ React.createElement(Title, { order: 2, className: classes.title, mt: "md" }, props.displayName || "Badge"), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", className: classes.description, mt: "sm" }, props.description || "No description")), !props.trial && /* @__PURE__ */ React.createElement(Stack$4, { ml: "auto" }, /* @__PURE__ */ React.createElement(
|
|
3312
|
+
SplitButton,
|
|
3313
|
+
{
|
|
3314
|
+
href: props.href,
|
|
3315
|
+
onCopyLinkClick: props.onCopyLinkClick,
|
|
3316
|
+
onExportDataClick: props.onExportDataClick
|
|
3317
|
+
}
|
|
3318
|
+
))))), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React.createElement(Stack$4, null, /* @__PURE__ */ React.createElement(StatsGroup, { data: [
|
|
3319
|
+
{
|
|
3320
|
+
title: props.trial ? "BADGES SUBMITTED" : "PATHWAY COMPLETION",
|
|
3321
|
+
value: props.trial ? props.lessonsCompleted || 0 : percentageOfBadgesEarned,
|
|
3322
|
+
unit: props.trial ? "" : "%"
|
|
3323
|
+
}
|
|
3324
|
+
] }), !props.trial && /* @__PURE__ */ React.createElement(
|
|
3325
|
+
Select,
|
|
3326
|
+
{
|
|
3327
|
+
clearable: true,
|
|
3328
|
+
clearButtonLabel: "Clear class selection",
|
|
3329
|
+
size: "sm",
|
|
3330
|
+
placeholder: "Select a class",
|
|
3331
|
+
nothingFound: "No options",
|
|
3332
|
+
value: props.classId,
|
|
3333
|
+
onChange: props.onClassChange,
|
|
3334
|
+
icon: /* @__PURE__ */ React.createElement(IconCategory2, null),
|
|
3335
|
+
data: props.classes.map((g) => {
|
|
3336
|
+
return { value: g.classId, label: g.name };
|
|
3337
|
+
})
|
|
3338
|
+
}
|
|
3339
|
+
), /* @__PURE__ */ React.createElement(Stack$4, { spacing: 0 }, !props.trial && /* @__PURE__ */ React.createElement(
|
|
3340
|
+
Tabs,
|
|
3341
|
+
{
|
|
3342
|
+
value: tab,
|
|
3343
|
+
data: [
|
|
3344
|
+
{ label: "By Badge", value: "lessons" },
|
|
3345
|
+
{ label: "By student", value: "students" }
|
|
3346
|
+
],
|
|
3347
|
+
onChange: setTab
|
|
3348
|
+
}
|
|
3349
|
+
), (!!props.trial || tab === "lessons") && /* @__PURE__ */ React.createElement(
|
|
3350
|
+
Table,
|
|
3351
|
+
{
|
|
3352
|
+
loading: props.loading,
|
|
3353
|
+
items: props.lessons
|
|
3354
|
+
}
|
|
3355
|
+
), !props.trial && tab === "students" && /* @__PURE__ */ React.createElement(
|
|
3356
|
+
Table$1,
|
|
3357
|
+
{
|
|
3358
|
+
loading: props.loading,
|
|
3359
|
+
items: props.students
|
|
3360
|
+
}
|
|
3361
|
+
)))))));
|
|
3362
|
+
};
|
|
3363
|
+
|
|
3364
|
+
export { AdminProvider, App, Badge, Badges, Class, Classes, Dashboard, GettingStarted, Home, Lesson, Lessons, Navbar, Organization, Pathway, Pathways, People, StartAnonymousLesson, Student, SwitchAccount, TrialHome, TrialRegistration };
|
|
3169
3365
|
//# sourceMappingURL=index.mjs.map
|