@local-civics/mgmt-ui 0.1.192 → 0.1.194
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 +1 -0
- package/dist/index.js +270 -223
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +271 -224
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -34,35 +34,35 @@ function _interopNamespaceDefault(e) {
|
|
|
34
34
|
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
35
35
|
var papa__namespace = /*#__PURE__*/_interopNamespaceDefault(papa);
|
|
36
36
|
|
|
37
|
-
var __defProp$
|
|
38
|
-
var __getOwnPropSymbols$
|
|
39
|
-
var __hasOwnProp$
|
|
40
|
-
var __propIsEnum$
|
|
41
|
-
var __defNormalProp$
|
|
42
|
-
var __spreadValues$
|
|
37
|
+
var __defProp$e = Object.defineProperty;
|
|
38
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
39
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
40
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
41
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
42
|
+
var __spreadValues$e = (a, b) => {
|
|
43
43
|
for (var prop in b || (b = {}))
|
|
44
|
-
if (__hasOwnProp$
|
|
45
|
-
__defNormalProp$
|
|
46
|
-
if (__getOwnPropSymbols$
|
|
47
|
-
for (var prop of __getOwnPropSymbols$
|
|
48
|
-
if (__propIsEnum$
|
|
49
|
-
__defNormalProp$
|
|
44
|
+
if (__hasOwnProp$e.call(b, prop))
|
|
45
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
46
|
+
if (__getOwnPropSymbols$e)
|
|
47
|
+
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
48
|
+
if (__propIsEnum$e.call(b, prop))
|
|
49
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
50
50
|
}
|
|
51
51
|
return a;
|
|
52
52
|
};
|
|
53
53
|
var __objRest$2 = (source, exclude) => {
|
|
54
54
|
var target = {};
|
|
55
55
|
for (var prop in source)
|
|
56
|
-
if (__hasOwnProp$
|
|
56
|
+
if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
57
57
|
target[prop] = source[prop];
|
|
58
|
-
if (source != null && __getOwnPropSymbols$
|
|
59
|
-
for (var prop of __getOwnPropSymbols$
|
|
60
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
58
|
+
if (source != null && __getOwnPropSymbols$e)
|
|
59
|
+
for (var prop of __getOwnPropSymbols$e(source)) {
|
|
60
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
|
|
61
61
|
target[prop] = source[prop];
|
|
62
62
|
}
|
|
63
63
|
return target;
|
|
64
64
|
};
|
|
65
|
-
const useStyles$
|
|
65
|
+
const useStyles$w = core.createStyles((theme) => ({
|
|
66
66
|
user: {
|
|
67
67
|
display: "block",
|
|
68
68
|
width: "100%",
|
|
@@ -73,8 +73,8 @@ const useStyles$y = 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$
|
|
77
|
-
return /* @__PURE__ */ React__namespace.createElement(core.Group, __spreadValues$
|
|
76
|
+
const { classes } = useStyles$w();
|
|
77
|
+
return /* @__PURE__ */ React__namespace.createElement(core.Group, __spreadValues$e({ 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
|
|
|
80
80
|
const compact = (num) => {
|
|
@@ -84,7 +84,7 @@ const compact = (num) => {
|
|
|
84
84
|
}).format(num || 0);
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
-
const useStyles$
|
|
87
|
+
const useStyles$v = core.createStyles((theme, _params, getRef) => {
|
|
88
88
|
const icon = getRef("icon");
|
|
89
89
|
return {
|
|
90
90
|
control: {
|
|
@@ -137,7 +137,7 @@ const useStyles$x = 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$v();
|
|
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);
|
|
@@ -182,26 +182,26 @@ function LinksGroup({ icon: Icon, href, label, initiallyOpened, links, active, n
|
|
|
182
182
|
), hasLinks ? /* @__PURE__ */ React__namespace.createElement(core.Collapse, { in: opened }, items) : null);
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
var __defProp$
|
|
186
|
-
var __defProps$
|
|
187
|
-
var __getOwnPropDescs$
|
|
188
|
-
var __getOwnPropSymbols$
|
|
189
|
-
var __hasOwnProp$
|
|
190
|
-
var __propIsEnum$
|
|
191
|
-
var __defNormalProp$
|
|
192
|
-
var __spreadValues$
|
|
185
|
+
var __defProp$d = Object.defineProperty;
|
|
186
|
+
var __defProps$a = Object.defineProperties;
|
|
187
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
188
|
+
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
189
|
+
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
190
|
+
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
191
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
192
|
+
var __spreadValues$d = (a, b) => {
|
|
193
193
|
for (var prop in b || (b = {}))
|
|
194
|
-
if (__hasOwnProp$
|
|
195
|
-
__defNormalProp$
|
|
196
|
-
if (__getOwnPropSymbols$
|
|
197
|
-
for (var prop of __getOwnPropSymbols$
|
|
198
|
-
if (__propIsEnum$
|
|
199
|
-
__defNormalProp$
|
|
194
|
+
if (__hasOwnProp$d.call(b, prop))
|
|
195
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
196
|
+
if (__getOwnPropSymbols$d)
|
|
197
|
+
for (var prop of __getOwnPropSymbols$d(b)) {
|
|
198
|
+
if (__propIsEnum$d.call(b, prop))
|
|
199
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
200
200
|
}
|
|
201
201
|
return a;
|
|
202
202
|
};
|
|
203
|
-
var __spreadProps$
|
|
204
|
-
const useStyles$
|
|
203
|
+
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
204
|
+
const useStyles$u = core.createStyles((theme, _params, getRef) => {
|
|
205
205
|
const icon = getRef("icon");
|
|
206
206
|
return {
|
|
207
207
|
navbar: {
|
|
@@ -232,7 +232,7 @@ const useStyles$w = core.createStyles((theme, _params, getRef) => {
|
|
|
232
232
|
color: theme.colorScheme === "dark" ? theme.white : theme.black,
|
|
233
233
|
borderBottom: `1px solid ${theme.colorScheme === "dark" ? theme.colors.dark[4] : theme.colors.gray[3]}`
|
|
234
234
|
},
|
|
235
|
-
link: __spreadProps$
|
|
235
|
+
link: __spreadProps$a(__spreadValues$d({}, theme.fn.focusStyles()), {
|
|
236
236
|
display: "flex",
|
|
237
237
|
alignItems: "center",
|
|
238
238
|
textDecoration: "none",
|
|
@@ -302,7 +302,7 @@ const TRIAL_PAGES = [
|
|
|
302
302
|
"Badges"
|
|
303
303
|
];
|
|
304
304
|
function Navbar(props) {
|
|
305
|
-
const { classes, cx } = useStyles$
|
|
305
|
+
const { classes, cx } = useStyles$u();
|
|
306
306
|
const [burgerOpen, setBurgerOpen] = React__namespace.useState(false);
|
|
307
307
|
const toggle = () => setBurgerOpen(!burgerOpen);
|
|
308
308
|
const links = data.map((item) => {
|
|
@@ -315,12 +315,12 @@ function Navbar(props) {
|
|
|
315
315
|
}
|
|
316
316
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
317
317
|
LinksGroup,
|
|
318
|
-
__spreadProps$
|
|
318
|
+
__spreadProps$a(__spreadValues$d(__spreadValues$d({
|
|
319
319
|
key: item.label,
|
|
320
320
|
active: props.active
|
|
321
321
|
}, item), context), {
|
|
322
322
|
links: (item.links || []).map((link) => {
|
|
323
|
-
return __spreadValues$
|
|
323
|
+
return __spreadValues$d(__spreadValues$d({}, link), props.links[`${item.label}/${link.label}`] || { notifications: 0, href: "" });
|
|
324
324
|
})
|
|
325
325
|
})
|
|
326
326
|
);
|
|
@@ -345,7 +345,7 @@ function Navbar(props) {
|
|
|
345
345
|
} }, /* @__PURE__ */ React__namespace.createElement(icons.IconLogout, { className: classes.linkIcon, stroke: 1.5 }), /* @__PURE__ */ React__namespace.createElement("span", null, "Logout"))))));
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
-
const useStyles$
|
|
348
|
+
const useStyles$t = core.createStyles((theme) => ({
|
|
349
349
|
inner: {
|
|
350
350
|
paddingTop: theme.spacing.xl,
|
|
351
351
|
paddingBottom: theme.spacing.xl * 4
|
|
@@ -381,7 +381,7 @@ const useStyles$v = core.createStyles((theme) => ({
|
|
|
381
381
|
}
|
|
382
382
|
}));
|
|
383
383
|
const GettingStarted = (props) => {
|
|
384
|
-
const { classes } = useStyles$
|
|
384
|
+
const { classes } = useStyles$t();
|
|
385
385
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
386
386
|
core.Modal,
|
|
387
387
|
{
|
|
@@ -395,7 +395,7 @@ const GettingStarted = (props) => {
|
|
|
395
395
|
);
|
|
396
396
|
};
|
|
397
397
|
|
|
398
|
-
const useStyles$
|
|
398
|
+
const useStyles$s = core.createStyles((theme) => ({
|
|
399
399
|
title: {
|
|
400
400
|
fontSize: 34,
|
|
401
401
|
fontWeight: 900,
|
|
@@ -436,7 +436,7 @@ const useStyles$u = core.createStyles((theme) => ({
|
|
|
436
436
|
}
|
|
437
437
|
}));
|
|
438
438
|
const SwitchAccount = (props) => {
|
|
439
|
-
const { classes, theme } = useStyles$
|
|
439
|
+
const { classes, theme } = useStyles$s();
|
|
440
440
|
const options = props.accounts.map((a) => {
|
|
441
441
|
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")));
|
|
442
442
|
});
|
|
@@ -453,7 +453,7 @@ const SwitchAccount = (props) => {
|
|
|
453
453
|
);
|
|
454
454
|
};
|
|
455
455
|
|
|
456
|
-
const useStyles$
|
|
456
|
+
const useStyles$r = core.createStyles((theme) => ({
|
|
457
457
|
root: {
|
|
458
458
|
display: "flex",
|
|
459
459
|
backgroundImage: `linear-gradient(-60deg, ${theme.colors[theme.primaryColor][4]} 0%, ${theme.colors[theme.primaryColor][7]} 100%)`,
|
|
@@ -497,7 +497,7 @@ const useStyles$t = core.createStyles((theme) => ({
|
|
|
497
497
|
}
|
|
498
498
|
}));
|
|
499
499
|
const StatsGroup = ({ data, footer }) => {
|
|
500
|
-
const { classes } = useStyles$
|
|
500
|
+
const { classes } = useStyles$r();
|
|
501
501
|
const stats = data.map((stat) => {
|
|
502
502
|
const value = (() => {
|
|
503
503
|
if (stat.unit === "%") {
|
|
@@ -517,7 +517,7 @@ const Tabs = (props) => {
|
|
|
517
517
|
return /* @__PURE__ */ React__namespace.createElement(core.Tabs, { value: props.value, onTabChange: props.onChange }, /* @__PURE__ */ React__namespace.createElement(core.Tabs.List, null, tabs));
|
|
518
518
|
};
|
|
519
519
|
|
|
520
|
-
const useStyles$
|
|
520
|
+
const useStyles$q = core.createStyles((theme) => ({
|
|
521
521
|
button: {
|
|
522
522
|
borderTopRightRadius: 0,
|
|
523
523
|
borderBottomRightRadius: 0,
|
|
@@ -532,7 +532,7 @@ const useStyles$s = core.createStyles((theme) => ({
|
|
|
532
532
|
}
|
|
533
533
|
}));
|
|
534
534
|
const SplitButton$5 = (props) => {
|
|
535
|
-
const { classes, theme } = useStyles$
|
|
535
|
+
const { classes, theme } = useStyles$q();
|
|
536
536
|
theme.colors[theme.primaryColor][theme.colorScheme === "dark" ? 5 : 6];
|
|
537
537
|
return /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: "sm" }, /* @__PURE__ */ React__namespace.createElement(
|
|
538
538
|
core.Button,
|
|
@@ -560,7 +560,7 @@ const SplitButton$5 = (props) => {
|
|
|
560
560
|
));
|
|
561
561
|
};
|
|
562
562
|
|
|
563
|
-
const useStyles$
|
|
563
|
+
const useStyles$p = core.createStyles((theme) => ({
|
|
564
564
|
wrapper: {
|
|
565
565
|
display: "flex",
|
|
566
566
|
alignItems: "center",
|
|
@@ -611,7 +611,7 @@ const useStyles$r = core.createStyles((theme) => ({
|
|
|
611
611
|
}
|
|
612
612
|
}));
|
|
613
613
|
const PlaceholderBanner = (props) => {
|
|
614
|
-
const { classes } = useStyles$
|
|
614
|
+
const { classes } = useStyles$p();
|
|
615
615
|
const title = props.title || "Nothing to display";
|
|
616
616
|
const description = props.description || "We don't have anything to show you here just yet. Add data, check back later, or adjust your search.";
|
|
617
617
|
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 }));
|
|
@@ -665,28 +665,28 @@ function useSortableData(items, config = { key: "", direction: null }) {
|
|
|
665
665
|
return { items: sortedItems, requestSort, sortConfig };
|
|
666
666
|
}
|
|
667
667
|
|
|
668
|
-
var __defProp$
|
|
669
|
-
var __defProps$
|
|
670
|
-
var __getOwnPropDescs$
|
|
671
|
-
var __getOwnPropSymbols$
|
|
672
|
-
var __hasOwnProp$
|
|
673
|
-
var __propIsEnum$
|
|
674
|
-
var __defNormalProp$
|
|
675
|
-
var __spreadValues$
|
|
668
|
+
var __defProp$c = Object.defineProperty;
|
|
669
|
+
var __defProps$9 = Object.defineProperties;
|
|
670
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
671
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
672
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
673
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
674
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
675
|
+
var __spreadValues$c = (a, b) => {
|
|
676
676
|
for (var prop in b || (b = {}))
|
|
677
|
-
if (__hasOwnProp$
|
|
678
|
-
__defNormalProp$
|
|
679
|
-
if (__getOwnPropSymbols$
|
|
680
|
-
for (var prop of __getOwnPropSymbols$
|
|
681
|
-
if (__propIsEnum$
|
|
682
|
-
__defNormalProp$
|
|
677
|
+
if (__hasOwnProp$c.call(b, prop))
|
|
678
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
679
|
+
if (__getOwnPropSymbols$c)
|
|
680
|
+
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
681
|
+
if (__propIsEnum$c.call(b, prop))
|
|
682
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
683
683
|
}
|
|
684
684
|
return a;
|
|
685
685
|
};
|
|
686
|
-
var __spreadProps$
|
|
686
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
687
687
|
function Table$k(props) {
|
|
688
688
|
const preparedItems = React__namespace.useMemo(() => {
|
|
689
|
-
return props.items.map((item) => __spreadProps$
|
|
689
|
+
return props.items.map((item) => __spreadProps$9(__spreadValues$c({}, item), {
|
|
690
690
|
status: item.isComplete ? 1 : 0
|
|
691
691
|
}));
|
|
692
692
|
}, [props.items]);
|
|
@@ -783,7 +783,7 @@ function Table$j(props) {
|
|
|
783
783
|
));
|
|
784
784
|
}
|
|
785
785
|
|
|
786
|
-
const useStyles$
|
|
786
|
+
const useStyles$o = core.createStyles((theme) => ({
|
|
787
787
|
title: {
|
|
788
788
|
fontSize: 34,
|
|
789
789
|
fontWeight: 900,
|
|
@@ -796,7 +796,7 @@ const useStyles$q = core.createStyles((theme) => ({
|
|
|
796
796
|
}
|
|
797
797
|
}));
|
|
798
798
|
const Badge = (props) => {
|
|
799
|
-
const { classes } = useStyles$
|
|
799
|
+
const { classes } = useStyles$o();
|
|
800
800
|
const [tab, setTab] = React.useState("lessons");
|
|
801
801
|
const numberOfStudents = props.students.length;
|
|
802
802
|
const numberOfBadges = numberOfStudents > 0 ? props.students.filter((u) => u.isComplete).length : 0;
|
|
@@ -894,7 +894,7 @@ function Table$i(props) {
|
|
|
894
894
|
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)));
|
|
895
895
|
}
|
|
896
896
|
|
|
897
|
-
const useStyles$
|
|
897
|
+
const useStyles$n = core.createStyles((theme) => ({
|
|
898
898
|
title: {
|
|
899
899
|
fontSize: 34,
|
|
900
900
|
fontWeight: 900,
|
|
@@ -907,7 +907,7 @@ const useStyles$p = core.createStyles((theme) => ({
|
|
|
907
907
|
}
|
|
908
908
|
}));
|
|
909
909
|
const Badges = (props) => {
|
|
910
|
-
const { classes } = useStyles$
|
|
910
|
+
const { classes } = useStyles$n();
|
|
911
911
|
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" }, "Key milestones that reflect skill development, micro-credentials, or academic progress"))), /* @__PURE__ */ React__namespace.createElement(
|
|
912
912
|
core.Autocomplete,
|
|
913
913
|
{
|
|
@@ -1137,22 +1137,31 @@ const SplitButton$4 = (props) => {
|
|
|
1137
1137
|
));
|
|
1138
1138
|
};
|
|
1139
1139
|
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1140
|
+
var __defProp$b = Object.defineProperty;
|
|
1141
|
+
var __defProps$8 = Object.defineProperties;
|
|
1142
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
1143
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
1144
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
1145
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
1146
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1147
|
+
var __spreadValues$b = (a, b) => {
|
|
1148
|
+
for (var prop in b || (b = {}))
|
|
1149
|
+
if (__hasOwnProp$b.call(b, prop))
|
|
1150
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
1151
|
+
if (__getOwnPropSymbols$b)
|
|
1152
|
+
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
1153
|
+
if (__propIsEnum$b.call(b, prop))
|
|
1154
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
1147
1155
|
}
|
|
1148
|
-
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
const { classes } = useStyles$o();
|
|
1152
|
-
const Icon = sorted ? reversed ? icons.IconChevronUp : icons.IconChevronDown : icons.IconSelector;
|
|
1153
|
-
return /* @__PURE__ */ React__namespace.createElement("th", { className: classes.th }, /* @__PURE__ */ React__namespace.createElement(core.UnstyledButton, { onClick: onSort, className: classes.control }, /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "apart", noWrap: true, spacing: "xs" }, /* @__PURE__ */ React__namespace.createElement(core.Text, { weight: 500, size: "sm", sx: { whiteSpace: "nowrap" } }, children), /* @__PURE__ */ React__namespace.createElement(core.Center, null, /* @__PURE__ */ React__namespace.createElement(Icon, { size: 14, stroke: 1.5 })))));
|
|
1154
|
-
}
|
|
1156
|
+
return a;
|
|
1157
|
+
};
|
|
1158
|
+
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
1155
1159
|
function Table$c(props) {
|
|
1160
|
+
React__namespace.useMemo(() => {
|
|
1161
|
+
return props.items.map((item) => __spreadProps$8(__spreadValues$b({}, item), {
|
|
1162
|
+
fullName: item.givenName && item.familyName ? `${item.givenName} ${item.familyName}`.toLowerCase() : item.email.toLowerCase()
|
|
1163
|
+
}));
|
|
1164
|
+
}, [props.items]);
|
|
1156
1165
|
const { items: sortedItems, requestSort, sortConfig } = useSortableData(props.items);
|
|
1157
1166
|
if (props.items.length === 0) {
|
|
1158
1167
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
@@ -1165,6 +1174,10 @@ function Table$c(props) {
|
|
|
1165
1174
|
}
|
|
1166
1175
|
);
|
|
1167
1176
|
}
|
|
1177
|
+
const sortStatus = {
|
|
1178
|
+
columnAccessor: sortConfig.key,
|
|
1179
|
+
direction: sortConfig.direction === "desc" ? "desc" : "asc"
|
|
1180
|
+
};
|
|
1168
1181
|
const openDeleteModal = (student) => modals.openConfirmModal({
|
|
1169
1182
|
title: `Remove "${student.givenName && student.familyName ? `${student.givenName} ${student.familyName}` : student.email}" from this class?`,
|
|
1170
1183
|
centered: true,
|
|
@@ -1173,64 +1186,73 @@ function Table$c(props) {
|
|
|
1173
1186
|
confirmProps: { color: "red" },
|
|
1174
1187
|
onConfirm: () => props.onDelete && props.onDelete(student)
|
|
1175
1188
|
});
|
|
1176
|
-
|
|
1177
|
-
|
|
1189
|
+
return /* @__PURE__ */ React__namespace.createElement(core.ScrollArea, null, /* @__PURE__ */ React__namespace.createElement(
|
|
1190
|
+
mantineDatatable.DataTable,
|
|
1178
1191
|
{
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1192
|
+
verticalSpacing: 20,
|
|
1193
|
+
sx: { minWidth: 700 },
|
|
1194
|
+
highlightOnHover: true,
|
|
1195
|
+
striped: true,
|
|
1196
|
+
records: sortedItems,
|
|
1197
|
+
idAccessor: "email",
|
|
1198
|
+
sortStatus,
|
|
1199
|
+
onSortStatusChange: (status) => requestSort(status.columnAccessor),
|
|
1200
|
+
columns: [
|
|
1201
|
+
{
|
|
1202
|
+
accessor: "fullName",
|
|
1203
|
+
title: "Name",
|
|
1204
|
+
sortable: true,
|
|
1205
|
+
render: (row) => /* @__PURE__ */ React__namespace.createElement(core.UnstyledButton, { component: reactRouterDom.Link, to: row.href }, /* @__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.givenName && row.familyName ? `${row.givenName} ${row.familyName}` : row.email), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "xs", color: "dimmed" }, row.email))))
|
|
1206
|
+
},
|
|
1207
|
+
{
|
|
1208
|
+
accessor: "isAdmin",
|
|
1209
|
+
title: "Role",
|
|
1210
|
+
sortable: true,
|
|
1211
|
+
render: (row) => /* @__PURE__ */ React__namespace.createElement(core.Box, { maw: 150 }, /* @__PURE__ */ React__namespace.createElement(
|
|
1212
|
+
core.Select,
|
|
1213
|
+
{
|
|
1214
|
+
size: "sm",
|
|
1215
|
+
disabled: row.readonly,
|
|
1216
|
+
value: row.isAdmin ? "educator" : "student",
|
|
1217
|
+
onChange: (value) => props.onRoleChange && props.onRoleChange(row, value),
|
|
1218
|
+
data: [
|
|
1219
|
+
{ label: "Student", value: "student" },
|
|
1220
|
+
{ label: "Educator", value: "educator" }
|
|
1221
|
+
]
|
|
1222
|
+
}
|
|
1223
|
+
))
|
|
1224
|
+
},
|
|
1225
|
+
{
|
|
1226
|
+
accessor: "badgesEarned",
|
|
1227
|
+
title: "Badges Earned",
|
|
1228
|
+
sortable: true
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
accessor: "lessonsCompleted",
|
|
1232
|
+
title: "Lessons Completed",
|
|
1233
|
+
sortable: true
|
|
1234
|
+
},
|
|
1235
|
+
{
|
|
1236
|
+
accessor: "hasAccount",
|
|
1237
|
+
title: "Account Created?",
|
|
1238
|
+
sortable: true,
|
|
1239
|
+
render: (row) => row.hasAccount ? /* @__PURE__ */ React__namespace.createElement(icons.IconCheck, { color: "green" }) : null
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
accessor: "lastActivity",
|
|
1243
|
+
title: "Last Active",
|
|
1244
|
+
sortable: true,
|
|
1245
|
+
render: (row) => row.lastActivity ? relativeTimeFromDates(row.lastActivity) : ""
|
|
1246
|
+
},
|
|
1247
|
+
{
|
|
1248
|
+
accessor: "actions",
|
|
1249
|
+
title: "",
|
|
1250
|
+
textAlignment: "right",
|
|
1251
|
+
render: (row) => /* @__PURE__ */ React__namespace.createElement(core.Group, { noWrap: true, spacing: 0, position: "right" }, !row.readonly && !!props.onDelete && /* @__PURE__ */ React__namespace.createElement(core.ActionIcon, { color: "red", onClick: () => openDeleteModal(row) }, /* @__PURE__ */ React__namespace.createElement(icons.IconTrash, { size: 16, stroke: 1.5 })))
|
|
1252
|
+
}
|
|
1253
|
+
]
|
|
1183
1254
|
}
|
|
1184
|
-
))
|
|
1185
|
-
return /* @__PURE__ */ React__namespace.createElement(core.ScrollArea, null, /* @__PURE__ */ React__namespace.createElement(core.Table, { verticalSpacing: 20, sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React__namespace.createElement("thead", null, /* @__PURE__ */ React__namespace.createElement("tr", null, /* @__PURE__ */ React__namespace.createElement(
|
|
1186
|
-
Th$2,
|
|
1187
|
-
{
|
|
1188
|
-
sorted: sortConfig.key === "givenName",
|
|
1189
|
-
reversed: sortConfig.direction === "desc",
|
|
1190
|
-
onSort: () => requestSort("givenName")
|
|
1191
|
-
},
|
|
1192
|
-
"Name"
|
|
1193
|
-
), /* @__PURE__ */ React__namespace.createElement(
|
|
1194
|
-
Th$2,
|
|
1195
|
-
{
|
|
1196
|
-
sorted: sortConfig.key === "isAdmin",
|
|
1197
|
-
reversed: sortConfig.direction === "desc",
|
|
1198
|
-
onSort: () => requestSort("isAdmin")
|
|
1199
|
-
},
|
|
1200
|
-
"Role"
|
|
1201
|
-
), /* @__PURE__ */ React__namespace.createElement(
|
|
1202
|
-
Th$2,
|
|
1203
|
-
{
|
|
1204
|
-
sorted: sortConfig.key === "badgesEarned",
|
|
1205
|
-
reversed: sortConfig.direction === "desc",
|
|
1206
|
-
onSort: () => requestSort("badgesEarned")
|
|
1207
|
-
},
|
|
1208
|
-
"Badges Earned"
|
|
1209
|
-
), /* @__PURE__ */ React__namespace.createElement(
|
|
1210
|
-
Th$2,
|
|
1211
|
-
{
|
|
1212
|
-
sorted: sortConfig.key === "lessonsCompleted",
|
|
1213
|
-
reversed: sortConfig.direction === "desc",
|
|
1214
|
-
onSort: () => requestSort("lessonsCompleted")
|
|
1215
|
-
},
|
|
1216
|
-
"Lessons Completed"
|
|
1217
|
-
), /* @__PURE__ */ React__namespace.createElement(
|
|
1218
|
-
Th$2,
|
|
1219
|
-
{
|
|
1220
|
-
sorted: sortConfig.key === "hasAccount",
|
|
1221
|
-
reversed: sortConfig.direction === "desc",
|
|
1222
|
-
onSort: () => requestSort("hasAccount")
|
|
1223
|
-
},
|
|
1224
|
-
"Account Created?"
|
|
1225
|
-
), /* @__PURE__ */ React__namespace.createElement(
|
|
1226
|
-
Th$2,
|
|
1227
|
-
{
|
|
1228
|
-
sorted: sortConfig.key === "lastActivity",
|
|
1229
|
-
reversed: sortConfig.direction === "desc",
|
|
1230
|
-
onSort: () => requestSort("lastActivity")
|
|
1231
|
-
},
|
|
1232
|
-
"Last Active"
|
|
1233
|
-
), /* @__PURE__ */ React__namespace.createElement("th", null), " ")), /* @__PURE__ */ React__namespace.createElement("tbody", null, rows)));
|
|
1255
|
+
));
|
|
1234
1256
|
}
|
|
1235
1257
|
|
|
1236
1258
|
var __defProp$a = Object.defineProperty;
|
|
@@ -1252,7 +1274,7 @@ var __spreadValues$a = (a, b) => {
|
|
|
1252
1274
|
return a;
|
|
1253
1275
|
};
|
|
1254
1276
|
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
1255
|
-
const useStyles$
|
|
1277
|
+
const useStyles$m = core.createStyles((theme) => ({
|
|
1256
1278
|
title: {
|
|
1257
1279
|
fontSize: 34,
|
|
1258
1280
|
fontWeight: 900,
|
|
@@ -1285,7 +1307,7 @@ const useStyles$n = core.createStyles((theme) => ({
|
|
|
1285
1307
|
}
|
|
1286
1308
|
}));
|
|
1287
1309
|
const Class = (props) => {
|
|
1288
|
-
const { classes } = useStyles$
|
|
1310
|
+
const { classes } = useStyles$m();
|
|
1289
1311
|
const form$1 = form.useForm({
|
|
1290
1312
|
initialValues: {
|
|
1291
1313
|
classId: "",
|
|
@@ -1386,7 +1408,7 @@ const Class = (props) => {
|
|
|
1386
1408
|
))))));
|
|
1387
1409
|
};
|
|
1388
1410
|
const DropzoneButton$1 = (props) => {
|
|
1389
|
-
const { classes, theme } = useStyles$
|
|
1411
|
+
const { classes, theme } = useStyles$m();
|
|
1390
1412
|
const openRef = React__namespace.useRef(null);
|
|
1391
1413
|
const [loading, setLoading] = React__namespace.useState(false);
|
|
1392
1414
|
const onDrop = React__namespace.useCallback((acceptedFiles) => {
|
|
@@ -1432,7 +1454,7 @@ const DropzoneButton$1 = (props) => {
|
|
|
1432
1454
|
} }, "Select file"));
|
|
1433
1455
|
};
|
|
1434
1456
|
|
|
1435
|
-
const useStyles$
|
|
1457
|
+
const useStyles$l = core.createStyles((theme) => ({
|
|
1436
1458
|
th: { padding: "0 !important" },
|
|
1437
1459
|
control: {
|
|
1438
1460
|
width: "100%",
|
|
@@ -1442,8 +1464,8 @@ const useStyles$m = core.createStyles((theme) => ({
|
|
|
1442
1464
|
}
|
|
1443
1465
|
}
|
|
1444
1466
|
}));
|
|
1445
|
-
function Th
|
|
1446
|
-
const { classes } = useStyles$
|
|
1467
|
+
function Th({ children, reversed, sorted, onSort }) {
|
|
1468
|
+
const { classes } = useStyles$l();
|
|
1447
1469
|
const Icon = sorted ? reversed ? icons.IconChevronUp : icons.IconChevronDown : icons.IconSelector;
|
|
1448
1470
|
return /* @__PURE__ */ React__namespace.createElement("th", { className: classes.th }, /* @__PURE__ */ React__namespace.createElement(core.UnstyledButton, { onClick: onSort, className: classes.control }, /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "apart", noWrap: true, spacing: "xs" }, /* @__PURE__ */ React__namespace.createElement(core.Text, { weight: 500, size: "sm", sx: { whiteSpace: "nowrap" } }, children), /* @__PURE__ */ React__namespace.createElement(core.Center, null, /* @__PURE__ */ React__namespace.createElement(Icon, { size: 14, stroke: 1.5 })))));
|
|
1449
1471
|
}
|
|
@@ -1470,7 +1492,7 @@ function Table$b(props) {
|
|
|
1470
1492
|
});
|
|
1471
1493
|
const rows = sortedItems.map((row) => /* @__PURE__ */ React__namespace.createElement("tr", { key: row.classId }, /* @__PURE__ */ React__namespace.createElement("td", null, /* @__PURE__ */ React__namespace.createElement(core.UnstyledButton, { component: reactRouterDom.Link, to: row.href }, /* @__PURE__ */ React__namespace.createElement(core.Text, { size: 14 }, row.name))), /* @__PURE__ */ React__namespace.createElement("td", null, /* @__PURE__ */ React__namespace.createElement(core.Text, { size: 14 }, row.description)), /* @__PURE__ */ React__namespace.createElement("td", null, /* @__PURE__ */ React__namespace.createElement(core.Text, { size: 14 }, row.numberOfStudents || 0)), /* @__PURE__ */ React__namespace.createElement("td", null, /* @__PURE__ */ React__namespace.createElement(core.Group, { noWrap: true, spacing: 0, position: "right" }, /* @__PURE__ */ React__namespace.createElement(core.ActionIcon, { color: "red" }, /* @__PURE__ */ React__namespace.createElement(icons.IconTrash, { onClick: () => openDeleteModal(row), size: 16, stroke: 1.5 }))))));
|
|
1472
1494
|
return /* @__PURE__ */ React__namespace.createElement(core.ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React__namespace.createElement(core.Table, { verticalSpacing: 20, sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React__namespace.createElement("thead", null, /* @__PURE__ */ React__namespace.createElement("tr", null, /* @__PURE__ */ React__namespace.createElement(
|
|
1473
|
-
Th
|
|
1495
|
+
Th,
|
|
1474
1496
|
{
|
|
1475
1497
|
sorted: sortConfig.key === "name",
|
|
1476
1498
|
reversed: sortConfig.direction === "desc",
|
|
@@ -1478,7 +1500,7 @@ function Table$b(props) {
|
|
|
1478
1500
|
},
|
|
1479
1501
|
"Class Name"
|
|
1480
1502
|
), /* @__PURE__ */ React__namespace.createElement("th", { style: { padding: "7px 16px" } }, /* @__PURE__ */ React__namespace.createElement(core.Text, { weight: 500, size: "sm" }, "Description")), /* @__PURE__ */ React__namespace.createElement(
|
|
1481
|
-
Th
|
|
1503
|
+
Th,
|
|
1482
1504
|
{
|
|
1483
1505
|
sorted: sortConfig.key === "numberOfStudents",
|
|
1484
1506
|
reversed: sortConfig.direction === "desc",
|
|
@@ -1504,7 +1526,7 @@ var __spreadValues$9 = (a, b) => {
|
|
|
1504
1526
|
}
|
|
1505
1527
|
return a;
|
|
1506
1528
|
};
|
|
1507
|
-
const useStyles$
|
|
1529
|
+
const useStyles$k = core.createStyles((theme) => ({
|
|
1508
1530
|
title: {
|
|
1509
1531
|
fontSize: 34,
|
|
1510
1532
|
fontWeight: 900,
|
|
@@ -1517,7 +1539,7 @@ const useStyles$l = core.createStyles((theme) => ({
|
|
|
1517
1539
|
}
|
|
1518
1540
|
}));
|
|
1519
1541
|
const Classes = (props) => {
|
|
1520
|
-
const { classes } = useStyles$
|
|
1542
|
+
const { classes } = useStyles$k();
|
|
1521
1543
|
const form$1 = form.useForm({
|
|
1522
1544
|
initialValues: {
|
|
1523
1545
|
classId: "",
|
|
@@ -1588,7 +1610,7 @@ const Classes = (props) => {
|
|
|
1588
1610
|
))))));
|
|
1589
1611
|
};
|
|
1590
1612
|
|
|
1591
|
-
const useStyles$
|
|
1613
|
+
const useStyles$j = core.createStyles((theme) => ({
|
|
1592
1614
|
title: {
|
|
1593
1615
|
fontSize: 34,
|
|
1594
1616
|
fontWeight: 900,
|
|
@@ -1602,7 +1624,7 @@ const useStyles$k = core.createStyles((theme) => ({
|
|
|
1602
1624
|
}
|
|
1603
1625
|
}));
|
|
1604
1626
|
const UserInfo = (props) => {
|
|
1605
|
-
const { classes } = useStyles$
|
|
1627
|
+
const { classes } = useStyles$j();
|
|
1606
1628
|
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));
|
|
1607
1629
|
};
|
|
1608
1630
|
|
|
@@ -1740,7 +1762,7 @@ const Student = (props) => {
|
|
|
1740
1762
|
))))));
|
|
1741
1763
|
};
|
|
1742
1764
|
|
|
1743
|
-
const useStyles$
|
|
1765
|
+
const useStyles$i = core.createStyles((theme, props) => {
|
|
1744
1766
|
const from = props.from || "blue";
|
|
1745
1767
|
const to = props.to || "green";
|
|
1746
1768
|
return {
|
|
@@ -1768,7 +1790,7 @@ const useStyles$j = core.createStyles((theme, props) => {
|
|
|
1768
1790
|
};
|
|
1769
1791
|
});
|
|
1770
1792
|
function CardGradient(props) {
|
|
1771
|
-
const { classes } = useStyles$
|
|
1793
|
+
const { classes } = useStyles$i(props);
|
|
1772
1794
|
const from = props.from || "blue";
|
|
1773
1795
|
const to = props.to || "green";
|
|
1774
1796
|
const icon = props.icon || /* @__PURE__ */ React__namespace.createElement(icons.IconColorSwatch, { size: 28, stroke: 1.5 });
|
|
@@ -1812,7 +1834,7 @@ var __objRest$1 = (source, exclude) => {
|
|
|
1812
1834
|
}
|
|
1813
1835
|
return target;
|
|
1814
1836
|
};
|
|
1815
|
-
const useStyles$
|
|
1837
|
+
const useStyles$h = core.createStyles((theme) => ({
|
|
1816
1838
|
card: {
|
|
1817
1839
|
height: 240,
|
|
1818
1840
|
backgroundSize: "cover",
|
|
@@ -1857,7 +1879,7 @@ const TenantBanner = (_a) => {
|
|
|
1857
1879
|
"className",
|
|
1858
1880
|
"code"
|
|
1859
1881
|
]);
|
|
1860
|
-
const { classes, cx, theme } = useStyles$
|
|
1882
|
+
const { classes, cx, theme } = useStyles$h();
|
|
1861
1883
|
const handleCopy = async () => {
|
|
1862
1884
|
if (!code)
|
|
1863
1885
|
return;
|
|
@@ -1997,7 +2019,7 @@ function Table$7(props) {
|
|
|
1997
2019
|
));
|
|
1998
2020
|
}
|
|
1999
2021
|
|
|
2000
|
-
const useStyles$
|
|
2022
|
+
const useStyles$g = core.createStyles((theme) => ({
|
|
2001
2023
|
button: {
|
|
2002
2024
|
borderTopRightRadius: 0,
|
|
2003
2025
|
borderBottomRightRadius: 0,
|
|
@@ -2012,7 +2034,7 @@ const useStyles$h = core.createStyles((theme) => ({
|
|
|
2012
2034
|
}
|
|
2013
2035
|
}));
|
|
2014
2036
|
const SplitButton$3 = (props) => {
|
|
2015
|
-
const { classes, theme } = useStyles$
|
|
2037
|
+
const { classes, theme } = useStyles$g();
|
|
2016
2038
|
theme.colors[theme.primaryColor][theme.colorScheme === "dark" ? 5 : 6];
|
|
2017
2039
|
return /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: "sm" }, /* @__PURE__ */ React__namespace.createElement(
|
|
2018
2040
|
core.Button,
|
|
@@ -2190,7 +2212,7 @@ function Stack$2(props) {
|
|
|
2190
2212
|
}
|
|
2191
2213
|
const truncateWithEllipses = (text, max) => text.substr(0, max - 1) + (text.length > max ? "…" : "");
|
|
2192
2214
|
|
|
2193
|
-
const useStyles$
|
|
2215
|
+
const useStyles$f = core.createStyles((theme) => ({
|
|
2194
2216
|
title: {
|
|
2195
2217
|
fontSize: 34,
|
|
2196
2218
|
fontWeight: 900,
|
|
@@ -2203,7 +2225,7 @@ const useStyles$g = core.createStyles((theme) => ({
|
|
|
2203
2225
|
}
|
|
2204
2226
|
}));
|
|
2205
2227
|
const Lesson = (props) => {
|
|
2206
|
-
const { classes } = useStyles$
|
|
2228
|
+
const { classes } = useStyles$f();
|
|
2207
2229
|
const [tab, setTab] = React.useState("question");
|
|
2208
2230
|
const numberOfStudents = props.students.length;
|
|
2209
2231
|
const numberOfLessons = numberOfStudents > 0 ? props.students.filter((u) => u.isComplete).length : 0;
|
|
@@ -2347,7 +2369,7 @@ function Table$5(props) {
|
|
|
2347
2369
|
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)));
|
|
2348
2370
|
}
|
|
2349
2371
|
|
|
2350
|
-
const useStyles$
|
|
2372
|
+
const useStyles$e = core.createStyles((theme) => ({
|
|
2351
2373
|
title: {
|
|
2352
2374
|
fontSize: 34,
|
|
2353
2375
|
fontWeight: 900,
|
|
@@ -2360,7 +2382,7 @@ const useStyles$f = core.createStyles((theme) => ({
|
|
|
2360
2382
|
}
|
|
2361
2383
|
}));
|
|
2362
2384
|
const Lessons = (props) => {
|
|
2363
|
-
const { classes } = useStyles$
|
|
2385
|
+
const { classes } = useStyles$e();
|
|
2364
2386
|
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" }, "Bite-sized activities and learning experiences accelerating students achievement"))), /* @__PURE__ */ React__namespace.createElement(
|
|
2365
2387
|
core.Autocomplete,
|
|
2366
2388
|
{
|
|
@@ -2377,7 +2399,7 @@ const Lessons = (props) => {
|
|
|
2377
2399
|
))));
|
|
2378
2400
|
};
|
|
2379
2401
|
|
|
2380
|
-
const useStyles$
|
|
2402
|
+
const useStyles$d = core.createStyles((theme) => ({
|
|
2381
2403
|
title: {
|
|
2382
2404
|
fontSize: 22,
|
|
2383
2405
|
fontWeight: 900,
|
|
@@ -2396,7 +2418,7 @@ const useStyles$e = core.createStyles((theme) => ({
|
|
|
2396
2418
|
}
|
|
2397
2419
|
}));
|
|
2398
2420
|
function AccessCode(props) {
|
|
2399
|
-
const { classes } = useStyles$
|
|
2421
|
+
const { classes } = useStyles$d();
|
|
2400
2422
|
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(
|
|
2401
2423
|
core.Anchor,
|
|
2402
2424
|
{
|
|
@@ -2424,7 +2446,7 @@ const monthNames = [
|
|
|
2424
2446
|
"November",
|
|
2425
2447
|
"December"
|
|
2426
2448
|
];
|
|
2427
|
-
const useStyles$
|
|
2449
|
+
const useStyles$c = core.createStyles((theme) => ({
|
|
2428
2450
|
title: {
|
|
2429
2451
|
fontSize: 34,
|
|
2430
2452
|
fontWeight: 900,
|
|
@@ -2454,7 +2476,7 @@ const useStyles$d = core.createStyles((theme) => ({
|
|
|
2454
2476
|
}
|
|
2455
2477
|
}));
|
|
2456
2478
|
const Organization = (props) => {
|
|
2457
|
-
const { classes } = useStyles$
|
|
2479
|
+
const { classes } = useStyles$c();
|
|
2458
2480
|
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(
|
|
2459
2481
|
core.Badge,
|
|
2460
2482
|
{
|
|
@@ -2480,7 +2502,7 @@ const Organization = (props) => {
|
|
|
2480
2502
|
] }))))));
|
|
2481
2503
|
};
|
|
2482
2504
|
|
|
2483
|
-
const useStyles$
|
|
2505
|
+
const useStyles$b = core.createStyles((theme) => ({
|
|
2484
2506
|
button: {
|
|
2485
2507
|
borderTopRightRadius: 0,
|
|
2486
2508
|
borderBottomRightRadius: 0,
|
|
@@ -2495,7 +2517,7 @@ const useStyles$c = core.createStyles((theme) => ({
|
|
|
2495
2517
|
}
|
|
2496
2518
|
}));
|
|
2497
2519
|
const SplitButton$2 = (props) => {
|
|
2498
|
-
const { classes, theme } = useStyles$
|
|
2520
|
+
const { classes, theme } = useStyles$b();
|
|
2499
2521
|
const menuIconColor = theme.colors[theme.primaryColor][theme.colorScheme === "dark" ? 5 : 6];
|
|
2500
2522
|
const hasMenu = !!props.withOrganizationLink;
|
|
2501
2523
|
return /* @__PURE__ */ React__namespace.createElement(core.Group, { noWrap: true, spacing: 0 }, /* @__PURE__ */ React__namespace.createElement(
|
|
@@ -2576,7 +2598,7 @@ var __spreadValues$6 = (a, b) => {
|
|
|
2576
2598
|
return a;
|
|
2577
2599
|
};
|
|
2578
2600
|
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
2579
|
-
const useStyles$
|
|
2601
|
+
const useStyles$a = core.createStyles((theme) => ({
|
|
2580
2602
|
title: {
|
|
2581
2603
|
fontSize: 34,
|
|
2582
2604
|
fontWeight: 900,
|
|
@@ -2606,7 +2628,7 @@ const useStyles$b = core.createStyles((theme) => ({
|
|
|
2606
2628
|
}
|
|
2607
2629
|
}));
|
|
2608
2630
|
const People = (props) => {
|
|
2609
|
-
const { classes } = useStyles$
|
|
2631
|
+
const { classes } = useStyles$a();
|
|
2610
2632
|
const form$1 = form.useForm({
|
|
2611
2633
|
initialValues: {
|
|
2612
2634
|
userId: "",
|
|
@@ -2710,7 +2732,7 @@ const People = (props) => {
|
|
|
2710
2732
|
))))));
|
|
2711
2733
|
};
|
|
2712
2734
|
const DropzoneButton = (props) => {
|
|
2713
|
-
const { classes, theme } = useStyles$
|
|
2735
|
+
const { classes, theme } = useStyles$a();
|
|
2714
2736
|
const openRef = React__namespace.useRef(null);
|
|
2715
2737
|
const [loading, setLoading] = React__namespace.useState(false);
|
|
2716
2738
|
const onDrop = React__namespace.useCallback((acceptedFiles) => {
|
|
@@ -2756,7 +2778,7 @@ const DropzoneButton = (props) => {
|
|
|
2756
2778
|
} }, "Select file"));
|
|
2757
2779
|
};
|
|
2758
2780
|
|
|
2759
|
-
const useStyles$
|
|
2781
|
+
const useStyles$9 = core.createStyles((theme) => ({
|
|
2760
2782
|
form: {
|
|
2761
2783
|
backgroundColor: theme.white,
|
|
2762
2784
|
padding: theme.spacing.xl,
|
|
@@ -2819,7 +2841,7 @@ const useStyles$a = core.createStyles((theme) => ({
|
|
|
2819
2841
|
}
|
|
2820
2842
|
}));
|
|
2821
2843
|
const StartAnonymousLesson = (props) => {
|
|
2822
|
-
const { classes } = useStyles$
|
|
2844
|
+
const { classes } = useStyles$9();
|
|
2823
2845
|
const [name, setName] = React__namespace.useState("");
|
|
2824
2846
|
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(
|
|
2825
2847
|
core.TextInput,
|
|
@@ -2876,7 +2898,7 @@ function TaskCard(props) {
|
|
|
2876
2898
|
));
|
|
2877
2899
|
}
|
|
2878
2900
|
|
|
2879
|
-
const useStyles$
|
|
2901
|
+
const useStyles$8 = core.createStyles((theme) => ({
|
|
2880
2902
|
action: {
|
|
2881
2903
|
backgroundColor: "inherit",
|
|
2882
2904
|
":hover": {
|
|
@@ -2895,7 +2917,7 @@ const useStyles$9 = core.createStyles((theme) => ({
|
|
|
2895
2917
|
}
|
|
2896
2918
|
}));
|
|
2897
2919
|
const TrialHome = (props) => {
|
|
2898
|
-
const { classes } = useStyles$
|
|
2920
|
+
const { classes } = useStyles$8();
|
|
2899
2921
|
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(
|
|
2900
2922
|
core.Button,
|
|
2901
2923
|
{
|
|
@@ -2955,7 +2977,7 @@ var __objRest = (source, exclude) => {
|
|
|
2955
2977
|
}
|
|
2956
2978
|
return target;
|
|
2957
2979
|
};
|
|
2958
|
-
const useStyles$
|
|
2980
|
+
const useStyles$7 = core.createStyles((theme, { checked }) => ({
|
|
2959
2981
|
button: {
|
|
2960
2982
|
display: "flex",
|
|
2961
2983
|
alignItems: "center",
|
|
@@ -2997,7 +3019,7 @@ function ImageCheckbox(_a) {
|
|
|
2997
3019
|
finalValue: false,
|
|
2998
3020
|
onChange
|
|
2999
3021
|
});
|
|
3000
|
-
const { classes, cx } = useStyles$
|
|
3022
|
+
const { classes, cx } = useStyles$7({ checked: value });
|
|
3001
3023
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
3002
3024
|
core.UnstyledButton,
|
|
3003
3025
|
__spreadProps$4(__spreadValues$4({}, others), {
|
|
@@ -3058,7 +3080,7 @@ var __spreadValues$3 = (a, b) => {
|
|
|
3058
3080
|
return a;
|
|
3059
3081
|
};
|
|
3060
3082
|
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
3061
|
-
const useStyles$
|
|
3083
|
+
const useStyles$6 = core.createStyles((theme) => ({
|
|
3062
3084
|
wrapper: {
|
|
3063
3085
|
minHeight: "100%",
|
|
3064
3086
|
boxSizing: "border-box",
|
|
@@ -3121,7 +3143,7 @@ const OPTIONS = [
|
|
|
3121
3143
|
{ description: "project-based learning", title: "Project-Based Learning", icon: icons.IconTools }
|
|
3122
3144
|
];
|
|
3123
3145
|
const TrialRegistration = (props) => {
|
|
3124
|
-
const { classes } = useStyles$
|
|
3146
|
+
const { classes } = useStyles$6();
|
|
3125
3147
|
const [firstName, setFirstName] = React__namespace.useState("");
|
|
3126
3148
|
const [lastName, setLastName] = React__namespace.useState("");
|
|
3127
3149
|
const [organization, setOrganization] = React__namespace.useState({ organizationId: "", displayName: "" });
|
|
@@ -3236,7 +3258,7 @@ var __spreadValues$2 = (a, b) => {
|
|
|
3236
3258
|
return a;
|
|
3237
3259
|
};
|
|
3238
3260
|
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
3239
|
-
const useStyles$
|
|
3261
|
+
const useStyles$5 = core.createStyles((theme, props) => ({
|
|
3240
3262
|
footer: {
|
|
3241
3263
|
paddingTop: theme.spacing.md,
|
|
3242
3264
|
paddingBottom: theme.spacing.md,
|
|
@@ -3323,7 +3345,7 @@ const useStyles$6 = core.createStyles((theme, props) => ({
|
|
|
3323
3345
|
}
|
|
3324
3346
|
}));
|
|
3325
3347
|
const App = (props) => {
|
|
3326
|
-
const { classes } = useStyles$
|
|
3348
|
+
const { classes } = useStyles$5(props);
|
|
3327
3349
|
const account = useAccount(props.account, props.accounts, props.onAccountChange);
|
|
3328
3350
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
3329
3351
|
core.AppShell,
|
|
@@ -3450,7 +3472,7 @@ function Table$3(props) {
|
|
|
3450
3472
|
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)));
|
|
3451
3473
|
}
|
|
3452
3474
|
|
|
3453
|
-
const useStyles$
|
|
3475
|
+
const useStyles$4 = core.createStyles((theme) => ({
|
|
3454
3476
|
title: {
|
|
3455
3477
|
fontSize: 34,
|
|
3456
3478
|
fontWeight: 900,
|
|
@@ -3463,7 +3485,7 @@ const useStyles$5 = core.createStyles((theme) => ({
|
|
|
3463
3485
|
}
|
|
3464
3486
|
}));
|
|
3465
3487
|
const Pathways = (props) => {
|
|
3466
|
-
const { classes } = useStyles$
|
|
3488
|
+
const { classes } = useStyles$4();
|
|
3467
3489
|
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" }, "Explore all your unique pathway requirements in one clear space"))), /* @__PURE__ */ React__namespace.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React__namespace.createElement(core.LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React__namespace.createElement(
|
|
3468
3490
|
Table$3,
|
|
3469
3491
|
{
|
|
@@ -3473,7 +3495,7 @@ const Pathways = (props) => {
|
|
|
3473
3495
|
))));
|
|
3474
3496
|
};
|
|
3475
3497
|
|
|
3476
|
-
const useStyles$
|
|
3498
|
+
const useStyles$3 = core.createStyles((theme) => ({
|
|
3477
3499
|
button: {
|
|
3478
3500
|
borderTopRightRadius: 0,
|
|
3479
3501
|
borderBottomRightRadius: 0,
|
|
@@ -3488,7 +3510,7 @@ const useStyles$4 = core.createStyles((theme) => ({
|
|
|
3488
3510
|
}
|
|
3489
3511
|
}));
|
|
3490
3512
|
const SplitButton$1 = (props) => {
|
|
3491
|
-
const { classes, theme } = useStyles$
|
|
3513
|
+
const { classes, theme } = useStyles$3();
|
|
3492
3514
|
theme.colors[theme.primaryColor][theme.colorScheme === "dark" ? 5 : 6];
|
|
3493
3515
|
return /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: "sm" }, /* @__PURE__ */ React__namespace.createElement(
|
|
3494
3516
|
core.Button,
|
|
@@ -3545,7 +3567,10 @@ var __spreadValues$1 = (a, b) => {
|
|
|
3545
3567
|
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
3546
3568
|
function Table$2(props) {
|
|
3547
3569
|
const preparedItems = React__namespace.useMemo(() => {
|
|
3548
|
-
|
|
3570
|
+
console.group("Pathway Table Data Check");
|
|
3571
|
+
console.log("Raw items from props:", props.items);
|
|
3572
|
+
console.log("Categories available:", props.categories);
|
|
3573
|
+
const mapped = props.items.map((item) => {
|
|
3549
3574
|
const flatItem = __spreadProps$1(__spreadValues$1({}, item), {
|
|
3550
3575
|
status: item.isComplete ? 1 : 0
|
|
3551
3576
|
});
|
|
@@ -3556,6 +3581,19 @@ function Table$2(props) {
|
|
|
3556
3581
|
}
|
|
3557
3582
|
return flatItem;
|
|
3558
3583
|
});
|
|
3584
|
+
console.log("Transformed items (Flat):", mapped);
|
|
3585
|
+
if (mapped.length > 0 && props.categories.length > 0) {
|
|
3586
|
+
const firstStudent = mapped[0];
|
|
3587
|
+
const firstCatId = props.categories[0].categoryId;
|
|
3588
|
+
console.log(
|
|
3589
|
+
`Matching Check: Does student have key [${firstCatId}]?`,
|
|
3590
|
+
firstStudent.hasOwnProperty(firstCatId) ? "YES \u2705" : "NO \u274C",
|
|
3591
|
+
"Value:",
|
|
3592
|
+
firstStudent[firstCatId]
|
|
3593
|
+
);
|
|
3594
|
+
}
|
|
3595
|
+
console.groupEnd();
|
|
3596
|
+
return mapped;
|
|
3559
3597
|
}, [props.items, props.categories]);
|
|
3560
3598
|
const { items: sortedItems, requestSort, sortConfig } = useSortableData(preparedItems);
|
|
3561
3599
|
if (props.items.length === 0) {
|
|
@@ -3620,21 +3658,6 @@ function Table$2(props) {
|
|
|
3620
3658
|
));
|
|
3621
3659
|
}
|
|
3622
3660
|
|
|
3623
|
-
const useStyles$3 = core.createStyles((theme) => ({
|
|
3624
|
-
th: { padding: "0 !important" },
|
|
3625
|
-
control: {
|
|
3626
|
-
width: "100%",
|
|
3627
|
-
padding: `${theme.spacing.xs}px ${theme.spacing.md}px`,
|
|
3628
|
-
"&:hover": {
|
|
3629
|
-
backgroundColor: theme.colorScheme === "dark" ? theme.colors.dark[6] : theme.colors.gray[0]
|
|
3630
|
-
}
|
|
3631
|
-
}
|
|
3632
|
-
}));
|
|
3633
|
-
function Th({ children, reversed, sorted, onSort }) {
|
|
3634
|
-
const { classes } = useStyles$3();
|
|
3635
|
-
const Icon = sorted ? reversed ? icons.IconChevronUp : icons.IconChevronDown : icons.IconSelector;
|
|
3636
|
-
return /* @__PURE__ */ React__namespace.createElement("th", { className: classes.th }, /* @__PURE__ */ React__namespace.createElement(core.UnstyledButton, { onClick: onSort, className: classes.control }, /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "apart", noWrap: true, spacing: "xs" }, /* @__PURE__ */ React__namespace.createElement(core.Text, { weight: 500, size: "sm", sx: { whiteSpace: "nowrap" } }, children), /* @__PURE__ */ React__namespace.createElement(core.Center, null, /* @__PURE__ */ React__namespace.createElement(Icon, { size: 14, stroke: 1.5 })))));
|
|
3637
|
-
}
|
|
3638
3661
|
function Table$1(props) {
|
|
3639
3662
|
const { items: sortedItems, requestSort, sortConfig } = useSortableData(props.items);
|
|
3640
3663
|
if (props.items.length === 0) {
|
|
@@ -3648,27 +3671,40 @@ function Table$1(props) {
|
|
|
3648
3671
|
}
|
|
3649
3672
|
);
|
|
3650
3673
|
}
|
|
3651
|
-
const
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
}
|
|
3655
|
-
return /* @__PURE__ */ React__namespace.createElement(core.ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React__namespace.createElement(
|
|
3656
|
-
|
|
3657
|
-
{
|
|
3658
|
-
sorted: sortConfig.key === "badgeName",
|
|
3659
|
-
reversed: sortConfig.direction === "desc",
|
|
3660
|
-
onSort: () => requestSort("badgeName")
|
|
3661
|
-
},
|
|
3662
|
-
"Badge Name"
|
|
3663
|
-
), /* @__PURE__ */ React__namespace.createElement(
|
|
3664
|
-
Th,
|
|
3674
|
+
const sortStatus = {
|
|
3675
|
+
columnAccessor: sortConfig.key,
|
|
3676
|
+
direction: sortConfig.direction === "desc" ? "desc" : "asc"
|
|
3677
|
+
};
|
|
3678
|
+
return /* @__PURE__ */ React__namespace.createElement(core.ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React__namespace.createElement(
|
|
3679
|
+
mantineDatatable.DataTable,
|
|
3665
3680
|
{
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3681
|
+
verticalSpacing: "sm",
|
|
3682
|
+
sx: { minWidth: 700 },
|
|
3683
|
+
highlightOnHover: true,
|
|
3684
|
+
striped: true,
|
|
3685
|
+
records: sortedItems,
|
|
3686
|
+
idAccessor: "badgeId",
|
|
3687
|
+
sortStatus,
|
|
3688
|
+
onSortStatusChange: (status) => requestSort(status.columnAccessor),
|
|
3689
|
+
columns: [
|
|
3690
|
+
{
|
|
3691
|
+
accessor: "badgeName",
|
|
3692
|
+
title: "Badge Name",
|
|
3693
|
+
sortable: true,
|
|
3694
|
+
render: (row) => /* @__PURE__ */ React__namespace.createElement(core.Text, { component: reactRouterDom.Link, to: row.href, color: "blue" }, row.badgeName)
|
|
3695
|
+
},
|
|
3696
|
+
{
|
|
3697
|
+
accessor: "percentageCompletion",
|
|
3698
|
+
title: "Badge Completion",
|
|
3699
|
+
sortable: true,
|
|
3700
|
+
render: (row) => {
|
|
3701
|
+
const roundedValue = Math.round((row.percentageCompletion + Number.EPSILON) * 100);
|
|
3702
|
+
return `${roundedValue}%`;
|
|
3703
|
+
}
|
|
3704
|
+
}
|
|
3705
|
+
]
|
|
3706
|
+
}
|
|
3707
|
+
));
|
|
3672
3708
|
}
|
|
3673
3709
|
|
|
3674
3710
|
const useStyles$2 = core.createStyles((theme) => ({
|
|
@@ -3797,7 +3833,18 @@ const SplitButton = (props) => {
|
|
|
3797
3833
|
function Stack(props) {
|
|
3798
3834
|
if (!props.items.length)
|
|
3799
3835
|
return null;
|
|
3800
|
-
return /* @__PURE__ */ React__namespace.createElement(core.Grid, { gutter: "md", sx: { padding: 20, minWidth: 700 } }, /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span:
|
|
3836
|
+
return /* @__PURE__ */ React__namespace.createElement(core.Grid, { gutter: "md", sx: { padding: 20, minWidth: 700 } }, /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span: 3 }, /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dark.4", weight: "bold", size: "md" }, "Link")), /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span: 3 }, /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dark.4", weight: "bold", size: "md" }, "Badge")), /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span: 3 }, /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dark.4", weight: "bold", size: "md" }, "Lesson")), /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span: 3 }, /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dark.4", weight: "bold", size: "md" }, "Question")), props.items.map((row, i) => /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, { key: i }, /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span: 3 }, /* @__PURE__ */ React__namespace.createElement(
|
|
3837
|
+
core.Button,
|
|
3838
|
+
{
|
|
3839
|
+
component: "a",
|
|
3840
|
+
href: row.link,
|
|
3841
|
+
target: "_blank",
|
|
3842
|
+
rel: "noopener noreferrer",
|
|
3843
|
+
size: "xs",
|
|
3844
|
+
variant: "light"
|
|
3845
|
+
},
|
|
3846
|
+
"View File"
|
|
3847
|
+
)), /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span: 3 }, /* @__PURE__ */ React__namespace.createElement(core.Text, null, row.badgeName)), /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span: 3 }, /* @__PURE__ */ React__namespace.createElement(core.Text, null, row.lessonName)), /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span: 3 }, /* @__PURE__ */ React__namespace.createElement(core.Text, null, row.question)))));
|
|
3801
3848
|
}
|
|
3802
3849
|
|
|
3803
3850
|
var __defProp = Object.defineProperty;
|