@react-typed-forms/schemas 16.2.2 → 17.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/FORM_EXTENSIONS_GUIDE.md +781 -0
- package/lib/RenderForm.d.ts +22 -5
- package/lib/controlBuilder.d.ts +4 -47
- package/lib/controlRender.d.ts +49 -24
- package/lib/index.cjs +310 -332
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +270 -272
- package/lib/index.js.map +1 -1
- package/lib/renderer/elementSelected.d.ts +8 -0
- package/lib/renderers.d.ts +6 -2
- package/lib/types.d.ts +10 -5
- package/lib/util.d.ts +3 -2
- package/package.json +5 -5
- package/src/RenderForm.tsx +130 -64
- package/src/controlBuilder.ts +6 -193
- package/src/controlRender.tsx +127 -81
- package/src/createFormRenderer.tsx +52 -19
- package/src/index.ts +1 -0
- package/src/renderer/elementSelected.ts +48 -0
- package/src/renderers.tsx +8 -1
- package/src/types.ts +15 -5
- package/src/util.ts +13 -1
package/lib/RenderForm.d.ts
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import { ControlRenderOptions, ControlRenderProps, FormRenderer } from "./controlRender";
|
|
2
|
-
import React, { FC } from "react";
|
|
3
|
-
import { ControlDefinition, FormNode, JsonPath, SchemaDataNode, SchemaField } from "@astroapps/forms-core";
|
|
2
|
+
import React, { FC, MutableRefObject } from "react";
|
|
3
|
+
import { ControlDefinition, ControlDisableType, FormNode, FormNodeUi, FormStateNode, JsonPath, SchemaDataNode, SchemaField } from "@astroapps/forms-core";
|
|
4
4
|
import { Control } from "@react-typed-forms/core";
|
|
5
5
|
export interface RenderFormProps {
|
|
6
6
|
data: SchemaDataNode;
|
|
7
7
|
form: FormNode;
|
|
8
8
|
renderer: FormRenderer;
|
|
9
9
|
options?: ControlRenderOptions;
|
|
10
|
+
stateRef?: MutableRefObject<FormStateNode | null>;
|
|
10
11
|
}
|
|
11
|
-
export declare function RenderForm({ data, form, renderer, options, }: RenderFormProps): React.
|
|
12
|
+
export declare function RenderForm({ data, form, renderer, options, stateRef, }: RenderFormProps): React.JSX.Element;
|
|
13
|
+
export interface RenderFormNodeProps {
|
|
14
|
+
node: FormStateNode;
|
|
15
|
+
renderer: FormRenderer;
|
|
16
|
+
options?: ControlRenderOptions;
|
|
17
|
+
}
|
|
18
|
+
export declare function RenderFormNode({ node: state, renderer, options, }: RenderFormNodeProps): React.ReactNode;
|
|
12
19
|
/**
|
|
13
20
|
* @deprecated Use RenderForm instead.
|
|
14
21
|
*/
|
|
@@ -23,7 +30,7 @@ export declare function ControlRenderer({ definition, fields, renderer, options,
|
|
|
23
30
|
options?: ControlRenderOptions;
|
|
24
31
|
control: Control<any>;
|
|
25
32
|
parentPath?: JsonPath[];
|
|
26
|
-
}): JSX.Element;
|
|
33
|
+
}): React.JSX.Element;
|
|
27
34
|
/**
|
|
28
35
|
* @deprecated Use RenderForm instead.
|
|
29
36
|
*/
|
|
@@ -32,8 +39,18 @@ export declare function NewControlRenderer({ definition, renderer, options, pare
|
|
|
32
39
|
renderer: FormRenderer;
|
|
33
40
|
options?: ControlRenderOptions;
|
|
34
41
|
parentDataNode: SchemaDataNode;
|
|
35
|
-
}): JSX.Element;
|
|
42
|
+
}): React.JSX.Element;
|
|
36
43
|
/**
|
|
37
44
|
* @deprecated Use RenderForm instead.
|
|
38
45
|
*/
|
|
39
46
|
export declare function useControlRenderer(definition: ControlDefinition, fields: SchemaField[], renderer: FormRenderer, options?: ControlRenderOptions): FC<ControlRenderProps>;
|
|
47
|
+
export declare function useAsyncRunner(): {
|
|
48
|
+
runAsync: (cb: () => void) => void;
|
|
49
|
+
};
|
|
50
|
+
export declare class DefaultFormNodeUi implements FormNodeUi {
|
|
51
|
+
protected node: FormStateNode;
|
|
52
|
+
constructor(node: FormStateNode);
|
|
53
|
+
ensureVisible(): void;
|
|
54
|
+
ensureChildVisible(childIndex: number): void;
|
|
55
|
+
getDisabler(type: ControlDisableType): () => () => void;
|
|
56
|
+
}
|
package/lib/controlBuilder.d.ts
CHANGED
|
@@ -1,58 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ControlDefinition, GroupedControlsDefinition, SchemaField, SchemaMap, SchemaNode } from "@astroapps/forms-core";
|
|
2
2
|
import { ActionRendererProps } from "./types";
|
|
3
|
-
export declare function dataControl(field: string, title?: string | null, options?: Partial<DataControlDefinition>): DataControlDefinition;
|
|
4
|
-
export declare function validatorOptions<A extends {
|
|
5
|
-
type: string;
|
|
6
|
-
}>(type: ValidatorType): (options: Omit<A, "type">) => A;
|
|
7
|
-
export declare function adornmentOptions<A extends {
|
|
8
|
-
type: string;
|
|
9
|
-
}>(type: ControlAdornmentType): (options: Omit<A, "type">) => A;
|
|
10
|
-
export declare function renderOptionsFor<A extends RenderOptions>(type: DataRenderType): (options: Omit<A, "type">) => {
|
|
11
|
-
renderOptions: A;
|
|
12
|
-
};
|
|
13
|
-
export declare const autocompleteOptions: (options: Omit<AutocompleteRenderOptions, "type">) => {
|
|
14
|
-
renderOptions: AutocompleteRenderOptions;
|
|
15
|
-
};
|
|
16
|
-
export declare const checkListOptions: (options: Omit<CheckListRenderOptions, "type">) => {
|
|
17
|
-
renderOptions: CheckListRenderOptions;
|
|
18
|
-
};
|
|
19
|
-
export declare const radioButtonOptions: (options: Omit<RadioButtonRenderOptions, "type">) => {
|
|
20
|
-
renderOptions: RadioButtonRenderOptions;
|
|
21
|
-
};
|
|
22
|
-
export declare const lengthValidatorOptions: (options: Omit<LengthValidator, "type">) => LengthValidator;
|
|
23
|
-
export declare const jsonataValidatorOptions: (options: Omit<JsonataValidator, "type">) => JsonataValidator;
|
|
24
|
-
export declare const dateValidatorOptions: (options: Omit<DateValidator, "type">) => DateValidator;
|
|
25
|
-
export declare const accordionOptions: (options: Omit<AccordionAdornment, "type">) => AccordionAdornment;
|
|
26
|
-
export declare const textfieldOptions: (options: Omit<TextfieldRenderOptions, "type">) => {
|
|
27
|
-
renderOptions: TextfieldRenderOptions;
|
|
28
|
-
};
|
|
29
|
-
export declare const displayOnlyOptions: (options: Omit<DisplayOnlyRenderOptions, "type">) => {
|
|
30
|
-
renderOptions: DisplayOnlyRenderOptions;
|
|
31
|
-
};
|
|
32
|
-
export declare const jsonataOptions: (options: Omit<JsonataRenderOptions, "type">) => {
|
|
33
|
-
renderOptions: JsonataRenderOptions;
|
|
34
|
-
};
|
|
35
|
-
export declare function textDisplayControl(text: string, options?: Partial<DisplayControlDefinition>): DisplayControlDefinition;
|
|
36
|
-
export declare function htmlDisplayControl(html: string, options?: Partial<DisplayControlDefinition>): DisplayControlDefinition;
|
|
37
|
-
export declare function dynamicDefaultValue(expr: EntityExpression): DynamicProperty;
|
|
38
|
-
export declare function dynamicReadonly(expr: EntityExpression): DynamicProperty;
|
|
39
|
-
export declare function dynamicVisibility(expr: EntityExpression): DynamicProperty;
|
|
40
|
-
export declare function dynamicDisabled(expr: EntityExpression): DynamicProperty;
|
|
41
|
-
export declare function fieldExpr(field: string): DataExpression;
|
|
42
|
-
export declare function fieldEqExpr(field: string, value: any): DataMatchExpression;
|
|
43
|
-
export declare function jsonataExpr(expression: string): JsonataExpression;
|
|
44
|
-
export declare function groupedControl(children: ControlDefinition[], title?: string, options?: Partial<GroupedControlsDefinition>): GroupedControlsDefinition;
|
|
45
|
-
export declare function compoundControl(field: string, title: string | undefined, children: ControlDefinition[], options?: Partial<DataControlDefinition>): DataControlDefinition;
|
|
46
|
-
export declare function actionControl(actionText: string, actionId: string, options?: Partial<ActionControlDefinition>): ActionControlDefinition;
|
|
47
3
|
export declare function createAction(actionId: string, onClick: () => void, actionText?: string | null, options?: Partial<ActionRendererProps>): ActionRendererProps;
|
|
48
|
-
export declare const emptyGroupDefinition: GroupedControlsDefinition;
|
|
49
4
|
export declare function useControlDefinitionForSchema(sf: SchemaField[], definition?: GroupedControlsDefinition): GroupedControlsDefinition;
|
|
50
5
|
export interface EditorGroup {
|
|
51
6
|
parent: string;
|
|
52
7
|
group: ControlDefinition;
|
|
53
8
|
}
|
|
54
9
|
export interface CustomRenderOptions {
|
|
55
|
-
value
|
|
10
|
+
value?: string;
|
|
56
11
|
name: string;
|
|
57
12
|
fields?: SchemaField[];
|
|
58
13
|
groups?: EditorGroup[];
|
|
@@ -66,6 +21,8 @@ export type ControlDefinitionExtension = {
|
|
|
66
21
|
SchemaValidator?: CustomRenderOptions | CustomRenderOptions[];
|
|
67
22
|
DisplayData?: CustomRenderOptions | CustomRenderOptions[];
|
|
68
23
|
IconReference?: CustomRenderOptions | CustomRenderOptions[];
|
|
24
|
+
ControlDefinition?: CustomRenderOptions | CustomRenderOptions[];
|
|
25
|
+
SchemaField?: CustomRenderOptions | CustomRenderOptions[];
|
|
69
26
|
};
|
|
70
27
|
export declare function applyExtensionToSchema<A extends SchemaMap>(schemaMap: A, extension: ControlDefinitionExtension): A;
|
|
71
28
|
export declare function applyExtensionsToSchema<A extends SchemaMap>(schemaMap: A, extensions: ControlDefinitionExtension[]): A;
|
package/lib/controlRender.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ComponentType, ElementType, HTMLAttributes, Key, ReactElement, ReactNode } from "react";
|
|
2
|
-
import { Control } from "@react-typed-forms/core";
|
|
3
|
-
import { AdornmentPlacement, ArrayActionOptions, ControlAdornment, ControlDefinition,
|
|
2
|
+
import { ChangeListenerFunc, Control } from "@react-typed-forms/core";
|
|
3
|
+
import { AdornmentPlacement, ArrayActionOptions, CheckEntryClasses, ChildNodeSpec, ControlAdornment, ControlDefinition, DataControlDefinition, DisplayData, FieldOption, FormStateNode, GroupRenderOptions, JsonPath, RenderOptions, SchemaDataNode, SchemaField, SchemaInterface } from "@astroapps/forms-core";
|
|
4
4
|
import { ControlClasses } from "./util";
|
|
5
5
|
import { ActionRendererProps, ControlActionHandler, ControlDataContext, RunExpression } from "./types";
|
|
6
6
|
export interface HtmlIconProperties {
|
|
@@ -25,6 +25,7 @@ export interface HtmlDivProperties {
|
|
|
25
25
|
html?: string;
|
|
26
26
|
nativeRef?: (e: HTMLElement | null) => void;
|
|
27
27
|
inline?: boolean;
|
|
28
|
+
role?: string;
|
|
28
29
|
}
|
|
29
30
|
export interface HtmlInputProperties {
|
|
30
31
|
id?: string;
|
|
@@ -42,6 +43,8 @@ export interface HtmlInputProperties {
|
|
|
42
43
|
inputRef?: (e: HTMLElement | null) => void;
|
|
43
44
|
onChangeValue?: (value: string) => void;
|
|
44
45
|
onChangeChecked?: (checked: boolean) => void;
|
|
46
|
+
"aria-describedby"?: string;
|
|
47
|
+
"aria-invalid"?: boolean;
|
|
45
48
|
}
|
|
46
49
|
export interface HtmlButtonProperties {
|
|
47
50
|
className?: string;
|
|
@@ -55,6 +58,31 @@ export interface HtmlButtonProperties {
|
|
|
55
58
|
notWrapInText?: boolean;
|
|
56
59
|
androidRippleColor?: string;
|
|
57
60
|
nonTextContent?: boolean;
|
|
61
|
+
"aria-expanded"?: boolean;
|
|
62
|
+
"aria-controls"?: string;
|
|
63
|
+
}
|
|
64
|
+
export interface CheckRendererOptions {
|
|
65
|
+
className?: string;
|
|
66
|
+
entryClass?: string;
|
|
67
|
+
checkClass?: string;
|
|
68
|
+
labelClass?: string;
|
|
69
|
+
entryWrapperClass?: string;
|
|
70
|
+
selectedClass?: string;
|
|
71
|
+
notSelectedClass?: string;
|
|
72
|
+
}
|
|
73
|
+
export interface CheckButtonsProps {
|
|
74
|
+
id?: string;
|
|
75
|
+
className?: string;
|
|
76
|
+
options?: FieldOption[] | null;
|
|
77
|
+
control: Control<any>;
|
|
78
|
+
classes: CheckRendererOptions;
|
|
79
|
+
controlClasses?: CheckEntryClasses;
|
|
80
|
+
readonly?: boolean;
|
|
81
|
+
type: "checkbox" | "radio";
|
|
82
|
+
isChecked: (c: Control<any>, o: FieldOption) => boolean;
|
|
83
|
+
setChecked: (c: Control<any>, o: FieldOption, checked: boolean) => void;
|
|
84
|
+
entryAdornment?: (c: FieldOption, i: number, selected: boolean) => ReactNode;
|
|
85
|
+
renderer: FormRenderer;
|
|
58
86
|
}
|
|
59
87
|
export interface HtmlComponents {
|
|
60
88
|
Div: ComponentType<HtmlDivProperties>;
|
|
@@ -65,6 +93,7 @@ export interface HtmlComponents {
|
|
|
65
93
|
B: ElementType<HTMLAttributes<HTMLElement>>;
|
|
66
94
|
H1: ElementType<HTMLAttributes<HTMLElement>>;
|
|
67
95
|
Input: ComponentType<HtmlInputProperties>;
|
|
96
|
+
CheckButtons: ComponentType<CheckButtonsProps>;
|
|
68
97
|
}
|
|
69
98
|
/**
|
|
70
99
|
* Interface for rendering different types of form controls.
|
|
@@ -133,13 +162,14 @@ export interface FormRenderer {
|
|
|
133
162
|
*/
|
|
134
163
|
renderLabelText: (props: ReactNode) => ReactNode;
|
|
135
164
|
html: HtmlComponents;
|
|
165
|
+
resolveChildren(c: FormStateNode): ChildNodeSpec[];
|
|
136
166
|
}
|
|
137
167
|
export interface AdornmentProps {
|
|
138
168
|
adornment: ControlAdornment;
|
|
139
169
|
dataContext: ControlDataContext;
|
|
140
170
|
runExpression?: RunExpression;
|
|
141
171
|
designMode?: boolean;
|
|
142
|
-
|
|
172
|
+
formNode: FormStateNode;
|
|
143
173
|
}
|
|
144
174
|
export declare const AppendAdornmentPriority = 0;
|
|
145
175
|
export declare const WrapAdornmentPriority = 1000;
|
|
@@ -153,13 +183,15 @@ export interface ArrayRendererProps {
|
|
|
153
183
|
required: boolean;
|
|
154
184
|
removeAction?: (elemIndex: number) => ActionRendererProps;
|
|
155
185
|
editAction?: (elemIndex: number) => ActionRendererProps;
|
|
156
|
-
renderElement: (elemIndex: number, wrapEntry: (children: ReactNode) => ReactNode) => ReactNode;
|
|
157
|
-
arrayControl
|
|
186
|
+
renderElement: (elemIndex: number, wrapEntry: (key: Key, children: ReactNode) => ReactNode) => ReactNode;
|
|
187
|
+
arrayControl?: Control<any[] | undefined | null>;
|
|
188
|
+
getElementCount(): number;
|
|
158
189
|
className?: string;
|
|
159
190
|
style?: React.CSSProperties;
|
|
160
191
|
min?: number | null;
|
|
161
192
|
max?: number | null;
|
|
162
193
|
disabled?: boolean;
|
|
194
|
+
childOverrideClass?: string | null;
|
|
163
195
|
}
|
|
164
196
|
export interface Visibility {
|
|
165
197
|
visible: boolean;
|
|
@@ -173,6 +205,7 @@ export interface RenderedLayout {
|
|
|
173
205
|
label?: ReactNode;
|
|
174
206
|
children?: ReactNode;
|
|
175
207
|
errorControl?: Control<any>;
|
|
208
|
+
errorId?: string;
|
|
176
209
|
className?: string;
|
|
177
210
|
style?: React.CSSProperties;
|
|
178
211
|
wrapLayout: (layout: ReactElement) => ReactElement;
|
|
@@ -191,6 +224,7 @@ export interface VisibilityRendererProps extends RenderedControl {
|
|
|
191
224
|
export interface ControlLayoutProps {
|
|
192
225
|
label?: LabelRendererProps;
|
|
193
226
|
errorControl?: Control<any>;
|
|
227
|
+
errorId?: string;
|
|
194
228
|
adornments?: AdornmentRenderer[];
|
|
195
229
|
children?: ReactNode;
|
|
196
230
|
processLayout?: (props: ControlLayoutProps) => ControlLayoutProps;
|
|
@@ -277,14 +311,12 @@ export interface DisplayRendererProps {
|
|
|
277
311
|
inline?: boolean;
|
|
278
312
|
}
|
|
279
313
|
export interface ParentRendererProps {
|
|
280
|
-
formNode:
|
|
281
|
-
state: ControlState;
|
|
314
|
+
formNode: FormStateNode;
|
|
282
315
|
renderChild: ChildRenderer;
|
|
283
316
|
className?: string;
|
|
284
317
|
textClass?: string;
|
|
285
318
|
style?: React.CSSProperties;
|
|
286
319
|
dataContext: ControlDataContext;
|
|
287
|
-
getChildState(node: FormNode, parent?: SchemaDataNode): ControlState;
|
|
288
320
|
runExpression: RunExpression;
|
|
289
321
|
designMode?: boolean;
|
|
290
322
|
actionOnClick?: ControlActionHandler;
|
|
@@ -306,6 +338,7 @@ export interface DataRendererProps extends ParentRendererProps {
|
|
|
306
338
|
dataNode: SchemaDataNode;
|
|
307
339
|
displayOnly: boolean;
|
|
308
340
|
inline: boolean;
|
|
341
|
+
errorId: string;
|
|
309
342
|
}
|
|
310
343
|
export interface ControlRenderProps {
|
|
311
344
|
control: Control<any>;
|
|
@@ -313,7 +346,6 @@ export interface ControlRenderProps {
|
|
|
313
346
|
}
|
|
314
347
|
export type CreateDataProps = (controlProps: RenderLayoutProps, definition: DataControlDefinition, control: Control<any>) => DataRendererProps;
|
|
315
348
|
export interface ControlRenderOptions extends ControlClasses {
|
|
316
|
-
formState?: FormState;
|
|
317
349
|
useDataHook?: (c: ControlDefinition) => CreateDataProps;
|
|
318
350
|
actionOnClick?: ControlActionHandler;
|
|
319
351
|
customDisplay?: (customId: string, displayProps: DisplayRendererProps) => ReactNode;
|
|
@@ -326,11 +358,10 @@ export interface ControlRenderOptions extends ControlClasses {
|
|
|
326
358
|
clearHidden?: boolean;
|
|
327
359
|
stateKey?: string;
|
|
328
360
|
schemaInterface?: SchemaInterface;
|
|
329
|
-
variables?: Record<string, any>;
|
|
361
|
+
variables?: (changes: ChangeListenerFunc<any>) => Record<string, any>;
|
|
330
362
|
}
|
|
331
|
-
export declare function defaultDataProps({
|
|
363
|
+
export declare function defaultDataProps({ formNode, style, schemaInterface, styleClass, textClass: tc, displayOnly, inline, ...props }: RenderLayoutProps, definition: DataControlDefinition, control: Control<any>): DataRendererProps;
|
|
332
364
|
export interface ChildRendererOptions {
|
|
333
|
-
parentDataNode?: SchemaDataNode;
|
|
334
365
|
inline?: boolean;
|
|
335
366
|
displayOnly?: boolean;
|
|
336
367
|
styleClass?: string;
|
|
@@ -338,22 +369,16 @@ export interface ChildRendererOptions {
|
|
|
338
369
|
labelClass?: string;
|
|
339
370
|
labelTextClass?: string;
|
|
340
371
|
actionOnClick?: ControlActionHandler;
|
|
341
|
-
stateKey?: string;
|
|
342
|
-
variables?: Record<string, any>;
|
|
343
372
|
}
|
|
344
|
-
export type ChildRenderer = (
|
|
373
|
+
export type ChildRenderer = (child: FormStateNode, options?: ChildRendererOptions) => ReactNode;
|
|
345
374
|
export interface RenderLayoutProps {
|
|
346
|
-
formNode:
|
|
375
|
+
formNode: FormStateNode;
|
|
347
376
|
renderer: FormRenderer;
|
|
348
|
-
state: ControlState;
|
|
349
377
|
renderChild: ChildRenderer;
|
|
350
378
|
createDataProps: CreateDataProps;
|
|
351
|
-
formOptions: FormContextOptions;
|
|
352
379
|
dataContext: ControlDataContext;
|
|
353
380
|
control?: Control<any>;
|
|
354
381
|
style?: React.CSSProperties;
|
|
355
|
-
allowedOptions?: any[];
|
|
356
|
-
getChildState(node: FormNode, parent?: SchemaDataNode): ControlState;
|
|
357
382
|
runExpression: RunExpression;
|
|
358
383
|
actionOnClick?: ControlActionHandler;
|
|
359
384
|
schemaInterface?: SchemaInterface;
|
|
@@ -367,7 +392,7 @@ export interface RenderLayoutProps {
|
|
|
367
392
|
displayOnly?: boolean;
|
|
368
393
|
}
|
|
369
394
|
export declare function renderControlLayout(props: RenderLayoutProps): ControlLayoutProps;
|
|
370
|
-
type MarkupKeys = keyof Omit<RenderedLayout, "errorControl" | "style" | "className" | "wrapLayout" | "readonly" | "disabled" | "inline">;
|
|
395
|
+
type MarkupKeys = keyof Omit<RenderedLayout, "errorControl" | "style" | "className" | "wrapLayout" | "readonly" | "disabled" | "inline" | "errorId">;
|
|
371
396
|
export declare function appendMarkup(k: MarkupKeys, markup: ReactNode): (layout: RenderedLayout) => void;
|
|
372
397
|
export declare function wrapMarkup(k: MarkupKeys, wrap: (ex: ReactNode) => ReactNode): (layout: RenderedLayout) => void;
|
|
373
398
|
export declare function layoutKeyForPlacement(pos: AdornmentPlacement): MarkupKeys;
|
|
@@ -380,11 +405,11 @@ export declare function getLengthRestrictions(definition: DataControlDefinition)
|
|
|
380
405
|
min: number | null | undefined;
|
|
381
406
|
max: number | null | undefined;
|
|
382
407
|
};
|
|
383
|
-
export declare function createArrayActions(control: Control<any[]>, field: SchemaField, options?: ArrayActionOptions): Pick<ArrayRendererProps, "addAction" | "removeAction" | "editAction" | "arrayControl">;
|
|
384
|
-
export declare function applyArrayLengthRestrictions({
|
|
408
|
+
export declare function createArrayActions(control: Control<any[]>, getElementCount: () => number, field: SchemaField, options?: ArrayActionOptions): Pick<ArrayRendererProps, "addAction" | "removeAction" | "editAction" | "arrayControl" | "getElementCount">;
|
|
409
|
+
export declare function applyArrayLengthRestrictions({ getElementCount, min, max, editAction, addAction: aa, removeAction: ra, required, }: Pick<ArrayRendererProps, "addAction" | "removeAction" | "editAction" | "getElementCount" | "min" | "max" | "required">, disable?: boolean): Pick<ArrayRendererProps, "addAction" | "removeAction" | "editAction"> & {
|
|
385
410
|
addDisabled: boolean;
|
|
386
411
|
removeDisabled: boolean;
|
|
387
412
|
};
|
|
388
|
-
export declare function fieldOptionAdornment(p: DataRendererProps): (o: FieldOption, fieldIndex: number, selected: boolean) =>
|
|
413
|
+
export declare function fieldOptionAdornment(p: DataRendererProps): (o: FieldOption, fieldIndex: number, selected: boolean) => React.ReactNode;
|
|
389
414
|
export declare function lookupChildDataContext(dataContext: ControlDataContext, c: ControlDefinition): ControlDataContext;
|
|
390
415
|
export {};
|