@gravity-ui/dynamic-forms 3.7.0 → 4.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/build/cjs/lib/kit/components/Card/Card.css +3 -2
- package/build/cjs/lib/kit/components/CopyButton/CopyButton.js +1 -1
- package/build/cjs/lib/kit/components/ErrorWrapper/ErrorWrapper.css +4 -1
- package/build/cjs/lib/kit/components/Inputs/MonacoInput/MonacoInputDialog.css +2 -2
- package/build/cjs/lib/kit/components/Inputs/TableArrayInput/TableArrayInput.css +8 -2
- package/build/cjs/lib/kit/components/Inputs/TextContent/TextContent.css +2 -2
- package/build/cjs/lib/kit/components/Layouts/Row/Row.css +2 -2
- package/build/cjs/lib/kit/components/Layouts/Row/Row.js +2 -2
- package/build/cjs/lib/kit/components/Layouts/Section/Section.css +2 -2
- package/build/cjs/lib/kit/components/LongValue/LongValue.css +3 -0
- package/build/cjs/lib/kit/components/LongValue/LongValue.js +1 -1
- package/build/cjs/lib/kit/components/SimpleVerticalAccordeon/SimpleVerticalAccordeon.css +2 -2
- package/build/cjs/lib/kit/components/Views/MonacoInputView/MonacoViewDialog.css +1 -1
- package/build/esm/lib/core/components/Form/Controller/Controller.d.ts +1 -1
- package/build/esm/lib/core/components/Form/Controller/types.d.ts +6 -6
- package/build/esm/lib/core/components/Form/Controller/utils.d.ts +10 -10
- package/build/esm/lib/core/components/Form/hooks/useGenerateRandomValue.d.ts +1 -1
- package/build/esm/lib/core/components/Form/types/array.d.ts +12 -12
- package/build/esm/lib/core/components/Form/types/boolean.d.ts +12 -12
- package/build/esm/lib/core/components/Form/types/config.d.ts +1 -1
- package/build/esm/lib/core/components/Form/types/input.d.ts +13 -13
- package/build/esm/lib/core/components/Form/types/layout.d.ts +5 -5
- package/build/esm/lib/core/components/Form/types/number.d.ts +12 -12
- package/build/esm/lib/core/components/Form/types/object.d.ts +12 -12
- package/build/esm/lib/core/components/Form/types/string.d.ts +12 -12
- package/build/esm/lib/core/components/View/ViewController.d.ts +1 -1
- package/build/esm/lib/core/components/View/hooks/useComponents.d.ts +1 -1
- package/build/esm/lib/core/components/View/hooks/useRender.d.ts +1 -1
- package/build/esm/lib/core/helpers.d.ts +5 -5
- package/build/esm/lib/core/types/specs.d.ts +6 -6
- package/build/esm/lib/kit/components/Card/Card.css +3 -2
- package/build/esm/lib/kit/components/CopyButton/CopyButton.js +1 -1
- package/build/esm/lib/kit/components/ErrorWrapper/ErrorWrapper.css +4 -1
- package/build/esm/lib/kit/components/Inputs/MonacoInput/MonacoInputDialog.css +2 -2
- package/build/esm/lib/kit/components/Inputs/TableArrayInput/TableArrayInput.css +8 -2
- package/build/esm/lib/kit/components/Inputs/TextContent/TextContent.css +2 -2
- package/build/esm/lib/kit/components/Layouts/Accordeon/Accordeon.d.ts +1 -1
- package/build/esm/lib/kit/components/Layouts/AccordeonCard/AccordeonCardForm.d.ts +1 -1
- package/build/esm/lib/kit/components/Layouts/CardAccordeon.d.ts +1 -1
- package/build/esm/lib/kit/components/Layouts/CardSection.d.ts +1 -1
- package/build/esm/lib/kit/components/Layouts/Row/Row.css +2 -2
- package/build/esm/lib/kit/components/Layouts/Row/Row.d.ts +2 -2
- package/build/esm/lib/kit/components/Layouts/Row/Row.js +2 -2
- package/build/esm/lib/kit/components/Layouts/Section/Section.css +2 -2
- package/build/esm/lib/kit/components/Layouts/Section/Section.d.ts +6 -6
- package/build/esm/lib/kit/components/Layouts/TableCell/TableCell.d.ts +1 -1
- package/build/esm/lib/kit/components/Layouts/Transparent/Transparent.d.ts +1 -1
- package/build/esm/lib/kit/components/LongValue/LongValue.css +3 -0
- package/build/esm/lib/kit/components/LongValue/LongValue.js +1 -1
- package/build/esm/lib/kit/components/SimpleVerticalAccordeon/SimpleVerticalAccordeon.css +2 -2
- package/build/esm/lib/kit/components/ViewLayouts/ViewCardSection.d.ts +1 -1
- package/build/esm/lib/kit/components/ViewLayouts/ViewRow/ViewRow.d.ts +1 -1
- package/build/esm/lib/kit/components/ViewLayouts/ViewSection/ViewSection.d.ts +4 -4
- package/build/esm/lib/kit/components/ViewLayouts/ViewTableCell/ViewTableCell.d.ts +1 -1
- package/build/esm/lib/kit/components/ViewLayouts/ViewTransparent/ViewTransparent.d.ts +1 -1
- package/build/esm/lib/kit/components/Views/MonacoInputView/MonacoViewDialog.css +1 -1
- package/build/esm/lib/kit/hooks/useOneOf/useOneOf.d.ts +1 -1
- package/build/esm/lib/kit/utils/common.d.ts +1 -1
- package/build/esm/lib/kit/utils/objectInline.d.ts +1 -1
- package/package.json +11 -11
|
@@ -48,15 +48,16 @@
|
|
|
48
48
|
margin-left: 10px;
|
|
49
49
|
}
|
|
50
50
|
.df-card__title {
|
|
51
|
+
display: flex;
|
|
51
52
|
max-width: 533px;
|
|
52
53
|
}
|
|
53
54
|
.df-card__note {
|
|
54
55
|
margin-left: 5px;
|
|
55
56
|
}
|
|
56
|
-
.df-card__note .
|
|
57
|
+
.df-card__note .gc-help-popover {
|
|
57
58
|
display: flex;
|
|
58
59
|
}
|
|
59
|
-
.df-card__note .
|
|
60
|
+
.df-card__note .gc-help-popover > span {
|
|
60
61
|
display: flex;
|
|
61
62
|
}
|
|
62
63
|
.df-card__toggler-icon_open {
|
|
@@ -13,7 +13,7 @@ const b = (0, utils_1.block)('copy-button');
|
|
|
13
13
|
*/
|
|
14
14
|
const CopyButton = ({ spec, value }) => {
|
|
15
15
|
if (((0, core_1.isStringSpec)(spec) || (0, core_1.isNumberSpec)(spec)) && spec.viewSpec.copy) {
|
|
16
|
-
return react_1.default.createElement(uikit_1.ClipboardButton, { className: b(), text: `${value}`, size:
|
|
16
|
+
return react_1.default.createElement(uikit_1.ClipboardButton, { className: b(), text: `${value}`, size: "s" });
|
|
17
17
|
}
|
|
18
18
|
return null;
|
|
19
19
|
};
|
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
.df-error-wrapper_error .g-text-area__content:hover:not(.df-error-wrapper-ignore),
|
|
17
17
|
.df-error-wrapper_error .yc-text-input_view_normal:not(.df-error-wrapper-ignore) .yc-text-input__control,
|
|
18
18
|
.df-error-wrapper_error .yc-text-input_view_normal:not(.df-error-wrapper-ignore) .yc-text-input__content,
|
|
19
|
-
.df-error-wrapper_error .
|
|
19
|
+
.df-error-wrapper_error .g-text-input_view_normal:not(.df-error-wrapper-ignore) .g-text-input__control,
|
|
20
|
+
.df-error-wrapper_error .g-text-input_view_normal:not(.df-error-wrapper-ignore) .g-text-input__content,
|
|
21
|
+
.df-error-wrapper_error .yc-checkbox__indicator:not(.df-error-wrapper-ignore)::before,
|
|
22
|
+
.df-error-wrapper_error .g-checkbox__indicator:not(.df-error-wrapper-ignore)::before {
|
|
20
23
|
border-color: var(--g-color-text-danger);
|
|
21
24
|
}
|
|
22
25
|
.df-error-wrapper__error-text {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
.df-monaco-input-dialog .
|
|
1
|
+
.df-monaco-input-dialog .g-dialog-footer {
|
|
2
2
|
padding: 10px 32px 32px;
|
|
3
3
|
}
|
|
4
4
|
.df-monaco-input-dialog__container {
|
|
5
5
|
border: 1px solid var(--g-color-line-generic);
|
|
6
6
|
}
|
|
7
|
-
.df-monaco-input-dialog__dialog-header .
|
|
7
|
+
.df-monaco-input-dialog__dialog-header .g-dialog-header__caption {
|
|
8
8
|
min-height: 24px;
|
|
9
9
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
.df-table-array__table {
|
|
2
2
|
margin-bottom: 10px;
|
|
3
3
|
}
|
|
4
|
-
.df-table-array__table .
|
|
4
|
+
.df-table-array__table .g-table__cell {
|
|
5
5
|
border-bottom: 0px transparent;
|
|
6
6
|
}
|
|
7
|
-
.df-table-array__row .
|
|
7
|
+
.df-table-array__row .g-table__cell {
|
|
8
8
|
border-bottom: 0px transparent;
|
|
9
9
|
border-top: 1px solid var(--g-color-line-generic);
|
|
10
10
|
}
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
display: none;
|
|
13
13
|
}
|
|
14
14
|
.df-table-array__cell .yc-text-input,
|
|
15
|
+
.df-table-array__cell .g-text-input,
|
|
15
16
|
.df-table-array__cell .yc-select-control,
|
|
17
|
+
.df-table-array__cell .g-select-control,
|
|
16
18
|
.df-table-array__cell .yc-select,
|
|
17
19
|
.df-table-array__cell .g-select {
|
|
18
20
|
max-width: 150px;
|
|
@@ -22,10 +24,14 @@
|
|
|
22
24
|
padding-left: 3px;
|
|
23
25
|
}
|
|
24
26
|
.df-table-array__cell_arr .yc-text-input,
|
|
27
|
+
.df-table-array__cell_arr .g-text-input,
|
|
25
28
|
.df-table-array__cell_arr .yc-select-control:not(.df-multi-select),
|
|
29
|
+
.df-table-array__cell_arr .g-select-control:not(.df-multi-select),
|
|
26
30
|
.df-table-array__cell_arr .yc-select:not(.df-multi-select),
|
|
27
31
|
.df-table-array__cell_arr .g-select:not(.df-multi-select), .df-table-array__cell_obj .yc-text-input,
|
|
32
|
+
.df-table-array__cell_obj .g-text-input,
|
|
28
33
|
.df-table-array__cell_obj .yc-select-control:not(.df-multi-select),
|
|
34
|
+
.df-table-array__cell_obj .g-select-control:not(.df-multi-select),
|
|
29
35
|
.df-table-array__cell_obj .yc-select:not(.df-multi-select),
|
|
30
36
|
.df-table-array__cell_obj .g-select:not(.df-multi-select) {
|
|
31
37
|
max-width: unset;
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
position: absolute;
|
|
42
42
|
margin-top: 1px;
|
|
43
43
|
}
|
|
44
|
-
.df-row__note-inner .
|
|
44
|
+
.df-row__note-inner .g-help-popover {
|
|
45
45
|
display: flex;
|
|
46
46
|
}
|
|
47
|
-
.df-row__note-inner .
|
|
47
|
+
.df-row__note-inner .g-help-popover > span {
|
|
48
48
|
display: flex;
|
|
49
49
|
}
|
|
50
50
|
.df-row__right {
|
|
@@ -31,7 +31,7 @@ const RowBase = ({ name, spec, input, meta, verboseDescription, children, }) =>
|
|
|
31
31
|
react_1.default.createElement(uikit_1.Icon, { data: icons_1.TrashBin, size: 16 }))) : null),
|
|
32
32
|
verboseDescription && spec.viewSpec.layoutDescription ? (react_1.default.createElement("div", { className: b('description'), dangerouslySetInnerHTML: { __html: spec.viewSpec.layoutDescription } })) : null)));
|
|
33
33
|
};
|
|
34
|
-
const Row = (props) =>
|
|
34
|
+
const Row = (props) => react_1.default.createElement(RowBase, Object.assign({}, props));
|
|
35
35
|
exports.Row = Row;
|
|
36
|
-
const RowVerbose = (props) =>
|
|
36
|
+
const RowVerbose = (props) => react_1.default.createElement(RowBase, Object.assign({ verboseDescription: true }, props));
|
|
37
37
|
exports.RowVerbose = RowVerbose;
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
.df-section__note {
|
|
29
29
|
margin-left: 5px;
|
|
30
30
|
}
|
|
31
|
-
.df-section__note .
|
|
31
|
+
.df-section__note .g-help-popover {
|
|
32
32
|
display: flex;
|
|
33
33
|
}
|
|
34
|
-
.df-section__note .
|
|
34
|
+
.df-section__note .g-help-popover > span {
|
|
35
35
|
display: flex;
|
|
36
36
|
}
|
|
37
37
|
.df-section__description {
|
|
@@ -42,7 +42,7 @@ const LongValue = ({ value, className }) => {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
|
-
return (react_1.default.createElement("div", { ref: ref, onClick: long ? handleClick : undefined },
|
|
45
|
+
return (react_1.default.createElement("div", { className: b('container'), ref: ref, onClick: long ? handleClick : undefined },
|
|
46
46
|
react_1.default.createElement(uikit_1.Text, Object.assign({ className: b({ long }, className), ellipsis: true }, currentTextProperies), value)));
|
|
47
47
|
};
|
|
48
48
|
exports.LongValue = LongValue;
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
.df-simple-vertical-accordeon__tooltip {
|
|
21
21
|
margin: 0px 5px;
|
|
22
22
|
}
|
|
23
|
-
.df-simple-vertical-accordeon__tooltip .
|
|
23
|
+
.df-simple-vertical-accordeon__tooltip .g-help-popover {
|
|
24
24
|
display: flex;
|
|
25
25
|
}
|
|
26
|
-
.df-simple-vertical-accordeon__tooltip .
|
|
26
|
+
.df-simple-vertical-accordeon__tooltip .g-help-popover > span {
|
|
27
27
|
display: flex;
|
|
28
28
|
}
|
|
29
29
|
.df-simple-vertical-accordeon__chevron {
|
|
@@ -7,4 +7,4 @@ export interface ControllerProps<DirtyValue extends FieldValue, SpecType extends
|
|
|
7
7
|
parentOnChange: ((childName: string, childValue: FieldValue, childErrors: Record<string, ValidateError>) => void) | null;
|
|
8
8
|
parentOnUnmount: ((childName: string) => void) | null;
|
|
9
9
|
}
|
|
10
|
-
export declare const Controller: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec
|
|
10
|
+
export declare const Controller: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec<any, undefined, undefined>>({ spec: _spec, name, value: valueFromParent, parentOnChange, parentOnUnmount, }: ControllerProps<DirtyValue, SpecType>) => JSX.Element | null;
|
|
@@ -10,15 +10,15 @@ export interface GetComponentsParams<SpecType extends Spec> {
|
|
|
10
10
|
spec: SpecType;
|
|
11
11
|
config: DynamicFormConfig;
|
|
12
12
|
}
|
|
13
|
-
export interface GetComponentsReturn<DirtyValue extends FieldValue, SpecType extends Spec
|
|
14
|
-
inputEntity?: InputEntity<DirtyValue, SpecType> | IndependentInputEntity<DirtyValue, SpecType>;
|
|
15
|
-
Layout?: LayoutType<DirtyValue, SpecType>;
|
|
13
|
+
export interface GetComponentsReturn<DirtyValue extends FieldValue, SpecType extends Spec<undefined, undefined, undefined>> {
|
|
14
|
+
inputEntity?: InputEntity<DirtyValue, undefined, undefined, SpecType> | IndependentInputEntity<DirtyValue, undefined, undefined, SpecType>;
|
|
15
|
+
Layout?: LayoutType<DirtyValue, undefined, undefined, SpecType>;
|
|
16
16
|
}
|
|
17
|
-
export interface GetRenderParams<DirtyValue extends FieldValue, SpecType extends Spec
|
|
17
|
+
export interface GetRenderParams<DirtyValue extends FieldValue, SpecType extends Spec<undefined, undefined, undefined>> {
|
|
18
18
|
name: string;
|
|
19
19
|
spec: SpecType;
|
|
20
|
-
inputEntity?: InputEntity<DirtyValue, SpecType> | IndependentInputEntity<DirtyValue, SpecType>;
|
|
21
|
-
Layout?: LayoutType<DirtyValue, SpecType>;
|
|
20
|
+
inputEntity?: InputEntity<DirtyValue, undefined, undefined, SpecType> | IndependentInputEntity<DirtyValue, undefined, undefined, SpecType>;
|
|
21
|
+
Layout?: LayoutType<DirtyValue, undefined, undefined, SpecType>;
|
|
22
22
|
}
|
|
23
23
|
export interface GetValidateParams<SpecType extends Spec> {
|
|
24
24
|
spec: SpecType;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { FormValue, Spec } from '../../../types';
|
|
2
2
|
import { BaseValidateError, FieldRenderProps, FieldValue, ValidateError } from '../types';
|
|
3
3
|
import { ControllerStore, GetComponentsParams, GetComponentsReturn, GetFieldInitialsParams, GetFieldMethodsReturn, GetRenderParams, GetSpecParams, GetValidateParams, InitializeStoreParams, UpdateStoreParams } from './types';
|
|
4
|
-
export declare const updateParentStore: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec
|
|
5
|
-
export declare const callUnmout: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec
|
|
6
|
-
export declare const getSpec: <SpecType extends Spec
|
|
7
|
-
export declare const getComponents: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec
|
|
8
|
-
export declare const getRender: <DirtyValue extends FieldValue, SpecType extends Spec
|
|
9
|
-
export declare const getValidate: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec
|
|
10
|
-
export declare const getFieldInitials: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec
|
|
4
|
+
export declare const updateParentStore: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec<any, undefined, undefined>>(store: ControllerStore<DirtyValue, Value, SpecType>) => void;
|
|
5
|
+
export declare const callUnmout: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec<any, undefined, undefined>>(store: ControllerStore<DirtyValue, Value, SpecType>) => void;
|
|
6
|
+
export declare const getSpec: <SpecType extends Spec<any, undefined, undefined>>({ name, spec, mutatorsStore, }: GetSpecParams<SpecType>) => SpecType;
|
|
7
|
+
export declare const getComponents: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec<any, undefined, undefined>>({ spec, config, }: GetComponentsParams<SpecType>) => GetComponentsReturn<DirtyValue, SpecType>;
|
|
8
|
+
export declare const getRender: <DirtyValue extends FieldValue, SpecType extends Spec<any, undefined, undefined>>({ name, spec, inputEntity, Layout, }: GetRenderParams<DirtyValue, SpecType>) => (props: FieldRenderProps<DirtyValue>) => JSX.Element | null;
|
|
9
|
+
export declare const getValidate: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec<any, undefined, undefined>>({ spec, config, }: GetValidateParams<SpecType>) => (value?: Value | undefined) => ValidateError;
|
|
10
|
+
export declare const getFieldInitials: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec<any, undefined, undefined>>({ name, spec, valueFromParent, initialValue, validate, mutatorsStore, }: GetFieldInitialsParams<DirtyValue, Value, SpecType>) => {
|
|
11
11
|
initialValue: DirtyValue;
|
|
12
12
|
active: boolean;
|
|
13
13
|
dirty: boolean;
|
|
@@ -21,6 +21,6 @@ export declare const getFieldInitials: <DirtyValue extends FieldValue, Value ext
|
|
|
21
21
|
visited: boolean;
|
|
22
22
|
childErrors: {};
|
|
23
23
|
};
|
|
24
|
-
export declare const getFieldMethods: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec
|
|
25
|
-
export declare const initializeStore: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec
|
|
26
|
-
export declare const updateStore: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec
|
|
24
|
+
export declare const getFieldMethods: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec<any, undefined, undefined>>() => GetFieldMethodsReturn<DirtyValue, Value, SpecType>;
|
|
25
|
+
export declare const initializeStore: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec<any, undefined, undefined>>({ name, spec: _spec, mutatorsStore, config, valueFromParent, tools, parentOnChange, parentOnUnmount, }: InitializeStoreParams<DirtyValue, SpecType>) => ControllerStore<DirtyValue, Value, SpecType>;
|
|
26
|
+
export declare const updateStore: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec<any, undefined, undefined>>({ store, setStore, spec: _spec, name, parentOnChange, parentOnUnmount, mutatorsStore, valueFromParent, config, tools, methodOnChange, }: UpdateStoreParams<DirtyValue, Value, SpecType>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useGenerateRandomValue: () => ((spec: import("../../..").StringSpec<any,
|
|
1
|
+
export declare const useGenerateRandomValue: () => ((spec: import("../../..").StringSpec<any, undefined, undefined>) => string) | undefined;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ArraySpec, ArrayValue } from '../../../types';
|
|
2
2
|
import { FieldArrayValue, IndependentInputEntity, IndependentInputProps, IndependentInputType, InputEntity, InputProps, InputType, InputsMap, LayoutProps, LayoutType, LayoutsMap, TypeConfig, ValidatorsMap } from './';
|
|
3
|
-
export type ArrayInputProps<InputComponentProps extends Record<string, any> =
|
|
4
|
-
export type ArrayIndependentInputProps<InputComponentProps extends Record<string, any> =
|
|
5
|
-
export type ArrayLayoutProps<LayoutComponentProps extends Record<string, any> =
|
|
6
|
-
export type ArrayInput<InputComponentProps extends Record<string, any> =
|
|
7
|
-
export type ArrayIndependentInput<InputComponentProps extends Record<string, any> =
|
|
8
|
-
export type ArrayLayout<LayoutComponentProps extends Record<string, any> =
|
|
9
|
-
export type ArrayInputEntity = InputEntity<FieldArrayValue, ArraySpec
|
|
10
|
-
export type ArrayIndependentInputEntity = IndependentInputEntity<FieldArrayValue, ArraySpec
|
|
11
|
-
export type ArrayInputsMap = InputsMap<FieldArrayValue, ArraySpec
|
|
12
|
-
export type ArrayLayoutsMap = LayoutsMap<FieldArrayValue, ArraySpec
|
|
13
|
-
export type ArrayValidatorsMap = ValidatorsMap<ArrayValue, ArraySpec
|
|
14
|
-
export type ArrayConfig = TypeConfig<FieldArrayValue, ArrayValue, ArraySpec
|
|
3
|
+
export type ArrayInputProps<InputComponentProps extends Record<string, any> | undefined = undefined> = InputProps<FieldArrayValue, InputComponentProps, undefined, ArraySpec<undefined, InputComponentProps, undefined>>;
|
|
4
|
+
export type ArrayIndependentInputProps<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = IndependentInputProps<FieldArrayValue, InputComponentProps, LayoutComponentProps, ArraySpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
5
|
+
export type ArrayLayoutProps<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = LayoutProps<FieldArrayValue, InputComponentProps, LayoutComponentProps, ArraySpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
6
|
+
export type ArrayInput<InputComponentProps extends Record<string, any> | undefined = undefined> = InputType<FieldArrayValue, InputComponentProps, undefined, ArraySpec<undefined, InputComponentProps, undefined>>;
|
|
7
|
+
export type ArrayIndependentInput<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = IndependentInputType<FieldArrayValue, InputComponentProps, LayoutComponentProps, ArraySpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
8
|
+
export type ArrayLayout<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = LayoutType<FieldArrayValue, InputComponentProps, LayoutComponentProps, ArraySpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
9
|
+
export type ArrayInputEntity<InputComponentProps extends Record<string, any> | undefined = undefined> = InputEntity<FieldArrayValue, InputComponentProps, undefined, ArraySpec<undefined, InputComponentProps, undefined>>;
|
|
10
|
+
export type ArrayIndependentInputEntity<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = IndependentInputEntity<FieldArrayValue, InputComponentProps, LayoutComponentProps, ArraySpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
11
|
+
export type ArrayInputsMap = InputsMap<FieldArrayValue, ArraySpec<undefined, any, any>>;
|
|
12
|
+
export type ArrayLayoutsMap = LayoutsMap<FieldArrayValue, ArraySpec<undefined, any, any>>;
|
|
13
|
+
export type ArrayValidatorsMap = ValidatorsMap<ArrayValue, ArraySpec<undefined, any, any>>;
|
|
14
|
+
export type ArrayConfig = TypeConfig<FieldArrayValue, ArrayValue, ArraySpec<undefined, any, any>>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { BooleanSpec } from '../../../types';
|
|
2
2
|
import { IndependentInputEntity, IndependentInputProps, IndependentInputType, InputEntity, InputProps, InputType, InputsMap, LayoutProps, LayoutType, LayoutsMap, TypeConfig, ValidatorsMap } from './';
|
|
3
|
-
export type BooleanInputProps<InputComponentProps extends Record<string, any> =
|
|
4
|
-
export type BooleanIndependentInputProps<InputComponentProps extends Record<string, any> =
|
|
5
|
-
export type BooleanLayoutProps<LayoutComponentProps extends Record<string, any> =
|
|
6
|
-
export type BooleanInput<InputComponentProps extends Record<string, any> =
|
|
7
|
-
export type BooleanIndependentInput<InputComponentProps extends Record<string, any> =
|
|
8
|
-
export type BooleanLayout<LayoutComponentProps extends Record<string, any> =
|
|
9
|
-
export type BooleanInputEntity = InputEntity<boolean, BooleanSpec
|
|
10
|
-
export type BooleanIndependentInputEntity = IndependentInputEntity<boolean, BooleanSpec
|
|
11
|
-
export type BooleanInputsMap = InputsMap<boolean, BooleanSpec
|
|
12
|
-
export type BooleanLayoutsMap = LayoutsMap<boolean, BooleanSpec
|
|
13
|
-
export type BooleanValidatorsMap = ValidatorsMap<boolean, BooleanSpec
|
|
14
|
-
export type BooleanConfig = TypeConfig<boolean, boolean, BooleanSpec
|
|
3
|
+
export type BooleanInputProps<InputComponentProps extends Record<string, any> | undefined = undefined> = InputProps<boolean, InputComponentProps, undefined, BooleanSpec<undefined, InputComponentProps, undefined>>;
|
|
4
|
+
export type BooleanIndependentInputProps<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = IndependentInputProps<boolean, InputComponentProps, LayoutComponentProps, BooleanSpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
5
|
+
export type BooleanLayoutProps<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = LayoutProps<boolean, InputComponentProps, LayoutComponentProps, BooleanSpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
6
|
+
export type BooleanInput<InputComponentProps extends Record<string, any> | undefined = undefined> = InputType<boolean, InputComponentProps, undefined, BooleanSpec<undefined, InputComponentProps, undefined>>;
|
|
7
|
+
export type BooleanIndependentInput<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = IndependentInputType<boolean, InputComponentProps, LayoutComponentProps, BooleanSpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
8
|
+
export type BooleanLayout<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = LayoutType<boolean, InputComponentProps, LayoutComponentProps, BooleanSpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
9
|
+
export type BooleanInputEntity<InputComponentProps extends Record<string, any> | undefined = undefined> = InputEntity<boolean, InputComponentProps, undefined, BooleanSpec<undefined, InputComponentProps, undefined>>;
|
|
10
|
+
export type BooleanIndependentInputEntity<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = IndependentInputEntity<boolean, InputComponentProps, LayoutComponentProps, BooleanSpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
11
|
+
export type BooleanInputsMap = InputsMap<boolean, BooleanSpec<undefined, any, any>>;
|
|
12
|
+
export type BooleanLayoutsMap = LayoutsMap<boolean, BooleanSpec<undefined, any, any>>;
|
|
13
|
+
export type BooleanValidatorsMap = ValidatorsMap<boolean, BooleanSpec<undefined, any, any>>;
|
|
14
|
+
export type BooleanConfig = TypeConfig<boolean, boolean, BooleanSpec<undefined, any, any>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FormValue, Spec } from '../../../types';
|
|
2
2
|
import { ArrayConfig, BooleanConfig, FieldValue, InputsMap, LayoutsMap, NumberConfig, ObjectConfig, StringConfig, ValidatorsMap } from './';
|
|
3
|
-
export interface TypeConfig<DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec
|
|
3
|
+
export interface TypeConfig<DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec<undefined, any, any>> {
|
|
4
4
|
inputs: InputsMap<DirtyValue, SpecType>;
|
|
5
5
|
layouts: LayoutsMap<DirtyValue, SpecType>;
|
|
6
6
|
validators: ValidatorsMap<Value, SpecType>;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Spec } from '../../../types';
|
|
3
3
|
import { FieldRenderProps, FieldValue, LayoutType } from './';
|
|
4
|
-
export type InputProps<Value extends FieldValue, SpecType extends Spec> = {
|
|
4
|
+
export type InputProps<Value extends FieldValue, InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined, SpecType extends Spec<undefined, InputComponentProps, LayoutComponentProps> = Spec> = {
|
|
5
5
|
spec: SpecType;
|
|
6
6
|
name: string;
|
|
7
|
-
inputProps?:
|
|
7
|
+
inputProps?: InputComponentProps;
|
|
8
8
|
} & FieldRenderProps<Value>;
|
|
9
|
-
export type IndependentInputProps<Value extends FieldValue, SpecType extends Spec> = {
|
|
10
|
-
Layout: LayoutType<Value, SpecType> | undefined;
|
|
11
|
-
layoutProps?:
|
|
12
|
-
} & InputProps<Value, SpecType>;
|
|
13
|
-
export type InputType<Value extends FieldValue, SpecType extends Spec> = (props: InputProps<Value, SpecType>) => React.ReactElement | null;
|
|
14
|
-
export type IndependentInputType<Value extends FieldValue, SpecType extends Spec> = (props: IndependentInputProps<Value, SpecType>) => React.ReactElement | null;
|
|
15
|
-
export type InputEntity<Value extends FieldValue, SpecType extends Spec> = {
|
|
16
|
-
Component: InputType<Value, SpecType>;
|
|
9
|
+
export type IndependentInputProps<Value extends FieldValue, InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined, SpecType extends Spec<undefined, InputComponentProps, LayoutComponentProps> = Spec> = {
|
|
10
|
+
Layout: LayoutType<Value, InputComponentProps, LayoutComponentProps, SpecType> | undefined;
|
|
11
|
+
layoutProps?: LayoutComponentProps;
|
|
12
|
+
} & InputProps<Value, InputComponentProps, LayoutComponentProps, SpecType>;
|
|
13
|
+
export type InputType<Value extends FieldValue, InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined, SpecType extends Spec<undefined, InputComponentProps, LayoutComponentProps> = Spec> = (props: InputProps<Value, InputComponentProps, LayoutComponentProps, SpecType>) => React.ReactElement | null;
|
|
14
|
+
export type IndependentInputType<Value extends FieldValue, InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined, SpecType extends Spec<undefined, InputComponentProps, LayoutComponentProps> = Spec> = (props: IndependentInputProps<Value, InputComponentProps, LayoutComponentProps, SpecType>) => React.ReactElement | null;
|
|
15
|
+
export type InputEntity<Value extends FieldValue, InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined, SpecType extends Spec<undefined, InputComponentProps, LayoutComponentProps> = Spec> = {
|
|
16
|
+
Component: InputType<Value, InputComponentProps, LayoutComponentProps, SpecType>;
|
|
17
17
|
independent?: false;
|
|
18
18
|
};
|
|
19
|
-
export type IndependentInputEntity<Value extends FieldValue, SpecType extends Spec> = {
|
|
20
|
-
Component: IndependentInputType<Value, SpecType>;
|
|
19
|
+
export type IndependentInputEntity<Value extends FieldValue, InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined, SpecType extends Spec<undefined, InputComponentProps, LayoutComponentProps> = Spec> = {
|
|
20
|
+
Component: IndependentInputType<Value, InputComponentProps, LayoutComponentProps, SpecType>;
|
|
21
21
|
independent: true;
|
|
22
22
|
};
|
|
23
|
-
export type InputsMap<Value extends FieldValue, SpecType extends Spec> = Record<string, InputEntity<Value, SpecType> | IndependentInputEntity<Value, SpecType> | undefined>;
|
|
23
|
+
export type InputsMap<Value extends FieldValue, SpecType extends Spec<undefined, any, any> = Spec> = Record<string, InputEntity<Value, any, any, SpecType> | IndependentInputEntity<Value, any, any, SpecType> | undefined>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Spec } from '../../../types';
|
|
3
3
|
import { FieldValue, InputProps } from './';
|
|
4
|
-
export type LayoutProps<Value extends FieldValue, SpecType extends Spec> = {
|
|
4
|
+
export type LayoutProps<Value extends FieldValue, InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined, SpecType extends Spec<undefined, InputComponentProps, LayoutComponentProps> = Spec> = {
|
|
5
5
|
children: React.ReactElement;
|
|
6
|
-
layoutProps?:
|
|
7
|
-
} & InputProps<Value, SpecType>;
|
|
8
|
-
export type LayoutType<Value extends FieldValue, SpecType extends Spec> = (props: LayoutProps<Value, SpecType>) => React.ReactElement | null;
|
|
9
|
-
export type LayoutsMap<Value extends FieldValue, SpecType extends Spec> = Record<string, LayoutType<Value, SpecType> | undefined>;
|
|
6
|
+
layoutProps?: LayoutComponentProps;
|
|
7
|
+
} & Omit<InputProps<Value, InputComponentProps, LayoutComponentProps, SpecType>, 'inputProps'>;
|
|
8
|
+
export type LayoutType<Value extends FieldValue, InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined, SpecType extends Spec<undefined, InputComponentProps, LayoutComponentProps> = Spec> = (props: LayoutProps<Value, InputComponentProps, LayoutComponentProps, SpecType>) => React.ReactElement | null;
|
|
9
|
+
export type LayoutsMap<Value extends FieldValue, SpecType extends Spec<undefined, any, any> = Spec> = Record<string, LayoutType<Value, any, any, SpecType> | undefined>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { NumberSpec } from '../../../types';
|
|
2
2
|
import { IndependentInputEntity, IndependentInputProps, IndependentInputType, InputEntity, InputProps, InputType, InputsMap, LayoutProps, LayoutType, LayoutsMap, TypeConfig, ValidatorsMap } from './';
|
|
3
|
-
export type NumberInputProps<InputComponentProps extends Record<string, any> =
|
|
4
|
-
export type NumberIndependentInputProps<InputComponentProps extends Record<string, any> =
|
|
5
|
-
export type NumberLayoutProps<LayoutComponentProps extends Record<string, any> =
|
|
6
|
-
export type NumberInput<InputComponentProps extends Record<string, any> =
|
|
7
|
-
export type NumberIndependentInput<InputComponentProps extends Record<string, any> =
|
|
8
|
-
export type NumberLayout<LayoutComponentProps extends Record<string, any> =
|
|
9
|
-
export type NumberInputEntity = InputEntity<number, NumberSpec
|
|
10
|
-
export type NumberIndependentInputEntity = IndependentInputEntity<number, NumberSpec
|
|
11
|
-
export type NumberInputsMap = InputsMap<number, NumberSpec
|
|
12
|
-
export type NumberLayoutsMap = LayoutsMap<number, NumberSpec
|
|
13
|
-
export type NumberValidatorsMap = ValidatorsMap<number, NumberSpec
|
|
14
|
-
export type NumberConfig = TypeConfig<number, number, NumberSpec
|
|
3
|
+
export type NumberInputProps<InputComponentProps extends Record<string, any> | undefined = undefined> = InputProps<number, InputComponentProps, undefined, NumberSpec<undefined, InputComponentProps, undefined>>;
|
|
4
|
+
export type NumberIndependentInputProps<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = IndependentInputProps<number, InputComponentProps, LayoutComponentProps, NumberSpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
5
|
+
export type NumberLayoutProps<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = LayoutProps<number, InputComponentProps, LayoutComponentProps, NumberSpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
6
|
+
export type NumberInput<InputComponentProps extends Record<string, any> | undefined = undefined> = InputType<number, InputComponentProps, undefined, NumberSpec<undefined, InputComponentProps, undefined>>;
|
|
7
|
+
export type NumberIndependentInput<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = IndependentInputType<number, InputComponentProps, LayoutComponentProps, NumberSpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
8
|
+
export type NumberLayout<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = LayoutType<number, InputComponentProps, LayoutComponentProps, NumberSpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
9
|
+
export type NumberInputEntity<InputComponentProps extends Record<string, any> | undefined = undefined> = InputEntity<number, InputComponentProps, undefined, NumberSpec<undefined, InputComponentProps, undefined>>;
|
|
10
|
+
export type NumberIndependentInputEntity<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = IndependentInputEntity<number, InputComponentProps, LayoutComponentProps, NumberSpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
11
|
+
export type NumberInputsMap = InputsMap<number, NumberSpec<undefined, any, any>>;
|
|
12
|
+
export type NumberLayoutsMap = LayoutsMap<number, NumberSpec<undefined, any, any>>;
|
|
13
|
+
export type NumberValidatorsMap = ValidatorsMap<number, NumberSpec<undefined, any, any>>;
|
|
14
|
+
export type NumberConfig = TypeConfig<number, number, NumberSpec<undefined, any, any>>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ObjectSpec, ObjectValue } from '../../../types';
|
|
2
2
|
import { FieldObjectValue, IndependentInputEntity, IndependentInputProps, IndependentInputType, InputEntity, InputProps, InputType, InputsMap, LayoutProps, LayoutType, LayoutsMap, TypeConfig, ValidatorsMap } from './';
|
|
3
|
-
export type ObjectInputProps<InputComponentProps extends Record<string, any> =
|
|
4
|
-
export type ObjectIndependentInputProps<InputComponentProps extends Record<string, any> =
|
|
5
|
-
export type ObjectLayoutProps<LayoutComponentProps extends Record<string, any> =
|
|
6
|
-
export type ObjectInput<InputComponentProps extends Record<string, any> =
|
|
7
|
-
export type ObjectIndependentInput<InputComponentProps extends Record<string, any> =
|
|
8
|
-
export type ObjectLayout<LayoutComponentProps extends Record<string, any> =
|
|
9
|
-
export type ObjectInputEntity = InputEntity<FieldObjectValue, ObjectSpec
|
|
10
|
-
export type ObjectIndependentInputEntity = IndependentInputEntity<FieldObjectValue, ObjectSpec
|
|
11
|
-
export type ObjectInputsMap = InputsMap<FieldObjectValue, ObjectSpec
|
|
12
|
-
export type ObjectLayoutsMap = LayoutsMap<FieldObjectValue, ObjectSpec
|
|
13
|
-
export type ObjectValidatorsMap = ValidatorsMap<ObjectValue, ObjectSpec
|
|
14
|
-
export type ObjectConfig = TypeConfig<FieldObjectValue, ObjectValue, ObjectSpec
|
|
3
|
+
export type ObjectInputProps<InputComponentProps extends Record<string, any> | undefined = undefined> = InputProps<FieldObjectValue, InputComponentProps, undefined, ObjectSpec<undefined, InputComponentProps, undefined>>;
|
|
4
|
+
export type ObjectIndependentInputProps<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = IndependentInputProps<FieldObjectValue, InputComponentProps, LayoutComponentProps, ObjectSpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
5
|
+
export type ObjectLayoutProps<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = LayoutProps<FieldObjectValue, InputComponentProps, LayoutComponentProps, ObjectSpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
6
|
+
export type ObjectInput<InputComponentProps extends Record<string, any> | undefined = undefined> = InputType<FieldObjectValue, InputComponentProps, undefined, ObjectSpec<undefined, InputComponentProps, undefined>>;
|
|
7
|
+
export type ObjectIndependentInput<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = IndependentInputType<FieldObjectValue, InputComponentProps, LayoutComponentProps, ObjectSpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
8
|
+
export type ObjectLayout<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = LayoutType<FieldObjectValue, InputComponentProps, LayoutComponentProps, ObjectSpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
9
|
+
export type ObjectInputEntity<InputComponentProps extends Record<string, any> | undefined = undefined> = InputEntity<FieldObjectValue, InputComponentProps, undefined, ObjectSpec<undefined, InputComponentProps, undefined>>;
|
|
10
|
+
export type ObjectIndependentInputEntity<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = IndependentInputEntity<FieldObjectValue, InputComponentProps, LayoutComponentProps, ObjectSpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
11
|
+
export type ObjectInputsMap = InputsMap<FieldObjectValue, ObjectSpec<undefined, any, any>>;
|
|
12
|
+
export type ObjectLayoutsMap = LayoutsMap<FieldObjectValue, ObjectSpec<undefined, any, any>>;
|
|
13
|
+
export type ObjectValidatorsMap = ValidatorsMap<ObjectValue, ObjectSpec<undefined, any, any>>;
|
|
14
|
+
export type ObjectConfig = TypeConfig<FieldObjectValue, ObjectValue, ObjectSpec<undefined, any, any>>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { StringSpec } from '../../../types';
|
|
2
2
|
import { IndependentInputEntity, IndependentInputProps, IndependentInputType, InputEntity, InputProps, InputType, InputsMap, LayoutProps, LayoutType, LayoutsMap, TypeConfig, ValidatorsMap } from './';
|
|
3
|
-
export type StringInputProps<InputComponentProps extends Record<string, any> =
|
|
4
|
-
export type StringIndependentInputProps<InputComponentProps extends Record<string, any> =
|
|
5
|
-
export type StringLayoutProps<LayoutComponentProps extends Record<string, any> =
|
|
6
|
-
export type StringInput<InputComponentProps extends Record<string, any> =
|
|
7
|
-
export type StringIndependentInput<InputComponentProps extends Record<string, any> =
|
|
8
|
-
export type StringLayout<LayoutComponentProps extends Record<string, any> =
|
|
9
|
-
export type StringInputEntity = InputEntity<string, StringSpec
|
|
10
|
-
export type StringIndependentInputEntity = IndependentInputEntity<string, StringSpec
|
|
11
|
-
export type StringInputsMap = InputsMap<string, StringSpec
|
|
12
|
-
export type StringLayoutsMap = LayoutsMap<string, StringSpec
|
|
13
|
-
export type StringValidatorsMap = ValidatorsMap<string, StringSpec
|
|
14
|
-
export type StringConfig = TypeConfig<string, string, StringSpec
|
|
3
|
+
export type StringInputProps<InputComponentProps extends Record<string, any> | undefined = undefined> = InputProps<string, InputComponentProps, undefined, StringSpec<undefined, InputComponentProps, undefined>>;
|
|
4
|
+
export type StringIndependentInputProps<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = IndependentInputProps<string, InputComponentProps, LayoutComponentProps, StringSpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
5
|
+
export type StringLayoutProps<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = LayoutProps<string, InputComponentProps, LayoutComponentProps, StringSpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
6
|
+
export type StringInput<InputComponentProps extends Record<string, any> | undefined = undefined> = InputType<string, InputComponentProps, undefined, StringSpec<undefined, InputComponentProps, undefined>>;
|
|
7
|
+
export type StringIndependentInput<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = IndependentInputType<string, InputComponentProps, LayoutComponentProps, StringSpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
8
|
+
export type StringLayout<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = LayoutType<string, InputComponentProps, LayoutComponentProps, StringSpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
9
|
+
export type StringInputEntity<InputComponentProps extends Record<string, any> | undefined = undefined> = InputEntity<string, InputComponentProps, undefined, StringSpec<undefined, InputComponentProps, undefined>>;
|
|
10
|
+
export type StringIndependentInputEntity<InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = IndependentInputEntity<string, InputComponentProps, LayoutComponentProps, StringSpec<undefined, InputComponentProps, LayoutComponentProps>>;
|
|
11
|
+
export type StringInputsMap = InputsMap<string, StringSpec<undefined, any, any>>;
|
|
12
|
+
export type StringLayoutsMap = LayoutsMap<string, StringSpec<undefined, any, any>>;
|
|
13
|
+
export type StringValidatorsMap = ValidatorsMap<string, StringSpec<undefined, any, any>>;
|
|
14
|
+
export type StringConfig = TypeConfig<string, string, StringSpec<undefined, any, any>>;
|
|
@@ -3,4 +3,4 @@ export interface ViewControllerProps<SpecType extends Spec> {
|
|
|
3
3
|
spec: SpecType;
|
|
4
4
|
name: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const ViewController: <SpecType extends Spec
|
|
6
|
+
export declare const ViewController: <SpecType extends Spec<any, undefined, undefined>>({ spec, name, }: ViewControllerProps<SpecType>) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FormValue, Spec } from '../../../types';
|
|
2
2
|
import { DynamicViewConfig, IndependentViewEntity, ViewEntity, ViewLayoutType } from '../types';
|
|
3
|
-
export declare const useComponents: <Value extends FormValue, SpecType extends Spec
|
|
3
|
+
export declare const useComponents: <Value extends FormValue, SpecType extends Spec<any, undefined, undefined>>(spec: SpecType, config: DynamicViewConfig) => {
|
|
4
4
|
viewEntity: ViewEntity<Value, SpecType> | IndependentViewEntity<Value, SpecType> | undefined;
|
|
5
5
|
Layout: ViewLayoutType<Value, SpecType> | undefined;
|
|
6
6
|
};
|
|
@@ -12,4 +12,4 @@ export interface UseRenderParams<Value extends FormValue, SpecType extends Spec>
|
|
|
12
12
|
link: SpecType['viewSpec']['link'];
|
|
13
13
|
}>;
|
|
14
14
|
}
|
|
15
|
-
export declare const useRender: <Value extends FormValue, SpecType extends Spec
|
|
15
|
+
export declare const useRender: <Value extends FormValue, SpecType extends Spec<any, undefined, undefined>>({ value, name, spec, viewEntity, Layout, Link, }: UseRenderParams<Value, SpecType>) => JSX.Element | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ArraySpec, BooleanSpec, NumberSpec, ObjectSpec, StringSpec } from './types';
|
|
2
2
|
export declare const isCorrectSpec: (candidate: any) => boolean;
|
|
3
|
-
export declare const isArraySpec: (candidate: any) => candidate is ArraySpec<any,
|
|
4
|
-
export declare const isBooleanSpec: (candidate: any) => candidate is BooleanSpec<any,
|
|
5
|
-
export declare const isNumberSpec: (candidate: any) => candidate is NumberSpec<any,
|
|
6
|
-
export declare const isObjectSpec: (candidate: any) => candidate is ObjectSpec<any,
|
|
7
|
-
export declare const isStringSpec: (candidate: any) => candidate is StringSpec<any,
|
|
3
|
+
export declare const isArraySpec: (candidate: any) => candidate is ArraySpec<any, undefined, undefined>;
|
|
4
|
+
export declare const isBooleanSpec: (candidate: any) => candidate is BooleanSpec<any, undefined, undefined>;
|
|
5
|
+
export declare const isNumberSpec: (candidate: any) => candidate is NumberSpec<any, undefined, undefined>;
|
|
6
|
+
export declare const isObjectSpec: (candidate: any) => candidate is ObjectSpec<any, undefined, undefined>;
|
|
7
|
+
export declare const isStringSpec: (candidate: any) => candidate is StringSpec<any, undefined, undefined>;
|
|
@@ -2,7 +2,7 @@ import { LabelProps } from '@gravity-ui/uikit';
|
|
|
2
2
|
import { ColorTextBaseProps } from '@gravity-ui/uikit/build/esm/components/Text/colorText/colorText';
|
|
3
3
|
import { ReadAsMethod, SpecTypes } from '../constants';
|
|
4
4
|
import { ArrayValue, ObjectValue } from './';
|
|
5
|
-
export interface ArraySpec<LinkType = any, InputComponentProps extends Record<string, any> =
|
|
5
|
+
export interface ArraySpec<LinkType = any, InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> {
|
|
6
6
|
defaultValue?: ArrayValue;
|
|
7
7
|
type: SpecTypes.Array;
|
|
8
8
|
required?: boolean;
|
|
@@ -37,7 +37,7 @@ export interface ArraySpec<LinkType = any, InputComponentProps extends Record<st
|
|
|
37
37
|
layoutProps?: LayoutComponentProps;
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
export interface BooleanSpec<LinkType = any, InputComponentProps extends Record<string, any> =
|
|
40
|
+
export interface BooleanSpec<LinkType = any, InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> {
|
|
41
41
|
defaultValue?: boolean;
|
|
42
42
|
type: SpecTypes.Boolean;
|
|
43
43
|
required?: boolean;
|
|
@@ -55,7 +55,7 @@ export interface BooleanSpec<LinkType = any, InputComponentProps extends Record<
|
|
|
55
55
|
layoutProps?: LayoutComponentProps;
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
-
export interface NumberSpec<LinkType = any, InputComponentProps extends Record<string, any> =
|
|
58
|
+
export interface NumberSpec<LinkType = any, InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> {
|
|
59
59
|
defaultValue?: number;
|
|
60
60
|
type: SpecTypes.Number;
|
|
61
61
|
required?: boolean;
|
|
@@ -78,7 +78,7 @@ export interface NumberSpec<LinkType = any, InputComponentProps extends Record<s
|
|
|
78
78
|
layoutProps?: LayoutComponentProps;
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
|
-
export interface ObjectSpec<LinkType = any, InputComponentProps extends Record<string, any> =
|
|
81
|
+
export interface ObjectSpec<LinkType = any, InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> {
|
|
82
82
|
defaultValue?: ObjectValue;
|
|
83
83
|
type: SpecTypes.Object;
|
|
84
84
|
required?: boolean;
|
|
@@ -103,7 +103,7 @@ export interface ObjectSpec<LinkType = any, InputComponentProps extends Record<s
|
|
|
103
103
|
layoutProps?: LayoutComponentProps;
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
|
-
export interface StringSpec<LinkType = any, InputComponentProps extends Record<string, any> =
|
|
106
|
+
export interface StringSpec<LinkType = any, InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> {
|
|
107
107
|
defaultValue?: string;
|
|
108
108
|
type: SpecTypes.String;
|
|
109
109
|
required?: boolean;
|
|
@@ -158,4 +158,4 @@ export interface StringSpec<LinkType = any, InputComponentProps extends Record<s
|
|
|
158
158
|
generateRandomValueButton?: boolean;
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
|
-
export type Spec = ArraySpec | BooleanSpec | NumberSpec | ObjectSpec | StringSpec
|
|
161
|
+
export type Spec<LinkType = any, InputComponentProps extends Record<string, any> | undefined = undefined, LayoutComponentProps extends Record<string, any> | undefined = undefined> = ArraySpec<LinkType, InputComponentProps, LayoutComponentProps> | BooleanSpec<LinkType, InputComponentProps, LayoutComponentProps> | NumberSpec<LinkType, InputComponentProps, LayoutComponentProps> | ObjectSpec<LinkType, InputComponentProps, LayoutComponentProps> | StringSpec<LinkType, InputComponentProps, LayoutComponentProps>;
|
|
@@ -48,15 +48,16 @@
|
|
|
48
48
|
margin-left: 10px;
|
|
49
49
|
}
|
|
50
50
|
.df-card__title {
|
|
51
|
+
display: flex;
|
|
51
52
|
max-width: 533px;
|
|
52
53
|
}
|
|
53
54
|
.df-card__note {
|
|
54
55
|
margin-left: 5px;
|
|
55
56
|
}
|
|
56
|
-
.df-card__note .
|
|
57
|
+
.df-card__note .gc-help-popover {
|
|
57
58
|
display: flex;
|
|
58
59
|
}
|
|
59
|
-
.df-card__note .
|
|
60
|
+
.df-card__note .gc-help-popover > span {
|
|
60
61
|
display: flex;
|
|
61
62
|
}
|
|
62
63
|
.df-card__toggler-icon_open {
|
|
@@ -10,7 +10,7 @@ const b = block('copy-button');
|
|
|
10
10
|
*/
|
|
11
11
|
export const CopyButton = ({ spec, value }) => {
|
|
12
12
|
if ((isStringSpec(spec) || isNumberSpec(spec)) && spec.viewSpec.copy) {
|
|
13
|
-
return React.createElement(ClipboardButton, { className: b(), text: `${value}`, size:
|
|
13
|
+
return React.createElement(ClipboardButton, { className: b(), text: `${value}`, size: "s" });
|
|
14
14
|
}
|
|
15
15
|
return null;
|
|
16
16
|
};
|
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
.df-error-wrapper_error .g-text-area__content:hover:not(.df-error-wrapper-ignore),
|
|
17
17
|
.df-error-wrapper_error .yc-text-input_view_normal:not(.df-error-wrapper-ignore) .yc-text-input__control,
|
|
18
18
|
.df-error-wrapper_error .yc-text-input_view_normal:not(.df-error-wrapper-ignore) .yc-text-input__content,
|
|
19
|
-
.df-error-wrapper_error .
|
|
19
|
+
.df-error-wrapper_error .g-text-input_view_normal:not(.df-error-wrapper-ignore) .g-text-input__control,
|
|
20
|
+
.df-error-wrapper_error .g-text-input_view_normal:not(.df-error-wrapper-ignore) .g-text-input__content,
|
|
21
|
+
.df-error-wrapper_error .yc-checkbox__indicator:not(.df-error-wrapper-ignore)::before,
|
|
22
|
+
.df-error-wrapper_error .g-checkbox__indicator:not(.df-error-wrapper-ignore)::before {
|
|
20
23
|
border-color: var(--g-color-text-danger);
|
|
21
24
|
}
|
|
22
25
|
.df-error-wrapper__error-text {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
.df-monaco-input-dialog .
|
|
1
|
+
.df-monaco-input-dialog .g-dialog-footer {
|
|
2
2
|
padding: 10px 32px 32px;
|
|
3
3
|
}
|
|
4
4
|
.df-monaco-input-dialog__container {
|
|
5
5
|
border: 1px solid var(--g-color-line-generic);
|
|
6
6
|
}
|
|
7
|
-
.df-monaco-input-dialog__dialog-header .
|
|
7
|
+
.df-monaco-input-dialog__dialog-header .g-dialog-header__caption {
|
|
8
8
|
min-height: 24px;
|
|
9
9
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
.df-table-array__table {
|
|
2
2
|
margin-bottom: 10px;
|
|
3
3
|
}
|
|
4
|
-
.df-table-array__table .
|
|
4
|
+
.df-table-array__table .g-table__cell {
|
|
5
5
|
border-bottom: 0px transparent;
|
|
6
6
|
}
|
|
7
|
-
.df-table-array__row .
|
|
7
|
+
.df-table-array__row .g-table__cell {
|
|
8
8
|
border-bottom: 0px transparent;
|
|
9
9
|
border-top: 1px solid var(--g-color-line-generic);
|
|
10
10
|
}
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
display: none;
|
|
13
13
|
}
|
|
14
14
|
.df-table-array__cell .yc-text-input,
|
|
15
|
+
.df-table-array__cell .g-text-input,
|
|
15
16
|
.df-table-array__cell .yc-select-control,
|
|
17
|
+
.df-table-array__cell .g-select-control,
|
|
16
18
|
.df-table-array__cell .yc-select,
|
|
17
19
|
.df-table-array__cell .g-select {
|
|
18
20
|
max-width: 150px;
|
|
@@ -22,10 +24,14 @@
|
|
|
22
24
|
padding-left: 3px;
|
|
23
25
|
}
|
|
24
26
|
.df-table-array__cell_arr .yc-text-input,
|
|
27
|
+
.df-table-array__cell_arr .g-text-input,
|
|
25
28
|
.df-table-array__cell_arr .yc-select-control:not(.df-multi-select),
|
|
29
|
+
.df-table-array__cell_arr .g-select-control:not(.df-multi-select),
|
|
26
30
|
.df-table-array__cell_arr .yc-select:not(.df-multi-select),
|
|
27
31
|
.df-table-array__cell_arr .g-select:not(.df-multi-select), .df-table-array__cell_obj .yc-text-input,
|
|
32
|
+
.df-table-array__cell_obj .g-text-input,
|
|
28
33
|
.df-table-array__cell_obj .yc-select-control:not(.df-multi-select),
|
|
34
|
+
.df-table-array__cell_obj .g-select-control:not(.df-multi-select),
|
|
29
35
|
.df-table-array__cell_obj .yc-select:not(.df-multi-select),
|
|
30
36
|
.df-table-array__cell_obj .g-select:not(.df-multi-select) {
|
|
31
37
|
max-width: unset;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ArrayLayoutProps, ObjectLayoutProps } from '../../../../core';
|
|
2
|
-
export declare const Accordeon: <T extends ArrayLayoutProps<
|
|
2
|
+
export declare const Accordeon: <T extends ArrayLayoutProps<undefined, undefined> | ObjectLayoutProps<undefined, undefined>>({ name, spec, input, meta, children, }: T) => JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ArrayLayoutProps, ObjectLayoutProps } from '../../../../core';
|
|
2
2
|
import './AccordeonCardForm.css';
|
|
3
|
-
export declare const AccordeonCardForm: <T extends ArrayLayoutProps<
|
|
3
|
+
export declare const AccordeonCardForm: <T extends ArrayLayoutProps<undefined, undefined> | ObjectLayoutProps<undefined, undefined>>({ name, spec, input, children, meta, }: T) => JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FieldValue, LayoutProps, Spec } from '../../../core';
|
|
2
|
-
export declare const CardAccordeon: <T extends FieldValue, S extends Spec
|
|
2
|
+
export declare const CardAccordeon: <T extends FieldValue, S extends Spec<any, undefined, undefined>>({ name, spec, input, meta, children, }: LayoutProps<T, undefined, undefined, S>) => JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FieldValue, LayoutProps, Spec } from '../../../core';
|
|
2
|
-
export declare const CardSection: <T extends FieldValue, S extends Spec
|
|
2
|
+
export declare const CardSection: <T extends FieldValue, S extends Spec<any, undefined, undefined>>({ name, spec, input, meta, children, }: LayoutProps<T, undefined, undefined, S>) => JSX.Element;
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
position: absolute;
|
|
42
42
|
margin-top: 1px;
|
|
43
43
|
}
|
|
44
|
-
.df-row__note-inner .
|
|
44
|
+
.df-row__note-inner .g-help-popover {
|
|
45
45
|
display: flex;
|
|
46
46
|
}
|
|
47
|
-
.df-row__note-inner .
|
|
47
|
+
.df-row__note-inner .g-help-popover > span {
|
|
48
48
|
display: flex;
|
|
49
49
|
}
|
|
50
50
|
.df-row__right {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FieldValue, LayoutProps, Spec } from '../../../../core';
|
|
2
2
|
import './Row.css';
|
|
3
|
-
export declare const Row: <T extends FieldValue, S extends Spec
|
|
4
|
-
export declare const RowVerbose: <T extends FieldValue, S extends Spec
|
|
3
|
+
export declare const Row: <T extends FieldValue, S extends Spec<any, undefined, undefined>>(props: LayoutProps<T, undefined, undefined, S>) => JSX.Element;
|
|
4
|
+
export declare const RowVerbose: <T extends FieldValue, S extends Spec<any, undefined, undefined>>(props: LayoutProps<T, undefined, undefined, S>) => JSX.Element;
|
|
@@ -28,5 +28,5 @@ const RowBase = ({ name, spec, input, meta, verboseDescription, children, }) =>
|
|
|
28
28
|
React.createElement(Icon, { data: TrashBin, size: 16 }))) : null),
|
|
29
29
|
verboseDescription && spec.viewSpec.layoutDescription ? (React.createElement("div", { className: b('description'), dangerouslySetInnerHTML: { __html: spec.viewSpec.layoutDescription } })) : null)));
|
|
30
30
|
};
|
|
31
|
-
export const Row = (props) =>
|
|
32
|
-
export const RowVerbose = (props) =>
|
|
31
|
+
export const Row = (props) => React.createElement(RowBase, Object.assign({}, props));
|
|
32
|
+
export const RowVerbose = (props) => React.createElement(RowBase, Object.assign({ verboseDescription: true }, props));
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
.df-section__note {
|
|
29
29
|
margin-left: 5px;
|
|
30
30
|
}
|
|
31
|
-
.df-section__note .
|
|
31
|
+
.df-section__note .g-help-popover {
|
|
32
32
|
display: flex;
|
|
33
33
|
}
|
|
34
|
-
.df-section__note .
|
|
34
|
+
.df-section__note .g-help-popover > span {
|
|
35
35
|
display: flex;
|
|
36
36
|
}
|
|
37
37
|
.df-section__description {
|
|
@@ -6,10 +6,10 @@ interface SectionProps {
|
|
|
6
6
|
ignoreDescription?: boolean;
|
|
7
7
|
descriptionAsSubtitle?: boolean;
|
|
8
8
|
}
|
|
9
|
-
export declare const Section: <D extends FieldValue, T extends FormValue, S extends Spec
|
|
10
|
-
export declare const Section2: <D extends FieldValue, T extends FormValue, S extends Spec
|
|
11
|
-
export declare const SectionWithSubtitle: <D extends FieldValue, T extends FormValue, S extends Spec
|
|
12
|
-
export declare const SectionWithSubtitle2: <D extends FieldValue, T extends FormValue, S extends Spec
|
|
13
|
-
export declare const Group: <D extends FieldValue, T extends FormValue, S extends Spec
|
|
14
|
-
export declare const Group2: <D extends FieldValue, T extends FormValue, S extends Spec
|
|
9
|
+
export declare const Section: <D extends FieldValue, T extends FormValue, S extends Spec<any, undefined, undefined>>(props: (LayoutProps<D, undefined, undefined, S> | ViewLayoutProps<T, S>) & Pick<SectionProps, "ignoreDescription">) => JSX.Element;
|
|
10
|
+
export declare const Section2: <D extends FieldValue, T extends FormValue, S extends Spec<any, undefined, undefined>>(props: (LayoutProps<D, undefined, undefined, S> | ViewLayoutProps<T, S>) & Pick<SectionProps, "ignoreDescription">) => JSX.Element;
|
|
11
|
+
export declare const SectionWithSubtitle: <D extends FieldValue, T extends FormValue, S extends Spec<any, undefined, undefined>>(props: (LayoutProps<D, undefined, undefined, S> | ViewLayoutProps<T, S>) & Pick<SectionProps, "ignoreDescription">) => JSX.Element;
|
|
12
|
+
export declare const SectionWithSubtitle2: <D extends FieldValue, T extends FormValue, S extends Spec<any, undefined, undefined>>(props: (LayoutProps<D, undefined, undefined, S> | ViewLayoutProps<T, S>) & Pick<SectionProps, "ignoreDescription">) => JSX.Element;
|
|
13
|
+
export declare const Group: <D extends FieldValue, T extends FormValue, S extends Spec<any, undefined, undefined>>(props: (LayoutProps<D, undefined, undefined, S> | ViewLayoutProps<T, S>) & Pick<SectionProps, "ignoreDescription">) => JSX.Element;
|
|
14
|
+
export declare const Group2: <D extends FieldValue, T extends FormValue, S extends Spec<any, undefined, undefined>>(props: (LayoutProps<D, undefined, undefined, S> | ViewLayoutProps<T, S>) & Pick<SectionProps, "ignoreDescription">) => JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FieldValue, LayoutProps, Spec } from '../../../../core';
|
|
2
|
-
export declare const TableCell: <T extends FieldValue, S extends Spec
|
|
2
|
+
export declare const TableCell: <T extends FieldValue, S extends Spec<any, undefined, undefined>>({ name, meta, children, }: LayoutProps<T, undefined, undefined, S>) => JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { FieldValue, LayoutProps, Spec } from '../../../../core';
|
|
2
2
|
import './Transparent.css';
|
|
3
|
-
export declare const Transparent: <T extends FieldValue, S extends Spec
|
|
3
|
+
export declare const Transparent: <T extends FieldValue, S extends Spec<any, undefined, undefined>>({ name, spec, input, meta, children, }: LayoutProps<T, undefined, undefined, S>) => JSX.Element;
|
|
@@ -39,6 +39,6 @@ export const LongValue = ({ value, className }) => {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
return (React.createElement("div", { ref: ref, onClick: long ? handleClick : undefined },
|
|
42
|
+
return (React.createElement("div", { className: b('container'), ref: ref, onClick: long ? handleClick : undefined },
|
|
43
43
|
React.createElement(Text, Object.assign({ className: b({ long }, className), ellipsis: true }, currentTextProperies), value)));
|
|
44
44
|
};
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
.df-simple-vertical-accordeon__tooltip {
|
|
21
21
|
margin: 0px 5px;
|
|
22
22
|
}
|
|
23
|
-
.df-simple-vertical-accordeon__tooltip .
|
|
23
|
+
.df-simple-vertical-accordeon__tooltip .g-help-popover {
|
|
24
24
|
display: flex;
|
|
25
25
|
}
|
|
26
|
-
.df-simple-vertical-accordeon__tooltip .
|
|
26
|
+
.df-simple-vertical-accordeon__tooltip .g-help-popover > span {
|
|
27
27
|
display: flex;
|
|
28
28
|
}
|
|
29
29
|
.df-simple-vertical-accordeon__chevron {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FormValue, Spec, ViewLayoutProps } from '../../../core';
|
|
2
|
-
export declare const ViewCardSection: <T extends FormValue, S extends Spec
|
|
2
|
+
export declare const ViewCardSection: <T extends FormValue, S extends Spec<any, undefined, undefined>>({ name, value, spec, children, }: ViewLayoutProps<T, S>) => JSX.Element | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { FormValue, Spec, ViewLayoutProps } from '../../../../core';
|
|
2
2
|
import './ViewRow.css';
|
|
3
|
-
export declare const ViewRow: <T extends FormValue, S extends Spec
|
|
3
|
+
export declare const ViewRow: <T extends FormValue, S extends Spec<any, undefined, undefined>>({ value, spec, children, }: ViewLayoutProps<T, S>) => JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormValue, Spec, ViewLayoutProps } from '../../../../core';
|
|
2
|
-
export declare const ViewSection: <T extends FormValue, S extends Spec
|
|
3
|
-
export declare const ViewSection2: <T extends FormValue, S extends Spec
|
|
4
|
-
export declare const ViewGroup: <T extends FormValue, S extends Spec
|
|
5
|
-
export declare const ViewGroup2: <T extends FormValue, S extends Spec
|
|
2
|
+
export declare const ViewSection: <T extends FormValue, S extends Spec<any, undefined, undefined>>(props: ViewLayoutProps<T, S>) => JSX.Element | null;
|
|
3
|
+
export declare const ViewSection2: <T extends FormValue, S extends Spec<any, undefined, undefined>>(props: ViewLayoutProps<T, S>) => JSX.Element | null;
|
|
4
|
+
export declare const ViewGroup: <T extends FormValue, S extends Spec<any, undefined, undefined>>(props: ViewLayoutProps<T, S>) => JSX.Element | null;
|
|
5
|
+
export declare const ViewGroup2: <T extends FormValue, S extends Spec<any, undefined, undefined>>(props: ViewLayoutProps<T, S>) => JSX.Element | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { FormValue, Spec, ViewLayoutProps } from '../../../../core';
|
|
2
2
|
import './ViewTableCell.css';
|
|
3
|
-
export declare const ViewTableCell: <T extends FormValue, S extends Spec
|
|
3
|
+
export declare const ViewTableCell: <T extends FormValue, S extends Spec<any, undefined, undefined>>({ value, spec, children, }: ViewLayoutProps<T, S>) => JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { FormValue, Spec, ViewLayoutProps } from '../../../../core';
|
|
2
2
|
import './ViewTransparent.css';
|
|
3
|
-
export declare const ViewTransparent: <T extends FormValue, S extends Spec
|
|
3
|
+
export declare const ViewTransparent: <T extends FormValue, S extends Spec<any, undefined, undefined>>({ value, spec, children, }: ViewLayoutProps<T, S>) => JSX.Element | null;
|
|
@@ -6,7 +6,7 @@ export interface UseOneOfParams {
|
|
|
6
6
|
}
|
|
7
7
|
export declare const useOneOf: ({ props, onTogglerChange }: UseOneOfParams) => {
|
|
8
8
|
oneOfValue: string;
|
|
9
|
-
specProperties: Record<string, import("../../../core").Spec
|
|
9
|
+
specProperties: Record<string, import("../../../core").Spec<any, undefined, undefined>>;
|
|
10
10
|
toggler: JSX.Element;
|
|
11
11
|
togglerInput: JSX.Element;
|
|
12
12
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FormValue, Spec, StringSpec } from '../../core';
|
|
2
2
|
export declare const isNotEmptyValue: (value: FormValue | undefined, spec: Spec | undefined) => boolean;
|
|
3
|
-
export declare const prepareSpec: <Type extends Spec
|
|
3
|
+
export declare const prepareSpec: <Type extends Spec<any, undefined, undefined>>(spec: Type, parseJsonDefaultValue?: boolean) => Type;
|
|
4
4
|
export declare const isCorrectSizeParams: (spec: StringSpec) => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravity-ui/dynamic-forms",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "build/cjs/index.js",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@bem-react/classname": "^1.6.0",
|
|
47
|
-
"@gravity-ui/components": "^
|
|
48
|
-
"@gravity-ui/i18n": "^1.
|
|
47
|
+
"@gravity-ui/components": "^3.0.0",
|
|
48
|
+
"@gravity-ui/i18n": "^1.2.0",
|
|
49
49
|
"@gravity-ui/icons": "^2.8.1",
|
|
50
50
|
"lodash": "^4.17.20"
|
|
51
51
|
},
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
"@babel/preset-typescript": "^7.18.6",
|
|
55
55
|
"@commitlint/cli": "^17.0.0",
|
|
56
56
|
"@commitlint/config-conventional": "^17.0.0",
|
|
57
|
-
"@gravity-ui/eslint-config": "^
|
|
57
|
+
"@gravity-ui/eslint-config": "^3.1.1",
|
|
58
58
|
"@gravity-ui/prettier-config": "^1.1.0",
|
|
59
|
-
"@gravity-ui/stylelint-config": "^
|
|
59
|
+
"@gravity-ui/stylelint-config": "^4.0.1",
|
|
60
60
|
"@gravity-ui/tsconfig": "^1.0.0",
|
|
61
|
-
"@gravity-ui/uikit": "^
|
|
61
|
+
"@gravity-ui/uikit": "^6.0.0",
|
|
62
62
|
"@playwright/experimental-ct-react": "^1.40.0",
|
|
63
63
|
"@playwright/test": "^1.40.0",
|
|
64
64
|
"@storybook/addon-essentials": "^7.0.27",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@types/uuid": "^9.0.4",
|
|
77
77
|
"@vitejs/plugin-react": "^4.2.0",
|
|
78
78
|
"css-loader": "^5.2.6",
|
|
79
|
-
"eslint": "^8.
|
|
79
|
+
"eslint": "^8.49.0",
|
|
80
80
|
"final-form": "^4.20.2",
|
|
81
81
|
"gulp": "^4.0.2",
|
|
82
82
|
"gulp-cli": "^2.3.0",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"monaco-editor-webpack-plugin": "^6.0.0",
|
|
92
92
|
"npm-run-all": "^4.1.5",
|
|
93
93
|
"postcss": "^8.4.19",
|
|
94
|
-
"prettier": "^
|
|
94
|
+
"prettier": "^3.0.3",
|
|
95
95
|
"randexp": "^0.5.3",
|
|
96
96
|
"react": "^18.2.0",
|
|
97
97
|
"react-dom": "^18.2.0",
|
|
@@ -103,14 +103,14 @@
|
|
|
103
103
|
"sass-loader": "^10.1.1",
|
|
104
104
|
"storybook": "^7.0.27",
|
|
105
105
|
"style-loader": "^2.0.0",
|
|
106
|
-
"stylelint": "^
|
|
107
|
-
"stylelint-scss": "^
|
|
106
|
+
"stylelint": "^15.10.3",
|
|
107
|
+
"stylelint-scss": "^5.1.0",
|
|
108
108
|
"ts-jest": "^29.0.5",
|
|
109
109
|
"typescript": "^4.9.5",
|
|
110
110
|
"uuid": "^9.0.1"
|
|
111
111
|
},
|
|
112
112
|
"peerDependencies": {
|
|
113
|
-
"@gravity-ui/uikit": "^
|
|
113
|
+
"@gravity-ui/uikit": "^6.0.0",
|
|
114
114
|
"final-form": "^4.20.2",
|
|
115
115
|
"react": "^16.0.0 || ^17.0.0 || ^18.0.0",
|
|
116
116
|
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0",
|