@oc-digital/react-component-library 4.4.0-beta.0 → 4.8.2-0
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/Breadcrumbs/Breadcrumbs.types.d.ts +6 -6
- package/build/Button/Button.d.ts +1 -1
- package/build/Button/Button.types.d.ts +1 -1
- package/build/DatePicker/DatePicker.types.d.ts +1 -1
- package/build/EditableTable/EditableTable.types.d.ts +7 -7
- package/build/EditableTable/defaultCells.d.ts +5 -5
- package/build/LeftNavigation/LeftNavigation.types.d.ts +1 -1
- package/build/MainLayout/MainLayout.types.d.ts +1 -1
- package/build/MobileDatePicker/MobileDatePicker.types.d.ts +1 -1
- package/build/NavbarLayout/Navbar.d.ts +3 -3
- package/build/NavbarLayout/NavbarLayout.d.ts +3 -3
- package/build/StaticTable/StaticTable.types.d.ts +2 -2
- package/build/TextField/TextField.d.ts +1 -1
- package/build/globals/index.d.ts +2 -2
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/build/styles/themes.d.ts +2 -0
- package/build/utils/index.d.ts +1 -1
- package/package.json +18 -11
- package/build/ThemeProvider/index.d.ts +0 -5
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
|
|
2
|
+
type BreadcrumbSlot = {
|
|
3
3
|
name: string;
|
|
4
4
|
link: string;
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
type BreadCrumbKeys = "first" | "second" | "third";
|
|
7
|
+
type IBreadcrumbs = {
|
|
8
8
|
[K in BreadCrumbKeys]?: BreadcrumbSlot;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
type colorOptions = {
|
|
11
11
|
background?: string;
|
|
12
12
|
color?: string;
|
|
13
13
|
};
|
|
14
|
-
|
|
15
|
-
export
|
|
14
|
+
type ColorKeys = "primary" | "secondary" | "tertiary";
|
|
15
|
+
export type IBreadcrumbColors = {
|
|
16
16
|
[K in ColorKeys]?: colorOptions;
|
|
17
17
|
};
|
|
18
18
|
export interface IBreadcrumbsProps {
|
package/build/Button/Button.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { IButtonProps } from "./Button.types";
|
|
3
|
-
declare function Button
|
|
3
|
+
declare function Button({ loading, children, errors, type, onClick, disabled, variant, styling, color, accessLevel, ...rest }: IButtonProps): React.JSX.Element | null;
|
|
4
4
|
export default Button;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IAuthoriserProp } from "../globals";
|
|
3
3
|
import { ButtonProps } from "@mui/material/Button";
|
|
4
|
-
export
|
|
4
|
+
export type IButtonProps<C extends React.ElementType = React.ElementType> = ButtonProps<C, {
|
|
5
5
|
component?: C;
|
|
6
6
|
}> & IAuthoriserProp & {
|
|
7
7
|
loading?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DatePickerProps } from "@mui/x-date-pickers/DatePicker";
|
|
2
2
|
import { IAuthoriserProp } from "../globals";
|
|
3
|
-
export
|
|
3
|
+
export type IDatePickerProps = DatePickerProps<Date> & IAuthoriserProp & {
|
|
4
4
|
styling?: string;
|
|
5
5
|
};
|
|
@@ -2,18 +2,18 @@ import { CellProps, HeaderGroup, Row, TableBodyPropGetter, TableBodyProps, Table
|
|
|
2
2
|
import { SchemaOf } from "yup";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { VirtualItem } from "react-virtual/types";
|
|
5
|
-
export
|
|
6
|
-
export
|
|
5
|
+
export type IAlignment = "left" | "right" | "inherit" | "center" | "justify";
|
|
6
|
+
export type RowData = {
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type ITableHeader = {
|
|
10
10
|
Header: string | JSX.Element;
|
|
11
11
|
accessor: string;
|
|
12
12
|
textAlign?: IAlignment;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
14
|
+
export type TableCellValues = null | undefined | string | number | Date | boolean | string[];
|
|
15
|
+
export type SynchCellWithStateFn = (rowIndex: number, columnId: string, value: TableCellValues, errorStatus: boolean, forceUpdate?: boolean) => void;
|
|
16
|
+
export type FieldConfig = {
|
|
17
17
|
[key: string]: {
|
|
18
18
|
validationRule?: SchemaOf<any>;
|
|
19
19
|
dependentValidationRule?: (values: {
|
|
@@ -60,7 +60,7 @@ export interface IEditableTableProps {
|
|
|
60
60
|
includeGlobalSearch?: boolean;
|
|
61
61
|
disableHeaderSelect?: boolean;
|
|
62
62
|
}
|
|
63
|
-
|
|
63
|
+
type AdditionalCellProps = Pick<IEditableTableProps, "fieldConfig" | "syncCellWithState" | "setRows">;
|
|
64
64
|
export interface ExtendedCellProps extends AdditionalCellProps, CellProps<RowData> {
|
|
65
65
|
disabled: boolean;
|
|
66
66
|
}
|
|
@@ -6,16 +6,16 @@ export declare const TableTextField: React.FC<IEssentialRenderFnProps & {
|
|
|
6
6
|
widthOverride?: string | undefined;
|
|
7
7
|
name?: string | undefined;
|
|
8
8
|
}>;
|
|
9
|
-
export declare const tableTextField: (tableProps: ICustomRenderFnProps) => JSX.Element;
|
|
10
|
-
export declare const tableNumericStringField: (tableProps: ICustomRenderFnProps) => JSX.Element;
|
|
11
|
-
export declare const tableNumericStringFixedDecimalField: (tableProps: ICustomRenderFnProps) => JSX.Element;
|
|
9
|
+
export declare const tableTextField: (tableProps: ICustomRenderFnProps) => React.JSX.Element;
|
|
10
|
+
export declare const tableNumericStringField: (tableProps: ICustomRenderFnProps) => React.JSX.Element;
|
|
11
|
+
export declare const tableNumericStringFixedDecimalField: (tableProps: ICustomRenderFnProps) => React.JSX.Element;
|
|
12
12
|
export declare const SelectionCheckbox: React.JSXElementConstructor<Omit<import("@mui/material").CheckboxProps, "classes"> & import("@mui/styles/withStyles").StyledComponentProps<"root">>;
|
|
13
13
|
interface ITableDatePicker extends IEssentialRenderFnProps {
|
|
14
14
|
fullDate?: boolean;
|
|
15
15
|
}
|
|
16
16
|
export declare const TableDatePicker: React.FC<ITableDatePicker>;
|
|
17
|
-
export declare const tableDateField: (tableProps: ICustomRenderFnProps) => JSX.Element;
|
|
18
|
-
export declare const tableCheckbox: (tableProps: ICustomRenderFnProps) => JSX.Element;
|
|
17
|
+
export declare const tableDateField: (tableProps: ICustomRenderFnProps) => React.JSX.Element;
|
|
18
|
+
export declare const tableCheckbox: (tableProps: ICustomRenderFnProps) => React.JSX.Element;
|
|
19
19
|
interface INonEditableField extends Pick<IEssentialRenderFnProps, "numberField" | "prefix" | "suffix" | "textAlign" | "fixedDecimalScale"> {
|
|
20
20
|
text: React.ReactText;
|
|
21
21
|
styling?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MobileDatePickerProps } from "@mui/x-date-pickers/MobileDatePicker";
|
|
2
2
|
import { IAuthoriserProp } from "../globals";
|
|
3
|
-
export
|
|
3
|
+
export type IMobileDatePickerProps = MobileDatePickerProps<Date> & IAuthoriserProp & {
|
|
4
4
|
styling?: string;
|
|
5
5
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
1
|
+
import React, { FC } from "react";
|
|
2
2
|
import { ISvgComponentProps } from "../SvgComponents/types";
|
|
3
|
-
export
|
|
3
|
+
export type NavbarProps = {
|
|
4
4
|
tabs: Array<{
|
|
5
5
|
Icon: FC<ISvgComponentProps>;
|
|
6
6
|
field: string;
|
|
@@ -8,5 +8,5 @@ export declare type NavbarProps = {
|
|
|
8
8
|
separate?: boolean;
|
|
9
9
|
}>;
|
|
10
10
|
};
|
|
11
|
-
declare const Navbar: ({ tabs }: NavbarProps) => JSX.Element;
|
|
11
|
+
declare const Navbar: ({ tabs }: NavbarProps) => React.JSX.Element;
|
|
12
12
|
export default Navbar;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import React, { FC } from "react";
|
|
2
2
|
import { ISvgComponentProps } from "../SvgComponents/types";
|
|
3
|
-
export
|
|
3
|
+
export type NavbarLayoutTabs = Array<{
|
|
4
4
|
Icon: FC<ISvgComponentProps>;
|
|
5
5
|
field: string;
|
|
6
6
|
path: string;
|
|
7
7
|
separate?: boolean;
|
|
8
8
|
}>;
|
|
9
|
-
export
|
|
9
|
+
export type NavbarLayoutProps = {
|
|
10
10
|
tabs: NavbarLayoutTabs;
|
|
11
11
|
hideTabs?: boolean;
|
|
12
12
|
leaveHeightForMenu?: boolean;
|
|
13
13
|
children: React.ReactNode;
|
|
14
14
|
};
|
|
15
|
-
declare const NavbarLayout: ({ tabs, hideTabs, leaveHeightForMenu, children, }: NavbarLayoutProps) => JSX.Element;
|
|
15
|
+
declare const NavbarLayout: ({ tabs, hideTabs, leaveHeightForMenu, children, }: NavbarLayoutProps) => React.JSX.Element;
|
|
16
16
|
export default NavbarLayout;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type cellAlignmentOptions = "centerJustify" | "leftJustify" | "rightJustify";
|
|
3
|
+
export type headerColours = {
|
|
4
4
|
background?: string;
|
|
5
5
|
border?: string;
|
|
6
6
|
text?: string;
|
|
@@ -12,4 +12,4 @@ interface INumberFormatProps extends Omit<NumberFormatProps, "onChange"> {
|
|
|
12
12
|
}) => void;
|
|
13
13
|
fixedDecimalScale: boolean;
|
|
14
14
|
}
|
|
15
|
-
export declare const NumberFormatField: (props: INumberFormatProps) => JSX.Element;
|
|
15
|
+
export declare const NumberFormatField: (props: INumberFormatProps) => React.JSX.Element;
|
package/build/globals/index.d.ts
CHANGED
|
@@ -15,11 +15,11 @@ export declare const FORM_LOADING = "loading";
|
|
|
15
15
|
export declare const FORM_ENABLED = "enabled";
|
|
16
16
|
export declare const FORM_WARNING = "warning";
|
|
17
17
|
export declare const FORM_DELETING = "deleting";
|
|
18
|
-
export
|
|
18
|
+
export type FormStatuses = typeof FORM_SUCCESS | typeof FORM_ERROR | typeof FORM_LOADING | typeof FORM_ENABLED | typeof FORM_WARNING | typeof FORM_DELETING;
|
|
19
19
|
export declare const READ_LEVEL = "read";
|
|
20
20
|
export declare const WRITE_LEVEL = "write";
|
|
21
21
|
export declare const NO_ACCESS_LEVEL = "noAccess";
|
|
22
|
-
export
|
|
22
|
+
export type AccessLevels = typeof READ_LEVEL | typeof WRITE_LEVEL | typeof NO_ACCESS_LEVEL;
|
|
23
23
|
export interface IAuthoriserProp {
|
|
24
24
|
accessLevel?: AccessLevels;
|
|
25
25
|
}
|