@oc-digital/react-component-library 2.1.11-beta.1 → 2.2.0-beta.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/DatePicker/DatePicker.types.d.ts +4 -2
- package/build/EditableTable/EditableTable.types.d.ts +7 -7
- package/build/EditableTable/defaultCells.d.ts +7 -7
- package/build/KeyboardDatePicker/KeyboardDatePicker.types.d.ts +4 -2
- package/build/LeftNavigation/LeftNavigation.types.d.ts +1 -1
- package/build/NavbarLayout/Navbar.d.ts +3 -3
- package/build/NavbarLayout/NavbarLayout.d.ts +3 -3
- package/build/Select/Select.types.d.ts +1 -1
- package/build/StaticTable/StaticTable.types.d.ts +2 -2
- package/build/TextField/TextField.d.ts +3 -3
- package/build/TextField/TextField.types.d.ts +1 -1
- package/build/globals/index.d.ts +1 -1
- package/build/index.js +155 -1
- package/build/index.js.map +1 -1
- package/build/styles/font.d.ts +1 -1
- package/build/styles/layout.d.ts +1 -1
- package/build/styles/spacing.d.ts +1 -1
- package/build/styles/theme.d.ts +1 -0
- package/build/utils/index.d.ts +1 -1
- package/package.json +10 -1
- package/build/NavbarLayout/constants.d.ts +0 -1
|
@@ -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 {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { DatePickerProps } from "@
|
|
1
|
+
import { DatePickerProps } from "@mui/x-date-pickers";
|
|
2
2
|
import { IAuthoriserProp } from "../globals";
|
|
3
|
-
|
|
3
|
+
type InputDate = any;
|
|
4
|
+
export interface IDatePickerProps extends IAuthoriserProp, DatePickerProps<InputDate, InputDate> {
|
|
4
5
|
styling?: string;
|
|
5
6
|
}
|
|
7
|
+
export {};
|
|
@@ -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
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import React, { ReactChild, ReactNode } from "react";
|
|
2
2
|
import { ICustomRenderFnProps, IEssentialRenderFnProps } from "./EditableTable.types";
|
|
3
3
|
export declare const TableTextField: React.FC<IEssentialRenderFnProps>;
|
|
4
|
-
export declare const tableTextField: (tableProps: ICustomRenderFnProps) => JSX.Element;
|
|
5
|
-
export declare const tableNumericStringField: (tableProps: ICustomRenderFnProps) => JSX.Element;
|
|
6
|
-
export declare const tableNumericStringFixedDecimalField: (tableProps: ICustomRenderFnProps) => JSX.Element;
|
|
7
|
-
export declare const SelectionCheckbox: React.
|
|
4
|
+
export declare const tableTextField: (tableProps: ICustomRenderFnProps) => React.JSX.Element;
|
|
5
|
+
export declare const tableNumericStringField: (tableProps: ICustomRenderFnProps) => React.JSX.Element;
|
|
6
|
+
export declare const tableNumericStringFixedDecimalField: (tableProps: ICustomRenderFnProps) => React.JSX.Element;
|
|
7
|
+
export declare const SelectionCheckbox: React.JSXElementConstructor<Omit<import("@mui/material").CheckboxProps, "classes"> & import("@mui/styles/withStyles").StyledComponentProps<"root">>;
|
|
8
8
|
interface ITableDatePicker extends IEssentialRenderFnProps {
|
|
9
9
|
fullDate?: boolean;
|
|
10
10
|
}
|
|
11
11
|
export declare const TableDatePicker: React.FC<ITableDatePicker>;
|
|
12
|
-
export declare const tableDateField: (tableProps: ICustomRenderFnProps) => JSX.Element;
|
|
13
|
-
export declare const tableInvoiceDateField: (tableProps: ICustomRenderFnProps) => JSX.Element;
|
|
14
|
-
export declare const tableCheckbox: (tableProps: ICustomRenderFnProps) => JSX.Element;
|
|
12
|
+
export declare const tableDateField: (tableProps: ICustomRenderFnProps) => React.JSX.Element;
|
|
13
|
+
export declare const tableInvoiceDateField: (tableProps: ICustomRenderFnProps) => React.JSX.Element;
|
|
14
|
+
export declare const tableCheckbox: (tableProps: ICustomRenderFnProps) => React.JSX.Element;
|
|
15
15
|
interface INonEditableField extends Pick<IEssentialRenderFnProps, "numberField" | "prefix" | "suffix" | "textAlign" | "fixedDecimalScale"> {
|
|
16
16
|
text: React.ReactText;
|
|
17
17
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DatePickerProps } from "@mui/x-date-pickers";
|
|
2
2
|
import { IAuthoriserProp } from "../globals";
|
|
3
|
-
|
|
3
|
+
type InputDate = any;
|
|
4
|
+
export interface IKeyboardDatePickerProps extends IAuthoriserProp, DatePickerProps<InputDate, InputDate> {
|
|
4
5
|
styling?: string;
|
|
5
6
|
}
|
|
7
|
+
export {};
|
|
@@ -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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { NumberFormatProps } from "react-number-format";
|
|
3
3
|
import { ITextFieldProps } from "./TextField.types";
|
|
4
4
|
declare const TextField: React.FC<ITextFieldProps>;
|
|
5
5
|
export default TextField;
|
|
@@ -10,7 +10,7 @@ interface INumberFormatProps extends Omit<NumberFormatProps, "onChange"> {
|
|
|
10
10
|
value: string;
|
|
11
11
|
};
|
|
12
12
|
}) => void;
|
|
13
|
-
inputRef:
|
|
13
|
+
inputRef: any;
|
|
14
14
|
fixedDecimalScale: boolean;
|
|
15
15
|
}
|
|
16
|
-
export declare const NumberFormatField: (props: INumberFormatProps) => JSX.Element;
|
|
16
|
+
export declare const NumberFormatField: (props: INumberFormatProps) => React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OutlinedTextFieldProps } from "@material
|
|
1
|
+
import { OutlinedTextFieldProps } from "@mui/material";
|
|
2
2
|
import { IAuthoriserProp } from "../globals";
|
|
3
3
|
export interface ITextFieldProps extends IAuthoriserProp, Omit<OutlinedTextFieldProps, "variant"> {
|
|
4
4
|
styling?: string;
|
package/build/globals/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare const FORM_ERROR = "error";
|
|
|
14
14
|
export declare const FORM_LOADING = "loading";
|
|
15
15
|
export declare const FORM_ENABLED = "enabled";
|
|
16
16
|
export declare const FORM_WARNING = "warning";
|
|
17
|
-
export
|
|
17
|
+
export type FormStatuses = typeof FORM_SUCCESS | typeof FORM_ERROR | typeof FORM_LOADING | typeof FORM_ENABLED | typeof FORM_WARNING;
|
|
18
18
|
export declare const READ_LEVEL = "read";
|
|
19
19
|
export declare const WRITE_LEVEL = "write";
|
|
20
20
|
export declare const NO_ACCESS_LEVEL = "noAccess";
|