UNPKG

@croz/nrich-registry-mui

Version:

Contains the UI implementation of registry for the MUI component library

1 lines 39 kB
{"version":3,"sources":["../src/component/RegistryEntity.tsx","../src/component/RegistryFilter.tsx","../src/component/RegistryForm.tsx","../src/component/RegistryTable.tsx","../src/component/RegistryEntityPicker.tsx"],"sourcesContent":["/*\r\n * Copyright 2023 CROZ d.o.o, the original author or authors.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n\r\nimport React from \"react\";\r\n\r\nimport {\r\n Backdrop, Box, Button, CircularProgress, Modal, Paper,\r\n} from \"@mui/material\";\r\n\r\nimport { RegistryEntityContextProvider, useRegistryEntityAdministration } from \"@croz/nrich-registry-core\";\r\n\r\nimport { RegistryFilter } from \"./RegistryFilter\";\r\nimport { RegistryForm } from \"./RegistryForm\";\r\nimport { RegistryTable } from \"./RegistryTable\";\r\n\r\nconst modalStyle = {\r\n position: \"absolute\" as \"absolute\",\r\n top: \"50%\",\r\n left: \"50%\",\r\n transform: \"translate(-50%, -50%)\",\r\n width: 600,\r\n bgcolor: \"background.paper\",\r\n boxShadow: 12,\r\n};\r\n\r\n/**\r\n * {@link RegistryEntity} properties\r\n */\r\nexport interface Props {\r\n /**\r\n * Name of the registry entity\r\n */\r\n entityName: string;\r\n}\r\n\r\n/**\r\n * Component that manages full administration for single registry entity. Includes table with paging and filtering, adding, editing\r\n * and deleting entities.\r\n * @param entityName Name of administered registry entity\r\n */\r\nexport const RegistryEntity = ({ entityName }: Props) => {\r\n const {\r\n entityConfiguration,\r\n data,\r\n request,\r\n handlePagingUpdate,\r\n handleFilterUpdate,\r\n handleAddClick,\r\n handleEditClick,\r\n handleSubmitClick,\r\n formType,\r\n formData,\r\n formModalOpen,\r\n closeFormModal,\r\n loading,\r\n remove,\r\n } = useRegistryEntityAdministration(entityName);\r\n\r\n return (\r\n <RegistryEntityContextProvider entityConfiguration={entityConfiguration}>\r\n <Paper sx={{\r\n display: \"flex\", flexDirection: \"row\", justifyContent: \"space-between\", alignItems: \"center\",\r\n }}\r\n >\r\n <RegistryFilter onFilterUpdate={handleFilterUpdate} />\r\n <div>\r\n {entityConfiguration.creatable && <Button variant=\"contained\" onClick={handleAddClick}>Add</Button>}\r\n </div>\r\n </Paper>\r\n <RegistryTable data={data} request={request} onRequestChange={handlePagingUpdate} onEdit={handleEditClick} onRemove={remove} />\r\n {\r\n formModalOpen && (\r\n <Modal open={formModalOpen} onClose={(_, reason) => reason !== \"backdropClick\" && closeFormModal()}>\r\n <Box sx={modalStyle}>\r\n <RegistryForm\r\n type={formType}\r\n initialValues={formData}\r\n onClose={closeFormModal}\r\n onSubmit={handleSubmitClick}\r\n />\r\n </Box>\r\n </Modal>\r\n )\r\n }\r\n {loading && (\r\n <Backdrop\r\n sx={{ color: \"#fff\", zIndex: (theme) => theme.zIndex.drawer + 1 }}\r\n open\r\n >\r\n <CircularProgress color=\"inherit\" />\r\n </Backdrop>\r\n )}\r\n </RegistryEntityContextProvider>\r\n );\r\n};\r\n","/*\r\n * Copyright 2023 CROZ d.o.o, the original author or authors.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n\r\nimport React, { ChangeEvent } from \"react\";\r\n\r\nimport SearchIcon from \"@mui/icons-material/Search\";\r\nimport {\r\n FormControl, InputAdornment, InputLabel, MenuItem, OutlinedInput, Select,\r\n} from \"@mui/material\";\r\n\r\nimport { SearchParameter, useDebouncedUpdateEffect, useRegistryFilter } from \"@croz/nrich-registry-core\";\r\n\r\n/**\r\n * {@link RegistryFilter} properties\r\n */\r\ninterface Props {\r\n /**\r\n * Change handler to be called when filter updates\r\n * @param searchParameter new search values\r\n */\r\n onFilterUpdate: (searchParameter: SearchParameter) => void;\r\n}\r\n\r\n/**\r\n * Component for basic filtering. Has input field for query and dropdown with filterable properties.\r\n * @param onFilterUpdate Change handler to be called when filter updates\r\n */\r\nexport const RegistryFilter = ({ onFilterUpdate }: Props) => {\r\n const {\r\n availableFields,\r\n searchParameter,\r\n handleFieldsChange,\r\n handleQueryChange,\r\n } = useRegistryFilter();\r\n\r\n useDebouncedUpdateEffect(() => {\r\n onFilterUpdate(searchParameter);\r\n }, 300, [searchParameter]);\r\n\r\n return (\r\n <div>\r\n <FormControl sx={{ m: 1, width: 300 }} size=\"small\">\r\n <InputLabel htmlFor=\"search-query\">Search...</InputLabel>\r\n <OutlinedInput\r\n id=\"search-query\"\r\n value={searchParameter.query}\r\n onChange={handleQueryChange}\r\n label=\"Search...\"\r\n startAdornment={(\r\n <InputAdornment position=\"start\">\r\n <SearchIcon />\r\n </InputAdornment>\r\n )}\r\n />\r\n </FormControl>\r\n <FormControl sx={{ m: 1, width: 300 }} size=\"small\">\r\n <InputLabel id=\"demo-multiple-name-label\">Properties</InputLabel>\r\n <Select\r\n labelId=\"demo-multiple-name-label\"\r\n id=\"demo-multiple-name\"\r\n multiple\r\n label=\"Properties\"\r\n value={searchParameter.propertyNameList}\r\n onChange={(event) => handleFieldsChange(event as ChangeEvent)}\r\n input={<OutlinedInput />}\r\n >\r\n {availableFields.map((field) => (\r\n <MenuItem key={field.value} value={field.value}>\r\n {field.label}\r\n </MenuItem>\r\n ))}\r\n </Select>\r\n </FormControl>\r\n </div>\r\n );\r\n};\r\n","/*\r\n * Copyright 2023 CROZ d.o.o, the original author or authors.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n\r\nimport React from \"react\";\r\n\r\nimport {\r\n Box, Button, FormControl, FormHelperText, InputLabel, MenuItem, OutlinedInput, Paper, Select, TextField, Typography,\r\n} from \"@mui/material\";\r\n\r\nimport {\r\n findIdField, formatIdName, FormType, RegistryPropertyConfiguration, useRegistryEntity, useRegistryForm,\r\n} from \"@croz/nrich-registry-core\";\r\n\r\n/**\r\n * Properties for form field\r\n */\r\ninterface FieldProps {\r\n /**\r\n * Configuration of the specific property/field\r\n */\r\n configuration: RegistryPropertyConfiguration;\r\n\r\n /**\r\n * Current value of field\r\n */\r\n value: any;\r\n\r\n /**\r\n * Change handler for updating value\r\n * @param newValue new value of the field\r\n */\r\n onChange: (newValue: any) => void;\r\n\r\n /**\r\n * Error on current field value. Filled on unsuccessful submit, cleared on change\r\n */\r\n error: string;\r\n}\r\n\r\n/**\r\n * Field for properties of complex object type. Renders class name and id for options\r\n * @param configuration Configuration of the specific property/field\r\n * @param value Current value of field\r\n * @param onChange Change handler for updating value\r\n * @param error Error on current field value\r\n */\r\nconst SubEntityField = ({\r\n configuration, value, onChange, error,\r\n}: FieldProps) => {\r\n const { entityConfiguration, data } = useRegistryEntity(configuration.singularAssociationReferencedClass, { pageNumber: 0, pageSize: 1000 });\r\n\r\n const idField = findIdField(entityConfiguration);\r\n\r\n return (\r\n <FormControl size=\"small\">\r\n <InputLabel id={`${configuration.name}-picker-label`}>{configuration.formLabel}</InputLabel>\r\n <Select\r\n labelId={`${configuration.name}-picker-label`}\r\n id={`${configuration.name}-picker`}\r\n label={configuration.formLabel}\r\n value={value?.[idField.name] ?? \"\"}\r\n onChange={(event) => onChange({ [idField.name]: event.target.value })}\r\n error={!!error}\r\n input={<OutlinedInput />}\r\n >\r\n {(data?.content || []).map((option) => (\r\n <MenuItem key={option[idField.name]} value={option[idField.name]}>\r\n {formatIdName(entityConfiguration.classFullName, idField.name, option[idField.name])}\r\n </MenuItem>\r\n ))}\r\n </Select>\r\n {!!error && <FormHelperText>{error}</FormHelperText>}\r\n </FormControl>\r\n );\r\n};\r\n\r\n/**\r\n * Main component for a single field which renders specific input based on property javascript type\r\n * @param configuration Configuration of the specific property/field\r\n * @param value Current value of field\r\n * @param onChange Change handler for updating value\r\n * @param error Error on current field value\r\n */\r\nconst Field = ({\r\n configuration, value, onChange, error,\r\n}: FieldProps) => {\r\n switch (configuration.javascriptType) {\r\n case \"string\":\r\n return (\r\n <TextField\r\n error={!!error}\r\n helperText={error}\r\n label={configuration.formLabel}\r\n value={value ?? \"\"}\r\n size=\"small\"\r\n onChange={(event) => onChange(event.target.value)}\r\n disabled={!configuration.editable}\r\n />\r\n );\r\n case \"number\":\r\n if (configuration.decimal) {\r\n return (\r\n <TextField\r\n error={!!error}\r\n helperText={error}\r\n label={configuration.formLabel}\r\n value={value ?? \"\"}\r\n size=\"small\"\r\n inputProps={{ inputMode: \"numeric\", pattern: \"[0-9.,]*\" }}\r\n disabled={!configuration.editable}\r\n onChange={(event) => onChange(+event.target.value)}\r\n />\r\n );\r\n }\r\n return (\r\n <TextField\r\n error={!!error}\r\n helperText={error}\r\n label={configuration.formLabel}\r\n value={value ?? \"\"}\r\n size=\"small\"\r\n inputProps={{ inputMode: \"numeric\", pattern: \"[0-9]*\" }}\r\n disabled={!configuration.editable}\r\n onChange={(event) => onChange(+event.target.value)}\r\n />\r\n );\r\n case \"boolean\":\r\n // use switch or checkbox\r\n return (\r\n <TextField\r\n error={!!error}\r\n helperText={error}\r\n label={configuration.formLabel}\r\n value={value ?? \"\"}\r\n size=\"small\"\r\n onChange={(event) => onChange(event.target.value)}\r\n disabled={!configuration.editable}\r\n />\r\n );\r\n case \"object\":\r\n return (\r\n <SubEntityField configuration={configuration} value={value} onChange={onChange} error={error} />\r\n );\r\n case \"date\":\r\n return (\r\n <TextField\r\n error={!!error}\r\n helperText={error}\r\n label={configuration.formLabel}\r\n value={value?.split(\"T\")[0] ?? \"\"}\r\n type=\"date\"\r\n size=\"small\"\r\n onChange={(event) => onChange(event.target.value)}\r\n disabled={!configuration.editable}\r\n InputLabelProps={{\r\n shrink: true,\r\n }}\r\n />\r\n );\r\n default:\r\n return (\r\n <TextField\r\n error={!!error}\r\n helperText={error}\r\n label={configuration.formLabel}\r\n value={value ?? null}\r\n size=\"small\"\r\n onChange={(event) => onChange(event.target.value)}\r\n disabled={!configuration.editable}\r\n />\r\n );\r\n }\r\n};\r\n\r\nconst paperStyle = {\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n p: 4,\r\n gap: 2,\r\n};\r\n\r\n/**\r\n * {@link RegistryForm} properties\r\n */\r\ninterface Props {\r\n /**\r\n * Initial values of the form. Row data or empty object\r\n */\r\n initialValues: any;\r\n\r\n /**\r\n * Flag if form is currently in create or update mode\r\n */\r\n type: FormType;\r\n\r\n /**\r\n * Handler for submitting values. Called after successful validation of input data\r\n * @param values\r\n */\r\n onSubmit: (values: any) => void;\r\n\r\n /**\r\n * Handler for closing form, called when user explicitly clicks on cancel button\r\n */\r\n onClose: () => void;\r\n\r\n}\r\n\r\n/**\r\n * Component which encapsulates create and update forms for single registry entity\r\n * @param initialValues Initial values of the form. Row data or empty object\r\n * @param type Flag if form is currently in create or update mode\r\n * @param onSubmit Handler for submitting values. Called after successful validation of input data\r\n * @param onClose Handler for closing form, called when user explicitly clicks on cancel button\r\n */\r\nexport const RegistryForm = ({\r\n initialValues, type, onSubmit, onClose,\r\n}: Props) => {\r\n const {\r\n entityConfiguration,\r\n yupSchema,\r\n finalInitialValues,\r\n properties,\r\n } = useRegistryForm(initialValues, type);\r\n\r\n // form handlers\r\n\r\n const [value, setValue] = React.useState<any>(finalInitialValues);\r\n const [errors, setErrors] = React.useState<any>({});\r\n const clearError = (fieldName: string) => {\r\n setErrors((oldErrors) => ({ ...oldErrors, [fieldName]: undefined }));\r\n };\r\n\r\n const updateField = (fieldName: string, newValue: any) => {\r\n setValue((oldValue) => ({ ...oldValue, [fieldName]: newValue }));\r\n clearError(fieldName);\r\n };\r\n\r\n const handleSubmit = async () => {\r\n try {\r\n await yupSchema.validate(value, { abortEarly: false });\r\n onSubmit(value);\r\n }\r\n catch (e) {\r\n setErrors(e.inner.reduce((all, error) => ({ ...all, [error.path]: error.message }), {}));\r\n }\r\n };\r\n\r\n return (\r\n <Paper sx={paperStyle}>\r\n <Typography variant=\"h5\">{type === \"update\" ? `Update ${entityConfiguration.name}` : `Create ${entityConfiguration.name}`}</Typography>\r\n {properties.map((field) => (\r\n <Field key={field.name} configuration={field} value={value[field.name]} onChange={(newValue) => updateField(field.name, newValue)} error={errors[field.name]} />\r\n ))}\r\n <Box sx={{ alignSelf: \"end\" }}>\r\n <Button variant=\"outlined\" onClick={onClose} sx={{ mr: 2 }}>Cancel</Button>\r\n <Button variant=\"contained\" onClick={handleSubmit}>{type === \"update\" ? \"Update\" : \"Create\"}</Button>\r\n </Box>\r\n </Paper>\r\n );\r\n};\r\n","/*\r\n * Copyright 2023 CROZ d.o.o, the original author or authors.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n\r\nimport React from \"react\";\r\n\r\nimport DeleteIcon from \"@mui/icons-material/Delete\";\r\nimport EditIcon from \"@mui/icons-material/Edit\";\r\nimport { IconButton, Paper, SortDirection as MuiSortDirection, Table, TableBody, TableCell, TableContainer, TableHead, TablePagination, TableRow, } from \"@mui/material\";\r\nimport TableSortLabel from \"@mui/material/TableSortLabel\";\r\n\r\nimport {\r\n EntityRegistryRequest,\r\n findIdField,\r\n formatIdName,\r\n RegistryEntityConfiguration,\r\n RegistryPropertyConfiguration,\r\n RegistryResponse,\r\n resolveId,\r\n resolveValue,\r\n SortProperty,\r\n useRegistryEntityContext,\r\n useRegistrySort,\r\n} from \"@croz/nrich-registry-core\";\r\n\r\n/**\r\n * {@link RegistryTableHeadCell} properties\r\n */\r\ninterface RegistryTableHeadProps {\r\n /**\r\n * Configuration of the property\r\n */\r\n property: RegistryPropertyConfiguration;\r\n\r\n /**\r\n * Current value for sorting configuration\r\n */\r\n sortPropertyList: SortProperty[];\r\n\r\n /**\r\n * Change handler for sorting configuration\r\n * @param sortPropertyList new sorting configuration\r\n */\r\n onSortChange: (sortPropertyList: SortProperty[]) => void;\r\n}\r\n\r\n/**\r\n * Header cell of a property. Renders sorting button if this property\r\n * @param property configuration of the property\r\n * @param sortPropertyList current value for sorting configuration\r\n * @param onSortChange change handler for sorting configuration\r\n */\r\nconst RegistryTableHeadCell = ({property, sortPropertyList, onSortChange}: RegistryTableHeadProps) => {\r\n const {\r\n sortDirection,\r\n sortChangeHandler,\r\n } = useRegistrySort(property, sortPropertyList, onSortChange);\r\n\r\n const muiSortDirection = sortDirection === undefined ? false : sortDirection.toLowerCase() as MuiSortDirection;\r\n\r\n return (\r\n <TableCell\r\n key={property.name}\r\n sortDirection={muiSortDirection}\r\n >\r\n <TableSortLabel\r\n active={muiSortDirection !== false}\r\n direction={muiSortDirection !== false ? muiSortDirection : undefined}\r\n onClick={property.sortable ? () => sortChangeHandler() : () => {\r\n }}\r\n >\r\n {property.columnHeader}\r\n </TableSortLabel>\r\n </TableCell>\r\n );\r\n};\r\n\r\n/**\r\n * {@link PropertyCell} properties\r\n */\r\ninterface PropertyCellProps {\r\n /**\r\n * Configuration of specific data property\r\n */\r\n propertyConfiguration: RegistryPropertyConfiguration;\r\n\r\n /**\r\n * Value of property\r\n */\r\n value: any;\r\n\r\n /**\r\n * Map with registry entity subentities (on which this entity depends). Used for rendering complex objects\r\n */\r\n subEntityMap: Record<string, RegistryEntityConfiguration>;\r\n}\r\n\r\n/**\r\n * Single cell in the registry table. Renders value based on javascript type\r\n * @param propertyConfiguration configuration of specific data property\r\n * @param value value of property\r\n * @param subEntityMap map with registry entity subentities\r\n */\r\nconst PropertyCell = ({propertyConfiguration, value, subEntityMap}: PropertyCellProps) => {\r\n let stringValue = value;\r\n if (value === undefined || value === null) {\r\n stringValue = \"-\";\r\n } else if (propertyConfiguration.javascriptType === \"object\") {\r\n const configuration = subEntityMap[propertyConfiguration.singularAssociationReferencedClass];\r\n const idField = findIdField(configuration);\r\n stringValue = formatIdName(configuration.classFullName, idField.name, value[idField.name]);\r\n } else if (propertyConfiguration.javascriptType === \"date\") {\r\n stringValue = new Date(value).toLocaleDateString();\r\n } else if (propertyConfiguration.javascriptType === \"number\") {\r\n if (propertyConfiguration.decimal) {\r\n stringValue = Number(value).toFixed(2);\r\n } else {\r\n stringValue = value;\r\n }\r\n } else if (propertyConfiguration.javascriptType === \"boolean\") {\r\n stringValue = value ? \"Yes\" : \"No\";\r\n }\r\n\r\n return <TableCell>{stringValue}</TableCell>;\r\n};\r\n\r\n/**\r\n * {@link RegistryTableRow} properties\r\n */\r\ninterface RegistryTableRowProps {\r\n /**\r\n * Data of the row\r\n */\r\n row: any;\r\n\r\n /**\r\n * Handler for editing specific row\r\n * @param id id field of the row\r\n * @param data row data\r\n */\r\n onEdit: (id: any, data: any) => void;\r\n\r\n /**\r\n * Handler for removing specific row\r\n * @param id id field of the row\r\n */\r\n onRemove: (id: any) => void;\r\n}\r\n\r\n/**\r\n * Single row of the table\r\n * @param row data of the row\r\n * @param onEdit handler for editing specific row\r\n * @param onRemove handler for removing specific row\r\n */\r\nconst RegistryTableRow = ({\r\n row, onEdit, onRemove,\r\n }: RegistryTableRowProps) => {\r\n const {entityConfiguration, singularAssociationsMap, finalProperties} = useRegistryEntityContext();\r\n\r\n return (\r\n <TableRow\r\n sx={{\"&:last-child td, &:last-child th\": {border: 0}}}\r\n >\r\n {finalProperties.map((property) => (\r\n <PropertyCell key={property.name} propertyConfiguration={property} value={resolveValue(property, row)} subEntityMap={singularAssociationsMap}/>))}\r\n {(entityConfiguration.updateable || entityConfiguration.deletable) && (\r\n <TableCell>\r\n {entityConfiguration.updateable && <IconButton onClick={() => onEdit(resolveId(entityConfiguration, row), row)}><EditIcon/></IconButton>}\r\n {entityConfiguration.deletable && <IconButton onClick={() => onRemove(resolveId(entityConfiguration, row))}><DeleteIcon/></IconButton>}\r\n </TableCell>\r\n )}\r\n </TableRow>\r\n );\r\n};\r\n\r\n/**\r\n * {@link RegistryTable} properties\r\n */\r\ninterface RegistryTableProps {\r\n /**\r\n * Row data of entity\r\n */\r\n data: RegistryResponse<any>;\r\n\r\n /**\r\n * Current request used for latest data fetch\r\n */\r\n request: EntityRegistryRequest;\r\n\r\n /**\r\n * Change function for pagination fields\r\n * @param request new request value\r\n */\r\n onRequestChange: (request: EntityRegistryRequest) => void;\r\n\r\n /**\r\n * Handler for editing specific row\r\n * @param id id field of the row\r\n * @param data row data\r\n */\r\n onEdit: (id: any, data: any) => void;\r\n\r\n /**\r\n * Handler for removing specific row\r\n * @param id id field of the row\r\n */\r\n onRemove: (id: any) => void;\r\n}\r\n\r\n/**\r\n * Component which renders entity data in form of the table. Contains paging and actions for specific rows\r\n * @param data row data of entity\r\n * @param request current request used for latest data fetch\r\n * @param onRequestChange change function for pagination fields\r\n * @param onEdit handler for editing specific row\r\n * @param onRemove handler for removing specific row\r\n */\r\nexport const RegistryTable = ({\r\n data, request, onRequestChange, onEdit, onRemove,\r\n }: RegistryTableProps) => {\r\n const {entityConfiguration, finalProperties} = useRegistryEntityContext();\r\n\r\n const onPageChange = (event: unknown, newPage: number) => {\r\n onRequestChange({...request, pageNumber: newPage});\r\n };\r\n const onPageSizeChange = (event: React.ChangeEvent<HTMLInputElement>) => {\r\n onRequestChange({...request, pageSize: +event.target.value, pageNumber: 0});\r\n };\r\n\r\n const onSortChange = (sortPropertyList: SortProperty[]) => {\r\n onRequestChange({...request, sortPropertyList});\r\n };\r\n\r\n return (\r\n <Paper>\r\n <TableContainer>\r\n <Table sx={{minWidth: 650}} size=\"small\">\r\n <TableHead>\r\n <TableRow>\r\n {finalProperties.map((property) => (\r\n <RegistryTableHeadCell key={property.name} property={property} sortPropertyList={request.sortPropertyList ?? []} onSortChange={onSortChange}/>\r\n ))}\r\n {(entityConfiguration.updateable || entityConfiguration.deletable) && (<TableCell/>)}\r\n </TableRow>\r\n </TableHead>\r\n <TableBody>\r\n {/* eslint-disable-next-line react/no-array-index-key */}\r\n {(data.content ?? []).map((row, index) => <RegistryTableRow key={index} row={row} onEdit={onEdit} onRemove={onRemove}/>)}\r\n </TableBody>\r\n </Table>\r\n </TableContainer>\r\n <TablePagination\r\n rowsPerPageOptions={[5, 10, 25]}\r\n component=\"div\"\r\n count={data.totalElements}\r\n rowsPerPage={request.pageSize}\r\n page={request.pageNumber}\r\n onPageChange={onPageChange}\r\n onRowsPerPageChange={onPageSizeChange}\r\n />\r\n </Paper>\r\n );\r\n};\r\n","/*\r\n * Copyright 2023 CROZ d.o.o, the original author or authors.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n\r\nimport React from \"react\";\r\n\r\nimport {\r\n FormControl, InputLabel, MenuItem, OutlinedInput, Select,\r\n} from \"@mui/material\";\r\n\r\nimport { useRegistryConfigurationStore } from \"@croz/nrich-registry-core\";\r\n\r\n/**\r\n * {@link RegistryEntityPicker} properties\r\n */\r\ninterface Props {\r\n /**\r\n * Currently picked entity name\r\n */\r\n value: string;\r\n\r\n /**\r\n * Change handler for entity\r\n * @param newValue\r\n */\r\n setValue: (newValue: string) => void;\r\n}\r\n\r\n/**\r\n * Simple dropdown with all entity configurations.\r\n * @param value Currently picked entity name\r\n * @param setValue Change handler for entity\r\n */\r\nexport const RegistryEntityPicker = ({ value, setValue }: Props) => {\r\n const entityConfigurations = useRegistryConfigurationStore((state) => state.groupConfigurations\r\n .flatMap((groupConfiguration) => groupConfiguration.entityConfigurationList));\r\n\r\n return (\r\n <FormControl sx={{ m: 1, width: 300 }} size=\"small\">\r\n <InputLabel id=\"registry-entity-picker-label\">Entity</InputLabel>\r\n <Select\r\n labelId=\"registry-entity-picker-label\"\r\n id=\"registry-entity-picker\"\r\n label=\"Entity\"\r\n value={value}\r\n onChange={(event) => setValue(event.target.value)}\r\n input={<OutlinedInput />}\r\n >\r\n {entityConfigurations.map((entity) => (\r\n <MenuItem key={entity.name} value={entity.name}>\r\n {entity.name}\r\n </MenuItem>\r\n ))}\r\n </Select>\r\n </FormControl>\r\n );\r\n};\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,OAAOA,YAAW;AAElB;AAAA,EACE;AAAA,EAAU,OAAAC;AAAA,EAAK,UAAAC;AAAA,EAAQ;AAAA,EAAkB;AAAA,EAAO,SAAAC;AAAA,OAC3C;AAEP,SAAS,+BAA+B,uCAAuC;;;ACN/E,OAAO,WAA4B;AAEnC,OAAO,gBAAgB;AACvB;AAAA,EACE;AAAA,EAAa;AAAA,EAAgB;AAAA,EAAY;AAAA,EAAU;AAAA,EAAe;AAAA,OAC7D;AAEP,SAA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,OAC7C;AAEP,SAAS,qCAAqC;AAuBvC,IAAM,uBAAuB,CAAC,EAAE,OAAO,SAAS,MAAa;AAClE,QAAM,uBAAuB,8BAA8B,CAAC,UAAU,MAAM,oBACzE,QAAQ,CAAC,uBAAuB,mBAAmB,uBAAuB,CAAC;AAE9E,SACE,gBAAAL,OAAA,cAACC,cAAA;AAAA,IAAY,IAAI,EAAE,GAAG,GAAG,OAAO,IAAI;AAAA,IAAG,MAAK;AAAA,KAC1C,gBAAAD,OAAA,cAACE,aAAA;AAAA,IAAW,IAAG;AAAA,KAA+B,QAAM,GACpD,gBAAAF,OAAA,cAACK,SAAA;AAAA,IACC,SAAQ;AAAA,IACR,IAAG;AAAA,IACH,OAAM;AAAA,IACN;AAAA,IACA,UAAU,CAAC,UAAU,SAAS,MAAM,OAAO,KAAK;AAAA,IAChD,OAAO,gBAAAL,OAAA,cAACI,gBAAA,IAAc;AAAA,KAErB,qBAAqB,IAAI,CAAC,WACzB,gBAAAJ,OAAA,cAACG,WAAA;AAAA,IAAS,KAAK,OAAO;AAAA,IAAM,OAAO,OAAO;AAAA,KACvC,OAAO,IACV,CACD,CACH,CACF;AAEJ;","names":["React","Box","Button","Paper","React","FormControl","InputLabel","MenuItem","OutlinedInput","Select","React","FormControl","InputLabel","Select","OutlinedInput","MenuItem","React","Paper","findIdField","formatIdName","React","findIdField","formatIdName","Paper","_a","React","Paper","Button","Box","React","FormControl","InputLabel","MenuItem","OutlinedInput","Select"]}