@oc-digital/react-component-library 2.0.6 → 2.0.7-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 (65) hide show
  1. package/README.md +14 -4
  2. package/build/Alert/Alert.d.ts +4 -4
  3. package/build/AlphabeticalList/AlphabeticalList.d.ts +4 -4
  4. package/build/AlphabeticalList/AlphabeticalList.types.d.ts +16 -16
  5. package/build/Breadcrumbs/Breadcrumbs.d.ts +4 -4
  6. package/build/Breadcrumbs/Breadcrumbs.types.d.ts +23 -23
  7. package/build/Button/Button.d.ts +4 -4
  8. package/build/Button/Button.types.d.ts +14 -14
  9. package/build/ButtonWithConfirm/ButtonWithConfirm.d.ts +4 -4
  10. package/build/ButtonWithConfirm/ButtonWithConfirm.types.d.ts +12 -12
  11. package/build/ContentBox/ContentBox.d.ts +4 -4
  12. package/build/ContentBox/ContentBox.types.d.ts +6 -6
  13. package/build/ContentLabel/ContentLabel.d.ts +4 -4
  14. package/build/ContentLabel/ContentLabel.types.d.ts +5 -5
  15. package/build/DatePicker/DatePicker.d.ts +4 -4
  16. package/build/DatePicker/DatePicker.types.d.ts +5 -5
  17. package/build/EditableTable/EditableTable.d.ts +4 -4
  18. package/build/EditableTable/EditableTable.types.d.ts +105 -105
  19. package/build/EditableTable/defaultCells.d.ts +33 -33
  20. package/build/EntityList/EntityList.d.ts +4 -4
  21. package/build/EntityList/EntityList.types.d.ts +14 -14
  22. package/build/ErrorIndicator/ErrorIndicator.d.ts +4 -4
  23. package/build/ErrorIndicator/ErrorIndicator.types.d.ts +4 -4
  24. package/build/ImageDisplayAndUpload/ImageDisplayAndUpload.d.ts +4 -4
  25. package/build/ImageDisplayAndUpload/ImageDisplayAndUpload.types.d.ts +8 -8
  26. package/build/KeyboardDatePicker/KeyboardDatePicker.d.ts +4 -4
  27. package/build/KeyboardDatePicker/KeyboardDatePicker.types.d.ts +5 -5
  28. package/build/LeftNavigation/LeftNavigation.d.ts +4 -4
  29. package/build/LeftNavigation/LeftNavigation.types.d.ts +96 -96
  30. package/build/LeftNavigation/NavListItem.d.ts +4 -4
  31. package/build/LeftNavigation/PrimaryLeftNavigation.d.ts +4 -4
  32. package/build/LeftNavigation/SecondaryLeftNavigation.d.ts +4 -4
  33. package/build/LoadingSpinner/LoadingSpinner.d.ts +4 -4
  34. package/build/LoadingSpinner/LoadingSpinner.types.d.ts +5 -5
  35. package/build/MainLayout/MainLayout.d.ts +4 -4
  36. package/build/MainLayout/MainLayout.types.d.ts +9 -9
  37. package/build/SearchBar/SearchBar.d.ts +4 -4
  38. package/build/SearchBar/SearchBar.types.d.ts +23 -23
  39. package/build/Select/Select.d.ts +4 -4
  40. package/build/Select/Select.types.d.ts +14 -14
  41. package/build/StaticTable/StaticTable.d.ts +4 -4
  42. package/build/StaticTable/StaticTable.types.d.ts +21 -21
  43. package/build/SvgComponents/ContainedPartnersLogo.d.ts +4 -4
  44. package/build/SvgComponents/HomeSvg.d.ts +4 -4
  45. package/build/SvgComponents/NovelLogoSvg.d.ts +4 -4
  46. package/build/SvgComponents/OrganisationList.d.ts +4 -4
  47. package/build/SvgComponents/ProjectsSvg.d.ts +4 -4
  48. package/build/SvgComponents/index.d.ts +5 -5
  49. package/build/SvgComponents/types.d.ts +6 -6
  50. package/build/TextField/TextField.d.ts +16 -15
  51. package/build/TextField/TextField.types.d.ts +7 -7
  52. package/build/globals/index.d.ts +24 -24
  53. package/build/hooks/index.d.ts +3 -3
  54. package/build/hooks/useDebounceEffect.d.ts +2 -2
  55. package/build/hooks/useInterval.d.ts +2 -2
  56. package/build/hooks/useWhyDidYouUpdate.d.ts +1 -1
  57. package/build/index.d.ts +29 -29
  58. package/build/index.js +1 -1
  59. package/build/index.js.map +1 -1
  60. package/build/styles/font.d.ts +1 -1
  61. package/build/styles/index.d.ts +3 -3
  62. package/build/styles/layout.d.ts +1 -1
  63. package/build/styles/spacing.d.ts +1 -1
  64. package/build/utils/index.d.ts +5 -5
  65. package/package.json +3 -2
@@ -1,7 +1,7 @@
1
- import { OutlinedTextFieldProps } from "@material-ui/core";
2
- import { IAuthoriserProp } from "../globals";
3
- export interface ITextFieldProps extends IAuthoriserProp, Omit<OutlinedTextFieldProps, "variant"> {
4
- styling?: string;
5
- numberField?: boolean;
6
- fixedDecimalScale?: boolean;
7
- }
1
+ import { OutlinedTextFieldProps } from "@material-ui/core";
2
+ import { IAuthoriserProp } from "../globals";
3
+ export interface ITextFieldProps extends IAuthoriserProp, Omit<OutlinedTextFieldProps, "variant"> {
4
+ styling?: string;
5
+ numberField?: boolean;
6
+ fixedDecimalScale?: boolean;
7
+ }
@@ -1,24 +1,24 @@
1
- export declare const HALF_REM = "0.5rem";
2
- export declare const ONE_REM = "1rem";
3
- export declare const ONE_AND_HALF_REM = "1.5rem";
4
- export declare const TWO_REM = "3rem";
5
- export declare const THREE_REM = "3rem";
6
- export declare const EDITED_STATUS = "EDITED";
7
- export declare const NEW_STATUS = "NEW";
8
- export declare const VALIDATION_MESSAGE_REQUIRED = "Required";
9
- export declare const REGEX_NUMBER_WITH_DECIMALS: RegExp;
10
- export declare const YUP_REQUIRED_STRING_SHORT_MESSAGE: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
11
- export declare const YUP_STRING_NUMBER_WITH_DECIMALS: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
12
- export declare const FORM_SUCCESS = "success";
13
- export declare const FORM_ERROR = "error";
14
- export declare const FORM_LOADING = "loading";
15
- export declare const FORM_ENABLED = "enabled";
16
- export declare const FORM_WARNING = "warning";
17
- export type FormStatuses = typeof FORM_SUCCESS | typeof FORM_ERROR | typeof FORM_LOADING | typeof FORM_ENABLED | typeof FORM_WARNING;
18
- export declare const READ_LEVEL = "read";
19
- export declare const WRITE_LEVEL = "write";
20
- export declare const NO_ACCESS_LEVEL = "noAccess";
21
- export interface IAuthoriserProp {
22
- accessLevel?: typeof READ_LEVEL | typeof WRITE_LEVEL | typeof NO_ACCESS_LEVEL;
23
- }
24
- export declare const BORDER_RADIUS = "14px";
1
+ export declare const HALF_REM = "0.5rem";
2
+ export declare const ONE_REM = "1rem";
3
+ export declare const ONE_AND_HALF_REM = "1.5rem";
4
+ export declare const TWO_REM = "3rem";
5
+ export declare const THREE_REM = "3rem";
6
+ export declare const EDITED_STATUS = "EDITED";
7
+ export declare const NEW_STATUS = "NEW";
8
+ export declare const VALIDATION_MESSAGE_REQUIRED = "Required";
9
+ export declare const REGEX_NUMBER_WITH_DECIMALS: RegExp;
10
+ export declare const YUP_REQUIRED_STRING_SHORT_MESSAGE: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
11
+ export declare const YUP_STRING_NUMBER_WITH_DECIMALS: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
12
+ export declare const FORM_SUCCESS = "success";
13
+ export declare const FORM_ERROR = "error";
14
+ export declare const FORM_LOADING = "loading";
15
+ export declare const FORM_ENABLED = "enabled";
16
+ export declare const FORM_WARNING = "warning";
17
+ export declare type FormStatuses = typeof FORM_SUCCESS | typeof FORM_ERROR | typeof FORM_LOADING | typeof FORM_ENABLED | typeof FORM_WARNING;
18
+ export declare const READ_LEVEL = "read";
19
+ export declare const WRITE_LEVEL = "write";
20
+ export declare const NO_ACCESS_LEVEL = "noAccess";
21
+ export interface IAuthoriserProp {
22
+ accessLevel?: typeof READ_LEVEL | typeof WRITE_LEVEL | typeof NO_ACCESS_LEVEL;
23
+ }
24
+ export declare const BORDER_RADIUS = "14px";
@@ -1,3 +1,3 @@
1
- export { default as useDebounceEffect } from "./useDebounceEffect";
2
- export { default as useInterval } from "./useInterval";
3
- export { default as useWhyDidYouUpdate } from "./useWhyDidYouUpdate";
1
+ export { default as useDebounceEffect } from "./useDebounceEffect";
2
+ export { default as useInterval } from "./useInterval";
3
+ export { default as useWhyDidYouUpdate } from "./useWhyDidYouUpdate";
@@ -1,2 +1,2 @@
1
- declare const useDebounceEffect: (effect: (query: string) => void, deps: any[], delay?: number) => void;
2
- export default useDebounceEffect;
1
+ declare const useDebounceEffect: (effect: (query: string) => void, deps: any[], delay?: number) => void;
2
+ export default useDebounceEffect;
@@ -1,2 +1,2 @@
1
- declare const useInterval: (callback: () => void, delay: number | null) => void;
2
- export default useInterval;
1
+ declare const useInterval: (callback: () => void, delay: number | null) => void;
2
+ export default useInterval;
@@ -1 +1 @@
1
- export default function useWhyDidYouUpdate(name: string, props: Record<string, any>): void;
1
+ export default function useWhyDidYouUpdate(name: string, props: Record<string, any>): void;
package/build/index.d.ts CHANGED
@@ -1,29 +1,29 @@
1
- import Button from "./Button/Button";
2
- import ContentLabel from "./ContentLabel/ContentLabel";
3
- import ContentBox from "./ContentBox/ContentBox";
4
- import StaticTable from "./StaticTable/StaticTable";
5
- import LoadingSpinner from "./LoadingSpinner/LoadingSpinner";
6
- import Breadcrumbs from "./Breadcrumbs/Breadcrumbs";
7
- import EntityList from "./EntityList/EntityList";
8
- import { IEntity } from "./EntityList/EntityList.types";
9
- import ErrorIndicator from "./ErrorIndicator/ErrorIndicator";
10
- import LeftNavigation from "./LeftNavigation/LeftNavigation";
11
- import { INavigationLink, ISecondaryNavigationItem, ISecondaryNavigationSubItem } from "./LeftNavigation/LeftNavigation.types";
12
- import MainLayout from "./MainLayout/MainLayout";
13
- import SearchBar from "./SearchBar/SearchBar";
14
- import TextField, { NumberFormatField } from "./TextField/TextField";
15
- import Select from "./Select/Select";
16
- import DatePicker from "./DatePicker/DatePicker";
17
- import KeyboardDatePicker from "./KeyboardDatePicker/KeyboardDatePicker";
18
- import ButtonWithConfirm from "./ButtonWithConfirm/ButtonWithConfirm";
19
- import EditableTable from "./EditableTable/EditableTable";
20
- import { FieldConfig, RowData, ITableHeader, TableCellValues, SynchCellWithStateFn, ICustomRenderFnProps, IEssentialRenderFnProps } from "./EditableTable/EditableTable.types";
21
- import { TableTextField, tableNumericStringField, tableNumericStringFixedDecimalField, tableDateField, tableInvoiceDateField, tableCheckbox, TableSelect, TableMultipleSelect, NonEditableField, TableDatePicker } from "./EditableTable/defaultCells";
22
- import { useDebounceEffect, useInterval, useWhyDidYouUpdate } from "./hooks";
23
- import { didCellValueChange } from "./utils";
24
- import ImageDisplayAndUpload from "./ImageDisplayAndUpload/ImageDisplayAndUpload";
25
- import Alert from "./Alert/Alert";
26
- import AlphabeticalList from "./AlphabeticalList/AlphabeticalList";
27
- import { ISelectProps } from "./Select/Select.types";
28
- export { ImageDisplayAndUpload, Alert, Button, ContentLabel, ContentBox, StaticTable, LoadingSpinner, Breadcrumbs, EntityList, ErrorIndicator, LeftNavigation, MainLayout, SearchBar, TextField, Select, DatePicker, KeyboardDatePicker, ButtonWithConfirm, EditableTable, TableTextField, TableSelect, TableMultipleSelect, NonEditableField, TableDatePicker, tableNumericStringField, tableNumericStringFixedDecimalField, tableDateField, tableInvoiceDateField, tableCheckbox, didCellValueChange, useDebounceEffect, useInterval, useWhyDidYouUpdate, AlphabeticalList, NumberFormatField, };
29
- export type { FieldConfig, RowData, ITableHeader, TableCellValues, SynchCellWithStateFn, ICustomRenderFnProps, IEssentialRenderFnProps, ISelectProps, IEntity, INavigationLink, ISecondaryNavigationItem, ISecondaryNavigationSubItem, };
1
+ import Button from "./Button/Button";
2
+ import ContentLabel from "./ContentLabel/ContentLabel";
3
+ import ContentBox from "./ContentBox/ContentBox";
4
+ import StaticTable from "./StaticTable/StaticTable";
5
+ import LoadingSpinner from "./LoadingSpinner/LoadingSpinner";
6
+ import Breadcrumbs from "./Breadcrumbs/Breadcrumbs";
7
+ import EntityList from "./EntityList/EntityList";
8
+ import { IEntity } from "./EntityList/EntityList.types";
9
+ import ErrorIndicator from "./ErrorIndicator/ErrorIndicator";
10
+ import LeftNavigation from "./LeftNavigation/LeftNavigation";
11
+ import { INavigationLink, ISecondaryNavigationItem, ISecondaryNavigationSubItem } from "./LeftNavigation/LeftNavigation.types";
12
+ import MainLayout from "./MainLayout/MainLayout";
13
+ import SearchBar from "./SearchBar/SearchBar";
14
+ import TextField, { NumberFormatField } from "./TextField/TextField";
15
+ import Select from "./Select/Select";
16
+ import DatePicker from "./DatePicker/DatePicker";
17
+ import KeyboardDatePicker from "./KeyboardDatePicker/KeyboardDatePicker";
18
+ import ButtonWithConfirm from "./ButtonWithConfirm/ButtonWithConfirm";
19
+ import EditableTable from "./EditableTable/EditableTable";
20
+ import { FieldConfig, RowData, ITableHeader, TableCellValues, SynchCellWithStateFn, ICustomRenderFnProps, IEssentialRenderFnProps } from "./EditableTable/EditableTable.types";
21
+ import { TableTextField, tableNumericStringField, tableNumericStringFixedDecimalField, tableDateField, tableInvoiceDateField, tableCheckbox, TableSelect, TableMultipleSelect, NonEditableField, TableDatePicker } from "./EditableTable/defaultCells";
22
+ import { useDebounceEffect, useInterval, useWhyDidYouUpdate } from "./hooks";
23
+ import { didCellValueChange } from "./utils";
24
+ import ImageDisplayAndUpload from "./ImageDisplayAndUpload/ImageDisplayAndUpload";
25
+ import Alert from "./Alert/Alert";
26
+ import AlphabeticalList from "./AlphabeticalList/AlphabeticalList";
27
+ import { ISelectProps } from "./Select/Select.types";
28
+ export { ImageDisplayAndUpload, Alert, Button, ContentLabel, ContentBox, StaticTable, LoadingSpinner, Breadcrumbs, EntityList, ErrorIndicator, LeftNavigation, MainLayout, SearchBar, TextField, Select, DatePicker, KeyboardDatePicker, ButtonWithConfirm, EditableTable, TableTextField, TableSelect, TableMultipleSelect, NonEditableField, TableDatePicker, tableNumericStringField, tableNumericStringFixedDecimalField, tableDateField, tableInvoiceDateField, tableCheckbox, didCellValueChange, useDebounceEffect, useInterval, useWhyDidYouUpdate, AlphabeticalList, NumberFormatField, };
29
+ export type { FieldConfig, RowData, ITableHeader, TableCellValues, SynchCellWithStateFn, ICustomRenderFnProps, IEssentialRenderFnProps, ISelectProps, IEntity, INavigationLink, ISecondaryNavigationItem, ISecondaryNavigationSubItem, };
package/build/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import e,{useState as t,useMemo as n,useCallback as r,useEffect as a,useRef as o,memo as i,Fragment as l}from"react";import{makeStyles as c,Button as s,CircularProgress as d,Typography as m,Box as u,withStyles as p,createStyles as g,TableRow as f,Table as h,TableHead as v,TableBody as b,TableCell as y,Link as x,ButtonBase as E,Grid as w,ListItem as C,ListItemIcon as N,ListItemText as k,Collapse as B,List as S,IconButton as R,Container as I,Divider as T,InputBase as L,InputAdornment as F,TextField as A,MenuItem as W,Checkbox as P,FormControl as D,Select as O,FormHelperText as M,Tooltip as j,Avatar as z}from"@material-ui/core";import{string as H}from"yup";import{Pagination as G,Alert as K}from"@material-ui/lab";import{Link as V,useLocation as U,useHistory as J}from"react-router-dom";import q from"@material-ui/icons/Error";import{ExpandLess as Y,ExpandMore as X,CloudUpload as Q,Forward as $}from"@material-ui/icons";import{isValid as Z}from"date-fns";import _ from"@material-ui/icons/Close";import ee from"@material-ui/icons/AddBoxOutlined";import te from"@material-ui/icons/Search";import{isEqual as ne}from"lodash";import re from"react-number-format";import{MuiPickersUtilsProvider as ae,DatePicker as oe,KeyboardDatePicker as ie}from"@material-ui/pickers";import le from"@date-io/date-fns";import{useTable as ce,useFilters as se,useGlobalFilter as de,usePagination as me,useRowSelect as ue,useAsyncDebounce as pe}from"react-table";import{useVirtual as ge}from"react-virtual";var fe=function(){return fe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},fe.apply(this,arguments)};function he(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}function ve(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{c(r.next(e))}catch(e){o(e)}}function l(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,l)}c((r=r.apply(e,t||[])).next())}))}function be(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){i.label=l[1];break}if(6===l[0]&&i.label<a[1]){i.label=a[1],a=l;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(l);break}a[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}function ye(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a<o;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}H().trim().required("Required"),H().trim().required("Required").matches(/^\d*\.?\d*$/,"Must be a Number");var xe="success",Ee="error",we="warning",Ce="read",Ne="noAccess",ke=c({labelBreak:{marginBottom:"0.5rem"},contentBreak:{marginBottom:"1rem"},sectionBreak:{marginBottom:"1.5rem"},doubleSectionBreak:{marginBottom:"3rem"},rightSpacer1:{marginRight:"0.5rem"},rightSpacer2:{marginRight:"1rem"},leftSpacer1:{marginLeft:"0.5rem"},leftSpacer2:{marginLeft:"1rem"},buttonSpacing:{marginLeft:"0.5rem",marginRight:"0.5rem",marginBottom:"1rem"},leftRightPadding1:{paddingLeft:"0.5rem",paddingRight:"0.5rem"},leftRightPadding2:{paddingLeft:"1rem",paddingRight:"1rem"},topBottomPadding1:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},topBottomPadding2:{paddingTop:"1rem",paddingBottom:"1rem"}},{classNamePrefix:"spacing",index:2}),Be=c((function(e){return{boldText:{fontWeight:700},bolderText:{fontWeight:500},smallText:{fontSize:"0.7rem"},warningColor:{color:e.palette.warning.main},centerText:{textAlign:"center"}}}),{classNamePrefix:"font"}),Se=c({contentBox:{background:"white",borderRadius:"14px",marginBottom:"1rem",padding:"3rem"},limitWidth60rem:{maxWidth:"60rem",marginLeft:"auto",marginRight:"auto"},limitWidth50rem:{maxWidth:"50rem",marginLeft:"auto",marginRight:"auto"},limitWidth45rem:{maxWidth:"45rem",marginLeft:"auto",marginRight:"auto"},limitWidth40rem:{maxWidth:"40rem",marginLeft:"auto",marginRight:"auto"},limitWidth35rem:{maxWidth:"35rem",marginLeft:"auto",marginRight:"auto"},limitWidth30rem:{maxWidth:"30rem",marginLeft:"auto",marginRight:"auto"},limitWidth25rem:{maxWidth:"25rem",marginLeft:"auto",marginRight:"auto"},centeredText:{textAlign:"center"},startAlignedText:{textAlign:"start"},width20:{width:"20%"},width49:{width:"49%"},width50:{width:"50%"},width60:{width:"60%"},width100:{width:"100%"},flexCenter:{display:"flex",alignItems:"center",justifyContent:"center"},centerJustify:{justifyContent:"center"},leftJustify:{justifyContent:"left"},rightJustify:{justifyContent:"right"}},{classNamePrefix:"layout",index:2}),Re=c((function(e){return{submitButton:{borderRadius:"1.5rem",padding:"0.4rem 1rem",textTransform:"none"},containedText:{color:"white"},spinnerColour:{color:e.palette.grey[500]}}})),Ie=function(t){var n=t.loading,r=void 0!==n&&n,a=t.children,o=t.errors,i=void 0!==o&&o,l=t.type,c=void 0===l?"submit":l,m=t.onClick,u=t.disabled,p=void 0!==u&&u,g=t.variant,f=void 0===g?"outlined":g,h=t.styling,v=void 0===h?"":h,b=t.color,y=void 0===b?"primary":b,x=t.accessLevel,E=void 0===x?"":x,w=he(t,["loading","children","errors","type","onClick","disabled","variant","styling","color","accessLevel"]),C=fe(fe({},ke()),Re());if([Ne,Ce].includes(E))return null;var N=p;return p||!r&&!i||(N=!0),e.createElement(s,fe({},w,{variant:f,color:y,type:c,className:"".concat(C.submitButton," ").concat("contained"===f&&C.containedText," ").concat(v),disabled:N,onClick:m}),a,r?e.createElement(d,{className:"".concat(C.leftSpacer1," ").concat(C.spinnerColour),size:"1.1rem",thickness:6}):"")},Te=function(t){var n=t.children,r=t.styling,a=void 0===r?null:r,o=Be();return e.createElement(m,{variant:"h6",className:"".concat(o.bolderText," ").concat(a||"")},n)},Le=function(t){var n=t.limitWidth,r=void 0!==n&&n,a=t.children,o=t.styling,i=fe(fe({},ke()),Se());return e.createElement(u,{boxShadow:3,className:"".concat(i.contentBox," ").concat(o||"")},e.createElement(u,{className:"".concat(i.centeredText," ").concat(r?i.limitWidth50rem:"")},a))},Fe=function(t){var n=t.text,r=void 0===n?"Loading data...":n,a=t.styling,o=fe(fe({},ke()),Se());return e.createElement(u,{className:"".concat(o.flexCenter," ").concat(a||"")},e.createElement(m,{variant:"body2",color:"textSecondary",className:o.rightSpacer1},r),e.createElement(d,{size:"1.5rem"}))},Ae=p(g({root:{"&:hover td":{backgroundColor:"rgba(0, 0, 0, 0.06)"}}}))(f),We=p(g({root:{"&:nth-of-type(even) td":{backgroundColor:"rgba(0, 0, 0, 0.03)"},"&:hover td":{backgroundColor:"rgba(0, 0, 0, 0.06)"}}}))(f),Pe=c((function(e){return{root:{borderBottom:"none",paddingTop:"8px",paddingBottom:"8px","&:first-child":{borderTopLeftRadius:"14px",borderBottomLeftRadius:"14px"},"&:last-child":{borderTopRightRadius:"14px",borderBottomRightRadius:"14px"}},head:function(t){var n=t.background,r=t.border,a=t.text;return{backgroundColor:n||"HSLA(204, 58.3%, 81.2%, 0.1)",borderTop:"1px solid ".concat(r||"HSLA(204, 58.3%, 81.2%, 0.3)"),borderBottom:"1px solid ".concat(r||"HSLA(204, 58.3%, 81.2%, 0.3)"),color:a||e.palette.text.primary,fontWeight:500,"&:first-child":{borderLeft:"1px solid ".concat(r||"HSLA(204, 58.3%, 81.2%, 0.3)")},"&:last-child":{borderRight:"1px solid ".concat(r||"HSLA(204, 58.3%, 81.2%, 0.3)")}}}}})),De=function(t){var n=t.children,r=t.align,a=void 0===r?"centerJustify":r,o=t.headerColours,i=he(t,["children","align","headerColours"]),l=fe(fe({},Se()),Pe(fe({},o||{})));return e.createElement(y,fe({},i,{classes:{root:l.root,head:l.head}}),e.createElement(u,{className:"".concat(l.flexCenter," ").concat(l[a])},n))},Oe=function(t){var n=t.rowBorderSeparation,r=void 0!==n&&n,a=t.children,o=he(t,["rowBorderSeparation","children"]);return r?e.createElement(Ae,fe({},o),a):e.createElement(We,fe({},o),a)},Me=function(t){var n=t.colSpan,r=t.children,a=je();return e.createElement(Oe,null,e.createElement(De,{className:a.adjustedCellPadding,colSpan:n},r))},je=c({tableStyles:{borderCollapse:"separate",borderBottom:"1px solid rgb(224, 224, 224)"},pointer:{cursor:"pointer"},bottomBorder:{borderBottom:"1px solid rgba(224, 224, 224, 1)"},noShading:{backgroundColor:"transparent !important"},adjustedCellPadding:{paddingTop:"11px",paddingBottom:"11px"}}),ze=function(o){var i=o.rowBorderSeparation,l=void 0!==i&&i,c=o.headers,s=o.rows,d=o.headerCellAlignment,m=void 0===d?[]:d,u=o.rowCellAlignment,p=void 0===u?[]:u,g=o.styling,y=o.headerColours,x=o.paginate,E=void 0!==x&&x,w=o.itemsPerPage,C=void 0===w?30:w,N=fe(fe(fe({},Se()),ke()),je()),k=t(1),B=k[0],S=k[1],R=n((function(){return!!(E&&((null==s?void 0:s.length)||0)>C)}),[C,E,s]),I=t(R?s.slice(0,C):s),T=I[0],L=I[1],F=r((function(e,t){S(t)}),[]);return a((function(){L(R?s.slice(C*(B-1),C*B):s)}),[R,C,B,s]),e.createElement(e.Fragment,null,e.createElement(h,{className:"".concat(N.tableStyles," ").concat(R?N.contentBreak:""," ").concat(g||"")},c?e.createElement(v,null,e.createElement(f,null,c.map((function(t,n){return e.createElement(De,{align:m[n]||"centerJustify",key:"header-cell-".concat(n),headerColours:y},t)})))):null,e.createElement(b,null,T?T.length?T.map((function(t,n){var r=!!t.onClick;return e.createElement(Oe,{rowBorderSeparation:l,className:r?N.pointer:void 0,key:"row-".concat(n),onClick:r?t.onClick:void 0},t.row.map((function(t,r){return e.createElement(De,{align:p[r]||"centerJustify",className:l&&T.length!==n+1?N.bottomBorder:void 0,key:"row-".concat(n,"-cell-").concat(r)},t)})))})):e.createElement(Me,{colSpan:(null==c?void 0:c.length)||0},"Table is empty"):e.createElement(Me,{colSpan:(null==c?void 0:c.length)||0},e.createElement(Fe,null)))),R?e.createElement(G,{className:N.flexCenter,count:Math.ceil(s.length/C),page:B,onChange:F,shape:"rounded",showFirstButton:!0,showLastButton:!0}):null)},He=c((function(e){return{logoContainer:{width:"3rem",height:"3rem",display:"flex",justifyContent:"center",alignItems:"center"},logo:{width:"100%",height:"100%","& > div":{width:"100%",height:"100%"},"& > svg":{width:"100%",height:"100%"}},logoInBreadcrumb:{width:"2rem",height:"2rem",margin:"0.125rem 0 0.125rem 0.313rem"},logoSpacing:{marginRight:e.spacing(1)},flexItemsCenter:{display:"flex",alignItems:"center"},nonPrimaryBreadcrumbOffset:{marginLeft:"2.5rem"},BreadcrumbsContainer:{height:"2.25rem",marginLeft:"0.875rem",marginRight:"1.5rem"},primaryBreadcrumbItem:function(t){var n=t.primary;return{backgroundColor:(null==n?void 0:n.background)||e.palette.common.white,color:(null==n?void 0:n.color)||e.palette.text.primary,borderRadius:"2rem",zIndex:3,height:"100%",display:"flex",alignItems:"center"}},secondaryBreadcrumbItem:function(t){var n=t.secondary;return{height:"2.25rem",backgroundColor:(null==n?void 0:n.background)||"#D7D4E4",borderRadius:"2rem",zIndex:2,marginLeft:"-2rem",color:(null==n?void 0:n.color)||e.palette.text.primary}},tertiaryBreadcrumbItem:function(t){var n=t.tertiary;return{height:"2.25rem",backgroundColor:(null==n?void 0:n.background)||"#D7D4E4",borderRadius:"2rem",zIndex:1,marginLeft:"-2rem",color:(null==n?void 0:n.color)||e.palette.common.white}},breadCrumbShadow:{boxShadow:e.shadows[2]},breadcrumbRightMargin:{marginRight:"1rem"},breadcrumbTextOverflow:{display:"block",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"12rem"},boldText:{fontWeight:500},activeBreadcrumb:function(t){var n=t.tertiary;return{backgroundColor:(null==n?void 0:n.background)||"#D7D4E4",color:(null==n?void 0:n.color)||e.palette.common.white}},noWrap:{whiteSpace:"nowrap"},fullBorderRadius:{borderRadius:"100%"}}})),Ge=function(t){var n=t.logo,r=t.content,a=t.colors,o=He(fe({},a||{})),i=r.first,l=void 0===i?null:i,c=r.second,s=void 0===c?null:c,d=r.third,p=void 0===d?null:d;return e.createElement(u,{className:"".concat(o.BreadcrumbsContainer," ").concat(o.flexItemsCenter)},e.createElement(u,{className:"".concat(l?"".concat(o.primaryBreadcrumbItem," ").concat(o.breadCrumbShadow):""," ").concat(o.flexItemsCenter)},e.createElement(x,{component:V,to:"/",className:o.logoSpacing},e.createElement(u,{className:"".concat(o.logoContainer," \n ").concat(l?o.logoInBreadcrumb:"")},e.createElement(E,{className:"".concat(o.logo," ").concat(o.fullBorderRadius)},n))),l&&e.createElement(m,{color:"textPrimary",className:"".concat(o.boldText," ").concat(o.noWrap," ").concat(o.primaryBreadcrumbItem)},e.createElement(x,{underline:"none",component:V,to:l.link,color:"inherit",className:"".concat(o.breadcrumbRightMargin," ").concat(o.breadcrumbTextOverflow)},l.name))),s&&e.createElement(u,{className:"".concat(o.flexItemsCenter," ").concat(o.secondaryBreadcrumbItem," ").concat(o.breadCrumbShadow," ").concat(p?"":o.activeBreadcrumb)},e.createElement(m,{color:"inherit",className:"".concat(o.boldText," ").concat(o.noWrap)},e.createElement(x,{component:V,underline:"none",to:s.link,color:"inherit",className:"".concat(o.nonPrimaryBreadcrumbOffset," ").concat(o.breadcrumbRightMargin," ").concat(o.breadcrumbTextOverflow)},s.name))),p&&e.createElement(u,{className:"".concat(o.flexItemsCenter," ").concat(o.tertiaryBreadcrumbItem," ").concat(o.breadCrumbShadow)},e.createElement(m,{color:"inherit",className:"".concat(o.boldText," ").concat(o.noWrap)},e.createElement(x,{component:V,underline:"none",to:p.link,color:"inherit",className:"".concat(o.nonPrimaryBreadcrumbOffset," ").concat(o.breadcrumbRightMargin," ").concat(o.breadcrumbTextOverflow)},p.name))))},Ke=c((function(e){return{container:{marginRight:e.spacing(-1.5),marginLeft:e.spacing(-1.5)},svgContainer:{marginLeft:"auto",marginRight:"auto"},button:{display:"block",textDecoration:"none",borderRadius:"14px",height:"100%",width:"100%",textAlign:"center"},orgLabel:{padding:e.spacing(1),paddingTop:0}}})),Ve=function(t){var n=t.entities,r=t.icon,a=t.loadingMessage,o=void 0===a?"Loading list...":a,i=t.emptyMessage,l=void 0===i?"List is empty":i,c=t.onClick,d=fe(fe(fe({},Ke()),ke()),Be());return e.createElement(u,{className:d.container},n?n.length?e.createElement(w,{container:!0,spacing:3},n.map((function(t,n){return e.createElement(w,{key:"".concat(t.name,"-").concat(n),item:!0,xs:4,md:3},e.createElement(s,fe({className:d.button,key:t.name},c?{onClick:function(){return c(t)}}:{component:V,to:t.link}),e.createElement(u,{className:"".concat(d.svgContainer," ").concat(d.labelBreak)},r(t)),e.createElement(m,{className:d.orgLabel,variant:"body1"},t.name)))}))):e.createElement(m,{className:d.centerText,variant:"body2",color:"textSecondary"},l):e.createElement(Fe,{text:o}))},Ue=function(t){var n=t.text,r=void 0===n?"Something went wrong":n,a=fe(fe({},ke()),Se());return e.createElement(u,{className:a.flexCenter},e.createElement(q,{fontSize:"medium",className:a.rightSpacer1,color:"error"}),e.createElement(m,{variant:"body2",color:"textSecondary"},r))},Je=c((function(e){return{listIcon:{minWidth:"auto",paddingRight:"0.25rem"},mainIconSize:{fontSize:"1rem"},mainIconMarginAdjustment:{marginTop:"3px"},textOverflowElipsis:{overflow:"hidden",textOverflow:"ellipsis"},mainListItem:function(t){return{padding:"8px 24px 8px 16px",alignItems:"flex-start",backgroundColor:t.mainBackground||e.palette.common.white,color:t.mainText||e.palette.text.primary,borderRadius:e.spacing(.6),"&:hover":{backgroundColor:t.mainHover||e.palette.action.hover}}},mainIconColor:function(t){return{color:t.mainIcon||e.palette.grey[500]}},activeMainIconColor:function(e){return{color:e.mainActiveText||"#8FC1FF"}},subListItem:function(t){return{backgroundColor:t.subItemBackground||"#FFFFFF",color:t.subItemText||e.palette.text.secondary,borderRadius:"8px","&:hover":{backgroundColor:t.subItemHover||"rgba(143,193,255,0.3)"}}},activeSubListItem:function(e){return{backgroundColor:e.subItemActiveBackground||"#FFFFFF",color:e.subItemActiveText||"#8FC1FF","&:hover":{backgroundColor:e.subItemActiveHover||"rgba(143,193,255,0.3)"}}},subItemBorder:{borderLeft:"1px solid ".concat(e.palette.grey[600]),marginLeft:"1px",marginRight:"1px",width:"100%",height:"100%"},relativeWrapper:{position:"relative"},subItemBorderMask:function(e){return{borderLeft:"3px solid ".concat(e.subItemActiveText||"#8FC1FF"),borderRadius:"1px",position:"absolute",top:"50%",bottom:"50%",transition:"all 0.2s ease-in-out"}},activeSubItemBorder:{top:"0 !important",bottom:"0 !important"},subItemWrapper:{display:"flex",marginLeft:"13px",marginRight:"16px"},noYMargin:{marginTop:"unset",marginBottom:"unset"}}})),qe=function(e,t){return!!e.split("/").includes(t)},Ye=function(n){var r,a,o=n.mainItem,i=n.subItems,l=n.config,c=n.Icon,s=fe(fe(fe({},Be()),ke()),Je(fe(fe({},(null===(r=l.secondary)||void 0===r?void 0:r.mainItemColors)||{}),(null===(a=l.secondary)||void 0===a?void 0:a.subItemColors)||{}))),d=U(),p=qe(d.pathname,o.id),g=t(!!(null==i?void 0:i.length)&&p),f=g[0],h=g[1];return e.createElement(e.Fragment,null,e.createElement(C,{button:!0,dense:!0,className:s.mainListItem,component:V,to:o.route},e.createElement(N,{className:"".concat(s.listIcon," ").concat(s.mainIconMarginAdjustment," ").concat(s.rightSpacer1)},e.createElement(c,{id:"second-nav-item",styling:"".concat(s.mainIconSize," ").concat(s.mainIconColor," ").concat(p?s.activeMainIconColor:"")})),e.createElement(k,{disableTypography:!0,className:s.noYMargin,primary:e.createElement(m,{variant:"body2",className:"".concat(s.bolderText," ").concat(s.textOverflowElipsis),color:"inherit"},o.name,(null==i?void 0:i.length)?e.createElement(m,{component:"span",variant:"body2",className:s.bolderText,color:"inherit"}," ","(",i.length,")"):null)}),(null==i?void 0:i.length)?e.createElement(N,{className:s.listIcon,onClick:function(e){e.preventDefault(),e.stopPropagation(),h((function(e){return!e}))}},f?e.createElement(Y,null):e.createElement(X,null)):null),(null==i?void 0:i.length)?e.createElement(B,{in:f,timeout:"auto",unmountOnExit:!0},e.createElement(S,{component:"div",disablePadding:!0},i.map((function(t){var n=t.name,r=t.route,a=t.id;return e.createElement(u,{key:a,className:s.subItemWrapper},e.createElement(u,{className:"".concat(s.relativeWrapper," ").concat(s.rightSpacer1)},e.createElement(u,{className:"".concat(s.subItemBorder," ")}),e.createElement(u,{className:"".concat(s.subItemBorderMask," ").concat(qe(d.pathname,a)?s.activeSubItemBorder:""," ")})),e.createElement(C,{key:r,component:V,to:r,button:!0,dense:!0,className:"".concat(s.subListItem," ").concat(qe(d.pathname,a)?s.activeSubListItem:"")},e.createElement(k,{disableTypography:!0,primary:e.createElement(m,{variant:"body2",className:s.textOverflowElipsis,color:"inherit"},n)})))})))):null)};function Xe(e){return e.sort((function(e,t){return+t.startDate.split("T")[0].replaceAll("-","")-+e.startDate.split("T")[0].replaceAll("-","")}))}var Qe=function(e,t,n){return n?(e&&Z(e)?e:new Date(0)).getTime()===(t&&Z(t)?t:new Date(0)).getTime():e===t},$e=c((function(e){return{secondaryNavWrapper:{height:"100%",width:"300px",background:"white",overflowY:"auto",overflowX:"hidden",borderTopRightRadius:"14px",borderBottomRightRadius:"14px",marginLeft:"-16px",paddingLeft:"16px",border:"1px solid ".concat(e.palette.grey[300]),boxShadow:"0 2px 4px 0 rgba(0, 0, 0, 0.3)",boxSizing:"border-box"},titleWrapper:{marginTop:"24px",display:"flex",alignItems:"center",paddingLeft:"16px",paddingRight:"16px"},title:{fontSize:"18px",fontWeight:500,color:function(e){return e.titleColor||"#8FC1FF"}},titleIcons:{color:function(e){return e.titleIconColor||"#8FC1FF"}},closeButton:{marginLeft:"auto"},archivedSeparator:{paddingLeft:"8px",color:e.palette.grey[500]},archivedBorder:{marginTop:"3rem",border:"1px solid ".concat(e.palette.grey[200]),width:"33%",marginLeft:"8px"},listWrapper:{marginLeft:e.spacing(1),marginRight:e.spacing(1)}}})),Ze=function(t){var n,r,a,o,i=t.secondaryNavItems,l=t.primaryNavItems,c=t.expandedOptions,s=t.setExpandedOptions,d=t.config,p={titleColor:null===(n=d.secondary)||void 0===n?void 0:n.titleColor,titleIconColor:null===(r=d.secondary)||void 0===r?void 0:r.titleIconColor},g=fe(fe(fe({},ke()),Be()),$e(p)),f=J(),h=i[c.view];if(!h)return null;var v=l.find((function(e){return e.field===c.view})).Icon;return e.createElement(u,{className:g.secondaryNavWrapper},e.createElement(u,{className:g.titleWrapper},e.createElement(m,{className:"".concat(g.rightSpacer1," ").concat(g.title)},c.view),h.button?e.createElement(R,{className:g.titleIcons,size:"small",type:"button",onClick:function(){return f.push(h.button.url)}},e.createElement(ee,null)):null,e.createElement(R,{className:"".concat(g.titleIcons," ").concat(g.closeButton),size:"small",type:"button",onClick:function(){return s({view:"",expanded:!1})}},(null===(a=d.secondary)||void 0===a?void 0:a.closeButtonSvg)||e.createElement(_,null))),e.createElement(S,{className:g.listWrapper,component:"div"},Xe(h.items).map((function(t){return e.createElement(Ye,fe({key:t.mainItem.route},t,{config:d,Icon:v}))})),(null===(o=h.archivedItems)||void 0===o?void 0:o.length)?e.createElement(e.Fragment,null,e.createElement(u,{className:"".concat(g.archivedBorder," ").concat(g.contentBreak)}),e.createElement(m,{variant:"body2",className:"".concat(g.archivedSeparator," ").concat(g.bolderText)},"Archived ",c.view),Xe(h.archivedItems).map((function(t){return e.createElement(Ye,fe({key:t.mainItem.route},t,{config:d,Icon:v}))}))):null))},_e=c((function(e){return{primaryNavContainer:function(e){return{background:e.background||"linear-gradient(to bottom, #253a68 40%, #73c4ca)",border:"2px solid ".concat(e.activeBorderColor||"#8FC1FF"),borderLeft:"none",borderTopRightRadius:"14px",borderBottomRightRadius:"14px",minWidth:"4.5rem",overflowY:"auto",overflowX:"hidden"}},listWrapper:{display:"flex",flexDirection:"column",paddingTop:0},itemWrapper:{display:"flex",flexDirection:"column",padding:"0.75rem 0.5rem 0.5rem 0.5rem"},itemBorder:{borderRight:function(e){return"6px solid ".concat(e.activeBorderColor||"#8FC1FF")},position:"absolute",bottom:"50%",top:"50%",transition:"all 0.2s ease-in-out",right:"-3px"},activeBorder:{top:"15%",bottom:"15%"},iconWrapper:{minWidth:0,marginBottom:"4px",position:"relative"},itemName:{fontSize:"0.7rem",maxWidth:"3.5rem",textAlign:"center",textOverflow:"ellipsis",overflow:"hidden"},textColour:{color:function(e){return e.text||"#FFFFFF"}},activeTextColour:{color:function(e){return e.activeText||"#8FC1FF"}},lastItem:{marginTop:"auto"}}})),et=function(t){var n=t.expandedOptions,r=t.setExpandedOptions,a=t.navigationLinks,o=t.config,i=U(),l=_e(fe({},o.primary||{})),c=function(e,t){return""===n.view?i.pathname===t||!(e===o.rootRouteName||!i.pathname.startsWith(t)):n.view===e};return e.createElement(S,{className:"".concat(l.primaryNavContainer," ").concat(l.listWrapper)},a.map((function(t,n,a){var i;return e.createElement(C,fe({key:t.field,button:!0,className:"".concat(l.itemWrapper," ").concat(l.textColour," ").concat((null===(i=o.primary)||void 0===i?void 0:i.moveLastItemToBottom)&&n===a.length-1?l.lastItem:"")},t.hasSecondary?{}:{component:V,to:t.path},{onClick:function(){r({view:t.field,expanded:!!t.hasSecondary})}}),e.createElement(N,{className:l.iconWrapper},e.createElement(t.Icon,{styling:"".concat(l.textColour," ").concat(c(t.field,t.path)?l.activeTextColour:"")})),e.createElement(m,{variant:"caption",className:"".concat(l.itemName," ").concat(l.textColour," ").concat(c(t.field,t.path)?l.activeTextColour:"")},t.field),e.createElement(u,{className:"".concat(l.itemBorder," ").concat(c(t.field,t.path)?l.activeBorder:"")}))})))},tt=c({leftNavContainer:{height:"100%",display:"flex",position:"relative",width:"max-content"}}),nt=function(n){var r=n.primaryNavItems,o=n.secondaryNavItems,i=n.config,l=t({view:"",expanded:!1}),c=l[0],s=l[1],d=tt(),m=U(),p=r.reduce((function(e,t){return t.hasSecondary?ye(ye([],e,!0),[t.field],!1):e}),[]);return a((function(){s((function(e){return p.includes(e.view)&&!0===e.expanded?e:{view:"",expanded:!1}}))}),[m.pathname]),e.createElement(u,{component:"nav",className:d.leftNavContainer},e.createElement(et,{expandedOptions:c,setExpandedOptions:s,navigationLinks:r,config:i}),c.expanded&&e.createElement(Ze,{secondaryNavItems:o,primaryNavItems:r,expandedOptions:c,setExpandedOptions:s,config:i}))},rt=c((function(e){return{remainingHeightBox:{position:"absolute",top:function(e){var t;return null!==(t=e.topOffset)&&void 0!==t?t:"4rem"},bottom:0,left:0,right:0,display:"flex"},fullHeightFlexbox:{display:"flex",height:"100%"},relativeContainer:{position:"relative"},scrollWrapper:{overflow:"auto"},componentWrapper:{padding:e.spacing(2),paddingBottom:e.spacing(2),position:"relative"}}})),at=function(t){var n=t.sideNavigation,r=t.children,a=t.desktopWidth,o=t.topOffset,i=rt({topOffset:o});return e.createElement(u,{className:i.remainingHeightBox},n?e.createElement(u,{className:"".concat(i.fullHeightFlexbox," ").concat(i.relativeContainer)},n):null,e.createElement(I,{disableGutters:!0,maxWidth:!1,className:i.scrollWrapper},e.createElement(I,{disableGutters:!0,maxWidth:a?"xl":"lg",className:i.componentWrapper},r)))},ot=function(e,t,n){void 0===n&&(n=250);var o=r(e,t);a((function(){var e=setTimeout(o,n);return function(){return clearTimeout(e)}}),[o,n])},it=function(e,t){var n=o();a((function(){n.current=e})),a((function(){if(null!==t){var e=setInterval((function(){n.current&&n.current()}),t);return function(){return clearInterval(e)}}}),[t])};function lt(e,t){var n=o(t);a((function(){var r=Object.keys(fe(fe({},n.current),t)),a={};r.forEach((function(e){n.current[e]!==t[e]&&(a[e]={from:n.current[e],to:t[e],changedKeys:t[e]&&"object"==typeof t[e]?Object.keys(n.current[e]).map((function(r){return n.current[e][r]===t[e][r]?"":r})).filter(Boolean):void 0,isDeepEqual:ne(n.current[e],t[e])})})),Object.keys(a).length&&console.log("[why-did-you-update]",e,{changes:a,props:{from:n.current,to:t}}),n.current=t}),Object.values(t))}var ct=c((function(e){return{divider:{background:e.palette.primary.main,height:"0.2rem"},letterHeader:{cursor:"default",color:e.palette.primary.main,marginTop:"1rem"},listItem:{borderRadius:"14px",border:"1px solid ".concat(e.palette.grey[300]),marginBottom:"0.5rem",paddingLeft:"24px",boxShadow:e.shadows[1]},topMargin:{marginTop:e.spacing(2),display:"block"}}})),st=function(t){var n=t.array,r=t.sortFn,a=t.sortKey,o=void 0===a?"name":a,i=t.buttonClick,l=t.linkTo,c=t.ItemTemplate,s=t.arrayKey,d=void 0===s?"id":s,u=t.loadingMessage,p=void 0===u?"Loading list...":u,g=t.emptyMessage,f=void 0===g?"List is empty":g,h=t.alphabetisedHeader,v=void 0===h||h,b=fe(fe(fe({},ct()),ke()),Se());if(void 0===n)return e.createElement(Fe,{styling:b.topMargin,text:p});if(!(null==n?void 0:n.length))return e.createElement(m,{className:b.topMargin,align:"center",variant:"body2",color:"textSecondary"},f);var y=r?ye([],n,!0).sort(r):n,x="";return e.createElement(S,{className:b.limitWidth50rem},y.map((function(t,n){var r,a=!1;if(v){var s=((null===(r=t[o])||void 0===r?void 0:r[0])||"???").toLowerCase();s!==x&&(x=s,a=!0)}return e.createElement(e.Fragment,{key:t[d]||"alphabetical-list-".concat(n)},v&&a?e.createElement(e.Fragment,null,e.createElement(m,{className:"".concat(b.letterHeader),align:"left"},x.toUpperCase()),e.createElement(T,{className:"".concat(b.contentBreak," ").concat(b.divider)})):null,e.createElement(C,fe({className:b.listItem,alignItems:"flex-start",button:!(!i&&!l)||void 0,onClick:i?function(){return i(t)}:void 0},l&&!i?{component:V,to:l(t)}:{}),e.createElement(c,{item:t})))})))},dt=c((function(e){return{searchBox:{display:"flex",alignContent:"center",alignItems:"center",padding:"8px",border:"2px solid ".concat(e.palette.grey[300]),borderRadius:"14px"},searchField:{borderRadius:"14px",width:"100%",background:function(e){return e.background||"RGBA(179, 213, 235, 0.1)"},height:"46px",paddingLeft:"24px",color:e.palette.grey[600]},searchIcon:{color:e.palette.grey[600]}}})),mt=function(n){var r=n.array,o=n.sortFn,i=n.sortKey,l=void 0===i?"name":i,c=n.buttonClick,s=n.linkTo,d=n.ItemTemplate,m=n.arrayKey,p=void 0===m?"id":m,g=n.loadingMessage,f=void 0===g?"Loading list...":g,h=n.emptyMessage,v=void 0===h?"List is empty":h,b=n.inputBackgroundColor,y=n.placeholder,x=n.disabledSearch,E=n.delay,w=void 0===E?500:E,C=n.minQueryLength,N=void 0===C?3:C,k=n.handleOnChange,B=n.searchKeys,S=void 0===B?["name"]:B,R=n.alphabetisedHeader,I=void 0===R||R,T=fe(fe(fe({},ke()),Se()),dt({background:b})),A=t(""),W=A[0],P=A[1],D=t(!1),O=D[0],M=D[1],j=t(r),z=j[0],H=j[1];return ot((function(){!O&&W.length>=N&&(k?k(W):H(null==r?void 0:r.filter((function(e){var t=S.some((function(t){var n;return null===(n=e[t])||void 0===n?void 0:n.toLowerCase().includes(W.toLowerCase())}));return t}))))}),[W],w),a((function(){H(r)}),[r]),e.createElement(e.Fragment,null,e.createElement(u,{className:"".concat(T.searchBox," ").concat(T.limitWidth50rem)},e.createElement(L,{disabled:x,type:"text",value:W,placeholder:y||"Enter to search",onChange:function(e){O&&M(!1),P(e.target.value)},className:T.searchField,endAdornment:e.createElement(F,{position:"end",className:T.rightSpacer2},e.createElement(te,{className:T.searchIcon}))})),null!==r&&e.createElement(st,{array:z,sortFn:o,sortKey:l,buttonClick:c,linkTo:s,ItemTemplate:d,arrayKey:p,loadingMessage:f,emptyMessage:v,alphabetisedHeader:I}))},ut=c((function(e){return{inputField:function(t){var n=t.size;return fe({borderRadius:"14px"},"small"===n?e.typography.body2:{})},labelStyles:function(t){var n=t.size;return fe({},"small"===n?fe(fe({transform:"translate(14px, 9px) scale(1) !important"},e.typography.body2),{"&.MuiInputLabel-outlined.MuiInputLabel-shrink":{transform:"translate(15px, -9px) scale(0.75) !important"}}):{})}}})),pt=function(t){var n=t.size,r=void 0===n?"small":n,a=t.styling,o=t.numberField,i=t.inputProps,l=void 0===i?{}:i,c=t.InputProps,s=void 0===c?{}:c,d=t.accessLevel,m=t.disabled,u=t.fixedDecimalScale,p=he(t,["size","styling","numberField","inputProps","InputProps","accessLevel","disabled","fixedDecimalScale"]),g=ut({size:r});if(d===Ne)return null;var f=m;d===Ce&&(f=!0);var h=fe({},o&&{fixedDecimalScale:!!u});return e.createElement(A,fe({className:a||"",disabled:f},p,{inputProps:fe(fe({},l),h),InputProps:fe(fe({},s),{className:g.inputField,inputComponent:o?gt:void 0}),InputLabelProps:{className:g.labelStyles},variant:"outlined",size:r}))},gt=function(t){var n=t.inputRef,r=t.onChange,a=he(t,["inputRef","onChange"]);return e.createElement(re,fe({},a,{getInputRef:n,onValueChange:function(e){r({target:{name:t.name||"",value:e.value}})},thousandSeparator:!0,decimalScale:2,isNumericString:!0}))},ft=c((function(e){return{listItem:function(t){var n=t.background,r=t.size;return fe(fe({overflow:"auto",scrollbarWidth:"thin"},"small"===r?e.typography.body2:{}),{"&:hover":{backgroundColor:"".concat(n," !important")}})},inputStyles:function(t){var n=t.background,r=t.size;return fe(fe({borderRadius:"".concat("14px"," !important")},"small"===r?fe({paddingTop:"9.5px",paddingBottom:"8.5px"},e.typography.body2):{}),{"&:focus":{backgroundColor:n}})},selectedListItem:function(e){var t=e.background;return{"&:focus":{background:"".concat(t," !important")}}}}})),ht=function(t){var n=t.selectOptions,r=t.background,a=void 0===r?"#EFEDFF":r,o=t.size,i=void 0===o?"small":o,l=t.styling,c=t.disabled,s=t.accessLevel,d=he(t,["selectOptions","background","size","styling","disabled","accessLevel"]),m=ft({background:a,size:i});if(s===Ne)return null;var u=c;return s===Ce&&(u=!0),e.createElement(pt,fe({className:l||""},d,{disabled:u,size:i,SelectProps:{inputProps:{className:m.inputStyles}},select:!0}),n.map((function(t){return e.createElement(W,{key:t.value,value:t.value,className:m.listItem,classes:{selected:m.selectedListItem}},t.description)})))},vt=function(t){var n=t.styling,r=t.format,a=void 0===r?"dd MMM yyyy":r,o=t.minDate,i=void 0===o?new Date("1856-09-25"):o,l=t.accessLevel,c=t.disabled,s=he(t,["styling","format","minDate","accessLevel","disabled"]);if(l===Ne)return null;var d=c;return l===Ce&&(d=!0),e.createElement(ae,{utils:le},e.createElement(oe,fe({className:n||""},s,{disabled:d,inputVariant:"outlined",autoOk:!0,format:a,minDate:i,TextFieldComponent:pt})))},bt=function(t){var n=t.styling,r=t.format,a=void 0===r?"dd/MM/yyyy":r,o=t.minDate,i=void 0===o?new Date("1856-09-25"):o,l=t.accessLevel,c=t.disabled,s=he(t,["styling","format","minDate","accessLevel","disabled"]);if(l===Ne)return null;var d=c;return l===Ce&&(d=!0),e.createElement(ae,{utils:le},e.createElement(ie,fe({className:n||""},s,{disabled:d,inputVariant:"outlined",autoOk:!0,allowKeyboardControl:!0,format:a,minDate:i,TextFieldComponent:pt})))},yt=c((function(e){return{confirmWrapper:{display:"inline-block"},confirmContainer:{display:"flex",alignItems:"center"},whiteText:{color:e.palette.common.white}}})),xt=function(n){var r=n.children,o=n.onClick,i=n.styling,l=n.disabled,c=void 0!==l&&l,s=n.variant,d=void 0===s?"outlined":s,p=n.color,g=void 0===p?"primary":p,f=n.accessLevel,h=void 0===f?"":f,v=he(n,["children","onClick","styling","disabled","variant","color","accessLevel"]),b=fe(fe({},ke()),yt()),y=t(!1),x=y[0],E=y[1],w=t(!1),C=w[0],N=w[1];return it((function(){return E(!1)}),!x||C?null:4500),a((function(){N(v.loading),E(v.loading)}),[v.loading]),[Ne,Ce].includes(h)?null:x?e.createElement(u,{className:b.confirmWrapper},e.createElement(u,{className:b.confirmContainer},e.createElement(m,{className:b.rightSpacer1,variant:"body1"},"Are you sure?"),e.createElement(Ie,fe({},v,{type:"button",onClick:function(e){N(!0),o(e)},variant:"contained",styling:b.whiteText,disabled:c,color:g}),"Confirm",v.loading?"ing":""))):e.createElement(Ie,{type:"button",variant:d,disabled:c,styling:i,color:g,onClick:function(){return E(!0)}},r)},Et=function(e,t){var n=e.toString().length;return n?"".concat(n+(t?3:1)+Math.floor(n/3)/3,"ch"):"6ch"},wt=c((function(e){return{inputBase:function(e){return{height:"unset",padding:0,textAlign:e.textAlign||"center"}},input:function(e){return{textAlign:e.textAlign||"center",marginRight:"0.4rem",marginLeft:"0.4rem"}},startAdornment:{color:e.palette.text.secondary},modifiedUnderline:{"&:not(.Mui-disabled):before":{borderBottom:"none",transition:"none"},"&:hover:not(.Mui-disabled):before":{borderBottom:"1px solid ".concat(e.palette.grey[500]," !important")}},body2Text:fe({},e.typography.body2),dateFieldWidth:{width:"8ch"},fullDateWidth:{width:"11ch"},justifyStart:{justifyContent:"flex-start"},justifyCenter:{justifyContent:"center"},justifyEnd:{justifyContent:"flex-end"},totalContainer:{display:"flex",alignItems:"center",cursor:"default"},selectFocusBackground:{"&:focus":{backgroundColor:"unset"}}}})),Ct=function(t){var n=t.error,r=t.disabled,a=t.value,o=t.onBlur,i=t.onChange,l=t.prefix,c=t.suffix,s=t.numberField,d=void 0!==s&&s,u=t.textAlign,p=t.fixedDecimalScale,g=wt({textAlign:u}),f=fe({},d&&{fixedDecimalScale:!!p});return"string"==typeof a||"number"==typeof a?e.createElement(A,{error:!!n,inputProps:fe({className:g.inputBase,style:{width:Et(a,!!p)}},f),value:a,onChange:i,onBlur:o,InputProps:{startAdornment:l?e.createElement(F,{position:"end",className:g.startAdornment},l):null,endAdornment:c?e.createElement(F,{position:"start",className:g.startAdornment},c):null,inputComponent:d?gt:void 0,className:"".concat(g.body2Text," ").concat(g.modifiedUnderline),classes:{input:g.input}},helperText:n||void 0,disabled:r}):e.createElement(m,{variant:"body2"},"Incorrect value type")},Nt=function(t){return e.createElement(Ct,fe({},fe(fe({},t),{numberField:!0})))},kt=function(t){return e.createElement(Ct,fe({},fe(fe({},t),{numberField:!0,fixedDecimalScale:!0})))},Bt=p(g({root:{padding:"3px"}}))(P),St=function(t){var n=t.disabled,r=t.fullDate,a=void 0!==r&&r,o=t.value,i=t.error,l=t.onChange,c=t.onBlur,s=t.textAlign,d=wt({textAlign:s});return e.createElement(ae,{utils:le},e.createElement(oe,{disabled:n,views:a?void 0:["year","month"],value:o,autoOk:!0,format:a?"dd MMM yyyy":"MMM yyyy",InputProps:{className:"".concat(d.body2Text," ").concat(d.modifiedUnderline)},inputProps:{className:"".concat(d.inputBase," ").concat(a?d.fullDateWidth:d.dateFieldWidth),classes:{input:d.input}},error:!!i,helperText:i||void 0,onChange:l,onBlur:c}))},Rt=function(t){return e.createElement(St,fe({},t))},It=function(t){return e.createElement(St,fe({},t,{fullDate:!0}))},Tt=function(t){var n=t.value,r=t.disabled,a=t.onChange;return e.createElement(P,{disabled:r,checked:n,onChange:a,color:"primary",size:"small"})},Lt=function(t){return e.createElement(Tt,fe({},t))},Ft=function(t){var n=t.text,r=t.numberField,a=void 0!==r&&r,o=t.prefix,i=void 0===o?null:o,l=t.suffix,c=void 0===l?null:l,s=t.textAlign,d=t.fixedDecimalScale,m=wt({});return e.createElement(u,{className:"".concat(m.totalContainer," ").concat(m.body2Text," ").concat("left"===s?m.justifyStart:"right"===s?m.justifyEnd:m.justifyCenter)},i&&i,e.createElement(u,{className:m.body2Text},a?e.createElement(re,{value:n,displayType:"text",thousandSeparator:!0,isNumericString:!0,decimalScale:2,fixedDecimalScale:d}):n),c&&c)},At=function(t){var n=t.error,r=t.value,a=t.onBlur,o=t.onChange,i=t.selectOptions,l=t.disabled,c=wt({});return e.createElement(D,{margin:"none",error:!!n},e.createElement(O,{className:"".concat(c.body2Text," ").concat(c.modifiedUnderline),inputProps:{className:c.selectFocusBackground},value:r,onChange:o,onBlur:a,disabled:l},Object.entries(i).map((function(t){var n=t[0],r=t[1];return e.createElement(W,{className:c.body2Text,key:n,value:n},r)}))),n&&e.createElement(M,null,n))},Wt=function(t){var n=t.error,r=t.value,a=t.onBlur,o=t.onChange,i=t.selectOptions,l=t.disabled,c=t.renderValue,s=wt({});return e.createElement(D,{margin:"none",error:!!n},e.createElement(O,{className:"".concat(s.body2Text," ").concat(s.modifiedUnderline),inputProps:{className:s.selectFocusBackground},value:r,onChange:o,onBlur:a,disabled:l,renderValue:c,multiple:!0},Object.entries(i).map((function(t){var n=t[0],r=t[1];return e.createElement(W,{className:s.body2Text,key:n,value:n},r)}))),n&&e.createElement(M,null,n))},Pt=c((function(e){return{newRowHighlight:{backgroundColor:"#73c4ca30"},editedCellHighlight:{backgroundColor:"#5840f52e",backgroundClip:"padding-box"},editedBorder:{border:"3px solid #5840f52e",borderWidth:"2px 4px"},errorBorder:{border:"3px solid ".concat(e.palette.error.light),borderWidth:"2px 4px"},emptyLoadingPadding:{paddingTop:"0.75rem",paddingBottom:"0.75rem"},centeredText:{textAlign:"center"},disabled:{backgroundColor:e.palette.action.hover},pagination:{marginTop:"1rem",marginBottom:"1rem"},virtualisationContainer:{maxHeight:"500px",overflow:"auto"}}})),Dt=function(n){var r=n.value,o=void 0===r?"":r,i=n.row,l=i.index,c=i.values,s=i.original,d=n.column.id,m=n.syncCellWithState,u=n.setRows,p=n.fieldConfig,g=n.disabled,f=p[d],h=f.validationRule,v=f.dependentValidationRule,b=f.isCheckbox,y=f.isDateField,x=f.customRenderFn,E=f.prefix,w=f.suffix,C=f.textAlign,N=f.onBlur,k=f.onChangeValueModifier,B=t(!1),S=B[0],R=B[1],I=t(o),T=I[0],L=I[1],F=b,A=function(e){var t=!1;if(h)try{h.validateSync(e),S&&R(!1)}catch(e){t=!0,!S&&R(e.message)}if(v)try{v(c).validateSync(e),S&&R(!1)}catch(e){t=!0,!S&&R(e.message)}return t},W=function(e){return ve(void 0,void 0,void 0,(function(){return be(this,(function(t){switch(t.label){case 0:return F?m(l,d,e,!1):m(l,d,T,!!S),!N||!u||S||Qe(c[d],T,y)?[3,2]:[4,N({rowIndex:l,value:T,setRows:u,values:s})];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))};a((function(){L(o);var e=A(o);S!==e&&m(l,d,o,e,!0)}),[o]),a((function(){s.errors&&!!s.errors[d]!=!!S&&A(o)}),[s.errors]);var P,D={value:T,values:c,disabled:g||s.disabledRow,error:S,onChange:function(e){var t;if(y){t=e;var n=k?k(t):t;return L(n),void A(n)}t=e;var r=F?t.target.checked:t.target.value;F?(L(r),W(r)):(L(r),A(r))},onBlur:W,prefix:E,suffix:w,textAlign:C,originalValues:s};return x?x(D):(P=D,e.createElement(Ct,fe({},fe({},P))))},Ot=function(t){var n=t.row,r=t.classes,a=t.disabled,o=t.includeRowSelect;return e.createElement(f,{hover:!0,className:"".concat("NEW"===n.original.rowStatus?r.newRowHighlight:""," ").concat("EDITED"===n.original.rowStatus?r.editedBorder:"","\n").concat(n.original.hasOwnProperty("errors")&&Object.values(n.original.errors).includes(!0)?r.errorBorder:""," ").concat(n.original.disabledRow||a?r.disabled:"")},n.cells.map((function(t,n){return e.createElement(y,fe({},t.getCellProps(),{align:t.column.textAlign||"center",className:"EDITED"===t.row.original.rowStatus&&t.row.original.edited[t.column.id]?r.editedCellHighlight:"",padding:0===(o&&n)?"checkbox":"normal"}),t.render("Cell"))})))},Mt=[],jt=i((function(t){var n=t.tableRows,o=t.tableHeaders,i=t.syncCellWithState,l=t.setRows,c=void 0===l?void 0:l,s=t.skipPageReset,d=void 0!==s&&s,p=t.fieldConfig,g=t.disabled,f=void 0!==g&&g,h=t.setSelectedRows,v=t.includeRowSelect,b=void 0===v||v,y=t.filterData,x=t.filterTypes,E=t.emptyTableText,w=void 0===E?"Table is empty":E,C=t.paginate,N=void 0!==C&&C,k=t.defaultPageSize,B=void 0===k?50:k,S=t.virtContainerStyling,R=t.overscan,I=t.rowHeight,T=t.includeGlobalSearch,L=fe(fe({},Pt()),Se()),F=e.useRef(null),A=e.useMemo((function(){return{Cell:Dt}}),[]),W=ce({columns:o,data:n||Mt,defaultColumn:A,autoResetPage:!!N&&!d,filterTypes:x,initialState:{pageSize:N?B:void 0},syncCellWithState:i,setRows:c,fieldConfig:p,disabled:f},se,de,me,ue,(function(t){b&&t.visibleColumns.push((function(t){return ye([{id:"selection",Header:function(t){var n=t.getToggleAllRowsSelectedProps,r=t.getToggleAllPageRowsSelectedProps;return e.createElement(Bt,fe({},N?r():n(),{disabled:f,size:"small"}))},Cell:function(t){var n=t.row;return e.createElement(Bt,fe({},n.getToggleRowSelectedProps(),{disabled:f,size:"small"}))}}],t,!0)}))})),P=W.getTableProps,D=W.getTableBodyProps,O=W.headerGroups,M=W.rows,j=W.page,z=W.prepareRow,H=W.state,K=H.selectedRowIds,V=H.pageIndex,U=W.state,J=W.setFilter,q=W.pageCount,Y=W.gotoPage,X=W.preGlobalFilteredRows,Q=W.setGlobalFilter,$=W.isAllRowsSelected,Z=W.selectedFlatRows,_=ge({size:(N?j:M).length,parentRef:F,overscan:R||5,estimateSize:r((function(){return I||54}),[I])}),ee=N?j:M,te=_.virtualItems,ne=te.length>0?te[0].start:0,re=te.length>0?_.totalSize-te[te.length-1].end:0,ae=r((function(e,t){Y(t-1)}),[]);return a((function(){y&&J(y.filterRow,y.filterValues)}),[y]),a((function(){h&&h(Object.keys(K).map((function(e){return+e})))}),[K]),e.createElement(e.Fragment,null,T?e.createElement(Ht,{preGlobalFilteredRows:X,globalFilter:U.globalFilter,setGlobalFilter:Q}):null,e.createElement("div",{ref:F,className:S||L.virtualisationContainer},e.createElement(Gt,fe({},{disabled:f,includeRowSelect:b,getTableProps:P,headerGroups:O,getTableBodyProps:D,rowsToRender:ee,prepareRow:z,paddingTop:ne,paddingBottom:re,virtualRows:te,isAllRowsSelected:$,selectedFlatRows:Z}))),null===n?e.createElement(u,{className:L.emptyLoadingPadding},e.createElement(Fe,null)):null,n&&!n.length?e.createElement(u,{className:"".concat(L.emptyLoadingPadding," ").concat(L.centeredText)},e.createElement(m,{variant:"body2"},w)):null,N&&(null==n?void 0:n.length)?e.createElement(G,{className:"".concat(L.flexCenter," ").concat(L.pagination),count:q,page:V+1,onChange:ae,shape:"rounded",showFirstButton:!0,showLastButton:!0}):null)})),zt=c((function(e){return{container:{display:"flex",justifyContent:"center",alignItems:"center",border:"1px solid ".concat(e.palette.grey[600]),borderRadius:"8px",width:"100%",maxWidth:"20rem",marginInline:"auto",color:e.palette.grey[600],"&:hover":{borderColor:e.palette.grey[800],color:e.palette.grey[800]},"&:focus-within":{borderColor:e.palette.grey[800],color:e.palette.grey[800]}},input:fe({width:"100%",maxWidth:"18rem",color:"inherit"},e.typography.body2)}})),Ht=i((function(n){var r=n.preGlobalFilteredRows,a=n.globalFilter,o=n.setGlobalFilter,i=t(a),l=i[0],c=i[1],s=fe(fe({},ke()),zt()),d=pe((function(e){o(e||void 0)}),200),m=r.length;return e.createElement("div",{className:"".concat(s.container," ").concat(s.contentBreak)},e.createElement(te,{className:"".concat(s.rightSpacer1," ").concat(s.leftSpacer1)}),e.createElement(L,{className:"".concat(s.input),value:l||"",onChange:function(e){c(e.target.value),d(e.target.value)},placeholder:"Search ".concat(m," records..."),inputProps:{"aria-label":"search"}}))})),Gt=i((function(t){var n=t.disabled,r=t.includeRowSelect,a=t.getTableProps,o=t.headerGroups,i=t.getTableBodyProps,l=t.rowsToRender,c=t.prepareRow,s=t.paddingTop,d=t.paddingBottom,m=t.virtualRows,u=t.isAllRowsSelected,p=t.selectedFlatRows;return e.createElement(h,fe({},a(),{stickyHeader:!0,style:{borderCollapse:"collapse"}}),e.createElement(Kt,{headerGroups:o,includeRowSelect:r,isAllRowsSelected:u}),e.createElement(b,fe({},i()),s>0&&e.createElement("tr",null,e.createElement("td",{style:{height:"".concat(s,"px")}})),e.createElement(Vt,fe({},{disabled:n,includeRowSelect:r,rowsToRender:l,prepareRow:c,virtualRows:m,selectedFlatRows:p})),d>0&&e.createElement("tr",null,e.createElement("td",{style:{height:"".concat(d,"px")}}))))})),Kt=i((function(t){var n=t.headerGroups,r=t.includeRowSelect;return t.isAllRowsSelected,e.createElement(v,null,n.map((function(t){return e.createElement(f,fe({},t.getHeaderGroupProps()),t.headers.map((function(t,n){return e.createElement(y,fe({},t.getHeaderProps(),{align:t.textAlign||"center",padding:0===(r&&n)?"checkbox":"normal"}),t.render("Header"))})))})))})),Vt=i((function(t){var n=t.rowsToRender,r=t.virtualRows,a=t.prepareRow,o=he(t,["rowsToRender","virtualRows","prepareRow"]),i=fe(fe({},Pt()),Se());return e.createElement(e.Fragment,null,r.map((function(t){var r=n[t.index];return a(r),e.createElement(l,{key:r.original.rowKey||r.getRowProps().key},r.original.disabledRow?e.createElement(j,{title:r.original.tooltipText||"This row is disabled",arrow:!0},e.createElement(Ot,fe({},fe(fe({},o),{row:r,classes:i})))):e.createElement(Ot,fe({},fe(fe({},o),{row:r,classes:i}))))})))})),Ut=c((function(e){return{alertStyling:{borderRadius:"14px"},closeButton:{color:e.palette.text.secondary,marginRight:e.spacing(2)},showCursor:{cursor:"pointer"}}})),Jt=function(t){var n=t.alertActionHandler,r=t.formStatus,a=t.actionButton,o=t.alertMessage,i=t.addBreak,l=void 0===i||i,c=t.styling,d=fe(fe({},ke()),Ut());return e.createElement(B,{in:[xe,Ee,we].includes(r)},e.createElement(K,{onClick:n,className:"".concat(d.alertStyling," ").concat(l?d.sectionBreak:""," ").concat(c||""," ").concat(n?d.showCursor:""),severity:r===Ee?Ee:r===xe?xe:we,action:a?e.createElement(s,{className:d.closeButton,"aria-label":"close",color:"inherit",size:"small",onClick:function(e){e.stopPropagation(),a.handler()}},a.text):null},o))},qt=c((function(e){return{greyBox:{backgroundColor:e.palette.grey[200],display:"flex",justifyContent:"center",alignItems:"center",padding:"1.5rem",borderRadius:"14px",position:"relative",height:"13.25rem"},widthLimiter:{width:"100%",maxWidth:"28rem",marginLeft:"auto",marginRight:"auto"},hiddenInput:{display:"none"},buttonColor:{backgroundColor:e.palette.primary.main},iconStyling:{color:e.palette.common.white,fontSize:"3rem"},sectionBreak:{marginBottom:e.spacing(3)},dropBox:{height:"100%",width:"100%",display:"flex",justifyContent:"center",alignItems:"center"},dropArrowStyling:{color:e.palette.text.secondary,fontSize:"3rem"},topLeftArrow:{position:"absolute",top:0,left:0,transform:"rotate(45deg)"},topRightArrow:{position:"absolute",top:0,right:0,transform:"rotate(135deg)"},bottomLeftArrow:{position:"absolute",bottom:0,left:0,transform:"rotate(-45deg)"},bottomRightArrow:{position:"absolute",bottom:0,right:0,transform:"rotate(225deg)"},hiddenDisplay:{display:"none"},loadingCircle:{marginLeft:e.spacing(1)},roundedAvatarButton:{borderRadius:"100%"},roundedAvatar:{width:"16vmax",height:"16vmax",maxWidth:"13rem",maxHeight:"13rem"},organisationImage:{maxWidth:"8rem",minWidth:"5rem",maxHeight:"8rem"}}})),Yt=function(n){var r=n.id,o=void 0===r?"image-upload":r,i=n.url,l=n.roundedAvatar,c=void 0!==l&&l,p=n.handleSaveImage,g=n.alt,f=n.accessLevel,h=fe(fe({},qt()),ke()),v=t(!!i),b=v[0],y=v[1],x=t("enabled"),E=x[0],w=x[1],C=t(null),N=C[0],k=C[1];if(a((function(){i&&y(!0)}),[i]),f===Ne)return null;var B=!1;f===Ce&&(B=!0);var S,I=function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r;return be(this,(function(a){switch(a.label){case 0:return B?[2]:(k(null),"input"!==e?[3,4]:(n=t.target).files&&n.files[0]?[4,T(n.files[0])]:[3,2]);case 1:return a.sent(),[3,3];case 2:w(Ee),y(!!i),a.label=3;case 3:return[3,7];case 4:return"dragDrop"!==e?[3,7]:(r=t.dataTransfer).files&&r.files[0]?[4,T(r.files[0])]:[3,6];case 5:return a.sent(),[3,7];case 6:w(Ee),y(!!i),a.label=7;case 7:return[2]}}))}))},T=function(e){return ve(void 0,void 0,void 0,(function(){var t,n,r;return be(this,(function(a){switch(a.label){case 0:return w("loading"),e.size>=524288?(k("Image size should be less than 0.5MB"),w(Ee),y(!!i),[2]):(t=e.name.split(".")[1].toLowerCase(),["png","jpg","jpeg"].includes(t)?[4,e.arrayBuffer()]:(k("Please provide an image in png, jpg or jpeg format"),w(Ee),y(!!i),[2]));case 1:n=a.sent(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,p(t,n,e)];case 3:return a.sent(),w(xe),y(!0),[3,5];case 4:return r=a.sent(),console.log(r),w(Ee),y(!!i),[3,5];case 5:return[2]}}))}))};switch(E){case"dragEnter":S=e.createElement(u,{className:h.dropBox,style:{pointerEvents:"none"}},e.createElement($,{className:"".concat(h.dropArrowStyling," ").concat(h.topLeftArrow)}),e.createElement($,{className:"".concat(h.dropArrowStyling," ").concat(h.topRightArrow)}),e.createElement(m,{variant:"h5",color:"textSecondary"},"Drop Here"),e.createElement($,{className:"".concat(h.dropArrowStyling," ").concat(h.bottomLeftArrow)}),e.createElement($,{className:"".concat(h.dropArrowStyling," ").concat(h.bottomRightArrow)}));break;case"loading":S=e.createElement(u,{className:h.dropBox},e.createElement(m,{color:"textSecondary"},"Loading..."),e.createElement(d,{className:h.loadingCircle,size:25}));break;default:S=e.createElement("label",{htmlFor:o},e.createElement(R,{className:"".concat(h.buttonColor," ").concat(h.sectionBreak),"aria-label":"upload picture",component:"span"},e.createElement(Q,{className:h.iconStyling})),e.createElement(m,{variant:"body2",color:"textSecondary"},"Drag and drop or browse to upload your image or logo."))}return e.createElement(u,{className:h.labelBreak,onDragEnter:function(e){B||(e.preventDefault(),e.stopPropagation(),y(!1))},onDragOver:function(e){B||(e.preventDefault(),e.stopPropagation(),y(!1))}},b&&e.createElement(u,{className:h.labelBreak},e.createElement("label",{htmlFor:o},e.createElement(s,{className:"".concat(c?h.roundedAvatarButton:""),"aria-label":"upload picture",component:"span"},c?e.createElement(z,{className:h.roundedAvatar,src:i,alt:g||"Profile Avatar"}):e.createElement("img",{className:h.organisationImage,src:i,alt:g||"Company Logo"})))),e.createElement(u,{className:"".concat(h.greyBox," ").concat(h.widthLimiter," ").concat(h.sectionBreak," ").concat(b?h.hiddenDisplay:""),onDragEnter:function(e){B||(e.preventDefault(),e.stopPropagation(),w("dragEnter"))},onDragLeave:function(e){B||(e.preventDefault(),e.stopPropagation(),w("enabled"),y(!!i))},onDragOver:function(e){B||(e.preventDefault(),e.stopPropagation(),w("dragEnter"))},onDrop:function(e){B||(e.preventDefault(),e.stopPropagation(),I("dragDrop",e))}},e.createElement("input",{id:o,className:h.hiddenInput,type:"file",accept:".png, .jpg, .jpeg",disabled:B,onChange:function(e){return I("input",e)}}),S),e.createElement(u,{className:h.widthLimiter},e.createElement(Jt,{formStatus:E,alertMessage:N||(E===xe?"Uploaded successfully!":"Something went wrong.")})))};export{Jt as Alert,st as AlphabeticalList,Ge as Breadcrumbs,Ie as Button,xt as ButtonWithConfirm,Le as ContentBox,Te as ContentLabel,vt as DatePicker,jt as EditableTable,Ve as EntityList,Ue as ErrorIndicator,Yt as ImageDisplayAndUpload,bt as KeyboardDatePicker,nt as LeftNavigation,Fe as LoadingSpinner,at as MainLayout,Ft as NonEditableField,gt as NumberFormatField,mt as SearchBar,ht as Select,ze as StaticTable,St as TableDatePicker,Wt as TableMultipleSelect,At as TableSelect,Ct as TableTextField,pt as TextField,Qe as didCellValueChange,Lt as tableCheckbox,Rt as tableDateField,It as tableInvoiceDateField,Nt as tableNumericStringField,kt as tableNumericStringFixedDecimalField,ot as useDebounceEffect,it as useInterval,lt as useWhyDidYouUpdate};
1
+ import e,{useState as t,useMemo as r,useCallback as n,useEffect as a,useRef as o,memo as i,Fragment as l}from"react";import{makeStyles as c,Button as s,CircularProgress as d,Typography as m,Box as u,withStyles as p,createStyles as g,TableRow as f,Table as h,TableHead as v,TableBody as b,TableCell as y,Link as x,ButtonBase as E,Grid as w,ListItem as C,ListItemIcon as N,ListItemText as k,Collapse as S,List as B,IconButton as R,Container as I,Divider as T,InputBase as L,InputAdornment as F,TextField as A,MenuItem as W,Checkbox as P,FormControl as D,Select as O,FormHelperText as M,Tooltip as j,Avatar as z}from"@material-ui/core";import{string as H}from"yup";import{Pagination as G,Alert as K}from"@material-ui/lab";import{Link as V,useLocation as U,useHistory as J}from"react-router-dom";import q from"@material-ui/icons/Error";import{ExpandLess as Y,ExpandMore as X,CloudUpload as Q,Forward as $}from"@material-ui/icons";import{isValid as Z}from"date-fns";import _ from"@material-ui/icons/Close";import ee from"@material-ui/icons/AddBoxOutlined";import te from"@material-ui/icons/Search";import{isEqual as re}from"lodash";import ne from"react-number-format";import{MuiPickersUtilsProvider as ae,DatePicker as oe,KeyboardDatePicker as ie}from"@material-ui/pickers";import le from"@date-io/date-fns";import{useTable as ce,useFilters as se,useGlobalFilter as de,usePagination as me,useRowSelect as ue,useAsyncDebounce as pe}from"react-table";import{useVirtual as ge}from"react-virtual";var fe=function(){return fe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},fe.apply(this,arguments)};function he(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r}function ve(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{c(n.next(e))}catch(e){o(e)}}function l(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,l)}c((n=n.apply(e,t||[])).next())}))}function be(e,t){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(i=0)),i;)try{if(r=1,n&&(a=2&l[0]?n.return:l[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,l[1])).done)return a;switch(n=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,n=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){i.label=l[1];break}if(6===l[0]&&i.label<a[1]){i.label=a[1],a=l;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(l);break}a[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],n=0}finally{r=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}function ye(e,t,r){if(r||2===arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))}H().trim().required("Required"),H().trim().required("Required").matches(/^\d*\.?\d*$/,"Must be a Number");var xe="success",Ee="error",we="warning",Ce="read",Ne="noAccess",ke=c({labelBreak:{marginBottom:"0.5rem"},contentBreak:{marginBottom:"1rem"},sectionBreak:{marginBottom:"1.5rem"},doubleSectionBreak:{marginBottom:"3rem"},rightSpacer1:{marginRight:"0.5rem"},rightSpacer2:{marginRight:"1rem"},leftSpacer1:{marginLeft:"0.5rem"},leftSpacer2:{marginLeft:"1rem"},buttonSpacing:{marginLeft:"0.5rem",marginRight:"0.5rem",marginBottom:"1rem"},leftRightPadding1:{paddingLeft:"0.5rem",paddingRight:"0.5rem"},leftRightPadding2:{paddingLeft:"1rem",paddingRight:"1rem"},topBottomPadding1:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},topBottomPadding2:{paddingTop:"1rem",paddingBottom:"1rem"}},{classNamePrefix:"spacing",index:2}),Se=c((function(e){return{boldText:{fontWeight:700},bolderText:{fontWeight:500},smallText:{fontSize:"0.7rem"},warningColor:{color:e.palette.warning.main},centerText:{textAlign:"center"}}}),{classNamePrefix:"font"}),Be=c({contentBox:{background:"white",borderRadius:"14px",marginBottom:"1rem",padding:"3rem"},limitWidth60rem:{maxWidth:"60rem",marginLeft:"auto",marginRight:"auto"},limitWidth50rem:{maxWidth:"50rem",marginLeft:"auto",marginRight:"auto"},limitWidth45rem:{maxWidth:"45rem",marginLeft:"auto",marginRight:"auto"},limitWidth40rem:{maxWidth:"40rem",marginLeft:"auto",marginRight:"auto"},limitWidth35rem:{maxWidth:"35rem",marginLeft:"auto",marginRight:"auto"},limitWidth30rem:{maxWidth:"30rem",marginLeft:"auto",marginRight:"auto"},limitWidth25rem:{maxWidth:"25rem",marginLeft:"auto",marginRight:"auto"},centeredText:{textAlign:"center"},startAlignedText:{textAlign:"start"},width20:{width:"20%"},width49:{width:"49%"},width50:{width:"50%"},width60:{width:"60%"},width100:{width:"100%"},flexCenter:{display:"flex",alignItems:"center",justifyContent:"center"},centerJustify:{justifyContent:"center"},leftJustify:{justifyContent:"left"},rightJustify:{justifyContent:"right"}},{classNamePrefix:"layout",index:2}),Re=c((function(e){return{submitButton:{borderRadius:"1.5rem",padding:"0.4rem 1rem",textTransform:"none"},containedText:{color:"white"},spinnerColour:{color:e.palette.grey[500]}}})),Ie=function(t){var r=t.loading,n=void 0!==r&&r,a=t.children,o=t.errors,i=void 0!==o&&o,l=t.type,c=void 0===l?"submit":l,m=t.onClick,u=t.disabled,p=void 0!==u&&u,g=t.variant,f=void 0===g?"outlined":g,h=t.styling,v=void 0===h?"":h,b=t.color,y=void 0===b?"primary":b,x=t.accessLevel,E=void 0===x?"":x,w=he(t,["loading","children","errors","type","onClick","disabled","variant","styling","color","accessLevel"]),C=fe(fe({},ke()),Re());if([Ne,Ce].includes(E))return null;var N=p;return p||!n&&!i||(N=!0),e.createElement(s,fe({},w,{variant:f,color:y,type:c,className:C.submitButton+" "+("contained"===f&&C.containedText)+" "+v,disabled:N,onClick:m}),a,n?e.createElement(d,{className:C.leftSpacer1+" "+C.spinnerColour,size:"1.1rem",thickness:6}):"")},Te=function(t){var r=t.children,n=t.styling,a=void 0===n?null:n,o=Se();return e.createElement(m,{variant:"h6",className:o.bolderText+" "+(a||"")},r)},Le=function(t){var r=t.limitWidth,n=void 0!==r&&r,a=t.children,o=t.styling,i=fe(fe({},ke()),Be());return e.createElement(u,{boxShadow:3,className:i.contentBox+" "+(o||"")},e.createElement(u,{className:i.centeredText+" "+(n?i.limitWidth50rem:"")},a))},Fe=function(t){var r=t.text,n=void 0===r?"Loading data...":r,a=t.styling,o=fe(fe({},ke()),Be());return e.createElement(u,{className:o.flexCenter+" "+(a||"")},e.createElement(m,{variant:"body2",color:"textSecondary",className:o.rightSpacer1},n),e.createElement(d,{size:"1.5rem"}))},Ae=p(g({root:{"&:hover td":{backgroundColor:"rgba(0, 0, 0, 0.06)"}}}))(f),We=p(g({root:{"&:nth-of-type(even) td":{backgroundColor:"rgba(0, 0, 0, 0.03)"},"&:hover td":{backgroundColor:"rgba(0, 0, 0, 0.06)"}}}))(f),Pe=c((function(e){return{root:{borderBottom:"none",paddingTop:"8px",paddingBottom:"8px","&:first-child":{borderTopLeftRadius:"14px",borderBottomLeftRadius:"14px"},"&:last-child":{borderTopRightRadius:"14px",borderBottomRightRadius:"14px"}},head:function(t){var r=t.background,n=t.border;return{backgroundColor:r||"HSLA(204, 58.3%, 81.2%, 0.1)",borderTop:"1px solid "+(n||"HSLA(204, 58.3%, 81.2%, 0.3)"),borderBottom:"1px solid "+(n||"HSLA(204, 58.3%, 81.2%, 0.3)"),color:t.text||e.palette.text.primary,fontWeight:500,"&:first-child":{borderLeft:"1px solid "+(n||"HSLA(204, 58.3%, 81.2%, 0.3)")},"&:last-child":{borderRight:"1px solid "+(n||"HSLA(204, 58.3%, 81.2%, 0.3)")}}}}})),De=function(t){var r=t.children,n=t.align,a=void 0===n?"centerJustify":n,o=t.headerColours,i=he(t,["children","align","headerColours"]),l=fe(fe({},Be()),Pe(fe({},o||{})));return e.createElement(y,fe({},i,{classes:{root:l.root,head:l.head}}),e.createElement(u,{className:l.flexCenter+" "+l[a]},r))},Oe=function(t){var r=t.rowBorderSeparation,n=void 0!==r&&r,a=t.children,o=he(t,["rowBorderSeparation","children"]);return n?e.createElement(Ae,fe({},o),a):e.createElement(We,fe({},o),a)},Me=function(t){var r=t.colSpan,n=t.children,a=je();return e.createElement(Oe,null,e.createElement(De,{className:a.adjustedCellPadding,colSpan:r},n))},je=c({tableStyles:{borderCollapse:"separate",borderBottom:"1px solid rgb(224, 224, 224)"},pointer:{cursor:"pointer"},bottomBorder:{borderBottom:"1px solid rgba(224, 224, 224, 1)"},noShading:{backgroundColor:"transparent !important"},adjustedCellPadding:{paddingTop:"11px",paddingBottom:"11px"}}),ze=function(o){var i=o.rowBorderSeparation,l=void 0!==i&&i,c=o.headers,s=o.rows,d=o.headerCellAlignment,m=void 0===d?[]:d,u=o.rowCellAlignment,p=void 0===u?[]:u,g=o.styling,y=o.headerColours,x=o.paginate,E=void 0!==x&&x,w=o.itemsPerPage,C=void 0===w?30:w,N=fe(fe(fe({},Be()),ke()),je()),k=t(1),S=k[0],B=k[1],R=r((function(){return!!(E&&((null==s?void 0:s.length)||0)>C)}),[C,E,s]),I=t(R?s.slice(0,C):s),T=I[0],L=I[1],F=n((function(e,t){B(t)}),[]);return a((function(){L(R?s.slice(C*(S-1),C*S):s)}),[R,C,S,s]),e.createElement(e.Fragment,null,e.createElement(h,{className:N.tableStyles+" "+(R?N.contentBreak:"")+" "+(g||"")},c?e.createElement(v,null,e.createElement(f,null,c.map((function(t,r){return e.createElement(De,{align:m[r]||"centerJustify",key:"header-cell-"+r,headerColours:y},t)})))):null,e.createElement(b,null,T?T.length?T.map((function(t,r){var n=!!t.onClick;return e.createElement(Oe,{rowBorderSeparation:l,className:n?N.pointer:void 0,key:"row-"+r,onClick:n?t.onClick:void 0},t.row.map((function(t,n){return e.createElement(De,{align:p[n]||"centerJustify",className:l&&T.length!==r+1?N.bottomBorder:void 0,key:"row-"+r+"-cell-"+n},t)})))})):e.createElement(Me,{colSpan:(null==c?void 0:c.length)||0},"Table is empty"):e.createElement(Me,{colSpan:(null==c?void 0:c.length)||0},e.createElement(Fe,null)))),R?e.createElement(G,{className:N.flexCenter,count:Math.ceil(s.length/C),page:S,onChange:F,shape:"rounded",showFirstButton:!0,showLastButton:!0}):null)},He=c((function(e){return{logoContainer:{width:"3rem",height:"3rem",display:"flex",justifyContent:"center",alignItems:"center"},logo:{width:"100%",height:"100%","& > div":{width:"100%",height:"100%"},"& > svg":{width:"100%",height:"100%"}},logoInBreadcrumb:{width:"2rem",height:"2rem",margin:"0.125rem 0 0.125rem 0.313rem"},logoSpacing:{marginRight:e.spacing(1)},flexItemsCenter:{display:"flex",alignItems:"center"},nonPrimaryBreadcrumbOffset:{marginLeft:"2.5rem"},BreadcrumbsContainer:{height:"2.25rem",marginLeft:"0.875rem",marginRight:"1.5rem"},primaryBreadcrumbItem:function(t){var r=t.primary;return{backgroundColor:(null==r?void 0:r.background)||e.palette.common.white,color:(null==r?void 0:r.color)||e.palette.text.primary,borderRadius:"2rem",zIndex:3,height:"100%",display:"flex",alignItems:"center"}},secondaryBreadcrumbItem:function(t){var r=t.secondary;return{height:"2.25rem",backgroundColor:(null==r?void 0:r.background)||"#D7D4E4",borderRadius:"2rem",zIndex:2,marginLeft:"-2rem",color:(null==r?void 0:r.color)||e.palette.text.primary}},tertiaryBreadcrumbItem:function(t){var r=t.tertiary;return{height:"2.25rem",backgroundColor:(null==r?void 0:r.background)||"#D7D4E4",borderRadius:"2rem",zIndex:1,marginLeft:"-2rem",color:(null==r?void 0:r.color)||e.palette.common.white}},breadCrumbShadow:{boxShadow:e.shadows[2]},breadcrumbRightMargin:{marginRight:"1rem"},breadcrumbTextOverflow:{display:"block",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"12rem"},boldText:{fontWeight:500},activeBreadcrumb:function(t){var r=t.tertiary;return{backgroundColor:(null==r?void 0:r.background)||"#D7D4E4",color:(null==r?void 0:r.color)||e.palette.common.white}},noWrap:{whiteSpace:"nowrap"},fullBorderRadius:{borderRadius:"100%"}}})),Ge=function(t){var r=t.logo,n=t.content,a=t.colors,o=He(fe({},a||{})),i=n.first,l=void 0===i?null:i,c=n.second,s=void 0===c?null:c,d=n.third,p=void 0===d?null:d;return e.createElement(u,{className:o.BreadcrumbsContainer+" "+o.flexItemsCenter},e.createElement(u,{className:(l?o.primaryBreadcrumbItem+" "+o.breadCrumbShadow:"")+" "+o.flexItemsCenter},e.createElement(x,{component:V,to:"/",className:o.logoSpacing},e.createElement(u,{className:o.logoContainer+" \n "+(l?o.logoInBreadcrumb:"")},e.createElement(E,{className:o.logo+" "+o.fullBorderRadius},r))),l&&e.createElement(m,{color:"textPrimary",className:o.boldText+" "+o.noWrap+" "+o.primaryBreadcrumbItem},e.createElement(x,{underline:"none",component:V,to:l.link,color:"inherit",className:o.breadcrumbRightMargin+" "+o.breadcrumbTextOverflow},l.name))),s&&e.createElement(u,{className:o.flexItemsCenter+" "+o.secondaryBreadcrumbItem+" "+o.breadCrumbShadow+" "+(p?"":o.activeBreadcrumb)},e.createElement(m,{color:"inherit",className:o.boldText+" "+o.noWrap},e.createElement(x,{component:V,underline:"none",to:s.link,color:"inherit",className:o.nonPrimaryBreadcrumbOffset+" "+o.breadcrumbRightMargin+" "+o.breadcrumbTextOverflow},s.name))),p&&e.createElement(u,{className:o.flexItemsCenter+" "+o.tertiaryBreadcrumbItem+" "+o.breadCrumbShadow},e.createElement(m,{color:"inherit",className:o.boldText+" "+o.noWrap},e.createElement(x,{component:V,underline:"none",to:p.link,color:"inherit",className:o.nonPrimaryBreadcrumbOffset+" "+o.breadcrumbRightMargin+" "+o.breadcrumbTextOverflow},p.name))))},Ke=c((function(e){return{container:{marginRight:e.spacing(-1.5),marginLeft:e.spacing(-1.5)},svgContainer:{marginLeft:"auto",marginRight:"auto"},button:{display:"block",textDecoration:"none",borderRadius:"14px",height:"100%",width:"100%",textAlign:"center"},orgLabel:{padding:e.spacing(1),paddingTop:0}}})),Ve=function(t){var r=t.entities,n=t.icon,a=t.loadingMessage,o=void 0===a?"Loading list...":a,i=t.emptyMessage,l=void 0===i?"List is empty":i,c=t.onClick,d=fe(fe(fe({},Ke()),ke()),Se());return e.createElement(u,{className:d.container},r?r.length?e.createElement(w,{container:!0,spacing:3},r.map((function(t,r){return e.createElement(w,{key:t.name+"-"+r,item:!0,xs:4,md:3},e.createElement(s,fe({className:d.button,key:t.name},c?{onClick:function(){return c(t)}}:{component:V,to:t.link}),e.createElement(u,{className:d.svgContainer+" "+d.labelBreak},n(t)),e.createElement(m,{className:d.orgLabel,variant:"body1"},t.name)))}))):e.createElement(m,{className:d.centerText,variant:"body2",color:"textSecondary"},l):e.createElement(Fe,{text:o}))},Ue=function(t){var r=t.text,n=void 0===r?"Something went wrong":r,a=fe(fe({},ke()),Be());return e.createElement(u,{className:a.flexCenter},e.createElement(q,{fontSize:"medium",className:a.rightSpacer1,color:"error"}),e.createElement(m,{variant:"body2",color:"textSecondary"},n))},Je=c((function(e){return{listIcon:{minWidth:"auto",paddingRight:"0.25rem"},mainIconSize:{fontSize:"1rem"},mainIconMarginAdjustment:{marginTop:"3px"},textOverflowElipsis:{overflow:"hidden",textOverflow:"ellipsis"},mainListItem:function(t){return{padding:"8px 24px 8px 16px",alignItems:"flex-start",backgroundColor:t.mainBackground||e.palette.common.white,color:t.mainText||e.palette.text.primary,borderRadius:e.spacing(.6),"&:hover":{backgroundColor:t.mainHover||e.palette.action.hover}}},mainIconColor:function(t){return{color:t.mainIcon||e.palette.grey[500]}},activeMainIconColor:function(e){return{color:e.mainActiveText||"#8FC1FF"}},subListItem:function(t){return{backgroundColor:t.subItemBackground||"#FFFFFF",color:t.subItemText||e.palette.text.secondary,borderRadius:"8px","&:hover":{backgroundColor:t.subItemHover||"rgba(143,193,255,0.3)"}}},activeSubListItem:function(e){return{backgroundColor:e.subItemActiveBackground||"#FFFFFF",color:e.subItemActiveText||"#8FC1FF","&:hover":{backgroundColor:e.subItemActiveHover||"rgba(143,193,255,0.3)"}}},subItemBorder:{borderLeft:"1px solid "+e.palette.grey[600],marginLeft:"1px",marginRight:"1px",width:"100%",height:"100%"},relativeWrapper:{position:"relative"},subItemBorderMask:function(e){return{borderLeft:"3px solid "+(e.subItemActiveText||"#8FC1FF"),borderRadius:"1px",position:"absolute",top:"50%",bottom:"50%",transition:"all 0.2s ease-in-out"}},activeSubItemBorder:{top:"0 !important",bottom:"0 !important"},subItemWrapper:{display:"flex",marginLeft:"13px",marginRight:"16px"},noYMargin:{marginTop:"unset",marginBottom:"unset"}}})),qe=function(e,t){return!!e.split("/").includes(t)},Ye=function(r){var n,a,o=r.mainItem,i=r.subItems,l=r.config,c=r.Icon,s=fe(fe(fe({},Se()),ke()),Je(fe(fe({},(null===(n=l.secondary)||void 0===n?void 0:n.mainItemColors)||{}),(null===(a=l.secondary)||void 0===a?void 0:a.subItemColors)||{}))),d=U(),p=qe(d.pathname,o.id),g=t(!!(null==i?void 0:i.length)&&p),f=g[0],h=g[1];return e.createElement(e.Fragment,null,e.createElement(C,{button:!0,dense:!0,className:s.mainListItem,component:V,to:o.route},e.createElement(N,{className:s.listIcon+" "+s.mainIconMarginAdjustment+" "+s.rightSpacer1},e.createElement(c,{id:"second-nav-item",styling:s.mainIconSize+" "+s.mainIconColor+" "+(p?s.activeMainIconColor:"")})),e.createElement(k,{disableTypography:!0,className:s.noYMargin,primary:e.createElement(m,{variant:"body2",className:s.bolderText+" "+s.textOverflowElipsis,color:"inherit"},o.name,(null==i?void 0:i.length)?e.createElement(m,{component:"span",variant:"body2",className:s.bolderText,color:"inherit"}," ","(",i.length,")"):null)}),(null==i?void 0:i.length)?e.createElement(N,{className:s.listIcon,onClick:function(e){e.preventDefault(),e.stopPropagation(),h((function(e){return!e}))}},f?e.createElement(Y,null):e.createElement(X,null)):null),(null==i?void 0:i.length)?e.createElement(S,{in:f,timeout:"auto",unmountOnExit:!0},e.createElement(B,{component:"div",disablePadding:!0},i.map((function(t){var r=t.name,n=t.route,a=t.id;return e.createElement(u,{key:a,className:s.subItemWrapper},e.createElement(u,{className:s.relativeWrapper+" "+s.rightSpacer1},e.createElement(u,{className:s.subItemBorder+" "}),e.createElement(u,{className:s.subItemBorderMask+" "+(qe(d.pathname,a)?s.activeSubItemBorder:"")+" "})),e.createElement(C,{key:n,component:V,to:n,button:!0,dense:!0,className:s.subListItem+" "+(qe(d.pathname,a)?s.activeSubListItem:"")},e.createElement(k,{disableTypography:!0,primary:e.createElement(m,{variant:"body2",className:s.textOverflowElipsis,color:"inherit"},r)})))})))):null)};function Xe(e){return e.sort((function(e,t){return+t.startDate.split("T")[0].replaceAll("-","")-+e.startDate.split("T")[0].replaceAll("-","")}))}var Qe=function(e,t,r){return r?(e&&Z(e)?e:new Date(0)).getTime()===(t&&Z(t)?t:new Date(0)).getTime():e===t},$e=c((function(e){return{secondaryNavWrapper:{height:"100%",width:"300px",background:"white",overflowY:"auto",overflowX:"hidden",borderTopRightRadius:"14px",borderBottomRightRadius:"14px",marginLeft:"-16px",paddingLeft:"16px",border:"1px solid "+e.palette.grey[300],boxShadow:"0 2px 4px 0 rgba(0, 0, 0, 0.3)",boxSizing:"border-box"},titleWrapper:{marginTop:"24px",display:"flex",alignItems:"center",paddingLeft:"16px",paddingRight:"16px"},title:{fontSize:"18px",fontWeight:500,color:function(e){return e.titleColor||"#8FC1FF"}},titleIcons:{color:function(e){return e.titleIconColor||"#8FC1FF"}},closeButton:{marginLeft:"auto"},archivedSeparator:{paddingLeft:"8px",color:e.palette.grey[500]},archivedBorder:{marginTop:"3rem",border:"1px solid "+e.palette.grey[200],width:"33%",marginLeft:"8px"},listWrapper:{marginLeft:e.spacing(1),marginRight:e.spacing(1)}}})),Ze=function(t){var r,n,a,o,i=t.secondaryNavItems,l=t.primaryNavItems,c=t.expandedOptions,s=t.setExpandedOptions,d=t.config,p={titleColor:null===(r=d.secondary)||void 0===r?void 0:r.titleColor,titleIconColor:null===(n=d.secondary)||void 0===n?void 0:n.titleIconColor},g=fe(fe(fe({},ke()),Se()),$e(p)),f=J(),h=i[c.view];if(!h)return null;var v=l.find((function(e){return e.field===c.view})).Icon;return e.createElement(u,{className:g.secondaryNavWrapper},e.createElement(u,{className:g.titleWrapper},e.createElement(m,{className:g.rightSpacer1+" "+g.title},c.view),h.button?e.createElement(R,{className:g.titleIcons,size:"small",type:"button",onClick:function(){return f.push(h.button.url)}},e.createElement(ee,null)):null,e.createElement(R,{className:g.titleIcons+" "+g.closeButton,size:"small",type:"button",onClick:function(){return s({view:"",expanded:!1})}},(null===(a=d.secondary)||void 0===a?void 0:a.closeButtonSvg)||e.createElement(_,null))),e.createElement(B,{className:g.listWrapper,component:"div"},Xe(h.items).map((function(t){return e.createElement(Ye,fe({key:t.mainItem.route},t,{config:d,Icon:v}))})),(null===(o=h.archivedItems)||void 0===o?void 0:o.length)?e.createElement(e.Fragment,null,e.createElement(u,{className:g.archivedBorder+" "+g.contentBreak}),e.createElement(m,{variant:"body2",className:g.archivedSeparator+" "+g.bolderText},"Archived ",c.view),Xe(h.archivedItems).map((function(t){return e.createElement(Ye,fe({key:t.mainItem.route},t,{config:d,Icon:v}))}))):null))},_e=c((function(e){return{primaryNavContainer:function(e){return{background:e.background||"linear-gradient(to bottom, #253a68 40%, #73c4ca)",border:"2px solid "+(e.activeBorderColor||"#8FC1FF"),borderLeft:"none",borderTopRightRadius:"14px",borderBottomRightRadius:"14px",minWidth:"4.5rem",overflowY:"auto",overflowX:"hidden"}},listWrapper:{display:"flex",flexDirection:"column",paddingTop:0},itemWrapper:{display:"flex",flexDirection:"column",padding:"0.75rem 0.5rem 0.5rem 0.5rem"},itemBorder:{borderRight:function(e){return"6px solid "+(e.activeBorderColor||"#8FC1FF")},position:"absolute",bottom:"50%",top:"50%",transition:"all 0.2s ease-in-out",right:"-3px"},activeBorder:{top:"15%",bottom:"15%"},iconWrapper:{minWidth:0,marginBottom:"4px",position:"relative"},itemName:{fontSize:"0.7rem",maxWidth:"3.5rem",textAlign:"center",textOverflow:"ellipsis",overflow:"hidden"},textColour:{color:function(e){return e.text||"#FFFFFF"}},activeTextColour:{color:function(e){return e.activeText||"#8FC1FF"}},lastItem:{marginTop:"auto"}}})),et=function(t){var r=t.expandedOptions,n=t.setExpandedOptions,a=t.navigationLinks,o=t.config,i=U(),l=_e(fe({},o.primary||{})),c=function(e,t){return""===r.view?i.pathname===t||!(e===o.rootRouteName||!i.pathname.startsWith(t)):r.view===e};return e.createElement(B,{className:l.primaryNavContainer+" "+l.listWrapper},a.map((function(t,r,a){var i;return e.createElement(C,fe({key:t.field,button:!0,className:l.itemWrapper+" "+l.textColour+" "+((null===(i=o.primary)||void 0===i?void 0:i.moveLastItemToBottom)&&r===a.length-1?l.lastItem:"")},t.hasSecondary?{}:{component:V,to:t.path},{onClick:function(){n({view:t.field,expanded:!!t.hasSecondary})}}),e.createElement(N,{className:l.iconWrapper},e.createElement(t.Icon,{styling:l.textColour+" "+(c(t.field,t.path)?l.activeTextColour:"")})),e.createElement(m,{variant:"caption",className:l.itemName+" "+l.textColour+" "+(c(t.field,t.path)?l.activeTextColour:"")},t.field),e.createElement(u,{className:l.itemBorder+" "+(c(t.field,t.path)?l.activeBorder:"")}))})))},tt=c({leftNavContainer:{height:"100%",display:"flex",position:"relative",width:"max-content"}}),rt=function(r){var n=r.primaryNavItems,o=r.secondaryNavItems,i=r.config,l=t({view:"",expanded:!1}),c=l[0],s=l[1],d=tt(),m=U(),p=n.reduce((function(e,t){return t.hasSecondary?ye(ye([],e,!0),[t.field],!1):e}),[]);return a((function(){s((function(e){return p.includes(e.view)&&!0===e.expanded?e:{view:"",expanded:!1}}))}),[m.pathname]),e.createElement(u,{component:"nav",className:d.leftNavContainer},e.createElement(et,{expandedOptions:c,setExpandedOptions:s,navigationLinks:n,config:i}),c.expanded&&e.createElement(Ze,{secondaryNavItems:o,primaryNavItems:n,expandedOptions:c,setExpandedOptions:s,config:i}))},nt=c((function(e){return{remainingHeightBox:{position:"absolute",top:function(e){var t;return null!==(t=e.topOffset)&&void 0!==t?t:"4rem"},bottom:0,left:0,right:0,display:"flex"},fullHeightFlexbox:{display:"flex",height:"100%"},relativeContainer:{position:"relative"},scrollWrapper:{overflow:"auto"},componentWrapper:{padding:e.spacing(2),paddingBottom:e.spacing(2),position:"relative"}}})),at=function(t){var r=t.sideNavigation,n=t.children,a=t.desktopWidth,o=t.topOffset,i=nt({topOffset:o});return e.createElement(u,{className:i.remainingHeightBox},r?e.createElement(u,{className:i.fullHeightFlexbox+" "+i.relativeContainer},r):null,e.createElement(I,{disableGutters:!0,maxWidth:!1,className:i.scrollWrapper},e.createElement(I,{disableGutters:!0,maxWidth:a?"xl":"lg",className:i.componentWrapper},n)))},ot=function(e,t,r){void 0===r&&(r=250);var o=n(e,t);a((function(){var e=setTimeout(o,r);return function(){return clearTimeout(e)}}),[o,r])},it=function(e,t){var r=o();a((function(){r.current=e})),a((function(){if(null!==t){var e=setInterval((function(){r.current&&r.current()}),t);return function(){return clearInterval(e)}}}),[t])};function lt(e,t){var r=o(t);a((function(){var n=Object.keys(fe(fe({},r.current),t)),a={};n.forEach((function(e){r.current[e]!==t[e]&&(a[e]={from:r.current[e],to:t[e],changedKeys:t[e]&&"object"==typeof t[e]?Object.keys(r.current[e]).map((function(n){return r.current[e][n]===t[e][n]?"":n})).filter(Boolean):void 0,isDeepEqual:re(r.current[e],t[e])})})),Object.keys(a).length&&console.log("[why-did-you-update]",e,{changes:a,props:{from:r.current,to:t}}),r.current=t}),Object.values(t))}var ct=c((function(e){return{divider:{background:e.palette.primary.main,height:"0.2rem"},letterHeader:{cursor:"default",color:e.palette.primary.main,marginTop:"1rem"},listItem:{borderRadius:"14px",border:"1px solid "+e.palette.grey[300],marginBottom:"0.5rem",paddingLeft:"24px",boxShadow:e.shadows[1]},topMargin:{marginTop:e.spacing(2),display:"block"}}})),st=function(t){var r=t.array,n=t.sortFn,a=t.sortKey,o=void 0===a?"name":a,i=t.buttonClick,l=t.linkTo,c=t.ItemTemplate,s=t.arrayKey,d=void 0===s?"id":s,u=t.loadingMessage,p=void 0===u?"Loading list...":u,g=t.emptyMessage,f=void 0===g?"List is empty":g,h=t.alphabetisedHeader,v=void 0===h||h,b=fe(fe(fe({},ct()),ke()),Be());if(void 0===r)return e.createElement(Fe,{styling:b.topMargin,text:p});if(!(null==r?void 0:r.length))return e.createElement(m,{className:b.topMargin,align:"center",variant:"body2",color:"textSecondary"},f);var y=n?ye([],r,!0).sort(n):r,x="";return e.createElement(B,{className:b.limitWidth50rem},y.map((function(t,r){var n,a=!1;if(v){var s=((null===(n=t[o])||void 0===n?void 0:n[0])||"???").toLowerCase();s!==x&&(x=s,a=!0)}return e.createElement(e.Fragment,{key:t[d]||"alphabetical-list-"+r},v&&a?e.createElement(e.Fragment,null,e.createElement(m,{className:""+b.letterHeader,align:"left"},x.toUpperCase()),e.createElement(T,{className:b.contentBreak+" "+b.divider})):null,e.createElement(C,fe({className:b.listItem,alignItems:"flex-start",button:!(!i&&!l)||void 0,onClick:i?function(){return i(t)}:void 0},l&&!i?{component:V,to:l(t)}:{}),e.createElement(c,{item:t})))})))},dt=c((function(e){return{searchBox:{display:"flex",alignContent:"center",alignItems:"center",padding:"8px",border:"2px solid "+e.palette.grey[300],borderRadius:"14px"},searchField:{borderRadius:"14px",width:"100%",background:function(e){return e.background||"RGBA(179, 213, 235, 0.1)"},height:"46px",paddingLeft:"24px",color:e.palette.grey[600]},searchIcon:{color:e.palette.grey[600]}}})),mt=function(r){var n=r.array,o=r.sortFn,i=r.sortKey,l=void 0===i?"name":i,c=r.buttonClick,s=r.linkTo,d=r.ItemTemplate,m=r.arrayKey,p=void 0===m?"id":m,g=r.loadingMessage,f=void 0===g?"Loading list...":g,h=r.emptyMessage,v=void 0===h?"List is empty":h,b=r.inputBackgroundColor,y=r.placeholder,x=r.disabledSearch,E=r.delay,w=void 0===E?500:E,C=r.minQueryLength,N=void 0===C?3:C,k=r.handleOnChange,S=r.searchKeys,B=void 0===S?["name"]:S,R=r.alphabetisedHeader,I=void 0===R||R,T=fe(fe(fe({},ke()),Be()),dt({background:b})),A=t(""),W=A[0],P=A[1],D=t(!1),O=D[0],M=D[1],j=t(n),z=j[0],H=j[1];return ot((function(){!O&&W.length>=N&&(k?k(W):H(null==n?void 0:n.filter((function(e){var t=B.some((function(t){var r;return null===(r=e[t])||void 0===r?void 0:r.toLowerCase().includes(W.toLowerCase())}));return t}))))}),[W],w),a((function(){H(n)}),[n]),e.createElement(e.Fragment,null,e.createElement(u,{className:T.searchBox+" "+T.limitWidth50rem},e.createElement(L,{disabled:x,type:"text",value:W,placeholder:y||"Enter to search",onChange:function(e){O&&M(!1),P(e.target.value)},className:T.searchField,endAdornment:e.createElement(F,{position:"end",className:T.rightSpacer2},e.createElement(te,{className:T.searchIcon}))})),null!==n&&e.createElement(st,{array:z,sortFn:o,sortKey:l,buttonClick:c,linkTo:s,ItemTemplate:d,arrayKey:p,loadingMessage:f,emptyMessage:v,alphabetisedHeader:I}))},ut=c((function(e){return{inputField:function(t){var r=t.size;return fe({borderRadius:"14px"},"small"===r?e.typography.body2:{})},labelStyles:function(t){var r=t.size;return fe({},"small"===r?fe(fe({transform:"translate(14px, 9px) scale(1) !important"},e.typography.body2),{"&.MuiInputLabel-outlined.MuiInputLabel-shrink":{transform:"translate(15px, -9px) scale(0.75) !important"}}):{})}}})),pt=function(t){var r=t.size,n=void 0===r?"small":r,a=t.styling,o=t.numberField,i=t.inputProps,l=void 0===i?{}:i,c=t.InputProps,s=void 0===c?{}:c,d=t.accessLevel,m=t.disabled,u=t.fixedDecimalScale,p=he(t,["size","styling","numberField","inputProps","InputProps","accessLevel","disabled","fixedDecimalScale"]),g=ut({size:n});if(d===Ne)return null;var f=m;d===Ce&&(f=!0);var h=fe({},o&&{fixedDecimalScale:!!u});return e.createElement(A,fe({className:a||"",disabled:f},p,{inputProps:fe(fe({},l),h),InputProps:fe(fe({},s),{className:g.inputField,inputComponent:o?gt:void 0}),InputLabelProps:{className:g.labelStyles},variant:"outlined",size:n}))},gt=function(t){var r=t.inputRef,n=t.onChange,a=he(t,["inputRef","onChange"]);return e.createElement(ne,fe({},a,{getInputRef:r,onValueChange:function(e){n({target:{name:t.name||"",value:e.value}})},thousandSeparator:!0,decimalScale:2,isNumericString:!0}))},ft=c((function(e){return{listItem:function(t){var r=t.background,n=t.size;return fe(fe({overflow:"auto",scrollbarWidth:"thin"},"small"===n?e.typography.body2:{}),{"&:hover":{backgroundColor:r+" !important"}})},inputStyles:function(t){var r=t.background,n=t.size;return fe(fe({borderRadius:"14px !important"},"small"===n?fe({paddingTop:"9.5px",paddingBottom:"8.5px"},e.typography.body2):{}),{"&:focus":{backgroundColor:r}})},selectedListItem:function(e){return{"&:focus":{background:e.background+" !important"}}}}})),ht=function(t){var r=t.selectOptions,n=t.background,a=void 0===n?"#EFEDFF":n,o=t.size,i=void 0===o?"small":o,l=t.styling,c=t.disabled,s=t.accessLevel,d=he(t,["selectOptions","background","size","styling","disabled","accessLevel"]),m=ft({background:a,size:i});if(s===Ne)return null;var u=c;return s===Ce&&(u=!0),e.createElement(pt,fe({className:l||""},d,{disabled:u,size:i,SelectProps:{inputProps:{className:m.inputStyles}},select:!0}),r.map((function(t){return e.createElement(W,{key:t.value,value:t.value,className:m.listItem,classes:{selected:m.selectedListItem}},t.description)})))},vt=function(t){var r=t.styling,n=t.format,a=void 0===n?"dd MMM yyyy":n,o=t.minDate,i=void 0===o?new Date("1856-09-25"):o,l=t.accessLevel,c=t.disabled,s=he(t,["styling","format","minDate","accessLevel","disabled"]);if(l===Ne)return null;var d=c;return l===Ce&&(d=!0),e.createElement(ae,{utils:le},e.createElement(oe,fe({className:r||""},s,{disabled:d,inputVariant:"outlined",autoOk:!0,format:a,minDate:i,TextFieldComponent:pt})))},bt=function(t){var r=t.styling,n=t.format,a=void 0===n?"dd/MM/yyyy":n,o=t.minDate,i=void 0===o?new Date("1856-09-25"):o,l=t.accessLevel,c=t.disabled,s=he(t,["styling","format","minDate","accessLevel","disabled"]);if(l===Ne)return null;var d=c;return l===Ce&&(d=!0),e.createElement(ae,{utils:le},e.createElement(ie,fe({className:r||""},s,{disabled:d,inputVariant:"outlined",autoOk:!0,allowKeyboardControl:!0,format:a,minDate:i,TextFieldComponent:pt})))},yt=c((function(e){return{confirmWrapper:{display:"inline-block"},confirmContainer:{display:"flex",alignItems:"center"},whiteText:{color:e.palette.common.white}}})),xt=function(r){var n=r.children,o=r.onClick,i=r.styling,l=r.disabled,c=void 0!==l&&l,s=r.variant,d=void 0===s?"outlined":s,p=r.color,g=void 0===p?"primary":p,f=r.accessLevel,h=void 0===f?"":f,v=he(r,["children","onClick","styling","disabled","variant","color","accessLevel"]),b=fe(fe({},ke()),yt()),y=t(!1),x=y[0],E=y[1],w=t(!1),C=w[0],N=w[1];return it((function(){return E(!1)}),!x||C?null:4500),a((function(){N(v.loading),E(v.loading)}),[v.loading]),[Ne,Ce].includes(h)?null:x?e.createElement(u,{className:b.confirmWrapper},e.createElement(u,{className:b.confirmContainer},e.createElement(m,{className:b.rightSpacer1,variant:"body1"},"Are you sure?"),e.createElement(Ie,fe({},v,{type:"button",onClick:function(e){N(!0),o(e)},variant:"contained",styling:b.whiteText,disabled:c,color:g}),"Confirm",v.loading?"ing":""))):e.createElement(Ie,{type:"button",variant:d,disabled:c,styling:i,color:g,onClick:function(){return E(!0)}},n)},Et=function(e,t){var r=e.toString().length;return r?r+(t?3:1)+Math.floor(r/3)/3+"ch":"6ch"},wt=c((function(e){return{inputBase:function(e){return{height:"unset",padding:0,textAlign:e.textAlign||"center"}},input:function(e){return{textAlign:e.textAlign||"center",marginRight:"0.4rem",marginLeft:"0.4rem"}},startAdornment:{color:e.palette.text.secondary},modifiedUnderline:{"&:not(.Mui-disabled):before":{borderBottom:"none",transition:"none"},"&:hover:not(.Mui-disabled):before":{borderBottom:"1px solid "+e.palette.grey[500]+" !important"}},body2Text:fe({},e.typography.body2),dateFieldWidth:{width:"8ch"},fullDateWidth:{width:"11ch"},justifyStart:{justifyContent:"flex-start"},justifyCenter:{justifyContent:"center"},justifyEnd:{justifyContent:"flex-end"},totalContainer:{display:"flex",alignItems:"center",cursor:"default"},selectFocusBackground:{"&:focus":{backgroundColor:"unset"}}}})),Ct=function(t){var r=t.error,n=t.disabled,a=t.value,o=t.onBlur,i=t.onChange,l=t.prefix,c=t.suffix,s=t.numberField,d=void 0!==s&&s,u=t.textAlign,p=t.fixedDecimalScale,g=wt({textAlign:u}),f=fe({},d&&{fixedDecimalScale:!!p});return"string"==typeof a||"number"==typeof a?e.createElement(A,{error:!!r,inputProps:fe({className:g.inputBase,style:{width:Et(a,!!p)}},f),value:a,onChange:i,onBlur:o,InputProps:{startAdornment:l?e.createElement(F,{position:"end",className:g.startAdornment},l):null,endAdornment:c?e.createElement(F,{position:"start",className:g.startAdornment},c):null,inputComponent:d?gt:void 0,className:g.body2Text+" "+g.modifiedUnderline,classes:{input:g.input}},helperText:r||void 0,disabled:n}):e.createElement(m,{variant:"body2"},"Incorrect value type")},Nt=function(t){return e.createElement(Ct,fe({},fe(fe({},t),{numberField:!0})))},kt=function(t){return e.createElement(Ct,fe({},fe(fe({},t),{numberField:!0,fixedDecimalScale:!0})))},St=p(g({root:{padding:"3px"}}))(P),Bt=function(t){var r=t.disabled,n=t.fullDate,a=void 0!==n&&n,o=t.value,i=t.error,l=t.onChange,c=t.onBlur,s=t.textAlign,d=wt({textAlign:s});return e.createElement(ae,{utils:le},e.createElement(oe,{disabled:r,views:a?void 0:["year","month"],value:o,autoOk:!0,format:a?"dd MMM yyyy":"MMM yyyy",InputProps:{className:d.body2Text+" "+d.modifiedUnderline},inputProps:{className:d.inputBase+" "+(a?d.fullDateWidth:d.dateFieldWidth),classes:{input:d.input}},error:!!i,helperText:i||void 0,onChange:l,onBlur:c}))},Rt=function(t){return e.createElement(Bt,fe({},t))},It=function(t){return e.createElement(Bt,fe({},t,{fullDate:!0}))},Tt=function(t){var r=t.value,n=t.disabled,a=t.onChange;return e.createElement(P,{disabled:n,checked:r,onChange:a,color:"primary",size:"small"})},Lt=function(t){return e.createElement(Tt,fe({},t))},Ft=function(t){var r=t.text,n=t.numberField,a=void 0!==n&&n,o=t.prefix,i=void 0===o?null:o,l=t.suffix,c=void 0===l?null:l,s=t.textAlign,d=t.fixedDecimalScale,m=wt({});return e.createElement(u,{className:m.totalContainer+" "+m.body2Text+" "+("left"===s?m.justifyStart:"right"===s?m.justifyEnd:m.justifyCenter)},i&&i,e.createElement(u,{className:m.body2Text},a?e.createElement(ne,{value:r,displayType:"text",thousandSeparator:!0,isNumericString:!0,decimalScale:2,fixedDecimalScale:d}):r),c&&c)},At=function(t){var r=t.error,n=t.value,a=t.onBlur,o=t.onChange,i=t.selectOptions,l=t.disabled,c=wt({});return e.createElement(D,{margin:"none",error:!!r},e.createElement(O,{className:c.body2Text+" "+c.modifiedUnderline,inputProps:{className:c.selectFocusBackground},value:n,onChange:o,onBlur:a,disabled:l},Object.entries(i).map((function(t){var r=t[0],n=t[1];return e.createElement(W,{className:c.body2Text,key:r,value:r},n)}))),r&&e.createElement(M,null,r))},Wt=function(t){var r=t.error,n=t.value,a=t.onBlur,o=t.onChange,i=t.selectOptions,l=t.disabled,c=t.renderValue,s=wt({});return e.createElement(D,{margin:"none",error:!!r},e.createElement(O,{className:s.body2Text+" "+s.modifiedUnderline,inputProps:{className:s.selectFocusBackground},value:n,onChange:o,onBlur:a,disabled:l,renderValue:c,multiple:!0},Object.entries(i).map((function(t){var r=t[0],n=t[1];return e.createElement(W,{className:s.body2Text,key:r,value:r},n)}))),r&&e.createElement(M,null,r))},Pt=c((function(e){return{newRowHighlight:{backgroundColor:"#73c4ca30"},editedCellHighlight:{backgroundColor:"#5840f52e",backgroundClip:"padding-box"},editedBorder:{border:"3px solid #5840f52e",borderWidth:"2px 4px"},errorBorder:{border:"3px solid "+e.palette.error.light,borderWidth:"2px 4px"},emptyLoadingPadding:{paddingTop:"0.75rem",paddingBottom:"0.75rem"},centeredText:{textAlign:"center"},disabled:{backgroundColor:e.palette.action.hover},pagination:{marginTop:"1rem",marginBottom:"1rem"},virtualisationContainer:{maxHeight:"500px",overflow:"auto"}}})),Dt=function(r){var n=r.value,o=void 0===n?"":n,i=r.row,l=i.index,c=i.values,s=i.original,d=r.column.id,m=r.syncCellWithState,u=r.setRows,p=r.fieldConfig,g=r.disabled,f=p[d],h=f.validationRule,v=f.dependentValidationRule,b=f.isCheckbox,y=f.isDateField,x=f.customRenderFn,E=f.prefix,w=f.suffix,C=f.textAlign,N=f.onBlur,k=f.onChangeValueModifier,S=t(!1),B=S[0],R=S[1],I=t(o),T=I[0],L=I[1],F=b,A=function(e){var t=!1;if(h)try{h.validateSync(e),B&&R(!1)}catch(e){t=!0,!B&&R(e.message)}if(v)try{v(c).validateSync(e),B&&R(!1)}catch(e){t=!0,!B&&R(e.message)}return t},W=function(e){return ve(void 0,void 0,void 0,(function(){return be(this,(function(t){switch(t.label){case 0:return F?m(l,d,e,!1):m(l,d,T,!!B),!N||!u||B||Qe(c[d],T,y)?[3,2]:[4,N({rowIndex:l,value:T,setRows:u,values:s})];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))};a((function(){L(o);var e=A(o);B!==e&&m(l,d,o,e,!0)}),[o]),a((function(){s.errors&&!!s.errors[d]!=!!B&&A(o)}),[s.errors]);var P,D={value:T,values:c,disabled:g||s.disabledRow,error:B,onChange:function(e){var t;if(y){t=e;var r=k?k(t):t;return L(r),void A(r)}t=e;var n=F?t.target.checked:t.target.value;F?(L(n),W(n)):(L(n),A(n))},onBlur:W,prefix:E,suffix:w,textAlign:C,originalValues:s};return x?x(D):(P=D,e.createElement(Ct,fe({},fe({},P))))},Ot=function(t){var r=t.row,n=t.classes,a=t.disabled,o=t.includeRowSelect;return e.createElement(f,{hover:!0,className:("NEW"===r.original.rowStatus?n.newRowHighlight:"")+" "+("EDITED"===r.original.rowStatus?n.editedBorder:"")+"\n"+(r.original.hasOwnProperty("errors")&&Object.values(r.original.errors).includes(!0)?n.errorBorder:"")+" "+(r.original.disabledRow||a?n.disabled:"")},r.cells.map((function(t,r){return e.createElement(y,fe({},t.getCellProps(),{align:t.column.textAlign||"center",className:"EDITED"===t.row.original.rowStatus&&t.row.original.edited[t.column.id]?n.editedCellHighlight:"",padding:0===(o&&r)?"checkbox":"normal"}),t.render("Cell"))})))},Mt=[],jt=i((function(t){var r=t.tableRows,o=t.tableHeaders,i=t.syncCellWithState,l=t.setRows,c=void 0===l?void 0:l,s=t.skipPageReset,d=void 0!==s&&s,p=t.fieldConfig,g=t.disabled,f=void 0!==g&&g,h=t.setSelectedRows,v=t.includeRowSelect,b=void 0===v||v,y=t.filterData,x=t.filterTypes,E=t.emptyTableText,w=void 0===E?"Table is empty":E,C=t.paginate,N=void 0!==C&&C,k=t.defaultPageSize,S=void 0===k?50:k,B=t.virtContainerStyling,R=t.overscan,I=t.rowHeight,T=t.includeGlobalSearch,L=fe(fe({},Pt()),Be()),F=e.useRef(null),A=e.useMemo((function(){return{Cell:Dt}}),[]),W=ce({columns:o,data:r||Mt,defaultColumn:A,autoResetPage:!!N&&!d,filterTypes:x,initialState:{pageSize:N?S:void 0},syncCellWithState:i,setRows:c,fieldConfig:p,disabled:f,autoResetGlobalFilter:!1},se,de,me,ue,(function(t){b&&t.visibleColumns.push((function(t){return ye([{id:"selection",Header:function(t){var r=t.getToggleAllRowsSelectedProps,n=t.getToggleAllPageRowsSelectedProps;return e.createElement(St,fe({},N?n():r(),{disabled:f,size:"small"}))},Cell:function(t){var r=t.row;return e.createElement(St,fe({},r.getToggleRowSelectedProps(),{disabled:f||r.original.disableSelection,size:"small"}))}}],t,!0)}))})),P=W.getTableProps,D=W.getTableBodyProps,O=W.headerGroups,M=W.rows,j=W.page,z=W.prepareRow,H=W.state,K=H.selectedRowIds,V=H.pageIndex,U=W.state,J=W.setFilter,q=W.pageCount,Y=W.gotoPage,X=W.preGlobalFilteredRows,Q=W.setGlobalFilter,$=W.isAllRowsSelected,Z=W.selectedFlatRows,_=ge({size:(N?j:M).length,parentRef:F,overscan:R||5,estimateSize:n((function(){return I||54}),[I])}),ee=N?j:M,te=_.virtualItems,re=te.length>0?te[0].start:0,ne=te.length>0?_.totalSize-te[te.length-1].end:0,ae=n((function(e,t){Y(t-1)}),[]);return a((function(){y&&J(y.filterRow,y.filterValues)}),[y]),a((function(){h&&h(Object.keys(K).map((function(e){return+e})))}),[K]),e.createElement(e.Fragment,null,T?e.createElement(Ht,{preGlobalFilteredRows:X,globalFilter:U.globalFilter,setGlobalFilter:Q}):null,e.createElement("div",{ref:F,className:B||L.virtualisationContainer},e.createElement(Gt,fe({},{disabled:f,includeRowSelect:b,getTableProps:P,headerGroups:O,getTableBodyProps:D,rowsToRender:ee,prepareRow:z,paddingTop:re,paddingBottom:ne,virtualRows:te,isAllRowsSelected:$,selectedFlatRows:Z}))),null===r?e.createElement(u,{className:L.emptyLoadingPadding},e.createElement(Fe,null)):null,r&&!r.length?e.createElement(u,{className:L.emptyLoadingPadding+" "+L.centeredText},e.createElement(m,{variant:"body2"},w)):null,N&&(null==r?void 0:r.length)?e.createElement(G,{className:L.flexCenter+" "+L.pagination,count:q,page:V+1,onChange:ae,shape:"rounded",showFirstButton:!0,showLastButton:!0}):null)})),zt=c((function(e){return{container:{display:"flex",justifyContent:"center",alignItems:"center",border:"1px solid "+e.palette.grey[600],borderRadius:"8px",width:"100%",maxWidth:"20rem",marginInline:"auto",color:e.palette.grey[600],"&:hover":{borderColor:e.palette.grey[800],color:e.palette.grey[800]},"&:focus-within":{borderColor:e.palette.grey[800],color:e.palette.grey[800]}},input:fe({width:"100%",maxWidth:"18rem",color:"inherit"},e.typography.body2)}})),Ht=i((function(r){var n=r.preGlobalFilteredRows,a=r.globalFilter,o=r.setGlobalFilter,i=t(a),l=i[0],c=i[1],s=fe(fe({},ke()),zt()),d=pe((function(e){o(e||void 0)}),200),m=n.length;return e.createElement("div",{className:s.container+" "+s.contentBreak},e.createElement(te,{className:s.rightSpacer1+" "+s.leftSpacer1}),e.createElement(L,{className:""+s.input,value:l||"",onChange:function(e){c(e.target.value),d(e.target.value)},placeholder:"Search "+m+" records...",inputProps:{"aria-label":"search"}}))})),Gt=i((function(t){var r=t.disabled,n=t.includeRowSelect,a=t.getTableProps,o=t.headerGroups,i=t.getTableBodyProps,l=t.rowsToRender,c=t.prepareRow,s=t.paddingTop,d=t.paddingBottom,m=t.virtualRows,u=t.isAllRowsSelected,p=t.selectedFlatRows;return e.createElement(h,fe({},a(),{stickyHeader:!0,style:{borderCollapse:"collapse"}}),e.createElement(Kt,{headerGroups:o,includeRowSelect:n,isAllRowsSelected:u}),e.createElement(b,fe({},i()),s>0&&e.createElement("tr",null,e.createElement("td",{style:{height:s+"px"}})),e.createElement(Vt,fe({},{disabled:r,includeRowSelect:n,rowsToRender:l,prepareRow:c,virtualRows:m,selectedFlatRows:p})),d>0&&e.createElement("tr",null,e.createElement("td",{style:{height:d+"px"}}))))})),Kt=i((function(t){var r=t.headerGroups,n=t.includeRowSelect;return t.isAllRowsSelected,e.createElement(v,null,r.map((function(t){return e.createElement(f,fe({},t.getHeaderGroupProps()),t.headers.map((function(t,r){return e.createElement(y,fe({},t.getHeaderProps(),{align:t.textAlign||"center",padding:0===(n&&r)?"checkbox":"normal"}),t.render("Header"))})))})))})),Vt=i((function(t){var r=t.rowsToRender,n=t.virtualRows,a=t.prepareRow,o=he(t,["rowsToRender","virtualRows","prepareRow"]),i=fe(fe({},Pt()),Be());return e.createElement(e.Fragment,null,n.map((function(t){var n=r[t.index];return a(n),console.log({profilesId:n.original.profileId,disabledRow:n.original.disabledRow,tooltipText:n.original.tooltipText}),e.createElement(l,{key:n.original.rowKey||n.getRowProps().key},n.original.disabledRow?e.createElement(j,{title:n.original.tooltipText||"This row is disabled",arrow:!0},e.createElement(Ot,fe({},fe(fe({},o),{row:n,classes:i})))):e.createElement(Ot,fe({},fe(fe({},o),{row:n,classes:i}))))})))})),Ut=c((function(e){return{alertStyling:{borderRadius:"14px"},closeButton:{color:e.palette.text.secondary,marginRight:e.spacing(2)},showCursor:{cursor:"pointer"}}})),Jt=function(t){var r=t.alertActionHandler,n=t.formStatus,a=t.actionButton,o=t.alertMessage,i=t.addBreak,l=void 0===i||i,c=t.styling,d=fe(fe({},ke()),Ut());return e.createElement(S,{in:[xe,Ee,we].includes(n)},e.createElement(K,{onClick:r,className:d.alertStyling+" "+(l?d.sectionBreak:"")+" "+(c||"")+" "+(r?d.showCursor:""),severity:n===Ee?Ee:n===xe?xe:we,action:a?e.createElement(s,{className:d.closeButton,"aria-label":"close",color:"inherit",size:"small",onClick:function(e){e.stopPropagation(),a.handler()}},a.text):null},o))},qt=c((function(e){return{greyBox:{backgroundColor:e.palette.grey[200],display:"flex",justifyContent:"center",alignItems:"center",padding:"1.5rem",borderRadius:"14px",position:"relative",height:"13.25rem"},widthLimiter:{width:"100%",maxWidth:"28rem",marginLeft:"auto",marginRight:"auto"},hiddenInput:{display:"none"},buttonColor:{backgroundColor:e.palette.primary.main},iconStyling:{color:e.palette.common.white,fontSize:"3rem"},sectionBreak:{marginBottom:e.spacing(3)},dropBox:{height:"100%",width:"100%",display:"flex",justifyContent:"center",alignItems:"center"},dropArrowStyling:{color:e.palette.text.secondary,fontSize:"3rem"},topLeftArrow:{position:"absolute",top:0,left:0,transform:"rotate(45deg)"},topRightArrow:{position:"absolute",top:0,right:0,transform:"rotate(135deg)"},bottomLeftArrow:{position:"absolute",bottom:0,left:0,transform:"rotate(-45deg)"},bottomRightArrow:{position:"absolute",bottom:0,right:0,transform:"rotate(225deg)"},hiddenDisplay:{display:"none"},loadingCircle:{marginLeft:e.spacing(1)},roundedAvatarButton:{borderRadius:"100%"},roundedAvatar:{width:"16vmax",height:"16vmax",maxWidth:"13rem",maxHeight:"13rem"},organisationImage:{maxWidth:"8rem",minWidth:"5rem",maxHeight:"8rem"}}})),Yt=function(r){var n=r.id,o=void 0===n?"image-upload":n,i=r.url,l=r.roundedAvatar,c=void 0!==l&&l,p=r.handleSaveImage,g=r.alt,f=r.accessLevel,h=fe(fe({},qt()),ke()),v=t(!!i),b=v[0],y=v[1],x=t("enabled"),E=x[0],w=x[1],C=t(null),N=C[0],k=C[1];if(a((function(){i&&y(!0)}),[i]),f===Ne)return null;var S=!1;f===Ce&&(S=!0);var B,I=function(e,t){return ve(void 0,void 0,void 0,(function(){var r,n;return be(this,(function(a){switch(a.label){case 0:return S?[2]:(k(null),"input"!==e?[3,4]:(r=t.target).files&&r.files[0]?[4,T(r.files[0])]:[3,2]);case 1:return a.sent(),[3,3];case 2:w(Ee),y(!!i),a.label=3;case 3:return[3,7];case 4:return"dragDrop"!==e?[3,7]:(n=t.dataTransfer).files&&n.files[0]?[4,T(n.files[0])]:[3,6];case 5:return a.sent(),[3,7];case 6:w(Ee),y(!!i),a.label=7;case 7:return[2]}}))}))},T=function(e){return ve(void 0,void 0,void 0,(function(){var t,r,n;return be(this,(function(a){switch(a.label){case 0:return w("loading"),e.size>=524288?(k("Image size should be less than 0.5MB"),w(Ee),y(!!i),[2]):(t=e.name.split(".")[1].toLowerCase(),["png","jpg","jpeg"].includes(t)?[4,e.arrayBuffer()]:(k("Please provide an image in png, jpg or jpeg format"),w(Ee),y(!!i),[2]));case 1:r=a.sent(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,p(t,r,e)];case 3:return a.sent(),w(xe),y(!0),[3,5];case 4:return n=a.sent(),console.log(n),w(Ee),y(!!i),[3,5];case 5:return[2]}}))}))};switch(E){case"dragEnter":B=e.createElement(u,{className:h.dropBox,style:{pointerEvents:"none"}},e.createElement($,{className:h.dropArrowStyling+" "+h.topLeftArrow}),e.createElement($,{className:h.dropArrowStyling+" "+h.topRightArrow}),e.createElement(m,{variant:"h5",color:"textSecondary"},"Drop Here"),e.createElement($,{className:h.dropArrowStyling+" "+h.bottomLeftArrow}),e.createElement($,{className:h.dropArrowStyling+" "+h.bottomRightArrow}));break;case"loading":B=e.createElement(u,{className:h.dropBox},e.createElement(m,{color:"textSecondary"},"Loading..."),e.createElement(d,{className:h.loadingCircle,size:25}));break;default:B=e.createElement("label",{htmlFor:o},e.createElement(R,{className:h.buttonColor+" "+h.sectionBreak,"aria-label":"upload picture",component:"span"},e.createElement(Q,{className:h.iconStyling})),e.createElement(m,{variant:"body2",color:"textSecondary"},"Drag and drop or browse to upload your image or logo."))}return e.createElement(u,{className:h.labelBreak,onDragEnter:function(e){S||(e.preventDefault(),e.stopPropagation(),y(!1))},onDragOver:function(e){S||(e.preventDefault(),e.stopPropagation(),y(!1))}},b&&e.createElement(u,{className:h.labelBreak},e.createElement("label",{htmlFor:o},e.createElement(s,{className:""+(c?h.roundedAvatarButton:""),"aria-label":"upload picture",component:"span"},c?e.createElement(z,{className:h.roundedAvatar,src:i,alt:g||"Profile Avatar"}):e.createElement("img",{className:h.organisationImage,src:i,alt:g||"Company Logo"})))),e.createElement(u,{className:h.greyBox+" "+h.widthLimiter+" "+h.sectionBreak+" "+(b?h.hiddenDisplay:""),onDragEnter:function(e){S||(e.preventDefault(),e.stopPropagation(),w("dragEnter"))},onDragLeave:function(e){S||(e.preventDefault(),e.stopPropagation(),w("enabled"),y(!!i))},onDragOver:function(e){S||(e.preventDefault(),e.stopPropagation(),w("dragEnter"))},onDrop:function(e){S||(e.preventDefault(),e.stopPropagation(),I("dragDrop",e))}},e.createElement("input",{id:o,className:h.hiddenInput,type:"file",accept:".png, .jpg, .jpeg",disabled:S,onChange:function(e){return I("input",e)}}),B),e.createElement(u,{className:h.widthLimiter},e.createElement(Jt,{formStatus:E,alertMessage:N||(E===xe?"Uploaded successfully!":"Something went wrong.")})))};export{Jt as Alert,st as AlphabeticalList,Ge as Breadcrumbs,Ie as Button,xt as ButtonWithConfirm,Le as ContentBox,Te as ContentLabel,vt as DatePicker,jt as EditableTable,Ve as EntityList,Ue as ErrorIndicator,Yt as ImageDisplayAndUpload,bt as KeyboardDatePicker,rt as LeftNavigation,Fe as LoadingSpinner,at as MainLayout,Ft as NonEditableField,gt as NumberFormatField,mt as SearchBar,ht as Select,ze as StaticTable,Bt as TableDatePicker,Wt as TableMultipleSelect,At as TableSelect,Ct as TableTextField,pt as TextField,Qe as didCellValueChange,Lt as tableCheckbox,Rt as tableDateField,It as tableInvoiceDateField,Nt as tableNumericStringField,kt as tableNumericStringFixedDecimalField,ot as useDebounceEffect,it as useInterval,lt as useWhyDidYouUpdate};
2
2
  //# sourceMappingURL=index.js.map