@local-civics/mgmt-ui 0.1.91 → 0.1.93
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 +14 -7
- package/dist/index.js +53 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +54 -36
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -611,12 +611,19 @@ declare const TrialHome: (props: TrialHomeProps) => JSX.Element;
|
|
|
611
611
|
* TrialRegistrationProps
|
|
612
612
|
*/
|
|
613
613
|
type TrialRegistrationProps = {
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
614
|
+
organizations: {
|
|
615
|
+
organizationId: string;
|
|
616
|
+
displayName: string;
|
|
617
|
+
}[];
|
|
618
|
+
onBegin: (data: NewTrialRegistration) => void;
|
|
619
|
+
onQueryOrganizations: (name: string) => void;
|
|
620
|
+
};
|
|
621
|
+
type NewTrialRegistration = {
|
|
622
|
+
firstName: string;
|
|
623
|
+
lastName: string;
|
|
624
|
+
organizationId: string;
|
|
625
|
+
organizationName: string;
|
|
626
|
+
interests: string[];
|
|
620
627
|
};
|
|
621
628
|
/**
|
|
622
629
|
* TrialRegistration
|
|
@@ -657,4 +664,4 @@ type AppProps = {
|
|
|
657
664
|
*/
|
|
658
665
|
declare const App: (props: AppProps) => JSX.Element;
|
|
659
666
|
|
|
660
|
-
export { AccountItem, AdminProvider, AdminProviderProps, App, AppProps, Badge, BadgeClass, BadgeItem, BadgeProps, BadgeUserItem, Badges, BadgesProps, Class, ClassItem, ClassProps, Classes, ClassesProps, Dashboard, DashboardClass, DashboardProps, Home, HomeProps, Lesson, LessonClass, LessonItem, LessonProps, LessonUserItem, Lessons, LessonsProps, MemberItem, Navbar, NavbarProps, Organization, OrganizationProps, People, PeopleProps, StartAnonymousLesson, StartAnonymousLessonProps, Student, StudentProps, SwitchAccount, SwitchAccountProps, TrialHome, TrialHomeProps, TrialRegistration, TrialRegistrationProps, UserItem };
|
|
667
|
+
export { AccountItem, AdminProvider, AdminProviderProps, App, AppProps, Badge, BadgeClass, BadgeItem, BadgeProps, BadgeUserItem, Badges, BadgesProps, Class, ClassItem, ClassProps, Classes, ClassesProps, Dashboard, DashboardClass, DashboardProps, Home, HomeProps, Lesson, LessonClass, LessonItem, LessonProps, LessonUserItem, Lessons, LessonsProps, MemberItem, Navbar, NavbarProps, NewTrialRegistration, Organization, OrganizationProps, People, PeopleProps, StartAnonymousLesson, StartAnonymousLessonProps, Student, StudentProps, SwitchAccount, SwitchAccountProps, TrialHome, TrialHomeProps, TrialRegistration, TrialRegistrationProps, UserItem };
|
package/dist/index.js
CHANGED
|
@@ -1721,7 +1721,15 @@ const useStyles$a = core.createStyles((theme) => ({
|
|
|
1721
1721
|
const SplitButton$1 = (props) => {
|
|
1722
1722
|
const { classes, theme } = useStyles$a();
|
|
1723
1723
|
const menuIconColor = theme.colors[theme.primaryColor][theme.colorScheme === "dark" ? 5 : 6];
|
|
1724
|
-
return /* @__PURE__ */ React__namespace.createElement(core.
|
|
1724
|
+
return /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: "sm" }, /* @__PURE__ */ React__namespace.createElement(
|
|
1725
|
+
core.Button,
|
|
1726
|
+
{
|
|
1727
|
+
variant: "gradient",
|
|
1728
|
+
leftIcon: /* @__PURE__ */ React__namespace.createElement(icons.IconClipboardCopy, { size: 14 }),
|
|
1729
|
+
onClick: props.onCopyLinkClick
|
|
1730
|
+
},
|
|
1731
|
+
"Assign"
|
|
1732
|
+
), /* @__PURE__ */ React__namespace.createElement(core.Group, { noWrap: true, spacing: 0 }, /* @__PURE__ */ React__namespace.createElement(
|
|
1725
1733
|
core.Button,
|
|
1726
1734
|
{
|
|
1727
1735
|
component: reactRouterDom.Link,
|
|
@@ -1739,21 +1747,14 @@ const SplitButton$1 = (props) => {
|
|
|
1739
1747
|
className: classes.menuControl
|
|
1740
1748
|
},
|
|
1741
1749
|
/* @__PURE__ */ React__namespace.createElement(icons.IconChevronDown, { size: 16, stroke: 1.5 })
|
|
1742
|
-
)), /* @__PURE__ */ React__namespace.createElement(core.Menu.Dropdown, null, /* @__PURE__ */ React__namespace.createElement(
|
|
1743
|
-
core.Menu.Item,
|
|
1744
|
-
{
|
|
1745
|
-
icon: /* @__PURE__ */ React__namespace.createElement(icons.IconClipboardCopy, { size: 16, stroke: 1.5, color: menuIconColor }),
|
|
1746
|
-
onClick: props.onCopyLinkClick
|
|
1747
|
-
},
|
|
1748
|
-
"Copy link"
|
|
1749
|
-
), !props.noExport && /* @__PURE__ */ React__namespace.createElement(
|
|
1750
|
+
)), /* @__PURE__ */ React__namespace.createElement(core.Menu.Dropdown, null, !props.noExport && /* @__PURE__ */ React__namespace.createElement(
|
|
1750
1751
|
core.Menu.Item,
|
|
1751
1752
|
{
|
|
1752
1753
|
icon: /* @__PURE__ */ React__namespace.createElement(icons.IconTableExport, { size: 16, stroke: 1.5, color: menuIconColor }),
|
|
1753
1754
|
onClick: props.onExportDataClick
|
|
1754
1755
|
},
|
|
1755
1756
|
"Export data (.csv)"
|
|
1756
|
-
))));
|
|
1757
|
+
)))));
|
|
1757
1758
|
};
|
|
1758
1759
|
|
|
1759
1760
|
function Stack$1(props) {
|
|
@@ -1917,6 +1918,14 @@ const Lesson = (props) => {
|
|
|
1917
1918
|
});
|
|
1918
1919
|
avatars.push(/* @__PURE__ */ React__namespace.createElement(core.Avatar, { src, radius: "xl" }));
|
|
1919
1920
|
}
|
|
1921
|
+
const tabs = props.trial ? [
|
|
1922
|
+
{ label: "By question", value: "question" },
|
|
1923
|
+
{ label: "By student", value: "students" }
|
|
1924
|
+
] : [
|
|
1925
|
+
{ label: "By question", value: "question" },
|
|
1926
|
+
{ label: "By student", value: "students" },
|
|
1927
|
+
{ label: "By reflection", value: "reflections" }
|
|
1928
|
+
];
|
|
1920
1929
|
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.UnstyledButton, { onClick: props.onBackClick }, /* @__PURE__ */ React__namespace.createElement(
|
|
1921
1930
|
core.Badge,
|
|
1922
1931
|
{
|
|
@@ -1959,30 +1968,26 @@ const Lesson = (props) => {
|
|
|
1959
1968
|
return { value: g.classId, label: g.name };
|
|
1960
1969
|
})
|
|
1961
1970
|
}
|
|
1962
|
-
), /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: 0 },
|
|
1971
|
+
), /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: 0 }, /* @__PURE__ */ React__namespace.createElement(
|
|
1963
1972
|
Tabs,
|
|
1964
1973
|
{
|
|
1965
1974
|
value: tab,
|
|
1966
|
-
data:
|
|
1967
|
-
{ label: "By question", value: "question" },
|
|
1968
|
-
{ label: "By student", value: "students" },
|
|
1969
|
-
{ label: "By reflection", value: "reflections" }
|
|
1970
|
-
],
|
|
1975
|
+
data: tabs,
|
|
1971
1976
|
onChange: setTab
|
|
1972
1977
|
}
|
|
1973
|
-
),
|
|
1978
|
+
), tab === "question" && /* @__PURE__ */ React__namespace.createElement(
|
|
1974
1979
|
Stack,
|
|
1975
1980
|
{
|
|
1976
1981
|
loading: props.loading,
|
|
1977
1982
|
items: props.questions
|
|
1978
1983
|
}
|
|
1979
|
-
),
|
|
1984
|
+
), tab === "reflections" && /* @__PURE__ */ React__namespace.createElement(
|
|
1980
1985
|
Table$3,
|
|
1981
1986
|
{
|
|
1982
1987
|
loading: props.loading,
|
|
1983
1988
|
items: props.reflections
|
|
1984
1989
|
}
|
|
1985
|
-
),
|
|
1990
|
+
), tab === "students" && /* @__PURE__ */ React__namespace.createElement(
|
|
1986
1991
|
Table$2,
|
|
1987
1992
|
{
|
|
1988
1993
|
loading: props.loading,
|
|
@@ -2646,7 +2651,7 @@ function ImageCheckbox(_a) {
|
|
|
2646
2651
|
onClick: () => handleChange(!value),
|
|
2647
2652
|
className: cx(classes.button, className)
|
|
2648
2653
|
}),
|
|
2649
|
-
/* @__PURE__ */ React__namespace.createElement(core.ThemeIcon, { variant: "light", size: "lg", color: "blue" }, /* @__PURE__ */ React__namespace.createElement(Icon, { size:
|
|
2654
|
+
/* @__PURE__ */ React__namespace.createElement(core.ThemeIcon, { variant: "light", size: "lg", color: "blue" }, /* @__PURE__ */ React__namespace.createElement(Icon, { size: 25 })),
|
|
2650
2655
|
/* @__PURE__ */ React__namespace.createElement("div", { className: classes.body }, /* @__PURE__ */ React__namespace.createElement(core.Text, { weight: 500, size: "sm", sx: { lineHeight: 1 } }, title)),
|
|
2651
2656
|
/* @__PURE__ */ React__namespace.createElement(
|
|
2652
2657
|
core.Checkbox,
|
|
@@ -2702,8 +2707,7 @@ var __spreadValues$1 = (a, b) => {
|
|
|
2702
2707
|
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
2703
2708
|
const useStyles$1 = core.createStyles((theme) => ({
|
|
2704
2709
|
wrapper: {
|
|
2705
|
-
minHeight:
|
|
2706
|
-
height: "100%",
|
|
2710
|
+
minHeight: "100%",
|
|
2707
2711
|
boxSizing: "border-box",
|
|
2708
2712
|
backgroundImage: `linear-gradient(-60deg, #4e5561 0%, #222a39 100%)`,
|
|
2709
2713
|
padding: theme.spacing.xl * 2.5,
|
|
@@ -2753,19 +2757,21 @@ const useStyles$1 = core.createStyles((theme) => ({
|
|
|
2753
2757
|
}
|
|
2754
2758
|
}));
|
|
2755
2759
|
const OPTIONS = [
|
|
2756
|
-
{ description: "
|
|
2757
|
-
{ description: "
|
|
2758
|
-
{ description: "
|
|
2759
|
-
{ description: "project-based learning", title: "Project-based learning", icon: icons.IconTools },
|
|
2760
|
+
{ description: "elementary", title: "Elementary (K-5)", icon: icons.IconScribble },
|
|
2761
|
+
{ description: "middle", title: "Middle (6-8)", icon: icons.IconBackpack },
|
|
2762
|
+
{ description: "high school", title: "High School (9-12)", icon: icons.IconSchool },
|
|
2760
2763
|
{ description: "college", title: "College", icon: icons.IconPodium },
|
|
2761
|
-
{ description: "career", title: "Career", icon: icons.
|
|
2762
|
-
{ description: "
|
|
2764
|
+
{ description: "career", title: "Career", icon: icons.IconBriefcase },
|
|
2765
|
+
{ description: "work-based learning", title: "Work-Based Learning", icon: icons.IconPresentation },
|
|
2766
|
+
{ description: "student leadership", title: "Student Leadership", icon: icons.IconPodium },
|
|
2767
|
+
{ description: "civics", title: "Civics", icon: icons.IconNews },
|
|
2768
|
+
{ description: "project-based learning", title: "Project-Based Learning", icon: icons.IconTools }
|
|
2763
2769
|
];
|
|
2764
2770
|
const TrialRegistration = (props) => {
|
|
2765
2771
|
const { classes } = useStyles$1();
|
|
2766
2772
|
const [firstName, setFirstName] = React__namespace.useState("");
|
|
2767
2773
|
const [lastName, setLastName] = React__namespace.useState("");
|
|
2768
|
-
const [
|
|
2774
|
+
const [organization, setOrganization] = React__namespace.useState({ organizationId: "", displayName: "" });
|
|
2769
2775
|
const [interests, setInterests] = React__namespace.useState({});
|
|
2770
2776
|
return /* @__PURE__ */ React__namespace.createElement("div", { className: classes.wrapper }, /* @__PURE__ */ React__namespace.createElement(core.SimpleGrid, { maw: 1300, ml: "auto", mr: "auto", cols: 2, spacing: 50, breakpoints: [{ maxWidth: "md", cols: 1 }] }, /* @__PURE__ */ React__namespace.createElement(core.Group, { spacing: "sm" }, /* @__PURE__ */ React__namespace.createElement(
|
|
2771
2777
|
core.Image,
|
|
@@ -2803,14 +2809,20 @@ const TrialRegistration = (props) => {
|
|
|
2803
2809
|
onChange: (e) => setLastName(e.target.value)
|
|
2804
2810
|
}
|
|
2805
2811
|
), /* @__PURE__ */ React__namespace.createElement(
|
|
2806
|
-
core.
|
|
2812
|
+
core.Autocomplete,
|
|
2807
2813
|
{
|
|
2808
|
-
label: "School Name
|
|
2814
|
+
label: "School/Organization Name",
|
|
2809
2815
|
placeholder: "What's the name of your school?",
|
|
2810
|
-
|
|
2811
|
-
|
|
2816
|
+
data: props.organizations.map((o) => {
|
|
2817
|
+
return __spreadProps$1(__spreadValues$1({}, o), { value: o.displayName });
|
|
2818
|
+
}),
|
|
2819
|
+
onItemSubmit: (item) => setOrganization({ organizationId: item.organizationId, displayName: item.displayName }),
|
|
2820
|
+
onChange: (next) => {
|
|
2821
|
+
setOrganization({ organizationId: "", displayName: next });
|
|
2822
|
+
return props.onQueryOrganizations(next);
|
|
2823
|
+
}
|
|
2812
2824
|
}
|
|
2813
|
-
)), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: 14, weight: 500, mb: "md", mt: "xl" }, "
|
|
2825
|
+
)), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: 14, weight: 500, mb: "md", mt: "xl" }, "Where do you want to start? (Select as many as you want)"), /* @__PURE__ */ React__namespace.createElement(
|
|
2814
2826
|
SelectGrid,
|
|
2815
2827
|
{
|
|
2816
2828
|
items: OPTIONS,
|
|
@@ -2820,7 +2832,13 @@ const TrialRegistration = (props) => {
|
|
|
2820
2832
|
core.Button,
|
|
2821
2833
|
{
|
|
2822
2834
|
disabled: !firstName || !lastName,
|
|
2823
|
-
onClick: () => props.onBegin({
|
|
2835
|
+
onClick: () => props.onBegin({
|
|
2836
|
+
firstName,
|
|
2837
|
+
lastName,
|
|
2838
|
+
organizationId: organization.organizationId,
|
|
2839
|
+
organizationName: organization.displayName,
|
|
2840
|
+
interests: Object.keys(interests)
|
|
2841
|
+
}),
|
|
2824
2842
|
className: classes.control
|
|
2825
2843
|
},
|
|
2826
2844
|
"Begin trial"
|