@form-eng/mui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +138 -0
- package/dist/index.d.mts +141 -0
- package/dist/index.d.ts +141 -0
- package/dist/index.js +1036 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +995 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +67 -0
package/README.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# @form-eng/mui
|
|
2
|
+
|
|
3
|
+
Material UI (MUI) field components for [`@form-eng/core`](https://www.npmjs.com/package/@form-eng/core). Provides 13 editable and 6 read-only field types that plug into the core form engine.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @form-eng/core @form-eng/mui @mui/material @emotion/react @emotion/styled
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Peer dependencies: `react`, `react-dom`, `react-hook-form`, `@mui/material`, `@form-eng/core`
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import {
|
|
17
|
+
RulesEngineProvider,
|
|
18
|
+
InjectedFieldProvider,
|
|
19
|
+
UseInjectedFieldContext,
|
|
20
|
+
FormEngine,
|
|
21
|
+
} from "@form-eng/core";
|
|
22
|
+
import { createMuiFieldRegistry } from "@form-eng/mui";
|
|
23
|
+
import { ThemeProvider, createTheme } from "@mui/material";
|
|
24
|
+
import { useEffect } from "react";
|
|
25
|
+
|
|
26
|
+
const theme = createTheme();
|
|
27
|
+
|
|
28
|
+
function FieldRegistrar({ children }: { children: React.ReactNode }) {
|
|
29
|
+
const { setInjectedFields } = UseInjectedFieldContext();
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
setInjectedFields(createMuiFieldRegistry());
|
|
32
|
+
}, []);
|
|
33
|
+
return <>{children}</>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function App() {
|
|
37
|
+
return (
|
|
38
|
+
<ThemeProvider theme={theme}>
|
|
39
|
+
<RulesEngineProvider>
|
|
40
|
+
<InjectedFieldProvider>
|
|
41
|
+
<FieldRegistrar>
|
|
42
|
+
<FormEngine
|
|
43
|
+
configName="myForm"
|
|
44
|
+
programName="myApp"
|
|
45
|
+
fieldConfigs={{
|
|
46
|
+
name: { type: "Textbox", label: "Name", required: true },
|
|
47
|
+
status: {
|
|
48
|
+
type: "Dropdown",
|
|
49
|
+
label: "Status",
|
|
50
|
+
options: [
|
|
51
|
+
{ value: "Active", label: "Active" },
|
|
52
|
+
{ value: "Inactive", label: "Inactive" },
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
}}
|
|
56
|
+
defaultValues={{ name: "", status: "Active" }}
|
|
57
|
+
saveData={async (data) => data}
|
|
58
|
+
/>
|
|
59
|
+
</FieldRegistrar>
|
|
60
|
+
</InjectedFieldProvider>
|
|
61
|
+
</RulesEngineProvider>
|
|
62
|
+
</ThemeProvider>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Available Fields
|
|
68
|
+
|
|
69
|
+
### Editable Fields
|
|
70
|
+
|
|
71
|
+
| Component Key | Component | MUI Component | Description |
|
|
72
|
+
|---------------|-----------|---------------|-------------|
|
|
73
|
+
| `Textbox` | `HookTextbox` | `TextField` | Single-line text input |
|
|
74
|
+
| `Number` | `HookNumber` | `TextField` (type=number) | Numeric input with validation |
|
|
75
|
+
| `Toggle` | `HookToggle` | `Switch` + `FormControlLabel` | Boolean toggle switch |
|
|
76
|
+
| `Dropdown` | `HookDropdown` | `Select` + `MenuItem` | Single-select dropdown |
|
|
77
|
+
| `Multiselect` | `HookMultiSelect` | `Select` (multiple) + `Chip` | Multi-select dropdown |
|
|
78
|
+
| `DateControl` | `HookDateControl` | `TextField` (type=date) | Date picker with clear button |
|
|
79
|
+
| `Slider` | `HookSlider` | `Slider` | Numeric slider |
|
|
80
|
+
| `SimpleDropdown` | `HookSimpleDropdown` | `Select` + `MenuItem` | Dropdown from string array in config |
|
|
81
|
+
| `MultiSelectSearch` | `HookMultiSelectSearch` | `Autocomplete` (multiple) | Searchable multi-select |
|
|
82
|
+
| `Textarea` | `HookPopOutEditor` | `TextField` (multiline) + `Dialog` | Multiline text with expand-to-modal |
|
|
83
|
+
| `DocumentLinks` | `HookDocumentLinks` | `List` + `TextField` + `IconButton` | URL link CRUD |
|
|
84
|
+
| `StatusDropdown` | `HookStatusDropdown` | `Select` with color dots | Dropdown with color status indicator |
|
|
85
|
+
| `DynamicFragment` | `HookFragment` | Hidden input | Hidden field (form state only) |
|
|
86
|
+
|
|
87
|
+
### Read-Only Fields
|
|
88
|
+
|
|
89
|
+
| Component Key | Component | MUI Component | Description |
|
|
90
|
+
|---------------|-----------|---------------|-------------|
|
|
91
|
+
| `ReadOnly` | `HookReadOnly` | `Typography` | Plain text display |
|
|
92
|
+
| `ReadOnlyArray` | `HookReadOnlyArray` | `Typography` | Array of strings |
|
|
93
|
+
| `ReadOnlyDateTime` | `HookReadOnlyDateTime` | `Typography` | Formatted date/time |
|
|
94
|
+
| `ReadOnlyCumulativeNumber` | `HookReadOnlyCumulativeNumber` | `Typography` | Computed sum of other fields |
|
|
95
|
+
| `ReadOnlyRichText` | `HookReadOnlyRichText` | `dangerouslySetInnerHTML` | Rendered HTML |
|
|
96
|
+
| `ReadOnlyWithButton` | `HookReadOnlyWithButton` | `Typography` + `Button` | Text with action button |
|
|
97
|
+
|
|
98
|
+
## Registry Setup
|
|
99
|
+
|
|
100
|
+
`createMuiFieldRegistry()` returns a `Dictionary<JSX.Element>` mapping all component keys to their MUI implementations. You can extend or override individual fields:
|
|
101
|
+
|
|
102
|
+
```tsx
|
|
103
|
+
import { createMuiFieldRegistry } from "@form-eng/mui";
|
|
104
|
+
|
|
105
|
+
const fields = {
|
|
106
|
+
...createMuiFieldRegistry(),
|
|
107
|
+
Textbox: <MyCustomTextbox />, // override built-in
|
|
108
|
+
RichEditor: <MyRichEditor />, // add new type
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
setInjectedFields(fields);
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Supporting Components
|
|
115
|
+
|
|
116
|
+
The package also exports supporting components:
|
|
117
|
+
|
|
118
|
+
- **`ReadOnlyText`** -- Read-only text display using MUI Typography
|
|
119
|
+
- **`StatusMessage`** -- Error/warning/saving status messages
|
|
120
|
+
- **`HookFormLoading`** -- Skeleton loading placeholder using MUI Skeleton
|
|
121
|
+
|
|
122
|
+
## Works with Core v1.3.0
|
|
123
|
+
|
|
124
|
+
When paired with `@form-eng/core` v1.3.0+, you automatically get:
|
|
125
|
+
|
|
126
|
+
- **Error boundary** -- each field is individually wrapped in `FormErrorBoundary`, so one crashing field does not take down the form
|
|
127
|
+
- **Save reliability** -- AbortController cancels in-flight saves, configurable timeout and retry with exponential backoff
|
|
128
|
+
- **Accessibility** -- focus trap in modals, focus-to-first-error on validation failure, ARIA live regions for status announcements
|
|
129
|
+
- **Draft persistence** -- `useDraftPersistence` hook auto-saves form state to localStorage; `useBeforeUnload` warns on page leave
|
|
130
|
+
- **Theming render props** -- `FieldWrapper` accepts `renderLabel`, `renderError`, `renderStatus` for custom field chrome
|
|
131
|
+
- **CSS custom properties** -- override `--fe-error-color`, `--fe-field-gap`, etc. via optional `styles.css`
|
|
132
|
+
- **DevTools** -- `FormDevTools` component for debugging business rules, form values, and errors
|
|
133
|
+
- **JSON Schema import** -- `jsonSchemaToFieldConfig()` converts JSON Schema to field configs
|
|
134
|
+
- **Lazy field registry** -- `createLazyFieldRegistry()` for on-demand field component loading
|
|
135
|
+
|
|
136
|
+
## License
|
|
137
|
+
|
|
138
|
+
MIT
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { IFieldProps, Dictionary } from '@form-eng/core';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { FieldError } from 'react-hook-form';
|
|
5
|
+
|
|
6
|
+
interface ITextboxProps {
|
|
7
|
+
ellipsifyTextCharacters?: number;
|
|
8
|
+
placeHolder?: string;
|
|
9
|
+
multiline?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const Textbox: (props: IFieldProps<ITextboxProps>) => react_jsx_runtime.JSX.Element;
|
|
12
|
+
|
|
13
|
+
declare const NumberField: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
14
|
+
|
|
15
|
+
declare const Toggle: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
16
|
+
|
|
17
|
+
interface IDropdownProps {
|
|
18
|
+
placeHolder?: string;
|
|
19
|
+
setDefaultKeyIfOnlyOneOption?: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare const Dropdown: (props: IFieldProps<IDropdownProps>) => react_jsx_runtime.JSX.Element;
|
|
22
|
+
|
|
23
|
+
declare const MultiSelect: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
declare const DateControl: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
26
|
+
|
|
27
|
+
interface ISliderProps {
|
|
28
|
+
max?: number;
|
|
29
|
+
min?: number;
|
|
30
|
+
step?: number;
|
|
31
|
+
}
|
|
32
|
+
declare const Slider: (props: IFieldProps<ISliderProps>) => react_jsx_runtime.JSX.Element;
|
|
33
|
+
|
|
34
|
+
declare const DynamicFragment: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
35
|
+
|
|
36
|
+
interface ISimpleDropdownProps {
|
|
37
|
+
dropdownOptions?: string[];
|
|
38
|
+
placeHolder?: string;
|
|
39
|
+
}
|
|
40
|
+
declare const SimpleDropdown: (props: IFieldProps<ISimpleDropdownProps>) => react_jsx_runtime.JSX.Element;
|
|
41
|
+
|
|
42
|
+
declare const MultiSelectSearch: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
44
|
+
interface IPopOutEditorProps {
|
|
45
|
+
autoAdjustHeight?: boolean;
|
|
46
|
+
numberOfRows?: number;
|
|
47
|
+
ellipsifyTextCharacters?: number;
|
|
48
|
+
additionalInfo?: string;
|
|
49
|
+
maxLimit?: number;
|
|
50
|
+
saveCallback?: () => void;
|
|
51
|
+
renderExtraModalFooter?: () => React.ReactNode;
|
|
52
|
+
}
|
|
53
|
+
declare const PopOutEditor: (props: IFieldProps<IPopOutEditorProps>) => react_jsx_runtime.JSX.Element;
|
|
54
|
+
|
|
55
|
+
interface IDocumentLink {
|
|
56
|
+
title: string;
|
|
57
|
+
url: string;
|
|
58
|
+
}
|
|
59
|
+
declare const DocumentLinks: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
60
|
+
|
|
61
|
+
interface IStatusDropdownProps {
|
|
62
|
+
placeHolder?: string;
|
|
63
|
+
statusColors?: Dictionary<string>;
|
|
64
|
+
}
|
|
65
|
+
declare const StatusDropdown: (props: IFieldProps<IStatusDropdownProps>) => react_jsx_runtime.JSX.Element;
|
|
66
|
+
|
|
67
|
+
interface IReadOnlyFieldProps {
|
|
68
|
+
readonly value?: string;
|
|
69
|
+
readonly fieldName?: string;
|
|
70
|
+
readonly labelClassName?: string;
|
|
71
|
+
readonly valueClassName?: string;
|
|
72
|
+
readonly showControlOnSide?: boolean;
|
|
73
|
+
readonly containerClassName?: string;
|
|
74
|
+
readonly ellipsifyTextCharacters?: number;
|
|
75
|
+
}
|
|
76
|
+
declare const ReadOnlyText: React.FunctionComponent<IReadOnlyFieldProps>;
|
|
77
|
+
|
|
78
|
+
interface IReadOnlyProps extends IReadOnlyFieldProps {
|
|
79
|
+
}
|
|
80
|
+
declare const ReadOnly: (props: IFieldProps<IReadOnlyProps>) => react_jsx_runtime.JSX.Element;
|
|
81
|
+
|
|
82
|
+
declare const ReadOnlyArray: (props: IFieldProps<IReadOnlyFieldProps>) => react_jsx_runtime.JSX.Element;
|
|
83
|
+
|
|
84
|
+
interface IReadOnlyDateTimeProps {
|
|
85
|
+
isListView?: boolean;
|
|
86
|
+
hidetimeStamp?: boolean;
|
|
87
|
+
}
|
|
88
|
+
declare const ReadOnlyDateTime: (props: IFieldProps<IReadOnlyDateTimeProps>) => react_jsx_runtime.JSX.Element;
|
|
89
|
+
|
|
90
|
+
interface IReadOnlyCumulativeNumberProps extends IReadOnlyFieldProps {
|
|
91
|
+
dependencyFields?: string[];
|
|
92
|
+
}
|
|
93
|
+
declare const ReadOnlyCumulativeNumber: (props: IFieldProps<IReadOnlyCumulativeNumberProps>) => react_jsx_runtime.JSX.Element;
|
|
94
|
+
|
|
95
|
+
declare const ReadOnlyRichText: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
96
|
+
|
|
97
|
+
interface IReadOnlyWithButtonProps extends IReadOnlyFieldProps {
|
|
98
|
+
containerClassName?: string;
|
|
99
|
+
buttonText?: string;
|
|
100
|
+
onButtonClick?: () => void;
|
|
101
|
+
}
|
|
102
|
+
declare const ReadOnlyWithButton: (props: IFieldProps<IReadOnlyWithButtonProps>) => react_jsx_runtime.JSX.Element;
|
|
103
|
+
|
|
104
|
+
interface IStatusMessageProps {
|
|
105
|
+
id?: string;
|
|
106
|
+
readonly error?: FieldError;
|
|
107
|
+
readonly errorCount?: number;
|
|
108
|
+
readonly savePending?: boolean;
|
|
109
|
+
readonly saving?: boolean;
|
|
110
|
+
}
|
|
111
|
+
declare const StatusMessage: React.FunctionComponent<IStatusMessageProps>;
|
|
112
|
+
|
|
113
|
+
interface IFormLoadingProps {
|
|
114
|
+
loadingShimmerCount?: number;
|
|
115
|
+
loadingFieldShimmerHeight?: number;
|
|
116
|
+
inPanel?: boolean;
|
|
117
|
+
hideTitleShimmer?: boolean;
|
|
118
|
+
}
|
|
119
|
+
declare const FormLoading: (props: IFormLoadingProps) => react_jsx_runtime.JSX.Element;
|
|
120
|
+
|
|
121
|
+
/** Creates the default Material UI field registry for use with InjectedFieldProvider */
|
|
122
|
+
declare function createMuiFieldRegistry(): Dictionary<React.JSX.Element>;
|
|
123
|
+
|
|
124
|
+
declare const FieldClassName: (className: string, error?: FieldError) => string;
|
|
125
|
+
declare const GetFieldDataTestId: (fieldName: string, programName?: string, entityType?: string, entityId?: string) => string;
|
|
126
|
+
declare function formatDateTime(dateStr: string, options?: {
|
|
127
|
+
hideTimestamp?: boolean;
|
|
128
|
+
}): string;
|
|
129
|
+
declare const DocumentLinksStrings: {
|
|
130
|
+
link: string;
|
|
131
|
+
addLink: string;
|
|
132
|
+
addAnotherLink: string;
|
|
133
|
+
deleteLink: string;
|
|
134
|
+
confirmDeleteLink: string;
|
|
135
|
+
delete: string;
|
|
136
|
+
cancel: string;
|
|
137
|
+
saveChanges: string;
|
|
138
|
+
save: string;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export { DateControl, DocumentLinks, DocumentLinksStrings, Dropdown, DynamicFragment, FieldClassName, FormLoading, GetFieldDataTestId, type IDocumentLink, type IReadOnlyFieldProps, MultiSelect, MultiSelectSearch, NumberField as Number, PopOutEditor, ReadOnly, ReadOnlyArray, ReadOnlyCumulativeNumber, ReadOnlyDateTime, ReadOnlyRichText, ReadOnlyText, ReadOnlyWithButton, SimpleDropdown, Slider, StatusDropdown, StatusMessage, Textbox, Toggle, createMuiFieldRegistry, formatDateTime };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { IFieldProps, Dictionary } from '@form-eng/core';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { FieldError } from 'react-hook-form';
|
|
5
|
+
|
|
6
|
+
interface ITextboxProps {
|
|
7
|
+
ellipsifyTextCharacters?: number;
|
|
8
|
+
placeHolder?: string;
|
|
9
|
+
multiline?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const Textbox: (props: IFieldProps<ITextboxProps>) => react_jsx_runtime.JSX.Element;
|
|
12
|
+
|
|
13
|
+
declare const NumberField: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
14
|
+
|
|
15
|
+
declare const Toggle: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
16
|
+
|
|
17
|
+
interface IDropdownProps {
|
|
18
|
+
placeHolder?: string;
|
|
19
|
+
setDefaultKeyIfOnlyOneOption?: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare const Dropdown: (props: IFieldProps<IDropdownProps>) => react_jsx_runtime.JSX.Element;
|
|
22
|
+
|
|
23
|
+
declare const MultiSelect: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
declare const DateControl: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
26
|
+
|
|
27
|
+
interface ISliderProps {
|
|
28
|
+
max?: number;
|
|
29
|
+
min?: number;
|
|
30
|
+
step?: number;
|
|
31
|
+
}
|
|
32
|
+
declare const Slider: (props: IFieldProps<ISliderProps>) => react_jsx_runtime.JSX.Element;
|
|
33
|
+
|
|
34
|
+
declare const DynamicFragment: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
35
|
+
|
|
36
|
+
interface ISimpleDropdownProps {
|
|
37
|
+
dropdownOptions?: string[];
|
|
38
|
+
placeHolder?: string;
|
|
39
|
+
}
|
|
40
|
+
declare const SimpleDropdown: (props: IFieldProps<ISimpleDropdownProps>) => react_jsx_runtime.JSX.Element;
|
|
41
|
+
|
|
42
|
+
declare const MultiSelectSearch: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
44
|
+
interface IPopOutEditorProps {
|
|
45
|
+
autoAdjustHeight?: boolean;
|
|
46
|
+
numberOfRows?: number;
|
|
47
|
+
ellipsifyTextCharacters?: number;
|
|
48
|
+
additionalInfo?: string;
|
|
49
|
+
maxLimit?: number;
|
|
50
|
+
saveCallback?: () => void;
|
|
51
|
+
renderExtraModalFooter?: () => React.ReactNode;
|
|
52
|
+
}
|
|
53
|
+
declare const PopOutEditor: (props: IFieldProps<IPopOutEditorProps>) => react_jsx_runtime.JSX.Element;
|
|
54
|
+
|
|
55
|
+
interface IDocumentLink {
|
|
56
|
+
title: string;
|
|
57
|
+
url: string;
|
|
58
|
+
}
|
|
59
|
+
declare const DocumentLinks: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
60
|
+
|
|
61
|
+
interface IStatusDropdownProps {
|
|
62
|
+
placeHolder?: string;
|
|
63
|
+
statusColors?: Dictionary<string>;
|
|
64
|
+
}
|
|
65
|
+
declare const StatusDropdown: (props: IFieldProps<IStatusDropdownProps>) => react_jsx_runtime.JSX.Element;
|
|
66
|
+
|
|
67
|
+
interface IReadOnlyFieldProps {
|
|
68
|
+
readonly value?: string;
|
|
69
|
+
readonly fieldName?: string;
|
|
70
|
+
readonly labelClassName?: string;
|
|
71
|
+
readonly valueClassName?: string;
|
|
72
|
+
readonly showControlOnSide?: boolean;
|
|
73
|
+
readonly containerClassName?: string;
|
|
74
|
+
readonly ellipsifyTextCharacters?: number;
|
|
75
|
+
}
|
|
76
|
+
declare const ReadOnlyText: React.FunctionComponent<IReadOnlyFieldProps>;
|
|
77
|
+
|
|
78
|
+
interface IReadOnlyProps extends IReadOnlyFieldProps {
|
|
79
|
+
}
|
|
80
|
+
declare const ReadOnly: (props: IFieldProps<IReadOnlyProps>) => react_jsx_runtime.JSX.Element;
|
|
81
|
+
|
|
82
|
+
declare const ReadOnlyArray: (props: IFieldProps<IReadOnlyFieldProps>) => react_jsx_runtime.JSX.Element;
|
|
83
|
+
|
|
84
|
+
interface IReadOnlyDateTimeProps {
|
|
85
|
+
isListView?: boolean;
|
|
86
|
+
hidetimeStamp?: boolean;
|
|
87
|
+
}
|
|
88
|
+
declare const ReadOnlyDateTime: (props: IFieldProps<IReadOnlyDateTimeProps>) => react_jsx_runtime.JSX.Element;
|
|
89
|
+
|
|
90
|
+
interface IReadOnlyCumulativeNumberProps extends IReadOnlyFieldProps {
|
|
91
|
+
dependencyFields?: string[];
|
|
92
|
+
}
|
|
93
|
+
declare const ReadOnlyCumulativeNumber: (props: IFieldProps<IReadOnlyCumulativeNumberProps>) => react_jsx_runtime.JSX.Element;
|
|
94
|
+
|
|
95
|
+
declare const ReadOnlyRichText: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
96
|
+
|
|
97
|
+
interface IReadOnlyWithButtonProps extends IReadOnlyFieldProps {
|
|
98
|
+
containerClassName?: string;
|
|
99
|
+
buttonText?: string;
|
|
100
|
+
onButtonClick?: () => void;
|
|
101
|
+
}
|
|
102
|
+
declare const ReadOnlyWithButton: (props: IFieldProps<IReadOnlyWithButtonProps>) => react_jsx_runtime.JSX.Element;
|
|
103
|
+
|
|
104
|
+
interface IStatusMessageProps {
|
|
105
|
+
id?: string;
|
|
106
|
+
readonly error?: FieldError;
|
|
107
|
+
readonly errorCount?: number;
|
|
108
|
+
readonly savePending?: boolean;
|
|
109
|
+
readonly saving?: boolean;
|
|
110
|
+
}
|
|
111
|
+
declare const StatusMessage: React.FunctionComponent<IStatusMessageProps>;
|
|
112
|
+
|
|
113
|
+
interface IFormLoadingProps {
|
|
114
|
+
loadingShimmerCount?: number;
|
|
115
|
+
loadingFieldShimmerHeight?: number;
|
|
116
|
+
inPanel?: boolean;
|
|
117
|
+
hideTitleShimmer?: boolean;
|
|
118
|
+
}
|
|
119
|
+
declare const FormLoading: (props: IFormLoadingProps) => react_jsx_runtime.JSX.Element;
|
|
120
|
+
|
|
121
|
+
/** Creates the default Material UI field registry for use with InjectedFieldProvider */
|
|
122
|
+
declare function createMuiFieldRegistry(): Dictionary<React.JSX.Element>;
|
|
123
|
+
|
|
124
|
+
declare const FieldClassName: (className: string, error?: FieldError) => string;
|
|
125
|
+
declare const GetFieldDataTestId: (fieldName: string, programName?: string, entityType?: string, entityId?: string) => string;
|
|
126
|
+
declare function formatDateTime(dateStr: string, options?: {
|
|
127
|
+
hideTimestamp?: boolean;
|
|
128
|
+
}): string;
|
|
129
|
+
declare const DocumentLinksStrings: {
|
|
130
|
+
link: string;
|
|
131
|
+
addLink: string;
|
|
132
|
+
addAnotherLink: string;
|
|
133
|
+
deleteLink: string;
|
|
134
|
+
confirmDeleteLink: string;
|
|
135
|
+
delete: string;
|
|
136
|
+
cancel: string;
|
|
137
|
+
saveChanges: string;
|
|
138
|
+
save: string;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export { DateControl, DocumentLinks, DocumentLinksStrings, Dropdown, DynamicFragment, FieldClassName, FormLoading, GetFieldDataTestId, type IDocumentLink, type IReadOnlyFieldProps, MultiSelect, MultiSelectSearch, NumberField as Number, PopOutEditor, ReadOnly, ReadOnlyArray, ReadOnlyCumulativeNumber, ReadOnlyDateTime, ReadOnlyRichText, ReadOnlyText, ReadOnlyWithButton, SimpleDropdown, Slider, StatusDropdown, StatusMessage, Textbox, Toggle, createMuiFieldRegistry, formatDateTime };
|