@pautena/react-design-system 0.4.8 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/alerts/expandable-alert/expandable-alert.d.ts +11 -0
- package/dist/cjs/types/components/alerts/expandable-alert/index.d.ts +1 -0
- package/dist/cjs/types/components/alerts/index.d.ts +1 -0
- package/dist/cjs/types/components/data-display/board/board.d.ts +10 -0
- package/dist/cjs/types/components/data-display/board/index.d.ts +1 -0
- package/dist/cjs/types/components/data-display/index.d.ts +2 -0
- package/dist/cjs/types/components/data-display/markdown/index.d.ts +1 -0
- package/dist/cjs/types/components/data-display/markdown/markdown.d.ts +7 -0
- package/dist/cjs/types/components/dialogs/bootstrap-dialog/bootstrap-dialog.d.ts +2 -0
- package/dist/cjs/types/components/dialogs/bootstrap-dialog/index.d.ts +1 -0
- package/dist/cjs/types/components/dialogs/confirm-dialog/confirm-dialog.d.ts +10 -0
- package/dist/cjs/types/components/dialogs/confirm-dialog/index.d.ts +1 -0
- package/dist/cjs/types/components/dialogs/dialog-hooks/index.d.ts +1 -0
- package/dist/cjs/types/components/dialogs/dialog-hooks/use-dialog.d.ts +7 -0
- package/dist/cjs/types/components/dialogs/dialog.types.d.ts +26 -0
- package/dist/cjs/types/components/dialogs/form-dialog/form-dialog.d.ts +10 -0
- package/dist/cjs/types/components/dialogs/form-dialog/index.d.ts +1 -0
- package/dist/cjs/types/components/dialogs/index.d.ts +5 -0
- package/dist/cjs/types/components/index.d.ts +2 -0
- package/dist/cjs/types/components/inputs/enhanced-autocomplete/enhanced-autocomplete.d.ts +10 -0
- package/dist/cjs/types/components/inputs/enhanced-autocomplete/index.d.ts +1 -0
- package/dist/cjs/types/components/inputs/enhanced-text-field/enhanced-text-field.d.ts +7 -0
- package/dist/cjs/types/components/inputs/enhanced-text-field/index.d.ts +1 -0
- package/dist/cjs/types/components/inputs/index.d.ts +1 -0
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/alerts/expandable-alert/expandable-alert.d.ts +11 -0
- package/dist/esm/types/components/alerts/expandable-alert/index.d.ts +1 -0
- package/dist/esm/types/components/alerts/index.d.ts +1 -0
- package/dist/esm/types/components/data-display/board/board.d.ts +10 -0
- package/dist/esm/types/components/data-display/board/index.d.ts +1 -0
- package/dist/esm/types/components/data-display/index.d.ts +2 -0
- package/dist/esm/types/components/data-display/markdown/index.d.ts +1 -0
- package/dist/esm/types/components/data-display/markdown/markdown.d.ts +7 -0
- package/dist/esm/types/components/dialogs/bootstrap-dialog/bootstrap-dialog.d.ts +2 -0
- package/dist/esm/types/components/dialogs/bootstrap-dialog/index.d.ts +1 -0
- package/dist/esm/types/components/dialogs/confirm-dialog/confirm-dialog.d.ts +10 -0
- package/dist/esm/types/components/dialogs/confirm-dialog/index.d.ts +1 -0
- package/dist/esm/types/components/dialogs/dialog-hooks/index.d.ts +1 -0
- package/dist/esm/types/components/dialogs/dialog-hooks/use-dialog.d.ts +7 -0
- package/dist/esm/types/components/dialogs/dialog.types.d.ts +26 -0
- package/dist/esm/types/components/dialogs/form-dialog/form-dialog.d.ts +10 -0
- package/dist/esm/types/components/dialogs/form-dialog/index.d.ts +1 -0
- package/dist/esm/types/components/dialogs/index.d.ts +5 -0
- package/dist/esm/types/components/index.d.ts +2 -0
- package/dist/esm/types/components/inputs/enhanced-autocomplete/enhanced-autocomplete.d.ts +10 -0
- package/dist/esm/types/components/inputs/enhanced-autocomplete/index.d.ts +1 -0
- package/dist/esm/types/components/inputs/enhanced-text-field/enhanced-text-field.d.ts +7 -0
- package/dist/esm/types/components/inputs/enhanced-text-field/index.d.ts +1 -0
- package/dist/esm/types/components/inputs/index.d.ts +1 -0
- package/dist/index.d.ts +95 -6
- package/package.json +34 -32
- package/src/components/alerts/alerts.stories.mdx +10 -0
- package/src/components/alerts/expandable-alert/expandable-alert.stories.tsx +48 -0
- package/src/components/alerts/expandable-alert/expandable-alert.test.tsx +114 -0
- package/src/components/alerts/expandable-alert/expandable-alert.tsx +71 -0
- package/src/components/alerts/expandable-alert/index.ts +1 -0
- package/src/components/alerts/index.ts +1 -0
- package/src/components/components.stories.mdx +2 -0
- package/src/components/data-display/board/board.stories.tsx +54 -0
- package/src/components/data-display/board/board.test.tsx +100 -0
- package/src/components/data-display/board/board.tsx +63 -0
- package/src/components/data-display/board/index.ts +1 -0
- package/src/components/data-display/data-display.stories.mdx +2 -0
- package/src/components/data-display/index.ts +2 -0
- package/src/components/data-display/markdown/index.ts +1 -0
- package/src/components/data-display/markdown/markdown.stories.tsx +25 -0
- package/src/components/data-display/markdown/markdown.test.tsx +64 -0
- package/src/components/data-display/markdown/markdown.tsx +38 -0
- package/src/components/dialogs/bootstrap-dialog/bootstrap-dialog.stories.tsx +81 -0
- package/src/components/dialogs/bootstrap-dialog/bootstrap-dialog.test.tsx +233 -0
- package/src/components/dialogs/bootstrap-dialog/bootstrap-dialog.tsx +95 -0
- package/src/components/dialogs/bootstrap-dialog/index.ts +1 -0
- package/src/components/dialogs/confirm-dialog/confirm-dialog.stories.tsx +43 -0
- package/src/components/dialogs/confirm-dialog/confirm-dialog.test.tsx +150 -0
- package/src/components/dialogs/confirm-dialog/confirm-dialog.tsx +51 -0
- package/src/components/dialogs/confirm-dialog/index.ts +1 -0
- package/src/components/dialogs/dialog-hooks/index.ts +1 -0
- package/src/components/dialogs/dialog-hooks/use-dialog.ts +10 -0
- package/src/components/dialogs/dialog.types.ts +27 -0
- package/src/components/dialogs/dialogs.stories.mdx +12 -0
- package/src/components/dialogs/form-dialog/form-dialog.stories.tsx +52 -0
- package/src/components/dialogs/form-dialog/form-dialog.test.tsx +164 -0
- package/src/components/dialogs/form-dialog/form-dialog.tsx +69 -0
- package/src/components/dialogs/form-dialog/index.ts +1 -0
- package/src/components/dialogs/index.ts +5 -0
- package/src/components/index.ts +2 -0
- package/src/components/inputs/enhanced-autocomplete/enhanced-autocomplete.stories.tsx +109 -0
- package/src/components/inputs/enhanced-autocomplete/enhanced-autocomplete.test.tsx +74 -0
- package/src/components/inputs/enhanced-autocomplete/enhanced-autocomplete.tsx +64 -0
- package/src/components/inputs/enhanced-autocomplete/index.ts +1 -0
- package/src/components/inputs/enhanced-text-field/enhanced-text-field.stories.tsx +120 -0
- package/src/components/inputs/enhanced-text-field/enhanced-text-field.test.tsx +63 -0
- package/src/components/inputs/enhanced-text-field/enhanced-text-field.tsx +101 -0
- package/src/components/inputs/enhanced-text-field/index.ts +1 -0
- package/src/components/inputs/index.ts +1 -0
- package/src/components/inputs/inputs.stories.mdx +2 -0
- package/src/components/value-displays/value-datetime/value-datetime.test.tsx +17 -8
- package/src/components/value-displays/value-datetime/value-datetime.tsx +23 -20
- package/src/components/value-displays/value-rating/value-rating.tsx +1 -1
- package/src/components/value-displays/value-text/value-text.tsx +1 -1
- package/src/generators/generators.mock.ts +3 -14
- package/src/generators/model-form/model-form.tsx +3 -6
- package/src/storybook.tsx +34 -2
- package/src/tests/actions.ts +2 -1
- package/src/tests/assertions.ts +17 -5
- package/src/tests/datatable-placeholder/datatable-placeholder.tsx +2 -4
- package/src/tests/mocks/markdown.mock.ts +25 -0
- package/src/types/index.d.ts +6 -0
- package/dist/cjs/types/generators/generators.model.test.d.ts +0 -1
- package/dist/cjs/types/utils/arrays.test.d.ts +0 -1
- package/dist/esm/types/generators/generators.model.test.d.ts +0 -1
- package/dist/esm/types/utils/arrays.test.d.ts +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AlertColor } from "@mui/material";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface ExpandableAlertProps {
|
|
4
|
+
severity: AlertColor;
|
|
5
|
+
iconMapping?: Partial<Record<AlertColor, React.ReactNode>>;
|
|
6
|
+
title?: string;
|
|
7
|
+
message: string;
|
|
8
|
+
metadata?: string | string[];
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const ExpandableAlert: ({ severity, iconMapping, title, message, metadata, onClose, }: ExpandableAlertProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./expandable-alert";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./expandable-alert";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SxProps, Theme } from "@mui/material";
|
|
2
|
+
import { PropsWithChildren } from "react";
|
|
3
|
+
export type BoardProps = PropsWithChildren<{
|
|
4
|
+
markdown?: string;
|
|
5
|
+
content?: string | string[];
|
|
6
|
+
spacing?: 0 | 1 | 2 | 3 | 4 | 5;
|
|
7
|
+
timeoutCopyText?: number;
|
|
8
|
+
sx?: SxProps<Theme>;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const Board: ({ markdown: markdownProps, content: contentProp, spacing, timeoutCopyText, children, sx, }: BoardProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./board";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./markdown";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MarkdownToJSX } from "markdown-to-jsx";
|
|
2
|
+
export interface MarkdownProps {
|
|
3
|
+
content: string;
|
|
4
|
+
options?: MarkdownToJSX.Options;
|
|
5
|
+
}
|
|
6
|
+
export declare const markdownDefaultOptions: MarkdownToJSX.Options;
|
|
7
|
+
export declare const Markdown: ({ content, options }: MarkdownProps) => JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { BootstrapDialogDialogProps } from "../dialog.types";
|
|
2
|
+
export declare const BootstrapDialog: ({ open, title, component, componentProps, disabled, actions, children, loading, cancelable, callCloseWhenCancel, acceptable, acceptText, cancelText, onAccept, onCancel, onClose, acceptType, }: BootstrapDialogDialogProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./bootstrap-dialog";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BootstrapDialogDialogProps } from "../dialog.types";
|
|
2
|
+
type OmitBaseDialogProps = "cancelable" | "acceptable" | "onAccept" | "onCancel" | "onClose" | "actions" | "callCloseWhenCancel" | "component" | "acceptType";
|
|
3
|
+
export interface ConfirmDialogProps extends Omit<BootstrapDialogDialogProps, OmitBaseDialogProps> {
|
|
4
|
+
confirmText?: string;
|
|
5
|
+
canceText?: string;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
onConfirm: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const ConfirmDialog: ({ open, title, loading, disabled, confirmText, cancelText, children, onConfirm, onCancel, }: ConfirmDialogProps) => JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./confirm-dialog";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./use-dialog";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
export interface DialogAction {
|
|
3
|
+
id: string;
|
|
4
|
+
text: string;
|
|
5
|
+
type?: "button" | "submit";
|
|
6
|
+
color?: "inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning";
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export type BootstrapDialogDialogProps = PropsWithChildren<{
|
|
10
|
+
open: boolean;
|
|
11
|
+
title: string;
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
cancelable?: boolean;
|
|
15
|
+
acceptable?: boolean;
|
|
16
|
+
callCloseWhenCancel?: boolean;
|
|
17
|
+
actions?: DialogAction[];
|
|
18
|
+
cancelText?: string;
|
|
19
|
+
acceptText?: string;
|
|
20
|
+
acceptType?: "button" | "submit";
|
|
21
|
+
onClose: () => void;
|
|
22
|
+
onCancel?: () => void;
|
|
23
|
+
onAccept?: () => void;
|
|
24
|
+
component?: React.ElementType;
|
|
25
|
+
componentProps?: any;
|
|
26
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BootstrapDialogDialogProps } from "../dialog.types";
|
|
2
|
+
type OmitBaseDialogProps = "cancelable" | "acceptable" | "onAccept" | "onCancel" | "onClose" | "actions" | "callCloseWhenCancel" | "component" | "acceptType";
|
|
3
|
+
export interface FormDialogProps<T> extends Omit<BootstrapDialogDialogProps, OmitBaseDialogProps> {
|
|
4
|
+
submitText?: string;
|
|
5
|
+
canceText?: string;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
onSubmit: (data: T) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const FormDialog: <T>({ open, title, loading, disabled, submitText, cancelText, children, onSubmit, onCancel, }: FormDialogProps<T>) => JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./form-dialog";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AutocompleteProps, ChipTypeMap } from "@mui/material";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface EnhancedAutocompleteProps<T, Multiple extends boolean | undefined, DisableClearable extends boolean | undefined, FreeSolo extends boolean | undefined, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"]> extends Omit<AutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent>, "renderInput" | "onChange" | "color"> {
|
|
4
|
+
label: string;
|
|
5
|
+
helperText?: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
fetching?: boolean;
|
|
8
|
+
onChangeValue?: (value: T) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const EnhancedAutocomplete: <T, Multiple extends boolean | undefined, DisableClearable extends boolean | undefined, FreeSolo extends boolean | undefined, ChipComponent extends React.ElementType<any> = "div">(props: EnhancedAutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent>) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./enhanced-autocomplete";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TextFieldProps } from "@mui/material";
|
|
2
|
+
export type EnhancedTextFieldProps = TextFieldProps & {
|
|
3
|
+
fetching?: boolean;
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
hexColor?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const EnhancedTextField: ({ id: overrideId, label, InputLabelProps, InputProps, fetching, loading, helperText, hexColor, size, fullWidth, sx, ...rest }: EnhancedTextFieldProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./enhanced-text-field";
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{InputAdornment as e,Button as t,Box as n,Typography as r,Tooltip as o,TextField as a,IconButton as i,Paper as l,useTheme as c,Switch as u,Grid as s,Rating as d,CircularProgress as m,Alert as f,AlertTitle as p,Badge as y,Link as v,Snackbar as h,Container as E,Breadcrumbs as b,Tabs as g,Tab as x,Drawer as w,Divider as S,listItemIconClasses as C,listItemButtonClasses as k,listSubheaderClasses as O,listItemTextClasses as $,styled as I,ListItem as P,ListItemButton as j,ListItemIcon as T,ListItemAvatar as R,Avatar as M,ListItemText as N,Collapse as D,List as F,ListSubheader as z,FormControl as _,InputLabel as V,Select as A,LinearProgress as W,Stack as q,tabsClasses as L,TableHead as B,TableRow as U,TableCell as H,TableSortLabel as Y,TableContainer as G,Table as J,TableBody as X,Skeleton as K,FormControlLabel as Q,Checkbox as Z,MenuItem as ee,Menu as te}from"@mui/material";import*as ne from"react";import re,{useState as oe,createContext as ae,useContext as ie,forwardRef as le,useRef as ce,useEffect as ue,useId as se,useMemo as de}from"react";import me from"@mui/icons-material/Check";import fe from"@mui/icons-material/Clear";import pe from"@mui/icons-material/Edit";import ye from"@mui/icons-material/Close";import{format as ve}from"date-fns";import{DateTimePicker as he,TimePicker as Ee,DatePicker as be,DesktopDatePicker as ge}from"@mui/x-date-pickers";import{styled as xe,alpha as we}from"@mui/material/styles";import Se from"@mui/material/AppBar";import Ce from"@mui/material/Box";import ke from"@mui/material/Toolbar";import Oe from"@mui/material/IconButton";import $e from"@mui/material/Typography";import Ie from"@mui/material/InputBase";import Pe from"@mui/material/MenuItem";import je from"@mui/material/Menu";import Te from"@mui/icons-material/Menu";import Re from"@mui/icons-material/Search";import Me from"@mui/icons-material/AccountCircle";import{Link as Ne,useLocation as De,useNavigate as Fe,useParams as ze,Routes as _e,Route as Ve}from"react-router-dom";import Ae from"@mui/icons-material/ChevronLeft";import We from"@mui/icons-material/ExpandLess";import qe from"@mui/icons-material/ExpandMore";import{LoadingButton as Le}from"@mui/lab";import{loremIpsum as Be}from"lorem-ipsum";import Ue from"@mui/icons-material/MoreVert";var He=function(n){var r=n.onClickCancel,o=n.onSubmitEdit,a=n.sx;return re.createElement(e,{position:"end",sx:a},re.createElement(t,{variant:"contained",size:"small",color:"error",startIcon:re.createElement(fe,null),onClick:r,sx:{paddingRight:0,minWidth:0,marginRight:1}}),re.createElement(t,{variant:"contained",size:"small",color:"primary",startIcon:re.createElement(me,null),onClick:o,sx:{paddingRight:0,minWidth:0}}))},Ye=function(e,t){var n=oe(!1),r=n[0],o=n[1],a=oe(e),i=a[0],l=a[1],c=function(){o(!1),l(e)};return{isEditing:r,cancelEdit:c,editValue:i,setEditValue:l,startEdit:function(){o(!0)},submitEdit:function(){t(i),c()}}},Ge="-",Je=function(e){return"label-".concat(e.replace(/ /g,"-"))},Xe=function(e){var t=e.label,a=e.tooltip,i=e.tooltipEnterDelay,l=void 0===i?2e3:i,c=e.children,u=Je(t);return re.createElement(n,{width:1},re.createElement(r,{variant:"subtitle2",role:"label",id:u},t),a?re.createElement(o,{title:a,placement:"top",enterDelay:l},c):c)},Ke=function(e){var t=e.label,n=e.value,o=e.placeholder,l=void 0===o?"-":o,c=e.editable,u=e.onEdit,s=void 0===u?function(){return null}:u,d=Ye(null==n?void 0:n.toString(),s),m=d.isEditing,f=d.editValue,p=d.startEdit,y=d.cancelEdit,v=d.setEditValue,h=d.submitEdit,E=Je(t),b=(null==n?void 0:n.toString())||l;return re.createElement(Xe,{label:t,tooltip:b},m?re.createElement(a,{value:f,size:"small",onChange:function(e){return v(e.target.value)},InputProps:{endAdornment:re.createElement(He,{onClickCancel:y,onSubmitEdit:h})}}):re.createElement(r,{variant:"h5",noWrap:!0,"aria-labelledby":E},b,c&&re.createElement(i,{size:"small",onClick:p,sx:{ml:1}},re.createElement(pe,null))))},Qe=function(e){var t=e.children;return re.createElement(l,{sx:{p:2}},t)},Ze=function(e){var t=e.label,o=e.value,a=e.placeholder,l=void 0===a?"-":a,s=e.editable,d=e.onEdit,m=void 0===d?function(){return null}:d,f=c().typography,p=Ye(o,m),y=p.isEditing,v=p.editValue,h=p.startEdit,E=p.cancelEdit,b=p.setEditValue,g=p.submitEdit,x={fontSize:f.h5.fontSize};return re.createElement(Xe,{label:t},y?re.createElement(n,{display:"flex",alignItems:"center"},re.createElement(u,{checked:v,onChange:function(e){return b(e.target.checked)}}),re.createElement(He,{onClickCancel:E,onSubmitEdit:g})):re.createElement(n,{display:"flex",alignItems:"center"},void 0===o?re.createElement(r,{variant:"h5"},l):o?re.createElement(me,{color:"success",sx:x}):re.createElement(ye,{color:"error",sx:x}),s&&re.createElement(i,{size:"small",onClick:h,sx:{ml:1}},re.createElement(pe,null))))},et=function(){return et=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},et.apply(this,arguments)};function tt(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function nt(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}var rt=function(e){var t=e.label,o=e.value,l=e.format,c=e.placeholder,u=void 0===c?"-":c,s=e.editable,d=e.editInputType,m=void 0===d?"datetime":d,f=e.onEdit,p=Ye(o,void 0===f?function(){return null}:f),y=p.isEditing,v=p.editValue,h=p.startEdit,E=p.cancelEdit,b=p.setEditValue,g=p.submitEdit,x=Je(t),w=o&&ve(o,l)||u,S="datetime"===m?he:"time"===m?Ee:be;return re.createElement(Xe,{label:t,tooltip:w},y?re.createElement(S,{value:v,inputFormat:l,onChange:function(e){return b(e)},renderInput:function(e){return re.createElement(a,et({},e,{InputProps:{endAdornment:re.createElement(re.Fragment,null,e.InputProps.endAdornment,re.createElement(He,{onClickCancel:E,onSubmitEdit:g,sx:{ml:2}}))}}))}}):re.createElement(n,{display:"flex",alignItems:"center"},re.createElement(r,{variant:"h5",noWrap:!0,"aria-labelledby":x},w),s&&re.createElement(i,{size:"small",onClick:h,sx:{ml:1}},re.createElement(pe,null))))},ot=function(e){var t=void 0===e?{}:e,n=t.lightWeight,r=void 0===n?100:n,o=t.darkWeight,a=void 0===o?900:o,i=c().palette;return"light"===i.mode?i.grey[r]:i.grey[a]},at={root:"RdsGroupValueItem-root"},it=function(e){var t=e.children,r=e.bordered,o=void 0===r||r,a=tt(e,["children","bordered"]),i=ot({lightWeight:200,darkWeight:800});return re.createElement(s,et({item:!0,className:at.root},a),re.createElement(n,{px:1,sx:{borderLeft:o?"solid ".concat(i," 1px"):"none"}},t))},lt=function(e){var t=e.title,o=e.subtitle,a=e.centered,i=e.children,c=ot({lightWeight:200,darkWeight:800});return re.createElement(l,{sx:{paddingBottom:1}},re.createElement(n,{bgcolor:c,px:2,py:1},re.createElement(r,{variant:"h6",role:"heading","aria-level":1},t),o&&re.createElement(r,{variant:"body2",role:"heading","aria-level":2},o)),re.createElement(s,{container:!0,padding:1,rowSpacing:2,justifyContent:a?"center":"flex-start"},i))},ct=function(e){var t=e.label,r=e.value,o=void 0===r?0:r,a=e.maxRating,l=void 0===a?5:a,c=e.editable,u=e.onEdit,s=Ye(o,void 0===u?function(){return null}:u),m=s.isEditing,f=s.editValue,p=s.startEdit,y=s.cancelEdit,v=s.setEditValue,h=s.submitEdit,E=Je(t);return re.createElement(Xe,{label:t,tooltip:o.toString()},re.createElement(n,{display:"flex",alignItems:"center"},re.createElement(d,{"aria-labelledby":E,readOnly:!m,max:l,value:m?f:o,onChange:function(e,t){return v(t)}}),c&&!m&&re.createElement(i,{size:"small",onClick:p,sx:{ml:1}},re.createElement(pe,null)),m&&re.createElement(He,{onClickCancel:y,onSubmitEdit:h})))},ut=function(){return re.createElement(n,{width:1,height:1,display:"flex",justifyContent:"center",alignItems:"center"},re.createElement(m,null))};function st(e){var t=e.isFetching,r=e.error,o=e.success,a=e.children;return t?re.createElement(ut,null):r?re.createElement(f,{severity:"error",role:"alert","aria-describedby":"error"},r.name&&re.createElement(p,{role:"heading"},r.name),r.message):re.createElement(n,null,o&&re.createElement(f,{severity:"success",role:"alert","aria-describedby":"success",sx:{mb:2}},o.name&&re.createElement(p,{role:"heading"},o.name),o.message),a)}var dt=ae(void 0),mt=new Error("DrawerContext.Provider is required and was undefined"),ft=function(){var e=ie(dt);if(void 0===e)throw mt;return e},pt=xe("div")((function(e){var t,n=e.theme;return(t={position:"relative",borderRadius:n.shape.borderRadius,backgroundColor:we(n.palette.common.white,.15),"&:hover":{backgroundColor:we(n.palette.common.white,.25)},marginRight:n.spacing(2),marginLeft:0,width:"100%"})[n.breakpoints.up("sm")]={marginLeft:n.spacing(3),width:"auto"},t})),yt=xe("div")((function(e){return{padding:e.theme.spacing(0,2),height:"100%",position:"absolute",pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center"}})),vt=xe(Ie)((function(e){var t,n=e.theme;return{color:"inherit","& .MuiInputBase-input":(t={padding:n.spacing(1,1,1,0),paddingLeft:"calc(1em + ".concat(n.spacing(4),")"),transition:n.transitions.create("width"),width:"100%"},t[n.breakpoints.up("md")]={width:"20ch"},t)}})),ht=function(e){return{width:240,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},Et=function(e){var t;return(t={transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:"calc(".concat(e.spacing(7)," + 1px)")})[e.breakpoints.up("sm")]={width:"calc(".concat(e.spacing(8)," + 1px)")},t},bt=xe((function(e){var t=e.search,n=void 0!==t&&t,r=e.title,o=e.menu,a=void 0!==o&&o,i=e.profile,l=e.onClickSignOut,c=tt(e,["search","title","menu","profile","onClickSignOut"]),u=ne.useState(null),s=u[0],d=u[1],m=ft(),f=m.isOpen,p=m.open;return ne.createElement(Se,et({},c),ne.createElement(ke,null,a&&ne.createElement(Oe,{color:"inherit","aria-label":"open drawer",onClick:p,edge:"start",sx:et({marginRight:5},f&&{display:"none"})},ne.createElement(Te,null)),r&&ne.createElement($e,{variant:"h6",component:"h1",role:"heading","aria-level":1,noWrap:!0,sx:{display:{xs:"none",sm:"block"}}},r),n&&ne.createElement(pt,{role:"search"},ne.createElement(yt,null,ne.createElement(Re,null)),ne.createElement(vt,{placeholder:"Search…",inputProps:{"aria-label":"search"}})),ne.createElement(Ce,{sx:{flexGrow:1}}),i&&ne.createElement(Ce,{sx:{display:{xs:"none",md:"flex"}}},ne.createElement(Oe,{size:"large","aria-controls":"menu-appbar","aria-haspopup":"true","aria-label":"menu button",role:"button","aria-expanded":Boolean(s),onClick:function(e){d(e.currentTarget)},color:"inherit"},ne.createElement(Me,null)),ne.createElement(je,{id:"menu-appbar",anchorEl:s,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(s),onClose:function(){d(null)}},ne.createElement(Pe,{onClick:l},"Sign out")))))}))((function(e){var t=e.theme,n=ft().isOpen;return et({zIndex:t.zIndex.drawer+1,transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})},n&&{marginLeft:240,width:"calc(100% - ".concat(240,"px)"),transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen})})}));bt.defaultProps={position:"fixed",menu:!0};var gt={root:"RdsBullet-root"},xt=function(e){var t=e.variant,n=void 0===t?"primary":t;return re.createElement(y,{color:n,variant:"dot",className:gt.root,role:"bullet","aria-describedby":n})},wt={root:"RdsLabel-root"},St=function(e){var t=e.text,o=e.variant,a=void 0===o?"default":o,i=c().palette,l={default:"light"===i.mode?i.grey[100]:i.grey[900],primary:i.primary.main,secondary:i.secondary.main,info:i.info.main,warning:i.warning.main,error:i.error.main},u={default:i.getContrastText(l.default),primary:i.primary.contrastText,secondary:i.secondary.contrastText,info:i.info.contrastText,warning:i.warning.contrastText,error:i.error.contrastText};return re.createElement(n,{px:1,sx:{backgroundColor:l[a]},borderRadius:1,color:u[a],className:wt.root,role:"label","aria-describedby":a},re.createElement(r,{variant:"caption",fontWeight:700},t.toUpperCase()))},Ct=le((function(e,t){var n=e.href,r=tt(e,["href"]);return re.createElement(Ne,et({ref:t,to:n},r))})),kt=le((function(e,t){return re.createElement(v,et({},e,{component:Ct}))})),Ot=function(e,t){return new Array(e).fill(t)},$t=function(e){var t=Math.floor(Math.random()*e.length);return{index:t,item:e[t]}},It=new Error("NotificationCenterContext.Provider is required and was undefined"),Pt=re.createContext(void 0),jt=function(){var e=re.useContext(Pt);if(void 0===e)throw It;return e},Tt=function(e){var t=e.children,n=e.autoHideDuration,r=void 0===n?6e3:n,o=oe(void 0),a=o[0],i=o[1],l=oe(!1),c=l[0],u=l[1],s=function(){u(!1)};return re.createElement(Pt.Provider,{value:{show:function(e){i(e),u(!0)},hide:s}},re.createElement(h,{open:c,autoHideDuration:r,onClose:s,anchorOrigin:{vertical:"top",horizontal:"right"}},re.createElement(f,{onClose:s,severity:null==a?void 0:a.severity,"aria-label":null==a?void 0:a.severity,sx:{width:"100%"}},(null==a?void 0:a.title)&&re.createElement(p,null,null==a?void 0:a.title),null==a?void 0:a.message)),t)},Rt=function(e,t,n){var r=n.from,o=n.to,a=ce(),i=jt().show;ue((function(){a.current===r&&t===o&&i(e),a.current=t}),[t])},Mt=ae([0,function(){return null}]),Nt=Mt.Provider,Dt=function(){return ie(Mt)},Ft=function(e){var t=e.children,n=e.initialValue,r=oe(void 0===n?0:n);return re.createElement(Nt,{value:r},t)},zt=function(e){var o=e.title,a=e.subtitle,i=e.preset,l=void 0===i?"default":i,u=e.actionsVariant,s=void 0===u?"outlined":u,d=e.breadcrumbs,m=e.actions,f=e.tabs,p=e.tabsMode,y=void 0===p?"panel":p,v=e.navigationButton,h=De(),w=c().palette,S=ot(),C=Dt(),k=C[0],O=C[1],$={default:S,primary:w.primary.main,secondary:w.secondary.main,inherit:"inherit",transparent:"transparent"},I=$[l],P={default:w.getContrastText($.default),primary:w.primary.contrastText,secondary:w.secondary.contrastText,inherit:"inherit",transparent:w.text.primary}[l],j="panel"===y?k:null==f?void 0:f.findIndex((function(e){return e.href===h.pathname}));return re.createElement(n,{bgcolor:I,color:P},re.createElement(E,null,re.createElement(n,{sx:{py:3,display:"flex",flexDirection:"row",justifyContent:"space-between"}},re.createElement(n,null,v&&re.createElement(t,{href:v.href,size:"small",color:"inherit",LinkComponent:kt,startIcon:v.icon,sx:{mb:1}},v.text),(null==d?void 0:d.length)&&re.createElement(b,{color:"inherit",separator:"›","aria-label":"breadcrumb",sx:{marginTop:1}},d.map((function(e){var t=e.id,n=e.link,r=e.text;return re.createElement(kt,{key:t,underline:"hover",color:"inherit",href:n,variant:"body2",role:"link"},r)}))),re.createElement(r,{variant:"h4",role:"heading","aria-level":1},o),a&&re.createElement(r,{variant:"body1",role:"heading","aria-level":2},a)),m&&re.createElement(n,null,m.map((function(e,n){var r=e.disabled,o=e.id,a=e.href,i=e.onClick,l=e.text;return re.createElement(t,{component:a?kt:"button",role:"button",color:"inherit",disabled:r,key:o,variant:s,size:"small",href:a,onClick:i,sx:{mr:n!=m.length-1?1:0}},l)})))),f&&re.createElement(g,{value:j,textColor:"inherit",onChange:"panel"===y?function(e,t){return O(t)}:void 0},f.map((function(e){var t=e.id,n=e.label,r=e.disabled,o=e.href,a={label:n,disabled:r};return"panel"===y?re.createElement(x,et({key:t},a)):re.createElement(x,et({key:t},a,{component:kt,href:o}))})))))},_t=function(e){var t=e.children;return re.createElement(E,{component:"main",sx:{py:3,flexGrow:1}},t)};function Vt(e){var t=e.children,r=e.centerVertical,o=void 0===r||r,a=e.centerHorizontal,i=void 0===a||a,l=e.sx;return re.createElement(n,{width:1,height:1,sx:et(et({},l),{display:"flex",flexDirection:"column",justifyContent:o?"center":"flex-start",alignItems:i?"center":"flex-start"})},t)}var At=xe("div")((function(e){var t=e.theme;return et({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),Wt=function(e){var t=e.children,n=tt(e,["children"]),r=ft(),o=r.isOpen,a=r.close;return re.createElement(w,et({open:o,role:"menu","aria-hidden":!o},n),re.createElement(At,null,re.createElement(i,{onClick:a},re.createElement(Ae,null))),re.createElement(S,null),t)},qt=xe(Wt)((function(e){var t,n=e.theme,r=ft().isOpen,o=!r&&{display:"none"};return et(et(((t={width:240,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box"})["& .".concat(C.root)]=et({minWidth:0,justifyContent:"center"},r?{marginRight:n.spacing(3)}:{marginRight:"auto"}),t["& .".concat(k.root)]=et({minHeight:48,paddingHorizontal:n.spacing(2.5)},r?{justifyContent:"initial"}:{justifyContent:"center"}),t["& .".concat(wt.root)]=o,t["& .".concat(gt.root)]=o,t["& .".concat(O.root)]=o,t["& .".concat($.root)]={opacity:r?1:0},t),r&&et(et({},ht(n)),{"& .MuiDrawer-paper":ht(n)})),!r&&et(et({},Et(n)),{"& .MuiDrawer-paper":Et(n)}))}));qt.defaultProps={variant:"permanent"};var Lt=function(e){var t=e.children,n=e.initialOpen,r=oe(void 0!==n&&n),o=r[0],a=r[1];return re.createElement(dt.Provider,{value:{isOpen:o,close:function(){return a(!1)},open:function(){return a(!0)}}},t)},Bt=I(kt)((function(e){return{color:e.theme.palette.text.primary}})),Ut=function(e){var t=e.text,n=e.icon,r=e.avatar,o=e.label,a=e.bullet,i=e.href,l=e.selected,c=e.sx;return re.createElement(P,{disablePadding:!0,sx:{display:"block"},component:Bt,href:i},re.createElement(j,{selected:l,sx:c},n&&re.createElement(T,null,n),r&&re.createElement(R,null,re.createElement(M,{alt:r.alt,src:r.src})),re.createElement(N,{primary:t}),o&&re.createElement(St,{text:o.text,variant:o.variant}),a&&re.createElement(xt,{variant:a.variant})))},Ht=function(e){var t=e.text,n=e.icon,r=e.selected,o=e.selectedItem,a=e.items,i=oe(!1),l=i[0],c=i[1];return re.createElement(re.Fragment,null,re.createElement(P,{disablePadding:!0,sx:{display:"block"}},re.createElement(j,{selected:r,onClick:function(){return c((function(e){return!e}))}},n&&re.createElement(T,null,n),re.createElement(N,{primary:t}),l?re.createElement(We,null):re.createElement(qe,null))),re.createElement(D,{in:l,timeout:"auto",unmountOnExit:!0},re.createElement(F,{component:"div",disablePadding:!0},a.map((function(e){var t=e.id,n=e.text,r=e.icon,a=e.avatar,i=e.label,l=e.bullet,c=e.href;return re.createElement(Ut,{key:t,selected:t===o,text:n,icon:r,avatar:a,label:i,bullet:l,href:c,sx:{pl:4}})})))))},Yt=function(e){var t=e.title,n=e.items,r=e.selectedItem;return re.createElement(re.Fragment,null,t&&re.createElement(z,{role:"heading"},t),re.createElement(F,null,n.map((function(e){if("items"in e){var t=e.id,n=e.text,o=e.icon,a=e.items,i=a.some((function(e){return e.id===r}));return re.createElement(Ht,{key:t,selectedItem:r,selected:t===r||i,text:n,icon:o,items:a})}t=e.id,n=e.text,o=e.icon;var l=e.avatar,c=e.label,u=e.bullet,s=e.href;return re.createElement(Ut,{key:t,selected:t===r,text:n,icon:o,avatar:l,label:c,bullet:u,href:s})}))))},Gt=function(e){var t=e.nav.items,n=e.selectedItem;return re.createElement(re.Fragment,null,t.map((function(e,t){var r=e.title,o=e.items;return re.createElement(Yt,{key:t,title:r,items:o,selectedItem:n})})))},Jt={small:15,medium:20},Xt=function(e){var t=e.label,r=e.value,o=e.loading,a=void 0!==o&&o,i=e.fetching,l=void 0!==i&&i,c=e.size,u=void 0===c?"medium":c,s=e.fullWidth,d=void 0!==s&&s,f=e.color,p=e.children,y=e.onChange,v=se(),h=I(_)((function(){return f?{label:{color:f},".MuiOutlinedInput-notchedOutline":{borderColor:"".concat(f," !important")},".MuiInputBase-root":{color:f},".MuiSelect-icon":{fill:f}}:{}}));return re.createElement(h,{fullWidth:d},re.createElement(V,{id:v},t),re.createElement(A,{labelId:v,id:v,value:r,label:t,onChange:y,disabled:l,size:u,renderValue:function(e){return l?re.createElement(Vt,{centerVertical:!0,centerHorizontal:!0},re.createElement(m,{color:"inherit",size:Jt[u]})):a?re.createElement(n,{display:"flex",flexDirection:"column"},e,re.createElement(W,{color:"inherit",sx:{position:"absolute",left:0,right:0,bottom:0}})):e}},p))},Kt=function(e){var t=e.title,o=e.subtitle,i=e.loading,l=e.error,c=e.onSubmitSignIn,u=oe(""),s=u[0],d=u[1],m=oe(""),p=m[0],y=m[1];return re.createElement(re.Fragment,null,re.createElement(n,{marginBottom:2},re.createElement(r,{component:"h1",variant:"h4"},t),re.createElement(r,{variant:"body1"},o)),re.createElement(n,{component:"form",onSubmit:function(e){var t,n;e.preventDefault(),d(""),y("");var r=new FormData(e.currentTarget),o=null===(t=r.get("email"))||void 0===t?void 0:t.toString(),a=null===(n=r.get("password"))||void 0===n?void 0:n.toString();o||d("Please fill out this field"),a||y("Please fill out this field"),o&&a&&c(o,a)}},l&&re.createElement(q,{width:"100%",marginTop:1},re.createElement(f,{variant:"filled",severity:"error"},l.message)),re.createElement(a,{margin:"normal",fullWidth:!0,id:"email",label:"Email Address",name:"email",autoComplete:"email",autoFocus:!0,disabled:i,type:"email",inputProps:{role:"input"},error:!!s,helperText:s}),re.createElement(a,{margin:"normal",fullWidth:!0,role:"input",name:"password",label:"Password",type:"password",id:"password",disabled:i,autoComplete:"current-password",inputProps:{role:"input"},error:!!p,helperText:p}),re.createElement(Le,{type:"submit",fullWidth:!0,variant:"contained",loading:i,disabled:i,role:"button",sx:{mt:2}},"Sign In")))};function Qt(e){var t=e.children,r=e.index,o=Dt()[0],a=o===r;return Array.isArray(r)&&(a=r.includes(o)),re.createElement("div",{role:"tabpanel",hidden:!a,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},a&&re.createElement(n,{sx:{p:3}},t))}var Zt=I(g)((function(e){var t,n=e.theme;return(t={})["&.".concat(L.root)]={backgroundColor:n.palette.grey[100]},t})),en=function(e){var t=e.children,n=e.tabs,r=Dt(),o=r[0],a=r[1];return re.createElement(l,null,re.createElement(Zt,{value:o,onChange:function(e,t){return a(t)}},n.map((function(e){return re.createElement(x,{key:e,label:e})}))),t)};function tn(e,t){return"production"===process.env.NODE_ENV?()=>null:function(...n){return e(...n)||t(...n)}}var nn,rn={exports:{}},on={exports:{}},an={};var ln,cn,un,sn,dn,mn,fn,pn,yn,vn,hn,En,bn,gn,xn={};
|
|
1
|
+
import{InputAdornment as e,Button as t,Box as n,Typography as r,Tooltip as o,TextField as a,IconButton as i,Paper as l,useTheme as c,Switch as u,Grid as s,Rating as d,CircularProgress as m,Alert as f,AlertTitle as p,Badge as v,Link as y,Snackbar as h,Container as E,Breadcrumbs as b,Tabs as g,Tab as x,Drawer as C,Divider as w,listItemIconClasses as S,listItemButtonClasses as k,listSubheaderClasses as O,listItemTextClasses as I,styled as $,ListItem as T,ListItemButton as P,ListItemIcon as j,ListItemAvatar as R,Avatar as M,ListItemText as z,Collapse as N,List as D,ListSubheader as A,FormControl as V,InputLabel as F,Select as W,LinearProgress as _,Stack as B,outlinedInputClasses as L,inputLabelClasses as q,circularProgressClasses as U,linearProgressClasses as H,autocompleteClasses as Y,iconButtonClasses as G,OutlinedInput as J,FormHelperText as X,Autocomplete as K,tabsClasses as Q,TableHead as Z,TableRow as ee,TableCell as te,TableSortLabel as ne,TableContainer as re,Table as oe,TableBody as ae,Skeleton as ie,alertClasses as le,Dialog as ce,DialogTitle as ue,DialogContent as se,DialogActions as de,FormControlLabel as me,Checkbox as fe,MenuItem as pe,Menu as ve}from"@mui/material";import*as ye from"react";import he,{useState as Ee,createContext as be,useContext as ge,forwardRef as xe,useRef as Ce,useEffect as we,useId as Se,useMemo as ke}from"react";import Oe from"@mui/icons-material/Check";import Ie from"@mui/icons-material/Clear";import $e from"@mui/icons-material/Edit";import Te from"@mui/icons-material/Close";import{format as Pe}from"date-fns";import{DateTimePicker as je,TimePicker as Re,DatePicker as Me,DesktopDatePicker as ze}from"@mui/x-date-pickers";import{styled as Ne,alpha as De}from"@mui/material/styles";import Ae from"@mui/material/AppBar";import Ve from"@mui/material/Box";import Fe from"@mui/material/Toolbar";import We from"@mui/material/IconButton";import _e from"@mui/material/Typography";import Be from"@mui/material/InputBase";import Le from"@mui/material/MenuItem";import qe from"@mui/material/Menu";import Ue from"@mui/icons-material/Menu";import He from"@mui/icons-material/Search";import Ye from"@mui/icons-material/AccountCircle";import{Link as Ge,useLocation as Je,useNavigate as Xe,useParams as Ke,Routes as Qe,Route as Ze}from"react-router-dom";import{blueGrey as et}from"@mui/material/colors";import tt from"markdown-to-jsx";import nt from"@mui/icons-material/ChevronLeft";import rt from"@mui/icons-material/ExpandLess";import ot from"@mui/icons-material/ExpandMore";import{LoadingButton as at}from"@mui/lab";import{loremIpsum as it}from"lorem-ipsum";import lt from"@mui/icons-material/MoreVert";var ct=function(n){var r=n.onClickCancel,o=n.onSubmitEdit,a=n.sx;return he.createElement(e,{position:"end",sx:a},he.createElement(t,{variant:"contained",size:"small",color:"error",startIcon:he.createElement(Ie,null),onClick:r,sx:{paddingRight:0,minWidth:0,marginRight:1}}),he.createElement(t,{variant:"contained",size:"small",color:"primary",startIcon:he.createElement(Oe,null),onClick:o,sx:{paddingRight:0,minWidth:0}}))},ut=function(e,t){var n=Ee(!1),r=n[0],o=n[1],a=Ee(e),i=a[0],l=a[1],c=function(){o(!1),l(e)};return{isEditing:r,cancelEdit:c,editValue:i,setEditValue:l,startEdit:function(){o(!0)},submitEdit:function(){t(i),c()}}},st="-",dt=function(e){return"label-".concat(e.replace(/ /g,"-"))},mt=function(e){var t=e.label,a=e.tooltip,i=e.tooltipEnterDelay,l=void 0===i?2e3:i,c=e.children,u=dt(t);return he.createElement(n,{width:1},he.createElement(r,{variant:"subtitle2",role:"label",id:u},t),a?he.createElement(o,{title:a,placement:"top",enterDelay:l},c):c)},ft=function(e){var t=e.label,n=e.value,o=e.placeholder,l=void 0===o?"-":o,c=e.editable,u=e.onEdit,s=void 0===u?function(){return null}:u,d=ut(null==n?void 0:n.toString(),s),m=d.isEditing,f=d.editValue,p=d.startEdit,v=d.cancelEdit,y=d.setEditValue,h=d.submitEdit,E=dt(t),b=(null==n?void 0:n.toString())||l;return he.createElement(mt,{label:t,tooltip:b},m?he.createElement(a,{value:f,size:"small",onChange:function(e){return y(e.target.value)},InputProps:{endAdornment:he.createElement(ct,{onClickCancel:v,onSubmitEdit:h})}}):he.createElement(r,{variant:"h5",noWrap:!0,"aria-labelledby":E},b,c&&he.createElement(i,{size:"small",onClick:p,sx:{ml:1}},he.createElement($e,null))))},pt=function(e){var t=e.children;return he.createElement(l,{sx:{p:2}},t)},vt=function(e){var t=e.label,o=e.value,a=e.placeholder,l=void 0===a?"-":a,s=e.editable,d=e.onEdit,m=void 0===d?function(){return null}:d,f=c().typography,p=ut(o,m),v=p.isEditing,y=p.editValue,h=p.startEdit,E=p.cancelEdit,b=p.setEditValue,g=p.submitEdit,x={fontSize:f.h5.fontSize};return he.createElement(mt,{label:t},v?he.createElement(n,{display:"flex",alignItems:"center"},he.createElement(u,{checked:y,onChange:function(e){return b(e.target.checked)}}),he.createElement(ct,{onClickCancel:E,onSubmitEdit:g})):he.createElement(n,{display:"flex",alignItems:"center"},void 0===o?he.createElement(r,{variant:"h5"},l):o?he.createElement(Oe,{color:"success",sx:x}):he.createElement(Te,{color:"error",sx:x}),s&&he.createElement(i,{size:"small",onClick:h,sx:{ml:1}},he.createElement($e,null))))},yt=function(){return yt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},yt.apply(this,arguments)};function ht(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function Et(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}var bt=function(e){var t=e.label,o=e.value,l=e.format,c=e.placeholder,u=void 0===c?"-":c,s=e.editable,d=e.editInputType,m=void 0===d?"datetime":d,f=e.onEdit,p=ut(o,void 0===f?function(){return null}:f),v=p.isEditing,y=p.editValue,h=p.startEdit,E=p.cancelEdit,b=p.setEditValue,g=p.submitEdit,x=dt(t),C=o&&Pe(o,l)||u,w="datetime"===m?je:"time"===m?Re:Me;return he.createElement(mt,{label:t,tooltip:C},v?he.createElement(w,{value:y,format:l,onChange:function(e){return b(e||void 0)},slots:{textField:function(e){var t;return he.createElement(a,yt({},e,{InputProps:yt(yt({},e.InputProps),{endAdornment:he.createElement(he.Fragment,null,null===(t=e.InputProps)||void 0===t?void 0:t.endAdornment,he.createElement(ct,{onClickCancel:E,onSubmitEdit:g,sx:{ml:2}}))})}))}}}):he.createElement(n,{display:"flex",alignItems:"center"},he.createElement(r,{variant:"h5",noWrap:!0,"aria-labelledby":x},C),s&&he.createElement(i,{size:"small",onClick:h,sx:{ml:1}},he.createElement($e,null))))},gt=function(e){var t=void 0===e?{}:e,n=t.lightWeight,r=void 0===n?100:n,o=t.darkWeight,a=void 0===o?900:o,i=c().palette;return"light"===i.mode?i.grey[r]:i.grey[a]},xt={root:"RdsGroupValueItem-root"},Ct=function(e){var t=e.children,r=e.bordered,o=void 0===r||r,a=ht(e,["children","bordered"]),i=gt({lightWeight:200,darkWeight:800});return he.createElement(s,yt({item:!0,className:xt.root},a),he.createElement(n,{px:1,sx:{borderLeft:o?"solid ".concat(i," 1px"):"none"}},t))},wt=function(e){var t=e.title,o=e.subtitle,a=e.centered,i=e.children,c=gt({lightWeight:200,darkWeight:800});return he.createElement(l,{sx:{paddingBottom:1}},he.createElement(n,{bgcolor:c,px:2,py:1},he.createElement(r,{variant:"h6",role:"heading","aria-level":1},t),o&&he.createElement(r,{variant:"body2",role:"heading","aria-level":2},o)),he.createElement(s,{container:!0,padding:1,rowSpacing:2,justifyContent:a?"center":"flex-start"},i))},St=function(e){var t=e.label,r=e.value,o=void 0===r?0:r,a=e.maxRating,l=void 0===a?5:a,c=e.editable,u=e.onEdit,s=ut(o,void 0===u?function(){return null}:u),m=s.isEditing,f=s.editValue,p=s.startEdit,v=s.cancelEdit,y=s.setEditValue,h=s.submitEdit,E=dt(t);return he.createElement(mt,{label:t,tooltip:o.toString()},he.createElement(n,{display:"flex",alignItems:"center"},he.createElement(d,{"aria-labelledby":E,readOnly:!m,max:l,value:m?f:o,onChange:function(e,t){return y(t)}}),c&&!m&&he.createElement(i,{size:"small",onClick:p,sx:{ml:1}},he.createElement($e,null)),m&&he.createElement(ct,{onClickCancel:v,onSubmitEdit:h})))},kt=function(){return he.createElement(n,{width:1,height:1,display:"flex",justifyContent:"center",alignItems:"center"},he.createElement(m,null))};function Ot(e){var t=e.isFetching,r=e.error,o=e.success,a=e.children;return t?he.createElement(kt,null):r?he.createElement(f,{severity:"error",role:"alert","aria-describedby":"error"},r.name&&he.createElement(p,{role:"heading"},r.name),r.message):he.createElement(n,null,o&&he.createElement(f,{severity:"success",role:"alert","aria-describedby":"success",sx:{mb:2}},o.name&&he.createElement(p,{role:"heading"},o.name),o.message),a)}var It=be(void 0),$t=new Error("DrawerContext.Provider is required and was undefined"),Tt=function(){var e=ge(It);if(void 0===e)throw $t;return e},Pt=Ne("div")((function(e){var t,n=e.theme;return(t={position:"relative",borderRadius:n.shape.borderRadius,backgroundColor:De(n.palette.common.white,.15),"&:hover":{backgroundColor:De(n.palette.common.white,.25)},marginRight:n.spacing(2),marginLeft:0,width:"100%"})[n.breakpoints.up("sm")]={marginLeft:n.spacing(3),width:"auto"},t})),jt=Ne("div")((function(e){return{padding:e.theme.spacing(0,2),height:"100%",position:"absolute",pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center"}})),Rt=Ne(Be)((function(e){var t,n=e.theme;return{color:"inherit","& .MuiInputBase-input":(t={padding:n.spacing(1,1,1,0),paddingLeft:"calc(1em + ".concat(n.spacing(4),")"),transition:n.transitions.create("width"),width:"100%"},t[n.breakpoints.up("md")]={width:"20ch"},t)}})),Mt=function(e){return{width:240,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},zt=function(e){var t;return(t={transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:"calc(".concat(e.spacing(7)," + 1px)")})[e.breakpoints.up("sm")]={width:"calc(".concat(e.spacing(8)," + 1px)")},t},Nt=Ne((function(e){var t=e.search,n=void 0!==t&&t,r=e.title,o=e.menu,a=void 0!==o&&o,i=e.profile,l=e.onClickSignOut,c=ht(e,["search","title","menu","profile","onClickSignOut"]),u=ye.useState(null),s=u[0],d=u[1],m=Tt(),f=m.isOpen,p=m.open;return ye.createElement(Ae,yt({},c),ye.createElement(Fe,null,a&&ye.createElement(We,{color:"inherit","aria-label":"open drawer",onClick:p,edge:"start",sx:yt({marginRight:5},f&&{display:"none"})},ye.createElement(Ue,null)),r&&ye.createElement(_e,{variant:"h6",component:"h1",role:"heading","aria-level":1,noWrap:!0,sx:{display:{xs:"none",sm:"block"}}},r),n&&ye.createElement(Pt,{role:"search"},ye.createElement(jt,null,ye.createElement(He,null)),ye.createElement(Rt,{placeholder:"Search…",inputProps:{"aria-label":"search"}})),ye.createElement(Ve,{sx:{flexGrow:1}}),i&&ye.createElement(Ve,{sx:{display:{xs:"none",md:"flex"}}},ye.createElement(We,{size:"large","aria-controls":"menu-appbar","aria-haspopup":"true","aria-label":"menu button",role:"button","aria-expanded":Boolean(s),onClick:function(e){d(e.currentTarget)},color:"inherit"},ye.createElement(Ye,null)),ye.createElement(qe,{id:"menu-appbar",anchorEl:s,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(s),onClose:function(){d(null)}},ye.createElement(Le,{onClick:l},"Sign out")))))}))((function(e){var t=e.theme,n=Tt().isOpen;return yt({zIndex:t.zIndex.drawer+1,transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})},n&&{marginLeft:240,width:"calc(100% - ".concat(240,"px)"),transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen})})}));Nt.defaultProps={position:"fixed",menu:!0};var Dt={root:"RdsBullet-root"},At=function(e){var t=e.variant,n=void 0===t?"primary":t;return he.createElement(v,{color:n,variant:"dot",className:Dt.root,role:"bullet","aria-describedby":n})},Vt={root:"RdsLabel-root"},Ft=function(e){var t=e.text,o=e.variant,a=void 0===o?"default":o,i=c().palette,l={default:"light"===i.mode?i.grey[100]:i.grey[900],primary:i.primary.main,secondary:i.secondary.main,info:i.info.main,warning:i.warning.main,error:i.error.main},u={default:i.getContrastText(l.default),primary:i.primary.contrastText,secondary:i.secondary.contrastText,info:i.info.contrastText,warning:i.warning.contrastText,error:i.error.contrastText};return he.createElement(n,{px:1,sx:{backgroundColor:l[a]},borderRadius:1,color:u[a],className:Vt.root,role:"label","aria-describedby":a},he.createElement(r,{variant:"caption",fontWeight:700},t.toUpperCase()))},Wt=xe((function(e,t){var n=e.href,r=ht(e,["href"]);return he.createElement(Ge,yt({ref:t,to:n},r))})),_t=xe((function(e,t){return he.createElement(y,yt({},e,{component:Wt}))})),Bt=function(e,t){return new Array(e).fill(t)},Lt=function(e){var t=Math.floor(Math.random()*e.length);return{index:t,item:e[t]}},qt=new Error("NotificationCenterContext.Provider is required and was undefined"),Ut=he.createContext(void 0),Ht=function(){var e=he.useContext(Ut);if(void 0===e)throw qt;return e},Yt=function(e){var t=e.children,n=e.autoHideDuration,r=void 0===n?6e3:n,o=Ee(void 0),a=o[0],i=o[1],l=Ee(!1),c=l[0],u=l[1],s=function(){u(!1)};return he.createElement(Ut.Provider,{value:{show:function(e){i(e),u(!0)},hide:s}},he.createElement(h,{open:c,autoHideDuration:r,onClose:s,anchorOrigin:{vertical:"top",horizontal:"right"}},he.createElement(f,{onClose:s,severity:null==a?void 0:a.severity,"aria-label":null==a?void 0:a.severity,sx:{width:"100%"}},(null==a?void 0:a.title)&&he.createElement(p,null,null==a?void 0:a.title),null==a?void 0:a.message)),t)},Gt=function(e,t,n){var r=n.from,o=n.to,a=Ce(),i=Ht().show;we((function(){a.current===r&&t===o&&i(e),a.current=t}),[t])},Jt=be([0,function(){return null}]),Xt=Jt.Provider,Kt=function(){return ge(Jt)},Qt=function(e){var t=e.children,n=e.initialValue,r=Ee(void 0===n?0:n);return he.createElement(Xt,{value:r},t)},Zt=function(e){var o=e.title,a=e.subtitle,i=e.preset,l=void 0===i?"default":i,u=e.actionsVariant,s=void 0===u?"outlined":u,d=e.breadcrumbs,m=e.actions,f=e.tabs,p=e.tabsMode,v=void 0===p?"panel":p,y=e.navigationButton,h=Je(),C=c().palette,w=gt(),S=Kt(),k=S[0],O=S[1],I={default:w,primary:C.primary.main,secondary:C.secondary.main,inherit:"inherit",transparent:"transparent"},$=I[l],T={default:C.getContrastText(I.default),primary:C.primary.contrastText,secondary:C.secondary.contrastText,inherit:"inherit",transparent:C.text.primary}[l],P="panel"===v?k:null==f?void 0:f.findIndex((function(e){return e.href===h.pathname}));return he.createElement(n,{bgcolor:$,color:T},he.createElement(E,null,he.createElement(n,{sx:{py:3,display:"flex",flexDirection:"row",justifyContent:"space-between"}},he.createElement(n,null,y&&he.createElement(t,{href:y.href,size:"small",color:"inherit",LinkComponent:_t,startIcon:y.icon,sx:{mb:1}},y.text),(null==d?void 0:d.length)&&he.createElement(b,{color:"inherit",separator:"›","aria-label":"breadcrumb",sx:{marginTop:1}},d.map((function(e){var t=e.id,n=e.link,r=e.text;return he.createElement(_t,{key:t,underline:"hover",color:"inherit",href:n,variant:"body2",role:"link"},r)}))),he.createElement(r,{variant:"h4",role:"heading","aria-level":1},o),a&&he.createElement(r,{variant:"body1",role:"heading","aria-level":2},a)),m&&he.createElement(n,null,m.map((function(e,n){var r=e.disabled,o=e.id,a=e.href,i=e.onClick,l=e.text;return he.createElement(t,{component:a?_t:"button",role:"button",color:"inherit",disabled:r,key:o,variant:s,size:"small",href:a,onClick:i,sx:{mr:n!=m.length-1?1:0}},l)})))),f&&he.createElement(g,{value:P,textColor:"inherit",onChange:"panel"===v?function(e,t){return O(t)}:void 0},f.map((function(e){var t=e.id,n=e.label,r=e.disabled,o=e.href,a={label:n,disabled:r};return"panel"===v?he.createElement(x,yt({key:t},a)):he.createElement(x,yt({key:t},a,{component:_t,href:o}))})))))},en={overrides:{h1:{component:r,props:{gutterBottom:!0,variant:"h5"}},h2:{component:r,props:{gutterBottom:!0,variant:"h6"}},h3:{component:r,props:{gutterBottom:!0,variant:"subtitle1"}},h4:{component:r,props:{gutterBottom:!0,variant:"caption",paragraph:!0}},p:{component:r,props:{paragraph:!0}},a:{component:y},li:{component:"li"}}},tn=function(e){var t=e.content,n=e.options,r=void 0===n?en:n;return he.createElement(tt,{options:r},t)},nn=function(e){var o,a,i=e.markdown,c=e.content,u=e.spacing,s=void 0===u?0:u,d=e.timeoutCopyText,m=void 0===d?2e3:d,f=e.children,p=e.sx,v=Ee("Copy"),y=v[0],h=v[1];i?o=i||"":Array.isArray(c)?(a=c.map((function(e,t){return he.createElement(r,{key:t,sx:{pb:s}},e)})),o=c.join("\n")):(a=he.createElement(r,null,c),o=c||"");var E=i&&he.createElement(tn,{content:i});return he.createElement(l,{sx:yt({p:2,backgroundColor:et[800],color:"white"},p)},he.createElement(n,{display:"flex",flexDirection:"row"},he.createElement(n,{width:1},f||E||a),he.createElement(n,{width:100,sx:{ml:1}},o&&he.createElement(t,{fullWidth:!0,color:"inherit",size:"small",variant:"outlined",onClick:function(){navigator.clipboard.writeText(o),h("Copied!"),setTimeout((function(){return h("Copy")}),m)}},y))))},rn=function(e){var t=e.children;return he.createElement(E,{component:"main",sx:{py:3,flexGrow:1}},t)};function on(e){var t=e.children,r=e.centerVertical,o=void 0===r||r,a=e.centerHorizontal,i=void 0===a||a,l=e.sx;return he.createElement(n,{width:1,height:1,sx:yt(yt({},l),{display:"flex",flexDirection:"column",justifyContent:o?"center":"flex-start",alignItems:i?"center":"flex-start"})},t)}var an=Ne("div")((function(e){var t=e.theme;return yt({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),ln=function(e){var t=e.children,n=ht(e,["children"]),r=Tt(),o=r.isOpen,a=r.close;return he.createElement(C,yt({open:o,role:"menu","aria-hidden":!o},n),he.createElement(an,null,he.createElement(i,{onClick:a},he.createElement(nt,null))),he.createElement(w,null),t)},cn=Ne(ln)((function(e){var t,n=e.theme,r=Tt().isOpen,o=!r&&{display:"none"};return yt(yt(((t={width:240,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box"})["& .".concat(S.root)]=yt({minWidth:0,justifyContent:"center"},r?{marginRight:n.spacing(3)}:{marginRight:"auto"}),t["& .".concat(k.root)]=yt({minHeight:48,paddingHorizontal:n.spacing(2.5)},r?{justifyContent:"initial"}:{justifyContent:"center"}),t["& .".concat(Vt.root)]=o,t["& .".concat(Dt.root)]=o,t["& .".concat(O.root)]=o,t["& .".concat(I.root)]={opacity:r?1:0},t),r&&yt(yt({},Mt(n)),{"& .MuiDrawer-paper":Mt(n)})),!r&&yt(yt({},zt(n)),{"& .MuiDrawer-paper":zt(n)}))}));cn.defaultProps={variant:"permanent"};var un=function(e){var t=e.children,n=e.initialOpen,r=Ee(void 0!==n&&n),o=r[0],a=r[1];return he.createElement(It.Provider,{value:{isOpen:o,close:function(){return a(!1)},open:function(){return a(!0)}}},t)},sn=$(_t)((function(e){return{color:e.theme.palette.text.primary}})),dn=function(e){var t=e.text,n=e.icon,r=e.avatar,o=e.label,a=e.bullet,i=e.href,l=e.selected,c=e.sx;return he.createElement(T,{disablePadding:!0,sx:{display:"block"},component:sn,href:i},he.createElement(P,{selected:l,sx:c},n&&he.createElement(j,null,n),r&&he.createElement(R,null,he.createElement(M,{alt:r.alt,src:r.src})),he.createElement(z,{primary:t}),o&&he.createElement(Ft,{text:o.text,variant:o.variant}),a&&he.createElement(At,{variant:a.variant})))},mn=function(e){var t=e.text,n=e.icon,r=e.selected,o=e.selectedItem,a=e.items,i=Ee(!1),l=i[0],c=i[1];return he.createElement(he.Fragment,null,he.createElement(T,{disablePadding:!0,sx:{display:"block"}},he.createElement(P,{selected:r,onClick:function(){return c((function(e){return!e}))}},n&&he.createElement(j,null,n),he.createElement(z,{primary:t}),l?he.createElement(rt,null):he.createElement(ot,null))),he.createElement(N,{in:l,timeout:"auto",unmountOnExit:!0},he.createElement(D,{component:"div",disablePadding:!0},a.map((function(e){var t=e.id,n=e.text,r=e.icon,a=e.avatar,i=e.label,l=e.bullet,c=e.href;return he.createElement(dn,{key:t,selected:t===o,text:n,icon:r,avatar:a,label:i,bullet:l,href:c,sx:{pl:4}})})))))},fn=function(e){var t=e.title,n=e.items,r=e.selectedItem;return he.createElement(he.Fragment,null,t&&he.createElement(A,{role:"heading"},t),he.createElement(D,null,n.map((function(e){if("items"in e){var t=e.id,n=e.text,o=e.icon,a=e.items,i=a.some((function(e){return e.id===r}));return he.createElement(mn,{key:t,selectedItem:r,selected:t===r||i,text:n,icon:o,items:a})}t=e.id,n=e.text,o=e.icon;var l=e.avatar,c=e.label,u=e.bullet,s=e.href;return he.createElement(dn,{key:t,selected:t===r,text:n,icon:o,avatar:l,label:c,bullet:u,href:s})}))))},pn=function(e){var t=e.nav.items,n=e.selectedItem;return he.createElement(he.Fragment,null,t.map((function(e,t){var r=e.title,o=e.items;return he.createElement(fn,{key:t,title:r,items:o,selectedItem:n})})))},vn={small:15,medium:20},yn=function(e){var t=e.label,r=e.value,o=e.loading,a=void 0!==o&&o,i=e.fetching,l=void 0!==i&&i,c=e.size,u=void 0===c?"medium":c,s=e.fullWidth,d=void 0!==s&&s,f=e.color,p=e.children,v=e.onChange,y=Se(),h=$(V)((function(){return f?{label:{color:f},".MuiOutlinedInput-notchedOutline":{borderColor:"".concat(f," !important")},".MuiInputBase-root":{color:f},".MuiSelect-icon":{fill:f}}:{}}));return he.createElement(h,{fullWidth:d},he.createElement(F,{id:y},t),he.createElement(W,{labelId:y,id:y,value:r,label:t,onChange:v,disabled:l,size:u,renderValue:function(e){return l?he.createElement(on,{centerVertical:!0,centerHorizontal:!0},he.createElement(m,{color:"inherit",size:vn[u]})):a?he.createElement(n,{display:"flex",flexDirection:"column"},e,he.createElement(_,{color:"inherit",sx:{position:"absolute",left:0,right:0,bottom:0}})):e}},p))},hn=function(e){var t=e.title,o=e.subtitle,i=e.loading,l=e.error,c=e.onSubmitSignIn,u=Ee(""),s=u[0],d=u[1],m=Ee(""),p=m[0],v=m[1];return he.createElement(he.Fragment,null,he.createElement(n,{marginBottom:2},he.createElement(r,{component:"h1",variant:"h4"},t),he.createElement(r,{variant:"body1"},o)),he.createElement(n,{component:"form",onSubmit:function(e){var t,n;e.preventDefault(),d(""),v("");var r=new FormData(e.currentTarget),o=null===(t=r.get("email"))||void 0===t?void 0:t.toString(),a=null===(n=r.get("password"))||void 0===n?void 0:n.toString();o||d("Please fill out this field"),a||v("Please fill out this field"),o&&a&&c(o,a)}},l&&he.createElement(B,{width:"100%",marginTop:1},he.createElement(f,{variant:"filled",severity:"error"},l.message)),he.createElement(a,{margin:"normal",fullWidth:!0,id:"email",label:"Email Address",name:"email",autoComplete:"email",autoFocus:!0,disabled:i,type:"email",inputProps:{role:"input"},error:!!s,helperText:s}),he.createElement(a,{margin:"normal",fullWidth:!0,role:"input",name:"password",label:"Password",type:"password",id:"password",disabled:i,autoComplete:"current-password",inputProps:{role:"input"},error:!!p,helperText:p}),he.createElement(at,{type:"submit",fullWidth:!0,variant:"contained",loading:i,disabled:i,role:"button",sx:{mt:2}},"Sign In")))};function En(e,t){return"production"===process.env.NODE_ENV?()=>null:function(...n){return e(...n)||t(...n)}}var bn,gn={exports:{}},xn={exports:{}},Cn={};var wn,Sn,kn,On,In,$n,Tn,Pn,jn,Rn,Mn,zn,Nn,Dn,An={};
|
|
2
2
|
/** @license React v16.13.1
|
|
3
3
|
* react-is.development.js
|
|
4
4
|
*
|
|
@@ -6,12 +6,12 @@ import{InputAdornment as e,Button as t,Box as n,Typography as r,Tooltip as o,Tex
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/function
|
|
9
|
+
*/function Vn(){return Sn||(Sn=1,e=xn,"production"===process.env.NODE_ENV?e.exports=function(){if(bn)return Cn;bn=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,s=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case c:case u:case r:case a:case o:case d:return e;default:switch(e=e&&e.$$typeof){case l:case s:case p:case f:case i:return e;default:return m}}case n:return m}}}function g(e){return b(e)===u}return Cn.AsyncMode=c,Cn.ConcurrentMode=u,Cn.ContextConsumer=l,Cn.ContextProvider=i,Cn.Element=t,Cn.ForwardRef=s,Cn.Fragment=r,Cn.Lazy=p,Cn.Memo=f,Cn.Portal=n,Cn.Profiler=a,Cn.StrictMode=o,Cn.Suspense=d,Cn.isAsyncMode=function(e){return g(e)||b(e)===c},Cn.isConcurrentMode=g,Cn.isContextConsumer=function(e){return b(e)===l},Cn.isContextProvider=function(e){return b(e)===i},Cn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Cn.isForwardRef=function(e){return b(e)===s},Cn.isFragment=function(e){return b(e)===r},Cn.isLazy=function(e){return b(e)===p},Cn.isMemo=function(e){return b(e)===f},Cn.isPortal=function(e){return b(e)===n},Cn.isProfiler=function(e){return b(e)===a},Cn.isStrictMode=function(e){return b(e)===o},Cn.isSuspense=function(e){return b(e)===d},Cn.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===a||e===o||e===d||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===i||e.$$typeof===l||e.$$typeof===s||e.$$typeof===y||e.$$typeof===h||e.$$typeof===E||e.$$typeof===v)},Cn.typeOf=b,Cn}():e.exports=(wn||(wn=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,s=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:var v=e.type;switch(v){case c:case u:case r:case a:case o:case d:return v;default:var y=v&&v.$$typeof;switch(y){case l:case s:case p:case f:case i:return y;default:return m}}case n:return m}}}var g=c,x=u,C=l,w=i,S=t,k=s,O=r,I=p,$=f,T=n,P=a,j=o,R=d,M=!1;function z(e){return b(e)===u}An.AsyncMode=g,An.ConcurrentMode=x,An.ContextConsumer=C,An.ContextProvider=w,An.Element=S,An.ForwardRef=k,An.Fragment=O,An.Lazy=I,An.Memo=$,An.Portal=T,An.Profiler=P,An.StrictMode=j,An.Suspense=R,An.isAsyncMode=function(e){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),z(e)||b(e)===c},An.isConcurrentMode=z,An.isContextConsumer=function(e){return b(e)===l},An.isContextProvider=function(e){return b(e)===i},An.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},An.isForwardRef=function(e){return b(e)===s},An.isFragment=function(e){return b(e)===r},An.isLazy=function(e){return b(e)===p},An.isMemo=function(e){return b(e)===f},An.isPortal=function(e){return b(e)===n},An.isProfiler=function(e){return b(e)===a},An.isStrictMode=function(e){return b(e)===o},An.isSuspense=function(e){return b(e)===d},An.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===a||e===o||e===d||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===i||e.$$typeof===l||e.$$typeof===s||e.$$typeof===y||e.$$typeof===h||e.$$typeof===E||e.$$typeof===v)},An.typeOf=b}()),An)),xn.exports;var e}
|
|
10
10
|
/*
|
|
11
11
|
object-assign
|
|
12
12
|
(c) Sindre Sorhus
|
|
13
13
|
@license MIT
|
|
14
|
-
*/function Sn(){if(mn)return dn;mn=1;return dn="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Cn(){return pn?fn:(pn=1,fn=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var kn=wn();rn.exports=function(){if(En)return hn;En=1;var e=wn(),t=function(){if(sn)return un;sn=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}return un=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(o,a){for(var i,l,c=r(o),u=1;u<arguments.length;u++){for(var s in i=Object(arguments[u]))t.call(i,s)&&(c[s]=i[s]);if(e){l=e(i);for(var d=0;d<l.length;d++)n.call(i,l[d])&&(c[l[d]]=i[l[d]])}}return c},un}(),n=Sn(),r=Cn(),o=function(){if(vn)return yn;vn=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Sn(),n={},r=Cn();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,a,i,l,c){if("production"!==process.env.NODE_ENV)for(var u in o)if(r(o,u)){var s;try{if("function"!=typeof o[u]){var d=Error((l||"React class")+": "+i+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}s=o[u](a,u,l,i,null,t)}catch(e){s=e}if(!s||s instanceof Error||e((l||"React class")+": type specification of "+i+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in n)){n[s.message]=!0;var m=c?c():"";e("Failed "+i+" type: "+s.message+(null!=m?m:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},yn=o}(),a=function(){};function i(){return null}return"production"!==process.env.NODE_ENV&&(a=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),hn=function(l,c){var u="function"==typeof Symbol&&Symbol.iterator,s="<<anonymous>>",d={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:p(i),arrayOf:function(e){return p((function(t,r,o,a,i){if("function"!=typeof e)return new f("Property `"+i+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var l=t[r];if(!Array.isArray(l))return new f("Invalid "+a+" `"+i+"` of type `"+E(l)+"` supplied to `"+o+"`, expected an array.");for(var c=0;c<l.length;c++){var u=e(l,c,o,a,i+"["+c+"]",n);if(u instanceof Error)return u}return null}))},element:p((function(e,t,n,r,o){var a=e[t];return l(a)?null:new f("Invalid "+r+" `"+o+"` of type `"+E(a)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:p((function(t,n,r,o,a){var i=t[n];return e.isValidElementType(i)?null:new f("Invalid "+o+" `"+a+"` of type `"+E(i)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return p((function(t,n,r,o,a){if(!(t[n]instanceof e)){var i=e.name||s;return new f("Invalid "+o+" `"+a+"` of type `"+((l=t[n]).constructor&&l.constructor.name?l.constructor.name:s)+"` supplied to `"+r+"`, expected instance of `"+i+"`.")}var l;return null}))},node:p((function(e,t,n,r,o){return h(e[t])?null:new f("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return p((function(t,o,a,i,l){if("function"!=typeof e)return new f("Property `"+l+"` of component `"+a+"` has invalid PropType notation inside objectOf.");var c=t[o],u=E(c);if("object"!==u)return new f("Invalid "+i+" `"+l+"` of type `"+u+"` supplied to `"+a+"`, expected an object.");for(var s in c)if(r(c,s)){var d=e(c,s,a,i,l+"."+s,n);if(d instanceof Error)return d}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&a(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),i;function t(t,n,r,o,a){for(var i=t[n],l=0;l<e.length;l++)if(m(i,e[l]))return null;var c=JSON.stringify(e,(function(e,t){return"symbol"===b(t)?String(t):t}));return new f("Invalid "+o+" `"+a+"` of value `"+String(i)+"` supplied to `"+r+"`, expected one of "+c+".")}return p(t)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+g(o)+" at index "+t+"."),i}return p((function(t,o,a,i,l){for(var c=[],u=0;u<e.length;u++){var s=(0,e[u])(t,o,a,i,l,n);if(null==s)return null;s.data&&r(s.data,"expectedType")&&c.push(s.data.expectedType)}return new f("Invalid "+i+" `"+l+"` supplied to `"+a+"`"+(c.length>0?", expected one of type ["+c.join(", ")+"]":"")+".")}))},shape:function(e){return p((function(t,r,o,a,i){var l=t[r],c=E(l);if("object"!==c)return new f("Invalid "+a+" `"+i+"` of type `"+c+"` supplied to `"+o+"`, expected `object`.");for(var u in e){var s=e[u];if("function"!=typeof s)return v(o,a,i,u,b(s));var d=s(l,u,o,a,i+"."+u,n);if(d)return d}return null}))},exact:function(e){return p((function(o,a,i,l,c){var u=o[a],s=E(u);if("object"!==s)return new f("Invalid "+l+" `"+c+"` of type `"+s+"` supplied to `"+i+"`, expected `object`.");var d=t({},o[a],e);for(var m in d){var p=e[m];if(r(e,m)&&"function"!=typeof p)return v(i,l,c,m,b(p));if(!p)return new f("Invalid "+l+" `"+c+"` key `"+m+"` supplied to `"+i+"`.\nBad object: "+JSON.stringify(o[a],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var y=p(u,m,i,l,c+"."+m,n);if(y)return y}return null}))}};function m(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function p(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,i,l,u,d,m,p){if(u=u||s,m=m||l,p!==n){if(c){var y=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw y.name="Invariant Violation",y}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var v=u+":"+l;!t[v]&&r<3&&(a("You are manually calling a React.PropTypes validation function for the `"+m+"` prop on `"+u+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[v]=!0,r++)}}return null==i[l]?o?null===i[l]?new f("The "+d+" `"+m+"` is marked as required in `"+u+"`, but its value is `null`."):new f("The "+d+" `"+m+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(i,l,u,d,m)}var i=o.bind(null,!1);return i.isRequired=o.bind(null,!0),i}function y(e){return p((function(t,n,r,o,a,i){var l=t[n];return E(l)!==e?new f("Invalid "+o+" `"+a+"` of type `"+b(l)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function v(e,t,n,r,o){return new f((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function h(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(h);if(null===e||l(e))return!0;var t=function(e){var t=e&&(u&&e[u]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!h(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!h(o[1]))return!1}return!0;default:return!1}}function E(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function b(e){if(null==e)return""+e;var t=E(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function g(e){var t=b(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return f.prototype=Error.prototype,d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},hn}()(kn.isElement,!0)}else rn.exports=function(){if(gn)return bn;gn=1;var e=Sn();function t(){}function n(){}return n.resetWarningCache=t,bn=function(){function r(t,n,r,o,a,i){if(i!==e){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function o(){return r}r.isRequired=r;var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a}}()();function On(e,t,n,r,o){const a=e[t],i=o||t;if(null==a||"undefined"==typeof window)return null;let l;const c=a.type;return"function"!=typeof c||function(e){const{prototype:t={}}=e;return Boolean(t.isReactComponent)}(c)||(l="Did you accidentally use a plain function component for an element instead?"),void 0!==l?new Error(`Invalid ${r} \`${i}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}tn(rn.exports.element,On).isRequired=tn(rn.exports.element.isRequired,On),tn(rn.exports.elementType,(function(e,t,n,r,o){const a=e[t],i=o||t;if(null==a||"undefined"==typeof window)return null;let l;return"function"!=typeof a||function(e){const{prototype:t={}}=e;return Boolean(t.isReactComponent)}(a)||(l="Did you accidentally provide a plain function component instead?"),void 0!==l?new Error(`Invalid ${r} \`${i}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}));var $n,In={};var Pn,jn,Tn={};
|
|
14
|
+
*/function Fn(){if($n)return In;$n=1;return In="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Wn(){return Pn?Tn:(Pn=1,Tn=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var _n=Vn();gn.exports=function(){if(zn)return Mn;zn=1;var e=Vn(),t=function(){if(On)return kn;On=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}return kn=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(o,a){for(var i,l,c=r(o),u=1;u<arguments.length;u++){for(var s in i=Object(arguments[u]))t.call(i,s)&&(c[s]=i[s]);if(e){l=e(i);for(var d=0;d<l.length;d++)n.call(i,l[d])&&(c[l[d]]=i[l[d]])}}return c},kn}(),n=Fn(),r=Wn(),o=function(){if(Rn)return jn;Rn=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Fn(),n={},r=Wn();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,a,i,l,c){if("production"!==process.env.NODE_ENV)for(var u in o)if(r(o,u)){var s;try{if("function"!=typeof o[u]){var d=Error((l||"React class")+": "+i+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}s=o[u](a,u,l,i,null,t)}catch(e){s=e}if(!s||s instanceof Error||e((l||"React class")+": type specification of "+i+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in n)){n[s.message]=!0;var m=c?c():"";e("Failed "+i+" type: "+s.message+(null!=m?m:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},jn=o}(),a=function(){};function i(){return null}return"production"!==process.env.NODE_ENV&&(a=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Mn=function(l,c){var u="function"==typeof Symbol&&Symbol.iterator,s="<<anonymous>>",d={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:p(i),arrayOf:function(e){return p((function(t,r,o,a,i){if("function"!=typeof e)return new f("Property `"+i+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var l=t[r];if(!Array.isArray(l))return new f("Invalid "+a+" `"+i+"` of type `"+E(l)+"` supplied to `"+o+"`, expected an array.");for(var c=0;c<l.length;c++){var u=e(l,c,o,a,i+"["+c+"]",n);if(u instanceof Error)return u}return null}))},element:p((function(e,t,n,r,o){var a=e[t];return l(a)?null:new f("Invalid "+r+" `"+o+"` of type `"+E(a)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:p((function(t,n,r,o,a){var i=t[n];return e.isValidElementType(i)?null:new f("Invalid "+o+" `"+a+"` of type `"+E(i)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return p((function(t,n,r,o,a){if(!(t[n]instanceof e)){var i=e.name||s;return new f("Invalid "+o+" `"+a+"` of type `"+((l=t[n]).constructor&&l.constructor.name?l.constructor.name:s)+"` supplied to `"+r+"`, expected instance of `"+i+"`.")}var l;return null}))},node:p((function(e,t,n,r,o){return h(e[t])?null:new f("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return p((function(t,o,a,i,l){if("function"!=typeof e)return new f("Property `"+l+"` of component `"+a+"` has invalid PropType notation inside objectOf.");var c=t[o],u=E(c);if("object"!==u)return new f("Invalid "+i+" `"+l+"` of type `"+u+"` supplied to `"+a+"`, expected an object.");for(var s in c)if(r(c,s)){var d=e(c,s,a,i,l+"."+s,n);if(d instanceof Error)return d}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&a(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),i;function t(t,n,r,o,a){for(var i=t[n],l=0;l<e.length;l++)if(m(i,e[l]))return null;var c=JSON.stringify(e,(function(e,t){return"symbol"===b(t)?String(t):t}));return new f("Invalid "+o+" `"+a+"` of value `"+String(i)+"` supplied to `"+r+"`, expected one of "+c+".")}return p(t)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+g(o)+" at index "+t+"."),i}return p((function(t,o,a,i,l){for(var c=[],u=0;u<e.length;u++){var s=(0,e[u])(t,o,a,i,l,n);if(null==s)return null;s.data&&r(s.data,"expectedType")&&c.push(s.data.expectedType)}return new f("Invalid "+i+" `"+l+"` supplied to `"+a+"`"+(c.length>0?", expected one of type ["+c.join(", ")+"]":"")+".")}))},shape:function(e){return p((function(t,r,o,a,i){var l=t[r],c=E(l);if("object"!==c)return new f("Invalid "+a+" `"+i+"` of type `"+c+"` supplied to `"+o+"`, expected `object`.");for(var u in e){var s=e[u];if("function"!=typeof s)return y(o,a,i,u,b(s));var d=s(l,u,o,a,i+"."+u,n);if(d)return d}return null}))},exact:function(e){return p((function(o,a,i,l,c){var u=o[a],s=E(u);if("object"!==s)return new f("Invalid "+l+" `"+c+"` of type `"+s+"` supplied to `"+i+"`, expected `object`.");var d=t({},o[a],e);for(var m in d){var p=e[m];if(r(e,m)&&"function"!=typeof p)return y(i,l,c,m,b(p));if(!p)return new f("Invalid "+l+" `"+c+"` key `"+m+"` supplied to `"+i+"`.\nBad object: "+JSON.stringify(o[a],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var v=p(u,m,i,l,c+"."+m,n);if(v)return v}return null}))}};function m(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function p(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,i,l,u,d,m,p){if(u=u||s,m=m||l,p!==n){if(c){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var y=u+":"+l;!t[y]&&r<3&&(a("You are manually calling a React.PropTypes validation function for the `"+m+"` prop on `"+u+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[y]=!0,r++)}}return null==i[l]?o?null===i[l]?new f("The "+d+" `"+m+"` is marked as required in `"+u+"`, but its value is `null`."):new f("The "+d+" `"+m+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(i,l,u,d,m)}var i=o.bind(null,!1);return i.isRequired=o.bind(null,!0),i}function v(e){return p((function(t,n,r,o,a,i){var l=t[n];return E(l)!==e?new f("Invalid "+o+" `"+a+"` of type `"+b(l)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function y(e,t,n,r,o){return new f((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function h(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(h);if(null===e||l(e))return!0;var t=function(e){var t=e&&(u&&e[u]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!h(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!h(o[1]))return!1}return!0;default:return!1}}function E(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function b(e){if(null==e)return""+e;var t=E(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function g(e){var t=b(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return f.prototype=Error.prototype,d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},Mn}()(_n.isElement,!0)}else gn.exports=function(){if(Dn)return Nn;Dn=1;var e=Fn();function t(){}function n(){}return n.resetWarningCache=t,Nn=function(){function r(t,n,r,o,a,i){if(i!==e){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function o(){return r}r.isRequired=r;var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a}}()();function Bn(e,t,n,r,o){const a=e[t],i=o||t;if(null==a||"undefined"==typeof window)return null;let l;const c=a.type;return"function"!=typeof c||function(e){const{prototype:t={}}=e;return Boolean(t.isReactComponent)}(c)||(l="Did you accidentally use a plain function component for an element instead?"),void 0!==l?new Error(`Invalid ${r} \`${i}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}En(gn.exports.element,Bn).isRequired=En(gn.exports.element.isRequired,Bn),En(gn.exports.elementType,(function(e,t,n,r,o){const a=e[t],i=o||t;if(null==a||"undefined"==typeof window)return null;let l;return"function"!=typeof a||function(e){const{prototype:t={}}=e;return Boolean(t.isReactComponent)}(a)||(l="Did you accidentally provide a plain function component instead?"),void 0!==l?new Error(`Invalid ${r} \`${i}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}));var Ln,qn={};var Un,Hn,Yn={};
|
|
15
15
|
/**
|
|
16
16
|
* @license React
|
|
17
17
|
* react-is.development.js
|
|
@@ -20,5 +20,5 @@ object-assign
|
|
|
20
20
|
*
|
|
21
21
|
* This source code is licensed under the MIT license found in the
|
|
22
22
|
* LICENSE file in the root directory of this source tree.
|
|
23
|
-
*/jn={exports:{}},"production"===process.env.NODE_ENV?jn.exports=function(){if($n)return In;$n=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen");function y(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case r:case a:case o:case s:case d:return e;default:switch(e=e&&e.$$typeof){case c:case l:case u:case f:case m:case i:return e;default:return p}}case n:return p}}}return e=Symbol.for("react.module.reference"),In.ContextConsumer=l,In.ContextProvider=i,In.Element=t,In.ForwardRef=u,In.Fragment=r,In.Lazy=f,In.Memo=m,In.Portal=n,In.Profiler=a,In.StrictMode=o,In.Suspense=s,In.SuspenseList=d,In.isAsyncMode=function(){return!1},In.isConcurrentMode=function(){return!1},In.isContextConsumer=function(e){return y(e)===l},In.isContextProvider=function(e){return y(e)===i},In.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},In.isForwardRef=function(e){return y(e)===u},In.isFragment=function(e){return y(e)===r},In.isLazy=function(e){return y(e)===f},In.isMemo=function(e){return y(e)===m},In.isPortal=function(e){return y(e)===n},In.isProfiler=function(e){return y(e)===a},In.isStrictMode=function(e){return y(e)===o},In.isSuspense=function(e){return y(e)===s},In.isSuspenseList=function(e){return y(e)===d},In.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===s||t===d||t===p||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===m||t.$$typeof===i||t.$$typeof===l||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},In.typeOf=y,In}():jn.exports=(Pn||(Pn=1,"production"!==process.env.NODE_ENV&&function(){var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen");function y(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var y=e.type;switch(y){case r:case a:case o:case s:case d:return y;default:var v=y&&y.$$typeof;switch(v){case c:case l:case u:case f:case m:case i:return v;default:return p}}case n:return p}}}e=Symbol.for("react.module.reference");var v=l,h=i,E=t,b=u,g=r,x=f,w=m,S=n,C=a,k=o,O=s,$=d,I=!1,P=!1;Tn.ContextConsumer=v,Tn.ContextProvider=h,Tn.Element=E,Tn.ForwardRef=b,Tn.Fragment=g,Tn.Lazy=x,Tn.Memo=w,Tn.Portal=S,Tn.Profiler=C,Tn.StrictMode=k,Tn.Suspense=O,Tn.SuspenseList=$,Tn.isAsyncMode=function(e){return I||(I=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1},Tn.isConcurrentMode=function(e){return P||(P=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1},Tn.isContextConsumer=function(e){return y(e)===l},Tn.isContextProvider=function(e){return y(e)===i},Tn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Tn.isForwardRef=function(e){return y(e)===u},Tn.isFragment=function(e){return y(e)===r},Tn.isLazy=function(e){return y(e)===f},Tn.isMemo=function(e){return y(e)===m},Tn.isPortal=function(e){return y(e)===n},Tn.isProfiler=function(e){return y(e)===a},Tn.isStrictMode=function(e){return y(e)===o},Tn.isSuspense=function(e){return y(e)===s},Tn.isSuspenseList=function(e){return y(e)===d},Tn.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===s||t===d||t===p||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===m||t.$$typeof===i||t.$$typeof===l||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},Tn.typeOf=y}()),Tn),"undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),rn.exports.oneOfType([rn.exports.func,rn.exports.object]);const Rn={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};const Mn=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function Nn(e,t,n,r){const o=e[t];if(null==o||!Mn(o)){const e=function(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return null===e?"null":e.constructor.name;default:return t}}(o);return new RangeError(`Invalid ${r} \`${t}\` of type \`${e}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function Dn(e,t,...n){return void 0===e[t]?null:Nn(e,t,...n)}function Fn(){return null}Dn.isRequired=Nn,Fn.isRequired=Fn,process.env.NODE_ENV;var zn=function(e){var t=e.order,r=e.orderBy,o=e.headCells,a=e.onRequestSort;return re.createElement(B,null,re.createElement(U,null,o.map((function(e){return re.createElement(H,{variant:"head",key:String(e.id),padding:e.disablePadding?"none":"normal",sortDirection:r===e.id&&t,sx:{fontWeight:"bold"}},e.sort?re.createElement(Y,{active:r===e.id,direction:r===e.id?t:"asc",onClick:(o=e.id,function(){a(o)})},e.label,r===e.id?re.createElement(n,{component:"span",sx:Rn},"desc"===t?"sorted descending":"sorted ascending"):null):e.label);var o}))))};function _n(e,t,n){return t[n]<e[n]?-1:t[n]>e[n]?1:0}var Vn=function(t){var r=t.children,o=t.data,i=t.search,l=t.columns,c=t.defaultSort,u=t.defaultOrder,s=void 0===u?"asc":u,d=t.loading,f=void 0!==d&&d,p=oe(""),y=p[0],v=p[1],h=oe(s),E=h[0],b=h[1],g=oe(c),x=g[0],w=g[1],S=o.slice().filter(function(e,t){return function(n){return!t||e.some((function(e){var r=n[e.id];return(null==r?void 0:r.toLowerCase)&&(r=r.toLowerCase()),null==r?void 0:r.toString().includes(t.toLowerCase())}))}}(l,y)).sort(function(e,t){return"desc"===e?function(e,n){return _n(e,n,t)}:function(e,n){return-_n(e,n,t)}}(E,x));return re.createElement(re.Fragment,null,re.createElement(n,{sx:{paddingX:1,paddingBottom:2}},i&&re.createElement(n,{paddingY:2},re.createElement(a,{fullWidth:!0,placeholder:"Search",InputProps:{role:"search",startAdornment:re.createElement(e,{position:"start"},re.createElement(Re,null))},onChange:function(e){return v(e.target.value)}})),re.createElement(G,null,re.createElement(J,null,re.createElement(zn,{order:E,orderBy:x,headCells:l,onRequestSort:function(e){b(x===e&&"asc"===E?"desc":"asc"),w(e)}}),re.createElement(X,null,f?re.createElement(U,null,re.createElement(H,{colSpan:l.length,sx:{textAlign:"center"}},re.createElement(m,null))):0===S.length?re.createElement(U,null,re.createElement(H,{colSpan:l.length,sx:{textAlign:"center"}},"No data")):r(S))))))};Vn.defaultProps={defaultOrder:"asc"};var An=function(e){var t=e.children,n=e.data,r=e.loading,o=e.columns,a=e.defaultSort,i=e.defaultOrder,l=e.onRequestSort,c=oe({orderBy:a,order:i||"asc"}),u=c[0],s=c[1];return re.createElement(re.Fragment,null,re.createElement(G,null,re.createElement(J,null,re.createElement(zn,{order:u.order,orderBy:u.orderBy,headCells:o,onRequestSort:function(e){s((function(t){var n=t.orderBy,r=t.order,o=n===e&&"asc"===r?"desc":"asc";return l(e,o),{orderBy:e,order:o}}))}}),re.createElement(X,null,r?re.createElement(U,null,re.createElement(H,{colSpan:o.length,sx:{textAlign:"center"}},re.createElement(m,null))):n.map((function(e,n){return t(e,n)}))))))},Wn=function(e){var o=e.title,a=e.subtitle,i=e.icon,l=e.iconSize,c=void 0===l?200:l,u=e.actions;return re.createElement(n,{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center"},i&&i({size:c,color:"primary"}),re.createElement(r,{variant:"h4",role:"heading","aria-level":1},o),re.createElement(r,{variant:"subtitle1",role:"heading","aria-level":2,sx:{mt:2}},a),u&&re.createElement(n,{sx:{pt:2}},u.map((function(e,n){var r=e.id,o=e.text,a=e.href,i=e.onClick;return re.createElement(t,{key:r,role:"button",variant:"contained",href:a,onClick:i,sx:{mr:n<u.length-1?2:0}},o)}))))},qn=function(e){var t=e.width,r=void 0===t?"100%":t,o=e.animation,a=void 0!==o&&o;return re.createElement(n,{width:r},re.createElement(K,{animation:a,variant:"rectangular",height:118}),re.createElement(K,{animation:a,variant:"rectangular",height:16,sx:{my:1}}),re.createElement(K,{animation:a,variant:"rectangular",width:"80%",height:16}))},Ln=function(e){var t=e.size,n=void 0===t?20:t;return re.createElement(s,{container:!0,spacing:2},Ot(n,0).map((function(e,t){return re.createElement(s,{item:!0,key:t,xs:4},re.createElement(qn,{width:1}))})))},Bn=function(e){var t=e.size,n=void 0===t?20:t,r=e.children,o=e.p;return re.createElement(E,{component:"main",sx:{p:o},"data-testid":"content-placeholder-test"},r,re.createElement(Ln,{size:n}))},Un=function(e){var t=e.count,n=void 0===t?3:t,o=e.units,a=void 0===o?"paragraph":o,i=e.variant,l=void 0===i?"body1":i;return re.createElement(r,{variant:l},Be({count:n,units:a}))},Hn=xe("div")((function(e){var t=e.theme;return et({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),Yn=function(e){var t=e.children,r=t[0],o=t[1],a=t[2];return re.createElement(n,{sx:{display:"flex"}},re.createElement(Lt,null,r,o,re.createElement(n,{sx:{flexGrow:1}},re.createElement(Hn,null),a)))},Gn=function(e){var t=e.loading,r=e.children,o=r[0],a=r[1];return re.createElement(Ft,null,re.createElement(n,{display:"flex",flexDirection:"column",height:1},o,t?re.createElement(ut,null):a))},Jn=function(e,t){var n=e.id,r=e.name,o=e.type,a=t[n];return"boolean"===o?re.createElement(Ze,{label:r,value:a}):"date"===o||"time"===o||"datetime"===o?re.createElement(rt,{label:r,value:a,format:e.format}):re.createElement(Ke,{label:r,value:null==a?void 0:a.toString()})},Xn=function(e){var t=e.field,n=t.name,r=t.description,o=t.value,a=e.instance;return re.createElement(lt,{title:n,subtitle:r},o.map((function(e){var t=e.id,n=e.xs,r=e.sm,o=e.md,i=e.lg,l=e.xl;return re.createElement(it,{key:t,xs:n,sm:r,md:o,lg:i,xl:l},Jn(e,a))})))},Kn=function(e){var t=e.model,n=e.instance;return re.createElement(s,{container:!0,spacing:2},t.fields.map((function(e){var t=e.id,r=e.type,o=e.xs,a=void 0===o?3:o,i=e.sm,l=e.md,c=e.lg,u=e.xl;return"group"===r?re.createElement(s,{item:!0,key:t,xs:12},re.createElement(Xn,{field:e,instance:n[t]})):re.createElement(s,{item:!0,key:t,xs:a,sm:i,md:l,lg:c,xl:u},re.createElement(Qe,null,Jn(e,n)))})))},Qn={string:"",number:0,boolean:!1,enum:"",multienum:[],date:new Date(1970,0,1,0,0),time:new Date(1970,0,1,0,0),datetime:new Date(1970,0,1,0,0),group:{}},Zn=function(e,t){return t&&t[e.id]||"default"in e&&e.default||Qn[e.type]},er=function(e,t){void 0===t&&(t=void 0);var n={};return e.fields.forEach((function(e){if("group"===e.type){var r={};e.value.forEach((function(n){r[n.id]=Zn(n,t&&t[e.id])})),n[e.id]=r}else n[e.id]=Zn(e,t)})),n},tr=function(e){var o=e.model,i=e.saveButtonText,c=e.onSubmit,u=e.initialValues,d=de((function(){return er(o,u)}),[o,u]),m=oe(d),f=m[0],p=m[1],y=function(e,t,n){p((function(r){var o,a={};return t?a[t]=et(et({},r[t]),((o={})[e]=n,o)):a[e]=n,et(et({},r),a)}))},v=function(e,t,n){y(n,t,e)},h=function(e,t){void 0===t&&(t=void 0);var o,i=ot({lightWeight:200,darkWeight:800}),c=e.id,u=e.type,d=e.name,m=e.description,p=e.xs,E=e.sm,b=e.md,g=e.lg,x=e.xl,w=t?f[t][c]:f[c];return o="group"===u?re.createElement(l,null,re.createElement(n,{bgcolor:i,px:2,py:1,mb:2},re.createElement(r,{variant:"h6",role:"heading","aria-level":1},d),re.createElement(r,{variant:"body2",role:"heading","aria-level":2},m)),re.createElement(s,{container:!0,spacing:2,sx:{p:2}},e.value.map((function(e){return h(e,c)})))):"boolean"===u?re.createElement(n,{sx:{height:1,display:"flex",alignItems:"center"}},re.createElement(Q,{control:re.createElement(Z,{name:c,onChange:function(e){return function(e,t){e.preventDefault(),y(e.target.name,t,e.target.checked)}(e,t)},checked:w}),label:d})):"enum"===u?re.createElement(_,{fullWidth:!0},re.createElement(V,{id:"".concat(c,"-select-label")},d),re.createElement(A,{labelId:"".concat(c,"-select-label"),id:"".concat(c,"-select"),value:w,label:d,name:c,onChange:function(e){return function(e,t){e.preventDefault(),y(e.target.name,t,e.target.value)}(e,t)},required:!0},e.value.map((function(e){return re.createElement(ee,{key:e,value:e},e)})))):"multienum"===u?re.createElement(_,{fullWidth:!0},re.createElement(V,{id:"".concat(c,"-select-label")},d),re.createElement(A,{labelId:"".concat(c,"-select-label"),id:"".concat(c,"-select"),value:w||[],renderValue:function(e){return e.join(", ")},label:d,name:c,onChange:function(e){return function(e,t){e.preventDefault();var n=e.target.value,r="string"==typeof n?n.split(","):n;y(e.target.name,t,r)}(e,t)},required:!0,multiple:!0},e.value.map((function(e){return re.createElement(ee,{key:e,value:e},re.createElement(Z,{checked:(w||[]).includes(e)}),re.createElement(N,{primary:e}))})))):"date"===u?re.createElement(ge,{label:d,inputFormat:e.format,value:w,onChange:function(e){return v(e,t,c)},renderInput:function(e){return re.createElement(a,et({},e))}}):"time"===u?re.createElement(Ee,{label:d,inputFormat:e.format,value:w,onChange:function(e){return v(e,t,c)},renderInput:function(e){return re.createElement(a,et({},e))}}):"datetime"===u?re.createElement(he,{label:d,inputFormat:e.format,value:w,onChange:function(e){return v(e,t,c)},renderInput:function(e){return re.createElement(a,et({},e))}}):re.createElement(a,{required:!0,type:u,label:d,name:c,variant:"outlined",fullWidth:!0,value:w,onChange:function(e){return function(e,t,n){e.preventDefault();var r=e.target.value;"number"===n&&"string"==typeof r&&(r=parseInt(e.target.value)),y(e.target.name,t,r)}(e,t,u)}}),re.createElement(s,{item:!0,key:c,xs:p,sm:E,md:b,lg:g,xl:x},o)};return re.createElement(s,{container:!0,component:"form",spacing:2,onSubmit:function(e){e.preventDefault(),c(f)}},o.fields.map((function(e){return h(e)})),re.createElement(s,{item:!0,xs:12},re.createElement(t,{type:"submit",variant:"contained"},i)))},nr=function(e,t,n){var r=n.from,o=n.to,a=ce(),i=Fe();ue((function(){a.current===r&&t===o&&i(e),a.current=t}),[t])},rr=function(e){var t=e.model,n=e.modelName,r=e.basePath,o=void 0===r?"":r,a=e.submitUpdateItemRequest,i=e.updateItemRequest,l=e.updateItem,c=e.onSubmitUpdateItem,u=e.onRequestUpdateItem,s=ze().id,d=void 0===s?"":s,m=i.loading||a.loading;return ue((function(){u(d)}),[d]),Rt({title:"Item updated",message:"The item ".concat(d," has been updated successfully"),severity:"success"},!!a.success,{from:!1,to:!0}),nr("".concat(o,"/"),!!a.success,{from:!1,to:!0}),Rt({title:"We had an error",message:a.error||"",severity:"error"},!!a.error,{from:!1,to:!0}),re.createElement(Gn,{loading:m},re.createElement(zt,{title:"Edit ".concat(d),preset:"default",breadcrumbs:[{id:"list",text:n,link:"".concat(o,"/")},{id:"update",text:"Edit ".concat(d),link:"".concat(o,"/").concat(d,"/update")}]}),re.createElement(_t,null,re.createElement(tr,{model:t,initialValues:l,saveButtonText:"Save",onSubmit:c})))},or=function(e){var t=e.columns,n=e.options,r=e.data,o=e.onClick,a=e.search,l=e.defaultSort,c=e.defaultOrder,u=e.loading,s=nt(nt([],t,!0),[{id:"__options",label:"",disablePadding:!1,numeric:!1,sort:!1}],!1),d=re.useState(null),m=d[0],f=d[1];return re.createElement(re.Fragment,null,re.createElement(Vn,{columns:s,data:r,search:a,defaultSort:l,defaultOrder:c,loading:u},(function(e){return e.map((function(e,t){return re.createElement(U,{key:e.id,onClick:function(){return o&&o(e)},role:"row","aria-rowindex":t,sx:{cursor:o&&"pointer"}},s.map((function(n,r){var o=n.id;return re.createElement(H,{role:"cell",scope:"row",key:o.toString(),"aria-rowindex":t,"aria-colindex":r},e[o])})),n&&re.createElement(H,null,re.createElement(i,{"data-testid":"options-".concat(e.id),onClick:function(t){t.stopPropagation(),f({item:e,anchor:t.currentTarget})}},re.createElement(Ue,null))))}))})),n&&re.createElement(te,{anchorEl:null==m?void 0:m.anchor,open:!!m,onClose:function(){return f(null)},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},n.map((function(e){var t=e.id,n=e.label,r=e.onClick;return re.createElement(ee,{key:t,onClick:function(){m&&r(null==m?void 0:m.item),f(null)}},n)}))))},ar=function(e){var t=e.model,n=e.modelName,r=e.listData,o=e.listRequest,a=e.deleteRequest,i=e.basePath,l=void 0===i?"":i,c=e.deleteFeature,u=void 0===c||c,s=e.updateFeature,d=void 0===s||s,m=e.addFeature,f=void 0===m||m,p=e.detailsFeature,y=void 0===p||p,v=e.onRequestList,h=e.onClickDeleteItem,E=Fe();ue((function(){v()}),[]),Rt({title:"Item deleted",message:"The item has been deleted successfully",severity:"success"},!!a.success,{from:!1,to:!0}),Rt({title:"We had an error",message:a.error||"",severity:"error"},!!a.error,{from:!1,to:!0});var b=y?function(e){E("".concat(l,"/").concat(e.id))}:void 0,g=function(e,t){"edit"===e?E("".concat(l,"/").concat(t.id,"/update")):h(t)},x=[];d&&x.push({id:"edit",label:"Edit",onClick:function(e){return g("edit",e)}}),u&&x.push({id:"remove",label:"Remove",onClick:function(e){return g("remove",e)}});var w=[];return f&&w.push({id:"add",text:"Add",href:"".concat(l,"/add")}),re.createElement(Gn,{loading:o.loading||a.loading},re.createElement(zt,{title:n,preset:"default",actions:w.length>0?w:void 0}),re.createElement(_t,null,re.createElement(or,{columns:t.fields.filter((function(e){return e.listable})).map((function(e){return{disablePadding:!1,id:e.id,label:e.name,numeric:"number"===e.type,sort:!1}})),data:r,defaultSort:t.fields[0].id,onClick:b,options:x.length>0?x:void 0})))},ir=function(e){var t=e.model,n=e.modelName,r=e.basePath,o=void 0===r?"":r,a=e.onSubmitNewItem,i=e.newItemRequest;return Rt({message:"Item added successfully",severity:"success"},!!i.success,{from:!1,to:!0}),nr("".concat(o,"/"),!!i.success,{from:!1,to:!0}),Rt({title:"We had an error",message:i.error||"",severity:"error"},!!i.error,{from:!1,to:!0}),re.createElement(Gn,{loading:i.loading},re.createElement(zt,{title:"Add ".concat(n),preset:"default",breadcrumbs:[{id:"list",text:n,link:"".concat(o,"/")},{id:"add",text:"Add new ".concat(n),link:"".concat(o,"/add")}]}),re.createElement(_t,null,re.createElement(tr,{model:t,saveButtonText:"Save",onSubmit:a})))},lr=function(e){var t=e.model,n=e.modelName,r=e.basePath,o=void 0===r?"":r,a=e.onRequestItem,i=e.itemRequest,l=e.detailsItem,c=ze().id,u=void 0===c?"":c;return ue((function(){a(u)}),[u]),re.createElement(Gn,{loading:i.loading},re.createElement(zt,{title:u,preset:"default",breadcrumbs:[{id:"list",text:n,link:"".concat(o,"/")},{id:"detail",text:u,link:"".concat(o,"/").concat(u)}]}),re.createElement(_t,null,l&&re.createElement(Kn,{model:t,instance:l})))},cr=function(e){var t=e.updateFeature,n=void 0===t||t,r=e.addFeature,o=void 0===r||r,a=e.detailsFeature,i=void 0===a||a;return re.createElement(_e,null,re.createElement(Ve,{path:"",element:re.createElement(ar,et({},e))}),i&&re.createElement(Ve,{path:":id",element:re.createElement(lr,et({},e))}),o&&re.createElement(Ve,{path:"add",element:re.createElement(ir,et({},e))}),n&&re.createElement(Ve,{path:":id/update",element:re.createElement(rr,et({},e))}))},ur={idle:!0},sr={loading:!0},dr={success:!0};export{Yn as AppBarWithDrawerLayout,xt as Bullet,Vt as CenterContainer,_t as Content,Bn as ContentPlaceholder,Ge as DefaultPlaceholder,Wt as Drawer,Gt as DrawerContent,dt as DrawerContext,Ut as DrawerItem,Lt as DrawerProvider,Yt as DrawerSection,An as EnhancedRemoteTable,Xt as EnhancedSelect,Vn as EnhancedTable,zn as EnhancedTableHead,lt as GroupValueCard,it as GroupValueItem,zt as Header,Gn as HeaderLayout,ur as IdleRequest,St as Label,ut as LoadingArea,sr as LoadingRequest,Un as LoremIpsumPlaceholder,bt as MiniAppBar,qt as MiniDrawer,tr as ModelForm,cr as ModelRouter,Pt as NotificationCenterContext,Tt as NotificationCenterProvider,It as NotificationCenterProviderUndefinedError,Kn as ObjectDetails,Wn as Placeholder,st as QueryContainer,Kt as SignIn,qn as SkeletonCard,Ln as SkeletonGrid,dr as SuccessRequest,en as TabCard,Mt as TabContext,Nt as TabContextProvider,Qt as TabPanel,Ft as TabProvider,or as TableList,mt as UndefinedProvider,Ze as ValueBoolean,Qe as ValueCard,rt as ValueDatetime,He as ValueEditButtons,ct as ValueRating,Ke as ValueText,gt as bulletClasses,$t as getRandomItem,at as groupValueItemClasses,wt as labelClasses,Ot as newArrayWithSize,er as newInstanceFromValuesOrZeroValue,ft as useDrawer,Ye as useEditableValueDisplay,ot as useGetDefaultThemeColor,jt as useNotificationCenter,Rt as useNotifyWhenValueChanges,Dt as useTab};
|
|
23
|
+
*/Hn={exports:{}},"production"===process.env.NODE_ENV?Hn.exports=function(){if(Ln)return qn;Ln=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case r:case a:case o:case s:case d:return e;default:switch(e=e&&e.$$typeof){case c:case l:case u:case f:case m:case i:return e;default:return p}}case n:return p}}}return e=Symbol.for("react.module.reference"),qn.ContextConsumer=l,qn.ContextProvider=i,qn.Element=t,qn.ForwardRef=u,qn.Fragment=r,qn.Lazy=f,qn.Memo=m,qn.Portal=n,qn.Profiler=a,qn.StrictMode=o,qn.Suspense=s,qn.SuspenseList=d,qn.isAsyncMode=function(){return!1},qn.isConcurrentMode=function(){return!1},qn.isContextConsumer=function(e){return v(e)===l},qn.isContextProvider=function(e){return v(e)===i},qn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},qn.isForwardRef=function(e){return v(e)===u},qn.isFragment=function(e){return v(e)===r},qn.isLazy=function(e){return v(e)===f},qn.isMemo=function(e){return v(e)===m},qn.isPortal=function(e){return v(e)===n},qn.isProfiler=function(e){return v(e)===a},qn.isStrictMode=function(e){return v(e)===o},qn.isSuspense=function(e){return v(e)===s},qn.isSuspenseList=function(e){return v(e)===d},qn.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===s||t===d||t===p||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===m||t.$$typeof===i||t.$$typeof===l||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},qn.typeOf=v,qn}():Hn.exports=(Un||(Un=1,"production"!==process.env.NODE_ENV&&function(){var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var v=e.type;switch(v){case r:case a:case o:case s:case d:return v;default:var y=v&&v.$$typeof;switch(y){case c:case l:case u:case f:case m:case i:return y;default:return p}}case n:return p}}}e=Symbol.for("react.module.reference");var y=l,h=i,E=t,b=u,g=r,x=f,C=m,w=n,S=a,k=o,O=s,I=d,$=!1,T=!1;Yn.ContextConsumer=y,Yn.ContextProvider=h,Yn.Element=E,Yn.ForwardRef=b,Yn.Fragment=g,Yn.Lazy=x,Yn.Memo=C,Yn.Portal=w,Yn.Profiler=S,Yn.StrictMode=k,Yn.Suspense=O,Yn.SuspenseList=I,Yn.isAsyncMode=function(e){return $||($=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1},Yn.isConcurrentMode=function(e){return T||(T=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1},Yn.isContextConsumer=function(e){return v(e)===l},Yn.isContextProvider=function(e){return v(e)===i},Yn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Yn.isForwardRef=function(e){return v(e)===u},Yn.isFragment=function(e){return v(e)===r},Yn.isLazy=function(e){return v(e)===f},Yn.isMemo=function(e){return v(e)===m},Yn.isPortal=function(e){return v(e)===n},Yn.isProfiler=function(e){return v(e)===a},Yn.isStrictMode=function(e){return v(e)===o},Yn.isSuspense=function(e){return v(e)===s},Yn.isSuspenseList=function(e){return v(e)===d},Yn.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===s||t===d||t===p||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===m||t.$$typeof===i||t.$$typeof===l||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},Yn.typeOf=v}()),Yn),"undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),gn.exports.oneOfType([gn.exports.func,gn.exports.object]);let Gn=0;const Jn=ye.useId;function Xn(e){if(void 0!==Jn){const t=Jn();return null!=e?e:t}return function(e){const[t,n]=ye.useState(e),r=e||t;return ye.useEffect((()=>{null==t&&(Gn+=1,n(`mui-${Gn}`))}),[t]),r}(e)}const Kn={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};const Qn=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function Zn(e,t,n,r){const o=e[t];if(null==o||!Qn(o)){const e=function(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return null===e?"null":e.constructor.name;default:return t}}(o);return new RangeError(`Invalid ${r} \`${t}\` of type \`${e}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function er(e,t,...n){return void 0===e[t]?null:Zn(e,t,...n)}function tr(){return null}er.isRequired=Zn,tr.isRequired=tr,process.env.NODE_ENV;var nr=function(t){var n,r=t.id,o=t.label,a=t.InputLabelProps,i=t.InputProps,l=t.fetching,c=t.loading,u=t.helperText,s=t.hexColor,d=t.size,f=t.fullWidth,p=t.sx,v=ht(t,["id","label","InputLabelProps","InputProps","fetching","loading","helperText","hexColor","size","fullWidth","sx"]),y=Xn(r),h=u&&y?"".concat(y,"-helper-text"):void 0,E=o&&y?"".concat(y,"-label"):void 0,b=s?((n={})["& .".concat(L.notchedOutline)]={borderColor:"".concat(s," !important")},n["& .".concat(q.root)]={color:s},n["& .".concat(L.input)]={color:s},n["& .".concat(U.root)]={color:s},n["& .".concat(H.bar)]={backgroundColor:s},n["& .".concat(Y.endAdornment," .").concat(G.root)]={color:s},n):{};return he.createElement(V,{sx:b,fullWidth:f},he.createElement(F,yt({size:"small"===d?"small":"normal",id:E,htmlFor:y},a),o),he.createElement(J,yt({},i,{id:y,label:o,size:d,fullWidth:f,endAdornment:he.createElement(e,{position:"end"},null==i?void 0:i.endAdornment,l?he.createElement(m,{color:"inherit",size:20,sx:{ml:1}}):null),sx:p},v)),c&&he.createElement(_,{color:"inherit",sx:{position:"absolute",left:0,right:0,bottom:0}}),u&&he.createElement(X,{id:h},u))},rr=function(e){var t=e.label,n=e.loading,r=e.fetching,o=e.options,a=e.helperText,i=e.color,l=e.onChangeValue,c=void 0===l?function(){return null}:l,u=e.sx,s=ht(e,["label","loading","fetching","options","helperText","color","onChangeValue","sx"]),d=n||r;return he.createElement(K,yt({loading:d,options:r?[]:o,onChange:function(e,t){return c(t)}},s,{renderInput:function(e){return he.createElement(nr,yt({},e,{label:t,fullWidth:!0,fetching:r,loading:n,hexColor:i,helperText:a}))},sx:u}))};function or(e){var t=e.children,r=e.index,o=Kt()[0],a=o===r;return Array.isArray(r)&&(a=r.includes(o)),he.createElement("div",{role:"tabpanel",hidden:!a,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},a&&he.createElement(n,{sx:{p:3}},t))}var ar=$(g)((function(e){var t,n=e.theme;return(t={})["&.".concat(Q.root)]={backgroundColor:n.palette.grey[100]},t})),ir=function(e){var t=e.children,n=e.tabs,r=Kt(),o=r[0],a=r[1];return he.createElement(l,null,he.createElement(ar,{value:o,onChange:function(e,t){return a(t)}},n.map((function(e){return he.createElement(x,{key:e,label:e})}))),t)},lr=function(e){var t=e.order,r=e.orderBy,o=e.headCells,a=e.onRequestSort;return he.createElement(Z,null,he.createElement(ee,null,o.map((function(e){return he.createElement(te,{variant:"head",key:String(e.id),padding:e.disablePadding?"none":"normal",sortDirection:r===e.id&&t,sx:{fontWeight:"bold"}},e.sort?he.createElement(ne,{active:r===e.id,direction:r===e.id?t:"asc",onClick:(o=e.id,function(){a(o)})},e.label,r===e.id?he.createElement(n,{component:"span",sx:Kn},"desc"===t?"sorted descending":"sorted ascending"):null):e.label);var o}))))};function cr(e,t,n){return t[n]<e[n]?-1:t[n]>e[n]?1:0}var ur=function(t){var r=t.children,o=t.data,i=t.search,l=t.columns,c=t.defaultSort,u=t.defaultOrder,s=void 0===u?"asc":u,d=t.loading,f=void 0!==d&&d,p=Ee(""),v=p[0],y=p[1],h=Ee(s),E=h[0],b=h[1],g=Ee(c),x=g[0],C=g[1],w=o.slice().filter(function(e,t){return function(n){return!t||e.some((function(e){var r=n[e.id];return(null==r?void 0:r.toLowerCase)&&(r=r.toLowerCase()),null==r?void 0:r.toString().includes(t.toLowerCase())}))}}(l,v)).sort(function(e,t){return"desc"===e?function(e,n){return cr(e,n,t)}:function(e,n){return-cr(e,n,t)}}(E,x));return he.createElement(he.Fragment,null,he.createElement(n,{sx:{paddingX:1,paddingBottom:2}},i&&he.createElement(n,{paddingY:2},he.createElement(a,{fullWidth:!0,placeholder:"Search",InputProps:{role:"search",startAdornment:he.createElement(e,{position:"start"},he.createElement(He,null))},onChange:function(e){return y(e.target.value)}})),he.createElement(re,null,he.createElement(oe,null,he.createElement(lr,{order:E,orderBy:x,headCells:l,onRequestSort:function(e){b(x===e&&"asc"===E?"desc":"asc"),C(e)}}),he.createElement(ae,null,f?he.createElement(ee,null,he.createElement(te,{colSpan:l.length,sx:{textAlign:"center"}},he.createElement(m,null))):0===w.length?he.createElement(ee,null,he.createElement(te,{colSpan:l.length,sx:{textAlign:"center"}},"No data")):r(w))))))};ur.defaultProps={defaultOrder:"asc"};var sr,dr=function(e){var t=e.children,n=e.data,r=e.loading,o=e.columns,a=e.defaultSort,i=e.defaultOrder,l=e.onRequestSort,c=Ee({orderBy:a,order:i||"asc"}),u=c[0],s=c[1];return he.createElement(he.Fragment,null,he.createElement(re,null,he.createElement(oe,null,he.createElement(lr,{order:u.order,orderBy:u.orderBy,headCells:o,onRequestSort:function(e){s((function(t){var n=t.orderBy,r=t.order,o=n===e&&"asc"===r?"desc":"asc";return l(e,o),{orderBy:e,order:o}}))}}),he.createElement(ae,null,r?he.createElement(ee,null,he.createElement(te,{colSpan:o.length,sx:{textAlign:"center"}},he.createElement(m,null))):n.map((function(e,n){return t(e,n)}))))))},mr=function(e){var o=e.title,a=e.subtitle,i=e.icon,l=e.iconSize,c=void 0===l?200:l,u=e.actions;return he.createElement(n,{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center"},i&&i({size:c,color:"primary"}),he.createElement(r,{variant:"h4",role:"heading","aria-level":1},o),he.createElement(r,{variant:"subtitle1",role:"heading","aria-level":2,sx:{mt:2}},a),u&&he.createElement(n,{sx:{pt:2}},u.map((function(e,n){var r=e.id,o=e.text,a=e.href,i=e.onClick;return he.createElement(t,{key:r,role:"button",variant:"contained",href:a,onClick:i,sx:{mr:n<u.length-1?2:0}},o)}))))},fr=function(e){var t=e.width,r=void 0===t?"100%":t,o=e.animation,a=void 0!==o&&o;return he.createElement(n,{width:r},he.createElement(ie,{animation:a,variant:"rectangular",height:118}),he.createElement(ie,{animation:a,variant:"rectangular",height:16,sx:{my:1}}),he.createElement(ie,{animation:a,variant:"rectangular",width:"80%",height:16}))},pr=function(e){var t=e.size,n=void 0===t?20:t;return he.createElement(s,{container:!0,spacing:2},Bt(n,0).map((function(e,t){return he.createElement(s,{item:!0,key:t,xs:4},he.createElement(fr,{width:1}))})))},vr=function(e){var t=e.size,n=void 0===t?20:t,r=e.children,o=e.p;return he.createElement(E,{component:"main",sx:{p:o},"data-testid":"content-placeholder-test"},r,he.createElement(pr,{size:n}))},yr=function(e){var t=e.count,n=void 0===t?3:t,o=e.units,a=void 0===o?"paragraph":o,i=e.variant,l=void 0===i?"body1":i;return he.createElement(r,{variant:l},it({count:n,units:a}))},hr=((sr={})["& .".concat(le.message)]={width:1},sr),Er=function(e){var t=e.severity,r=e.iconMapping,o=e.title,a=e.message,l=e.metadata,c=e.onClose,u=Ee(!1),s=u[0],d=u[1];return he.createElement(f,{severity:t,iconMapping:r,onClose:c,action:he.createElement(n,{display:"flex",flexDirection:"column"},he.createElement(i,{color:"inherit",onClick:c},he.createElement(Te,{fontSize:"small"})),l&&he.createElement(i,{color:"inherit",onClick:function(){return d((function(e){return!e}))}},s?he.createElement(rt,{fontSize:"small"}):he.createElement(ot,{fontSize:"small"}))),sx:hr},he.createElement(n,{sx:{w:1}},o&&he.createElement(p,null,o),a,l&&he.createElement(N,{in:s,sx:{mt:2}},he.createElement(nn,{content:l}))))},br=function(e){var r=e.open,o=e.title,a=e.component,l=e.componentProps,c=void 0===l?{}:l,u=e.disabled,s=e.actions,d=void 0===s?[]:s,f=e.children,p=e.loading,v=e.cancelable,y=e.callCloseWhenCancel,h=void 0===y||y,E=e.acceptable,b=e.acceptText,g=void 0===b?"Accept":b,x=e.cancelText,C=void 0===x?"Cancel":x,w=e.onAccept,S=e.onCancel,k=void 0===S?function(){return null}:S,O=e.onClose,I=e.acceptType,$=void 0===I?"button":I,T=d.length>0||E||v;return he.createElement(ce,{open:r,onClose:O},he.createElement(ue,{sx:{display:"flex",alignItems:"center"}},o,p&&!E&&he.createElement(m,{size:20,sx:{ml:2,color:function(e){return e.palette.grey[500]}}}),he.createElement(i,{disabled:u,"aria-label":"close",onClick:O,sx:{position:"absolute",right:8,top:8,color:function(e){return e.palette.grey[500]}}},he.createElement(Te,null))),he.createElement(n,yt({component:a},c),he.createElement(se,{dividers:!0},f),T&&he.createElement(de,null,d.map((function(e){var n=e.id,r=e.text,o=e.type,a=void 0===o?"button":o,i=e.onClick,l=e.color,c=void 0===l?"primary":l;return he.createElement(t,{key:n,type:a,disabled:u,onClick:i,color:c},r)})),v&&he.createElement(t,{color:"error",disabled:u,onClick:function(){k(),h&&O()}},C),E&&he.createElement(at,{type:$,loading:p,disabled:u,onClick:w},g))))},gr=function(e){var t=e.open,n=e.title,r=e.loading,o=e.disabled,a=e.confirmText,i=void 0===a?"Confirm":a,l=e.cancelText,c=void 0===l?"Cancel":l,u=e.children,s=e.onConfirm,d=e.onCancel;return he.createElement(br,{title:n,loading:r,disabled:r||o,open:t,onClose:d,acceptable:!0,cancelable:!0,callCloseWhenCancel:!1,acceptText:i,cancelText:c,onCancel:d,onAccept:s},u)},xr=function(e){var t=e.open,n=e.title,r=e.loading,o=e.disabled,a=e.submitText,i=void 0===a?"Submit":a,l=e.cancelText,c=void 0===l?"Cancel":l,u=e.children,s=e.onSubmit,d=e.onCancel;return he.createElement(br,{component:"form",componentProps:{onSubmit:function(e){e.preventDefault();var t=new FormData(e.currentTarget),n={};t.forEach((function(e,t){n[t]=e})),s(n)}},title:n,loading:r,disabled:r||o,open:t,onClose:d,callCloseWhenCancel:!1,cancelable:!0,acceptable:!0,cancelText:c,onCancel:d,acceptText:i,acceptType:"submit"},u)},Cr=function(e){void 0===e&&(e=!1);var t=Ee(e),n=t[0],r=t[1];return{isOpen:n,open:function(){return r(!0)},close:function(){return r(!1)},setIsOpen:r}},wr=Ne("div")((function(e){var t=e.theme;return yt({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),Sr=function(e){var t=e.children,r=t[0],o=t[1],a=t[2];return he.createElement(n,{sx:{display:"flex"}},he.createElement(un,null,r,o,he.createElement(n,{sx:{flexGrow:1}},he.createElement(wr,null),a)))},kr=function(e){var t=e.loading,r=e.children,o=r[0],a=r[1];return he.createElement(Qt,null,he.createElement(n,{display:"flex",flexDirection:"column",height:1},o,t?he.createElement(kt,null):a))},Or=function(e,t){var n=e.id,r=e.name,o=e.type,a=t[n];return"boolean"===o?he.createElement(vt,{label:r,value:a}):"date"===o||"time"===o||"datetime"===o?he.createElement(bt,{label:r,value:a,format:e.format}):he.createElement(ft,{label:r,value:null==a?void 0:a.toString()})},Ir=function(e){var t=e.field,n=t.name,r=t.description,o=t.value,a=e.instance;return he.createElement(wt,{title:n,subtitle:r},o.map((function(e){var t=e.id,n=e.xs,r=e.sm,o=e.md,i=e.lg,l=e.xl;return he.createElement(Ct,{key:t,xs:n,sm:r,md:o,lg:i,xl:l},Or(e,a))})))},$r=function(e){var t=e.model,n=e.instance;return he.createElement(s,{container:!0,spacing:2},t.fields.map((function(e){var t=e.id,r=e.type,o=e.xs,a=void 0===o?3:o,i=e.sm,l=e.md,c=e.lg,u=e.xl;return"group"===r?he.createElement(s,{item:!0,key:t,xs:12},he.createElement(Ir,{field:e,instance:n[t]})):he.createElement(s,{item:!0,key:t,xs:a,sm:i,md:l,lg:c,xl:u},he.createElement(pt,null,Or(e,n)))})))},Tr={string:"",number:0,boolean:!1,enum:"",multienum:[],date:new Date(1970,0,1,0,0),time:new Date(1970,0,1,0,0),datetime:new Date(1970,0,1,0,0),group:{}},Pr=function(e,t){return t&&t[e.id]||"default"in e&&e.default||Tr[e.type]},jr=function(e,t){void 0===t&&(t=void 0);var n={};return e.fields.forEach((function(e){if("group"===e.type){var r={};e.value.forEach((function(n){r[n.id]=Pr(n,t&&t[e.id])})),n[e.id]=r}else n[e.id]=Pr(e,t)})),n},Rr=function(e){var o=e.model,i=e.saveButtonText,c=e.onSubmit,u=e.initialValues,d=ke((function(){return jr(o,u)}),[o,u]),m=Ee(d),f=m[0],p=m[1],v=function(e,t,n){p((function(r){var o,a={};return t?a[t]=yt(yt({},r[t]),((o={})[e]=n,o)):a[e]=n,yt(yt({},r),a)}))},y=function(e,t,n){v(n,t,e)},h=function(e,t){void 0===t&&(t=void 0);var o,i=gt({lightWeight:200,darkWeight:800}),c=e.id,u=e.type,d=e.name,m=e.description,p=e.xs,E=e.sm,b=e.md,g=e.lg,x=e.xl,C=t?f[t][c]:f[c];return o="group"===u?he.createElement(l,null,he.createElement(n,{bgcolor:i,px:2,py:1,mb:2},he.createElement(r,{variant:"h6",role:"heading","aria-level":1},d),he.createElement(r,{variant:"body2",role:"heading","aria-level":2},m)),he.createElement(s,{container:!0,spacing:2,sx:{p:2}},e.value.map((function(e){return h(e,c)})))):"boolean"===u?he.createElement(n,{sx:{height:1,display:"flex",alignItems:"center"}},he.createElement(me,{control:he.createElement(fe,{name:c,onChange:function(e){return function(e,t){e.preventDefault(),v(e.target.name,t,e.target.checked)}(e,t)},checked:C}),label:d})):"enum"===u?he.createElement(V,{fullWidth:!0},he.createElement(F,{id:"".concat(c,"-select-label")},d),he.createElement(W,{labelId:"".concat(c,"-select-label"),id:"".concat(c,"-select"),value:C,label:d,name:c,onChange:function(e){return function(e,t){e.preventDefault(),v(e.target.name,t,e.target.value)}(e,t)},required:!0},e.value.map((function(e){return he.createElement(pe,{key:e,value:e},e)})))):"multienum"===u?he.createElement(V,{fullWidth:!0},he.createElement(F,{id:"".concat(c,"-select-label")},d),he.createElement(W,{labelId:"".concat(c,"-select-label"),id:"".concat(c,"-select"),value:C||[],renderValue:function(e){return e.join(", ")},label:d,name:c,onChange:function(e){return function(e,t){e.preventDefault();var n=e.target.value,r="string"==typeof n?n.split(","):n;v(e.target.name,t,r)}(e,t)},required:!0,multiple:!0},e.value.map((function(e){return he.createElement(pe,{key:e,value:e},he.createElement(fe,{checked:(C||[]).includes(e)}),he.createElement(z,{primary:e}))})))):"date"===u?he.createElement(ze,{label:d,format:e.format,value:C,onChange:function(e){return y(e,t,c)}}):"time"===u?he.createElement(Re,{label:d,format:e.format,value:C,onChange:function(e){return y(e,t,c)}}):"datetime"===u?he.createElement(je,{label:d,format:e.format,value:C,onChange:function(e){return y(e,t,c)}}):he.createElement(a,{required:!0,type:u,label:d,name:c,variant:"outlined",fullWidth:!0,value:C,onChange:function(e){return function(e,t,n){e.preventDefault();var r=e.target.value;"number"===n&&"string"==typeof r&&(r=parseInt(e.target.value)),v(e.target.name,t,r)}(e,t,u)}}),he.createElement(s,{item:!0,key:c,xs:p,sm:E,md:b,lg:g,xl:x},o)};return he.createElement(s,{container:!0,component:"form",spacing:2,onSubmit:function(e){e.preventDefault(),c(f)}},o.fields.map((function(e){return h(e)})),he.createElement(s,{item:!0,xs:12},he.createElement(t,{type:"submit",variant:"contained"},i)))},Mr=function(e,t,n){var r=n.from,o=n.to,a=Ce(),i=Xe();we((function(){a.current===r&&t===o&&i(e),a.current=t}),[t])},zr=function(e){var t=e.model,n=e.modelName,r=e.basePath,o=void 0===r?"":r,a=e.submitUpdateItemRequest,i=e.updateItemRequest,l=e.updateItem,c=e.onSubmitUpdateItem,u=e.onRequestUpdateItem,s=Ke().id,d=void 0===s?"":s,m=i.loading||a.loading;return we((function(){u(d)}),[d]),Gt({title:"Item updated",message:"The item ".concat(d," has been updated successfully"),severity:"success"},!!a.success,{from:!1,to:!0}),Mr("".concat(o,"/"),!!a.success,{from:!1,to:!0}),Gt({title:"We had an error",message:a.error||"",severity:"error"},!!a.error,{from:!1,to:!0}),he.createElement(kr,{loading:m},he.createElement(Zt,{title:"Edit ".concat(d),preset:"default",breadcrumbs:[{id:"list",text:n,link:"".concat(o,"/")},{id:"update",text:"Edit ".concat(d),link:"".concat(o,"/").concat(d,"/update")}]}),he.createElement(rn,null,he.createElement(Rr,{model:t,initialValues:l,saveButtonText:"Save",onSubmit:c})))},Nr=function(e){var t=e.columns,n=e.options,r=e.data,o=e.onClick,a=e.search,l=e.defaultSort,c=e.defaultOrder,u=e.loading,s=Et(Et([],t,!0),[{id:"__options",label:"",disablePadding:!1,numeric:!1,sort:!1}],!1),d=he.useState(null),m=d[0],f=d[1];return he.createElement(he.Fragment,null,he.createElement(ur,{columns:s,data:r,search:a,defaultSort:l,defaultOrder:c,loading:u},(function(e){return e.map((function(e,t){return he.createElement(ee,{key:e.id,onClick:function(){return o&&o(e)},role:"row","aria-rowindex":t,sx:{cursor:o&&"pointer"}},s.map((function(n,r){var o=n.id;return he.createElement(te,{role:"cell",scope:"row",key:o.toString(),"aria-rowindex":t,"aria-colindex":r},e[o])})),n&&he.createElement(te,null,he.createElement(i,{"data-testid":"options-".concat(e.id),onClick:function(t){t.stopPropagation(),f({item:e,anchor:t.currentTarget})}},he.createElement(lt,null))))}))})),n&&he.createElement(ve,{anchorEl:null==m?void 0:m.anchor,open:!!m,onClose:function(){return f(null)},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},n.map((function(e){var t=e.id,n=e.label,r=e.onClick;return he.createElement(pe,{key:t,onClick:function(){m&&r(null==m?void 0:m.item),f(null)}},n)}))))},Dr=function(e){var t=e.model,n=e.modelName,r=e.listData,o=e.listRequest,a=e.deleteRequest,i=e.basePath,l=void 0===i?"":i,c=e.deleteFeature,u=void 0===c||c,s=e.updateFeature,d=void 0===s||s,m=e.addFeature,f=void 0===m||m,p=e.detailsFeature,v=void 0===p||p,y=e.onRequestList,h=e.onClickDeleteItem,E=Xe();we((function(){y()}),[]),Gt({title:"Item deleted",message:"The item has been deleted successfully",severity:"success"},!!a.success,{from:!1,to:!0}),Gt({title:"We had an error",message:a.error||"",severity:"error"},!!a.error,{from:!1,to:!0});var b=v?function(e){E("".concat(l,"/").concat(e.id))}:void 0,g=function(e,t){"edit"===e?E("".concat(l,"/").concat(t.id,"/update")):h(t)},x=[];d&&x.push({id:"edit",label:"Edit",onClick:function(e){return g("edit",e)}}),u&&x.push({id:"remove",label:"Remove",onClick:function(e){return g("remove",e)}});var C=[];return f&&C.push({id:"add",text:"Add",href:"".concat(l,"/add")}),he.createElement(kr,{loading:o.loading||a.loading},he.createElement(Zt,{title:n,preset:"default",actions:C.length>0?C:void 0}),he.createElement(rn,null,he.createElement(Nr,{columns:t.fields.filter((function(e){return e.listable})).map((function(e){return{disablePadding:!1,id:e.id,label:e.name,numeric:"number"===e.type,sort:!1}})),data:r,defaultSort:t.fields[0].id,onClick:b,options:x.length>0?x:void 0})))},Ar=function(e){var t=e.model,n=e.modelName,r=e.basePath,o=void 0===r?"":r,a=e.onSubmitNewItem,i=e.newItemRequest;return Gt({message:"Item added successfully",severity:"success"},!!i.success,{from:!1,to:!0}),Mr("".concat(o,"/"),!!i.success,{from:!1,to:!0}),Gt({title:"We had an error",message:i.error||"",severity:"error"},!!i.error,{from:!1,to:!0}),he.createElement(kr,{loading:i.loading},he.createElement(Zt,{title:"Add ".concat(n),preset:"default",breadcrumbs:[{id:"list",text:n,link:"".concat(o,"/")},{id:"add",text:"Add new ".concat(n),link:"".concat(o,"/add")}]}),he.createElement(rn,null,he.createElement(Rr,{model:t,saveButtonText:"Save",onSubmit:a})))},Vr=function(e){var t=e.model,n=e.modelName,r=e.basePath,o=void 0===r?"":r,a=e.onRequestItem,i=e.itemRequest,l=e.detailsItem,c=Ke().id,u=void 0===c?"":c;return we((function(){a(u)}),[u]),he.createElement(kr,{loading:i.loading},he.createElement(Zt,{title:u,preset:"default",breadcrumbs:[{id:"list",text:n,link:"".concat(o,"/")},{id:"detail",text:u,link:"".concat(o,"/").concat(u)}]}),he.createElement(rn,null,l&&he.createElement($r,{model:t,instance:l})))},Fr=function(e){var t=e.updateFeature,n=void 0===t||t,r=e.addFeature,o=void 0===r||r,a=e.detailsFeature,i=void 0===a||a;return he.createElement(Qe,null,he.createElement(Ze,{path:"",element:he.createElement(Dr,yt({},e))}),i&&he.createElement(Ze,{path:":id",element:he.createElement(Vr,yt({},e))}),o&&he.createElement(Ze,{path:"add",element:he.createElement(Ar,yt({},e))}),n&&he.createElement(Ze,{path:":id/update",element:he.createElement(zr,yt({},e))}))},Wr={idle:!0},_r={loading:!0},Br={success:!0};export{Sr as AppBarWithDrawerLayout,nn as Board,br as BootstrapDialog,At as Bullet,on as CenterContainer,gr as ConfirmDialog,rn as Content,vr as ContentPlaceholder,st as DefaultPlaceholder,ln as Drawer,pn as DrawerContent,It as DrawerContext,dn as DrawerItem,un as DrawerProvider,fn as DrawerSection,rr as EnhancedAutocomplete,dr as EnhancedRemoteTable,yn as EnhancedSelect,ur as EnhancedTable,lr as EnhancedTableHead,Er as ExpandableAlert,xr as FormDialog,wt as GroupValueCard,Ct as GroupValueItem,Zt as Header,kr as HeaderLayout,Wr as IdleRequest,Ft as Label,kt as LoadingArea,_r as LoadingRequest,yr as LoremIpsumPlaceholder,tn as Markdown,Nt as MiniAppBar,cn as MiniDrawer,Rr as ModelForm,Fr as ModelRouter,Ut as NotificationCenterContext,Yt as NotificationCenterProvider,qt as NotificationCenterProviderUndefinedError,$r as ObjectDetails,mr as Placeholder,Ot as QueryContainer,hn as SignIn,fr as SkeletonCard,pr as SkeletonGrid,Br as SuccessRequest,ir as TabCard,Jt as TabContext,Xt as TabContextProvider,or as TabPanel,Qt as TabProvider,Nr as TableList,$t as UndefinedProvider,vt as ValueBoolean,pt as ValueCard,bt as ValueDatetime,ct as ValueEditButtons,St as ValueRating,ft as ValueText,Dt as bulletClasses,Lt as getRandomItem,xt as groupValueItemClasses,Vt as labelClasses,en as markdownDefaultOptions,Bt as newArrayWithSize,jr as newInstanceFromValuesOrZeroValue,Cr as useDialog,Tt as useDrawer,ut as useEditableValueDisplay,gt as useGetDefaultThemeColor,Ht as useNotificationCenter,Gt as useNotifyWhenValueChanges,Kt as useTab};
|
|
24
24
|
//# sourceMappingURL=index.js.map
|