@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.js
CHANGED
|
@@ -62,7 +62,7 @@ var __objRest$2 = (source, exclude) => {
|
|
|
62
62
|
}
|
|
63
63
|
return target;
|
|
64
64
|
};
|
|
65
|
-
const useStyles$
|
|
65
|
+
const useStyles$t = core.createStyles((theme) => ({
|
|
66
66
|
user: {
|
|
67
67
|
display: "block",
|
|
68
68
|
width: "100%",
|
|
@@ -73,7 +73,7 @@ const useStyles$r = core.createStyles((theme) => ({
|
|
|
73
73
|
}));
|
|
74
74
|
function UserButton(_a) {
|
|
75
75
|
var _b = _a, { image, name, email, icon } = _b, others = __objRest$2(_b, ["image", "name", "email", "icon"]);
|
|
76
|
-
const { classes } = useStyles$
|
|
76
|
+
const { classes } = useStyles$t();
|
|
77
77
|
return /* @__PURE__ */ React__namespace.createElement(core.Group, __spreadValues$9({ className: classes.user }, others), /* @__PURE__ */ React__namespace.createElement(core.Avatar, { src: image, radius: "xl" }), /* @__PURE__ */ React__namespace.createElement("div", { style: { flex: 1 } }, /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "sm", weight: 500 }, name), /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", size: "xs" }, email)));
|
|
78
78
|
}
|
|
79
79
|
|
|
@@ -84,7 +84,7 @@ const compact = (num) => {
|
|
|
84
84
|
}).format(num || 0);
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
-
const useStyles$
|
|
87
|
+
const useStyles$s = core.createStyles((theme, _params, getRef) => {
|
|
88
88
|
const icon = getRef("icon");
|
|
89
89
|
return {
|
|
90
90
|
control: {
|
|
@@ -137,7 +137,7 @@ const useStyles$q = core.createStyles((theme, _params, getRef) => {
|
|
|
137
137
|
};
|
|
138
138
|
});
|
|
139
139
|
function LinksGroup({ icon: Icon, href, label, initiallyOpened, links, active, notifications }) {
|
|
140
|
-
const { classes, theme, cx } = useStyles$
|
|
140
|
+
const { classes, theme, cx } = useStyles$s();
|
|
141
141
|
const hasLinks = Array.isArray(links) && links.length > 0;
|
|
142
142
|
const hasActiveLinks = Array.isArray(links) && links.map((l) => !!active && active === `${label}/${l.label}`).reduce((a, b) => a || b, false);
|
|
143
143
|
const [opened, setOpened] = React.useState(initiallyOpened || hasActiveLinks || false);
|
|
@@ -201,7 +201,7 @@ var __spreadValues$8 = (a, b) => {
|
|
|
201
201
|
return a;
|
|
202
202
|
};
|
|
203
203
|
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
204
|
-
const useStyles$
|
|
204
|
+
const useStyles$r = core.createStyles((theme, _params, getRef) => {
|
|
205
205
|
const icon = getRef("icon");
|
|
206
206
|
return {
|
|
207
207
|
navbar: {
|
|
@@ -301,7 +301,7 @@ const TRIAL_PAGES = [
|
|
|
301
301
|
"Badges"
|
|
302
302
|
];
|
|
303
303
|
function Navbar(props) {
|
|
304
|
-
const { classes, cx } = useStyles$
|
|
304
|
+
const { classes, cx } = useStyles$r();
|
|
305
305
|
const [burgerOpen, setBurgerOpen] = React__namespace.useState(false);
|
|
306
306
|
const toggle = () => setBurgerOpen(!burgerOpen);
|
|
307
307
|
const links = data.map((item) => {
|
|
@@ -344,7 +344,7 @@ function Navbar(props) {
|
|
|
344
344
|
} }, /* @__PURE__ */ React__namespace.createElement(icons.IconLogout, { className: classes.linkIcon, stroke: 1.5 }), /* @__PURE__ */ React__namespace.createElement("span", null, "Logout"))))));
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
const useStyles$
|
|
347
|
+
const useStyles$q = core.createStyles((theme) => ({
|
|
348
348
|
inner: {
|
|
349
349
|
paddingTop: theme.spacing.xl,
|
|
350
350
|
paddingBottom: theme.spacing.xl * 4
|
|
@@ -380,7 +380,7 @@ const useStyles$o = core.createStyles((theme) => ({
|
|
|
380
380
|
}
|
|
381
381
|
}));
|
|
382
382
|
const GettingStarted = (props) => {
|
|
383
|
-
const { classes } = useStyles$
|
|
383
|
+
const { classes } = useStyles$q();
|
|
384
384
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
385
385
|
core.Modal,
|
|
386
386
|
{
|
|
@@ -394,7 +394,7 @@ const GettingStarted = (props) => {
|
|
|
394
394
|
);
|
|
395
395
|
};
|
|
396
396
|
|
|
397
|
-
const useStyles$
|
|
397
|
+
const useStyles$p = core.createStyles((theme) => ({
|
|
398
398
|
title: {
|
|
399
399
|
fontSize: 34,
|
|
400
400
|
fontWeight: 900,
|
|
@@ -435,7 +435,7 @@ const useStyles$n = core.createStyles((theme) => ({
|
|
|
435
435
|
}
|
|
436
436
|
}));
|
|
437
437
|
const SwitchAccount = (props) => {
|
|
438
|
-
const { classes, theme } = useStyles$
|
|
438
|
+
const { classes, theme } = useStyles$p();
|
|
439
439
|
const options = props.accounts.map((a) => {
|
|
440
440
|
return /* @__PURE__ */ React__namespace.createElement(core.UnstyledButton, { onClick: () => props.onClick && props.onClick(a.accountId), key: a.accountId, p: theme.spacing.md }, /* @__PURE__ */ React__namespace.createElement(core.Card, { withBorder: true, shadow: "md", radius: "md", className: classes.card, p: "xl" }, a.isAdmin && /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(icons.IconBatteryEco, { size: 50, stroke: 2, color: theme.fn.primaryColor() })), a.isGroupAdmin && !a.isAdmin && /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(icons.IconBooks, { size: 50, stroke: 2, color: theme.fn.primaryColor() })), !a.isAdmin && !a.isGroupAdmin && /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(icons.IconBackpack, { size: 50, stroke: 2, color: theme.fn.primaryColor() })), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "lg", weight: 500, className: classes.cardTitle, mt: "md" }, a.name), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "sm", color: "dimmed", mt: "sm" }, a.isAdmin ? "Admin" : a.isGroupAdmin ? "Educator" : "Student")));
|
|
441
441
|
});
|
|
@@ -452,7 +452,7 @@ const SwitchAccount = (props) => {
|
|
|
452
452
|
);
|
|
453
453
|
};
|
|
454
454
|
|
|
455
|
-
const useStyles$
|
|
455
|
+
const useStyles$o = core.createStyles((theme) => ({
|
|
456
456
|
root: {
|
|
457
457
|
display: "flex",
|
|
458
458
|
backgroundImage: `linear-gradient(-60deg, ${theme.colors[theme.primaryColor][4]} 0%, ${theme.colors[theme.primaryColor][7]} 100%)`,
|
|
@@ -496,7 +496,7 @@ const useStyles$m = core.createStyles((theme) => ({
|
|
|
496
496
|
}
|
|
497
497
|
}));
|
|
498
498
|
const StatsGroup = ({ data, footer }) => {
|
|
499
|
-
const { classes } = useStyles$
|
|
499
|
+
const { classes } = useStyles$o();
|
|
500
500
|
const stats = data.map((stat) => {
|
|
501
501
|
const value = (() => {
|
|
502
502
|
if (stat.unit === "%") {
|
|
@@ -515,7 +515,7 @@ const Tabs = (props) => {
|
|
|
515
515
|
return /* @__PURE__ */ React__namespace.createElement(core.Tabs, { value: props.value, onTabChange: props.onChange }, /* @__PURE__ */ React__namespace.createElement(core.Tabs.List, null, tabs));
|
|
516
516
|
};
|
|
517
517
|
|
|
518
|
-
const useStyles$
|
|
518
|
+
const useStyles$n = core.createStyles((theme) => ({
|
|
519
519
|
button: {
|
|
520
520
|
borderTopRightRadius: 0,
|
|
521
521
|
borderBottomRightRadius: 0,
|
|
@@ -529,8 +529,8 @@ const useStyles$l = core.createStyles((theme) => ({
|
|
|
529
529
|
borderLeft: `1px solid ${theme.colorScheme === "dark" ? theme.colors.dark[7] : theme.white}`
|
|
530
530
|
}
|
|
531
531
|
}));
|
|
532
|
-
const SplitButton$
|
|
533
|
-
const { classes, theme } = useStyles$
|
|
532
|
+
const SplitButton$4 = (props) => {
|
|
533
|
+
const { classes, theme } = useStyles$n();
|
|
534
534
|
const menuIconColor = theme.colors[theme.primaryColor][theme.colorScheme === "dark" ? 5 : 6];
|
|
535
535
|
return /* @__PURE__ */ React__namespace.createElement(core.Group, { noWrap: true, spacing: 0 }, /* @__PURE__ */ React__namespace.createElement(
|
|
536
536
|
core.Button,
|
|
@@ -567,7 +567,7 @@ const SplitButton$3 = (props) => {
|
|
|
567
567
|
))));
|
|
568
568
|
};
|
|
569
569
|
|
|
570
|
-
const useStyles$
|
|
570
|
+
const useStyles$m = core.createStyles((theme) => ({
|
|
571
571
|
wrapper: {
|
|
572
572
|
display: "flex",
|
|
573
573
|
alignItems: "center",
|
|
@@ -618,13 +618,13 @@ const useStyles$k = core.createStyles((theme) => ({
|
|
|
618
618
|
}
|
|
619
619
|
}));
|
|
620
620
|
const PlaceholderBanner = (props) => {
|
|
621
|
-
const { classes } = useStyles$
|
|
621
|
+
const { classes } = useStyles$m();
|
|
622
622
|
const title = props.title || "Nothing to display";
|
|
623
623
|
const description = props.description || "We don't have anything to show you here just yet. Add data, check back later, or adjust your search.";
|
|
624
624
|
return /* @__PURE__ */ React__namespace.createElement("div", { className: classes.wrapper }, /* @__PURE__ */ React__namespace.createElement("div", { className: classes.body }, /* @__PURE__ */ React__namespace.createElement(core.Title, { className: classes.title }, props.loading ? "Loading..." : title), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "sm", color: "dimmed" }, props.loading ? "Hold on, we're loading your data." : description)), /* @__PURE__ */ React__namespace.createElement(core.Image, { src: `https://cdn.localcivics.io/illustrations/${props.icon}.svg`, className: classes.image }));
|
|
625
625
|
};
|
|
626
626
|
|
|
627
|
-
function Stack$
|
|
627
|
+
function Stack$3(props) {
|
|
628
628
|
if (props.items.length === 0) {
|
|
629
629
|
return null;
|
|
630
630
|
}
|
|
@@ -632,7 +632,7 @@ function Stack$2(props) {
|
|
|
632
632
|
return /* @__PURE__ */ React__namespace.createElement(core.Grid, { grow: true, gutter: "lg", sx: { padding: 20, minWidth: 700 } }, rows);
|
|
633
633
|
}
|
|
634
634
|
|
|
635
|
-
function Table$
|
|
635
|
+
function Table$j(props) {
|
|
636
636
|
if (props.items.length === 0) {
|
|
637
637
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
638
638
|
PlaceholderBanner,
|
|
@@ -665,13 +665,13 @@ function Table$h(props) {
|
|
|
665
665
|
render: (row) => /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, !!row.isComplete && /* @__PURE__ */ React__namespace.createElement(core.Badge, { variant: "filled" }, "Complete"), !row.isComplete && /* @__PURE__ */ React__namespace.createElement(core.Badge, { color: "red", variant: "filled" }, "Incomplete"))
|
|
666
666
|
}],
|
|
667
667
|
rowExpansion: {
|
|
668
|
-
content: ({ record }) => /* @__PURE__ */ React__namespace.createElement(Stack$
|
|
668
|
+
content: ({ record }) => /* @__PURE__ */ React__namespace.createElement(Stack$3, { items: record.lessons })
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
671
|
));
|
|
672
672
|
}
|
|
673
673
|
|
|
674
|
-
function Table$
|
|
674
|
+
function Table$i(props) {
|
|
675
675
|
if (props.items.length === 0) {
|
|
676
676
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
677
677
|
PlaceholderBanner,
|
|
@@ -690,7 +690,7 @@ function Table$g(props) {
|
|
|
690
690
|
return /* @__PURE__ */ React__namespace.createElement(core.ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React__namespace.createElement(core.Table, { verticalSpacing: "sm", sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React__namespace.createElement("thead", null, /* @__PURE__ */ React__namespace.createElement("tr", null, /* @__PURE__ */ React__namespace.createElement("th", null, "Lesson Name"), /* @__PURE__ */ React__namespace.createElement("th", null, "Lesson Completion"))), /* @__PURE__ */ React__namespace.createElement("tbody", null, rows)));
|
|
691
691
|
}
|
|
692
692
|
|
|
693
|
-
const useStyles$
|
|
693
|
+
const useStyles$l = core.createStyles((theme) => ({
|
|
694
694
|
title: {
|
|
695
695
|
fontSize: 34,
|
|
696
696
|
fontWeight: 900,
|
|
@@ -703,7 +703,7 @@ const useStyles$j = core.createStyles((theme) => ({
|
|
|
703
703
|
}
|
|
704
704
|
}));
|
|
705
705
|
const Badge = (props) => {
|
|
706
|
-
const { classes } = useStyles$
|
|
706
|
+
const { classes } = useStyles$l();
|
|
707
707
|
const [tab, setTab] = React.useState("lessons");
|
|
708
708
|
const numberOfStudents = props.students.length;
|
|
709
709
|
const percentageOfBadgesEarned = numberOfStudents > 0 ? props.students.filter((u) => u.isComplete).length / numberOfStudents : 0;
|
|
@@ -716,7 +716,7 @@ const Badge = (props) => {
|
|
|
716
716
|
},
|
|
717
717
|
"Back"
|
|
718
718
|
)), /* @__PURE__ */ React__namespace.createElement(core.Group, null, /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: 0 }, /* @__PURE__ */ React__namespace.createElement(core.Title, { order: 2, className: classes.title, mt: "md" }, props.displayName || "Badge"), /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", className: classes.description, mt: "sm" }, props.description || "No description")), !props.trial && /* @__PURE__ */ React__namespace.createElement(core.Stack, { ml: "auto" }, /* @__PURE__ */ React__namespace.createElement(
|
|
719
|
-
SplitButton$
|
|
719
|
+
SplitButton$4,
|
|
720
720
|
{
|
|
721
721
|
href: props.href,
|
|
722
722
|
onCopyLinkClick: props.onCopyLinkClick,
|
|
@@ -754,13 +754,13 @@ const Badge = (props) => {
|
|
|
754
754
|
onChange: setTab
|
|
755
755
|
}
|
|
756
756
|
), (!!props.trial || tab === "lessons") && /* @__PURE__ */ React__namespace.createElement(
|
|
757
|
-
Table$
|
|
757
|
+
Table$i,
|
|
758
758
|
{
|
|
759
759
|
loading: props.loading,
|
|
760
760
|
items: props.lessons
|
|
761
761
|
}
|
|
762
762
|
), !props.trial && tab === "students" && /* @__PURE__ */ React__namespace.createElement(
|
|
763
|
-
Table$
|
|
763
|
+
Table$j,
|
|
764
764
|
{
|
|
765
765
|
loading: props.loading,
|
|
766
766
|
items: props.students
|
|
@@ -768,7 +768,7 @@ const Badge = (props) => {
|
|
|
768
768
|
)))))));
|
|
769
769
|
};
|
|
770
770
|
|
|
771
|
-
function Table$
|
|
771
|
+
function Table$h(props) {
|
|
772
772
|
if (props.items.length === 0) {
|
|
773
773
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
774
774
|
PlaceholderBanner,
|
|
@@ -800,7 +800,7 @@ function Table$f(props) {
|
|
|
800
800
|
return /* @__PURE__ */ React__namespace.createElement(core.ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React__namespace.createElement(core.Table, { horizontalSpacing: 0, verticalSpacing: 0, sx: { minWidth: 700 } }, /* @__PURE__ */ React__namespace.createElement("tbody", null, rows)));
|
|
801
801
|
}
|
|
802
802
|
|
|
803
|
-
const useStyles$
|
|
803
|
+
const useStyles$k = core.createStyles((theme) => ({
|
|
804
804
|
title: {
|
|
805
805
|
fontSize: 34,
|
|
806
806
|
fontWeight: 900,
|
|
@@ -813,7 +813,7 @@ const useStyles$i = core.createStyles((theme) => ({
|
|
|
813
813
|
}
|
|
814
814
|
}));
|
|
815
815
|
const Badges = (props) => {
|
|
816
|
-
const { classes } = useStyles$
|
|
816
|
+
const { classes } = useStyles$k();
|
|
817
817
|
return /* @__PURE__ */ React__namespace.createElement(core.Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: "md" }, /* @__PURE__ */ React__namespace.createElement(core.Grid, null, /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { sm: "auto" }, /* @__PURE__ */ React__namespace.createElement(core.Badge, { variant: "filled", size: "lg" }, "Badges"), /* @__PURE__ */ React__namespace.createElement(core.Title, { order: 2, className: classes.title, mt: "md" }, "Badges and micro-credentials"), /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", className: classes.description, mt: "sm" }, "Project-sized skills acquisition and standards alignment."))), /* @__PURE__ */ React__namespace.createElement(
|
|
818
818
|
core.Autocomplete,
|
|
819
819
|
{
|
|
@@ -822,7 +822,7 @@ const Badges = (props) => {
|
|
|
822
822
|
onChange: props.onAutocompleteChange
|
|
823
823
|
}
|
|
824
824
|
), /* @__PURE__ */ React__namespace.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React__namespace.createElement(core.LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React__namespace.createElement(
|
|
825
|
-
Table$
|
|
825
|
+
Table$h,
|
|
826
826
|
{
|
|
827
827
|
loading: props.loading,
|
|
828
828
|
items: props.badges
|
|
@@ -830,7 +830,7 @@ const Badges = (props) => {
|
|
|
830
830
|
))));
|
|
831
831
|
};
|
|
832
832
|
|
|
833
|
-
function Table$
|
|
833
|
+
function Table$g(props) {
|
|
834
834
|
if (props.items.length === 0) {
|
|
835
835
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
836
836
|
PlaceholderBanner,
|
|
@@ -870,7 +870,7 @@ function relativeTimeFromElapsed(elapsed) {
|
|
|
870
870
|
return "";
|
|
871
871
|
}
|
|
872
872
|
|
|
873
|
-
function Table$
|
|
873
|
+
function Table$f(props) {
|
|
874
874
|
if (props.items.length === 0) {
|
|
875
875
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
876
876
|
PlaceholderBanner,
|
|
@@ -886,7 +886,7 @@ function Table$d(props) {
|
|
|
886
886
|
return /* @__PURE__ */ React__namespace.createElement(core.ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React__namespace.createElement(core.Table, { verticalSpacing: "sm", sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React__namespace.createElement("thead", null, /* @__PURE__ */ React__namespace.createElement("tr", null, /* @__PURE__ */ React__namespace.createElement("th", null, "Student Name"), /* @__PURE__ */ React__namespace.createElement("th", null, "Lesson Name"), /* @__PURE__ */ React__namespace.createElement("th", null, "Reflection"), /* @__PURE__ */ React__namespace.createElement("th", null, "Updated At"))), /* @__PURE__ */ React__namespace.createElement("tbody", null, rows)));
|
|
887
887
|
}
|
|
888
888
|
|
|
889
|
-
function Table$
|
|
889
|
+
function Table$e(props) {
|
|
890
890
|
if (props.items.length === 0) {
|
|
891
891
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
892
892
|
PlaceholderBanner,
|
|
@@ -902,7 +902,7 @@ function Table$c(props) {
|
|
|
902
902
|
return /* @__PURE__ */ React__namespace.createElement(core.ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React__namespace.createElement(core.Table, { verticalSpacing: "sm", sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React__namespace.createElement("thead", null, /* @__PURE__ */ React__namespace.createElement("tr", null, /* @__PURE__ */ React__namespace.createElement("th", null, "Student Name"), /* @__PURE__ */ React__namespace.createElement("th", null, "Impact Statement"))), /* @__PURE__ */ React__namespace.createElement("tbody", null, rows)));
|
|
903
903
|
}
|
|
904
904
|
|
|
905
|
-
function Table$
|
|
905
|
+
function Table$d(props) {
|
|
906
906
|
if (props.items.length === 0) {
|
|
907
907
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
908
908
|
PlaceholderBanner,
|
|
@@ -918,7 +918,7 @@ function Table$b(props) {
|
|
|
918
918
|
return /* @__PURE__ */ React__namespace.createElement(core.ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React__namespace.createElement(core.Table, { verticalSpacing: "sm", sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React__namespace.createElement("thead", null, /* @__PURE__ */ React__namespace.createElement("tr", null, /* @__PURE__ */ React__namespace.createElement("th", null, "Badge Name"), /* @__PURE__ */ React__namespace.createElement("th", null, "Description"), /* @__PURE__ */ React__namespace.createElement("th", null, "Completion"))), /* @__PURE__ */ React__namespace.createElement("tbody", null, rows)));
|
|
919
919
|
}
|
|
920
920
|
|
|
921
|
-
function Table$
|
|
921
|
+
function Table$c(props) {
|
|
922
922
|
if (props.items.length === 0) {
|
|
923
923
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
924
924
|
PlaceholderBanner,
|
|
@@ -983,33 +983,33 @@ const Dashboard = (props) => {
|
|
|
983
983
|
onChange: setTab
|
|
984
984
|
}
|
|
985
985
|
), tab === "impact" && /* @__PURE__ */ React__namespace.createElement(
|
|
986
|
-
Table$
|
|
986
|
+
Table$e,
|
|
987
987
|
{
|
|
988
988
|
loading: props.loading,
|
|
989
989
|
items: props.impacts
|
|
990
990
|
}
|
|
991
991
|
), tab === "reflections" && /* @__PURE__ */ React__namespace.createElement(
|
|
992
|
-
Table$
|
|
992
|
+
Table$f,
|
|
993
993
|
{
|
|
994
994
|
loading: props.loading,
|
|
995
995
|
items: props.reflections
|
|
996
996
|
}
|
|
997
997
|
), tab === "badges" && /* @__PURE__ */ React__namespace.createElement(
|
|
998
|
-
Table$
|
|
998
|
+
Table$d,
|
|
999
999
|
{
|
|
1000
1000
|
loading: props.loading,
|
|
1001
1001
|
items: props.badges,
|
|
1002
1002
|
onClick: props.onBadgeClick
|
|
1003
1003
|
}
|
|
1004
1004
|
), tab === "lessons" && /* @__PURE__ */ React__namespace.createElement(
|
|
1005
|
-
Table$
|
|
1005
|
+
Table$c,
|
|
1006
1006
|
{
|
|
1007
1007
|
loading: props.loading,
|
|
1008
1008
|
items: props.lessons,
|
|
1009
1009
|
onClick: props.onLessonClick
|
|
1010
1010
|
}
|
|
1011
1011
|
), tab === "students" && /* @__PURE__ */ React__namespace.createElement(
|
|
1012
|
-
Table$
|
|
1012
|
+
Table$g,
|
|
1013
1013
|
{
|
|
1014
1014
|
loading: props.loading,
|
|
1015
1015
|
items: props.students,
|
|
@@ -1018,7 +1018,7 @@ const Dashboard = (props) => {
|
|
|
1018
1018
|
)))))));
|
|
1019
1019
|
};
|
|
1020
1020
|
|
|
1021
|
-
const SplitButton$
|
|
1021
|
+
const SplitButton$3 = (props) => {
|
|
1022
1022
|
return /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: "sm" }, /* @__PURE__ */ React__namespace.createElement(
|
|
1023
1023
|
core.Button,
|
|
1024
1024
|
{
|
|
@@ -1036,7 +1036,7 @@ const SplitButton$2 = (props) => {
|
|
|
1036
1036
|
));
|
|
1037
1037
|
};
|
|
1038
1038
|
|
|
1039
|
-
function Table$
|
|
1039
|
+
function Table$b(props) {
|
|
1040
1040
|
if (props.items.length === 0) {
|
|
1041
1041
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
1042
1042
|
PlaceholderBanner,
|
|
@@ -1087,7 +1087,7 @@ var __spreadValues$7 = (a, b) => {
|
|
|
1087
1087
|
return a;
|
|
1088
1088
|
};
|
|
1089
1089
|
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
1090
|
-
const useStyles$
|
|
1090
|
+
const useStyles$j = core.createStyles((theme) => ({
|
|
1091
1091
|
title: {
|
|
1092
1092
|
fontSize: 34,
|
|
1093
1093
|
fontWeight: 900,
|
|
@@ -1120,7 +1120,7 @@ const useStyles$h = core.createStyles((theme) => ({
|
|
|
1120
1120
|
}
|
|
1121
1121
|
}));
|
|
1122
1122
|
const Class = (props) => {
|
|
1123
|
-
const { classes } = useStyles$
|
|
1123
|
+
const { classes } = useStyles$j();
|
|
1124
1124
|
const form$1 = form.useForm({
|
|
1125
1125
|
initialValues: {
|
|
1126
1126
|
classId: "",
|
|
@@ -1186,7 +1186,7 @@ const Class = (props) => {
|
|
|
1186
1186
|
},
|
|
1187
1187
|
"Back"
|
|
1188
1188
|
)), /* @__PURE__ */ React__namespace.createElement(core.Title, { order: 2, className: classes.title, mt: "md" }, props.displayName || "Class"), /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", className: classes.description, mt: "sm" }, props.description || "No description")), /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { sm: "content" }, !props.loading && /* @__PURE__ */ React__namespace.createElement(
|
|
1189
|
-
SplitButton$
|
|
1189
|
+
SplitButton$3,
|
|
1190
1190
|
{
|
|
1191
1191
|
onAddMembersClick: () => setOpened(true),
|
|
1192
1192
|
onCopyClassLinkClick: props.onCopyLinkClick
|
|
@@ -1210,7 +1210,7 @@ const Class = (props) => {
|
|
|
1210
1210
|
value: props.numberOfLessonsCompleted
|
|
1211
1211
|
}
|
|
1212
1212
|
] }), /* @__PURE__ */ React__namespace.createElement(
|
|
1213
|
-
Table$
|
|
1213
|
+
Table$b,
|
|
1214
1214
|
{
|
|
1215
1215
|
loading: props.loading,
|
|
1216
1216
|
items: props.members,
|
|
@@ -1220,7 +1220,7 @@ const Class = (props) => {
|
|
|
1220
1220
|
))))));
|
|
1221
1221
|
};
|
|
1222
1222
|
const DropzoneButton$1 = (props) => {
|
|
1223
|
-
const { classes, theme } = useStyles$
|
|
1223
|
+
const { classes, theme } = useStyles$j();
|
|
1224
1224
|
const openRef = React__namespace.useRef(null);
|
|
1225
1225
|
const [loading, setLoading] = React__namespace.useState(false);
|
|
1226
1226
|
const onDrop = React__namespace.useCallback((acceptedFiles) => {
|
|
@@ -1266,7 +1266,7 @@ const DropzoneButton$1 = (props) => {
|
|
|
1266
1266
|
} }, "Select file"));
|
|
1267
1267
|
};
|
|
1268
1268
|
|
|
1269
|
-
function Table$
|
|
1269
|
+
function Table$a(props) {
|
|
1270
1270
|
if (props.items.length === 0) {
|
|
1271
1271
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
1272
1272
|
PlaceholderBanner,
|
|
@@ -1306,7 +1306,7 @@ var __spreadValues$6 = (a, b) => {
|
|
|
1306
1306
|
}
|
|
1307
1307
|
return a;
|
|
1308
1308
|
};
|
|
1309
|
-
const useStyles$
|
|
1309
|
+
const useStyles$i = core.createStyles((theme) => ({
|
|
1310
1310
|
title: {
|
|
1311
1311
|
fontSize: 34,
|
|
1312
1312
|
fontWeight: 900,
|
|
@@ -1319,7 +1319,7 @@ const useStyles$g = core.createStyles((theme) => ({
|
|
|
1319
1319
|
}
|
|
1320
1320
|
}));
|
|
1321
1321
|
const Classes = (props) => {
|
|
1322
|
-
const { classes } = useStyles$
|
|
1322
|
+
const { classes } = useStyles$i();
|
|
1323
1323
|
const form$1 = form.useForm({
|
|
1324
1324
|
initialValues: {
|
|
1325
1325
|
classId: "",
|
|
@@ -1381,7 +1381,7 @@ const Classes = (props) => {
|
|
|
1381
1381
|
onChange: props.onAutocompleteChange
|
|
1382
1382
|
}
|
|
1383
1383
|
), /* @__PURE__ */ React__namespace.createElement(
|
|
1384
|
-
Table$
|
|
1384
|
+
Table$a,
|
|
1385
1385
|
{
|
|
1386
1386
|
loading: props.loading,
|
|
1387
1387
|
items: props.classes,
|
|
@@ -1390,7 +1390,7 @@ const Classes = (props) => {
|
|
|
1390
1390
|
))))));
|
|
1391
1391
|
};
|
|
1392
1392
|
|
|
1393
|
-
const useStyles$
|
|
1393
|
+
const useStyles$h = core.createStyles((theme) => ({
|
|
1394
1394
|
title: {
|
|
1395
1395
|
fontSize: 34,
|
|
1396
1396
|
fontWeight: 900,
|
|
@@ -1404,11 +1404,11 @@ const useStyles$f = core.createStyles((theme) => ({
|
|
|
1404
1404
|
}
|
|
1405
1405
|
}));
|
|
1406
1406
|
const UserInfo = (props) => {
|
|
1407
|
-
const { classes } = useStyles$
|
|
1407
|
+
const { classes } = useStyles$h();
|
|
1408
1408
|
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(core.Title, { className: classes.title }, props.name), /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", className: classes.description, mt: "xs" }, props.impactStatement));
|
|
1409
1409
|
};
|
|
1410
1410
|
|
|
1411
|
-
function Table$
|
|
1411
|
+
function Table$9(props) {
|
|
1412
1412
|
if (props.items.length === 0) {
|
|
1413
1413
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
1414
1414
|
PlaceholderBanner,
|
|
@@ -1444,7 +1444,7 @@ function Table$7(props) {
|
|
|
1444
1444
|
));
|
|
1445
1445
|
}
|
|
1446
1446
|
|
|
1447
|
-
function Table$
|
|
1447
|
+
function Table$8(props) {
|
|
1448
1448
|
if (props.items.length === 0) {
|
|
1449
1449
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
1450
1450
|
PlaceholderBanner,
|
|
@@ -1460,7 +1460,7 @@ function Table$6(props) {
|
|
|
1460
1460
|
return /* @__PURE__ */ React__namespace.createElement(core.ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React__namespace.createElement(core.Table, { verticalSpacing: "sm", sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React__namespace.createElement("thead", null, /* @__PURE__ */ React__namespace.createElement("tr", null, /* @__PURE__ */ React__namespace.createElement("th", null, "Lesson Name"), /* @__PURE__ */ React__namespace.createElement("th", null, "Question"), /* @__PURE__ */ React__namespace.createElement("th", null, "Answer"))), /* @__PURE__ */ React__namespace.createElement("tbody", null, rows)));
|
|
1461
1461
|
}
|
|
1462
1462
|
|
|
1463
|
-
function Table$
|
|
1463
|
+
function Table$7(props) {
|
|
1464
1464
|
if (props.items.length === 0) {
|
|
1465
1465
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
1466
1466
|
PlaceholderBanner,
|
|
@@ -1522,19 +1522,19 @@ const Student = (props) => {
|
|
|
1522
1522
|
onChange: setTab
|
|
1523
1523
|
}
|
|
1524
1524
|
), tab === "badges" && /* @__PURE__ */ React__namespace.createElement(
|
|
1525
|
-
Table$
|
|
1525
|
+
Table$9,
|
|
1526
1526
|
{
|
|
1527
1527
|
loading: props.loading,
|
|
1528
1528
|
items: props.badges
|
|
1529
1529
|
}
|
|
1530
1530
|
), tab === "answers" && /* @__PURE__ */ React__namespace.createElement(
|
|
1531
|
-
Table$
|
|
1531
|
+
Table$8,
|
|
1532
1532
|
{
|
|
1533
1533
|
loading: props.loading,
|
|
1534
1534
|
items: props.answers
|
|
1535
1535
|
}
|
|
1536
1536
|
), tab === "reflections" && /* @__PURE__ */ React__namespace.createElement(
|
|
1537
|
-
Table$
|
|
1537
|
+
Table$7,
|
|
1538
1538
|
{
|
|
1539
1539
|
loading: props.loading,
|
|
1540
1540
|
items: props.reflections
|
|
@@ -1542,7 +1542,7 @@ const Student = (props) => {
|
|
|
1542
1542
|
))))));
|
|
1543
1543
|
};
|
|
1544
1544
|
|
|
1545
|
-
const useStyles$
|
|
1545
|
+
const useStyles$g = core.createStyles((theme, props) => {
|
|
1546
1546
|
const from = props.from || "blue";
|
|
1547
1547
|
const to = props.to || "green";
|
|
1548
1548
|
return {
|
|
@@ -1570,7 +1570,7 @@ const useStyles$e = core.createStyles((theme, props) => {
|
|
|
1570
1570
|
};
|
|
1571
1571
|
});
|
|
1572
1572
|
function CardGradient(props) {
|
|
1573
|
-
const { classes } = useStyles$
|
|
1573
|
+
const { classes } = useStyles$g(props);
|
|
1574
1574
|
const from = props.from || "blue";
|
|
1575
1575
|
const to = props.to || "green";
|
|
1576
1576
|
const icon = props.icon || /* @__PURE__ */ React__namespace.createElement(icons.IconColorSwatch, { size: 28, stroke: 1.5 });
|
|
@@ -1614,7 +1614,7 @@ var __objRest$1 = (source, exclude) => {
|
|
|
1614
1614
|
}
|
|
1615
1615
|
return target;
|
|
1616
1616
|
};
|
|
1617
|
-
const useStyles$
|
|
1617
|
+
const useStyles$f = core.createStyles((theme) => ({
|
|
1618
1618
|
card: {
|
|
1619
1619
|
height: 240,
|
|
1620
1620
|
backgroundSize: "cover",
|
|
@@ -1653,7 +1653,7 @@ const TenantBanner = (_a) => {
|
|
|
1653
1653
|
"style",
|
|
1654
1654
|
"className"
|
|
1655
1655
|
]);
|
|
1656
|
-
const { classes, cx, theme } = useStyles$
|
|
1656
|
+
const { classes, cx, theme } = useStyles$f();
|
|
1657
1657
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
1658
1658
|
core.Card,
|
|
1659
1659
|
__spreadValues$5({
|
|
@@ -1719,7 +1719,7 @@ const Home = (props) => {
|
|
|
1719
1719
|
)))));
|
|
1720
1720
|
};
|
|
1721
1721
|
|
|
1722
|
-
function Table$
|
|
1722
|
+
function Table$6(props) {
|
|
1723
1723
|
if (props.items.length === 0) {
|
|
1724
1724
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
1725
1725
|
PlaceholderBanner,
|
|
@@ -1735,7 +1735,7 @@ function Table$4(props) {
|
|
|
1735
1735
|
return /* @__PURE__ */ React__namespace.createElement(core.ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React__namespace.createElement(core.Table, { verticalSpacing: "sm", sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React__namespace.createElement("thead", null, /* @__PURE__ */ React__namespace.createElement("tr", null, /* @__PURE__ */ React__namespace.createElement("th", null, "Student Name"), /* @__PURE__ */ React__namespace.createElement("th", null, "Reflection"), /* @__PURE__ */ React__namespace.createElement("th", null, "Rating"))), /* @__PURE__ */ React__namespace.createElement("tbody", null, rows)));
|
|
1736
1736
|
}
|
|
1737
1737
|
|
|
1738
|
-
const useStyles$
|
|
1738
|
+
const useStyles$e = core.createStyles((theme) => ({
|
|
1739
1739
|
button: {
|
|
1740
1740
|
borderTopRightRadius: 0,
|
|
1741
1741
|
borderBottomRightRadius: 0,
|
|
@@ -1749,8 +1749,8 @@ const useStyles$c = core.createStyles((theme) => ({
|
|
|
1749
1749
|
borderLeft: `1px solid ${theme.colorScheme === "dark" ? theme.colors.dark[7] : theme.white}`
|
|
1750
1750
|
}
|
|
1751
1751
|
}));
|
|
1752
|
-
const SplitButton$
|
|
1753
|
-
const { classes, theme } = useStyles$
|
|
1752
|
+
const SplitButton$2 = (props) => {
|
|
1753
|
+
const { classes, theme } = useStyles$e();
|
|
1754
1754
|
const menuIconColor = theme.colors[theme.primaryColor][theme.colorScheme === "dark" ? 5 : 6];
|
|
1755
1755
|
return /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: "sm" }, /* @__PURE__ */ React__namespace.createElement(
|
|
1756
1756
|
core.Button,
|
|
@@ -1788,7 +1788,7 @@ const SplitButton$1 = (props) => {
|
|
|
1788
1788
|
)))));
|
|
1789
1789
|
};
|
|
1790
1790
|
|
|
1791
|
-
function Stack$
|
|
1791
|
+
function Stack$2(props) {
|
|
1792
1792
|
if (props.items.length === 0) {
|
|
1793
1793
|
return null;
|
|
1794
1794
|
}
|
|
@@ -1796,7 +1796,7 @@ function Stack$1(props) {
|
|
|
1796
1796
|
return /* @__PURE__ */ React__namespace.createElement(core.ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React__namespace.createElement(core.UnstyledButton, { component: reactRouterDom.Link, to: props.href }, /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: 24, sx: { padding: 20, minWidth: 700 } }, rows)));
|
|
1797
1797
|
}
|
|
1798
1798
|
|
|
1799
|
-
function Table$
|
|
1799
|
+
function Table$5(props) {
|
|
1800
1800
|
if (props.items.length === 0) {
|
|
1801
1801
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
1802
1802
|
PlaceholderBanner,
|
|
@@ -1829,13 +1829,13 @@ function Table$3(props) {
|
|
|
1829
1829
|
render: (row) => /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, !!row.isComplete && /* @__PURE__ */ React__namespace.createElement(core.Badge, { variant: "filled" }, "Complete"), !row.isComplete && !row.isStarted && /* @__PURE__ */ React__namespace.createElement(core.Badge, { color: "red", variant: "filled" }, "Not started"), !row.isComplete && !!row.isStarted && /* @__PURE__ */ React__namespace.createElement(core.Badge, { color: "violet", variant: "filled" }, "In progress"))
|
|
1830
1830
|
}],
|
|
1831
1831
|
rowExpansion: {
|
|
1832
|
-
content: ({ record }) => /* @__PURE__ */ React__namespace.createElement(Stack$
|
|
1832
|
+
content: ({ record }) => /* @__PURE__ */ React__namespace.createElement(Stack$2, { href: record.href, items: record.answers })
|
|
1833
1833
|
}
|
|
1834
1834
|
}
|
|
1835
1835
|
));
|
|
1836
1836
|
}
|
|
1837
1837
|
|
|
1838
|
-
function Stack(props) {
|
|
1838
|
+
function Stack$1(props) {
|
|
1839
1839
|
const primaryAxis = React__namespace.useMemo(
|
|
1840
1840
|
() => ({
|
|
1841
1841
|
position: "left",
|
|
@@ -1903,7 +1903,7 @@ function Stack(props) {
|
|
|
1903
1903
|
}
|
|
1904
1904
|
const truncateWithEllipses = (text, max) => text.substr(0, max - 1) + (text.length > max ? "…" : "");
|
|
1905
1905
|
|
|
1906
|
-
const useStyles$
|
|
1906
|
+
const useStyles$d = core.createStyles((theme) => ({
|
|
1907
1907
|
title: {
|
|
1908
1908
|
fontSize: 34,
|
|
1909
1909
|
fontWeight: 900,
|
|
@@ -1916,7 +1916,7 @@ const useStyles$b = core.createStyles((theme) => ({
|
|
|
1916
1916
|
}
|
|
1917
1917
|
}));
|
|
1918
1918
|
const Lesson = (props) => {
|
|
1919
|
-
const { classes } = useStyles$
|
|
1919
|
+
const { classes } = useStyles$d();
|
|
1920
1920
|
const [tab, setTab] = React.useState("question");
|
|
1921
1921
|
const numberOfStudents = props.students.length;
|
|
1922
1922
|
const percentageOfLessonsCompleted = numberOfStudents > 0 ? props.students.filter((u) => u.isComplete).length / numberOfStudents : 0;
|
|
@@ -1966,7 +1966,7 @@ const Lesson = (props) => {
|
|
|
1966
1966
|
},
|
|
1967
1967
|
"Back"
|
|
1968
1968
|
)), /* @__PURE__ */ React__namespace.createElement(core.Group, null, /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: 0 }, /* @__PURE__ */ React__namespace.createElement(core.Title, { order: 2, className: classes.title, mt: "md" }, props.displayName || "Lesson"), /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", className: classes.description, mt: "sm" }, props.description || "No description")), /* @__PURE__ */ React__namespace.createElement(core.Stack, { ml: "auto" }, /* @__PURE__ */ React__namespace.createElement(
|
|
1969
|
-
SplitButton$
|
|
1969
|
+
SplitButton$2,
|
|
1970
1970
|
{
|
|
1971
1971
|
href: props.href,
|
|
1972
1972
|
noExport: props.trial,
|
|
@@ -2007,19 +2007,19 @@ const Lesson = (props) => {
|
|
|
2007
2007
|
onChange: setTab
|
|
2008
2008
|
}
|
|
2009
2009
|
), tab === "question" && /* @__PURE__ */ React__namespace.createElement(
|
|
2010
|
-
Stack,
|
|
2010
|
+
Stack$1,
|
|
2011
2011
|
{
|
|
2012
2012
|
loading: props.loading,
|
|
2013
2013
|
items: props.questions
|
|
2014
2014
|
}
|
|
2015
2015
|
), tab === "reflections" && /* @__PURE__ */ React__namespace.createElement(
|
|
2016
|
-
Table$
|
|
2016
|
+
Table$6,
|
|
2017
2017
|
{
|
|
2018
2018
|
loading: props.loading,
|
|
2019
2019
|
items: props.reflections
|
|
2020
2020
|
}
|
|
2021
2021
|
), tab === "students" && /* @__PURE__ */ React__namespace.createElement(
|
|
2022
|
-
Table$
|
|
2022
|
+
Table$5,
|
|
2023
2023
|
{
|
|
2024
2024
|
loading: props.loading,
|
|
2025
2025
|
items: props.students
|
|
@@ -2027,7 +2027,7 @@ const Lesson = (props) => {
|
|
|
2027
2027
|
)))))));
|
|
2028
2028
|
};
|
|
2029
2029
|
|
|
2030
|
-
function Table$
|
|
2030
|
+
function Table$4(props) {
|
|
2031
2031
|
if (props.items.length === 0) {
|
|
2032
2032
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
2033
2033
|
PlaceholderBanner,
|
|
@@ -2059,7 +2059,7 @@ function Table$2(props) {
|
|
|
2059
2059
|
return /* @__PURE__ */ React__namespace.createElement(core.ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React__namespace.createElement(core.Table, { horizontalSpacing: 0, verticalSpacing: 0, sx: { minWidth: 700 } }, /* @__PURE__ */ React__namespace.createElement("tbody", null, rows)));
|
|
2060
2060
|
}
|
|
2061
2061
|
|
|
2062
|
-
const useStyles$
|
|
2062
|
+
const useStyles$c = core.createStyles((theme) => ({
|
|
2063
2063
|
title: {
|
|
2064
2064
|
fontSize: 34,
|
|
2065
2065
|
fontWeight: 900,
|
|
@@ -2072,7 +2072,7 @@ const useStyles$a = core.createStyles((theme) => ({
|
|
|
2072
2072
|
}
|
|
2073
2073
|
}));
|
|
2074
2074
|
const Lessons = (props) => {
|
|
2075
|
-
const { classes } = useStyles$
|
|
2075
|
+
const { classes } = useStyles$c();
|
|
2076
2076
|
return /* @__PURE__ */ React__namespace.createElement(core.Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: "md" }, /* @__PURE__ */ React__namespace.createElement(core.Grid, null, /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { sm: "auto" }, /* @__PURE__ */ React__namespace.createElement(core.Badge, { variant: "filled", size: "lg" }, "Lessons"), /* @__PURE__ */ React__namespace.createElement(core.Title, { order: 2, className: classes.title, mt: "md" }, "Lessons"), /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", className: classes.description, mt: "sm" }, "Explore units of instruction and/or see corresponding class progress."))), /* @__PURE__ */ React__namespace.createElement(
|
|
2077
2077
|
core.Autocomplete,
|
|
2078
2078
|
{
|
|
@@ -2081,7 +2081,7 @@ const Lessons = (props) => {
|
|
|
2081
2081
|
onChange: props.onAutocompleteChange
|
|
2082
2082
|
}
|
|
2083
2083
|
), /* @__PURE__ */ React__namespace.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React__namespace.createElement(core.LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React__namespace.createElement(
|
|
2084
|
-
Table$
|
|
2084
|
+
Table$4,
|
|
2085
2085
|
{
|
|
2086
2086
|
loading: props.loading,
|
|
2087
2087
|
items: props.lessons
|
|
@@ -2089,7 +2089,7 @@ const Lessons = (props) => {
|
|
|
2089
2089
|
))));
|
|
2090
2090
|
};
|
|
2091
2091
|
|
|
2092
|
-
const useStyles$
|
|
2092
|
+
const useStyles$b = core.createStyles((theme) => ({
|
|
2093
2093
|
title: {
|
|
2094
2094
|
fontSize: 22,
|
|
2095
2095
|
fontWeight: 900,
|
|
@@ -2108,7 +2108,7 @@ const useStyles$9 = core.createStyles((theme) => ({
|
|
|
2108
2108
|
}
|
|
2109
2109
|
}));
|
|
2110
2110
|
function AccessCode(props) {
|
|
2111
|
-
const { classes } = useStyles$
|
|
2111
|
+
const { classes } = useStyles$b();
|
|
2112
2112
|
return /* @__PURE__ */ React__namespace.createElement(core.Container, { mx: "0", px: "0", size: 460, my: 30 }, /* @__PURE__ */ React__namespace.createElement(core.Title, { className: classes.title }, "Access code"), /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", size: "sm" }, "Grant access to join your organization"), /* @__PURE__ */ React__namespace.createElement(core.Paper, { withBorder: true, shadow: "md", p: 30, radius: "md", mt: "xl" }, /* @__PURE__ */ React__namespace.createElement(core.TextInput, { value: props.value, readOnly: true }), /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "apart", mt: "lg", className: classes.controls }, /* @__PURE__ */ React__namespace.createElement(
|
|
2113
2113
|
core.Anchor,
|
|
2114
2114
|
{
|
|
@@ -2136,7 +2136,7 @@ const monthNames = [
|
|
|
2136
2136
|
"November",
|
|
2137
2137
|
"December"
|
|
2138
2138
|
];
|
|
2139
|
-
const useStyles$
|
|
2139
|
+
const useStyles$a = core.createStyles((theme) => ({
|
|
2140
2140
|
title: {
|
|
2141
2141
|
fontSize: 34,
|
|
2142
2142
|
fontWeight: 900,
|
|
@@ -2166,7 +2166,7 @@ const useStyles$8 = core.createStyles((theme) => ({
|
|
|
2166
2166
|
}
|
|
2167
2167
|
}));
|
|
2168
2168
|
const Organization = (props) => {
|
|
2169
|
-
const { classes } = useStyles$
|
|
2169
|
+
const { classes } = useStyles$a();
|
|
2170
2170
|
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(core.Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: "md" }, /* @__PURE__ */ React__namespace.createElement(core.Grid, null, /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { sm: "auto" }, /* @__PURE__ */ React__namespace.createElement(core.UnstyledButton, { onClick: props.onBackClick }, /* @__PURE__ */ React__namespace.createElement(
|
|
2171
2171
|
core.Badge,
|
|
2172
2172
|
{
|
|
@@ -2192,7 +2192,7 @@ const Organization = (props) => {
|
|
|
2192
2192
|
] }))))));
|
|
2193
2193
|
};
|
|
2194
2194
|
|
|
2195
|
-
const useStyles$
|
|
2195
|
+
const useStyles$9 = core.createStyles((theme) => ({
|
|
2196
2196
|
button: {
|
|
2197
2197
|
borderTopRightRadius: 0,
|
|
2198
2198
|
borderBottomRightRadius: 0,
|
|
@@ -2206,8 +2206,8 @@ const useStyles$7 = core.createStyles((theme) => ({
|
|
|
2206
2206
|
borderLeft: `1px solid ${theme.colorScheme === "dark" ? theme.colors.dark[7] : theme.white}`
|
|
2207
2207
|
}
|
|
2208
2208
|
}));
|
|
2209
|
-
const SplitButton = (props) => {
|
|
2210
|
-
const { classes, theme } = useStyles$
|
|
2209
|
+
const SplitButton$1 = (props) => {
|
|
2210
|
+
const { classes, theme } = useStyles$9();
|
|
2211
2211
|
const menuIconColor = theme.colors[theme.primaryColor][theme.colorScheme === "dark" ? 5 : 6];
|
|
2212
2212
|
const hasMenu = !!props.withOrganizationLink;
|
|
2213
2213
|
return /* @__PURE__ */ React__namespace.createElement(core.Group, { noWrap: true, spacing: 0 }, /* @__PURE__ */ React__namespace.createElement(
|
|
@@ -2237,7 +2237,7 @@ const SplitButton = (props) => {
|
|
|
2237
2237
|
))));
|
|
2238
2238
|
};
|
|
2239
2239
|
|
|
2240
|
-
function Table$
|
|
2240
|
+
function Table$3(props) {
|
|
2241
2241
|
if (props.items.length === 0) {
|
|
2242
2242
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
2243
2243
|
PlaceholderBanner,
|
|
@@ -2288,7 +2288,7 @@ var __spreadValues$4 = (a, b) => {
|
|
|
2288
2288
|
return a;
|
|
2289
2289
|
};
|
|
2290
2290
|
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
2291
|
-
const useStyles$
|
|
2291
|
+
const useStyles$8 = core.createStyles((theme) => ({
|
|
2292
2292
|
title: {
|
|
2293
2293
|
fontSize: 34,
|
|
2294
2294
|
fontWeight: 900,
|
|
@@ -2318,7 +2318,7 @@ const useStyles$6 = core.createStyles((theme) => ({
|
|
|
2318
2318
|
}
|
|
2319
2319
|
}));
|
|
2320
2320
|
const People = (props) => {
|
|
2321
|
-
const { classes } = useStyles$
|
|
2321
|
+
const { classes } = useStyles$8();
|
|
2322
2322
|
const form$1 = form.useForm({
|
|
2323
2323
|
initialValues: {
|
|
2324
2324
|
userId: "",
|
|
@@ -2383,7 +2383,7 @@ const People = (props) => {
|
|
|
2383
2383
|
},
|
|
2384
2384
|
"Back"
|
|
2385
2385
|
)), /* @__PURE__ */ React__namespace.createElement(core.Title, { order: 2, className: classes.title, mt: "md" }, "People"), /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", className: classes.description, mt: "sm" }, "Manage members of your organization")), /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { sm: "content" }, !props.loading && /* @__PURE__ */ React__namespace.createElement(
|
|
2386
|
-
SplitButton,
|
|
2386
|
+
SplitButton$1,
|
|
2387
2387
|
{
|
|
2388
2388
|
withOrganizationLink: props.withOrganizationLink,
|
|
2389
2389
|
onAddUsersClick: () => setOpened(true),
|
|
@@ -2412,7 +2412,7 @@ const People = (props) => {
|
|
|
2412
2412
|
onChange: props.onAutocompleteChange
|
|
2413
2413
|
}
|
|
2414
2414
|
), /* @__PURE__ */ React__namespace.createElement(
|
|
2415
|
-
Table$
|
|
2415
|
+
Table$3,
|
|
2416
2416
|
{
|
|
2417
2417
|
loading: props.loading,
|
|
2418
2418
|
items: props.users,
|
|
@@ -2422,7 +2422,7 @@ const People = (props) => {
|
|
|
2422
2422
|
))))));
|
|
2423
2423
|
};
|
|
2424
2424
|
const DropzoneButton = (props) => {
|
|
2425
|
-
const { classes, theme } = useStyles$
|
|
2425
|
+
const { classes, theme } = useStyles$8();
|
|
2426
2426
|
const openRef = React__namespace.useRef(null);
|
|
2427
2427
|
const [loading, setLoading] = React__namespace.useState(false);
|
|
2428
2428
|
const onDrop = React__namespace.useCallback((acceptedFiles) => {
|
|
@@ -2468,7 +2468,7 @@ const DropzoneButton = (props) => {
|
|
|
2468
2468
|
} }, "Select file"));
|
|
2469
2469
|
};
|
|
2470
2470
|
|
|
2471
|
-
const useStyles$
|
|
2471
|
+
const useStyles$7 = core.createStyles((theme) => ({
|
|
2472
2472
|
form: {
|
|
2473
2473
|
backgroundColor: theme.white,
|
|
2474
2474
|
padding: theme.spacing.xl,
|
|
@@ -2531,7 +2531,7 @@ const useStyles$5 = core.createStyles((theme) => ({
|
|
|
2531
2531
|
}
|
|
2532
2532
|
}));
|
|
2533
2533
|
const StartAnonymousLesson = (props) => {
|
|
2534
|
-
const { classes } = useStyles$
|
|
2534
|
+
const { classes } = useStyles$7();
|
|
2535
2535
|
const [name, setName] = React__namespace.useState("");
|
|
2536
2536
|
return /* @__PURE__ */ React__namespace.createElement("div", { className: classes.wrapper }, /* @__PURE__ */ React__namespace.createElement(core.Container, null, /* @__PURE__ */ React__namespace.createElement(core.SimpleGrid, { maw: 960, cols: 2, spacing: 15, breakpoints: [{ maxWidth: "sm", cols: 1 }] }, /* @__PURE__ */ React__namespace.createElement("div", { className: classes.content }, /* @__PURE__ */ React__namespace.createElement(core.Badge, { color: "violet" }, "Community"), /* @__PURE__ */ React__namespace.createElement(core.Title, { className: classes.title }, props.title), /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", mt: "md" }, props.description), /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", mt: "md" }, "You are now part of ", `${props.educatorName}'s`, " Class")), /* @__PURE__ */ React__namespace.createElement("div", { className: classes.form }, /* @__PURE__ */ React__namespace.createElement(
|
|
2537
2537
|
core.TextInput,
|
|
@@ -2588,7 +2588,7 @@ function TaskCard(props) {
|
|
|
2588
2588
|
));
|
|
2589
2589
|
}
|
|
2590
2590
|
|
|
2591
|
-
const useStyles$
|
|
2591
|
+
const useStyles$6 = core.createStyles((theme) => ({
|
|
2592
2592
|
action: {
|
|
2593
2593
|
backgroundColor: "inherit",
|
|
2594
2594
|
":hover": {
|
|
@@ -2607,7 +2607,7 @@ const useStyles$4 = core.createStyles((theme) => ({
|
|
|
2607
2607
|
}
|
|
2608
2608
|
}));
|
|
2609
2609
|
const TrialHome = (props) => {
|
|
2610
|
-
const { classes } = useStyles$
|
|
2610
|
+
const { classes } = useStyles$6();
|
|
2611
2611
|
return /* @__PURE__ */ React__namespace.createElement(core.Container, { size: "lg" }, /* @__PURE__ */ React__namespace.createElement(core.Badge, null, props.daysRemaining, " day", props.daysRemaining !== 1 ? "s" : "", " left"), /* @__PURE__ */ React__namespace.createElement(
|
|
2612
2612
|
core.Button,
|
|
2613
2613
|
{
|
|
@@ -2667,7 +2667,7 @@ var __objRest = (source, exclude) => {
|
|
|
2667
2667
|
}
|
|
2668
2668
|
return target;
|
|
2669
2669
|
};
|
|
2670
|
-
const useStyles$
|
|
2670
|
+
const useStyles$5 = core.createStyles((theme, { checked }) => ({
|
|
2671
2671
|
button: {
|
|
2672
2672
|
display: "flex",
|
|
2673
2673
|
alignItems: "center",
|
|
@@ -2709,7 +2709,7 @@ function ImageCheckbox(_a) {
|
|
|
2709
2709
|
finalValue: false,
|
|
2710
2710
|
onChange
|
|
2711
2711
|
});
|
|
2712
|
-
const { classes, cx } = useStyles$
|
|
2712
|
+
const { classes, cx } = useStyles$5({ checked: value });
|
|
2713
2713
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
2714
2714
|
core.UnstyledButton,
|
|
2715
2715
|
__spreadProps$2(__spreadValues$2({}, others), {
|
|
@@ -2770,7 +2770,7 @@ var __spreadValues$1 = (a, b) => {
|
|
|
2770
2770
|
return a;
|
|
2771
2771
|
};
|
|
2772
2772
|
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
2773
|
-
const useStyles$
|
|
2773
|
+
const useStyles$4 = core.createStyles((theme) => ({
|
|
2774
2774
|
wrapper: {
|
|
2775
2775
|
minHeight: "100%",
|
|
2776
2776
|
boxSizing: "border-box",
|
|
@@ -2833,7 +2833,7 @@ const OPTIONS = [
|
|
|
2833
2833
|
{ description: "project-based learning", title: "Project-Based Learning", icon: icons.IconTools }
|
|
2834
2834
|
];
|
|
2835
2835
|
const TrialRegistration = (props) => {
|
|
2836
|
-
const { classes } = useStyles$
|
|
2836
|
+
const { classes } = useStyles$4();
|
|
2837
2837
|
const [firstName, setFirstName] = React__namespace.useState("");
|
|
2838
2838
|
const [lastName, setLastName] = React__namespace.useState("");
|
|
2839
2839
|
const [organization, setOrganization] = React__namespace.useState({ organizationId: "", displayName: "" });
|
|
@@ -2948,7 +2948,7 @@ var __spreadValues = (a, b) => {
|
|
|
2948
2948
|
return a;
|
|
2949
2949
|
};
|
|
2950
2950
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
2951
|
-
const useStyles$
|
|
2951
|
+
const useStyles$3 = core.createStyles((theme, props) => ({
|
|
2952
2952
|
footer: {
|
|
2953
2953
|
paddingTop: theme.spacing.md,
|
|
2954
2954
|
paddingBottom: theme.spacing.md,
|
|
@@ -3035,7 +3035,7 @@ const useStyles$1 = core.createStyles((theme, props) => ({
|
|
|
3035
3035
|
}
|
|
3036
3036
|
}));
|
|
3037
3037
|
const App = (props) => {
|
|
3038
|
-
const { classes } = useStyles$
|
|
3038
|
+
const { classes } = useStyles$3(props);
|
|
3039
3039
|
const account = useAccount(props.account, props.accounts, props.onAccountChange);
|
|
3040
3040
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
3041
3041
|
core.AppShell,
|
|
@@ -3130,7 +3130,7 @@ const useAccount = (account, accounts, onAccountChange) => {
|
|
|
3130
3130
|
};
|
|
3131
3131
|
};
|
|
3132
3132
|
|
|
3133
|
-
function Table(props) {
|
|
3133
|
+
function Table$2(props) {
|
|
3134
3134
|
if (props.items.length === 0) {
|
|
3135
3135
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
3136
3136
|
PlaceholderBanner,
|
|
@@ -3162,7 +3162,7 @@ function Table(props) {
|
|
|
3162
3162
|
return /* @__PURE__ */ React__namespace.createElement(core.ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React__namespace.createElement(core.Table, { horizontalSpacing: 0, verticalSpacing: 0, sx: { minWidth: 700 } }, /* @__PURE__ */ React__namespace.createElement("tbody", null, rows)));
|
|
3163
3163
|
}
|
|
3164
3164
|
|
|
3165
|
-
const useStyles = core.createStyles((theme) => ({
|
|
3165
|
+
const useStyles$2 = core.createStyles((theme) => ({
|
|
3166
3166
|
title: {
|
|
3167
3167
|
fontSize: 34,
|
|
3168
3168
|
fontWeight: 900,
|
|
@@ -3175,9 +3175,9 @@ const useStyles = core.createStyles((theme) => ({
|
|
|
3175
3175
|
}
|
|
3176
3176
|
}));
|
|
3177
3177
|
const Pathways = (props) => {
|
|
3178
|
-
const { classes } = useStyles();
|
|
3178
|
+
const { classes } = useStyles$2();
|
|
3179
3179
|
return /* @__PURE__ */ React__namespace.createElement(core.Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: "md" }, /* @__PURE__ */ React__namespace.createElement(core.Grid, null, /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { sm: "auto" }, /* @__PURE__ */ React__namespace.createElement(core.Badge, { variant: "filled", size: "lg" }, "Pathways"), /* @__PURE__ */ React__namespace.createElement(core.Title, { order: 2, className: classes.title, mt: "md" }, "Pathways"), /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", className: classes.description, mt: "sm" }, "Curated learning experiences for skill-building"))), /* @__PURE__ */ React__namespace.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React__namespace.createElement(core.LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React__namespace.createElement(
|
|
3180
|
-
Table,
|
|
3180
|
+
Table$2,
|
|
3181
3181
|
{
|
|
3182
3182
|
loading: props.loading,
|
|
3183
3183
|
items: props.pathways
|
|
@@ -3185,6 +3185,202 @@ const Pathways = (props) => {
|
|
|
3185
3185
|
))));
|
|
3186
3186
|
};
|
|
3187
3187
|
|
|
3188
|
+
const useStyles$1 = core.createStyles((theme) => ({
|
|
3189
|
+
button: {
|
|
3190
|
+
borderTopRightRadius: 0,
|
|
3191
|
+
borderBottomRightRadius: 0,
|
|
3192
|
+
marginLeft: 0,
|
|
3193
|
+
marginRight: 0
|
|
3194
|
+
},
|
|
3195
|
+
menuControl: {
|
|
3196
|
+
borderTopLeftRadius: 0,
|
|
3197
|
+
borderBottomLeftRadius: 0,
|
|
3198
|
+
border: 0,
|
|
3199
|
+
borderLeft: `1px solid ${theme.colorScheme === "dark" ? theme.colors.dark[7] : theme.white}`
|
|
3200
|
+
}
|
|
3201
|
+
}));
|
|
3202
|
+
const SplitButton = (props) => {
|
|
3203
|
+
const { classes, theme } = useStyles$1();
|
|
3204
|
+
const menuIconColor = theme.colors[theme.primaryColor][theme.colorScheme === "dark" ? 5 : 6];
|
|
3205
|
+
return /* @__PURE__ */ React__namespace.createElement(core.Group, { noWrap: true, spacing: 0 }, /* @__PURE__ */ React__namespace.createElement(
|
|
3206
|
+
core.Button,
|
|
3207
|
+
{
|
|
3208
|
+
component: reactRouterDom.Link,
|
|
3209
|
+
to: props.href,
|
|
3210
|
+
className: classes.button,
|
|
3211
|
+
variant: "gradient"
|
|
3212
|
+
},
|
|
3213
|
+
"Preview"
|
|
3214
|
+
), /* @__PURE__ */ React__namespace.createElement(core.Menu, { transition: "pop", position: "bottom-end" }, /* @__PURE__ */ React__namespace.createElement(core.Menu.Target, null, /* @__PURE__ */ React__namespace.createElement(
|
|
3215
|
+
core.ActionIcon,
|
|
3216
|
+
{
|
|
3217
|
+
variant: "gradient",
|
|
3218
|
+
color: theme.primaryColor,
|
|
3219
|
+
size: 36,
|
|
3220
|
+
className: classes.menuControl
|
|
3221
|
+
},
|
|
3222
|
+
/* @__PURE__ */ React__namespace.createElement(icons.IconChevronDown, { size: 16, stroke: 1.5 })
|
|
3223
|
+
)), /* @__PURE__ */ React__namespace.createElement(core.Menu.Dropdown, null, /* @__PURE__ */ React__namespace.createElement(
|
|
3224
|
+
core.Menu.Item,
|
|
3225
|
+
{
|
|
3226
|
+
icon: /* @__PURE__ */ React__namespace.createElement(icons.IconClipboardCopy, { size: 16, stroke: 1.5, color: menuIconColor }),
|
|
3227
|
+
onClick: props.onCopyLinkClick
|
|
3228
|
+
},
|
|
3229
|
+
"Copy link"
|
|
3230
|
+
), /* @__PURE__ */ React__namespace.createElement(
|
|
3231
|
+
core.Menu.Item,
|
|
3232
|
+
{
|
|
3233
|
+
icon: /* @__PURE__ */ React__namespace.createElement(icons.IconTableExport, { size: 16, stroke: 1.5, color: menuIconColor }),
|
|
3234
|
+
onClick: props.onExportDataClick
|
|
3235
|
+
},
|
|
3236
|
+
"Export data (.csv)"
|
|
3237
|
+
))));
|
|
3238
|
+
};
|
|
3239
|
+
|
|
3240
|
+
function Stack(props) {
|
|
3241
|
+
if (props.items.length === 0) {
|
|
3242
|
+
return null;
|
|
3243
|
+
}
|
|
3244
|
+
const rows = props.items.map((row) => /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span: 6 }, /* @__PURE__ */ React__namespace.createElement(core.Text, { component: reactRouterDom.Link, to: row.href, color: "dark.4", weight: "bold", size: "md" }, row.lessonName)), /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span: 6 }, row.completion >= 1 && /* @__PURE__ */ React__namespace.createElement(core.Badge, { variant: "filled" }, "Complete"), row.completion === 0 && !row.isStarted && /* @__PURE__ */ React__namespace.createElement(core.Badge, { color: "red", variant: "filled" }, "Not started"), row.completion > 0 && row.completion < 1 && /* @__PURE__ */ React__namespace.createElement(core.Badge, { color: "violet", variant: "filled" }, Math.round((row.completion + Number.EPSILON) * 100), "% Complete"))));
|
|
3245
|
+
return /* @__PURE__ */ React__namespace.createElement(core.Grid, { grow: true, gutter: "lg", sx: { padding: 20, minWidth: 700 } }, rows);
|
|
3246
|
+
}
|
|
3247
|
+
|
|
3248
|
+
function Table$1(props) {
|
|
3249
|
+
if (props.items.length === 0) {
|
|
3250
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
3251
|
+
PlaceholderBanner,
|
|
3252
|
+
{
|
|
3253
|
+
title: "No badges to display",
|
|
3254
|
+
description: "There has not been any badge progress just yet.",
|
|
3255
|
+
loading: props.loading,
|
|
3256
|
+
icon: "badges"
|
|
3257
|
+
}
|
|
3258
|
+
);
|
|
3259
|
+
}
|
|
3260
|
+
return /* @__PURE__ */ React__namespace.createElement(core.ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React__namespace.createElement(
|
|
3261
|
+
mantineDatatable.DataTable,
|
|
3262
|
+
{
|
|
3263
|
+
verticalSpacing: "sm",
|
|
3264
|
+
sx: { minWidth: 700 },
|
|
3265
|
+
withBorder: false,
|
|
3266
|
+
borderRadius: "sm",
|
|
3267
|
+
withColumnBorders: true,
|
|
3268
|
+
striped: true,
|
|
3269
|
+
highlightOnHover: true,
|
|
3270
|
+
records: props.items,
|
|
3271
|
+
idAccessor: "userId",
|
|
3272
|
+
columns: [{
|
|
3273
|
+
accessor: "name",
|
|
3274
|
+
title: "Student Name",
|
|
3275
|
+
render: (row) => /* @__PURE__ */ React__namespace.createElement(core.Group, { spacing: "sm" }, /* @__PURE__ */ React__namespace.createElement(core.Avatar, { size: 40, src: row.avatar, radius: 40 }), /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "sm", weight: 500 }, row.name), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "xs", color: "dimmed" }, row.email)))
|
|
3276
|
+
}, {
|
|
3277
|
+
accessor: "status",
|
|
3278
|
+
render: (row) => /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, !!row.isComplete && /* @__PURE__ */ React__namespace.createElement(core.Badge, { variant: "filled" }, "Complete"), !row.isComplete && /* @__PURE__ */ React__namespace.createElement(core.Badge, { color: "red", variant: "filled" }, "Incomplete"))
|
|
3279
|
+
}],
|
|
3280
|
+
rowExpansion: {
|
|
3281
|
+
content: ({ record }) => /* @__PURE__ */ React__namespace.createElement(Stack, { items: record.lessons })
|
|
3282
|
+
}
|
|
3283
|
+
}
|
|
3284
|
+
));
|
|
3285
|
+
}
|
|
3286
|
+
|
|
3287
|
+
function Table(props) {
|
|
3288
|
+
if (props.items.length === 0) {
|
|
3289
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
3290
|
+
PlaceholderBanner,
|
|
3291
|
+
{
|
|
3292
|
+
title: "No badges to display",
|
|
3293
|
+
description: "There are no badges in this pathway.",
|
|
3294
|
+
loading: props.loading,
|
|
3295
|
+
icon: "badges"
|
|
3296
|
+
}
|
|
3297
|
+
);
|
|
3298
|
+
}
|
|
3299
|
+
const rows = props.items.map((row) => {
|
|
3300
|
+
const percentageCompletion = Math.round((row.percentageCompletion + Number.EPSILON) * 100);
|
|
3301
|
+
return /* @__PURE__ */ React__namespace.createElement("tr", { key: row.lessonName }, /* @__PURE__ */ React__namespace.createElement("td", null, /* @__PURE__ */ React__namespace.createElement(core.Text, { component: reactRouterDom.Link, to: row.href }, row.lessonName)), /* @__PURE__ */ React__namespace.createElement("td", null, percentageCompletion, "%"));
|
|
3302
|
+
});
|
|
3303
|
+
return /* @__PURE__ */ React__namespace.createElement(core.ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React__namespace.createElement(core.Table, { verticalSpacing: "sm", sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React__namespace.createElement("thead", null, /* @__PURE__ */ React__namespace.createElement("tr", null, /* @__PURE__ */ React__namespace.createElement("th", null, "Badge Name"), /* @__PURE__ */ React__namespace.createElement("th", null, "Badge Completion"))), /* @__PURE__ */ React__namespace.createElement("tbody", null, rows)));
|
|
3304
|
+
}
|
|
3305
|
+
|
|
3306
|
+
const useStyles = core.createStyles((theme) => ({
|
|
3307
|
+
title: {
|
|
3308
|
+
fontSize: 34,
|
|
3309
|
+
fontWeight: 900,
|
|
3310
|
+
[theme.fn.smallerThan("sm")]: {
|
|
3311
|
+
fontSize: 24
|
|
3312
|
+
}
|
|
3313
|
+
},
|
|
3314
|
+
description: {
|
|
3315
|
+
maxWidth: 600
|
|
3316
|
+
}
|
|
3317
|
+
}));
|
|
3318
|
+
const Pathway = (props) => {
|
|
3319
|
+
const { classes } = useStyles();
|
|
3320
|
+
const [tab, setTab] = React.useState("lessons");
|
|
3321
|
+
const numberOfStudents = props.students.length;
|
|
3322
|
+
const percentageOfBadgesEarned = numberOfStudents > 0 ? props.students.filter((u) => u.isComplete).length / numberOfStudents : 0;
|
|
3323
|
+
return /* @__PURE__ */ React__namespace.createElement(core.Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: "md" }, /* @__PURE__ */ React__namespace.createElement(core.Grid, null, /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { sm: "auto" }, /* @__PURE__ */ React__namespace.createElement(core.UnstyledButton, { onClick: props.onBackClick }, /* @__PURE__ */ React__namespace.createElement(
|
|
3324
|
+
core.Badge,
|
|
3325
|
+
{
|
|
3326
|
+
variant: "filled",
|
|
3327
|
+
leftSection: /* @__PURE__ */ React__namespace.createElement(core.ActionIcon, { color: "blue", size: "xs", radius: "xl", variant: "filled" }, /* @__PURE__ */ React__namespace.createElement(icons.IconArrowLeft, { size: 14 })),
|
|
3328
|
+
size: "lg"
|
|
3329
|
+
},
|
|
3330
|
+
"Back"
|
|
3331
|
+
)), /* @__PURE__ */ React__namespace.createElement(core.Group, null, /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: 0 }, /* @__PURE__ */ React__namespace.createElement(core.Title, { order: 2, className: classes.title, mt: "md" }, props.displayName || "Badge"), /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", className: classes.description, mt: "sm" }, props.description || "No description")), !props.trial && /* @__PURE__ */ React__namespace.createElement(core.Stack, { ml: "auto" }, /* @__PURE__ */ React__namespace.createElement(
|
|
3332
|
+
SplitButton,
|
|
3333
|
+
{
|
|
3334
|
+
href: props.href,
|
|
3335
|
+
onCopyLinkClick: props.onCopyLinkClick,
|
|
3336
|
+
onExportDataClick: props.onExportDataClick
|
|
3337
|
+
}
|
|
3338
|
+
))))), /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React__namespace.createElement(core.LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React__namespace.createElement(core.Stack, null, /* @__PURE__ */ React__namespace.createElement(StatsGroup, { data: [
|
|
3339
|
+
{
|
|
3340
|
+
title: props.trial ? "BADGES SUBMITTED" : "PATHWAY COMPLETION",
|
|
3341
|
+
value: props.trial ? props.lessonsCompleted || 0 : percentageOfBadgesEarned,
|
|
3342
|
+
unit: props.trial ? "" : "%"
|
|
3343
|
+
}
|
|
3344
|
+
] }), !props.trial && /* @__PURE__ */ React__namespace.createElement(
|
|
3345
|
+
core.Select,
|
|
3346
|
+
{
|
|
3347
|
+
clearable: true,
|
|
3348
|
+
clearButtonLabel: "Clear class selection",
|
|
3349
|
+
size: "sm",
|
|
3350
|
+
placeholder: "Select a class",
|
|
3351
|
+
nothingFound: "No options",
|
|
3352
|
+
value: props.classId,
|
|
3353
|
+
onChange: props.onClassChange,
|
|
3354
|
+
icon: /* @__PURE__ */ React__namespace.createElement(icons.IconCategory2, null),
|
|
3355
|
+
data: props.classes.map((g) => {
|
|
3356
|
+
return { value: g.classId, label: g.name };
|
|
3357
|
+
})
|
|
3358
|
+
}
|
|
3359
|
+
), /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: 0 }, !props.trial && /* @__PURE__ */ React__namespace.createElement(
|
|
3360
|
+
Tabs,
|
|
3361
|
+
{
|
|
3362
|
+
value: tab,
|
|
3363
|
+
data: [
|
|
3364
|
+
{ label: "By Badge", value: "lessons" },
|
|
3365
|
+
{ label: "By student", value: "students" }
|
|
3366
|
+
],
|
|
3367
|
+
onChange: setTab
|
|
3368
|
+
}
|
|
3369
|
+
), (!!props.trial || tab === "lessons") && /* @__PURE__ */ React__namespace.createElement(
|
|
3370
|
+
Table,
|
|
3371
|
+
{
|
|
3372
|
+
loading: props.loading,
|
|
3373
|
+
items: props.lessons
|
|
3374
|
+
}
|
|
3375
|
+
), !props.trial && tab === "students" && /* @__PURE__ */ React__namespace.createElement(
|
|
3376
|
+
Table$1,
|
|
3377
|
+
{
|
|
3378
|
+
loading: props.loading,
|
|
3379
|
+
items: props.students
|
|
3380
|
+
}
|
|
3381
|
+
)))))));
|
|
3382
|
+
};
|
|
3383
|
+
|
|
3188
3384
|
Object.defineProperty(exports, 'showNotification', {
|
|
3189
3385
|
enumerable: true,
|
|
3190
3386
|
get: function () { return notifications.showNotification; }
|
|
@@ -3206,6 +3402,7 @@ exports.Lesson = Lesson;
|
|
|
3206
3402
|
exports.Lessons = Lessons;
|
|
3207
3403
|
exports.Navbar = Navbar;
|
|
3208
3404
|
exports.Organization = Organization;
|
|
3405
|
+
exports.Pathway = Pathway;
|
|
3209
3406
|
exports.Pathways = Pathways;
|
|
3210
3407
|
exports.People = People;
|
|
3211
3408
|
exports.StartAnonymousLesson = StartAnonymousLesson;
|