codeforlife 2.11.5 → 2.11.7
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/Countdown-CL7dyZrl.cjs +2 -0
- package/dist/{Countdown-BtUbr1J_.cjs.map → Countdown-CL7dyZrl.cjs.map} +1 -1
- package/dist/Countdown-snRYiLrs.js +28 -0
- package/dist/{Countdown-DhjAmB0u.js.map → Countdown-snRYiLrs.js.map} +1 -1
- package/dist/Image-B_6DmnVe.cjs +2 -0
- package/dist/{Image-CgRVUblT.cjs.map → Image-B_6DmnVe.cjs.map} +1 -1
- package/dist/{Image-DTOu0h-V.js → Image-mkNhOo5p.js} +3 -3
- package/dist/{Image-DTOu0h-V.js.map → Image-mkNhOo5p.js.map} +1 -1
- package/dist/LinkButton-BQMG96aQ.cjs +2 -0
- package/dist/{LinkButton-Kw2brLTK.cjs.map → LinkButton-BQMG96aQ.cjs.map} +1 -1
- package/dist/LinkButton-CRDs950E.js +12 -0
- package/dist/{LinkButton-sQ5jgHnX.js.map → LinkButton-CRDs950E.js.map} +1 -1
- package/dist/Navigate-Ch0ljYa-.cjs +2 -0
- package/dist/{Navigate-CrMwdIBB.cjs.map → Navigate-Ch0ljYa-.cjs.map} +1 -1
- package/dist/Navigate-Zt9DRJve.js +25 -0
- package/dist/{Navigate-ClPcw87e.js.map → Navigate-Zt9DRJve.js.map} +1 -1
- package/dist/api/endpoints/index.cjs.js +1 -1
- package/dist/api/endpoints/index.cjs.js.map +1 -1
- package/dist/api/endpoints/index.es.js +29 -28
- package/dist/api/endpoints/index.es.js.map +1 -1
- package/dist/api/index.cjs.js +1 -3
- package/dist/api/index.cjs.js.map +1 -1
- package/dist/api/index.es.js +33 -515
- package/dist/api/index.es.js.map +1 -1
- package/dist/api-DIgp_6Vr.cjs +2 -0
- package/dist/{api-9cnyvZj7.cjs.map → api-DIgp_6Vr.cjs.map} +1 -1
- package/dist/api-G8CV5bUa.cjs +2 -0
- package/dist/{api-CAH3GT1O.cjs.map → api-G8CV5bUa.cjs.map} +1 -1
- package/dist/{api-BFYu8ZvQ.js → api-uh8UKwsU.js} +25 -25
- package/dist/{api-BFYu8ZvQ.js.map → api-uh8UKwsU.js.map} +1 -1
- package/dist/auth-B6anBtxF.js +238 -0
- package/dist/{auth-Bb8WkZGN.js.map → auth-B6anBtxF.js.map} +1 -1
- package/dist/auth-C2OUeLmQ.cjs +2 -0
- package/dist/{auth-BwpsrTko.cjs.map → auth-C2OUeLmQ.cjs.map} +1 -1
- package/dist/components/form/index.cjs.js +1 -1
- package/dist/components/form/index.es.js +1 -1
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.cjs.js.map +1 -1
- package/dist/components/index.es.js +118 -118
- package/dist/components/index.es.js.map +1 -1
- package/dist/components/page/index.cjs.js +1 -1
- package/dist/components/page/index.es.js +1 -1
- package/dist/components/router/index.cjs.js +1 -1
- package/dist/components/router/index.es.js +2 -2
- package/dist/components/table/index.cjs.js +1 -1
- package/dist/components/table/index.es.js +1 -1
- package/dist/features/index.cjs.js +1 -1
- package/dist/features/index.cjs.js.map +1 -1
- package/dist/features/index.es.js +24 -22
- package/dist/features/index.es.js.map +1 -1
- package/dist/general-BPbbmkeX.cjs +2 -0
- package/dist/{general-Bo6JGvKB.cjs.map → general-BPbbmkeX.cjs.map} +1 -1
- package/dist/hooks/index.cjs.js +1 -1
- package/dist/hooks/index.es.js +1 -1
- package/dist/index-B3QkMBQe.cjs +2 -0
- package/dist/{index-5C9hpxRF.cjs.map → index-B3QkMBQe.cjs.map} +1 -1
- package/dist/index-BIL7PoEV.js +622 -0
- package/dist/index-BIL7PoEV.js.map +1 -0
- package/dist/index-C08WO83n.js +237 -0
- package/dist/{index-hdS8RgRc.js.map → index-C08WO83n.js.map} +1 -1
- package/dist/{index-CHboZsxD.js → index-CDxf6gMv.js} +92 -92
- package/dist/{index-CHboZsxD.js.map → index-CDxf6gMv.js.map} +1 -1
- package/dist/index-D2B9uIE4.cjs +2 -0
- package/dist/{index-B89FjK7v.cjs.map → index-D2B9uIE4.cjs.map} +1 -1
- package/dist/index-Dadidnct.cjs +2 -0
- package/dist/index-Dadidnct.cjs.map +1 -0
- package/dist/index-IXGAdLKG.js +30 -0
- package/dist/{index-B3e_XaVG.js.map → index-IXGAdLKG.js.map} +1 -1
- package/dist/index-JY2Et3RQ.cjs +2 -0
- package/dist/{index-CwC9mpb3.cjs.map → index-JY2Et3RQ.cjs.map} +1 -1
- package/dist/{schemas-BMQZbhti.js → schemas-UIk-meAN.js} +2 -2
- package/dist/{schemas-BMQZbhti.js.map → schemas-UIk-meAN.js.map} +1 -1
- package/dist/schemas-hIW9-H6-.cjs +2 -0
- package/dist/{schemas-DXX4rh8i.cjs.map → schemas-hIW9-H6-.cjs.map} +1 -1
- package/dist/server/App.cjs.js +1 -1
- package/dist/server/App.cjs.js.map +1 -1
- package/dist/server/App.es.js +11 -11
- package/dist/server/App.es.js.map +1 -1
- package/dist/server/entry.cjs.js +1 -1
- package/dist/server/entry.cjs.js.map +1 -1
- package/dist/server/entry.es.js +17 -17
- package/dist/server/entry.es.js.map +1 -1
- package/dist/{session-D312kYKk.js → session-COyN01K0.js} +11 -10
- package/dist/{session-D312kYKk.js.map → session-COyN01K0.js.map} +1 -1
- package/dist/session-eOp0H-EC.cjs +2 -0
- package/dist/{session-CacrgFSv.cjs.map → session-eOp0H-EC.cjs.map} +1 -1
- package/dist/theme/components/index.cjs.js +1 -1
- package/dist/theme/components/index.es.js +1 -1
- package/dist/theme/index.cjs.js +1 -1
- package/dist/theme/index.cjs.js.map +1 -1
- package/dist/theme/index.es.js +49 -49
- package/dist/theme/index.es.js.map +1 -1
- package/dist/{urls-CGZI0f1w.cjs → urls-2gheISSO.cjs} +2 -2
- package/dist/{urls-CGZI0f1w.cjs.map → urls-2gheISSO.cjs.map} +1 -1
- package/dist/{urls-DP4a8kxP.js → urls-BG788CnL.js} +2 -2
- package/dist/{urls-DP4a8kxP.js.map → urls-BG788CnL.js.map} +1 -1
- package/dist/utils/api.cjs.js +1 -1
- package/dist/utils/api.es.js +2 -2
- package/dist/utils/router.cjs.js +1 -1
- package/dist/utils/router.cjs.js.map +1 -1
- package/dist/utils/router.es.js +2 -2
- package/dist/utils/store.cjs.js +1 -1
- package/dist/utils/store.cjs.js.map +1 -1
- package/dist/utils/store.es.js +6 -6
- package/dist/utils/test.cjs.js +1 -1
- package/dist/utils/test.cjs.js.map +1 -1
- package/dist/utils/test.es.js +9 -9
- package/dist/utils/test.es.js.map +1 -1
- package/dist/utils/theme.cjs.js +1 -1
- package/dist/utils/theme.es.js +2 -2
- package/package.json +1 -1
- package/dist/Countdown-BtUbr1J_.cjs +0 -2
- package/dist/Countdown-DhjAmB0u.js +0 -28
- package/dist/Image-CgRVUblT.cjs +0 -2
- package/dist/LinkButton-Kw2brLTK.cjs +0 -2
- package/dist/LinkButton-sQ5jgHnX.js +0 -12
- package/dist/Navigate-ClPcw87e.js +0 -25
- package/dist/Navigate-CrMwdIBB.cjs +0 -2
- package/dist/_commonjsHelpers-DKOUU3wS.cjs +0 -2
- package/dist/_commonjsHelpers-DKOUU3wS.cjs.map +0 -1
- package/dist/_commonjsHelpers-DaMA6jEr.js +0 -9
- package/dist/_commonjsHelpers-DaMA6jEr.js.map +0 -1
- package/dist/api-9cnyvZj7.cjs +0 -2
- package/dist/api-CAH3GT1O.cjs +0 -2
- package/dist/auth-Bb8WkZGN.js +0 -237
- package/dist/auth-BwpsrTko.cjs +0 -2
- package/dist/client-CUE3jVb4.js +0 -25227
- package/dist/client-CUE3jVb4.js.map +0 -1
- package/dist/client-C_dmBP2e.cjs +0 -251
- package/dist/client-C_dmBP2e.cjs.map +0 -1
- package/dist/emotion-server-create-instance.browser.esm-CgeoyX9a.js +0 -2122
- package/dist/emotion-server-create-instance.browser.esm-CgeoyX9a.js.map +0 -1
- package/dist/emotion-server-create-instance.browser.esm-CpbXhK4a.cjs +0 -6
- package/dist/emotion-server-create-instance.browser.esm-CpbXhK4a.cjs.map +0 -1
- package/dist/en-gb-B_rK7Jx1.js +0 -20
- package/dist/en-gb-B_rK7Jx1.js.map +0 -1
- package/dist/en-gb-CpyEkKq3.cjs +0 -2
- package/dist/en-gb-CpyEkKq3.cjs.map +0 -1
- package/dist/general-Bo6JGvKB.cjs +0 -2
- package/dist/index-5C9hpxRF.cjs +0 -2
- package/dist/index-B3e_XaVG.js +0 -30
- package/dist/index-B89FjK7v.cjs +0 -2
- package/dist/index-BRHFlEjS.js +0 -1187
- package/dist/index-BRHFlEjS.js.map +0 -1
- package/dist/index-CwC9mpb3.cjs +0 -2
- package/dist/index-DuArGzQE.cjs +0 -5
- package/dist/index-DuArGzQE.cjs.map +0 -1
- package/dist/index-hdS8RgRc.js +0 -237
- package/dist/jsx-runtime-B2pbW5Fp.cjs +0 -23
- package/dist/jsx-runtime-B2pbW5Fp.cjs.map +0 -1
- package/dist/jsx-runtime-lzYHhGH3.js +0 -285
- package/dist/jsx-runtime-lzYHhGH3.js.map +0 -1
- package/dist/rtk-query.modern-CjetfYPg.js +0 -3038
- package/dist/rtk-query.modern-CjetfYPg.js.map +0 -1
- package/dist/rtk-query.modern-PBCErCqb.cjs +0 -15
- package/dist/rtk-query.modern-PBCErCqb.cjs.map +0 -1
- package/dist/schemas-DXX4rh8i.cjs +0 -2
- package/dist/server.browser-DeLuEZOk.cjs +0 -205
- package/dist/server.browser-DeLuEZOk.cjs.map +0 -1
- package/dist/server.browser-gAvZ6xhz.js +0 -19744
- package/dist/server.browser-gAvZ6xhz.js.map +0 -1
- package/dist/session-CacrgFSv.cjs +0 -2
- package/dist/style-BgmNVuOg.cjs +0 -2
- package/dist/style-BgmNVuOg.cjs.map +0 -1
- package/dist/style-C3515J9T.js +0 -5
- package/dist/style-C3515J9T.js.map +0 -1
package/dist/theme/index.es.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { responsiveFontSizes as
|
|
2
|
-
import { g as
|
|
3
|
-
import { s as
|
|
4
|
-
import { c as
|
|
5
|
-
import {
|
|
6
|
-
import { Circle as
|
|
7
|
-
const
|
|
8
|
-
options: r =
|
|
1
|
+
import { responsiveFontSizes as u, createTheme as y, buttonClasses as C, ThemeProvider as T, Box as S } from "@mui/material";
|
|
2
|
+
import { g as B, i as F, t as I, s as H, c as $ } from "../index-CDxf6gMv.js";
|
|
3
|
+
import { s as L, p as c, t as j, a as w } from "../palette-CYwuLBW7.js";
|
|
4
|
+
import { c as Q } from "../palette-CYwuLBW7.js";
|
|
5
|
+
import { jsx as m, jsxs as x, Fragment as z } from "react/jsx-runtime";
|
|
6
|
+
import { Circle as D, Hexagon as P } from "@mui/icons-material";
|
|
7
|
+
const E = ({
|
|
8
|
+
options: r = h,
|
|
9
9
|
withShapes: p = !1,
|
|
10
10
|
userType: d,
|
|
11
11
|
bgcolor: t,
|
|
12
|
-
children:
|
|
13
|
-
sx:
|
|
14
|
-
...
|
|
12
|
+
children: v,
|
|
13
|
+
sx: M,
|
|
14
|
+
...g
|
|
15
15
|
}) => {
|
|
16
|
-
let
|
|
16
|
+
let s, i, o;
|
|
17
17
|
switch (d) {
|
|
18
18
|
case "teacher":
|
|
19
|
-
t = t ??
|
|
19
|
+
t = t ?? w[400], s = "tertiary", i = "secondary", o = c.primary.contrastText;
|
|
20
20
|
break;
|
|
21
21
|
case "student":
|
|
22
|
-
t = t ??
|
|
22
|
+
t = t ?? j[500], s = "secondary", i = "primary", o = c.tertiary.contrastText;
|
|
23
23
|
break;
|
|
24
24
|
case "independent":
|
|
25
|
-
t = t ??
|
|
25
|
+
t = t ?? L[500], s = "primary", i = "tertiary", o = c.secondary.contrastText;
|
|
26
26
|
break;
|
|
27
27
|
}
|
|
28
28
|
const l = {
|
|
29
29
|
display: { xs: "none", md: "block" },
|
|
30
30
|
fontSize: "180px",
|
|
31
31
|
position: "absolute"
|
|
32
|
-
},
|
|
32
|
+
}, a = {
|
|
33
33
|
color: o,
|
|
34
34
|
textDecorationColor: o
|
|
35
35
|
};
|
|
36
|
-
function n(e,
|
|
36
|
+
function n(e, k, f, O = "root") {
|
|
37
37
|
return {
|
|
38
38
|
// Get the original styles.
|
|
39
|
-
...
|
|
39
|
+
...B(
|
|
40
40
|
e,
|
|
41
|
-
k,
|
|
42
41
|
f,
|
|
42
|
+
O,
|
|
43
43
|
r.components
|
|
44
44
|
),
|
|
45
45
|
// Override styles unless the class name 'no-override' is set.
|
|
46
|
-
...!
|
|
46
|
+
...!F(e, ["no-override"]) && k
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
const
|
|
50
|
-
|
|
49
|
+
const b = u(
|
|
50
|
+
y({
|
|
51
51
|
...r,
|
|
52
52
|
components: {
|
|
53
53
|
...r.components,
|
|
@@ -58,7 +58,7 @@ const R = ({
|
|
|
58
58
|
root: ({ ownerState: e }) => n(
|
|
59
59
|
e,
|
|
60
60
|
{
|
|
61
|
-
...
|
|
61
|
+
...a
|
|
62
62
|
},
|
|
63
63
|
"MuiTypography"
|
|
64
64
|
)
|
|
@@ -71,7 +71,7 @@ const R = ({
|
|
|
71
71
|
root: ({ ownerState: e }) => n(
|
|
72
72
|
e,
|
|
73
73
|
{
|
|
74
|
-
...
|
|
74
|
+
...a
|
|
75
75
|
},
|
|
76
76
|
"MuiFormHelperText"
|
|
77
77
|
)
|
|
@@ -84,7 +84,7 @@ const R = ({
|
|
|
84
84
|
root: ({ ownerState: e }) => n(
|
|
85
85
|
e,
|
|
86
86
|
{
|
|
87
|
-
...
|
|
87
|
+
...a
|
|
88
88
|
},
|
|
89
89
|
"MuiLink"
|
|
90
90
|
)
|
|
@@ -107,7 +107,7 @@ const R = ({
|
|
|
107
107
|
"0px 3px 5px 0px rgba(0, 0, 0, 0.2);"
|
|
108
108
|
].join()
|
|
109
109
|
},
|
|
110
|
-
[`&.${
|
|
110
|
+
[`&.${C.disabled}`]: {
|
|
111
111
|
backgroundColor: "white",
|
|
112
112
|
color: o
|
|
113
113
|
}
|
|
@@ -119,7 +119,7 @@ const R = ({
|
|
|
119
119
|
outlined: ({ ownerState: e }) => n(
|
|
120
120
|
e,
|
|
121
121
|
{
|
|
122
|
-
...
|
|
122
|
+
...a,
|
|
123
123
|
border: `2px solid ${o}`,
|
|
124
124
|
"&:hover": {
|
|
125
125
|
border: `2px solid ${o}`,
|
|
@@ -163,11 +163,11 @@ const R = ({
|
|
|
163
163
|
}
|
|
164
164
|
})
|
|
165
165
|
);
|
|
166
|
-
return /* @__PURE__ */
|
|
167
|
-
|
|
166
|
+
return /* @__PURE__ */ m(T, { theme: b, children: /* @__PURE__ */ x(
|
|
167
|
+
S,
|
|
168
168
|
{
|
|
169
169
|
sx: {
|
|
170
|
-
...
|
|
170
|
+
...M,
|
|
171
171
|
...p && {
|
|
172
172
|
paddingY: { xs: 2, sm: 3, md: 5 },
|
|
173
173
|
paddingX: { xs: 2, sm: 5, md: 10 },
|
|
@@ -177,13 +177,13 @@ const R = ({
|
|
|
177
177
|
alignItems: "center",
|
|
178
178
|
position: "relative"
|
|
179
179
|
},
|
|
180
|
-
...
|
|
180
|
+
...g,
|
|
181
181
|
children: [
|
|
182
|
-
p && /* @__PURE__ */
|
|
183
|
-
/* @__PURE__ */
|
|
184
|
-
|
|
182
|
+
p && /* @__PURE__ */ x(z, { children: [
|
|
183
|
+
/* @__PURE__ */ m(
|
|
184
|
+
D,
|
|
185
185
|
{
|
|
186
|
-
color:
|
|
186
|
+
color: s,
|
|
187
187
|
sx: {
|
|
188
188
|
...l,
|
|
189
189
|
top: "5%",
|
|
@@ -192,10 +192,10 @@ const R = ({
|
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
),
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
|
|
195
|
+
/* @__PURE__ */ m(
|
|
196
|
+
P,
|
|
197
197
|
{
|
|
198
|
-
color:
|
|
198
|
+
color: i,
|
|
199
199
|
sx: {
|
|
200
200
|
...l,
|
|
201
201
|
bottom: "5%",
|
|
@@ -205,20 +205,20 @@ const R = ({
|
|
|
205
205
|
}
|
|
206
206
|
)
|
|
207
207
|
] }),
|
|
208
|
-
|
|
208
|
+
v
|
|
209
209
|
]
|
|
210
210
|
}
|
|
211
211
|
) });
|
|
212
|
-
},
|
|
213
|
-
palette:
|
|
214
|
-
components:
|
|
215
|
-
spacing:
|
|
216
|
-
typography:
|
|
217
|
-
},
|
|
212
|
+
}, h = {
|
|
213
|
+
palette: c,
|
|
214
|
+
components: $,
|
|
215
|
+
spacing: H,
|
|
216
|
+
typography: I
|
|
217
|
+
}, G = u(y(h));
|
|
218
218
|
export {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
219
|
+
E as ThemedBox,
|
|
220
|
+
Q as colors,
|
|
221
|
+
G as theme,
|
|
222
|
+
h as themeOptions
|
|
223
223
|
};
|
|
224
224
|
//# sourceMappingURL=index.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../src/theme/ThemedBox.tsx","../../src/theme/index.ts"],"sourcesContent":["import {\n Box,\n type BoxProps,\n type CSSObject,\n type PaletteColor,\n type SxProps,\n type ThemeOptions,\n ThemeProvider,\n buttonClasses,\n createTheme,\n responsiveFontSizes,\n} from \"@mui/material\"\nimport {\n Circle as CircleIcon,\n Hexagon as HexagonIcon,\n} from \"@mui/icons-material\"\nimport type { CommonProps } from \"@mui/material/OverridableComponent\"\nimport type React from \"react\"\n\nimport { getStyleOverrides, includesClassNames } from \"../utils/theme\"\nimport { primary, secondary, tertiary } from \"./colors\"\nimport type Components from \"./components/_components\"\nimport palette from \"./palette\"\nimport { themeOptions } from \".\"\n\nexport interface ThemedBoxProps extends BoxProps {\n options?: ThemeOptions\n withShapes?: boolean\n userType: \"teacher\" | \"student\" | \"independent\"\n bgcolor?: string\n}\n\nconst ThemedBox: React.FC<ThemedBoxProps> = ({\n options = themeOptions,\n withShapes = false,\n userType,\n bgcolor,\n children,\n sx,\n ...otherBoxProps\n}) => {\n let circleColor: \"primary\" | \"secondary\" | \"tertiary\"\n let hexagonColor: \"primary\" | \"secondary\" | \"tertiary\"\n let contrastText: string\n switch (userType) {\n case \"teacher\":\n bgcolor = bgcolor ?? primary[400]\n circleColor = \"tertiary\"\n hexagonColor = \"secondary\"\n contrastText = (palette.primary as PaletteColor).contrastText\n break\n case \"student\":\n bgcolor = bgcolor ?? tertiary[500]\n circleColor = \"secondary\"\n hexagonColor = \"primary\"\n contrastText = palette.tertiary.contrastText\n break\n case \"independent\":\n bgcolor = bgcolor ?? secondary[500]\n circleColor = \"primary\"\n hexagonColor = \"tertiary\"\n contrastText = (palette.secondary as PaletteColor).contrastText\n break\n }\n\n const commonIconSxProps: SxProps = {\n display: { xs: \"none\", md: \"block\" },\n fontSize: \"180px\",\n position: \"absolute\",\n }\n\n const fontStyleOverrides = {\n color: contrastText,\n textDecorationColor: contrastText,\n }\n\n function overrideStyles(\n ownerState: CommonProps,\n styleOverrides: CSSObject,\n componentKey: keyof Components,\n muiClassName: string = \"root\",\n ): CSSObject {\n return {\n // Get the original styles.\n ...getStyleOverrides(\n ownerState,\n componentKey,\n muiClassName,\n options.components,\n ),\n // Override styles unless the class name 'no-override' is set.\n ...(!includesClassNames(ownerState, [\"no-override\"]) && styleOverrides),\n }\n }\n\n const theme = responsiveFontSizes(\n createTheme({\n ...options,\n components: {\n ...options.components,\n MuiTypography: {\n ...options.components?.MuiTypography,\n styleOverrides: {\n ...options.components?.MuiTypography?.styleOverrides,\n root: ({ ownerState }) =>\n overrideStyles(\n ownerState,\n {\n ...fontStyleOverrides,\n },\n \"MuiTypography\",\n ),\n },\n },\n MuiFormHelperText: {\n ...options.components?.MuiFormHelperText,\n styleOverrides: {\n ...options.components?.MuiFormHelperText?.styleOverrides,\n root: ({ ownerState }) =>\n overrideStyles(\n ownerState,\n {\n ...fontStyleOverrides,\n },\n \"MuiFormHelperText\",\n ),\n },\n },\n MuiLink: {\n ...options.components?.MuiLink,\n styleOverrides: {\n ...options.components?.MuiLink?.styleOverrides,\n root: ({ ownerState }) =>\n overrideStyles(\n ownerState,\n {\n ...fontStyleOverrides,\n },\n \"MuiLink\",\n ),\n },\n },\n MuiButton: {\n ...options.components?.MuiButton,\n styleOverrides: {\n ...options.components?.MuiButton?.styleOverrides,\n contained: ({ ownerState }) =>\n overrideStyles(\n ownerState,\n {\n ...(userType === \"independent\" && {\n backgroundColor: \"white\",\n \"&:hover\": {\n backgroundColor: \"#f6f5f5\",\n boxShadow: [\n \"0px 6px 10px 0px rgba(0, 0, 0, 0.14)\",\n \"0px 1px 18px 0px rgba(0, 0, 0, 0.12)\",\n \"0px 3px 5px 0px rgba(0, 0, 0, 0.2);\",\n ].join(),\n },\n [`&.${buttonClasses.disabled}`]: {\n backgroundColor: \"white\",\n color: contrastText,\n },\n }),\n },\n \"MuiButton\",\n \"contained\",\n ),\n outlined: ({ ownerState }) =>\n overrideStyles(\n ownerState,\n {\n ...fontStyleOverrides,\n border: `2px solid ${contrastText}`,\n \"&:hover\": {\n border: `2px solid ${contrastText}`,\n backgroundColor: \"transparent\",\n textDecoration: \"underline\",\n },\n },\n \"MuiButton\",\n \"outlined\",\n ),\n },\n },\n MuiCheckbox: {\n ...options.components?.MuiCheckbox,\n styleOverrides: {\n ...options.components?.MuiCheckbox?.styleOverrides,\n root: ({ ownerState }) =>\n overrideStyles(\n ownerState,\n {\n color: `${contrastText} !important`,\n },\n \"MuiCheckbox\",\n ),\n },\n },\n MuiSvgIcon: {\n ...options.components?.MuiSvgIcon,\n styleOverrides: {\n ...options.components?.MuiSvgIcon?.styleOverrides,\n root: ({ ownerState }) =>\n overrideStyles(\n ownerState,\n {\n \"&.checkbox-error\": {\n color: `${contrastText} !important`,\n },\n },\n \"MuiSvgIcon\",\n ),\n },\n },\n },\n }),\n )\n\n return (\n <ThemeProvider theme={theme}>\n <Box\n sx={{\n ...sx,\n ...(withShapes && {\n paddingY: { xs: 2, sm: 3, md: 5 },\n paddingX: { xs: 2, sm: 5, md: 10 },\n marginX: { md: \"90px\" },\n }),\n bgcolor,\n alignItems: \"center\",\n position: \"relative\",\n }}\n {...otherBoxProps}\n >\n {withShapes && (\n <>\n <CircleIcon\n color={circleColor}\n sx={{\n ...commonIconSxProps,\n top: \"5%\",\n left: \"0%\",\n transform: \"translate(-60%, 0%)\",\n }}\n />\n <HexagonIcon\n color={hexagonColor}\n sx={{\n ...commonIconSxProps,\n bottom: \"5%\",\n right: \"0%\",\n transform: \"translate(60%, 0%) rotate(90deg)\",\n }}\n />\n </>\n )}\n {children}\n </Box>\n </ThemeProvider>\n )\n}\n\nexport default ThemedBox\n","import {\n type ThemeOptions,\n createTheme,\n responsiveFontSizes,\n} from \"@mui/material\"\n\nimport components from \"./components\"\nimport palette from \"./palette\"\nimport spacing from \"./spacing\"\nimport typography from \"./typography\"\n\nexport * as colors from \"./colors\"\nexport * from \"./palette\"\nexport * from \"./ThemedBox\"\nexport { default as ThemedBox } from \"./ThemedBox\"\n\nexport const themeOptions: ThemeOptions = {\n palette,\n components,\n spacing,\n typography,\n}\n\nexport const theme = responsiveFontSizes(createTheme(themeOptions))\n"],"names":["ThemedBox","options","themeOptions","withShapes","userType","bgcolor","children","sx","otherBoxProps","circleColor","hexagonColor","contrastText","primary","palette","tertiary","secondary","commonIconSxProps","fontStyleOverrides","overrideStyles","ownerState","styleOverrides","componentKey","muiClassName","getStyleOverrides","includesClassNames","theme","responsiveFontSizes","createTheme","buttonClasses","jsx","ThemeProvider","jsxs","Box","Fragment","CircleIcon","HexagonIcon","components","spacing","typography"],"mappings":";;;;;;AAgCA,MAAMA,IAAsC,CAAC;AAAA,EAC3C,SAAAC,IAAUC;AAAA,EACV,YAAAC,IAAa;AAAA,EACb,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,IAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,MAAIC,GACAC,GACAC;AACJ,UAAQP,GAAA;AAAA,IACN,KAAK;AACH,MAAAC,IAAUA,KAAWO,EAAQ,GAAG,GAChCH,IAAc,YACdC,IAAe,aACfC,IAAgBE,EAAQ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AA,cAAA;AAAA,YACb;AAAA,UAAA;AAAA,UAEFa,gBAAAA,EAAAA;AAAAA,YAACM;AAAAA,YAAA;AAAA,cACC,OAAOzB;AAAA,cACP,IAAI;AAAA,gBACF,GAAGM;AAAA,gBACH,QAAQ;AAAA,gBACR,OAAO;AAAA,gBACP,WAAW;AAAA,cAAA;AAAA,YACb;AAAA,UAAA;AAAA,QACF,GACF;AAAA,QAEDV;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAEL;AAEJ,GCtPaJ,IAA6B;AAAA,EACxC,SAAAW;AAAA,EACA,YAAAuB;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AACF,GAEab,IAAQC,EAAoBC,EAAYzB,CAAY,CAAC;"}
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../src/theme/ThemedBox.tsx","../../src/theme/index.ts"],"sourcesContent":["import {\n Box,\n type BoxProps,\n type CSSObject,\n type PaletteColor,\n type SxProps,\n type ThemeOptions,\n ThemeProvider,\n buttonClasses,\n createTheme,\n responsiveFontSizes,\n} from \"@mui/material\"\nimport {\n Circle as CircleIcon,\n Hexagon as HexagonIcon,\n} from \"@mui/icons-material\"\nimport type { CommonProps } from \"@mui/material/OverridableComponent\"\nimport type React from \"react\"\n\nimport { getStyleOverrides, includesClassNames } from \"../utils/theme\"\nimport { primary, secondary, tertiary } from \"./colors\"\nimport type Components from \"./components/_components\"\nimport palette from \"./palette\"\nimport { themeOptions } from \".\"\n\nexport interface ThemedBoxProps extends BoxProps {\n options?: ThemeOptions\n withShapes?: boolean\n userType: \"teacher\" | \"student\" | \"independent\"\n bgcolor?: string\n}\n\nconst ThemedBox: React.FC<ThemedBoxProps> = ({\n options = themeOptions,\n withShapes = false,\n userType,\n bgcolor,\n children,\n sx,\n ...otherBoxProps\n}) => {\n let circleColor: \"primary\" | \"secondary\" | \"tertiary\"\n let hexagonColor: \"primary\" | \"secondary\" | \"tertiary\"\n let contrastText: string\n switch (userType) {\n case \"teacher\":\n bgcolor = bgcolor ?? primary[400]\n circleColor = \"tertiary\"\n hexagonColor = \"secondary\"\n contrastText = (palette.primary as PaletteColor).contrastText\n break\n case \"student\":\n bgcolor = bgcolor ?? tertiary[500]\n circleColor = \"secondary\"\n hexagonColor = \"primary\"\n contrastText = palette.tertiary.contrastText\n break\n case \"independent\":\n bgcolor = bgcolor ?? secondary[500]\n circleColor = \"primary\"\n hexagonColor = \"tertiary\"\n contrastText = (palette.secondary as PaletteColor).contrastText\n break\n }\n\n const commonIconSxProps: SxProps = {\n display: { xs: \"none\", md: \"block\" },\n fontSize: \"180px\",\n position: \"absolute\",\n }\n\n const fontStyleOverrides = {\n color: contrastText,\n textDecorationColor: contrastText,\n }\n\n function overrideStyles(\n ownerState: CommonProps,\n styleOverrides: CSSObject,\n componentKey: keyof Components,\n muiClassName: string = \"root\",\n ): CSSObject {\n return {\n // Get the original styles.\n ...getStyleOverrides(\n ownerState,\n componentKey,\n muiClassName,\n options.components,\n ),\n // Override styles unless the class name 'no-override' is set.\n ...(!includesClassNames(ownerState, [\"no-override\"]) && styleOverrides),\n }\n }\n\n const theme = responsiveFontSizes(\n createTheme({\n ...options,\n components: {\n ...options.components,\n MuiTypography: {\n ...options.components?.MuiTypography,\n styleOverrides: {\n ...options.components?.MuiTypography?.styleOverrides,\n root: ({ ownerState }) =>\n overrideStyles(\n ownerState,\n {\n ...fontStyleOverrides,\n },\n \"MuiTypography\",\n ),\n },\n },\n MuiFormHelperText: {\n ...options.components?.MuiFormHelperText,\n styleOverrides: {\n ...options.components?.MuiFormHelperText?.styleOverrides,\n root: ({ ownerState }) =>\n overrideStyles(\n ownerState,\n {\n ...fontStyleOverrides,\n },\n \"MuiFormHelperText\",\n ),\n },\n },\n MuiLink: {\n ...options.components?.MuiLink,\n styleOverrides: {\n ...options.components?.MuiLink?.styleOverrides,\n root: ({ ownerState }) =>\n overrideStyles(\n ownerState,\n {\n ...fontStyleOverrides,\n },\n \"MuiLink\",\n ),\n },\n },\n MuiButton: {\n ...options.components?.MuiButton,\n styleOverrides: {\n ...options.components?.MuiButton?.styleOverrides,\n contained: ({ ownerState }) =>\n overrideStyles(\n ownerState,\n {\n ...(userType === \"independent\" && {\n backgroundColor: \"white\",\n \"&:hover\": {\n backgroundColor: \"#f6f5f5\",\n boxShadow: [\n \"0px 6px 10px 0px rgba(0, 0, 0, 0.14)\",\n \"0px 1px 18px 0px rgba(0, 0, 0, 0.12)\",\n \"0px 3px 5px 0px rgba(0, 0, 0, 0.2);\",\n ].join(),\n },\n [`&.${buttonClasses.disabled}`]: {\n backgroundColor: \"white\",\n color: contrastText,\n },\n }),\n },\n \"MuiButton\",\n \"contained\",\n ),\n outlined: ({ ownerState }) =>\n overrideStyles(\n ownerState,\n {\n ...fontStyleOverrides,\n border: `2px solid ${contrastText}`,\n \"&:hover\": {\n border: `2px solid ${contrastText}`,\n backgroundColor: \"transparent\",\n textDecoration: \"underline\",\n },\n },\n \"MuiButton\",\n \"outlined\",\n ),\n },\n },\n MuiCheckbox: {\n ...options.components?.MuiCheckbox,\n styleOverrides: {\n ...options.components?.MuiCheckbox?.styleOverrides,\n root: ({ ownerState }) =>\n overrideStyles(\n ownerState,\n {\n color: `${contrastText} !important`,\n },\n \"MuiCheckbox\",\n ),\n },\n },\n MuiSvgIcon: {\n ...options.components?.MuiSvgIcon,\n styleOverrides: {\n ...options.components?.MuiSvgIcon?.styleOverrides,\n root: ({ ownerState }) =>\n overrideStyles(\n ownerState,\n {\n \"&.checkbox-error\": {\n color: `${contrastText} !important`,\n },\n },\n \"MuiSvgIcon\",\n ),\n },\n },\n },\n }),\n )\n\n return (\n <ThemeProvider theme={theme}>\n <Box\n sx={{\n ...sx,\n ...(withShapes && {\n paddingY: { xs: 2, sm: 3, md: 5 },\n paddingX: { xs: 2, sm: 5, md: 10 },\n marginX: { md: \"90px\" },\n }),\n bgcolor,\n alignItems: \"center\",\n position: \"relative\",\n }}\n {...otherBoxProps}\n >\n {withShapes && (\n <>\n <CircleIcon\n color={circleColor}\n sx={{\n ...commonIconSxProps,\n top: \"5%\",\n left: \"0%\",\n transform: \"translate(-60%, 0%)\",\n }}\n />\n <HexagonIcon\n color={hexagonColor}\n sx={{\n ...commonIconSxProps,\n bottom: \"5%\",\n right: \"0%\",\n transform: \"translate(60%, 0%) rotate(90deg)\",\n }}\n />\n </>\n )}\n {children}\n </Box>\n </ThemeProvider>\n )\n}\n\nexport default ThemedBox\n","import {\n type ThemeOptions,\n createTheme,\n responsiveFontSizes,\n} from \"@mui/material\"\n\nimport components from \"./components\"\nimport palette from \"./palette\"\nimport spacing from \"./spacing\"\nimport typography from \"./typography\"\n\nexport * as colors from \"./colors\"\nexport * from \"./palette\"\nexport * from \"./ThemedBox\"\nexport { default as ThemedBox } from \"./ThemedBox\"\n\nexport const themeOptions: ThemeOptions = {\n palette,\n components,\n spacing,\n typography,\n}\n\nexport const theme = responsiveFontSizes(createTheme(themeOptions))\n"],"names":["ThemedBox","options","themeOptions","withShapes","userType","bgcolor","children","sx","otherBoxProps","circleColor","hexagonColor","contrastText","primary","palette","tertiary","secondary","commonIconSxProps","fontStyleOverrides","overrideStyles","ownerState","styleOverrides","componentKey","muiClassName","getStyleOverrides","includesClassNames","theme","responsiveFontSizes","createTheme","buttonClasses","jsx","ThemeProvider","jsxs","Box","Fragment","CircleIcon","HexagonIcon","components","spacing","typography"],"mappings":";;;;;;AAgCA,MAAMA,IAAsC,CAAC;AAAA,EAC3C,SAAAC,IAAUC;AAAA,EACV,YAAAC,IAAa;AAAA,EACb,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,IAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,MAAIC,GACAC,GACAC;AACJ,UAAQP,GAAA;AAAA,IACN,KAAK;AACH,MAAAC,IAAUA,KAAWO,EAAQ,GAAG,GAChCH,IAAc,YACdC,IAAe,aACfC,IAAgBE,EAAQ,QAAyB;AACjD;AAAA,IACF,KAAK;AACH,MAAAR,IAAUA,KAAWS,EAAS,GA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,cACP,IAAI;AAAA,gBACF,GAAGM;AAAA,gBACH,QAAQ;AAAA,gBACR,OAAO;AAAA,gBACP,WAAW;AAAA,cAAA;AAAA,YACb;AAAA,UAAA;AAAA,QACF,GACF;AAAA,QAEDV;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAEL;AAEJ,GCtPaJ,IAA6B;AAAA,EACxC,SAAAW;AAAA,EACA,YAAAuB;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AACF,GAEab,IAAQC,EAAoBC,EAAYzB,CAAY,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const s=require("./api-
|
|
2
|
-
//# sourceMappingURL=urls-
|
|
1
|
+
"use strict";const s=require("./api-G8CV5bUa.cjs"),e={user:s.modelUrls("users/","users/<id>/"),teacher:s.modelUrls("users/teachers/","users/teachers/<id>/"),student:s.modelUrls("users/students/","users/students/<id>/"),school:s.modelUrls("schools/","schools/<id>/"),class:s.modelUrls("classes/","classes/<id>/"),otpBypassToken:s.modelUrls("otp-bypass-tokens/","otp-bypass-tokens/<id>/"),authFactor:s.modelUrls("auth-factors/","auth-factors/<id>/")};exports.urls=e;
|
|
2
|
+
//# sourceMappingURL=urls-2gheISSO.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urls-
|
|
1
|
+
{"version":3,"file":"urls-2gheISSO.cjs","sources":["../src/api/urls.ts"],"sourcesContent":["import { modelUrls } from \"../utils/api\"\n\nconst urls = {\n user: modelUrls(\"users/\", \"users/<id>/\"),\n teacher: modelUrls(\"users/teachers/\", \"users/teachers/<id>/\"),\n student: modelUrls(\"users/students/\", \"users/students/<id>/\"),\n school: modelUrls(\"schools/\", \"schools/<id>/\"),\n class: modelUrls(\"classes/\", \"classes/<id>/\"),\n otpBypassToken: modelUrls(\"otp-bypass-tokens/\", \"otp-bypass-tokens/<id>/\"),\n authFactor: modelUrls(\"auth-factors/\", \"auth-factors/<id>/\"),\n}\n\nexport default urls\n"],"names":["urls","modelUrls"],"mappings":"mDAEMA,EAAO,CACX,KAAMC,EAAAA,UAAU,SAAU,aAAa,EACvC,QAASA,EAAAA,UAAU,kBAAmB,sBAAsB,EAC5D,QAASA,EAAAA,UAAU,kBAAmB,sBAAsB,EAC5D,OAAQA,EAAAA,UAAU,WAAY,eAAe,EAC7C,MAAOA,EAAAA,UAAU,WAAY,eAAe,EAC5C,eAAgBA,EAAAA,UAAU,qBAAsB,yBAAyB,EACzE,WAAYA,EAAAA,UAAU,gBAAiB,oBAAoB,CAC7D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as s } from "./api-
|
|
1
|
+
import { m as s } from "./api-uh8UKwsU.js";
|
|
2
2
|
const t = {
|
|
3
3
|
user: s("users/", "users/<id>/"),
|
|
4
4
|
teacher: s("users/teachers/", "users/teachers/<id>/"),
|
|
@@ -11,4 +11,4 @@ const t = {
|
|
|
11
11
|
export {
|
|
12
12
|
t as u
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=urls-
|
|
14
|
+
//# sourceMappingURL=urls-BG788CnL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urls-
|
|
1
|
+
{"version":3,"file":"urls-BG788CnL.js","sources":["../src/api/urls.ts"],"sourcesContent":["import { modelUrls } from \"../utils/api\"\n\nconst urls = {\n user: modelUrls(\"users/\", \"users/<id>/\"),\n teacher: modelUrls(\"users/teachers/\", \"users/teachers/<id>/\"),\n student: modelUrls(\"users/students/\", \"users/students/<id>/\"),\n school: modelUrls(\"schools/\", \"schools/<id>/\"),\n class: modelUrls(\"classes/\", \"classes/<id>/\"),\n otpBypassToken: modelUrls(\"otp-bypass-tokens/\", \"otp-bypass-tokens/<id>/\"),\n authFactor: modelUrls(\"auth-factors/\", \"auth-factors/<id>/\"),\n}\n\nexport default urls\n"],"names":["urls","modelUrls"],"mappings":";AAEA,MAAMA,IAAO;AAAA,EACX,MAAMC,EAAU,UAAU,aAAa;AAAA,EACvC,SAASA,EAAU,mBAAmB,sBAAsB;AAAA,EAC5D,SAASA,EAAU,mBAAmB,sBAAsB;AAAA,EAC5D,QAAQA,EAAU,YAAY,eAAe;AAAA,EAC7C,OAAOA,EAAU,YAAY,eAAe;AAAA,EAC5C,gBAAgBA,EAAU,sBAAsB,yBAAyB;AAAA,EACzE,YAAYA,EAAU,iBAAiB,oBAAoB;AAC7D;"}
|
package/dist/utils/api.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("@mui/material");require("react");require("./general.cjs.js");require("yup");const e=require("../api-G8CV5bUa.cjs");exports.buildUrl=e.buildUrl;exports.handleResultState=e.handleResultState;exports.isModelId=e.isModelId;exports.isSafeHttpMethod=e.isSafeHttpMethod;exports.listTag=e.listTag;exports.modelUrls=e.modelUrls;exports.tagData=e.tagData;
|
|
2
2
|
//# sourceMappingURL=api.cjs.js.map
|
package/dist/utils/api.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
2
|
import "@mui/material";
|
|
3
3
|
import "react";
|
|
4
4
|
import "./general.es.js";
|
|
5
5
|
import "yup";
|
|
6
|
-
import { b as e, h as m, a as p, i as d, l as h, m as b, t as f } from "../api-
|
|
6
|
+
import { b as e, h as m, a as p, i as d, l as h, m as b, t as f } from "../api-uh8UKwsU.js";
|
|
7
7
|
export {
|
|
8
8
|
e as buildUrl,
|
|
9
9
|
m as handleResultState,
|
package/dist/utils/router.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react-router");require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react-router");require("react/jsx-runtime");require("react");require("@mui/icons-material");require("@mui/material");require("../palette-BnIdHKDE.cjs");require("../auth-C2OUeLmQ.cjs");function q(e,o={}){function c(r,g,t){typeof r.__=="object"&&(t=t?{...t,...r.__}:r.__);const _=typeof e=="string"&&t?l.generatePath(e,t):e;Object.entries(r).forEach(([u,i])=>{if(u!=="__")if(i=i,typeof i=="string"){if(typeof _=="string"&&(!g||u!=="_")){let n=_+i;n.endsWith("/")&&(n=n.slice(0,-1)),r[u]=n}}else c(i,!1,t)})}const f={...o,_:typeof e=="string"?e:"",__:e};return e===""?f._="/":c(f,!0),f}function s(e,o){return e.__[o]}exports.getParam=s;exports.path=q;
|
|
2
2
|
//# sourceMappingURL=router.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.cjs.js","sources":["../../src/utils/router.ts"],"sourcesContent":["import {\n type To,\n type LinkProps as _LinkProps,\n generatePath,\n} from \"react-router\"\n\nimport { type PageState } from \"../components/page/Page\"\n\nexport type LinkProps<\n Override extends \"delta\" | \"to\",\n State extends Record<string, any> = Record<string, any>,\n> = Omit<_LinkProps, \"to\" | \"state\"> &\n (Override extends \"delta\"\n ? { to: number }\n : { to: To; state?: State & Partial<PageState> })\n\nexport type ReadOnly<T> = {\n readonly [P in keyof T]: T[P]\n}\n\nexport type Parameters = Record<string, string>\n\nexport interface Path {\n _: string\n __: string | Parameters\n [subpath: string]: string | Path | Parameters\n}\n\nexport function path<Subpaths extends Record<string, Path>>(\n _: string | Parameters,\n subpaths: Subpaths = {} as Subpaths,\n): Path & Subpaths {\n function updatePath(path: Path, root: boolean, params?: Parameters) {\n if (typeof path.__ === \"object\") {\n params = params ? { ...params, ...path.__ } : path.__\n }\n\n const _path = typeof _ === \"string\" && params ? generatePath(_, params) : _\n\n Object.entries(path).forEach(([key, subpath]) => {\n if (key !== \"__\") {\n subpath = subpath as string | Path\n if (typeof subpath === \"string\") {\n if (typeof _path === \"string\" && (!root || key !== \"_\")) {\n let __path = _path + subpath\n if (__path.endsWith(\"/\")) __path = __path.slice(0, -1)\n path[key] = __path\n }\n } else {\n updatePath(subpath, false, params)\n }\n }\n })\n }\n\n const path = { ...subpaths, _: typeof _ === \"string\" ? _ : \"\", __: _ }\n if (_ === \"\") {\n path._ = \"/\"\n } else {\n updatePath(path, true)\n }\n return path\n}\n\nexport function getParam(path: Path, key: string) {\n return (path.__ as Parameters)[key]\n}\n"],"names":["path","_","subpaths","updatePath","root","params","_path","generatePath","key","subpath","__path","getParam"],"mappings":"
|
|
1
|
+
{"version":3,"file":"router.cjs.js","sources":["../../src/utils/router.ts"],"sourcesContent":["import {\n type To,\n type LinkProps as _LinkProps,\n generatePath,\n} from \"react-router\"\n\nimport { type PageState } from \"../components/page/Page\"\n\nexport type LinkProps<\n Override extends \"delta\" | \"to\",\n State extends Record<string, any> = Record<string, any>,\n> = Omit<_LinkProps, \"to\" | \"state\"> &\n (Override extends \"delta\"\n ? { to: number }\n : { to: To; state?: State & Partial<PageState> })\n\nexport type ReadOnly<T> = {\n readonly [P in keyof T]: T[P]\n}\n\nexport type Parameters = Record<string, string>\n\nexport interface Path {\n _: string\n __: string | Parameters\n [subpath: string]: string | Path | Parameters\n}\n\nexport function path<Subpaths extends Record<string, Path>>(\n _: string | Parameters,\n subpaths: Subpaths = {} as Subpaths,\n): Path & Subpaths {\n function updatePath(path: Path, root: boolean, params?: Parameters) {\n if (typeof path.__ === \"object\") {\n params = params ? { ...params, ...path.__ } : path.__\n }\n\n const _path = typeof _ === \"string\" && params ? generatePath(_, params) : _\n\n Object.entries(path).forEach(([key, subpath]) => {\n if (key !== \"__\") {\n subpath = subpath as string | Path\n if (typeof subpath === \"string\") {\n if (typeof _path === \"string\" && (!root || key !== \"_\")) {\n let __path = _path + subpath\n if (__path.endsWith(\"/\")) __path = __path.slice(0, -1)\n path[key] = __path\n }\n } else {\n updatePath(subpath, false, params)\n }\n }\n })\n }\n\n const path = { ...subpaths, _: typeof _ === \"string\" ? _ : \"\", __: _ }\n if (_ === \"\") {\n path._ = \"/\"\n } else {\n updatePath(path, true)\n }\n return path\n}\n\nexport function getParam(path: Path, key: string) {\n return (path.__ as Parameters)[key]\n}\n"],"names":["path","_","subpaths","updatePath","root","params","_path","generatePath","key","subpath","__path","getParam"],"mappings":"yRA4BO,SAASA,EACdC,EACAC,EAAqB,GACJ,CACjB,SAASC,EAAWH,EAAYI,EAAeC,EAAqB,CAC9D,OAAOL,EAAK,IAAO,WACrBK,EAASA,EAAS,CAAE,GAAGA,EAAQ,GAAGL,EAAK,EAAA,EAAOA,EAAK,IAGrD,MAAMM,EAAQ,OAAOL,GAAM,UAAYI,EAASE,eAAaN,EAAGI,CAAM,EAAIJ,EAE1E,OAAO,QAAQD,CAAI,EAAE,QAAQ,CAAC,CAACQ,EAAKC,CAAO,IAAM,CAC/C,GAAID,IAAQ,KAEV,GADAC,EAAUA,EACN,OAAOA,GAAY,UACrB,GAAI,OAAOH,GAAU,WAAa,CAACF,GAAQI,IAAQ,KAAM,CACvD,IAAIE,EAASJ,EAAQG,EACjBC,EAAO,SAAS,GAAG,MAAYA,EAAO,MAAM,EAAG,EAAE,GACrDV,EAAKQ,CAAG,EAAIE,CACd,OAEAP,EAAWM,EAAS,GAAOJ,CAAM,CAGvC,CAAC,CACH,CAEA,MAAML,EAAO,CAAE,GAAGE,EAAU,EAAG,OAAOD,GAAM,SAAWA,EAAI,GAAI,GAAIA,CAAA,EACnE,OAAIA,IAAM,GACRD,EAAK,EAAI,IAETG,EAAWH,EAAM,EAAI,EAEhBA,CACT,CAEO,SAASW,EAASX,EAAYQ,EAAa,CAChD,OAAQR,EAAK,GAAkBQ,CAAG,CACpC"}
|
package/dist/utils/router.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { generatePath as p } from "react-router";
|
|
2
|
-
import "
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@mui/icons-material";
|
|
5
5
|
import "@mui/material";
|
|
6
6
|
import "../palette-CYwuLBW7.js";
|
|
7
|
-
import "../auth-
|
|
7
|
+
import "../auth-B6anBtxF.js";
|
|
8
8
|
function x(t, n = {}) {
|
|
9
9
|
function c(i, l, e) {
|
|
10
10
|
typeof i.__ == "object" && (e = e ? { ...e, ...i.__ } : i.__);
|
package/dist/utils/store.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@reduxjs/toolkit"),u=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@reduxjs/toolkit"),u=require("@reduxjs/toolkit/query");function c({reducer:t,middlewares:r=[],preloadedState:o={}}){const e=i.configureStore({reducer:t,middleware:n=>n().concat(r),preloadedState:o});return u.setupListeners(e.dispatch),e}exports.makeStore=c;
|
|
2
2
|
//# sourceMappingURL=store.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.cjs.js","sources":["../../src/utils/store.ts"],"sourcesContent":["import type { Middleware, Reducer } from \"@reduxjs/toolkit\"\nimport { configureStore } from \"@reduxjs/toolkit\"\nimport { setupListeners } from \"@reduxjs/toolkit/query\"\n\n// The store setup is wrapped in `makeStore` to allow reuse\n// when setting up tests that need the same store config\nexport function makeStore<R extends Reducer>({\n reducer,\n middlewares = [],\n preloadedState = {},\n}: {\n reducer: R\n middlewares?: Middleware[]\n preloadedState?: Partial<ReturnType<R>>\n}) {\n const store = configureStore({\n reducer,\n // Adding the api middleware enables caching, invalidation, polling,\n // and other useful features of `rtk-query`.\n middleware: getDefaultMiddleware => {\n return getDefaultMiddleware().concat(middlewares)\n },\n preloadedState,\n })\n\n // configure listeners using the provided defaults\n // optional, but required for `refetchOnFocus`/`refetchOnReconnect` behaviors\n setupListeners(store.dispatch)\n\n return store\n}\n"],"names":["makeStore","reducer","middlewares","preloadedState","store","configureStore","getDefaultMiddleware","setupListeners"],"mappings":"
|
|
1
|
+
{"version":3,"file":"store.cjs.js","sources":["../../src/utils/store.ts"],"sourcesContent":["import type { Middleware, Reducer } from \"@reduxjs/toolkit\"\nimport { configureStore } from \"@reduxjs/toolkit\"\nimport { setupListeners } from \"@reduxjs/toolkit/query\"\n\n// The store setup is wrapped in `makeStore` to allow reuse\n// when setting up tests that need the same store config\nexport function makeStore<R extends Reducer>({\n reducer,\n middlewares = [],\n preloadedState = {},\n}: {\n reducer: R\n middlewares?: Middleware[]\n preloadedState?: Partial<ReturnType<R>>\n}) {\n const store = configureStore({\n reducer,\n // Adding the api middleware enables caching, invalidation, polling,\n // and other useful features of `rtk-query`.\n middleware: getDefaultMiddleware => {\n return getDefaultMiddleware().concat(middlewares)\n },\n preloadedState,\n })\n\n // configure listeners using the provided defaults\n // optional, but required for `refetchOnFocus`/`refetchOnReconnect` behaviors\n setupListeners(store.dispatch)\n\n return store\n}\n"],"names":["makeStore","reducer","middlewares","preloadedState","store","configureStore","getDefaultMiddleware","setupListeners"],"mappings":"wJAMO,SAASA,EAA6B,CAC3C,QAAAC,EACA,YAAAC,EAAc,CAAA,EACd,eAAAC,EAAiB,CAAA,CACnB,EAIG,CACD,MAAMC,EAAQC,EAAAA,eAAe,CAC3B,QAAAJ,EAGA,WAAYK,GACHA,EAAA,EAAuB,OAAOJ,CAAW,EAElD,eAAAC,CAAA,CACD,EAIDI,OAAAA,EAAAA,eAAeH,EAAM,QAAQ,EAEtBA,CACT"}
|
package/dist/utils/store.es.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { configureStore as
|
|
2
|
-
import {
|
|
3
|
-
function
|
|
1
|
+
import { configureStore as i } from "@reduxjs/toolkit";
|
|
2
|
+
import { setupListeners as c } from "@reduxjs/toolkit/query";
|
|
3
|
+
function p({
|
|
4
4
|
reducer: t,
|
|
5
5
|
middlewares: e = [],
|
|
6
6
|
preloadedState: o = {}
|
|
7
7
|
}) {
|
|
8
|
-
const r =
|
|
8
|
+
const r = i({
|
|
9
9
|
reducer: t,
|
|
10
10
|
// Adding the api middleware enables caching, invalidation, polling,
|
|
11
11
|
// and other useful features of `rtk-query`.
|
|
12
12
|
middleware: (n) => n().concat(e),
|
|
13
13
|
preloadedState: o
|
|
14
14
|
});
|
|
15
|
-
return
|
|
15
|
+
return c(r.dispatch), r;
|
|
16
16
|
}
|
|
17
17
|
export {
|
|
18
|
-
|
|
18
|
+
p as makeStore
|
|
19
19
|
};
|
|
20
20
|
//# sourceMappingURL=store.es.js.map
|
package/dist/utils/test.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime");require("@testing-library/dom");const n=require("@testing-library/react");require("react-dom/client");const s=require("@testing-library/user-event"),q=require("react-redux"),l=require("./store.cjs.js");function S(e,r={}){return{user:s.setup(),...n.render(e,r)}}function W(e,r,u={}){const{middlewares:i,preloadedState:o,store:t=l.makeStore({reducer:r,middlewares:i,preloadedState:o}),...d}=u,c=({children:a})=>p.jsx(q.Provider,{store:t,children:a});return{store:t,user:s.setup(),...n.render(e,{wrapper:c,...d})}}exports.renderWithStore=W;exports.renderWithUser=S;
|
|
2
2
|
//# sourceMappingURL=test.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.cjs.js","sources":["../../src/utils/test.tsx"],"sourcesContent":["import type { Middleware, Reducer, Store } from \"@reduxjs/toolkit\"\nimport type { PropsWithChildren, ReactElement } from \"react\"\nimport { type Queries, type queries } from \"@testing-library/dom\"\nimport {\n type RenderOptions,\n type RenderResult,\n render,\n} from \"@testing-library/react\"\nimport {\n type Container as RendererableContainer,\n type hydrateRoot,\n} from \"react-dom/client\"\nimport userEvent, { type UserEvent } from \"@testing-library/user-event\"\nimport { Provider } from \"react-redux\"\n\nimport { makeStore } from \"./store\"\n\ntype HydrateableContainer = Parameters<typeof hydrateRoot>[0]\n\ntype RenderWithUserResult<\n Q extends Queries = typeof queries,\n Container extends RendererableContainer | HydrateableContainer = HTMLElement,\n BaseElement extends RendererableContainer | HydrateableContainer = Container,\n> = RenderResult<Q, Container, BaseElement> & { user: UserEvent }\n\nexport function renderWithUser<\n Q extends Queries = typeof queries,\n Container extends RendererableContainer | HydrateableContainer = HTMLElement,\n BaseElement extends RendererableContainer | HydrateableContainer = Container,\n>(\n ui: ReactElement,\n renderOptions: RenderOptions<Q, Container, BaseElement> = {},\n): RenderWithUserResult<Q, Container, BaseElement> {\n return {\n user: userEvent.setup(),\n ...render(ui, renderOptions),\n }\n}\n\n/**\n * Renders the given React element with Redux Provider and custom store.\n * This function is useful for testing components that are connected to the\n * Redux store.\n *\n * @param ui - The React component or element to render.\n * @param reducer - The root reducer to use for the store.\n * @param extendedRenderOptions - Optional configuration options for rendering.\n * This includes `preloadedState` for initial Redux state and `store` for a\n * specific Redux store instance. Any additional properties are passed to React\n * Testing Library's render function.\n * @returns An object containing the Redux store used in the render, User event\n * API for simulating user interactions in tests, and all of React Testing\n * Library's query functions for testing the component.\n */\nexport function renderWithStore<\n R extends Reducer,\n Q extends Queries = typeof queries,\n Container extends RendererableContainer | HydrateableContainer = HTMLElement,\n BaseElement extends RendererableContainer | HydrateableContainer = Container,\n>(\n ui: ReactElement,\n reducer: R,\n extendedRenderOptions: RenderOptions<Q, Container, BaseElement> & {\n /**\n * The middlewares used to create the Redux store.\n */\n middlewares?: Middleware[]\n\n /**\n * Defines a specific portion or the entire initial state for the Redux store.\n * This is particularly useful for initializing the state in a\n * controlled manner during testing, allowing components to be rendered\n * with predetermined state conditions.\n */\n preloadedState?: Partial<ReturnType<R>>\n\n /**\n * Allows the use of a specific Redux store instance instead of a\n * default or global store. This flexibility is beneficial when\n * testing components with unique store requirements or when isolating\n * tests from a global store state. The custom store should be configured\n * to match the structure and middleware of the store used by the application.\n *\n * @default makeStore({reducer,middlewares,preloadedState})\n */\n store?: Store\n } = {},\n): RenderWithUserResult<Q, Container, BaseElement> & {\n store: ReturnType<typeof makeStore<R>>\n} {\n const {\n middlewares,\n preloadedState,\n // Automatically create a store instance if no store was passed in\n store = makeStore({ reducer, middlewares, preloadedState }),\n ...renderOptions\n } = extendedRenderOptions\n\n const Wrapper = ({ children }: PropsWithChildren) => (\n <Provider store={store}>{children}</Provider>\n )\n\n // Return an object with the store and all of RTL's query functions\n return {\n store,\n user: userEvent.setup(),\n ...render(ui, { wrapper: Wrapper, ...renderOptions }),\n }\n}\n"],"names":["renderWithUser","ui","renderOptions","userEvent","render","renderWithStore","reducer","extendedRenderOptions","middlewares","preloadedState","store","makeStore","Wrapper","children","jsx","Provider"],"mappings":"+
|
|
1
|
+
{"version":3,"file":"test.cjs.js","sources":["../../src/utils/test.tsx"],"sourcesContent":["import type { Middleware, Reducer, Store } from \"@reduxjs/toolkit\"\nimport type { PropsWithChildren, ReactElement } from \"react\"\nimport { type Queries, type queries } from \"@testing-library/dom\"\nimport {\n type RenderOptions,\n type RenderResult,\n render,\n} from \"@testing-library/react\"\nimport {\n type Container as RendererableContainer,\n type hydrateRoot,\n} from \"react-dom/client\"\nimport userEvent, { type UserEvent } from \"@testing-library/user-event\"\nimport { Provider } from \"react-redux\"\n\nimport { makeStore } from \"./store\"\n\ntype HydrateableContainer = Parameters<typeof hydrateRoot>[0]\n\ntype RenderWithUserResult<\n Q extends Queries = typeof queries,\n Container extends RendererableContainer | HydrateableContainer = HTMLElement,\n BaseElement extends RendererableContainer | HydrateableContainer = Container,\n> = RenderResult<Q, Container, BaseElement> & { user: UserEvent }\n\nexport function renderWithUser<\n Q extends Queries = typeof queries,\n Container extends RendererableContainer | HydrateableContainer = HTMLElement,\n BaseElement extends RendererableContainer | HydrateableContainer = Container,\n>(\n ui: ReactElement,\n renderOptions: RenderOptions<Q, Container, BaseElement> = {},\n): RenderWithUserResult<Q, Container, BaseElement> {\n return {\n user: userEvent.setup(),\n ...render(ui, renderOptions),\n }\n}\n\n/**\n * Renders the given React element with Redux Provider and custom store.\n * This function is useful for testing components that are connected to the\n * Redux store.\n *\n * @param ui - The React component or element to render.\n * @param reducer - The root reducer to use for the store.\n * @param extendedRenderOptions - Optional configuration options for rendering.\n * This includes `preloadedState` for initial Redux state and `store` for a\n * specific Redux store instance. Any additional properties are passed to React\n * Testing Library's render function.\n * @returns An object containing the Redux store used in the render, User event\n * API for simulating user interactions in tests, and all of React Testing\n * Library's query functions for testing the component.\n */\nexport function renderWithStore<\n R extends Reducer,\n Q extends Queries = typeof queries,\n Container extends RendererableContainer | HydrateableContainer = HTMLElement,\n BaseElement extends RendererableContainer | HydrateableContainer = Container,\n>(\n ui: ReactElement,\n reducer: R,\n extendedRenderOptions: RenderOptions<Q, Container, BaseElement> & {\n /**\n * The middlewares used to create the Redux store.\n */\n middlewares?: Middleware[]\n\n /**\n * Defines a specific portion or the entire initial state for the Redux store.\n * This is particularly useful for initializing the state in a\n * controlled manner during testing, allowing components to be rendered\n * with predetermined state conditions.\n */\n preloadedState?: Partial<ReturnType<R>>\n\n /**\n * Allows the use of a specific Redux store instance instead of a\n * default or global store. This flexibility is beneficial when\n * testing components with unique store requirements or when isolating\n * tests from a global store state. The custom store should be configured\n * to match the structure and middleware of the store used by the application.\n *\n * @default makeStore({reducer,middlewares,preloadedState})\n */\n store?: Store\n } = {},\n): RenderWithUserResult<Q, Container, BaseElement> & {\n store: ReturnType<typeof makeStore<R>>\n} {\n const {\n middlewares,\n preloadedState,\n // Automatically create a store instance if no store was passed in\n store = makeStore({ reducer, middlewares, preloadedState }),\n ...renderOptions\n } = extendedRenderOptions\n\n const Wrapper = ({ children }: PropsWithChildren) => (\n <Provider store={store}>{children}</Provider>\n )\n\n // Return an object with the store and all of RTL's query functions\n return {\n store,\n user: userEvent.setup(),\n ...render(ui, { wrapper: Wrapper, ...renderOptions }),\n }\n}\n"],"names":["renderWithUser","ui","renderOptions","userEvent","render","renderWithStore","reducer","extendedRenderOptions","middlewares","preloadedState","store","makeStore","Wrapper","children","jsx","Provider"],"mappings":"+TAyBO,SAASA,EAKdC,EACAC,EAA0D,GACT,CACjD,MAAO,CACL,KAAMC,EAAU,MAAA,EAChB,GAAGC,EAAAA,OAAOH,EAAIC,CAAa,CAAA,CAE/B,CAiBO,SAASG,EAMdJ,EACAK,EACAC,EAwBI,CAAA,EAGJ,CACA,KAAM,CACJ,YAAAC,EACA,eAAAC,EAEA,MAAAC,EAAQC,EAAAA,UAAU,CAAE,QAAAL,EAAS,YAAAE,EAAa,eAAAC,EAAgB,EAC1D,GAAGP,CAAA,EACDK,EAEEK,EAAU,CAAC,CAAE,SAAAC,CAAA,IACjBC,EAAAA,IAACC,WAAA,CAAS,MAAAL,EAAe,SAAAG,EAAS,EAIpC,MAAO,CACL,MAAAH,EACA,KAAMP,EAAU,MAAA,EAChB,GAAGC,EAAAA,OAAOH,EAAI,CAAE,QAASW,EAAS,GAAGV,EAAe,CAAA,CAExD"}
|
package/dist/utils/test.es.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
2
|
import "@testing-library/dom";
|
|
3
3
|
import { render as o } from "@testing-library/react";
|
|
4
|
-
import "
|
|
4
|
+
import "react-dom/client";
|
|
5
5
|
import p from "@testing-library/user-event";
|
|
6
|
-
import { Provider as
|
|
6
|
+
import { Provider as a } from "react-redux";
|
|
7
7
|
import { makeStore as c } from "./store.es.js";
|
|
8
|
-
function
|
|
8
|
+
function j(r, e = {}) {
|
|
9
9
|
return {
|
|
10
10
|
user: p.setup(),
|
|
11
11
|
...o(r, e)
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function k(r, e, i = {}) {
|
|
15
15
|
const {
|
|
16
16
|
middlewares: m,
|
|
17
17
|
preloadedState: n,
|
|
18
18
|
// Automatically create a store instance if no store was passed in
|
|
19
19
|
store: t = c({ reducer: e, middlewares: m, preloadedState: n }),
|
|
20
20
|
...s
|
|
21
|
-
} = i,
|
|
21
|
+
} = i, d = ({ children: u }) => /* @__PURE__ */ f(a, { store: t, children: u });
|
|
22
22
|
return {
|
|
23
23
|
store: t,
|
|
24
24
|
user: p.setup(),
|
|
25
|
-
...o(r, { wrapper:
|
|
25
|
+
...o(r, { wrapper: d, ...s })
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
k as renderWithStore,
|
|
30
|
+
j as renderWithUser
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=test.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.es.js","sources":["../../src/utils/test.tsx"],"sourcesContent":["import type { Middleware, Reducer, Store } from \"@reduxjs/toolkit\"\nimport type { PropsWithChildren, ReactElement } from \"react\"\nimport { type Queries, type queries } from \"@testing-library/dom\"\nimport {\n type RenderOptions,\n type RenderResult,\n render,\n} from \"@testing-library/react\"\nimport {\n type Container as RendererableContainer,\n type hydrateRoot,\n} from \"react-dom/client\"\nimport userEvent, { type UserEvent } from \"@testing-library/user-event\"\nimport { Provider } from \"react-redux\"\n\nimport { makeStore } from \"./store\"\n\ntype HydrateableContainer = Parameters<typeof hydrateRoot>[0]\n\ntype RenderWithUserResult<\n Q extends Queries = typeof queries,\n Container extends RendererableContainer | HydrateableContainer = HTMLElement,\n BaseElement extends RendererableContainer | HydrateableContainer = Container,\n> = RenderResult<Q, Container, BaseElement> & { user: UserEvent }\n\nexport function renderWithUser<\n Q extends Queries = typeof queries,\n Container extends RendererableContainer | HydrateableContainer = HTMLElement,\n BaseElement extends RendererableContainer | HydrateableContainer = Container,\n>(\n ui: ReactElement,\n renderOptions: RenderOptions<Q, Container, BaseElement> = {},\n): RenderWithUserResult<Q, Container, BaseElement> {\n return {\n user: userEvent.setup(),\n ...render(ui, renderOptions),\n }\n}\n\n/**\n * Renders the given React element with Redux Provider and custom store.\n * This function is useful for testing components that are connected to the\n * Redux store.\n *\n * @param ui - The React component or element to render.\n * @param reducer - The root reducer to use for the store.\n * @param extendedRenderOptions - Optional configuration options for rendering.\n * This includes `preloadedState` for initial Redux state and `store` for a\n * specific Redux store instance. Any additional properties are passed to React\n * Testing Library's render function.\n * @returns An object containing the Redux store used in the render, User event\n * API for simulating user interactions in tests, and all of React Testing\n * Library's query functions for testing the component.\n */\nexport function renderWithStore<\n R extends Reducer,\n Q extends Queries = typeof queries,\n Container extends RendererableContainer | HydrateableContainer = HTMLElement,\n BaseElement extends RendererableContainer | HydrateableContainer = Container,\n>(\n ui: ReactElement,\n reducer: R,\n extendedRenderOptions: RenderOptions<Q, Container, BaseElement> & {\n /**\n * The middlewares used to create the Redux store.\n */\n middlewares?: Middleware[]\n\n /**\n * Defines a specific portion or the entire initial state for the Redux store.\n * This is particularly useful for initializing the state in a\n * controlled manner during testing, allowing components to be rendered\n * with predetermined state conditions.\n */\n preloadedState?: Partial<ReturnType<R>>\n\n /**\n * Allows the use of a specific Redux store instance instead of a\n * default or global store. This flexibility is beneficial when\n * testing components with unique store requirements or when isolating\n * tests from a global store state. The custom store should be configured\n * to match the structure and middleware of the store used by the application.\n *\n * @default makeStore({reducer,middlewares,preloadedState})\n */\n store?: Store\n } = {},\n): RenderWithUserResult<Q, Container, BaseElement> & {\n store: ReturnType<typeof makeStore<R>>\n} {\n const {\n middlewares,\n preloadedState,\n // Automatically create a store instance if no store was passed in\n store = makeStore({ reducer, middlewares, preloadedState }),\n ...renderOptions\n } = extendedRenderOptions\n\n const Wrapper = ({ children }: PropsWithChildren) => (\n <Provider store={store}>{children}</Provider>\n )\n\n // Return an object with the store and all of RTL's query functions\n return {\n store,\n user: userEvent.setup(),\n ...render(ui, { wrapper: Wrapper, ...renderOptions }),\n }\n}\n"],"names":["renderWithUser","ui","renderOptions","userEvent","render","renderWithStore","reducer","extendedRenderOptions","middlewares","preloadedState","store","makeStore","Wrapper","children","jsx","Provider"],"mappings":";;;;;;;AAyBO,SAASA,EAKdC,GACAC,IAA0D,IACT;AACjD,SAAO;AAAA,IACL,MAAMC,EAAU,MAAA;AAAA,IAChB,GAAGC,EAAOH,GAAIC,CAAa;AAAA,EAAA;AAE/B;AAiBO,SAASG,EAMdJ,GACAK,GACAC,IAwBI,CAAA,GAGJ;AACA,QAAM;AAAA,IACJ,aAAAC;AAAA,IACA,gBAAAC;AAAA;AAAA,IAEA,OAAAC,IAAQC,EAAU,EAAE,SAAAL,GAAS,aAAAE,GAAa,gBAAAC,GAAgB;AAAA,IAC1D,GAAGP;AAAA,EAAA,IACDK,GAEEK,IAAU,CAAC,EAAE,UAAAC,EAAA,
|
|
1
|
+
{"version":3,"file":"test.es.js","sources":["../../src/utils/test.tsx"],"sourcesContent":["import type { Middleware, Reducer, Store } from \"@reduxjs/toolkit\"\nimport type { PropsWithChildren, ReactElement } from \"react\"\nimport { type Queries, type queries } from \"@testing-library/dom\"\nimport {\n type RenderOptions,\n type RenderResult,\n render,\n} from \"@testing-library/react\"\nimport {\n type Container as RendererableContainer,\n type hydrateRoot,\n} from \"react-dom/client\"\nimport userEvent, { type UserEvent } from \"@testing-library/user-event\"\nimport { Provider } from \"react-redux\"\n\nimport { makeStore } from \"./store\"\n\ntype HydrateableContainer = Parameters<typeof hydrateRoot>[0]\n\ntype RenderWithUserResult<\n Q extends Queries = typeof queries,\n Container extends RendererableContainer | HydrateableContainer = HTMLElement,\n BaseElement extends RendererableContainer | HydrateableContainer = Container,\n> = RenderResult<Q, Container, BaseElement> & { user: UserEvent }\n\nexport function renderWithUser<\n Q extends Queries = typeof queries,\n Container extends RendererableContainer | HydrateableContainer = HTMLElement,\n BaseElement extends RendererableContainer | HydrateableContainer = Container,\n>(\n ui: ReactElement,\n renderOptions: RenderOptions<Q, Container, BaseElement> = {},\n): RenderWithUserResult<Q, Container, BaseElement> {\n return {\n user: userEvent.setup(),\n ...render(ui, renderOptions),\n }\n}\n\n/**\n * Renders the given React element with Redux Provider and custom store.\n * This function is useful for testing components that are connected to the\n * Redux store.\n *\n * @param ui - The React component or element to render.\n * @param reducer - The root reducer to use for the store.\n * @param extendedRenderOptions - Optional configuration options for rendering.\n * This includes `preloadedState` for initial Redux state and `store` for a\n * specific Redux store instance. Any additional properties are passed to React\n * Testing Library's render function.\n * @returns An object containing the Redux store used in the render, User event\n * API for simulating user interactions in tests, and all of React Testing\n * Library's query functions for testing the component.\n */\nexport function renderWithStore<\n R extends Reducer,\n Q extends Queries = typeof queries,\n Container extends RendererableContainer | HydrateableContainer = HTMLElement,\n BaseElement extends RendererableContainer | HydrateableContainer = Container,\n>(\n ui: ReactElement,\n reducer: R,\n extendedRenderOptions: RenderOptions<Q, Container, BaseElement> & {\n /**\n * The middlewares used to create the Redux store.\n */\n middlewares?: Middleware[]\n\n /**\n * Defines a specific portion or the entire initial state for the Redux store.\n * This is particularly useful for initializing the state in a\n * controlled manner during testing, allowing components to be rendered\n * with predetermined state conditions.\n */\n preloadedState?: Partial<ReturnType<R>>\n\n /**\n * Allows the use of a specific Redux store instance instead of a\n * default or global store. This flexibility is beneficial when\n * testing components with unique store requirements or when isolating\n * tests from a global store state. The custom store should be configured\n * to match the structure and middleware of the store used by the application.\n *\n * @default makeStore({reducer,middlewares,preloadedState})\n */\n store?: Store\n } = {},\n): RenderWithUserResult<Q, Container, BaseElement> & {\n store: ReturnType<typeof makeStore<R>>\n} {\n const {\n middlewares,\n preloadedState,\n // Automatically create a store instance if no store was passed in\n store = makeStore({ reducer, middlewares, preloadedState }),\n ...renderOptions\n } = extendedRenderOptions\n\n const Wrapper = ({ children }: PropsWithChildren) => (\n <Provider store={store}>{children}</Provider>\n )\n\n // Return an object with the store and all of RTL's query functions\n return {\n store,\n user: userEvent.setup(),\n ...render(ui, { wrapper: Wrapper, ...renderOptions }),\n }\n}\n"],"names":["renderWithUser","ui","renderOptions","userEvent","render","renderWithStore","reducer","extendedRenderOptions","middlewares","preloadedState","store","makeStore","Wrapper","children","jsx","Provider"],"mappings":";;;;;;;AAyBO,SAASA,EAKdC,GACAC,IAA0D,IACT;AACjD,SAAO;AAAA,IACL,MAAMC,EAAU,MAAA;AAAA,IAChB,GAAGC,EAAOH,GAAIC,CAAa;AAAA,EAAA;AAE/B;AAiBO,SAASG,EAMdJ,GACAK,GACAC,IAwBI,CAAA,GAGJ;AACA,QAAM;AAAA,IACJ,aAAAC;AAAA,IACA,gBAAAC;AAAA;AAAA,IAEA,OAAAC,IAAQC,EAAU,EAAE,SAAAL,GAAS,aAAAE,GAAa,gBAAAC,GAAgB;AAAA,IAC1D,GAAGP;AAAA,EAAA,IACDK,GAEEK,IAAU,CAAC,EAAE,UAAAC,EAAA,MACjB,gBAAAC,EAACC,GAAA,EAAS,OAAAL,GAAe,UAAAG,GAAS;AAIpC,SAAO;AAAA,IACL,OAAAH;AAAA,IACA,MAAMP,EAAU,MAAA;AAAA,IAChB,GAAGC,EAAOH,GAAI,EAAE,SAASW,GAAS,GAAGV,GAAe;AAAA,EAAA;AAExD;"}
|
package/dist/utils/theme.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("@mui/material");require("react");const e=require("../index-D2B9uIE4.cjs");exports.getClassNames=e.getClassNames;exports.getStyleOverrides=e.getStyleOverrides;exports.includesClassNames=e.includesClassNames;exports.insertDividerBetweenElements=e.insertDividerBetweenElements;exports.matchClassNames=e.matchClassNames;
|
|
2
2
|
//# sourceMappingURL=theme.cjs.js.map
|
package/dist/utils/theme.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
2
|
import "@mui/material";
|
|
3
3
|
import "react";
|
|
4
|
-
import { b as i, g as r, i as l, a as o, m as n } from "../index-
|
|
4
|
+
import { b as i, g as r, i as l, a as o, m as n } from "../index-CDxf6gMv.js";
|
|
5
5
|
export {
|
|
6
6
|
i as getClassNames,
|
|
7
7
|
r as getStyleOverrides,
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const u=require("./jsx-runtime-B2pbW5Fp.cjs"),a=require("react"),m=require("@mui/material");require("./auth-BwpsrTko.cjs");const x=require("./general-Bo6JGvKB.cjs");require("react-router");require("yup");require("@mui/icons-material");require("./palette-BnIdHKDE.cjs");const c=({seconds:e,start:n=!0,onEnd:i,...o})=>{e=Math.floor(e);const r=x.useCountdown(e)[0],[s,q]=a.useState(!n);r===0&&!s&&(q(!0),i()),e=Math.floor(r%60);const t=Math.floor(r/60);return u.jsxRuntimeExports.jsx(u.jsxRuntimeExports.Fragment,{children:r>0&&u.jsxRuntimeExports.jsxs(m.Typography,{...o,children:[t>0&&`${t} ${t>1?"mins":"min"} `,e>0&&`${e} ${e>1?"secs":"sec"}`]})})};exports.Countdown=c;
|
|
2
|
-
//# sourceMappingURL=Countdown-BtUbr1J_.cjs.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { j as m } from "./jsx-runtime-lzYHhGH3.js";
|
|
2
|
-
import { useState as u } from "react";
|
|
3
|
-
import { Typography as a } from "@mui/material";
|
|
4
|
-
import "./auth-Bb8WkZGN.js";
|
|
5
|
-
import { u as f } from "./general-D7Hqi3gj.js";
|
|
6
|
-
import "react-router";
|
|
7
|
-
import "yup";
|
|
8
|
-
import "@mui/icons-material";
|
|
9
|
-
import "./palette-CYwuLBW7.js";
|
|
10
|
-
const w = ({
|
|
11
|
-
seconds: t,
|
|
12
|
-
start: i = !0,
|
|
13
|
-
onEnd: n,
|
|
14
|
-
...p
|
|
15
|
-
}) => {
|
|
16
|
-
t = Math.floor(t);
|
|
17
|
-
const r = f(t)[0], [e, s] = u(!i);
|
|
18
|
-
r === 0 && !e && (s(!0), n()), t = Math.floor(r % 60);
|
|
19
|
-
const o = Math.floor(r / 60);
|
|
20
|
-
return /* @__PURE__ */ m.jsx(m.Fragment, { children: r > 0 && /* @__PURE__ */ m.jsxs(a, { ...p, children: [
|
|
21
|
-
o > 0 && `${o} ${o > 1 ? "mins" : "min"} `,
|
|
22
|
-
t > 0 && `${t} ${t > 1 ? "secs" : "sec"}`
|
|
23
|
-
] }) });
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
w as C
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=Countdown-DhjAmB0u.js.map
|
package/dist/Image-CgRVUblT.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("./jsx-runtime-B2pbW5Fp.cjs"),c=require("@mui/material");require("react");const l=require("./utils/general.cjs.js"),u=({href:i,hrefInNewTab:o=!1,...r})=>{let{onClick:t,style:e={},...n}=r;return e.width===void 0&&(e.width="100%"),i!==void 0&&(e={...e,cursor:"pointer"},o?t=()=>{l.openInNewTab(i)}:t=()=>{window.location.replace(i)}),s.jsxRuntimeExports.jsx(c.Box,{component:"img",onClick:t,style:e,...n})};exports.Image=u;
|
|
2
|
-
//# sourceMappingURL=Image-CgRVUblT.cjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const r=require("./jsx-runtime-B2pbW5Fp.cjs"),t=require("@mui/material");require("react");const n=require("react-router");require("@mui/icons-material");require("./palette-BnIdHKDE.cjs");require("./auth-BwpsrTko.cjs");const u=e=>r.jsxRuntimeExports.jsx(t.Button,{...e,component:n.Link});exports.LinkButton=u;
|
|
2
|
-
//# sourceMappingURL=LinkButton-Kw2brLTK.cjs.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { j as t } from "./jsx-runtime-lzYHhGH3.js";
|
|
2
|
-
import { Button as r } from "@mui/material";
|
|
3
|
-
import "react";
|
|
4
|
-
import { Link as m } from "react-router";
|
|
5
|
-
import "@mui/icons-material";
|
|
6
|
-
import "./palette-CYwuLBW7.js";
|
|
7
|
-
import "./auth-Bb8WkZGN.js";
|
|
8
|
-
const f = (o) => /* @__PURE__ */ t.jsx(r, { ...o, component: m });
|
|
9
|
-
export {
|
|
10
|
-
f as L
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=LinkButton-sQ5jgHnX.js.map
|