@gravity-ui/dynamic-forms 3.6.1 → 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.
Files changed (66) hide show
  1. package/build/cjs/lib/kit/components/Card/Card.css +3 -2
  2. package/build/cjs/lib/kit/components/CopyButton/CopyButton.js +1 -1
  3. package/build/cjs/lib/kit/components/ErrorWrapper/ErrorWrapper.css +4 -1
  4. package/build/cjs/lib/kit/components/Inputs/MonacoInput/MonacoInputDialog.css +2 -2
  5. package/build/cjs/lib/kit/components/Inputs/TableArrayInput/TableArrayInput.css +8 -2
  6. package/build/cjs/lib/kit/components/Inputs/TextContent/TextContent.css +2 -2
  7. package/build/cjs/lib/kit/components/Layouts/Row/Row.css +2 -2
  8. package/build/cjs/lib/kit/components/Layouts/Row/Row.js +2 -2
  9. package/build/cjs/lib/kit/components/Layouts/Section/Section.css +2 -2
  10. package/build/cjs/lib/kit/components/LongValue/LongValue.css +3 -0
  11. package/build/cjs/lib/kit/components/LongValue/LongValue.js +1 -1
  12. package/build/cjs/lib/kit/components/SimpleVerticalAccordeon/SimpleVerticalAccordeon.css +2 -2
  13. package/build/cjs/lib/kit/components/Views/MonacoInputView/MonacoViewDialog.css +1 -1
  14. package/build/cjs/lib/kit/constants/config.js +2 -0
  15. package/build/cjs/lib/kit/utils/objectInline.js +1 -1
  16. package/build/cjs/lib/kit/validators/validators.js +5 -5
  17. package/build/esm/lib/core/components/Form/Controller/Controller.d.ts +1 -1
  18. package/build/esm/lib/core/components/Form/Controller/types.d.ts +6 -6
  19. package/build/esm/lib/core/components/Form/Controller/utils.d.ts +10 -10
  20. package/build/esm/lib/core/components/Form/hooks/useGenerateRandomValue.d.ts +1 -1
  21. package/build/esm/lib/core/components/Form/types/array.d.ts +12 -12
  22. package/build/esm/lib/core/components/Form/types/boolean.d.ts +12 -12
  23. package/build/esm/lib/core/components/Form/types/config.d.ts +1 -1
  24. package/build/esm/lib/core/components/Form/types/input.d.ts +13 -13
  25. package/build/esm/lib/core/components/Form/types/layout.d.ts +5 -5
  26. package/build/esm/lib/core/components/Form/types/number.d.ts +12 -12
  27. package/build/esm/lib/core/components/Form/types/object.d.ts +12 -12
  28. package/build/esm/lib/core/components/Form/types/string.d.ts +12 -12
  29. package/build/esm/lib/core/components/View/ViewController.d.ts +1 -1
  30. package/build/esm/lib/core/components/View/hooks/useComponents.d.ts +1 -1
  31. package/build/esm/lib/core/components/View/hooks/useRender.d.ts +1 -1
  32. package/build/esm/lib/core/helpers.d.ts +5 -5
  33. package/build/esm/lib/core/types/specs.d.ts +6 -6
  34. package/build/esm/lib/kit/components/Card/Card.css +3 -2
  35. package/build/esm/lib/kit/components/CopyButton/CopyButton.js +1 -1
  36. package/build/esm/lib/kit/components/ErrorWrapper/ErrorWrapper.css +4 -1
  37. package/build/esm/lib/kit/components/Inputs/MonacoInput/MonacoInputDialog.css +2 -2
  38. package/build/esm/lib/kit/components/Inputs/TableArrayInput/TableArrayInput.css +8 -2
  39. package/build/esm/lib/kit/components/Inputs/TextContent/TextContent.css +2 -2
  40. package/build/esm/lib/kit/components/Layouts/Accordeon/Accordeon.d.ts +1 -1
  41. package/build/esm/lib/kit/components/Layouts/AccordeonCard/AccordeonCardForm.d.ts +1 -1
  42. package/build/esm/lib/kit/components/Layouts/CardAccordeon.d.ts +1 -1
  43. package/build/esm/lib/kit/components/Layouts/CardSection.d.ts +1 -1
  44. package/build/esm/lib/kit/components/Layouts/Row/Row.css +2 -2
  45. package/build/esm/lib/kit/components/Layouts/Row/Row.d.ts +2 -2
  46. package/build/esm/lib/kit/components/Layouts/Row/Row.js +2 -2
  47. package/build/esm/lib/kit/components/Layouts/Section/Section.css +2 -2
  48. package/build/esm/lib/kit/components/Layouts/Section/Section.d.ts +6 -6
  49. package/build/esm/lib/kit/components/Layouts/TableCell/TableCell.d.ts +1 -1
  50. package/build/esm/lib/kit/components/Layouts/Transparent/Transparent.d.ts +1 -1
  51. package/build/esm/lib/kit/components/LongValue/LongValue.css +3 -0
  52. package/build/esm/lib/kit/components/LongValue/LongValue.js +1 -1
  53. package/build/esm/lib/kit/components/SimpleVerticalAccordeon/SimpleVerticalAccordeon.css +2 -2
  54. package/build/esm/lib/kit/components/ViewLayouts/ViewCardSection.d.ts +1 -1
  55. package/build/esm/lib/kit/components/ViewLayouts/ViewRow/ViewRow.d.ts +1 -1
  56. package/build/esm/lib/kit/components/ViewLayouts/ViewSection/ViewSection.d.ts +4 -4
  57. package/build/esm/lib/kit/components/ViewLayouts/ViewTableCell/ViewTableCell.d.ts +1 -1
  58. package/build/esm/lib/kit/components/ViewLayouts/ViewTransparent/ViewTransparent.d.ts +1 -1
  59. package/build/esm/lib/kit/components/Views/MonacoInputView/MonacoViewDialog.css +1 -1
  60. package/build/esm/lib/kit/constants/config.js +2 -0
  61. package/build/esm/lib/kit/hooks/useOneOf/useOneOf.d.ts +1 -1
  62. package/build/esm/lib/kit/utils/common.d.ts +1 -1
  63. package/build/esm/lib/kit/utils/objectInline.d.ts +1 -1
  64. package/build/esm/lib/kit/utils/objectInline.js +2 -2
  65. package/build/esm/lib/kit/validators/validators.js +5 -5
  66. 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 .yc-help-popover {
57
+ .df-card__note .gc-help-popover {
57
58
  display: flex;
58
59
  }
59
- .df-card__note .yc-help-popover > span {
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: 14 });
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 .yc-checkbox__indicator:not(.df-error-wrapper-ignore)::before {
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 .yc-dialog-footer {
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 .yc-dialog-header__caption {
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 .yc-table__cell {
4
+ .df-table-array__table .g-table__cell {
5
5
  border-bottom: 0px transparent;
6
6
  }
7
- .df-table-array__row .yc-table__cell {
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,8 +1,8 @@
1
- .df-text-content.yc-label {
1
+ .df-text-content.g-label {
2
2
  height: auto;
3
3
  width: auto;
4
4
  }
5
- .df-text-content .yc-label__text {
5
+ .df-text-content .g-label__text {
6
6
  text-align: initial;
7
7
  white-space: initial;
8
8
  }
@@ -41,10 +41,10 @@
41
41
  position: absolute;
42
42
  margin-top: 1px;
43
43
  }
44
- .df-row__note-inner .yc-help-popover {
44
+ .df-row__note-inner .g-help-popover {
45
45
  display: flex;
46
46
  }
47
- .df-row__note-inner .yc-help-popover > span {
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) => (react_1.default.createElement(RowBase, Object.assign({}, props)));
34
+ const Row = (props) => react_1.default.createElement(RowBase, Object.assign({}, props));
35
35
  exports.Row = Row;
36
- const RowVerbose = (props) => (react_1.default.createElement(RowBase, Object.assign({ verboseDescription: true }, 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 .yc-help-popover {
31
+ .df-section__note .g-help-popover {
32
32
  display: flex;
33
33
  }
34
- .df-section__note .yc-help-popover > span {
34
+ .df-section__note .g-help-popover > span {
35
35
  display: flex;
36
36
  }
37
37
  .df-section__description {
@@ -6,4 +6,7 @@
6
6
  }
7
7
  .df-long-value_long:hover {
8
8
  color: var(--g-color-text-secondary);
9
+ }
10
+ .df-long-value__container {
11
+ display: flex;
9
12
  }
@@ -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 .yc-help-popover {
23
+ .df-simple-vertical-accordeon__tooltip .g-help-popover {
24
24
  display: flex;
25
25
  }
26
- .df-simple-vertical-accordeon__tooltip .yc-help-popover > span {
26
+ .df-simple-vertical-accordeon__tooltip .g-help-popover > span {
27
27
  display: flex;
28
28
  }
29
29
  .df-simple-vertical-accordeon__chevron {
@@ -1,4 +1,4 @@
1
- .df-monaco-view-dialog .yc-dialog-footer {
1
+ .df-monaco-view-dialog .g-dialog-footer {
2
2
  padding: 10px 32px 32px;
3
3
  }
4
4
  .df-monaco-view-dialog__container {
@@ -37,6 +37,7 @@ exports.dynamicConfig = {
37
37
  row: components_1.Row,
38
38
  row_verbose: components_1.RowVerbose,
39
39
  table_item: components_1.TableCell,
40
+ transparent: components_1.Transparent,
40
41
  },
41
42
  validators: {
42
43
  base: (0, validators_1.getBooleanValidator)(),
@@ -145,6 +146,7 @@ exports.dynamicViewConfig = {
145
146
  row: components_1.ViewRow,
146
147
  row_verbose: components_1.ViewRow,
147
148
  table_item: components_1.ViewTableCell,
149
+ transparent: components_1.ViewTransparent,
148
150
  },
149
151
  },
150
152
  number: {
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.filterPropertiesForObjectInline = void 0;
4
4
  const core_1 = require("../../core");
5
5
  const filterPropertiesForObjectInline = (properties) => {
6
- return Object.fromEntries(Object.entries(properties).filter(([, propSpec]) => (0, core_1.isStringSpec)(propSpec) || (0, core_1.isNumberSpec)(propSpec)));
6
+ return Object.fromEntries(Object.entries(properties).filter(([, propSpec]) => (0, core_1.isStringSpec)(propSpec) || (0, core_1.isNumberSpec)(propSpec) || (0, core_1.isBooleanSpec)(propSpec)));
7
7
  };
8
8
  exports.filterPropertiesForObjectInline = filterPropertiesForObjectInline;
@@ -7,8 +7,8 @@ const validators_1 = require("../validators");
7
7
  const helpers_1 = require("./helpers");
8
8
  const getArrayValidator = (params = {}) => {
9
9
  const { ignoreRequiredCheck, ignoreMaxLengthCheck, ignoreMinLengthCheck, customErrorMessages } = params;
10
- const errorMessages = Object.assign(Object.assign({}, validators_1.ErrorMessages), customErrorMessages);
11
10
  return (spec, value) => {
11
+ const errorMessages = Object.assign(Object.assign({}, validators_1.ErrorMessages), customErrorMessages);
12
12
  const valueLength = (value === null || value === void 0 ? void 0 : value.length) || 0;
13
13
  if (!ignoreRequiredCheck && spec.required && !lodash_1.default.isArray(value)) {
14
14
  return errorMessages.REQUIRED;
@@ -29,8 +29,8 @@ const getArrayValidator = (params = {}) => {
29
29
  exports.getArrayValidator = getArrayValidator;
30
30
  const getBooleanValidator = (params = {}) => {
31
31
  const { ignoreRequiredCheck, customErrorMessages } = params;
32
- const errorMessages = Object.assign(Object.assign({}, validators_1.ErrorMessages), customErrorMessages);
33
32
  return (spec, value) => {
33
+ const errorMessages = Object.assign(Object.assign({}, validators_1.ErrorMessages), customErrorMessages);
34
34
  if (!ignoreRequiredCheck && spec.required && !value) {
35
35
  return errorMessages.REQUIRED;
36
36
  }
@@ -40,9 +40,9 @@ const getBooleanValidator = (params = {}) => {
40
40
  exports.getBooleanValidator = getBooleanValidator;
41
41
  const getNumberValidator = (params = {}) => {
42
42
  const { ignoreRequiredCheck, ignoreSpaceStartCheck, ignoreSpaceEndCheck, ignoreNumberCheck, ignoreMaximumCheck, ignoreMinimumCheck, ignoreIntCheck, ignoreDotEnd, ignoreZeroStart, customErrorMessages, } = params;
43
- const errorMessages = Object.assign(Object.assign({}, validators_1.ErrorMessages), customErrorMessages);
44
43
  // eslint-disable-next-line complexity
45
44
  return (spec, value = '') => {
45
+ const errorMessages = Object.assign(Object.assign({}, validators_1.ErrorMessages), customErrorMessages);
46
46
  const stringValue = String(value);
47
47
  if (!ignoreRequiredCheck && spec.required && !stringValue.length) {
48
48
  return errorMessages.REQUIRED;
@@ -91,8 +91,8 @@ const getNumberValidator = (params = {}) => {
91
91
  exports.getNumberValidator = getNumberValidator;
92
92
  const getObjectValidator = (params = {}) => {
93
93
  const { ignoreRequiredCheck, customErrorMessages } = params;
94
- const errorMessages = Object.assign(Object.assign({}, validators_1.ErrorMessages), customErrorMessages);
95
94
  return (spec, value) => {
95
+ const errorMessages = Object.assign(Object.assign({}, validators_1.ErrorMessages), customErrorMessages);
96
96
  if (!ignoreRequiredCheck && spec.required && !value) {
97
97
  return errorMessages.REQUIRED;
98
98
  }
@@ -102,9 +102,9 @@ const getObjectValidator = (params = {}) => {
102
102
  exports.getObjectValidator = getObjectValidator;
103
103
  const getStringValidator = (params = {}) => {
104
104
  const { ignoreRequiredCheck, ignoreSpaceStartCheck, ignoreSpaceEndCheck, ignoreMaxLengthCheck, ignoreMinLengthCheck, ignoreRegExpCheck, customErrorMessages, } = params;
105
- const errorMessages = Object.assign(Object.assign({}, validators_1.ErrorMessages), customErrorMessages);
106
105
  // eslint-disable-next-line complexity
107
106
  return (spec, value = '') => {
107
+ const errorMessages = Object.assign(Object.assign({}, validators_1.ErrorMessages), customErrorMessages);
108
108
  const valueLength = value === null || value === void 0 ? void 0 : value.length;
109
109
  if (!ignoreRequiredCheck && spec.required && !valueLength) {
110
110
  return errorMessages.REQUIRED;
@@ -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>({ spec: _spec, name, value: valueFromParent, parentOnChange, parentOnUnmount, }: ControllerProps<DirtyValue, SpecType>) => JSX.Element | null;
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>(store: ControllerStore<DirtyValue, Value, SpecType>) => void;
5
- export declare const callUnmout: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec>(store: ControllerStore<DirtyValue, Value, SpecType>) => void;
6
- export declare const getSpec: <SpecType extends Spec>({ name, spec, mutatorsStore, }: GetSpecParams<SpecType>) => SpecType;
7
- export declare const getComponents: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec>({ spec, config, }: GetComponentsParams<SpecType>) => GetComponentsReturn<DirtyValue, SpecType>;
8
- export declare const getRender: <DirtyValue extends FieldValue, SpecType extends Spec>({ 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>({ spec, config, }: GetValidateParams<SpecType>) => (value?: Value | undefined) => ValidateError;
10
- export declare const getFieldInitials: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec>({ name, spec, valueFromParent, initialValue, validate, mutatorsStore, }: GetFieldInitialsParams<DirtyValue, Value, SpecType>) => {
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>() => GetFieldMethodsReturn<DirtyValue, Value, SpecType>;
25
- export declare const initializeStore: <DirtyValue extends FieldValue, Value extends FormValue, SpecType extends Spec>({ 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>({ store, setStore, spec: _spec, name, parentOnChange, parentOnUnmount, mutatorsStore, valueFromParent, config, tools, methodOnChange, }: UpdateStoreParams<DirtyValue, Value, SpecType>) => void;
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, {}, {}>) => string) | undefined;
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> = {}> = InputProps<FieldArrayValue, ArraySpec<undefined, InputComponentProps>>;
4
- export type ArrayIndependentInputProps<InputComponentProps extends Record<string, any> = {}, LayoutComponentProps extends Record<string, any> = {}> = IndependentInputProps<FieldArrayValue, ArraySpec<undefined, InputComponentProps, LayoutComponentProps>>;
5
- export type ArrayLayoutProps<LayoutComponentProps extends Record<string, any> = {}> = LayoutProps<FieldArrayValue, ArraySpec<undefined, any, LayoutComponentProps>>;
6
- export type ArrayInput<InputComponentProps extends Record<string, any> = {}> = InputType<FieldArrayValue, ArraySpec<undefined, InputComponentProps>>;
7
- export type ArrayIndependentInput<InputComponentProps extends Record<string, any> = {}, LayoutComponentProps extends Record<string, any> = {}> = IndependentInputType<FieldArrayValue, ArraySpec<undefined, InputComponentProps, LayoutComponentProps>>;
8
- export type ArrayLayout<LayoutComponentProps extends Record<string, any> = {}> = LayoutType<FieldArrayValue, ArraySpec<undefined, any, LayoutComponentProps>>;
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> = {}> = InputProps<boolean, BooleanSpec<undefined, InputComponentProps>>;
4
- export type BooleanIndependentInputProps<InputComponentProps extends Record<string, any> = {}, LayoutComponentProps extends Record<string, any> = {}> = IndependentInputProps<boolean, BooleanSpec<undefined, InputComponentProps, LayoutComponentProps>>;
5
- export type BooleanLayoutProps<LayoutComponentProps extends Record<string, any> = {}> = LayoutProps<boolean, BooleanSpec<undefined, any, LayoutComponentProps>>;
6
- export type BooleanInput<InputComponentProps extends Record<string, any> = {}> = InputType<boolean, BooleanSpec<undefined, InputComponentProps>>;
7
- export type BooleanIndependentInput<InputComponentProps extends Record<string, any> = {}, LayoutComponentProps extends Record<string, any> = {}> = IndependentInputType<boolean, BooleanSpec<undefined, InputComponentProps, LayoutComponentProps>>;
8
- export type BooleanLayout<LayoutComponentProps extends Record<string, any> = {}> = LayoutType<boolean, BooleanSpec<undefined, any, LayoutComponentProps>>;
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?: SpecType['viewSpec']['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?: SpecType['viewSpec']['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?: SpecType['viewSpec']['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> = {}> = InputProps<number, NumberSpec<undefined, InputComponentProps>>;
4
- export type NumberIndependentInputProps<InputComponentProps extends Record<string, any> = {}, LayoutComponentProps extends Record<string, any> = {}> = IndependentInputProps<number, NumberSpec<undefined, InputComponentProps, LayoutComponentProps>>;
5
- export type NumberLayoutProps<LayoutComponentProps extends Record<string, any> = {}> = LayoutProps<number, NumberSpec<undefined, any, LayoutComponentProps>>;
6
- export type NumberInput<InputComponentProps extends Record<string, any> = {}> = InputType<number, NumberSpec<undefined, InputComponentProps>>;
7
- export type NumberIndependentInput<InputComponentProps extends Record<string, any> = {}, LayoutComponentProps extends Record<string, any> = {}> = IndependentInputType<number, NumberSpec<undefined, InputComponentProps, LayoutComponentProps>>;
8
- export type NumberLayout<LayoutComponentProps extends Record<string, any> = {}> = LayoutType<number, NumberSpec<undefined, any, LayoutComponentProps>>;
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> = {}> = InputProps<FieldObjectValue, ObjectSpec<undefined, InputComponentProps>>;
4
- export type ObjectIndependentInputProps<InputComponentProps extends Record<string, any> = {}, LayoutComponentProps extends Record<string, any> = {}> = IndependentInputProps<FieldObjectValue, ObjectSpec<undefined, InputComponentProps, LayoutComponentProps>>;
5
- export type ObjectLayoutProps<LayoutComponentProps extends Record<string, any> = {}> = LayoutProps<FieldObjectValue, ObjectSpec<undefined, any, LayoutComponentProps>>;
6
- export type ObjectInput<InputComponentProps extends Record<string, any> = {}> = InputType<FieldObjectValue, ObjectSpec<undefined, InputComponentProps>>;
7
- export type ObjectIndependentInput<InputComponentProps extends Record<string, any> = {}, LayoutComponentProps extends Record<string, any> = {}> = IndependentInputType<FieldObjectValue, ObjectSpec<undefined, InputComponentProps, LayoutComponentProps>>;
8
- export type ObjectLayout<LayoutComponentProps extends Record<string, any> = {}> = LayoutType<FieldObjectValue, ObjectSpec<undefined, any, LayoutComponentProps>>;
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> = {}> = InputProps<string, StringSpec<undefined, InputComponentProps>>;
4
- export type StringIndependentInputProps<InputComponentProps extends Record<string, any> = {}, LayoutComponentProps extends Record<string, any> = {}> = IndependentInputProps<string, StringSpec<undefined, InputComponentProps, LayoutComponentProps>>;
5
- export type StringLayoutProps<LayoutComponentProps extends Record<string, any> = {}> = LayoutProps<string, StringSpec<undefined, any, LayoutComponentProps>>;
6
- export type StringInput<InputComponentProps extends Record<string, any> = {}> = InputType<string, StringSpec<undefined, InputComponentProps>>;
7
- export type StringIndependentInput<InputComponentProps extends Record<string, any> = {}, LayoutComponentProps extends Record<string, any> = {}> = IndependentInputType<string, StringSpec<undefined, InputComponentProps, LayoutComponentProps>>;
8
- export type StringLayout<LayoutComponentProps extends Record<string, any> = {}> = LayoutType<string, StringSpec<undefined, any, LayoutComponentProps>>;
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>({ spec, name, }: ViewControllerProps<SpecType>) => JSX.Element;
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>(spec: SpecType, config: DynamicViewConfig) => {
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>({ value, name, spec, viewEntity, Layout, Link, }: UseRenderParams<Value, SpecType>) => JSX.Element | null;
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;