@oc-digital/react-component-library 6.0.0-beta.1 → 6.0.0-beta.10

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.
@@ -1,6 +1,7 @@
1
1
  import { CellProps, HeaderGroup, Row, TableBodyPropGetter, TableBodyProps, TablePropGetter, TableProps } from "react-table";
2
2
  import { SchemaOf } from "yup";
3
3
  import React from "react";
4
+ import { VirtualItem } from "react-virtual/types";
4
5
  export type IAlignment = "left" | "right" | "inherit" | "center" | "justify";
5
6
  export type RowData = {
6
7
  [key: string]: any;
@@ -91,6 +92,9 @@ export interface ITableContentProps extends Pick<IEditableTableProps, "disabled"
91
92
  rowsToRender: Row<RowData>[];
92
93
  disabled: boolean;
93
94
  includeRowSelect: boolean;
95
+ paddingTop: number;
96
+ paddingBottom: number;
97
+ virtualRows: VirtualItem[];
94
98
  isAllRowsSelected: boolean;
95
99
  selectedFlatRows: Row<RowData>[];
96
100
  }
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { PureComponent } from "react";
2
2
  export interface ITableTextInputProps {
3
3
  name?: string;
4
4
  value: string | number | null | undefined;
@@ -13,4 +13,6 @@ export interface ITableTextInputProps {
13
13
  disabled?: boolean;
14
14
  fullWidth?: boolean;
15
15
  }
16
- export declare const TableTextInput: ({ name, value, onChange, onBlur, prefix, suffix, textAlign, numberField, fixedDecimalScale, error, disabled, fullWidth, }: ITableTextInputProps) => JSX.Element;
16
+ export declare class TableTextInput extends PureComponent<ITableTextInputProps> {
17
+ render(): JSX.Element;
18
+ }
@@ -1,3 +1,10 @@
1
+ /**
2
+ * Optimised for TableTextField.
3
+ *
4
+ * Instead of accepting a HTMLElement, which would require a re-render to get the correct width,
5
+ * this function is oprimised to accept only the text and max width.
6
+ */
7
+ export declare function getTableTextInputTextWidth(text: string, maxWidth?: number): string;
1
8
  /**
2
9
  * Calculates the width of a given string in pixels (perfect result)
3
10
  *
@@ -10,6 +10,7 @@ interface INonEditableField extends Pick<IEssentialRenderFnProps, "numberField"
10
10
  styling?: string;
11
11
  inputStyling?: string;
12
12
  widthOverride?: string | undefined;
13
+ fullWidth?: boolean;
13
14
  }
14
15
  export declare const NonEditableField: React.FC<INonEditableField>;
15
16
  interface ITableSelect extends IEssentialRenderFnProps {