@strictly/react-form 0.0.12 → 0.0.14
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/.out/core/mobx/field_adapter.d.ts +1 -0
- package/.out/core/mobx/form_model.d.ts +3 -1
- package/.out/core/mobx/form_model.js +23 -15
- package/.out/core/mobx/hooks.d.ts +2 -2
- package/.out/core/mobx/merge_field_adapters_with_two_way_converter.d.ts +2 -2
- package/.out/core/mobx/specs/form_model.tests.js +26 -21
- package/.out/core/mobx/specs/sub_form_field_adapters.tests.js +14 -21
- package/.out/core/mobx/sub_form_field_adapters.d.ts +5 -6
- package/.out/core/mobx/sub_form_field_adapters.js +6 -11
- package/.out/core/mobx/types.d.ts +3 -3
- package/.out/index.d.ts +2 -0
- package/.out/index.js +2 -0
- package/.out/mantine/create_fields_view.js +3 -2
- package/.out/mantine/field_view.d.ts +18 -0
- package/.out/mantine/field_view.js +16 -0
- package/.out/tsconfig.tsbuildinfo +1 -1
- package/.out/util/empty.d.ts +1 -0
- package/.out/util/empty.js +3 -0
- package/.turbo/turbo-build.log +8 -8
- package/.turbo/turbo-check-types.log +1 -1
- package/core/mobx/field_adapter.ts +9 -0
- package/core/mobx/form_model.ts +26 -16
- package/core/mobx/hooks.tsx +2 -2
- package/core/mobx/merge_field_adapters_with_two_way_converter.ts +2 -1
- package/core/mobx/specs/form_model.tests.ts +35 -20
- package/core/mobx/specs/sub_form_field_adapters.tests.ts +14 -34
- package/core/mobx/sub_form_field_adapters.ts +11 -26
- package/core/mobx/types.ts +10 -7
- package/dist/index.cjs +94 -61
- package/dist/index.d.cts +32 -12
- package/dist/index.d.ts +32 -12
- package/dist/index.js +83 -51
- package/index.ts +2 -0
- package/mantine/create_fields_view.tsx +6 -2
- package/mantine/field_view.tsx +39 -0
- package/package.json +1 -1
- package/util/empty.tsx +3 -0
package/core/mobx/types.ts
CHANGED
|
@@ -10,11 +10,12 @@ import {
|
|
|
10
10
|
*/
|
|
11
11
|
export type ValuePathsOfModel<
|
|
12
12
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13
|
-
|
|
14
|
-
> =
|
|
13
|
+
Model extends FormModel<any, any, any, any, any>,
|
|
14
|
+
> = Model extends FormModel<
|
|
15
15
|
infer _1,
|
|
16
16
|
infer _2,
|
|
17
17
|
infer _3,
|
|
18
|
+
infer _4,
|
|
18
19
|
infer ValuePathsToAdapters
|
|
19
20
|
> ? keyof ValuePathsToAdapters
|
|
20
21
|
: never
|
|
@@ -25,12 +26,13 @@ export type ValuePathsOfModel<
|
|
|
25
26
|
*/
|
|
26
27
|
export type ToValueOfModelValuePath<
|
|
27
28
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28
|
-
|
|
29
|
-
K extends ValuePathsOfModel<
|
|
30
|
-
> =
|
|
29
|
+
Model extends FormModel<any, any, any, any, any>,
|
|
30
|
+
K extends ValuePathsOfModel<Model>,
|
|
31
|
+
> = Model extends FormModel<
|
|
31
32
|
infer _1,
|
|
32
33
|
infer _2,
|
|
33
34
|
infer _3,
|
|
35
|
+
infer _4,
|
|
34
36
|
infer ValuePathsToAdapters
|
|
35
37
|
> ? ToOfFieldAdapter<ValuePathsToAdapters[K]>
|
|
36
38
|
: never
|
|
@@ -44,11 +46,12 @@ export type ToValueOfModelValuePath<
|
|
|
44
46
|
*/
|
|
45
47
|
export type FormFieldsOfModel<
|
|
46
48
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
47
|
-
|
|
48
|
-
> =
|
|
49
|
+
Model extends FormModel<any, any, any, any, any>,
|
|
50
|
+
> = Model extends FormModel<
|
|
49
51
|
infer _1,
|
|
50
52
|
infer _2,
|
|
51
53
|
infer _3,
|
|
54
|
+
infer _4,
|
|
52
55
|
infer ValuePathsToAdapters
|
|
53
56
|
> ? FlattenedConvertedFieldsOf<ValuePathsToAdapters>
|
|
54
57
|
: never
|
package/dist/index.cjs
CHANGED
|
@@ -88,6 +88,8 @@ var index_exports = {};
|
|
|
88
88
|
__export(index_exports, {
|
|
89
89
|
AbstractSelectValueTypeConverter: () => AbstractSelectValueTypeConverter,
|
|
90
90
|
DefaultErrorRenderer: () => DefaultErrorRenderer,
|
|
91
|
+
Empty: () => Empty,
|
|
92
|
+
FieldView: () => FieldView,
|
|
91
93
|
FormModel: () => FormModel,
|
|
92
94
|
IntegerToStringConverter: () => IntegerToStringConverter,
|
|
93
95
|
NullableToBooleanConverter: () => NullableToBooleanConverter,
|
|
@@ -355,8 +357,8 @@ function listAdapter() {
|
|
|
355
357
|
var import_base2 = require("@strictly/base");
|
|
356
358
|
var import_define = require("@strictly/define");
|
|
357
359
|
var import_mobx = require("mobx");
|
|
358
|
-
var _accessors_dec, _knownFields_dec, _fields_dec, _errors_dec, _fieldOverrides_dec, _value_dec, _init, _value, _fieldOverrides, _errors;
|
|
359
|
-
_value_dec = [import_mobx.observable.ref], _fieldOverrides_dec = [import_mobx.observable.shallow], _errors_dec = [import_mobx.observable.shallow], _fields_dec = [import_mobx.computed], _knownFields_dec = [import_mobx.computed], _accessors_dec = [import_mobx.computed];
|
|
360
|
+
var _accessors_dec, _knownFields_dec, _fields_dec, _context_dec, _errors_dec, _fieldOverrides_dec, _value_dec, _init, _value, _fieldOverrides, _errors;
|
|
361
|
+
_value_dec = [import_mobx.observable.ref], _fieldOverrides_dec = [import_mobx.observable.shallow], _errors_dec = [import_mobx.observable.shallow], _context_dec = [import_mobx.computed.struct], _fields_dec = [import_mobx.computed], _knownFields_dec = [import_mobx.computed], _accessors_dec = [import_mobx.computed];
|
|
360
362
|
var FormModel = class {
|
|
361
363
|
constructor(type, value, adapters) {
|
|
362
364
|
this.type = type;
|
|
@@ -368,6 +370,7 @@ var FormModel = class {
|
|
|
368
370
|
__publicField(this, "flattenedTypeDefs");
|
|
369
371
|
this.value = (0, import_define.mobxCopy)(type, value);
|
|
370
372
|
this.flattenedTypeDefs = (0, import_define.flattenTypesOfType)(type);
|
|
373
|
+
const contextValue = this.toContext(value);
|
|
371
374
|
const conversions = (0, import_define.flattenValueTo)(
|
|
372
375
|
type,
|
|
373
376
|
this.value,
|
|
@@ -385,13 +388,16 @@ var FormModel = class {
|
|
|
385
388
|
if (revert == null) {
|
|
386
389
|
return;
|
|
387
390
|
}
|
|
388
|
-
return convert(value2, valuePath,
|
|
391
|
+
return convert(value2, valuePath, contextValue);
|
|
389
392
|
}
|
|
390
393
|
);
|
|
391
394
|
this.fieldOverrides = (0, import_base2.map)(conversions, function(_k, v) {
|
|
392
395
|
return v && [v.value];
|
|
393
396
|
});
|
|
394
397
|
}
|
|
398
|
+
get context() {
|
|
399
|
+
return this.toContext(this.value);
|
|
400
|
+
}
|
|
395
401
|
get fields() {
|
|
396
402
|
return new Proxy(
|
|
397
403
|
this.knownFields,
|
|
@@ -459,11 +465,11 @@ var FormModel = class {
|
|
|
459
465
|
accessor != null ? accessor.value : fieldTypeDef != null ? (0, import_define.mobxCopy)(
|
|
460
466
|
fieldTypeDef,
|
|
461
467
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
462
|
-
create(valuePath, this.
|
|
463
|
-
) : create(valuePath, this.
|
|
468
|
+
create(valuePath, this.context)
|
|
469
|
+
) : create(valuePath, this.context),
|
|
464
470
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
465
471
|
valuePath,
|
|
466
|
-
this.
|
|
472
|
+
this.context
|
|
467
473
|
);
|
|
468
474
|
const error = this.errors[valuePath];
|
|
469
475
|
return {
|
|
@@ -521,7 +527,7 @@ var FormModel = class {
|
|
|
521
527
|
const element = elementValue != null ? elementValue[0] : elementAdapter.create(
|
|
522
528
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
523
529
|
elementTypePath,
|
|
524
|
-
this.
|
|
530
|
+
this.context
|
|
525
531
|
);
|
|
526
532
|
const originalList = accessor.value;
|
|
527
533
|
const newList = [
|
|
@@ -639,7 +645,7 @@ var FormModel = class {
|
|
|
639
645
|
internalSetFieldValue(valuePath, value, displayValidation) {
|
|
640
646
|
const { revert } = this.getAdapterForValuePath(valuePath);
|
|
641
647
|
(0, import_base2.assertExists)(revert, "setting value not supported {}", valuePath);
|
|
642
|
-
const conversion = revert(value, valuePath, this.
|
|
648
|
+
const conversion = revert(value, valuePath, this.context);
|
|
643
649
|
const accessor = this.getAccessorForValuePath(valuePath);
|
|
644
650
|
return (0, import_mobx.runInAction)(() => {
|
|
645
651
|
this.fieldOverrides[valuePath] = [value];
|
|
@@ -679,10 +685,10 @@ var FormModel = class {
|
|
|
679
685
|
convert,
|
|
680
686
|
create
|
|
681
687
|
} = adapter2;
|
|
682
|
-
const value = create(valuePath, this.
|
|
688
|
+
const value = create(valuePath, this.context);
|
|
683
689
|
const {
|
|
684
690
|
value: displayValue
|
|
685
|
-
} = convert(value, valuePath, this.
|
|
691
|
+
} = convert(value, valuePath, this.context);
|
|
686
692
|
const key = valuePath;
|
|
687
693
|
(0, import_mobx.runInAction)(() => {
|
|
688
694
|
this.fieldOverrides[key] = [displayValue];
|
|
@@ -711,10 +717,10 @@ var FormModel = class {
|
|
|
711
717
|
const {
|
|
712
718
|
value: storedValue
|
|
713
719
|
} = convert(
|
|
714
|
-
accessor != null ? accessor.value : create(valuePath, this.
|
|
720
|
+
accessor != null ? accessor.value : create(valuePath, this.context),
|
|
715
721
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
716
722
|
valuePath,
|
|
717
|
-
this.
|
|
723
|
+
this.context
|
|
718
724
|
);
|
|
719
725
|
const value = fieldOverride != null ? fieldOverride[0] : storedValue;
|
|
720
726
|
const dirty = storedValue !== value;
|
|
@@ -722,12 +728,12 @@ var FormModel = class {
|
|
|
722
728
|
if (ignoreDefaultValue) {
|
|
723
729
|
const {
|
|
724
730
|
value: defaultDisplayValue
|
|
725
|
-
} = convert(create(valuePath, this.
|
|
731
|
+
} = convert(create(valuePath, this.context), valuePath, this.context);
|
|
726
732
|
if (defaultDisplayValue === value) {
|
|
727
733
|
return true;
|
|
728
734
|
}
|
|
729
735
|
}
|
|
730
|
-
const conversion = revert(value, valuePath, this.
|
|
736
|
+
const conversion = revert(value, valuePath, this.context);
|
|
731
737
|
return (0, import_mobx.runInAction)(() => {
|
|
732
738
|
switch (conversion.type) {
|
|
733
739
|
case 1 /* Failure */:
|
|
@@ -772,10 +778,10 @@ var FormModel = class {
|
|
|
772
778
|
const fieldOverride = this.fieldOverrides[adapterPath];
|
|
773
779
|
const {
|
|
774
780
|
value: storedValue
|
|
775
|
-
} = convert(accessor.value, valuePath, this.
|
|
781
|
+
} = convert(accessor.value, valuePath, this.context);
|
|
776
782
|
const value = fieldOverride != null ? fieldOverride[0] : storedValue;
|
|
777
783
|
const dirty = fieldOverride != null && fieldOverride[0] !== storedValue;
|
|
778
|
-
const conversion = revert(value, valuePath, this.
|
|
784
|
+
const conversion = revert(value, valuePath, this.context);
|
|
779
785
|
switch (conversion.type) {
|
|
780
786
|
case 1 /* Failure */:
|
|
781
787
|
this.errors[adapterPath] = conversion.error;
|
|
@@ -805,6 +811,7 @@ _errors = new WeakMap();
|
|
|
805
811
|
__decorateElement(_init, 4, "value", _value_dec, FormModel, _value);
|
|
806
812
|
__decorateElement(_init, 4, "fieldOverrides", _fieldOverrides_dec, FormModel, _fieldOverrides);
|
|
807
813
|
__decorateElement(_init, 4, "errors", _errors_dec, FormModel, _errors);
|
|
814
|
+
__decorateElement(_init, 2, "context", _context_dec, FormModel);
|
|
808
815
|
__decorateElement(_init, 2, "fields", _fields_dec, FormModel);
|
|
809
816
|
__decorateElement(_init, 2, "knownFields", _knownFields_dec, FormModel);
|
|
810
817
|
__decorateElement(_init, 2, "accessors", _accessors_dec, FormModel);
|
|
@@ -939,17 +946,12 @@ function mergeAdaptersWithValidators(adapters, validators) {
|
|
|
939
946
|
}
|
|
940
947
|
|
|
941
948
|
// core/mobx/sub_form_field_adapters.ts
|
|
942
|
-
|
|
943
|
-
function subFormFieldAdapters(subAdapters, parentTypePath, contextType) {
|
|
949
|
+
function subFormFieldAdapters(subAdapters, parentTypePath) {
|
|
944
950
|
const dotCount = parentTypePath.split(".").length;
|
|
945
|
-
function
|
|
951
|
+
function getSubValuePath(valuePath) {
|
|
946
952
|
const parentValuePath = valuePath.split(".").slice(0, dotCount).join(".");
|
|
947
953
|
const subValuePath = valuePath.replace(parentValuePath, "$");
|
|
948
|
-
|
|
949
|
-
return [
|
|
950
|
-
subValuePath,
|
|
951
|
-
subContext
|
|
952
|
-
];
|
|
954
|
+
return subValuePath;
|
|
953
955
|
}
|
|
954
956
|
return Object.entries(subAdapters).reduce((acc, [
|
|
955
957
|
subTypePath,
|
|
@@ -958,13 +960,13 @@ function subFormFieldAdapters(subAdapters, parentTypePath, contextType) {
|
|
|
958
960
|
const typePath = subTypePath.replace("$", parentTypePath);
|
|
959
961
|
const adaptedAdapter = {
|
|
960
962
|
convert: (from, valuePath, context) => {
|
|
961
|
-
return subAdapter.convert(from,
|
|
963
|
+
return subAdapter.convert(from, getSubValuePath(valuePath), context);
|
|
962
964
|
},
|
|
963
965
|
create: (valuePath, context) => {
|
|
964
|
-
return subAdapter.create(
|
|
966
|
+
return subAdapter.create(getSubValuePath(valuePath), context);
|
|
965
967
|
},
|
|
966
968
|
revert: subAdapter.revert && ((from, valuePath, context) => {
|
|
967
|
-
return subAdapter.revert(from,
|
|
969
|
+
return subAdapter.revert(from, getSubValuePath(valuePath), context);
|
|
968
970
|
})
|
|
969
971
|
};
|
|
970
972
|
acc[typePath] = adaptedAdapter;
|
|
@@ -1004,7 +1006,7 @@ var IntegerToStringConverter = class {
|
|
|
1004
1006
|
};
|
|
1005
1007
|
|
|
1006
1008
|
// field_converters/nullable_to_boolean_converter.ts
|
|
1007
|
-
var
|
|
1009
|
+
var import_define3 = require("@strictly/define");
|
|
1008
1010
|
var NullableToBooleanConverter = class {
|
|
1009
1011
|
constructor(typeDef, prototype, nullType, defaultToNull = true) {
|
|
1010
1012
|
this.typeDef = typeDef;
|
|
@@ -1022,7 +1024,7 @@ var NullableToBooleanConverter = class {
|
|
|
1022
1024
|
}
|
|
1023
1025
|
revert(from) {
|
|
1024
1026
|
if (from) {
|
|
1025
|
-
const value = (0,
|
|
1027
|
+
const value = (0, import_define3.copy)(this.typeDef, this.prototype);
|
|
1026
1028
|
return {
|
|
1027
1029
|
type: 0 /* Success */,
|
|
1028
1030
|
value
|
|
@@ -1040,7 +1042,7 @@ var NullableToBooleanConverter = class {
|
|
|
1040
1042
|
|
|
1041
1043
|
// field_converters/select_value_type_converter.ts
|
|
1042
1044
|
var import_base5 = require("@strictly/base");
|
|
1043
|
-
var
|
|
1045
|
+
var import_define4 = require("@strictly/define");
|
|
1044
1046
|
var AbstractSelectValueTypeConverter = class {
|
|
1045
1047
|
constructor(typeDef, values, defaultValueKey, noSuchValueError, required) {
|
|
1046
1048
|
this.typeDef = typeDef;
|
|
@@ -1058,7 +1060,7 @@ var AbstractSelectValueTypeConverter = class {
|
|
|
1058
1060
|
value: null
|
|
1059
1061
|
};
|
|
1060
1062
|
}
|
|
1061
|
-
const value = prototype == null ? prototype : (0,
|
|
1063
|
+
const value = prototype == null ? prototype : (0, import_define4.copy)(this.typeDef, prototype);
|
|
1062
1064
|
return {
|
|
1063
1065
|
type: 0 /* Success */,
|
|
1064
1066
|
value
|
|
@@ -1132,13 +1134,13 @@ var SelectStringConverter = class extends AbstractSelectValueTypeConverter {
|
|
|
1132
1134
|
};
|
|
1133
1135
|
|
|
1134
1136
|
// field_converters/validating_converter.ts
|
|
1135
|
-
var
|
|
1137
|
+
var import_define5 = require("@strictly/define");
|
|
1136
1138
|
function validatingConverter(validators = []) {
|
|
1137
1139
|
return function(value, valuePath, context) {
|
|
1138
1140
|
return validators.reduce(
|
|
1139
1141
|
function(acc, validator) {
|
|
1140
1142
|
if (acc.type === 0 /* Success */) {
|
|
1141
|
-
const error = (0,
|
|
1143
|
+
const error = (0, import_define5.validate)(validator, value, valuePath, context);
|
|
1142
1144
|
if (error != null) {
|
|
1143
1145
|
return {
|
|
1144
1146
|
type: 1 /* Failure */,
|
|
@@ -1165,6 +1167,34 @@ function DefaultErrorRenderer({
|
|
|
1165
1167
|
return JSON.stringify(error);
|
|
1166
1168
|
}
|
|
1167
1169
|
|
|
1170
|
+
// mantine/field_view.tsx
|
|
1171
|
+
var import_mobx_react = require("mobx-react");
|
|
1172
|
+
|
|
1173
|
+
// util/empty.tsx
|
|
1174
|
+
function Empty() {
|
|
1175
|
+
return null;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
// mantine/field_view.tsx
|
|
1179
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
1180
|
+
function FieldView({
|
|
1181
|
+
fields,
|
|
1182
|
+
valuePath,
|
|
1183
|
+
children
|
|
1184
|
+
}) {
|
|
1185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mobx_react.Observer, { children: () => {
|
|
1186
|
+
const {
|
|
1187
|
+
value,
|
|
1188
|
+
error
|
|
1189
|
+
} = fields[valuePath];
|
|
1190
|
+
return children({
|
|
1191
|
+
value,
|
|
1192
|
+
error,
|
|
1193
|
+
ErrorSink: Empty
|
|
1194
|
+
});
|
|
1195
|
+
} });
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1168
1198
|
// mantine/hooks.tsx
|
|
1169
1199
|
var import_core = require("@mantine/core");
|
|
1170
1200
|
var import_base6 = require("@strictly/base");
|
|
@@ -1172,14 +1202,14 @@ var import_mobx2 = require("mobx");
|
|
|
1172
1202
|
var import_react4 = require("react");
|
|
1173
1203
|
|
|
1174
1204
|
// util/partial.tsx
|
|
1175
|
-
var
|
|
1205
|
+
var import_mobx_react2 = require("mobx-react");
|
|
1176
1206
|
var import_react2 = require("react");
|
|
1177
|
-
var
|
|
1207
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
1178
1208
|
function createSimplePartialComponent(Component, curriedProps) {
|
|
1179
1209
|
return (0, import_react2.forwardRef)(
|
|
1180
1210
|
function(exposedProps, ref) {
|
|
1181
1211
|
const C = Component;
|
|
1182
|
-
return /* @__PURE__ */ (0,
|
|
1212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1183
1213
|
C,
|
|
1184
1214
|
__spreadValues(__spreadValues({
|
|
1185
1215
|
ref
|
|
@@ -1219,7 +1249,7 @@ function createPartialComponent(Component, curriedPropsSource, additionalPropKey
|
|
|
1219
1249
|
]
|
|
1220
1250
|
);
|
|
1221
1251
|
const curriedProps = curriedPropsSource(additionalProps);
|
|
1222
|
-
return /* @__PURE__ */ (0,
|
|
1252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1223
1253
|
C,
|
|
1224
1254
|
__spreadValues(__spreadValues({
|
|
1225
1255
|
ref
|
|
@@ -1255,7 +1285,7 @@ function createPartialObserverComponent(Component, curriedPropsSource, additiona
|
|
|
1255
1285
|
);
|
|
1256
1286
|
}
|
|
1257
1287
|
function createUnsafePartialObserverComponent(Component, curriedPropsSource, additionalPropKeys = []) {
|
|
1258
|
-
return (0,
|
|
1288
|
+
return (0, import_mobx_react2.observer)(
|
|
1259
1289
|
(0, import_react2.forwardRef)(
|
|
1260
1290
|
function(props, ref) {
|
|
1261
1291
|
const C = Component;
|
|
@@ -1286,7 +1316,7 @@ function createUnsafePartialObserverComponent(Component, curriedPropsSource, add
|
|
|
1286
1316
|
]
|
|
1287
1317
|
);
|
|
1288
1318
|
const curriedProps = curriedPropsSource(additionalProps);
|
|
1289
|
-
return /* @__PURE__ */ (0,
|
|
1319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1290
1320
|
C,
|
|
1291
1321
|
__spreadValues(__spreadValues({
|
|
1292
1322
|
ref
|
|
@@ -1317,7 +1347,7 @@ function usePartialObserverComponent(curriedPropsSource, deps, Component, additi
|
|
|
1317
1347
|
}
|
|
1318
1348
|
|
|
1319
1349
|
// mantine/create_checkbox.tsx
|
|
1320
|
-
var
|
|
1350
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
1321
1351
|
function createCheckbox(valuePath, Checkbox) {
|
|
1322
1352
|
const onChange = (e) => {
|
|
1323
1353
|
var _a;
|
|
@@ -1354,7 +1384,7 @@ function createCheckbox(valuePath, Checkbox) {
|
|
|
1354
1384
|
checked: value,
|
|
1355
1385
|
disabled: readonly,
|
|
1356
1386
|
required,
|
|
1357
|
-
error: error && /* @__PURE__ */ (0,
|
|
1387
|
+
error: error && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ErrorRenderer, { error }),
|
|
1358
1388
|
onChange,
|
|
1359
1389
|
onFocus,
|
|
1360
1390
|
onBlur,
|
|
@@ -1369,14 +1399,15 @@ function createCheckbox(valuePath, Checkbox) {
|
|
|
1369
1399
|
}
|
|
1370
1400
|
|
|
1371
1401
|
// mantine/create_fields_view.tsx
|
|
1372
|
-
var
|
|
1373
|
-
var
|
|
1402
|
+
var import_define6 = require("@strictly/define");
|
|
1403
|
+
var import_mobx_react3 = require("mobx-react");
|
|
1404
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
1374
1405
|
function createFieldsView(valuePath, FieldsView, observableProps) {
|
|
1375
1406
|
function toKey(subKey) {
|
|
1376
|
-
return
|
|
1407
|
+
return (0, import_define6.jsonPathPrefix)(valuePath, subKey);
|
|
1377
1408
|
}
|
|
1378
1409
|
function toSubKey(key) {
|
|
1379
|
-
return
|
|
1410
|
+
return (0, import_define6.jsonPathUnprefix)(valuePath, key);
|
|
1380
1411
|
}
|
|
1381
1412
|
function onFieldValueChange(subKey, value) {
|
|
1382
1413
|
observableProps.onFieldValueChange(toKey(subKey), value);
|
|
@@ -1393,7 +1424,7 @@ function createFieldsView(valuePath, FieldsView, observableProps) {
|
|
|
1393
1424
|
var _a;
|
|
1394
1425
|
(_a = observableProps.onFieldSubmit) == null ? void 0 : _a.call(observableProps, toKey(subKey));
|
|
1395
1426
|
}
|
|
1396
|
-
const Component = (0,
|
|
1427
|
+
const Component = (0, import_mobx_react3.observer)(
|
|
1397
1428
|
function(props) {
|
|
1398
1429
|
const subFields = Object.entries(observableProps.fields).reduce(
|
|
1399
1430
|
(acc, [
|
|
@@ -1408,7 +1439,7 @@ function createFieldsView(valuePath, FieldsView, observableProps) {
|
|
|
1408
1439
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
1409
1440
|
{}
|
|
1410
1441
|
);
|
|
1411
|
-
return /* @__PURE__ */ (0,
|
|
1442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1412
1443
|
FieldsView,
|
|
1413
1444
|
__spreadProps(__spreadValues({}, props), {
|
|
1414
1445
|
fields: subFields,
|
|
@@ -1433,16 +1464,16 @@ function createFieldsView(valuePath, FieldsView, observableProps) {
|
|
|
1433
1464
|
}
|
|
1434
1465
|
|
|
1435
1466
|
// mantine/create_form.tsx
|
|
1436
|
-
var
|
|
1467
|
+
var import_mobx_react4 = require("mobx-react");
|
|
1437
1468
|
var import_react3 = require("react");
|
|
1438
|
-
var
|
|
1469
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1439
1470
|
function createForm(valuePath, Form, observableProps) {
|
|
1440
|
-
return (0,
|
|
1471
|
+
return (0, import_mobx_react4.observer)((props) => {
|
|
1441
1472
|
const { value } = observableProps.fields[valuePath];
|
|
1442
1473
|
const onValueChange = (0, import_react3.useCallback)((value2) => {
|
|
1443
1474
|
observableProps.onFieldValueChange(valuePath, value2);
|
|
1444
1475
|
}, []);
|
|
1445
|
-
return /* @__PURE__ */ (0,
|
|
1476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1446
1477
|
Form,
|
|
1447
1478
|
__spreadProps(__spreadValues({}, props), {
|
|
1448
1479
|
onValueChange,
|
|
@@ -1453,7 +1484,7 @@ function createForm(valuePath, Form, observableProps) {
|
|
|
1453
1484
|
}
|
|
1454
1485
|
|
|
1455
1486
|
// mantine/create_list.tsx
|
|
1456
|
-
var
|
|
1487
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1457
1488
|
function createList(valuePath, List) {
|
|
1458
1489
|
const propSource = () => {
|
|
1459
1490
|
const values = [...this.fields[valuePath].value];
|
|
@@ -1469,7 +1500,7 @@ function DefaultList({
|
|
|
1469
1500
|
listPath,
|
|
1470
1501
|
children
|
|
1471
1502
|
}) {
|
|
1472
|
-
return /* @__PURE__ */ (0,
|
|
1503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: values.map(function(value, index) {
|
|
1473
1504
|
const valuePath = `${listPath}.${index}`;
|
|
1474
1505
|
return children(valuePath, value, index);
|
|
1475
1506
|
}) });
|
|
@@ -1508,7 +1539,7 @@ function createRadio(valuePath, value, Radio) {
|
|
|
1508
1539
|
}
|
|
1509
1540
|
|
|
1510
1541
|
// mantine/create_radio_group.tsx
|
|
1511
|
-
var
|
|
1542
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1512
1543
|
function createRadioGroup(valuePath, RadioGroup) {
|
|
1513
1544
|
const onChange = (value) => {
|
|
1514
1545
|
var _a;
|
|
@@ -1540,7 +1571,7 @@ function createRadioGroup(valuePath, RadioGroup) {
|
|
|
1540
1571
|
name: valuePath,
|
|
1541
1572
|
value,
|
|
1542
1573
|
required,
|
|
1543
|
-
error: error && /* @__PURE__ */ (0,
|
|
1574
|
+
error: error && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ErrorRenderer, { error }),
|
|
1544
1575
|
onChange,
|
|
1545
1576
|
onFocus,
|
|
1546
1577
|
onBlur,
|
|
@@ -1551,7 +1582,7 @@ function createRadioGroup(valuePath, RadioGroup) {
|
|
|
1551
1582
|
}
|
|
1552
1583
|
|
|
1553
1584
|
// mantine/create_text_input.tsx
|
|
1554
|
-
var
|
|
1585
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1555
1586
|
function createTextInput(valuePath, TextInput) {
|
|
1556
1587
|
const onChange = (e) => {
|
|
1557
1588
|
var _a;
|
|
@@ -1592,7 +1623,7 @@ function createTextInput(valuePath, TextInput) {
|
|
|
1592
1623
|
value,
|
|
1593
1624
|
disabled: readonly,
|
|
1594
1625
|
required,
|
|
1595
|
-
error: error && /* @__PURE__ */ (0,
|
|
1626
|
+
error: error && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ErrorRenderer, { error }),
|
|
1596
1627
|
onChange,
|
|
1597
1628
|
onFocus,
|
|
1598
1629
|
onBlur,
|
|
@@ -1607,7 +1638,7 @@ function createTextInput(valuePath, TextInput) {
|
|
|
1607
1638
|
}
|
|
1608
1639
|
|
|
1609
1640
|
// mantine/create_value_input.tsx
|
|
1610
|
-
var
|
|
1641
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1611
1642
|
function createValueInput(valuePath, ValueInput) {
|
|
1612
1643
|
const onChange = (value) => {
|
|
1613
1644
|
var _a;
|
|
@@ -1645,7 +1676,7 @@ function createValueInput(valuePath, ValueInput) {
|
|
|
1645
1676
|
value,
|
|
1646
1677
|
disabled: readonly,
|
|
1647
1678
|
required,
|
|
1648
|
-
error: error && /* @__PURE__ */ (0,
|
|
1679
|
+
error: error && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ErrorRenderer, { error }),
|
|
1649
1680
|
onChange,
|
|
1650
1681
|
onFocus,
|
|
1651
1682
|
onBlur,
|
|
@@ -1660,9 +1691,9 @@ function createValueInput(valuePath, ValueInput) {
|
|
|
1660
1691
|
}
|
|
1661
1692
|
|
|
1662
1693
|
// mantine/hooks.tsx
|
|
1663
|
-
var
|
|
1694
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1664
1695
|
function SimpleSelect(props) {
|
|
1665
|
-
return /* @__PURE__ */ (0,
|
|
1696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core.Select, __spreadValues({}, props));
|
|
1666
1697
|
}
|
|
1667
1698
|
function useMantineFormFields({
|
|
1668
1699
|
onFieldValueChange,
|
|
@@ -1869,6 +1900,8 @@ function mergeValidators(validators1, validators2) {
|
|
|
1869
1900
|
0 && (module.exports = {
|
|
1870
1901
|
AbstractSelectValueTypeConverter,
|
|
1871
1902
|
DefaultErrorRenderer,
|
|
1903
|
+
Empty,
|
|
1904
|
+
FieldView,
|
|
1872
1905
|
FormModel,
|
|
1873
1906
|
IntegerToStringConverter,
|
|
1874
1907
|
NullableToBooleanConverter,
|
package/dist/index.d.cts
CHANGED
|
@@ -50,6 +50,7 @@ type FromOfFieldAdapter<C extends FieldAdapter> = C extends FieldAdapter<infer F
|
|
|
50
50
|
type ToOfFieldAdapter<C extends FieldAdapter> = C extends FieldAdapter<infer _F, infer To> ? To : never;
|
|
51
51
|
type ErrorOfFieldAdapter<C extends FieldAdapter> = C extends FieldAdapter<infer _From, infer _To, infer E> ? NonNullable<E> : never;
|
|
52
52
|
type ValuePathOfFieldAdapter<C extends FieldAdapter> = C extends FieldAdapter<infer _From, infer _To, infer _E, infer ValuePath> ? ValuePath : never;
|
|
53
|
+
type ContextOfFieldAdapter<F extends FieldAdapter> = F extends FieldAdapter<infer _From, infer _To, infer _E, infer _P, infer Context> ? Context : never;
|
|
53
54
|
|
|
54
55
|
declare class FieldAdapterBuilder<From, To, E, ValuePath extends string, Context> {
|
|
55
56
|
readonly convert: AnnotatedFieldConverter<From, To, ValuePath, Context>;
|
|
@@ -117,7 +118,7 @@ type FlattenedErrors<ValuePathsToAdapters extends Readonly<Record<string, FieldA
|
|
|
117
118
|
type ValuePathsToAdaptersOf<TypePathsToAdapters extends Partial<Readonly<Record<string, FieldAdapter>>>, ValuePathsToTypePaths extends Readonly<Record<string, string>>> = keyof TypePathsToAdapters extends ValueOf<ValuePathsToTypePaths> ? {
|
|
118
119
|
readonly [K in keyof ValuePathsToTypePaths as unknown extends TypePathsToAdapters[ValuePathsToTypePaths[K]] ? never : K]: NonNullable<TypePathsToAdapters[ValuePathsToTypePaths[K]]>;
|
|
119
120
|
} : never;
|
|
120
|
-
declare class FormModel<T extends Type, ValueToTypePaths extends Readonly<Record<string, string>>, TypePathsToAdapters extends FlattenedTypePathsToAdaptersOf<FlattenedValuesOfType<T, '*'>,
|
|
121
|
+
declare abstract class FormModel<T extends Type, ValueToTypePaths extends Readonly<Record<string, string>>, TypePathsToAdapters extends FlattenedTypePathsToAdaptersOf<FlattenedValuesOfType<T, '*'>, ContextType>, ContextType = {}, ValuePathsToAdapters extends ValuePathsToAdaptersOf<TypePathsToAdapters, ValueToTypePaths> = ValuePathsToAdaptersOf<TypePathsToAdapters, ValueToTypePaths>> {
|
|
121
122
|
readonly type: T;
|
|
122
123
|
protected readonly adapters: TypePathsToAdapters;
|
|
123
124
|
accessor value: MobxValueOfType<T>;
|
|
@@ -125,6 +126,8 @@ declare class FormModel<T extends Type, ValueToTypePaths extends Readonly<Record
|
|
|
125
126
|
accessor errors: FlattenedErrors<ValuePathsToAdapters>;
|
|
126
127
|
private readonly flattenedTypeDefs;
|
|
127
128
|
constructor(type: T, value: ValueOfType<ReadonlyTypeOfType<T>>, adapters: TypePathsToAdapters);
|
|
129
|
+
get context(): ContextType;
|
|
130
|
+
protected abstract toContext(value: ValueOfType<ReadonlyTypeOfType<T>>): ContextType;
|
|
128
131
|
get fields(): SimplifyDeep<FlattenedConvertedFieldsOf<ValuePathsToAdapters>>;
|
|
129
132
|
private get knownFields();
|
|
130
133
|
private maybeSynthesizeFieldByValuePath;
|
|
@@ -150,12 +153,12 @@ declare class FormModel<T extends Type, ValueToTypePaths extends Readonly<Record
|
|
|
150
153
|
/**
|
|
151
154
|
* Used to extract the supported value paths from a presenter
|
|
152
155
|
*/
|
|
153
|
-
type ValuePathsOfModel<
|
|
156
|
+
type ValuePathsOfModel<Model extends FormModel<any, any, any, any, any>> = Model extends FormModel<infer _1, infer _2, infer _3, infer _4, infer ValuePathsToAdapters> ? keyof ValuePathsToAdapters : never;
|
|
154
157
|
/**
|
|
155
158
|
* Used to extract the render type (so the value that is passed to the view) of a given value path
|
|
156
159
|
* from a presenter
|
|
157
160
|
*/
|
|
158
|
-
type ToValueOfModelValuePath<
|
|
161
|
+
type ToValueOfModelValuePath<Model extends FormModel<any, any, any, any, any>, K extends ValuePathsOfModel<Model>> = Model extends FormModel<infer _1, infer _2, infer _3, infer _4, infer ValuePathsToAdapters> ? ToOfFieldAdapter<ValuePathsToAdapters[K]> : never;
|
|
159
162
|
/**
|
|
160
163
|
* Extracts the form fields from the presenter. The recommended way is to
|
|
161
164
|
* define the form fields explicitly and use that type to enforce the types
|
|
@@ -163,10 +166,10 @@ type ToValueOfModelValuePath<Presenter extends FormModel<any, any, any, any>, K
|
|
|
163
166
|
* is less typing, albeit at the cost of potentially getting type errors
|
|
164
167
|
* reported a long way away from the source
|
|
165
168
|
*/
|
|
166
|
-
type FormFieldsOfModel<
|
|
169
|
+
type FormFieldsOfModel<Model extends FormModel<any, any, any, any, any>> = Model extends FormModel<infer _1, infer _2, infer _3, infer _4, infer ValuePathsToAdapters> ? FlattenedConvertedFieldsOf<ValuePathsToAdapters> : never;
|
|
167
170
|
|
|
168
|
-
type ValueOfModel<M extends FormModel<any, any, any, any>> = M extends FormModel<infer T, any, any, any> ? ValueOfType<ReadonlyTypeOfType<T>> : never;
|
|
169
|
-
declare function useDefaultMobxFormHooks<M extends FormModel<any, any, any, any>, F extends FormFieldsOfModel<M> = FormFieldsOfModel<M>>(model: M, { onValidFieldSubmit, onValidFormSubmit, }?: {
|
|
171
|
+
type ValueOfModel<M extends FormModel<any, any, any, any, any>> = M extends FormModel<infer T, any, any, any, any> ? ValueOfType<ReadonlyTypeOfType<T>> : never;
|
|
172
|
+
declare function useDefaultMobxFormHooks<M extends FormModel<any, any, any, any, any>, F extends FormFieldsOfModel<M> = FormFieldsOfModel<M>>(model: M, { onValidFieldSubmit, onValidFormSubmit, }?: {
|
|
170
173
|
onValidFieldSubmit?: <Path extends ValuePathsOfModel<M>>(valuePath: Path) => void;
|
|
171
174
|
onValidFormSubmit?: (value: ValueOfModel<M>) => void;
|
|
172
175
|
}): {
|
|
@@ -178,7 +181,7 @@ declare function useDefaultMobxFormHooks<M extends FormModel<any, any, any, any>
|
|
|
178
181
|
};
|
|
179
182
|
|
|
180
183
|
type MergedOfFieldAdaptersWithTwoWayConverter<FieldAdapters extends Readonly<Record<string, FieldAdapter>>, E, Context> = {
|
|
181
|
-
[K in keyof FieldAdapters]: FieldAdapter<FromOfFieldAdapter<FieldAdapters[K]>, ToOfFieldAdapter<FieldAdapters[K]>, ErrorOfFieldAdapter<FieldAdapters[K]> | E, ValuePathOfFieldAdapter<FieldAdapters[K]>, Context>;
|
|
184
|
+
[K in keyof FieldAdapters]: FieldAdapter<FromOfFieldAdapter<FieldAdapters[K]>, ToOfFieldAdapter<FieldAdapters[K]>, ErrorOfFieldAdapter<FieldAdapters[K]> | E, ValuePathOfFieldAdapter<FieldAdapters[K]>, ContextOfFieldAdapter<FieldAdapters[K]> & Context>;
|
|
182
185
|
};
|
|
183
186
|
type ValuePathsOfFieldAdapters<FieldAdapters extends Readonly<Record<string, FieldAdapter>>> = {
|
|
184
187
|
[K in keyof FieldAdapters]: ValuePathOfFieldAdapter<FieldAdapters[K]>;
|
|
@@ -196,11 +199,11 @@ type MergedOfFieldAdaptersWithValidators<FieldAdapters extends Readonly<Record<K
|
|
|
196
199
|
type MergedOfFieldAdapterWithValidator<A extends FieldAdapter, V extends Validator | undefined> = undefined extends V ? A : A extends FieldAdapter<infer From, infer To, infer E1, infer P1, infer C1> ? V extends Validator<From, infer E2, infer P2, infer C2> ? FieldAdapter<From, To, E1 | E2, P1 | P2, C1 | C2> : never : never;
|
|
197
200
|
declare function mergeAdaptersWithValidators<FieldAdapters extends Readonly<Record<Key, FieldAdapter>>, Validators extends Readonly<Record<string, Validator>>, Key extends keyof Validators = keyof Validators>(adapters: FieldAdapters, validators: Validators): MergedOfFieldAdaptersWithValidators<FieldAdapters, Validators, Key>;
|
|
198
201
|
|
|
199
|
-
type SubFormFieldAdapter<F extends FieldAdapter, ValuePath extends string
|
|
200
|
-
type SubFormFieldAdapters<SubAdapters extends Record<string, FieldAdapter>, TypePath extends string, ValuePath extends string
|
|
201
|
-
[K in keyof SubAdapters as K extends StringConcatOf<'$', infer TypePathSuffix> ? `${TypePath}${TypePathSuffix}` : never]: SubFormFieldAdapter<SubAdapters[K], ValuePath
|
|
202
|
+
type SubFormFieldAdapter<F extends FieldAdapter, ValuePath extends string> = FieldAdapter<FromOfFieldAdapter<F>, ToOfFieldAdapter<F>, ErrorOfFieldAdapter<F>, ValuePathOfFieldAdapter<F> extends StringConcatOf<'$', infer ValuePathSuffix> ? `${ValuePath}${ValuePathSuffix}` : string, ContextOfFieldAdapter<F>>;
|
|
203
|
+
type SubFormFieldAdapters<SubAdapters extends Record<string, FieldAdapter>, TypePath extends string, ValuePath extends string> = {
|
|
204
|
+
[K in keyof SubAdapters as K extends StringConcatOf<'$', infer TypePathSuffix> ? `${TypePath}${TypePathSuffix}` : never]: SubFormFieldAdapter<SubAdapters[K], ValuePath>;
|
|
202
205
|
};
|
|
203
|
-
declare function subFormFieldAdapters<SubAdapters extends Record<string, FieldAdapter>, TypePath extends string, TypePathsToValuePaths extends Record<TypePath, string
|
|
206
|
+
declare function subFormFieldAdapters<SubAdapters extends Record<string, FieldAdapter>, TypePath extends string, TypePathsToValuePaths extends Record<TypePath, string>>(subAdapters: SubAdapters, parentTypePath: TypePath): SubFormFieldAdapters<SubAdapters, TypePath, TypePathsToValuePaths[TypePath]>;
|
|
204
207
|
|
|
205
208
|
type FieldsViewProps<F extends Fields> = {
|
|
206
209
|
fields: F;
|
|
@@ -280,6 +283,21 @@ declare function DefaultErrorRenderer({ error, }: InternalErrorRendererProps<any
|
|
|
280
283
|
|
|
281
284
|
type ValueTypeOfField<F extends Field> = F extends Field<infer V> ? V : never;
|
|
282
285
|
|
|
286
|
+
/**
|
|
287
|
+
* Displays current value and error of a field
|
|
288
|
+
*/
|
|
289
|
+
declare function FieldView<F extends Fields, K extends keyof F>({ fields, valuePath, children, }: {
|
|
290
|
+
fields: F;
|
|
291
|
+
valuePath: K;
|
|
292
|
+
children: (props: {
|
|
293
|
+
value: ValueTypeOfField<F[K]>;
|
|
294
|
+
error: ErrorOfField<F[K]> | undefined;
|
|
295
|
+
ErrorSink: ComponentType<{
|
|
296
|
+
error: ErrorOfField<F[K]>;
|
|
297
|
+
}>;
|
|
298
|
+
}) => JSX.Element;
|
|
299
|
+
}): react_jsx_runtime.JSX.Element;
|
|
300
|
+
|
|
283
301
|
type AllFieldsOfFields<F extends Fields> = {
|
|
284
302
|
[K in keyof F as ValueTypeOfField<F[K]> extends any ? K : never]: F[K];
|
|
285
303
|
};
|
|
@@ -422,4 +440,6 @@ type MergedOfValidators<Validators1 extends Partial<Readonly<Record<Keys, Valida
|
|
|
422
440
|
type MergedOfValidator<Validator1 extends Validator, Validator2 extends Validator> = Validator1 extends Validator<infer V, infer E1, infer P, infer C> ? Validator2 extends Validator<V, infer E2, P, C> ? Validator<V, E1 | E2, P, C> : never : never;
|
|
423
441
|
declare function mergeValidators<Validators1 extends Partial<Readonly<Record<Keys, Validator>>>, Validators2 extends Partial<Readonly<Record<Keys, Validator>>>, Keys extends string = Extract<keyof Validators1 | keyof Validators2, string>>(validators1: Validators1, validators2: Validators2): MergedOfValidators<Validators1, Validators2, Keys>;
|
|
424
442
|
|
|
425
|
-
|
|
443
|
+
declare function Empty(): null;
|
|
444
|
+
|
|
445
|
+
export { AbstractSelectValueTypeConverter, type AnnotatedFieldConversion, type AnnotatedFieldConverter, type Annotation, type ContextOfFieldAdapter, DefaultErrorRenderer, Empty, type ErrorOfField, type ErrorOfFieldAdapter, type ErrorRenderer, type ErrorRendererProps, type Field, type FieldAdapter, type FieldAdaptersOfValues, type FieldValueFactory, FieldView, type Fields, type FieldsViewProps, type FlattenedAdaptersOfFields, type FlattenedConvertedFieldsOf, type FlattenedTypePathsToAdaptersOf, type FormFieldsOfFieldAdapters, type FormFieldsOfModel, FormModel, type FormProps, type FromOfFieldAdapter, IntegerToStringConverter, type MergedOfFieldAdaptersWithTwoWayConverter, type MergedOfFieldAdaptersWithValidators, type MergedOfValidator, type MergedOfValidators, NullableToBooleanConverter, type PartialComponent, SelectDiscriminatedUnionConverter, SelectLiteralConverter, SelectStringConverter, type ToOfFieldAdapter, type ToValueOfModelValuePath, TrimmingStringConverter, type TwoWayFieldConverter, type TwoWayFieldConverterWithValueFactory, type UnreliableFieldConversion, UnreliableFieldConversionType, type UnreliableFieldConverter, type UnsafePartialComponent, type ValuePathOfFieldAdapter, type ValuePathsOfModel, type ValuePathsToAdaptersOf, adapter, adapterFromPrototype, adapterFromTwoWayConverter, createPartialComponent, createPartialObserverComponent, createSimplePartialComponent, createUnsafePartialObserverComponent, identityAdapter, listAdapter, mergeAdaptersWithValidators, mergeFieldAdaptersWithTwoWayConverter, mergeValidators, prototypingFieldValueFactory, subFormFieldAdapters, trimmingStringAdapter, useDefaultMobxFormHooks, useMantineFormFields, usePartialComponent, usePartialObserverComponent, validatingConverter };
|