wed-components-beta 0.0.1

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/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # React + TypeScript + Vite
2
+
3
+ This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
+
5
+ Currently, two official plugins are available:
6
+
7
+ - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8
+ - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
+
10
+ ## Expanding the ESLint configuration
11
+
12
+ If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
13
+
14
+ - Configure the top-level `parserOptions` property like this:
15
+
16
+ ```js
17
+ export default tseslint.config({
18
+ languageOptions: {
19
+ // other options...
20
+ parserOptions: {
21
+ project: ['./tsconfig.node.json', './tsconfig.app.json'],
22
+ tsconfigRootDir: import.meta.dirname,
23
+ },
24
+ },
25
+ })
26
+ ```
27
+
28
+ - Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
29
+ - Optionally add `...tseslint.configs.stylisticTypeChecked`
30
+ - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:
31
+
32
+ ```js
33
+ // eslint.config.js
34
+ import react from 'eslint-plugin-react'
35
+
36
+ export default tseslint.config({
37
+ // Set the react version
38
+ settings: { react: { version: '18.3' } },
39
+ plugins: {
40
+ // Add the react plugin
41
+ react,
42
+ },
43
+ rules: {
44
+ // other rules...
45
+ // Enable its recommended rules
46
+ ...react.configs.recommended.rules,
47
+ ...react.configs['jsx-runtime'].rules,
48
+ },
49
+ })
50
+ ```
@@ -0,0 +1,11 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ type CourseProgressionCard = {
3
+ children: ReactNode;
4
+ containerStyles?: CSSProperties;
5
+ id?: string;
6
+ onClick: () => void;
7
+ open: boolean;
8
+ title: ReactNode;
9
+ };
10
+ export declare function Accordion({ children, containerStyles, id, onClick, open, title }: CourseProgressionCard): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,38 @@
1
+ type CourseProgression = {
2
+ affiliation_name: string | null;
3
+ base_course_credit_default: number;
4
+ base_course_name: string;
5
+ comments: string | null;
6
+ course_type_name: string;
7
+ course_type_tag: string;
8
+ credit_type_name: string;
9
+ credit_type_tag: string;
10
+ fk_id_affiliation: number | null;
11
+ fk_id_base_course: number;
12
+ fk_id_course_type: number;
13
+ fk_id_credit_type: number;
14
+ fk_id_request_course_progression_type?: number;
15
+ fk_id_term: number;
16
+ id?: number;
17
+ is_group_classes: boolean | null;
18
+ is_self_paced: boolean | null;
19
+ is_private: boolean | null;
20
+ term_name: string;
21
+ weeks: number | null;
22
+ };
23
+ type Props = {
24
+ selectedTheme?: 'light' | 'dark';
25
+ courseProgression: {
26
+ year: number;
27
+ courseProgression: [CourseProgression[], CourseProgression[]];
28
+ }[] | null;
29
+ totalCredits: number;
30
+ renderCommentIcon: (comments: string) => JSX.Element;
31
+ renderCourseWithWED: (affiliation_name: string | null) => JSX.Element;
32
+ renderDeleteButton?: (id: number | null, fk_id_request_course_progression_type: number | null, fk_id_base_course: number, fk_id_term: number) => JSX.Element;
33
+ renderGroupClassesIcon: () => JSX.Element;
34
+ renderPrivateIcon: () => JSX.Element;
35
+ renderSelfPacedIcon: () => JSX.Element;
36
+ };
37
+ export declare function CourseProgressionTable({ selectedTheme, courseProgression, totalCredits, renderCommentIcon, renderCourseWithWED, renderDeleteButton, renderGroupClassesIcon, renderPrivateIcon, renderSelfPacedIcon }: Props): import("react/jsx-runtime").JSX.Element;
38
+ export {};
@@ -0,0 +1,25 @@
1
+ type DocumentProps = {
2
+ /** State that represents the amount of zoom. */
3
+ zoom?: number;
4
+ /**
5
+ * setState function to handle the zoom state.
6
+ * @param direction - Define how much zoom should be applied to each direction (5%, 10%, 25%, etc.)
7
+ * @returns - void
8
+ */
9
+ handleZoom?: (direction: 'decrease' | 'augment') => void;
10
+ /** Helper text displayed when no children are passed down as props (use conditional ternary operator) */
11
+ helperText?: string;
12
+ /**
13
+ * Function used to download the children
14
+ * @returns - void
15
+ */
16
+ onDownload?: () => void;
17
+ /** Boolean used to disable the download button and hide the zoom controller */
18
+ disabled: boolean;
19
+ /** Documents to be displayed */
20
+ children: any;
21
+ /** Number of documents being displayed */
22
+ numberOfDocuments?: number;
23
+ };
24
+ export declare function DocumentRenderer({ zoom, helperText, disabled, onDownload, children, numberOfDocuments }: DocumentProps): import("react/jsx-runtime").JSX.Element;
25
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare function DocumentViewer({ src }: {
2
+ src: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ type RightSidePanelProps = {
2
+ children?: any;
3
+ footer?: any;
4
+ maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
5
+ onClose: () => void;
6
+ state: boolean;
7
+ theme?: 'dark' | 'light';
8
+ title: any;
9
+ };
10
+ export declare function RightSidePanel({ children, footer, maxWidth, onClose, state, theme, title }: RightSidePanelProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,13 @@
1
+ import { CSSProperties } from 'react';
2
+ type BodyContainerProps = {
3
+ allowCellOverflow?: boolean;
4
+ children: any;
5
+ flexGrow?: number;
6
+ flexShrink?: number;
7
+ id?: string;
8
+ maxWidth?: number | string;
9
+ onScroll?: (e: React.UIEvent<HTMLDivElement, UIEvent>) => void;
10
+ style?: CSSProperties;
11
+ };
12
+ export declare function BodyContainer({ allowCellOverflow, children, flexGrow, flexShrink, maxWidth, id, onScroll, style }: BodyContainerProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,10 @@
1
+ import { CSSProperties } from 'react';
2
+ type CellProps = {
3
+ children: any;
4
+ flexGrow?: boolean;
5
+ onClick?: () => void;
6
+ style?: CSSProperties;
7
+ width?: number;
8
+ };
9
+ export declare function Cell({ children, flexGrow, onClick, style, width }: CellProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import { CSSProperties } from 'react';
2
+ type BodyRowProps = {
3
+ children: any;
4
+ state: boolean;
5
+ onClick?: any;
6
+ nestingLevel?: 1 | 2 | 3;
7
+ style?: CSSProperties;
8
+ };
9
+ export declare function ExpansibleRow({ children, state, onClick, nestingLevel, style }: BodyRowProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,7 @@
1
+ import { CSSProperties } from 'react';
2
+ type FooterProps = {
3
+ children: any;
4
+ style?: CSSProperties;
5
+ };
6
+ export declare function Footer({ children, style }: FooterProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { CSSProperties } from 'react';
2
+ type HeaderProps = {
3
+ children: any;
4
+ style?: CSSProperties;
5
+ };
6
+ export declare function Header({ children, style }: HeaderProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { CSSProperties } from 'react';
2
+ type OverheadProps = {
3
+ children: any;
4
+ style?: CSSProperties;
5
+ };
6
+ export declare function Overhead({ children, style }: OverheadProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,12 @@
1
+ import { CSSProperties } from 'react';
2
+ type RowProps = {
3
+ children: any;
4
+ onClick?: () => void;
5
+ selected?: boolean;
6
+ onDoubleClick?: () => void;
7
+ /** Row's height in pixels (defaults to 50px) */
8
+ rowHeight?: number;
9
+ style?: CSSProperties;
10
+ };
11
+ export declare function Row({ children, onClick, selected, onDoubleClick, rowHeight, style }: RowProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,8 @@
1
+ import { CSSProperties } from 'react';
2
+ type StatusProps = {
3
+ children: string;
4
+ color: 'blue' | 'green' | 'red' | 'yellow' | 'magenta' | 'greenBlue' | 'strongRed' | 'strongYellow' | 'darkBlue' | 'grayBlue' | 'darkGreen' | 'darkPink' | 'lightPurple' | 'darkPurple' | 'darkRed' | 'orange' | 'strongBlue';
5
+ style?: CSSProperties;
6
+ };
7
+ export declare function Status({ children, color, style }: StatusProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,10 @@
1
+ import { CSSProperties } from 'react';
2
+ type TableProps = {
3
+ children: any;
4
+ id?: string;
5
+ theme?: 'dark' | 'light';
6
+ size?: 'small' | 'normal';
7
+ style?: CSSProperties;
8
+ };
9
+ export declare function Table({ children, id, theme, size, style }: TableProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,7 @@
1
+ import { TranscriptCreditRow } from './Transcript';
2
+ type ClassRecordProps = {
3
+ studentProgress: TranscriptCreditRow[];
4
+ snapshot?: boolean;
5
+ };
6
+ export default function ClassRecord({ studentProgress, snapshot }: ClassRecordProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { TranscriptData } from './Transcript';
2
+ type GradingAndCreditSystemProps = {
3
+ snapshot: TranscriptData['snapshot'];
4
+ total: TranscriptData['total'];
5
+ };
6
+ export default function GradingAndCreditSystem({ snapshot, total }: GradingAndCreditSystemProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ type HeaderProps = {
2
+ title: string;
3
+ };
4
+ export default function Header({ title }: HeaderProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,6 @@
1
+ import { TranscriptData } from './Transcript';
2
+ type StudentInformationProps = {
3
+ student: TranscriptData['student'];
4
+ };
5
+ export default function StudentInformation({ student }: StudentInformationProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,69 @@
1
+ export type TranscriptCreditRow = {
2
+ subject_name: string | null;
3
+ base_course_name: string | null;
4
+ fk_id_credit_status_type: number | null;
5
+ credit_status_type_name: string | null;
6
+ credits: number | null;
7
+ grade: string | null;
8
+ gpa: number | null;
9
+ wgpa: number | null;
10
+ fk_id_term: number | null;
11
+ term_name: string;
12
+ fk_id_credit_type: number | null;
13
+ credit_type_name: string | null;
14
+ fk_id_course_type: number | null;
15
+ course_type_name: string | null;
16
+ in_progress: boolean;
17
+ course_type_tag?: string;
18
+ credit_type_tag?: string;
19
+ is_drop?: boolean;
20
+ };
21
+ export type TranscriptData = {
22
+ student: {
23
+ birthdate: string;
24
+ comments: string | null;
25
+ entrance_date: string;
26
+ first_name: string;
27
+ gender_name: string;
28
+ graduation_date: string | null;
29
+ guardian_name: string;
30
+ id: number;
31
+ last_name: string;
32
+ withdrawal_date: string | null;
33
+ };
34
+ credits: {
35
+ subject_name: string;
36
+ base_course_name: string;
37
+ fk_id_credit_status_type: number | null;
38
+ credit_status_type_name: string | null;
39
+ credits: number;
40
+ grade: string;
41
+ gpa: number;
42
+ wgpa: number;
43
+ fk_id_term: number;
44
+ term_name: string;
45
+ fk_id_credit_type: number;
46
+ credit_type_name: string | null;
47
+ fk_id_course_type: number | null;
48
+ course_type_name: string | null;
49
+ in_progress: boolean;
50
+ course_type_tag?: string;
51
+ credit_type_tag?: string;
52
+ is_drop?: boolean;
53
+ }[];
54
+ total: {
55
+ cumulative_gpa: number;
56
+ earned_credits: number;
57
+ };
58
+ snapshot: {
59
+ issue_date: string;
60
+ issued_by: string;
61
+ } | null;
62
+ };
63
+ type PartialTranscriptsProps = {
64
+ comments: string | null;
65
+ data: TranscriptData;
66
+ title: string;
67
+ };
68
+ export declare function Transcript({ data, title }: PartialTranscriptsProps): import("react/jsx-runtime").JSX.Element;
69
+ export {};
package/dist/main.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ export { Accordion } from './Accordion/Accordion';
2
+ export { DocumentRenderer } from './DocumentRenderer/DocumentRenderer';
3
+ export { DocumentViewer } from './DocumentViewer/DocumentViewer';
4
+ export { RightSidePanel } from './RightSidePanel/RightSidePanel';
5
+ export { BodyContainer } from './Table/BodyContainer';
6
+ export { Cell } from './Table/Cell';
7
+ export { ExpansibleRow } from './Table/ExpansibleRow';
8
+ export { Footer } from './Table/Footer';
9
+ export { Header } from './Table/Header';
10
+ export { Overhead } from './Table/Overhead';
11
+ export { Row } from './Table/Row';
12
+ export { Status } from './Table/Status';
13
+ export { Table } from './Table/Table';
14
+ export { Transcript } from './Transcript/Transcript';