@local-civics/mgmt-ui 0.1.72 → 0.1.74
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 +72 -1
- package/dist/index.js +546 -173
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +546 -176
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -11,6 +11,8 @@ var form = require('@mantine/form');
|
|
|
11
11
|
var papa = require('papaparse');
|
|
12
12
|
var modals = require('@mantine/modals');
|
|
13
13
|
var reactCharts = require('react-charts');
|
|
14
|
+
var AvatarInit = require('avatar-initials');
|
|
15
|
+
var hooks = require('@mantine/hooks');
|
|
14
16
|
|
|
15
17
|
function _interopNamespaceDefault(e) {
|
|
16
18
|
var n = Object.create(null);
|
|
@@ -32,7 +34,7 @@ function _interopNamespaceDefault(e) {
|
|
|
32
34
|
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
33
35
|
var papa__namespace = /*#__PURE__*/_interopNamespaceDefault(papa);
|
|
34
36
|
|
|
35
|
-
const useStyles$
|
|
37
|
+
const useStyles$p = core.createStyles((theme) => ({
|
|
36
38
|
link: {
|
|
37
39
|
width: 50,
|
|
38
40
|
height: 50,
|
|
@@ -60,7 +62,7 @@ const data$1 = [
|
|
|
60
62
|
{ icon: icons.IconLambda, label: "Lessons", href: "/lessons" }
|
|
61
63
|
];
|
|
62
64
|
const NavbarLink = ({ icon: Icon, label, active, onClick }) => {
|
|
63
|
-
const { classes, cx } = useStyles$
|
|
65
|
+
const { classes, cx } = useStyles$p();
|
|
64
66
|
return /* @__PURE__ */ React__namespace.createElement(core.Tooltip, { label, position: "right", transitionDuration: 0 }, /* @__PURE__ */ React__namespace.createElement(core.UnstyledButton, { onClick, className: cx(classes.link, { [classes.active]: active }) }, /* @__PURE__ */ React__namespace.createElement(Icon, { stroke: 1.5 })));
|
|
65
67
|
};
|
|
66
68
|
const Navbar = (props) => {
|
|
@@ -91,35 +93,35 @@ const Navbar = (props) => {
|
|
|
91
93
|
))));
|
|
92
94
|
};
|
|
93
95
|
|
|
94
|
-
var __defProp$
|
|
95
|
-
var __getOwnPropSymbols$
|
|
96
|
-
var __hasOwnProp$
|
|
97
|
-
var __propIsEnum$
|
|
98
|
-
var __defNormalProp$
|
|
99
|
-
var __spreadValues$
|
|
96
|
+
var __defProp$9 = Object.defineProperty;
|
|
97
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
98
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
99
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
100
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
101
|
+
var __spreadValues$9 = (a, b) => {
|
|
100
102
|
for (var prop in b || (b = {}))
|
|
101
|
-
if (__hasOwnProp$
|
|
102
|
-
__defNormalProp$
|
|
103
|
-
if (__getOwnPropSymbols$
|
|
104
|
-
for (var prop of __getOwnPropSymbols$
|
|
105
|
-
if (__propIsEnum$
|
|
106
|
-
__defNormalProp$
|
|
103
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
104
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
105
|
+
if (__getOwnPropSymbols$9)
|
|
106
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
107
|
+
if (__propIsEnum$9.call(b, prop))
|
|
108
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
107
109
|
}
|
|
108
110
|
return a;
|
|
109
111
|
};
|
|
110
|
-
var __objRest$
|
|
112
|
+
var __objRest$2 = (source, exclude) => {
|
|
111
113
|
var target = {};
|
|
112
114
|
for (var prop in source)
|
|
113
|
-
if (__hasOwnProp$
|
|
115
|
+
if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
114
116
|
target[prop] = source[prop];
|
|
115
|
-
if (source != null && __getOwnPropSymbols$
|
|
116
|
-
for (var prop of __getOwnPropSymbols$
|
|
117
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
117
|
+
if (source != null && __getOwnPropSymbols$9)
|
|
118
|
+
for (var prop of __getOwnPropSymbols$9(source)) {
|
|
119
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
|
|
118
120
|
target[prop] = source[prop];
|
|
119
121
|
}
|
|
120
122
|
return target;
|
|
121
123
|
};
|
|
122
|
-
const useStyles$
|
|
124
|
+
const useStyles$o = core.createStyles((theme) => ({
|
|
123
125
|
user: {
|
|
124
126
|
display: "block",
|
|
125
127
|
width: "100%",
|
|
@@ -129,9 +131,9 @@ const useStyles$l = core.createStyles((theme) => ({
|
|
|
129
131
|
}
|
|
130
132
|
}));
|
|
131
133
|
function UserButton(_a) {
|
|
132
|
-
var _b = _a, { image, name, email, icon } = _b, others = __objRest$
|
|
133
|
-
const { classes } = useStyles$
|
|
134
|
-
return /* @__PURE__ */ React__namespace.createElement(core.Group, __spreadValues$
|
|
134
|
+
var _b = _a, { image, name, email, icon } = _b, others = __objRest$2(_b, ["image", "name", "email", "icon"]);
|
|
135
|
+
const { classes } = useStyles$o();
|
|
136
|
+
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)));
|
|
135
137
|
}
|
|
136
138
|
|
|
137
139
|
const compact = (num) => {
|
|
@@ -141,7 +143,7 @@ const compact = (num) => {
|
|
|
141
143
|
}).format(num || 0);
|
|
142
144
|
};
|
|
143
145
|
|
|
144
|
-
const useStyles$
|
|
146
|
+
const useStyles$n = core.createStyles((theme, _params, getRef) => {
|
|
145
147
|
const icon = getRef("icon");
|
|
146
148
|
return {
|
|
147
149
|
control: {
|
|
@@ -194,7 +196,7 @@ const useStyles$k = core.createStyles((theme, _params, getRef) => {
|
|
|
194
196
|
};
|
|
195
197
|
});
|
|
196
198
|
function LinksGroup({ icon: Icon, href, label, initiallyOpened, links, active, notifications }) {
|
|
197
|
-
const { classes, theme, cx } = useStyles$
|
|
199
|
+
const { classes, theme, cx } = useStyles$n();
|
|
198
200
|
const hasLinks = Array.isArray(links) && links.length > 0;
|
|
199
201
|
const hasActiveLinks = Array.isArray(links) && links.map((l) => !!active && active === `${label}/${l.label}`).reduce((a, b) => a || b, false);
|
|
200
202
|
const [opened, setOpened] = React.useState(initiallyOpened || hasActiveLinks || false);
|
|
@@ -239,26 +241,26 @@ function LinksGroup({ icon: Icon, href, label, initiallyOpened, links, active, n
|
|
|
239
241
|
), hasLinks ? /* @__PURE__ */ React__namespace.createElement(core.Collapse, { in: opened }, items) : null);
|
|
240
242
|
}
|
|
241
243
|
|
|
242
|
-
var __defProp$
|
|
243
|
-
var __defProps$
|
|
244
|
-
var __getOwnPropDescs$
|
|
245
|
-
var __getOwnPropSymbols$
|
|
246
|
-
var __hasOwnProp$
|
|
247
|
-
var __propIsEnum$
|
|
248
|
-
var __defNormalProp$
|
|
249
|
-
var __spreadValues$
|
|
244
|
+
var __defProp$8 = Object.defineProperty;
|
|
245
|
+
var __defProps$5 = Object.defineProperties;
|
|
246
|
+
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
247
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
248
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
249
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
250
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
251
|
+
var __spreadValues$8 = (a, b) => {
|
|
250
252
|
for (var prop in b || (b = {}))
|
|
251
|
-
if (__hasOwnProp$
|
|
252
|
-
__defNormalProp$
|
|
253
|
-
if (__getOwnPropSymbols$
|
|
254
|
-
for (var prop of __getOwnPropSymbols$
|
|
255
|
-
if (__propIsEnum$
|
|
256
|
-
__defNormalProp$
|
|
253
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
254
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
255
|
+
if (__getOwnPropSymbols$8)
|
|
256
|
+
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
257
|
+
if (__propIsEnum$8.call(b, prop))
|
|
258
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
257
259
|
}
|
|
258
260
|
return a;
|
|
259
261
|
};
|
|
260
|
-
var __spreadProps$
|
|
261
|
-
const useStyles$
|
|
262
|
+
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
263
|
+
const useStyles$m = core.createStyles((theme, _params, getRef) => {
|
|
262
264
|
const icon = getRef("icon");
|
|
263
265
|
return {
|
|
264
266
|
navbar: {
|
|
@@ -289,7 +291,7 @@ const useStyles$j = core.createStyles((theme, _params, getRef) => {
|
|
|
289
291
|
color: theme.colorScheme === "dark" ? theme.white : theme.black,
|
|
290
292
|
borderBottom: `1px solid ${theme.colorScheme === "dark" ? theme.colors.dark[4] : theme.colors.gray[3]}`
|
|
291
293
|
},
|
|
292
|
-
link: __spreadProps$
|
|
294
|
+
link: __spreadProps$5(__spreadValues$8({}, theme.fn.focusStyles()), {
|
|
293
295
|
display: "flex",
|
|
294
296
|
alignItems: "center",
|
|
295
297
|
textDecoration: "none",
|
|
@@ -352,27 +354,27 @@ const data = [
|
|
|
352
354
|
}
|
|
353
355
|
];
|
|
354
356
|
function NestedNavbar(props) {
|
|
355
|
-
const { classes, cx } = useStyles$
|
|
357
|
+
const { classes, cx } = useStyles$m();
|
|
356
358
|
const [burgerOpen, setBurgerOpen] = React__namespace.useState(false);
|
|
357
359
|
const toggle = () => setBurgerOpen(!burgerOpen);
|
|
358
360
|
const links = data.map((item) => {
|
|
359
361
|
const context = props.links[item.label] || { notifications: 0, href: "" };
|
|
360
|
-
if (context.hidden) {
|
|
362
|
+
if (context.hidden || props.trial && item.label !== "Home") {
|
|
361
363
|
return null;
|
|
362
364
|
}
|
|
363
365
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
364
366
|
LinksGroup,
|
|
365
|
-
__spreadProps$
|
|
367
|
+
__spreadProps$5(__spreadValues$8(__spreadValues$8({
|
|
366
368
|
key: item.label,
|
|
367
369
|
active: props.active
|
|
368
370
|
}, item), context), {
|
|
369
371
|
links: (item.links || []).map((link) => {
|
|
370
|
-
return __spreadValues$
|
|
372
|
+
return __spreadValues$8(__spreadValues$8({}, link), props.links[`${item.label}/${link.label}`] || { notifications: 0, href: "" });
|
|
371
373
|
})
|
|
372
374
|
})
|
|
373
375
|
);
|
|
374
376
|
});
|
|
375
|
-
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(core.Navbar, { width: { sm: 300 }, p: "md", className: cx(classes.navbar, { [classes.navHeader]: !burgerOpen }) }, /* @__PURE__ */ React__namespace.createElement(core.Navbar.Section, { className: classes.header }, /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "apart" }, /* @__PURE__ */ React__namespace.createElement(core.Center, null, /* @__PURE__ */ React__namespace.createElement(core.Avatar, { color: "blue", radius: "sm" }, /* @__PURE__ */ React__namespace.createElement("div", { style: { width: 15, marginLeft: "auto", marginRight: "auto" } }, /* @__PURE__ */ React__namespace.createElement(core.Image, { fit: "contain", src: "https://cdn.localcivics.io/brand/l.png" })))), /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "apart" }, /* @__PURE__ */ React__namespace.createElement(core.Code, { sx: { fontWeight: 700 } }, props.version), /* @__PURE__ */ React__namespace.createElement(core.Burger, { opened: burgerOpen, onClick: toggle, className: classes.burger, size: "sm" })))), /* @__PURE__ */ React__namespace.createElement("div", { className: cx({ [classes.navBody]: !burgerOpen }) }, /* @__PURE__ */ React__namespace.createElement(
|
|
377
|
+
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(core.Navbar, { width: { sm: 300 }, p: "md", className: cx(classes.navbar, { [classes.navHeader]: !burgerOpen }) }, /* @__PURE__ */ React__namespace.createElement(core.Navbar.Section, { className: classes.header }, /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "apart" }, /* @__PURE__ */ React__namespace.createElement(core.Center, null, /* @__PURE__ */ React__namespace.createElement(core.Avatar, { color: "blue", radius: "sm" }, /* @__PURE__ */ React__namespace.createElement("div", { style: { width: 15, marginLeft: "auto", marginRight: "auto" } }, /* @__PURE__ */ React__namespace.createElement(core.Image, { fit: "contain", src: "https://cdn.localcivics.io/brand/l.png" })))), /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "apart" }, /* @__PURE__ */ React__namespace.createElement(core.Code, { sx: { fontWeight: 700 } }, props.version), !!props.trial && /* @__PURE__ */ React__namespace.createElement(core.Badge, { color: "violet", radius: "xs" }, "Trial"), /* @__PURE__ */ React__namespace.createElement(core.Burger, { opened: burgerOpen, onClick: toggle, className: classes.burger, size: "sm" })))), /* @__PURE__ */ React__namespace.createElement("div", { className: cx({ [classes.navBody]: !burgerOpen }) }, /* @__PURE__ */ React__namespace.createElement(
|
|
376
378
|
UserButton,
|
|
377
379
|
{
|
|
378
380
|
className: classes.user,
|
|
@@ -389,7 +391,7 @@ function NestedNavbar(props) {
|
|
|
389
391
|
} }, /* @__PURE__ */ React__namespace.createElement(icons.IconLogout, { className: classes.linkIcon, stroke: 1.5 }), /* @__PURE__ */ React__namespace.createElement("span", null, "Logout"))))));
|
|
390
392
|
}
|
|
391
393
|
|
|
392
|
-
const useStyles$
|
|
394
|
+
const useStyles$l = core.createStyles((theme) => ({
|
|
393
395
|
title: {
|
|
394
396
|
fontSize: 34,
|
|
395
397
|
fontWeight: 900,
|
|
@@ -430,7 +432,7 @@ const useStyles$i = core.createStyles((theme) => ({
|
|
|
430
432
|
}
|
|
431
433
|
}));
|
|
432
434
|
const SwitchAccount = (props) => {
|
|
433
|
-
const { classes, theme } = useStyles$
|
|
435
|
+
const { classes, theme } = useStyles$l();
|
|
434
436
|
const options = props.accounts.map((a) => {
|
|
435
437
|
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")));
|
|
436
438
|
});
|
|
@@ -447,7 +449,7 @@ const SwitchAccount = (props) => {
|
|
|
447
449
|
);
|
|
448
450
|
};
|
|
449
451
|
|
|
450
|
-
const useStyles$
|
|
452
|
+
const useStyles$k = core.createStyles((theme) => ({
|
|
451
453
|
root: {
|
|
452
454
|
display: "flex",
|
|
453
455
|
backgroundImage: `linear-gradient(-60deg, ${theme.colors[theme.primaryColor][4]} 0%, ${theme.colors[theme.primaryColor][7]} 100%)`,
|
|
@@ -494,7 +496,7 @@ const useStyles$h = core.createStyles((theme) => ({
|
|
|
494
496
|
}
|
|
495
497
|
}));
|
|
496
498
|
const StatsGroup = ({ data }) => {
|
|
497
|
-
const { classes } = useStyles$
|
|
499
|
+
const { classes } = useStyles$k();
|
|
498
500
|
const stats = data.map((stat) => {
|
|
499
501
|
const value = (() => {
|
|
500
502
|
if (stat.unit === "%") {
|
|
@@ -513,7 +515,7 @@ const Tabs = (props) => {
|
|
|
513
515
|
return /* @__PURE__ */ React__namespace.createElement(core.Tabs, { value: props.value, onTabChange: props.onChange }, /* @__PURE__ */ React__namespace.createElement(core.Tabs.List, null, tabs));
|
|
514
516
|
};
|
|
515
517
|
|
|
516
|
-
const useStyles$
|
|
518
|
+
const useStyles$j = core.createStyles((theme) => ({
|
|
517
519
|
button: {
|
|
518
520
|
borderTopRightRadius: 0,
|
|
519
521
|
borderBottomRightRadius: 0,
|
|
@@ -528,7 +530,7 @@ const useStyles$g = core.createStyles((theme) => ({
|
|
|
528
530
|
}
|
|
529
531
|
}));
|
|
530
532
|
const SplitButton$3 = (props) => {
|
|
531
|
-
const { classes, theme } = useStyles$
|
|
533
|
+
const { classes, theme } = useStyles$j();
|
|
532
534
|
const menuIconColor = theme.colors[theme.primaryColor][theme.colorScheme === "dark" ? 5 : 6];
|
|
533
535
|
return /* @__PURE__ */ React__namespace.createElement(core.Group, { noWrap: true, spacing: 0 }, /* @__PURE__ */ React__namespace.createElement(
|
|
534
536
|
core.Button,
|
|
@@ -565,7 +567,7 @@ const SplitButton$3 = (props) => {
|
|
|
565
567
|
))));
|
|
566
568
|
};
|
|
567
569
|
|
|
568
|
-
const useStyles$
|
|
570
|
+
const useStyles$i = core.createStyles((theme) => ({
|
|
569
571
|
wrapper: {
|
|
570
572
|
display: "flex",
|
|
571
573
|
alignItems: "center",
|
|
@@ -616,7 +618,7 @@ const useStyles$f = core.createStyles((theme) => ({
|
|
|
616
618
|
}
|
|
617
619
|
}));
|
|
618
620
|
const PlaceholderBanner = (props) => {
|
|
619
|
-
const { classes } = useStyles$
|
|
621
|
+
const { classes } = useStyles$i();
|
|
620
622
|
const title = props.title || "Nothing to display";
|
|
621
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.";
|
|
622
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 }));
|
|
@@ -688,7 +690,7 @@ function Table$f(props) {
|
|
|
688
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)));
|
|
689
691
|
}
|
|
690
692
|
|
|
691
|
-
const useStyles$
|
|
693
|
+
const useStyles$h = core.createStyles((theme) => ({
|
|
692
694
|
title: {
|
|
693
695
|
fontSize: 34,
|
|
694
696
|
fontWeight: 900,
|
|
@@ -701,7 +703,7 @@ const useStyles$e = core.createStyles((theme) => ({
|
|
|
701
703
|
}
|
|
702
704
|
}));
|
|
703
705
|
const Badge = (props) => {
|
|
704
|
-
const { classes } = useStyles$
|
|
706
|
+
const { classes } = useStyles$h();
|
|
705
707
|
const [tab, setTab] = React.useState("lessons");
|
|
706
708
|
const numberOfStudents = props.students.length;
|
|
707
709
|
const percentageOfBadgesEarned = numberOfStudents > 0 ? props.students.filter((u) => u.isComplete).length / numberOfStudents : 0;
|
|
@@ -712,7 +714,7 @@ const Badge = (props) => {
|
|
|
712
714
|
leftSection: /* @__PURE__ */ React__namespace.createElement(core.ActionIcon, { color: "blue", size: "xs", radius: "xl", variant: "filled" }, /* @__PURE__ */ React__namespace.createElement(icons.IconArrowLeft, { size: 14 })),
|
|
713
715
|
size: "lg"
|
|
714
716
|
},
|
|
715
|
-
"
|
|
717
|
+
"Go Back"
|
|
716
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")), /* @__PURE__ */ React__namespace.createElement(core.Stack, { ml: "auto" }, /* @__PURE__ */ React__namespace.createElement(
|
|
717
719
|
SplitButton$3,
|
|
718
720
|
{
|
|
@@ -726,7 +728,7 @@ const Badge = (props) => {
|
|
|
726
728
|
value: percentageOfBadgesEarned,
|
|
727
729
|
unit: "%"
|
|
728
730
|
}
|
|
729
|
-
] }), /* @__PURE__ */ React__namespace.createElement(
|
|
731
|
+
] }), !props.trial && /* @__PURE__ */ React__namespace.createElement(
|
|
730
732
|
core.Select,
|
|
731
733
|
{
|
|
732
734
|
clearable: true,
|
|
@@ -741,7 +743,7 @@ const Badge = (props) => {
|
|
|
741
743
|
return { value: g.classId, label: g.name };
|
|
742
744
|
})
|
|
743
745
|
}
|
|
744
|
-
), /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: 0 }, /* @__PURE__ */ React__namespace.createElement(
|
|
746
|
+
), /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: 0 }, !props.trial && /* @__PURE__ */ React__namespace.createElement(
|
|
745
747
|
Tabs,
|
|
746
748
|
{
|
|
747
749
|
value: tab,
|
|
@@ -751,13 +753,13 @@ const Badge = (props) => {
|
|
|
751
753
|
],
|
|
752
754
|
onChange: setTab
|
|
753
755
|
}
|
|
754
|
-
), tab === "lessons" && /* @__PURE__ */ React__namespace.createElement(
|
|
756
|
+
), (!!props.trial || tab === "lessons") && /* @__PURE__ */ React__namespace.createElement(
|
|
755
757
|
Table$f,
|
|
756
758
|
{
|
|
757
759
|
loading: props.loading,
|
|
758
760
|
items: props.lessons
|
|
759
761
|
}
|
|
760
|
-
), tab === "students" && /* @__PURE__ */ React__namespace.createElement(
|
|
762
|
+
), !props.trial && tab === "students" && /* @__PURE__ */ React__namespace.createElement(
|
|
761
763
|
Table$g,
|
|
762
764
|
{
|
|
763
765
|
loading: props.loading,
|
|
@@ -798,7 +800,7 @@ function Table$e(props) {
|
|
|
798
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)));
|
|
799
801
|
}
|
|
800
802
|
|
|
801
|
-
const useStyles$
|
|
803
|
+
const useStyles$g = core.createStyles((theme) => ({
|
|
802
804
|
title: {
|
|
803
805
|
fontSize: 34,
|
|
804
806
|
fontWeight: 900,
|
|
@@ -811,7 +813,7 @@ const useStyles$d = core.createStyles((theme) => ({
|
|
|
811
813
|
}
|
|
812
814
|
}));
|
|
813
815
|
const Badges = (props) => {
|
|
814
|
-
const { classes } = useStyles$
|
|
816
|
+
const { classes } = useStyles$g();
|
|
815
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(
|
|
816
818
|
core.Autocomplete,
|
|
817
819
|
{
|
|
@@ -1066,26 +1068,26 @@ function Table$8(props) {
|
|
|
1066
1068
|
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("th", null, "Name"), /* @__PURE__ */ React__namespace.createElement("th", null, "Role"), /* @__PURE__ */ React__namespace.createElement("th", null, "Badges Earned"), /* @__PURE__ */ React__namespace.createElement("th", null, "Lessons Completed"), /* @__PURE__ */ React__namespace.createElement("th", null, "Account Created?"), /* @__PURE__ */ React__namespace.createElement("th", null, "Last Active"), /* @__PURE__ */ React__namespace.createElement("th", null))), /* @__PURE__ */ React__namespace.createElement("tbody", null, rows)));
|
|
1067
1069
|
}
|
|
1068
1070
|
|
|
1069
|
-
var __defProp$
|
|
1070
|
-
var __defProps$
|
|
1071
|
-
var __getOwnPropDescs$
|
|
1072
|
-
var __getOwnPropSymbols$
|
|
1073
|
-
var __hasOwnProp$
|
|
1074
|
-
var __propIsEnum$
|
|
1075
|
-
var __defNormalProp$
|
|
1076
|
-
var __spreadValues$
|
|
1071
|
+
var __defProp$7 = Object.defineProperty;
|
|
1072
|
+
var __defProps$4 = Object.defineProperties;
|
|
1073
|
+
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
1074
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
1075
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
1076
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
1077
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1078
|
+
var __spreadValues$7 = (a, b) => {
|
|
1077
1079
|
for (var prop in b || (b = {}))
|
|
1078
|
-
if (__hasOwnProp$
|
|
1079
|
-
__defNormalProp$
|
|
1080
|
-
if (__getOwnPropSymbols$
|
|
1081
|
-
for (var prop of __getOwnPropSymbols$
|
|
1082
|
-
if (__propIsEnum$
|
|
1083
|
-
__defNormalProp$
|
|
1080
|
+
if (__hasOwnProp$7.call(b, prop))
|
|
1081
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
1082
|
+
if (__getOwnPropSymbols$7)
|
|
1083
|
+
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
1084
|
+
if (__propIsEnum$7.call(b, prop))
|
|
1085
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
1084
1086
|
}
|
|
1085
1087
|
return a;
|
|
1086
1088
|
};
|
|
1087
|
-
var __spreadProps$
|
|
1088
|
-
const useStyles$
|
|
1089
|
+
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
1090
|
+
const useStyles$f = core.createStyles((theme) => ({
|
|
1089
1091
|
title: {
|
|
1090
1092
|
fontSize: 34,
|
|
1091
1093
|
fontWeight: 900,
|
|
@@ -1118,7 +1120,7 @@ const useStyles$c = core.createStyles((theme) => ({
|
|
|
1118
1120
|
}
|
|
1119
1121
|
}));
|
|
1120
1122
|
const Class = (props) => {
|
|
1121
|
-
const { classes } = useStyles$
|
|
1123
|
+
const { classes } = useStyles$f();
|
|
1122
1124
|
const form$1 = form.useForm({
|
|
1123
1125
|
initialValues: {
|
|
1124
1126
|
classId: "",
|
|
@@ -1150,27 +1152,27 @@ const Class = (props) => {
|
|
|
1150
1152
|
padding: "xl",
|
|
1151
1153
|
size: "xl"
|
|
1152
1154
|
},
|
|
1153
|
-
/* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: "md" }, /* @__PURE__ */ React__namespace.createElement(DropzoneButton$1, __spreadProps$
|
|
1155
|
+
/* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: "md" }, /* @__PURE__ */ React__namespace.createElement(DropzoneButton$1, __spreadProps$4(__spreadValues$7({}, props), { close: () => setOpened(false) })), /* @__PURE__ */ React__namespace.createElement(core.Divider, { label: "or", labelPosition: "center", my: "md", variant: "dashed" }), /* @__PURE__ */ React__namespace.createElement("form", { onSubmit: form$1.onSubmit(() => {
|
|
1154
1156
|
const values = form$1.values;
|
|
1155
1157
|
form$1.reset();
|
|
1156
1158
|
setOpened(false);
|
|
1157
1159
|
props.onCreateMembers && props.onCreateMembers([values]);
|
|
1158
1160
|
}) }, /* @__PURE__ */ React__namespace.createElement(core.Stack, null, /* @__PURE__ */ React__namespace.createElement(
|
|
1159
1161
|
core.TextInput,
|
|
1160
|
-
__spreadValues$
|
|
1162
|
+
__spreadValues$7({
|
|
1161
1163
|
withAsterisk: true,
|
|
1162
1164
|
label: "Email",
|
|
1163
1165
|
placeholder: "Email"
|
|
1164
1166
|
}, form$1.getInputProps("email"))
|
|
1165
1167
|
), /* @__PURE__ */ React__namespace.createElement(core.Group, { grow: true }, /* @__PURE__ */ React__namespace.createElement(
|
|
1166
1168
|
core.TextInput,
|
|
1167
|
-
__spreadValues$
|
|
1169
|
+
__spreadValues$7({
|
|
1168
1170
|
label: "Given name",
|
|
1169
1171
|
placeholder: "Given name"
|
|
1170
1172
|
}, form$1.getInputProps("givenName"))
|
|
1171
1173
|
), /* @__PURE__ */ React__namespace.createElement(
|
|
1172
1174
|
core.TextInput,
|
|
1173
|
-
__spreadValues$
|
|
1175
|
+
__spreadValues$7({
|
|
1174
1176
|
label: "Family name",
|
|
1175
1177
|
placeholder: "Family name"
|
|
1176
1178
|
}, form$1.getInputProps("familyName"))
|
|
@@ -1182,7 +1184,7 @@ const Class = (props) => {
|
|
|
1182
1184
|
leftSection: /* @__PURE__ */ React__namespace.createElement(core.ActionIcon, { color: "blue", size: "xs", radius: "xl", variant: "filled" }, /* @__PURE__ */ React__namespace.createElement(icons.IconArrowLeft, { size: 14 })),
|
|
1183
1185
|
size: "lg"
|
|
1184
1186
|
},
|
|
1185
|
-
"
|
|
1187
|
+
"Go Back"
|
|
1186
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(
|
|
1187
1189
|
SplitButton$2,
|
|
1188
1190
|
{
|
|
@@ -1218,7 +1220,7 @@ const Class = (props) => {
|
|
|
1218
1220
|
))))));
|
|
1219
1221
|
};
|
|
1220
1222
|
const DropzoneButton$1 = (props) => {
|
|
1221
|
-
const { classes, theme } = useStyles$
|
|
1223
|
+
const { classes, theme } = useStyles$f();
|
|
1222
1224
|
const openRef = React__namespace.useRef(null);
|
|
1223
1225
|
const [loading, setLoading] = React__namespace.useState(false);
|
|
1224
1226
|
const onDrop = React__namespace.useCallback((acceptedFiles) => {
|
|
@@ -1288,23 +1290,23 @@ function Table$7(props) {
|
|
|
1288
1290
|
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("th", null, "Class Name"), /* @__PURE__ */ React__namespace.createElement("th", null, "Description"), /* @__PURE__ */ React__namespace.createElement("th", null, "# of Students"), /* @__PURE__ */ React__namespace.createElement("th", null))), /* @__PURE__ */ React__namespace.createElement("tbody", null, rows)));
|
|
1289
1291
|
}
|
|
1290
1292
|
|
|
1291
|
-
var __defProp$
|
|
1292
|
-
var __getOwnPropSymbols$
|
|
1293
|
-
var __hasOwnProp$
|
|
1294
|
-
var __propIsEnum$
|
|
1295
|
-
var __defNormalProp$
|
|
1296
|
-
var __spreadValues$
|
|
1293
|
+
var __defProp$6 = Object.defineProperty;
|
|
1294
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
1295
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
1296
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
1297
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1298
|
+
var __spreadValues$6 = (a, b) => {
|
|
1297
1299
|
for (var prop in b || (b = {}))
|
|
1298
|
-
if (__hasOwnProp$
|
|
1299
|
-
__defNormalProp$
|
|
1300
|
-
if (__getOwnPropSymbols$
|
|
1301
|
-
for (var prop of __getOwnPropSymbols$
|
|
1302
|
-
if (__propIsEnum$
|
|
1303
|
-
__defNormalProp$
|
|
1300
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
1301
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
1302
|
+
if (__getOwnPropSymbols$6)
|
|
1303
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
1304
|
+
if (__propIsEnum$6.call(b, prop))
|
|
1305
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
1304
1306
|
}
|
|
1305
1307
|
return a;
|
|
1306
1308
|
};
|
|
1307
|
-
const useStyles$
|
|
1309
|
+
const useStyles$e = core.createStyles((theme) => ({
|
|
1308
1310
|
title: {
|
|
1309
1311
|
fontSize: 34,
|
|
1310
1312
|
fontWeight: 900,
|
|
@@ -1317,7 +1319,7 @@ const useStyles$b = core.createStyles((theme) => ({
|
|
|
1317
1319
|
}
|
|
1318
1320
|
}));
|
|
1319
1321
|
const Classes = (props) => {
|
|
1320
|
-
const { classes } = useStyles$
|
|
1322
|
+
const { classes } = useStyles$e();
|
|
1321
1323
|
const form$1 = form.useForm({
|
|
1322
1324
|
initialValues: {
|
|
1323
1325
|
classId: "",
|
|
@@ -1347,14 +1349,14 @@ const Classes = (props) => {
|
|
|
1347
1349
|
props.onCreateClass && props.onCreateClass(values);
|
|
1348
1350
|
}) }, /* @__PURE__ */ React__namespace.createElement(core.Stack, null, /* @__PURE__ */ React__namespace.createElement(
|
|
1349
1351
|
core.TextInput,
|
|
1350
|
-
__spreadValues$
|
|
1352
|
+
__spreadValues$6({
|
|
1351
1353
|
withAsterisk: true,
|
|
1352
1354
|
label: "Name",
|
|
1353
1355
|
placeholder: "Class name"
|
|
1354
1356
|
}, form$1.getInputProps("name"))
|
|
1355
1357
|
), /* @__PURE__ */ React__namespace.createElement(
|
|
1356
1358
|
core.TextInput,
|
|
1357
|
-
__spreadValues$
|
|
1359
|
+
__spreadValues$6({
|
|
1358
1360
|
label: "Description",
|
|
1359
1361
|
placeholder: "A class for my first period English students"
|
|
1360
1362
|
}, form$1.getInputProps("description"))
|
|
@@ -1388,7 +1390,7 @@ const Classes = (props) => {
|
|
|
1388
1390
|
))))));
|
|
1389
1391
|
};
|
|
1390
1392
|
|
|
1391
|
-
const useStyles$
|
|
1393
|
+
const useStyles$d = core.createStyles((theme) => ({
|
|
1392
1394
|
title: {
|
|
1393
1395
|
fontSize: 34,
|
|
1394
1396
|
fontWeight: 900,
|
|
@@ -1402,7 +1404,7 @@ const useStyles$a = core.createStyles((theme) => ({
|
|
|
1402
1404
|
}
|
|
1403
1405
|
}));
|
|
1404
1406
|
const UserInfo = (props) => {
|
|
1405
|
-
const { classes } = useStyles$
|
|
1407
|
+
const { classes } = useStyles$d();
|
|
1406
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));
|
|
1407
1409
|
};
|
|
1408
1410
|
|
|
@@ -1485,7 +1487,7 @@ const Student = (props) => {
|
|
|
1485
1487
|
leftSection: /* @__PURE__ */ React__namespace.createElement(core.ActionIcon, { color: "blue", size: "xs", radius: "xl", variant: "filled" }, /* @__PURE__ */ React__namespace.createElement(icons.IconArrowLeft, { size: 14 })),
|
|
1486
1488
|
size: "lg"
|
|
1487
1489
|
},
|
|
1488
|
-
"Back"
|
|
1490
|
+
"Go Back"
|
|
1489
1491
|
)), /* @__PURE__ */ React__namespace.createElement(
|
|
1490
1492
|
UserInfo,
|
|
1491
1493
|
{
|
|
@@ -1540,7 +1542,7 @@ const Student = (props) => {
|
|
|
1540
1542
|
))))));
|
|
1541
1543
|
};
|
|
1542
1544
|
|
|
1543
|
-
const useStyles$
|
|
1545
|
+
const useStyles$c = core.createStyles((theme, props) => {
|
|
1544
1546
|
const from = props.from || "blue";
|
|
1545
1547
|
const to = props.to || "green";
|
|
1546
1548
|
return {
|
|
@@ -1568,7 +1570,7 @@ const useStyles$9 = core.createStyles((theme, props) => {
|
|
|
1568
1570
|
};
|
|
1569
1571
|
});
|
|
1570
1572
|
function CardGradient(props) {
|
|
1571
|
-
const { classes } = useStyles$
|
|
1573
|
+
const { classes } = useStyles$c(props);
|
|
1572
1574
|
const from = props.from || "blue";
|
|
1573
1575
|
const to = props.to || "green";
|
|
1574
1576
|
const icon = props.icon || /* @__PURE__ */ React__namespace.createElement(icons.IconColorSwatch, { size: 28, stroke: 1.5 });
|
|
@@ -1584,39 +1586,40 @@ function CardGradient(props) {
|
|
|
1584
1586
|
), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "xl", weight: 500, mt: "md" }, props.title), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "sm", mt: "sm", color: "dimmed" }, props.description));
|
|
1585
1587
|
}
|
|
1586
1588
|
|
|
1587
|
-
var __defProp$
|
|
1588
|
-
var __getOwnPropSymbols$
|
|
1589
|
-
var __hasOwnProp$
|
|
1590
|
-
var __propIsEnum$
|
|
1591
|
-
var __defNormalProp$
|
|
1592
|
-
var __spreadValues$
|
|
1589
|
+
var __defProp$5 = Object.defineProperty;
|
|
1590
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
1591
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
1592
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
1593
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1594
|
+
var __spreadValues$5 = (a, b) => {
|
|
1593
1595
|
for (var prop in b || (b = {}))
|
|
1594
|
-
if (__hasOwnProp$
|
|
1595
|
-
__defNormalProp$
|
|
1596
|
-
if (__getOwnPropSymbols$
|
|
1597
|
-
for (var prop of __getOwnPropSymbols$
|
|
1598
|
-
if (__propIsEnum$
|
|
1599
|
-
__defNormalProp$
|
|
1596
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
1597
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
1598
|
+
if (__getOwnPropSymbols$5)
|
|
1599
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
1600
|
+
if (__propIsEnum$5.call(b, prop))
|
|
1601
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
1600
1602
|
}
|
|
1601
1603
|
return a;
|
|
1602
1604
|
};
|
|
1603
|
-
var __objRest = (source, exclude) => {
|
|
1605
|
+
var __objRest$1 = (source, exclude) => {
|
|
1604
1606
|
var target = {};
|
|
1605
1607
|
for (var prop in source)
|
|
1606
|
-
if (__hasOwnProp$
|
|
1608
|
+
if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1607
1609
|
target[prop] = source[prop];
|
|
1608
|
-
if (source != null && __getOwnPropSymbols$
|
|
1609
|
-
for (var prop of __getOwnPropSymbols$
|
|
1610
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1610
|
+
if (source != null && __getOwnPropSymbols$5)
|
|
1611
|
+
for (var prop of __getOwnPropSymbols$5(source)) {
|
|
1612
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
|
|
1611
1613
|
target[prop] = source[prop];
|
|
1612
1614
|
}
|
|
1613
1615
|
return target;
|
|
1614
1616
|
};
|
|
1615
|
-
const useStyles$
|
|
1617
|
+
const useStyles$b = core.createStyles((theme) => ({
|
|
1616
1618
|
card: {
|
|
1617
1619
|
height: 240,
|
|
1618
1620
|
backgroundSize: "cover",
|
|
1619
|
-
backgroundPosition: "center"
|
|
1621
|
+
backgroundPosition: "center",
|
|
1622
|
+
whiteSpace: "pre-line"
|
|
1620
1623
|
},
|
|
1621
1624
|
content: {
|
|
1622
1625
|
position: "absolute",
|
|
@@ -1649,7 +1652,7 @@ const TenantBanner = (_a) => {
|
|
|
1649
1652
|
action,
|
|
1650
1653
|
style,
|
|
1651
1654
|
className
|
|
1652
|
-
} = _b, others = __objRest(_b, [
|
|
1655
|
+
} = _b, others = __objRest$1(_b, [
|
|
1653
1656
|
"title",
|
|
1654
1657
|
"description",
|
|
1655
1658
|
"image",
|
|
@@ -1657,12 +1660,12 @@ const TenantBanner = (_a) => {
|
|
|
1657
1660
|
"style",
|
|
1658
1661
|
"className"
|
|
1659
1662
|
]);
|
|
1660
|
-
const { classes, cx, theme } = useStyles$
|
|
1663
|
+
const { classes, cx, theme } = useStyles$b();
|
|
1661
1664
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
1662
1665
|
core.Card,
|
|
1663
|
-
__spreadValues$
|
|
1666
|
+
__spreadValues$5({
|
|
1664
1667
|
radius: "md",
|
|
1665
|
-
style: __spreadValues$
|
|
1668
|
+
style: __spreadValues$5({ backgroundImage: `url(${image})` }, style),
|
|
1666
1669
|
className: cx(classes.card, className)
|
|
1667
1670
|
}, others),
|
|
1668
1671
|
/* @__PURE__ */ React__namespace.createElement(
|
|
@@ -1755,7 +1758,7 @@ function Table$3(props) {
|
|
|
1755
1758
|
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)));
|
|
1756
1759
|
}
|
|
1757
1760
|
|
|
1758
|
-
const useStyles$
|
|
1761
|
+
const useStyles$a = core.createStyles((theme) => ({
|
|
1759
1762
|
button: {
|
|
1760
1763
|
borderTopRightRadius: 0,
|
|
1761
1764
|
borderBottomRightRadius: 0,
|
|
@@ -1770,7 +1773,7 @@ const useStyles$7 = core.createStyles((theme) => ({
|
|
|
1770
1773
|
}
|
|
1771
1774
|
}));
|
|
1772
1775
|
const SplitButton$1 = (props) => {
|
|
1773
|
-
const { classes, theme } = useStyles$
|
|
1776
|
+
const { classes, theme } = useStyles$a();
|
|
1774
1777
|
const menuIconColor = theme.colors[theme.primaryColor][theme.colorScheme === "dark" ? 5 : 6];
|
|
1775
1778
|
return /* @__PURE__ */ React__namespace.createElement(core.Group, { noWrap: true, spacing: 0 }, /* @__PURE__ */ React__namespace.createElement(
|
|
1776
1779
|
core.Button,
|
|
@@ -1922,7 +1925,7 @@ function Stack(props) {
|
|
|
1922
1925
|
}
|
|
1923
1926
|
const truncateWithEllipses = (text, max) => text.substr(0, max - 1) + (text.length > max ? "…" : "");
|
|
1924
1927
|
|
|
1925
|
-
const useStyles$
|
|
1928
|
+
const useStyles$9 = core.createStyles((theme) => ({
|
|
1926
1929
|
title: {
|
|
1927
1930
|
fontSize: 34,
|
|
1928
1931
|
fontWeight: 900,
|
|
@@ -1935,7 +1938,7 @@ const useStyles$6 = core.createStyles((theme) => ({
|
|
|
1935
1938
|
}
|
|
1936
1939
|
}));
|
|
1937
1940
|
const Lesson = (props) => {
|
|
1938
|
-
const { classes } = useStyles$
|
|
1941
|
+
const { classes } = useStyles$9();
|
|
1939
1942
|
const [tab, setTab] = React.useState("question");
|
|
1940
1943
|
const numberOfStudents = props.students.length;
|
|
1941
1944
|
const percentageOfLessonsCompleted = numberOfStudents > 0 ? props.students.filter((u) => u.isComplete).length / numberOfStudents : 0;
|
|
@@ -1946,7 +1949,7 @@ const Lesson = (props) => {
|
|
|
1946
1949
|
leftSection: /* @__PURE__ */ React__namespace.createElement(core.ActionIcon, { color: "blue", size: "xs", radius: "xl", variant: "filled" }, /* @__PURE__ */ React__namespace.createElement(icons.IconArrowLeft, { size: 14 })),
|
|
1947
1950
|
size: "lg"
|
|
1948
1951
|
},
|
|
1949
|
-
"
|
|
1952
|
+
"Go Back"
|
|
1950
1953
|
)), /* @__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(
|
|
1951
1954
|
SplitButton$1,
|
|
1952
1955
|
{
|
|
@@ -1960,7 +1963,7 @@ const Lesson = (props) => {
|
|
|
1960
1963
|
value: percentageOfLessonsCompleted,
|
|
1961
1964
|
unit: "%"
|
|
1962
1965
|
}
|
|
1963
|
-
] }), /* @__PURE__ */ React__namespace.createElement(
|
|
1966
|
+
] }), !props.trial && /* @__PURE__ */ React__namespace.createElement(
|
|
1964
1967
|
core.Select,
|
|
1965
1968
|
{
|
|
1966
1969
|
clearable: true,
|
|
@@ -1975,7 +1978,7 @@ const Lesson = (props) => {
|
|
|
1975
1978
|
return { value: g.classId, label: g.name };
|
|
1976
1979
|
})
|
|
1977
1980
|
}
|
|
1978
|
-
), /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: 0 }, /* @__PURE__ */ React__namespace.createElement(
|
|
1981
|
+
), /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: 0 }, !props.trial && /* @__PURE__ */ React__namespace.createElement(
|
|
1979
1982
|
Tabs,
|
|
1980
1983
|
{
|
|
1981
1984
|
value: tab,
|
|
@@ -1986,19 +1989,19 @@ const Lesson = (props) => {
|
|
|
1986
1989
|
],
|
|
1987
1990
|
onChange: setTab
|
|
1988
1991
|
}
|
|
1989
|
-
), tab === "question" && /* @__PURE__ */ React__namespace.createElement(
|
|
1992
|
+
), (!!props.trial || tab === "question") && /* @__PURE__ */ React__namespace.createElement(
|
|
1990
1993
|
Stack,
|
|
1991
1994
|
{
|
|
1992
1995
|
loading: props.loading,
|
|
1993
1996
|
items: props.questions
|
|
1994
1997
|
}
|
|
1995
|
-
), tab === "reflections" && /* @__PURE__ */ React__namespace.createElement(
|
|
1998
|
+
), !props.trial && tab === "reflections" && /* @__PURE__ */ React__namespace.createElement(
|
|
1996
1999
|
Table$3,
|
|
1997
2000
|
{
|
|
1998
2001
|
loading: props.loading,
|
|
1999
2002
|
items: props.reflections
|
|
2000
2003
|
}
|
|
2001
|
-
), tab === "students" && /* @__PURE__ */ React__namespace.createElement(
|
|
2004
|
+
), !props.trial && tab === "students" && /* @__PURE__ */ React__namespace.createElement(
|
|
2002
2005
|
Table$2,
|
|
2003
2006
|
{
|
|
2004
2007
|
loading: props.loading,
|
|
@@ -2039,7 +2042,7 @@ function Table$1(props) {
|
|
|
2039
2042
|
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)));
|
|
2040
2043
|
}
|
|
2041
2044
|
|
|
2042
|
-
const useStyles$
|
|
2045
|
+
const useStyles$8 = core.createStyles((theme) => ({
|
|
2043
2046
|
title: {
|
|
2044
2047
|
fontSize: 34,
|
|
2045
2048
|
fontWeight: 900,
|
|
@@ -2052,7 +2055,7 @@ const useStyles$5 = core.createStyles((theme) => ({
|
|
|
2052
2055
|
}
|
|
2053
2056
|
}));
|
|
2054
2057
|
const Lessons = (props) => {
|
|
2055
|
-
const { classes } = useStyles$
|
|
2058
|
+
const { classes } = useStyles$8();
|
|
2056
2059
|
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(
|
|
2057
2060
|
core.Autocomplete,
|
|
2058
2061
|
{
|
|
@@ -2069,7 +2072,7 @@ const Lessons = (props) => {
|
|
|
2069
2072
|
))));
|
|
2070
2073
|
};
|
|
2071
2074
|
|
|
2072
|
-
const useStyles$
|
|
2075
|
+
const useStyles$7 = core.createStyles((theme) => ({
|
|
2073
2076
|
title: {
|
|
2074
2077
|
fontSize: 22,
|
|
2075
2078
|
fontWeight: 900,
|
|
@@ -2088,7 +2091,7 @@ const useStyles$4 = core.createStyles((theme) => ({
|
|
|
2088
2091
|
}
|
|
2089
2092
|
}));
|
|
2090
2093
|
function AccessCode(props) {
|
|
2091
|
-
const { classes } = useStyles$
|
|
2094
|
+
const { classes } = useStyles$7();
|
|
2092
2095
|
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(
|
|
2093
2096
|
core.Anchor,
|
|
2094
2097
|
{
|
|
@@ -2116,7 +2119,7 @@ const monthNames = [
|
|
|
2116
2119
|
"November",
|
|
2117
2120
|
"December"
|
|
2118
2121
|
];
|
|
2119
|
-
const useStyles$
|
|
2122
|
+
const useStyles$6 = core.createStyles((theme) => ({
|
|
2120
2123
|
title: {
|
|
2121
2124
|
fontSize: 34,
|
|
2122
2125
|
fontWeight: 900,
|
|
@@ -2146,7 +2149,7 @@ const useStyles$3 = core.createStyles((theme) => ({
|
|
|
2146
2149
|
}
|
|
2147
2150
|
}));
|
|
2148
2151
|
const Organization = (props) => {
|
|
2149
|
-
const { classes } = useStyles$
|
|
2152
|
+
const { classes } = useStyles$6();
|
|
2150
2153
|
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(
|
|
2151
2154
|
core.Badge,
|
|
2152
2155
|
{
|
|
@@ -2154,7 +2157,7 @@ const Organization = (props) => {
|
|
|
2154
2157
|
leftSection: /* @__PURE__ */ React__namespace.createElement(core.ActionIcon, { color: "blue", size: "xs", radius: "xl", variant: "filled" }, /* @__PURE__ */ React__namespace.createElement(icons.IconArrowLeft, { size: 14 })),
|
|
2155
2158
|
size: "lg"
|
|
2156
2159
|
},
|
|
2157
|
-
"
|
|
2160
|
+
"Go Back"
|
|
2158
2161
|
)), /* @__PURE__ */ React__namespace.createElement(core.Title, { order: 2, className: classes.title, mt: "md" }, props.displayName || "Overview"), /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", className: classes.description, mt: "sm" }, props.description || "No description"))), /* @__PURE__ */ React__namespace.createElement(AccessCode, { value: props.accessCode, onCopyCode: props.onCopyAccessCode, peopleLink: props.peopleLink }), /* @__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, { spacing: "sm" }, /* @__PURE__ */ React__namespace.createElement(StatsGroup, { data: [
|
|
2159
2162
|
{
|
|
2160
2163
|
title: "# OF STUDENTS",
|
|
@@ -2172,7 +2175,7 @@ const Organization = (props) => {
|
|
|
2172
2175
|
] }))))));
|
|
2173
2176
|
};
|
|
2174
2177
|
|
|
2175
|
-
const useStyles$
|
|
2178
|
+
const useStyles$5 = core.createStyles((theme) => ({
|
|
2176
2179
|
button: {
|
|
2177
2180
|
borderTopRightRadius: 0,
|
|
2178
2181
|
borderBottomRightRadius: 0,
|
|
@@ -2187,7 +2190,7 @@ const useStyles$2 = core.createStyles((theme) => ({
|
|
|
2187
2190
|
}
|
|
2188
2191
|
}));
|
|
2189
2192
|
const SplitButton = (props) => {
|
|
2190
|
-
const { classes, theme } = useStyles$
|
|
2193
|
+
const { classes, theme } = useStyles$5();
|
|
2191
2194
|
const menuIconColor = theme.colors[theme.primaryColor][theme.colorScheme === "dark" ? 5 : 6];
|
|
2192
2195
|
const hasMenu = !!props.withOrganizationLink;
|
|
2193
2196
|
return /* @__PURE__ */ React__namespace.createElement(core.Group, { noWrap: true, spacing: 0 }, /* @__PURE__ */ React__namespace.createElement(
|
|
@@ -2249,26 +2252,26 @@ function Table(props) {
|
|
|
2249
2252
|
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("th", null, "Name"), /* @__PURE__ */ React__namespace.createElement("th", null, "Role"), /* @__PURE__ */ React__namespace.createElement("th", null, "Account Created?"), /* @__PURE__ */ React__namespace.createElement("th", null, "# of Classes"), /* @__PURE__ */ React__namespace.createElement("th", null, "Last Active"), /* @__PURE__ */ React__namespace.createElement("th", null))), /* @__PURE__ */ React__namespace.createElement("tbody", null, rows)));
|
|
2250
2253
|
}
|
|
2251
2254
|
|
|
2252
|
-
var __defProp$
|
|
2253
|
-
var __defProps$
|
|
2254
|
-
var __getOwnPropDescs$
|
|
2255
|
-
var __getOwnPropSymbols$
|
|
2256
|
-
var __hasOwnProp$
|
|
2257
|
-
var __propIsEnum$
|
|
2258
|
-
var __defNormalProp$
|
|
2259
|
-
var __spreadValues$
|
|
2255
|
+
var __defProp$4 = Object.defineProperty;
|
|
2256
|
+
var __defProps$3 = Object.defineProperties;
|
|
2257
|
+
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
2258
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
2259
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
2260
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
2261
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2262
|
+
var __spreadValues$4 = (a, b) => {
|
|
2260
2263
|
for (var prop in b || (b = {}))
|
|
2261
|
-
if (__hasOwnProp$
|
|
2262
|
-
__defNormalProp$
|
|
2263
|
-
if (__getOwnPropSymbols$
|
|
2264
|
-
for (var prop of __getOwnPropSymbols$
|
|
2265
|
-
if (__propIsEnum$
|
|
2266
|
-
__defNormalProp$
|
|
2264
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
2265
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
2266
|
+
if (__getOwnPropSymbols$4)
|
|
2267
|
+
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
2268
|
+
if (__propIsEnum$4.call(b, prop))
|
|
2269
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
2267
2270
|
}
|
|
2268
2271
|
return a;
|
|
2269
2272
|
};
|
|
2270
|
-
var __spreadProps$
|
|
2271
|
-
const useStyles$
|
|
2273
|
+
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
2274
|
+
const useStyles$4 = core.createStyles((theme) => ({
|
|
2272
2275
|
title: {
|
|
2273
2276
|
fontSize: 34,
|
|
2274
2277
|
fontWeight: 900,
|
|
@@ -2298,7 +2301,7 @@ const useStyles$1 = core.createStyles((theme) => ({
|
|
|
2298
2301
|
}
|
|
2299
2302
|
}));
|
|
2300
2303
|
const People = (props) => {
|
|
2301
|
-
const { classes } = useStyles$
|
|
2304
|
+
const { classes } = useStyles$4();
|
|
2302
2305
|
const form$1 = form.useForm({
|
|
2303
2306
|
initialValues: {
|
|
2304
2307
|
userId: "",
|
|
@@ -2329,27 +2332,27 @@ const People = (props) => {
|
|
|
2329
2332
|
padding: "xl",
|
|
2330
2333
|
size: "xl"
|
|
2331
2334
|
},
|
|
2332
|
-
/* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: "md" }, /* @__PURE__ */ React__namespace.createElement(DropzoneButton, __spreadProps$
|
|
2335
|
+
/* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: "md" }, /* @__PURE__ */ React__namespace.createElement(DropzoneButton, __spreadProps$3(__spreadValues$4({}, props), { close: () => setOpened(false) })), /* @__PURE__ */ React__namespace.createElement(core.Divider, { label: "or", labelPosition: "center", my: "md", variant: "dashed" }), /* @__PURE__ */ React__namespace.createElement("form", { onSubmit: form$1.onSubmit(() => {
|
|
2333
2336
|
const values = form$1.values;
|
|
2334
2337
|
form$1.reset();
|
|
2335
2338
|
setOpened(false);
|
|
2336
2339
|
props.onCreateUsers && props.onCreateUsers([values]);
|
|
2337
2340
|
}) }, /* @__PURE__ */ React__namespace.createElement(core.Stack, null, /* @__PURE__ */ React__namespace.createElement(
|
|
2338
2341
|
core.TextInput,
|
|
2339
|
-
__spreadValues$
|
|
2342
|
+
__spreadValues$4({
|
|
2340
2343
|
withAsterisk: true,
|
|
2341
2344
|
label: "Email",
|
|
2342
2345
|
placeholder: "Email"
|
|
2343
2346
|
}, form$1.getInputProps("email"))
|
|
2344
2347
|
), /* @__PURE__ */ React__namespace.createElement(core.Group, { grow: true }, /* @__PURE__ */ React__namespace.createElement(
|
|
2345
2348
|
core.TextInput,
|
|
2346
|
-
__spreadValues$
|
|
2349
|
+
__spreadValues$4({
|
|
2347
2350
|
label: "Given name",
|
|
2348
2351
|
placeholder: "Given name"
|
|
2349
2352
|
}, form$1.getInputProps("givenName"))
|
|
2350
2353
|
), /* @__PURE__ */ React__namespace.createElement(
|
|
2351
2354
|
core.TextInput,
|
|
2352
|
-
__spreadValues$
|
|
2355
|
+
__spreadValues$4({
|
|
2353
2356
|
label: "Family name",
|
|
2354
2357
|
placeholder: "Family name"
|
|
2355
2358
|
}, form$1.getInputProps("familyName"))
|
|
@@ -2361,7 +2364,7 @@ const People = (props) => {
|
|
|
2361
2364
|
leftSection: /* @__PURE__ */ React__namespace.createElement(core.ActionIcon, { color: "blue", size: "xs", radius: "xl", variant: "filled" }, /* @__PURE__ */ React__namespace.createElement(icons.IconArrowLeft, { size: 14 })),
|
|
2362
2365
|
size: "lg"
|
|
2363
2366
|
},
|
|
2364
|
-
"
|
|
2367
|
+
"Go Back"
|
|
2365
2368
|
)), /* @__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(
|
|
2366
2369
|
SplitButton,
|
|
2367
2370
|
{
|
|
@@ -2402,7 +2405,7 @@ const People = (props) => {
|
|
|
2402
2405
|
))))));
|
|
2403
2406
|
};
|
|
2404
2407
|
const DropzoneButton = (props) => {
|
|
2405
|
-
const { classes, theme } = useStyles$
|
|
2408
|
+
const { classes, theme } = useStyles$4();
|
|
2406
2409
|
const openRef = React__namespace.useRef(null);
|
|
2407
2410
|
const [loading, setLoading] = React__namespace.useState(false);
|
|
2408
2411
|
const onDrop = React__namespace.useCallback((acceptedFiles) => {
|
|
@@ -2448,6 +2451,373 @@ const DropzoneButton = (props) => {
|
|
|
2448
2451
|
} }, "Select file"));
|
|
2449
2452
|
};
|
|
2450
2453
|
|
|
2454
|
+
const useStyles$3 = core.createStyles((theme) => ({
|
|
2455
|
+
wrapper: {
|
|
2456
|
+
minHeight: 400,
|
|
2457
|
+
boxSizing: "border-box",
|
|
2458
|
+
backgroundImage: `linear-gradient(-60deg, ${theme.colors[theme.primaryColor][4]} 0%, ${theme.colors[theme.primaryColor][7]} 100%)`,
|
|
2459
|
+
borderRadius: theme.radius.md,
|
|
2460
|
+
padding: theme.spacing.xl * 2.5,
|
|
2461
|
+
[`@media (max-width: ${theme.breakpoints.sm}px)`]: {
|
|
2462
|
+
padding: theme.spacing.xl * 1.5
|
|
2463
|
+
}
|
|
2464
|
+
},
|
|
2465
|
+
title: {
|
|
2466
|
+
fontFamily: `Greycliff CF, ${theme.fontFamily}`,
|
|
2467
|
+
color: theme.white,
|
|
2468
|
+
lineHeight: 1
|
|
2469
|
+
},
|
|
2470
|
+
description: {
|
|
2471
|
+
color: theme.colors[theme.primaryColor][0],
|
|
2472
|
+
maxWidth: 300,
|
|
2473
|
+
[`@media (max-width: ${theme.breakpoints.sm}px)`]: {
|
|
2474
|
+
maxWidth: "100%"
|
|
2475
|
+
}
|
|
2476
|
+
},
|
|
2477
|
+
form: {
|
|
2478
|
+
backgroundColor: theme.white,
|
|
2479
|
+
padding: theme.spacing.xl,
|
|
2480
|
+
borderRadius: theme.radius.md,
|
|
2481
|
+
boxShadow: theme.shadows.lg
|
|
2482
|
+
},
|
|
2483
|
+
social: {
|
|
2484
|
+
color: theme.white,
|
|
2485
|
+
"&:hover": {
|
|
2486
|
+
color: theme.colors[theme.primaryColor][1]
|
|
2487
|
+
}
|
|
2488
|
+
},
|
|
2489
|
+
input: {
|
|
2490
|
+
backgroundColor: theme.white,
|
|
2491
|
+
borderColor: theme.colors.gray[4],
|
|
2492
|
+
color: theme.black,
|
|
2493
|
+
"&::placeholder": {
|
|
2494
|
+
color: theme.colors.gray[5]
|
|
2495
|
+
}
|
|
2496
|
+
},
|
|
2497
|
+
inputLabel: {
|
|
2498
|
+
color: theme.black
|
|
2499
|
+
},
|
|
2500
|
+
control: {
|
|
2501
|
+
backgroundColor: theme.colors[theme.primaryColor][6]
|
|
2502
|
+
}
|
|
2503
|
+
}));
|
|
2504
|
+
const StartAnonymousLesson = (props) => {
|
|
2505
|
+
const { classes } = useStyles$3();
|
|
2506
|
+
return /* @__PURE__ */ React__namespace.createElement("div", { className: classes.wrapper }, /* @__PURE__ */ React__namespace.createElement(core.SimpleGrid, { cols: 2, spacing: 50, breakpoints: [{ maxWidth: "sm", cols: 1 }] }, /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement(core.Title, { className: classes.title }, props.title), /* @__PURE__ */ React__namespace.createElement(core.Text, { weight: "bold", className: classes.description, mt: "sm", mb: 30 }, "Instructor: ", props.educatorName), /* @__PURE__ */ React__namespace.createElement(core.Text, { className: classes.description, mt: "sm", mb: 30 }, props.description)), /* @__PURE__ */ React__namespace.createElement("div", { className: classes.form }, /* @__PURE__ */ React__namespace.createElement(
|
|
2507
|
+
core.TextInput,
|
|
2508
|
+
{
|
|
2509
|
+
label: "Name",
|
|
2510
|
+
placeholder: "John Doe",
|
|
2511
|
+
defaultValue: props.studentName,
|
|
2512
|
+
readOnly: !!props.studentName,
|
|
2513
|
+
required: true,
|
|
2514
|
+
classNames: { input: classes.input, label: classes.inputLabel }
|
|
2515
|
+
}
|
|
2516
|
+
), /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "right", mt: "md" }, /* @__PURE__ */ React__namespace.createElement(core.Button, { onClick: props.onStart, className: classes.control }, !props.studentName ? "Start lesson" : "Continue lesson")))));
|
|
2517
|
+
};
|
|
2518
|
+
|
|
2519
|
+
var __defProp$3 = Object.defineProperty;
|
|
2520
|
+
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
2521
|
+
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
2522
|
+
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
2523
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2524
|
+
var __spreadValues$3 = (a, b) => {
|
|
2525
|
+
for (var prop in b || (b = {}))
|
|
2526
|
+
if (__hasOwnProp$3.call(b, prop))
|
|
2527
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
2528
|
+
if (__getOwnPropSymbols$3)
|
|
2529
|
+
for (var prop of __getOwnPropSymbols$3(b)) {
|
|
2530
|
+
if (__propIsEnum$3.call(b, prop))
|
|
2531
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
2532
|
+
}
|
|
2533
|
+
return a;
|
|
2534
|
+
};
|
|
2535
|
+
const BadgeGrid = (props) => {
|
|
2536
|
+
const badges = props.badges.map((b) => /* @__PURE__ */ React__namespace.createElement(TaskCard, __spreadValues$3({ key: b.title }, b)));
|
|
2537
|
+
return /* @__PURE__ */ React__namespace.createElement(core.SimpleGrid, { cols: 3, breakpoints: [{ maxWidth: "sm", cols: 1 }] }, badges);
|
|
2538
|
+
};
|
|
2539
|
+
function TaskCard(props) {
|
|
2540
|
+
const avatars = props.users.slice(0, 3).map((u, i) => {
|
|
2541
|
+
const fullName = u.name;
|
|
2542
|
+
let initials = fullName.split(/[ -]/).map((n) => n.charAt(0)).join("");
|
|
2543
|
+
const src = AvatarInit.initialAvatar({
|
|
2544
|
+
background: "#f4f6f7",
|
|
2545
|
+
color: "#888888",
|
|
2546
|
+
fontFamily: "'Lato', 'Lato-Regular', 'Helvetica Neue'",
|
|
2547
|
+
fontSize: 10,
|
|
2548
|
+
fontWeight: 250,
|
|
2549
|
+
size: 30,
|
|
2550
|
+
initials
|
|
2551
|
+
});
|
|
2552
|
+
return /* @__PURE__ */ React__namespace.createElement(core.Avatar, { key: i, src, radius: "xl" });
|
|
2553
|
+
});
|
|
2554
|
+
const remainingUsers = props.users.slice(3).length;
|
|
2555
|
+
const isComplete = props.lessonsCompleted >= props.lessonsTotal;
|
|
2556
|
+
return /* @__PURE__ */ React__namespace.createElement(core.Card, { withBorder: true, radius: "md" }, /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "apart" }, /* @__PURE__ */ React__namespace.createElement(core.ThemeIcon, { size: "lg", variant: "gradient", gradient: { from: "indigo", to: "cyan" } }, /* @__PURE__ */ React__namespace.createElement(icons.IconBadge, { size: 20 })), isComplete && /* @__PURE__ */ React__namespace.createElement(core.Badge, { variant: "gradient", gradient: { from: "indigo", to: "cyan" } }, "Complete"), !isComplete && /* @__PURE__ */ React__namespace.createElement(core.Badge, { variant: "filled" }, "Incomplete")), /* @__PURE__ */ React__namespace.createElement(core.UnstyledButton, { to: props.href, mt: "md", sx: { ":hover": { textDecoration: "underline" } } }, /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "lg", weight: 500 }, props.title)), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "sm", color: "dimmed", mt: 5 }, props.description), /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", size: "sm", mt: "md" }, "Lessons completed:", " ", /* @__PURE__ */ React__namespace.createElement(
|
|
2557
|
+
core.Text,
|
|
2558
|
+
{
|
|
2559
|
+
span: true,
|
|
2560
|
+
weight: 500,
|
|
2561
|
+
sx: (theme) => ({ color: theme.colorScheme === "dark" ? theme.white : theme.black })
|
|
2562
|
+
},
|
|
2563
|
+
props.lessonsCompleted,
|
|
2564
|
+
"/",
|
|
2565
|
+
props.lessonsTotal
|
|
2566
|
+
)), /* @__PURE__ */ React__namespace.createElement(core.Progress, { value: props.lessonsCompleted / props.lessonsTotal * 100, mt: 5 }), /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "apart", mt: "md" }, /* @__PURE__ */ React__namespace.createElement(core.Avatar.Group, { spacing: "sm" }, avatars, !!remainingUsers && /* @__PURE__ */ React__namespace.createElement(core.Avatar, { radius: "xl" }, "+", remainingUsers)), /* @__PURE__ */ React__namespace.createElement(core.ActionIcon, { onClick: props.onCopy, variant: "default" }, /* @__PURE__ */ React__namespace.createElement(icons.IconCopy, { size: 18 }))));
|
|
2567
|
+
}
|
|
2568
|
+
|
|
2569
|
+
const TrialHome = (props) => {
|
|
2570
|
+
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(core.Stack, { spacing: "sm" }, /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: 0 }, /* @__PURE__ */ React__namespace.createElement(
|
|
2571
|
+
UserInfo,
|
|
2572
|
+
{
|
|
2573
|
+
variant: "compact",
|
|
2574
|
+
name: props.name,
|
|
2575
|
+
impactStatement: ""
|
|
2576
|
+
}
|
|
2577
|
+
), /* @__PURE__ */ React__namespace.createElement(
|
|
2578
|
+
TenantBanner,
|
|
2579
|
+
{
|
|
2580
|
+
title: "Trial Account",
|
|
2581
|
+
description: "Welcome to Local Civics! You are currently interacting with our trial experience.",
|
|
2582
|
+
image: "https://cdn.localcivics.io/hub/landing.jpg",
|
|
2583
|
+
action: {
|
|
2584
|
+
label: "UPGRADE NOW",
|
|
2585
|
+
link: props.upgradeHref
|
|
2586
|
+
}
|
|
2587
|
+
}
|
|
2588
|
+
)), /* @__PURE__ */ React__namespace.createElement(BadgeGrid, { badges: props.badges })));
|
|
2589
|
+
};
|
|
2590
|
+
|
|
2591
|
+
var __defProp$2 = Object.defineProperty;
|
|
2592
|
+
var __defProps$2 = Object.defineProperties;
|
|
2593
|
+
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
2594
|
+
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
2595
|
+
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
2596
|
+
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
2597
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2598
|
+
var __spreadValues$2 = (a, b) => {
|
|
2599
|
+
for (var prop in b || (b = {}))
|
|
2600
|
+
if (__hasOwnProp$2.call(b, prop))
|
|
2601
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
2602
|
+
if (__getOwnPropSymbols$2)
|
|
2603
|
+
for (var prop of __getOwnPropSymbols$2(b)) {
|
|
2604
|
+
if (__propIsEnum$2.call(b, prop))
|
|
2605
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
2606
|
+
}
|
|
2607
|
+
return a;
|
|
2608
|
+
};
|
|
2609
|
+
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
2610
|
+
var __objRest = (source, exclude) => {
|
|
2611
|
+
var target = {};
|
|
2612
|
+
for (var prop in source)
|
|
2613
|
+
if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2614
|
+
target[prop] = source[prop];
|
|
2615
|
+
if (source != null && __getOwnPropSymbols$2)
|
|
2616
|
+
for (var prop of __getOwnPropSymbols$2(source)) {
|
|
2617
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
|
|
2618
|
+
target[prop] = source[prop];
|
|
2619
|
+
}
|
|
2620
|
+
return target;
|
|
2621
|
+
};
|
|
2622
|
+
const useStyles$2 = core.createStyles((theme, { checked }) => ({
|
|
2623
|
+
button: {
|
|
2624
|
+
display: "flex",
|
|
2625
|
+
alignItems: "center",
|
|
2626
|
+
width: "100%",
|
|
2627
|
+
transition: "background-color 150ms ease, border-color 150ms ease",
|
|
2628
|
+
border: `1px solid ${checked ? theme.fn.variant({ variant: "outline", color: theme.primaryColor }).border : theme.colorScheme === "dark" ? theme.colors.dark[8] : theme.colors.gray[3]}`,
|
|
2629
|
+
borderRadius: theme.radius.sm,
|
|
2630
|
+
padding: theme.spacing.lg,
|
|
2631
|
+
backgroundColor: checked ? theme.fn.variant({ variant: "light", color: theme.primaryColor }).background : theme.colorScheme === "dark" ? theme.colors.dark[8] : theme.white
|
|
2632
|
+
},
|
|
2633
|
+
body: {
|
|
2634
|
+
flex: 1,
|
|
2635
|
+
marginLeft: theme.spacing.md
|
|
2636
|
+
}
|
|
2637
|
+
}));
|
|
2638
|
+
function ImageCheckbox(_a) {
|
|
2639
|
+
var _b = _a, {
|
|
2640
|
+
checked,
|
|
2641
|
+
defaultChecked,
|
|
2642
|
+
onChange,
|
|
2643
|
+
title,
|
|
2644
|
+
description,
|
|
2645
|
+
className,
|
|
2646
|
+
icon: Icon
|
|
2647
|
+
} = _b, others = __objRest(_b, [
|
|
2648
|
+
"checked",
|
|
2649
|
+
"defaultChecked",
|
|
2650
|
+
"onChange",
|
|
2651
|
+
"title",
|
|
2652
|
+
"description",
|
|
2653
|
+
"className",
|
|
2654
|
+
"icon"
|
|
2655
|
+
]);
|
|
2656
|
+
const [value, handleChange] = hooks.useUncontrolled({
|
|
2657
|
+
value: checked,
|
|
2658
|
+
defaultValue: defaultChecked,
|
|
2659
|
+
finalValue: false,
|
|
2660
|
+
onChange
|
|
2661
|
+
});
|
|
2662
|
+
const { classes, cx } = useStyles$2({ checked: value });
|
|
2663
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
2664
|
+
core.UnstyledButton,
|
|
2665
|
+
__spreadProps$2(__spreadValues$2({}, others), {
|
|
2666
|
+
onClick: () => handleChange(!value),
|
|
2667
|
+
className: cx(classes.button, className)
|
|
2668
|
+
}),
|
|
2669
|
+
/* @__PURE__ */ React__namespace.createElement(core.ThemeIcon, { variant: "light", size: "lg", color: "blue" }, /* @__PURE__ */ React__namespace.createElement(Icon, { size: 40 })),
|
|
2670
|
+
/* @__PURE__ */ React__namespace.createElement("div", { className: classes.body }, /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", size: "xs", sx: { lineHeight: 1 }, mb: 5 }, description), /* @__PURE__ */ React__namespace.createElement(core.Text, { weight: 500, size: "sm", sx: { lineHeight: 1 } }, title)),
|
|
2671
|
+
/* @__PURE__ */ React__namespace.createElement(
|
|
2672
|
+
core.Checkbox,
|
|
2673
|
+
{
|
|
2674
|
+
checked: value,
|
|
2675
|
+
onChange: () => {
|
|
2676
|
+
},
|
|
2677
|
+
tabIndex: -1,
|
|
2678
|
+
styles: { input: { cursor: "pointer" } }
|
|
2679
|
+
}
|
|
2680
|
+
)
|
|
2681
|
+
);
|
|
2682
|
+
}
|
|
2683
|
+
function SelectGrid(props) {
|
|
2684
|
+
const items = props.items.map((item) => /* @__PURE__ */ React__namespace.createElement(
|
|
2685
|
+
ImageCheckbox,
|
|
2686
|
+
__spreadProps$2(__spreadValues$2({}, item), {
|
|
2687
|
+
key: item.title,
|
|
2688
|
+
onChange: (checked) => props.onChange(item.title, checked)
|
|
2689
|
+
})
|
|
2690
|
+
));
|
|
2691
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
2692
|
+
core.SimpleGrid,
|
|
2693
|
+
{
|
|
2694
|
+
cols: 3,
|
|
2695
|
+
breakpoints: [
|
|
2696
|
+
{ maxWidth: "md", cols: 2 },
|
|
2697
|
+
{ maxWidth: "sm", cols: 1 }
|
|
2698
|
+
]
|
|
2699
|
+
},
|
|
2700
|
+
items
|
|
2701
|
+
);
|
|
2702
|
+
}
|
|
2703
|
+
|
|
2704
|
+
var __defProp$1 = Object.defineProperty;
|
|
2705
|
+
var __defProps$1 = Object.defineProperties;
|
|
2706
|
+
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
2707
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
2708
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
2709
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
2710
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2711
|
+
var __spreadValues$1 = (a, b) => {
|
|
2712
|
+
for (var prop in b || (b = {}))
|
|
2713
|
+
if (__hasOwnProp$1.call(b, prop))
|
|
2714
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
2715
|
+
if (__getOwnPropSymbols$1)
|
|
2716
|
+
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
2717
|
+
if (__propIsEnum$1.call(b, prop))
|
|
2718
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
2719
|
+
}
|
|
2720
|
+
return a;
|
|
2721
|
+
};
|
|
2722
|
+
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
2723
|
+
const useStyles$1 = core.createStyles((theme) => ({
|
|
2724
|
+
wrapper: {
|
|
2725
|
+
minHeight: 400,
|
|
2726
|
+
boxSizing: "border-box",
|
|
2727
|
+
backgroundImage: `linear-gradient(-60deg, ${theme.colors[theme.primaryColor][4]} 0%, ${theme.colors[theme.primaryColor][7]} 100%)`,
|
|
2728
|
+
borderRadius: theme.radius.md,
|
|
2729
|
+
padding: theme.spacing.xl * 2.5,
|
|
2730
|
+
[`@media (max-width: ${theme.breakpoints.sm}px)`]: {
|
|
2731
|
+
padding: theme.spacing.xl * 1.5
|
|
2732
|
+
}
|
|
2733
|
+
},
|
|
2734
|
+
title: {
|
|
2735
|
+
fontFamily: `Greycliff CF, ${theme.fontFamily}`,
|
|
2736
|
+
color: theme.white,
|
|
2737
|
+
lineHeight: 1
|
|
2738
|
+
},
|
|
2739
|
+
description: {
|
|
2740
|
+
color: theme.colors[theme.primaryColor][0],
|
|
2741
|
+
maxWidth: 500,
|
|
2742
|
+
[`@media (max-width: ${theme.breakpoints.sm}px)`]: {
|
|
2743
|
+
maxWidth: "100%"
|
|
2744
|
+
}
|
|
2745
|
+
},
|
|
2746
|
+
form: {
|
|
2747
|
+
backgroundColor: theme.white,
|
|
2748
|
+
padding: theme.spacing.xl,
|
|
2749
|
+
borderRadius: theme.radius.md,
|
|
2750
|
+
boxShadow: theme.shadows.lg
|
|
2751
|
+
},
|
|
2752
|
+
social: {
|
|
2753
|
+
color: theme.white,
|
|
2754
|
+
"&:hover": {
|
|
2755
|
+
color: theme.colors[theme.primaryColor][1]
|
|
2756
|
+
}
|
|
2757
|
+
},
|
|
2758
|
+
input: {
|
|
2759
|
+
backgroundColor: theme.white,
|
|
2760
|
+
borderColor: theme.colors.gray[4],
|
|
2761
|
+
color: theme.black,
|
|
2762
|
+
"&::placeholder": {
|
|
2763
|
+
color: theme.colors.gray[5]
|
|
2764
|
+
}
|
|
2765
|
+
},
|
|
2766
|
+
inputLabel: {
|
|
2767
|
+
color: theme.black
|
|
2768
|
+
},
|
|
2769
|
+
control: {
|
|
2770
|
+
backgroundColor: theme.colors[theme.primaryColor][6]
|
|
2771
|
+
}
|
|
2772
|
+
}));
|
|
2773
|
+
const OPTIONS = [
|
|
2774
|
+
{ description: "high school", title: "High school", icon: icons.IconHistory },
|
|
2775
|
+
{ description: "k - 8th", title: "K - 8th", icon: icons.IconLego },
|
|
2776
|
+
{ description: "civics", title: "Civics", icon: icons.IconNews },
|
|
2777
|
+
{ description: "project-based learning", title: "Project-based learning", icon: icons.IconTools },
|
|
2778
|
+
{ description: "college", title: "College", icon: icons.IconPodium },
|
|
2779
|
+
{ description: "career", title: "Career", icon: icons.IconAffiliate },
|
|
2780
|
+
{ description: "student leadership", title: "Student leadership", icon: icons.IconGrowth }
|
|
2781
|
+
];
|
|
2782
|
+
const TrialRegistration = (props) => {
|
|
2783
|
+
const { classes } = useStyles$1();
|
|
2784
|
+
const [firstName, setFirstName] = React__namespace.useState("");
|
|
2785
|
+
const [lastName, setLastName] = React__namespace.useState("");
|
|
2786
|
+
const [interests, setInterests] = React__namespace.useState({});
|
|
2787
|
+
return /* @__PURE__ */ React__namespace.createElement("div", { className: classes.wrapper }, /* @__PURE__ */ React__namespace.createElement(core.SimpleGrid, { maw: 960, ml: "auto", mr: "auto", cols: 1, spacing: 15, breakpoints: [{ maxWidth: "sm", cols: 1 }] }, /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement(core.Title, { className: classes.title }, "Trial Educator"), /* @__PURE__ */ React__namespace.createElement(core.Text, { className: classes.description, mt: "sm", mb: 30 }, "Try out a some of the features we can bring to your classroom. No commitment required.")), /* @__PURE__ */ React__namespace.createElement("div", { className: classes.form }, /* @__PURE__ */ React__namespace.createElement(core.Group, { mb: "md", spacing: "md", grow: true }, /* @__PURE__ */ React__namespace.createElement(
|
|
2788
|
+
core.TextInput,
|
|
2789
|
+
{
|
|
2790
|
+
label: "First Name",
|
|
2791
|
+
placeholder: "John",
|
|
2792
|
+
required: true,
|
|
2793
|
+
classNames: { input: classes.input, label: classes.inputLabel },
|
|
2794
|
+
onChange: (e) => setFirstName(e.target.value)
|
|
2795
|
+
}
|
|
2796
|
+
), /* @__PURE__ */ React__namespace.createElement(
|
|
2797
|
+
core.TextInput,
|
|
2798
|
+
{
|
|
2799
|
+
label: "Last Name",
|
|
2800
|
+
placeholder: "Doe",
|
|
2801
|
+
required: true,
|
|
2802
|
+
classNames: { input: classes.input, label: classes.inputLabel },
|
|
2803
|
+
onChange: (e) => setLastName(e.target.value)
|
|
2804
|
+
}
|
|
2805
|
+
)), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: 14, weight: 500, mb: "md", mt: "xl" }, "What are you interested in teaching?"), /* @__PURE__ */ React__namespace.createElement(
|
|
2806
|
+
SelectGrid,
|
|
2807
|
+
{
|
|
2808
|
+
items: OPTIONS,
|
|
2809
|
+
onChange: (e, checked) => setInterests(__spreadProps$1(__spreadValues$1({}, interests), { [e]: checked }))
|
|
2810
|
+
}
|
|
2811
|
+
), /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "right", mt: "md" }, /* @__PURE__ */ React__namespace.createElement(
|
|
2812
|
+
core.Button,
|
|
2813
|
+
{
|
|
2814
|
+
onClick: () => props.onBegin({ firstName, lastName, interests: Object.keys(interests) }),
|
|
2815
|
+
className: classes.control
|
|
2816
|
+
},
|
|
2817
|
+
"Begin trial"
|
|
2818
|
+
)))));
|
|
2819
|
+
};
|
|
2820
|
+
|
|
2451
2821
|
const mycCache = core.createEmotionCache({
|
|
2452
2822
|
key: "mantine",
|
|
2453
2823
|
prepend: false
|
|
@@ -2682,6 +3052,9 @@ exports.Navbar = Navbar;
|
|
|
2682
3052
|
exports.NestedNavbar = NestedNavbar;
|
|
2683
3053
|
exports.Organization = Organization;
|
|
2684
3054
|
exports.People = People;
|
|
3055
|
+
exports.StartAnonymousLesson = StartAnonymousLesson;
|
|
2685
3056
|
exports.Student = Student;
|
|
2686
3057
|
exports.SwitchAccount = SwitchAccount;
|
|
3058
|
+
exports.TrialHome = TrialHome;
|
|
3059
|
+
exports.TrialRegistration = TrialRegistration;
|
|
2687
3060
|
//# sourceMappingURL=index.js.map
|