@dartech/arsenal-ui 0.3.46 → 0.3.48

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/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../packages/arsenal-ui/src/interfaces/definition.ts","../../../packages/arsenal-ui/src/interfaces/common.ts","../../../packages/arsenal-ui/src/lib/Loader/Loader.tsx","../../../packages/arsenal-ui/src/lib/Alert/Alert.tsx","../../../packages/arsenal-ui/src/lib/Forms/ControlInput.tsx","../../../packages/arsenal-ui/src/utils/hooks.ts","../../../packages/arsenal-ui/src/lib/Forms/ControlDebouncedInput.tsx","../../../packages/arsenal-ui/src/lib/Forms/ControlSelect.tsx","../../../packages/arsenal-ui/src/lib/Forms/ControlCheckbox.tsx","../../../packages/arsenal-ui/src/lib/Forms/ControlRadio.tsx","../../../packages/arsenal-ui/src/lib/Forms/useAutocomplete.tsx","../../../packages/arsenal-ui/src/lib/Forms/ControlAutocomplete.tsx","../../../packages/arsenal-ui/src/lib/Forms/ControlQueryAutocomplete.tsx","../../../packages/arsenal-ui/src/lib/Forms/CopyButton.tsx","../../../packages/arsenal-ui/src/lib/Forms/BackButton.tsx","../../../packages/arsenal-ui/src/lib/Forms/ControlAceEditor.tsx","../../../packages/arsenal-ui/src/utils/common.ts","../../../packages/arsenal-ui/src/lib/JsonView/JsonView.tsx","../../../packages/arsenal-ui/src/lib/Modals/JsonModalView.tsx","../../../packages/arsenal-ui/src/lib/Table/DataGrid/JsonTypeCell.tsx","../../../packages/arsenal-ui/src/utils/ui-utils.tsx","../../../packages/arsenal-ui/src/utils/validators.ts","../../../packages/arsenal-ui/src/utils/dem.ts","../../../packages/arsenal-ui/src/lib/Forms/ControlNumberInput.tsx","../../../packages/arsenal-ui/src/lib/Forms/ControlSwitch.tsx","../../../packages/arsenal-ui/src/lib/Forms/ControlDate.tsx","../../../packages/arsenal-ui/src/lib/Forms/ControlDateTime.tsx","../../../packages/arsenal-ui/src/lib/Forms/ControlTime.tsx","../../../packages/arsenal-ui/src/lib/Table/DataGrid/TablePagination.tsx","../../../packages/arsenal-ui/src/lib/Table/DataGrid/TableColumnMenu.tsx","../../../packages/arsenal-ui/src/lib/Table/DataGrid/useTableQueryPagination.ts","../../../packages/arsenal-ui/src/lib/Table/DataGrid/useTableQuerySorting.ts","../../../packages/arsenal-ui/src/lib/Table/DataGrid/usePagination.ts","../../../packages/arsenal-ui/src/lib/Table/DataGrid/styles.ts","../../../packages/arsenal-ui/src/lib/Table/DataGrid/Table.tsx","../../../packages/arsenal-ui/src/lib/Table/DataGrid/TableAction.tsx","../../../packages/arsenal-ui/src/lib/Table/SimpleTable/useTablePagination.ts","../../../packages/arsenal-ui/src/lib/Table/SimpleTable/useTableSorting.ts","../../../packages/arsenal-ui/src/lib/Table/SimpleTable/SimpleTable.tsx","../../../packages/arsenal-ui/src/lib/Table/SimpleTable/TableActionCell.tsx","../../../packages/arsenal-ui/src/lib/Tabs/TabPanel.tsx","../../../packages/arsenal-ui/src/lib/Tabs/RouteTabs.tsx","../../../packages/arsenal-ui/src/lib/InfoItem/styles.ts","../../../packages/arsenal-ui/src/lib/InfoItem/InfoItem.tsx","../../../packages/arsenal-ui/src/lib/Property/UpsertProperty/PropertyAdditionalFields/BigDecimalPropertyFields.tsx","../../../packages/arsenal-ui/src/lib/Property/UpsertProperty/PropertyAdditionalFields/DateAdditionalFields.tsx","../../../packages/arsenal-ui/src/lib/StepperView/StepperView.tsx","../../../packages/arsenal-ui/src/lib/Property/ViewProperty/EntityPropertiesShortView.tsx","../../../packages/arsenal-ui/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityAdditionalFields.tsx","../../../packages/arsenal-ui/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityReferencePropertyFields.tsx","../../../packages/arsenal-ui/src/lib/Property/UpsertProperty/PropertyAdditionalFields/StringPropertyFields.tsx","../../../packages/arsenal-ui/src/lib/Property/UpsertProperty/PropertyAdditionalFields/PropertyAdditionalFields.tsx","../../../packages/arsenal-ui/src/lib/Property/PropertyFiller/JsonEditor.tsx","../../../packages/arsenal-ui/src/lib/Property/PropertyValueField/StringValueField.tsx","../../../packages/arsenal-ui/src/lib/Property/PropertyWidget/PropertyWidget.tsx","../../../packages/arsenal-ui/src/lib/Property/PropertyFiller/usePropertyFiller.ts","../../../packages/arsenal-ui/src/lib/Property/PropertyFiller/useStyles.ts","../../../packages/arsenal-ui/src/lib/Property/PropertyFiller/PropertyFiller.tsx","../../../packages/arsenal-ui/src/lib/Property/PropertyFiller/MultiplePropertyWidget.tsx","../../../packages/arsenal-ui/src/lib/Property/PropertyFiller/MultiplePropertyFiller.tsx","../../../packages/arsenal-ui/src/lib/Property/PropertyValueField/PropertyValueField.tsx","../../../packages/arsenal-ui/src/lib/Property/PropertyValidator/NodesList.tsx","../../../packages/arsenal-ui/src/lib/Property/PropertyValidator/PropertyValidatorContext.tsx","../../../packages/arsenal-ui/src/lib/Property/PropertyValidator/StringTypeValidator.tsx","../../../packages/arsenal-ui/src/lib/Property/PropertyValidator/NumericTypeValidator.tsx","../../../packages/arsenal-ui/src/lib/Property/PropertyValidator/NodeValidator.tsx","../../../packages/arsenal-ui/src/lib/Property/PropertyValidator/ValidationNodeSelector.tsx","../../../packages/arsenal-ui/src/lib/Property/PropertyValidator/PropertyValidator.tsx","../../../packages/arsenal-ui/src/lib/Property/UpsertProperty/CustomPropertyField.tsx","../../../packages/arsenal-ui/src/lib/Property/UpsertProperty/useCustomFields.ts","../../../packages/arsenal-ui/src/lib/Property/UpsertProperty/CreatePropertyFormFields.tsx","../../../packages/arsenal-ui/src/lib/Property/UpsertProperty/CreatePropertiesList.tsx","../../../packages/arsenal-ui/src/lib/Definition/CreateDefinition/CreateDefinition.tsx","../../../packages/arsenal-ui/src/lib/Property/ViewProperty/PropertyDataTable.tsx","../../../packages/arsenal-ui/src/lib/Property/ViewProperty/EntityPropertiesView.tsx","../../../packages/arsenal-ui/src/lib/Property/ViewProperty/ViewProperty.tsx","../../../packages/arsenal-ui/src/lib/Property/ViewPropertiesList/ViewPropertiesList.tsx","../../../packages/arsenal-ui/src/lib/Definition/DefinitionFiller/DefinitionFiller.tsx","../../../packages/arsenal-ui/src/lib/Definition/DefinitionValueView/PropertyDataView.tsx","../../../packages/arsenal-ui/src/lib/Definition/DefinitionValueView/DefinitionValueView.tsx","../../../packages/arsenal-ui/src/lib/Status/styles.ts","../../../packages/arsenal-ui/src/lib/Status/Status.tsx","../../../packages/arsenal-ui/src/lib/JsonPathPicker/PropertyStep.tsx","../../../packages/arsenal-ui/src/lib/JsonPathPicker/JsonPathPicker.tsx","../../../packages/arsenal-ui/src/lib/Sidebar/Sidebar.styled.tsx","../../../packages/arsenal-ui/src/lib/Sidebar/SidebarLink/SidebarLinkItem.tsx","../../../packages/arsenal-ui/src/lib/Sidebar/SidebarLink/SidebarNestedItem.tsx","../../../packages/arsenal-ui/src/assets/chevron_left.svg","../../../packages/arsenal-ui/src/lib/Sidebar/SidebarLink/SidebarLink.tsx","../../../packages/arsenal-ui/src/lib/Sidebar/SidebarLink/MenuIcon.tsx","../../../packages/arsenal-ui/src/theme/baseTheme.ts","../../../packages/arsenal-ui/src/theme/inputThemeOptions.ts","../../../packages/arsenal-ui/src/theme/tableThemeOptions.ts","../../../packages/arsenal-ui/src/theme/stepperThemeOptions.ts","../../../packages/arsenal-ui/src/theme/typographyThemeOptions.ts","../../../packages/arsenal-ui/src/theme/index.ts","../../../packages/arsenal-ui/src/lib/Sidebar/Sidebar.tsx","../../../packages/arsenal-ui/src/lib/ContentLayout/ContentLayout.tsx"],"sourcesContent":["import { RoundingMode } from './common';\n\nexport enum PropertyType {\n STRING = 'STRING',\n INTEGER = 'INTEGER',\n BIG_INTEGER = 'BIG_INTEGER',\n BIG_DECIMAL = 'BIG_DECIMAL',\n FLOAT = 'FLOAT',\n LONG = 'LONG',\n DOUBLE = 'DOUBLE',\n BOOLEAN = 'BOOLEAN',\n ENTITY_REFERENCE = 'ENTITY_REFERENCE',\n ENTITY = 'ENTITY',\n JSON = 'JSON',\n DATE = 'DATE',\n TIME = 'TIME',\n DATE_TIME = 'DATE_TIME',\n ANY = 'ANY',\n}\n\nexport interface Definition<T = Record<string, never>> {\n code: string;\n version: number;\n name: string;\n properties: PropertiesObjectType<T>;\n}\n\nexport type PropertiesObjectType<T = Record<string, never>> = Record<string, PropertyUnion & T>;\nexport type PropertiesArrayType<T = Record<string, never>> = Array<PropertyUnion & T>;\n\nexport interface CreateDefinitionType<T = Record<string, never>> extends Omit<Definition<T>, 'properties'> {\n properties: PropertiesArrayType<T>;\n}\nexport interface UpdateDefinitionType<T = Record<string, never>> extends Omit<Definition<T>, 'properties'> {\n properties: PropertiesArrayType<T>;\n}\n\nexport interface Property {\n propertyType: keyof typeof PropertyType | { value: keyof typeof PropertyType };\n name: string;\n defaultValue: unknown;\n defaultValues: unknown[];\n isRequired: boolean;\n isMultiple: boolean;\n sortOrder: number;\n isEnabled: boolean;\n uiSettings: unknown;\n validationNode: unknown;\n // FRONTEND FIELDS\n key?: string;\n}\n\nexport interface BigDecimalProperty extends Property {\n propertyType: PropertyType.BIG_DECIMAL;\n precisionScale: number;\n roundingMode: keyof typeof RoundingMode;\n}\n\nexport interface BigIntegerProperty extends Property {\n propertyType: PropertyType.BIG_INTEGER;\n}\n\nexport interface BooleanProperty extends Property {\n propertyType: PropertyType.BOOLEAN;\n}\n\nexport interface DateProperty extends Property {\n propertyType: PropertyType.DATE;\n format: string;\n}\n\nexport interface DateTimeProperty extends Property {\n propertyType: PropertyType.DATE_TIME;\n format: string;\n}\n\nexport interface DoubleProperty extends Property {\n propertyType: PropertyType.DOUBLE;\n}\n\nexport interface EntityTypeProperty<T = Record<string, never>> extends Property {\n propertyType: PropertyType.ENTITY;\n properties: PropertiesObjectType<T> | PropertiesArrayType<T>;\n}\n\nexport interface EntityReferenceProperty extends Property {\n propertyType: PropertyType.ENTITY_REFERENCE;\n definitionCode: string;\n definitionVersion: string;\n labelPropertyCode: string;\n valuePropertyCode: string;\n}\n\nexport interface FloatProperty extends Property {\n propertyType: PropertyType.FLOAT;\n}\n\nexport interface StringProperty extends Property {\n propertyType: PropertyType.STRING;\n restrictedValues: string[];\n}\n\nexport interface IntegerProperty extends Property {\n propertyType: PropertyType.INTEGER;\n}\n\nexport interface JsonProperty extends Property {\n propertyType: PropertyType.JSON;\n}\n\nexport interface LongProperty extends Property {\n propertyType: PropertyType.LONG;\n}\n\nexport interface TimeProperty extends Property {\n propertyType: PropertyType.TIME;\n format: string;\n}\n\nexport interface AnyProperty extends Property {\n propertyType: PropertyType.ANY;\n}\n\nexport type PropertyUnion<T = Record<string, never>> =\n | BigDecimalProperty\n | BigIntegerProperty\n | BooleanProperty\n | DateProperty\n | DateTimeProperty\n | DoubleProperty\n | EntityTypeProperty<T>\n | EntityReferenceProperty\n | FloatProperty\n | StringProperty\n | IntegerProperty\n | JsonProperty\n | LongProperty\n | TimeProperty\n | AnyProperty;\n\nexport const DATE_DEFAULT_FORMAT = 'yyyy-MM-dd';\nexport const TIME_DEFAULT_FORMAT = 'HH:mm:ss';\nexport const DATE_TIME_DEFAULT_FORMAT = \"yyyy-MM-dd'T'HH:mm:ss.SSSXXX\";\n","export enum RoundingMode {\n UP = 'UP',\n DOWN = 'DOWN',\n CEILING = 'CEILING',\n FLOOR = 'FLOOR',\n HALF_UP = 'HALF_UP',\n HALF_DOWN = 'HALF_DOWN',\n HALF_EVEN = 'HALF_EVEN',\n UNNECESSARY = 'UNNECESSARY',\n}\n\nexport interface PaginateData<T> {\n collection: T[];\n totalItems: number;\n totalPages: number;\n total?: number;\n pageNumber: number;\n}\n","import Box from \"@mui/material/Box\";\nimport CircularProgress from \"@mui/material/CircularProgress\";\n\n/**\n * This interface is referencing the [[Loader]] component props.\n * @category Common UI components\n */\nexport interface LoaderProps {\n /**\n * Background transparency flag. Default: `rgba(255, 255, 255, .3)`\n */\n transparent?: boolean;\n /**\n * CSS `position` property. Default: `absolute`\n */\n position?: 'absolute' | 'relative' | 'fixed';\n}\n/**\n * Loader screen component. Used in the data loading process\n * @category Common UI components\n */\nexport const Loader = ({ transparent, position }: LoaderProps) => {\n return (\n <Box\n position={position ?? 'absolute'}\n top={0}\n left={0}\n width=\"100%\"\n height=\"100%\"\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n bgcolor={transparent ? 'none' : 'rgba(255, 255, 255, .3)'}\n zIndex={10}\n >\n <CircularProgress />\n </Box>\n )\n}\n\nexport default Loader;\n","import React from 'react';\nimport Button from '@mui/material/Button';\nimport Dialog, { DialogProps } from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogContentText from '@mui/material/DialogContentText';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport Box from '@mui/material/Box';\nimport { Loader } from '../Loader';\n\n/**\n * This interface is referencing the [[AlertDialog]] component props.\n * @category Common UI components\n */\nexport interface AlertDialogProps {\n /**\n * Is dialog open flag\n */\n open: boolean;\n /**\n * Dialog title\n */\n title: string;\n /**\n * Dialog description\n */\n description?: string;\n /**\n * Close button text\n */\n closeButtonTitle?: string;\n /**\n * Confirm button text\n */\n confirmButtonTitle?: string;\n /**\n * onClose event handle function\n */\n onClose: () => void;\n /**\n * onConfirm event handle function\n */\n \n onConfirm?: (values?: any) => void;\n /**\n * children components\n */\n children?: React.ReactNode;\n /**\n * Material UI Dialog component props\n */\n dialogProps?: Partial<DialogProps>;\n loading?: boolean;\n confirmButtonDisabled?: boolean;\n maxWidth?: false | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n};\n\n/**\n * Alert dialog component. Used for popup information\n * @category Common UI components\n */\nexport const AlertDialog = ({\n open,\n title,\n description,\n closeButtonTitle=\"Close\",\n onClose,\n confirmButtonTitle = \"Confirm\",\n confirmButtonDisabled = false,\n onConfirm,\n children,\n dialogProps,\n loading,\n maxWidth=\"xs\"\n}: AlertDialogProps) => {\n return (\n <div>\n <Dialog\n open={open}\n onClose={onClose}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n fullWidth\n maxWidth={maxWidth}\n {...dialogProps}\n >\n {loading && <Loader />}\n <DialogTitle id=\"alert-dialog-title\">{title}</DialogTitle>\n <DialogContent>\n { description && <DialogContentText id=\"alert-dialog-description\">{description}</DialogContentText>} \n <Box maxWidth=\"100%\" overflow=\"hidden\">{children}</Box>\n </DialogContent>\n <DialogActions>\n <Button onClick={onClose} color=\"primary\" variant=\"contained\">\n {closeButtonTitle}\n </Button>\n {confirmButtonTitle && onConfirm ? (\n <Button onClick={onConfirm} color=\"secondary\" variant=\"contained\" autoFocus disabled={confirmButtonDisabled}>\n {confirmButtonTitle}\n </Button>\n ) : null}\n </DialogActions>\n </Dialog>\n </div>\n );\n};\n\nexport default AlertDialog;","import { useController, Control, useWatch } from 'react-hook-form';\nimport TextField, { TextFieldProps } from '@mui/material/TextField';\nimport { ValidateFunc } from '../../interfaces';\n\n/**\n * This interface is referencing the [[ControlInput]] component props.\n * @category Forms\n */\nexport type ControlInputProps = TextFieldProps & {\n /**\n * React Hook Form control `name` propery\n */\n name: string;\n /**\n * Label for MUI TextField component\n */\n label?: string;\n /**\n * React Hook Form `control`\n */\n control: Control<any>;\n /**\n * Is input required flag\n */\n required?: boolean;\n /**\n * React Hook Form `defaultValue`\n */\n defaultValue?: unknown;\n /**\n * Is disabled input flag\n */\n disabled?: boolean;\n /**\n * React Hook Form validate function\n * ```typescript\n * type ValidateFunc = (value: string) => boolean | string;\n * ```\n */\n validate?: ValidateFunc | Record<string, ValidateFunc>;\n /**\n * Is input textarea flag\n */\n textarea?: boolean;\n /**\n * Hide error message flag\n */\n hideErrorMessage?: boolean;\n /**\n * Custom onChange functionƒ\n */\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n};\n\n/**\n * Material UI `TextField` controlled component. Used with react-hook-form\n * @category Forms\n */\nexport const ControlInput = ({\n control,\n validate,\n name = '',\n label = '',\n required = false,\n defaultValue = '',\n disabled = false,\n textarea = false,\n hideErrorMessage = false,\n onChange: customOnChange,\n ...textFieldProps\n}: ControlInputProps) => {\n const {\n field: { ref, onChange },\n fieldState: { error },\n } = useController({\n name,\n control,\n defaultValue,\n rules: {\n required: required && 'Please, fill this field',\n validate,\n },\n });\n const value = useWatch({ control, name });\n\n return (\n <TextField\n fullWidth\n size=\"small\"\n variant=\"outlined\"\n type=\"text\"\n inputRef={ref}\n name={name}\n label={label}\n error={!!error}\n helperText={!hideErrorMessage && error?.message}\n disabled={disabled}\n multiline={textarea}\n minRows={textarea ? 3 : 1}\n value={value ?? ''}\n onChange={customOnChange ? customOnChange : onChange}\n {...textFieldProps}\n inputProps={{\n ...(textFieldProps?.inputProps ?? {}),\n value: value ?? '',\n }}\n />\n );\n};\n\nexport default ControlInput;\n","import { useEffect, useRef, useState } from 'react';\n\nexport function useDebounce(func: (args?: any) => void, delay: number) {\n const timer = useRef<any>();\n\n useEffect(() => {\n return () => {\n if (!timer.current) return;\n clearTimeout(timer.current);\n };\n }, []);\n\n const debounceFunction = (...args) => {\n clearTimeout(timer.current);\n timer.current = setTimeout(() => {\n func(...args);\n }, delay);\n };\n\n return debounceFunction;\n}\n\n\nexport const useToggle = () => {\n const [open, setOpen] = useState(false);\n\n const toggle = () => {\n setOpen((prevState) => !prevState);\n };\n\n const onClose = () => {\n setOpen(false);\n };\n\n const onOpen = () => {\n setOpen(true);\n };\n\n return { open, toggle, onClose, onOpen };\n};\n\n","import TextField from '@mui/material/TextField';\n\nimport { useCallback, useEffect, useState } from 'react';\nimport { useController, useWatch } from 'react-hook-form';\nimport { useDebounce } from '../../utils/hooks';\nimport { ControlInputProps } from './ControlInput';\n\nexport const ControlDebouncedInput = ({\n control,\n validate,\n name = '',\n label = '',\n required = false,\n defaultValue = '',\n disabled = false,\n textarea = false,\n hideErrorMessage = false,\n onChange: customOnChange,\n ...textFieldProps\n}: ControlInputProps) => {\n const {\n field: { ref, onChange },\n fieldState: { error },\n } = useController({\n name,\n control,\n defaultValue,\n rules: {\n required: required && 'Please, fill this field',\n validate,\n },\n });\n const value = useWatch({ control, name });\n\n const [fieldValue, setFieldValue] = useState('');\n\n useEffect(() => {\n if (!fieldValue && value) {\n setFieldValue(value);\n }\n }, [fieldValue, value]);\n\n const debouncedChange = useDebounce((value) => {\n onChange(value);\n }, 200);\n\n const handleChange = useCallback(\n (e) => {\n setFieldValue(e.target.value);\n debouncedChange(e.target.value);\n },\n [debouncedChange]\n );\n\n return (\n <TextField\n fullWidth\n size=\"small\"\n variant=\"outlined\"\n type=\"text\"\n inputRef={ref}\n name={name}\n label={label}\n error={!!error}\n helperText={!hideErrorMessage && error?.message}\n disabled={disabled}\n multiline={textarea}\n minRows={textarea ? 3 : 1}\n value={fieldValue ?? ''}\n onChange={handleChange}\n {...textFieldProps}\n inputProps={{\n ...(textFieldProps?.inputProps ?? {}),\n value: fieldValue ?? '',\n }}\n />\n );\n};\n\nexport default ControlDebouncedInput;\n","import TextField, { TextFieldProps } from '@mui/material/TextField';\nimport MenuItem from '@mui/material/MenuItem';\nimport ClearIcon from '@mui/icons-material/Clear';\n\nimport { useCallback } from 'react';\nimport { useController, Control, useWatch } from 'react-hook-form';\nimport { ValidateFunc } from '../../interfaces';\nimport IconButton from '@mui/material/IconButton';\nimport InputAdornment from '@mui/material/InputAdornment';\n\n/**\n * This interface is referencing the [[ControlSelect]] component props.\n * @category Forms\n */\nexport type ControlSelectProps = TextFieldProps & {\n /**\n * React Hook Form control `name` propery\n */\n name: string;\n /**\n * Label for MUI TextField select component\n */\n label?: string;\n /**\n * React Hook Form `control`\n */\n control: Control<any>;\n /**\n * Is input required flag\n */\n required?: boolean;\n /**\n * React Hook Form `defaultValue`\n */\n defaultValue?: unknown;\n /**\n * Is disabled input flag\n */\n disabled?: boolean;\n /**\n * React Hook Form validate function\n * ```typescript\n * type ValidateFunc = (value: string) => boolean | string;\n * ```\n */\n validate?: ValidateFunc | Record<string, ValidateFunc>;\n /**\n * Hide error message flag\n */\n hideErrorMessage?: boolean;\n /**\n * Custom onChange functionƒ\n */\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n /**\n * Key for option label\n */\n labelKey?: string;\n /**\n * Key for option value\n */\n valueKey?: string;\n /**\n * Select options\n */\n options: string[] | unknown[];\n};\n\n/**\n * Material UI `Select` controlled component. Used with react-hook-form\n * @category Forms\n */\nexport const ControlSelect = ({\n control,\n validate,\n name = '',\n label = '',\n required = false,\n defaultValue = '',\n disabled = false,\n hideErrorMessage = false,\n onChange: customOnChange,\n labelKey,\n valueKey,\n options = [],\n ...textFieldProps\n}: ControlSelectProps) => {\n const {\n field: { ref, onChange },\n fieldState: { error },\n } = useController({\n name,\n control,\n defaultValue,\n rules: {\n required: required && 'Please, fill this field',\n validate,\n },\n });\n const value = useWatch({ control, name });\n\n const getValue = useCallback(\n (option) => {\n if (typeof option === 'string') return option;\n return valueKey ? option[valueKey] : option.value;\n },\n [valueKey]\n );\n const getLabel = useCallback(\n (option) => {\n if (typeof option === 'string') return option;\n return labelKey ? option[labelKey] : option.label;\n },\n [labelKey]\n );\n\n const handleClear = useCallback(() => {\n onChange(null);\n }, [onChange]);\n\n return (\n <TextField\n select\n fullWidth\n size=\"small\"\n variant=\"outlined\"\n type=\"text\"\n inputRef={ref}\n name={name}\n label={label}\n error={!!error}\n helperText={!hideErrorMessage && error?.message}\n disabled={disabled}\n value={value ?? ''}\n onChange={customOnChange ? customOnChange : onChange}\n {...textFieldProps}\n inputProps={{\n ...(textFieldProps?.inputProps ?? {}),\n value: value ?? '',\n }}\n InputProps={{\n endAdornment:\n !required && value ? (\n <InputAdornment position=\"end\" sx={{ mr: 2 }}>\n <IconButton onClick={handleClear} size=\"small\">\n <ClearIcon fontSize=\"small\" />\n </IconButton>\n </InputAdornment>\n ) : null,\n ...textFieldProps?.InputProps,\n }}\n >\n {options.map((option, index) => (\n <MenuItem key={index} value={getValue(option)}>\n {getLabel(option)}\n </MenuItem>\n ))}\n </TextField>\n );\n};\n\nexport default ControlSelect;\n","import FormControl from '@mui/material/FormControl';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport Checkbox, { CheckboxProps } from '@mui/material/Checkbox';\n\nimport { useMemo } from 'react';\nimport { Control, useController, useWatch } from 'react-hook-form';\nimport { ValidateFunc } from '../../interfaces';\n\n/**\n * This interface is referencing the [[ControlCheckbox]] component props.\n * @category Forms\n */\nexport type ControlCheckboxProps = CheckboxProps & {\n /**\n * React Hook Form control `name` propery\n */\n name: string;\n /**\n * Label for MUI TextField component\n */\n label?: string;\n /**\n * React Hook Form `control`\n */\n control: Control<any>;\n /**\n * React Hook Form `defaultValue`\n */\n defaultValue?: unknown;\n /**\n * Is disabled input flag\n */\n disabled?: boolean;\n /**\n * React Hook Form validate function\n * ```typescript\n * type ValidateFunc = (value: string) => boolean | string;\n * ```\n */\n validate?: ValidateFunc | Record<string, ValidateFunc>;\n /**\n * Hide error message flag\n */\n hideErrorMessage?: boolean;\n /**\n * Custom onChange functionƒ\n */\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n};\n\n/**\n * Material UI `Checkbox` controlled component. Used with react-hook-form\n * @category Forms\n */\nexport const ControlCheckbox = ({\n control,\n validate,\n name = '',\n label = '',\n required = false,\n defaultValue = '',\n disabled = false,\n hideErrorMessage = false,\n onChange: customOnChange,\n ...checkboxProps\n}: ControlCheckboxProps) => {\n const {\n field: { ref, onChange },\n fieldState: { error },\n } = useController({\n name,\n control,\n defaultValue,\n });\n const value = useWatch({ control, name });\n\n const checked = useMemo(() => {\n if (typeof value === 'boolean') {\n return value;\n } else if (typeof value === 'string') {\n if (value === 'false') {\n onChange(false);\n return false;\n } else if (value === 'true') {\n onChange(true);\n return true;\n }\n }\n return false;\n }, [value, onChange]);\n\n return (\n <FormControl error={!!error} component=\"fieldset\" variant=\"standard\" disabled={disabled}>\n <FormControlLabel\n control={\n <Checkbox\n checked={checked}\n onChange={customOnChange ? customOnChange : onChange}\n name={name}\n inputRef={ref}\n disabled={disabled}\n {...checkboxProps}\n />\n }\n label={label}\n />\n {!hideErrorMessage && error?.message && <FormHelperText>{error.message}</FormHelperText>}\n </FormControl>\n );\n};\n\nexport default ControlCheckbox;\n","import Radio from '@mui/material/Radio';\nimport RadioGroup from '@mui/material/RadioGroup';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport FormControl from '@mui/material/FormControl';\nimport FormLabel from '@mui/material/FormLabel';\n\nimport { Control, useController, useWatch } from 'react-hook-form';\nimport { ValidateFunc } from '../../interfaces';\nimport { useCallback } from 'react';\nimport FormHelperText from '@mui/material/FormHelperText';\n\n/**\n * This interface is referencing the [[ControlRadioBtn]] component props.\n * @category Forms\n */\nexport interface ControlRadioProps {\n /**\n * React Hook Form `control`\n */\n control: Control<any>;\n /**\n * React Hook Form control `name` propery\n */\n name: string;\n /**\n * Label for component\n */\n label?: string;\n /**\n * Radio group values\n */\n values: string[] | unknown[];\n /**\n * Is input required flag\n */\n required?: boolean;\n /**\n * React Hook Form `defaultValue`\n */\n defaultValue?: unknown;\n /**\n * Is disabled input flag\n */\n disabled?: boolean;\n /**\n * Hide error message flag\n */\n hideErrorMessage?: boolean;\n /**\n * Custom onChange functionƒ\n */\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n /**\n * React Hook Form validate function\n * ```typescript\n * type ValidateFunc = (value: string) => boolean | string;\n * ```\n */\n validate?: ValidateFunc | Record<string, ValidateFunc>;\n /**\n * Key for option label\n */\n labelKey?: string;\n /**\n * Key for option value\n */\n valueKey?: string;\n}\n\n/**\n * Material UI `Radio` controlled component. Used with react-hook-form\n * @category Forms\n */\nexport const ControlRadio = ({\n name,\n label,\n values = [],\n control,\n required,\n defaultValue,\n disabled,\n hideErrorMessage,\n labelKey,\n valueKey,\n validate,\n onChange: customOnChange,\n}: ControlRadioProps) => {\n const {\n field: { ref, onChange },\n fieldState: { error },\n } = useController({\n name,\n control,\n defaultValue,\n rules: {\n required: required && 'Please, fill this field',\n validate,\n },\n });\n const value = useWatch({ control, name });\n\n const getValue = useCallback(\n (option) => {\n if (typeof option === 'string') return option;\n return valueKey ? option[valueKey] : option.value;\n },\n [valueKey]\n );\n const getLabel = useCallback(\n (option) => {\n if (typeof option === 'string') return option;\n return labelKey ? option[labelKey] : option.label;\n },\n [labelKey]\n );\n\n return (\n <FormControl disabled={disabled} error={!!error}>\n <FormLabel id=\"radio-buttons-group\">{label}</FormLabel>\n <RadioGroup\n aria-labelledby=\"radio-buttons-group\"\n ref={ref}\n name={name}\n value={value}\n onChange={customOnChange ? customOnChange : onChange}\n >\n {values.map((item) => (\n <FormControlLabel value={getValue(item)} control={<Radio />} label={getLabel(item)} />\n ))}\n </RadioGroup>\n {!hideErrorMessage && error?.message && <FormHelperText>{error.message}</FormHelperText>}\n </FormControl>\n );\n};\n\nexport default ControlRadio;\n","import Box from '@mui/material/Box';\nimport { useCallback } from 'react';\n\nconst useAutocomplete = ({ valueKey, labelKey }) => {\n const isOptionEqualToValue = useCallback(\n (option, value) => {\n if (option && value) {\n if (typeof option === 'string') {\n return option === value;\n } else if (valueKey) {\n return option[valueKey] === value[valueKey] || option[valueKey] === value;\n } else if (option.value) {\n return option.value === value.value || option.value === value;\n }\n }\n return false;\n },\n [valueKey]\n );\n\n const getOptionLabel = useCallback(\n (option) => {\n if (!option) return '';\n if (typeof option === 'string') {\n return option;\n } else if (labelKey && option[labelKey]) {\n return option[labelKey] + '';\n } else {\n return option.label + '' || option.name + '' || option.value + '' || option.code + '' || '--no label--';\n }\n },\n [labelKey]\n );\n\n const renderOption = useCallback(\n (props, option) => (\n <Box {...props} component=\"li\" key={props.id}>\n {getOptionLabel(option)}\n </Box>\n ),\n [getOptionLabel]\n );\n\n return { isOptionEqualToValue, getOptionLabel, renderOption };\n};\n\nexport default useAutocomplete;\n","import Autocomplete, { AutocompleteProps } from '@mui/material/Autocomplete';\nimport TextField, { TextFieldProps } from '@mui/material/TextField';\nimport { Control, useController, useWatch } from 'react-hook-form';\n\nimport useAutocomplete from './useAutocomplete';\nimport { ValidateFunc } from '../../interfaces';\n\n/**\n * This interface is referencing the [[ControlAutocomplete]] component props.\n * @category Forms\n */\nexport type ControlAutocompleteProps = Omit<\n AutocompleteProps<unknown, boolean, boolean, boolean, React.ElementType<any>>,\n 'renderInput'\n> & {\n /**\n * React Hook Form control `name` propery\n */\n name: string;\n /**\n * Label for MUI TextField select component\n */\n label?: string;\n /**\n * React Hook Form `control`\n */\n control: Control<any>;\n /**\n * Is input required flag\n */\n required?: boolean;\n /**\n * React Hook Form `defaultValue`\n */\n defaultValue?: unknown;\n /**\n * Is disabled input flag\n */\n disabled?: boolean;\n /**\n * React Hook Form validate function\n * ```typescript\n * type ValidateFunc = (value: string) => boolean | string;\n * ```\n */\n validate?: ValidateFunc | Record<string, ValidateFunc>;\n /**\n * Hide error message flag\n */\n hideErrorMessage?: boolean;\n /**\n * Custom onChange functionƒ\n */\n onChange?: (event: React.ChangeEvent<HTMLInputElement>, value: unknown) => void;\n /**\n * Key for option label\n */\n labelKey?: string;\n /**\n * Key for option value\n */\n valueKey?: string;\n /**\n * Select options\n */\n options: string[] | unknown[];\n textFieldProps?: TextFieldProps;\n};\n\n/**\n * Material UI `Autocomplete` controlled component. Used with react-hook-form\n * @category Forms\n */\nexport const ControlAutocomplete = ({\n control,\n validate,\n name = '',\n label = '',\n required = false,\n defaultValue = '',\n disabled = false,\n hideErrorMessage = false,\n onChange: customOnChange,\n labelKey,\n valueKey,\n options = [],\n multiple,\n textFieldProps = {},\n disableCloseOnSelect,\n ...autocompleteProps\n}: ControlAutocompleteProps) => {\n const {\n field: { ref, onChange },\n fieldState: { error },\n } = useController({\n name,\n control,\n defaultValue,\n rules: {\n required: required && 'Please, fill this field',\n validate,\n },\n });\n const formValue = useWatch({ control, name, defaultValue: multiple ? [] : null });\n const { getOptionLabel, isOptionEqualToValue, renderOption } = useAutocomplete({ valueKey, labelKey });\n\n const handleChange = (_, value) => {\n onChange(value);\n };\n\n return (\n <Autocomplete\n fullWidth\n disablePortal\n size=\"small\"\n readOnly={disabled}\n options={options}\n multiple={multiple}\n getOptionLabel={getOptionLabel}\n isOptionEqualToValue={isOptionEqualToValue}\n disableCloseOnSelect={disableCloseOnSelect || multiple}\n filterSelectedOptions={multiple}\n value={formValue}\n onChange={customOnChange ? customOnChange : handleChange}\n renderOption={renderOption}\n renderInput={(params) => {\n return (\n <TextField\n {...params}\n variant=\"outlined\"\n name={name}\n label={label}\n error={!!error}\n inputRef={ref}\n helperText={!hideErrorMessage && error?.message}\n {...textFieldProps}\n />\n );\n }}\n {...autocompleteProps}\n />\n );\n};\n\nexport default ControlAutocomplete;\n","import React, { useCallback, useEffect, useState } from 'react';\nimport TextField from '@mui/material/TextField';\nimport Autocomplete from '@mui/material/Autocomplete';\nimport CircularProgress from '@mui/material/CircularProgress';\n\nimport { useController, useWatch } from 'react-hook-form';\nimport { useQuery } from '@tanstack/react-query';\nimport qs from 'qs';\nimport { useDebounce } from '../../utils/hooks';\nimport useAutocomplete from './useAutocomplete';\n\nimport { ControlAutocompleteProps } from './ControlAutocomplete';\nimport { PaginateData } from '../../interfaces';\n\ntype PaginateParams = {\n page: string;\n size: string;\n [key: string]: string;\n};\n\ntype ControlQueryAutocompleteProps<T> = Omit<ControlAutocompleteProps, 'options'> & {\n searchBy: string;\n sortBy?: string;\n queryFunction: (params: PaginateParams) => Promise<PaginateData<T>>;\n itemQueryFunction?: (valueKey: string) => Promise<T>;\n};\n\nexport function ControlQueryAutocomplete<T>({\n name,\n label,\n control,\n required = false,\n searchBy,\n labelKey,\n multiple = false,\n disabled,\n valueKey,\n sortBy = '',\n hideErrorMessage,\n disableCloseOnSelect,\n textFieldProps,\n onChange,\n queryFunction,\n validate,\n itemQueryFunction,\n ...autocompleteProps\n}: ControlQueryAutocompleteProps<T>) {\n const {\n field: { ref, onChange: setFieldValue },\n fieldState: { error, isDirty },\n } = useController({ control, name, rules: { required: required && 'Please, fill this field', validate } });\n const formValue = useWatch({ control, name, defaultValue: multiple ? [] : null });\n\n const { getOptionLabel, isOptionEqualToValue, renderOption } = useAutocomplete({ valueKey, labelKey });\n\n const [open, setOpen] = useState(false);\n const [inputValue, setInputValue] = useState('');\n const [searchValue, setSearchValue] = useState('');\n const [totalItems, setTotalItems] = useState(0);\n const [page, setPage] = useState(0);\n const [options, setOptions] = useState<unknown[]>([]);\n\n const debouncedChange = useDebounce((val) => {\n setPage(0);\n setSearchValue(val);\n setOptions([]);\n }, 500);\n\n const handleInputChange = useCallback(\n (_, value) => {\n setInputValue(value);\n debouncedChange(value);\n },\n [debouncedChange]\n );\n\n const handleValueChange = useCallback(\n (event, value) => {\n setFieldValue(value);\n if (onChange) {\n onChange(event, value);\n }\n },\n [setFieldValue, onChange]\n );\n\n useEffect(() => {\n if (!isDirty && formValue && itemQueryFunction) {\n let requestValue = formValue;\n\n if (typeof formValue === 'object' && valueKey in formValue) {\n requestValue = formValue[valueKey];\n }\n\n itemQueryFunction(requestValue)\n .then((item) => {\n setFieldValue(item);\n setInputValue(item[labelKey]);\n })\n .catch();\n }\n }, [formValue, isDirty, valueKey, labelKey, itemQueryFunction, setFieldValue]);\n\n const handleOnScroll = useCallback(\n (event: React.SyntheticEvent) => {\n const listboxNode = event.currentTarget;\n if (\n listboxNode.scrollHeight - listboxNode.scrollTop - listboxNode.clientHeight <= 1 &&\n options.length < totalItems\n ) {\n setPage((page) => page + 1);\n }\n },\n [totalItems, options]\n );\n\n const handleOpen = () => {\n setOpen(true);\n };\n\n const handleClose = () => {\n setOpen(false);\n setSearchValue('');\n };\n\n const { data, isFetching } = useQuery(['options', page, searchValue], () => {\n const params = qs.parse(\n {\n page: `${page}`,\n size: '20',\n sort: sortBy,\n ...(searchValue ? { [searchBy]: searchValue } : {}),\n },\n { ignoreQueryPrefix: true }\n );\n return queryFunction(params as PaginateParams);\n });\n\n useEffect(() => {\n if (data) {\n setOptions((prevOptions) => [...prevOptions, ...data.collection]);\n setTotalItems(data.totalItems);\n }\n }, [data]);\n\n return (\n <Autocomplete\n fullWidth\n disablePortal\n size=\"small\"\n readOnly={disabled}\n options={options}\n multiple={multiple}\n getOptionLabel={getOptionLabel}\n isOptionEqualToValue={isOptionEqualToValue}\n disableCloseOnSelect={disableCloseOnSelect || multiple}\n filterSelectedOptions={multiple}\n inputValue={inputValue}\n value={formValue}\n onChange={handleValueChange}\n loading={isFetching}\n clearOnBlur={false}\n open={open}\n filterOptions={(x) => x}\n onOpen={handleOpen}\n onClose={handleClose}\n onInputChange={handleInputChange}\n ListboxProps={{\n onScroll: handleOnScroll,\n }}\n renderOption={renderOption}\n renderInput={(params) => (\n <TextField\n {...params}\n label={label}\n variant=\"outlined\"\n error={!!error}\n inputRef={ref}\n helperText={!hideErrorMessage && error?.message}\n InputProps={{\n ...params.InputProps,\n endAdornment: (\n <React.Fragment>\n {isFetching ? <CircularProgress color=\"inherit\" size={20} /> : null}\n {params.InputProps.endAdornment}\n </React.Fragment>\n ),\n }}\n {...textFieldProps}\n />\n )}\n {...autocompleteProps}\n />\n );\n}\n\nexport default ControlQueryAutocomplete;\n","import { useState } from 'react';\n// import FileCopyOutlinedIcon from '@mui/icons-material/FileCopyOutlined';\nimport Tooltip from '@mui/material/Tooltip';\nimport IconButton from '@mui/material/IconButton';\nimport SvgIcon from '@mui/material/SvgIcon';\n/**\n * This interface is referencing the [[CopyButton]] component props.\n * @category Forms\n */\nexport interface CopyButtonProps {\n /**\n * Text to copy\n */\n copyText: string;\n /**\n * Tooltip help text\n */\n helpText?: string;\n}\n\n/**\n * Copy value button\n * @category Forms\n */\nexport const CopyButton = ({ copyText, helpText = 'Copy' }: CopyButtonProps) => {\n const [tooltipText, setTooltipText] = useState(helpText);\n\n const onCopy = () => {\n navigator.clipboard.writeText(copyText);\n setTooltipText('Copied!');\n\n setTimeout(() => {\n setTooltipText(helpText);\n }, 1000);\n };\n\n return tooltipText ? (\n <Tooltip title={tooltipText} placement=\"top\">\n <IconButton onClick={onCopy}>\n <SvgIcon fontSize=\"small\">\n <path d=\"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4 6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z\"></path>\n </SvgIcon>\n </IconButton>\n </Tooltip>\n ) : null;\n};\n","import { useCallback, useMemo } from 'react';\nimport SvgIcon from '@mui/material/SvgIcon';\nimport { useNavigate, useLocation, Link } from 'react-router-dom';\nimport IconButton from '@mui/material/IconButton';\nimport Button from '@mui/material/Button';\nimport Box from '@mui/material/Box';\n\ntype Props = {\n text?: string;\n buttonProps?: Record<string, unknown>;\n};\nexport const BackButton = ({ text, buttonProps = {} }: Props) => {\n const navigate = useNavigate();\n const { state } = useLocation();\n const fromLocation = useMemo(() => state?.['from'], [state]);\n\n const handleClick = useCallback(() => {\n if (fromLocation) {\n navigate(fromLocation);\n } else navigate(-1);\n }, [navigate, fromLocation]);\n\n return (\n <Box mr={2}>\n {text ? (\n <Button\n color=\"inherit\"\n onClick={!fromLocation ? handleClick : null}\n component={Link}\n to={fromLocation ?? ''}\n {...buttonProps}\n >\n {text}\n </Button>\n ) : (\n <IconButton onClick={handleClick}>\n <SvgIcon>\n <path d=\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\" />\n </SvgIcon>\n </IconButton>\n )}\n </Box>\n );\n};\n\nexport default BackButton;\n","import AceEditor from 'react-ace';\nimport 'ace-builds/src-noconflict/mode-python';\nimport 'ace-builds/src-noconflict/theme-monokai';\nimport 'ace-builds/src-noconflict/ext-language_tools';\nimport Typography from '@mui/material/Typography';\nimport Box from '@mui/material/Box';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport { Control, useFormContext, useController, useWatch } from 'react-hook-form';\nimport { forwardRef } from 'react';\n\nexport interface ControlAceEditorProps {\n name: string;\n control: Control<any>;\n mode?: string;\n label?: string;\n width?: string;\n height?: string;\n theme?: string;\n readOnly?: boolean;\n required?: boolean;\n validateJson?: boolean;\n fontSize?: number;\n validate?: boolean;\n parseValue?: boolean;\n [key: string]: unknown;\n}\n\nexport const ControlAceEditor = forwardRef<AceEditor, ControlAceEditorProps>(({\n control,\n name,\n mode = 'json',\n label,\n width = '100%',\n height = '200px',\n theme = 'monokai',\n readOnly,\n required = false,\n validateJson = false,\n fontSize = 16,\n validate = true,\n parseValue,\n ...otherProps\n}, ref) => {\n const { setError, clearErrors } = useFormContext();\n const {\n field: { onChange },\n fieldState: { error },\n } = useController({ control, name });\n const value = useWatch({ control, name });\n\n const handleChange = (value) => {\n if (!value && required) {\n setError(name, { message: 'Required field' });\n } else {\n clearErrors(name);\n }\n\n if (validateJson) {\n try {\n JSON.parse(value);\n clearErrors(name);\n } catch (error) {\n setError(name, { message: 'Invalid JSON' });\n }\n }\n\n if (parseValue) {\n try {\n const val = JSON.parse(value);\n console.log('parsed val:', val);\n onChange(val);\n } catch (e) {\n onChange(value);\n }\n } else {\n onChange(value);\n } \n };\n\n return (\n <Box display=\"flex\" flexDirection=\"column\" width=\"100%\">\n <Box>\n {label && (\n <Typography variant=\"subtitle1\" display=\"inline\" style={{ marginRight: 10 }}>\n {label}\n </Typography>\n )}\n </Box>\n <>\n <AceEditor\n ref={ref}\n focus\n wrapEnabled\n width={width}\n height={height}\n showPrintMargin={false}\n theme={theme}\n fontSize={fontSize}\n setOptions={{\n enableLiveAutocompletion: true,\n enableBasicAutocompletion: true,\n enableSnippets: true,\n showLineNumbers: true,\n tabSize: 2,\n }} \n style={{ lineHeight: 1.4, zIndex: 0, isolation: 'isolate' }}\n readOnly={readOnly}\n value={mode === 'json' && typeof value !== 'string' ? (value === null ? '' : JSON.stringify(value)) : value}\n onChange={handleChange}\n mode={mode}\n onLoad={(editor) => {\n if (!validate || !validateJson) {\n editor.getSession().setUseWorker(false);\n }\n }}\n {...otherProps}\n />\n {error && <FormHelperText error>{error.message}</FormHelperText>}\n </>\n </Box>\n );\n});\n\nexport default ControlAceEditor;\n","export const removeArrayItem = (arr: Array<unknown>, index: number) => {\n const newArr = [...arr];\n newArr.splice(index, 1);\n return newArr;\n};\n\nexport const validateJson = (value: string): boolean => {\n try {\n JSON.parse(value);\n } catch (error) {\n return false;\n }\n return true;\n};\n\nexport function capitalize(str: string): string {\n return str.replace(/(^\\w)|([-\\s]\\w)/g, (c) => c.toUpperCase());\n}\n\nexport const sortArrayOfObjects = (a: Record<string, unknown>, b: Record<string, unknown>, key: string, order = 'asc') => {\n const valueA = a[key];\n const valueB = b[key];\n\n if (valueA < valueB) return order === 'asc' ? -1 : 1;\n if (valueA > valueB) return order === 'asc' ? 1 : -1;\n return 0;\n};\n\nexport const getJsonStringValue = (value: unknown): string => {\n if (!value) return '';\n if (typeof value !== 'string') {\n try {\n return JSON.stringify(value, null, '\\t');\n } catch (error) {\n return 'Failed to stringify JSON';\n }\n }\n return value;\n};\n\nexport const safeParseJson = (value: string) => {\n try {\n return JSON.parse(value);\n } catch (error) {\n return null;\n }\n};\n\nexport const deepParseJson = (value: string) => {\n try {\n const parsedValue = JSON.parse(value);\n Object.keys(parsedValue).forEach((key) => {\n parsedValue[key] = deepParseJson(parsedValue[key]);\n });\n return parsedValue;\n } catch (error) {\n return value;\n }\n};\n\n// export const convertArrayToObjectByKey = (array: { [key: string]: string }[], key: string) => {\n// const obj = {};\n// array.forEach((el) => {\n// obj[el[key]] = { ...el };\n// delete obj[el[key]][key];\n// });\n// return obj;\n// };\n","import { useMemo } from 'react';\nimport AceEditor from 'react-ace';\nimport 'ace-builds/src-noconflict/ace';\nimport 'ace-builds/src-noconflict/mode-json';\n\ntype Props = {\n value: unknown;\n height?: string;\n};\n\nexport const JsonView = ({ value, height = '200px' }: Props) => {\n const stringValue = useMemo(() => {\n if (typeof value === 'string') {\n return value;\n } else if (typeof value === 'object') {\n try {\n return JSON.stringify(value, null, '\\t');\n } catch (error) {\n return 'Failed to parse JSON';\n }\n }\n return null;\n }, [value]);\n\n return (\n <AceEditor\n readOnly\n value={stringValue}\n mode=\"json\"\n width=\"100%\"\n height={height}\n fontSize=\"16\"\n setOptions={{\n enableSnippets: false,\n copyWithEmptySelection: true,\n showLineNumbers: true,\n tabSize: 2,\n }}\n />\n );\n};\n","import React from 'react';\nimport AceEditor from 'react-ace';\nimport 'ace-builds/src-noconflict/ace';\nimport 'ace-builds/src-noconflict/mode-json';\nimport Dialog from '@mui/material/Dialog';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogActions from '@mui/material/DialogActions';\nimport Button from '@mui/material/Button';\nimport { CopyButton } from '../Forms';\n\ntype Props = {\n open: boolean;\n value: string;\n onClose: () => void;\n};\n\nexport const JsonModalView: React.FC<Props> = ({ open, onClose, value }) => {\n return (\n <Dialog\n disableEscapeKeyDown\n open={open}\n onClose={onClose}\n fullWidth\n maxWidth=\"md\"\n style={{ width: 800, left: '30%' }}\n >\n <DialogContent>\n <AceEditor\n readOnly\n value={value}\n mode=\"json\"\n width=\"100%\"\n fontSize=\"16\"\n setOptions={{\n enableSnippets: false,\n copyWithEmptySelection: true,\n showLineNumbers: true,\n tabSize: 2,\n }}\n />\n </DialogContent>\n <DialogActions>\n <CopyButton copyText={value} />\n <Button onClick={onClose} variant=\"contained\" color=\"secondary\">\n Close\n </Button>\n </DialogActions>\n </Dialog>\n );\n};\n\nexport default JsonModalView;\n","import Box from '@mui/material/Box';\nimport Tooltip from '@mui/material/Tooltip';\nimport SvgIcon from '@mui/material/SvgIcon';\nimport IconButton from '@mui/material/IconButton';\nimport { getJsonStringValue, useToggle } from '../../../utils';\nimport { CopyButton } from '../../Forms';\nimport { JsonView } from '../../JsonView';\nimport { JsonModalView } from '../../Modals';\n\nconst JsonTypeCell = ({\n value,\n copyButton = false,\n textField = false,\n}: {\n value: any;\n copyButton?: boolean;\n textField?: boolean;\n}) => {\n const { open: jsonModalOpen, onOpen: onJsonModalOpen, onClose: onJsonModalClose } = useToggle();\n\n return (\n <Box width=\"100%\">\n <Box display=\"flex\" alignItems=\"center\" justifyContent=\"flex-end\" pt={1} mb={2}>\n {copyButton && <CopyButton copyText={getJsonStringValue(value)} />}\n <Tooltip title=\"Open\" placement=\"top\">\n <IconButton size=\"small\" onClick={() => onJsonModalOpen()}>\n <SvgIcon>\n <path d=\"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z\" />\n </SvgIcon> \n </IconButton>\n </Tooltip>\n </Box>\n {textField ? (\n <Box overflow=\"hidden\" whiteSpace=\"nowrap\">\n {typeof value === 'object' ? JSON.stringify(value) : value}\n </Box>\n ) : (\n <JsonView value={value} />\n )}\n <JsonModalView open={jsonModalOpen} value={getJsonStringValue(value)} onClose={onJsonModalClose} />\n </Box>\n );\n};\n\nexport default JsonTypeCell;\n","import Box from '@mui/material/Box';\nimport SvgIcon from '@mui/material/SvgIcon';\nimport { CopyButton, Status } from '../lib';\nimport { format } from 'date-fns';\nimport { StatusVariant, TableDataType } from '../interfaces';\nimport JsonTypeCell from '../lib/Table/DataGrid/JsonTypeCell';\n\nexport const formatTableRowValue = ({\n value,\n type,\n copyText,\n status,\n}: {\n value: any;\n type?: TableDataType;\n copyText?: string;\n status?: StatusVariant;\n}) => {\n switch (type) {\n case 'id':\n return (\n <Box display=\"flex\" alignItems=\"center\" width=\"100%\">\n <Box mr=\"auto\">{`${(value as string).slice(0, 6)}...${(value as string).slice(-6)}`}</Box>\n <CopyButton copyText={(copyText ? copyText : value) as string} />\n </Box>\n );\n case 'JSON_copy':\n return <JsonTypeCell value={value} copyButton />;\n case 'JSON':\n return <JsonTypeCell value={value} />;\n case 'JSON_text':\n return <JsonTypeCell value={value} textField />;\n case 'copy':\n return (\n <Box display=\"flex\" alignItems=\"center\" width=\"100%\">\n <Box mr=\"auto\">{value}</Box>\n <CopyButton copyText={(copyText ? copyText : value) as string} />\n </Box>\n );\n case 'boolean':\n return value ?\n (<SvgIcon color=\"primary\" fontSize=\"small\">\n <path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\" />\n </SvgIcon>) :\n (<SvgIcon fontSize=\"small\">\n <path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z\" />\n </SvgIcon>);\n case 'date':\n return value ? (\n <div>\n <div>{format(new Date(value as string), 'dd.MM.yyyy')}</div>\n <div>{format(new Date(value as string), 'HH:mm:ss')}</div>\n </div>\n ) : (\n ''\n );\n case 'status':\n return <Status text={value as string} status={status} />;\n case 'array':\n return (\n <Box>\n {(value as string[]).map((val, index) => (\n <Box key={index}>{val}</Box>\n ))}\n </Box>\n );\n default:\n return <div>{value}</div>;\n }\n};\n","import { PropertyType } from '../interfaces';\n\nexport const digitsOnly = new RegExp('^[-+]?[0-9]+$');\nexport const floatsOnly = new RegExp(/^[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?$/);\n\nexport const isExpression = (value: unknown): boolean => {\n return typeof value === 'string' ? value.includes('$(') : false;\n};\n\nexport const isDateType = (propertyType: PropertyType) => {\n return (\n propertyType === PropertyType.DATE || propertyType === PropertyType.DATE_TIME || propertyType === PropertyType.TIME\n );\n};\n","import {\n PropertyType,\n EntityTypeProperty,\n PropertiesArrayType,\n PropertyUnion,\n PropertiesObjectType,\n PropertyFillType,\n} from '../interfaces';\nimport { sortArrayOfObjects } from './common';\nimport { format } from 'date-fns';\n\nexport const isPropertyValueEmpty = (value: unknown): boolean => {\n if (value || value === 0 || value === false) {\n return false;\n }\n return true;\n};\n\nconst formatPropertyValue = (\n propertyType: PropertyType,\n value: unknown,\n params?: {\n formatText?: string;\n properties?: PropertiesArrayType;\n }\n) => {\n if ((value === null || value === undefined) && propertyType !== PropertyType.BOOLEAN) {\n return null;\n }\n let parsedValue: unknown = value;\n\n switch (propertyType) {\n case PropertyType.BOOLEAN:\n if (value) {\n parsedValue = true;\n } else {\n parsedValue = false;\n }\n break;\n case PropertyType.INTEGER:\n case PropertyType.BIG_INTEGER:\n case PropertyType.BIG_DECIMAL:\n case PropertyType.FLOAT:\n case PropertyType.LONG:\n case PropertyType.DOUBLE:\n parsedValue = Number(value);\n break;\n case PropertyType.DATE:\n case PropertyType.DATE_TIME:\n case PropertyType.TIME:\n parsedValue = format(new Date(value.toString()), params.formatText);\n break;\n case PropertyType.JSON:\n case PropertyType.ANY:\n try {\n if (typeof value !== 'string') {\n parsedValue = JSON.stringify(value);\n }\n parsedValue = JSON.parse(parsedValue as string);\n } catch (e) {\n console.log(e);\n parsedValue = null;\n }\n break;\n case PropertyType.ENTITY:\n parsedValue = formatDefinitionData(params.properties, value);\n break;\n default:\n break;\n }\n\n return parsedValue;\n};\n\nexport const formatDefinitionData = (properties: PropertiesArrayType<unknown>, data: unknown) => {\n if (data) {\n const formattedData = {};\n\n properties.forEach((property) => {\n const { key, propertyType } = property;\n const value = data[key];\n\n if (Array.isArray(value)) {\n formattedData[key] = value.map((val) =>\n formatPropertyValue(propertyType, val, {\n formatText: property['format'],\n properties: property['properties'],\n })\n );\n } else {\n formattedData[key] = formatPropertyValue(propertyType, value, {\n formatText: property['format'],\n properties: property['properties'],\n });\n }\n });\n\n return formattedData;\n }\n return null;\n};\n\nconst getPropertyValue = (property: PropertyUnion & { [key: string]: unknown }, isGlobalParameter: boolean) => {\n const valueObject = {};\n let value;\n let key = '';\n\n if (isGlobalParameter) {\n if (property.isMultiple) {\n key = 'values';\n value = property['value'];\n } else {\n key = 'value';\n value = property['value'];\n }\n } else {\n if (property.isMultiple) {\n key = 'defaultValues';\n value = property['defaultValue'];\n } else {\n key = 'defaultValue';\n value = property['defaultValue'];\n }\n }\n\n if (Array.isArray(value)) {\n valueObject[key] = value.map((val) =>\n formatPropertyValue(property.propertyType, val, {\n formatText: property['format'] as string,\n properties: property['properties'] as PropertiesArrayType,\n })\n );\n } else {\n valueObject[key] = formatPropertyValue(property.propertyType, value, {\n formatText: property['format'] as string,\n properties: property['properties'] as PropertiesArrayType,\n });\n }\n\n return valueObject;\n};\n\nexport const propertiesArrayToObject = (properties, isGlobalParameter?: boolean): PropertiesObjectType<any> => {\n const propertiesObject = {};\n\n properties.forEach((property) => {\n const { key, name, isRequired, isMultiple, sortOrder, isEnabled, uiSettings, validationNode } = property;\n const propertyType =\n typeof property.propertyType === 'string' ? property.propertyType : property.propertyType.value;\n\n const resultProperty = {\n name,\n propertyType,\n isRequired,\n isMultiple,\n sortOrder,\n isEnabled,\n validationNode,\n uiSettings,\n ...getPropertyValue({ ...property, propertyType }, isGlobalParameter),\n };\n\n if ('isViewableInList' in property) {\n resultProperty['isViewableInList'] = property.isViewableInList;\n }\n\n if (uiSettings) {\n try {\n resultProperty.uiSettings = JSON.parse(uiSettings);\n } catch (e) {\n console.log(e);\n }\n } else {\n resultProperty.uiSettings = null;\n }\n\n if (propertyType === PropertyType.BIG_DECIMAL) {\n resultProperty['precisionScale'] = property.precisionScale;\n resultProperty['roundingMode'] = property.roundingMode;\n }\n\n if (\n propertyType === PropertyType.DATE ||\n propertyType === PropertyType.TIME ||\n propertyType === PropertyType.DATE_TIME\n ) {\n resultProperty['format'] = property.format;\n }\n\n if (propertyType === PropertyType.STRING) {\n resultProperty['restrictedValues'] = property.restrictedValues;\n }\n\n if (propertyType === PropertyType.ENTITY_REFERENCE) {\n resultProperty['definitionCode'] = property.definitionCode;\n resultProperty['definitionVersion'] = property.definitionVersion;\n resultProperty['labelPropertyCode'] = property.labelPropertyCode;\n resultProperty['valuePropertyCode'] = property.valuePropertyCode;\n }\n\n if (propertyType === PropertyType.ENTITY) {\n resultProperty['properties'] = propertiesArrayToObject(property.properties, isGlobalParameter);\n }\n\n propertiesObject[key] = resultProperty;\n });\n\n return propertiesObject;\n};\n\nexport function propertiesObjectToArray(properties, fields?: { [key: string]: unknown }) {\n return Object.keys(properties)\n .map((key) => {\n const propObj = { key, ...properties[key], ...(fields ? fields : {}) };\n if (propObj['propertyType'] === PropertyType.ENTITY) {\n propObj['properties'] = propertiesObjectToArray(propObj['properties'], fields);\n }\n\n if (propObj['propertyType'] === PropertyType.JSON) {\n try {\n if (propObj.defaultValue == null) {\n propObj.defaultValue = '';\n } else {\n propObj.defaultValue = JSON.stringify(propObj.defaultValue, null, 2);\n }\n } catch (error) {\n propObj.defaultValue = '';\n }\n }\n\n if (propObj['uiSettings']) {\n try {\n propObj.uiSettings = JSON.stringify(propObj.uiSettings, null, 2);\n } catch (error) {\n propObj.uiSettings = '';\n }\n }\n\n if (propObj['isMultiple']) {\n if ('defaultValues' in propObj) {\n propObj['defaultValue'] = propObj.defaultValues;\n }\n if ('values' in propObj) {\n propObj['value'] = propObj.values;\n }\n }\n\n return propObj;\n })\n .sort((a, b) => sortArrayOfObjects(a, b, 'sortOrder'));\n}\n\nexport const getDemPropertyDateFormat = (defaultFormat: string, propertyFormat: string) => {\n if (propertyFormat) {\n try {\n const correctFormat = propertyFormat.replace(/Z/g, 'XXX');\n format(new Date(), correctFormat);\n return correctFormat;\n } catch (e) {\n console.error('Incorrect format', e);\n return defaultFormat;\n }\n }\n return defaultFormat;\n};\n\nexport const getEntityStarterValue = (property: EntityTypeProperty) => {\n let properties: PropertiesArrayType = [];\n if (Array.isArray(property.properties)) {\n properties = property.properties;\n } else {\n properties = propertiesObjectToArray(property.properties);\n }\n\n return properties.reduce((value, property) => {\n const result = JSON.parse(JSON.stringify(value));\n if (property.propertyType === PropertyType.ENTITY) {\n result[property.key] = getEntityStarterValue(property);\n } else {\n result[property.key] = property.propertyType;\n }\n return result;\n }, {});\n};\n\nexport const getMultiplePropertyFillOptions = ({\n propertyType,\n useExpression,\n required,\n}: {\n propertyType: PropertyType;\n required: boolean;\n useExpression?: boolean;\n}): { value: PropertyFillType; label: string; sortOrder: number }[] => {\n let options: { value: PropertyFillType; label: string; sortOrder: number }[] = [\n {\n value: 'widget',\n label: 'Fill array (widget)',\n sortOrder: 1,\n },\n ];\n\n if (!required) {\n options.push({\n value: 'null',\n label: 'NULL',\n sortOrder: 0,\n });\n }\n\n if (useExpression) {\n if (\n propertyType === PropertyType.JSON ||\n propertyType === PropertyType.ENTITY ||\n propertyType === PropertyType.ANY\n ) {\n options.push({ value: 'expression', label: 'Expression (JSON editor)', sortOrder: 3 });\n } else {\n options.push({\n value: 'expression',\n label: 'Expression',\n sortOrder: 3,\n });\n }\n }\n\n if (propertyType === PropertyType.JSON || propertyType === PropertyType.ANY || propertyType === PropertyType.ENTITY) {\n options.push({\n value: 'json_valid',\n label: 'JSON editor',\n sortOrder: 2,\n });\n }\n\n options = options.sort((a, b) => sortArrayOfObjects(a, b, 'sortOrder'));\n return options;\n};\n\nexport const getSinglePropertyFillOptions = ({\n propertyType,\n useExpression,\n required,\n}: {\n propertyType: PropertyType;\n required: boolean;\n useExpression?: boolean;\n}): { value: PropertyFillType; label: string; sortOrder: number }[] => {\n let options: { value: PropertyFillType; label: string; sortOrder: number }[] = [\n {\n value: 'widget',\n label: 'Widget',\n sortOrder: 1,\n },\n ];\n\n if (!required) {\n options.push({\n value: 'null',\n label: 'NULL',\n sortOrder: 0,\n });\n }\n\n if (useExpression) {\n if (\n propertyType === PropertyType.JSON ||\n propertyType === PropertyType.ENTITY ||\n propertyType === PropertyType.ANY\n ) {\n options.push({ value: 'expression', label: 'Expression (JSON editor)', sortOrder: 3 });\n } else {\n options.push({\n value: 'expression',\n label: 'Expression',\n sortOrder: 3,\n });\n }\n }\n\n switch (propertyType) {\n case PropertyType.STRING:\n options[0].label = 'Text input';\n break;\n case PropertyType.INTEGER:\n case PropertyType.BIG_INTEGER:\n case PropertyType.BIG_DECIMAL:\n case PropertyType.FLOAT:\n case PropertyType.LONG:\n case PropertyType.DOUBLE:\n options[0].label = 'Number input';\n break;\n case PropertyType.BOOLEAN:\n options[0].label = 'Switch';\n break;\n case PropertyType.ENTITY_REFERENCE:\n options[0].label = 'Entity reference fields';\n break;\n case PropertyType.JSON:\n options[0].label = 'JSON editor';\n break;\n case PropertyType.DATE:\n options[0].label = 'Date picker';\n options.push({ value: 'string', label: 'Text input', sortOrder: 2 });\n break;\n case PropertyType.DATE_TIME:\n options[0].label = 'Date & Time picker';\n options.push({ value: 'string', label: 'Text input', sortOrder: 2 });\n break;\n case PropertyType.TIME:\n options[0].label = 'Time picker';\n options.push({ value: 'string', label: 'Text input', sortOrder: 2 });\n break;\n case PropertyType.ANY:\n options[0].label = 'Textarea';\n break;\n default:\n break;\n }\n\n options = options.sort((a, b) => sortArrayOfObjects(a, b, 'sortOrder'));\n return options;\n};\n","import TextField, { TextFieldProps } from '@mui/material/TextField';\nimport { useController, Control, useWatch } from 'react-hook-form';\nimport { floatsOnly, digitsOnly } from '../../utils';\nimport { ValidateFunc } from '../../interfaces';\n\ntype Props = TextFieldProps & {\n /**\n * React Hook Form control `name` propery\n */\n name: string;\n /**\n * Label for MUI TextField component\n */\n label?: string;\n /**\n * React Hook Form `control`\n */\n control: Control;\n /**\n * Is input required flag\n */\n required?: boolean;\n /**\n * React Hook Form `defaultValue`\n */\n defaultValue?: number;\n /**\n * Is disabled input flag\n */\n disabled?: boolean;\n /**\n * React Hook Form validate function\n * ```typescript\n * type ValidateFunc = (value: string) => boolean | string;\n * ```\n */\n validate?: ValidateFunc | Record<string, ValidateFunc>;\n\n /**\n * Hide error message flag\n */\n hideErrorMessage?: boolean;\n /**\n * Custom onChange function\n */\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n /**\n * Is number decimal or integer flag\n */\n decimal?: boolean;\n};\n\nexport const ControlNumberInput = ({\n control,\n validate,\n name = '',\n label = '',\n required = false,\n defaultValue,\n disabled = false,\n hideErrorMessage = false,\n onChange: customOnChange,\n decimal = false,\n ...textFieldProps\n}: Props) => {\n const {\n field: { ref, onChange },\n fieldState: { error },\n } = useController({\n name,\n control,\n defaultValue,\n rules: {\n required: required && 'Please, fill this field',\n validate: (val) => {\n if (decimal && !floatsOnly.test(val)) {\n return 'Not valid number';\n } else if (!decimal && !digitsOnly.test(val)) {\n return 'Not valid integer';\n }\n return true;\n },\n },\n });\n const value = useWatch({ control, name });\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const lastData = event.nativeEvent['data'] || event.target.value;\n if (!isNaN(lastData) || (decimal && lastData === '.') || lastData === '-' || lastData === '+') {\n if (customOnChange) {\n customOnChange(event);\n } else {\n onChange(event.target.value);\n }\n }\n };\n\n return (\n <TextField\n fullWidth\n size=\"small\"\n variant=\"outlined\"\n type=\"text\"\n inputRef={ref}\n name={name}\n label={label}\n error={!!error}\n helperText={!hideErrorMessage && error?.message}\n disabled={disabled}\n value={value ?? ''}\n {...textFieldProps}\n onChange={handleChange}\n inputProps={{\n ...(textFieldProps?.inputProps ?? {}),\n value: value ?? '',\n }}\n />\n );\n};\n\nexport default ControlNumberInput;\n","import Switch, { SwitchProps } from '@mui/material/Switch';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport { Control, useController, useWatch } from 'react-hook-form';\nimport { useEffect, useMemo } from 'react';\n\ntype Props = SwitchProps & {\n /**\n * React Hook Form `control`\n */\n control: Control<any>;\n /**\n * React Hook Form control `name` propery\n */\n name: string;\n /**\n * Material-UI FormControlLabel `label` prop\n */\n label?: string;\n};\n\nexport const ControlSwitch = ({ control, name, label, ...switchProps }: Props) => {\n const {\n field: { ref, onChange },\n } = useController({ control, name });\n const value = useWatch({ control, name });\n\n const checked = useMemo(() => {\n if (typeof value === 'boolean') {\n return value;\n } else if (typeof value === 'string') {\n if (value === 'false') {\n onChange(false);\n return false;\n } else if (value === 'true') {\n onChange(true);\n return true;\n }\n }\n return false;\n }, [value, onChange]);\n\n useEffect(() => {\n if (value === null) {\n onChange(false);\n }\n }, [value, onChange]);\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const { checked } = event.target;\n onChange(checked);\n };\n\n return (\n <FormControlLabel\n label={label}\n name={name}\n control={\n <Switch\n color=\"primary\"\n size=\"small\"\n inputRef={ref}\n onChange={handleChange}\n checked={checked}\n {...switchProps}\n />\n }\n />\n );\n};\n\nexport default ControlSwitch;\n","import TextField from '@mui/material/TextField';\nimport { DatePicker } from '@mui/x-date-pickers/DatePicker';\n\nimport { isValid, format as dateFnsFormat, isMatch } from 'date-fns';\nimport { Control, useController, useWatch } from 'react-hook-form';\nimport { DATE_DEFAULT_FORMAT } from '../../interfaces';\n\ntype Props = {\n /**\n * React Hook Form `control`\n */\n control: Control<any>;\n /**\n * Is input required flag\n */\n required?: boolean;\n name: string;\n label?: string;\n format?: string;\n hideErrorMessage?: boolean;\n};\n\nexport const ControlDate = ({\n control,\n name,\n required,\n label,\n format = DATE_DEFAULT_FORMAT,\n hideErrorMessage = false,\n}: Props) => {\n const {\n field: { onChange, ref },\n fieldState: { error },\n } = useController({\n control,\n name,\n rules: {\n required: required && 'Please, fill this field',\n validate: (val) => {\n if (isMatch(val, format)) {\n return true;\n }\n return 'Incorrect date format';\n },\n },\n });\n const value = useWatch({ control, name });\n\n const handleChange = (date) => {\n onChange(isValid(date) ? dateFnsFormat(date, format) : date);\n };\n\n return (\n <DatePicker\n label={label}\n inputRef={ref}\n inputFormat={format}\n value={value || null}\n onChange={handleChange}\n renderInput={(props) => (\n <TextField\n {...props}\n fullWidth\n size=\"small\"\n variant=\"outlined\"\n name={name}\n error={!!error}\n helperText={!hideErrorMessage && error?.message}\n />\n )}\n />\n );\n};\n\nexport default ControlDate;\n","import TextField from '@mui/material/TextField';\nimport { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker';\n\nimport { isValid, format as dateFnsFormat, isMatch } from 'date-fns';\nimport { Control, useController, useWatch } from 'react-hook-form';\nimport { DATE_TIME_DEFAULT_FORMAT } from '../../interfaces';\n\ntype Props = {\n /**\n * React Hook Form `control`\n */\n control: Control<any>;\n /**\n * Is input required flag\n */\n required?: boolean;\n name: string;\n label?: string;\n format?: string;\n hideErrorMessage?: boolean;\n};\n\nexport const ControlDateTime = ({\n control,\n name,\n required,\n label,\n format = DATE_TIME_DEFAULT_FORMAT,\n hideErrorMessage = false,\n}: Props) => {\n const {\n field: { onChange, ref },\n fieldState: { error },\n } = useController({\n control,\n name,\n rules: {\n required: required && 'Please, fill this field',\n validate: (val) => {\n if (isMatch(val, format)) {\n return true;\n }\n return 'Incorrect date format';\n },\n },\n });\n const value = useWatch({ control, name });\n\n const handleChange = (date) => {\n onChange(isValid(date) ? dateFnsFormat(date, format) : date);\n };\n\n return (\n <DateTimePicker\n mask=\"\"\n ampm={false}\n inputRef={ref}\n label={label}\n value={value || null}\n inputFormat={format}\n onChange={handleChange}\n renderInput={(props) => (\n <TextField\n {...props}\n fullWidth\n size=\"small\"\n variant=\"outlined\"\n name={name}\n error={!!error}\n helperText={!hideErrorMessage && error?.message}\n />\n )}\n />\n );\n};\n\nexport default ControlDateTime;\n","import TextField from '@mui/material/TextField';\nimport { TimePicker } from '@mui/x-date-pickers/TimePicker';\n\nimport { parse, format as dateFnsFormat, isMatch, isValid } from 'date-fns';\nimport { useEffect, useState } from 'react';\nimport { Control, useController, useWatch } from 'react-hook-form';\nimport { TIME_DEFAULT_FORMAT } from '../../interfaces';\n\ntype Props = {\n /**\n * React Hook Form `control`\n */\n control: Control<any>;\n /**\n * Is input required flag\n */\n required?: boolean;\n name: string;\n label?: string;\n format?: string;\n hideErrorMessage?: boolean;\n};\n\nexport const ControlTime = ({\n control,\n name,\n required,\n label,\n format = TIME_DEFAULT_FORMAT,\n hideErrorMessage = false,\n}: Props) => {\n const {\n field: { onChange, ref },\n fieldState: { error },\n } = useController({\n control,\n name,\n rules: {\n required: required && 'Please, fill this field',\n validate: (val) => {\n if (isMatch(val, format)) {\n return true;\n }\n return 'Incorrect date format';\n },\n },\n });\n const value = useWatch({ control, name });\n\n const [fieldValue, setFieldValue] = useState(null);\n\n const handleChange = (date: Date) => {\n setFieldValue(date);\n onChange(isValid(date) ? dateFnsFormat(date, format) : date);\n };\n\n useEffect(() => {\n if (value && format) {\n let parsedValue = parse(value, format, new Date());\n\n if (!isValid(parsedValue)) {\n parsedValue = parse(value, 'HH:mm:ss.SSS', new Date());\n }\n\n setFieldValue(parsedValue);\n }\n }, [value, format]);\n\n return (\n <TimePicker\n mask=\"\"\n inputRef={ref}\n label={label}\n ampm={false}\n value={fieldValue}\n inputFormat={format}\n onChange={handleChange}\n renderInput={(props) => (\n <TextField\n {...props}\n fullWidth\n size=\"small\"\n variant=\"outlined\"\n name={name}\n error={!!error}\n helperText={!hideErrorMessage && error?.message}\n />\n )}\n />\n );\n};\n\nexport default ControlTime;\n","import React from 'react';\nimport Box from '@mui/material/Box';\nimport Pagination from '@mui/material/Pagination';\nimport MuiTablePagination from '@mui/material/TablePagination';\nimport {\n gridPageCountSelector,\n gridPageSelector,\n gridRowCountSelector,\n gridPageSizeSelector,\n useGridApiContext,\n useGridSelector,\n} from '@mui/x-data-grid';\n\nconst TablePagination = () => {\n const apiRef = useGridApiContext();\n const page = useGridSelector(apiRef, gridPageSelector);\n const pageCount = useGridSelector(apiRef, gridPageCountSelector);\n const rowCount = useGridSelector(apiRef, gridRowCountSelector);\n const pageSize = useGridSelector(apiRef, gridPageSizeSelector);\n\n const onPageChange = (value) => apiRef.current.setPage(value);\n const onRowsPerPageChange = (event: React.ChangeEvent<HTMLInputElement>) =>\n apiRef.current.setPageSize(parseInt(event.target.value, 10));\n\n return (\n <Box px={2} display=\"flex\" alignItems=\"center\">\n <MuiTablePagination\n component=\"div\"\n page={page}\n count={rowCount}\n rowsPerPage={pageSize}\n rowsPerPageOptions={[10, 20, 50, 100]}\n onPageChange={(event, value) => onPageChange(value)}\n onRowsPerPageChange={onRowsPerPageChange}\n ActionsComponent={undefined}\n />\n <Pagination count={pageCount} page={page + 1} onChange={(event, value) => onPageChange(value - 1)} />\n </Box>\n );\n};\n\nexport default TablePagination;\n","import React from 'react';\nimport { GridColumnMenuContainer, GridFilterMenuItem } from '@mui/x-data-grid';\n\nconst TableColumnMenu = ({ hideMenu, currentColumn, onUnsort, ...rest }: any) => {\n return (\n <GridColumnMenuContainer hideMenu={hideMenu} currentColumn={currentColumn} {...rest}>\n <GridFilterMenuItem onClick={hideMenu} column={currentColumn} />\n </GridColumnMenuContainer>\n );\n};\n\nexport default TableColumnMenu;\n","import { useEffect } from 'react';\nimport { useSearchParams } from 'react-router-dom';\nimport { GridFeatureMode } from '@mui/x-data-grid';\n\ninterface Props {\n mode: GridFeatureMode;\n}\n\nexport const useTableQueryPagination = ({ mode }: Props) => {\n const [queryParams, setQueryParams] = useSearchParams();\n\n const page = +queryParams.get('page') || 0;\n const size = +queryParams.get('size') || 10;\n\n const onPageChange = (newPage: number) => {\n queryParams.set('page', `${newPage}`);\n setQueryParams(queryParams, { replace: true });\n };\n\n const onSizeChange = (count: number) => {\n queryParams.set('size', `${count}`);\n setQueryParams(queryParams, { replace: true });\n };\n\n useEffect(() => {\n if (mode === 'server') {\n if (!queryParams.has('page')) {\n queryParams.set('page', '0');\n }\n\n if (!queryParams.has('size')) {\n queryParams.set('size', `10`);\n }\n\n setQueryParams(queryParams, { replace: true });\n }\n }, [mode, queryParams, setQueryParams]);\n\n return {\n page,\n size,\n onPageChange,\n onSizeChange,\n };\n};\n\nexport default useTableQueryPagination;\n","import { useSearchParams } from 'react-router-dom';\nimport { GridColumnHeaderParams, GridColumns } from '@mui/x-data-grid';\n\nexport const useTableQuerySorting = () => {\n const [queryParams, setQueryParams] = useSearchParams();\n const sortParams = queryParams.getAll('sort').map((param) => param.split(','));\n\n const onColumnHeaderClick = ({ field }: GridColumnHeaderParams) => {\n let keyFound = false;\n\n const sortValues = queryParams.getAll('sort');\n queryParams.delete('sort');\n\n sortValues.forEach((sortValue) => {\n const [key, sort] = sortValue.split(',');\n if (key === field) {\n keyFound = true;\n if (sort === 'asc') {\n queryParams.append('sort', `${key},desc`);\n }\n } else {\n queryParams.append('sort', `${key},${sort}`);\n }\n });\n\n if (!keyFound) {\n queryParams.append('sort', `${field},asc`);\n }\n setQueryParams(queryParams, { replace: true });\n };\n\n const getSortedColumns = (columns: GridColumns): GridColumns => {\n return columns.map((column) => {\n const columnSort = sortParams.find((param) => param[0] === column.field);\n if (columnSort) {\n column.headerClassName = `Sorted --${columnSort[1]} `;\n } else {\n column.headerClassName = '';\n }\n return column;\n });\n };\n\n return { onColumnHeaderClick, getSortedColumns };\n};\n\nexport default useTableQuerySorting;\n","import { useEffect, useState } from 'react';\n\nconst usePagination = (initialPageSize?: number) => {\n const [pageSize, setPageSize] = useState(10);\n\n useEffect(() => {\n setPageSize(initialPageSize);\n }, [initialPageSize]);\n\n const handlePageSizeChange = (size) => setPageSize(size);\n\n return { pageSize, handlePageSizeChange };\n};\n\nexport default usePagination;\n","import { makeStyles } from 'tss-react/mui';\n\nexport default makeStyles()({\n root: {\n width: '100%',\n\n '& .MuiDataGrid-virtualScrollerContent': {\n height: 'auto !important',\n minHeight: '56px !important',\n },\n\n '& .MuiDataGrid-virtualScrollerRenderZone': {\n position: 'static',\n },\n\n '& .MuiDataGrid-renderingZone': {\n maxHeight: 'none !important',\n },\n\n '& .MuiDataGrid-cell': {\n maxHeight: 'none !important',\n lineHeight: 'unset !important',\n // whiteSpace: 'normal !important',\n textOverflow: 'ellipsis',\n wordBreak: 'break-all',\n\n '& .MuiDataGrid-actionsCell': {\n width: '100%',\n gridGap: '4px',\n flexWrap: 'wrap',\n\n '& > button[aria-label=\"more\"]': {\n marginLeft: 'auto',\n },\n },\n },\n\n '& .MuiDataGrid-row': {\n maxHeight: 'none !important',\n },\n\n '& .Sorted': {\n '& .MuiDataGrid-iconButtonContainer': {\n visibility: 'visible',\n width: 'auto',\n\n '& svg': {\n opacity: '1 !important',\n },\n },\n\n '&.--desc': {\n '& svg': {\n transform: 'rotate(180deg)',\n },\n },\n },\n },\n});\n","import React from 'react';\nimport TablePagination from './TablePagination';\nimport TableColumnMenu from './TableColumnMenu';\nimport useTableQueryPagination from './useTableQueryPagination';\nimport useTableQuerySorting from './useTableQuerySorting';\nimport usePagination from './usePagination';\nimport { DataGrid, GridCellParams, GridColumns, GridFeatureMode, GridRowsProp } from '@mui/x-data-grid';\nimport useStyles from './styles';\nimport Box from '@mui/material/Box';\n\n/**\n * This interface is referencing the [[Table]] component props.\n * @category Common UI components\n */\nexport interface TableProps {\n /**\n * Data loading state\n */\n loading?: boolean;\n /**\n * Table columns\n */\n columns: GridColumns;\n /**\n * Table rows\n */\n rows: GridRowsProp;\n /**\n * Rows count to display\n */\n rowCount: number;\n disableMargin?: boolean;\n /**\n * Data display mode.\n * Values: `client` | `server`;\n * Default: `server`\n */\n mode?: GridFeatureMode;\n /**\n * Page size. Default `10`\n */\n initialPageSize?: number;\n /**\n * On cell click handler function\n * ```typescript\n * (params: GridCellParams, event: React.MouseEvent) => void;\n * ```\n */\n onCellClick?: (params: GridCellParams, event: React.MouseEvent) => void;\n pagination?: boolean;\n}\n\n/**\n * Main data display component. MUI DataGrid used\n * @category Common UI components\n */\nexport const Table = ({\n columns,\n rows,\n rowCount,\n loading,\n disableMargin,\n mode = 'server',\n initialPageSize = 10,\n pagination = true,\n onCellClick,\n}: TableProps) => {\n const { classes } = useStyles();\n\n const { page, size, onPageChange, onSizeChange } = useTableQueryPagination({ mode });\n const { onColumnHeaderClick, getSortedColumns } = useTableQuerySorting();\n\n const { pageSize, handlePageSizeChange } = usePagination(initialPageSize);\n\n const tableProps = {\n sortingMode: mode,\n paginationMode: mode,\n pageSize: mode === 'server' ? size : pagination ? pageSize : rowCount,\n onPageSizeChange: mode === 'server' ? onSizeChange : handlePageSizeChange,\n components: {\n Pagination: TablePagination,\n },\n };\n\n if (mode === 'server') {\n tableProps['sortModel'] = [];\n tableProps['onColumnHeaderClick'] = onColumnHeaderClick;\n tableProps['page'] = page;\n tableProps['onPageChange'] = onPageChange;\n tableProps.components['ColumnMenu'] = TableColumnMenu;\n }\n\n\n return (\n <Box mt={disableMargin ? 0 : 2}>\n <DataGrid\n autoHeight\n hideFooterPagination={!pagination}\n hideFooter={!pagination}\n disableSelectionOnClick\n showColumnRightBorder\n showCellRightBorder\n className={classes.root}\n loading={loading}\n rows={rows}\n columns={getSortedColumns(columns)}\n rowCount={rowCount}\n rowsPerPageOptions={[10, 20, 50, 100]}\n onCellClick={onCellClick}\n {...tableProps}\n />\n \n </Box>\n );\n};\n\nexport default Table;\n","import Tooltip from '@mui/material/Tooltip';\nimport { GridActionsCellItem } from '@mui/x-data-grid';\nimport IconButton from '@mui/material/IconButton';\nimport { Link } from 'react-router-dom';\nimport React, { ReactElement } from 'react';\n\ntype Props = {\n icon: ReactElement;\n onClick?: () => void;\n label: string;\n showInMenu?: boolean;\n location?: {\n pathname: string;\n state?: Record<string, unknown>;\n }\n};\n\nexport const TableAction = ({ icon, label, showInMenu, onClick, location }: Props) => {\n if (location) {\n return (\n <IconButton component={Link} to={location} size=\"small\">\n <Tooltip title={label} arrow>\n {React.cloneElement(icon, { fontSize: 'small' })} \n </Tooltip> \n </IconButton>\n )\n }\n return ( \n <GridActionsCellItem\n nonce=\"\"\n onResize={undefined}\n onResizeCapture={undefined}\n icon={\n <Tooltip title={label} arrow>\n {icon}\n </Tooltip>\n }\n onClick={onClick}\n label={label}\n showInMenu={showInMenu}\n />\n );\n};\n","import { useCallback, useEffect, useMemo } from 'react';\nimport { useSearchParams } from 'react-router-dom';\n\nconst useTablePagination = () => {\n const [searchParams, setSearchParams] = useSearchParams();\n\n const page = useMemo(\n () => searchParams.get('page') ?? 0,\n [searchParams]\n );\n const size = useMemo(\n () => searchParams.get('size') ?? 10,\n [searchParams]\n );\n\n const onPageChange = useCallback(\n (newPage: number) => {\n setSearchParams((params) => {\n params.set('page', `${newPage}`);\n return params;\n });\n },\n [setSearchParams]\n );\n\n const onSizeChange = useCallback(\n (newSize: number) => {\n setSearchParams((params) => {\n params.set('size', `${newSize}`);\n return params;\n });\n },\n [setSearchParams]\n );\n\n useEffect(() => {\n if (!searchParams.has('page')) { \n setSearchParams((params) => {\n params.set('page', '0');\n return params;\n });\n }\n if (!searchParams.has('size')) {\n setSearchParams((params) => {\n params.set('size', '10');\n return params;\n });\n }\n }, [searchParams, setSearchParams]);\n\n return { page, size, onPageChange, onSizeChange };\n};\n\nexport default useTablePagination;\n","import { useCallback, useMemo } from 'react';\nimport { useSearchParams } from 'react-router-dom';\n\nconst useTableSorting = () => {\n const [searchParams, setSearchParams] = useSearchParams();\n\n const sortParams = useMemo(\n () => searchParams.getAll('sort').map((param) => param.split(',')),\n [searchParams]\n );\n\n const onSortChanged = useCallback(\n (sortKey: string) => {\n setSearchParams((params) => {\n console.log(sortKey, params.get('page'));\n params.delete('sort');\n\n let keyFound = false;\n sortParams.forEach(([key, value]) => {\n if (key === sortKey) {\n keyFound = true;\n if (value === 'asc') {\n params.append('sort', `${key},desc`);\n }\n } else {\n params.append('sort', `${key},${value}`);\n }\n });\n\n if (!keyFound) {\n params.append('sort', `${sortKey},asc`);\n }\n\n return params;\n });\n },\n [sortParams, setSearchParams]\n );\n\n const getColumnSorting = useCallback(\n (sortKey: string) => {\n const sort = sortParams.find(([key, _]) => key === sortKey);\n return sort ? sort[1] : false;\n },\n [sortParams]\n );\n\n return { sortParams, onSortChanged, getColumnSorting };\n};\nexport default useTableSorting;\n","import { ReactNode, forwardRef, ForwardedRef } from 'react';\nimport MuiTable from '@mui/material/Table';\nimport TableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableContainer from '@mui/material/TableContainer';\nimport TableHead from '@mui/material/TableHead';\nimport TablePagination from '@mui/material/TablePagination';\nimport TableRow from '@mui/material/TableRow';\nimport TableSortLabel from '@mui/material/TableSortLabel';\nimport TableFooter from '@mui/material/TableFooter';\n\nimport { Column, Row } from '../../../interfaces';\nimport { Loader } from '../../Loader';\nimport Backdrop from '@mui/material/Backdrop';\nimport useTablePagination from './useTablePagination';\nimport useTableSorting from './useTableSorting';\n\ntype SortDirection = \"asc\" | \"desc\";\n\ninterface Props<T> {\n columns: Column<T>[];\n rows: Row<T>[];\n totalCount: number;\n loading?: boolean;\n pagination?: boolean;\n onRowClick?: (row: Row<T>) => void;\n children?: ReactNode;\n verticalAlign?: 'top' | 'middle' | 'bottom' | 'sub' | 'baseline';\n}\n\nfunction TableInner<T>({\n columns = [],\n rows = [],\n totalCount,\n children,\n pagination = true,\n loading = false,\n onRowClick,\n verticalAlign = 'middle'\n}: Props<T>, ref: ForwardedRef<HTMLTableElement>) {\n const { page, size, onPageChange, onSizeChange } = useTablePagination();\n const { onSortChanged, getColumnSorting } = useTableSorting();\n\n return (\n <TableContainer sx={{ position: 'relative', overflow: 'visible' }}>\n <Backdrop open={loading} sx={{ position: 'absolute', top: 0, left: 0 }}>\n <Loader />\n </Backdrop>\n <MuiTable ref={ref}>\n <TableHead>\n <TableRow>\n {columns.map((column, index) => {\n const sortDirection = column.sortKey\n ? getColumnSorting(column.sortKey)\n : false;\n return (\n <TableCell\n key={index}\n align={column.align ? column.align : 'left'}\n sortDirection={sortDirection as SortDirection}\n sx={{ width: column.width ? `${column.width}%` : 'unset' }}\n >\n <TableSortLabel\n active={!!sortDirection}\n hideSortIcon={!column.sortKey}\n direction={(sortDirection as SortDirection) || 'asc'}\n onClick={() =>\n column.sortKey ? onSortChanged(column.sortKey) : {}\n }\n >\n {column.label}\n </TableSortLabel>\n </TableCell>\n );\n })}\n </TableRow>\n </TableHead>\n <TableBody>\n {rows.map((row, index) => (\n <TableRow\n hover\n onClick={onRowClick ? () => onRowClick(row) : row.onClick}\n key={index}\n sx={{ verticalAlign }}\n >\n {columns.map((column, idx) => (\n <TableCell\n key={idx}\n align={column.align ? column.align : 'left'}\n sx={{ width: column.width ? `${column.width}%` : 'unset' }}\n >\n {column.renderCell\n ? column.renderCell(row, index)\n : ((row as any)[column.id] as string)}\n </TableCell>\n ))}\n </TableRow>\n ))}\n </TableBody>\n {(pagination || children) ? (\n <TableFooter>\n <TableRow>\n {\n children && (\n <TableCell\n colSpan={columns.length}\n sx={{ background: '#F0F0F7', px: 4, py: 3 }}\n >\n {children}\n </TableCell>\n )\n }\n {\n pagination && rows.length && (\n <TablePagination\n rowsPerPageOptions={[5, 10, 25]}\n count={totalCount}\n rowsPerPage={+size}\n page={+page}\n sx={{ borderBottom: 'none' }}\n onPageChange={(_, page) => onPageChange(page)}\n onRowsPerPageChange={(event) =>\n onSizeChange(+event.target.value)\n }\n />\n )\n } \n </TableRow>\n </TableFooter>\n ) : null}\n </MuiTable>\n </TableContainer>\n );\n}\nexport const SimpleTable = forwardRef(TableInner) as <T>(\n props: Props<T> & { ref?: ForwardedRef<HTMLTableElement> }\n) => ReturnType<typeof TableInner>;\nexport default SimpleTable;\n","import { useState, MouseEvent } from 'react';\nimport IconButton from '@mui/material/IconButton';\nimport Menu from '@mui/material/Menu';\nimport MenuItem from '@mui/material/MenuItem';\nimport MoreHorizIcon from '@mui/icons-material/MoreHoriz';\n\ntype ActionItem = {\n title: string;\n onClick: (e?: MouseEvent<HTMLElement>) => void;\n}\n\ntype Props = {\n actionsList: ActionItem[]\n}\n\nexport const TableActionCell = ({ actionsList }: Props) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n const open = Boolean(anchorEl);\n const handleClick = (e: MouseEvent<HTMLElement>) => {\n e.stopPropagation();\n setAnchorEl(e.currentTarget);\n };\n const handleClose = () => {\n setAnchorEl(null);\n };\n return (\n <div>\n <IconButton\n aria-label=\"more\"\n id=\"more-button\"\n aria-controls={open ? 'more-menu' : undefined}\n aria-expanded={open ? 'true' : undefined}\n aria-haspopup=\"true\"\n onClick={handleClick}\n >\n <MoreHorizIcon />\n </IconButton>\n <Menu\n id=\"more-menu\"\n MenuListProps={{\n 'aria-labelledby': 'more-button',\n }}\n anchorEl={anchorEl}\n open={open}\n onClose={(e: MouseEvent<HTMLElement>) => {\n e.stopPropagation();\n handleClose();\n }}\n PaperProps={{\n style: {\n minWidth: '127px'\n }\n }}\n >\n {actionsList.map((option) => (\n <MenuItem key={option.title} onClick={(e: MouseEvent<HTMLElement>) => {\n e.stopPropagation();\n if (option.onClick) option.onClick();\n handleClose();\n }}>\n {option.title}\n </MenuItem>\n ))}\n </Menu>\n </div>\n )\n}\n","import React from 'react';\n\n/**\n * This interface is referencing the [[TabPanel]] component props.\n * @category Common UI components\n */\nexport interface TabPanelProps {\n /**\n * Active tab value\n */\n value: number | string;\n /**\n * Index of current panel\n */\n index: number | string;\n /**\n * Rendered children component\n */\n children: React.ReactElement;\n}\n\n/**\n * Tab panel component. Used with tabs component\n * @category Common UI components\n */\nexport const TabPanel = (props: TabPanelProps) => {\n const { children, value, index, ...other } = props;\n\n return (\n <div\n role=\"tabpanel\"\n hidden={value !== index}\n id={`simple-tabpanel-${index}`}\n aria-labelledby={`simple-tab-${index}`}\n {...other}\n >\n {value === index ? children : null}\n </div>\n );\n};\n\nexport default TabPanel;\n","import { useMemo } from 'react';\nimport Box from '@mui/material/Box';\nimport Paper from '@mui/material/Paper';\nimport Tab from '@mui/material/Tab';\nimport Tabs from '@mui/material/Tabs';\nimport TabPanel from './TabPanel';\n\nimport { useNavigate, useLocation } from 'react-router-dom';\n\ninterface RouteTab {\n name: string;\n label: string;\n component: React.ReactElement;\n}\n\ninterface Props {\n tabs: RouteTab[];\n}\n\nexport const RouteTabs = (props: Props) => {\n const { tabs } = props;\n\n const navigate = useNavigate();\n const location = useLocation();\n\n const queryParams = useMemo(() => new URLSearchParams(location.search), [location.search]);\n const value = queryParams.get('tab');\n\n const handleChange = (event, newValue: string) => {\n queryParams.set('tab', newValue);\n navigate({ pathname: location.pathname, search: queryParams.toString() }, { replace: true });\n };\n\n return (\n <Box>\n <Paper>\n <Tabs value={value || tabs[0]?.name} indicatorColor=\"primary\" textColor=\"primary\" onChange={handleChange}>\n {tabs.map((tab) => (\n <Tab key={tab.name} value={tab.name} label={tab.label} />\n ))}\n </Tabs>\n </Paper>\n <Box mt={2}>\n {tabs.map((tab) => (\n <TabPanel key={tab.name} value={value || tabs[0]?.name} index={tab.name}>\n {tab.component}\n </TabPanel>\n ))}\n </Box>\n </Box>\n );\n};\n\nexport default RouteTabs;\n","import { makeStyles } from 'tss-react/mui';\n\nexport default makeStyles()(() => ({\n container: {\n // borderBottom: '1px solid #ccc',\n paddingBottom: '8px',\n },\n title: {\n fontSize: '14px',\n fontWeight: 600,\n color: '#536DFE',\n },\n text: {\n fontSize: '18px',\n wordWrap: 'break-word',\n },\n}));\n","import AceEditor from 'react-ace';\nimport useStyles from './styles';\nimport 'ace-builds/src-noconflict/ace';\nimport 'ace-builds/src-noconflict/mode-json';\n\ntype Props = {\n title: string;\n text?: string;\n json?: any;\n};\n\nexport const InfoItem = ({ title, text, json }: Props) => {\n const { classes } = useStyles();\n\n return (\n <div className={classes.container}>\n <div className={classes.title}>{title}</div>\n {text && <div className={classes.text}>{text}</div>}\n {json && (\n <AceEditor\n readOnly\n value={json}\n mode=\"json\"\n height=\"300px\"\n width=\"100%\"\n fontSize=\"16\"\n setOptions={{\n enableSnippets: false,\n copyWithEmptySelection: true,\n showLineNumbers: true,\n tabSize: 2,\n }}\n />\n )}\n </div>\n );\n};\n\nexport default InfoItem;\n","import Grid from '@mui/material/Unstable_Grid2';\nimport { ControlNumberInput, ControlSelect } from '../../../Forms';\nimport { RoundingMode } from '../../../../interfaces';\n\nimport { useFormContext } from 'react-hook-form';\n\ntype Props = {\n propertyFieldName: string;\n};\n\nconst roundingModes = Object.values(RoundingMode).sort((a, b) => a.localeCompare(b));\n\nconst BigDecimalPropertyFields = ({ propertyFieldName }: Props) => {\n const { control } = useFormContext();\n\n return (\n <>\n <Grid>\n <ControlNumberInput\n required\n control={control}\n defaultValue={2}\n name={`${propertyFieldName}.precisionScale`}\n label=\"Precision Scale\"\n />\n </Grid>\n <Grid>\n <ControlSelect\n required\n control={control}\n name={`${propertyFieldName}.roundingMode`}\n label=\"Rounding Mode\"\n defaultValue={RoundingMode.HALF_UP}\n options={roundingModes}\n />\n </Grid>\n </>\n );\n};\n\nexport default BigDecimalPropertyFields;\n","import Grid from '@mui/material/Unstable_Grid2';\nimport { ControlInput } from '../../../Forms';\n\nimport { useFormContext } from 'react-hook-form';\n\ntype Props = {\n propertyFieldName: string;\n defaultValue?: string;\n};\n\nconst DateAdditionalFields = ({ propertyFieldName, defaultValue = '' }: Props) => {\n const { control } = useFormContext();\n\n return (\n <Grid>\n <ControlInput\n required\n control={control}\n defaultValue={defaultValue}\n name={`${propertyFieldName}.format`}\n label=\"Format\"\n />\n </Grid>\n );\n};\n\nexport default DateAdditionalFields;\n","import { ReactNode } from 'react';\nimport Stepper from '@mui/material/Stepper';\nimport Step from '@mui/material/Step';\nimport StepLabel from '@mui/material/StepLabel';\nimport StepContent from '@mui/material/StepContent';\nimport StepConnector from '@mui/material/StepConnector';\nimport { makeStyles } from 'tss-react/mui';\n\nexport type StepperDataItem = { label: string | ReactNode; content: ReactNode };\n\nexport type StepperData = StepperDataItem[];\n\ntype Props = {\n data: StepperData;\n};\n\nconst useStyles = makeStyles()(() => ({\n content: {\n marginLeft: '4px',\n },\n connector: {\n marginLeft: '4px',\n },\n stepper: {\n padding: '12px',\n },\n label: {\n display: 'flex',\n alignItems: 'flex-start',\n },\n}));\n\nconst StepIcon = () => (\n <div\n style={{\n display: 'inline-block',\n width: '10px',\n height: '10px',\n borderRadius: '50%',\n backgroundColor: '#536DFE',\n marginTop: '5px',\n }}\n />\n);\n\nexport const StepperView = ({ data }: Props) => {\n const { classes } = useStyles();\n\n return (\n <Stepper\n nonLinear\n orientation=\"vertical\"\n className={classes.stepper}\n connector={<StepConnector className={classes.connector} />}\n >\n {data.filter(Boolean).map((item, index) => (\n <Step expanded key={index}>\n <StepLabel\n className={classes.label}\n StepIconComponent={StepIcon}\n StepIconProps={{ icon: '', completed: false, active: true }}\n >\n {item.label}\n </StepLabel>\n <StepContent className={classes.content}>{item.content}</StepContent>\n </Step>\n ))}\n <Step />\n </Stepper>\n );\n};\n\nexport default StepperView;\n","import Box from '@mui/material/Box';\nimport { PropertiesArrayType } from '../../../interfaces';\nimport { StepperData, StepperView } from '../../StepperView';\nimport { useMemo } from 'react';\n\ntype Props = {\n properties: PropertiesArrayType;\n};\n\nconst EntityPropertiesShortView = ({ properties = [] }: Props) => {\n const stepperData: StepperData = useMemo(() => {\n if (properties) {\n return properties.map((property) => {\n const propertyType =\n typeof property.propertyType === 'string' ? property.propertyType : property['propertyType']['value'];\n return {\n label: (\n <Box display=\"flex\" flexDirection=\"column\">\n <b>\n {property.name}\n {property.isRequired ? '*' : ''}\n </b>\n <span>\n {property.key} | {property.isMultiple ? 'multiple' : 'single'} | {propertyType}\n </span>\n </Box>\n ),\n content: property.propertyType === 'ENTITY' && (\n <EntityPropertiesShortView properties={property.properties as PropertiesArrayType} />\n ),\n };\n });\n }\n return [];\n }, [properties]);\n\n return <StepperView data={stepperData} />;\n};\n\nexport default EntityPropertiesShortView;\n","import Grid from '@mui/material/Unstable_Grid2';\nimport Button from '@mui/material/Button';\nimport Typography from '@mui/material/Typography';\nimport Dialog from '@mui/material/Dialog';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogActions from '@mui/material/DialogActions';\nimport Stepper from '@mui/material/Stepper';\nimport Step from '@mui/material/Step';\nimport StepLabel from '@mui/material/StepLabel';\nimport StepContent from '@mui/material/StepContent';\nimport CreatePropertiesList from '../CreatePropertiesList';\nimport EntityPropertiesShortView from '../../ViewProperty/EntityPropertiesShortView';\n\nimport { useCallback, useState } from 'react';\nimport { useFormContext, useWatch } from 'react-hook-form';\nimport { useToggle } from '../../../../utils/hooks';\n\ntype Props = {\n parentPropertyFieldName: string;\n entityDefinition?: boolean;\n globalParameter?: boolean;\n};\n\nconst defaultPropertyValues = {\n key: '',\n propertyType: '',\n name: '',\n defaultValue: '',\n isRequired: true,\n isMultiple: false,\n sortOrder: 0,\n isEnabled: true,\n};\n\nconst EntityAdditionalFields = ({\n parentPropertyFieldName,\n entityDefinition = false,\n globalParameter = false,\n}: Props) => {\n const { control, setValue, getValues, trigger } = useFormContext();\n const properties = useWatch({\n control,\n name: `${parentPropertyFieldName}.properties`,\n defaultValue: getValues(`${parentPropertyFieldName}.properties`) || [],\n });\n const parentPropertyName = useWatch({ control, name: `${parentPropertyFieldName}.name` });\n\n const parametersModal = useToggle();\n\n const [focusedProperty, setFocusedProperty] = useState(0);\n\n const handleAddParameter = useCallback(() => {\n if (properties) {\n const propertyIndex = properties.length;\n setValue(`${parentPropertyFieldName}.properties.${propertyIndex}`, defaultPropertyValues);\n setFocusedProperty(propertyIndex);\n } else {\n setValue(`${parentPropertyFieldName}.properties`, [defaultPropertyValues]);\n }\n }, [properties, parentPropertyFieldName, setValue]);\n\n const handleStepperClick = (index) => setFocusedProperty(index);\n\n const handleSubmitClick = async () => {\n const isValid = await trigger(`${parentPropertyFieldName}.properties`);\n if (isValid) {\n parametersModal.onClose();\n }\n };\n\n return (\n <>\n <Grid>\n <Typography variant=\"h6\">Properties</Typography>\n </Grid>\n <Grid>\n <EntityPropertiesShortView properties={properties} />\n </Grid>\n <Grid>\n <Button variant=\"contained\" color=\"primary\" onClick={parametersModal.onOpen}>\n Edit properties\n </Button>\n </Grid>\n\n <Dialog disableEscapeKeyDown open={parametersModal.open} onClose={handleSubmitClick} fullWidth maxWidth=\"md\">\n <DialogTitle>{parentPropertyName || 'Entity'} Properties</DialogTitle>\n <DialogContent style={{ height: '500px', overflow: 'hidden' }}>\n <Grid container direction=\"row\" spacing={2} style={{ height: '100%' }}>\n <Grid xs={3} style={{ backgroundColor: '#f9f9f9' }}>\n <Stepper nonLinear activeStep={focusedProperty} orientation=\"vertical\" style={{ paddingLeft: '4px' }}>\n {properties.map((property, index) => (\n <Step key={index} onClick={() => handleStepperClick(index)} style={{ cursor: 'pointer' }}>\n <StepLabel StepIconProps={{ icon: '' }} style={{ wordBreak: 'break-word' }}>\n {property.name || '(no name)'}\n </StepLabel>\n <StepContent></StepContent>\n </Step>\n ))}\n </Stepper>\n <Button variant=\"contained\" size=\"small\" color=\"primary\" onClick={handleAddParameter}>\n Add property\n </Button>\n </Grid>\n <Grid \n container\n wrap=\"nowrap\"\n direction=\"column\"\n xs={9}\n spacing={2}\n style={{ height: '100%', overflowY: 'auto' }}\n >\n <CreatePropertiesList\n hideAddButton\n parentFieldName={parentPropertyFieldName}\n focusOnIndex={focusedProperty}\n entityDefinition={entityDefinition}\n globalParameter={globalParameter}\n />\n </Grid>\n </Grid>\n </DialogContent>\n <DialogActions>\n <Button variant=\"contained\" color=\"primary\" onClick={handleSubmitClick}>\n Ok\n </Button>\n </DialogActions>\n </Dialog>\n </>\n );\n};\n\nexport default EntityAdditionalFields;\n","import Grid from '@mui/material/Unstable_Grid2';\nimport { ControlInput } from '../../../Forms';\n\nimport { useFormContext } from 'react-hook-form';\n\ntype Props = {\n propertyFieldName: string;\n};\n\nconst EntityReferencePropertyFields = ({ propertyFieldName }: Props) => {\n const { control } = useFormContext();\n\n return (\n <>\n <Grid>\n <ControlInput required control={control} name={`${propertyFieldName}.definitionCode`} label=\"Definition Code\" />\n </Grid>\n <Grid>\n <ControlInput\n required\n control={control}\n name={`${propertyFieldName}.definitionVersion`}\n label=\"Definition Version\"\n />\n </Grid>\n <Grid>\n <ControlInput\n required\n control={control}\n name={`${propertyFieldName}.labelPropertyCode`}\n label=\"Label Property Code\"\n />\n </Grid>\n <Grid>\n <ControlInput\n required\n control={control}\n name={`${propertyFieldName}.valuePropertyCode`}\n label=\"Value Property Code\"\n />\n </Grid>\n </>\n );\n};\n\nexport default EntityReferencePropertyFields;\n","import Grid from '@mui/material/Unstable_Grid2';\nimport Chip from '@mui/material/Chip';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport TextField from '@mui/material/TextField';\nimport IconButton from '@mui/material/IconButton';\nimport AddIcon from '@mui/icons-material/Add';\n\nimport { useFormContext, useWatch } from 'react-hook-form';\nimport { removeArrayItem } from '../../../../utils';\nimport { useCallback, useMemo, useState } from 'react';\n\ntype Props = {\n propertyFieldName: string;\n};\n\nconst StringPropertyFields = ({ propertyFieldName }: Props) => {\n const fieldName = useMemo(() => `${propertyFieldName}.restrictedValues`, [propertyFieldName]);\n\n const { control, setValue, getValues } = useFormContext();\n const restrictedValues = useWatch({\n control,\n name: fieldName,\n defaultValue: getValues(`${propertyFieldName}.restrictedValues`) || [],\n });\n\n const [inputValue, setInputValue] = useState('');\n const [error, setError] = useState('');\n\n const handleDelete = useCallback(\n (index) => {\n setValue(fieldName, removeArrayItem(restrictedValues, index));\n },\n [restrictedValues, fieldName, setValue]\n );\n\n const handleAddValue = () => {\n if (inputValue) {\n setValue(fieldName, [...restrictedValues, inputValue]);\n setInputValue('');\n }\n };\n\n const handleInputChange = (e) => {\n const { value } = e.target;\n setInputValue(value);\n\n if (restrictedValues.includes(value)) {\n setError('This value already exists');\n } else {\n setError('');\n }\n };\n\n const handleKeyDown = (e) => {\n if (e.key === 'Enter') {\n handleAddValue();\n }\n };\n\n return (\n <>\n <Grid>\n <Typography variant=\"h6\">Restricted Values</Typography>\n </Grid>\n {\n !!restrictedValues?.length && (\n <Grid>\n <Box display=\"flex\" flexWrap=\"wrap\">\n {restrictedValues.map((value, index) => (\n <Chip sx={{ mr: 1 }} key={index} variant=\"outlined\" label={value} onDelete={() => handleDelete(index)} />\n ))}\n </Box>\n </Grid>\n )\n }\n \n <Grid>\n <TextField\n fullWidth\n variant=\"outlined\"\n size=\"small\"\n label=\"Add restricted value\"\n value={inputValue}\n onChange={handleInputChange}\n error={!!error}\n helperText={error}\n name=\"restrictedValues\"\n inputProps={{ onKeyDown: handleKeyDown }}\n InputProps={{\n endAdornment: (\n <IconButton size=\"small\" onClick={handleAddValue} disabled={!!error}>\n <AddIcon />\n </IconButton>\n ),\n }}\n />\n </Grid>\n </>\n );\n};\n\nexport default StringPropertyFields;\n","import {\n PropertyType,\n DATE_DEFAULT_FORMAT,\n DATE_TIME_DEFAULT_FORMAT,\n TIME_DEFAULT_FORMAT,\n} from '../../../../interfaces';\nimport BigDecimalPropertyFields from './BigDecimalPropertyFields';\nimport DateAdditionalFields from './DateAdditionalFields';\nimport EntityAdditionalFields from './EntityAdditionalFields';\nimport EntityReferencePropertyFields from './EntityReferencePropertyFields';\nimport StringPropertyFields from './StringPropertyFields';\n\ntype Props = {\n propertyType: PropertyType;\n propertyFieldName: string;\n entityDefinition?: boolean;\n globalParameter?: boolean;\n};\n\nexport const PropertyAdditionalFields = ({\n propertyType,\n propertyFieldName,\n entityDefinition = false,\n globalParameter = false,\n}: Props) => {\n switch (propertyType) {\n case PropertyType.STRING:\n return <StringPropertyFields propertyFieldName={propertyFieldName} />;\n case PropertyType.BIG_DECIMAL:\n return <BigDecimalPropertyFields propertyFieldName={propertyFieldName} />;\n case PropertyType.DATE:\n return <DateAdditionalFields propertyFieldName={propertyFieldName} defaultValue={DATE_DEFAULT_FORMAT} />;\n case PropertyType.TIME:\n return <DateAdditionalFields propertyFieldName={propertyFieldName} defaultValue={TIME_DEFAULT_FORMAT} />;\n case PropertyType.DATE_TIME:\n return <DateAdditionalFields propertyFieldName={propertyFieldName} defaultValue={DATE_TIME_DEFAULT_FORMAT} />;\n case PropertyType.ENTITY_REFERENCE:\n return <EntityReferencePropertyFields propertyFieldName={propertyFieldName} />;\n case PropertyType.ENTITY:\n return (\n <EntityAdditionalFields\n parentPropertyFieldName={propertyFieldName}\n globalParameter={globalParameter}\n entityDefinition={entityDefinition}\n />\n );\n default:\n return null;\n }\n};\n\nexport default PropertyAdditionalFields;\n","import AceEditor from 'react-ace';\nimport 'ace-builds/src-noconflict/mode-json';\nimport { RefCallBack, useFormContext, useWatch } from 'react-hook-form';\n\ntype Props = {\n validate?: boolean;\n name: string;\n inputRef: RefCallBack;\n};\n\nconst JsonEditor = ({ validate = false, name, inputRef }: Props) => {\n const { control, setValue, setError, clearErrors } = useFormContext();\n const value = useWatch({ control, name });\n\n const handleChange = (value: string) => {\n setValue(name, value);\n\n if (validate) {\n try {\n JSON.parse(value);\n clearErrors(name);\n } catch (err) {\n setError(name, { message: 'Invalid JSON' });\n }\n }\n };\n\n return (\n <AceEditor\n wrapEnabled\n width=\"100%\"\n height=\"200px\"\n theme=\"monokai\"\n fontSize={14}\n showPrintMargin={false}\n style={{ lineHeight: 1.4, zIndex: 0, isolation: 'isolate' }}\n setOptions={{\n enableLiveAutocompletion: true,\n enableBasicAutocompletion: true,\n showLineNumbers: true,\n tabSize: 2,\n }}\n ref={inputRef}\n name={name}\n value={typeof value !== 'string' ? (value === null ? '' : JSON.stringify(value)) : value}\n onChange={handleChange}\n mode=\"json\"\n onLoad={(editor) => {\n if (!validate) {\n editor.getSession().setUseWorker(false);\n }\n }}\n />\n );\n};\n\nexport default JsonEditor;\n","import Select from '@mui/material/Select';\nimport MenuItem from '@mui/material/MenuItem';\nimport FormControl from '@mui/material/FormControl';\nimport InputLabel from '@mui/material/InputLabel';\nimport { ControlInput } from '../../Forms';\n\nimport { useController, useFormContext, useWatch } from 'react-hook-form';\n\ntype Props = {\n name: string;\n label?: string;\n required?: boolean;\n restrictedValues?: string[];\n};\n\nconst StringValueField = ({ name, label, required, restrictedValues }: Props) => {\n const { control } = useFormContext();\n const {\n field: { onChange, ref },\n fieldState: { error },\n } = useController({\n control,\n name,\n rules: {\n required:\n required &&\n (Array.isArray(restrictedValues) && restrictedValues.length\n ? 'Please, select a value'\n : 'Please, fill this field'),\n },\n });\n const value = useWatch({ control, name });\n\n return Array.isArray(restrictedValues) && restrictedValues.length ? (\n <FormControl fullWidth size=\"small\" variant=\"outlined\" error={!!error}>\n <InputLabel htmlFor=\"type-select\">{label}</InputLabel>\n <Select labelId=\"type-select\" label={label} value={value || ''} onChange={onChange} ref={ref}>\n {restrictedValues.map((restrictedValue) => (\n <MenuItem key={restrictedValue} value={restrictedValue}>\n {restrictedValue}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n ) : (\n <ControlInput hideErrorMessage required={required} control={control} name={name} label={label} />\n );\n};\n\nexport default StringValueField;\n","import {\n ControlDate,\n ControlDateTime,\n ControlInput,\n ControlNumberInput,\n ControlSwitch,\n ControlTime,\n} from '../../Forms';\nimport JsonEditor from '../PropertyFiller/JsonEditor';\nimport StringValueField from '../PropertyValueField/StringValueField';\nimport { DefinitionFiller } from '../../Definition';\n\nimport { RefCallBack, useFormContext } from 'react-hook-form';\n\nimport {\n DateProperty,\n DateTimeProperty,\n EntityTypeProperty,\n PropertiesArrayType,\n PropertyType,\n PropertyUnion,\n StringProperty,\n TimeProperty,\n} from '../../../interfaces';\nimport { useMemo } from 'react';\n\ntype Props = {\n property: PropertyUnion;\n name: string;\n label?: string;\n useExpression?: boolean;\n required?: boolean;\n inputRef: RefCallBack;\n};\n\nexport const PropertyWidget = ({ property, name, label, useExpression, inputRef }: Props) => {\n const { control } = useFormContext();\n const propertyType = useMemo(\n () => (typeof property.propertyType === 'string' ? property.propertyType : property['propertyType']['value']),\n [property]\n );\n\n switch (propertyType) {\n case PropertyType.BIG_DECIMAL:\n case PropertyType.FLOAT:\n case PropertyType.DOUBLE:\n return <ControlNumberInput decimal required hideErrorMessage control={control} name={name} label={label} />;\n case PropertyType.INTEGER:\n case PropertyType.BIG_INTEGER:\n case PropertyType.LONG:\n return <ControlNumberInput required hideErrorMessage control={control} name={name} label={label} />;\n case PropertyType.BOOLEAN:\n return <ControlSwitch control={control} name={name} />;\n case PropertyType.DATE:\n return (\n <ControlDate\n required\n hideErrorMessage\n control={control}\n name={name}\n label={label}\n format={(property as DateProperty).format}\n />\n );\n case PropertyType.TIME:\n return (\n <ControlTime\n required\n hideErrorMessage\n control={control}\n name={name}\n label={label}\n format={(property as TimeProperty).format}\n />\n );\n case PropertyType.DATE_TIME:\n return (\n <ControlDateTime\n required\n hideErrorMessage\n control={control}\n name={name}\n label={label}\n format={(property as DateTimeProperty).format}\n />\n );\n case PropertyType.JSON:\n return <JsonEditor validate name={name} inputRef={inputRef} />;\n case PropertyType.STRING:\n return (\n <StringValueField\n required\n name={name}\n label={label}\n restrictedValues={(property as StringProperty).restrictedValues}\n />\n );\n case PropertyType.ENTITY_REFERENCE:\n return <ControlInput required hideErrorMessage name={name} label={label} control={control} />;\n case PropertyType.ANY:\n return <JsonEditor name={name} inputRef={inputRef} />;\n case PropertyType.ENTITY:\n return (\n <DefinitionFiller\n properties={(property as EntityTypeProperty).properties as PropertiesArrayType}\n dataFieldName={name}\n useExpression={useExpression}\n />\n );\n default:\n return <div>No widget</div>;\n }\n};\n\nexport default PropertyWidget;\n","import { useEffect, useMemo, useState } from 'react';\nimport {\n getMultiplePropertyFillOptions,\n getSinglePropertyFillOptions,\n isExpression,\n isPropertyValueEmpty,\n} from '../../../utils';\n\nimport { PropertyFillType, PropertyUnion } from '../../../interfaces';\n\ntype Props = {\n value: unknown;\n property: PropertyUnion;\n isDirty: boolean;\n label?: string;\n required?: boolean;\n useExpression?: boolean;\n multipleOptions?: boolean;\n};\n\nconst usePropertyFiller = ({\n value,\n property,\n label,\n isDirty,\n required = false,\n useExpression = false,\n multipleOptions = false,\n}: Props) => {\n const valueLabel = useMemo(() => (label ? `${label} (value)` : `${property.name} (value)`), [label, property]);\n const fillOptionLabel = useMemo(() => (label ? `${label} (widget)` : `${property.name} (widget)`), [label, property]);\n\n const propertyType = useMemo(\n () => (typeof property.propertyType === 'string' ? property.propertyType : property['propertyType']['value']),\n [property]\n );\n\n const [fillOption, setFillOption] = useState<PropertyFillType>(null);\n const fillOptions = useMemo(\n () =>\n multipleOptions\n ? getMultiplePropertyFillOptions({ propertyType, required, useExpression })\n : getSinglePropertyFillOptions({\n propertyType,\n required,\n useExpression,\n }),\n [useExpression, required, propertyType, multipleOptions]\n );\n\n useEffect(() => {\n if (!fillOption) {\n if (isPropertyValueEmpty(value) && fillOptions?.length) {\n setFillOption(fillOptions[0].value);\n } else if (useExpression && isExpression(value)) {\n setFillOption('expression');\n } else {\n setFillOption('widget');\n }\n } else if (!isDirty) {\n if (isExpression(value) && fillOption !== 'expression') {\n setFillOption('expression');\n } else if (value !== null && value !== undefined && !isExpression(value) && fillOption !== 'widget') {\n setFillOption('widget');\n }\n }\n }, [value, fillOption, fillOptions, useExpression, isDirty]);\n\n return { propertyType, valueLabel, fillOptionLabel, fillOption, fillOptions, setFillOption };\n};\n\nexport default usePropertyFiller;\n","import { makeStyles } from 'tss-react/mui';\n\nconst useStyles = makeStyles()(() => ({\n inputLabel: {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n width: '100%',\n },\n}));\n\nexport default useStyles;\n","import Box from '@mui/material/Box';\nimport Grid from '@mui/material/Unstable_Grid2';\nimport Select, { SelectChangeEvent } from '@mui/material/Select';\nimport MenuItem from '@mui/material/MenuItem';\nimport FormControl from '@mui/material/FormControl';\nimport InputLabel from '@mui/material/InputLabel';\nimport Typography from '@mui/material/Typography';\nimport JsonEditor from './JsonEditor';\nimport { ControlInput } from '../../Forms';\nimport { PropertyWidget } from '../PropertyWidget';\n\nimport { useEffect } from 'react';\nimport { useController, useFormContext, useWatch } from 'react-hook-form';\nimport usePropertyFiller from './usePropertyFiller';\nimport useStyles from './useStyles';\n\nimport { PropertyFillType, PropertyType, PropertyUnion } from '../../../interfaces';\n\ntype Props = {\n property: PropertyUnion;\n name: string;\n useExpression?: boolean;\n label?: string;\n required?: boolean;\n title?: string;\n};\n\nexport const PropertyFiller = ({ property, name, useExpression, label, required, title }: Props) => {\n const { control, clearErrors, register } = useFormContext();\n const {\n field: { ref, onChange },\n fieldState: { error, isDirty },\n } = useController({\n name,\n });\n const value = useWatch({ control, name });\n\n const { propertyType, valueLabel, fillOptionLabel, fillOption, fillOptions, setFillOption } = usePropertyFiller({\n value,\n property,\n isDirty,\n label,\n required,\n useExpression,\n });\n\n const handleFillOptionChange = (event: SelectChangeEvent<PropertyFillType>) => {\n const selectedType = event.target.value as PropertyFillType;\n if (selectedType === 'null') {\n register(name, { value: null });\n } else if (selectedType === 'widget') {\n onChange(null);\n } else if (selectedType === 'expression' || selectedType === 'string') {\n onChange('');\n }\n setFillOption(selectedType);\n clearErrors(name);\n };\n\n useEffect(() => {\n if (value === undefined) {\n onChange(null);\n }\n }, [value, onChange]);\n\n const { classes } = useStyles();\n return (\n <Grid xs={12}>\n {title && (\n <Box mb={2}>\n <Typography variant=\"h6\">{title}</Typography>\n </Box>\n )}\n {fillOptions ? (\n <Box mb={2}>\n <FormControl fullWidth size=\"small\" variant=\"outlined\">\n <InputLabel htmlFor=\"type-select\" className={classes.inputLabel}>\n {fillOptionLabel}\n </InputLabel>\n <Select\n labelId=\"type-select\"\n label={fillOptionLabel}\n value={fillOption || ''}\n onChange={handleFillOptionChange}\n >\n {fillOptions.map((option) => (\n <MenuItem key={option.value} value={option.value}>\n {option.label}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n </Box>\n ) : null}\n {fillOption === 'expression' &&\n (propertyType === PropertyType.JSON ||\n propertyType === PropertyType.ENTITY ||\n propertyType === PropertyType.ANY ? (\n <JsonEditor name={name} inputRef={ref} />\n ) : (\n <ControlInput control={control} name={name} label={valueLabel} required hideErrorMessage />\n ))}\n {fillOption === 'string' && (\n <ControlInput control={control} name={name} label={valueLabel} required hideErrorMessage />\n )}\n {fillOption === 'json_notvalid' && <JsonEditor name={name} inputRef={ref} />}\n {fillOption === 'widget' && (\n <PropertyWidget\n property={property}\n name={name}\n useExpression={useExpression}\n label={valueLabel}\n inputRef={ref}\n required={required}\n />\n )}\n {error && <Typography color=\"secondary\">{error.message}</Typography>}\n </Grid>\n );\n};\n\nexport default PropertyFiller;\n","import Box from '@mui/material/Box';\nimport Grid from '@mui/material/Unstable_Grid2';\nimport Button from '@mui/material/Button';\nimport IconButton from '@mui/material/IconButton';\nimport CloseIcon from '@mui/icons-material/Close';\nimport PropertyFiller from './PropertyFiller';\n\nimport { useCallback } from 'react';\nimport { useController, useFormContext, useWatch } from 'react-hook-form';\nimport { removeArrayItem } from '../../../utils';\n\nimport { PropertyUnion } from '../../../interfaces';\n\ntype Props = {\n name: string;\n property: PropertyUnion;\n useExpression?: boolean;\n required?: boolean;\n label?: string;\n};\n\nconst MultiplePropertyWidget = ({ name, property, useExpression, required, label }: Props) => {\n const { control, setValue, clearErrors } = useFormContext();\n const controller = useController({\n control,\n name,\n rules: {\n validate: (val) => {\n if (!val || (Array.isArray(val) && !val.length)) {\n return 'Please, fill array';\n }\n return true;\n },\n },\n });\n const values = useWatch({ control, name });\n\n const handleAddValue = useCallback(() => {\n if (values && Array.isArray(values)) {\n setValue(`${name}.${values.length}`, null);\n } else {\n setValue(name, [null]);\n }\n clearErrors(name);\n }, [name, values, setValue, clearErrors]);\n\n const handleDeleteValue = useCallback(\n (index) => {\n setValue(name, removeArrayItem(values, index));\n },\n [name, values, setValue]\n );\n\n return (\n <Grid container spacing={2} direction=\"column\" xs={12}>\n {values && Array.isArray(values)\n ? values.map((value, index) => (\n <Grid key={index} xs={12}>\n <Box display=\"flex\" alignItems=\"flex-start\" width=\"100%\" p={2} style={{ backgroundColor: '#f1f1f1' }}>\n <PropertyFiller\n required={required}\n property={property}\n useExpression={useExpression}\n name={`${name}.${index}`}\n label={`${label || property.name} (${index + 1})`}\n />\n <Box mt=\"8px\" ml=\"4px\">\n <IconButton size=\"small\" onClick={() => handleDeleteValue(index)}>\n <CloseIcon fontSize=\"small\" />\n </IconButton>\n </Box>\n </Box>\n </Grid>\n ))\n : null}\n <Grid>\n <Button variant=\"contained\" size=\"small\" color=\"primary\" onClick={handleAddValue}>\n Add value\n </Button>\n </Grid>\n </Grid>\n );\n};\n\nexport default MultiplePropertyWidget;\n","import Box from '@mui/material/Box';\nimport Grid from '@mui/material/Unstable_Grid2';\nimport Select, { SelectChangeEvent } from '@mui/material/Select';\nimport MenuItem from '@mui/material/MenuItem';\nimport FormControl from '@mui/material/FormControl';\nimport InputLabel from '@mui/material/InputLabel';\nimport Typography from '@mui/material/Typography';\nimport JsonEditor from './JsonEditor';\nimport MultiplePropertyWidget from './MultiplePropertyWidget';\nimport { ControlInput } from '../../Forms';\n\nimport { useEffect } from 'react';\nimport { useController, useFormContext, useWatch } from 'react-hook-form';\nimport usePropertyFiller from './usePropertyFiller';\nimport useStyles from './useStyles';\n\nimport { PropertyFillType, PropertyType, PropertyUnion } from '../../../interfaces';\n\ntype Props = {\n property: PropertyUnion;\n name: string;\n useExpression?: boolean;\n required?: boolean;\n label?: string;\n title?: string;\n};\n\nexport const MultiplePropertyFiller = ({ property, name, useExpression, required, label, title }: Props) => {\n const { control, clearErrors } = useFormContext();\n const {\n field: { ref, onChange },\n fieldState: { error, isDirty },\n } = useController({\n control,\n name,\n rules: {\n validate: (val) => {\n if (required && !val) {\n return 'Please, fill this field';\n }\n return true;\n },\n },\n });\n const value = useWatch({ control, name });\n\n const { propertyType, valueLabel, fillOptionLabel, fillOption, fillOptions, setFillOption } = usePropertyFiller({\n property,\n value,\n isDirty,\n label,\n required,\n useExpression,\n multipleOptions: true,\n });\n\n const handleFillOptionChange = (event: SelectChangeEvent<PropertyFillType>) => {\n const selectedType = event.target.value as PropertyFillType;\n\n if (selectedType === 'null') {\n onChange(null);\n } else if (selectedType === 'expression' || selectedType === 'json_valid' || selectedType === 'json_notvalid') {\n onChange('');\n } else if (selectedType === 'widget') {\n onChange([]);\n }\n setFillOption(selectedType);\n clearErrors(name);\n };\n\n useEffect(() => {\n if (value === undefined) {\n onChange(null);\n }\n }, [value, onChange]);\n\n const { classes } = useStyles();\n return (\n <Grid>\n {title && (\n <Box mb={2}>\n <Typography variant=\"h6\">{title}</Typography>\n </Box>\n )}\n {fillOptions ? (\n <Box mb={2}>\n <FormControl fullWidth size=\"small\" variant=\"outlined\">\n <InputLabel htmlFor=\"type-select\" className={classes.inputLabel}>\n {fillOptionLabel}\n </InputLabel>\n <Select\n labelId=\"type-select\"\n label={fillOptionLabel}\n value={fillOption || ''}\n onChange={handleFillOptionChange}\n >\n {fillOptions.map((option) => (\n <MenuItem key={option.value} value={option.value}>\n {option.label}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n </Box>\n ) : null}\n {fillOption === 'expression' &&\n (propertyType === PropertyType.JSON ||\n propertyType === PropertyType.ENTITY ||\n propertyType === PropertyType.ANY ? (\n <JsonEditor name={name} inputRef={ref} />\n ) : (\n <ControlInput required hideErrorMessage control={control} name={name} label={valueLabel} />\n ))}\n {fillOption === 'json_valid' && <JsonEditor validate name={name} inputRef={ref} />}\n {fillOption === 'widget' && (\n <MultiplePropertyWidget\n property={property}\n name={name}\n useExpression={useExpression}\n required={required}\n label={label}\n />\n )}\n {error && <Typography color=\"secondary\">{error.message}</Typography>}\n </Grid>\n );\n};\n\nexport default MultiplePropertyFiller;\n","import { useMemo } from 'react';\nimport { useFormContext, useWatch } from 'react-hook-form';\nimport { MultiplePropertyFiller, PropertyFiller } from '../PropertyFiller';\nimport { PropertyUnion } from '../../../interfaces';\n\ntype Props = {\n propertyFieldName: string;\n name: string;\n label?: string;\n required?: boolean;\n};\n\nexport const PropertyValueField = ({ propertyFieldName, name, label = '', required }: Props) => {\n const { control } = useFormContext();\n\n const propertyType = useWatch({ control, name: `${propertyFieldName}.propertyType` });\n const isMultiple = useWatch({ control, name: `${propertyFieldName}.isMultiple` });\n const format = useWatch({ control, name: `${propertyFieldName}.format` });\n const restrictedValues = useWatch({ control, name: `${propertyFieldName}.restrictedValues` });\n const properties = useWatch({ control, name: `${propertyFieldName}.properties` });\n const isRequired = useWatch({ control, name: `${propertyFieldName}.isRequired` });\n\n const fillerProperty: PropertyUnion = useMemo(() => {\n const typeValue = typeof propertyType === 'string' ? propertyType : propertyType.value;\n return {\n name: label,\n isRequired,\n isMultiple,\n format,\n restrictedValues,\n properties,\n propertyType: typeValue,\n defaultValue: null,\n defaultValues: [],\n sortOrder: 0,\n isEnabled: true,\n uiSettings: null,\n validationNode: null,\n };\n }, [propertyType, format, restrictedValues, isMultiple, label, isRequired, properties]);\n\n return isMultiple ? (\n <MultiplePropertyFiller name={name} property={fillerProperty} title={label} required={required} />\n ) : (\n <PropertyFiller name={name} property={fillerProperty} title={label} required={required} />\n );\n};\n\nexport default PropertyValueField;\n","import { useMemo } from 'react';\nimport ValidationNodeSelector from './ValidationNodeSelector';\nimport Box from '@mui/material/Box';\nimport Button from '@mui/material/Button';\nimport { useFieldArray, useFormContext } from 'react-hook-form';\n\ntype Props = {\n name: string;\n}\n\nconst NodesList = ({ name }: Props) => {\n const listItem = useMemo(() => ({\n type: ''\n }), []);\n const { control } = useFormContext();\n const { fields, append, remove } = useFieldArray({ control, name });\n \n return (\n <Box mt={2}>\n <Button variant=\"outlined\" size=\"small\" onClick={() => append(listItem)}>Add node</Button>\n {fields.map(({ id }, idx) => <ValidationNodeSelector removeHandle={() => remove(idx)} key={id} name={`${name}.${idx}`} />)}\n </Box>\n )\n}\n\nexport default NodesList;","import { createContext } from 'react';\nimport type { PropertyType } from '../../../interfaces';\n\nexport const PropertyValidatorContext = createContext<PropertyType | ''>('');","import React from 'react'\nimport { ControlInput } from '../../Forms';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport { Control } from 'react-hook-form';\n\ntype Props = {\n name: string;\n control: Control;\n}\n\nexport const StringTypeValidator = ({ name, control }: Props) => {\n return (\n <>\n <Typography variant=\"body2\" gutterBottom>Node</Typography>\n <Box> \n <ControlInput \n control={control} \n name={`${name}.minimumLength`} \n label=\"Minimum Length\"\n type=\"number\"\n />\n </Box>\n <Box mt={2}>\n <ControlInput\n control={control}\n name={`${name}.maximumLength`}\n label=\"Maximum Length\"\n type=\"number\"\n />\n </Box>\n </>\n )\n}\n\nexport default StringTypeValidator;","import React from 'react'\nimport { ControlInput, ControlCheckbox } from '../../Forms';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport { Control } from 'react-hook-form';\n\ntype Props = {\n name: string;\n control: Control<any>;\n}\n\nexport const NumericTypeValidator = ({ name, control }: Props) => {\n return (\n <>\n <Typography variant=\"body2\" gutterBottom>Node</Typography>\n <Box> \n <ControlInput \n control={control} \n name={`${name}.multipleOf`} \n label=\"Multiple Of\"\n type=\"number\"\n />\n </Box>\n <Box mt={2}>\n <ControlInput\n control={control}\n name={`${name}.minimum`}\n label=\"Minimum\"\n type=\"number\"\n />\n </Box>\n <Box mt={2}>\n <ControlInput\n control={control}\n name={`${name}.maximum`}\n label=\"Maximum\"\n type=\"number\"\n />\n </Box>\n <Box mt={2}>\n <ControlCheckbox\n control={control}\n name={`${name}.exclusiveMinimum`}\n label=\"Exclusive Minimum\"\n defaultValue={'false'}\n />\n <ControlCheckbox\n control={control}\n name={`${name}.exclusiveMaximum`}\n label=\"Exclusive Maximum\"\n defaultValue={'false'}\n />\n </Box>\n \n </>\n )\n}\n\nexport default NumericTypeValidator;","import { useContext, useMemo, useEffect } from 'react';\nimport Box from '@mui/material/Box';\nimport { PropertyType } from '../../../interfaces';\nimport { ControlSelect, ControlInput, ControlAceEditor } from '../../Forms';\nimport { PropertyValidatorContext } from './PropertyValidatorContext';\nimport { useWatch, useFormContext } from 'react-hook-form';\nimport { StepperView } from '../../StepperView';\nimport { StringTypeValidator } from './StringTypeValidator';\nimport { NumericTypeValidator } from './NumericTypeValidator';\n\ntype Props = {\n name: string;\n}\n\nconst validatorTypes = ['STRING_REGEX', 'JSON_SCHEMA'];\n\nconst numericTypes = new Set([PropertyType.INTEGER, PropertyType.FLOAT, PropertyType.DOUBLE, PropertyType.BIG_DECIMAL, PropertyType.BIG_INTEGER, PropertyType.LONG]);\n\nconst NodeValidator = ({ name }: Props) => {\n const { control, setValue } = useFormContext();\n const propertyType = useContext(PropertyValidatorContext); \n const selectedType = useWatch({ control, name: `${name}.type` });\n const renderValidator = useMemo(() => {\n if (selectedType === 'STRING_REGEX') {\n return (\n <ControlInput\n control={control}\n name={`${name}.pattern`}\n label=\"Pattern\"\n />\n )\n } \n if (selectedType === 'JSON_SCHEMA') {\n switch (true) {\n case propertyType === PropertyType.STRING: {\n return <StringTypeValidator name={`${name}.node`} control={control} />\n }\n case numericTypes.has(propertyType as PropertyType): {\n return <NumericTypeValidator name={`${name}.node`} control={control} />\n }\n case propertyType === PropertyType.JSON: {\n return (\n <ControlAceEditor\n label=\"Properties\"\n control={control}\n name={`${name}.properties`}\n validateJson\n parseValue\n />\n )\n }\n default: return 'Not available for type ' + propertyType;\n }\n } \n return null;\n }, [propertyType, selectedType, control, name]);\n\n useEffect(() => {\n if (numericTypes.has(propertyType as PropertyType) && selectedType === 'JSON_SCHEMA') {\n // setting default values\n setValue(`${name}.node.exclusiveMinimum`, false)\n setValue(`${name}.node.exclusiveMaximum`, false)\n }\n }, [propertyType, selectedType, setValue, name]);\n \n return (\n <StepperView\n data={[{\n label: 'Validator',\n content: (\n <>\n <Box>\n <ControlSelect\n control={control}\n name={`${name}.type`}\n label=\"Type\"\n options={validatorTypes}\n onChange={e => {\n setValue(name, {});\n setValue(`${name}.type`, e.target.value)\n }}\n />\n </Box>\n <Box mt={2}>{renderValidator}</Box> \n </>\n )\n }]}\n />\n )\n}\n\nexport default NodeValidator;","import { useMemo } from 'react';\nimport { useFormContext, useWatch } from 'react-hook-form';\nimport { ControlSelect } from '../../Forms';\nimport IconButton from '@mui/material/IconButton';\nimport DeleteIcon from '@mui/icons-material/Delete';\nimport Box from '@mui/material/Box';\nimport NodesList from './NodesList';\nimport NodeValidator from './NodeValidator';\nimport { StepperView } from '../../StepperView';\n\ntype Props = {\n name: string;\n removeHandle?: () => void;\n}\n\nconst nodeTypes = ['AND', 'OR', 'NOT', 'NODE'];\n\nconst ValidationNodeSelector = ({ name, removeHandle }: Props) => {\n const { control } = useFormContext();\n const selectedType = useWatch({ control, name: `${name}.type` });\n const nodeComponent = useMemo(() => ({\n AND: <NodesList name={`${name}.nodes`} />,\n OR: <NodesList name={`${name}.nodes`} />,\n NODE: <NodeValidator name={`${name}.validator`} />,\n NOT: <ValidationNodeSelector name={`${name}.node`} />,\n }), [name]);\n return (\n <StepperView \n data={[{\n label: 'Node Type',\n content: (\n <>\n <Box display=\"flex\" alignItems=\"center\">\n <ControlSelect\n required\n control={control}\n name={`${name}.type`}\n label=\"Type\"\n options={nodeTypes}\n />\n {\n removeHandle && (\n <Box ml={2}>\n <IconButton onClick={removeHandle} color=\"primary\">\n <DeleteIcon />\n </IconButton> \n </Box>\n \n )\n }\n </Box> \n <Box>\n {nodeComponent[selectedType]}\n </Box> \n </>\n )\n }]}\n /> \n )\n}\n\nexport default ValidationNodeSelector;","import { useState, useCallback, useEffect } from 'react';\nimport Typography from '@mui/material/Typography';\nimport Box from '@mui/material/Box';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport Checkbox from '@mui/material/Checkbox';\nimport ValidationNodeSelector from './ValidationNodeSelector';\nimport { useFormContext } from 'react-hook-form';\n\ntype Props = {\n name: string;\n}\n\nexport const PropertyValidator = ({ name }: Props) => {\n const [enable, setEnable] = useState(false);\n const { setValue, getValues } = useFormContext();\n \n const handleChangeEnable = useCallback(e => {\n setEnable(e.target.checked);\n if (!e.target.checked) {\n setValue(name, null);\n }\n }, [setValue, name]);\n\n useEffect(() => {\n const validator = getValues(name);\n if (validator) setEnable(true);\n }, [name, getValues]);\n\n return (\n <>\n <Box display=\"flex\" justifyContent=\"space-between\">\n <Typography variant=\"h6\">Validator</Typography>\n <FormControlLabel label=\"Enable\" control={<Checkbox color=\"primary\" checked={enable} onChange={handleChangeEnable} /> } />\n </Box>\n {\n enable && <ValidationNodeSelector name={name} />\n } \n </> \n )\n}\n\nexport default PropertyValidator;","import { useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { CustomPropertyFieldProps } from '../../../interfaces';\nimport { ControlAceEditor, ControlAutocomplete, ControlInput, ControlNumberInput, ControlSelect } from '../../Forms';\n\ntype Props = CustomPropertyFieldProps & { propertyFieldName: string };\n\nexport const CustomPropertyField = ({\n name,\n label = '',\n propertyFieldName,\n type,\n decimal = false,\n options = [],\n required = false,\n}: Props) => {\n const { control } = useFormContext();\n const fieldName = useMemo(() => `${propertyFieldName}.${name}`, [name, propertyFieldName]);\n\n switch (type) {\n case 'text':\n return <ControlInput control={control} name={fieldName} label={label} required={required} />;\n case 'number':\n return (\n <ControlNumberInput control={control} name={fieldName} label={label} decimal={decimal} required={required} />\n );\n case 'select':\n return <ControlSelect control={control} name={fieldName} label={label} options={options} required={required} />;\n case 'autocomplete':\n return (\n <ControlAutocomplete control={control} name={fieldName} label={label} options={options} required={required} />\n );\n case 'json':\n return <ControlAceEditor control={control} name={fieldName} label={label} mode=\"json\" required={required} />;\n default:\n return null;\n }\n};\n\nexport default CustomPropertyField;\n","import { useMemo } from 'react';\nimport { CustomPropertyFieldProps } from '../../../interfaces';\n\nconst useCustomFields = (customPropertyFields: CustomPropertyFieldProps[]) => {\n const customCheckboxes = useMemo(() => {\n if (customPropertyFields.length) {\n return customPropertyFields.filter((field) => field.type === 'checkbox');\n }\n return [];\n }, [customPropertyFields]);\n\n const customFields = useMemo(() => {\n if (customPropertyFields.length) {\n return customPropertyFields.filter((field) => field.type !== 'checkbox');\n }\n return [];\n }, [customPropertyFields]);\n\n return { customCheckboxes, customFields };\n};\n\nexport default useCustomFields;\n","import Grid from '@mui/material/Unstable_Grid2';\nimport {\n ControlCheckbox,\n ControlAutocomplete,\n ControlNumberInput,\n ControlAceEditor,\n ControlDebouncedInput,\n} from '../../Forms';\nimport { PropertyAdditionalFields } from './PropertyAdditionalFields';\nimport { PropertyValueField } from '../PropertyValueField';\nimport { PropertyValidator } from '../PropertyValidator';\nimport CustomPropertyField from './CustomPropertyField';\nimport { PropertyValidatorContext } from '../PropertyValidator/PropertyValidatorContext';\nimport { useMemo, useEffect } from 'react';\nimport { useFormContext, useWatch } from 'react-hook-form';\nimport useCustomFields from './useCustomFields';\n\nimport { CustomPropertyFieldProps, PropertyType } from '../../../interfaces';\n\ntype Props = {\n propertyFieldName: string;\n entityDefinition?: boolean;\n globalParameter?: boolean;\n customPropertyFields?: CustomPropertyFieldProps[];\n};\n\nconst propertyTypes = Object.values(PropertyType)\n .sort((a, b) => a.localeCompare(b))\n .map((propType) => ({\n value: propType,\n label: propType\n .replace('_', ' ')\n .toLowerCase()\n .replace(/(^\\w)|([-\\s]\\w)/g, (c) => c.toUpperCase()),\n }));\n\nconst CreatePropertyFormFields = ({\n propertyFieldName,\n entityDefinition = false,\n globalParameter = false,\n customPropertyFields = [],\n}: Props) => {\n const { control, setValue } = useFormContext();\n const propertyType = useWatch({ control, name: `${propertyFieldName}.propertyType` });\n const isMultiple = useWatch({ control, name: `${propertyFieldName}.isMultiple` });\n const isRequired = useWatch({ control, name: `${propertyFieldName}.isRequired` });\n\n const { customCheckboxes, customFields } = useCustomFields(customPropertyFields);\n\n const valueLabel = useMemo(() => {\n let label = globalParameter ? 'Value' : 'Default Value';\n if (isMultiple) {\n label += 's';\n }\n return label;\n }, [globalParameter, isMultiple]);\n\n const handlePropertyTypeChange = (_, value) => {\n const fieldName = `${propertyFieldName}.propertyType`;\n const valueFieldName = `${propertyFieldName}.${globalParameter ? 'value' : 'defaultValue'}`;\n if (isMultiple) {\n setValue(valueFieldName, []);\n } else {\n setValue(valueFieldName, null);\n }\n setValue(fieldName, value);\n };\n\n useEffect(() => {\n if (propertyType && typeof propertyType === 'string') {\n setValue(`${propertyFieldName}.propertyType`, propertyTypes.find(el => el.value === propertyType));\n }\n }, [propertyType, setValue, propertyFieldName])\n\n return (\n <Grid container direction=\"column\" spacing={2}>\n <Grid>\n <ControlDebouncedInput required control={control} name={`${propertyFieldName}.key`} label=\"Key\" />\n </Grid>\n <Grid>\n <ControlDebouncedInput required control={control} name={`${propertyFieldName}.name`} label=\"Name\" />\n </Grid>\n <Grid>\n <ControlAutocomplete\n required\n control={control}\n name={`${propertyFieldName}.propertyType`}\n label=\"Type\"\n options={propertyTypes}\n onChange={handlePropertyTypeChange}\n />\n </Grid>\n <Grid>\n <ControlNumberInput required control={control} name={`${propertyFieldName}.sortOrder`} label=\"Sort Order\" />\n </Grid>\n\n <Grid>\n <ControlAceEditor control={control} name={`${propertyFieldName}.uiSettings`} label=\"UI Settings\" validateJson />\n </Grid>\n <Grid>\n <ControlCheckbox control={control} name={`${propertyFieldName}.isMultiple`} label=\"Multiple\" />\n <ControlCheckbox control={control} name={`${propertyFieldName}.isEnabled`} label=\"Enabled\" />\n <ControlCheckbox control={control} name={`${propertyFieldName}.isRequired`} label=\"Required\" />\n {entityDefinition && (\n <ControlCheckbox\n control={control}\n name={`${propertyFieldName}.isViewableInList`}\n label=\"Is viewable in list\"\n />\n )}\n {customCheckboxes.length ? (\n <>\n {customCheckboxes.map((field, index) => (\n <ControlCheckbox\n key={index}\n control={control}\n name={`${propertyFieldName}.${field.name}`}\n label={field.label}\n />\n ))}\n </>\n ) : null}\n </Grid>\n {propertyType && (\n <>\n <Grid>\n <PropertyValidatorContext.Provider value={propertyType.value ?? propertyType}>\n <PropertyValidator name={`${propertyFieldName}.validationNode`} />\n </PropertyValidatorContext.Provider>\n </Grid>\n <PropertyAdditionalFields\n propertyType={typeof propertyType === 'string' ? propertyType : propertyType.value}\n propertyFieldName={propertyFieldName}\n globalParameter={globalParameter}\n entityDefinition={entityDefinition}\n />\n <PropertyValueField\n propertyFieldName={propertyFieldName}\n name={`${propertyFieldName}.${globalParameter ? 'value' : 'defaultValue'}`}\n label={valueLabel}\n required={globalParameter ? isRequired : false}\n />\n </>\n )}\n {customFields.length ? (\n <>\n {customFields.map((field, index) => (\n <Grid key={index}>\n <CustomPropertyField {...field} propertyFieldName={propertyFieldName} />\n </Grid>\n ))}\n </>\n ) : null}\n </Grid>\n );\n};\n\nexport default CreatePropertyFormFields;\n","import Grid from '@mui/material/Unstable_Grid2';\nimport Button from '@mui/material/Button';\nimport Typography from '@mui/material/Typography';\nimport Accordion from '@mui/material/Accordion';\nimport AccordionSummary from '@mui/material/AccordionSummary';\nimport AccordionDetails from '@mui/material/AccordionDetails';\nimport AccordionActions from '@mui/material/AccordionActions';\nimport { ExpandMore } from '@mui/icons-material';\nimport CreatePropertyFormFields from './CreatePropertyFormFields';\n\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\nimport { useController, useFormContext, useWatch } from 'react-hook-form';\nimport { removeArrayItem } from '../../../utils/common';\nimport { CustomPropertyFieldProps } from '../../../interfaces';\n\ntype Props = {\n parentFieldName?: string;\n hideAddButton?: boolean;\n focusOnIndex?: number;\n required?: boolean;\n entityDefinition?: boolean;\n globalParameter?: boolean;\n customPropertyFields?: CustomPropertyFieldProps[];\n};\n\nconst defaultPropertyValues = {\n key: '',\n propertyType: null,\n name: '',\n defaultValue: '',\n defaultValues: [],\n isRequired: true,\n isMultiple: false,\n sortOrder: 0,\n isEnabled: true,\n executeValue: '',\n uiSettings: '',\n};\n\nexport const CreatePropertiesList = ({\n parentFieldName,\n hideAddButton,\n focusOnIndex,\n required,\n entityDefinition = false,\n globalParameter = false,\n customPropertyFields = [],\n}: Props) => {\n const fieldName = useMemo(\n () => (parentFieldName ? `${parentFieldName}.properties` : `properties`),\n [parentFieldName]\n );\n\n const { setValue, clearErrors, control } = useFormContext();\n const {\n fieldState: { error },\n } = useController({ control, name: fieldName, rules: { required: required && 'Please, add properties' } });\n const properties = useWatch({ control, name: fieldName });\n\n const refs = useRef([]);\n\n useEffect(() => {\n if (typeof focusOnIndex === 'number' && refs.current[focusOnIndex]) {\n refs.current[focusOnIndex].scrollIntoView({\n behavior: 'smooth',\n block: 'start',\n });\n }\n }, [focusOnIndex, refs]);\n\n const handleAddParameter = useCallback(() => {\n if (properties) {\n setValue(`${fieldName}.${properties.length}`, defaultPropertyValues);\n } else {\n setValue(fieldName, [defaultPropertyValues]);\n }\n clearErrors(fieldName);\n }, [properties, fieldName, clearErrors, setValue]);\n\n const handleRemoveParameter = useCallback(\n (index) => {\n setValue(`${fieldName}`, removeArrayItem(properties, index));\n },\n [properties, fieldName, setValue]\n );\n\n return (\n <>\n {error && error.message && (\n <Grid sm={12} md={8} lg={6}>\n <Typography color=\"secondary\">{error.message}</Typography>\n </Grid>\n )}\n {properties &&\n properties.map((property, index) => (\n <Grid key={index} sm={12} md={8} lg={6} ref={(ref) => (refs.current[index] = ref)}>\n <Accordion defaultExpanded elevation={3}>\n <AccordionSummary expandIcon={<ExpandMore />}>\n <Typography color={error && error[index] ? 'secondary' : 'initial'} style={{ wordBreak: 'break-word' }}>\n {property.name || `Property ${index + 1}`}\n </Typography>\n </AccordionSummary>\n <AccordionDetails>\n <CreatePropertyFormFields\n propertyFieldName={`${fieldName}.${index}`}\n entityDefinition={entityDefinition}\n globalParameter={globalParameter}\n customPropertyFields={customPropertyFields}\n />\n </AccordionDetails>\n <AccordionActions>\n <Button variant=\"contained\" size=\"small\" color=\"secondary\" onClick={() => handleRemoveParameter(index)}>\n Remove\n </Button>\n </AccordionActions>\n </Accordion>\n </Grid>\n ))}\n\n {!hideAddButton && (\n <Grid xs={12}>\n <Button variant=\"contained\" size=\"small\" color=\"primary\" onClick={handleAddParameter}>\n Add property\n </Button>\n </Grid>\n )}\n </>\n );\n};\n\nexport default CreatePropertiesList;\n","import Box from '@mui/material/Box';\nimport Grid from '@mui/material/Unstable_Grid2';\nimport Typography from '@mui/material/Typography';\nimport { ControlInput, ControlNumberInput } from '../../Forms';\nimport CreatePropertiesList from '../../Property/UpsertProperty/CreatePropertiesList';\n\nimport { useFormContext } from 'react-hook-form';\n\ntype Props = {\n definitionFieldName?: string;\n title?: string;\n hideCodeField?: boolean;\n hideVersionField?: boolean;\n hideNameField?: boolean;\n required?: boolean;\n};\n\nexport const CreateDefinition = ({\n definitionFieldName,\n title,\n hideCodeField,\n hideVersionField,\n hideNameField,\n required = false,\n}: Props) => {\n const { control } = useFormContext();\n\n return (\n <Grid container direction=\"column\" spacing={2}>\n {title && (\n <Grid sm={12} md={8} lg={6}>\n <Box my={2}>\n <Typography variant=\"h4\">{title}</Typography>\n </Box>\n </Grid>\n )}\n {!hideNameField && (\n <Grid sm={12} md={8} lg={6}>\n <ControlInput\n required\n control={control}\n name={definitionFieldName ? `${definitionFieldName}.name` : `name`}\n label=\"Name\"\n />\n </Grid>\n )}\n {!hideCodeField && (\n <Grid sm={12} md={8} lg={6}>\n <ControlInput\n required\n control={control}\n name={definitionFieldName ? `${definitionFieldName}.code` : `code`}\n label=\"Code\"\n />\n </Grid>\n )}\n {!hideVersionField && (\n <Grid sm={12} md={8} lg={6}>\n <ControlNumberInput\n required\n control={control}\n name={definitionFieldName ? `${definitionFieldName}.version` : `version`}\n label=\"Version\"\n />\n </Grid>\n )}\n\n <CreatePropertiesList required={required} parentFieldName={definitionFieldName} />\n </Grid>\n );\n};\n\nexport default CreateDefinition;\n","import Box from '@mui/material/Box';\nimport Table from '@mui/material/Table';\nimport TableBody from '@mui/material/TableBody';\nimport TableRow from '@mui/material/TableRow';\nimport TableCell from '@mui/material/TableCell';\nimport Typography from '@mui/material/Typography';\nimport Chip from '@mui/material/Chip';\nimport CheckCircleIcon from '@mui/icons-material/CheckCircle';\n\nimport { useMemo } from 'react';\nimport { PropertyType, PropertyUnion } from '../../../interfaces';\nimport { JsonView } from '../../JsonView';\n\ntype Props = {\n property: PropertyUnion;\n};\n\ntype ValueDisplayProps = {\n value: unknown;\n type: PropertyType;\n};\n\nconst labels = {\n name: 'Name',\n key: 'Key',\n propertyType: 'Property Type',\n defaultValue: 'Default Value',\n defaultValues: 'Default Values',\n sortOrder: 'Sort Order',\n isRequired: 'Required',\n isMultiple: 'Multiple',\n isEnabled: 'Enabled',\n isViewableInList: 'Is Viewable In List',\n precisionScale: 'Precision Scale',\n roundingMode: 'Rounding Mode',\n format: 'Format',\n definitionCode: 'Definition Code',\n definitionVersion: 'Definition Version',\n labelPropertyCode: 'Label Property Code',\n valuePropertyCode: 'Value Property Code',\n restrictedValues: 'Restricted Values',\n value: 'Value',\n values: 'Values',\n uiSettings: 'UI Settings',\n validationNode: 'Validation Node',\n};\n\nconst ValueDisplay = ({ value, type }: ValueDisplayProps) => {\n if ((type === PropertyType.JSON || type === PropertyType.ENTITY || type === PropertyType.ANY) && value) {\n return <JsonView value={value} />;\n } else {\n return (\n <Typography variant=\"subtitle1\" display=\"inline\" style={{ wordBreak: 'break-word' }}>\n {value === null ? 'null' : value.toString()}\n </Typography>\n );\n }\n};\n\nconst formatDiplayValue = (value: any, key: string, type: PropertyType) => {\n switch (key) {\n case 'isRequired':\n case 'isMultiple':\n case 'isEnabled':\n case 'isViewableInList':\n return value ? <CheckCircleIcon color=\"primary\" fontSize=\"small\" /> : null;\n case 'restrictedValues':\n return value ? (\n <Box display=\"flex\" flexWrap=\"wrap\">\n {(value as string[]).map((restrictedValue) => (\n <Chip\n key={restrictedValue}\n label={restrictedValue}\n style={{ wordBreak: 'break-word', maxWidth: '500px' }}\n />\n ))}\n </Box>\n ) : null;\n case 'defaultValue':\n case 'value':\n return <ValueDisplay value={value} type={type} />;\n case 'values':\n case 'defaultValues':\n if (\n !Array.isArray(value) ||\n type === PropertyType.ENTITY ||\n type === PropertyType.JSON ||\n type === PropertyType.ANY\n ) {\n return <JsonView value={value} />;\n } else {\n return (\n <div>\n [\n {(value as unknown[])?.map((v, index) => (\n <div key={index}>\n <ValueDisplay value={v} type={type} />\n </div>\n ))}\n ]\n </div>\n );\n }\n case 'uiSettings':\n case 'validationNode':\n return value ? <JsonView value={value} /> : null;\n default:\n return (\n <Typography variant=\"subtitle1\" display=\"inline\" style={{ wordBreak: 'break-word' }}>\n {value}\n </Typography>\n );\n }\n};\n\nconst PropertyDataTable = ({ property }: Props) => {\n const propertyData = useMemo(() => {\n if (property) {\n if (property.isMultiple) {\n delete property.defaultValue;\n delete property['value'];\n } else {\n delete property.defaultValues;\n delete property['values'];\n }\n }\n return property;\n }, [property]);\n\n return (\n <Table size=\"small\">\n <TableBody>\n {Object.keys(labels).map((key) =>\n key in propertyData ? (\n <TableRow key={key}>\n <TableCell width=\"30%\">\n <Typography>{labels[key]}</Typography>\n </TableCell>\n <TableCell>{formatDiplayValue(propertyData[key], key, propertyData.propertyType)}</TableCell>\n </TableRow>\n ) : null\n )}\n </TableBody>\n </Table>\n );\n};\n\nexport default PropertyDataTable;\n","import Box from '@mui/material/Box';\nimport Stepper from '@mui/material/Stepper';\nimport Step from '@mui/material/Step';\nimport StepLabel from '@mui/material/StepLabel';\nimport StepContent from '@mui/material/StepContent';\nimport Typography from '@mui/material/Typography';\nimport ViewProperty from './ViewProperty';\n\nimport { memo, useMemo } from 'react';\nimport { PropertiesArrayType, PropertyType } from '../../../interfaces';\n\ntype Props = {\n properties: PropertiesArrayType;\n parentNames?: string[];\n};\n\nconst EntityPropertiesView = ({ properties, parentNames = [] }: Props) => {\n const hasProperties = useMemo(() => {\n let hasProps = false;\n properties.every((property) => {\n if (property.propertyType === PropertyType.ENTITY) {\n hasProps = true;\n return false;\n }\n return true;\n });\n return hasProps;\n }, [properties]);\n\n return (\n <Box mt={4}>\n <Typography variant=\"h6\">Properties</Typography>\n <Stepper orientation=\"vertical\" style={{ paddingLeft: '4px' }}>\n {properties.map((property) => (\n <Step expanded key={property.key}>\n <StepLabel StepIconProps={{ icon: '', completed: false, active: true }} />\n <StepContent>\n <ViewProperty property={property} parentNames={[...parentNames]} defaultExpanded={false} />\n </StepContent>\n </Step>\n ))}\n {hasProperties && <Step />}\n </Stepper>\n </Box>\n );\n};\n\nexport default memo(EntityPropertiesView);\n","import Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport Accordion from '@mui/material/Accordion';\nimport AccordionSummary from '@mui/material/AccordionSummary';\nimport AccordionDetails from '@mui/material/AccordionDetails';\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore';\nimport PropertyDataTable from './PropertyDataTable';\nimport EntityPropertiesView from './EntityPropertiesView';\n\nimport { useEffect, useState } from 'react';\nimport { propertiesObjectToArray } from '../../../utils';\nimport { PropertiesObjectType, PropertyType, PropertyUnion } from '../../../interfaces';\n\ntype Props = {\n property: PropertyUnion;\n parentNames?: string[];\n defaultExpanded?: boolean;\n};\n\nexport const ViewProperty = ({ property, parentNames = [], defaultExpanded = true }: Props) => {\n const [expanded, setExpanded] = useState(true);\n\n useEffect(() => {\n setExpanded(defaultExpanded);\n }, [defaultExpanded]);\n\n return (\n <Accordion\n elevation={3}\n style={{ backgroundColor: parentNames.length % 2 === 1 ? '#f1f1f1' : '#fff' }}\n expanded={expanded}\n onChange={() => setExpanded((prevState) => !prevState)}\n >\n <AccordionSummary expandIcon={<ExpandMoreIcon />}>\n <Typography style={{ wordBreak: 'break-word', fontWeight: '600' }}>{property.name}</Typography>\n </AccordionSummary>\n <AccordionDetails>\n <Box width=\"100%\">\n <PropertyDataTable property={property} />\n {property.propertyType === PropertyType.ENTITY && (\n <EntityPropertiesView\n properties={propertiesObjectToArray(property.properties as PropertiesObjectType)}\n parentNames={[...parentNames, property.name]}\n />\n )}\n </Box>\n </AccordionDetails>\n </Accordion>\n );\n};\n\nexport default ViewProperty;\n","import Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport { ViewProperty } from '../ViewProperty';\n\nimport { useMemo } from 'react';\nimport { propertiesObjectToArray } from '../../../utils';\nimport { PropertiesArrayType, PropertiesObjectType } from '../../../interfaces';\n\ntype Props = {\n properties: PropertiesObjectType<unknown> | PropertiesArrayType<unknown>;\n expandAll?: boolean;\n};\n\nexport const ViewPropertiesList = ({ properties, expandAll = true }: Props) => {\n const propertiesList = useMemo(() => {\n if (Array.isArray(properties)) {\n return properties;\n } else if (properties) {\n return propertiesObjectToArray(properties);\n }\n return [];\n }, [properties]);\n\n return (\n <Box display=\"flex\" flexDirection=\"column\">\n {propertiesList.length ? (\n propertiesList.map((property) => (\n <ViewProperty key={property.key} property={property} defaultExpanded={expandAll} />\n ))\n ) : (\n <Typography>No properties</Typography>\n )}\n </Box>\n );\n};\n\nexport default ViewPropertiesList;\n","import Box from '@mui/material/Box';\nimport Grid from '@mui/material/Unstable_Grid2';\nimport { StepperData, StepperView } from '../../StepperView';\nimport { PropertyFiller } from '../../Property';\nimport { MultiplePropertyFiller } from '../../Property';\n\nimport { useMemo } from 'react';\n\nimport { PropertiesArrayType } from '../../../interfaces';\n\ntype Props = {\n properties: PropertiesArrayType;\n dataFieldName: string;\n useExpression?: boolean;\n title?: string;\n};\n\nexport const DefinitionFiller = ({ properties, dataFieldName, useExpression = false, title }: Props) => {\n const stepperData: StepperData = useMemo(() => {\n if (properties) {\n return properties.map((property) => {\n const propertyType =\n typeof property.propertyType === 'string' ? property.propertyType : property['propertyType']['value'];\n return {\n label: (\n <Box display=\"flex\" flexDirection=\"column\">\n <b>\n {property.name}\n {property.isRequired ? '*' : ''}\n </b>\n <span>\n {property.key} | {property.isMultiple ? 'multiple' : 'single'} | {propertyType}\n </span>\n </Box>\n ),\n content: property.isMultiple ? (\n <MultiplePropertyFiller\n property={property}\n name={`${dataFieldName}.${property.key}`}\n useExpression={useExpression}\n label={property.name}\n required={property.isRequired}\n />\n ) : (\n <PropertyFiller\n property={property}\n name={`${dataFieldName}.${property.key}`}\n useExpression={useExpression}\n label={property.name}\n required={property.isRequired}\n />\n ),\n };\n });\n }\n return [];\n }, [properties, dataFieldName, useExpression]);\n\n return (\n <Grid container direction=\"column\" spacing={2}>\n {title && (\n <Grid xs={12}>\n <div style={{ fontWeight: '600' }}>{title}</div>\n </Grid>\n )}\n <StepperView data={stepperData} />\n </Grid>\n );\n};\n\nexport default DefinitionFiller;\n","import Box from '@mui/material/Box';\nimport { JsonView } from '../../JsonView';\nimport DefinitionValueView from './DefinitionValueView';\n\nimport { useMemo } from 'react';\nimport { isExpression, propertiesObjectToArray } from '../../../utils';\n\nimport { PropertyUnion, PropertyType, PropertiesArrayType } from '../../../interfaces';\n\ntype Props = {\n property: PropertyUnion;\n data: unknown;\n hasBackground?: boolean;\n};\n\ntype PropertyValueComponentProps = {\n property: PropertyUnion;\n data: unknown;\n properties?: PropertiesArrayType;\n};\n\nconst PropertyValueComponent = ({ property, data, properties }: PropertyValueComponentProps) => {\n const defaultRender = (value: any) => (\n <Box style={{ backgroundColor: '#fff', border: '1px solid #ccc', borderRadius: '4px', padding: '4px' }}>\n {value === null ? 'null' : value?.toString()}\n </Box>\n )\n if (isExpression(data)) {\n return defaultRender(data);\n } else {\n switch (property.propertyType) {\n case PropertyType.JSON:\n return <JsonView value={data} />;\n case PropertyType.ENTITY:\n return <DefinitionValueView properties={properties} data={data} />;\n case PropertyType.ANY:\n // TODO need to prefetch data and show as is\n return (typeof data === 'object' ? <JsonView value={data} /> : defaultRender(data));\n default:\n return defaultRender(data);\n }\n }\n};\n\nexport const PropertyDataView = ({ property, data, hasBackground = false }: Props) => {\n const properties = useMemo(() => {\n if (property.propertyType === PropertyType.ENTITY) {\n if (Array.isArray(property.properties)) {\n return property.properties;\n }\n return propertiesObjectToArray(property.properties);\n }\n return [];\n }, [property]);\n\n return (\n <Box\n style={{\n backgroundColor: hasBackground ? '#f1f1f1' : 'none',\n }}\n >\n <PropertyValueComponent property={property} data={data} properties={properties} />\n </Box>\n );\n};\n\nexport default PropertyDataView;\n","import Box from '@mui/material/Box';\nimport Grid from '@mui/material/Unstable_Grid2';\nimport { StepperData, StepperView } from '../../StepperView';\nimport PropertyDataView from './PropertyDataView';\n\nimport { useMemo } from 'react';\nimport { PropertiesArrayType, PropertyType } from '../../../interfaces';\n\ntype Props = {\n properties: PropertiesArrayType<unknown>;\n data: unknown;\n};\n\nexport const DefinitionValueView = ({ properties, data }: Props) => {\n const stepperData: StepperData = useMemo(() => {\n if (properties && data) {\n return properties.map((property) => {\n const { key, name, isMultiple, propertyType } = property;\n const value = data[property.key] ?? data;\n return {\n label: (\n <Box display=\"flex\" flexDirection=\"column\">\n <b>{name}</b>\n <span>\n {key} | {isMultiple ? 'multiple' : 'single'} | {propertyType}\n </span>\n </Box>\n ),\n content:\n isMultiple && Array.isArray(value) && property.propertyType !== PropertyType.ANY ? (\n <>\n {value.map((itemValue, index) => (\n <Box key={index} mb={2}>\n <PropertyDataView property={property} data={itemValue} hasBackground />\n </Box>\n ))}\n </>\n ) : (\n <PropertyDataView property={property} data={value} />\n ),\n };\n });\n }\n return [];\n }, [properties, data]);\n\n return (\n <Grid container direction=\"column\" spacing={2}>\n <StepperView data={stepperData} />\n </Grid>\n );\n};\n\nexport default DefinitionValueView;\n","import { makeStyles } from 'tss-react/mui';\n\nexport default makeStyles()((theme) => ({\n root: {\n backgroundColor: '#eee',\n fontSize: '14px',\n padding: '0 8px',\n borderRadius: '10px',\n width: 'fit-content',\n\n '&.success': {\n backgroundColor: '#a9dfa9',\n },\n '&.error': {\n backgroundColor: '#ff7e7e',\n },\n '&.warning': {\n backgroundColor: theme.palette.warning.main,\n },\n },\n}));\n","import useStyles from './styles';\nimport cn from 'classnames';\nimport { StatusVariant } from '../../interfaces';\n\ntype Props = {\n text: string;\n status?: StatusVariant;\n};\n\nexport const Status = ({ text, status = 'default' }: Props) => {\n const { classes } = useStyles();\n\n return <div className={cn(classes['root'], { [status]: true })}>{text}</div>;\n};\n\nexport default Status;\n","import Stepper from '@mui/material/Stepper';\nimport Step from '@mui/material/Step';\nimport StepLabel from '@mui/material/StepLabel';\nimport StepContent from '@mui/material/StepContent';\n\nimport { EntityTypeProperty, PropertiesArrayType, PropertyType } from '../../interfaces';\nimport { makeStyles } from 'tss-react/mui';\n\ntype Props = {\n properties: PropertiesArrayType;\n parentKey?: string;\n activePath: string;\n prefix?: string;\n onClick: (path: string) => void;\n};\n\nconst useStyles = makeStyles()(() => ({\n propertyStepLabel: {\n '&:hover': {\n fontWeight: '600',\n cursor: 'pointer',\n },\n },\n}));\n\nconst PropertyStep = ({ properties, parentKey = '', activePath = '', prefix = '', onClick }: Props) => {\n const { classes } = useStyles();\n\n const handleClick = (path: string) => {\n if (prefix) {\n onClick(`${prefix}.${path}`);\n } else {\n onClick(path);\n }\n };\n\n return (\n <Stepper orientation=\"vertical\" onClick={(event) => event.stopPropagation()}>\n {properties &&\n properties.map((property) => {\n const fullPropertyPath = parentKey ? `${parentKey}.${property.key}` : property.key;\n const propertyType = property.propertyType['value'] ?? property.propertyType;\n return (\n <Step expanded key={property.key} onClick={() => handleClick(fullPropertyPath)}>\n <StepLabel StepIconProps={{ icon: '', completed: false, active: activePath === fullPropertyPath }}>\n <div className={classes.propertyStepLabel}>\n {property.name} - {property.key} - {propertyType}\n </div>\n </StepLabel>\n <StepContent>\n <div>\n {propertyType === PropertyType.ENTITY && (\n <PropertyStep\n key={property.key}\n onClick={onClick}\n activePath={activePath}\n properties={(property as EntityTypeProperty).properties as PropertiesArrayType}\n parentKey={fullPropertyPath}\n />\n )}\n </div>\n </StepContent>\n </Step>\n );\n })}\n </Stepper>\n );\n};\n\nexport default PropertyStep;\n","import Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogActions from '@mui/material/DialogActions';\nimport Typography from '@mui/material/Typography';\nimport PropertyStep from './PropertyStep';\n\nimport { useState } from 'react';\nimport { toast } from 'react-toastify';\nimport { JsonPathPickerProperty } from '../../interfaces';\n\ntype Props = {\n properties: JsonPathPickerProperty[];\n open: boolean;\n onClose: () => void;\n onPaste: (path: string) => void;\n};\n\nexport const JsonPathPicker = ({ open = false, onClose, onPaste, properties }: Props) => {\n const [selectedPropertyPath, setSelectedPropertyPath] = useState<string>('');\n\n const onCopy = () => {\n navigator.clipboard.writeText(`$(${selectedPropertyPath})`);\n toast.success('Copied!');\n };\n\n const handlePaste = () => {\n onPaste(`$(${selectedPropertyPath})`);\n toast.success('Pasted!');\n };\n\n return (\n <Dialog open={open} onClose={onClose} fullWidth maxWidth=\"md\">\n <DialogTitle>JSON path picker</DialogTitle>\n <DialogContent>\n {properties?.length ? (\n properties.map((propEl, index) => (\n <div key={index}>\n <Typography variant=\"h6\">{propEl.title}</Typography>\n <PropertyStep\n properties={propEl.properties}\n prefix={propEl.pathPrefix}\n onClick={setSelectedPropertyPath}\n activePath={selectedPropertyPath}\n />\n </div>\n ))\n ) : (\n <Typography>Please, add properties</Typography>\n )}\n {selectedPropertyPath && (\n <Typography variant=\"h6\" gutterBottom>\n Selected path : $({selectedPropertyPath})\n </Typography>\n )}\n </DialogContent>\n <DialogActions>\n <Button variant=\"contained\" color=\"primary\" onClick={onCopy}>\n Copy\n </Button>\n <Button variant=\"contained\" color=\"primary\" onClick={handlePaste}>\n Paste\n </Button>\n <Button variant=\"contained\" color=\"secondary\" onClick={onClose}>\n Close\n </Button>\n </DialogActions>\n </Dialog>\n );\n};\n\nexport default JsonPathPicker;\n","import MuiDrawer from '@mui/material/Drawer';\nimport MuiList from '@mui/material/List';\nimport MuiListItem from '@mui/material/ListItem';\nimport MuiListItemIcon from '@mui/material/ListItemIcon';\nimport MuiListItemButton from '@mui/material/ListItemButton';\nimport MuiListSubheader from '@mui/material/ListSubheader';\nimport Toolbar from '@mui/material/Toolbar';\nimport { styled } from '@mui/material/styles';\n\nconst drawerWidth = 248;\n\nexport const Drawer = styled(MuiDrawer)((props) => ({\n width: drawerWidth,\n flexShrink: 0,\n '& .MuiDrawer-paper': {\n backgroundColor: props.theme.palette.secondary.main,\n width: drawerWidth,\n boxSizing: 'border-box',\n borderRight: 'none',\n borderRadius: 0,\n },\n}));\n\nexport const Header = styled(Toolbar)(({ theme }) => ({\n backgroundColor: '#fff',\n borderRight: '1px solid rgba(38, 40, 66, 0.08)',\n fontSize: 24,\n fontWeight: 600,\n // padding: theme.spacing(1, 4)\n}))\n\nexport const ListItemButton = styled(MuiListItemButton)(({ theme }) => ({\n borderRadius: theme.spacing(2.5),\n // paddingLeft: 9,\n padding: theme.spacing(2, 0, 2, 2),\n textAlign: 'left',\n '&.active': {\n backgroundColor: 'rgba(38, 40, 66, 0.12)',\n '&.main': {\n backgroundColor: 'rgba(255, 255, 255, 0.12)',\n // borderLeft: '4px solid #E0613A',\n boxShadow: '-4px 0 0 0px #E0613A',\n },\n },\n}));\n\nexport const List = styled(MuiList)((props) => ({\n padding: props.theme.spacing(3, 3, 3, 4),\n margin: 0\n}));\n\nexport const ListItem = styled(MuiListItem)((props) => ({\n color: '#fff',\n}));\n\nexport const ListItemIcon = styled(MuiListItemIcon)(() => ({\n color: '#fff',\n minWidth: 28,\n '& svg': {\n fill: '#fff',\n color: '#fff',\n },\n}));\n\nexport const ListSubheader = styled(MuiListSubheader)(() => ({\n backgroundColor: 'inherit',\n color: '#fff',\n paddingLeft: 0,\n textTransform: 'uppercase'\n}));\n","import { Link as RouterLink } from 'react-router-dom';\nimport ListItemText from '@mui/material/ListItemText';\nimport {\n ListItem,\n ListItemButton,\n ListItemIcon,\n ListSubheader,\n} from '../Sidebar.styled';\nimport classnames from 'classnames';\nimport type { Route } from '../../../interfaces'; \n\ntype Props = {\n route: Route;\n isActive: boolean;\n};\n\nconst SidebarLinkItem = ({ route, isActive }: Props) => {\n return route.link ? (\n <ListItem\n disablePadding\n {...{\n component: RouterLink,\n replace: true,\n to: { pathname: route.link, search: route.query },\n }}\n >\n <ListItemButton\n className={classnames({\n active: isActive,\n main: route.main,\n })}\n >\n {route.icon && <ListItemIcon>{route.icon}</ListItemIcon>}\n <ListItemText primary={route.name} primaryTypographyProps={{ variant: 'body2' }} />\n </ListItemButton>\n </ListItem>\n ) : (\n <ListSubheader>{route.name}</ListSubheader>\n );\n};\n\nexport default SidebarLinkItem;\n","import type { Route } from '../../../interfaces'; \nimport ListItemText from '@mui/material/ListItemText';\nimport {\n ListItem,\n ListItemButton,\n ListItemIcon,\n ListSubheader,\n} from '../Sidebar.styled';\nimport Box from '@mui/material/Box';\nimport ArrowIcon from '../../../assets/chevron_left.svg';\n\nimport classnames from 'classnames';\n\ntype Props = {\n route: Route;\n isActive: boolean;\n isListOpen: boolean;\n handleClick: () => void;\n};\n\nfunction SidebarNestedItem({\n route,\n isActive,\n isListOpen,\n handleClick,\n}: Props) {\n return route?.link ? (\n <ListItem disablePadding onClick={handleClick}>\n <ListItemButton\n className={classnames({\n active: isActive,\n main: route.main,\n })}\n >\n {route.icon && <ListItemIcon>{route.icon}</ListItemIcon>}\n <ListItemText primary={route.name} primaryTypographyProps={{ variant: 'body2' }} />\n <Box\n component=\"img\"\n src={ArrowIcon}\n mr={3}\n sx={{\n transition: 'transform .3s',\n transform: `rotate(${isListOpen ? '-90deg' : 0})`\n }}\n />\n \n </ListItemButton>\n </ListItem>\n ) : (\n <ListSubheader>{route.name}</ListSubheader>\n );\n};\n\nexport default SidebarNestedItem;\n","var img = \"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg opacity='0.6'%3e%3cpath d='M10.3533 2.81334C10.447 2.90709 10.4996 3.03417 10.4996 3.16667C10.4996 3.29917 10.447 3.42626 10.3533 3.52001L5.87334 8.00001L10.3533 12.48C10.4025 12.5258 10.4419 12.581 10.4692 12.6423C10.4965 12.7036 10.5112 12.7699 10.5124 12.837C10.5136 12.9041 10.5012 12.9708 10.4761 13.0331C10.4509 13.0953 10.4135 13.1519 10.366 13.1994C10.3186 13.2468 10.262 13.2843 10.1997 13.3094C10.1375 13.3346 10.0708 13.3469 10.0037 13.3457C9.93652 13.3446 9.87032 13.3299 9.80898 13.3025C9.74765 13.2752 9.69245 13.2358 9.64667 13.1867L4.81334 8.35334C4.71971 8.25959 4.66711 8.13251 4.66711 8.00001C4.66711 7.86751 4.71971 7.74042 4.81334 7.64667L9.64667 2.81334C9.74042 2.71971 9.86751 2.66711 10 2.66711C10.1325 2.66711 10.2596 2.71971 10.3533 2.81334Z' fill='white'/%3e%3c/g%3e%3c/svg%3e\";\n export default img;","import List from '@mui/material/List';\nimport Collapse from '@mui/material/Collapse';\nimport SidebarLinkItem from './SidebarLinkItem';\nimport SidebarNestedItem from './SidebarNestedItem';\nimport type { Route } from '../../../interfaces'; \nimport { useEffect, useMemo, useState } from 'react';\nimport { useLocation } from 'react-router-dom';\n\ntype Props = {\n route: Route;\n};\n\nconst SidebarLink = ({ route }: Props) => {\n const location = useLocation();\n\n const [open, setOpen] = useState(false);\n\n const isActive = useMemo(\n () => !!route.link && location.pathname.startsWith(route.link),\n [location.pathname, route]\n );\n\n const handleClick = () => {\n setOpen(!open);\n };\n\n useEffect(() => {\n setOpen(isActive);\n }, [isActive]);\n\n return route.children?.length ? (\n <>\n <SidebarNestedItem\n route={route}\n isActive={isActive}\n handleClick={handleClick}\n isListOpen={open || !route.link}\n />\n <Collapse in={open || !route.link} timeout=\"auto\">\n <List component=\"div\" disablePadding>\n {route.children?.map((childRoute, index) => (\n <SidebarLink key={index} route={childRoute} />\n ))}\n </List>\n </Collapse>\n </>\n ) : (\n <SidebarLinkItem route={route} isActive={isActive} />\n );\n};\n\nexport default SidebarLink;","import Box from '@mui/material/Box';\n\ntype Props = {\n src: string;\n alt?: string;\n}\n\nexport const MenuIcon = ({src, alt}: Props) => {\n return (\n <Box sx={{ width: 20, height: 20, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>\n <img src={src} alt={alt} />\n </Box>\n )\n}\n\nexport default MenuIcon","import { createTheme } from '@mui/material/styles';\n\nconst baseThemeOptions = {\n spacing: 4,\n palette: {\n primary: {\n main: '#E0613A',\n dark: '#d9512e',\n light: '#E0613A',\n },\n secondary: {\n main: '#007994',\n dark: '#262842',\n light: '#cbe8ee',\n },\n text: {\n disabled: '#A9A9B8'\n\n },\n success: {\n main: '#2DB77B',\n light: '#DBFCEE',\n },\n grey: {\n 700: '#101F2B'\n }\n\n },\n typography: {\n fontFamily: 'Euclid',\n fontSize: 14,\n h1: {\n fontWeight: 400,\n },\n h3: {\n fontWeight: 500,\n },\n h4: {\n fontWeight: 500,\n }\n }\n};\n\nexport default createTheme(baseThemeOptions);\n","import baseTheme from './baseTheme';\n\nconst inputThemeOptions = {\n components: {\n MuiButton: {\n styleOverrides: {\n root: {\n lineHeight: 1.429,\n },\n },\n },\n MuiInputBase: {\n styleOverrides: {\n root: {\n borderRadius: baseTheme.spacing(3),\n minWidth: baseTheme.spacing(25),\n background: baseTheme.palette.background.default\n // height: 40\n },\n // sizeSmall: {\n // padding: baseTheme.spacing(1, 0, 1, 4),\n // },\n input: {\n minWidth: baseTheme.spacing(25),\n // padding: 0,\n // height: '32px',\n },\n },\n },\n MuiSelect: {\n styleOverrides: {\n nativeInput: {\n padding: 0,\n height: '32px',\n },\n },\n },\n MuiTextField: {\n styleOverrides: {\n root: {\n minWidth: baseTheme.spacing(25),\n },\n },\n },\n MuiInputLabel: {\n styleOverrides: {\n root: {\n position: 'relative',\n overflow: 'initial',\n transform: 'none',\n marginBottom: baseTheme.spacing(1),\n fontWeight: 500,\n fontSize: '14px',\n lineHeight: '20px',\n },\n },\n },\n MuiOutlinedInput: {\n styleOverrides: {\n root: {\n borderRadius: baseTheme.spacing(3),\n minWidth: baseTheme.spacing(25),\n },\n notchedOutline: {\n top: 0,\n '& legend': {\n display: 'none',\n transition: 'none',\n },\n },\n },\n },\n MuiAutocomplete: {\n styleOverrides: {\n paper: {\n marginTop: 8,\n borderRadius: 12,\n boxShadow: '0px 8px 16px rgba(0, 0, 0, 0.04)',\n },\n listbox: {\n '::-webkit-scrollbar': {\n width: '6px',\n backgroundColor: 'white',\n },\n '::-webkit-scrollbar-thumb': {\n borderRadius: '10px',\n backgroundColor: 'rgba(38, 40, 66, 0.24)',\n },\n },\n },\n },\n MuiMenu: {\n styleOverrides: {\n list: {\n paddingTop: 0,\n paddingBottom: 0,\n background: 'white',\n '& li.Mui-selected': {\n background: 'rgba(38, 40, 66, 0.08) !important',\n },\n },\n },\n },\n MuiPopover: {\n styleOverrides: {\n paper: {\n marginTop: 8,\n borderRadius: 12,\n boxShadow: '0px 8px 16px rgba(0, 0, 0, 0.04)',\n },\n },\n },\n MuiFormLabel: {\n styleOverrides: {\n asterisk: {\n color: '#D6331F',\n '&$error': {\n color: '#D6331F',\n },\n },\n },\n },\n },\n};\n\nexport default inputThemeOptions;\n","import baseTheme from './baseTheme';\n\nconst tableThemeOptions = {\n components: {\n MuiTableContainer: {\n styleOverrides: {\n root: {\n borderRadius: baseTheme.spacing(3),\n border: '1px solid rgba(38, 40, 66, 0.08)',\n },\n },\n },\n MuiTableHead: {\n styleOverrides: {\n root: {\n backgroundColor: '#F7F8FC',\n },\n },\n },\n MuiTableCell: {\n styleOverrides: {\n root: {\n minHeight: 48,\n padding: baseTheme.spacing(1, 2),\n '&:first-of-type': {\n paddingLeft: baseTheme.spacing(4),\n }\n },\n head: {\n maxHeight: '40px',\n padding: baseTheme.spacing(2.75, 2),\n color: '#6D6E85'\n },\n body: {\n wordBreak: 'break-all'\n },\n },\n },\n MuiTableSortLabel: {\n styleOverrides: {\n root: {\n maxHeight: '24px',\n lineHeight: 1,\n },\n },\n },\n },\n};\n\nexport default tableThemeOptions;\n","import baseTheme from './baseTheme';\n\nconst stepperThemeOptions = {\n components: {\n MuiStepIcon: {\n styleOverrides: {\n root: {\n fontSize: '20px',\n color: baseTheme.palette.text.disabled,\n '&.Mui-active, &.Mui-completed': {\n color: baseTheme.palette.secondary.main\n }\n }\n }\n \n }\n }\n}\n\nexport default stepperThemeOptions;","import baseTheme from './baseTheme';\n\nconst typographyThemeOptions = {\n components: {\n MuiTypography: {\n styleOverrides: {\n h1: {\n [baseTheme.breakpoints.up('lg')]: {\n fontSize: '1.5rem'\n }\n },\n h3: {\n fontSize: '1.25rem',\n [baseTheme.breakpoints.up('lg')]: {\n fontSize: '1.125rem'\n }\n },\n h4: {\n fontSize: '1rem',\n [baseTheme.breakpoints.up('lg')]: {\n fontSize: '1rem'\n }\n },\n subtitle2: {\n color: '#6D6E85'\n }\n }\n }\n }\n}\n\nexport default typographyThemeOptions;","import { createTheme, responsiveFontSizes } from '@mui/material/styles';\nimport baseTheme from './baseTheme';\nimport inputThemeOptions from './inputThemeOptions';\nimport tableThemeOptions from './tableThemeOptions';\nimport stepperThemeOptions from './stepperThemeOptions';\nimport typographyThemeOptions from './typographyThemeOptions';\n\nexport const theme = responsiveFontSizes(\n createTheme(baseTheme, {\n components: {\n ...inputThemeOptions.components,\n ...tableThemeOptions.components,\n ...stepperThemeOptions.components,\n ...typographyThemeOptions.components,\n MuiToolbar: {\n styleOverrides: {\n root: {\n [baseTheme.breakpoints.up('sm')]: {\n minHeight: '56px',\n },\n },\n },\n },\n // MuiBackdrop: {\n // styleOverrides: {\n // root: {\n // backgroundColor: 'rgba(0, 0, 0, 0.2)',\n // },\n // },\n // },\n MuiAppBar: {\n styleOverrides: {\n root: {\n boxShadow: 'none',\n backgroundColor: '#007F9B',\n },\n },\n },\n MuiButton: {\n styleOverrides: {\n root: {\n borderRadius: baseTheme.spacing(2.5),\n padding: baseTheme.spacing(2.5, 4),\n lineHeight: '20px',\n fontSize: '1rem',\n textTransform: 'none'\n },\n outlined: {\n color: '#262842',\n backgroundColor: '#FFFFFF !important',\n border: '1px solid rgba(38, 40, 66, 0.12)',\n },\n text: {\n color: baseTheme.palette.secondary.dark\n }\n },\n },\n MuiDialog: {\n styleOverrides: {\n root: {\n '& .MuiModal-backdrop': {\n background: 'rgba(28, 55, 77, 0.5)',\n backdropFilter: 'blur(2px)',\n },\n },\n paper: {\n borderRadius: baseTheme.spacing(3)\n },\n paperWidthXs: {\n maxWidth: 500\n }\n },\n },\n // MuiPaper: {\n // styleOverrides: {\n // root: {\n // borderRadius: baseTheme.spacing(3),\n // },\n // },\n // },\n MuiDialogContent: {\n styleOverrides: {\n root: {\n color: '#6D6E85',\n },\n },\n },\n MuiDialogActions: {\n styleOverrides: {\n root: {\n background: '#F7F8FC',\n borderTop: '1px solid rgba(38, 40, 66, 0.08)',\n padding: baseTheme.spacing(3, 6)\n },\n },\n },\n MuiTabs: {\n styleOverrides: {\n root: {\n minHeight: '38px',\n },\n indicator: {\n backgroundColor: baseTheme.palette.secondary.main\n }\n }\n },\n MuiTab: {\n styleOverrides: {\n root: {\n fontSize: 14,\n fontWeight: 500,\n textTransform: 'none',\n padding: '10px 12px',\n lineHeight: '1.125rem',\n minHeight: '38px',\n color: '#8B8C9E',\n '&.Mui-selected': {\n color: baseTheme.palette.secondary.main\n }\n }\n }\n }\n },\n })\n);\n\n","import SidebarLink from './SidebarLink';\nimport { Drawer, Header, List } from './Sidebar.styled';\nimport { BrowserRouter } from 'react-router-dom';\nimport { ThemeProvider } from '@mui/material/styles';\nimport { theme as defaultTheme } from '../../theme';\nimport type { Route } from '../../interfaces'; \n\ntype Props = {\n routes: Route[];\n theme?: any;\n title?: string;\n}\n\nexport const Sidebar = ({ routes, theme = defaultTheme, title = '' }: Props) => {\n\n return (\n <ThemeProvider theme={theme}>\n <BrowserRouter>\n <Drawer variant=\"permanent\" anchor=\"left\">\n {\n !!title && (\n <Header>\n {title}\n </Header>\n )\n }\n \n <List>\n {routes.map((route, index) => (\n <SidebarLink key={index} route={route} />\n ))}\n </List>\n </Drawer> \n </BrowserRouter>\n </ThemeProvider> \n );\n};\n\n","import { Suspense, ReactNode } from 'react';\nimport Box from '@mui/material/Box';\nimport { SxProps, Theme } from '@mui/material/styles';\nimport Toolbar from '@mui/material/Toolbar';\nimport { Outlet } from 'react-router-dom';\nimport { Loader } from '../Loader';\n\ntype Props = {\n children?: ReactNode;\n toolbar?: ReactNode;\n contentSx?: SxProps<Theme>;\n}\n\nexport const ContentLayout = ({ children, toolbar, contentSx }: Props) => {\n return (\n <Box component=\"main\" sx={{ flexGrow: 1, bgcolor: 'background.default' }}>\n <Toolbar\n sx={{\n borderBottom: '1px solid rgba(38, 40, 66, 0.08)',\n }}\n >{toolbar}</Toolbar>\n <Box sx={{ ...contentSx, height: 'calc(100vh - 56px)', overflow: 'scroll' }}>\n <Suspense fallback={<Loader />}>\n {\n children ?? <Outlet />\n } \n </Suspense> \n </Box>\n </Box>\n );\n};\n"],"names":["PropertyType","DATE_DEFAULT_FORMAT","TIME_DEFAULT_FORMAT","DATE_TIME_DEFAULT_FORMAT","RoundingMode","Loader","transparent","position","_jsx","Box","Object","assign","top","left","width","height","display","alignItems","justifyContent","bgcolor","zIndex","children","CircularProgress","AlertDialog","open","title","description","closeButtonTitle","onClose","confirmButtonTitle","confirmButtonDisabled","onConfirm","dialogProps","loading","maxWidth","_jsxs","Dialog","fullWidth","DialogTitle","id","DialogContent","DialogContentText","overflow","DialogActions","Button","onClick","color","variant","autoFocus","disabled","ControlInput","_a","control","validate","name","label","required","defaultValue","textarea","hideErrorMessage","onChange","customOnChange","textFieldProps","__rest","field","ref","fieldState","error","useController","rules","value","useWatch","TextField","size","type","inputRef","helperText","message","multiline","minRows","inputProps","_b","useDebounce","func","delay","timer","useRef","useEffect","current","clearTimeout","debounceFunction","args","setTimeout","useToggle","setOpen","useState","toggle","prevState","onOpen","ControlDebouncedInput","fieldValue","setFieldValue","debouncedChange","handleChange","useCallback","e","target","ControlSelect","labelKey","valueKey","options","getValue","option","getLabel","handleClear","select","InputProps","endAdornment","InputAdornment","sx","mr","IconButton","ClearIcon","fontSize","map","index","MenuItem","ControlCheckbox","checkboxProps","checked","useMemo","FormControl","component","FormControlLabel","Checkbox","FormHelperText","ControlRadio","values","FormLabel","RadioGroup","item","Radio","useAutocomplete$1","useAutocomplete","isOptionEqualToValue","getOptionLabel","code","renderOption","props","_createElement","key","ControlAutocomplete","multiple","disableCloseOnSelect","autocompleteProps","formValue","Autocomplete","disablePortal","readOnly","filterSelectedOptions","_","renderInput","params","ControlQueryAutocomplete","searchBy","sortBy","queryFunction","itemQueryFunction","isDirty","inputValue","setInputValue","searchValue","setSearchValue","totalItems","setTotalItems","page","setPage","setOptions","val","handleInputChange","handleValueChange","event","requestValue","then","catch","handleOnScroll","listboxNode","currentTarget","scrollHeight","scrollTop","clientHeight","length","data","isFetching","useQuery","qs","parse","sort","ignoreQueryPrefix","prevOptions","collection","clearOnBlur","filterOptions","x","handleOpen","handleClose","onInputChange","ListboxProps","onScroll","React","Fragment","CopyButton","copyText","helpText","tooltipText","setTooltipText","Tooltip","placement","onCopy","navigator","clipboard","writeText","SvgIcon","d","BackButton","text","buttonProps","navigate","useNavigate","state","useLocation","fromLocation","handleClick","Link","to","ControlAceEditor","forwardRef","mode","theme","validateJson","parseValue","otherProps","setError","clearErrors","useFormContext","flexDirection","Typography","style","marginRight","AceEditor","focus","wrapEnabled","showPrintMargin","enableLiveAutocompletion","enableBasicAutocompletion","enableSnippets","showLineNumbers","tabSize","lineHeight","isolation","JSON","stringify","console","log","onLoad","editor","getSession","setUseWorker","removeArrayItem","arr","newArr","splice","capitalize","str","replace","c","toUpperCase","sortArrayOfObjects","a","b","order","valueA","valueB","getJsonStringValue","safeParseJson","deepParseJson","parsedValue","keys","forEach","JsonView","stringValue","copyWithEmptySelection","JsonModalView","disableEscapeKeyDown","JsonTypeCell$1","JsonTypeCell","copyButton","textField","jsonModalOpen","onJsonModalOpen","onJsonModalClose","pt","mb","whiteSpace","formatTableRowValue","status","slice","format","Date","Status","digitsOnly","RegExp","floatsOnly","isExpression","includes","isDateType","propertyType","DATE","DATE_TIME","TIME","isPropertyValueEmpty","formatPropertyValue","BOOLEAN","INTEGER","BIG_INTEGER","BIG_DECIMAL","FLOAT","LONG","DOUBLE","Number","toString","formatText","ANY","ENTITY","formatDefinitionData","properties","formattedData","property","Array","isArray","propertiesArrayToObject","isGlobalParameter","propertiesObject","isRequired","isMultiple","sortOrder","isEnabled","uiSettings","validationNode","resultProperty","getPropertyValue","valueObject","isViewableInList","precisionScale","roundingMode","STRING","restrictedValues","ENTITY_REFERENCE","definitionCode","definitionVersion","labelPropertyCode","valuePropertyCode","propertiesObjectToArray","fields","propObj","defaultValues","getDemPropertyDateFormat","defaultFormat","propertyFormat","correctFormat","getEntityStarterValue","reduce","result","getMultiplePropertyFillOptions","useExpression","push","getSinglePropertyFillOptions","ControlNumberInput","decimal","test","lastData","nativeEvent","isNaN","ControlSwitch","switchProps","Switch","ControlDate","isMatch","DatePicker","inputFormat","date","isValid","dateFnsFormat","ControlDateTime","DateTimePicker","mask","ampm","ControlTime","TimePicker","TablePagination$1","TablePagination","apiRef","useGridApiContext","useGridSelector","gridPageSelector","pageCount","gridPageCountSelector","rowCount","gridRowCountSelector","pageSize","gridPageSizeSelector","onPageChange","px","MuiTablePagination","count","rowsPerPage","rowsPerPageOptions","onRowsPerPageChange","setPageSize","parseInt","ActionsComponent","undefined","Pagination","TableColumnMenu$1","hideMenu","currentColumn","onUnsort","rest","GridColumnMenuContainer","GridFilterMenuItem","column","useTableQueryPagination$1","useTableQueryPagination","queryParams","setQueryParams","useSearchParams","get","has","set","newPage","onSizeChange","useTableQuerySorting$1","useTableQuerySorting","sortParams","getAll","param","split","onColumnHeaderClick","keyFound","sortValues","delete","sortValue","append","getSortedColumns","columns","columnSort","find","headerClassName","usePagination$1","initialPageSize","handlePageSizeChange","makeStyles","root","minHeight","maxHeight","textOverflow","wordBreak","gridGap","flexWrap","marginLeft","visibility","opacity","transform","Table","rows","disableMargin","pagination","onCellClick","classes","useStyles","usePagination","tableProps","sortingMode","paginationMode","onPageSizeChange","components","TableColumnMenu","mt","DataGrid","autoHeight","hideFooterPagination","hideFooter","disableSelectionOnClick","showColumnRightBorder","showCellRightBorder","className","TableAction","icon","showInMenu","location","arrow","cloneElement","GridActionsCellItem","nonce","onResize","onResizeCapture","useTablePagination$1","useTablePagination","searchParams","setSearchParams","newSize","useTableSorting$1","useTableSorting","onSortChanged","sortKey","getColumnSorting","TableInner","totalCount","onRowClick","verticalAlign","TableContainer","Backdrop","MuiTable","TableHead","TableRow","sortDirection","TableCell","align","TableSortLabel","active","hideSortIcon","direction","TableBody","row","hover","idx","renderCell","TableFooter","colSpan","background","py","borderBottom","SimpleTable","TableActionCell","actionsList","anchorEl","setAnchorEl","Boolean","stopPropagation","MoreHorizIcon","Menu","MenuListProps","PaperProps","minWidth","TabPanel","other","role","hidden","RouteTabs","tabs","URLSearchParams","search","Paper","Tabs","indicatorColor","textColor","newValue","pathname","tab","Tab","container","paddingBottom","fontWeight","wordWrap","InfoItem","json","roundingModes","localeCompare","BigDecimalPropertyFields$1","BigDecimalPropertyFields","propertyFieldName","_Fragment","Grid","HALF_UP","DateAdditionalFields","content","connector","stepper","padding","StepIcon","borderRadius","backgroundColor","marginTop","StepperView","Stepper","nonLinear","orientation","StepConnector","filter","Step","expanded","StepLabel","StepIconComponent","StepIconProps","completed","StepContent","EntityPropertiesShortView","stepperData","EntityPropertiesShortView$1","defaultPropertyValues","EntityAdditionalFields$1","EntityAdditionalFields","parentPropertyFieldName","entityDefinition","globalParameter","setValue","getValues","trigger","parentPropertyName","parametersModal","focusedProperty","setFocusedProperty","handleAddParameter","propertyIndex","handleSubmitClick","__awaiter","spacing","xs","activeStep","paddingLeft","handleStepperClick","cursor","wrap","overflowY","CreatePropertiesList","hideAddButton","parentFieldName","focusOnIndex","EntityReferencePropertyFields$1","EntityReferencePropertyFields","StringPropertyFields$1","StringPropertyFields","fieldName","handleDelete","handleAddValue","Chip","onDelete","onKeyDown","AddIcon","PropertyAdditionalFields","JsonEditor$1","JsonEditor","err","StringValueField$1","StringValueField","InputLabel","htmlFor","Select","labelId","restrictedValue","PropertyWidget","DefinitionFiller","dataFieldName","usePropertyFiller","multipleOptions","valueLabel","fillOptionLabel","fillOption","setFillOption","fillOptions","useStyles$3","inputLabel","PropertyFiller","register","selectedType","MultiplePropertyWidget$1","MultiplePropertyWidget","handleDeleteValue","p","ml","CloseIcon","MultiplePropertyFiller","PropertyValueField","fillerProperty","typeValue","NodesList$1","NodesList","listItem","remove","useFieldArray","ValidationNodeSelector","removeHandle","PropertyValidatorContext","createContext","StringTypeValidator","gutterBottom","NumericTypeValidator","validatorTypes","numericTypes","Set","NodeValidator$1","NodeValidator","useContext","renderValidator","nodeTypes","nodeComponent","AND","OR","NODE","NOT","DeleteIcon","ValidationNodeSelector$1","PropertyValidator","enable","setEnable","handleChangeEnable","CustomPropertyField$1","CustomPropertyField","useCustomFields$1","customPropertyFields","customCheckboxes","customFields","propertyTypes","propType","toLowerCase","CreatePropertyFormFields$1","CreatePropertyFormFields","useCustomFields","el","handlePropertyTypeChange","valueFieldName","Provider","executeValue","refs","scrollIntoView","behavior","block","handleRemoveParameter","sm","md","lg","Accordion","defaultExpanded","elevation","AccordionSummary","expandIcon","ExpandMore","AccordionDetails","AccordionActions","CreateDefinition","definitionFieldName","hideCodeField","hideVersionField","hideNameField","my","labels","ValueDisplay","formatDiplayValue","CheckCircleIcon","v","PropertyDataTable$1","PropertyDataTable","propertyData","memo","EntityPropertiesView","parentNames","hasProperties","hasProps","every","ViewProperty","setExpanded","ExpandMoreIcon","ViewPropertiesList","expandAll","propertiesList","PropertyValueComponent","defaultRender","border","DefinitionValueView","PropertyDataView$1","PropertyDataView","hasBackground","itemValue","palette","warning","main","cn","_status","propertyStepLabel","PropertyStep","parentKey","activePath","prefix","fullPropertyPath","path","PropertyStep$1","JsonPathPicker","onPaste","selectedPropertyPath","setSelectedPropertyPath","propEl","pathPrefix","toast","success","handlePaste","Drawer","styled","MuiDrawer","flexShrink","secondary","boxSizing","borderRight","Header","Toolbar","ListItemButton","MuiListItemButton","textAlign","boxShadow","List","MuiList","margin","ListItem","MuiListItem","ListItemIcon","MuiListItemIcon","fill","ListSubheader","MuiListSubheader","textTransform","SidebarLinkItem$1","SidebarLinkItem","route","isActive","link","disablePadding","RouterLink","query","classnames","ListItemText","primary","primaryTypographyProps","SidebarNestedItem","isListOpen","src","transition","SidebarLink","startsWith","Collapse","in","timeout","childRoute","SidebarLink$1","MenuIcon","alt","baseTheme","createTheme","dark","light","grey","typography","fontFamily","h1","h3","h4","inputThemeOptions$1","MuiButton","styleOverrides","MuiInputBase","default","input","MuiSelect","nativeInput","MuiTextField","MuiInputLabel","marginBottom","MuiOutlinedInput","notchedOutline","MuiAutocomplete","paper","listbox","MuiMenu","list","paddingTop","MuiPopover","MuiFormLabel","asterisk","tableThemeOptions$1","MuiTableContainer","MuiTableHead","MuiTableCell","head","body","MuiTableSortLabel","stepperThemeOptions$1","MuiStepIcon","typographyThemeOptions","MuiTypography","breakpoints","up","subtitle2","responsiveFontSizes","inputThemeOptions","tableThemeOptions","stepperThemeOptions","MuiToolbar","MuiAppBar","outlined","MuiDialog","backdropFilter","paperWidthXs","MuiDialogContent","MuiDialogActions","borderTop","MuiTabs","indicator","MuiTab","Sidebar","routes","defaultTheme","ThemeProvider","BrowserRouter","anchor","ContentLayout","toolbar","contentSx","flexGrow","Suspense","fallback","Outlet"],"mappings":"smIAEYA,IAAZ,SAAYA,GACVA,EAAA,OAAA,SACAA,EAAA,QAAA,UACAA,EAAA,YAAA,cACAA,EAAA,YAAA,cACAA,EAAA,MAAA,QACAA,EAAA,KAAA,OACAA,EAAA,OAAA,SACAA,EAAA,QAAA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