diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1eb01f01..efe9a19d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,8 +23,30 @@ jobs: with: node-version: 22 + build: + needs: [test] + runs-on: ubuntu-latest + steps: + - name: 🌐 Set up JavaScript 22 Environment + uses: ocadotechnology/codeforlife-workspace/.github/actions/javascript/setup-environment@main + with: + node-version: 22 + install-args: --production=false + + - name: 📥 Download TypeScript Config Files + uses: ocadotechnology/codeforlife-workspace/.github/actions/workspace/frontend/download-typescript-configs@main + + - name: 🏗️ Build Dist Files + run: yarn run vite build + + - name: 📤 Push Dist Files + uses: ocadotechnology/codeforlife-workspace/.github/actions/git/add-commit-push@main + with: + add: dist + commit-message: "built distribution files" + release: - needs: [test] # TODO: add contributor + needs: [build] # TODO: add contributor concurrency: release runs-on: ubuntu-latest permissions: diff --git a/dist/Countdown-DFI1RljW.js b/dist/Countdown-DFI1RljW.js new file mode 100644 index 00000000..49741767 --- /dev/null +++ b/dist/Countdown-DFI1RljW.js @@ -0,0 +1,28 @@ +import { j as m } from "./jsx-runtime-Dpn_P65e.js"; +import { useState as s } from "react"; +import { Typography as u } from "@mui/material"; +import "./auth-BPfUPjmM.js"; +import { a as f } from "./general-CtTJPCJn.js"; +import "react-router-dom"; +import "yup"; +import "@mui/icons-material"; +import "./palette-C_L0akN_.js"; +const w = ({ + seconds: t, + start: i = !0, + onEnd: n, + ...p +}) => { + t = Math.floor(t); + const r = f(t)[0], [e, a] = s(!i); + r === 0 && !e && (a(!0), n()), t = Math.floor(r % 60); + const o = Math.floor(r / 60); + return /* @__PURE__ */ m.jsx(m.Fragment, { children: r > 0 && /* @__PURE__ */ m.jsxs(u, { ...p, children: [ + o > 0 && `${o} ${o > 1 ? "mins" : "min"} `, + t > 0 && `${t} ${t > 1 ? "secs" : "sec"}` + ] }) }); +}; +export { + w as C +}; +//# sourceMappingURL=Countdown-DFI1RljW.js.map diff --git a/dist/Countdown-DFI1RljW.js.map b/dist/Countdown-DFI1RljW.js.map new file mode 100644 index 00000000..166af710 --- /dev/null +++ b/dist/Countdown-DFI1RljW.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Countdown-DFI1RljW.js","sources":["../src/components/Countdown.tsx"],"sourcesContent":["import { type FC, useState } from \"react\"\nimport { Typography, type TypographyProps } from \"@mui/material\"\n\nimport { useCountdown } from \"../hooks\"\n\nexport interface CountdownProps extends Omit {\n seconds: number\n start?: boolean\n onEnd: () => void\n}\n\nconst Countdown: FC = ({\n seconds,\n start = true,\n onEnd,\n ...typographyProps\n}) => {\n seconds = Math.floor(seconds)\n const _seconds = useCountdown(seconds)[0]\n const [end, setEnd] = useState(!start)\n\n if (_seconds === 0 && !end) {\n setEnd(true)\n onEnd()\n }\n\n seconds = Math.floor(_seconds % 60)\n const minutes = Math.floor(_seconds / 60)\n\n return (\n <>\n {_seconds > 0 && (\n \n {minutes > 0 && `${minutes} ${minutes > 1 ? \"mins\" : \"min\"} `}\n {seconds > 0 && `${seconds} ${seconds > 1 ? \"secs\" : \"sec\"}`}\n \n )}\n \n )\n}\n\nexport default Countdown\n"],"names":["Countdown","seconds","start","onEnd","typographyProps","_seconds","useCountdown","end","setEnd","useState","minutes","jsxs","Typography"],"mappings":";;;;;;;;;AAWA,MAAMA,IAAgC,CAAC;AAAA,EACrC,SAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,OAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,EAAAH,IAAU,KAAK,MAAMA,CAAO;AAC5B,QAAMI,IAAWC,EAAaL,CAAO,EAAE,CAAC,GAClC,CAACM,GAAKC,CAAM,IAAIC,EAAS,CAACP,CAAK;AAErC,EAAIG,MAAa,KAAK,CAACE,MACrBC,EAAO,EAAI,GACXL,EAAA,IAGFF,IAAU,KAAK,MAAMI,IAAW,EAAE;AAClC,QAAMK,IAAU,KAAK,MAAML,IAAW,EAAE;AAExC,6CAEK,UAAAA,IAAW,KACVM,gBAAAA,EAAAA,KAACC,GAAA,EAAY,GAAGR,GACb,UAAA;AAAA,IAAAM,IAAU,KAAK,GAAGA,CAAO,IAAIA,IAAU,IAAI,SAAS,KAAK;AAAA,IACzDT,IAAU,KAAK,GAAGA,CAAO,IAAIA,IAAU,IAAI,SAAS,KAAK;AAAA,EAAA,EAAA,CAC5D,EAAA,CAEJ;AAEJ;"} \ No newline at end of file diff --git a/dist/Countdown-zY3nMzmi.cjs b/dist/Countdown-zY3nMzmi.cjs new file mode 100644 index 00000000..0313c85c --- /dev/null +++ b/dist/Countdown-zY3nMzmi.cjs @@ -0,0 +1,2 @@ +"use strict";const n=require("./jsx-runtime-CeSfJrVB.cjs"),c=require("react"),m=require("@mui/material");require("./auth-Vf1MgMci.cjs");const q=require("./general-BPbbmkeX.cjs");require("react-router-dom");require("yup");require("@mui/icons-material");require("./palette-CE2mKYse.cjs");const x=({seconds:e,start:u=!0,onEnd:i,...o})=>{e=Math.floor(e);const r=q.useCountdown(e)[0],[s,a]=c.useState(!u);r===0&&!s&&(a(!0),i()),e=Math.floor(r%60);const t=Math.floor(r/60);return n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:r>0&&n.jsxRuntimeExports.jsxs(m.Typography,{...o,children:[t>0&&`${t} ${t>1?"mins":"min"} `,e>0&&`${e} ${e>1?"secs":"sec"}`]})})};exports.Countdown=x; +//# sourceMappingURL=Countdown-zY3nMzmi.cjs.map diff --git a/dist/Countdown-zY3nMzmi.cjs.map b/dist/Countdown-zY3nMzmi.cjs.map new file mode 100644 index 00000000..fa5ec8b3 --- /dev/null +++ b/dist/Countdown-zY3nMzmi.cjs.map @@ -0,0 +1 @@ +{"version":3,"file":"Countdown-zY3nMzmi.cjs","sources":["../src/components/Countdown.tsx"],"sourcesContent":["import { type FC, useState } from \"react\"\nimport { Typography, type TypographyProps } from \"@mui/material\"\n\nimport { useCountdown } from \"../hooks\"\n\nexport interface CountdownProps extends Omit {\n seconds: number\n start?: boolean\n onEnd: () => void\n}\n\nconst Countdown: FC = ({\n seconds,\n start = true,\n onEnd,\n ...typographyProps\n}) => {\n seconds = Math.floor(seconds)\n const _seconds = useCountdown(seconds)[0]\n const [end, setEnd] = useState(!start)\n\n if (_seconds === 0 && !end) {\n setEnd(true)\n onEnd()\n }\n\n seconds = Math.floor(_seconds % 60)\n const minutes = Math.floor(_seconds / 60)\n\n return (\n <>\n {_seconds > 0 && (\n \n {minutes > 0 && `${minutes} ${minutes > 1 ? \"mins\" : \"min\"} `}\n {seconds > 0 && `${seconds} ${seconds > 1 ? \"secs\" : \"sec\"}`}\n \n )}\n \n )\n}\n\nexport default Countdown\n"],"names":["Countdown","seconds","start","onEnd","typographyProps","_seconds","useCountdown","end","setEnd","useState","minutes","jsxs","Typography"],"mappings":"8RAWA,MAAMA,EAAgC,CAAC,CACrC,QAAAC,EACA,MAAAC,EAAQ,GACR,MAAAC,EACA,GAAGC,CACL,IAAM,CACJH,EAAU,KAAK,MAAMA,CAAO,EAC5B,MAAMI,EAAWC,EAAAA,aAAaL,CAAO,EAAE,CAAC,EAClC,CAACM,EAAKC,CAAM,EAAIC,EAAAA,SAAS,CAACP,CAAK,EAEjCG,IAAa,GAAK,CAACE,IACrBC,EAAO,EAAI,EACXL,EAAA,GAGFF,EAAU,KAAK,MAAMI,EAAW,EAAE,EAClC,MAAMK,EAAU,KAAK,MAAML,EAAW,EAAE,EAExC,6DAEK,SAAAA,EAAW,GACVM,EAAAA,kBAAAA,KAACC,EAAAA,WAAA,CAAY,GAAGR,EACb,SAAA,CAAAM,EAAU,GAAK,GAAGA,CAAO,IAAIA,EAAU,EAAI,OAAS,KAAK,IACzDT,EAAU,GAAK,GAAGA,CAAO,IAAIA,EAAU,EAAI,OAAS,KAAK,EAAA,CAAA,CAC5D,CAAA,CAEJ,CAEJ"} \ No newline at end of file diff --git a/dist/Image-D5jC9UoX.js b/dist/Image-D5jC9UoX.js new file mode 100644 index 00000000..86f6d47c --- /dev/null +++ b/dist/Image-D5jC9UoX.js @@ -0,0 +1,21 @@ +import { j as n } from "./jsx-runtime-Dpn_P65e.js"; +import { Box as p } from "@mui/material"; +import "react"; +import { openInNewTab as s } from "./utils/general.es.js"; +const f = ({ href: i, hrefInNewTab: r = !1, ...e }) => { + let { + onClick: t, + style: o = {}, + ...m + // eslint-disable-line prefer-const + } = e; + return o.width === void 0 && (o.width = "100%"), i !== void 0 && (o = { ...o, cursor: "pointer" }, r ? t = () => { + s(i); + } : t = () => { + window.location.replace(i); + }), /* @__PURE__ */ n.jsx(p, { component: "img", onClick: t, style: o, ...m }); +}; +export { + f as I +}; +//# sourceMappingURL=Image-D5jC9UoX.js.map diff --git a/dist/Image-D5jC9UoX.js.map b/dist/Image-D5jC9UoX.js.map new file mode 100644 index 00000000..bc082583 --- /dev/null +++ b/dist/Image-D5jC9UoX.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Image-D5jC9UoX.js","sources":["../src/components/Image.tsx"],"sourcesContent":["import { Box, type BoxProps } from \"@mui/material\"\nimport { type FC } from \"react\"\n\nimport { openInNewTab } from \"../utils/general\"\n\nexport interface ImageProps extends Omit {\n alt: string\n src: string\n href?: string\n hrefInNewTab?: boolean\n}\n\nconst Image: FC = ({ href, hrefInNewTab = false, ...props }) => {\n let {\n onClick,\n style = {},\n ...otherProps // eslint-disable-line prefer-const\n } = props\n\n if (style.width === undefined) {\n style.width = \"100%\"\n }\n\n // Override onClick if href provided.\n if (href !== undefined) {\n style = { ...style, cursor: \"pointer\" }\n if (hrefInNewTab) {\n onClick = () => {\n openInNewTab(href)\n }\n } else {\n onClick = () => {\n window.location.replace(href)\n }\n }\n }\n\n return \n}\n\nexport default Image\n"],"names":["Image","href","hrefInNewTab","props","onClick","style","otherProps","openInNewTab","Box"],"mappings":";;;;AAYA,MAAMA,IAAwB,CAAC,EAAE,MAAAC,GAAM,cAAAC,IAAe,IAAO,GAAGC,QAAY;AAC1E,MAAI;AAAA,IACF,SAAAC;AAAA,IACA,OAAAC,IAAQ,CAAA;AAAA,IACR,GAAGC;AAAA;AAAA,EAAA,IACDH;AAEJ,SAAIE,EAAM,UAAU,WAClBA,EAAM,QAAQ,SAIZJ,MAAS,WACXI,IAAQ,EAAE,GAAGA,GAAO,QAAQ,UAAA,GACxBH,IACFE,IAAU,MAAM;AACd,IAAAG,EAAaN,CAAI;AAAA,EACnB,IAEAG,IAAU,MAAM;AACd,WAAO,SAAS,QAAQH,CAAI;AAAA,EAC9B,0BAIIO,GAAA,EAAI,WAAU,OAAM,SAAAJ,GAAkB,OAAAC,GAAe,GAAGC,GAAY;AAC9E;"} \ No newline at end of file diff --git a/dist/Image-mgT45r_B.cjs b/dist/Image-mgT45r_B.cjs new file mode 100644 index 00000000..41553498 --- /dev/null +++ b/dist/Image-mgT45r_B.cjs @@ -0,0 +1,2 @@ +"use strict";const s=require("./jsx-runtime-CeSfJrVB.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; +//# sourceMappingURL=Image-mgT45r_B.cjs.map diff --git a/dist/Image-mgT45r_B.cjs.map b/dist/Image-mgT45r_B.cjs.map new file mode 100644 index 00000000..35e1d746 --- /dev/null +++ b/dist/Image-mgT45r_B.cjs.map @@ -0,0 +1 @@ +{"version":3,"file":"Image-mgT45r_B.cjs","sources":["../src/components/Image.tsx"],"sourcesContent":["import { Box, type BoxProps } from \"@mui/material\"\nimport { type FC } from \"react\"\n\nimport { openInNewTab } from \"../utils/general\"\n\nexport interface ImageProps extends Omit {\n alt: string\n src: string\n href?: string\n hrefInNewTab?: boolean\n}\n\nconst Image: FC = ({ href, hrefInNewTab = false, ...props }) => {\n let {\n onClick,\n style = {},\n ...otherProps // eslint-disable-line prefer-const\n } = props\n\n if (style.width === undefined) {\n style.width = \"100%\"\n }\n\n // Override onClick if href provided.\n if (href !== undefined) {\n style = { ...style, cursor: \"pointer\" }\n if (hrefInNewTab) {\n onClick = () => {\n openInNewTab(href)\n }\n } else {\n onClick = () => {\n window.location.replace(href)\n }\n }\n }\n\n return \n}\n\nexport default Image\n"],"names":["Image","href","hrefInNewTab","props","onClick","style","otherProps","openInNewTab","Box"],"mappings":"iJAYMA,EAAwB,CAAC,CAAE,KAAAC,EAAM,aAAAC,EAAe,GAAO,GAAGC,KAAY,CAC1E,GAAI,CACF,QAAAC,EACA,MAAAC,EAAQ,CAAA,EACR,GAAGC,CAAA,EACDH,EAEJ,OAAIE,EAAM,QAAU,SAClBA,EAAM,MAAQ,QAIZJ,IAAS,SACXI,EAAQ,CAAE,GAAGA,EAAO,OAAQ,SAAA,EACxBH,EACFE,EAAU,IAAM,CACdG,EAAAA,aAAaN,CAAI,CACnB,EAEAG,EAAU,IAAM,CACd,OAAO,SAAS,QAAQH,CAAI,CAC9B,2BAIIO,EAAAA,IAAA,CAAI,UAAU,MAAM,QAAAJ,EAAkB,MAAAC,EAAe,GAAGC,EAAY,CAC9E"} \ No newline at end of file diff --git a/dist/LinkButton-BYFkvL_O.cjs b/dist/LinkButton-BYFkvL_O.cjs new file mode 100644 index 00000000..feeb3a53 --- /dev/null +++ b/dist/LinkButton-BYFkvL_O.cjs @@ -0,0 +1,2 @@ +"use strict";const r=require("./jsx-runtime-CeSfJrVB.cjs"),t=require("@mui/material");require("react");const n=require("react-router-dom");require("@mui/icons-material");require("./palette-CE2mKYse.cjs");require("./auth-Vf1MgMci.cjs");const u=e=>r.jsxRuntimeExports.jsx(t.Button,{...e,component:n.Link});exports.LinkButton=u; +//# sourceMappingURL=LinkButton-BYFkvL_O.cjs.map diff --git a/dist/LinkButton-BYFkvL_O.cjs.map b/dist/LinkButton-BYFkvL_O.cjs.map new file mode 100644 index 00000000..4054fec9 --- /dev/null +++ b/dist/LinkButton-BYFkvL_O.cjs.map @@ -0,0 +1 @@ +{"version":3,"file":"LinkButton-BYFkvL_O.cjs","sources":["../src/components/router/LinkButton.tsx"],"sourcesContent":["import { Button, type ButtonProps } from \"@mui/material\"\nimport { type JSX } from \"react\"\nimport { Link } from \"react-router-dom\"\n\nimport { type LinkProps } from \"../../utils/router\"\n\nexport type LinkButtonProps<\n Override extends \"delta\" | \"to\",\n State extends Record = Record,\n> = Omit & LinkProps\n\n// https://mui.com/material-ui/integrations/routing/#button\nconst LinkButton: {\n (props: LinkButtonProps<\"delta\">): JSX.Element\n = Record>(\n props: LinkButtonProps<\"to\", State>,\n ): JSX.Element\n} = (props: LinkButtonProps<\"delta\"> | LinkButtonProps<\"to\">) => {\n return \n )\n}\n\nexport default DownloadFileButton\n","import {\n AppBar,\n type AppBarProps,\n Container,\n type ContainerProps,\n Toolbar,\n type ToolbarProps,\n useScrollTrigger,\n} from \"@mui/material\"\nimport { type FC, cloneElement } from \"react\"\n\nexport interface ElevatedAppBarProps extends Omit {\n containerProps: ContainerProps\n toolbarProps?: ToolbarProps\n}\n\nconst ElevatedAppBar: FC = ({\n containerProps,\n toolbarProps,\n elevation = 4,\n children,\n ...otherProps\n}) => {\n const trigger = useScrollTrigger({\n disableHysteresis: true,\n threshold: 0,\n })\n\n return cloneElement(\n \n \n {children}\n \n ,\n {\n position: trigger ? \"fixed\" : \"sticky\",\n },\n )\n}\n\nexport default ElevatedAppBar\n","import { Button, type ButtonProps } from \"@mui/material\"\nimport {\n type DetailedHTMLProps,\n type FC,\n type InputHTMLAttributes,\n} from \"react\"\n\nexport interface InputFileButtonProps\n extends Omit, \"component\"> {\n inputProps?: Omit<\n DetailedHTMLProps, HTMLInputElement>,\n \"type\" | \"hidden\"\n >\n}\n\nconst InputFileButton: FC = ({\n children,\n inputProps,\n ...otherButtonProps\n}) => (\n \n)\n\nexport default InputFileButton\n","import { type FC, type ReactElement } from \"react\"\nimport {\n List,\n type ListItem,\n type ListItemText,\n type ListProps,\n} from \"@mui/material\"\n\ntype ListItemElement =\n | ReactElement\n | string\n\nexport interface ItemizedListProps {\n styleType:\n | \"unset\"\n | \"initial\"\n | \"inherit\"\n | \"upper-roman\"\n | \"upper-latin\"\n | \"upper-alpha\"\n | \"square\"\n | \"none\"\n | \"lower-roman\"\n | \"lower-latin\"\n | \"lower-greek\"\n | \"lower-alpha\"\n | \"georgian\"\n | \"disc\"\n | \"decimal-leading-zero\"\n | \"decimal\"\n | \"armenian\"\n | \"circle\"\n listProps?: ListProps\n pl?: number\n children: ListItemElement | ListItemElement[]\n}\n\nconst ItemizedList: FC = ({\n styleType,\n listProps = {},\n pl = 4,\n children,\n}) => {\n const { sx, ...otherProps } = listProps\n const listItemProps = { display: \"list-item\" }\n\n return (\n \n {children}\n \n )\n}\n\nexport default ItemizedList\n","import { type FC, type ReactElement } from \"react\"\nimport { Unstable_Grid2 as Grid, type Grid2Props } from \"@mui/material\"\n\ninterface ItemProps\n extends Omit<\n Grid2Props,\n | \"key\"\n | \"order\"\n | \"xs\"\n | \"sm\"\n | \"md\"\n | \"lg\"\n | \"xl\"\n | \"xsOffset\"\n | \"smOffset\"\n | \"mdOffset\"\n | \"lgOffset\"\n | \"xlOffset\"\n > {}\n\ninterface GlobalItemProps extends ItemProps {\n xs: number\n sm: number\n md: number\n lg: number\n xl: number\n}\n\nexport interface OrderedGridProps {\n rows: Array<\n Array<{\n element: ReactElement\n itemProps?: ItemProps\n }>\n >\n containerProps?: Omit\n globalItemProps: GlobalItemProps\n}\n\nconst OrderedGrid: FC = ({\n rows,\n containerProps = {},\n globalItemProps,\n}) => {\n const columns = Number(containerProps.columns ?? 12)\n\n const getItemsPerRow = (size: number): number => Math.floor(columns / size)\n\n const getOrder = (\n rowIndex: number,\n itemIndex: number,\n size: number,\n ): number =>\n Math.floor(itemIndex / getItemsPerRow(size)) * rows.length + rowIndex\n\n const getOffset = (itemIndex: number, size: number): number => {\n const itemsOnLastRow = rows[0].length % getItemsPerRow(size)\n return itemsOnLastRow !== 0 && itemIndex === rows[0].length - 1\n ? (columns - itemsOnLastRow * size) / 2\n : 0\n }\n\n return (\n \n {rows.map((row, rowIndex) =>\n row.map(({ element, itemProps = {} }, itemIndex) => (\n \n {element}\n \n )),\n )}\n \n )\n}\n\nexport default OrderedGrid\n","import { Link, type LinkProps } from \"@mui/material\"\nimport { type FC } from \"react\"\nexport interface ScrollIntoViewLinkProps extends Omit {\n elementId: string\n options?: ScrollIntoViewOptions\n}\n\nconst ScrollIntoViewLink: FC = ({\n elementId,\n options,\n ...linkProps\n}) => (\n {\n const element = document.getElementById(elementId)\n element?.scrollIntoView(options)\n }}\n />\n)\n\nexport default ScrollIntoViewLink\n","import {\n type ElementType,\n type JSX,\n type JSXElementConstructor,\n type ReactNode,\n useEffect,\n} from \"react\"\nimport {\n TablePagination as MuiTablePagination,\n type TablePaginationProps as MuiTablePaginationProps,\n Stack,\n type StackProps,\n type TablePaginationBaseProps,\n} from \"@mui/material\"\nimport type { TypedUseLazyQuery } from \"@reduxjs/toolkit/query/react\"\n\nimport { type ListArg, type ListResult, handleResultState } from \"../utils/api\"\nimport { type Pagination, usePagination } from \"../hooks/api\"\n\nexport type TablePaginationProps<\n QueryArg extends ListArg,\n ResultType extends ListResult,\n RootComponent extends\n ElementType = JSXElementConstructor,\n AdditionalProps = {},\n> = Omit<\n MuiTablePaginationProps,\n | \"component\"\n | \"count\"\n | \"rowsPerPage\"\n | \"onRowsPerPageChange\"\n | \"rowsPerPageOptions\"\n | \"page\"\n | \"onPageChange\"\n> &\n Partial<\n Pick<\n MuiTablePaginationProps,\n \"onRowsPerPageChange\" | \"onPageChange\"\n >\n > & {\n children: (\n data: ResultType[\"data\"],\n pagination: Pagination & { count?: number; maxLimit?: number },\n ) => ReactNode\n useLazyListQuery: TypedUseLazyQuery\n preferCacheValue?: boolean\n filters?: Omit\n rowsPerPageOptions?: number[]\n stackProps?: StackProps\n page?: number\n rowsPerPage?: number\n }\n\nconst TablePagination = <\n QueryArg extends ListArg,\n ResultType extends ListResult,\n RootComponent extends\n ElementType = JSXElementConstructor,\n AdditionalProps = {},\n>({\n children,\n useLazyListQuery,\n preferCacheValue,\n filters,\n page: initialPage = 0,\n rowsPerPage: initialLimit = 50,\n rowsPerPageOptions = [50, 100, 150],\n stackProps,\n onRowsPerPageChange,\n onPageChange,\n ...tablePaginationProps\n}: TablePaginationProps<\n QueryArg,\n ResultType,\n RootComponent,\n AdditionalProps\n>): JSX.Element => {\n const [trigger, result] = useLazyListQuery()\n const [{ limit, page, offset }, setPagination] = usePagination({\n page: initialPage,\n limit: initialLimit,\n })\n\n useEffect(\n () => {\n void trigger({ limit, offset, ...filters } as QueryArg, preferCacheValue)\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n trigger,\n limit,\n offset,\n // eslint-disable-next-line react-hooks/exhaustive-deps,@typescript-eslint/no-unsafe-assignment\n ...Object.values(filters || {}),\n preferCacheValue,\n ],\n )\n\n const { count, max_limit } = result.data || {}\n\n if (max_limit) {\n rowsPerPageOptions = rowsPerPageOptions.filter(\n option => option <= max_limit,\n )\n }\n\n return (\n \n {handleResultState(result, ({ data }) =>\n children(data, {\n limit,\n page,\n offset,\n count,\n maxLimit: max_limit,\n }),\n )}\n {\n setPagination({ limit: parseInt(event.target.value), page: 0 })\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (onRowsPerPageChange) onRowsPerPageChange(event)\n }}\n page={page}\n onPageChange={(event, page) => {\n setPagination(({ limit }) => ({ limit, page }))\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (onPageChange) onPageChange(event, page)\n }}\n // ascending order\n rowsPerPageOptions={rowsPerPageOptions.sort((a, b) => a - b)}\n {...tablePaginationProps}\n />\n \n )\n}\n\nexport default TablePagination\n","import { Box, type BoxProps } from \"@mui/material\"\nimport { type FC } from \"react\"\n\nexport interface YouTubeVideoProps extends Omit {\n src: string\n}\n\nconst YouTubeVideo: FC = ({\n src,\n style = {},\n ...otherProps\n}) => {\n return (\n \n )\n}\n\nexport default YouTubeVideo\n"],"names":["Action","ResultType","validMutationMethodsArr","validRequestMethodsArr","StaticRouter","basename","children","locationProp","future","parsePath","action","location","staticNavigator","getStatelessNavigator","React","Router","createHref","encodeLocation","to","delta","createPath","href","encoded","ABSOLUTE_URL_REGEX","Routes","path","routes","header","jsx","Fragment","footer","headerExcludePaths","footerExcludePaths","jsxs","RouterRoutes","BrowserRoutes","props","pathname","useLocation","App","theme","store","maxIdleSeconds","maxTotalSeconds","routesProps","ThemeProvider","CssBaseline","Provider","BrowserRouter","ClickableTooltip","open","onClick","otherTooltipProps","_open","_setOpen","Tooltip","wrap","CopyIconButton","content","ContentCopyIcon","otherIconButtonProps","IconButton","DownloadFileButton","endIcon","DownloadIcon","file","otherButtonProps","url","anchorProps","text","mimeType","name","charset","extension","useEffect","Button","ElevatedAppBar","containerProps","toolbarProps","elevation","otherProps","trigger","useScrollTrigger","cloneElement","AppBar","Container","Toolbar","InputFileButton","inputProps","ItemizedList","styleType","listProps","pl","sx","listItemProps","List","OrderedGrid","rows","globalItemProps","columns","getItemsPerRow","size","getOrder","rowIndex","itemIndex","getOffset","itemsOnLastRow","Grid","row","element","itemProps","ScrollIntoViewLink","elementId","options","linkProps","Link","TablePagination","useLazyListQuery","preferCacheValue","filters","initialPage","initialLimit","rowsPerPageOptions","stackProps","onRowsPerPageChange","onPageChange","tablePaginationProps","result","limit","page","offset","setPagination","usePagination","count","max_limit","option","Stack","handleResultState","data","MuiTablePagination","event","a","b","YouTubeVideo","src","style","Box"],"mappings":"y6BAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GA+BA,IAAIA,GACH,SAAUA,EAAQ,CAQjBA,EAAO,IAAS,MAMhBA,EAAO,KAAU,OAKjBA,EAAO,QAAa,SACtB,GAAGA,IAAWA,EAAS,CAAA,EAAG,EA+Z1B,IAAIC,GACH,SAAUA,EAAY,CACrBA,EAAW,KAAU,OACrBA,EAAW,SAAc,WACzBA,EAAW,SAAc,WACzBA,E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,GAKtBrG,EAAAA,kBAAAA,KAACuG,EAAAA,MAAA,CAAO,GAAGb,EACR,SAAA,CAAAc,EAAAA,kBAAkBV,EAAQ,CAAC,CAAE,KAAAW,CAAA,IAC5BpI,EAASoI,EAAM,CACb,MAAAV,EACA,KAAAC,EACA,OAAAC,EACA,MAAAG,EACA,SAAUC,CAAA,CACX,CAAA,EAEH1G,EAAAA,kBAAAA,IAAC+G,EAAAA,gBAAA,CACC,UAAU,MACV,MAAON,GAAS,EAChB,YAAaL,EACb,oBAAqBY,GAAS,CAC5BT,EAAc,CAAE,MAAO,SAASS,EAAM,OAAO,KAAK,EAAG,KAAM,EAAG,EAE1DhB,KAAyCgB,CAAK,CACpD,EACA,KAAAX,EACA,aAAc,CAACW,EAAOX,IAAS,CAC7BE,EAAc,CAAC,CAAE,MAAAH,CAAAA,KAAa,CAAE,MAAAA,EAAO,KAAAC,CAAAA,EAAO,EAE1CJ,GAAcA,EAAae,EAAOX,CAAI,CAC5C,EAEA,mBAAoBP,EAAmB,KAAK,CAACmB,EAAGC,IAAMD,EAAIC,CAAC,EAC1D,GAAGhB,CAAA,CAAA,CACN,EACF,CAEJ,ECpIMiB,GAAsC,CAAC,CAC3C,IAAAC,EACA,MAAAC,EAAQ,CAAA,EACR,GAAGjE,CACL,IAEIpD,EAAAA,kBAAAA,IAACsH,EAAAA,IAAA,CACC,UAAU,SACV,MAAM,OACN,IAAAF,EACA,MAAM,uBACN,MAAM,kHACN,MAAO,CAAE,OAAQ,MAAO,YAAa,SAAU,GAAGC,CAAA,EACjD,GAAGjE,CAAA,CAAA","x_google_ignoreList":[0,1]} \ No newline at end of file diff --git a/dist/components/index.d.ts b/dist/components/index.d.ts new file mode 100644 index 00000000..adf1fc1e --- /dev/null +++ b/dist/components/index.d.ts @@ -0,0 +1,90 @@ +export * as forms from './form'; +export * as pages from './page'; +export * from './router'; +export * as tables from './table'; +export { default as App, type AppProps } from './App'; +export { default as ClickableTooltip, type ClickableTooltipProps, } from './ClickableTooltip'; +export { default as CopyIconButton, type CopyIconButtonProps, } from './CopyIconButton'; +export { default as Countdown, type CountdownProps } from './Countdown'; +export { default as DownloadFileButton, type DownloadFileButtonProps, } from './DownloadFileButton'; +export { default as ElevatedAppBar, type ElevatedAppBarProps, } from './ElevatedAppBar'; +export { default as Image, type ImageProps } from './Image'; +export { default as InputFileButton, type InputFileButtonProps, } from './InputFileButton'; +export { default as ItemizedList, type ItemizedListProps } from './ItemizedList'; +export { default as OrderedGrid, type OrderedGridProps } from './OrderedGrid'; +export { default as ScrollIntoViewLink, type ScrollIntoViewLinkProps, } from './ScrollIntoViewLink'; +export { default as SyncError, type SyncErrorProps } from './SyncError'; +export { default as TablePagination, type TablePaginationProps, } from './TablePagination'; +export { default as YouTubeVideo, type YouTubeVideoProps } from './YouTubeVideo'; + + +declare module "@mui/material/styles" { + interface CustomPaletteColors { + tertiary: PaletteColor; + white: PaletteColor; + black: PaletteColor; + teacher: PaletteColor; + student: PaletteColor; + indy: PaletteColor; + } + interface Palette extends CustomPaletteColors { + } + interface PaletteOptions extends CustomPaletteColors { + } +} + + +declare module "@mui/material" { + interface FabPropsColorOverrides extends PropsColorOverrides { + } + interface CardPropsColorOverrides extends PropsColorOverrides { + } + interface ChipPropsColorOverrides extends PropsColorOverrides { + } + interface IconPropsColorOverrides extends PropsColorOverrides { + } + interface AlertPropsColorOverrides extends PropsColorOverrides { + } + interface BadgePropsColorOverrides extends PropsColorOverrides { + } + interface RadioPropsColorOverrides extends PropsColorOverrides { + } + interface AppBarPropsColorOverrides extends PropsColorOverrides { + } + interface ButtonPropsColorOverrides extends PropsColorOverrides { + } + interface SliderPropsColorOverrides extends PropsColorOverrides { + } + interface SwitchPropsColorOverrides extends PropsColorOverrides { + } + interface SvgIconPropsColorOverrides extends PropsColorOverrides { + } + interface CheckboxPropsColorOverrides extends PropsColorOverrides { + } + interface FormLabelPropsColorOverrides extends PropsColorOverrides { + } + interface InputBasePropsColorOverrides extends PropsColorOverrides { + } + interface TextFieldPropsColorOverrides extends PropsColorOverrides { + } + interface IconButtonPropsColorOverrides extends PropsColorOverrides { + } + interface PaginationPropsColorOverrides extends PropsColorOverrides { + } + interface ButtonGroupPropsColorOverrides extends PropsColorOverrides { + } + interface FormControlPropsColorOverrides extends PropsColorOverrides { + } + interface ToggleButtonPropsColorOverrides extends PropsColorOverrides { + } + interface LinearProgressPropsColorOverrides extends PropsColorOverrides { + } + interface PaginationItemPropsColorOverrides extends PropsColorOverrides { + } + interface CircularProgressPropsColorOverrides extends PropsColorOverrides { + } + interface TabsPropsIndicatorColorOverrides extends PropsColorOverrides { + } + interface ToggleButtonGroupPropsColorOverrides extends PropsColorOverrides { + } +} diff --git a/dist/components/index.es.js b/dist/components/index.es.js new file mode 100644 index 00000000..2a915948 --- /dev/null +++ b/dist/components/index.es.js @@ -0,0 +1,383 @@ +import { i as Me } from "../index-Dqp7dpn3.js"; +import { i as Ne } from "../index-DkM_cG3a.js"; +import { L as Ae, a as Fe, b as De, c as Ge, N as He } from "../Navigate-Dq47aqC8.js"; +import { L as Je } from "../LinkButton-oK0RThqn.js"; +import { i as Ve } from "../index-2W--_sNE.js"; +import { j as o } from "../jsx-runtime-Dpn_P65e.js"; +import { parsePath as U, Router as $, createPath as k, BrowserRouter as M, Routes as _ } from "react-router-dom"; +import { ThemeProvider as N, CssBaseline as Y, Tooltip as A, IconButton as F, Button as E, useScrollTrigger as D, AppBar as G, Container as H, Toolbar as z, List as J, Unstable_Grid2 as b, Link as P, Stack as V, TablePagination as q, Box as X } from "@mui/material"; +import * as K from "react"; +import R, { useEffect as S, cloneElement as Q } from "react"; +import { Provider as W } from "react-redux"; +import { C as Xe } from "../Countdown-DFI1RljW.js"; +import { f as Z } from "../auth-BPfUPjmM.js"; +import { wrap as I } from "../utils/general.es.js"; +import { ContentCopy as ee, Download as te } from "@mui/icons-material"; +import { I as Qe } from "../Image-D5jC9UoX.js"; +import { h as re } from "../api-Cbyt3rw0.js"; +import { S as Ze } from "../api-Cbyt3rw0.js"; +import { u as oe } from "../api-Cs4Y-WeI.js"; +/** + * @remix-run/router v1.23.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */ +var v; +(function(e) { + e.Pop = "POP", e.Push = "PUSH", e.Replace = "REPLACE"; +})(v || (v = {})); +var T; +(function(e) { + e.data = "data", e.deferred = "deferred", e.redirect = "redirect", e.error = "error"; +})(T || (T = {})); +const O = ["post", "put", "patch", "delete"]; +new Set(O); +const se = ["get", ...O]; +new Set(se); +function ne({ + basename: e, + children: r, + location: t = "/", + future: a +}) { + typeof t == "string" && (t = U(t)); + let s = v.Pop, n = { + pathname: t.pathname || "/", + search: t.search || "", + hash: t.hash || "", + state: t.state != null ? t.state : null, + key: t.key || "default" + }, i = ae(); + return /* @__PURE__ */ K.createElement($, { + basename: e, + children: r, + location: n, + navigationType: s, + navigator: i, + future: a, + static: !0 + }); +} +function ae() { + return { + createHref: ie, + encodeLocation: ce, + push(e) { + throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)})\` somewhere in your app.`); + }, + replace(e) { + throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)}, { replace: true })\` somewhere in your app.`); + }, + go(e) { + throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${e})\` somewhere in your app.`); + }, + back() { + throw new Error("You cannot use navigator.back() on the server because it is a stateless environment."); + }, + forward() { + throw new Error("You cannot use navigator.forward() on the server because it is a stateless environment."); + } + }; +} +function ie(e) { + return typeof e == "string" ? e : k(e); +} +function ce(e) { + let r = typeof e == "string" ? e : k(e); + r = r.replace(/ $/, "%20"); + let t = ue.test(r) ? new URL(r) : new URL(r, "http://localhost"); + return { + pathname: t.pathname, + search: t.search, + hash: t.hash + }; +} +const ue = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, B = ({ + path: e, + routes: r, + header: t = /* @__PURE__ */ o.jsx(o.Fragment, {}), + // TODO: "header =
" + footer: a = /* @__PURE__ */ o.jsx(o.Fragment, {}), + // TODO: "footer =