@local-civics/mgmt-ui 0.1.139 → 0.1.141

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,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useState } from 'react';
3
3
  import { createStyles, Group, Avatar, Text, Box, Badge as Badge$1, ThemeIcon, Collapse, Navbar as Navbar$1, Center, Image, Code, Burger, ScrollArea, Modal, Loader, Container, Button, Title, UnstyledButton, Card, SimpleGrid, Tabs as Tabs$1, Menu, ActionIcon, Grid, Table as Table$k, Stack as Stack$4, LoadingOverlay, Select, Autocomplete, Drawer, Divider, TextInput, Tooltip, Paper, Overlay, Anchor, Checkbox, createEmotionCache, MantineProvider, AppShell } from '@mantine/core';
4
- import { IconChevronRight, IconChevronLeft, IconVideo, IconSwitchHorizontal, IconLogout, IconHome2, IconGauge, IconCategory2, IconAlbum, IconLambda, IconBuilding, IconBatteryEco, IconBooks, IconBackpack, IconChevronDown, IconClipboardCopy, IconTableExport, IconArrowLeft, IconPlaylistAdd, IconCheck, IconTrash, IconDownload, IconX, IconCloudUpload, IconInfoCircle, IconColorSwatch, IconPointer, IconScribble, IconSchool, IconPodium, IconBriefcase, IconPresentation, IconNews, IconTools, IconBrandInstagram, IconBrandLinkedin, IconBrandFacebook } from '@tabler/icons';
4
+ import { IconChevronRight, IconChevronLeft, IconVideo, IconSwitchHorizontal, IconLogout, IconHome2, IconGauge, IconCategory2, IconRoute, IconAlbum, IconLambda, IconBuilding, IconBatteryEco, IconBooks, IconBackpack, IconChevronDown, IconClipboardCopy, IconTableExport, IconArrowLeft, IconPlaylistAdd, IconCheck, IconTrash, IconDownload, IconX, IconCloudUpload, IconInfoCircle, IconColorSwatch, IconPointer, IconScribble, IconSchool, IconPodium, IconBriefcase, IconPresentation, IconNews, IconTools, IconBrandInstagram, IconBrandLinkedin, IconBrandFacebook } from '@tabler/icons';
5
5
  import { Link } from 'react-router-dom';
6
6
  import { NotificationsProvider } from '@mantine/notifications';
7
7
  export { showNotification, updateNotification } from '@mantine/notifications';
@@ -263,6 +263,7 @@ const data = [
263
263
  { label: "Home", icon: IconHome2 },
264
264
  { label: "Dashboard", icon: IconGauge },
265
265
  { label: "Classes", icon: IconCategory2 },
266
+ { label: "Pathways", icon: IconRoute },
266
267
  { label: "Badges", icon: IconAlbum },
267
268
  { label: "Lessons", icon: IconLambda },
268
269
  {
@@ -1684,9 +1685,9 @@ const Home = (props) => {
1684
1685
  )), /* @__PURE__ */ React.createElement(Grid.Col, null, /* @__PURE__ */ React.createElement(
1685
1686
  CardGradient,
1686
1687
  {
1687
- title: "Lessons",
1688
- description: "Explore units of instruction and/or see corresponding class progress.",
1689
- onClick: props.onLessonsClick
1688
+ title: "Pathways",
1689
+ description: "Curated learning experiences for skill-building.",
1690
+ onClick: props.onPathwaysClick
1690
1691
  }
1691
1692
  )), /* @__PURE__ */ React.createElement(Grid.Col, null, /* @__PURE__ */ React.createElement(
1692
1693
  CardGradient,
@@ -1695,6 +1696,13 @@ const Home = (props) => {
1695
1696
  description: "Project-sized skills acquisition and standards alignment.",
1696
1697
  onClick: props.onBadgesClick
1697
1698
  }
1699
+ )), /* @__PURE__ */ React.createElement(Grid.Col, null, /* @__PURE__ */ React.createElement(
1700
+ CardGradient,
1701
+ {
1702
+ title: "Lessons",
1703
+ description: "Explore units of instruction and/or see corresponding class progress.",
1704
+ onClick: props.onLessonsClick
1705
+ }
1698
1706
  )))));
1699
1707
  };
1700
1708
 
@@ -3299,7 +3307,8 @@ const Pathway = (props) => {
3299
3307
  const { classes } = useStyles();
3300
3308
  const [tab, setTab] = useState("lessons");
3301
3309
  const numberOfStudents = props.students.length;
3302
- const percentageOfBadgesEarned = numberOfStudents > 0 ? props.students.filter((u) => u.isComplete).length / numberOfStudents : 0;
3310
+ numberOfStudents > 0 ? props.students.filter((u) => u.isComplete).length / numberOfStudents : 0;
3311
+ const numberOfBadgesEarned = numberOfStudents > 0 ? props.students.filter((u) => u.isComplete).length : 0;
3303
3312
  return /* @__PURE__ */ React.createElement(Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React.createElement(Stack$4, { spacing: "md" }, /* @__PURE__ */ React.createElement(Grid, null, /* @__PURE__ */ React.createElement(Grid.Col, { sm: "auto" }, /* @__PURE__ */ React.createElement(UnstyledButton, { onClick: props.onBackClick }, /* @__PURE__ */ React.createElement(
3304
3313
  Badge$1,
3305
3314
  {
@@ -3308,7 +3317,7 @@ const Pathway = (props) => {
3308
3317
  size: "lg"
3309
3318
  },
3310
3319
  "Back"
3311
- )), /* @__PURE__ */ React.createElement(Group, null, /* @__PURE__ */ React.createElement(Stack$4, { spacing: 0 }, /* @__PURE__ */ React.createElement(Title, { order: 2, className: classes.title, mt: "md" }, props.displayName || "Badge"), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", className: classes.description, mt: "sm" }, props.description || "No description")), !props.trial && /* @__PURE__ */ React.createElement(Stack$4, { ml: "auto" }, /* @__PURE__ */ React.createElement(
3320
+ )), /* @__PURE__ */ React.createElement(Group, null, /* @__PURE__ */ React.createElement(Stack$4, { spacing: 0 }, /* @__PURE__ */ React.createElement(Title, { order: 2, className: classes.title, mt: "md" }, props.title || "Pathway"), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", className: classes.description, mt: "sm" }, props.description || "No description")), !props.trial && /* @__PURE__ */ React.createElement(Stack$4, { ml: "auto" }, /* @__PURE__ */ React.createElement(
3312
3321
  SplitButton,
3313
3322
  {
3314
3323
  href: props.href,
@@ -3318,8 +3327,8 @@ const Pathway = (props) => {
3318
3327
  ))))), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React.createElement(Stack$4, null, /* @__PURE__ */ React.createElement(StatsGroup, { data: [
3319
3328
  {
3320
3329
  title: props.trial ? "BADGES SUBMITTED" : "PATHWAY COMPLETION",
3321
- value: props.trial ? props.lessonsCompleted || 0 : percentageOfBadgesEarned,
3322
- unit: props.trial ? "" : "%"
3330
+ value: props.trial ? 0 : numberOfBadgesEarned,
3331
+ unit: props.trial ? "" : ""
3323
3332
  }
3324
3333
  ] }), !props.trial && /* @__PURE__ */ React.createElement(
3325
3334
  Select,