@local-civics/mgmt-ui 0.1.140 → 0.1.142

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 CHANGED
@@ -389,8 +389,9 @@ type HomeProps = {
389
389
  };
390
390
  onDashboardClick: () => void;
391
391
  onClassesClick: () => void;
392
- onLessonsClick: () => void;
392
+ onPathwaysClick: () => void;
393
393
  onBadgesClick: () => void;
394
+ onLessonsClick: () => void;
394
395
  };
395
396
  /**
396
397
  * Home
@@ -716,7 +717,7 @@ declare const Pathways: (props: PathwaysProps) => JSX.Element;
716
717
  * Item
717
718
  */
718
719
  interface Item$2 {
719
- lessonName: string;
720
+ badgeName: string;
720
721
  completion: number;
721
722
  isStarted?: boolean;
722
723
  href: string;
@@ -731,15 +732,15 @@ interface Item$1 {
731
732
  name: string;
732
733
  email: string;
733
734
  isComplete?: boolean;
734
- lessons: Item$2[];
735
+ badges: Item$2[];
735
736
  }
736
737
 
737
738
  /**
738
739
  * Item
739
740
  */
740
741
  interface Item {
741
- lessonId: string;
742
- lessonName: string;
742
+ badgeId: string;
743
+ badgeName: string;
743
744
  percentageCompletion: number;
744
745
  href: string;
745
746
  }
@@ -764,12 +765,12 @@ type PathwayProps = {
764
765
  title: string;
765
766
  description: string;
766
767
  classes: PathwayClass[];
767
- lessons: Item[];
768
+ badges: Item[];
768
769
  classId: string;
769
770
  students: PathwayUserItem[];
770
771
  href: string;
771
772
  trial?: boolean;
772
- lessonsCompleted?: number;
773
+ badgesCompleted?: number;
773
774
  onBackClick: () => void;
774
775
  onClassChange: (classId: string) => void;
775
776
  onCopyLinkClick: () => void;
package/dist/index.js CHANGED
@@ -1705,9 +1705,9 @@ const Home = (props) => {
1705
1705
  )), /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, null, /* @__PURE__ */ React__namespace.createElement(
1706
1706
  CardGradient,
1707
1707
  {
1708
- title: "Lessons",
1709
- description: "Explore units of instruction and/or see corresponding class progress.",
1710
- onClick: props.onLessonsClick
1708
+ title: "Pathways",
1709
+ description: "Curated learning experiences for skill-building.",
1710
+ onClick: props.onPathwaysClick
1711
1711
  }
1712
1712
  )), /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, null, /* @__PURE__ */ React__namespace.createElement(
1713
1713
  CardGradient,
@@ -1716,6 +1716,13 @@ const Home = (props) => {
1716
1716
  description: "Project-sized skills acquisition and standards alignment.",
1717
1717
  onClick: props.onBadgesClick
1718
1718
  }
1719
+ )), /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, null, /* @__PURE__ */ React__namespace.createElement(
1720
+ CardGradient,
1721
+ {
1722
+ title: "Lessons",
1723
+ description: "Explore units of instruction and/or see corresponding class progress.",
1724
+ onClick: props.onLessonsClick
1725
+ }
1719
1726
  )))));
1720
1727
  };
1721
1728
 
@@ -3242,7 +3249,7 @@ function Stack(props) {
3242
3249
  if (props.items.length === 0) {
3243
3250
  return null;
3244
3251
  }
3245
- const rows = props.items.map((row) => /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span: 6 }, /* @__PURE__ */ React__namespace.createElement(core.Text, { component: reactRouterDom.Link, to: row.href, color: "dark.4", weight: "bold", size: "md" }, row.lessonName)), /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span: 6 }, row.completion >= 1 && /* @__PURE__ */ React__namespace.createElement(core.Badge, { variant: "filled" }, "Complete"), row.completion === 0 && !row.isStarted && /* @__PURE__ */ React__namespace.createElement(core.Badge, { color: "red", variant: "filled" }, "Not started"), row.completion > 0 && row.completion < 1 && /* @__PURE__ */ React__namespace.createElement(core.Badge, { color: "violet", variant: "filled" }, Math.round((row.completion + Number.EPSILON) * 100), "% Complete"))));
3252
+ const rows = props.items.map((row) => /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span: 6 }, /* @__PURE__ */ React__namespace.createElement(core.Text, { component: reactRouterDom.Link, to: row.href, color: "dark.4", weight: "bold", size: "md" }, row.badgeName)), /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span: 6 }, row.completion >= 1 && /* @__PURE__ */ React__namespace.createElement(core.Badge, { variant: "filled" }, "Complete"), row.completion === 0 && !row.isStarted && /* @__PURE__ */ React__namespace.createElement(core.Badge, { color: "red", variant: "filled" }, "Not started"), row.completion > 0 && row.completion < 1 && /* @__PURE__ */ React__namespace.createElement(core.Badge, { color: "violet", variant: "filled" }, Math.round((row.completion + Number.EPSILON) * 100), "% Complete"))));
3246
3253
  return /* @__PURE__ */ React__namespace.createElement(core.Grid, { grow: true, gutter: "lg", sx: { padding: 20, minWidth: 700 } }, rows);
3247
3254
  }
3248
3255
 
@@ -3279,7 +3286,7 @@ function Table$1(props) {
3279
3286
  render: (row) => /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, !!row.isComplete && /* @__PURE__ */ React__namespace.createElement(core.Badge, { variant: "filled" }, "Complete"), !row.isComplete && /* @__PURE__ */ React__namespace.createElement(core.Badge, { color: "red", variant: "filled" }, "Incomplete"))
3280
3287
  }],
3281
3288
  rowExpansion: {
3282
- content: ({ record }) => /* @__PURE__ */ React__namespace.createElement(Stack, { items: record.lessons })
3289
+ content: ({ record }) => /* @__PURE__ */ React__namespace.createElement(Stack, { items: record.badges })
3283
3290
  }
3284
3291
  }
3285
3292
  ));
@@ -3299,7 +3306,7 @@ function Table(props) {
3299
3306
  }
3300
3307
  const rows = props.items.map((row) => {
3301
3308
  const percentageCompletion = Math.round((row.percentageCompletion + Number.EPSILON) * 100);
3302
- return /* @__PURE__ */ React__namespace.createElement("tr", { key: row.lessonName }, /* @__PURE__ */ React__namespace.createElement("td", null, /* @__PURE__ */ React__namespace.createElement(core.Text, { component: reactRouterDom.Link, to: row.href }, row.lessonName)), /* @__PURE__ */ React__namespace.createElement("td", null, percentageCompletion, "%"));
3309
+ return /* @__PURE__ */ React__namespace.createElement("tr", { key: row.badgeName }, /* @__PURE__ */ React__namespace.createElement("td", null, /* @__PURE__ */ React__namespace.createElement(core.Text, { component: reactRouterDom.Link, to: row.href }, row.badgeName)), /* @__PURE__ */ React__namespace.createElement("td", null, percentageCompletion, "%"));
3303
3310
  });
3304
3311
  return /* @__PURE__ */ React__namespace.createElement(core.ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React__namespace.createElement(core.Table, { verticalSpacing: "sm", sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React__namespace.createElement("thead", null, /* @__PURE__ */ React__namespace.createElement("tr", null, /* @__PURE__ */ React__namespace.createElement("th", null, "Badge Name"), /* @__PURE__ */ React__namespace.createElement("th", null, "Badge Completion"))), /* @__PURE__ */ React__namespace.createElement("tbody", null, rows)));
3305
3312
  }
@@ -3363,16 +3370,16 @@ const Pathway = (props) => {
3363
3370
  {
3364
3371
  value: tab,
3365
3372
  data: [
3366
- { label: "By Badge", value: "lessons" },
3373
+ { label: "By Badge", value: "badges" },
3367
3374
  { label: "By student", value: "students" }
3368
3375
  ],
3369
3376
  onChange: setTab
3370
3377
  }
3371
- ), (!!props.trial || tab === "lessons") && /* @__PURE__ */ React__namespace.createElement(
3378
+ ), (!!props.trial || tab === "badges") && /* @__PURE__ */ React__namespace.createElement(
3372
3379
  Table,
3373
3380
  {
3374
3381
  loading: props.loading,
3375
- items: props.lessons
3382
+ items: props.badges
3376
3383
  }
3377
3384
  ), !props.trial && tab === "students" && /* @__PURE__ */ React__namespace.createElement(
3378
3385
  Table$1,