@local-civics/hub-ui 0.1.127 → 0.1.129
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 +2 -2
- package/dist/index.js +235 -509
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +235 -509
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -932,19 +932,19 @@ const sprite = {
|
|
|
932
932
|
}
|
|
933
933
|
};
|
|
934
934
|
|
|
935
|
-
var __defProp$
|
|
936
|
-
var __getOwnPropSymbols$
|
|
937
|
-
var __hasOwnProp$
|
|
938
|
-
var __propIsEnum$
|
|
939
|
-
var __defNormalProp$
|
|
940
|
-
var __spreadValues$
|
|
935
|
+
var __defProp$f = Object.defineProperty;
|
|
936
|
+
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
937
|
+
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
938
|
+
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
939
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
940
|
+
var __spreadValues$f = (a, b) => {
|
|
941
941
|
for (var prop in b || (b = {}))
|
|
942
|
-
if (__hasOwnProp$
|
|
943
|
-
__defNormalProp$
|
|
944
|
-
if (__getOwnPropSymbols$
|
|
945
|
-
for (var prop of __getOwnPropSymbols$
|
|
946
|
-
if (__propIsEnum$
|
|
947
|
-
__defNormalProp$
|
|
942
|
+
if (__hasOwnProp$f.call(b, prop))
|
|
943
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
944
|
+
if (__getOwnPropSymbols$f)
|
|
945
|
+
for (var prop of __getOwnPropSymbols$f(b)) {
|
|
946
|
+
if (__propIsEnum$f.call(b, prop))
|
|
947
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
948
948
|
}
|
|
949
949
|
return a;
|
|
950
950
|
};
|
|
@@ -963,9 +963,9 @@ const Icon$1 = (props) => {
|
|
|
963
963
|
},
|
|
964
964
|
/* @__PURE__ */ React__default.createElement("title", null, props.name),
|
|
965
965
|
contents.map((v, k) => {
|
|
966
|
-
return v.d && /* @__PURE__ */ React__default.createElement("path", __spreadValues$
|
|
966
|
+
return v.d && /* @__PURE__ */ React__default.createElement("path", __spreadValues$f({ key: k }, v));
|
|
967
967
|
}),
|
|
968
|
-
contents.map((v, k) => v.r && /* @__PURE__ */ React__default.createElement("circle", __spreadValues$
|
|
968
|
+
contents.map((v, k) => v.r && /* @__PURE__ */ React__default.createElement("circle", __spreadValues$f({ key: k }, v)))
|
|
969
969
|
);
|
|
970
970
|
};
|
|
971
971
|
|
|
@@ -1547,25 +1547,25 @@ const ActivityItem = (props) => {
|
|
|
1547
1547
|
return /* @__PURE__ */ React.createElement("div", { onClick: props.onClick, className: "grow cursor-pointer relative rounded-md min-w-64 h-[22rem] overflow-hidden" }, /* @__PURE__ */ React.createElement("img", { className: "h-full w-full object-cover", alt: props.headline, src: props.imageURL }), /* @__PURE__ */ React.createElement("div", { className: "absolute bottom-0 w-full" }, /* @__PURE__ */ React.createElement("div", { className: "p-5 bg-gray-800/75 w-full" }, /* @__PURE__ */ React.createElement("div", { className: "text-sm font-bold text-white w-full" }, props.headline), /* @__PURE__ */ React.createElement("div", { className: "mt-2 flex items-center gap-x-2 w-full" }, /* @__PURE__ */ React.createElement("div", { className: "flex-shrink-0 w-6 h-6 text-white fill-white" }, /* @__PURE__ */ React.createElement(Icon$1, { name: props.pathway || "globe" })), props.pathway && /* @__PURE__ */ React.createElement("span", { className: "grow" }, /* @__PURE__ */ React.createElement("div", { className: "text-sm font-medium capitalize text-white w-full" }, props.pathway)), props.xp && /* @__PURE__ */ React.createElement("div", { className: "text-slate-600 shadow-md whitespace-nowrap font-bold rounded-md text-sm px-5 py-2 bg-cyan-400" }, props.xp, " pts")))));
|
|
1548
1548
|
};
|
|
1549
1549
|
|
|
1550
|
-
var __defProp$
|
|
1551
|
-
var __defProps$
|
|
1552
|
-
var __getOwnPropDescs$
|
|
1553
|
-
var __getOwnPropSymbols$
|
|
1554
|
-
var __hasOwnProp$
|
|
1555
|
-
var __propIsEnum$
|
|
1556
|
-
var __defNormalProp$
|
|
1557
|
-
var __spreadValues$
|
|
1550
|
+
var __defProp$e = Object.defineProperty;
|
|
1551
|
+
var __defProps$c = Object.defineProperties;
|
|
1552
|
+
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
1553
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
1554
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
1555
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
1556
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1557
|
+
var __spreadValues$e = (a, b) => {
|
|
1558
1558
|
for (var prop in b || (b = {}))
|
|
1559
|
-
if (__hasOwnProp$
|
|
1560
|
-
__defNormalProp$
|
|
1561
|
-
if (__getOwnPropSymbols$
|
|
1562
|
-
for (var prop of __getOwnPropSymbols$
|
|
1563
|
-
if (__propIsEnum$
|
|
1564
|
-
__defNormalProp$
|
|
1559
|
+
if (__hasOwnProp$e.call(b, prop))
|
|
1560
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
1561
|
+
if (__getOwnPropSymbols$e)
|
|
1562
|
+
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
1563
|
+
if (__propIsEnum$e.call(b, prop))
|
|
1564
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
1565
1565
|
}
|
|
1566
1566
|
return a;
|
|
1567
1567
|
};
|
|
1568
|
-
var __spreadProps$
|
|
1568
|
+
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
1569
1569
|
const TagFilter = (props) => {
|
|
1570
1570
|
const timeTags = ["15 min", "30 min", "45 min", "60 min"];
|
|
1571
1571
|
const skillTags = ["Civic", "College", "Academic", "Personal"];
|
|
@@ -1577,12 +1577,12 @@ const TagFilter = (props) => {
|
|
|
1577
1577
|
const [active, setActive] = React__default.useState(init);
|
|
1578
1578
|
const onTagClick = (tag) => {
|
|
1579
1579
|
if (active[tag]) {
|
|
1580
|
-
setActive(__spreadProps$
|
|
1581
|
-
const tags = Object.entries(__spreadProps$
|
|
1580
|
+
setActive(__spreadProps$c(__spreadValues$e({}, active), { [tag]: false }));
|
|
1581
|
+
const tags = Object.entries(__spreadProps$c(__spreadValues$e({}, active), { [tag]: false })).filter(([, active2]) => active2).map(([tag2]) => tag2);
|
|
1582
1582
|
props.onChange && props.onChange(tags);
|
|
1583
1583
|
} else {
|
|
1584
|
-
setActive(__spreadProps$
|
|
1585
|
-
const tags = Object.entries(__spreadProps$
|
|
1584
|
+
setActive(__spreadProps$c(__spreadValues$e({}, active), { [tag]: true }));
|
|
1585
|
+
const tags = Object.entries(__spreadProps$c(__spreadValues$e({}, active), { [tag]: true })).filter(([, active2]) => active2).map(([tag2]) => tag2);
|
|
1586
1586
|
props.onChange && props.onChange(tags);
|
|
1587
1587
|
}
|
|
1588
1588
|
};
|
|
@@ -1628,25 +1628,25 @@ const debounce = (func, delay) => {
|
|
|
1628
1628
|
};
|
|
1629
1629
|
};
|
|
1630
1630
|
|
|
1631
|
-
var __defProp$
|
|
1632
|
-
var __defProps$
|
|
1633
|
-
var __getOwnPropDescs$
|
|
1634
|
-
var __getOwnPropSymbols$
|
|
1635
|
-
var __hasOwnProp$
|
|
1636
|
-
var __propIsEnum$
|
|
1637
|
-
var __defNormalProp$
|
|
1638
|
-
var __spreadValues$
|
|
1631
|
+
var __defProp$d = Object.defineProperty;
|
|
1632
|
+
var __defProps$b = Object.defineProperties;
|
|
1633
|
+
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
1634
|
+
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
1635
|
+
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
1636
|
+
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
1637
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1638
|
+
var __spreadValues$d = (a, b) => {
|
|
1639
1639
|
for (var prop in b || (b = {}))
|
|
1640
|
-
if (__hasOwnProp$
|
|
1641
|
-
__defNormalProp$
|
|
1642
|
-
if (__getOwnPropSymbols$
|
|
1643
|
-
for (var prop of __getOwnPropSymbols$
|
|
1644
|
-
if (__propIsEnum$
|
|
1645
|
-
__defNormalProp$
|
|
1640
|
+
if (__hasOwnProp$d.call(b, prop))
|
|
1641
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
1642
|
+
if (__getOwnPropSymbols$d)
|
|
1643
|
+
for (var prop of __getOwnPropSymbols$d(b)) {
|
|
1644
|
+
if (__propIsEnum$d.call(b, prop))
|
|
1645
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
1646
1646
|
}
|
|
1647
1647
|
return a;
|
|
1648
1648
|
};
|
|
1649
|
-
var __spreadProps$
|
|
1649
|
+
var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
|
|
1650
1650
|
const ActivityList = (props) => {
|
|
1651
1651
|
var _a;
|
|
1652
1652
|
const primary = !props.top ? null : props.top.length > 0 ? props == null ? void 0 : props.top[0] : null;
|
|
@@ -1664,14 +1664,14 @@ const ActivityList = (props) => {
|
|
|
1664
1664
|
isLoading: props.isLoading,
|
|
1665
1665
|
primary: !props.search && primary && /* @__PURE__ */ React__default.createElement(
|
|
1666
1666
|
ActivityItem,
|
|
1667
|
-
__spreadProps$
|
|
1667
|
+
__spreadProps$b(__spreadValues$d({}, primary), {
|
|
1668
1668
|
onClick: () => props.onActivityClick && props.onActivityClick(primary.activityId)
|
|
1669
1669
|
})
|
|
1670
1670
|
),
|
|
1671
1671
|
top: !props.search && top && top.length > 0 && /* @__PURE__ */ React__default.createElement("article", { className: "grid grid-cols-1 md:flex gap-2 overflow-auto" }, top.map((activity) => {
|
|
1672
1672
|
return /* @__PURE__ */ React__default.createElement(
|
|
1673
1673
|
ActivityItem,
|
|
1674
|
-
__spreadProps$
|
|
1674
|
+
__spreadProps$b(__spreadValues$d({
|
|
1675
1675
|
key: `${activity.activityId}`
|
|
1676
1676
|
}, activity), {
|
|
1677
1677
|
onClick: () => props.onActivityClick && props.onActivityClick(activity.activityId)
|
|
@@ -1681,7 +1681,7 @@ const ActivityList = (props) => {
|
|
|
1681
1681
|
soonest: !props.search && upcoming && upcoming.length > 0 && /* @__PURE__ */ React__default.createElement("article", { className: "grid grid-cols-1 md:flex gap-2 overflow-auto" }, upcoming.map((activity) => {
|
|
1682
1682
|
return /* @__PURE__ */ React__default.createElement(
|
|
1683
1683
|
ActivityItem,
|
|
1684
|
-
__spreadProps$
|
|
1684
|
+
__spreadProps$b(__spreadValues$d({
|
|
1685
1685
|
key: `${activity.activityId}`
|
|
1686
1686
|
}, activity), {
|
|
1687
1687
|
onClick: () => props.onActivityClick && props.onActivityClick(activity.activityId)
|
|
@@ -1691,7 +1691,7 @@ const ActivityList = (props) => {
|
|
|
1691
1691
|
milestones: !props.search && props.milestones && props.milestones.length > 0 && /* @__PURE__ */ React__default.createElement("article", { className: "grid grid-cols-1 md:flex gap-2 overflow-auto" }, props.milestones.map((activity) => {
|
|
1692
1692
|
return /* @__PURE__ */ React__default.createElement(
|
|
1693
1693
|
ActivityItem,
|
|
1694
|
-
__spreadProps$
|
|
1694
|
+
__spreadProps$b(__spreadValues$d({
|
|
1695
1695
|
key: `${activity.activityId}`
|
|
1696
1696
|
}, activity), {
|
|
1697
1697
|
onClick: () => props.onActivityClick && props.onActivityClick(activity.activityId)
|
|
@@ -1702,7 +1702,7 @@ const ActivityList = (props) => {
|
|
|
1702
1702
|
filtered: !!props.search && props.activities && props.activities.length > 0 && /* @__PURE__ */ React__default.createElement("article", { className: "grid grid-cols-1 md:flex gap-2 overflow-auto" }, props.activities.map((activity) => {
|
|
1703
1703
|
return /* @__PURE__ */ React__default.createElement(
|
|
1704
1704
|
ActivityItem,
|
|
1705
|
-
__spreadProps$
|
|
1705
|
+
__spreadProps$b(__spreadValues$d({
|
|
1706
1706
|
key: `${activity.activityId}`
|
|
1707
1707
|
}, activity), {
|
|
1708
1708
|
onClick: () => props.onActivityClick && props.onActivityClick(activity.activityId)
|
|
@@ -1728,25 +1728,25 @@ const Search$1 = ({ send, value }) => {
|
|
|
1728
1728
|
)));
|
|
1729
1729
|
};
|
|
1730
1730
|
|
|
1731
|
-
var __defProp$
|
|
1732
|
-
var __defProps$
|
|
1733
|
-
var __getOwnPropDescs$
|
|
1734
|
-
var __getOwnPropSymbols$
|
|
1735
|
-
var __hasOwnProp$
|
|
1736
|
-
var __propIsEnum$
|
|
1737
|
-
var __defNormalProp$
|
|
1738
|
-
var __spreadValues$
|
|
1731
|
+
var __defProp$c = Object.defineProperty;
|
|
1732
|
+
var __defProps$a = Object.defineProperties;
|
|
1733
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
1734
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
1735
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
1736
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
1737
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1738
|
+
var __spreadValues$c = (a, b) => {
|
|
1739
1739
|
for (var prop in b || (b = {}))
|
|
1740
|
-
if (__hasOwnProp$
|
|
1741
|
-
__defNormalProp$
|
|
1742
|
-
if (__getOwnPropSymbols$
|
|
1743
|
-
for (var prop of __getOwnPropSymbols$
|
|
1744
|
-
if (__propIsEnum$
|
|
1745
|
-
__defNormalProp$
|
|
1740
|
+
if (__hasOwnProp$c.call(b, prop))
|
|
1741
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
1742
|
+
if (__getOwnPropSymbols$c)
|
|
1743
|
+
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
1744
|
+
if (__propIsEnum$c.call(b, prop))
|
|
1745
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
1746
1746
|
}
|
|
1747
1747
|
return a;
|
|
1748
1748
|
};
|
|
1749
|
-
var __spreadProps$
|
|
1749
|
+
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
1750
1750
|
const ActivityReflection = (props) => {
|
|
1751
1751
|
const className = builder("w-full md:w-[40rem]").if(!!props.headline, "min-h-[20rem]").build();
|
|
1752
1752
|
const [reaction, setReaction] = React__default.useState({
|
|
@@ -1754,8 +1754,8 @@ const ActivityReflection = (props) => {
|
|
|
1754
1754
|
reflection: props.reflection
|
|
1755
1755
|
});
|
|
1756
1756
|
const hasChanges = props.hasChanges || props.canReflect && (props.rating !== reaction.rating || props.reflection !== reaction.reflection);
|
|
1757
|
-
const setFeedback = (feedback) => setReaction(__spreadProps$
|
|
1758
|
-
const setRating = (rating) => setReaction(__spreadProps$
|
|
1757
|
+
const setFeedback = (feedback) => setReaction(__spreadProps$a(__spreadValues$c({}, reaction), { reflection: feedback }));
|
|
1758
|
+
const setRating = (rating) => setReaction(__spreadProps$a(__spreadValues$c({}, reaction), { rating }));
|
|
1759
1759
|
React__default.useEffect(() => {
|
|
1760
1760
|
setReaction({
|
|
1761
1761
|
rating: props.rating,
|
|
@@ -1782,7 +1782,7 @@ const ActivityReflection = (props) => {
|
|
|
1782
1782
|
defaultValue: props.reflection,
|
|
1783
1783
|
className: "resize-none text-slate-500 focus:text-slate-600 h-24 mt-1 block w-full px-3 py-2 bg-white border border-slate-300 rounded-md text-sm shadow-sm placeholder-slate-400\n focus:outline-none focus:border-sky-500 focus:ring-1 focus:ring-sky-500\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n invalid:border-pink-500 invalid:text-pink-600\n focus:invalid:border-pink-500 focus:invalid:ring-pink-500"
|
|
1784
1784
|
}
|
|
1785
|
-
), props.canReflect && /* @__PURE__ */ React__default.createElement(Rating$1, __spreadProps$
|
|
1785
|
+
), props.canReflect && /* @__PURE__ */ React__default.createElement(Rating$1, __spreadProps$a(__spreadValues$c(__spreadValues$c({}, props), reaction), { setRating })))))));
|
|
1786
1786
|
};
|
|
1787
1787
|
const Rating$1 = (props) => {
|
|
1788
1788
|
const maxPoints = 5;
|
|
@@ -3188,25 +3188,25 @@ const Overlay = (props) => {
|
|
|
3188
3188
|
return /* @__PURE__ */ React.createElement("div", { className: "flex fixed overscroll-none w-screen h-screen top-0 left-0 bg-gray-300/75 z-30" }, props.children);
|
|
3189
3189
|
};
|
|
3190
3190
|
|
|
3191
|
-
var __defProp$
|
|
3192
|
-
var __defProps$
|
|
3193
|
-
var __getOwnPropDescs$
|
|
3194
|
-
var __getOwnPropSymbols$
|
|
3195
|
-
var __hasOwnProp$
|
|
3196
|
-
var __propIsEnum$
|
|
3197
|
-
var __defNormalProp$
|
|
3198
|
-
var __spreadValues$
|
|
3191
|
+
var __defProp$b = Object.defineProperty;
|
|
3192
|
+
var __defProps$9 = Object.defineProperties;
|
|
3193
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
3194
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
3195
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
3196
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
3197
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3198
|
+
var __spreadValues$b = (a, b) => {
|
|
3199
3199
|
for (var prop in b || (b = {}))
|
|
3200
|
-
if (__hasOwnProp$
|
|
3201
|
-
__defNormalProp$
|
|
3202
|
-
if (__getOwnPropSymbols$
|
|
3203
|
-
for (var prop of __getOwnPropSymbols$
|
|
3204
|
-
if (__propIsEnum$
|
|
3205
|
-
__defNormalProp$
|
|
3200
|
+
if (__hasOwnProp$b.call(b, prop))
|
|
3201
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
3202
|
+
if (__getOwnPropSymbols$b)
|
|
3203
|
+
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
3204
|
+
if (__propIsEnum$b.call(b, prop))
|
|
3205
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
3206
3206
|
}
|
|
3207
3207
|
return a;
|
|
3208
3208
|
};
|
|
3209
|
-
var __spreadProps$
|
|
3209
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
3210
3210
|
const Badge = (props) => {
|
|
3211
3211
|
var _a, _b;
|
|
3212
3212
|
const [open, setOpen] = React.useState(props.open || false);
|
|
@@ -3224,7 +3224,7 @@ const Badge = (props) => {
|
|
|
3224
3224
|
props.onClose();
|
|
3225
3225
|
}
|
|
3226
3226
|
};
|
|
3227
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, !open && /* @__PURE__ */ React.createElement(BadgeButton, __spreadProps$
|
|
3227
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, !open && /* @__PURE__ */ React.createElement(BadgeButton, __spreadProps$9(__spreadValues$b({}, props), { progress, target, onClick: onOpen })), open && !!props.preview && /* @__PURE__ */ React.createElement(BadgeCard, __spreadProps$9(__spreadValues$b({}, props), { onClose })), open && !props.preview && /* @__PURE__ */ React.createElement(Overlay, null, /* @__PURE__ */ React.createElement(BadgeCard, __spreadProps$9(__spreadValues$b({}, props), { onClose }))));
|
|
3228
3228
|
};
|
|
3229
3229
|
|
|
3230
3230
|
const BadgeActivity = (props) => {
|
|
@@ -3259,25 +3259,25 @@ const BadgeActivity = (props) => {
|
|
|
3259
3259
|
})))));
|
|
3260
3260
|
};
|
|
3261
3261
|
|
|
3262
|
-
var __defProp$
|
|
3263
|
-
var __defProps$
|
|
3264
|
-
var __getOwnPropDescs$
|
|
3265
|
-
var __getOwnPropSymbols$
|
|
3266
|
-
var __hasOwnProp$
|
|
3267
|
-
var __propIsEnum$
|
|
3268
|
-
var __defNormalProp$
|
|
3269
|
-
var __spreadValues$
|
|
3262
|
+
var __defProp$a = Object.defineProperty;
|
|
3263
|
+
var __defProps$8 = Object.defineProperties;
|
|
3264
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
3265
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
3266
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
3267
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
3268
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3269
|
+
var __spreadValues$a = (a, b) => {
|
|
3270
3270
|
for (var prop in b || (b = {}))
|
|
3271
|
-
if (__hasOwnProp$
|
|
3272
|
-
__defNormalProp$
|
|
3273
|
-
if (__getOwnPropSymbols$
|
|
3274
|
-
for (var prop of __getOwnPropSymbols$
|
|
3275
|
-
if (__propIsEnum$
|
|
3276
|
-
__defNormalProp$
|
|
3271
|
+
if (__hasOwnProp$a.call(b, prop))
|
|
3272
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
3273
|
+
if (__getOwnPropSymbols$a)
|
|
3274
|
+
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
3275
|
+
if (__propIsEnum$a.call(b, prop))
|
|
3276
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
3277
3277
|
}
|
|
3278
3278
|
return a;
|
|
3279
3279
|
};
|
|
3280
|
-
var __spreadProps$
|
|
3280
|
+
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
3281
3281
|
const BadgeActivityMenu = (props) => {
|
|
3282
3282
|
const criteria = props.criteria || [];
|
|
3283
3283
|
return /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-1 gap-y-4 w-full text-zinc-600" }, /* @__PURE__ */ React.createElement("div", { className: "py-8 px-10 grid grid-cols-1 gap-y-5 rounded-b-md border-b border-x border-zinc-100" }, /* @__PURE__ */ React.createElement(
|
|
@@ -3294,7 +3294,7 @@ const BadgeActivityMenu = (props) => {
|
|
|
3294
3294
|
return /* @__PURE__ */ React.createElement("div", { key: id, className: "grid grid-cols-1 gap-y-8" }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("p", { className: "text-lg font-semibold" }, c.displayName), /* @__PURE__ */ React.createElement("p", { className: "text-sm" }, "Chose one activity to complete.")), /* @__PURE__ */ React.createElement("div", { className: "grid grid-flow-col auto-cols-max gap-4 px-1 pt-1 pb-2 w-full overflow-x-auto" }, options.map((o, i2) => {
|
|
3295
3295
|
const id2 = o.activityId || i2;
|
|
3296
3296
|
const date = o.startTime ? new Date(o.startTime) : null;
|
|
3297
|
-
return /* @__PURE__ */ React.createElement("div", { key: id2, className: "grid grid-cols-1 gap-y-2" }, date && /* @__PURE__ */ React.createElement("p", null, Intl.DateTimeFormat("en-US", { month: "long" }).format(date), " ", ordNumber$1(date.getDate())), !date && /* @__PURE__ */ React.createElement("p", { className: "invisible" }, "Online"), /* @__PURE__ */ React.createElement(BadgeActivity, __spreadProps$
|
|
3297
|
+
return /* @__PURE__ */ React.createElement("div", { key: id2, className: "grid grid-cols-1 gap-y-2" }, date && /* @__PURE__ */ React.createElement("p", null, Intl.DateTimeFormat("en-US", { month: "long" }).format(date), " ", ordNumber$1(date.getDate())), !date && /* @__PURE__ */ React.createElement("p", { className: "invisible" }, "Online"), /* @__PURE__ */ React.createElement(BadgeActivity, __spreadProps$8(__spreadValues$a({}, o), { criteriaName: c.displayName })));
|
|
3298
3298
|
})));
|
|
3299
3299
|
})));
|
|
3300
3300
|
};
|
|
@@ -3339,25 +3339,25 @@ const Widget = (props) => {
|
|
|
3339
3339
|
return /* @__PURE__ */ React__default.createElement("article", { className }, !props.headless && /* @__PURE__ */ React__default.createElement("div", { className: "p-2 bg-gray-200" }), /* @__PURE__ */ React__default.createElement(Loader, { isLoading: props.isLoading }, /* @__PURE__ */ React__default.createElement("div", { className: "relative w-full" }, props.children)));
|
|
3340
3340
|
};
|
|
3341
3341
|
|
|
3342
|
-
var __defProp$
|
|
3343
|
-
var __defProps$
|
|
3344
|
-
var __getOwnPropDescs$
|
|
3345
|
-
var __getOwnPropSymbols$
|
|
3346
|
-
var __hasOwnProp$
|
|
3347
|
-
var __propIsEnum$
|
|
3348
|
-
var __defNormalProp$
|
|
3349
|
-
var __spreadValues$
|
|
3342
|
+
var __defProp$9 = Object.defineProperty;
|
|
3343
|
+
var __defProps$7 = Object.defineProperties;
|
|
3344
|
+
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
3345
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
3346
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
3347
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
3348
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3349
|
+
var __spreadValues$9 = (a, b) => {
|
|
3350
3350
|
for (var prop in b || (b = {}))
|
|
3351
|
-
if (__hasOwnProp$
|
|
3352
|
-
__defNormalProp$
|
|
3353
|
-
if (__getOwnPropSymbols$
|
|
3354
|
-
for (var prop of __getOwnPropSymbols$
|
|
3355
|
-
if (__propIsEnum$
|
|
3356
|
-
__defNormalProp$
|
|
3351
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
3352
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
3353
|
+
if (__getOwnPropSymbols$9)
|
|
3354
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
3355
|
+
if (__propIsEnum$9.call(b, prop))
|
|
3356
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
3357
3357
|
}
|
|
3358
3358
|
return a;
|
|
3359
3359
|
};
|
|
3360
|
-
var __spreadProps$
|
|
3360
|
+
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
3361
3361
|
const DEFAULT_FILTERS = [
|
|
3362
3362
|
{ label: "In Progress" },
|
|
3363
3363
|
{ label: "Completed" },
|
|
@@ -3417,7 +3417,7 @@ const BadgeSection = (props) => {
|
|
|
3417
3417
|
if (!(opt.label in filters)) {
|
|
3418
3418
|
return;
|
|
3419
3419
|
}
|
|
3420
|
-
const next = __spreadValues$
|
|
3420
|
+
const next = __spreadValues$9({}, filters);
|
|
3421
3421
|
next[opt.label].isActive = !next[opt.label].isActive;
|
|
3422
3422
|
setFilters(next);
|
|
3423
3423
|
},
|
|
@@ -3443,15 +3443,15 @@ const BadgeSection = (props) => {
|
|
|
3443
3443
|
},
|
|
3444
3444
|
"Grid View?"
|
|
3445
3445
|
)))), /* @__PURE__ */ React.createElement("div", null, !!props.readonly && /* @__PURE__ */ React.createElement("div", { className: layoutClassName }, preview.map((b, i) => {
|
|
3446
|
-
return /* @__PURE__ */ React.createElement(Badge, __spreadProps$
|
|
3446
|
+
return /* @__PURE__ */ React.createElement(Badge, __spreadProps$7(__spreadValues$9({ key: i }, b), { compact: list, readonly: props.readonly }));
|
|
3447
3447
|
})), !props.readonly && /* @__PURE__ */ React.createElement("div", { className: "text-zinc-600 grid grid-cols-1 gap-y-4" }, (isWithoutFilters || "In Progress" in filters && filters["In Progress"].isActive) && progress.length > 0 && /* @__PURE__ */ React.createElement("div", null, showSectionHeaders && /* @__PURE__ */ React.createElement("p", { className: "mb-3 text-md underline font-bold" }, "In Progress"), /* @__PURE__ */ React.createElement("div", { className: layoutClassName }, progress.map((b, i) => {
|
|
3448
|
-
return /* @__PURE__ */ React.createElement(Badge, __spreadProps$
|
|
3448
|
+
return /* @__PURE__ */ React.createElement(Badge, __spreadProps$7(__spreadValues$9({ key: i }, b), { compact: list }));
|
|
3449
3449
|
}))), (isWithoutFilters || "Completed" in filters && filters["Completed"].isActive) && collected.length > 0 && /* @__PURE__ */ React.createElement("div", null, showSectionHeaders && /* @__PURE__ */ React.createElement("p", { className: "mb-3 text-md underline font-bold" }, "Completed"), /* @__PURE__ */ React.createElement("div", { className: layoutClassName }, collected.map((b, i) => {
|
|
3450
|
-
return /* @__PURE__ */ React.createElement(Badge, __spreadProps$
|
|
3450
|
+
return /* @__PURE__ */ React.createElement(Badge, __spreadProps$7(__spreadValues$9({ key: i }, b), { compact: list }));
|
|
3451
3451
|
}))), (isWithoutFilters || "Available" in filters && filters["Available"].isActive) && available.length > 0 && /* @__PURE__ */ React.createElement("div", null, showSectionHeaders && /* @__PURE__ */ React.createElement("p", { className: "mb-3 text-md underline font-bold" }, "Available"), /* @__PURE__ */ React.createElement("div", { className: layoutClassName }, available.map((b, i) => {
|
|
3452
|
-
return /* @__PURE__ */ React.createElement(Badge, __spreadProps$
|
|
3452
|
+
return /* @__PURE__ */ React.createElement(Badge, __spreadProps$7(__spreadValues$9({ key: i }, b), { compact: list }));
|
|
3453
3453
|
}))), (isWithoutFilters || "Locked" in filters && filters["Locked"].isActive) && locked.length > 0 && /* @__PURE__ */ React.createElement("div", null, showSectionHeaders && /* @__PURE__ */ React.createElement("p", { className: "mb-3 text-md underline font-bold" }, "Locked"), /* @__PURE__ */ React.createElement("div", { className: layoutClassName }, locked.map((b, i) => {
|
|
3454
|
-
return /* @__PURE__ */ React.createElement(Badge, __spreadProps$
|
|
3454
|
+
return /* @__PURE__ */ React.createElement(Badge, __spreadProps$7(__spreadValues$9({ key: i }, b), { compact: list }));
|
|
3455
3455
|
}))))))))));
|
|
3456
3456
|
};
|
|
3457
3457
|
const getLayout = (list) => {
|
|
@@ -3472,7 +3472,17 @@ const activeFilters = (filters) => {
|
|
|
3472
3472
|
};
|
|
3473
3473
|
|
|
3474
3474
|
const BadgeSuccessDialog = (props) => {
|
|
3475
|
-
return /* @__PURE__ */ React__default.createElement(Card, { onClose: props.onClose }, /* @__PURE__ */ React__default.createElement("div", { className: "w-full px-8 pt-5 pb-12 shadow-sm grid grid-cols-1 gap-4 content-center justify-items-center" }, /* @__PURE__ */ React__default.createElement("div", { className: "text-zinc-600 w-28 h-28" }, /* @__PURE__ */ React__default.createElement(Icon, { name: "party popper" })), /* @__PURE__ */ React__default.createElement("div", { className: "text-slate-600 text-center" }, /* @__PURE__ */ React__default.createElement("div", { className: "font-bold text-lg" }, /* @__PURE__ */ React__default.createElement("span", null, "Great Job!")), /* @__PURE__ */ React__default.createElement("div", { className: "max-w-[22rem]" }, !!props.xp && /* @__PURE__ */ React__default.createElement("div", { className: "text-sm" }, /* @__PURE__ */ React__default.createElement("span", null, "You've just earned"), /* @__PURE__ */ React__default.createElement("span", { className: "ml-1 font-semibold text-green-500" }, props.xp, " XP"), /* @__PURE__ */ React__default.createElement("span", { className: "ml-1" }, "points!")), !!props.displayName && /* @__PURE__ */ React__default.createElement("div", { className: "mt-2 text-sm" }, /* @__PURE__ */ React__default.createElement("span", null, "Check out your new"), /* @__PURE__ */ React__default.createElement("span", { className: "ml-1 font-semibold" }, props.displayName), /* @__PURE__ */ React__default.createElement("span", { className: "ml-1" }, "Lv. ", (props.level || 0) + 1, " badge on your profile! Look out for more opportunities to earn!"))))
|
|
3475
|
+
return /* @__PURE__ */ React__default.createElement(Card, { onClose: props.onClose }, /* @__PURE__ */ React__default.createElement("div", { className: "w-full px-8 pt-5 pb-12 shadow-sm grid grid-cols-1 gap-4 content-center justify-items-center" }, /* @__PURE__ */ React__default.createElement("div", { className: "text-zinc-600 w-28 h-28" }, /* @__PURE__ */ React__default.createElement(Icon, { name: "party popper" })), /* @__PURE__ */ React__default.createElement("div", { className: "text-slate-600 text-center" }, /* @__PURE__ */ React__default.createElement("div", { className: "font-bold text-lg" }, /* @__PURE__ */ React__default.createElement("span", null, "Great Job!")), /* @__PURE__ */ React__default.createElement("div", { className: "max-w-[22rem]" }, !!props.xp && /* @__PURE__ */ React__default.createElement("div", { className: "text-sm" }, /* @__PURE__ */ React__default.createElement("span", null, "You've just earned"), /* @__PURE__ */ React__default.createElement("span", { className: "ml-1 font-semibold text-green-500" }, props.xp, " XP"), /* @__PURE__ */ React__default.createElement("span", { className: "ml-1" }, "points!")), !!props.displayName && /* @__PURE__ */ React__default.createElement("div", { className: "mt-2 text-sm" }, /* @__PURE__ */ React__default.createElement("span", null, "Check out your new"), /* @__PURE__ */ React__default.createElement("span", { className: "ml-1 font-semibold" }, props.displayName), /* @__PURE__ */ React__default.createElement("span", { className: "ml-1" }, "Lv. ", (props.level || 0) + 1, " badge on your profile! Look out for more opportunities to earn!")))), /* @__PURE__ */ React__default.createElement("a", { href: "/badges", className: "mt-4" }, /* @__PURE__ */ React__default.createElement(
|
|
3476
|
+
Button,
|
|
3477
|
+
{
|
|
3478
|
+
color: "sky",
|
|
3479
|
+
size: "md",
|
|
3480
|
+
spacing: "md",
|
|
3481
|
+
border: "rounded",
|
|
3482
|
+
theme: "light",
|
|
3483
|
+
text: "Explore Other Badges"
|
|
3484
|
+
}
|
|
3485
|
+
))));
|
|
3476
3486
|
};
|
|
3477
3487
|
|
|
3478
3488
|
const Tab = (props) => {
|
|
@@ -3732,25 +3742,25 @@ const linkify = (text) => {
|
|
|
3732
3742
|
return replacedText;
|
|
3733
3743
|
};
|
|
3734
3744
|
|
|
3735
|
-
var __defProp$
|
|
3736
|
-
var __defProps$
|
|
3737
|
-
var __getOwnPropDescs$
|
|
3738
|
-
var __getOwnPropSymbols$
|
|
3739
|
-
var __hasOwnProp$
|
|
3740
|
-
var __propIsEnum$
|
|
3741
|
-
var __defNormalProp$
|
|
3742
|
-
var __spreadValues$
|
|
3745
|
+
var __defProp$8 = Object.defineProperty;
|
|
3746
|
+
var __defProps$6 = Object.defineProperties;
|
|
3747
|
+
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
3748
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
3749
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
3750
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
3751
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3752
|
+
var __spreadValues$8 = (a, b) => {
|
|
3743
3753
|
for (var prop in b || (b = {}))
|
|
3744
|
-
if (__hasOwnProp$
|
|
3745
|
-
__defNormalProp$
|
|
3746
|
-
if (__getOwnPropSymbols$
|
|
3747
|
-
for (var prop of __getOwnPropSymbols$
|
|
3748
|
-
if (__propIsEnum$
|
|
3749
|
-
__defNormalProp$
|
|
3754
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
3755
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
3756
|
+
if (__getOwnPropSymbols$8)
|
|
3757
|
+
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
3758
|
+
if (__propIsEnum$8.call(b, prop))
|
|
3759
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
3750
3760
|
}
|
|
3751
3761
|
return a;
|
|
3752
3762
|
};
|
|
3753
|
-
var __spreadProps$
|
|
3763
|
+
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
3754
3764
|
const FormItem = (props) => {
|
|
3755
3765
|
const responses = props.responses || [];
|
|
3756
3766
|
const notEmpty = responses.length > 0 && responses[0].trim() !== "";
|
|
@@ -3777,28 +3787,28 @@ const FormItem = (props) => {
|
|
|
3777
3787
|
}
|
|
3778
3788
|
}, [isTextError]);
|
|
3779
3789
|
const marginBottom = props.format === "text" ? "-mb-7" : "";
|
|
3780
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: `bg-white rounded-md p-5 shadow-sm grid grid-cols-1 gap-y-8 ${itemContainerError} ${marginBottom}` }, props.displayName && /* @__PURE__ */ React__default.createElement("div", { className: "flex gap-x-1" }, /* @__PURE__ */ React__default.createElement("div", { className: "flex items-start gap-x-4" }, props.format === "question" && /* @__PURE__ */ React__default.createElement("div", { className: `${checkIconColor} w-5 h-5 mt-1` }, /* @__PURE__ */ React__default.createElement(Icon$1, { name: "positive" })), /* @__PURE__ */ React__default.createElement("div", { className: "grow max-w-lg" }, props.displayName && /* @__PURE__ */ React__default.createElement("p", { className: "flex-auto text-lg text-slate-600 font-semibold whitespace-pre-line" }, linkify(props.displayName)), props.description && /* @__PURE__ */ React__default.createElement("p", { className: "text-sm text-slate-400 whitespace-pre-line" }, linkify(props.description)))), props.required && /* @__PURE__ */ React__default.createElement("p", { className: "text-sm text-rose-600" }, "*")), !props.children && props.format !== "text" && /* @__PURE__ */ React__default.createElement("div", { className: `${contentMaxWidth} ml-1` }, /* @__PURE__ */ React__default.createElement(Switch, __spreadProps$
|
|
3790
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: `bg-white rounded-md p-5 shadow-sm grid grid-cols-1 gap-y-8 ${itemContainerError} ${marginBottom}` }, props.displayName && /* @__PURE__ */ React__default.createElement("div", { className: "flex gap-x-1" }, /* @__PURE__ */ React__default.createElement("div", { className: "flex items-start gap-x-4" }, props.format === "question" && /* @__PURE__ */ React__default.createElement("div", { className: `${checkIconColor} w-5 h-5 mt-1` }, /* @__PURE__ */ React__default.createElement(Icon$1, { name: "positive" })), /* @__PURE__ */ React__default.createElement("div", { className: "grow max-w-lg" }, props.displayName && /* @__PURE__ */ React__default.createElement("p", { className: "flex-auto text-lg text-slate-600 font-semibold whitespace-pre-line" }, linkify(props.displayName)), props.description && /* @__PURE__ */ React__default.createElement("p", { className: "text-sm text-slate-400 whitespace-pre-line" }, linkify(props.description)))), props.required && /* @__PURE__ */ React__default.createElement("p", { className: "text-sm text-rose-600" }, "*")), !props.children && props.format !== "text" && /* @__PURE__ */ React__default.createElement("div", { className: `${contentMaxWidth} ml-1` }, /* @__PURE__ */ React__default.createElement(Switch, __spreadProps$6(__spreadValues$8({}, props), { onTextBlur })), showError && /* @__PURE__ */ React__default.createElement("div", { className: "text-rose-300 flex items-center gap-x-2 mt-4" }, /* @__PURE__ */ React__default.createElement("div", { className: "w-4 h-4" }, /* @__PURE__ */ React__default.createElement(Icon$1, { name: "negative" })), /* @__PURE__ */ React__default.createElement("span", { className: "grow text-sm" }, "Must be a minimum of ", minimum, " characters."))), props.children);
|
|
3781
3791
|
};
|
|
3782
3792
|
const Switch = (props) => {
|
|
3783
3793
|
switch (true) {
|
|
3784
3794
|
case props.format === "embed":
|
|
3785
|
-
return /* @__PURE__ */ React__default.createElement(Embed, __spreadValues$
|
|
3795
|
+
return /* @__PURE__ */ React__default.createElement(Embed, __spreadValues$8({}, props));
|
|
3786
3796
|
case props.format === "image":
|
|
3787
|
-
return /* @__PURE__ */ React__default.createElement(Image, __spreadValues$
|
|
3797
|
+
return /* @__PURE__ */ React__default.createElement(Image, __spreadValues$8({}, props));
|
|
3788
3798
|
case props.questionType === "radio":
|
|
3789
|
-
return /* @__PURE__ */ React__default.createElement(RadioQuestion, __spreadValues$
|
|
3799
|
+
return /* @__PURE__ */ React__default.createElement(RadioQuestion, __spreadValues$8({}, props));
|
|
3790
3800
|
case props.questionType === "checkbox":
|
|
3791
|
-
return /* @__PURE__ */ React__default.createElement(CheckboxQuestion, __spreadValues$
|
|
3801
|
+
return /* @__PURE__ */ React__default.createElement(CheckboxQuestion, __spreadValues$8({}, props));
|
|
3792
3802
|
case props.questionType === "drop down":
|
|
3793
|
-
return /* @__PURE__ */ React__default.createElement(DropDownQuestion, __spreadValues$
|
|
3803
|
+
return /* @__PURE__ */ React__default.createElement(DropDownQuestion, __spreadValues$8({}, props));
|
|
3794
3804
|
case props.questionType === "file upload":
|
|
3795
|
-
return /* @__PURE__ */ React__default.createElement(FileUploadQuestion, __spreadValues$
|
|
3805
|
+
return /* @__PURE__ */ React__default.createElement(FileUploadQuestion, __spreadValues$8({}, props));
|
|
3796
3806
|
case props.questionType === "text":
|
|
3797
|
-
return /* @__PURE__ */ React__default.createElement(TextQuestion, __spreadValues$
|
|
3807
|
+
return /* @__PURE__ */ React__default.createElement(TextQuestion, __spreadValues$8({}, props));
|
|
3798
3808
|
case props.questionType === "date":
|
|
3799
|
-
return /* @__PURE__ */ React__default.createElement(DateQuestion, __spreadValues$
|
|
3809
|
+
return /* @__PURE__ */ React__default.createElement(DateQuestion, __spreadValues$8({}, props));
|
|
3800
3810
|
case props.questionType === "time":
|
|
3801
|
-
return /* @__PURE__ */ React__default.createElement(TimeQuestion, __spreadValues$
|
|
3811
|
+
return /* @__PURE__ */ React__default.createElement(TimeQuestion, __spreadValues$8({}, props));
|
|
3802
3812
|
default:
|
|
3803
3813
|
return null;
|
|
3804
3814
|
}
|
|
@@ -4126,7 +4136,7 @@ const displayNameString = (displayName) => {
|
|
|
4126
4136
|
};
|
|
4127
4137
|
|
|
4128
4138
|
const FormSubmitDialog$1 = (props) => {
|
|
4129
|
-
return /* @__PURE__ */ React__default.createElement(Modal, { visible: true, transparent: true, onClose: props.
|
|
4139
|
+
return /* @__PURE__ */ React__default.createElement(Modal, { visible: true, transparent: true, onClose: props.onEditLesson }, /* @__PURE__ */ React__default.createElement("div", { className: "w-full md:w-[24rem] px-8 py-5 shadow-sm grid grid-cols-1 gap-4 content-center justify-items-center" }, /* @__PURE__ */ React__default.createElement("div", { className: "text-green-500 w-14 h-14" }, /* @__PURE__ */ React__default.createElement(Icon$1, { name: "positive" })), /* @__PURE__ */ React__default.createElement("div", { className: "text-slate-600 text-center" }, /* @__PURE__ */ React__default.createElement("div", { className: "font-bold text-lg" }, /* @__PURE__ */ React__default.createElement("span", null, "Great Job!")), /* @__PURE__ */ React__default.createElement("p", { className: "text-sm max-w-[16rem]" }, "Your responses have been submitted.")), /* @__PURE__ */ React__default.createElement("div", { className: "my-5 grid grid-cols-2 gap-4" }, /* @__PURE__ */ React__default.createElement(
|
|
4130
4140
|
Button,
|
|
4131
4141
|
{
|
|
4132
4142
|
wide: true,
|
|
@@ -4134,9 +4144,9 @@ const FormSubmitDialog$1 = (props) => {
|
|
|
4134
4144
|
border: "rounded",
|
|
4135
4145
|
color: "blue",
|
|
4136
4146
|
theme: "dark",
|
|
4137
|
-
text: "
|
|
4147
|
+
text: "Edit Lesson",
|
|
4138
4148
|
size: "md",
|
|
4139
|
-
onClick: props.
|
|
4149
|
+
onClick: props.onEditLesson
|
|
4140
4150
|
}
|
|
4141
4151
|
), /* @__PURE__ */ React__default.createElement(
|
|
4142
4152
|
Button,
|
|
@@ -4146,32 +4156,32 @@ const FormSubmitDialog$1 = (props) => {
|
|
|
4146
4156
|
border: "rounded",
|
|
4147
4157
|
color: "blue",
|
|
4148
4158
|
theme: "dark",
|
|
4149
|
-
text: "
|
|
4159
|
+
text: "Back to Badge",
|
|
4150
4160
|
size: "md",
|
|
4151
|
-
onClick: props.
|
|
4161
|
+
onClick: props.onBackToBadge
|
|
4152
4162
|
}
|
|
4153
4163
|
))));
|
|
4154
4164
|
};
|
|
4155
4165
|
|
|
4156
|
-
var __defProp$
|
|
4157
|
-
var __defProps$
|
|
4158
|
-
var __getOwnPropDescs$
|
|
4159
|
-
var __getOwnPropSymbols$
|
|
4160
|
-
var __hasOwnProp$
|
|
4161
|
-
var __propIsEnum$
|
|
4162
|
-
var __defNormalProp$
|
|
4163
|
-
var __spreadValues$
|
|
4166
|
+
var __defProp$7 = Object.defineProperty;
|
|
4167
|
+
var __defProps$5 = Object.defineProperties;
|
|
4168
|
+
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
4169
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
4170
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
4171
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
4172
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4173
|
+
var __spreadValues$7 = (a, b) => {
|
|
4164
4174
|
for (var prop in b || (b = {}))
|
|
4165
|
-
if (__hasOwnProp$
|
|
4166
|
-
__defNormalProp$
|
|
4167
|
-
if (__getOwnPropSymbols$
|
|
4168
|
-
for (var prop of __getOwnPropSymbols$
|
|
4169
|
-
if (__propIsEnum$
|
|
4170
|
-
__defNormalProp$
|
|
4175
|
+
if (__hasOwnProp$7.call(b, prop))
|
|
4176
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
4177
|
+
if (__getOwnPropSymbols$7)
|
|
4178
|
+
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
4179
|
+
if (__propIsEnum$7.call(b, prop))
|
|
4180
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
4171
4181
|
}
|
|
4172
4182
|
return a;
|
|
4173
4183
|
};
|
|
4174
|
-
var __spreadProps$
|
|
4184
|
+
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
4175
4185
|
const AUTOSAVE_TIMEOUT = 30 * 1e3;
|
|
4176
4186
|
const MIN_REFLECTION_LENGTH = 0;
|
|
4177
4187
|
const autoSave = (run, func, callback) => {
|
|
@@ -4271,8 +4281,8 @@ const LearningForm = (props) => {
|
|
|
4271
4281
|
"div",
|
|
4272
4282
|
{
|
|
4273
4283
|
onClick: () => {
|
|
4274
|
-
if (props.preview && props.
|
|
4275
|
-
props.
|
|
4284
|
+
if (props.preview && props.onEditLesson) {
|
|
4285
|
+
props.onEditLesson();
|
|
4276
4286
|
} else {
|
|
4277
4287
|
setShowExitDialogue(true);
|
|
4278
4288
|
}
|
|
@@ -4282,7 +4292,7 @@ const LearningForm = (props) => {
|
|
|
4282
4292
|
/* @__PURE__ */ React__default.createElement("div", { className: "w-3 h-3 min-w-3" }, /* @__PURE__ */ React__default.createElement(Icon$1, { name: "leftArrow" })),
|
|
4283
4293
|
/* @__PURE__ */ React__default.createElement("span", { className: "text-md" }, "Back")
|
|
4284
4294
|
), !!props.displayName && /* @__PURE__ */ React__default.createElement("h2", { className: "h-max font-semibold text-2xl" }, props.displayName), !!props.description && /* @__PURE__ */ React__default.createElement("p", { className: "h-max max-h-[14rem] overflow-y-auto whitespace-pre-line" }, props.description), !!props.eta && /* @__PURE__ */ React__default.createElement("p", { className: "text-sm h-max font-semibold" }, "Estimated Completion Time: ", props.eta)), /* @__PURE__ */ React__default.createElement("img", { className: "grow h-full max-h-[30rem] w-full object-cover", alt: props.displayName, src: props.imageURL })), /* @__PURE__ */ React__default.createElement("form", { className: "w-full max-w-[64rem] m-auto grid grid-cols-1 gap-y-12", onSubmit }, items.map((item) => {
|
|
4285
|
-
return /* @__PURE__ */ React__default.createElement(FormItem, __spreadProps$
|
|
4295
|
+
return /* @__PURE__ */ React__default.createElement(FormItem, __spreadProps$5(__spreadValues$7({ key: item.itemId }, item), { minText: 0, disabled: !!props.preview }));
|
|
4286
4296
|
}), /* @__PURE__ */ React__default.createElement(
|
|
4287
4297
|
FormItem,
|
|
4288
4298
|
{
|
|
@@ -4322,10 +4332,10 @@ const LearningForm = (props) => {
|
|
|
4322
4332
|
)), showExitDialogue && /* @__PURE__ */ React__default.createElement("div", { className: "fixed top-0 left-0 px-4 md:px-2 w-screen h-screen py-5 transition ease-in-out duration-400 bg-gray-200/75 z-40" }, /* @__PURE__ */ React__default.createElement("div", { className: "flex md:w-max h-screen gap-x-2 justify-items-center content-center m-auto" }, /* @__PURE__ */ React__default.createElement(
|
|
4323
4333
|
FormExitDialog$1,
|
|
4324
4334
|
{
|
|
4325
|
-
onYes: () => saveDraft().then(() => props.
|
|
4335
|
+
onYes: () => saveDraft().then(() => props.onEditLesson && props.onEditLesson()),
|
|
4326
4336
|
onNo: () => setShowExitDialogue(false)
|
|
4327
4337
|
}
|
|
4328
|
-
))), showSubmitDialogue && /* @__PURE__ */ React__default.createElement("div", { className: "fixed top-0 left-0 px-4 md:px-2 w-screen h-screen py-5 transition ease-in-out duration-400 bg-gray-200/75 z-40" }, /* @__PURE__ */ React__default.createElement("div", { className: "flex md:w-max h-screen gap-x-2 justify-items-center content-center m-auto" }, /* @__PURE__ */ React__default.createElement(FormSubmitDialog$1, {
|
|
4338
|
+
))), showSubmitDialogue && /* @__PURE__ */ React__default.createElement("div", { className: "fixed top-0 left-0 px-4 md:px-2 w-screen h-screen py-5 transition ease-in-out duration-400 bg-gray-200/75 z-40" }, /* @__PURE__ */ React__default.createElement("div", { className: "flex md:w-max h-screen gap-x-2 justify-items-center content-center m-auto" }, /* @__PURE__ */ React__default.createElement(FormSubmitDialog$1, { onEditLesson: () => setShowSubmitDialogue(false), onBackToBadge: props.onBackToBadge }))));
|
|
4329
4339
|
};
|
|
4330
4340
|
const Rating = (props) => {
|
|
4331
4341
|
const [confidence, setConfidence] = React__default.useState(props.rating || -1);
|
|
@@ -4361,19 +4371,19 @@ const Rating = (props) => {
|
|
|
4361
4371
|
)));
|
|
4362
4372
|
};
|
|
4363
4373
|
|
|
4364
|
-
var __defProp$
|
|
4365
|
-
var __getOwnPropSymbols$
|
|
4366
|
-
var __hasOwnProp$
|
|
4367
|
-
var __propIsEnum$
|
|
4368
|
-
var __defNormalProp$
|
|
4369
|
-
var __spreadValues$
|
|
4374
|
+
var __defProp$6 = Object.defineProperty;
|
|
4375
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
4376
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
4377
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
4378
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4379
|
+
var __spreadValues$6 = (a, b) => {
|
|
4370
4380
|
for (var prop in b || (b = {}))
|
|
4371
|
-
if (__hasOwnProp$
|
|
4372
|
-
__defNormalProp$
|
|
4373
|
-
if (__getOwnPropSymbols$
|
|
4374
|
-
for (var prop of __getOwnPropSymbols$
|
|
4375
|
-
if (__propIsEnum$
|
|
4376
|
-
__defNormalProp$
|
|
4381
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
4382
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
4383
|
+
if (__getOwnPropSymbols$6)
|
|
4384
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
4385
|
+
if (__propIsEnum$6.call(b, prop))
|
|
4386
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
4377
4387
|
}
|
|
4378
4388
|
return a;
|
|
4379
4389
|
};
|
|
@@ -4382,7 +4392,7 @@ const NavLink = (props) => {
|
|
|
4382
4392
|
const config = defaultConfig();
|
|
4383
4393
|
withMenu(config, props.menu);
|
|
4384
4394
|
withName(config, props.name);
|
|
4385
|
-
return /* @__PURE__ */ React__default.createElement(Button, __spreadValues$
|
|
4395
|
+
return /* @__PURE__ */ React__default.createElement(Button, __spreadValues$6({ disabled: props.disabled, active: props.active, onClick }, config));
|
|
4386
4396
|
};
|
|
4387
4397
|
const defaultConfig = () => {
|
|
4388
4398
|
return {};
|
|
@@ -4457,25 +4467,25 @@ const withName = (config, name) => {
|
|
|
4457
4467
|
}
|
|
4458
4468
|
};
|
|
4459
4469
|
|
|
4460
|
-
var __defProp$
|
|
4461
|
-
var __defProps$
|
|
4462
|
-
var __getOwnPropDescs$
|
|
4463
|
-
var __getOwnPropSymbols$
|
|
4464
|
-
var __hasOwnProp$
|
|
4465
|
-
var __propIsEnum$
|
|
4466
|
-
var __defNormalProp$
|
|
4467
|
-
var __spreadValues$
|
|
4470
|
+
var __defProp$5 = Object.defineProperty;
|
|
4471
|
+
var __defProps$4 = Object.defineProperties;
|
|
4472
|
+
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
4473
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
4474
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
4475
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
4476
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4477
|
+
var __spreadValues$5 = (a, b) => {
|
|
4468
4478
|
for (var prop in b || (b = {}))
|
|
4469
|
-
if (__hasOwnProp$
|
|
4470
|
-
__defNormalProp$
|
|
4471
|
-
if (__getOwnPropSymbols$
|
|
4472
|
-
for (var prop of __getOwnPropSymbols$
|
|
4473
|
-
if (__propIsEnum$
|
|
4474
|
-
__defNormalProp$
|
|
4479
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
4480
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
4481
|
+
if (__getOwnPropSymbols$5)
|
|
4482
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
4483
|
+
if (__propIsEnum$5.call(b, prop))
|
|
4484
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
4475
4485
|
}
|
|
4476
4486
|
return a;
|
|
4477
4487
|
};
|
|
4478
|
-
var __spreadProps$
|
|
4488
|
+
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
4479
4489
|
const NavBar = (props) => {
|
|
4480
4490
|
const className = builder("flex items-center justify-between flex-wrap sticky top-0 z-30 w-full h-16 border-b").append("bg-white px-4 py text-center").append("md:border-t-none md:border-b md:border-monochrome-50 lg:px-36 md:shadow-sm").build();
|
|
4481
4491
|
const [secondary, setSecondary] = React__default.useState(false);
|
|
@@ -4493,7 +4503,7 @@ const NavBar = (props) => {
|
|
|
4493
4503
|
return null;
|
|
4494
4504
|
})), /* @__PURE__ */ React__default.createElement("div", { className: "inline-block md:hidden" }, /* @__PURE__ */ React__default.createElement(NavLink, { onClick: () => setSecondary(!secondary), name: menuIcon })), /* @__PURE__ */ React__default.createElement("div", { className: secondaryClassName }, React__default.Children.map(props.children, (Link) => {
|
|
4495
4505
|
if (Link && Link.props.name !== "home") {
|
|
4496
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: "relative" }, /* @__PURE__ */ React__default.createElement(NavLink, __spreadProps$
|
|
4506
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: "relative" }, /* @__PURE__ */ React__default.createElement(NavLink, __spreadProps$4(__spreadValues$5({}, Link.props), { menu: true })));
|
|
4497
4507
|
}
|
|
4498
4508
|
return null;
|
|
4499
4509
|
}))));
|
|
@@ -4590,28 +4600,28 @@ const LegalAgreement = (props) => {
|
|
|
4590
4600
|
)));
|
|
4591
4601
|
};
|
|
4592
4602
|
|
|
4593
|
-
var __defProp$
|
|
4594
|
-
var __defProps$
|
|
4595
|
-
var __getOwnPropDescs$
|
|
4596
|
-
var __getOwnPropSymbols$
|
|
4597
|
-
var __hasOwnProp$
|
|
4598
|
-
var __propIsEnum$
|
|
4599
|
-
var __defNormalProp$
|
|
4600
|
-
var __spreadValues$
|
|
4603
|
+
var __defProp$4 = Object.defineProperty;
|
|
4604
|
+
var __defProps$3 = Object.defineProperties;
|
|
4605
|
+
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
4606
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
4607
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
4608
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
4609
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4610
|
+
var __spreadValues$4 = (a, b) => {
|
|
4601
4611
|
for (var prop in b || (b = {}))
|
|
4602
|
-
if (__hasOwnProp$
|
|
4603
|
-
__defNormalProp$
|
|
4604
|
-
if (__getOwnPropSymbols$
|
|
4605
|
-
for (var prop of __getOwnPropSymbols$
|
|
4606
|
-
if (__propIsEnum$
|
|
4607
|
-
__defNormalProp$
|
|
4612
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
4613
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
4614
|
+
if (__getOwnPropSymbols$4)
|
|
4615
|
+
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
4616
|
+
if (__propIsEnum$4.call(b, prop))
|
|
4617
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
4608
4618
|
}
|
|
4609
4619
|
return a;
|
|
4610
4620
|
};
|
|
4611
|
-
var __spreadProps$
|
|
4621
|
+
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
4612
4622
|
const CommunitySearch = (props) => {
|
|
4613
4623
|
const [accessCode, setAccessCode] = React__default.useState("");
|
|
4614
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: "w-full md:w-[30rem] bg-white grid grid-cols-1 gap-4 rounded-md border border-slate-200 px-8 py-5 shadow-sm" }, /* @__PURE__ */ React__default.createElement("div", { className: "text-slate-600" }, /* @__PURE__ */ React__default.createElement("p", { className: "font-bold text-2xl" }, "Which is your community?"), /* @__PURE__ */ React__default.createElement("p", { className: "text-sm" }, "Pick your community.")), /* @__PURE__ */ React__default.createElement(Search, __spreadProps$
|
|
4624
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: "w-full md:w-[30rem] bg-white grid grid-cols-1 gap-4 rounded-md border border-slate-200 px-8 py-5 shadow-sm" }, /* @__PURE__ */ React__default.createElement("div", { className: "text-slate-600" }, /* @__PURE__ */ React__default.createElement("p", { className: "font-bold text-2xl" }, "Which is your community?"), /* @__PURE__ */ React__default.createElement("p", { className: "text-sm" }, "Pick your community.")), /* @__PURE__ */ React__default.createElement(Search, __spreadProps$3(__spreadValues$4({}, props), { autofocus: !accessCode, placeholder: props.name })), !!props.name && /* @__PURE__ */ React__default.createElement("div", { className: "text-slate-600 grid-cols-1 gap-2" }, /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement("span", { className: "text-sm" }, "Enter the access code for"), /* @__PURE__ */ React__default.createElement("span", { className: "ml-1 font-semibold text-sm" }, props.name), /* @__PURE__ */ React__default.createElement("span", { className: "text-sm" }, ".")), /* @__PURE__ */ React__default.createElement("div", { className: "mt-2 content-center grid grid-cols-3 gap-x-2" }, /* @__PURE__ */ React__default.createElement(
|
|
4615
4625
|
"input",
|
|
4616
4626
|
{
|
|
4617
4627
|
disabled: props.disabled,
|
|
@@ -4636,39 +4646,11 @@ const CommunitySearch = (props) => {
|
|
|
4636
4646
|
)))));
|
|
4637
4647
|
};
|
|
4638
4648
|
|
|
4639
|
-
const RoleSelection = (props) => {
|
|
4640
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: "w-full md:w-[24rem] shadow-sm bg-white rounded-md border border-slate-200 px-8 py-5 grid grid-cols-1 gap-4 justify-items-center" }, /* @__PURE__ */ React__default.createElement("div", { className: "text-slate-600 w-14 h-14" }, /* @__PURE__ */ React__default.createElement(Icon$1, { name: "profile" })), /* @__PURE__ */ React__default.createElement("div", { className: "text-slate-600 text-center" }, /* @__PURE__ */ React__default.createElement("p", { className: "font-bold text-2xl" }, "What is your persona?"), /* @__PURE__ */ React__default.createElement("p", { className: "text-sm" }, "Pick your community persona.")), /* @__PURE__ */ React__default.createElement("div", { className: "my-5 grid grid-cols-1 md:grid-cols-2 gap-y-2 gap-x-8 justify-between" }, /* @__PURE__ */ React__default.createElement(
|
|
4641
|
-
Button,
|
|
4642
|
-
{
|
|
4643
|
-
active: props.persona === "student",
|
|
4644
|
-
spacing: "md",
|
|
4645
|
-
border: "rounded",
|
|
4646
|
-
color: "sky",
|
|
4647
|
-
theme: "dark",
|
|
4648
|
-
text: "Student",
|
|
4649
|
-
size: "md",
|
|
4650
|
-
onClick: props.onStudent
|
|
4651
|
-
}
|
|
4652
|
-
), /* @__PURE__ */ React__default.createElement(
|
|
4653
|
-
Button,
|
|
4654
|
-
{
|
|
4655
|
-
active: props.persona === "educator",
|
|
4656
|
-
spacing: "md",
|
|
4657
|
-
border: "rounded",
|
|
4658
|
-
color: "slate",
|
|
4659
|
-
theme: "dark",
|
|
4660
|
-
text: "Educator",
|
|
4661
|
-
size: "md",
|
|
4662
|
-
onClick: props.onEducator
|
|
4663
|
-
}
|
|
4664
|
-
)));
|
|
4665
|
-
};
|
|
4666
|
-
|
|
4667
4649
|
const Registration = (props) => {
|
|
4668
4650
|
const [givenName, setGivenName] = React__default.useState(props.givenName);
|
|
4669
4651
|
const [familyName, setFamilyName] = React__default.useState(props.familyName);
|
|
4670
4652
|
const [grade, setGrade] = React__default.useState(props.grade);
|
|
4671
|
-
const [impactStatement, setImpactStatement] = React__default.useState(props.impactStatement);
|
|
4653
|
+
const [impactStatement, setImpactStatement] = React__default.useState(props.impactStatement || "");
|
|
4672
4654
|
const onRegister = () => props.onRegister && props.onRegister({
|
|
4673
4655
|
givenName,
|
|
4674
4656
|
familyName,
|
|
@@ -4738,11 +4720,9 @@ const Registration = (props) => {
|
|
|
4738
4720
|
)), /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement("p", { className: "mb-2 font-semibold text-slate-500 text-sm" }, "Impact Statement"), /* @__PURE__ */ React__default.createElement(
|
|
4739
4721
|
"textarea",
|
|
4740
4722
|
{
|
|
4741
|
-
required: true,
|
|
4742
|
-
minLength: 100,
|
|
4743
4723
|
placeholder: "E.g., I would like to encourage my community to become more educated on issues that directly affect us, as well as make sure my community is a place where everyone is welcome.",
|
|
4744
4724
|
onChange: (e) => setImpactStatement(e.target.value),
|
|
4745
|
-
defaultValue: impactStatement
|
|
4725
|
+
defaultValue: impactStatement,
|
|
4746
4726
|
className: "resize-none text-slate-500 focus:text-slate-600 h-24 mt-1 block w-full px-3 py-2 bg-white border border-slate-300 rounded-md text-sm shadow-sm placeholder-slate-400\n focus:outline-none focus:border-sky-500 focus:ring-1 focus:ring-sky-500\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none"
|
|
4747
4727
|
}
|
|
4748
4728
|
)))),
|
|
@@ -4761,245 +4741,6 @@ const Registration = (props) => {
|
|
|
4761
4741
|
);
|
|
4762
4742
|
};
|
|
4763
4743
|
|
|
4764
|
-
var __defProp$4 = Object.defineProperty;
|
|
4765
|
-
var __defProps$3 = Object.defineProperties;
|
|
4766
|
-
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
4767
|
-
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
4768
|
-
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
4769
|
-
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
4770
|
-
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4771
|
-
var __spreadValues$4 = (a, b) => {
|
|
4772
|
-
for (var prop in b || (b = {}))
|
|
4773
|
-
if (__hasOwnProp$4.call(b, prop))
|
|
4774
|
-
__defNormalProp$4(a, prop, b[prop]);
|
|
4775
|
-
if (__getOwnPropSymbols$4)
|
|
4776
|
-
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
4777
|
-
if (__propIsEnum$4.call(b, prop))
|
|
4778
|
-
__defNormalProp$4(a, prop, b[prop]);
|
|
4779
|
-
}
|
|
4780
|
-
return a;
|
|
4781
|
-
};
|
|
4782
|
-
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
4783
|
-
const ImpactQuiz = (props) => {
|
|
4784
|
-
const [started, setStarted] = React__default.useState(false);
|
|
4785
|
-
const [question, setQuestion] = React__default.useState(0);
|
|
4786
|
-
const initialAnswers = {};
|
|
4787
|
-
props.interests && props.interests.map((interest) => {
|
|
4788
|
-
initialAnswers[interest] = true;
|
|
4789
|
-
});
|
|
4790
|
-
const [answers, setAnswers] = React__default.useState(initialAnswers);
|
|
4791
|
-
const setAnswer = (key, interest) => {
|
|
4792
|
-
setAnswers(__spreadProps$3(__spreadValues$4({}, answers), { [key]: interest }));
|
|
4793
|
-
next();
|
|
4794
|
-
};
|
|
4795
|
-
const questions = (() => {
|
|
4796
|
-
const questions2 = [];
|
|
4797
|
-
switch (props.persona) {
|
|
4798
|
-
case "educator":
|
|
4799
|
-
questions2.push(
|
|
4800
|
-
/* @__PURE__ */ React__default.createElement(
|
|
4801
|
-
Question,
|
|
4802
|
-
{
|
|
4803
|
-
key: "policy & government",
|
|
4804
|
-
visible: question === 0,
|
|
4805
|
-
answer: answers["policy & government"],
|
|
4806
|
-
imageURL: "https://cdn.localcivics.io/rc/event/politics.jpg",
|
|
4807
|
-
icon: "policy & government",
|
|
4808
|
-
headline: "Voter Registration Assistance",
|
|
4809
|
-
summary: "Gain the knowledge and technological skills to help friends and family navigate the voter registration process. You can have a civic impact in your immediate circle \u2014 every vote counts!",
|
|
4810
|
-
onAnswer: (interest) => setAnswer("policy & government", interest)
|
|
4811
|
-
}
|
|
4812
|
-
),
|
|
4813
|
-
/* @__PURE__ */ React__default.createElement(
|
|
4814
|
-
Question,
|
|
4815
|
-
{
|
|
4816
|
-
key: "arts & culture",
|
|
4817
|
-
visible: question === 1,
|
|
4818
|
-
answer: answers["arts & culture"],
|
|
4819
|
-
imageURL: "https://cdn.localcivics.io/rc/event/culture.jpg",
|
|
4820
|
-
icon: "arts & culture",
|
|
4821
|
-
headline: "#CreateSeries: Introduction to Drawing & Painting",
|
|
4822
|
-
summary: "In our #CreateSeries, students learn directly from experienced artists and connect with like-minded students. Encourage them to flex their creative muscles and pick up some new skills!",
|
|
4823
|
-
onAnswer: (interest) => setAnswer("arts & culture", interest)
|
|
4824
|
-
}
|
|
4825
|
-
),
|
|
4826
|
-
/* @__PURE__ */ React__default.createElement(
|
|
4827
|
-
Question,
|
|
4828
|
-
{
|
|
4829
|
-
key: "sponsored",
|
|
4830
|
-
visible: question === 2,
|
|
4831
|
-
answer: answers["sponsored"],
|
|
4832
|
-
imageURL: "https://cdn.localcivics.io/rc/event/sponsored.jpg",
|
|
4833
|
-
icon: "sponsored",
|
|
4834
|
-
headline: "Social Entrepreneurship & Design Thinking",
|
|
4835
|
-
summary: "Learn about leaders who have pursued positive social change instead of profits. Then, follow in their footsteps with a design thinking framework to brainstorm innovative solutions for community needs.",
|
|
4836
|
-
onAnswer: (interest) => setAnswer("sponsored", interest)
|
|
4837
|
-
}
|
|
4838
|
-
)
|
|
4839
|
-
);
|
|
4840
|
-
break;
|
|
4841
|
-
default:
|
|
4842
|
-
questions2.push(
|
|
4843
|
-
/* @__PURE__ */ React__default.createElement(
|
|
4844
|
-
Question,
|
|
4845
|
-
{
|
|
4846
|
-
key: "policy & government",
|
|
4847
|
-
visible: question === 0,
|
|
4848
|
-
answer: answers["policy & government"],
|
|
4849
|
-
imageURL: "https://cdn.localcivics.io/rc/event/politics.jpg",
|
|
4850
|
-
icon: "policy & government",
|
|
4851
|
-
headline: "Voter Registration Assistance",
|
|
4852
|
-
summary: "Gain the knowledge and technological skills to help friends and family navigate the voter registration process. You can have a civic impact in your immediate circle \u2014 every vote counts!",
|
|
4853
|
-
onAnswer: (interest) => setAnswer("policy & government", interest)
|
|
4854
|
-
}
|
|
4855
|
-
),
|
|
4856
|
-
/* @__PURE__ */ React__default.createElement(
|
|
4857
|
-
Question,
|
|
4858
|
-
{
|
|
4859
|
-
key: "recreation",
|
|
4860
|
-
visible: question === 1,
|
|
4861
|
-
answer: answers["recreation"],
|
|
4862
|
-
imageURL: "https://cdn.localcivics.io/rc/event/recreation.jpg",
|
|
4863
|
-
icon: "recreation",
|
|
4864
|
-
headline: "Yin Yoga & Social Justice w/ Shayna Johnson",
|
|
4865
|
-
summary: "Get in the flow and foster courage in the face of fear. Learn to work through physical and emotional discomfort as you practice balance, meditation, and relaxation.",
|
|
4866
|
-
onAnswer: (interest) => setAnswer("recreation", interest)
|
|
4867
|
-
}
|
|
4868
|
-
),
|
|
4869
|
-
/* @__PURE__ */ React__default.createElement(
|
|
4870
|
-
Question,
|
|
4871
|
-
{
|
|
4872
|
-
key: "volunteer",
|
|
4873
|
-
visible: question === 2,
|
|
4874
|
-
answer: answers["volunteer"],
|
|
4875
|
-
imageURL: "https://cdn.localcivics.io/rc/event/volunteer.jpg",
|
|
4876
|
-
icon: "volunteer",
|
|
4877
|
-
headline: "Harlem Grown Harvest Volunteer",
|
|
4878
|
-
summary: "Don\u2019t mind getting your hands dirty? Lend one and learn about the benefits of farming organic at one of the many community gardens in the Harlem area.",
|
|
4879
|
-
onAnswer: (interest) => setAnswer("volunteer", interest)
|
|
4880
|
-
}
|
|
4881
|
-
),
|
|
4882
|
-
/* @__PURE__ */ React__default.createElement(
|
|
4883
|
-
Question,
|
|
4884
|
-
{
|
|
4885
|
-
key: "arts & culture",
|
|
4886
|
-
visible: question === 3,
|
|
4887
|
-
answer: answers["arts & culture"],
|
|
4888
|
-
imageURL: "https://cdn.localcivics.io/rc/event/culture.jpg",
|
|
4889
|
-
icon: "arts & culture",
|
|
4890
|
-
headline: "#CreateSeries: Introduction to Drawing & Painting",
|
|
4891
|
-
summary: "Flex your creative muscles and pick up some new skills! In our #CreateSeries, learn directly from experienced artists and connect with like-minded students.",
|
|
4892
|
-
onAnswer: (interest) => setAnswer("arts & culture", interest)
|
|
4893
|
-
}
|
|
4894
|
-
),
|
|
4895
|
-
/* @__PURE__ */ React__default.createElement(
|
|
4896
|
-
Question,
|
|
4897
|
-
{
|
|
4898
|
-
key: "college & career",
|
|
4899
|
-
visible: question === 4,
|
|
4900
|
-
answer: answers["college & career"],
|
|
4901
|
-
imageURL: "https://cdn.localcivics.io/rc/event/college.jpg",
|
|
4902
|
-
icon: "college & career",
|
|
4903
|
-
headline: "Career Journeys: Tech, Law, & Healthcare",
|
|
4904
|
-
summary: "Join us each week and meet diverse professionals representing a wide range of careers. Get all your interests answered and explore your dream jobs with the people who know them best!",
|
|
4905
|
-
onAnswer: (interest) => setAnswer("college & career", interest)
|
|
4906
|
-
}
|
|
4907
|
-
),
|
|
4908
|
-
/* @__PURE__ */ React__default.createElement(
|
|
4909
|
-
Question,
|
|
4910
|
-
{
|
|
4911
|
-
key: "sponsored",
|
|
4912
|
-
visible: question === 5,
|
|
4913
|
-
answer: answers["sponsored"],
|
|
4914
|
-
imageURL: "https://cdn.localcivics.io/rc/event/sponsored.jpg",
|
|
4915
|
-
icon: "sponsored",
|
|
4916
|
-
headline: "Social Entrepreneurship & Design Thinking",
|
|
4917
|
-
summary: "Learn about leaders who have pursued positive social change instead of profits. Then, follow in their footsteps with a design thinking framework to brainstorm innovative solutions for community needs.",
|
|
4918
|
-
onAnswer: (interest) => setAnswer("sponsored", interest)
|
|
4919
|
-
}
|
|
4920
|
-
)
|
|
4921
|
-
);
|
|
4922
|
-
break;
|
|
4923
|
-
}
|
|
4924
|
-
return questions2;
|
|
4925
|
-
})();
|
|
4926
|
-
const asked = questions.length;
|
|
4927
|
-
const [finished, setFinished] = React__default.useState(asked === 0);
|
|
4928
|
-
const start = () => {
|
|
4929
|
-
setFinished(asked === 0);
|
|
4930
|
-
setStarted(true);
|
|
4931
|
-
setQuestion(0);
|
|
4932
|
-
};
|
|
4933
|
-
const next = () => {
|
|
4934
|
-
if (finished) {
|
|
4935
|
-
return;
|
|
4936
|
-
}
|
|
4937
|
-
if (question === asked - 1) {
|
|
4938
|
-
setFinished(true);
|
|
4939
|
-
return;
|
|
4940
|
-
}
|
|
4941
|
-
setQuestion(question + 1);
|
|
4942
|
-
};
|
|
4943
|
-
const restart = () => {
|
|
4944
|
-
setQuestion(0);
|
|
4945
|
-
setFinished(asked === 0);
|
|
4946
|
-
setStarted(false);
|
|
4947
|
-
};
|
|
4948
|
-
if (!started) {
|
|
4949
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: "w-full md:w-[20rem] bg-white rounded-md border border-slate-200 px-8 py-5 shadow-sm grid grid-cols-1 gap-2 content-center justify-items-center" }, /* @__PURE__ */ React__default.createElement("div", { className: "text-slate-600 w-14 h-14" }, /* @__PURE__ */ React__default.createElement(Icon$1, { name: "goal" })), /* @__PURE__ */ React__default.createElement("div", { className: "text-slate-600 text-center" }, /* @__PURE__ */ React__default.createElement("p", { className: "font-bold text-2xl" }, "Impact Quiz"), /* @__PURE__ */ React__default.createElement("p", { className: "text-sm max-w-[16rem]" }, "Choose the experiences (if any) that interest you.")), /* @__PURE__ */ React__default.createElement("div", { className: "my-5" }, /* @__PURE__ */ React__default.createElement(Button, { spacing: "md", border: "rounded", color: "sky", theme: "dark", text: "Start", size: "md", onClick: start })));
|
|
4950
|
-
}
|
|
4951
|
-
const interests = [];
|
|
4952
|
-
Object.entries(answers).map(([v, interest]) => {
|
|
4953
|
-
if (interest) {
|
|
4954
|
-
interests.push(v);
|
|
4955
|
-
}
|
|
4956
|
-
});
|
|
4957
|
-
if (finished) {
|
|
4958
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: "w-full md:w-[24rem] rounded-md bg-white border border-slate-200 px-8 py-5 shadow-sm grid grid-cols-1 gap-4 content-center justify-items-center" }, /* @__PURE__ */ React__default.createElement("div", { className: "text-green-600 w-14 h-14" }, /* @__PURE__ */ React__default.createElement(Icon$1, { name: "positive" })), /* @__PURE__ */ React__default.createElement("div", { className: "text-slate-600 text-center" }, /* @__PURE__ */ React__default.createElement("p", { className: "font-bold text-2xl" }, "Done! Nice work."), /* @__PURE__ */ React__default.createElement("p", { className: "text-sm max-w-[16rem]" }, "You may continue on or go back to change your answers.")), /* @__PURE__ */ React__default.createElement("div", { className: "my-5 grid grid-cols-1 md:grid-cols-2 gap-y-2 gap-x-8 justify-between" }, /* @__PURE__ */ React__default.createElement(Button, { spacing: "md", border: "rounded", color: "slate", theme: "dark", text: "Restart", size: "md", onClick: restart }), /* @__PURE__ */ React__default.createElement(
|
|
4959
|
-
Button,
|
|
4960
|
-
{
|
|
4961
|
-
spacing: "md",
|
|
4962
|
-
border: "rounded",
|
|
4963
|
-
color: "sky",
|
|
4964
|
-
theme: "dark",
|
|
4965
|
-
text: "Continue",
|
|
4966
|
-
size: "md",
|
|
4967
|
-
onClick: () => props.onFinish && props.onFinish(interests)
|
|
4968
|
-
}
|
|
4969
|
-
)));
|
|
4970
|
-
}
|
|
4971
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, questions);
|
|
4972
|
-
};
|
|
4973
|
-
const Question = (props) => {
|
|
4974
|
-
if (!props.visible) {
|
|
4975
|
-
return null;
|
|
4976
|
-
}
|
|
4977
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: "grid grid-cols-1 gap-8 content-center" }, /* @__PURE__ */ React__default.createElement("div", { className: "w-full overflow-hidden max-w-[18rem] md:max-w-[30rem] md:w-[30rem] rounded-md bg-white shadow-sm grid grid-cols-1 md:grid-cols-2" }, /* @__PURE__ */ React__default.createElement("img", { alt: props.headline, className: "w-full h-full object-cover", src: props.imageURL }), /* @__PURE__ */ React__default.createElement("div", { className: "p-5" }, /* @__PURE__ */ React__default.createElement("div", { className: "flex" }, /* @__PURE__ */ React__default.createElement("div", { className: "h-8 w-8 text-slate-500" }, /* @__PURE__ */ React__default.createElement(Icon$1, { name: props.icon }))), /* @__PURE__ */ React__default.createElement("div", { className: "grid grid-cols-1 text-slate-500" }, /* @__PURE__ */ React__default.createElement("p", { className: "font-semibold text-lg" }, props.headline), /* @__PURE__ */ React__default.createElement("p", { className: "text-sm" }, props.summary)))), /* @__PURE__ */ React__default.createElement("div", { className: "m-auto" }, /* @__PURE__ */ React__default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-x-8 gap-y-4" }, /* @__PURE__ */ React__default.createElement(
|
|
4978
|
-
Button,
|
|
4979
|
-
{
|
|
4980
|
-
spacing: "md",
|
|
4981
|
-
border: "rounded",
|
|
4982
|
-
color: "rose",
|
|
4983
|
-
theme: "dark",
|
|
4984
|
-
text: "Not interested",
|
|
4985
|
-
size: "md",
|
|
4986
|
-
onClick: () => props.onAnswer && props.onAnswer(false)
|
|
4987
|
-
}
|
|
4988
|
-
), /* @__PURE__ */ React__default.createElement(
|
|
4989
|
-
Button,
|
|
4990
|
-
{
|
|
4991
|
-
icon: "accept",
|
|
4992
|
-
spacing: "md",
|
|
4993
|
-
border: "rounded",
|
|
4994
|
-
color: "green",
|
|
4995
|
-
theme: "dark",
|
|
4996
|
-
text: "Looks cool",
|
|
4997
|
-
size: "md",
|
|
4998
|
-
onClick: () => props.onAnswer && props.onAnswer(true)
|
|
4999
|
-
}
|
|
5000
|
-
))));
|
|
5001
|
-
};
|
|
5002
|
-
|
|
5003
4744
|
const Welcome = (props) => {
|
|
5004
4745
|
return /* @__PURE__ */ React__default.createElement("div", { className: "w-full md:w-[24rem] rounded-md bg-white border border-slate-200 px-8 py-5 shadow-sm grid grid-cols-1 gap-4 content-center justify-items-center" }, /* @__PURE__ */ React__default.createElement("div", { className: "text-slate-600 w-14 h-14" }, /* @__PURE__ */ React__default.createElement(Icon$1, { name: "explore" })), /* @__PURE__ */ React__default.createElement("div", { className: "text-slate-600 text-center" }, /* @__PURE__ */ React__default.createElement("div", { className: "font-bold text-2xl" }, /* @__PURE__ */ React__default.createElement("span", null, "You're all set"), props.givenName && /* @__PURE__ */ React__default.createElement("span", { className: "capitalize" }, ", ", props.givenName), /* @__PURE__ */ React__default.createElement("span", null, "!")), /* @__PURE__ */ React__default.createElement("p", { className: "text-sm max-w-[16rem]" }, "Click continue to start exploring Local.")), /* @__PURE__ */ React__default.createElement("div", { className: "my-5 grid grid-cols-1" }, /* @__PURE__ */ React__default.createElement(
|
|
5005
4746
|
Button,
|
|
@@ -5074,13 +4815,7 @@ const Delegate = (props) => {
|
|
|
5074
4815
|
}
|
|
5075
4816
|
if (!props.hasRegistration) {
|
|
5076
4817
|
if (!persona) {
|
|
5077
|
-
|
|
5078
|
-
RoleSelection,
|
|
5079
|
-
{
|
|
5080
|
-
onStudent: () => setPersona("student"),
|
|
5081
|
-
onEducator: () => setPersona("educator")
|
|
5082
|
-
}
|
|
5083
|
-
);
|
|
4818
|
+
setPersona("student");
|
|
5084
4819
|
}
|
|
5085
4820
|
return /* @__PURE__ */ React__default.createElement(
|
|
5086
4821
|
Registration,
|
|
@@ -5095,17 +4830,8 @@ const Delegate = (props) => {
|
|
|
5095
4830
|
);
|
|
5096
4831
|
}
|
|
5097
4832
|
if (!interests && !props.hasInterests) {
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
{
|
|
5101
|
-
persona,
|
|
5102
|
-
interests: props.interests,
|
|
5103
|
-
onFinish: (interests2) => {
|
|
5104
|
-
setInterests(true);
|
|
5105
|
-
props.onConfigureTenant && props.onConfigureTenant({ interests: interests2 });
|
|
5106
|
-
}
|
|
5107
|
-
}
|
|
5108
|
-
);
|
|
4833
|
+
setInterests(true);
|
|
4834
|
+
props.onConfigureTenant({});
|
|
5109
4835
|
}
|
|
5110
4836
|
return /* @__PURE__ */ React__default.createElement(Welcome, { givenName: props.givenName, onContinue: props.onFinish });
|
|
5111
4837
|
};
|