@oc-digital/react-component-library 7.2.2 → 7.2.3-beta.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.
Files changed (252) hide show
  1. package/build/Alert/Alert.d.ts +5 -4
  2. package/build/Alert/Alert.types.d.ts +14 -13
  3. package/build/AlphabeticalList/AlphabeticalList.d.ts +5 -4
  4. package/build/AlphabeticalList/AlphabeticalList.types.d.ts +22 -22
  5. package/build/AutoSave/Select/AutoSave.types.d.ts +11 -11
  6. package/build/AutoSave/Select/index.d.ts +4 -3
  7. package/build/AutoSave/Text/AutoSave.types.d.ts +17 -16
  8. package/build/AutoSave/Text/index.d.ts +4 -3
  9. package/build/Breadcrumbs/Breadcrumbs.d.ts +5 -4
  10. package/build/Breadcrumbs/Breadcrumbs.types.d.ts +24 -23
  11. package/build/Button/Button.d.ts +4 -4
  12. package/build/Button/Button.types.d.ts +10 -10
  13. package/build/ButtonWithConfirm/ButtonWithConfirm.d.ts +5 -4
  14. package/build/ButtonWithConfirm/ButtonWithConfirm.types.d.ts +9 -9
  15. package/build/ContentBox/ContentBox.d.ts +5 -4
  16. package/build/ContentBox/ContentBox.types.d.ts +7 -7
  17. package/build/ContentLabel/ContentLabel.d.ts +5 -4
  18. package/build/ContentLabel/ContentLabel.types.d.ts +5 -5
  19. package/build/DatePicker/DatePicker.d.ts +5 -4
  20. package/build/DatePicker/DatePicker.types.d.ts +6 -5
  21. package/build/EditableTable/EditableTable.d.ts +5 -4
  22. package/build/EditableTable/EditableTable.types.d.ts +107 -106
  23. package/build/EditableTable/components/TableCheckbox.d.ts +8 -8
  24. package/build/EditableTable/components/TableDateInput.d.ts +8 -9
  25. package/build/EditableTable/components/TableTextInput.d.ts +21 -20
  26. package/build/EditableTable/components/utils/getTextWidth.d.ts +13 -13
  27. package/build/EditableTable/defaultCells.d.ts +31 -30
  28. package/build/EntityList/EntityList.d.ts +5 -4
  29. package/build/EntityList/EntityList.types.d.ts +15 -14
  30. package/build/ErrorIndicator/ErrorIndicator.d.ts +5 -4
  31. package/build/ErrorIndicator/ErrorIndicator.types.d.ts +5 -4
  32. package/build/ImageDisplayAndUpload/ImageDisplayAndUpload.d.ts +5 -4
  33. package/build/ImageDisplayAndUpload/ImageDisplayAndUpload.types.d.ts +9 -8
  34. package/build/KeyboardDatePicker/KeyboardDatePicker.d.ts +5 -4
  35. package/build/KeyboardDatePicker/KeyboardDatePicker.types.d.ts +6 -5
  36. package/build/LeftNavigation/LeftNavigation.d.ts +5 -4
  37. package/build/LeftNavigation/LeftNavigation.types.d.ts +97 -96
  38. package/build/LeftNavigation/NavListItem.d.ts +5 -4
  39. package/build/LeftNavigation/PrimaryLeftNavigation.d.ts +5 -4
  40. package/build/LeftNavigation/SecondaryLeftNavigation.d.ts +5 -4
  41. package/build/LoadingSpinner/LoadingSpinner.d.ts +5 -4
  42. package/build/LoadingSpinner/LoadingSpinner.types.d.ts +6 -5
  43. package/build/MainLayout/MainLayout.d.ts +5 -4
  44. package/build/MainLayout/MainLayout.types.d.ts +11 -10
  45. package/build/MobileDatePicker/MobileDatePicker.d.ts +5 -4
  46. package/build/MobileDatePicker/MobileDatePicker.types.d.ts +6 -5
  47. package/build/NavbarLayout/Navbar.d.ts +13 -12
  48. package/build/NavbarLayout/NavbarLayout.d.ts +17 -16
  49. package/build/NavbarLayout/index.d.ts +2 -2
  50. package/build/SearchBar/SearchBar.d.ts +5 -4
  51. package/build/SearchBar/SearchBar.types.d.ts +33 -33
  52. package/build/Select/Select.d.ts +5 -4
  53. package/build/Select/Select.types.d.ts +16 -16
  54. package/build/StaticTable/StaticTable.d.ts +5 -4
  55. package/build/StaticTable/StaticTable.types.d.ts +21 -21
  56. package/build/SvgComponents/ContainedPartnersLogo.d.ts +5 -4
  57. package/build/SvgComponents/HomeSvg.d.ts +5 -4
  58. package/build/SvgComponents/NovelLogoSvg.d.ts +5 -4
  59. package/build/SvgComponents/OrganisationList.d.ts +5 -4
  60. package/build/SvgComponents/ProjectsSvg.d.ts +5 -4
  61. package/build/SvgComponents/index.d.ts +5 -5
  62. package/build/SvgComponents/types.d.ts +6 -6
  63. package/build/TextField/TextField.d.ts +16 -15
  64. package/build/TextField/TextField.types.d.ts +8 -7
  65. package/build/Tooltip/OptionalTooltip.d.ts +9 -8
  66. package/build/Tooltip/index.d.ts +1 -1
  67. package/build/globals/index.d.ts +26 -26
  68. package/build/hooks/index.d.ts +3 -3
  69. package/build/hooks/useDebounceEffect.d.ts +2 -2
  70. package/build/hooks/useInterval.d.ts +2 -2
  71. package/build/hooks/useWhyDidYouUpdate.d.ts +1 -1
  72. package/build/index.d.ts +38 -37
  73. package/build/index.js +63000 -1
  74. package/build/index.js.map +1 -1
  75. package/build/stories/Button.d.ts +28 -0
  76. package/build/stories/Button.stories.d.ts +10 -0
  77. package/build/stories/Header.d.ts +12 -0
  78. package/build/stories/Header.stories.d.ts +8 -0
  79. package/build/stories/Page.d.ts +3 -0
  80. package/build/stories/Page.stories.d.ts +8 -0
  81. package/build/style.css +1 -0
  82. package/build/styles/colours.d.ts +3 -3
  83. package/build/styles/font.d.ts +1 -1
  84. package/build/styles/index.d.ts +3 -3
  85. package/build/styles/layout.d.ts +1 -1
  86. package/build/styles/spacing.d.ts +1 -1
  87. package/build/styles/themes.d.ts +2 -2
  88. package/build/utils/index.d.ts +6 -5
  89. package/package.json +21 -19
  90. package/build/Alert/Alert.js +0 -48
  91. package/build/Alert/Alert.js.map +0 -1
  92. package/build/Alert/Alert.types.js +0 -2
  93. package/build/Alert/Alert.types.js.map +0 -1
  94. package/build/AlphabeticalList/AlphabeticalList.js +0 -91
  95. package/build/AlphabeticalList/AlphabeticalList.js.map +0 -1
  96. package/build/AlphabeticalList/AlphabeticalList.types.js +0 -2
  97. package/build/AlphabeticalList/AlphabeticalList.types.js.map +0 -1
  98. package/build/AutoSave/Select/AutoSave.types.js +0 -2
  99. package/build/AutoSave/Select/AutoSave.types.js.map +0 -1
  100. package/build/AutoSave/Select/index.js +0 -31
  101. package/build/AutoSave/Select/index.js.map +0 -1
  102. package/build/AutoSave/Text/AutoSave.types.js +0 -2
  103. package/build/AutoSave/Text/AutoSave.types.js.map +0 -1
  104. package/build/AutoSave/Text/index.js +0 -140
  105. package/build/AutoSave/Text/index.js.map +0 -1
  106. package/build/Breadcrumbs/Breadcrumbs.js +0 -126
  107. package/build/Breadcrumbs/Breadcrumbs.js.map +0 -1
  108. package/build/Breadcrumbs/Breadcrumbs.types.js +0 -2
  109. package/build/Breadcrumbs/Breadcrumbs.types.js.map +0 -1
  110. package/build/Button/Button.js +0 -54
  111. package/build/Button/Button.js.map +0 -1
  112. package/build/Button/Button.types.js +0 -2
  113. package/build/Button/Button.types.js.map +0 -1
  114. package/build/ButtonWithConfirm/ButtonWithConfirm.js +0 -63
  115. package/build/ButtonWithConfirm/ButtonWithConfirm.js.map +0 -1
  116. package/build/ButtonWithConfirm/ButtonWithConfirm.types.js +0 -2
  117. package/build/ButtonWithConfirm/ButtonWithConfirm.types.js.map +0 -1
  118. package/build/ContentBox/ContentBox.js +0 -21
  119. package/build/ContentBox/ContentBox.js.map +0 -1
  120. package/build/ContentBox/ContentBox.types.js +0 -2
  121. package/build/ContentBox/ContentBox.types.js.map +0 -1
  122. package/build/ContentLabel/ContentLabel.js +0 -10
  123. package/build/ContentLabel/ContentLabel.js.map +0 -1
  124. package/build/ContentLabel/ContentLabel.types.js +0 -2
  125. package/build/ContentLabel/ContentLabel.types.js.map +0 -1
  126. package/build/DatePicker/DatePicker.js +0 -38
  127. package/build/DatePicker/DatePicker.js.map +0 -1
  128. package/build/DatePicker/DatePicker.types.js +0 -2
  129. package/build/DatePicker/DatePicker.types.js.map +0 -1
  130. package/build/EditableTable/EditableTable.js +0 -398
  131. package/build/EditableTable/EditableTable.js.map +0 -1
  132. package/build/EditableTable/EditableTable.types.js +0 -2
  133. package/build/EditableTable/EditableTable.types.js.map +0 -1
  134. package/build/EditableTable/components/TableCheckbox.js +0 -8
  135. package/build/EditableTable/components/TableCheckbox.js.map +0 -1
  136. package/build/EditableTable/components/TableDateInput.js +0 -20
  137. package/build/EditableTable/components/TableDateInput.js.map +0 -1
  138. package/build/EditableTable/components/TableTextInput.js +0 -89
  139. package/build/EditableTable/components/TableTextInput.js.map +0 -1
  140. package/build/EditableTable/components/styled/Checkbox.d.ts +0 -5
  141. package/build/EditableTable/components/styled/CheckboxLabel.d.ts +0 -5
  142. package/build/EditableTable/components/styled/Input.d.ts +0 -21
  143. package/build/EditableTable/components/styled/InputAdornmentWrapper.d.ts +0 -5
  144. package/build/EditableTable/components/styled/InputWrapper.d.ts +0 -5
  145. package/build/EditableTable/components/styled/SmallError.d.ts +0 -5
  146. package/build/EditableTable/components/utils/getTextWidth.js +0 -58
  147. package/build/EditableTable/components/utils/getTextWidth.js.map +0 -1
  148. package/build/EditableTable/defaultCells.js +0 -118
  149. package/build/EditableTable/defaultCells.js.map +0 -1
  150. package/build/EntityList/EntityList.js +0 -53
  151. package/build/EntityList/EntityList.js.map +0 -1
  152. package/build/EntityList/EntityList.types.js +0 -2
  153. package/build/EntityList/EntityList.types.js.map +0 -1
  154. package/build/ErrorIndicator/ErrorIndicator.js +0 -22
  155. package/build/ErrorIndicator/ErrorIndicator.js.map +0 -1
  156. package/build/ErrorIndicator/ErrorIndicator.types.js +0 -2
  157. package/build/ErrorIndicator/ErrorIndicator.types.js.map +0 -1
  158. package/build/ImageDisplayAndUpload/ImageDisplayAndUpload.js +0 -293
  159. package/build/ImageDisplayAndUpload/ImageDisplayAndUpload.js.map +0 -1
  160. package/build/ImageDisplayAndUpload/ImageDisplayAndUpload.types.js +0 -2
  161. package/build/ImageDisplayAndUpload/ImageDisplayAndUpload.types.js.map +0 -1
  162. package/build/KeyboardDatePicker/KeyboardDatePicker.js +0 -38
  163. package/build/KeyboardDatePicker/KeyboardDatePicker.js.map +0 -1
  164. package/build/KeyboardDatePicker/KeyboardDatePicker.types.js +0 -2
  165. package/build/KeyboardDatePicker/KeyboardDatePicker.types.js.map +0 -1
  166. package/build/LeftNavigation/LeftNavigation.js +0 -47
  167. package/build/LeftNavigation/LeftNavigation.js.map +0 -1
  168. package/build/LeftNavigation/LeftNavigation.types.js +0 -2
  169. package/build/LeftNavigation/LeftNavigation.types.js.map +0 -1
  170. package/build/LeftNavigation/NavListItem.js +0 -122
  171. package/build/LeftNavigation/NavListItem.js.map +0 -1
  172. package/build/LeftNavigation/PrimaryLeftNavigation.js +0 -108
  173. package/build/LeftNavigation/PrimaryLeftNavigation.js.map +0 -1
  174. package/build/LeftNavigation/SecondaryLeftNavigation.js +0 -88
  175. package/build/LeftNavigation/SecondaryLeftNavigation.js.map +0 -1
  176. package/build/LoadingSpinner/LoadingSpinner.js +0 -21
  177. package/build/LoadingSpinner/LoadingSpinner.js.map +0 -1
  178. package/build/LoadingSpinner/LoadingSpinner.types.js +0 -2
  179. package/build/LoadingSpinner/LoadingSpinner.types.js.map +0 -1
  180. package/build/MainLayout/MainLayout.js +0 -46
  181. package/build/MainLayout/MainLayout.js.map +0 -1
  182. package/build/MainLayout/MainLayout.types.js +0 -2
  183. package/build/MainLayout/MainLayout.types.js.map +0 -1
  184. package/build/MobileDatePicker/MobileDatePicker.js +0 -38
  185. package/build/MobileDatePicker/MobileDatePicker.js.map +0 -1
  186. package/build/MobileDatePicker/MobileDatePicker.types.js +0 -2
  187. package/build/MobileDatePicker/MobileDatePicker.types.js.map +0 -1
  188. package/build/NavbarLayout/Navbar.js +0 -101
  189. package/build/NavbarLayout/Navbar.js.map +0 -1
  190. package/build/NavbarLayout/NavbarLayout.js +0 -52
  191. package/build/NavbarLayout/NavbarLayout.js.map +0 -1
  192. package/build/NavbarLayout/index.js +0 -2
  193. package/build/NavbarLayout/index.js.map +0 -1
  194. package/build/SearchBar/SearchBar.js +0 -75
  195. package/build/SearchBar/SearchBar.js.map +0 -1
  196. package/build/SearchBar/SearchBar.types.js +0 -2
  197. package/build/SearchBar/SearchBar.types.js.map +0 -1
  198. package/build/Select/Select.js +0 -140
  199. package/build/Select/Select.js.map +0 -1
  200. package/build/Select/Select.types.js +0 -2
  201. package/build/Select/Select.types.js.map +0 -1
  202. package/build/StaticTable/StaticTable.js +0 -147
  203. package/build/StaticTable/StaticTable.js.map +0 -1
  204. package/build/StaticTable/StaticTable.types.js +0 -2
  205. package/build/StaticTable/StaticTable.types.js.map +0 -1
  206. package/build/SvgComponents/ContainedPartnersLogo.js +0 -8
  207. package/build/SvgComponents/ContainedPartnersLogo.js.map +0 -1
  208. package/build/SvgComponents/HomeSvg.js +0 -8
  209. package/build/SvgComponents/HomeSvg.js.map +0 -1
  210. package/build/SvgComponents/NovelLogoSvg.js +0 -8
  211. package/build/SvgComponents/NovelLogoSvg.js.map +0 -1
  212. package/build/SvgComponents/OrganisationList.js +0 -8
  213. package/build/SvgComponents/OrganisationList.js.map +0 -1
  214. package/build/SvgComponents/ProjectsSvg.js +0 -8
  215. package/build/SvgComponents/ProjectsSvg.js.map +0 -1
  216. package/build/SvgComponents/index.js +0 -6
  217. package/build/SvgComponents/index.js.map +0 -1
  218. package/build/SvgComponents/types.js +0 -2
  219. package/build/SvgComponents/types.js.map +0 -1
  220. package/build/TextField/TextField.js +0 -67
  221. package/build/TextField/TextField.js.map +0 -1
  222. package/build/TextField/TextField.types.js +0 -2
  223. package/build/TextField/TextField.types.js.map +0 -1
  224. package/build/Tooltip/OptionalTooltip.js +0 -11
  225. package/build/Tooltip/OptionalTooltip.js.map +0 -1
  226. package/build/Tooltip/index.js +0 -2
  227. package/build/Tooltip/index.js.map +0 -1
  228. package/build/assets/index-DCUzKTQq.css +0 -78
  229. package/build/globals/index.js +0 -28
  230. package/build/globals/index.js.map +0 -1
  231. package/build/hooks/index.js +0 -4
  232. package/build/hooks/index.js.map +0 -1
  233. package/build/hooks/useDebounceEffect.js +0 -12
  234. package/build/hooks/useDebounceEffect.js.map +0 -1
  235. package/build/hooks/useInterval.js +0 -19
  236. package/build/hooks/useInterval.js.map +0 -1
  237. package/build/hooks/useWhyDidYouUpdate.js +0 -43
  238. package/build/hooks/useWhyDidYouUpdate.js.map +0 -1
  239. package/build/styles/colours.js +0 -4
  240. package/build/styles/colours.js.map +0 -1
  241. package/build/styles/font.js +0 -19
  242. package/build/styles/font.js.map +0 -1
  243. package/build/styles/index.js +0 -4
  244. package/build/styles/index.js.map +0 -1
  245. package/build/styles/layout.js +0 -85
  246. package/build/styles/layout.js.map +0 -1
  247. package/build/styles/spacing.js +0 -50
  248. package/build/styles/spacing.js.map +0 -1
  249. package/build/styles/themes.js +0 -56
  250. package/build/styles/themes.js.map +0 -1
  251. package/build/utils/index.js +0 -14
  252. package/build/utils/index.js.map +0 -1
@@ -1,4 +1,5 @@
1
- import React from "react";
2
- import { IAlertProps } from "./Alert.types";
3
- declare const Alert: React.FC<IAlertProps>;
4
- export default Alert;
1
+ import { default as React } from 'react';
2
+ import { IAlertProps } from './Alert.types';
3
+
4
+ declare const Alert: React.FC<IAlertProps>;
5
+ export default Alert;
@@ -1,13 +1,14 @@
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
+
4
+ export interface IAlertProps {
5
+ alertActionHandler?: () => void;
6
+ formStatus: FormStatuses;
7
+ actionButton?: {
8
+ handler: () => void;
9
+ text: string;
10
+ };
11
+ alertMessage: ReactChild;
12
+ addBreak?: boolean;
13
+ styling?: string;
14
+ }
@@ -1,4 +1,5 @@
1
- import React from "react";
2
- import { IAlphabeticalListProps } from "./AlphabeticalList.types";
3
- declare const AlphabeticalList: React.FC<IAlphabeticalListProps>;
4
- export default AlphabeticalList;
1
+ import { default as React } from 'react';
2
+ import { IAlphabeticalListProps } from './AlphabeticalList.types';
3
+
4
+ declare const AlphabeticalList: React.FC<IAlphabeticalListProps>;
5
+ 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,4 @@
1
- import React from "react";
2
- import type { AutoSaveSelectFieldProps } from "./AutoSave.types";
3
- export declare const AutoSaveSelectField: React.FC<AutoSaveSelectFieldProps>;
1
+ import { default as React } from 'react';
2
+ import { AutoSaveSelectFieldProps } from './AutoSave.types';
3
+
4
+ export declare const AutoSaveSelectField: React.FC<AutoSaveSelectFieldProps>;
@@ -1,16 +1,17 @@
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
+
4
+ export interface AutoSaveTextFieldProps {
5
+ autoSave: (value: string) => void;
6
+ value: string;
7
+ className: string;
8
+ label: string;
9
+ onBlur?: {
10
+ (e: FocusEvent<any, Element>): void;
11
+ <T = any>(fieldOrEvent: T): T extends string ? (e: any) => void : void;
12
+ };
13
+ disabled: boolean;
14
+ accessLevel: AccessLevels | undefined;
15
+ error: boolean;
16
+ helperText: string | false | undefined;
17
+ }
@@ -1,3 +1,4 @@
1
- import React from "react";
2
- import { AutoSaveTextFieldProps } from "./AutoSave.types";
3
- export declare const AutoSaveTextField: React.FC<AutoSaveTextFieldProps>;
1
+ import { default as React } from 'react';
2
+ import { AutoSaveTextFieldProps } from './AutoSave.types';
3
+
4
+ export declare const AutoSaveTextField: React.FC<AutoSaveTextFieldProps>;
@@ -1,4 +1,5 @@
1
- import React from "react";
2
- import { IBreadcrumbsProps } from "./Breadcrumbs.types";
3
- declare const Breadcrumbs: React.FC<IBreadcrumbsProps>;
4
- export default Breadcrumbs;
1
+ import { default as React } from 'react';
2
+ import { IBreadcrumbsProps } from './Breadcrumbs.types';
3
+
4
+ declare const Breadcrumbs: React.FC<IBreadcrumbsProps>;
5
+ export default Breadcrumbs;
@@ -1,23 +1,24 @@
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
+
3
+ type BreadcrumbSlot = {
4
+ name: string;
5
+ link: string;
6
+ };
7
+ type BreadCrumbKeys = "first" | "second" | "third";
8
+ type IBreadcrumbs = {
9
+ [K in BreadCrumbKeys]?: BreadcrumbSlot;
10
+ };
11
+ type colorOptions = {
12
+ background?: string;
13
+ color?: string;
14
+ };
15
+ type ColorKeys = "primary" | "secondary" | "tertiary";
16
+ export type IBreadcrumbColors = {
17
+ [K in ColorKeys]?: colorOptions;
18
+ };
19
+ export interface IBreadcrumbsProps {
20
+ logo: ReactNode;
21
+ content: IBreadcrumbs;
22
+ colors?: IBreadcrumbColors;
23
+ }
24
+ export {};
@@ -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
+ import { IButtonProps } from './Button.types';
2
+
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
+ import { IAuthoriserProp } from '../globals';
2
+ import { ButtonProps } from '@mui/material/Button';
3
+
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,5 @@
1
- import React from "react";
2
- import { IButtonWithConfirmProps } from "./ButtonWithConfirm.types";
3
- declare const ButtonWithConfirm: React.FC<IButtonWithConfirmProps>;
4
- export default ButtonWithConfirm;
1
+ import { default as React } from 'react';
2
+ import { IButtonWithConfirmProps } from './ButtonWithConfirm.types';
3
+
4
+ declare const ButtonWithConfirm: React.FC<IButtonWithConfirmProps>;
5
+ 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
+ import { IAuthoriserProp } from '../globals';
2
+ import { ButtonProps } from '@mui/material';
3
+
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,5 @@
1
- import React from "react";
2
- import { IContentBoxProps } from "./ContentBox.types";
3
- declare const ContentBox: React.FC<IContentBoxProps>;
4
- export default ContentBox;
1
+ import { default as React } from 'react';
2
+ import { IContentBoxProps } from './ContentBox.types';
3
+
4
+ declare const ContentBox: React.FC<IContentBoxProps>;
5
+ 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,5 @@
1
- import React from "react";
2
- import { IContentLabelProps } from "./ContentLabel.types";
3
- declare const ContentLabel: React.FC<IContentLabelProps>;
4
- export default ContentLabel;
1
+ import { default as React } from 'react';
2
+ import { IContentLabelProps } from './ContentLabel.types';
3
+
4
+ declare const ContentLabel: React.FC<IContentLabelProps>;
5
+ 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,5 @@
1
- import React from "react";
2
- import { IDatePickerProps } from "./DatePicker.types";
3
- declare const DatePicker: React.FC<IDatePickerProps>;
4
- export default DatePicker;
1
+ import { default as React } from 'react';
2
+ import { IDatePickerProps } from './DatePicker.types';
3
+
4
+ declare const DatePicker: React.FC<IDatePickerProps>;
5
+ export default DatePicker;
@@ -1,5 +1,6 @@
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
+
4
+ export type IDatePickerProps = DatePickerProps<Date> & IAuthoriserProp & {
5
+ styling?: string;
6
+ };
@@ -1,4 +1,5 @@
1
- import React from "react";
2
- import { IEditableTableProps } from "./EditableTable.types";
3
- declare const EditableTable: React.FC<IEditableTableProps>;
4
- export default EditableTable;
1
+ import { default as React } from 'react';
2
+ import { IEditableTableProps } from './EditableTable.types';
3
+
4
+ declare const EditableTable: React.FC<IEditableTableProps>;
5
+ export default EditableTable;
@@ -1,106 +1,107 @@
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 { default as React } from 'react';
4
+
5
+ export type IAlignment = "left" | "right" | "inherit" | "center" | "justify";
6
+ export type RowData = {
7
+ [key: string]: any;
8
+ };
9
+ export type ITableHeader = {
10
+ Header: string | JSX.Element;
11
+ accessor: string;
12
+ textAlign?: IAlignment;
13
+ };
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
+ [key: string]: {
18
+ validationRule?: SchemaOf<any>;
19
+ dependentValidationRule?: (values: {
20
+ [key: string]: any;
21
+ }) => SchemaOf<any>;
22
+ customRenderFn?: (args: ICustomRenderFnProps) => JSX.Element;
23
+ prefix?: React.ReactNode | React.JSXElementConstructor<any>;
24
+ suffix?: React.ReactNode | React.JSXElementConstructor<any>;
25
+ textAlign?: IAlignment;
26
+ onBlur?: (args: {
27
+ rowIndex: number;
28
+ value: string;
29
+ setRows: React.Dispatch<React.SetStateAction<RowData[] | null>>;
30
+ values: RowData;
31
+ }) => Promise<void>;
32
+ isCheckbox?: boolean;
33
+ isDateField?: boolean;
34
+ onChangeValueModifier?: (value: string) => TableCellValues;
35
+ getCalculatedValue?: (values: RowData) => TableCellValues;
36
+ total?: boolean;
37
+ };
38
+ };
39
+ export interface IEditableTableProps {
40
+ tableRows: RowData[] | null;
41
+ tableHeaders: ITableHeader[];
42
+ syncCellWithState: SynchCellWithStateFn;
43
+ setRows?: React.Dispatch<React.SetStateAction<RowData[] | null>> | undefined;
44
+ skipPageReset?: boolean;
45
+ fieldConfig: FieldConfig;
46
+ disabled?: boolean;
47
+ setSelectedRows?: React.Dispatch<React.SetStateAction<number[]>>;
48
+ includeRowSelect?: boolean;
49
+ filterTypes?: {
50
+ [key: string]: (rows: any, id: any, filterValue: any) => any;
51
+ };
52
+ filterData?: {
53
+ filterRow: string;
54
+ filterValues: RowData[];
55
+ };
56
+ emptyTableText?: string;
57
+ paginate?: boolean;
58
+ defaultPageSize?: number;
59
+ virtContainerStyling?: string;
60
+ overscan?: number;
61
+ rowHeight?: number;
62
+ includeGlobalSearch?: boolean;
63
+ disableHeaderSelect?: boolean;
64
+ }
65
+ type AdditionalCellProps = Pick<IEditableTableProps, "fieldConfig" | "syncCellWithState" | "setRows">;
66
+ export interface ExtendedCellProps extends AdditionalCellProps, CellProps<RowData> {
67
+ disabled: boolean;
68
+ }
69
+ export interface IEssentialRenderFnProps {
70
+ error: string | false;
71
+ disabled: boolean;
72
+ value: TableCellValues;
73
+ onChange: (e: any) => void;
74
+ onBlur: any;
75
+ prefix?: React.ReactNode | React.JSXElementConstructor<any> | Element;
76
+ suffix?: React.ReactNode | React.JSXElementConstructor<any> | Element;
77
+ numberField?: boolean;
78
+ textAlign?: IAlignment;
79
+ fixedDecimalScale?: boolean;
80
+ }
81
+ export interface ICustomRenderFnProps extends IEssentialRenderFnProps {
82
+ values: {
83
+ [key: string]: any;
84
+ };
85
+ originalValues: {
86
+ [key: string]: any;
87
+ };
88
+ }
89
+ export interface ITableContentProps extends Pick<IEditableTableProps, "disabled" | "includeRowSelect"> {
90
+ getTableProps: (propGetter?: TablePropGetter<RowData> | undefined) => TableProps;
91
+ headerGroups: HeaderGroup<RowData>[];
92
+ getTableBodyProps: (propGetter?: TableBodyPropGetter<RowData> | undefined) => TableBodyProps;
93
+ prepareRow: (row: Row<RowData>) => void;
94
+ rowsToRender: Row<RowData>[];
95
+ disabled: boolean;
96
+ includeRowSelect: boolean;
97
+ isAllRowsSelected: boolean;
98
+ selectedFlatRows: Row<RowData>[];
99
+ fieldConfig: FieldConfig;
100
+ tableHeaders: ITableHeader[];
101
+ }
102
+ export interface IGlobalFilterProps {
103
+ preGlobalFilteredRows: RowData[];
104
+ globalFilter: string | undefined;
105
+ setGlobalFilter: (val: string | undefined) => void;
106
+ }
107
+ 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 {};