@evoke-platform/ui-components 1.0.0-dev.234 → 1.0.0-dev.235
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/published/components/core/Accordion/Accordion.d.ts +0 -1
- package/dist/published/components/core/Accordion/AccordionActions/AccordionActions.d.ts +0 -1
- package/dist/published/components/core/Accordion/AccordionDetails/AccordionDetails.d.ts +0 -1
- package/dist/published/components/core/Accordion/AccordionSummary/AccordionSummary.d.ts +0 -1
- package/dist/published/components/core/Alert/Alert.d.ts +0 -1
- package/dist/published/components/core/AlertTitle/AlertTitle.d.ts +0 -1
- package/dist/published/components/core/AppBar/AppBar.d.ts +0 -1
- package/dist/published/components/core/Autocomplete/Autocomplete.d.ts +2 -2
- package/dist/published/components/core/Avatar/Avatar.d.ts +1 -2
- package/dist/published/components/core/Backdrop/Backdrop.d.ts +0 -1
- package/dist/published/components/core/Badge/Badge.d.ts +0 -1
- package/dist/published/components/core/Breadcrumbs/Breadcrumbs.d.ts +0 -1
- package/dist/published/components/core/Button/Button.d.ts +0 -1
- package/dist/published/components/core/ButtonGroup/ButtonGroup.d.ts +0 -1
- package/dist/published/components/core/Card/Card.d.ts +0 -1
- package/dist/published/components/core/Checkbox/Checkbox.d.ts +0 -1
- package/dist/published/components/core/Chip/Chip.d.ts +0 -1
- package/dist/published/components/core/CircularProgress/CircularProgress.d.ts +0 -1
- package/dist/published/components/core/Collapse/Collapse.d.ts +0 -1
- package/dist/published/components/core/DatePicker/DatePicker.d.ts +1 -2
- package/dist/published/components/core/DateTimePicker/DateTimePicker.d.ts +1 -2
- package/dist/published/components/core/Dialog/Dialog.d.ts +0 -1
- package/dist/published/components/core/Dialog/DialogActions/DialogActions.d.ts +2 -2
- package/dist/published/components/core/Dialog/DialogContent/DialogContent.d.ts +0 -1
- package/dist/published/components/core/Dialog/DialogContentText/DialogContentText.d.ts +0 -1
- package/dist/published/components/core/Dialog/DialogTitle/DialogTitle.d.ts +0 -1
- package/dist/published/components/core/Divider/Divider.d.ts +0 -1
- package/dist/published/components/core/Drawer/Drawer.d.ts +0 -1
- package/dist/published/components/core/FieldError/FieldError.d.ts +1 -2
- package/dist/published/components/core/FormElements/FormControl/FormControl.d.ts +0 -1
- package/dist/published/components/core/FormElements/FormControlLabel/FormControlLabel.d.ts +0 -1
- package/dist/published/components/core/FormElements/FormGroup/FormGroup.d.ts +0 -1
- package/dist/published/components/core/FormElements/FormHelperText/FormHelperText.d.ts +0 -1
- package/dist/published/components/core/FormElements/FormLabel/FormLabel.d.ts +0 -1
- package/dist/published/components/core/IconButton/IconButton.d.ts +0 -1
- package/dist/published/components/core/LinearProgress/LinearProgress.d.ts +0 -1
- package/dist/published/components/core/Link/Link.d.ts +0 -1
- package/dist/published/components/core/List/List.d.ts +0 -1
- package/dist/published/components/core/List/ListItem.d.ts +0 -1
- package/dist/published/components/core/List/ListItemText/ListItemText.d.ts +0 -1
- package/dist/published/components/core/LoadingButton/LoadingButton.d.ts +0 -1
- package/dist/published/components/core/LocalizationProvider/LocalizationProvider.d.ts +1 -2
- package/dist/published/components/core/Menu/Menu.d.ts +0 -1
- package/dist/published/components/core/Menu/MenuItem/MenuItem.d.ts +0 -1
- package/dist/published/components/core/Paper/Paper.d.ts +0 -1
- package/dist/published/components/core/Popover/Popover.d.ts +0 -1
- package/dist/published/components/core/Popper/Popper.d.ts +0 -1
- package/dist/published/components/core/RadioGroup/Radio.d.ts +0 -1
- package/dist/published/components/core/RadioGroup/RadioGroup.d.ts +0 -1
- package/dist/published/components/core/Select/Select.d.ts +0 -1
- package/dist/published/components/core/Skeleton/Skeleton.d.ts +0 -1
- package/dist/published/components/core/Snackbar/Snackbar.d.ts +1 -1
- package/dist/published/components/core/StaticDatePicker/StaticDatePicker.d.ts +1 -2
- package/dist/published/components/core/Stepper/Step/Step.d.ts +0 -1
- package/dist/published/components/core/Stepper/StepButton/StepButton.d.ts +0 -1
- package/dist/published/components/core/Stepper/StepConnector/StepConnector.d.ts +0 -1
- package/dist/published/components/core/Stepper/StepContent/StepContent.d.ts +0 -1
- package/dist/published/components/core/Stepper/StepIcon/StepIcon.d.ts +0 -1
- package/dist/published/components/core/Stepper/StepLabel/StepLabel.d.ts +0 -1
- package/dist/published/components/core/Stepper/Stepper.d.ts +0 -1
- package/dist/published/components/core/Switch/Switch.d.ts +0 -1
- package/dist/published/components/core/Table/Table.d.ts +0 -1
- package/dist/published/components/core/Tabs/Tab/Tab.d.ts +0 -1
- package/dist/published/components/core/Tabs/Tabs.d.ts +0 -1
- package/dist/published/components/core/TextField/TextField.d.ts +1 -2
- package/dist/published/components/core/ToggleButton/ToggleButton.d.ts +0 -1
- package/dist/published/components/core/ToggleButtonGroup/ToggleButtonGroup.d.ts +0 -1
- package/dist/published/components/core/Tooltip/Tooltip.d.ts +0 -1
- package/dist/published/components/core/Typography/index.d.ts +0 -1
- package/dist/published/components/custom/BuilderGrid/BuilderGrid.d.ts +2 -2
- package/dist/published/components/custom/BuilderGrid/BuilderGridToolbar.d.ts +1 -1
- package/dist/published/components/custom/BuilderGrid/EmptyContent.d.ts +2 -3
- package/dist/published/components/custom/BuilderGrid/EmptyContentIllustration.d.ts +0 -1
- package/dist/published/components/custom/BuilderGrid/ToolbarActions.d.ts +1 -1
- package/dist/published/components/custom/CriteriaBuilder/CriteriaBuilder.d.ts +1 -1
- package/dist/published/components/custom/CriteriaBuilder/ValueEditor.d.ts +1 -2
- package/dist/published/components/custom/CriteriaBuilder/types.d.ts +4 -4
- package/dist/published/components/custom/DataGrid/DataGrid.d.ts +3 -4
- package/dist/published/components/custom/DataGrid/Toolbar.d.ts +1 -2
- package/dist/published/components/custom/ErrorComponent/ErrorComponent.d.ts +1 -1
- package/dist/published/components/custom/Form/Common/Form.d.ts +2 -3
- package/dist/published/components/custom/Form/Common/Form.js +1 -1
- package/dist/published/components/custom/Form/Common/FormComponentWrapper.d.ts +1 -1
- package/dist/published/components/custom/Form/FormComponents/ButtonComponent.d.ts +3 -4
- package/dist/published/components/custom/Form/FormComponents/DocumentComponent/Document.d.ts +1 -2
- package/dist/published/components/custom/Form/FormComponents/DocumentComponent/DocumentList.d.ts +1 -2
- package/dist/published/components/custom/Form/FormComponents/FormFieldComponent.d.ts +1 -1
- package/dist/published/components/custom/Form/FormComponents/ImageComponent/Image.d.ts +1 -2
- package/dist/published/components/custom/Form/FormComponents/ObjectComponent/InstanceLookup.d.ts +2 -3
- package/dist/published/components/custom/Form/FormComponents/ObjectComponent/ObjectPropertyInput.d.ts +0 -1
- package/dist/published/components/custom/Form/FormComponents/ObjectComponent/RelatedObjectInstance.d.ts +1 -2
- package/dist/published/components/custom/Form/FormComponents/RepeatableFieldComponent/ActionDialog.d.ts +1 -2
- package/dist/published/components/custom/Form/FormComponents/RepeatableFieldComponent/ActionDialog.js +8 -15
- package/dist/published/components/custom/Form/FormComponents/RepeatableFieldComponent/ManyToMany/DropdownRepeatableField.d.ts +1 -2
- package/dist/published/components/custom/Form/FormComponents/RepeatableFieldComponent/ManyToMany/DropdownRepeatableFieldInput.d.ts +2 -3
- package/dist/published/components/custom/Form/FormComponents/RepeatableFieldComponent/RepeatableField.d.ts +1 -2
- package/dist/published/components/custom/Form/FormComponents/RepeatableFieldComponent/RepeatableFieldComponent.d.ts +1 -1
- package/dist/published/components/custom/Form/FormComponents/UserComponent/UserProperty.d.ts +1 -2
- package/dist/published/components/custom/Form/FormComponents/ViewOnlyComponent.js +1 -1
- package/dist/published/components/custom/Form/types.d.ts +7 -7
- package/dist/published/components/custom/Form/utils.d.ts +2 -2
- package/dist/published/components/custom/FormField/AddressFieldComponent/addressFieldComponent.d.ts +1 -2
- package/dist/published/components/custom/FormField/BooleanSelect/BooleanSelect.d.ts +0 -1
- package/dist/published/components/custom/FormField/DatePickerSelect/DatePickerSelect.d.ts +0 -1
- package/dist/published/components/custom/FormField/DatePickerSelect/DatePickerSelect.js +1 -1
- package/dist/published/components/custom/FormField/DateTimePickerSelect/DateTimePickerSelect.d.ts +0 -1
- package/dist/published/components/custom/FormField/DateTimePickerSelect/DateTimePickerSelect.js +1 -1
- package/dist/published/components/custom/FormField/FileUpload/FileUpload.d.ts +0 -1
- package/dist/published/components/custom/FormField/FormField.d.ts +1 -1
- package/dist/published/components/custom/FormField/Select/Select.d.ts +0 -1
- package/dist/published/components/custom/FormField/TimePickerSelect/TimePickerSelect.d.ts +0 -1
- package/dist/published/components/custom/HistoryLog/DisplayedProperty.d.ts +1 -2
- package/dist/published/components/custom/HistoryLog/Filter.d.ts +1 -2
- package/dist/published/components/custom/HistoryLog/HistoryData.d.ts +2 -3
- package/dist/published/components/custom/HistoryLog/HistoryLoading.d.ts +0 -1
- package/dist/published/components/custom/HistoryLog/index.d.ts +1 -2
- package/dist/published/components/custom/Menubar/Menubar.d.ts +1 -2
- package/dist/published/components/custom/MultiSelect/MultiSelect.d.ts +2 -3
- package/dist/published/components/custom/MultiSelect/MultiSelect.js +1 -1
- package/dist/published/components/custom/MultiSelect/SortableItem.d.ts +0 -1
- package/dist/published/components/custom/RepeatableField/RepeatableField.d.ts +2 -3
- package/dist/published/components/custom/RichTextViewer/index.d.ts +1 -2
- package/dist/published/components/custom/UserAvatar/UserAvatar.d.ts +2 -3
- package/dist/published/components/layout/Box/Box.d.ts +1 -1
- package/dist/published/components/layout/Container/Container.d.ts +0 -1
- package/dist/published/components/layout/Grid/Grid.d.ts +0 -1
- package/dist/published/components/layout/Stack/Stack.d.ts +0 -1
- package/dist/published/icons/custom/FileWithExtension.d.ts +0 -1
- package/dist/published/icons/custom/Inherited.d.ts +0 -1
- package/dist/published/icons/custom/Overrides.d.ts +4 -9
- package/dist/published/icons/custom/TrashCan.d.ts +4 -9
- package/dist/published/icons/custom/UploadCloud.d.ts +0 -1
- package/dist/published/stories/Accordion.stories.d.ts +3 -3
- package/dist/published/stories/Alert.stories.d.ts +2 -2
- package/dist/published/stories/AlertTitle.stories.d.ts +2 -2
- package/dist/published/stories/Appbar.stories.d.ts +3 -3
- package/dist/published/stories/Autocomplete.stories.d.ts +2 -2
- package/dist/published/stories/Avatar.stories.d.ts +2 -2
- package/dist/published/stories/Backdrop.stories.d.ts +3 -3
- package/dist/published/stories/Badge.stories.d.ts +3 -3
- package/dist/published/stories/Box.stories.d.ts +4 -8
- package/dist/published/stories/Breadcrumbs.stories.d.ts +3 -3
- package/dist/published/stories/Button.stories.d.ts +3 -3
- package/dist/published/stories/ButtonGroup.stories.d.ts +3 -3
- package/dist/published/stories/Card.stories.d.ts +3 -3
- package/dist/published/stories/Checkbox.stories.d.ts +2 -2
- package/dist/published/stories/Chip.stories.d.ts +3 -3
- package/dist/published/stories/CircularProgress.stories.d.ts +2 -2
- package/dist/published/stories/Collapse.stories.d.ts +2 -2
- package/dist/published/stories/Container.stories.d.ts +3 -3
- package/dist/published/stories/CriteriaBuilder.stories.d.ts +2 -2
- package/dist/published/stories/DatePicker.stories.d.ts +2 -3
- package/dist/published/stories/Dialog.stories.d.ts +2 -2
- package/dist/published/stories/Divider.stories.d.ts +3 -3
- package/dist/published/stories/Drawer.stories.d.ts +2 -2
- package/dist/published/stories/FormControl.stories.d.ts +3 -3
- package/dist/published/stories/FormControlLabel.stories.d.ts +2 -2
- package/dist/published/stories/FormField.stories.d.ts +2 -2
- package/dist/published/stories/FormGroup.stories.d.ts +2 -2
- package/dist/published/stories/FormHelperText.stories.d.ts +3 -4
- package/dist/published/stories/FormLabel.stories.d.ts +3 -3
- package/dist/published/stories/Grid.stories.d.ts +3 -3
- package/dist/published/stories/HistoryLog.stories.d.ts +2 -2
- package/dist/published/stories/IconButton.stories.d.ts +3 -3
- package/dist/published/stories/LinearProgress.stories.d.ts +2 -2
- package/dist/published/stories/Link.stories.d.ts +3 -3
- package/dist/published/stories/List.stories.d.ts +3 -3
- package/dist/published/stories/Menu.stories.d.ts +2 -2
- package/dist/published/stories/Palette.stories.d.ts +4 -8
- package/dist/published/stories/Paper.stories.d.ts +3 -3
- package/dist/published/stories/RadioGroup.stories.d.ts +2 -2
- package/dist/published/stories/RichTextViewer.stories.d.ts +2 -2
- package/dist/published/stories/Skeleton.stories.d.ts +3 -3
- package/dist/published/stories/Snackbar.stories.d.ts +2 -2
- package/dist/published/stories/Stack.stories.d.ts +3 -3
- package/dist/published/stories/StaticDatePicker.stories.d.ts +2 -3
- package/dist/published/stories/Stepper.stories.d.ts +3 -7
- package/dist/published/stories/Switch.stories.d.ts +2 -2
- package/dist/published/stories/Table.stories.d.ts +3 -3
- package/dist/published/stories/Tabs.stories.d.ts +3 -3
- package/dist/published/stories/TextField.stories.d.ts +13 -17
- package/dist/published/stories/TimePicker.stories.d.ts +2 -3
- package/dist/published/stories/TimePickerSelect.stories.d.ts +2 -4
- package/dist/published/stories/ToggleButton.stories.d.ts +3 -3
- package/dist/published/stories/Typography.stories.d.ts +2 -2
- package/dist/published/theme/UIThemeProvider.d.ts +1 -1
- package/dist/published/types.d.ts +13 -13
- package/dist/published/util/date.d.ts +1 -1
- package/package.json +2 -2
@@ -1,8 +1,7 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { Theme } from '@mui/material';
|
3
2
|
import { GridToolbarProps as MuiGridToolbarProps } from '@mui/x-data-grid';
|
4
3
|
import { BulkAction } from './DataGrid';
|
5
|
-
export
|
4
|
+
export type GridToolbarProps = MuiGridToolbarProps & {
|
6
5
|
onRefresh?: () => void;
|
7
6
|
setAnchorEl?: (anchorEl: HTMLAnchorElement | null) => void;
|
8
7
|
loading?: boolean;
|
@@ -1,13 +1,12 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { ApiServices, Obj, ObjectInstance, UserAccount } from '@evoke-platform/context';
|
3
2
|
import { ReactComponent } from '@formio/react';
|
4
3
|
import '../../../../styles/form-component.css';
|
5
4
|
import { Document, ObjectPropertyInputProps } from '../types';
|
6
|
-
|
5
|
+
type OnSaveResponse = {
|
7
6
|
isSuccessful: boolean;
|
8
7
|
error?: Record<string, unknown>;
|
9
8
|
};
|
10
|
-
export
|
9
|
+
export type FormProps = {
|
11
10
|
formKey?: number;
|
12
11
|
object?: Obj;
|
13
12
|
instance?: ObjectInstance;
|
@@ -89,7 +89,7 @@ export function Form(props) {
|
|
89
89
|
const action = object?.actions?.find((action) => action.id === actionId);
|
90
90
|
let input;
|
91
91
|
const parameters = associatedObject?.propertyId && action?.parameters
|
92
|
-
? action.parameters.filter((param) => param.id !== associatedObject
|
92
|
+
? action.parameters.filter((param) => param.id !== associatedObject.propertyId)
|
93
93
|
: action?.parameters;
|
94
94
|
if (parameters && object) {
|
95
95
|
input = action?.form?.entries
|
@@ -1,10 +1,9 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { ReactComponent } from '@formio/react';
|
3
2
|
import { Root } from 'react-dom/client';
|
4
3
|
interface ButtonComponentProps {
|
5
4
|
components: Button[];
|
6
5
|
}
|
7
|
-
|
6
|
+
type Button = {
|
8
7
|
action: 'cancel' | 'submit' | 'save-draft';
|
9
8
|
label: string;
|
10
9
|
onClick: (event?: any, setError?: (error?: Record<string, unknown>) => void, isSubmitting?: (val: boolean) => void) => void;
|
@@ -12,7 +11,7 @@ declare type Button = {
|
|
12
11
|
style: any;
|
13
12
|
isModal: boolean;
|
14
13
|
};
|
15
|
-
|
14
|
+
type ButtonProps = {
|
16
15
|
button: any;
|
17
16
|
handleSubmit: (setSubmitting: (value: boolean) => void) => void;
|
18
17
|
handleCancel: (event: any) => void;
|
@@ -25,7 +24,7 @@ export declare class ButtonComponent extends ReactComponent {
|
|
25
24
|
componentRoot?: Root;
|
26
25
|
constructor(component: ButtonComponentProps, options: any, data: any);
|
27
26
|
setError(error?: Record<string, unknown>): void;
|
28
|
-
getButton: (buttonAction:
|
27
|
+
getButton: (buttonAction: "cancel" | "submit" | "save-draft") => Button | undefined;
|
29
28
|
handleCancel: (event: any) => void;
|
30
29
|
handleSaveDraft: (setSubmitting: (value: boolean) => void) => void;
|
31
30
|
handleSubmit: (setSubmitting: (value: boolean) => void) => void;
|
package/dist/published/components/custom/Form/FormComponents/DocumentComponent/Document.d.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { ApiServices, DocumentValidation, ObjectInstance, Property } from '@evoke-platform/context';
|
3
2
|
import { SavedDocumentReference } from '../../types';
|
4
|
-
|
3
|
+
type DocumentProps = {
|
5
4
|
id: string;
|
6
5
|
handleChange: (propertyId: string, value: (File | SavedDocumentReference)[] | null) => void;
|
7
6
|
property: Property;
|
package/dist/published/components/custom/Form/FormComponents/DocumentComponent/DocumentList.d.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { ApiServices, ObjectInstance, Property } from '@evoke-platform/context';
|
3
2
|
import { SavedDocumentReference } from '../../types';
|
4
|
-
|
3
|
+
type DocumentListProps = {
|
5
4
|
handleChange: (propertyId: string, value: (File | SavedDocumentReference)[] | null) => void;
|
6
5
|
property: Property;
|
7
6
|
instance: ObjectInstance;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Property } from '@evoke-platform/context';
|
2
2
|
import { ReactComponent } from '@formio/react';
|
3
3
|
import { BaseFormComponentProps } from '../types';
|
4
|
-
|
4
|
+
type FormFieldComponentProps = Omit<BaseFormComponentProps, 'property'> & {
|
5
5
|
property: Omit<Property, 'type'> & {
|
6
6
|
type: Property['type'] | 'choices';
|
7
7
|
};
|
@@ -1,7 +1,6 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { ObjectInstance } from '@evoke-platform/context';
|
3
2
|
export declare function blobToDataUrl(blob: Blob): Promise<string>;
|
4
|
-
|
3
|
+
type ImageProps = {
|
5
4
|
id: string;
|
6
5
|
value?: string;
|
7
6
|
handleChange: (propertyId: string, value: string | null) => void;
|
package/dist/published/components/custom/Form/FormComponents/ObjectComponent/InstanceLookup.d.ts
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { ApiServices, Obj, ObjectInstance, Property, TableViewLayout } from '@evoke-platform/context';
|
3
|
-
export
|
2
|
+
export type InstanceLookUpProps = {
|
4
3
|
object: Obj;
|
5
4
|
instanceId?: string;
|
6
5
|
apiServices: ApiServices;
|
@@ -11,7 +10,7 @@ export declare type InstanceLookUpProps = {
|
|
11
10
|
filter?: Record<string, unknown>;
|
12
11
|
layout?: TableViewLayout;
|
13
12
|
};
|
14
|
-
export
|
13
|
+
export type SearchFieldProps = {
|
15
14
|
searchableColumns: Property[];
|
16
15
|
filter: Record<string, unknown> | undefined;
|
17
16
|
setFilter: (filter: Record<string, unknown> | undefined) => void;
|
@@ -1,7 +1,6 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { ApiServices, Obj, ObjectInstance, Property, TableViewLayout, UserAccount } from '@evoke-platform/context';
|
3
2
|
import { ReactComponent } from '@formio/react';
|
4
|
-
export
|
3
|
+
export type RelatedObjectInstanceProps = {
|
5
4
|
relatedObject?: Obj;
|
6
5
|
property: Property;
|
7
6
|
apiServices: ApiServices;
|
@@ -1,7 +1,6 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { Action, ApiServices, Obj, Property, UserAccount } from '@evoke-platform/context';
|
3
2
|
import { ObjectPropertyInputProps } from '../../types';
|
4
|
-
export
|
3
|
+
export type ActionDialogProps = {
|
5
4
|
open: boolean;
|
6
5
|
onClose: () => void;
|
7
6
|
action: Action;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { concat } from 'lodash';
|
2
2
|
import React, { useEffect, useState } from 'react';
|
3
3
|
import { Close } from '../../../../../icons';
|
4
|
-
import {
|
4
|
+
import { Dialog, DialogContent, DialogTitle, IconButton, Skeleton } from '../../../../core';
|
5
5
|
import { ErrorComponent, Form } from '../../../../custom';
|
6
6
|
import { Box } from '../../../../layout';
|
7
7
|
import { convertComponentsToForm, convertFormToComponents, getPrefixedUrl } from '../../utils';
|
@@ -38,16 +38,15 @@ const styles = {
|
|
38
38
|
export const ActionDialog = (props) => {
|
39
39
|
const { open, onClose, action, instanceInput, handleSubmit, apiServices, object, instanceId, relatedProperty, objectInputCommonProps, queryAddresses, user, } = props;
|
40
40
|
const [updatedObject, setUpdatedObject] = useState();
|
41
|
-
const [hasAccess, setHasAccess] = useState();
|
41
|
+
const [hasAccess, setHasAccess] = useState(false);
|
42
42
|
const [loading, setLoading] = useState(false);
|
43
|
-
const [submitting, setSubmitting] = useState(false);
|
44
43
|
useEffect(() => {
|
45
44
|
if (instanceId) {
|
46
45
|
setLoading(true);
|
47
46
|
apiServices.get(getPrefixedUrl(`/objects/${object.id}/instances/${instanceId}/checkAccess`), {
|
48
47
|
params: { action: 'execute', field: action.id },
|
49
48
|
}, (error, result) => {
|
50
|
-
setHasAccess(result?.result
|
49
|
+
setHasAccess(!!result?.result);
|
51
50
|
setLoading(false);
|
52
51
|
});
|
53
52
|
}
|
@@ -57,7 +56,7 @@ export const ActionDialog = (props) => {
|
|
57
56
|
}
|
58
57
|
}, [object, instanceId]);
|
59
58
|
useEffect(() => {
|
60
|
-
const input = (action
|
59
|
+
const input = (action.form?.entries && action.parameters) || action?.inputProperties
|
61
60
|
? (action.form?.entries && action.parameters
|
62
61
|
? convertFormToComponents(action.form.entries, action.parameters, object)
|
63
62
|
: action?.inputProperties)?.filter((inputProperty) => inputProperty?.key !== relatedProperty?.relatedPropertyId)
|
@@ -66,26 +65,20 @@ export const ActionDialog = (props) => {
|
|
66
65
|
...action,
|
67
66
|
form: input ? { entries: convertComponentsToForm(input) } : undefined,
|
68
67
|
};
|
69
|
-
const properties = object
|
68
|
+
const properties = object.properties?.filter((prop) => prop.id !== relatedProperty?.relatedPropertyId);
|
70
69
|
setUpdatedObject({
|
71
70
|
...object,
|
72
71
|
properties,
|
73
|
-
actions: concat(object
|
72
|
+
actions: concat(object.actions?.filter((a) => a.id !== action.id) ?? [], [updatedAction]),
|
74
73
|
});
|
75
74
|
}, [object]);
|
75
|
+
const isDeleteAction = action.type === 'delete';
|
76
76
|
return (React.createElement(Dialog, { maxWidth: 'md', fullWidth: true, open: open, onClose: (e, reason) => reason !== 'backdropClick' && onClose },
|
77
77
|
React.createElement(DialogTitle, { sx: styles.dialogTitle },
|
78
78
|
React.createElement(IconButton, { sx: styles.closeIcon, onClick: onClose },
|
79
79
|
React.createElement(Close, { fontSize: "small" })),
|
80
80
|
action && hasAccess && !loading ? action?.name : ''),
|
81
|
-
React.createElement(DialogContent, null, hasAccess ? (React.createElement(Box, { sx: { width: '100%', marginTop: '10px' } }, action
|
82
|
-
React.createElement(Typography, null,
|
83
|
-
"Are you sure you want to delete this ",
|
84
|
-
object?.name,
|
85
|
-
"?"),
|
86
|
-
React.createElement(Box, { sx: { padding: '25ox 0 10px 0', display: 'flex', justifyContent: 'flex-end' } },
|
87
|
-
React.createElement(Button, { sx: { ...styles.button, ...styles.cancelBtn }, onClick: onClose }, "Cancel"),
|
88
|
-
React.createElement(LoadingButton, { sx: { ...styles.button, ...styles.deleteBtn }, onClick: () => handleSubmit('delete', undefined, instanceId, setSubmitting), loading: submitting }, "Delete")))) : (updatedObject && (React.createElement(Form, { actionId: action.id, actionType: action.type, apiServices: objectInputCommonProps.apiServices, object: updatedObject, instance: instanceInput, onSave: async (data, setSubmitting) => handleSubmit(action.type, data, instanceId, setSubmitting), objectInputCommonProps: objectInputCommonProps, closeModal: onClose, queryAddresses: queryAddresses, user: user }))))) : (React.createElement(React.Fragment, null, loading ? (React.createElement(React.Fragment, null,
|
81
|
+
React.createElement(DialogContent, null, hasAccess ? (React.createElement(Box, { sx: { width: '100%', marginTop: '10px' } }, (updatedObject || isDeleteAction) && (React.createElement(Form, { actionId: action.id, actionType: action.type, apiServices: objectInputCommonProps.apiServices, object: !isDeleteAction ? updatedObject : object, instance: instanceInput, onSave: async (data, setSubmitting) => handleSubmit(action.type, data, instanceId, setSubmitting), objectInputCommonProps: objectInputCommonProps, closeModal: onClose, queryAddresses: queryAddresses, user: user })))) : (React.createElement(React.Fragment, null, loading ? (React.createElement(React.Fragment, null,
|
89
82
|
React.createElement(Skeleton, { height: '30px', animation: 'wave' }),
|
90
83
|
React.createElement(Skeleton, { height: '30px', animation: 'wave' }),
|
91
84
|
React.createElement(Skeleton, { height: '30px', animation: 'wave' }))) : (React.createElement(ErrorComponent, { code: 'AccessDenied', message: 'You do not have permission to perform this action.', styles: { boxShadow: 'none' } })))))));
|
@@ -1,6 +1,5 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { ApiServices, ObjWithRoot, ObjectInstance, Property, ViewLayoutEntityReference } from '@evoke-platform/context';
|
3
|
-
export
|
2
|
+
export type DropdownRepeatableFieldProps = {
|
4
3
|
id: string;
|
5
4
|
property: Property;
|
6
5
|
instance: ObjectInstance;
|
@@ -1,7 +1,6 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { DropdownViewLayout, Obj, ObjectInstance, Property } from '@evoke-platform/context';
|
3
2
|
import { AutocompleteOption } from '../../../../../core';
|
4
|
-
|
3
|
+
type DropdownRepeatableFieldInputProps = {
|
5
4
|
id: string;
|
6
5
|
property: Property;
|
7
6
|
readOnly: boolean;
|
@@ -29,7 +28,7 @@ declare type DropdownRepeatableFieldInputProps = {
|
|
29
28
|
};
|
30
29
|
setDropdownSelections?: (middleObjectInstances: ObjectInstance[]) => void;
|
31
30
|
};
|
32
|
-
export
|
31
|
+
export type DropdownRepeatableFieldInputOption = AutocompleteOption & {
|
33
32
|
endObjectId: string;
|
34
33
|
middleObjectId?: string;
|
35
34
|
subLabel?: string;
|
@@ -1,6 +1,5 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { ApiServices, ObjectInstance, Property, UserAccount, ViewLayoutEntityReference } from '@evoke-platform/context';
|
3
|
-
export
|
2
|
+
export type ObjectPropertyInputProps = {
|
4
3
|
property: Property;
|
5
4
|
instance: ObjectInstance;
|
6
5
|
canUpdateProperty: boolean;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ObjWithRoot, ObjectInstance, ViewLayoutEntityReference } from '@evoke-platform/context';
|
2
2
|
import { ReactComponent } from '@formio/react';
|
3
3
|
import { BaseFormComponentProps } from '../../types';
|
4
|
-
|
4
|
+
type RepeatableFieldComponentProps = BaseFormComponentProps & {
|
5
5
|
middleObject: ObjWithRoot;
|
6
6
|
initialMiddleObjectInstances: ObjectInstance[];
|
7
7
|
getMiddleObjectInstances: () => Promise<ObjectInstance[]>;
|
package/dist/published/components/custom/Form/FormComponents/UserComponent/UserProperty.d.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { ApiServices, Property, UserAccount } from '@evoke-platform/context';
|
3
2
|
import { AutocompleteOption } from '../../../../core';
|
4
|
-
export
|
3
|
+
export type UserPropertyProps = {
|
5
4
|
id: string;
|
6
5
|
property: Property;
|
7
6
|
apiServices: ApiServices;
|
@@ -25,7 +25,7 @@ export class ViewOnlyComponent extends ReactComponent {
|
|
25
25
|
this.showValue = this.showValue.bind(this);
|
26
26
|
}
|
27
27
|
showValue(value) {
|
28
|
-
if (value
|
28
|
+
if (value === null || value === undefined)
|
29
29
|
return React.createElement("span", null, "\u00A0");
|
30
30
|
switch (this.component.type) {
|
31
31
|
case 'ViewOnlyObject':
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ApiServices, ObjectInstance, Property, UserAccount, ViewLayoutEntityReference } from '@evoke-platform/context';
|
2
2
|
import { ReactComponent } from '@formio/react';
|
3
3
|
import { AutocompleteOption } from '../../core';
|
4
|
-
export
|
4
|
+
export type BaseFormComponentProps = {
|
5
5
|
key: string;
|
6
6
|
id: string;
|
7
7
|
type: string;
|
@@ -51,7 +51,7 @@ export declare type BaseFormComponentProps = {
|
|
51
51
|
baseUrl: string;
|
52
52
|
apiServices: ApiServices;
|
53
53
|
};
|
54
|
-
export
|
54
|
+
export type ObjectPropertyInputProps = {
|
55
55
|
id: string;
|
56
56
|
instance: ObjectInstance;
|
57
57
|
property: Property;
|
@@ -79,7 +79,7 @@ export declare type ObjectPropertyInputProps = {
|
|
79
79
|
viewLayout?: ViewLayoutEntityReference;
|
80
80
|
richTextEditor?: typeof ReactComponent;
|
81
81
|
};
|
82
|
-
export
|
82
|
+
export type Address = {
|
83
83
|
line1?: string;
|
84
84
|
line2?: string;
|
85
85
|
city?: string;
|
@@ -87,15 +87,15 @@ export declare type Address = {
|
|
87
87
|
state?: string;
|
88
88
|
zipCode?: string;
|
89
89
|
};
|
90
|
-
export
|
90
|
+
export type User = {
|
91
91
|
id: string;
|
92
92
|
name: string;
|
93
93
|
status: string;
|
94
94
|
};
|
95
|
-
export
|
95
|
+
export type AccessCheck = {
|
96
96
|
result: boolean;
|
97
97
|
};
|
98
|
-
export
|
98
|
+
export type Document = {
|
99
99
|
id: string;
|
100
100
|
name: string;
|
101
101
|
contentType: string;
|
@@ -106,7 +106,7 @@ export declare type Document = {
|
|
106
106
|
};
|
107
107
|
versionId?: string;
|
108
108
|
};
|
109
|
-
export
|
109
|
+
export type SavedDocumentReference = {
|
110
110
|
id: string;
|
111
111
|
name: string;
|
112
112
|
};
|
@@ -23,8 +23,8 @@ export declare function getMiddleInstance(instanceId: string, property: Property
|
|
23
23
|
export declare function getPrefixedUrl(url: string): string;
|
24
24
|
export declare function addObjectPropertiesToComponentProps(properties: Property[], formComponents: any[], instance?: ObjectInstance, objectPropertyInputProps?: ObjectPropertyInputProps, autoSave?: (data: Record<string, unknown>) => void, readOnly?: boolean, defaultPages?: Record<string, string>, navigateTo?: (path: string) => void, queryAddresses?: unknown, apiServices?: ApiServices, isModal?: boolean, fieldHeight?: 'small' | 'medium', richTextEditor?: typeof ReactComponent): Promise<ActionInput[]>;
|
25
25
|
export declare function getDefaultValue(initialValue: unknown, selectOptions?: AutocompleteOption[]): unknown;
|
26
|
-
export declare const buildComponentPropsFromObjectProperties: (properties: Property[], objectId: string, instance?: ObjectInstance, objectPropertyInputProps?: ObjectPropertyInputProps, hasActionPermissions?: boolean, autoSave?: (
|
27
|
-
export declare const buildComponentPropsFromDocumentProperties: (documentProperties: [string, unknown][], readOnly?: boolean, autoSave?: (
|
26
|
+
export declare const buildComponentPropsFromObjectProperties: (properties: Property[], objectId: string, instance?: ObjectInstance, objectPropertyInputProps?: ObjectPropertyInputProps, hasActionPermissions?: boolean, autoSave?: (data: Record<string, unknown>) => void, readOnly?: boolean, queryAddresses?: unknown, isModal?: boolean, fieldHeight?: "small" | "medium", richTextEditor?: typeof ReactComponent) => unknown[];
|
27
|
+
export declare const buildComponentPropsFromDocumentProperties: (documentProperties: [string, unknown][], readOnly?: boolean, autoSave?: (data: Record<string, unknown>) => void, fieldHeight?: "small" | "medium") => {
|
28
28
|
type: string;
|
29
29
|
key: string;
|
30
30
|
label: string;
|
@@ -35,7 +35,7 @@ const DatePickerSelect = (props) => {
|
|
35
35
|
setValue(date);
|
36
36
|
onChange(property.id, date, property);
|
37
37
|
};
|
38
|
-
return readOnly ? (React.createElement(InputFieldComponent, { ...
|
38
|
+
return readOnly ? (React.createElement(InputFieldComponent, { ...props, defaultValue: asMonthDayYearFormat(value) })) : (React.createElement(LocalizationProvider, null,
|
39
39
|
React.createElement(DatePicker, { value: value, onChange: handleChange, inputFormat: "MM/dd/yyyy", renderInput: (params) => (React.createElement(TextField, { ...params, id: id, error: error, errorMessage: errorMessage, onBlur: onBlur, fullWidth: true, required: required, sx: { background: 'white', borderRadius: '8px' }, size: size ?? 'medium', ...(additionalProps ?? {}) })) })));
|
40
40
|
};
|
41
41
|
export default DatePickerSelect;
|
package/dist/published/components/custom/FormField/DateTimePickerSelect/DateTimePickerSelect.js
CHANGED
@@ -42,7 +42,7 @@ const DateTimePickerSelect = (props) => {
|
|
42
42
|
setValue(date);
|
43
43
|
props.onChange(property.id, date, property);
|
44
44
|
};
|
45
|
-
return readOnly ? (React.createElement(InputFieldComponent, { ...
|
45
|
+
return readOnly ? (React.createElement(InputFieldComponent, { ...props, defaultValue: formatDateTime(value) })) : (React.createElement(LocalizationProvider, null,
|
46
46
|
React.createElement(DateTimePicker, { value: value, onChange: handleChange, renderInput: (params) => (React.createElement(TextField, { ...params, id: id, error: error, errorMessage: errorMessage, onBlur: onBlur, fullWidth: true, required: required, sx: { background: 'white', borderRadius: '8px' }, size: size ?? 'medium', ...(additionalProps ?? {}) })) })));
|
47
47
|
};
|
48
48
|
export default DateTimePickerSelect;
|
@@ -2,7 +2,7 @@ import { FocusEventHandler, ReactNode } from 'react';
|
|
2
2
|
import { ObjectProperty } from '../../../types';
|
3
3
|
import { AutocompleteOption } from '../../core';
|
4
4
|
import { Address } from './AddressFieldComponent/addressFieldComponent';
|
5
|
-
export
|
5
|
+
export type FormFieldProps = {
|
6
6
|
id?: string;
|
7
7
|
property: ObjectProperty;
|
8
8
|
onChange: Function;
|
@@ -1,8 +1,7 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { Obj } from '@evoke-platform/context';
|
3
2
|
import { History } from '../../../types';
|
4
|
-
export declare const nanoid: (size?: number
|
5
|
-
|
3
|
+
export declare const nanoid: (size?: number) => string;
|
4
|
+
type HistoryDataProps = {
|
6
5
|
records: History[];
|
7
6
|
documentHistory?: Record<string, History[]>;
|
8
7
|
object: Obj;
|
@@ -1,7 +1,6 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { Obj } from '@evoke-platform/context';
|
3
2
|
import { History } from '../../../types';
|
4
|
-
export
|
3
|
+
export type HistoryLogProps = {
|
5
4
|
/** The object instance associated with the history log */
|
6
5
|
object: Obj;
|
7
6
|
/** An array of history entries representing the log. */
|
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
export declare type DropdownOption = {
|
1
|
+
export type DropdownOption = {
|
3
2
|
id?: string;
|
4
3
|
label: string;
|
5
4
|
value: boolean;
|
@@ -7,7 +6,7 @@ export declare type DropdownOption = {
|
|
7
6
|
tooltip?: string;
|
8
7
|
deleted?: boolean;
|
9
8
|
};
|
10
|
-
export
|
9
|
+
export type MultiSelectProps = {
|
11
10
|
options: DropdownOption[];
|
12
11
|
onChange: (options: DropdownOption[]) => void;
|
13
12
|
maxHeight?: number;
|
@@ -69,7 +69,7 @@ export default function MultiSelect(props) {
|
|
69
69
|
}, [optionsArray]);
|
70
70
|
const handleFlagChange = (event, idOrLabel) => {
|
71
71
|
const newOptions = optionsArray.map((option) => {
|
72
|
-
if (idOrLabel === option.id ?? option.label) {
|
72
|
+
if (idOrLabel === (option.id ?? option.label)) {
|
73
73
|
option.value = event.target.checked;
|
74
74
|
}
|
75
75
|
return option;
|
@@ -1,11 +1,10 @@
|
|
1
|
-
|
2
|
-
export declare type DynamicHeaders = {
|
1
|
+
export type DynamicHeaders = {
|
3
2
|
field: string;
|
4
3
|
displayTitle: string;
|
5
4
|
mapping: string;
|
6
5
|
isError?: (field: Record<string, unknown>) => boolean;
|
7
6
|
};
|
8
|
-
export
|
7
|
+
export type RepeatableFieldProps = {
|
9
8
|
children: Function;
|
10
9
|
onChange: Function;
|
11
10
|
dynamicHeaders?: DynamicHeaders;
|
@@ -1,10 +1,9 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { CustomAvatarProps } from '../../core/Avatar/Avatar';
|
3
|
-
|
2
|
+
type User = {
|
4
3
|
id: string;
|
5
4
|
name: string;
|
6
5
|
};
|
7
|
-
export
|
6
|
+
export type UserAvatarProps = CustomAvatarProps & {
|
8
7
|
user?: User;
|
9
8
|
imageUrl?: string;
|
10
9
|
};
|