@local-civics/hub-ui 0.1.176 → 0.1.178
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.js +302 -331
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +302 -331
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -952,19 +952,19 @@ const sprite = {
|
|
|
952
952
|
}
|
|
953
953
|
};
|
|
954
954
|
|
|
955
|
-
var __defProp$
|
|
956
|
-
var __getOwnPropSymbols$
|
|
957
|
-
var __hasOwnProp$
|
|
958
|
-
var __propIsEnum$
|
|
959
|
-
var __defNormalProp$
|
|
960
|
-
var __spreadValues$
|
|
955
|
+
var __defProp$h = Object.defineProperty;
|
|
956
|
+
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
957
|
+
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
958
|
+
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
959
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
960
|
+
var __spreadValues$h = (a, b) => {
|
|
961
961
|
for (var prop in b || (b = {}))
|
|
962
|
-
if (__hasOwnProp$
|
|
963
|
-
__defNormalProp$
|
|
964
|
-
if (__getOwnPropSymbols$
|
|
965
|
-
for (var prop of __getOwnPropSymbols$
|
|
966
|
-
if (__propIsEnum$
|
|
967
|
-
__defNormalProp$
|
|
962
|
+
if (__hasOwnProp$h.call(b, prop))
|
|
963
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
964
|
+
if (__getOwnPropSymbols$h)
|
|
965
|
+
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
966
|
+
if (__propIsEnum$h.call(b, prop))
|
|
967
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
968
968
|
}
|
|
969
969
|
return a;
|
|
970
970
|
};
|
|
@@ -983,9 +983,9 @@ const Icon$1 = (props) => {
|
|
|
983
983
|
},
|
|
984
984
|
/* @__PURE__ */ React.createElement("title", null, props.name),
|
|
985
985
|
contents.map((v, k) => {
|
|
986
|
-
return v.d && /* @__PURE__ */ React.createElement("path", __spreadValues$
|
|
986
|
+
return v.d && /* @__PURE__ */ React.createElement("path", __spreadValues$h({ key: k }, v));
|
|
987
987
|
}),
|
|
988
|
-
contents.map((v, k) => v.r && /* @__PURE__ */ React.createElement("circle", __spreadValues$
|
|
988
|
+
contents.map((v, k) => v.r && /* @__PURE__ */ React.createElement("circle", __spreadValues$h({ key: k }, v)))
|
|
989
989
|
);
|
|
990
990
|
};
|
|
991
991
|
|
|
@@ -1571,25 +1571,25 @@ const ActivityItem = (props) => {
|
|
|
1571
1571
|
return /* @__PURE__ */ React__namespace.createElement("div", { onClick: props.onClick, className: "grow cursor-pointer relative rounded-md min-w-64 h-[22rem] overflow-hidden" }, /* @__PURE__ */ React__namespace.createElement("img", { className: "h-full w-full object-cover", alt: props.headline, src: props.imageURL }), /* @__PURE__ */ React__namespace.createElement("div", { className: "absolute bottom-0 w-full" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "p-5 bg-gray-800/75 w-full" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "text-sm font-bold text-white w-full" }, props.headline), /* @__PURE__ */ React__namespace.createElement("div", { className: "mt-2 flex items-center gap-x-2 w-full" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex-shrink-0 w-6 h-6 text-white fill-white" }, /* @__PURE__ */ React__namespace.createElement(Icon$1, { name: props.pathway || "globe" })), props.pathway && /* @__PURE__ */ React__namespace.createElement("span", { className: "grow" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "text-sm font-medium capitalize text-white w-full" }, props.pathway)), props.xp && /* @__PURE__ */ React__namespace.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")))));
|
|
1572
1572
|
};
|
|
1573
1573
|
|
|
1574
|
-
var __defProp$
|
|
1575
|
-
var __defProps$
|
|
1576
|
-
var __getOwnPropDescs$
|
|
1577
|
-
var __getOwnPropSymbols$
|
|
1578
|
-
var __hasOwnProp$
|
|
1579
|
-
var __propIsEnum$
|
|
1580
|
-
var __defNormalProp$
|
|
1581
|
-
var __spreadValues$
|
|
1574
|
+
var __defProp$g = Object.defineProperty;
|
|
1575
|
+
var __defProps$d = Object.defineProperties;
|
|
1576
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
1577
|
+
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
1578
|
+
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
1579
|
+
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
1580
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1581
|
+
var __spreadValues$g = (a, b) => {
|
|
1582
1582
|
for (var prop in b || (b = {}))
|
|
1583
|
-
if (__hasOwnProp$
|
|
1584
|
-
__defNormalProp$
|
|
1585
|
-
if (__getOwnPropSymbols$
|
|
1586
|
-
for (var prop of __getOwnPropSymbols$
|
|
1587
|
-
if (__propIsEnum$
|
|
1588
|
-
__defNormalProp$
|
|
1583
|
+
if (__hasOwnProp$g.call(b, prop))
|
|
1584
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
1585
|
+
if (__getOwnPropSymbols$g)
|
|
1586
|
+
for (var prop of __getOwnPropSymbols$g(b)) {
|
|
1587
|
+
if (__propIsEnum$g.call(b, prop))
|
|
1588
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
1589
1589
|
}
|
|
1590
1590
|
return a;
|
|
1591
1591
|
};
|
|
1592
|
-
var __spreadProps$
|
|
1592
|
+
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
1593
1593
|
const TagFilter = (props) => {
|
|
1594
1594
|
const timeTags = ["15 min", "30 min", "45 min", "60 min"];
|
|
1595
1595
|
const skillTags = ["Civic", "College", "Academic", "Personal"];
|
|
@@ -1601,12 +1601,12 @@ const TagFilter = (props) => {
|
|
|
1601
1601
|
const [active, setActive] = React.useState(init);
|
|
1602
1602
|
const onTagClick = (tag) => {
|
|
1603
1603
|
if (active[tag]) {
|
|
1604
|
-
setActive(__spreadProps$
|
|
1605
|
-
const tags = Object.entries(__spreadProps$
|
|
1604
|
+
setActive(__spreadProps$d(__spreadValues$g({}, active), { [tag]: false }));
|
|
1605
|
+
const tags = Object.entries(__spreadProps$d(__spreadValues$g({}, active), { [tag]: false })).filter(([, active2]) => active2).map(([tag2]) => tag2);
|
|
1606
1606
|
props.onChange && props.onChange(tags);
|
|
1607
1607
|
} else {
|
|
1608
|
-
setActive(__spreadProps$
|
|
1609
|
-
const tags = Object.entries(__spreadProps$
|
|
1608
|
+
setActive(__spreadProps$d(__spreadValues$g({}, active), { [tag]: true }));
|
|
1609
|
+
const tags = Object.entries(__spreadProps$d(__spreadValues$g({}, active), { [tag]: true })).filter(([, active2]) => active2).map(([tag2]) => tag2);
|
|
1610
1610
|
props.onChange && props.onChange(tags);
|
|
1611
1611
|
}
|
|
1612
1612
|
};
|
|
@@ -1652,25 +1652,25 @@ const debounce = (func, delay) => {
|
|
|
1652
1652
|
};
|
|
1653
1653
|
};
|
|
1654
1654
|
|
|
1655
|
-
var __defProp$
|
|
1656
|
-
var __defProps$
|
|
1657
|
-
var __getOwnPropDescs$
|
|
1658
|
-
var __getOwnPropSymbols$
|
|
1659
|
-
var __hasOwnProp$
|
|
1660
|
-
var __propIsEnum$
|
|
1661
|
-
var __defNormalProp$
|
|
1662
|
-
var __spreadValues$
|
|
1655
|
+
var __defProp$f = Object.defineProperty;
|
|
1656
|
+
var __defProps$c = Object.defineProperties;
|
|
1657
|
+
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
1658
|
+
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
1659
|
+
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
1660
|
+
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
1661
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1662
|
+
var __spreadValues$f = (a, b) => {
|
|
1663
1663
|
for (var prop in b || (b = {}))
|
|
1664
|
-
if (__hasOwnProp$
|
|
1665
|
-
__defNormalProp$
|
|
1666
|
-
if (__getOwnPropSymbols$
|
|
1667
|
-
for (var prop of __getOwnPropSymbols$
|
|
1668
|
-
if (__propIsEnum$
|
|
1669
|
-
__defNormalProp$
|
|
1664
|
+
if (__hasOwnProp$f.call(b, prop))
|
|
1665
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
1666
|
+
if (__getOwnPropSymbols$f)
|
|
1667
|
+
for (var prop of __getOwnPropSymbols$f(b)) {
|
|
1668
|
+
if (__propIsEnum$f.call(b, prop))
|
|
1669
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
1670
1670
|
}
|
|
1671
1671
|
return a;
|
|
1672
1672
|
};
|
|
1673
|
-
var __spreadProps$
|
|
1673
|
+
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
1674
1674
|
const ActivityList = (props) => {
|
|
1675
1675
|
var _a;
|
|
1676
1676
|
const primary = !props.top ? null : props.top.length > 0 ? props == null ? void 0 : props.top[0] : null;
|
|
@@ -1688,14 +1688,14 @@ const ActivityList = (props) => {
|
|
|
1688
1688
|
isLoading: props.isLoading,
|
|
1689
1689
|
primary: !props.search && primary && /* @__PURE__ */ React.createElement(
|
|
1690
1690
|
ActivityItem,
|
|
1691
|
-
__spreadProps$
|
|
1691
|
+
__spreadProps$c(__spreadValues$f({}, primary), {
|
|
1692
1692
|
onClick: () => props.onActivityClick && props.onActivityClick(primary.activityId)
|
|
1693
1693
|
})
|
|
1694
1694
|
),
|
|
1695
1695
|
top: !props.search && top && top.length > 0 && /* @__PURE__ */ React.createElement("article", { className: "grid grid-cols-1 md:flex gap-2 overflow-auto" }, top.map((activity) => {
|
|
1696
1696
|
return /* @__PURE__ */ React.createElement(
|
|
1697
1697
|
ActivityItem,
|
|
1698
|
-
__spreadProps$
|
|
1698
|
+
__spreadProps$c(__spreadValues$f({
|
|
1699
1699
|
key: `${activity.activityId}`
|
|
1700
1700
|
}, activity), {
|
|
1701
1701
|
onClick: () => props.onActivityClick && props.onActivityClick(activity.activityId)
|
|
@@ -1705,7 +1705,7 @@ const ActivityList = (props) => {
|
|
|
1705
1705
|
soonest: !props.search && upcoming && upcoming.length > 0 && /* @__PURE__ */ React.createElement("article", { className: "grid grid-cols-1 md:flex gap-2 overflow-auto" }, upcoming.map((activity) => {
|
|
1706
1706
|
return /* @__PURE__ */ React.createElement(
|
|
1707
1707
|
ActivityItem,
|
|
1708
|
-
__spreadProps$
|
|
1708
|
+
__spreadProps$c(__spreadValues$f({
|
|
1709
1709
|
key: `${activity.activityId}`
|
|
1710
1710
|
}, activity), {
|
|
1711
1711
|
onClick: () => props.onActivityClick && props.onActivityClick(activity.activityId)
|
|
@@ -1715,7 +1715,7 @@ const ActivityList = (props) => {
|
|
|
1715
1715
|
milestones: !props.search && props.milestones && props.milestones.length > 0 && /* @__PURE__ */ React.createElement("article", { className: "grid grid-cols-1 md:flex gap-2 overflow-auto" }, props.milestones.map((activity) => {
|
|
1716
1716
|
return /* @__PURE__ */ React.createElement(
|
|
1717
1717
|
ActivityItem,
|
|
1718
|
-
__spreadProps$
|
|
1718
|
+
__spreadProps$c(__spreadValues$f({
|
|
1719
1719
|
key: `${activity.activityId}`
|
|
1720
1720
|
}, activity), {
|
|
1721
1721
|
onClick: () => props.onActivityClick && props.onActivityClick(activity.activityId)
|
|
@@ -1726,7 +1726,7 @@ const ActivityList = (props) => {
|
|
|
1726
1726
|
filtered: !!props.search && props.activities && props.activities.length > 0 && /* @__PURE__ */ React.createElement("article", { className: "grid grid-cols-1 md:flex gap-2 overflow-auto" }, props.activities.map((activity) => {
|
|
1727
1727
|
return /* @__PURE__ */ React.createElement(
|
|
1728
1728
|
ActivityItem,
|
|
1729
|
-
__spreadProps$
|
|
1729
|
+
__spreadProps$c(__spreadValues$f({
|
|
1730
1730
|
key: `${activity.activityId}`
|
|
1731
1731
|
}, activity), {
|
|
1732
1732
|
onClick: () => props.onActivityClick && props.onActivityClick(activity.activityId)
|
|
@@ -1752,25 +1752,25 @@ const Search$1 = ({ send, value }) => {
|
|
|
1752
1752
|
)));
|
|
1753
1753
|
};
|
|
1754
1754
|
|
|
1755
|
-
var __defProp$
|
|
1756
|
-
var __defProps$
|
|
1757
|
-
var __getOwnPropDescs$
|
|
1758
|
-
var __getOwnPropSymbols$
|
|
1759
|
-
var __hasOwnProp$
|
|
1760
|
-
var __propIsEnum$
|
|
1761
|
-
var __defNormalProp$
|
|
1762
|
-
var __spreadValues$
|
|
1755
|
+
var __defProp$e = Object.defineProperty;
|
|
1756
|
+
var __defProps$b = Object.defineProperties;
|
|
1757
|
+
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
1758
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
1759
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
1760
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
1761
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1762
|
+
var __spreadValues$e = (a, b) => {
|
|
1763
1763
|
for (var prop in b || (b = {}))
|
|
1764
|
-
if (__hasOwnProp$
|
|
1765
|
-
__defNormalProp$
|
|
1766
|
-
if (__getOwnPropSymbols$
|
|
1767
|
-
for (var prop of __getOwnPropSymbols$
|
|
1768
|
-
if (__propIsEnum$
|
|
1769
|
-
__defNormalProp$
|
|
1764
|
+
if (__hasOwnProp$e.call(b, prop))
|
|
1765
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
1766
|
+
if (__getOwnPropSymbols$e)
|
|
1767
|
+
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
1768
|
+
if (__propIsEnum$e.call(b, prop))
|
|
1769
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
1770
1770
|
}
|
|
1771
1771
|
return a;
|
|
1772
1772
|
};
|
|
1773
|
-
var __spreadProps$
|
|
1773
|
+
var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
|
|
1774
1774
|
const ActivityReflection = (props) => {
|
|
1775
1775
|
const className = builder("w-full md:w-[40rem]").if(!!props.headline, "min-h-[20rem]").build();
|
|
1776
1776
|
const [reaction, setReaction] = React.useState({
|
|
@@ -1778,8 +1778,8 @@ const ActivityReflection = (props) => {
|
|
|
1778
1778
|
reflection: props.reflection
|
|
1779
1779
|
});
|
|
1780
1780
|
const hasChanges = props.hasChanges || props.canReflect && (props.rating !== reaction.rating || props.reflection !== reaction.reflection);
|
|
1781
|
-
const setFeedback = (feedback) => setReaction(__spreadProps$
|
|
1782
|
-
const setRating = (rating) => setReaction(__spreadProps$
|
|
1781
|
+
const setFeedback = (feedback) => setReaction(__spreadProps$b(__spreadValues$e({}, reaction), { reflection: feedback }));
|
|
1782
|
+
const setRating = (rating) => setReaction(__spreadProps$b(__spreadValues$e({}, reaction), { rating }));
|
|
1783
1783
|
React.useEffect(() => {
|
|
1784
1784
|
setReaction({
|
|
1785
1785
|
rating: props.rating,
|
|
@@ -1806,7 +1806,7 @@ const ActivityReflection = (props) => {
|
|
|
1806
1806
|
defaultValue: props.reflection,
|
|
1807
1807
|
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"
|
|
1808
1808
|
}
|
|
1809
|
-
), props.canReflect && /* @__PURE__ */ React.createElement(Rating$1, __spreadProps$
|
|
1809
|
+
), props.canReflect && /* @__PURE__ */ React.createElement(Rating$1, __spreadProps$b(__spreadValues$e(__spreadValues$e({}, props), reaction), { setRating })))))));
|
|
1810
1810
|
};
|
|
1811
1811
|
const Rating$1 = (props) => {
|
|
1812
1812
|
const maxPoints = 5;
|
|
@@ -3212,25 +3212,25 @@ const Overlay = (props) => {
|
|
|
3212
3212
|
return /* @__PURE__ */ React__namespace.createElement("div", { className: "flex fixed overscroll-none w-screen h-screen top-0 left-0 bg-gray-300/75 z-30" }, props.children);
|
|
3213
3213
|
};
|
|
3214
3214
|
|
|
3215
|
-
var __defProp$
|
|
3216
|
-
var __defProps$
|
|
3217
|
-
var __getOwnPropDescs$
|
|
3218
|
-
var __getOwnPropSymbols$
|
|
3219
|
-
var __hasOwnProp$
|
|
3220
|
-
var __propIsEnum$
|
|
3221
|
-
var __defNormalProp$
|
|
3222
|
-
var __spreadValues$
|
|
3215
|
+
var __defProp$d = Object.defineProperty;
|
|
3216
|
+
var __defProps$a = Object.defineProperties;
|
|
3217
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
3218
|
+
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
3219
|
+
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
3220
|
+
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
3221
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3222
|
+
var __spreadValues$d = (a, b) => {
|
|
3223
3223
|
for (var prop in b || (b = {}))
|
|
3224
|
-
if (__hasOwnProp$
|
|
3225
|
-
__defNormalProp$
|
|
3226
|
-
if (__getOwnPropSymbols$
|
|
3227
|
-
for (var prop of __getOwnPropSymbols$
|
|
3228
|
-
if (__propIsEnum$
|
|
3229
|
-
__defNormalProp$
|
|
3224
|
+
if (__hasOwnProp$d.call(b, prop))
|
|
3225
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
3226
|
+
if (__getOwnPropSymbols$d)
|
|
3227
|
+
for (var prop of __getOwnPropSymbols$d(b)) {
|
|
3228
|
+
if (__propIsEnum$d.call(b, prop))
|
|
3229
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
3230
3230
|
}
|
|
3231
3231
|
return a;
|
|
3232
3232
|
};
|
|
3233
|
-
var __spreadProps$
|
|
3233
|
+
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
3234
3234
|
const Badge = (props) => {
|
|
3235
3235
|
var _a, _b;
|
|
3236
3236
|
const [open, setOpen] = React__namespace.useState(props.open || false);
|
|
@@ -3248,7 +3248,7 @@ const Badge = (props) => {
|
|
|
3248
3248
|
props.onClose();
|
|
3249
3249
|
}
|
|
3250
3250
|
};
|
|
3251
|
-
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, !open && /* @__PURE__ */ React__namespace.createElement(BadgeButton, __spreadProps$
|
|
3251
|
+
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, !open && /* @__PURE__ */ React__namespace.createElement(BadgeButton, __spreadProps$a(__spreadValues$d({}, props), { progress, target, onClick: onOpen })), open && !!props.preview && /* @__PURE__ */ React__namespace.createElement(BadgeCard, __spreadProps$a(__spreadValues$d({}, props), { onClose })), open && !props.preview && /* @__PURE__ */ React__namespace.createElement(Overlay, null, /* @__PURE__ */ React__namespace.createElement(BadgeCard, __spreadProps$a(__spreadValues$d({}, props), { onClose }))));
|
|
3252
3252
|
};
|
|
3253
3253
|
|
|
3254
3254
|
const BadgeActivity = (props) => {
|
|
@@ -3283,25 +3283,25 @@ const BadgeActivity = (props) => {
|
|
|
3283
3283
|
})))));
|
|
3284
3284
|
};
|
|
3285
3285
|
|
|
3286
|
-
var __defProp$
|
|
3287
|
-
var __defProps$
|
|
3288
|
-
var __getOwnPropDescs$
|
|
3289
|
-
var __getOwnPropSymbols$
|
|
3290
|
-
var __hasOwnProp$
|
|
3291
|
-
var __propIsEnum$
|
|
3292
|
-
var __defNormalProp$
|
|
3293
|
-
var __spreadValues$
|
|
3286
|
+
var __defProp$c = Object.defineProperty;
|
|
3287
|
+
var __defProps$9 = Object.defineProperties;
|
|
3288
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
3289
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
3290
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
3291
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
3292
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3293
|
+
var __spreadValues$c = (a, b) => {
|
|
3294
3294
|
for (var prop in b || (b = {}))
|
|
3295
|
-
if (__hasOwnProp$
|
|
3296
|
-
__defNormalProp$
|
|
3297
|
-
if (__getOwnPropSymbols$
|
|
3298
|
-
for (var prop of __getOwnPropSymbols$
|
|
3299
|
-
if (__propIsEnum$
|
|
3300
|
-
__defNormalProp$
|
|
3295
|
+
if (__hasOwnProp$c.call(b, prop))
|
|
3296
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
3297
|
+
if (__getOwnPropSymbols$c)
|
|
3298
|
+
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
3299
|
+
if (__propIsEnum$c.call(b, prop))
|
|
3300
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
3301
3301
|
}
|
|
3302
3302
|
return a;
|
|
3303
3303
|
};
|
|
3304
|
-
var __spreadProps$
|
|
3304
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
3305
3305
|
const BadgeActivityMenu = (props) => {
|
|
3306
3306
|
const criteria = props.criteria || [];
|
|
3307
3307
|
return /* @__PURE__ */ React__namespace.createElement("div", { className: "grid grid-cols-1 gap-y-4 w-full text-zinc-600" }, /* @__PURE__ */ React__namespace.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__namespace.createElement(
|
|
@@ -3318,7 +3318,7 @@ const BadgeActivityMenu = (props) => {
|
|
|
3318
3318
|
return /* @__PURE__ */ React__namespace.createElement("div", { key: id, className: "grid grid-cols-1 gap-y-8" }, /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement("p", { className: "text-lg font-semibold" }, c.displayName), /* @__PURE__ */ React__namespace.createElement("p", { className: "text-sm" }, "Chose one activity to complete.")), /* @__PURE__ */ React__namespace.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) => {
|
|
3319
3319
|
const id2 = o.activityId || i2;
|
|
3320
3320
|
const date = o.startTime ? new Date(o.startTime) : null;
|
|
3321
|
-
return /* @__PURE__ */ React__namespace.createElement("div", { key: id2, className: "grid grid-cols-1 gap-y-2" }, date && /* @__PURE__ */ React__namespace.createElement("p", null, Intl.DateTimeFormat("en-US", { month: "long" }).format(date), " ", ordNumber$1(date.getDate())), !date && /* @__PURE__ */ React__namespace.createElement("p", { className: "invisible" }, "Online"), /* @__PURE__ */ React__namespace.createElement(BadgeActivity, __spreadProps$
|
|
3321
|
+
return /* @__PURE__ */ React__namespace.createElement("div", { key: id2, className: "grid grid-cols-1 gap-y-2" }, date && /* @__PURE__ */ React__namespace.createElement("p", null, Intl.DateTimeFormat("en-US", { month: "long" }).format(date), " ", ordNumber$1(date.getDate())), !date && /* @__PURE__ */ React__namespace.createElement("p", { className: "invisible" }, "Online"), /* @__PURE__ */ React__namespace.createElement(BadgeActivity, __spreadProps$9(__spreadValues$c({}, o), { criteriaName: c.displayName })));
|
|
3322
3322
|
})));
|
|
3323
3323
|
})));
|
|
3324
3324
|
};
|
|
@@ -3363,25 +3363,25 @@ const Widget = (props) => {
|
|
|
3363
3363
|
return /* @__PURE__ */ React.createElement("article", { className }, !props.headless && /* @__PURE__ */ React.createElement("div", { className: "p-2 bg-gray-200" }), /* @__PURE__ */ React.createElement(Loader, { isLoading: props.isLoading }, /* @__PURE__ */ React.createElement("div", { className: "relative w-full" }, props.children)));
|
|
3364
3364
|
};
|
|
3365
3365
|
|
|
3366
|
-
var __defProp$
|
|
3367
|
-
var __defProps$
|
|
3368
|
-
var __getOwnPropDescs$
|
|
3369
|
-
var __getOwnPropSymbols$
|
|
3370
|
-
var __hasOwnProp$
|
|
3371
|
-
var __propIsEnum$
|
|
3372
|
-
var __defNormalProp$
|
|
3373
|
-
var __spreadValues$
|
|
3366
|
+
var __defProp$b = Object.defineProperty;
|
|
3367
|
+
var __defProps$8 = Object.defineProperties;
|
|
3368
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
3369
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
3370
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
3371
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
3372
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3373
|
+
var __spreadValues$b = (a, b) => {
|
|
3374
3374
|
for (var prop in b || (b = {}))
|
|
3375
|
-
if (__hasOwnProp$
|
|
3376
|
-
__defNormalProp$
|
|
3377
|
-
if (__getOwnPropSymbols$
|
|
3378
|
-
for (var prop of __getOwnPropSymbols$
|
|
3379
|
-
if (__propIsEnum$
|
|
3380
|
-
__defNormalProp$
|
|
3375
|
+
if (__hasOwnProp$b.call(b, prop))
|
|
3376
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
3377
|
+
if (__getOwnPropSymbols$b)
|
|
3378
|
+
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
3379
|
+
if (__propIsEnum$b.call(b, prop))
|
|
3380
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
3381
3381
|
}
|
|
3382
3382
|
return a;
|
|
3383
3383
|
};
|
|
3384
|
-
var __spreadProps$
|
|
3384
|
+
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
3385
3385
|
const DEFAULT_FILTERS = [
|
|
3386
3386
|
{ label: "In Progress" },
|
|
3387
3387
|
{ label: "Completed" },
|
|
@@ -3441,7 +3441,7 @@ const BadgeSection = (props) => {
|
|
|
3441
3441
|
if (!(opt.label in filters)) {
|
|
3442
3442
|
return;
|
|
3443
3443
|
}
|
|
3444
|
-
const next = __spreadValues$
|
|
3444
|
+
const next = __spreadValues$b({}, filters);
|
|
3445
3445
|
next[opt.label].isActive = !next[opt.label].isActive;
|
|
3446
3446
|
setFilters(next);
|
|
3447
3447
|
},
|
|
@@ -3467,15 +3467,15 @@ const BadgeSection = (props) => {
|
|
|
3467
3467
|
},
|
|
3468
3468
|
"Grid View?"
|
|
3469
3469
|
)))), /* @__PURE__ */ React__namespace.createElement("div", null, !!props.readonly && /* @__PURE__ */ React__namespace.createElement("div", { className: layoutClassName }, preview.map((b, i) => {
|
|
3470
|
-
return /* @__PURE__ */ React__namespace.createElement(Badge, __spreadProps$
|
|
3470
|
+
return /* @__PURE__ */ React__namespace.createElement(Badge, __spreadProps$8(__spreadValues$b({ key: i }, b), { compact: list, readonly: props.readonly }));
|
|
3471
3471
|
})), !props.readonly && /* @__PURE__ */ React__namespace.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__namespace.createElement("div", null, showSectionHeaders && /* @__PURE__ */ React__namespace.createElement("p", { className: "mb-3 text-md underline font-bold" }, "In Progress"), /* @__PURE__ */ React__namespace.createElement("div", { className: layoutClassName }, progress.map((b, i) => {
|
|
3472
|
-
return /* @__PURE__ */ React__namespace.createElement(Badge, __spreadProps$
|
|
3472
|
+
return /* @__PURE__ */ React__namespace.createElement(Badge, __spreadProps$8(__spreadValues$b({ key: i }, b), { compact: list }));
|
|
3473
3473
|
}))), (isWithoutFilters || "Completed" in filters && filters["Completed"].isActive) && collected.length > 0 && /* @__PURE__ */ React__namespace.createElement("div", null, showSectionHeaders && /* @__PURE__ */ React__namespace.createElement("p", { className: "mb-3 text-md underline font-bold" }, "Completed"), /* @__PURE__ */ React__namespace.createElement("div", { className: layoutClassName }, collected.map((b, i) => {
|
|
3474
|
-
return /* @__PURE__ */ React__namespace.createElement(Badge, __spreadProps$
|
|
3474
|
+
return /* @__PURE__ */ React__namespace.createElement(Badge, __spreadProps$8(__spreadValues$b({ key: i }, b), { compact: list }));
|
|
3475
3475
|
}))), (isWithoutFilters || "Available" in filters && filters["Available"].isActive) && available.length > 0 && /* @__PURE__ */ React__namespace.createElement("div", null, showSectionHeaders && /* @__PURE__ */ React__namespace.createElement("p", { className: "mb-3 text-md underline font-bold" }, "Available"), /* @__PURE__ */ React__namespace.createElement("div", { className: layoutClassName }, available.map((b, i) => {
|
|
3476
|
-
return /* @__PURE__ */ React__namespace.createElement(Badge, __spreadProps$
|
|
3476
|
+
return /* @__PURE__ */ React__namespace.createElement(Badge, __spreadProps$8(__spreadValues$b({ key: i }, b), { compact: list }));
|
|
3477
3477
|
}))), (isWithoutFilters || "Locked" in filters && filters["Locked"].isActive) && locked.length > 0 && /* @__PURE__ */ React__namespace.createElement("div", null, showSectionHeaders && /* @__PURE__ */ React__namespace.createElement("p", { className: "mb-3 text-md underline font-bold" }, "Locked"), /* @__PURE__ */ React__namespace.createElement("div", { className: layoutClassName }, locked.map((b, i) => {
|
|
3478
|
-
return /* @__PURE__ */ React__namespace.createElement(Badge, __spreadProps$
|
|
3478
|
+
return /* @__PURE__ */ React__namespace.createElement(Badge, __spreadProps$8(__spreadValues$b({ key: i }, b), { compact: list }));
|
|
3479
3479
|
}))))))))));
|
|
3480
3480
|
};
|
|
3481
3481
|
const getLayout$1 = (list) => {
|
|
@@ -3766,25 +3766,25 @@ const linkify = (text) => {
|
|
|
3766
3766
|
return replacedText;
|
|
3767
3767
|
};
|
|
3768
3768
|
|
|
3769
|
-
var __defProp$
|
|
3770
|
-
var __defProps$
|
|
3771
|
-
var __getOwnPropDescs$
|
|
3772
|
-
var __getOwnPropSymbols$
|
|
3773
|
-
var __hasOwnProp$
|
|
3774
|
-
var __propIsEnum$
|
|
3775
|
-
var __defNormalProp$
|
|
3776
|
-
var __spreadValues$
|
|
3769
|
+
var __defProp$a = Object.defineProperty;
|
|
3770
|
+
var __defProps$7 = Object.defineProperties;
|
|
3771
|
+
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
3772
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
3773
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
3774
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
3775
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3776
|
+
var __spreadValues$a = (a, b) => {
|
|
3777
3777
|
for (var prop in b || (b = {}))
|
|
3778
|
-
if (__hasOwnProp$
|
|
3779
|
-
__defNormalProp$
|
|
3780
|
-
if (__getOwnPropSymbols$
|
|
3781
|
-
for (var prop of __getOwnPropSymbols$
|
|
3782
|
-
if (__propIsEnum$
|
|
3783
|
-
__defNormalProp$
|
|
3778
|
+
if (__hasOwnProp$a.call(b, prop))
|
|
3779
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
3780
|
+
if (__getOwnPropSymbols$a)
|
|
3781
|
+
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
3782
|
+
if (__propIsEnum$a.call(b, prop))
|
|
3783
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
3784
3784
|
}
|
|
3785
3785
|
return a;
|
|
3786
3786
|
};
|
|
3787
|
-
var __spreadProps$
|
|
3787
|
+
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
3788
3788
|
const FormItem = (props) => {
|
|
3789
3789
|
const responses = props.responses || [];
|
|
3790
3790
|
const notEmpty = responses.length > 0 && responses[0].trim() !== "";
|
|
@@ -3811,28 +3811,28 @@ const FormItem = (props) => {
|
|
|
3811
3811
|
}
|
|
3812
3812
|
}, [isTextError]);
|
|
3813
3813
|
const marginBottom = props.format === "text" ? "-mb-7" : "";
|
|
3814
|
-
return /* @__PURE__ */ React.createElement("div", { className: `bg-white rounded-md p-5 shadow-sm grid grid-cols-1 gap-y-8 ${itemContainerError} ${marginBottom}` }, props.displayName && /* @__PURE__ */ React.createElement("div", { className: "flex gap-x-1" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-start gap-x-4" }, props.format === "question" && /* @__PURE__ */ React.createElement("div", { className: `${checkIconColor} w-5 h-5 mt-1` }, /* @__PURE__ */ React.createElement(Icon$1, { name: "positive" })), /* @__PURE__ */ React.createElement("div", { className: "grow max-w-lg" }, props.displayName && /* @__PURE__ */ React.createElement("p", { className: "flex-auto text-lg text-slate-600 font-semibold whitespace-pre-line" }, linkify(props.displayName)), props.description && /* @__PURE__ */ React.createElement("p", { className: "text-sm text-slate-400 whitespace-pre-line" }, linkify(props.description)))), props.required && /* @__PURE__ */ React.createElement("p", { className: "text-sm text-rose-600" }, "*")), !props.children && props.format !== "text" && /* @__PURE__ */ React.createElement("div", { className: `${contentMaxWidth} ml-1` }, /* @__PURE__ */ React.createElement(Switch, __spreadProps$
|
|
3814
|
+
return /* @__PURE__ */ React.createElement("div", { className: `bg-white rounded-md p-5 shadow-sm grid grid-cols-1 gap-y-8 ${itemContainerError} ${marginBottom}` }, props.displayName && /* @__PURE__ */ React.createElement("div", { className: "flex gap-x-1" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-start gap-x-4" }, props.format === "question" && /* @__PURE__ */ React.createElement("div", { className: `${checkIconColor} w-5 h-5 mt-1` }, /* @__PURE__ */ React.createElement(Icon$1, { name: "positive" })), /* @__PURE__ */ React.createElement("div", { className: "grow max-w-lg" }, props.displayName && /* @__PURE__ */ React.createElement("p", { className: "flex-auto text-lg text-slate-600 font-semibold whitespace-pre-line" }, linkify(props.displayName)), props.description && /* @__PURE__ */ React.createElement("p", { className: "text-sm text-slate-400 whitespace-pre-line" }, linkify(props.description)))), props.required && /* @__PURE__ */ React.createElement("p", { className: "text-sm text-rose-600" }, "*")), !props.children && props.format !== "text" && /* @__PURE__ */ React.createElement("div", { className: `${contentMaxWidth} ml-1` }, /* @__PURE__ */ React.createElement(Switch, __spreadProps$7(__spreadValues$a({}, props), { onTextBlur })), showError && /* @__PURE__ */ React.createElement("div", { className: "text-rose-300 flex items-center gap-x-2 mt-4" }, /* @__PURE__ */ React.createElement("div", { className: "w-4 h-4" }, /* @__PURE__ */ React.createElement(Icon$1, { name: "negative" })), /* @__PURE__ */ React.createElement("span", { className: "grow text-sm" }, "Must be a minimum of ", minimum, " characters."))), props.children);
|
|
3815
3815
|
};
|
|
3816
3816
|
const Switch = (props) => {
|
|
3817
3817
|
switch (true) {
|
|
3818
3818
|
case props.format === "embed":
|
|
3819
|
-
return /* @__PURE__ */ React.createElement(Embed, __spreadValues$
|
|
3819
|
+
return /* @__PURE__ */ React.createElement(Embed, __spreadValues$a({}, props));
|
|
3820
3820
|
case props.format === "image":
|
|
3821
|
-
return /* @__PURE__ */ React.createElement(Image, __spreadValues$
|
|
3821
|
+
return /* @__PURE__ */ React.createElement(Image, __spreadValues$a({}, props));
|
|
3822
3822
|
case props.questionType === "radio":
|
|
3823
|
-
return /* @__PURE__ */ React.createElement(RadioQuestion, __spreadValues$
|
|
3823
|
+
return /* @__PURE__ */ React.createElement(RadioQuestion, __spreadValues$a({}, props));
|
|
3824
3824
|
case props.questionType === "checkbox":
|
|
3825
|
-
return /* @__PURE__ */ React.createElement(CheckboxQuestion, __spreadValues$
|
|
3825
|
+
return /* @__PURE__ */ React.createElement(CheckboxQuestion, __spreadValues$a({}, props));
|
|
3826
3826
|
case props.questionType === "drop down":
|
|
3827
|
-
return /* @__PURE__ */ React.createElement(DropDownQuestion, __spreadValues$
|
|
3827
|
+
return /* @__PURE__ */ React.createElement(DropDownQuestion, __spreadValues$a({}, props));
|
|
3828
3828
|
case props.questionType === "file upload":
|
|
3829
|
-
return /* @__PURE__ */ React.createElement(FileUploadQuestion, __spreadValues$
|
|
3829
|
+
return /* @__PURE__ */ React.createElement(FileUploadQuestion, __spreadValues$a({}, props));
|
|
3830
3830
|
case props.questionType === "text":
|
|
3831
|
-
return /* @__PURE__ */ React.createElement(TextQuestion, __spreadValues$
|
|
3831
|
+
return /* @__PURE__ */ React.createElement(TextQuestion, __spreadValues$a({}, props));
|
|
3832
3832
|
case props.questionType === "date":
|
|
3833
|
-
return /* @__PURE__ */ React.createElement(DateQuestion, __spreadValues$
|
|
3833
|
+
return /* @__PURE__ */ React.createElement(DateQuestion, __spreadValues$a({}, props));
|
|
3834
3834
|
case props.questionType === "time":
|
|
3835
|
-
return /* @__PURE__ */ React.createElement(TimeQuestion, __spreadValues$
|
|
3835
|
+
return /* @__PURE__ */ React.createElement(TimeQuestion, __spreadValues$a({}, props));
|
|
3836
3836
|
default:
|
|
3837
3837
|
return null;
|
|
3838
3838
|
}
|
|
@@ -4189,25 +4189,25 @@ const FormSubmitDialog$1 = (props) => {
|
|
|
4189
4189
|
))));
|
|
4190
4190
|
};
|
|
4191
4191
|
|
|
4192
|
-
var __defProp$
|
|
4193
|
-
var __defProps$
|
|
4194
|
-
var __getOwnPropDescs$
|
|
4195
|
-
var __getOwnPropSymbols$
|
|
4196
|
-
var __hasOwnProp$
|
|
4197
|
-
var __propIsEnum$
|
|
4198
|
-
var __defNormalProp$
|
|
4199
|
-
var __spreadValues$
|
|
4192
|
+
var __defProp$9 = Object.defineProperty;
|
|
4193
|
+
var __defProps$6 = Object.defineProperties;
|
|
4194
|
+
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
4195
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
4196
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
4197
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
4198
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4199
|
+
var __spreadValues$9 = (a, b) => {
|
|
4200
4200
|
for (var prop in b || (b = {}))
|
|
4201
|
-
if (__hasOwnProp$
|
|
4202
|
-
__defNormalProp$
|
|
4203
|
-
if (__getOwnPropSymbols$
|
|
4204
|
-
for (var prop of __getOwnPropSymbols$
|
|
4205
|
-
if (__propIsEnum$
|
|
4206
|
-
__defNormalProp$
|
|
4201
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
4202
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
4203
|
+
if (__getOwnPropSymbols$9)
|
|
4204
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
4205
|
+
if (__propIsEnum$9.call(b, prop))
|
|
4206
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
4207
4207
|
}
|
|
4208
4208
|
return a;
|
|
4209
4209
|
};
|
|
4210
|
-
var __spreadProps$
|
|
4210
|
+
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
4211
4211
|
const AUTOSAVE_TIMEOUT = 30 * 1e3;
|
|
4212
4212
|
const MIN_REFLECTION_LENGTH = 0;
|
|
4213
4213
|
const autoSave = (run, func, callback) => {
|
|
@@ -4318,7 +4318,7 @@ const LearningForm = (props) => {
|
|
|
4318
4318
|
/* @__PURE__ */ React.createElement("div", { className: "w-3 h-3 min-w-3" }, /* @__PURE__ */ React.createElement(Icon$1, { name: "leftArrow" })),
|
|
4319
4319
|
/* @__PURE__ */ React.createElement("span", { className: "text-md" }, "Back")
|
|
4320
4320
|
), !!props.displayName && /* @__PURE__ */ React.createElement("h2", { className: "h-max font-semibold text-2xl" }, props.displayName), !!props.description && /* @__PURE__ */ React.createElement("p", { className: "h-max max-h-[14rem] overflow-y-auto whitespace-pre-line" }, props.description), !!props.eta && /* @__PURE__ */ React.createElement("p", { className: "text-sm h-max font-semibold" }, "Estimated Completion Time: ", props.eta)), /* @__PURE__ */ React.createElement("img", { className: "grow h-full max-h-[30rem] w-full object-cover", alt: props.displayName, src: props.imageURL })), /* @__PURE__ */ React.createElement("form", { className: "w-full max-w-[64rem] m-auto grid grid-cols-1 gap-y-12", onSubmit }, items.map((item) => {
|
|
4321
|
-
return /* @__PURE__ */ React.createElement(FormItem, __spreadProps$
|
|
4321
|
+
return /* @__PURE__ */ React.createElement(FormItem, __spreadProps$6(__spreadValues$9({ key: item.itemId }, item), { minText: 0, disabled: !!props.preview }));
|
|
4322
4322
|
}), /* @__PURE__ */ React.createElement(
|
|
4323
4323
|
FormItem,
|
|
4324
4324
|
{
|
|
@@ -4397,19 +4397,19 @@ const Rating = (props) => {
|
|
|
4397
4397
|
)));
|
|
4398
4398
|
};
|
|
4399
4399
|
|
|
4400
|
-
var __defProp$
|
|
4401
|
-
var __getOwnPropSymbols$
|
|
4402
|
-
var __hasOwnProp$
|
|
4403
|
-
var __propIsEnum$
|
|
4404
|
-
var __defNormalProp$
|
|
4405
|
-
var __spreadValues$
|
|
4400
|
+
var __defProp$8 = Object.defineProperty;
|
|
4401
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
4402
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
4403
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
4404
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4405
|
+
var __spreadValues$8 = (a, b) => {
|
|
4406
4406
|
for (var prop in b || (b = {}))
|
|
4407
|
-
if (__hasOwnProp$
|
|
4408
|
-
__defNormalProp$
|
|
4409
|
-
if (__getOwnPropSymbols$
|
|
4410
|
-
for (var prop of __getOwnPropSymbols$
|
|
4411
|
-
if (__propIsEnum$
|
|
4412
|
-
__defNormalProp$
|
|
4407
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
4408
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
4409
|
+
if (__getOwnPropSymbols$8)
|
|
4410
|
+
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
4411
|
+
if (__propIsEnum$8.call(b, prop))
|
|
4412
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
4413
4413
|
}
|
|
4414
4414
|
return a;
|
|
4415
4415
|
};
|
|
@@ -4418,7 +4418,7 @@ const NavLink = (props) => {
|
|
|
4418
4418
|
const config = defaultConfig();
|
|
4419
4419
|
withMenu(config, props.menu);
|
|
4420
4420
|
withName(config, props.name);
|
|
4421
|
-
return /* @__PURE__ */ React.createElement(Button, __spreadValues$
|
|
4421
|
+
return /* @__PURE__ */ React.createElement(Button, __spreadValues$8({ disabled: props.disabled, active: props.active, onClick }, config));
|
|
4422
4422
|
};
|
|
4423
4423
|
const defaultConfig = () => {
|
|
4424
4424
|
return {};
|
|
@@ -4493,25 +4493,25 @@ const withName = (config, name) => {
|
|
|
4493
4493
|
}
|
|
4494
4494
|
};
|
|
4495
4495
|
|
|
4496
|
-
var __defProp$
|
|
4497
|
-
var __defProps$
|
|
4498
|
-
var __getOwnPropDescs$
|
|
4499
|
-
var __getOwnPropSymbols$
|
|
4500
|
-
var __hasOwnProp$
|
|
4501
|
-
var __propIsEnum$
|
|
4502
|
-
var __defNormalProp$
|
|
4503
|
-
var __spreadValues$
|
|
4496
|
+
var __defProp$7 = Object.defineProperty;
|
|
4497
|
+
var __defProps$5 = Object.defineProperties;
|
|
4498
|
+
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
4499
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
4500
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
4501
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
4502
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4503
|
+
var __spreadValues$7 = (a, b) => {
|
|
4504
4504
|
for (var prop in b || (b = {}))
|
|
4505
|
-
if (__hasOwnProp$
|
|
4506
|
-
__defNormalProp$
|
|
4507
|
-
if (__getOwnPropSymbols$
|
|
4508
|
-
for (var prop of __getOwnPropSymbols$
|
|
4509
|
-
if (__propIsEnum$
|
|
4510
|
-
__defNormalProp$
|
|
4505
|
+
if (__hasOwnProp$7.call(b, prop))
|
|
4506
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
4507
|
+
if (__getOwnPropSymbols$7)
|
|
4508
|
+
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
4509
|
+
if (__propIsEnum$7.call(b, prop))
|
|
4510
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
4511
4511
|
}
|
|
4512
4512
|
return a;
|
|
4513
4513
|
};
|
|
4514
|
-
var __spreadProps$
|
|
4514
|
+
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
4515
4515
|
const NavBar = (props) => {
|
|
4516
4516
|
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();
|
|
4517
4517
|
const [secondary, setSecondary] = React.useState(false);
|
|
@@ -4529,7 +4529,7 @@ const NavBar = (props) => {
|
|
|
4529
4529
|
return null;
|
|
4530
4530
|
})), /* @__PURE__ */ React.createElement("div", { className: "inline-block md:hidden" }, /* @__PURE__ */ React.createElement(NavLink, { onClick: () => setSecondary(!secondary), name: menuIcon })), /* @__PURE__ */ React.createElement("div", { className: secondaryClassName }, React.Children.map(props.children, (Link) => {
|
|
4531
4531
|
if (Link && Link.props.name !== "home") {
|
|
4532
|
-
return /* @__PURE__ */ React.createElement("div", { className: "relative" }, /* @__PURE__ */ React.createElement(NavLink, __spreadProps$
|
|
4532
|
+
return /* @__PURE__ */ React.createElement("div", { className: "relative" }, /* @__PURE__ */ React.createElement(NavLink, __spreadProps$5(__spreadValues$7({}, Link.props), { menu: true })));
|
|
4533
4533
|
}
|
|
4534
4534
|
return null;
|
|
4535
4535
|
}))));
|
|
@@ -4626,28 +4626,28 @@ const LegalAgreement = (props) => {
|
|
|
4626
4626
|
)));
|
|
4627
4627
|
};
|
|
4628
4628
|
|
|
4629
|
-
var __defProp$
|
|
4630
|
-
var __defProps$
|
|
4631
|
-
var __getOwnPropDescs$
|
|
4632
|
-
var __getOwnPropSymbols$
|
|
4633
|
-
var __hasOwnProp$
|
|
4634
|
-
var __propIsEnum$
|
|
4635
|
-
var __defNormalProp$
|
|
4636
|
-
var __spreadValues$
|
|
4629
|
+
var __defProp$6 = Object.defineProperty;
|
|
4630
|
+
var __defProps$4 = Object.defineProperties;
|
|
4631
|
+
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
4632
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
4633
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
4634
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
4635
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4636
|
+
var __spreadValues$6 = (a, b) => {
|
|
4637
4637
|
for (var prop in b || (b = {}))
|
|
4638
|
-
if (__hasOwnProp$
|
|
4639
|
-
__defNormalProp$
|
|
4640
|
-
if (__getOwnPropSymbols$
|
|
4641
|
-
for (var prop of __getOwnPropSymbols$
|
|
4642
|
-
if (__propIsEnum$
|
|
4643
|
-
__defNormalProp$
|
|
4638
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
4639
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
4640
|
+
if (__getOwnPropSymbols$6)
|
|
4641
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
4642
|
+
if (__propIsEnum$6.call(b, prop))
|
|
4643
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
4644
4644
|
}
|
|
4645
4645
|
return a;
|
|
4646
4646
|
};
|
|
4647
|
-
var __spreadProps$
|
|
4647
|
+
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
4648
4648
|
const CommunitySearch = (props) => {
|
|
4649
4649
|
const [accessCode, setAccessCode] = React.useState("");
|
|
4650
|
-
return /* @__PURE__ */ React.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.createElement("div", { className: "text-slate-600" }, /* @__PURE__ */ React.createElement("p", { className: "font-bold text-2xl" }, "Which is your community?"), /* @__PURE__ */ React.createElement("p", { className: "text-sm" }, "Pick your community.")), /* @__PURE__ */ React.createElement(Search, __spreadProps$
|
|
4650
|
+
return /* @__PURE__ */ React.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.createElement("div", { className: "text-slate-600" }, /* @__PURE__ */ React.createElement("p", { className: "font-bold text-2xl" }, "Which is your community?"), /* @__PURE__ */ React.createElement("p", { className: "text-sm" }, "Pick your community.")), /* @__PURE__ */ React.createElement(Search, __spreadProps$4(__spreadValues$6({}, props), { autofocus: !accessCode, placeholder: props.name })), !!props.name && /* @__PURE__ */ React.createElement("div", { className: "text-slate-600 grid-cols-1 gap-2" }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("span", { className: "text-sm" }, "Enter the access code for"), /* @__PURE__ */ React.createElement("span", { className: "ml-1 font-semibold text-sm" }, props.name), /* @__PURE__ */ React.createElement("span", { className: "text-sm" }, ".")), /* @__PURE__ */ React.createElement("div", { className: "mt-2 content-center grid grid-cols-3 gap-x-2" }, /* @__PURE__ */ React.createElement(
|
|
4651
4651
|
"input",
|
|
4652
4652
|
{
|
|
4653
4653
|
disabled: props.disabled,
|
|
@@ -4782,27 +4782,27 @@ const Welcome = (props) => {
|
|
|
4782
4782
|
)));
|
|
4783
4783
|
};
|
|
4784
4784
|
|
|
4785
|
-
var __defProp$
|
|
4786
|
-
var __defProps$
|
|
4787
|
-
var __getOwnPropDescs$
|
|
4788
|
-
var __getOwnPropSymbols$
|
|
4789
|
-
var __hasOwnProp$
|
|
4790
|
-
var __propIsEnum$
|
|
4791
|
-
var __defNormalProp$
|
|
4792
|
-
var __spreadValues$
|
|
4785
|
+
var __defProp$5 = Object.defineProperty;
|
|
4786
|
+
var __defProps$3 = Object.defineProperties;
|
|
4787
|
+
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
4788
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
4789
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
4790
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
4791
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4792
|
+
var __spreadValues$5 = (a, b) => {
|
|
4793
4793
|
for (var prop in b || (b = {}))
|
|
4794
|
-
if (__hasOwnProp$
|
|
4795
|
-
__defNormalProp$
|
|
4796
|
-
if (__getOwnPropSymbols$
|
|
4797
|
-
for (var prop of __getOwnPropSymbols$
|
|
4798
|
-
if (__propIsEnum$
|
|
4799
|
-
__defNormalProp$
|
|
4794
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
4795
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
4796
|
+
if (__getOwnPropSymbols$5)
|
|
4797
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
4798
|
+
if (__propIsEnum$5.call(b, prop))
|
|
4799
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
4800
4800
|
}
|
|
4801
4801
|
return a;
|
|
4802
4802
|
};
|
|
4803
|
-
var __spreadProps$
|
|
4803
|
+
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
4804
4804
|
const Onboarding = (props) => {
|
|
4805
|
-
return /* @__PURE__ */ React.createElement(Modal, { stage: true, isLoading: props.isLoading, inline: true, plain: true, visible: true }, /* @__PURE__ */ React.createElement(Delegate, __spreadValues$
|
|
4805
|
+
return /* @__PURE__ */ React.createElement(Modal, { stage: true, isLoading: props.isLoading, inline: true, plain: true, visible: true }, /* @__PURE__ */ React.createElement(Delegate, __spreadValues$5({}, props)));
|
|
4806
4806
|
};
|
|
4807
4807
|
const Delegate = (props) => {
|
|
4808
4808
|
const [agreed, setAgreed] = React.useState(!!props.hasOrganization || props.search !== null);
|
|
@@ -4816,7 +4816,7 @@ const Delegate = (props) => {
|
|
|
4816
4816
|
if (!props.hasOrganization) {
|
|
4817
4817
|
return /* @__PURE__ */ React.createElement(
|
|
4818
4818
|
CommunitySearch,
|
|
4819
|
-
__spreadProps$
|
|
4819
|
+
__spreadProps$3(__spreadValues$5({}, organization), {
|
|
4820
4820
|
open: organizationOpen,
|
|
4821
4821
|
value: props.search,
|
|
4822
4822
|
results: props.organizations && props.organizations.map((organization2) => {
|
|
@@ -5132,19 +5132,19 @@ const ProfileWidget = (props) => {
|
|
|
5132
5132
|
), props.online && /* @__PURE__ */ React.createElement("span", { className: "absolute h-3.5 w-3.5 lg:w-4 lg:h-4 top-0 right-0 lg:top-2 lg:right-3 rounded-full bg-green-500 border-4 border-white" })), /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-1 content-center align-middle" }, /* @__PURE__ */ React.createElement("div", { className: "grid lg:gap-1" }, /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-1" }, props.tenantName && /* @__PURE__ */ React.createElement("span", { className: "text-slate-300 text-sm" }, "@", props.tenantName), /* @__PURE__ */ React.createElement("h4", { className: "inline-block font-semibold capitalize text-2xl lg:text-4xl text-slate-600" }, props.givenName, " ", props.familyName)), props.createdAt && /* @__PURE__ */ React.createElement("p", { className: "text-sm text-slate-300" }, "Member since ", new Date(props.createdAt).getFullYear())))))));
|
|
5133
5133
|
};
|
|
5134
5134
|
|
|
5135
|
-
var __defProp$
|
|
5136
|
-
var __getOwnPropSymbols$
|
|
5137
|
-
var __hasOwnProp$
|
|
5138
|
-
var __propIsEnum$
|
|
5139
|
-
var __defNormalProp$
|
|
5140
|
-
var __spreadValues$
|
|
5135
|
+
var __defProp$4 = Object.defineProperty;
|
|
5136
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
5137
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
5138
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
5139
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5140
|
+
var __spreadValues$4 = (a, b) => {
|
|
5141
5141
|
for (var prop in b || (b = {}))
|
|
5142
|
-
if (__hasOwnProp$
|
|
5143
|
-
__defNormalProp$
|
|
5144
|
-
if (__getOwnPropSymbols$
|
|
5145
|
-
for (var prop of __getOwnPropSymbols$
|
|
5146
|
-
if (__propIsEnum$
|
|
5147
|
-
__defNormalProp$
|
|
5142
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
5143
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
5144
|
+
if (__getOwnPropSymbols$4)
|
|
5145
|
+
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
5146
|
+
if (__propIsEnum$4.call(b, prop))
|
|
5147
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
5148
5148
|
}
|
|
5149
5149
|
return a;
|
|
5150
5150
|
};
|
|
@@ -5152,9 +5152,9 @@ const FormInput = (props) => {
|
|
|
5152
5152
|
return /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-1 gap-y-2" }, props.headline && /* @__PURE__ */ React.createElement("div", { className: "flex gap-x-1" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-start gap-x-4" }, /* @__PURE__ */ React.createElement("div", { className: "grow" }, props.headline && /* @__PURE__ */ React.createElement("p", { className: "text-sm text-slate-600 font-semibold" }, props.headline), props.summary && /* @__PURE__ */ React.createElement("p", { className: "text-xs text-slate-500" }, props.summary))), !props.readonly && props.required && /* @__PURE__ */ React.createElement("p", { className: "text-sm text-rose-600" }, "*")), /* @__PURE__ */ React.createElement("div", null, (() => {
|
|
5153
5153
|
switch (props.type) {
|
|
5154
5154
|
case "dropdown":
|
|
5155
|
-
return /* @__PURE__ */ React.createElement(DropDownInput, __spreadValues$
|
|
5155
|
+
return /* @__PURE__ */ React.createElement(DropDownInput, __spreadValues$4({}, props));
|
|
5156
5156
|
default:
|
|
5157
|
-
return /* @__PURE__ */ React.createElement(Input, __spreadValues$
|
|
5157
|
+
return /* @__PURE__ */ React.createElement(Input, __spreadValues$4({}, props));
|
|
5158
5158
|
}
|
|
5159
5159
|
})()));
|
|
5160
5160
|
};
|
|
@@ -5262,32 +5262,32 @@ const FormSubmitDialog = (props) => {
|
|
|
5262
5262
|
))));
|
|
5263
5263
|
};
|
|
5264
5264
|
|
|
5265
|
-
var __defProp$
|
|
5266
|
-
var __defProps$
|
|
5267
|
-
var __getOwnPropDescs$
|
|
5268
|
-
var __getOwnPropSymbols$
|
|
5269
|
-
var __hasOwnProp$
|
|
5270
|
-
var __propIsEnum$
|
|
5271
|
-
var __defNormalProp$
|
|
5272
|
-
var __spreadValues$
|
|
5265
|
+
var __defProp$3 = Object.defineProperty;
|
|
5266
|
+
var __defProps$2 = Object.defineProperties;
|
|
5267
|
+
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
5268
|
+
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
5269
|
+
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
5270
|
+
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
5271
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5272
|
+
var __spreadValues$3 = (a, b) => {
|
|
5273
5273
|
for (var prop in b || (b = {}))
|
|
5274
|
-
if (__hasOwnProp$
|
|
5275
|
-
__defNormalProp$
|
|
5276
|
-
if (__getOwnPropSymbols$
|
|
5277
|
-
for (var prop of __getOwnPropSymbols$
|
|
5278
|
-
if (__propIsEnum$
|
|
5279
|
-
__defNormalProp$
|
|
5274
|
+
if (__hasOwnProp$3.call(b, prop))
|
|
5275
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
5276
|
+
if (__getOwnPropSymbols$3)
|
|
5277
|
+
for (var prop of __getOwnPropSymbols$3(b)) {
|
|
5278
|
+
if (__propIsEnum$3.call(b, prop))
|
|
5279
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
5280
5280
|
}
|
|
5281
5281
|
return a;
|
|
5282
5282
|
};
|
|
5283
|
-
var __spreadProps$
|
|
5283
|
+
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
5284
5284
|
const Form = (props) => {
|
|
5285
5285
|
const [showExitDialogue, setShowExitDialogue] = React.useState(!!props.showExitDialogue);
|
|
5286
5286
|
const [showSubmitDialogue, setShowSubmitDialogue] = React.useState(!!props.showSubmitDialogue);
|
|
5287
5287
|
const [responses, setResponses] = React.useState({});
|
|
5288
5288
|
const [inReview, setInReview] = React.useState(!!props.inReview);
|
|
5289
5289
|
const setResponse = (key, value) => {
|
|
5290
|
-
setResponses(__spreadProps$
|
|
5290
|
+
setResponses(__spreadProps$2(__spreadValues$3({}, responses), { [key]: value }));
|
|
5291
5291
|
};
|
|
5292
5292
|
const onSubmit = (e) => {
|
|
5293
5293
|
e.preventDefault();
|
|
@@ -5406,25 +5406,25 @@ const Form = (props) => {
|
|
|
5406
5406
|
)))))))), showExitDialogue && /* @__PURE__ */ React.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.createElement("div", { className: "flex md:w-max h-screen gap-x-2 justify-items-center content-center m-auto" }, /* @__PURE__ */ React.createElement(FormExitDialog, { onYes: props.onClose, onNo: () => setShowExitDialogue(false) }))), showSubmitDialogue && /* @__PURE__ */ React.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.createElement("div", { className: "flex md:w-max h-screen gap-x-2 justify-items-center content-center m-auto" }, /* @__PURE__ */ React.createElement(FormSubmitDialog, { onGoBack: () => setShowSubmitDialogue(false), onContinue: props.onClose }))));
|
|
5407
5407
|
};
|
|
5408
5408
|
|
|
5409
|
-
var __defProp$
|
|
5410
|
-
var __defProps$
|
|
5411
|
-
var __getOwnPropDescs$
|
|
5412
|
-
var __getOwnPropSymbols$
|
|
5413
|
-
var __hasOwnProp$
|
|
5414
|
-
var __propIsEnum$
|
|
5415
|
-
var __defNormalProp$
|
|
5416
|
-
var __spreadValues$
|
|
5409
|
+
var __defProp$2 = Object.defineProperty;
|
|
5410
|
+
var __defProps$1 = Object.defineProperties;
|
|
5411
|
+
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
5412
|
+
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
5413
|
+
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
5414
|
+
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
5415
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5416
|
+
var __spreadValues$2 = (a, b) => {
|
|
5417
5417
|
for (var prop in b || (b = {}))
|
|
5418
|
-
if (__hasOwnProp$
|
|
5419
|
-
__defNormalProp$
|
|
5420
|
-
if (__getOwnPropSymbols$
|
|
5421
|
-
for (var prop of __getOwnPropSymbols$
|
|
5422
|
-
if (__propIsEnum$
|
|
5423
|
-
__defNormalProp$
|
|
5418
|
+
if (__hasOwnProp$2.call(b, prop))
|
|
5419
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
5420
|
+
if (__getOwnPropSymbols$2)
|
|
5421
|
+
for (var prop of __getOwnPropSymbols$2(b)) {
|
|
5422
|
+
if (__propIsEnum$2.call(b, prop))
|
|
5423
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
5424
5424
|
}
|
|
5425
5425
|
return a;
|
|
5426
5426
|
};
|
|
5427
|
-
var __spreadProps$
|
|
5427
|
+
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
5428
5428
|
const LogServiceButton = (props) => {
|
|
5429
5429
|
const [isOpen, setIsOpen] = React.useState(!!props.isOpen);
|
|
5430
5430
|
const text = props.text || "Log Service";
|
|
@@ -5455,7 +5455,7 @@ const LogServiceButton = (props) => {
|
|
|
5455
5455
|
size: "full:md",
|
|
5456
5456
|
onClick: onOpen
|
|
5457
5457
|
}
|
|
5458
|
-
), isOpen && /* @__PURE__ */ React.createElement(Form, __spreadProps$
|
|
5458
|
+
), isOpen && /* @__PURE__ */ React.createElement(Form, __spreadProps$1(__spreadValues$2({ onSubmit: props.onSubmit }, props.form), { onClose })));
|
|
5459
5459
|
};
|
|
5460
5460
|
|
|
5461
5461
|
const Stopwatch = (props) => {
|
|
@@ -5574,74 +5574,45 @@ const withHeight = (config, height) => {
|
|
|
5574
5574
|
}
|
|
5575
5575
|
};
|
|
5576
5576
|
|
|
5577
|
-
var __defProp$2 = Object.defineProperty;
|
|
5578
|
-
var __defProps$1 = Object.defineProperties;
|
|
5579
|
-
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
5580
|
-
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
5581
|
-
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
5582
|
-
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
5583
|
-
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5584
|
-
var __spreadValues$2 = (a, b) => {
|
|
5585
|
-
for (var prop in b || (b = {}))
|
|
5586
|
-
if (__hasOwnProp$2.call(b, prop))
|
|
5587
|
-
__defNormalProp$2(a, prop, b[prop]);
|
|
5588
|
-
if (__getOwnPropSymbols$2)
|
|
5589
|
-
for (var prop of __getOwnPropSymbols$2(b)) {
|
|
5590
|
-
if (__propIsEnum$2.call(b, prop))
|
|
5591
|
-
__defNormalProp$2(a, prop, b[prop]);
|
|
5592
|
-
}
|
|
5593
|
-
return a;
|
|
5594
|
-
};
|
|
5595
|
-
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
5596
5577
|
const PathwayCard = (props) => {
|
|
5597
5578
|
var _a, _b, _c, _d;
|
|
5598
5579
|
const badges = props.badges || [];
|
|
5599
5580
|
const completedCount = badges.filter((b) => b.completedAt).length;
|
|
5600
5581
|
const target = props.target || badges.length;
|
|
5601
5582
|
const categoryTargets = (_a = props.criteria) != null ? _a : {};
|
|
5602
|
-
const categoryIds = Object.keys(categoryTargets);
|
|
5603
5583
|
const points = (_b = props.points) != null ? _b : {};
|
|
5604
|
-
const
|
|
5584
|
+
const categoryIds = React__namespace.useMemo(
|
|
5605
5585
|
() => {
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5586
|
+
var _a2;
|
|
5587
|
+
return Object.keys((_a2 = props.criteria) != null ? _a2 : {});
|
|
5588
|
+
},
|
|
5589
|
+
[props.criteria]
|
|
5590
|
+
);
|
|
5591
|
+
const [activeFilters, setActiveFilters] = React__namespace.useState(
|
|
5592
|
+
() => /* @__PURE__ */ new Set()
|
|
5593
|
+
);
|
|
5594
|
+
const filteredBadges = activeFilters.size === 0 ? badges : badges.filter(
|
|
5595
|
+
(b) => {
|
|
5596
|
+
var _a2;
|
|
5597
|
+
return (_a2 = b.categories) == null ? void 0 : _a2.some((c) => activeFilters.has(c));
|
|
5614
5598
|
}
|
|
5615
5599
|
);
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
});
|
|
5626
|
-
return next;
|
|
5627
|
-
});
|
|
5628
|
-
}, [categoryIds]);
|
|
5600
|
+
const filterClassName = "inline-block px-4 py-2 bg-gray-600 text-white rounded-full cursor-pointer text-sm";
|
|
5601
|
+
console.log("ACTIVE FILTERS:", Array.from(activeFilters));
|
|
5602
|
+
console.log("BADGE SAMPLE:", badges.slice(0, 5).map((b) => b.categories));
|
|
5603
|
+
console.log("MATCH TEST:", badges.slice(0, 5).map(
|
|
5604
|
+
(b) => {
|
|
5605
|
+
var _a2;
|
|
5606
|
+
return (_a2 = b.categories) == null ? void 0 : _a2.map((c) => activeFilters.has(c));
|
|
5607
|
+
}
|
|
5608
|
+
));
|
|
5629
5609
|
const toggleFilter = (id) => {
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
})
|
|
5635
|
-
});
|
|
5610
|
+
setActiveFilters((prev) => {
|
|
5611
|
+
const next = new Set(prev);
|
|
5612
|
+
next.has(id) ? next.delete(id) : next.add(id);
|
|
5613
|
+
return next;
|
|
5636
5614
|
});
|
|
5637
5615
|
};
|
|
5638
|
-
const activeFilters = Object.values(filters).filter((f) => f.isActive);
|
|
5639
|
-
const filteredBadges = activeFilters.length === 0 ? badges : badges.filter(
|
|
5640
|
-
(b) => activeFilters.some(
|
|
5641
|
-
(f) => (b.categories || []).includes(f.id)
|
|
5642
|
-
)
|
|
5643
|
-
);
|
|
5644
|
-
const filterClassName = "inline-block px-4 py-2 bg-gray-600 text-white rounded-full cursor-pointer text-sm";
|
|
5645
5616
|
return /* @__PURE__ */ React__namespace.createElement(Card, { onClose: props.onClose }, /* @__PURE__ */ React__namespace.createElement("div", { className: "pb-5 text-zinc-600" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "pb-5 px-5 flex gap-x-2" }, /* @__PURE__ */ React__namespace.createElement(
|
|
5646
5617
|
BadgeEmblem,
|
|
5647
5618
|
{
|
|
@@ -5657,9 +5628,9 @@ const PathwayCard = (props) => {
|
|
|
5657
5628
|
height: "sm"
|
|
5658
5629
|
}
|
|
5659
5630
|
), /* @__PURE__ */ React__namespace.createElement("div", { className: "flex flex-wrap gap-2 mt-3" }, categoryIds.map((id) => {
|
|
5660
|
-
var _a2, _b2
|
|
5661
|
-
const isActive = (
|
|
5662
|
-
const label = (
|
|
5631
|
+
var _a2, _b2;
|
|
5632
|
+
const isActive = activeFilters.has(id);
|
|
5633
|
+
const label = (_b2 = (_a2 = props.categoryNames) == null ? void 0 : _a2[id]) != null ? _b2 : id;
|
|
5663
5634
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
5664
5635
|
"div",
|
|
5665
5636
|
{
|