@evoke-platform/ui-components 1.0.0-dev.1.10.6
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/README.md +15 -0
- package/dist/published/components/Test/Test.d.ts +3 -0
- package/dist/published/components/Test/Test.js +8 -0
- package/dist/published/components/Test/Test.test.d.ts +1 -0
- package/dist/published/components/Test/Test.test.js +11 -0
- package/dist/published/components/Test/index.d.ts +3 -0
- package/dist/published/components/Test/index.js +3 -0
- package/dist/published/components/core/Accordion/Accordion.d.ts +4 -0
- package/dist/published/components/core/Accordion/Accordion.js +8 -0
- package/dist/published/components/core/Accordion/AccordionActions/AccordionActions.d.ts +4 -0
- package/dist/published/components/core/Accordion/AccordionActions/AccordionActions.js +8 -0
- package/dist/published/components/core/Accordion/AccordionActions/index.d.ts +2 -0
- package/dist/published/components/core/Accordion/AccordionActions/index.js +2 -0
- package/dist/published/components/core/Accordion/AccordionDetails/AccordionDetails.d.ts +4 -0
- package/dist/published/components/core/Accordion/AccordionDetails/AccordionDetails.js +8 -0
- package/dist/published/components/core/Accordion/AccordionDetails/index.d.ts +2 -0
- package/dist/published/components/core/Accordion/AccordionDetails/index.js +2 -0
- package/dist/published/components/core/Accordion/AccordionSummary/AccordionSummary.d.ts +4 -0
- package/dist/published/components/core/Accordion/AccordionSummary/AccordionSummary.js +8 -0
- package/dist/published/components/core/Accordion/AccordionSummary/index.d.ts +2 -0
- package/dist/published/components/core/Accordion/AccordionSummary/index.js +2 -0
- package/dist/published/components/core/Accordion/index.d.ts +5 -0
- package/dist/published/components/core/Accordion/index.js +5 -0
- package/dist/published/components/core/Alert/Alert.d.ts +4 -0
- package/dist/published/components/core/Alert/Alert.js +8 -0
- package/dist/published/components/core/Alert/index.d.ts +2 -0
- package/dist/published/components/core/Alert/index.js +2 -0
- package/dist/published/components/core/AppBar/AppBar.d.ts +4 -0
- package/dist/published/components/core/AppBar/AppBar.js +8 -0
- package/dist/published/components/core/AppBar/index.d.ts +2 -0
- package/dist/published/components/core/AppBar/index.js +2 -0
- package/dist/published/components/core/Autocomplete/Autocomplete.d.ts +19 -0
- package/dist/published/components/core/Autocomplete/Autocomplete.js +48 -0
- package/dist/published/components/core/Autocomplete/index.d.ts +3 -0
- package/dist/published/components/core/Autocomplete/index.js +3 -0
- package/dist/published/components/core/Avatar/Avatar.d.ts +8 -0
- package/dist/published/components/core/Avatar/Avatar.js +12 -0
- package/dist/published/components/core/Avatar/index.d.ts +3 -0
- package/dist/published/components/core/Avatar/index.js +3 -0
- package/dist/published/components/core/Backdrop/Backdrop.d.ts +4 -0
- package/dist/published/components/core/Backdrop/Backdrop.js +8 -0
- package/dist/published/components/core/Backdrop/index.d.ts +3 -0
- package/dist/published/components/core/Backdrop/index.js +3 -0
- package/dist/published/components/core/Badge/Badge.d.ts +4 -0
- package/dist/published/components/core/Badge/Badge.js +8 -0
- package/dist/published/components/core/Badge/index.d.ts +3 -0
- package/dist/published/components/core/Badge/index.js +3 -0
- package/dist/published/components/core/Breadcrumbs/Breadcrumbs.d.ts +4 -0
- package/dist/published/components/core/Breadcrumbs/Breadcrumbs.js +8 -0
- package/dist/published/components/core/Breadcrumbs/index.d.ts +3 -0
- package/dist/published/components/core/Breadcrumbs/index.js +3 -0
- package/dist/published/components/core/Button/Button.d.ts +4 -0
- package/dist/published/components/core/Button/Button.js +8 -0
- package/dist/published/components/core/Button/index.d.ts +3 -0
- package/dist/published/components/core/Button/index.js +3 -0
- package/dist/published/components/core/ButtonGroup/ButtonGroup.d.ts +4 -0
- package/dist/published/components/core/ButtonGroup/ButtonGroup.js +8 -0
- package/dist/published/components/core/ButtonGroup/index.d.ts +3 -0
- package/dist/published/components/core/ButtonGroup/index.js +3 -0
- package/dist/published/components/core/Card/Card.d.ts +4 -0
- package/dist/published/components/core/Card/Card.js +8 -0
- package/dist/published/components/core/Card/index.d.ts +3 -0
- package/dist/published/components/core/Card/index.js +3 -0
- package/dist/published/components/core/Checkbox/Checkbox.d.ts +4 -0
- package/dist/published/components/core/Checkbox/Checkbox.js +8 -0
- package/dist/published/components/core/Checkbox/index.d.ts +3 -0
- package/dist/published/components/core/Checkbox/index.js +3 -0
- package/dist/published/components/core/Chip/Chip.d.ts +4 -0
- package/dist/published/components/core/Chip/Chip.js +8 -0
- package/dist/published/components/core/Chip/index.d.ts +3 -0
- package/dist/published/components/core/Chip/index.js +3 -0
- package/dist/published/components/core/CircularProgress/CircularProgress.d.ts +4 -0
- package/dist/published/components/core/CircularProgress/CircularProgress.js +8 -0
- package/dist/published/components/core/CircularProgress/index.d.ts +3 -0
- package/dist/published/components/core/CircularProgress/index.js +3 -0
- package/dist/published/components/core/Collapse/Collapse.d.ts +4 -0
- package/dist/published/components/core/Collapse/Collapse.js +8 -0
- package/dist/published/components/core/Collapse/index.d.ts +3 -0
- package/dist/published/components/core/Collapse/index.js +3 -0
- package/dist/published/components/core/DatePicker/DatePicker.d.ts +8 -0
- package/dist/published/components/core/DatePicker/DatePicker.js +41 -0
- package/dist/published/components/core/DatePicker/index.d.ts +2 -0
- package/dist/published/components/core/DatePicker/index.js +2 -0
- package/dist/published/components/core/Dialog/Dialog.d.ts +4 -0
- package/dist/published/components/core/Dialog/Dialog.js +8 -0
- package/dist/published/components/core/Dialog/DialogActions/DialogActions.d.ts +12 -0
- package/dist/published/components/core/Dialog/DialogActions/DialogActions.js +38 -0
- package/dist/published/components/core/Dialog/DialogActions/index.d.ts +2 -0
- package/dist/published/components/core/Dialog/DialogActions/index.js +2 -0
- package/dist/published/components/core/Dialog/DialogContent/DialogContent.d.ts +4 -0
- package/dist/published/components/core/Dialog/DialogContent/DialogContent.js +8 -0
- package/dist/published/components/core/Dialog/DialogContent/index.d.ts +2 -0
- package/dist/published/components/core/Dialog/DialogContent/index.js +2 -0
- package/dist/published/components/core/Dialog/DialogContentText/DialogContentText.d.ts +4 -0
- package/dist/published/components/core/Dialog/DialogContentText/DialogContentText.js +8 -0
- package/dist/published/components/core/Dialog/DialogContentText/index.d.ts +2 -0
- package/dist/published/components/core/Dialog/DialogContentText/index.js +2 -0
- package/dist/published/components/core/Dialog/DialogTitle/DialogTitle.d.ts +4 -0
- package/dist/published/components/core/Dialog/DialogTitle/DialogTitle.js +8 -0
- package/dist/published/components/core/Dialog/DialogTitle/index.d.ts +2 -0
- package/dist/published/components/core/Dialog/DialogTitle/index.js +2 -0
- package/dist/published/components/core/Dialog/index.d.ts +6 -0
- package/dist/published/components/core/Dialog/index.js +6 -0
- package/dist/published/components/core/Divider/Divider.d.ts +4 -0
- package/dist/published/components/core/Divider/Divider.js +8 -0
- package/dist/published/components/core/Divider/index.d.ts +3 -0
- package/dist/published/components/core/Divider/index.js +3 -0
- package/dist/published/components/core/Drawer/Drawer.d.ts +4 -0
- package/dist/published/components/core/Drawer/Drawer.js +8 -0
- package/dist/published/components/core/Drawer/index.d.ts +3 -0
- package/dist/published/components/core/Drawer/index.js +3 -0
- package/dist/published/components/core/FieldError/FieldError.d.ts +7 -0
- package/dist/published/components/core/FieldError/FieldError.js +11 -0
- package/dist/published/components/core/FieldError/index.d.ts +3 -0
- package/dist/published/components/core/FieldError/index.js +3 -0
- package/dist/published/components/core/FormElements/FormControl/FormControl.d.ts +4 -0
- package/dist/published/components/core/FormElements/FormControl/FormControl.js +8 -0
- package/dist/published/components/core/FormElements/FormControl/index.d.ts +2 -0
- package/dist/published/components/core/FormElements/FormControl/index.js +2 -0
- package/dist/published/components/core/FormElements/FormControlLabel/FormControlLabel.d.ts +4 -0
- package/dist/published/components/core/FormElements/FormControlLabel/FormControlLabel.js +8 -0
- package/dist/published/components/core/FormElements/FormControlLabel/index.d.ts +2 -0
- package/dist/published/components/core/FormElements/FormControlLabel/index.js +2 -0
- package/dist/published/components/core/FormElements/FormGroup/FormGroup.d.ts +4 -0
- package/dist/published/components/core/FormElements/FormGroup/FormGroup.js +8 -0
- package/dist/published/components/core/FormElements/FormGroup/index.d.ts +2 -0
- package/dist/published/components/core/FormElements/FormGroup/index.js +2 -0
- package/dist/published/components/core/FormElements/FormHelperText/FormHelperText.d.ts +4 -0
- package/dist/published/components/core/FormElements/FormHelperText/FormHelperText.js +8 -0
- package/dist/published/components/core/FormElements/FormHelperText/index.d.ts +2 -0
- package/dist/published/components/core/FormElements/FormHelperText/index.js +2 -0
- package/dist/published/components/core/FormElements/FormLabel/FormLabel.d.ts +4 -0
- package/dist/published/components/core/FormElements/FormLabel/FormLabel.js +8 -0
- package/dist/published/components/core/FormElements/FormLabel/index.d.ts +2 -0
- package/dist/published/components/core/FormElements/FormLabel/index.js +2 -0
- package/dist/published/components/core/FormElements/index.d.ts +6 -0
- package/dist/published/components/core/FormElements/index.js +6 -0
- package/dist/published/components/core/IconButton/IconButton.d.ts +4 -0
- package/dist/published/components/core/IconButton/IconButton.js +8 -0
- package/dist/published/components/core/IconButton/index.d.ts +3 -0
- package/dist/published/components/core/IconButton/index.js +3 -0
- package/dist/published/components/core/LinearProgress/LinearProgress.d.ts +4 -0
- package/dist/published/components/core/LinearProgress/LinearProgress.js +8 -0
- package/dist/published/components/core/LinearProgress/index.d.ts +3 -0
- package/dist/published/components/core/LinearProgress/index.js +3 -0
- package/dist/published/components/core/Link/Link.d.ts +4 -0
- package/dist/published/components/core/Link/Link.js +8 -0
- package/dist/published/components/core/Link/index.d.ts +3 -0
- package/dist/published/components/core/Link/index.js +3 -0
- package/dist/published/components/core/List/List.d.ts +4 -0
- package/dist/published/components/core/List/List.js +8 -0
- package/dist/published/components/core/List/ListItemText/ListItemText.d.ts +4 -0
- package/dist/published/components/core/List/ListItemText/ListItemText.js +8 -0
- package/dist/published/components/core/List/ListItemText/index.d.ts +3 -0
- package/dist/published/components/core/List/ListItemText/index.js +3 -0
- package/dist/published/components/core/List/index.d.ts +3 -0
- package/dist/published/components/core/List/index.js +3 -0
- package/dist/published/components/core/LocalizationProvider/LocalizationProvider.d.ts +5 -0
- package/dist/published/components/core/LocalizationProvider/LocalizationProvider.js +115 -0
- package/dist/published/components/core/LocalizationProvider/index.d.ts +2 -0
- package/dist/published/components/core/LocalizationProvider/index.js +2 -0
- package/dist/published/components/core/Menu/Menu.d.ts +4 -0
- package/dist/published/components/core/Menu/Menu.js +8 -0
- package/dist/published/components/core/Menu/MenuItem/MenuItem.d.ts +4 -0
- package/dist/published/components/core/Menu/MenuItem/MenuItem.js +8 -0
- package/dist/published/components/core/Menu/MenuItem/index.d.ts +3 -0
- package/dist/published/components/core/Menu/MenuItem/index.js +3 -0
- package/dist/published/components/core/Menu/index.d.ts +4 -0
- package/dist/published/components/core/Menu/index.js +4 -0
- package/dist/published/components/core/Paper/Paper.d.ts +4 -0
- package/dist/published/components/core/Paper/Paper.js +8 -0
- package/dist/published/components/core/Paper/index.d.ts +3 -0
- package/dist/published/components/core/Paper/index.js +3 -0
- package/dist/published/components/core/Popover/Popover.d.ts +4 -0
- package/dist/published/components/core/Popover/Popover.js +8 -0
- package/dist/published/components/core/Popover/index.d.ts +3 -0
- package/dist/published/components/core/Popover/index.js +3 -0
- package/dist/published/components/core/RadioGroup/Radio.d.ts +4 -0
- package/dist/published/components/core/RadioGroup/Radio.js +8 -0
- package/dist/published/components/core/RadioGroup/RadioGroup.d.ts +4 -0
- package/dist/published/components/core/RadioGroup/RadioGroup.js +8 -0
- package/dist/published/components/core/RadioGroup/index.d.ts +4 -0
- package/dist/published/components/core/RadioGroup/index.js +4 -0
- package/dist/published/components/core/Select/Select.d.ts +5 -0
- package/dist/published/components/core/Select/Select.js +10 -0
- package/dist/published/components/core/Select/index.d.ts +3 -0
- package/dist/published/components/core/Select/index.js +3 -0
- package/dist/published/components/core/Skeleton/Skeleton.d.ts +4 -0
- package/dist/published/components/core/Skeleton/Skeleton.js +8 -0
- package/dist/published/components/core/Skeleton/index.d.ts +3 -0
- package/dist/published/components/core/Skeleton/index.js +3 -0
- package/dist/published/components/core/Snackbar/Snackbar.d.ts +8 -0
- package/dist/published/components/core/Snackbar/Snackbar.js +40 -0
- package/dist/published/components/core/Snackbar/index.d.ts +3 -0
- package/dist/published/components/core/Snackbar/index.js +3 -0
- package/dist/published/components/core/StaticDatePicker/StaticDatePicker.d.ts +8 -0
- package/dist/published/components/core/StaticDatePicker/StaticDatePicker.js +41 -0
- package/dist/published/components/core/StaticDatePicker/index.d.ts +2 -0
- package/dist/published/components/core/StaticDatePicker/index.js +2 -0
- package/dist/published/components/core/Stepper/Step/Step.d.ts +4 -0
- package/dist/published/components/core/Stepper/Step/Step.js +8 -0
- package/dist/published/components/core/Stepper/Step/index.d.ts +2 -0
- package/dist/published/components/core/Stepper/Step/index.js +2 -0
- package/dist/published/components/core/Stepper/StepButton/StepButton.d.ts +4 -0
- package/dist/published/components/core/Stepper/StepButton/StepButton.js +8 -0
- package/dist/published/components/core/Stepper/StepButton/index.d.ts +2 -0
- package/dist/published/components/core/Stepper/StepButton/index.js +2 -0
- package/dist/published/components/core/Stepper/StepConnector/StepConnector.d.ts +4 -0
- package/dist/published/components/core/Stepper/StepConnector/StepConnector.js +8 -0
- package/dist/published/components/core/Stepper/StepConnector/index.d.ts +2 -0
- package/dist/published/components/core/Stepper/StepConnector/index.js +2 -0
- package/dist/published/components/core/Stepper/StepContent/StepContent.d.ts +4 -0
- package/dist/published/components/core/Stepper/StepContent/StepContent.js +8 -0
- package/dist/published/components/core/Stepper/StepContent/index.d.ts +2 -0
- package/dist/published/components/core/Stepper/StepContent/index.js +2 -0
- package/dist/published/components/core/Stepper/StepIcon/StepIcon.d.ts +4 -0
- package/dist/published/components/core/Stepper/StepIcon/StepIcon.js +8 -0
- package/dist/published/components/core/Stepper/StepIcon/index.d.ts +2 -0
- package/dist/published/components/core/Stepper/StepIcon/index.js +2 -0
- package/dist/published/components/core/Stepper/StepLabel/StepLabel.d.ts +4 -0
- package/dist/published/components/core/Stepper/StepLabel/StepLabel.js +8 -0
- package/dist/published/components/core/Stepper/StepLabel/index.d.ts +2 -0
- package/dist/published/components/core/Stepper/StepLabel/index.js +2 -0
- package/dist/published/components/core/Stepper/Stepper.d.ts +4 -0
- package/dist/published/components/core/Stepper/Stepper.js +8 -0
- package/dist/published/components/core/Stepper/index.d.ts +8 -0
- package/dist/published/components/core/Stepper/index.js +8 -0
- package/dist/published/components/core/Switch/Switch.d.ts +4 -0
- package/dist/published/components/core/Switch/Switch.js +8 -0
- package/dist/published/components/core/Switch/index.d.ts +3 -0
- package/dist/published/components/core/Switch/index.js +3 -0
- package/dist/published/components/core/Table/Table.d.ts +4 -0
- package/dist/published/components/core/Table/Table.js +8 -0
- package/dist/published/components/core/Table/index.d.ts +3 -0
- package/dist/published/components/core/Table/index.js +3 -0
- package/dist/published/components/core/Tabs/Tab/Tab.d.ts +4 -0
- package/dist/published/components/core/Tabs/Tab/Tab.js +8 -0
- package/dist/published/components/core/Tabs/Tab/index.d.ts +2 -0
- package/dist/published/components/core/Tabs/Tab/index.js +2 -0
- package/dist/published/components/core/Tabs/Tabs.d.ts +4 -0
- package/dist/published/components/core/Tabs/Tabs.js +8 -0
- package/dist/published/components/core/Tabs/index.d.ts +3 -0
- package/dist/published/components/core/Tabs/index.js +3 -0
- package/dist/published/components/core/TextField/TextField.d.ts +10 -0
- package/dist/published/components/core/TextField/TextField.js +36 -0
- package/dist/published/components/core/TextField/TextField.test.d.ts +1 -0
- package/dist/published/components/core/TextField/TextField.test.js +20 -0
- package/dist/published/components/core/TextField/index.d.ts +3 -0
- package/dist/published/components/core/TextField/index.js +3 -0
- package/dist/published/components/core/ToggleButton/ToggleButton.d.ts +4 -0
- package/dist/published/components/core/ToggleButton/ToggleButton.js +8 -0
- package/dist/published/components/core/ToggleButton/index.d.ts +3 -0
- package/dist/published/components/core/ToggleButton/index.js +3 -0
- package/dist/published/components/core/ToggleButtonGroup/ToggleButtonGroup.d.ts +4 -0
- package/dist/published/components/core/ToggleButtonGroup/ToggleButtonGroup.js +8 -0
- package/dist/published/components/core/ToggleButtonGroup/index.d.ts +3 -0
- package/dist/published/components/core/ToggleButtonGroup/index.js +3 -0
- package/dist/published/components/core/Tooltip/Tooltip.d.ts +4 -0
- package/dist/published/components/core/Tooltip/Tooltip.js +8 -0
- package/dist/published/components/core/Tooltip/index.d.ts +3 -0
- package/dist/published/components/core/Tooltip/index.js +3 -0
- package/dist/published/components/core/Typography/index.d.ts +4 -0
- package/dist/published/components/core/Typography/index.js +9 -0
- package/dist/published/components/core/index.d.ts +45 -0
- package/dist/published/components/core/index.js +46 -0
- package/dist/published/components/custom/CriteriaBuilder/CriteriaBuilder.d.ts +27 -0
- package/dist/published/components/custom/CriteriaBuilder/CriteriaBuilder.js +232 -0
- package/dist/published/components/custom/CriteriaBuilder/index.d.ts +3 -0
- package/dist/published/components/custom/CriteriaBuilder/index.js +3 -0
- package/dist/published/components/custom/FormField/BooleanSelect/BooleanSelect.d.ts +4 -0
- package/dist/published/components/custom/FormField/BooleanSelect/BooleanSelect.js +27 -0
- package/dist/published/components/custom/FormField/BooleanSelect/index.d.ts +1 -0
- package/dist/published/components/custom/FormField/BooleanSelect/index.js +1 -0
- package/dist/published/components/custom/FormField/DatePickerSelect/DatePickerSelect.d.ts +4 -0
- package/dist/published/components/custom/FormField/DatePickerSelect/DatePickerSelect.js +42 -0
- package/dist/published/components/custom/FormField/DatePickerSelect/index.d.ts +1 -0
- package/dist/published/components/custom/FormField/DatePickerSelect/index.js +1 -0
- package/dist/published/components/custom/FormField/FileUpload/FileUpload.d.ts +4 -0
- package/dist/published/components/custom/FormField/FileUpload/FileUpload.js +65 -0
- package/dist/published/components/custom/FormField/FileUpload/index.d.ts +1 -0
- package/dist/published/components/custom/FormField/FileUpload/index.js +1 -0
- package/dist/published/components/custom/FormField/FormField.d.ts +24 -0
- package/dist/published/components/custom/FormField/FormField.js +45 -0
- package/dist/published/components/custom/FormField/InputFieldComponent/InputFieldComponent.d.ts +4 -0
- package/dist/published/components/custom/FormField/InputFieldComponent/InputFieldComponent.js +76 -0
- package/dist/published/components/custom/FormField/InputFieldComponent/index.d.ts +1 -0
- package/dist/published/components/custom/FormField/InputFieldComponent/index.js +1 -0
- package/dist/published/components/custom/FormField/Select/Select.d.ts +4 -0
- package/dist/published/components/custom/FormField/Select/Select.js +32 -0
- package/dist/published/components/custom/FormField/Select/index.d.ts +1 -0
- package/dist/published/components/custom/FormField/Select/index.js +1 -0
- package/dist/published/components/custom/FormField/index.d.ts +3 -0
- package/dist/published/components/custom/FormField/index.js +3 -0
- package/dist/published/components/custom/Menubar/Menubar.d.ts +12 -0
- package/dist/published/components/custom/Menubar/Menubar.js +25 -0
- package/dist/published/components/custom/Menubar/Menubar.test.d.ts +1 -0
- package/dist/published/components/custom/Menubar/Menubar.test.js +12 -0
- package/dist/published/components/custom/Menubar/index.d.ts +3 -0
- package/dist/published/components/custom/Menubar/index.js +3 -0
- package/dist/published/components/custom/MultiSelect/MultiSelect.d.ts +14 -0
- package/dist/published/components/custom/MultiSelect/MultiSelect.js +144 -0
- package/dist/published/components/custom/MultiSelect/SortableItem.d.ts +2 -0
- package/dist/published/components/custom/MultiSelect/SortableItem.js +13 -0
- package/dist/published/components/custom/MultiSelect/index.d.ts +3 -0
- package/dist/published/components/custom/MultiSelect/index.js +3 -0
- package/dist/published/components/custom/RepeatableField/RepeatableField.d.ts +15 -0
- package/dist/published/components/custom/RepeatableField/RepeatableField.js +111 -0
- package/dist/published/components/custom/RepeatableField/index.d.ts +3 -0
- package/dist/published/components/custom/RepeatableField/index.js +3 -0
- package/dist/published/components/custom/index.d.ts +5 -0
- package/dist/published/components/custom/index.js +5 -0
- package/dist/published/components/layout/Box/Box.d.ts +8 -0
- package/dist/published/components/layout/Box/Box.js +8 -0
- package/dist/published/components/layout/Box/index.d.ts +3 -0
- package/dist/published/components/layout/Box/index.js +3 -0
- package/dist/published/components/layout/Container/Container.d.ts +4 -0
- package/dist/published/components/layout/Container/Container.js +8 -0
- package/dist/published/components/layout/Container/index.d.ts +3 -0
- package/dist/published/components/layout/Container/index.js +3 -0
- package/dist/published/components/layout/Grid/Grid.d.ts +4 -0
- package/dist/published/components/layout/Grid/Grid.js +8 -0
- package/dist/published/components/layout/Grid/index.d.ts +3 -0
- package/dist/published/components/layout/Grid/index.js +3 -0
- package/dist/published/components/layout/Stack/Stack.d.ts +4 -0
- package/dist/published/components/layout/Stack/Stack.js +8 -0
- package/dist/published/components/layout/Stack/index.d.ts +3 -0
- package/dist/published/components/layout/Stack/index.js +3 -0
- package/dist/published/components/layout/index.d.ts +4 -0
- package/dist/published/components/layout/index.js +4 -0
- package/dist/published/icons/index.d.ts +1 -0
- package/dist/published/icons/index.js +1 -0
- package/dist/published/index.d.ts +6 -0
- package/dist/published/index.js +6 -0
- package/dist/published/stories/Accordion.stories.d.ts +5 -0
- package/dist/published/stories/Accordion.stories.js +21 -0
- package/dist/published/stories/Alert.stories.d.ts +5 -0
- package/dist/published/stories/Alert.stories.js +8 -0
- package/dist/published/stories/Appbar.stories.d.ts +5 -0
- package/dist/published/stories/Appbar.stories.js +15 -0
- package/dist/published/stories/Autocomplete.stories.d.ts +23 -0
- package/dist/published/stories/Autocomplete.stories.js +413 -0
- package/dist/published/stories/Avatar.stories.d.ts +39 -0
- package/dist/published/stories/Avatar.stories.js +8 -0
- package/dist/published/stories/Backdrop.stories.d.ts +5 -0
- package/dist/published/stories/Backdrop.stories.js +20 -0
- package/dist/published/stories/Badge.stories.d.ts +5 -0
- package/dist/published/stories/Badge.stories.js +10 -0
- package/dist/published/stories/Box.stories.d.ts +25 -0
- package/dist/published/stories/Box.stories.js +18 -0
- package/dist/published/stories/Breadcrumbs.stories.d.ts +5 -0
- package/dist/published/stories/Breadcrumbs.stories.js +11 -0
- package/dist/published/stories/Button.stories.d.ts +5 -0
- package/dist/published/stories/Button.stories.js +8 -0
- package/dist/published/stories/ButtonGroup.stories.d.ts +5 -0
- package/dist/published/stories/ButtonGroup.stories.js +11 -0
- package/dist/published/stories/Card.stories.d.ts +5 -0
- package/dist/published/stories/Card.stories.js +15 -0
- package/dist/published/stories/Checkbox.stories.d.ts +5 -0
- package/dist/published/stories/Checkbox.stories.js +8 -0
- package/dist/published/stories/Chip.stories.d.ts +5 -0
- package/dist/published/stories/Chip.stories.js +8 -0
- package/dist/published/stories/CircularProgress.stories.d.ts +5 -0
- package/dist/published/stories/CircularProgress.stories.js +8 -0
- package/dist/published/stories/Collapse.stories.d.ts +5 -0
- package/dist/published/stories/Collapse.stories.js +26 -0
- package/dist/published/stories/Container.stories.d.ts +5 -0
- package/dist/published/stories/Container.stories.js +12 -0
- package/dist/published/stories/CriteriaBuilder.stories.d.ts +21 -0
- package/dist/published/stories/CriteriaBuilder.stories.js +206 -0
- package/dist/published/stories/DatePicker.stories.d.ts +6 -0
- package/dist/published/stories/DatePicker.stories.js +35 -0
- package/dist/published/stories/Dialog.stories.d.ts +5 -0
- package/dist/published/stories/Dialog.stories.js +24 -0
- package/dist/published/stories/Divider.stories.d.ts +5 -0
- package/dist/published/stories/Divider.stories.js +8 -0
- package/dist/published/stories/Drawer.stories.d.ts +5 -0
- package/dist/published/stories/Drawer.stories.js +27 -0
- package/dist/published/stories/FormControl.stories.d.ts +5 -0
- package/dist/published/stories/FormControl.stories.js +14 -0
- package/dist/published/stories/FormControlLabel.stories.d.ts +5 -0
- package/dist/published/stories/FormControlLabel.stories.js +8 -0
- package/dist/published/stories/FormField.stories.d.ts +9 -0
- package/dist/published/stories/FormField.stories.js +128 -0
- package/dist/published/stories/FormGroup.stories.d.ts +5 -0
- package/dist/published/stories/FormGroup.stories.js +10 -0
- package/dist/published/stories/FormHelperText.stories.d.ts +5 -0
- package/dist/published/stories/FormHelperText.stories.js +10 -0
- package/dist/published/stories/FormLabel.stories.d.ts +5 -0
- package/dist/published/stories/FormLabel.stories.js +13 -0
- package/dist/published/stories/Grid.stories.d.ts +5 -0
- package/dist/published/stories/Grid.stories.js +8 -0
- package/dist/published/stories/IconButton.stories.d.ts +5 -0
- package/dist/published/stories/IconButton.stories.js +17 -0
- package/dist/published/stories/LinearProgress.stories.d.ts +5 -0
- package/dist/published/stories/LinearProgress.stories.js +8 -0
- package/dist/published/stories/Link.stories.d.ts +5 -0
- package/dist/published/stories/Link.stories.js +16 -0
- package/dist/published/stories/List.stories.d.ts +5 -0
- package/dist/published/stories/List.stories.js +31 -0
- package/dist/published/stories/Menu.stories.d.ts +5 -0
- package/dist/published/stories/Menu.stories.js +25 -0
- package/dist/published/stories/MenuBar.stories.d.ts +5 -0
- package/dist/published/stories/MenuBar.stories.js +24 -0
- package/dist/published/stories/MultiSelect.stories.d.ts +5 -0
- package/dist/published/stories/MultiSelect.stories.js +26 -0
- package/dist/published/stories/Palette.stories.d.ts +25 -0
- package/dist/published/stories/Palette.stories.js +89 -0
- package/dist/published/stories/Paper.stories.d.ts +5 -0
- package/dist/published/stories/Paper.stories.js +15 -0
- package/dist/published/stories/RadioGroup.stories.d.ts +5 -0
- package/dist/published/stories/RadioGroup.stories.js +13 -0
- package/dist/published/stories/RepeatableField.stories.d.ts +5 -0
- package/dist/published/stories/RepeatableField.stories.js +36 -0
- package/dist/published/stories/Skeleton.stories.d.ts +5 -0
- package/dist/published/stories/Skeleton.stories.js +8 -0
- package/dist/published/stories/Snackbar.stories.d.ts +5 -0
- package/dist/published/stories/Snackbar.stories.js +22 -0
- package/dist/published/stories/Stack.stories.d.ts +5 -0
- package/dist/published/stories/Stack.stories.js +40 -0
- package/dist/published/stories/StaticDatePicker.stories.d.ts +7 -0
- package/dist/published/stories/StaticDatePicker.stories.js +42 -0
- package/dist/published/stories/Stepper.stories.d.ts +9 -0
- package/dist/published/stories/Stepper.stories.js +72 -0
- package/dist/published/stories/Switch.stories.d.ts +5 -0
- package/dist/published/stories/Switch.stories.js +8 -0
- package/dist/published/stories/Table.stories.d.ts +5 -0
- package/dist/published/stories/Table.stories.js +51 -0
- package/dist/published/stories/Tabs.stories.d.ts +5 -0
- package/dist/published/stories/Tabs.stories.js +45 -0
- package/dist/published/stories/TextField.stories.d.ts +21 -0
- package/dist/published/stories/TextField.stories.js +80 -0
- package/dist/published/stories/TimePicker.stories.d.ts +9 -0
- package/dist/published/stories/TimePicker.stories.js +34 -0
- package/dist/published/stories/ToggleButton.stories.d.ts +5 -0
- package/dist/published/stories/ToggleButton.stories.js +23 -0
- package/dist/published/stories/Typogrpahy.stories.d.ts +5 -0
- package/dist/published/stories/Typogrpahy.stories.js +21 -0
- package/dist/published/theme/UIThemeProvider.d.ts +7 -0
- package/dist/published/theme/UIThemeProvider.js +10 -0
- package/dist/published/theme/defaultTheme.d.ts +1 -0
- package/dist/published/theme/defaultTheme.js +104 -0
- package/dist/published/theme/index.d.ts +2 -0
- package/dist/published/theme/index.js +2 -0
- package/dist/published/util/date.d.ts +23 -0
- package/dist/published/util/date.js +47 -0
- package/dist/published/util/index.d.ts +1 -0
- package/dist/published/util/index.js +1 -0
- package/icons.ts +1 -0
- package/package.json +85 -0
@@ -0,0 +1,232 @@
|
|
1
|
+
import { QueryBuilderMaterial } from '@react-querybuilder/material';
|
2
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
3
|
+
import { formatQuery, parseMongoDB, QueryBuilder, } from 'react-querybuilder';
|
4
|
+
import 'react-querybuilder/dist/query-builder.css';
|
5
|
+
import { RemoveCircleOutline } from '../../../icons';
|
6
|
+
import { Autocomplete, Button, DatePicker, IconButton, LocalizationProvider, MenuItem, TextField, Typography, } from '../../core';
|
7
|
+
import { Box } from '../../layout';
|
8
|
+
const customSelector = (props) => {
|
9
|
+
var _a, _b;
|
10
|
+
const { options, value, handleOnChange, title } = props;
|
11
|
+
let width = '90px';
|
12
|
+
let val = value;
|
13
|
+
let opts = options;
|
14
|
+
switch (title) {
|
15
|
+
case 'Operators':
|
16
|
+
width = '20%';
|
17
|
+
if (((_a = props.fieldData) === null || _a === void 0 ? void 0 : _a.inputType) === 'array') {
|
18
|
+
opts = options
|
19
|
+
.filter((option) => ['null', 'notNull', 'in', 'notIn'].includes(option.name))
|
20
|
+
.map((option) => ({ name: option.name, label: option.label }));
|
21
|
+
val = val === '=' ? '' : options.find((option) => option.name === val).name;
|
22
|
+
}
|
23
|
+
break;
|
24
|
+
case 'Fields':
|
25
|
+
width = '33%';
|
26
|
+
val = (_b = options.find((option) => option.name === val)) === null || _b === void 0 ? void 0 : _b.name;
|
27
|
+
break;
|
28
|
+
}
|
29
|
+
return (React.createElement(Autocomplete, { options: opts, value: val, getOptionLabel: (option) => {
|
30
|
+
var _a;
|
31
|
+
if (typeof option === 'string') {
|
32
|
+
return ((_a = opts.find((o) => option === o.name)) === null || _a === void 0 ? void 0 : _a.label) || '';
|
33
|
+
}
|
34
|
+
return option.label;
|
35
|
+
}, isOptionEqualToValue: (option, value) => {
|
36
|
+
return option === value;
|
37
|
+
}, onChange: (event, newValue) => {
|
38
|
+
handleOnChange(newValue === null || newValue === void 0 ? void 0 : newValue.value.name);
|
39
|
+
}, renderInput: (params) => React.createElement(TextField, Object.assign({}, params, { size: "small" })), style: { width: width }, disableClearable: true }));
|
40
|
+
};
|
41
|
+
const customCombinator = (props) => {
|
42
|
+
const { options, value, handleOnChange } = props;
|
43
|
+
return (React.createElement(Autocomplete, { options: options, value: value === null || value === void 0 ? void 0 : value.toUpperCase(), isOptionEqualToValue: (option, value) => {
|
44
|
+
return option === value;
|
45
|
+
}, onChange: (event, newValue) => {
|
46
|
+
handleOnChange(newValue === null || newValue === void 0 ? void 0 : newValue.value.name);
|
47
|
+
}, size: 'small', renderInput: (params) => React.createElement(TextField, Object.assign({}, params, { size: "small" })), sx: {
|
48
|
+
width: '90px',
|
49
|
+
backgroundColor: '#eee',
|
50
|
+
borderRadius: '8px',
|
51
|
+
'.MuiInputBase-input': {
|
52
|
+
fontWeight: 550,
|
53
|
+
fontSize: '14px',
|
54
|
+
},
|
55
|
+
}, disableClearable: true }));
|
56
|
+
};
|
57
|
+
const customButton = (props) => {
|
58
|
+
const { title, handleOnClick, label } = props;
|
59
|
+
let buttonLabel = label;
|
60
|
+
switch (title) {
|
61
|
+
case 'Add group':
|
62
|
+
buttonLabel = '+ Condition Group';
|
63
|
+
break;
|
64
|
+
case 'Add rule':
|
65
|
+
buttonLabel = '+ Condition';
|
66
|
+
break;
|
67
|
+
}
|
68
|
+
return (React.createElement(Button, { variant: "contained", onClick: handleOnClick, size: "small", style: { backgroundColor: '#ebf4f8', color: '#0678a9', boxShadow: 'none' } }, buttonLabel));
|
69
|
+
};
|
70
|
+
const customDelete = (props) => {
|
71
|
+
const { handleOnClick } = props;
|
72
|
+
return (React.createElement(IconButton, { onClick: handleOnClick, size: "small" },
|
73
|
+
React.createElement(RemoveCircleOutline, null)));
|
74
|
+
};
|
75
|
+
export const customValueEditorWithPresets = (props) => {
|
76
|
+
const { handleOnChange, value } = props;
|
77
|
+
const valueEditor = (React.createElement(Autocomplete, { freeSolo: true, value: ['null', 'notNull'].includes(props.operator) ? '' : value, onChange: (event, newValue) => {
|
78
|
+
var _a;
|
79
|
+
handleOnChange((_a = newValue === null || newValue === void 0 ? void 0 : newValue.value.name) !== null && _a !== void 0 ? _a : '');
|
80
|
+
}, options: [
|
81
|
+
{
|
82
|
+
label: 'User ID',
|
83
|
+
value: { name: '{{user.id}}', label: 'UserId', sublabel: 'Currently logged in user' },
|
84
|
+
},
|
85
|
+
], isOptionEqualToValue: (option, value) => {
|
86
|
+
return option === value;
|
87
|
+
}, getOptionLabel: (option) => {
|
88
|
+
var _a;
|
89
|
+
if (option === '{{user.id}}')
|
90
|
+
return 'User ID';
|
91
|
+
return (_a = option.label) !== null && _a !== void 0 ? _a : option;
|
92
|
+
}, disabled: ['null', 'notNull'].includes(props.operator), renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { size: "small", placeholder: 'Value', readOnly: value === '{{user.id}}', onChange: (event) => {
|
93
|
+
handleOnChange(event.target.value);
|
94
|
+
} }))), renderOption: (props, option) => {
|
95
|
+
return (React.createElement(MenuItem, Object.assign({}, props, { style: { padding: '0px 8px' } }),
|
96
|
+
React.createElement(Box, { padding: 0, margin: 0 },
|
97
|
+
React.createElement(Typography, { fontSize: '14px', fontWeight: 500 }, option.label),
|
98
|
+
React.createElement(Typography, { fontSize: '14px', fontWeight: 500, color: 'rgba(145, 158, 171, 1)' }, option.value.sublabel))));
|
99
|
+
}, componentsProps: { popper: { style: { width: 'fit-content' } } }, style: { width: '33%' } }));
|
100
|
+
return determineValueEditor(valueEditor, props);
|
101
|
+
};
|
102
|
+
export const customValueEditor = (props) => {
|
103
|
+
const { value, handleOnChange, operator } = props;
|
104
|
+
let valueEditor = (React.createElement(TextField, { value: ['null', 'notNull'].includes(operator) ? '' : value, disabled: ['null', 'notNull'].includes(operator), onChange: (e) => {
|
105
|
+
handleOnChange(e.target.value);
|
106
|
+
}, placeholder: "Value", size: "small", sx: { width: '33%' } }));
|
107
|
+
return determineValueEditor(valueEditor, props);
|
108
|
+
};
|
109
|
+
const determineValueEditor = (baseValueEditor, props) => {
|
110
|
+
const { handleOnChange, value, values, type, operator, inputType } = props;
|
111
|
+
const disabled = ['null', 'notNull'].includes(operator);
|
112
|
+
let valueEditor = baseValueEditor;
|
113
|
+
switch (inputType) {
|
114
|
+
case 'date':
|
115
|
+
valueEditor = (React.createElement(LocalizationProvider, null,
|
116
|
+
React.createElement(DatePicker, { disabled: disabled, value: disabled ? null : value, onChange: (value) => {
|
117
|
+
handleOnChange(value);
|
118
|
+
}, renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { placeholder: "Value", size: "small", style: { width: '33%' } }))) })));
|
119
|
+
break;
|
120
|
+
case 'array':
|
121
|
+
valueEditor = (React.createElement(Autocomplete, { multiple: true, options: values || [], getOptionLabel: (option) => (option.label ? option.label : ''), value: Array.isArray(value) ? (disabled ? [] : value) : [], disabled: disabled, onChange: (event, newValue) => {
|
122
|
+
const uniqueSelections = Array.from(new Set(newValue.map((item) => item.label))).map((label) => {
|
123
|
+
return newValue.find((item) => item.label === label);
|
124
|
+
});
|
125
|
+
handleOnChange(uniqueSelections.length ? uniqueSelections : '');
|
126
|
+
}, isOptionEqualToValue: (option, value) => {
|
127
|
+
return option === value;
|
128
|
+
}, renderInput: (params) => React.createElement(TextField, Object.assign({ label: params.label }, params, { size: "small" })), style: { width: '33%' } }));
|
129
|
+
break;
|
130
|
+
case 'string':
|
131
|
+
if ((operator === 'in' || operator === 'notIn') && type === 'select' && values) {
|
132
|
+
valueEditor = (React.createElement(Autocomplete, { multiple: true, options: values || [], getOptionLabel: (option) => (option.label ? option.label : ''), value: Array.isArray(value) ? (disabled ? [] : value) : [], disabled: disabled, onChange: (event, newValue) => {
|
133
|
+
const uniqueSelections = Array.from(new Set(newValue.map((item) => item.label))).map((label) => {
|
134
|
+
return newValue.find((item) => item.label === label);
|
135
|
+
});
|
136
|
+
handleOnChange(uniqueSelections.length ? uniqueSelections : '');
|
137
|
+
}, isOptionEqualToValue: (option, value) => {
|
138
|
+
return option === value;
|
139
|
+
}, renderInput: (params) => React.createElement(TextField, Object.assign({ label: params.label }, params, { size: "small" })), style: { width: '33%' } }));
|
140
|
+
}
|
141
|
+
else if (type === 'select' && values) {
|
142
|
+
valueEditor = (React.createElement(Autocomplete, { options: values, multiple: ['in', 'notIn'].includes(operator), value: disabled ? '' : value, onChange: (event, newValue) => {
|
143
|
+
handleOnChange(newValue === null || newValue === void 0 ? void 0 : newValue.label);
|
144
|
+
}, disabled: disabled, isOptionEqualToValue: (option, value) => {
|
145
|
+
return option === value;
|
146
|
+
}, renderInput: (params) => React.createElement(TextField, Object.assign({}, params, { size: "small" })), style: { width: '33%' }, disableClearable: true }));
|
147
|
+
}
|
148
|
+
break;
|
149
|
+
}
|
150
|
+
return valueEditor;
|
151
|
+
};
|
152
|
+
const CriteriaBuilder = (props) => {
|
153
|
+
const { properties, criteria, setCriteria, enablePresetValues } = props;
|
154
|
+
const [query, setQuery] = useState(undefined);
|
155
|
+
useEffect(() => {
|
156
|
+
if (criteria) {
|
157
|
+
const updatedQuery = parseMongoDB(criteria);
|
158
|
+
setQuery(Object.assign(Object.assign({}, updatedQuery), { rules: updatedQuery.rules.map((rule) => {
|
159
|
+
var _a, _b;
|
160
|
+
const propertyType = (_a = properties.find((property) => property.id === rule.field)) === null || _a === void 0 ? void 0 : _a.type;
|
161
|
+
return Object.assign(Object.assign({}, rule), { value: propertyType === 'array' ||
|
162
|
+
(propertyType === 'string' && rule.operator === 'in') ||
|
163
|
+
rule.operator === 'notIn'
|
164
|
+
? (_b = rule.value) === null || _b === void 0 ? void 0 : _b.split(',').map((item) => {
|
165
|
+
return {
|
166
|
+
label: item,
|
167
|
+
value: {
|
168
|
+
name: item,
|
169
|
+
label: item,
|
170
|
+
},
|
171
|
+
};
|
172
|
+
})
|
173
|
+
: rule.value });
|
174
|
+
}) }));
|
175
|
+
}
|
176
|
+
else {
|
177
|
+
setQuery({ combinator: 'and', rules: [] });
|
178
|
+
}
|
179
|
+
}, []);
|
180
|
+
const handleQueryChange = (q) => {
|
181
|
+
const updatedQuery = Object.assign(Object.assign({}, q), { rules: q.rules.map((rule) => {
|
182
|
+
return Object.assign(Object.assign({}, rule), { value: Array.isArray(rule.value) && !!rule.value[0].label
|
183
|
+
? rule.value.map((item) => item.label)
|
184
|
+
: rule.value });
|
185
|
+
}) });
|
186
|
+
setQuery(q);
|
187
|
+
setCriteria(JSON.parse(formatQuery(updatedQuery, 'mongodb')));
|
188
|
+
};
|
189
|
+
const fields = useMemo(() => {
|
190
|
+
return properties.map((property) => {
|
191
|
+
return Object.assign({ name: property.id, label: property.name, inputType: property.type }, (property.enum && {
|
192
|
+
valueEditorType: property.type === 'array' ? 'multiselect' : 'select',
|
193
|
+
values: property.enum.map((item) => ({ name: item, label: item })),
|
194
|
+
}));
|
195
|
+
});
|
196
|
+
}, [properties]);
|
197
|
+
if (query) {
|
198
|
+
return (React.createElement(Box, { sx: {
|
199
|
+
border: '2px solid #ddd',
|
200
|
+
borderRadius: '10px',
|
201
|
+
'.container': {
|
202
|
+
background: '#fff',
|
203
|
+
borderColor: '#ddd',
|
204
|
+
borderRadius: '8px',
|
205
|
+
},
|
206
|
+
'.queryBuilder-branches': { color: '#ddd' },
|
207
|
+
'.queryBuilder-branches .betweenRules::before': { borderColor: '#ddd' },
|
208
|
+
'.ruleGroup': { borderColor: '#ddd' },
|
209
|
+
'.queryBuilder-branches .rule::before, .queryBuilder-branches .ruleGroup .ruleGroup::before, .queryBuilder-branches .rule::after, .queryBuilder-branches .ruleGroup .ruleGroup::after': {
|
210
|
+
borderColor: '#ddd',
|
211
|
+
},
|
212
|
+
} },
|
213
|
+
React.createElement(QueryBuilderMaterial, null,
|
214
|
+
React.createElement(QueryBuilder, { query: query, fields: fields, onQueryChange: (q) => {
|
215
|
+
handleQueryChange(q);
|
216
|
+
}, showCombinatorsBetweenRules: true, listsAsArrays: true, controlElements: {
|
217
|
+
combinatorSelector: customCombinator,
|
218
|
+
fieldSelector: customSelector,
|
219
|
+
operatorSelector: customSelector,
|
220
|
+
addGroupAction: customButton,
|
221
|
+
addRuleAction: customButton,
|
222
|
+
removeGroupAction: customDelete,
|
223
|
+
removeRuleAction: customDelete,
|
224
|
+
valueEditor: enablePresetValues ? customValueEditorWithPresets : customValueEditor,
|
225
|
+
}, controlClassnames: {
|
226
|
+
queryBuilder: 'queryBuilder-branches',
|
227
|
+
ruleGroup: 'container',
|
228
|
+
} }))));
|
229
|
+
}
|
230
|
+
return React.createElement(React.Fragment, null);
|
231
|
+
};
|
232
|
+
export default CriteriaBuilder;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
2
|
+
import { Autocomplete, TextField } from '../../../core';
|
3
|
+
import InputFieldComponent from '../InputFieldComponent/InputFieldComponent';
|
4
|
+
const BooleanSelect = (props) => {
|
5
|
+
const { property, defaultValue, error, readOnly, size, placeholder } = props;
|
6
|
+
const [value, setValue] = useState(defaultValue);
|
7
|
+
const id = property.id;
|
8
|
+
useEffect(() => {
|
9
|
+
setValue(defaultValue);
|
10
|
+
}, [defaultValue]);
|
11
|
+
const handleChange = (event, selected) => {
|
12
|
+
setValue(selected.label);
|
13
|
+
props.onChange(id, selected.label, property);
|
14
|
+
};
|
15
|
+
const booleanOptions = [
|
16
|
+
{
|
17
|
+
label: 'Yes',
|
18
|
+
value: true,
|
19
|
+
},
|
20
|
+
{
|
21
|
+
label: 'No',
|
22
|
+
value: false,
|
23
|
+
},
|
24
|
+
];
|
25
|
+
return readOnly ? (React.createElement(InputFieldComponent, Object.assign({}, props))) : (React.createElement(Autocomplete, { id: id, renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { value: value, error: error, fullWidth: true, style: { background: 'white' }, size: size !== null && size !== void 0 ? size : 'medium', placeholder: placeholder }))), value: value, onChange: handleChange, inputValue: value, options: booleanOptions, disableClearable: true, style: { background: 'white', borderRadius: '8px' } }));
|
26
|
+
};
|
27
|
+
export default BooleanSelect;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './BooleanSelect';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './BooleanSelect';
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { DateTimeFormatter } from '@js-joda/core';
|
2
|
+
import React, { useEffect, useState } from 'react';
|
3
|
+
import { InvalidDate, LocalDate, nativeJs } from '../../../../util';
|
4
|
+
import { DatePicker, LocalizationProvider, TextField } from '../../../core';
|
5
|
+
import InputFieldComponent from '../InputFieldComponent/InputFieldComponent';
|
6
|
+
function asCalendarDate(value) {
|
7
|
+
if (!value) {
|
8
|
+
return null;
|
9
|
+
}
|
10
|
+
if (value instanceof LocalDate || value instanceof InvalidDate) {
|
11
|
+
return value;
|
12
|
+
}
|
13
|
+
if (value instanceof Date) {
|
14
|
+
if (isNaN(value.getTime())) {
|
15
|
+
// LocalDate cannot represent an invalid date, use InvalidDate instead.
|
16
|
+
return new InvalidDate();
|
17
|
+
}
|
18
|
+
return LocalDate.from(nativeJs(value));
|
19
|
+
}
|
20
|
+
return value.toString();
|
21
|
+
}
|
22
|
+
const asMonthDayYearFormat = (date) => {
|
23
|
+
if (date) {
|
24
|
+
const formatter = DateTimeFormatter.ofPattern('MM/dd/yyyy');
|
25
|
+
return LocalDate.parse(date).format(formatter);
|
26
|
+
}
|
27
|
+
};
|
28
|
+
const DatePickerSelect = (props) => {
|
29
|
+
const { property, defaultValue, error, readOnly, required, size } = props;
|
30
|
+
const [value, setValue] = useState(asCalendarDate(defaultValue));
|
31
|
+
const id = property.id;
|
32
|
+
useEffect(() => {
|
33
|
+
setValue(asCalendarDate(defaultValue));
|
34
|
+
}, [defaultValue]);
|
35
|
+
const handleChange = (date) => {
|
36
|
+
setValue(date);
|
37
|
+
props.onChange(id, date, property);
|
38
|
+
};
|
39
|
+
return readOnly ? (React.createElement(InputFieldComponent, Object.assign({}, Object.assign(Object.assign({}, props), { defaultValue: asMonthDayYearFormat(value) })))) : (React.createElement(LocalizationProvider, null,
|
40
|
+
React.createElement(DatePicker, { value: value, onChange: handleChange, inputFormat: "MM/dd/yyyy", renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { id: id, error: error, fullWidth: true, required: required, style: { background: 'white', borderRadius: '8px' }, size: size !== null && size !== void 0 ? size : 'medium' }))) })));
|
41
|
+
};
|
42
|
+
export default DatePickerSelect;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './DatePickerSelect';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './DatePickerSelect';
|
@@ -0,0 +1,65 @@
|
|
1
|
+
import { Grid } from '@mui/material';
|
2
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
3
|
+
import { useDropzone } from 'react-dropzone';
|
4
|
+
import { Button, TextField } from '../../../core';
|
5
|
+
const FileUploadControl = (props) => {
|
6
|
+
var _a;
|
7
|
+
const [uploadedFile, setUploadedFile] = useState(undefined);
|
8
|
+
const { property, required, error } = props;
|
9
|
+
const id = property.id;
|
10
|
+
const styles = {
|
11
|
+
button: {
|
12
|
+
textTransform: 'initial',
|
13
|
+
fontSizeP: '14px',
|
14
|
+
fontWeight: 700,
|
15
|
+
},
|
16
|
+
selectFileBtn: {
|
17
|
+
height: '45px',
|
18
|
+
margin: '3px',
|
19
|
+
marginRight: '4px',
|
20
|
+
backgroundColor: '#DFE3E8',
|
21
|
+
color: '#212B36',
|
22
|
+
position: 'relative',
|
23
|
+
float: 'right',
|
24
|
+
},
|
25
|
+
fileName: {
|
26
|
+
paddingTop: '15px',
|
27
|
+
paddingLeft: '15px',
|
28
|
+
float: 'left',
|
29
|
+
fontSize: '16px',
|
30
|
+
color: '#C7C7CD',
|
31
|
+
},
|
32
|
+
};
|
33
|
+
useEffect(() => {
|
34
|
+
if (uploadedFile) {
|
35
|
+
props.onChange(id, uploadedFile, property);
|
36
|
+
}
|
37
|
+
}, [uploadedFile]);
|
38
|
+
const handleSelectFile = () => {
|
39
|
+
if (uploadedFile) {
|
40
|
+
setUploadedFile(undefined);
|
41
|
+
props.onChange(id, undefined, property);
|
42
|
+
}
|
43
|
+
};
|
44
|
+
const onDrop = useCallback((acceptedFile) => {
|
45
|
+
setUploadedFile(acceptedFile[0]);
|
46
|
+
}, [setUploadedFile]);
|
47
|
+
const { getRootProps, getInputProps, isDragActive } = useDropzone({
|
48
|
+
onDrop,
|
49
|
+
multiple: false,
|
50
|
+
disabled: !!uploadedFile,
|
51
|
+
});
|
52
|
+
return (React.createElement(Grid, Object.assign({ container: true }, getRootProps({
|
53
|
+
style: {
|
54
|
+
border: error ? '1px solid red' : '1px solid #c4c4c4',
|
55
|
+
borderRadius: '8px',
|
56
|
+
height: '56px',
|
57
|
+
},
|
58
|
+
})),
|
59
|
+
React.createElement(Grid, { item: true, flexGrow: 1 },
|
60
|
+
React.createElement("input", Object.assign({ disabled: true }, getInputProps())),
|
61
|
+
React.createElement(TextField, { sx: { '& fieldset': { border: 'none' } }, fullWidth: true, value: (_a = uploadedFile === null || uploadedFile === void 0 ? void 0 : uploadedFile.name) !== null && _a !== void 0 ? _a : (isDragActive ? 'Drop your file here' : 'File'), error: error, required: required })),
|
62
|
+
React.createElement(Grid, { item: true },
|
63
|
+
React.createElement(Button, { sx: Object.assign(Object.assign({}, styles.button), styles.selectFileBtn), onClick: () => handleSelectFile() }, uploadedFile ? 'Remove' : 'Select File'))));
|
64
|
+
};
|
65
|
+
export default FileUploadControl;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './FileUpload';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './FileUpload';
|
@@ -0,0 +1,24 @@
|
|
1
|
+
export declare type FormFieldProps = {
|
2
|
+
property: ObjectProperty;
|
3
|
+
onChange: Function;
|
4
|
+
defaultValue?: unknown;
|
5
|
+
error?: boolean;
|
6
|
+
required?: boolean;
|
7
|
+
readOnly?: boolean;
|
8
|
+
selectOptions?: Array<string>;
|
9
|
+
locale?: string;
|
10
|
+
size?: 'small' | 'medium';
|
11
|
+
placeholder?: string;
|
12
|
+
};
|
13
|
+
export declare type ObjectProperty = {
|
14
|
+
id: string;
|
15
|
+
name: string;
|
16
|
+
type: string;
|
17
|
+
enum?: string[];
|
18
|
+
required?: boolean;
|
19
|
+
searchable?: boolean;
|
20
|
+
objectId?: string;
|
21
|
+
formula?: string;
|
22
|
+
};
|
23
|
+
declare const FormField: (props: FormFieldProps) => any;
|
24
|
+
export default FormField;
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import BooleanSelect from './BooleanSelect/BooleanSelect';
|
3
|
+
import DatePickerSelect from './DatePickerSelect/DatePickerSelect';
|
4
|
+
import FileUploadControl from './FileUpload/FileUpload';
|
5
|
+
import InputFieldComponent from './InputFieldComponent/InputFieldComponent';
|
6
|
+
import Select from './Select/Select';
|
7
|
+
const FormField = (props) => {
|
8
|
+
const { defaultValue, error, onChange, property, readOnly, selectOptions, required, size, placeholder } = props;
|
9
|
+
const id = property.id;
|
10
|
+
let control;
|
11
|
+
const commonProps = {
|
12
|
+
id,
|
13
|
+
property,
|
14
|
+
onChange,
|
15
|
+
error,
|
16
|
+
readOnly,
|
17
|
+
defaultValue,
|
18
|
+
selectOptions,
|
19
|
+
required,
|
20
|
+
size,
|
21
|
+
placeholder,
|
22
|
+
};
|
23
|
+
switch (property.type) {
|
24
|
+
case 'boolean':
|
25
|
+
control = (React.createElement(BooleanSelect, Object.assign({}, commonProps, { defaultValue: defaultValue ? 'Yes' : defaultValue === undefined ? '' : 'No' })));
|
26
|
+
break;
|
27
|
+
case 'date':
|
28
|
+
control = React.createElement(DatePickerSelect, Object.assign({}, commonProps));
|
29
|
+
break;
|
30
|
+
case 'fileUpload':
|
31
|
+
control = React.createElement(FileUploadControl, Object.assign({}, commonProps));
|
32
|
+
break;
|
33
|
+
case 'choices':
|
34
|
+
control = React.createElement(Select, Object.assign({}, commonProps));
|
35
|
+
break;
|
36
|
+
case 'array':
|
37
|
+
control = React.createElement(Select, Object.assign({}, commonProps));
|
38
|
+
break;
|
39
|
+
default:
|
40
|
+
control = React.createElement(InputFieldComponent, Object.assign({}, commonProps));
|
41
|
+
break;
|
42
|
+
}
|
43
|
+
return control;
|
44
|
+
};
|
45
|
+
export default FormField;
|
@@ -0,0 +1,76 @@
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
2
|
+
var t = {};
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
4
|
+
t[p] = s[p];
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
8
|
+
t[p[i]] = s[p[i]];
|
9
|
+
}
|
10
|
+
return t;
|
11
|
+
};
|
12
|
+
import React, { useEffect, useState } from 'react';
|
13
|
+
import NumberFormat from 'react-number-format';
|
14
|
+
import { Autocomplete, TextField } from '../../../core';
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
16
|
+
const NumericFormat = (props) => {
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
18
|
+
const { inputRef, onChange, defaultValue } = props, other = __rest(props, ["inputRef", "onChange", "defaultValue"]);
|
19
|
+
return (React.createElement(NumberFormat, Object.assign({}, other, { getInputRef: inputRef, onValueChange: (values) => {
|
20
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
21
|
+
target: {
|
22
|
+
value: values.floatValue,
|
23
|
+
},
|
24
|
+
});
|
25
|
+
}, thousandSeparator: true, isNumericString: true, fixedDecimalScale: true, allowNegative: true })));
|
26
|
+
};
|
27
|
+
const InputFieldComponent = (props) => {
|
28
|
+
var _a;
|
29
|
+
const { property, defaultValue, error, readOnly, required, size, placeholder } = props;
|
30
|
+
const [value, setValue] = useState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : '');
|
31
|
+
const [inputValue, setInputValue] = useState('');
|
32
|
+
const id = property.id;
|
33
|
+
useEffect(() => {
|
34
|
+
setValue(defaultValue !== null && defaultValue !== void 0 ? defaultValue : '');
|
35
|
+
}, [defaultValue]);
|
36
|
+
const handleChange = (e) => {
|
37
|
+
const inputValue = property.type === 'integer' ? parseInt(e.target.value) : e.target.value;
|
38
|
+
setValue(inputValue);
|
39
|
+
props.onChange(id, inputValue, property);
|
40
|
+
};
|
41
|
+
const handleSelectChange = (e, selected) => {
|
42
|
+
setValue(selected.label);
|
43
|
+
props.onChange(id, selected.label, property);
|
44
|
+
};
|
45
|
+
const handleInputValueChange = (event, selectValue) => {
|
46
|
+
setInputValue(selectValue);
|
47
|
+
};
|
48
|
+
const InputProps = property.type === 'number'
|
49
|
+
? {
|
50
|
+
inputComponent: NumericFormat,
|
51
|
+
}
|
52
|
+
: property.type === 'integer'
|
53
|
+
? { inputProps: { min: 0 } }
|
54
|
+
: null;
|
55
|
+
const selectOptions = (_a = property.enum) !== null && _a !== void 0 ? _a : [];
|
56
|
+
if (property.enum && !property.enum.includes(value)) {
|
57
|
+
//note: this is different between widgets and builder
|
58
|
+
//builder had select options being {label, value}
|
59
|
+
//widgets had it like this, as strings w/isOptionEqualToValue
|
60
|
+
selectOptions.push(value);
|
61
|
+
}
|
62
|
+
return property.enum && !readOnly ? (React.createElement(Autocomplete, { id: id, options: selectOptions, onChange: handleSelectChange, renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { value: value, error: error, fullWidth: true, size: size !== null && size !== void 0 ? size : 'medium', placeholder: placeholder }))), disableClearable: true, value: value, isOptionEqualToValue: (option, value) => {
|
63
|
+
return option.value === value;
|
64
|
+
}, error: error, required: required, inputValue: inputValue !== null && inputValue !== void 0 ? inputValue : '', onInputChange: handleInputValueChange })) : (React.createElement(TextField, { id: id, sx: readOnly
|
65
|
+
? {
|
66
|
+
'& .MuiOutlinedInput-notchedOutline': {
|
67
|
+
border: 'none',
|
68
|
+
},
|
69
|
+
'.MuiOutlinedInput-root': {
|
70
|
+
borderRadius: '8px',
|
71
|
+
backgroundColor: '#f4f6f8',
|
72
|
+
},
|
73
|
+
}
|
74
|
+
: undefined, error: error, value: value, onChange: !readOnly ? handleChange : undefined, InputProps: Object.assign(Object.assign({}, InputProps), { readOnly: readOnly }), required: required, fullWidth: true, placeholder: placeholder, style: { background: 'white', borderRadius: '8px' }, size: size !== null && size !== void 0 ? size : 'medium', type: property.type === 'integer' ? 'number' : 'text' }));
|
75
|
+
};
|
76
|
+
export default InputFieldComponent;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './InputFieldComponent';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './InputFieldComponent';
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
2
|
+
import { Autocomplete, TextField } from '../../../core';
|
3
|
+
import InputFieldComponent from '../InputFieldComponent/InputFieldComponent';
|
4
|
+
const Select = (props) => {
|
5
|
+
const { property, defaultValue, error, readOnly, selectOptions, required, size } = props;
|
6
|
+
const [value, setValue] = useState(defaultValue);
|
7
|
+
const [inputValue, setInputValue] = useState('');
|
8
|
+
useEffect(() => {
|
9
|
+
setValue(defaultValue);
|
10
|
+
}, [defaultValue]);
|
11
|
+
const id = property.id;
|
12
|
+
const handleChange = (event, selected) => {
|
13
|
+
if (Array.isArray(selected)) {
|
14
|
+
setValue(selected.map((option) => { var _a; return (_a = option.value) !== null && _a !== void 0 ? _a : option; }));
|
15
|
+
props.onChange(id, selected.map((option) => { var _a; return (_a = option.value) !== null && _a !== void 0 ? _a : option; }), property);
|
16
|
+
}
|
17
|
+
else {
|
18
|
+
setValue(selected);
|
19
|
+
props.onChange(id, selected, property);
|
20
|
+
}
|
21
|
+
};
|
22
|
+
const handleInputValueChange = (event, selectValue) => {
|
23
|
+
if (Array.isArray(selectValue)) {
|
24
|
+
setValue(selectValue.map((item) => { var _a; return (_a = item.value) !== null && _a !== void 0 ? _a : item; }));
|
25
|
+
}
|
26
|
+
else {
|
27
|
+
setInputValue(selectValue);
|
28
|
+
}
|
29
|
+
};
|
30
|
+
return readOnly ? (React.createElement(InputFieldComponent, Object.assign({}, props))) : (React.createElement(Autocomplete, { multiple: (property === null || property === void 0 ? void 0 : property.type) === 'array' ? true : false, id: id, renderInput: (params) => React.createElement(TextField, Object.assign({}, params, { value: value, fullWidth: true })), value: value, onChange: handleChange, options: (property === null || property === void 0 ? void 0 : property.type) === 'array' ? property === null || property === void 0 ? void 0 : property.enum : selectOptions, disableClearable: true, inputValue: inputValue !== null && inputValue !== void 0 ? inputValue : '', error: error, required: required, onInputChange: handleInputValueChange, filterOptions: (option) => { var _a; return (property === null || property === void 0 ? void 0 : property.type) === 'array' ? (_a = property === null || property === void 0 ? void 0 : property.enum) === null || _a === void 0 ? void 0 : _a.filter((item) => item !== option.value) : option; }, size: size }));
|
31
|
+
};
|
32
|
+
export default Select;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './Select';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './Select';
|