@local-civics/mgmt-ui 0.1.197 → 0.1.199

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.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { useState, useMemo } from 'react';
3
- import { createStyles, Group, Avatar, Text, Box, Badge as Badge$1, ThemeIcon, Collapse, Navbar as Navbar$1, Center, Image, Code, Burger, ScrollArea, Modal, Loader, Container, Button, Title, UnstyledButton, Card, SimpleGrid, Tabs as Tabs$1, Stack as Stack$5, Grid, ActionIcon, LoadingOverlay, Select, Table as Table$l, Autocomplete, Drawer, Divider, TextInput, Tooltip, Paper, Overlay, Anchor, Menu, Checkbox, createEmotionCache, MantineProvider, AppShell } from '@mantine/core';
3
+ import { createStyles, Group, Avatar, Text, Box, Badge as Badge$1, ThemeIcon, Collapse, Navbar as Navbar$1, Center, Image, Code, Burger, ScrollArea, Modal, Loader, Container, Button, Title, UnstyledButton, Card, SimpleGrid, Tabs as Tabs$1, Stack as Stack$5, Grid, ActionIcon, LoadingOverlay, Select, Table as Table$l, Autocomplete, Drawer, Divider, TextInput, Tooltip, Paper, Overlay, Anchor, Menu, Checkbox, createEmotionCache, MantineProvider, AppShell, Accordion } from '@mantine/core';
4
4
  import { IconChevronRight, IconChevronLeft, IconVideo, IconSwitchHorizontal, IconLogout, IconHome2, IconGauge, IconCategory2, IconRoute, IconAlbum, IconLambda, IconClipboard, IconBuilding, IconBatteryEco, IconBooks, IconBackpack, IconClipboardCopy, IconTableExport, IconArrowLeft, IconPlaylistAdd, IconCheck, IconTrash, IconDownload, IconX, IconCloudUpload, IconInfoCircle, IconColorSwatch, IconPointer, IconChevronDown, IconScribble, IconSchool, IconPodium, IconBriefcase, IconPresentation, IconNews, IconTools, IconBrandInstagram, IconBrandLinkedin, IconBrandFacebook } from '@tabler/icons';
5
5
  import { Link } from 'react-router-dom';
6
6
  import { showNotification, NotificationsProvider } from '@mantine/notifications';
@@ -14,30 +14,30 @@ import AvatarInit from 'avatar-initials';
14
14
  import { Chart } from 'react-charts';
15
15
  import { useUncontrolled } from '@mantine/hooks';
16
16
 
17
- var __defProp$e = Object.defineProperty;
18
- var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
19
- var __hasOwnProp$e = Object.prototype.hasOwnProperty;
20
- var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
21
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
22
- var __spreadValues$e = (a, b) => {
17
+ var __defProp$f = Object.defineProperty;
18
+ var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
19
+ var __hasOwnProp$f = Object.prototype.hasOwnProperty;
20
+ var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
21
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
22
+ var __spreadValues$f = (a, b) => {
23
23
  for (var prop in b || (b = {}))
24
- if (__hasOwnProp$e.call(b, prop))
25
- __defNormalProp$e(a, prop, b[prop]);
26
- if (__getOwnPropSymbols$e)
27
- for (var prop of __getOwnPropSymbols$e(b)) {
28
- if (__propIsEnum$e.call(b, prop))
29
- __defNormalProp$e(a, prop, b[prop]);
24
+ if (__hasOwnProp$f.call(b, prop))
25
+ __defNormalProp$f(a, prop, b[prop]);
26
+ if (__getOwnPropSymbols$f)
27
+ for (var prop of __getOwnPropSymbols$f(b)) {
28
+ if (__propIsEnum$f.call(b, prop))
29
+ __defNormalProp$f(a, prop, b[prop]);
30
30
  }
31
31
  return a;
32
32
  };
33
33
  var __objRest$2 = (source, exclude) => {
34
34
  var target = {};
35
35
  for (var prop in source)
36
- if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
36
+ if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
37
37
  target[prop] = source[prop];
38
- if (source != null && __getOwnPropSymbols$e)
39
- for (var prop of __getOwnPropSymbols$e(source)) {
40
- if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
38
+ if (source != null && __getOwnPropSymbols$f)
39
+ for (var prop of __getOwnPropSymbols$f(source)) {
40
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
41
41
  target[prop] = source[prop];
42
42
  }
43
43
  return target;
@@ -54,7 +54,7 @@ const useStyles$v = createStyles((theme) => ({
54
54
  function UserButton(_a) {
55
55
  var _b = _a, { image, name, email, icon } = _b, others = __objRest$2(_b, ["image", "name", "email", "icon"]);
56
56
  const { classes } = useStyles$v();
57
- return /* @__PURE__ */ React.createElement(Group, __spreadValues$e({ className: classes.user }, others), /* @__PURE__ */ React.createElement(Avatar, { src: image, radius: "xl" }), /* @__PURE__ */ React.createElement("div", { style: { flex: 1 } }, /* @__PURE__ */ React.createElement(Text, { size: "sm", weight: 500 }, name), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", size: "xs" }, email)));
57
+ return /* @__PURE__ */ React.createElement(Group, __spreadValues$f({ className: classes.user }, others), /* @__PURE__ */ React.createElement(Avatar, { src: image, radius: "xl" }), /* @__PURE__ */ React.createElement("div", { style: { flex: 1 } }, /* @__PURE__ */ React.createElement(Text, { size: "sm", weight: 500 }, name), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", size: "xs" }, email)));
58
58
  }
59
59
 
60
60
  const compact = (num) => {
@@ -162,25 +162,25 @@ function LinksGroup({ icon: Icon, href, label, initiallyOpened, links, active, n
162
162
  ), hasLinks ? /* @__PURE__ */ React.createElement(Collapse, { in: opened }, items) : null);
163
163
  }
164
164
 
165
- var __defProp$d = Object.defineProperty;
166
- var __defProps$9 = Object.defineProperties;
167
- var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
168
- var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
169
- var __hasOwnProp$d = Object.prototype.hasOwnProperty;
170
- var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
171
- var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
172
- var __spreadValues$d = (a, b) => {
165
+ var __defProp$e = Object.defineProperty;
166
+ var __defProps$a = Object.defineProperties;
167
+ var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
168
+ var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
169
+ var __hasOwnProp$e = Object.prototype.hasOwnProperty;
170
+ var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
171
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
172
+ var __spreadValues$e = (a, b) => {
173
173
  for (var prop in b || (b = {}))
174
- if (__hasOwnProp$d.call(b, prop))
175
- __defNormalProp$d(a, prop, b[prop]);
176
- if (__getOwnPropSymbols$d)
177
- for (var prop of __getOwnPropSymbols$d(b)) {
178
- if (__propIsEnum$d.call(b, prop))
179
- __defNormalProp$d(a, prop, b[prop]);
174
+ if (__hasOwnProp$e.call(b, prop))
175
+ __defNormalProp$e(a, prop, b[prop]);
176
+ if (__getOwnPropSymbols$e)
177
+ for (var prop of __getOwnPropSymbols$e(b)) {
178
+ if (__propIsEnum$e.call(b, prop))
179
+ __defNormalProp$e(a, prop, b[prop]);
180
180
  }
181
181
  return a;
182
182
  };
183
- var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
183
+ var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
184
184
  const useStyles$t = createStyles((theme, _params, getRef) => {
185
185
  const icon = getRef("icon");
186
186
  return {
@@ -212,7 +212,7 @@ const useStyles$t = createStyles((theme, _params, getRef) => {
212
212
  color: theme.colorScheme === "dark" ? theme.white : theme.black,
213
213
  borderBottom: `1px solid ${theme.colorScheme === "dark" ? theme.colors.dark[4] : theme.colors.gray[3]}`
214
214
  },
215
- link: __spreadProps$9(__spreadValues$d({}, theme.fn.focusStyles()), {
215
+ link: __spreadProps$a(__spreadValues$e({}, theme.fn.focusStyles()), {
216
216
  display: "flex",
217
217
  alignItems: "center",
218
218
  textDecoration: "none",
@@ -295,12 +295,12 @@ function Navbar(props) {
295
295
  }
296
296
  return /* @__PURE__ */ React.createElement(
297
297
  LinksGroup,
298
- __spreadProps$9(__spreadValues$d(__spreadValues$d({
298
+ __spreadProps$a(__spreadValues$e(__spreadValues$e({
299
299
  key: item.label,
300
300
  active: props.active
301
301
  }, item), context), {
302
302
  links: (item.links || []).map((link) => {
303
- return __spreadValues$d(__spreadValues$d({}, link), props.links[`${item.label}/${link.label}`] || { notifications: 0, href: "" });
303
+ return __spreadValues$e(__spreadValues$e({}, link), props.links[`${item.label}/${link.label}`] || { notifications: 0, href: "" });
304
304
  })
305
305
  })
306
306
  );
@@ -643,28 +643,28 @@ function useSortableData(items, config = { key: "", direction: null }) {
643
643
  return { items: sortedItems, requestSort, sortConfig };
644
644
  }
645
645
 
646
- var __defProp$c = Object.defineProperty;
647
- var __defProps$8 = Object.defineProperties;
648
- var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
649
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
650
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
651
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
652
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
653
- var __spreadValues$c = (a, b) => {
646
+ var __defProp$d = Object.defineProperty;
647
+ var __defProps$9 = Object.defineProperties;
648
+ var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
649
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
650
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
651
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
652
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
653
+ var __spreadValues$d = (a, b) => {
654
654
  for (var prop in b || (b = {}))
655
- if (__hasOwnProp$c.call(b, prop))
656
- __defNormalProp$c(a, prop, b[prop]);
657
- if (__getOwnPropSymbols$c)
658
- for (var prop of __getOwnPropSymbols$c(b)) {
659
- if (__propIsEnum$c.call(b, prop))
660
- __defNormalProp$c(a, prop, b[prop]);
655
+ if (__hasOwnProp$d.call(b, prop))
656
+ __defNormalProp$d(a, prop, b[prop]);
657
+ if (__getOwnPropSymbols$d)
658
+ for (var prop of __getOwnPropSymbols$d(b)) {
659
+ if (__propIsEnum$d.call(b, prop))
660
+ __defNormalProp$d(a, prop, b[prop]);
661
661
  }
662
662
  return a;
663
663
  };
664
- var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
664
+ var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
665
665
  function Table$k(props) {
666
666
  const preparedItems = React.useMemo(() => {
667
- return props.items.map((item) => __spreadProps$8(__spreadValues$c({}, item), {
667
+ return props.items.map((item) => __spreadProps$9(__spreadValues$d({}, item), {
668
668
  status: item.isComplete ? 1 : 0
669
669
  }));
670
670
  }, [props.items]);
@@ -1115,28 +1115,28 @@ const SplitButton$4 = (props) => {
1115
1115
  ));
1116
1116
  };
1117
1117
 
1118
- var __defProp$b = Object.defineProperty;
1119
- var __defProps$7 = Object.defineProperties;
1120
- var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
1121
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
1122
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
1123
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
1124
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1125
- var __spreadValues$b = (a, b) => {
1118
+ var __defProp$c = Object.defineProperty;
1119
+ var __defProps$8 = Object.defineProperties;
1120
+ var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
1121
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
1122
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
1123
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
1124
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1125
+ var __spreadValues$c = (a, b) => {
1126
1126
  for (var prop in b || (b = {}))
1127
- if (__hasOwnProp$b.call(b, prop))
1128
- __defNormalProp$b(a, prop, b[prop]);
1129
- if (__getOwnPropSymbols$b)
1130
- for (var prop of __getOwnPropSymbols$b(b)) {
1131
- if (__propIsEnum$b.call(b, prop))
1132
- __defNormalProp$b(a, prop, b[prop]);
1127
+ if (__hasOwnProp$c.call(b, prop))
1128
+ __defNormalProp$c(a, prop, b[prop]);
1129
+ if (__getOwnPropSymbols$c)
1130
+ for (var prop of __getOwnPropSymbols$c(b)) {
1131
+ if (__propIsEnum$c.call(b, prop))
1132
+ __defNormalProp$c(a, prop, b[prop]);
1133
1133
  }
1134
1134
  return a;
1135
1135
  };
1136
- var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
1136
+ var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
1137
1137
  function Table$c(props) {
1138
1138
  const preparedItems = React.useMemo(() => {
1139
- return props.items.map((item) => __spreadProps$7(__spreadValues$b({}, item), {
1139
+ return props.items.map((item) => __spreadProps$8(__spreadValues$c({}, item), {
1140
1140
  fullName: item.givenName && item.familyName ? `${item.givenName} ${item.familyName}`.toLowerCase() : item.email.toLowerCase()
1141
1141
  }));
1142
1142
  }, [props.items]);
@@ -1233,25 +1233,25 @@ function Table$c(props) {
1233
1233
  ));
1234
1234
  }
1235
1235
 
1236
- var __defProp$a = Object.defineProperty;
1237
- var __defProps$6 = Object.defineProperties;
1238
- var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
1239
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
1240
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
1241
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
1242
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1243
- var __spreadValues$a = (a, b) => {
1236
+ var __defProp$b = Object.defineProperty;
1237
+ var __defProps$7 = Object.defineProperties;
1238
+ var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
1239
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
1240
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
1241
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
1242
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1243
+ var __spreadValues$b = (a, b) => {
1244
1244
  for (var prop in b || (b = {}))
1245
- if (__hasOwnProp$a.call(b, prop))
1246
- __defNormalProp$a(a, prop, b[prop]);
1247
- if (__getOwnPropSymbols$a)
1248
- for (var prop of __getOwnPropSymbols$a(b)) {
1249
- if (__propIsEnum$a.call(b, prop))
1250
- __defNormalProp$a(a, prop, b[prop]);
1245
+ if (__hasOwnProp$b.call(b, prop))
1246
+ __defNormalProp$b(a, prop, b[prop]);
1247
+ if (__getOwnPropSymbols$b)
1248
+ for (var prop of __getOwnPropSymbols$b(b)) {
1249
+ if (__propIsEnum$b.call(b, prop))
1250
+ __defNormalProp$b(a, prop, b[prop]);
1251
1251
  }
1252
1252
  return a;
1253
1253
  };
1254
- var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
1254
+ var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
1255
1255
  const useStyles$l = createStyles((theme) => ({
1256
1256
  title: {
1257
1257
  fontSize: 34,
@@ -1317,27 +1317,27 @@ const Class = (props) => {
1317
1317
  padding: "xl",
1318
1318
  size: "xl"
1319
1319
  },
1320
- /* @__PURE__ */ React.createElement(Stack$5, { spacing: "md" }, /* @__PURE__ */ React.createElement(DropzoneButton$1, __spreadProps$6(__spreadValues$a({}, props), { close: () => setOpened(false) })), /* @__PURE__ */ React.createElement(Divider, { label: "or", labelPosition: "center", my: "md", variant: "dashed" }), /* @__PURE__ */ React.createElement("form", { onSubmit: form.onSubmit(() => {
1320
+ /* @__PURE__ */ React.createElement(Stack$5, { spacing: "md" }, /* @__PURE__ */ React.createElement(DropzoneButton$1, __spreadProps$7(__spreadValues$b({}, props), { close: () => setOpened(false) })), /* @__PURE__ */ React.createElement(Divider, { label: "or", labelPosition: "center", my: "md", variant: "dashed" }), /* @__PURE__ */ React.createElement("form", { onSubmit: form.onSubmit(() => {
1321
1321
  const values = form.values;
1322
1322
  form.reset();
1323
1323
  setOpened(false);
1324
1324
  props.onCreateMembers && props.onCreateMembers([values]);
1325
1325
  }) }, /* @__PURE__ */ React.createElement(Stack$5, null, /* @__PURE__ */ React.createElement(
1326
1326
  TextInput,
1327
- __spreadValues$a({
1327
+ __spreadValues$b({
1328
1328
  withAsterisk: true,
1329
1329
  label: "Email",
1330
1330
  placeholder: "Email"
1331
1331
  }, form.getInputProps("email"))
1332
1332
  ), /* @__PURE__ */ React.createElement(Group, { grow: true }, /* @__PURE__ */ React.createElement(
1333
1333
  TextInput,
1334
- __spreadValues$a({
1334
+ __spreadValues$b({
1335
1335
  label: "Given name",
1336
1336
  placeholder: "Given name"
1337
1337
  }, form.getInputProps("givenName"))
1338
1338
  ), /* @__PURE__ */ React.createElement(
1339
1339
  TextInput,
1340
- __spreadValues$a({
1340
+ __spreadValues$b({
1341
1341
  label: "Family name",
1342
1342
  placeholder: "Family name"
1343
1343
  }, form.getInputProps("familyName"))
@@ -1498,19 +1498,19 @@ function Table$b(props) {
1498
1498
  ));
1499
1499
  }
1500
1500
 
1501
- var __defProp$9 = Object.defineProperty;
1502
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
1503
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
1504
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
1505
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1506
- var __spreadValues$9 = (a, b) => {
1501
+ var __defProp$a = Object.defineProperty;
1502
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
1503
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
1504
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
1505
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1506
+ var __spreadValues$a = (a, b) => {
1507
1507
  for (var prop in b || (b = {}))
1508
- if (__hasOwnProp$9.call(b, prop))
1509
- __defNormalProp$9(a, prop, b[prop]);
1510
- if (__getOwnPropSymbols$9)
1511
- for (var prop of __getOwnPropSymbols$9(b)) {
1512
- if (__propIsEnum$9.call(b, prop))
1513
- __defNormalProp$9(a, prop, b[prop]);
1508
+ if (__hasOwnProp$a.call(b, prop))
1509
+ __defNormalProp$a(a, prop, b[prop]);
1510
+ if (__getOwnPropSymbols$a)
1511
+ for (var prop of __getOwnPropSymbols$a(b)) {
1512
+ if (__propIsEnum$a.call(b, prop))
1513
+ __defNormalProp$a(a, prop, b[prop]);
1514
1514
  }
1515
1515
  return a;
1516
1516
  };
@@ -1557,14 +1557,14 @@ const Classes = (props) => {
1557
1557
  props.onCreateClass && props.onCreateClass(values);
1558
1558
  }) }, /* @__PURE__ */ React.createElement(Stack$5, null, /* @__PURE__ */ React.createElement(
1559
1559
  TextInput,
1560
- __spreadValues$9({
1560
+ __spreadValues$a({
1561
1561
  withAsterisk: true,
1562
1562
  label: "Name",
1563
1563
  placeholder: "Class name"
1564
1564
  }, form.getInputProps("name"))
1565
1565
  ), /* @__PURE__ */ React.createElement(
1566
1566
  TextInput,
1567
- __spreadValues$9({
1567
+ __spreadValues$a({
1568
1568
  label: "Description",
1569
1569
  placeholder: "A class for my first period English students"
1570
1570
  }, form.getInputProps("description"))
@@ -1794,30 +1794,30 @@ function CardGradient(props) {
1794
1794
  ), /* @__PURE__ */ React.createElement(Text, { size: "xl", weight: 500, mt: "md" }, props.title), /* @__PURE__ */ React.createElement(Text, { size: "sm", mt: "sm", color: "dimmed" }, props.description));
1795
1795
  }
1796
1796
 
1797
- var __defProp$8 = Object.defineProperty;
1798
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
1799
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
1800
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
1801
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1802
- var __spreadValues$8 = (a, b) => {
1797
+ var __defProp$9 = Object.defineProperty;
1798
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
1799
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
1800
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
1801
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1802
+ var __spreadValues$9 = (a, b) => {
1803
1803
  for (var prop in b || (b = {}))
1804
- if (__hasOwnProp$8.call(b, prop))
1805
- __defNormalProp$8(a, prop, b[prop]);
1806
- if (__getOwnPropSymbols$8)
1807
- for (var prop of __getOwnPropSymbols$8(b)) {
1808
- if (__propIsEnum$8.call(b, prop))
1809
- __defNormalProp$8(a, prop, b[prop]);
1804
+ if (__hasOwnProp$9.call(b, prop))
1805
+ __defNormalProp$9(a, prop, b[prop]);
1806
+ if (__getOwnPropSymbols$9)
1807
+ for (var prop of __getOwnPropSymbols$9(b)) {
1808
+ if (__propIsEnum$9.call(b, prop))
1809
+ __defNormalProp$9(a, prop, b[prop]);
1810
1810
  }
1811
1811
  return a;
1812
1812
  };
1813
1813
  var __objRest$1 = (source, exclude) => {
1814
1814
  var target = {};
1815
1815
  for (var prop in source)
1816
- if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
1816
+ if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
1817
1817
  target[prop] = source[prop];
1818
- if (source != null && __getOwnPropSymbols$8)
1819
- for (var prop of __getOwnPropSymbols$8(source)) {
1820
- if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
1818
+ if (source != null && __getOwnPropSymbols$9)
1819
+ for (var prop of __getOwnPropSymbols$9(source)) {
1820
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
1821
1821
  target[prop] = source[prop];
1822
1822
  }
1823
1823
  return target;
@@ -1884,9 +1884,9 @@ const TenantBanner = (_a) => {
1884
1884
  };
1885
1885
  return /* @__PURE__ */ React.createElement(
1886
1886
  Card,
1887
- __spreadValues$8({
1887
+ __spreadValues$9({
1888
1888
  radius: "md",
1889
- style: __spreadValues$8({ backgroundImage: `url(${image})` }, style),
1889
+ style: __spreadValues$9({ backgroundImage: `url(${image})` }, style),
1890
1890
  className: cx(classes.card, className)
1891
1891
  }, others),
1892
1892
  /* @__PURE__ */ React.createElement(
@@ -2059,28 +2059,28 @@ function Stack$3(props) {
2059
2059
  return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(UnstyledButton, { component: Link, to: props.href }, /* @__PURE__ */ React.createElement(Stack$5, { spacing: 24, sx: { padding: 20, minWidth: 700 } }, rows)));
2060
2060
  }
2061
2061
 
2062
- var __defProp$7 = Object.defineProperty;
2063
- var __defProps$5 = Object.defineProperties;
2064
- var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
2065
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
2066
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
2067
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
2068
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2069
- var __spreadValues$7 = (a, b) => {
2062
+ var __defProp$8 = Object.defineProperty;
2063
+ var __defProps$6 = Object.defineProperties;
2064
+ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
2065
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
2066
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
2067
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
2068
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2069
+ var __spreadValues$8 = (a, b) => {
2070
2070
  for (var prop in b || (b = {}))
2071
- if (__hasOwnProp$7.call(b, prop))
2072
- __defNormalProp$7(a, prop, b[prop]);
2073
- if (__getOwnPropSymbols$7)
2074
- for (var prop of __getOwnPropSymbols$7(b)) {
2075
- if (__propIsEnum$7.call(b, prop))
2076
- __defNormalProp$7(a, prop, b[prop]);
2071
+ if (__hasOwnProp$8.call(b, prop))
2072
+ __defNormalProp$8(a, prop, b[prop]);
2073
+ if (__getOwnPropSymbols$8)
2074
+ for (var prop of __getOwnPropSymbols$8(b)) {
2075
+ if (__propIsEnum$8.call(b, prop))
2076
+ __defNormalProp$8(a, prop, b[prop]);
2077
2077
  }
2078
2078
  return a;
2079
2079
  };
2080
- var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
2080
+ var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
2081
2081
  function Table$6(props) {
2082
2082
  const preparedItems = React.useMemo(() => {
2083
- return props.items.map((item) => __spreadProps$5(__spreadValues$7({}, item), {
2083
+ return props.items.map((item) => __spreadProps$6(__spreadValues$8({}, item), {
2084
2084
  status: item.isComplete ? 2 : item.isStarted ? 1 : 0
2085
2085
  }));
2086
2086
  }, [props.items]);
@@ -2567,25 +2567,25 @@ function Table$4(props) {
2567
2567
  return /* @__PURE__ */ React.createElement(ScrollArea, null, /* @__PURE__ */ React.createElement(Table$l, { verticalSpacing: 20, sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", null, "Name"), /* @__PURE__ */ React.createElement("th", null, "Role"), /* @__PURE__ */ React.createElement("th", null, "Account Created?"), /* @__PURE__ */ React.createElement("th", null, "# of Classes"), /* @__PURE__ */ React.createElement("th", null, "Last Active"), /* @__PURE__ */ React.createElement("th", null))), /* @__PURE__ */ React.createElement("tbody", null, rows)));
2568
2568
  }
2569
2569
 
2570
- var __defProp$6 = Object.defineProperty;
2571
- var __defProps$4 = Object.defineProperties;
2572
- var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
2573
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
2574
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
2575
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
2576
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2577
- var __spreadValues$6 = (a, b) => {
2570
+ var __defProp$7 = Object.defineProperty;
2571
+ var __defProps$5 = Object.defineProperties;
2572
+ var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
2573
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
2574
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
2575
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
2576
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2577
+ var __spreadValues$7 = (a, b) => {
2578
2578
  for (var prop in b || (b = {}))
2579
- if (__hasOwnProp$6.call(b, prop))
2580
- __defNormalProp$6(a, prop, b[prop]);
2581
- if (__getOwnPropSymbols$6)
2582
- for (var prop of __getOwnPropSymbols$6(b)) {
2583
- if (__propIsEnum$6.call(b, prop))
2584
- __defNormalProp$6(a, prop, b[prop]);
2579
+ if (__hasOwnProp$7.call(b, prop))
2580
+ __defNormalProp$7(a, prop, b[prop]);
2581
+ if (__getOwnPropSymbols$7)
2582
+ for (var prop of __getOwnPropSymbols$7(b)) {
2583
+ if (__propIsEnum$7.call(b, prop))
2584
+ __defNormalProp$7(a, prop, b[prop]);
2585
2585
  }
2586
2586
  return a;
2587
2587
  };
2588
- var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
2588
+ var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
2589
2589
  const useStyles$a = createStyles((theme) => ({
2590
2590
  title: {
2591
2591
  fontSize: 34,
@@ -2647,27 +2647,27 @@ const People = (props) => {
2647
2647
  padding: "xl",
2648
2648
  size: "xl"
2649
2649
  },
2650
- /* @__PURE__ */ React.createElement(Stack$5, { spacing: "md" }, /* @__PURE__ */ React.createElement(DropzoneButton, __spreadProps$4(__spreadValues$6({}, props), { close: () => setOpened(false) })), /* @__PURE__ */ React.createElement(Divider, { label: "or", labelPosition: "center", my: "md", variant: "dashed" }), /* @__PURE__ */ React.createElement("form", { onSubmit: form.onSubmit(() => {
2650
+ /* @__PURE__ */ React.createElement(Stack$5, { spacing: "md" }, /* @__PURE__ */ React.createElement(DropzoneButton, __spreadProps$5(__spreadValues$7({}, props), { close: () => setOpened(false) })), /* @__PURE__ */ React.createElement(Divider, { label: "or", labelPosition: "center", my: "md", variant: "dashed" }), /* @__PURE__ */ React.createElement("form", { onSubmit: form.onSubmit(() => {
2651
2651
  const values = form.values;
2652
2652
  form.reset();
2653
2653
  setOpened(false);
2654
2654
  props.onCreateUsers && props.onCreateUsers([values]);
2655
2655
  }) }, /* @__PURE__ */ React.createElement(Stack$5, null, /* @__PURE__ */ React.createElement(
2656
2656
  TextInput,
2657
- __spreadValues$6({
2657
+ __spreadValues$7({
2658
2658
  withAsterisk: true,
2659
2659
  label: "Email",
2660
2660
  placeholder: "Email"
2661
2661
  }, form.getInputProps("email"))
2662
2662
  ), /* @__PURE__ */ React.createElement(Group, { grow: true }, /* @__PURE__ */ React.createElement(
2663
2663
  TextInput,
2664
- __spreadValues$6({
2664
+ __spreadValues$7({
2665
2665
  label: "Given name",
2666
2666
  placeholder: "Given name"
2667
2667
  }, form.getInputProps("givenName"))
2668
2668
  ), /* @__PURE__ */ React.createElement(
2669
2669
  TextInput,
2670
- __spreadValues$6({
2670
+ __spreadValues$7({
2671
2671
  label: "Family name",
2672
2672
  placeholder: "Family name"
2673
2673
  }, form.getInputProps("familyName"))
@@ -2853,24 +2853,24 @@ const StartAnonymousLesson = (props) => {
2853
2853
  ))))));
2854
2854
  };
2855
2855
 
2856
- var __defProp$5 = Object.defineProperty;
2857
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
2858
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
2859
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
2860
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2861
- var __spreadValues$5 = (a, b) => {
2856
+ var __defProp$6 = Object.defineProperty;
2857
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
2858
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
2859
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
2860
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2861
+ var __spreadValues$6 = (a, b) => {
2862
2862
  for (var prop in b || (b = {}))
2863
- if (__hasOwnProp$5.call(b, prop))
2864
- __defNormalProp$5(a, prop, b[prop]);
2865
- if (__getOwnPropSymbols$5)
2866
- for (var prop of __getOwnPropSymbols$5(b)) {
2867
- if (__propIsEnum$5.call(b, prop))
2868
- __defNormalProp$5(a, prop, b[prop]);
2863
+ if (__hasOwnProp$6.call(b, prop))
2864
+ __defNormalProp$6(a, prop, b[prop]);
2865
+ if (__getOwnPropSymbols$6)
2866
+ for (var prop of __getOwnPropSymbols$6(b)) {
2867
+ if (__propIsEnum$6.call(b, prop))
2868
+ __defNormalProp$6(a, prop, b[prop]);
2869
2869
  }
2870
2870
  return a;
2871
2871
  };
2872
2872
  const BadgeGrid = (props) => {
2873
- const badges = props.badges.map((b) => /* @__PURE__ */ React.createElement(TaskCard, __spreadValues$5({ key: b.title }, b)));
2873
+ const badges = props.badges.map((b) => /* @__PURE__ */ React.createElement(TaskCard, __spreadValues$6({ key: b.title }, b)));
2874
2874
  return /* @__PURE__ */ React.createElement(SimpleGrid, { cols: 4, breakpoints: [{ maxWidth: "sm", cols: 1 }, { maxWidth: "md", cols: 3 }] }, badges);
2875
2875
  };
2876
2876
  function TaskCard(props) {
@@ -2934,33 +2934,33 @@ const TrialHome = (props) => {
2934
2934
  )), /* @__PURE__ */ React.createElement(Title, { maw: 500, mb: 20, mt: 20, className: classes.title }, "Based on the tags you selected, check out these lessons to get started with your students!"), /* @__PURE__ */ React.createElement(BadgeGrid, { onAssign: props.onAssign, badges: props.badges })));
2935
2935
  };
2936
2936
 
2937
- var __defProp$4 = Object.defineProperty;
2938
- var __defProps$3 = Object.defineProperties;
2939
- var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
2940
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
2941
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
2942
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
2943
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2944
- var __spreadValues$4 = (a, b) => {
2937
+ var __defProp$5 = Object.defineProperty;
2938
+ var __defProps$4 = Object.defineProperties;
2939
+ var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
2940
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
2941
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
2942
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
2943
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2944
+ var __spreadValues$5 = (a, b) => {
2945
2945
  for (var prop in b || (b = {}))
2946
- if (__hasOwnProp$4.call(b, prop))
2947
- __defNormalProp$4(a, prop, b[prop]);
2948
- if (__getOwnPropSymbols$4)
2949
- for (var prop of __getOwnPropSymbols$4(b)) {
2950
- if (__propIsEnum$4.call(b, prop))
2951
- __defNormalProp$4(a, prop, b[prop]);
2946
+ if (__hasOwnProp$5.call(b, prop))
2947
+ __defNormalProp$5(a, prop, b[prop]);
2948
+ if (__getOwnPropSymbols$5)
2949
+ for (var prop of __getOwnPropSymbols$5(b)) {
2950
+ if (__propIsEnum$5.call(b, prop))
2951
+ __defNormalProp$5(a, prop, b[prop]);
2952
2952
  }
2953
2953
  return a;
2954
2954
  };
2955
- var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
2955
+ var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
2956
2956
  var __objRest = (source, exclude) => {
2957
2957
  var target = {};
2958
2958
  for (var prop in source)
2959
- if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
2959
+ if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
2960
2960
  target[prop] = source[prop];
2961
- if (source != null && __getOwnPropSymbols$4)
2962
- for (var prop of __getOwnPropSymbols$4(source)) {
2963
- if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
2961
+ if (source != null && __getOwnPropSymbols$5)
2962
+ for (var prop of __getOwnPropSymbols$5(source)) {
2963
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
2964
2964
  target[prop] = source[prop];
2965
2965
  }
2966
2966
  return target;
@@ -3010,7 +3010,7 @@ function ImageCheckbox(_a) {
3010
3010
  const { classes, cx } = useStyles$7({ checked: value });
3011
3011
  return /* @__PURE__ */ React.createElement(
3012
3012
  UnstyledButton,
3013
- __spreadProps$3(__spreadValues$4({}, others), {
3013
+ __spreadProps$4(__spreadValues$5({}, others), {
3014
3014
  onClick: () => handleChange(!value),
3015
3015
  className: cx(classes.button, className)
3016
3016
  }),
@@ -3031,7 +3031,7 @@ function ImageCheckbox(_a) {
3031
3031
  function SelectGrid(props) {
3032
3032
  const items = props.items.map((item) => /* @__PURE__ */ React.createElement(
3033
3033
  ImageCheckbox,
3034
- __spreadProps$3(__spreadValues$4({}, item), {
3034
+ __spreadProps$4(__spreadValues$5({}, item), {
3035
3035
  key: item.title,
3036
3036
  onChange: (checked) => props.onChange(item.title, checked)
3037
3037
  })
@@ -3049,25 +3049,25 @@ function SelectGrid(props) {
3049
3049
  );
3050
3050
  }
3051
3051
 
3052
- var __defProp$3 = Object.defineProperty;
3053
- var __defProps$2 = Object.defineProperties;
3054
- var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
3055
- var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
3056
- var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
3057
- var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
3058
- var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3059
- var __spreadValues$3 = (a, b) => {
3052
+ var __defProp$4 = Object.defineProperty;
3053
+ var __defProps$3 = Object.defineProperties;
3054
+ var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
3055
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
3056
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
3057
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
3058
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3059
+ var __spreadValues$4 = (a, b) => {
3060
3060
  for (var prop in b || (b = {}))
3061
- if (__hasOwnProp$3.call(b, prop))
3062
- __defNormalProp$3(a, prop, b[prop]);
3063
- if (__getOwnPropSymbols$3)
3064
- for (var prop of __getOwnPropSymbols$3(b)) {
3065
- if (__propIsEnum$3.call(b, prop))
3066
- __defNormalProp$3(a, prop, b[prop]);
3061
+ if (__hasOwnProp$4.call(b, prop))
3062
+ __defNormalProp$4(a, prop, b[prop]);
3063
+ if (__getOwnPropSymbols$4)
3064
+ for (var prop of __getOwnPropSymbols$4(b)) {
3065
+ if (__propIsEnum$4.call(b, prop))
3066
+ __defNormalProp$4(a, prop, b[prop]);
3067
3067
  }
3068
3068
  return a;
3069
3069
  };
3070
- var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
3070
+ var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
3071
3071
  const useStyles$6 = createStyles((theme) => ({
3072
3072
  wrapper: {
3073
3073
  minHeight: "100%",
@@ -3177,7 +3177,7 @@ const TrialRegistration = (props) => {
3177
3177
  label: "School/Organization Name",
3178
3178
  placeholder: "What's the name of your school?",
3179
3179
  data: props.organizations.map((o) => {
3180
- return __spreadProps$2(__spreadValues$3({}, o), { value: o.displayName });
3180
+ return __spreadProps$3(__spreadValues$4({}, o), { value: o.displayName });
3181
3181
  }),
3182
3182
  onItemSubmit: (item) => setOrganization({ organizationId: item.organizationId, displayName: item.displayName }),
3183
3183
  onChange: (next) => {
@@ -3189,7 +3189,7 @@ const TrialRegistration = (props) => {
3189
3189
  SelectGrid,
3190
3190
  {
3191
3191
  items: OPTIONS,
3192
- onChange: (e, checked) => setInterests(__spreadProps$2(__spreadValues$3({}, interests), { [e]: checked }))
3192
+ onChange: (e, checked) => setInterests(__spreadProps$3(__spreadValues$4({}, interests), { [e]: checked }))
3193
3193
  }
3194
3194
  ), /* @__PURE__ */ React.createElement(Group, { position: "right", mt: "md" }, /* @__PURE__ */ React.createElement(
3195
3195
  Button,
@@ -3227,25 +3227,25 @@ const AdminProvider = (props) => {
3227
3227
  );
3228
3228
  };
3229
3229
 
3230
- var __defProp$2 = Object.defineProperty;
3231
- var __defProps$1 = Object.defineProperties;
3232
- var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
3233
- var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
3234
- var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
3235
- var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
3236
- var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3237
- var __spreadValues$2 = (a, b) => {
3230
+ var __defProp$3 = Object.defineProperty;
3231
+ var __defProps$2 = Object.defineProperties;
3232
+ var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
3233
+ var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
3234
+ var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
3235
+ var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
3236
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3237
+ var __spreadValues$3 = (a, b) => {
3238
3238
  for (var prop in b || (b = {}))
3239
- if (__hasOwnProp$2.call(b, prop))
3240
- __defNormalProp$2(a, prop, b[prop]);
3241
- if (__getOwnPropSymbols$2)
3242
- for (var prop of __getOwnPropSymbols$2(b)) {
3243
- if (__propIsEnum$2.call(b, prop))
3244
- __defNormalProp$2(a, prop, b[prop]);
3239
+ if (__hasOwnProp$3.call(b, prop))
3240
+ __defNormalProp$3(a, prop, b[prop]);
3241
+ if (__getOwnPropSymbols$3)
3242
+ for (var prop of __getOwnPropSymbols$3(b)) {
3243
+ if (__propIsEnum$3.call(b, prop))
3244
+ __defNormalProp$3(a, prop, b[prop]);
3245
3245
  }
3246
3246
  return a;
3247
3247
  };
3248
- var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
3248
+ var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
3249
3249
  const useStyles$5 = createStyles((theme, props) => ({
3250
3250
  footer: {
3251
3251
  paddingTop: theme.spacing.md,
@@ -3341,7 +3341,7 @@ const App = (props) => {
3341
3341
  padding: "xs",
3342
3342
  navbar: props.navbar && /* @__PURE__ */ React.createElement(
3343
3343
  Navbar,
3344
- __spreadProps$1(__spreadValues$2({}, props.navbar.props), {
3344
+ __spreadProps$2(__spreadValues$3({}, props.navbar.props), {
3345
3345
  onSwitchAccounts: account.accounts && account.accounts.length > 1 ? () => account.setChangeModalOpen(true) : void 0
3346
3346
  })
3347
3347
  ),
@@ -3534,25 +3534,25 @@ function Stack$1(props) {
3534
3534
  return /* @__PURE__ */ React.createElement(Grid, { grow: true, gutter: "lg", sx: { padding: 20, minWidth: 700 } }, rows);
3535
3535
  }
3536
3536
 
3537
- var __defProp$1 = Object.defineProperty;
3538
- var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
3539
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
3540
- var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
3541
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3542
- var __spreadValues$1 = (a, b) => {
3537
+ var __defProp$2 = Object.defineProperty;
3538
+ var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
3539
+ var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
3540
+ var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
3541
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3542
+ var __spreadValues$2 = (a, b) => {
3543
3543
  for (var prop in b || (b = {}))
3544
- if (__hasOwnProp$1.call(b, prop))
3545
- __defNormalProp$1(a, prop, b[prop]);
3546
- if (__getOwnPropSymbols$1)
3547
- for (var prop of __getOwnPropSymbols$1(b)) {
3548
- if (__propIsEnum$1.call(b, prop))
3549
- __defNormalProp$1(a, prop, b[prop]);
3544
+ if (__hasOwnProp$2.call(b, prop))
3545
+ __defNormalProp$2(a, prop, b[prop]);
3546
+ if (__getOwnPropSymbols$2)
3547
+ for (var prop of __getOwnPropSymbols$2(b)) {
3548
+ if (__propIsEnum$2.call(b, prop))
3549
+ __defNormalProp$2(a, prop, b[prop]);
3550
3550
  }
3551
3551
  return a;
3552
3552
  };
3553
3553
  function Table$2(props) {
3554
3554
  const preparedItems = React.useMemo(() => {
3555
- return (props.items || []).map((item) => __spreadValues$1(__spreadValues$1({}, item), item.categoryPoints));
3555
+ return (props.items || []).map((item) => __spreadValues$2(__spreadValues$2({}, item), item.categoryPoints));
3556
3556
  }, [props.items]);
3557
3557
  const { items: sortedItems, requestSort, sortConfig } = useSortableData(preparedItems);
3558
3558
  if (props.loading && props.items.length === 0) {
@@ -3808,9 +3808,17 @@ const SplitButton = (props) => {
3808
3808
  };
3809
3809
 
3810
3810
  function Stack(props) {
3811
- if (!props.items.length)
3811
+ const { items, hideBadge, hideLesson } = props;
3812
+ if (!items.length)
3812
3813
  return null;
3813
- return /* @__PURE__ */ React.createElement(Grid, { gutter: "md", sx: { padding: 20, minWidth: 700 } }, /* @__PURE__ */ React.createElement(Grid.Col, { span: 3 }, /* @__PURE__ */ React.createElement(Text, { color: "dark.4", weight: "bold", size: "md" }, "Link")), /* @__PURE__ */ React.createElement(Grid.Col, { span: 3 }, /* @__PURE__ */ React.createElement(Text, { color: "dark.4", weight: "bold", size: "md" }, "Badge")), /* @__PURE__ */ React.createElement(Grid.Col, { span: 3 }, /* @__PURE__ */ React.createElement(Text, { color: "dark.4", weight: "bold", size: "md" }, "Lesson")), /* @__PURE__ */ React.createElement(Grid.Col, { span: 3 }, /* @__PURE__ */ React.createElement(Text, { color: "dark.4", weight: "bold", size: "md" }, "Question")), props.items.map((row, i) => /* @__PURE__ */ React.createElement(React.Fragment, { key: i }, /* @__PURE__ */ React.createElement(Grid.Col, { span: 3 }, /* @__PURE__ */ React.createElement(
3814
+ const visibleColumns = [
3815
+ true,
3816
+ !hideBadge,
3817
+ !hideLesson,
3818
+ true
3819
+ ].filter(Boolean).length;
3820
+ const span = 12 / visibleColumns;
3821
+ return /* @__PURE__ */ React.createElement(Grid, { gutter: "md", sx: { padding: 20, minWidth: 700 } }, /* @__PURE__ */ React.createElement(Grid.Col, { span }, /* @__PURE__ */ React.createElement(Text, { weight: "bold" }, "Link")), !hideBadge && /* @__PURE__ */ React.createElement(Grid.Col, { span }, /* @__PURE__ */ React.createElement(Text, { weight: "bold" }, "Badge")), !hideLesson && /* @__PURE__ */ React.createElement(Grid.Col, { span }, /* @__PURE__ */ React.createElement(Text, { weight: "bold" }, "Lesson")), /* @__PURE__ */ React.createElement(Grid.Col, { span }, /* @__PURE__ */ React.createElement(Text, { weight: "bold" }, "Question")), items.map((row, i) => /* @__PURE__ */ React.createElement(React.Fragment, { key: i }, /* @__PURE__ */ React.createElement(Grid.Col, { span }, /* @__PURE__ */ React.createElement(
3814
3822
  Button,
3815
3823
  {
3816
3824
  component: "a",
@@ -3821,33 +3829,33 @@ function Stack(props) {
3821
3829
  variant: "light"
3822
3830
  },
3823
3831
  "View File"
3824
- )), /* @__PURE__ */ React.createElement(Grid.Col, { span: 3 }, /* @__PURE__ */ React.createElement(Text, null, row.badgeName)), /* @__PURE__ */ React.createElement(Grid.Col, { span: 3 }, /* @__PURE__ */ React.createElement(Text, null, row.lessonName)), /* @__PURE__ */ React.createElement(Grid.Col, { span: 3 }, /* @__PURE__ */ React.createElement(Text, null, row.question)))));
3832
+ )), !hideBadge && /* @__PURE__ */ React.createElement(Grid.Col, { span }, /* @__PURE__ */ React.createElement(Text, null, row.badgeName)), !hideLesson && /* @__PURE__ */ React.createElement(Grid.Col, { span }, /* @__PURE__ */ React.createElement(Text, null, row.lessonName)), /* @__PURE__ */ React.createElement(Grid.Col, { span }, /* @__PURE__ */ React.createElement(Text, null, row.question)))));
3825
3833
  }
3826
3834
 
3827
- var __defProp = Object.defineProperty;
3828
- var __defProps = Object.defineProperties;
3829
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
3830
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3831
- var __hasOwnProp = Object.prototype.hasOwnProperty;
3832
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
3833
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3834
- var __spreadValues = (a, b) => {
3835
+ var __defProp$1 = Object.defineProperty;
3836
+ var __defProps$1 = Object.defineProperties;
3837
+ var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
3838
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
3839
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
3840
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
3841
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3842
+ var __spreadValues$1 = (a, b) => {
3835
3843
  for (var prop in b || (b = {}))
3836
- if (__hasOwnProp.call(b, prop))
3837
- __defNormalProp(a, prop, b[prop]);
3838
- if (__getOwnPropSymbols)
3839
- for (var prop of __getOwnPropSymbols(b)) {
3840
- if (__propIsEnum.call(b, prop))
3841
- __defNormalProp(a, prop, b[prop]);
3844
+ if (__hasOwnProp$1.call(b, prop))
3845
+ __defNormalProp$1(a, prop, b[prop]);
3846
+ if (__getOwnPropSymbols$1)
3847
+ for (var prop of __getOwnPropSymbols$1(b)) {
3848
+ if (__propIsEnum$1.call(b, prop))
3849
+ __defNormalProp$1(a, prop, b[prop]);
3842
3850
  }
3843
3851
  return a;
3844
3852
  };
3845
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
3853
+ var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
3846
3854
  function Table(props) {
3847
3855
  const preparedItems = React.useMemo(() => {
3848
3856
  return props.items.map((item) => {
3849
3857
  var _a;
3850
- return __spreadProps(__spreadValues({}, item), {
3858
+ return __spreadProps$1(__spreadValues$1({}, item), {
3851
3859
  submissionCount: ((_a = item.submissions) == null ? void 0 : _a.length) || 0
3852
3860
  });
3853
3861
  });
@@ -3894,12 +3902,66 @@ function Table(props) {
3894
3902
  render: (row) => row.submissions.length
3895
3903
  }],
3896
3904
  rowExpansion: {
3897
- content: ({ record }) => /* @__PURE__ */ React.createElement(Stack, { items: record.submissions })
3905
+ content: ({ record }) => /* @__PURE__ */ React.createElement(
3906
+ Stack,
3907
+ {
3908
+ items: record.submissions,
3909
+ hideBadge: props.hideBadge,
3910
+ hideLesson: props.hideLesson
3911
+ }
3912
+ )
3898
3913
  }
3899
3914
  }
3900
3915
  ));
3901
3916
  }
3902
3917
 
3918
+ var __defProp = Object.defineProperty;
3919
+ var __defProps = Object.defineProperties;
3920
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
3921
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3922
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
3923
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
3924
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3925
+ var __spreadValues = (a, b) => {
3926
+ for (var prop in b || (b = {}))
3927
+ if (__hasOwnProp.call(b, prop))
3928
+ __defNormalProp(a, prop, b[prop]);
3929
+ if (__getOwnPropSymbols)
3930
+ for (var prop of __getOwnPropSymbols(b)) {
3931
+ if (__propIsEnum.call(b, prop))
3932
+ __defNormalProp(a, prop, b[prop]);
3933
+ }
3934
+ return a;
3935
+ };
3936
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
3937
+ const useFilteredStudents = (students) => {
3938
+ return React.useMemo(() => {
3939
+ const byBadge = (badgeId) => students.map((s) => __spreadProps(__spreadValues({}, s), {
3940
+ submissions: (s.submissions || []).filter(
3941
+ (sub) => sub.badgeId === badgeId
3942
+ )
3943
+ })).filter((s) => s.submissions.length);
3944
+ const byLesson = (lessonName) => students.map((s) => __spreadProps(__spreadValues({}, s), {
3945
+ submissions: (s.submissions || []).filter(
3946
+ (sub) => sub.lessonName === lessonName
3947
+ )
3948
+ })).filter((s) => s.submissions.length);
3949
+ const byPathway = (pathwayId, badges) => {
3950
+ const validBadgeIds = badges.filter(
3951
+ (b) => Array.isArray(b.categories) && b.categories.some(
3952
+ (c) => c.startsWith(pathwayId)
3953
+ )
3954
+ ).map((b) => b.badgeId);
3955
+ return students.map((s) => __spreadProps(__spreadValues({}, s), {
3956
+ submissions: (s.submissions || []).filter(
3957
+ (sub) => validBadgeIds.includes(sub.badgeId)
3958
+ )
3959
+ })).filter((s) => s.submissions.length);
3960
+ };
3961
+ return { byBadge, byLesson, byPathway };
3962
+ }, [students]);
3963
+ };
3964
+
3903
3965
  const useStyles = createStyles((theme) => ({
3904
3966
  title: {
3905
3967
  fontSize: 34,
@@ -3912,6 +3974,43 @@ const useStyles = createStyles((theme) => ({
3912
3974
  maxWidth: 600
3913
3975
  }
3914
3976
  }));
3977
+ const BadgeTable = ({ badges, students, loading }) => {
3978
+ const { byBadge } = useFilteredStudents(students);
3979
+ return /* @__PURE__ */ React.createElement(Accordion, null, badges.map((b) => /* @__PURE__ */ React.createElement(Accordion.Item, { key: b.badgeId, value: b.badgeId }, /* @__PURE__ */ React.createElement(Accordion.Control, null, b.displayName), /* @__PURE__ */ React.createElement(Accordion.Panel, null, /* @__PURE__ */ React.createElement(
3980
+ Table,
3981
+ {
3982
+ loading,
3983
+ items: byBadge(b.badgeId),
3984
+ hideBadge: true
3985
+ }
3986
+ )))));
3987
+ };
3988
+ const LessonTableWrapper = ({ lessons, students, loading }) => {
3989
+ const { byLesson } = useFilteredStudents(students);
3990
+ return /* @__PURE__ */ React.createElement(Accordion, null, lessons.map((l) => /* @__PURE__ */ React.createElement(Accordion.Item, { key: l.lessonId, value: l.lessonId }, /* @__PURE__ */ React.createElement(Accordion.Control, null, l.lessonName), /* @__PURE__ */ React.createElement(Accordion.Panel, null, /* @__PURE__ */ React.createElement(
3991
+ Table,
3992
+ {
3993
+ loading,
3994
+ items: byLesson(l.lessonName),
3995
+ hideLesson: true
3996
+ }
3997
+ )))));
3998
+ };
3999
+ const PathwayTable = ({
4000
+ pathways,
4001
+ badges,
4002
+ students,
4003
+ loading
4004
+ }) => {
4005
+ const { byPathway } = useFilteredStudents(students);
4006
+ return /* @__PURE__ */ React.createElement(Accordion, null, pathways.map((p) => /* @__PURE__ */ React.createElement(Accordion.Item, { key: p.pathwayId, value: p.pathwayId }, /* @__PURE__ */ React.createElement(Accordion.Control, null, /* @__PURE__ */ React.createElement("strong", null, p.title), /* @__PURE__ */ React.createElement("div", null, p.description)), /* @__PURE__ */ React.createElement(Accordion.Panel, null, /* @__PURE__ */ React.createElement(
4007
+ Table,
4008
+ {
4009
+ loading,
4010
+ items: byPathway(p.pathwayId, badges)
4011
+ }
4012
+ )))));
4013
+ };
3915
4014
  const FileLocker = (props) => {
3916
4015
  const { classes } = useStyles();
3917
4016
  const [tab, setTab] = useState("students");
@@ -3977,8 +4076,30 @@ const FileLocker = (props) => {
3977
4076
  loading: props.loading,
3978
4077
  items: props.students
3979
4078
  }
4079
+ ), tab === "pathways" && /* @__PURE__ */ React.createElement(
4080
+ PathwayTable,
4081
+ {
4082
+ pathways: props.pathways || [],
4083
+ badges: props.badges || [],
4084
+ students: props.students,
4085
+ loading: props.loading
4086
+ }
4087
+ ), tab === "badges" && /* @__PURE__ */ React.createElement(
4088
+ BadgeTable,
4089
+ {
4090
+ badges: props.badges || [],
4091
+ students: props.students,
4092
+ loading: props.loading
4093
+ }
4094
+ ), tab === "lessons" && /* @__PURE__ */ React.createElement(
4095
+ LessonTableWrapper,
4096
+ {
4097
+ lessons: props.lessons,
4098
+ students: props.students,
4099
+ loading: props.loading
4100
+ }
3980
4101
  )))))));
3981
4102
  };
3982
4103
 
3983
- export { AdminProvider, App, Badge, Badges, Class, Classes, Dashboard, FileLocker, GettingStarted, Home, Lesson, Lessons, Navbar, Organization, Pathway, Pathways, People, StartAnonymousLesson, Student, SwitchAccount, TrialHome, TrialRegistration };
4104
+ export { AdminProvider, App, Badge, Badges, Class, Classes, Dashboard, FileLocker, GettingStarted, Home, Lesson, Lessons, Navbar, Organization, Pathway, PathwayTable, Pathways, People, StartAnonymousLesson, Student, SwitchAccount, TrialHome, TrialRegistration };
3984
4105
  //# sourceMappingURL=index.mjs.map