@maif/react-forms 1.0.50 → 1.0.53
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/lib/esm/index.js +34 -56
- package/lib/index.js +34 -56
- package/package.json +1 -1
package/lib/esm/index.js
CHANGED
|
@@ -28515,7 +28515,6 @@ function CodeInput(_ref) {
|
|
|
28515
28515
|
}, []);
|
|
28516
28516
|
useEffect(function () {
|
|
28517
28517
|
if (editor && (_typeof$1(value) === 'object' ? JSON.stringify(value, null, 2) : value) !== editor.state.doc.toString()) {
|
|
28518
|
-
console.log("set value", value, value === null || value === undefined ? '' : _typeof$1(value) === 'object' ? JSON.stringify(value, null, 2) : value, editor.state.doc.toString());
|
|
28519
28518
|
editor.dispatch({
|
|
28520
28519
|
changes: {
|
|
28521
28520
|
from: 0,
|
|
@@ -28929,6 +28928,10 @@ var CustomizableInput$1 = /*#__PURE__*/React.memo(function (props) {
|
|
|
28929
28928
|
|
|
28930
28929
|
return props.children;
|
|
28931
28930
|
}, function (prev, next) {
|
|
28931
|
+
if (next.render) {
|
|
28932
|
+
return false;
|
|
28933
|
+
}
|
|
28934
|
+
|
|
28932
28935
|
return prev.field.value === next.field.value && next.errorDisplayed === prev.errorDisplayed;
|
|
28933
28936
|
});
|
|
28934
28937
|
var ControlledInput = function ControlledInput(_ref) {
|
|
@@ -29281,11 +29284,6 @@ var Form = /*#__PURE__*/React.forwardRef(function (_ref7, ref) {
|
|
|
29281
29284
|
});
|
|
29282
29285
|
};
|
|
29283
29286
|
|
|
29284
|
-
var _useState = useState(false),
|
|
29285
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
29286
|
-
expandedAll = _useState2[0],
|
|
29287
|
-
setExpandedAll = _useState2[1];
|
|
29288
|
-
|
|
29289
29287
|
var defaultValues = getDefaultValues(formFlow, schema, value); //FIXME: get real schema through the switch
|
|
29290
29288
|
|
|
29291
29289
|
var _resolver = function resolver(rawData) {
|
|
@@ -29305,10 +29303,10 @@ var Form = /*#__PURE__*/React.forwardRef(function (_ref7, ref) {
|
|
|
29305
29303
|
mode: 'onChange'
|
|
29306
29304
|
});
|
|
29307
29305
|
|
|
29308
|
-
var
|
|
29309
|
-
|
|
29310
|
-
initialReseted =
|
|
29311
|
-
setReset =
|
|
29306
|
+
var _useState = useState(false),
|
|
29307
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
29308
|
+
initialReseted = _useState2[0],
|
|
29309
|
+
setReset = _useState2[1];
|
|
29312
29310
|
|
|
29313
29311
|
useEffect(function () {
|
|
29314
29312
|
_reset(cleanInputArray(value, defaultValues, flow, schema));
|
|
@@ -29374,19 +29372,7 @@ var Form = /*#__PURE__*/React.forwardRef(function (_ref7, ref) {
|
|
|
29374
29372
|
var clean = cleanOutputArray(data, schema);
|
|
29375
29373
|
onSubmit(clean);
|
|
29376
29374
|
}, onError)
|
|
29377
|
-
},
|
|
29378
|
-
className: classNames(classes.flex, classes.mt_20)
|
|
29379
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
29380
|
-
type: "button",
|
|
29381
|
-
className: classNames(classes.btn, classes.btn_sm),
|
|
29382
|
-
style: {
|
|
29383
|
-
marginLeft: 'auto'
|
|
29384
|
-
},
|
|
29385
|
-
onClick: function onClick(e) {
|
|
29386
|
-
if (e) e.stopPropagation();
|
|
29387
|
-
setExpandedAll(!expandedAll);
|
|
29388
|
-
}
|
|
29389
|
-
}, expandedAll ? 'Expand all' : 'Collapse all')), formFlow.map(function (entry, idx) {
|
|
29375
|
+
}, formFlow.map(function (entry, idx) {
|
|
29390
29376
|
var step = schema[entry];
|
|
29391
29377
|
|
|
29392
29378
|
if (!step && typeof entry === 'string') {
|
|
@@ -29434,8 +29420,7 @@ var Form = /*#__PURE__*/React.forwardRef(function (_ref7, ref) {
|
|
|
29434
29420
|
schema: schema,
|
|
29435
29421
|
inputWrapper: inputWrapper,
|
|
29436
29422
|
httpClient: maybeCustomHttpClient,
|
|
29437
|
-
functionalProperty: functionalProperty
|
|
29438
|
-
expandedAll: expandedAll
|
|
29423
|
+
functionalProperty: functionalProperty
|
|
29439
29424
|
}));
|
|
29440
29425
|
}), /*#__PURE__*/React.createElement(Footer, {
|
|
29441
29426
|
render: footer,
|
|
@@ -29493,8 +29478,7 @@ var Step = function Step(_ref8) {
|
|
|
29493
29478
|
index = _ref8.index,
|
|
29494
29479
|
functionalProperty = _ref8.functionalProperty,
|
|
29495
29480
|
parent = _ref8.parent,
|
|
29496
|
-
onAfterChange = _ref8.onAfterChange
|
|
29497
|
-
expandedAll = _ref8.expandedAll;
|
|
29481
|
+
onAfterChange = _ref8.onAfterChange;
|
|
29498
29482
|
var classes = useCustomStyle();
|
|
29499
29483
|
|
|
29500
29484
|
var _useFormContext2 = useFormContext(),
|
|
@@ -29559,7 +29543,6 @@ var Step = function Step(_ref8) {
|
|
|
29559
29543
|
entry: en,
|
|
29560
29544
|
step: stp,
|
|
29561
29545
|
schema: schema,
|
|
29562
|
-
expandedAll: expandedAll,
|
|
29563
29546
|
inputWrapper: inputWrapper,
|
|
29564
29547
|
httpClient: httpClient,
|
|
29565
29548
|
defaultValue: stp === null || stp === void 0 ? void 0 : stp.defaultValue,
|
|
@@ -29637,8 +29620,7 @@ var Step = function Step(_ref8) {
|
|
|
29637
29620
|
defaultValue: (_props$defaultValue = props.defaultValue) === null || _props$defaultValue === void 0 ? void 0 : _props$defaultValue.value,
|
|
29638
29621
|
value: props.value,
|
|
29639
29622
|
index: idx,
|
|
29640
|
-
functionalProperty: functionalProperty
|
|
29641
|
-
expandedAll: expandedAll
|
|
29623
|
+
functionalProperty: functionalProperty
|
|
29642
29624
|
});
|
|
29643
29625
|
}
|
|
29644
29626
|
}));
|
|
@@ -29696,7 +29678,8 @@ var Step = function Step(_ref8) {
|
|
|
29696
29678
|
isMulti: step.isMulti,
|
|
29697
29679
|
createOption: step.createOption,
|
|
29698
29680
|
transformer: step.transformer,
|
|
29699
|
-
buttons: step.format === format.buttonsSelect
|
|
29681
|
+
buttons: step.format === format.buttonsSelect,
|
|
29682
|
+
optionsFrom: step.optionsFrom
|
|
29700
29683
|
}));
|
|
29701
29684
|
}
|
|
29702
29685
|
|
|
@@ -29729,7 +29712,8 @@ var Step = function Step(_ref8) {
|
|
|
29729
29712
|
createOption: step.createOption,
|
|
29730
29713
|
onCreateOption: step.onCreateOption,
|
|
29731
29714
|
transformer: step.transformer,
|
|
29732
|
-
buttons: step.format === format.buttonsSelect
|
|
29715
|
+
buttons: step.format === format.buttonsSelect,
|
|
29716
|
+
optionsFrom: step.optionsFrom
|
|
29733
29717
|
}));
|
|
29734
29718
|
|
|
29735
29719
|
default:
|
|
@@ -29771,7 +29755,8 @@ var Step = function Step(_ref8) {
|
|
|
29771
29755
|
createOption: step.createOption,
|
|
29772
29756
|
onCreateOption: step.onCreateOption,
|
|
29773
29757
|
transformer: step.transformer,
|
|
29774
|
-
buttons: step.format === format.buttonsSelect
|
|
29758
|
+
buttons: step.format === format.buttonsSelect,
|
|
29759
|
+
optionsFrom: step.optionsFrom
|
|
29775
29760
|
}));
|
|
29776
29761
|
|
|
29777
29762
|
case format.form:
|
|
@@ -29804,8 +29789,7 @@ var Step = function Step(_ref8) {
|
|
|
29804
29789
|
value: getValues(entry) || defaultValue,
|
|
29805
29790
|
index: index,
|
|
29806
29791
|
functionalProperty: functionalProperty,
|
|
29807
|
-
errorDisplayed: errorDisplayed
|
|
29808
|
-
expandedAll: expandedAll
|
|
29792
|
+
errorDisplayed: errorDisplayed
|
|
29809
29793
|
}));
|
|
29810
29794
|
|
|
29811
29795
|
case format.code:
|
|
@@ -29848,8 +29832,7 @@ var Step = function Step(_ref8) {
|
|
|
29848
29832
|
entry: entry,
|
|
29849
29833
|
errorDisplayed: errorDisplayed
|
|
29850
29834
|
}, /*#__PURE__*/React.createElement(ObjectInput, {
|
|
29851
|
-
className: classNames(_defineProperty$1({}, classes.input__invalid, errorDisplayed))
|
|
29852
|
-
possibleValues: step.options
|
|
29835
|
+
className: classNames(_defineProperty$1({}, classes.input__invalid, errorDisplayed))
|
|
29853
29836
|
}));
|
|
29854
29837
|
}
|
|
29855
29838
|
|
|
@@ -29874,15 +29857,15 @@ var Step = function Step(_ref8) {
|
|
|
29874
29857
|
var FileInput = function FileInput(_ref10) {
|
|
29875
29858
|
var onChange = _ref10.onChange;
|
|
29876
29859
|
|
|
29877
|
-
var
|
|
29878
|
-
|
|
29879
|
-
uploading =
|
|
29880
|
-
setUploading =
|
|
29860
|
+
var _useState3 = useState(false),
|
|
29861
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
29862
|
+
uploading = _useState4[0],
|
|
29863
|
+
setUploading = _useState4[1];
|
|
29881
29864
|
|
|
29882
|
-
var
|
|
29883
|
-
|
|
29884
|
-
input =
|
|
29885
|
-
setInput =
|
|
29865
|
+
var _useState5 = useState(undefined),
|
|
29866
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
29867
|
+
input = _useState6[0],
|
|
29868
|
+
setInput = _useState6[1];
|
|
29886
29869
|
|
|
29887
29870
|
var setFiles = function setFiles(e) {
|
|
29888
29871
|
var files = e.target.files;
|
|
@@ -30060,8 +30043,7 @@ var NestedForm = function NestedForm(_ref12) {
|
|
|
30060
30043
|
value = _ref12.value,
|
|
30061
30044
|
step = _ref12.step,
|
|
30062
30045
|
functionalProperty = _ref12.functionalProperty,
|
|
30063
|
-
index = _ref12.index
|
|
30064
|
-
expandedAll = _ref12.expandedAll;
|
|
30046
|
+
index = _ref12.index;
|
|
30065
30047
|
|
|
30066
30048
|
var _useFormContext4 = useFormContext(),
|
|
30067
30049
|
getValues = _useFormContext4.getValues,
|
|
@@ -30070,15 +30052,12 @@ var NestedForm = function NestedForm(_ref12) {
|
|
|
30070
30052
|
_useFormContext4.trigger;
|
|
30071
30053
|
_useFormContext4.formState;
|
|
30072
30054
|
|
|
30073
|
-
var
|
|
30074
|
-
|
|
30075
|
-
collapsed =
|
|
30076
|
-
setCollapsed =
|
|
30055
|
+
var _useState7 = useState(!!step.collapsed),
|
|
30056
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
30057
|
+
collapsed = _useState8[0],
|
|
30058
|
+
setCollapsed = _useState8[1];
|
|
30077
30059
|
|
|
30078
30060
|
var classes = useCustomStyle();
|
|
30079
|
-
useEffect(function () {
|
|
30080
|
-
if (!expandedAll || expandedAll && parent.split('.').length >= 2) setCollapsed(expandedAll);
|
|
30081
|
-
}, [expandedAll]);
|
|
30082
30061
|
var schemaAndFlow = option(step.conditionalSchema).map(function (condiSchema) {
|
|
30083
30062
|
var ref = option(condiSchema.ref).map(function (ref) {
|
|
30084
30063
|
return getValues(ref);
|
|
@@ -30197,8 +30176,7 @@ var NestedForm = function NestedForm(_ref12) {
|
|
|
30197
30176
|
inputWrapper: inputWrapper,
|
|
30198
30177
|
httpClient: maybeCustomHttpClient,
|
|
30199
30178
|
defaultValue: value && value[entry],
|
|
30200
|
-
functionalProperty: functionalProperty
|
|
30201
|
-
expandedAll: expandedAll
|
|
30179
|
+
functionalProperty: functionalProperty
|
|
30202
30180
|
}));
|
|
30203
30181
|
}));
|
|
30204
30182
|
};
|
package/lib/index.js
CHANGED
|
@@ -28549,7 +28549,6 @@ function CodeInput(_ref) {
|
|
|
28549
28549
|
}, []);
|
|
28550
28550
|
React.useEffect(function () {
|
|
28551
28551
|
if (editor && (_typeof$1(value) === 'object' ? JSON.stringify(value, null, 2) : value) !== editor.state.doc.toString()) {
|
|
28552
|
-
console.log("set value", value, value === null || value === undefined ? '' : _typeof$1(value) === 'object' ? JSON.stringify(value, null, 2) : value, editor.state.doc.toString());
|
|
28553
28552
|
editor.dispatch({
|
|
28554
28553
|
changes: {
|
|
28555
28554
|
from: 0,
|
|
@@ -28963,6 +28962,10 @@ var CustomizableInput$1 = /*#__PURE__*/React__default["default"].memo(function (
|
|
|
28963
28962
|
|
|
28964
28963
|
return props.children;
|
|
28965
28964
|
}, function (prev, next) {
|
|
28965
|
+
if (next.render) {
|
|
28966
|
+
return false;
|
|
28967
|
+
}
|
|
28968
|
+
|
|
28966
28969
|
return prev.field.value === next.field.value && next.errorDisplayed === prev.errorDisplayed;
|
|
28967
28970
|
});
|
|
28968
28971
|
var ControlledInput = function ControlledInput(_ref) {
|
|
@@ -29315,11 +29318,6 @@ var Form = /*#__PURE__*/React__default["default"].forwardRef(function (_ref7, re
|
|
|
29315
29318
|
});
|
|
29316
29319
|
};
|
|
29317
29320
|
|
|
29318
|
-
var _useState = React.useState(false),
|
|
29319
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
29320
|
-
expandedAll = _useState2[0],
|
|
29321
|
-
setExpandedAll = _useState2[1];
|
|
29322
|
-
|
|
29323
29321
|
var defaultValues = getDefaultValues(formFlow, schema, value); //FIXME: get real schema through the switch
|
|
29324
29322
|
|
|
29325
29323
|
var _resolver = function resolver(rawData) {
|
|
@@ -29339,10 +29337,10 @@ var Form = /*#__PURE__*/React__default["default"].forwardRef(function (_ref7, re
|
|
|
29339
29337
|
mode: 'onChange'
|
|
29340
29338
|
});
|
|
29341
29339
|
|
|
29342
|
-
var
|
|
29343
|
-
|
|
29344
|
-
initialReseted =
|
|
29345
|
-
setReset =
|
|
29340
|
+
var _useState = React.useState(false),
|
|
29341
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
29342
|
+
initialReseted = _useState2[0],
|
|
29343
|
+
setReset = _useState2[1];
|
|
29346
29344
|
|
|
29347
29345
|
React.useEffect(function () {
|
|
29348
29346
|
_reset(cleanInputArray(value, defaultValues, flow, schema));
|
|
@@ -29408,19 +29406,7 @@ var Form = /*#__PURE__*/React__default["default"].forwardRef(function (_ref7, re
|
|
|
29408
29406
|
var clean = cleanOutputArray(data, schema);
|
|
29409
29407
|
onSubmit(clean);
|
|
29410
29408
|
}, onError)
|
|
29411
|
-
},
|
|
29412
|
-
className: classNames__default["default"](classes.flex, classes.mt_20)
|
|
29413
|
-
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
29414
|
-
type: "button",
|
|
29415
|
-
className: classNames__default["default"](classes.btn, classes.btn_sm),
|
|
29416
|
-
style: {
|
|
29417
|
-
marginLeft: 'auto'
|
|
29418
|
-
},
|
|
29419
|
-
onClick: function onClick(e) {
|
|
29420
|
-
if (e) e.stopPropagation();
|
|
29421
|
-
setExpandedAll(!expandedAll);
|
|
29422
|
-
}
|
|
29423
|
-
}, expandedAll ? 'Expand all' : 'Collapse all')), formFlow.map(function (entry, idx) {
|
|
29409
|
+
}, formFlow.map(function (entry, idx) {
|
|
29424
29410
|
var step = schema[entry];
|
|
29425
29411
|
|
|
29426
29412
|
if (!step && typeof entry === 'string') {
|
|
@@ -29468,8 +29454,7 @@ var Form = /*#__PURE__*/React__default["default"].forwardRef(function (_ref7, re
|
|
|
29468
29454
|
schema: schema,
|
|
29469
29455
|
inputWrapper: inputWrapper,
|
|
29470
29456
|
httpClient: maybeCustomHttpClient,
|
|
29471
|
-
functionalProperty: functionalProperty
|
|
29472
|
-
expandedAll: expandedAll
|
|
29457
|
+
functionalProperty: functionalProperty
|
|
29473
29458
|
}));
|
|
29474
29459
|
}), /*#__PURE__*/React__default["default"].createElement(Footer, {
|
|
29475
29460
|
render: footer,
|
|
@@ -29527,8 +29512,7 @@ var Step = function Step(_ref8) {
|
|
|
29527
29512
|
index = _ref8.index,
|
|
29528
29513
|
functionalProperty = _ref8.functionalProperty,
|
|
29529
29514
|
parent = _ref8.parent,
|
|
29530
|
-
onAfterChange = _ref8.onAfterChange
|
|
29531
|
-
expandedAll = _ref8.expandedAll;
|
|
29515
|
+
onAfterChange = _ref8.onAfterChange;
|
|
29532
29516
|
var classes = useCustomStyle();
|
|
29533
29517
|
|
|
29534
29518
|
var _useFormContext2 = reactHookForm.useFormContext(),
|
|
@@ -29593,7 +29577,6 @@ var Step = function Step(_ref8) {
|
|
|
29593
29577
|
entry: en,
|
|
29594
29578
|
step: stp,
|
|
29595
29579
|
schema: schema,
|
|
29596
|
-
expandedAll: expandedAll,
|
|
29597
29580
|
inputWrapper: inputWrapper,
|
|
29598
29581
|
httpClient: httpClient,
|
|
29599
29582
|
defaultValue: stp === null || stp === void 0 ? void 0 : stp.defaultValue,
|
|
@@ -29671,8 +29654,7 @@ var Step = function Step(_ref8) {
|
|
|
29671
29654
|
defaultValue: (_props$defaultValue = props.defaultValue) === null || _props$defaultValue === void 0 ? void 0 : _props$defaultValue.value,
|
|
29672
29655
|
value: props.value,
|
|
29673
29656
|
index: idx,
|
|
29674
|
-
functionalProperty: functionalProperty
|
|
29675
|
-
expandedAll: expandedAll
|
|
29657
|
+
functionalProperty: functionalProperty
|
|
29676
29658
|
});
|
|
29677
29659
|
}
|
|
29678
29660
|
}));
|
|
@@ -29730,7 +29712,8 @@ var Step = function Step(_ref8) {
|
|
|
29730
29712
|
isMulti: step.isMulti,
|
|
29731
29713
|
createOption: step.createOption,
|
|
29732
29714
|
transformer: step.transformer,
|
|
29733
|
-
buttons: step.format === format.buttonsSelect
|
|
29715
|
+
buttons: step.format === format.buttonsSelect,
|
|
29716
|
+
optionsFrom: step.optionsFrom
|
|
29734
29717
|
}));
|
|
29735
29718
|
}
|
|
29736
29719
|
|
|
@@ -29763,7 +29746,8 @@ var Step = function Step(_ref8) {
|
|
|
29763
29746
|
createOption: step.createOption,
|
|
29764
29747
|
onCreateOption: step.onCreateOption,
|
|
29765
29748
|
transformer: step.transformer,
|
|
29766
|
-
buttons: step.format === format.buttonsSelect
|
|
29749
|
+
buttons: step.format === format.buttonsSelect,
|
|
29750
|
+
optionsFrom: step.optionsFrom
|
|
29767
29751
|
}));
|
|
29768
29752
|
|
|
29769
29753
|
default:
|
|
@@ -29805,7 +29789,8 @@ var Step = function Step(_ref8) {
|
|
|
29805
29789
|
createOption: step.createOption,
|
|
29806
29790
|
onCreateOption: step.onCreateOption,
|
|
29807
29791
|
transformer: step.transformer,
|
|
29808
|
-
buttons: step.format === format.buttonsSelect
|
|
29792
|
+
buttons: step.format === format.buttonsSelect,
|
|
29793
|
+
optionsFrom: step.optionsFrom
|
|
29809
29794
|
}));
|
|
29810
29795
|
|
|
29811
29796
|
case format.form:
|
|
@@ -29838,8 +29823,7 @@ var Step = function Step(_ref8) {
|
|
|
29838
29823
|
value: getValues(entry) || defaultValue,
|
|
29839
29824
|
index: index,
|
|
29840
29825
|
functionalProperty: functionalProperty,
|
|
29841
|
-
errorDisplayed: errorDisplayed
|
|
29842
|
-
expandedAll: expandedAll
|
|
29826
|
+
errorDisplayed: errorDisplayed
|
|
29843
29827
|
}));
|
|
29844
29828
|
|
|
29845
29829
|
case format.code:
|
|
@@ -29882,8 +29866,7 @@ var Step = function Step(_ref8) {
|
|
|
29882
29866
|
entry: entry,
|
|
29883
29867
|
errorDisplayed: errorDisplayed
|
|
29884
29868
|
}, /*#__PURE__*/React__default["default"].createElement(ObjectInput, {
|
|
29885
|
-
className: classNames__default["default"](_defineProperty$1({}, classes.input__invalid, errorDisplayed))
|
|
29886
|
-
possibleValues: step.options
|
|
29869
|
+
className: classNames__default["default"](_defineProperty$1({}, classes.input__invalid, errorDisplayed))
|
|
29887
29870
|
}));
|
|
29888
29871
|
}
|
|
29889
29872
|
|
|
@@ -29908,15 +29891,15 @@ var Step = function Step(_ref8) {
|
|
|
29908
29891
|
var FileInput = function FileInput(_ref10) {
|
|
29909
29892
|
var onChange = _ref10.onChange;
|
|
29910
29893
|
|
|
29911
|
-
var
|
|
29912
|
-
|
|
29913
|
-
uploading =
|
|
29914
|
-
setUploading =
|
|
29894
|
+
var _useState3 = React.useState(false),
|
|
29895
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
29896
|
+
uploading = _useState4[0],
|
|
29897
|
+
setUploading = _useState4[1];
|
|
29915
29898
|
|
|
29916
|
-
var
|
|
29917
|
-
|
|
29918
|
-
input =
|
|
29919
|
-
setInput =
|
|
29899
|
+
var _useState5 = React.useState(undefined),
|
|
29900
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
29901
|
+
input = _useState6[0],
|
|
29902
|
+
setInput = _useState6[1];
|
|
29920
29903
|
|
|
29921
29904
|
var setFiles = function setFiles(e) {
|
|
29922
29905
|
var files = e.target.files;
|
|
@@ -30094,8 +30077,7 @@ var NestedForm = function NestedForm(_ref12) {
|
|
|
30094
30077
|
value = _ref12.value,
|
|
30095
30078
|
step = _ref12.step,
|
|
30096
30079
|
functionalProperty = _ref12.functionalProperty,
|
|
30097
|
-
index = _ref12.index
|
|
30098
|
-
expandedAll = _ref12.expandedAll;
|
|
30080
|
+
index = _ref12.index;
|
|
30099
30081
|
|
|
30100
30082
|
var _useFormContext4 = reactHookForm.useFormContext(),
|
|
30101
30083
|
getValues = _useFormContext4.getValues,
|
|
@@ -30104,15 +30086,12 @@ var NestedForm = function NestedForm(_ref12) {
|
|
|
30104
30086
|
_useFormContext4.trigger;
|
|
30105
30087
|
_useFormContext4.formState;
|
|
30106
30088
|
|
|
30107
|
-
var
|
|
30108
|
-
|
|
30109
|
-
collapsed =
|
|
30110
|
-
setCollapsed =
|
|
30089
|
+
var _useState7 = React.useState(!!step.collapsed),
|
|
30090
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
30091
|
+
collapsed = _useState8[0],
|
|
30092
|
+
setCollapsed = _useState8[1];
|
|
30111
30093
|
|
|
30112
30094
|
var classes = useCustomStyle();
|
|
30113
|
-
React.useEffect(function () {
|
|
30114
|
-
if (!expandedAll || expandedAll && parent.split('.').length >= 2) setCollapsed(expandedAll);
|
|
30115
|
-
}, [expandedAll]);
|
|
30116
30095
|
var schemaAndFlow = option(step.conditionalSchema).map(function (condiSchema) {
|
|
30117
30096
|
var ref = option(condiSchema.ref).map(function (ref) {
|
|
30118
30097
|
return getValues(ref);
|
|
@@ -30231,8 +30210,7 @@ var NestedForm = function NestedForm(_ref12) {
|
|
|
30231
30210
|
inputWrapper: inputWrapper,
|
|
30232
30211
|
httpClient: maybeCustomHttpClient,
|
|
30233
30212
|
defaultValue: value && value[entry],
|
|
30234
|
-
functionalProperty: functionalProperty
|
|
30235
|
-
expandedAll: expandedAll
|
|
30213
|
+
functionalProperty: functionalProperty
|
|
30236
30214
|
}));
|
|
30237
30215
|
}));
|
|
30238
30216
|
};
|