@oc-digital/react-component-library 7.2.2-beta.0 → 7.2.2-beta.20
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/build/Alert/Alert.d.ts +4 -4
- package/build/Alert/Alert.types.d.ts +13 -13
- package/build/AlphabeticalList/AlphabeticalList.d.ts +4 -4
- package/build/AlphabeticalList/AlphabeticalList.types.d.ts +22 -22
- package/build/AutoSave/Select/AutoSave.types.d.ts +11 -11
- package/build/AutoSave/Select/index.d.ts +3 -3
- package/build/AutoSave/Text/AutoSave.types.d.ts +16 -16
- package/build/AutoSave/Text/index.d.ts +3 -3
- package/build/Breadcrumbs/Breadcrumbs.d.ts +4 -4
- package/build/Breadcrumbs/Breadcrumbs.types.d.ts +23 -23
- package/build/Button/Button.d.ts +4 -4
- package/build/Button/Button.types.d.ts +10 -10
- package/build/ButtonWithConfirm/ButtonWithConfirm.d.ts +4 -4
- package/build/ButtonWithConfirm/ButtonWithConfirm.types.d.ts +9 -9
- package/build/ContentBox/ContentBox.d.ts +4 -4
- package/build/ContentBox/ContentBox.types.d.ts +7 -7
- package/build/ContentLabel/ContentLabel.d.ts +4 -4
- package/build/ContentLabel/ContentLabel.types.d.ts +5 -5
- package/build/DatePicker/DatePicker.d.ts +4 -4
- package/build/DatePicker/DatePicker.types.d.ts +5 -5
- package/build/EditableTable/EditableTable.d.ts +4 -4
- package/build/EditableTable/EditableTable.types.d.ts +106 -106
- package/build/EditableTable/components/TableCheckbox.d.ts +8 -8
- package/build/EditableTable/components/TableDateInput.d.ts +9 -9
- package/build/EditableTable/components/TableTextInput.d.ts +20 -20
- package/build/EditableTable/components/utils/getTextWidth.d.ts +13 -13
- package/build/EditableTable/defaultCells.d.ts +30 -30
- package/build/EntityList/EntityList.d.ts +4 -4
- package/build/EntityList/EntityList.types.d.ts +14 -14
- package/build/ErrorIndicator/ErrorIndicator.d.ts +4 -4
- package/build/ErrorIndicator/ErrorIndicator.types.d.ts +4 -4
- package/build/ImageDisplayAndUpload/ImageDisplayAndUpload.d.ts +4 -4
- package/build/ImageDisplayAndUpload/ImageDisplayAndUpload.types.d.ts +8 -8
- package/build/KeyboardDatePicker/KeyboardDatePicker.d.ts +4 -4
- package/build/KeyboardDatePicker/KeyboardDatePicker.types.d.ts +5 -5
- package/build/LeftNavigation/LeftNavigation.d.ts +4 -4
- package/build/LeftNavigation/LeftNavigation.types.d.ts +96 -96
- package/build/LeftNavigation/NavListItem.d.ts +4 -4
- package/build/LeftNavigation/PrimaryLeftNavigation.d.ts +4 -4
- package/build/LeftNavigation/SecondaryLeftNavigation.d.ts +4 -4
- package/build/LoadingSpinner/LoadingSpinner.d.ts +4 -4
- package/build/LoadingSpinner/LoadingSpinner.types.d.ts +5 -5
- package/build/MainLayout/MainLayout.d.ts +4 -4
- package/build/MainLayout/MainLayout.types.d.ts +10 -10
- package/build/MobileDatePicker/MobileDatePicker.d.ts +4 -4
- package/build/MobileDatePicker/MobileDatePicker.types.d.ts +5 -5
- package/build/NavbarLayout/Navbar.d.ts +12 -12
- package/build/NavbarLayout/NavbarLayout.d.ts +16 -16
- package/build/NavbarLayout/index.d.ts +2 -2
- package/build/SearchBar/SearchBar.d.ts +4 -4
- package/build/SearchBar/SearchBar.types.d.ts +33 -33
- package/build/Select/Select.d.ts +4 -4
- package/build/Select/Select.types.d.ts +16 -16
- package/build/StaticTable/StaticTable.d.ts +4 -4
- package/build/StaticTable/StaticTable.types.d.ts +21 -21
- package/build/SvgComponents/ContainedPartnersLogo.d.ts +4 -4
- package/build/SvgComponents/HomeSvg.d.ts +4 -4
- package/build/SvgComponents/NovelLogoSvg.d.ts +4 -4
- package/build/SvgComponents/OrganisationList.d.ts +4 -4
- package/build/SvgComponents/ProjectsSvg.d.ts +4 -4
- package/build/SvgComponents/index.d.ts +5 -5
- package/build/SvgComponents/types.d.ts +6 -6
- package/build/TextField/TextField.d.ts +15 -15
- package/build/TextField/TextField.types.d.ts +7 -7
- package/build/Tooltip/OptionalTooltip.d.ts +8 -8
- package/build/Tooltip/index.d.ts +1 -1
- package/build/globals/index.d.ts +26 -26
- package/build/hooks/index.d.ts +3 -3
- package/build/hooks/useDebounceEffect.d.ts +2 -2
- package/build/hooks/useInterval.d.ts +2 -2
- package/build/hooks/useWhyDidYouUpdate.d.ts +1 -1
- package/build/index.d.ts +37 -37
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/stories/Button.d.ts +28 -0
- package/build/stories/Button.stories.d.ts +10 -0
- package/build/stories/Header.d.ts +12 -0
- package/build/stories/Header.stories.d.ts +8 -0
- package/build/stories/Page.d.ts +3 -0
- package/build/stories/Page.stories.d.ts +8 -0
- package/build/style.css +1 -0
- package/build/styles/colours.d.ts +3 -3
- package/build/styles/font.d.ts +1 -1
- package/build/styles/index.d.ts +3 -3
- package/build/styles/layout.d.ts +1 -1
- package/build/styles/spacing.d.ts +1 -1
- package/build/styles/themes.d.ts +2 -2
- package/build/utils/index.d.ts +5 -5
- package/package.json +23 -19
- package/build/EditableTable/components/styled/Checkbox.d.ts +0 -5
- package/build/EditableTable/components/styled/CheckboxLabel.d.ts +0 -5
- package/build/EditableTable/components/styled/Input.d.ts +0 -21
- package/build/EditableTable/components/styled/InputAdornmentWrapper.d.ts +0 -5
- package/build/EditableTable/components/styled/InputWrapper.d.ts +0 -5
- package/build/EditableTable/components/styled/SmallError.d.ts +0 -5
- package/build/assets/index-DCUzKTQq.css +0 -78
package/build/Alert/Alert.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IAlertProps } from "./Alert.types";
|
|
3
|
-
declare const Alert: React.FC<IAlertProps>;
|
|
4
|
-
export default Alert;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IAlertProps } from "./Alert.types";
|
|
3
|
+
declare const Alert: React.FC<IAlertProps>;
|
|
4
|
+
export default Alert;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ReactChild } from "react";
|
|
2
|
-
import { FormStatuses } from "../globals";
|
|
3
|
-
export interface IAlertProps {
|
|
4
|
-
alertActionHandler?: () => void;
|
|
5
|
-
formStatus: FormStatuses;
|
|
6
|
-
actionButton?: {
|
|
7
|
-
handler: () => void;
|
|
8
|
-
text: string;
|
|
9
|
-
};
|
|
10
|
-
alertMessage: ReactChild;
|
|
11
|
-
addBreak?: boolean;
|
|
12
|
-
styling?: string;
|
|
13
|
-
}
|
|
1
|
+
import { ReactChild } from "react";
|
|
2
|
+
import { FormStatuses } from "../globals";
|
|
3
|
+
export interface IAlertProps {
|
|
4
|
+
alertActionHandler?: () => void;
|
|
5
|
+
formStatus: FormStatuses;
|
|
6
|
+
actionButton?: {
|
|
7
|
+
handler: () => void;
|
|
8
|
+
text: string;
|
|
9
|
+
};
|
|
10
|
+
alertMessage: ReactChild;
|
|
11
|
+
addBreak?: boolean;
|
|
12
|
+
styling?: string;
|
|
13
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IAlphabeticalListProps } from "./AlphabeticalList.types";
|
|
3
|
-
declare const AlphabeticalList: React.FC<IAlphabeticalListProps>;
|
|
4
|
-
export default AlphabeticalList;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IAlphabeticalListProps } from "./AlphabeticalList.types";
|
|
3
|
+
declare const AlphabeticalList: React.FC<IAlphabeticalListProps>;
|
|
4
|
+
export default AlphabeticalList;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface IAlphabeticalListProps {
|
|
3
|
-
array: any[] | undefined | null;
|
|
4
|
-
sortFn?: (arg1: any, arg2: any) => number;
|
|
5
|
-
sortKey?: string;
|
|
6
|
-
loading?: boolean;
|
|
7
|
-
buttonClick?: (item?: any) => void;
|
|
8
|
-
linkTo?: (item?: any) => string;
|
|
9
|
-
ItemTemplate: React.FC<{
|
|
10
|
-
item: any;
|
|
11
|
-
}>;
|
|
12
|
-
arrayKey?: string;
|
|
13
|
-
loadingMessage?: string;
|
|
14
|
-
emptyMessage?: string | JSX.Element;
|
|
15
|
-
alphabetisedHeader?: boolean;
|
|
16
|
-
isItemDisabled?: (item: any) => {
|
|
17
|
-
disabled: true;
|
|
18
|
-
reason: string;
|
|
19
|
-
} | {
|
|
20
|
-
disabled: false;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface IAlphabeticalListProps {
|
|
3
|
+
array: any[] | undefined | null;
|
|
4
|
+
sortFn?: (arg1: any, arg2: any) => number;
|
|
5
|
+
sortKey?: string;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
buttonClick?: (item?: any) => void;
|
|
8
|
+
linkTo?: (item?: any) => string;
|
|
9
|
+
ItemTemplate: React.FC<{
|
|
10
|
+
item: any;
|
|
11
|
+
}>;
|
|
12
|
+
arrayKey?: string;
|
|
13
|
+
loadingMessage?: string;
|
|
14
|
+
emptyMessage?: string | JSX.Element;
|
|
15
|
+
alphabetisedHeader?: boolean;
|
|
16
|
+
isItemDisabled?: (item: any) => {
|
|
17
|
+
disabled: true;
|
|
18
|
+
reason: string;
|
|
19
|
+
} | {
|
|
20
|
+
disabled: false;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export interface AutoSaveSelectFieldProps {
|
|
2
|
-
autoSave: (newValue: string) => Promise<void>;
|
|
3
|
-
selectOptions: {
|
|
4
|
-
value: string;
|
|
5
|
-
description: string;
|
|
6
|
-
}[];
|
|
7
|
-
value: string;
|
|
8
|
-
className: string;
|
|
9
|
-
label: string;
|
|
10
|
-
disabled: boolean;
|
|
11
|
-
}
|
|
1
|
+
export interface AutoSaveSelectFieldProps {
|
|
2
|
+
autoSave: (newValue: string) => Promise<void>;
|
|
3
|
+
selectOptions: {
|
|
4
|
+
value: string;
|
|
5
|
+
description: string;
|
|
6
|
+
}[];
|
|
7
|
+
value: string;
|
|
8
|
+
className: string;
|
|
9
|
+
label: string;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { AutoSaveSelectFieldProps } from "./AutoSave.types";
|
|
3
|
-
export declare const AutoSaveSelectField: React.FC<AutoSaveSelectFieldProps>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { AutoSaveSelectFieldProps } from "./AutoSave.types";
|
|
3
|
+
export declare const AutoSaveSelectField: React.FC<AutoSaveSelectFieldProps>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { FocusEvent } from "react";
|
|
2
|
-
import { AccessLevels } from "../../globals";
|
|
3
|
-
export interface AutoSaveTextFieldProps {
|
|
4
|
-
autoSave: (value: string) => void;
|
|
5
|
-
value: string;
|
|
6
|
-
className: string;
|
|
7
|
-
label: string;
|
|
8
|
-
onBlur?: {
|
|
9
|
-
(e: FocusEvent<any, Element>): void;
|
|
10
|
-
<T = any>(fieldOrEvent: T): T extends string ? (e: any) => void : void;
|
|
11
|
-
};
|
|
12
|
-
disabled: boolean;
|
|
13
|
-
accessLevel: AccessLevels | undefined;
|
|
14
|
-
error: boolean;
|
|
15
|
-
helperText: string | false | undefined;
|
|
16
|
-
}
|
|
1
|
+
import { FocusEvent } from "react";
|
|
2
|
+
import { AccessLevels } from "../../globals";
|
|
3
|
+
export interface AutoSaveTextFieldProps {
|
|
4
|
+
autoSave: (value: string) => void;
|
|
5
|
+
value: string;
|
|
6
|
+
className: string;
|
|
7
|
+
label: string;
|
|
8
|
+
onBlur?: {
|
|
9
|
+
(e: FocusEvent<any, Element>): void;
|
|
10
|
+
<T = any>(fieldOrEvent: T): T extends string ? (e: any) => void : void;
|
|
11
|
+
};
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
accessLevel: AccessLevels | undefined;
|
|
14
|
+
error: boolean;
|
|
15
|
+
helperText: string | false | undefined;
|
|
16
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { AutoSaveTextFieldProps } from "./AutoSave.types";
|
|
3
|
-
export declare const AutoSaveTextField: React.FC<AutoSaveTextFieldProps>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AutoSaveTextFieldProps } from "./AutoSave.types";
|
|
3
|
+
export declare const AutoSaveTextField: React.FC<AutoSaveTextFieldProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IBreadcrumbsProps } from "./Breadcrumbs.types";
|
|
3
|
-
declare const Breadcrumbs: React.FC<IBreadcrumbsProps>;
|
|
4
|
-
export default Breadcrumbs;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IBreadcrumbsProps } from "./Breadcrumbs.types";
|
|
3
|
+
declare const Breadcrumbs: React.FC<IBreadcrumbsProps>;
|
|
4
|
+
export default Breadcrumbs;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
type BreadcrumbSlot = {
|
|
3
|
-
name: string;
|
|
4
|
-
link: string;
|
|
5
|
-
};
|
|
6
|
-
type BreadCrumbKeys = "first" | "second" | "third";
|
|
7
|
-
type IBreadcrumbs = {
|
|
8
|
-
[K in BreadCrumbKeys]?: BreadcrumbSlot;
|
|
9
|
-
};
|
|
10
|
-
type colorOptions = {
|
|
11
|
-
background?: string;
|
|
12
|
-
color?: string;
|
|
13
|
-
};
|
|
14
|
-
type ColorKeys = "primary" | "secondary" | "tertiary";
|
|
15
|
-
export type IBreadcrumbColors = {
|
|
16
|
-
[K in ColorKeys]?: colorOptions;
|
|
17
|
-
};
|
|
18
|
-
export interface IBreadcrumbsProps {
|
|
19
|
-
logo: ReactNode;
|
|
20
|
-
content: IBreadcrumbs;
|
|
21
|
-
colors?: IBreadcrumbColors;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
type BreadcrumbSlot = {
|
|
3
|
+
name: string;
|
|
4
|
+
link: string;
|
|
5
|
+
};
|
|
6
|
+
type BreadCrumbKeys = "first" | "second" | "third";
|
|
7
|
+
type IBreadcrumbs = {
|
|
8
|
+
[K in BreadCrumbKeys]?: BreadcrumbSlot;
|
|
9
|
+
};
|
|
10
|
+
type colorOptions = {
|
|
11
|
+
background?: string;
|
|
12
|
+
color?: string;
|
|
13
|
+
};
|
|
14
|
+
type ColorKeys = "primary" | "secondary" | "tertiary";
|
|
15
|
+
export type IBreadcrumbColors = {
|
|
16
|
+
[K in ColorKeys]?: colorOptions;
|
|
17
|
+
};
|
|
18
|
+
export interface IBreadcrumbsProps {
|
|
19
|
+
logo: ReactNode;
|
|
20
|
+
content: IBreadcrumbs;
|
|
21
|
+
colors?: IBreadcrumbColors;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
package/build/Button/Button.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { IButtonProps } from "./Button.types";
|
|
3
|
-
declare function Button({ loading, children, errors, type, onClick, disabled, variant, styling, color, accessLevel, ...rest }: IButtonProps): JSX.Element | null;
|
|
4
|
-
export default Button;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IButtonProps } from "./Button.types";
|
|
3
|
+
declare function Button({ loading, children, errors, type, onClick, disabled, variant, styling, color, accessLevel, ...rest }: IButtonProps): JSX.Element | null;
|
|
4
|
+
export default Button;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { IAuthoriserProp } from "../globals";
|
|
3
|
-
import { ButtonProps } from "@mui/material/Button";
|
|
4
|
-
export type IButtonProps<C extends React.ElementType = React.ElementType> = ButtonProps<C, {
|
|
5
|
-
component?: C;
|
|
6
|
-
}> & IAuthoriserProp & {
|
|
7
|
-
loading?: boolean;
|
|
8
|
-
errors?: boolean;
|
|
9
|
-
styling?: string;
|
|
10
|
-
};
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IAuthoriserProp } from "../globals";
|
|
3
|
+
import { ButtonProps } from "@mui/material/Button";
|
|
4
|
+
export type IButtonProps<C extends React.ElementType = React.ElementType> = ButtonProps<C, {
|
|
5
|
+
component?: C;
|
|
6
|
+
}> & IAuthoriserProp & {
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
errors?: boolean;
|
|
9
|
+
styling?: string;
|
|
10
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IButtonWithConfirmProps } from "./ButtonWithConfirm.types";
|
|
3
|
-
declare const ButtonWithConfirm: React.FC<IButtonWithConfirmProps>;
|
|
4
|
-
export default ButtonWithConfirm;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IButtonWithConfirmProps } from "./ButtonWithConfirm.types";
|
|
3
|
+
declare const ButtonWithConfirm: React.FC<IButtonWithConfirmProps>;
|
|
4
|
+
export default ButtonWithConfirm;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { IAuthoriserProp } from "../globals";
|
|
3
|
-
import { ButtonProps } from "@mui/material";
|
|
4
|
-
export interface IButtonWithConfirmProps extends ButtonProps, IAuthoriserProp {
|
|
5
|
-
onClick: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
6
|
-
loading: boolean;
|
|
7
|
-
styling?: string;
|
|
8
|
-
confirmButtonLabel?: string;
|
|
9
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IAuthoriserProp } from "../globals";
|
|
3
|
+
import { ButtonProps } from "@mui/material";
|
|
4
|
+
export interface IButtonWithConfirmProps extends ButtonProps, IAuthoriserProp {
|
|
5
|
+
onClick: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
6
|
+
loading: boolean;
|
|
7
|
+
styling?: string;
|
|
8
|
+
confirmButtonLabel?: string;
|
|
9
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IContentBoxProps } from "./ContentBox.types";
|
|
3
|
-
declare const ContentBox: React.FC<IContentBoxProps>;
|
|
4
|
-
export default ContentBox;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IContentBoxProps } from "./ContentBox.types";
|
|
3
|
+
declare const ContentBox: React.FC<IContentBoxProps>;
|
|
4
|
+
export default ContentBox;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface IContentBoxProps {
|
|
3
|
-
id?: string;
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
limitWidth?: boolean;
|
|
6
|
-
styling?: string;
|
|
7
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface IContentBoxProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
limitWidth?: boolean;
|
|
6
|
+
styling?: string;
|
|
7
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IContentLabelProps } from "./ContentLabel.types";
|
|
3
|
-
declare const ContentLabel: React.FC<IContentLabelProps>;
|
|
4
|
-
export default ContentLabel;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IContentLabelProps } from "./ContentLabel.types";
|
|
3
|
+
declare const ContentLabel: React.FC<IContentLabelProps>;
|
|
4
|
+
export default ContentLabel;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface IContentLabelProps {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
styling?: null | string;
|
|
5
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface IContentLabelProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
styling?: null | string;
|
|
5
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IDatePickerProps } from "./DatePicker.types";
|
|
3
|
-
declare const DatePicker: React.FC<IDatePickerProps>;
|
|
4
|
-
export default DatePicker;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IDatePickerProps } from "./DatePicker.types";
|
|
3
|
+
declare const DatePicker: React.FC<IDatePickerProps>;
|
|
4
|
+
export default DatePicker;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DatePickerProps } from "@mui/x-date-pickers/DatePicker";
|
|
2
|
-
import { IAuthoriserProp } from "../globals";
|
|
3
|
-
export type IDatePickerProps = DatePickerProps<Date> & IAuthoriserProp & {
|
|
4
|
-
styling?: string;
|
|
5
|
-
};
|
|
1
|
+
import { DatePickerProps } from "@mui/x-date-pickers/DatePicker";
|
|
2
|
+
import { IAuthoriserProp } from "../globals";
|
|
3
|
+
export type IDatePickerProps = DatePickerProps<Date> & IAuthoriserProp & {
|
|
4
|
+
styling?: string;
|
|
5
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IEditableTableProps } from "./EditableTable.types";
|
|
3
|
-
declare const EditableTable: React.FC<IEditableTableProps>;
|
|
4
|
-
export default EditableTable;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IEditableTableProps } from "./EditableTable.types";
|
|
3
|
+
declare const EditableTable: React.FC<IEditableTableProps>;
|
|
4
|
+
export default EditableTable;
|
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
import { CellProps, HeaderGroup, Row, TableBodyPropGetter, TableBodyProps, TablePropGetter, TableProps } from "react-table";
|
|
2
|
-
import { SchemaOf } from "yup";
|
|
3
|
-
import React from "react";
|
|
4
|
-
export type IAlignment = "left" | "right" | "inherit" | "center" | "justify";
|
|
5
|
-
export type RowData = {
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
};
|
|
8
|
-
export type ITableHeader = {
|
|
9
|
-
Header: string | JSX.Element;
|
|
10
|
-
accessor: string;
|
|
11
|
-
textAlign?: IAlignment;
|
|
12
|
-
};
|
|
13
|
-
export type TableCellValues = null | undefined | string | number | Date | boolean | string[];
|
|
14
|
-
export type SynchCellWithStateFn = (rowIndex: number, columnId: string, value: TableCellValues, errorStatus: boolean, forceUpdate?: boolean) => void;
|
|
15
|
-
export type FieldConfig = {
|
|
16
|
-
[key: string]: {
|
|
17
|
-
validationRule?: SchemaOf<any>;
|
|
18
|
-
dependentValidationRule?: (values: {
|
|
19
|
-
[key: string]: any;
|
|
20
|
-
}) => SchemaOf<any>;
|
|
21
|
-
customRenderFn?: (args: ICustomRenderFnProps) => JSX.Element;
|
|
22
|
-
prefix?: React.ReactNode | React.JSXElementConstructor<any>;
|
|
23
|
-
suffix?: React.ReactNode | React.JSXElementConstructor<any>;
|
|
24
|
-
textAlign?: IAlignment;
|
|
25
|
-
onBlur?: (args: {
|
|
26
|
-
rowIndex: number;
|
|
27
|
-
value: string;
|
|
28
|
-
setRows: React.Dispatch<React.SetStateAction<RowData[] | null>>;
|
|
29
|
-
values: RowData;
|
|
30
|
-
}) => Promise<void>;
|
|
31
|
-
isCheckbox?: boolean;
|
|
32
|
-
isDateField?: boolean;
|
|
33
|
-
onChangeValueModifier?: (value: string) => TableCellValues;
|
|
34
|
-
getCalculatedValue?: (values: RowData) => TableCellValues;
|
|
35
|
-
total?: boolean;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
export interface IEditableTableProps {
|
|
39
|
-
tableRows: RowData[] | null;
|
|
40
|
-
tableHeaders: ITableHeader[];
|
|
41
|
-
syncCellWithState: SynchCellWithStateFn;
|
|
42
|
-
setRows?: React.Dispatch<React.SetStateAction<RowData[] | null>> | undefined;
|
|
43
|
-
skipPageReset?: boolean;
|
|
44
|
-
fieldConfig: FieldConfig;
|
|
45
|
-
disabled?: boolean;
|
|
46
|
-
setSelectedRows?: React.Dispatch<React.SetStateAction<number[]>>;
|
|
47
|
-
includeRowSelect?: boolean;
|
|
48
|
-
filterTypes?: {
|
|
49
|
-
[key: string]: (rows: any, id: any, filterValue: any) => any;
|
|
50
|
-
};
|
|
51
|
-
filterData?: {
|
|
52
|
-
filterRow: string;
|
|
53
|
-
filterValues: RowData[];
|
|
54
|
-
};
|
|
55
|
-
emptyTableText?: string;
|
|
56
|
-
paginate?: boolean;
|
|
57
|
-
defaultPageSize?: number;
|
|
58
|
-
virtContainerStyling?: string;
|
|
59
|
-
overscan?: number;
|
|
60
|
-
rowHeight?: number;
|
|
61
|
-
includeGlobalSearch?: boolean;
|
|
62
|
-
disableHeaderSelect?: boolean;
|
|
63
|
-
}
|
|
64
|
-
type AdditionalCellProps = Pick<IEditableTableProps, "fieldConfig" | "syncCellWithState" | "setRows">;
|
|
65
|
-
export interface ExtendedCellProps extends AdditionalCellProps, CellProps<RowData> {
|
|
66
|
-
disabled: boolean;
|
|
67
|
-
}
|
|
68
|
-
export interface IEssentialRenderFnProps {
|
|
69
|
-
error: string | false;
|
|
70
|
-
disabled: boolean;
|
|
71
|
-
value: TableCellValues;
|
|
72
|
-
onChange: (e: any) => void;
|
|
73
|
-
onBlur: any;
|
|
74
|
-
prefix?: React.ReactNode | React.JSXElementConstructor<any> | Element;
|
|
75
|
-
suffix?: React.ReactNode | React.JSXElementConstructor<any> | Element;
|
|
76
|
-
numberField?: boolean;
|
|
77
|
-
textAlign?: IAlignment;
|
|
78
|
-
fixedDecimalScale?: boolean;
|
|
79
|
-
}
|
|
80
|
-
export interface ICustomRenderFnProps extends IEssentialRenderFnProps {
|
|
81
|
-
values: {
|
|
82
|
-
[key: string]: any;
|
|
83
|
-
};
|
|
84
|
-
originalValues: {
|
|
85
|
-
[key: string]: any;
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
export interface ITableContentProps extends Pick<IEditableTableProps, "disabled" | "includeRowSelect"> {
|
|
89
|
-
getTableProps: (propGetter?: TablePropGetter<RowData> | undefined) => TableProps;
|
|
90
|
-
headerGroups: HeaderGroup<RowData>[];
|
|
91
|
-
getTableBodyProps: (propGetter?: TableBodyPropGetter<RowData> | undefined) => TableBodyProps;
|
|
92
|
-
prepareRow: (row: Row<RowData>) => void;
|
|
93
|
-
rowsToRender: Row<RowData>[];
|
|
94
|
-
disabled: boolean;
|
|
95
|
-
includeRowSelect: boolean;
|
|
96
|
-
isAllRowsSelected: boolean;
|
|
97
|
-
selectedFlatRows: Row<RowData>[];
|
|
98
|
-
fieldConfig: FieldConfig;
|
|
99
|
-
tableHeaders: ITableHeader[];
|
|
100
|
-
}
|
|
101
|
-
export interface IGlobalFilterProps {
|
|
102
|
-
preGlobalFilteredRows: RowData[];
|
|
103
|
-
globalFilter: string | undefined;
|
|
104
|
-
setGlobalFilter: (val: string | undefined) => void;
|
|
105
|
-
}
|
|
106
|
-
export {};
|
|
1
|
+
import { CellProps, HeaderGroup, Row, TableBodyPropGetter, TableBodyProps, TablePropGetter, TableProps } from "react-table";
|
|
2
|
+
import { SchemaOf } from "yup";
|
|
3
|
+
import React from "react";
|
|
4
|
+
export type IAlignment = "left" | "right" | "inherit" | "center" | "justify";
|
|
5
|
+
export type RowData = {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
};
|
|
8
|
+
export type ITableHeader = {
|
|
9
|
+
Header: string | JSX.Element;
|
|
10
|
+
accessor: string;
|
|
11
|
+
textAlign?: IAlignment;
|
|
12
|
+
};
|
|
13
|
+
export type TableCellValues = null | undefined | string | number | Date | boolean | string[];
|
|
14
|
+
export type SynchCellWithStateFn = (rowIndex: number, columnId: string, value: TableCellValues, errorStatus: boolean, forceUpdate?: boolean) => void;
|
|
15
|
+
export type FieldConfig = {
|
|
16
|
+
[key: string]: {
|
|
17
|
+
validationRule?: SchemaOf<any>;
|
|
18
|
+
dependentValidationRule?: (values: {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}) => SchemaOf<any>;
|
|
21
|
+
customRenderFn?: (args: ICustomRenderFnProps) => JSX.Element;
|
|
22
|
+
prefix?: React.ReactNode | React.JSXElementConstructor<any>;
|
|
23
|
+
suffix?: React.ReactNode | React.JSXElementConstructor<any>;
|
|
24
|
+
textAlign?: IAlignment;
|
|
25
|
+
onBlur?: (args: {
|
|
26
|
+
rowIndex: number;
|
|
27
|
+
value: string;
|
|
28
|
+
setRows: React.Dispatch<React.SetStateAction<RowData[] | null>>;
|
|
29
|
+
values: RowData;
|
|
30
|
+
}) => Promise<void>;
|
|
31
|
+
isCheckbox?: boolean;
|
|
32
|
+
isDateField?: boolean;
|
|
33
|
+
onChangeValueModifier?: (value: string) => TableCellValues;
|
|
34
|
+
getCalculatedValue?: (values: RowData) => TableCellValues;
|
|
35
|
+
total?: boolean;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export interface IEditableTableProps {
|
|
39
|
+
tableRows: RowData[] | null;
|
|
40
|
+
tableHeaders: ITableHeader[];
|
|
41
|
+
syncCellWithState: SynchCellWithStateFn;
|
|
42
|
+
setRows?: React.Dispatch<React.SetStateAction<RowData[] | null>> | undefined;
|
|
43
|
+
skipPageReset?: boolean;
|
|
44
|
+
fieldConfig: FieldConfig;
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
setSelectedRows?: React.Dispatch<React.SetStateAction<number[]>>;
|
|
47
|
+
includeRowSelect?: boolean;
|
|
48
|
+
filterTypes?: {
|
|
49
|
+
[key: string]: (rows: any, id: any, filterValue: any) => any;
|
|
50
|
+
};
|
|
51
|
+
filterData?: {
|
|
52
|
+
filterRow: string;
|
|
53
|
+
filterValues: RowData[];
|
|
54
|
+
};
|
|
55
|
+
emptyTableText?: string;
|
|
56
|
+
paginate?: boolean;
|
|
57
|
+
defaultPageSize?: number;
|
|
58
|
+
virtContainerStyling?: string;
|
|
59
|
+
overscan?: number;
|
|
60
|
+
rowHeight?: number;
|
|
61
|
+
includeGlobalSearch?: boolean;
|
|
62
|
+
disableHeaderSelect?: boolean;
|
|
63
|
+
}
|
|
64
|
+
type AdditionalCellProps = Pick<IEditableTableProps, "fieldConfig" | "syncCellWithState" | "setRows">;
|
|
65
|
+
export interface ExtendedCellProps extends AdditionalCellProps, CellProps<RowData> {
|
|
66
|
+
disabled: boolean;
|
|
67
|
+
}
|
|
68
|
+
export interface IEssentialRenderFnProps {
|
|
69
|
+
error: string | false;
|
|
70
|
+
disabled: boolean;
|
|
71
|
+
value: TableCellValues;
|
|
72
|
+
onChange: (e: any) => void;
|
|
73
|
+
onBlur: any;
|
|
74
|
+
prefix?: React.ReactNode | React.JSXElementConstructor<any> | Element;
|
|
75
|
+
suffix?: React.ReactNode | React.JSXElementConstructor<any> | Element;
|
|
76
|
+
numberField?: boolean;
|
|
77
|
+
textAlign?: IAlignment;
|
|
78
|
+
fixedDecimalScale?: boolean;
|
|
79
|
+
}
|
|
80
|
+
export interface ICustomRenderFnProps extends IEssentialRenderFnProps {
|
|
81
|
+
values: {
|
|
82
|
+
[key: string]: any;
|
|
83
|
+
};
|
|
84
|
+
originalValues: {
|
|
85
|
+
[key: string]: any;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
export interface ITableContentProps extends Pick<IEditableTableProps, "disabled" | "includeRowSelect"> {
|
|
89
|
+
getTableProps: (propGetter?: TablePropGetter<RowData> | undefined) => TableProps;
|
|
90
|
+
headerGroups: HeaderGroup<RowData>[];
|
|
91
|
+
getTableBodyProps: (propGetter?: TableBodyPropGetter<RowData> | undefined) => TableBodyProps;
|
|
92
|
+
prepareRow: (row: Row<RowData>) => void;
|
|
93
|
+
rowsToRender: Row<RowData>[];
|
|
94
|
+
disabled: boolean;
|
|
95
|
+
includeRowSelect: boolean;
|
|
96
|
+
isAllRowsSelected: boolean;
|
|
97
|
+
selectedFlatRows: Row<RowData>[];
|
|
98
|
+
fieldConfig: FieldConfig;
|
|
99
|
+
tableHeaders: ITableHeader[];
|
|
100
|
+
}
|
|
101
|
+
export interface IGlobalFilterProps {
|
|
102
|
+
preGlobalFilteredRows: RowData[];
|
|
103
|
+
globalFilter: string | undefined;
|
|
104
|
+
setGlobalFilter: (val: string | undefined) => void;
|
|
105
|
+
}
|
|
106
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface ITableCheckboxProps {
|
|
3
|
-
disabled?: boolean;
|
|
4
|
-
value: boolean | null | undefined;
|
|
5
|
-
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const TableCheckbox: ({ disabled, value, onChange }: ITableCheckboxProps) => JSX.Element;
|
|
8
|
-
export {};
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface ITableCheckboxProps {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
value: boolean | null | undefined;
|
|
5
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const TableCheckbox: ({ disabled, value, onChange }: ITableCheckboxProps) => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface ITableDateInputProps {
|
|
3
|
-
disabled: boolean;
|
|
4
|
-
value: Date | string | null | undefined;
|
|
5
|
-
error: string | false;
|
|
6
|
-
onChange: (value: Date | string) => void;
|
|
7
|
-
}
|
|
8
|
-
export declare const TableDateInput: ({ disabled, value, error, onChange, }: ITableDateInputProps) => JSX.Element;
|
|
9
|
-
export {};
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface ITableDateInputProps {
|
|
3
|
+
disabled: boolean;
|
|
4
|
+
value: Date | string | null | undefined;
|
|
5
|
+
error: string | false;
|
|
6
|
+
onChange: (value: Date | string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const TableDateInput: ({ disabled, value, error, onChange, }: ITableDateInputProps) => JSX.Element;
|
|
9
|
+
export {};
|