@scenid/react-formulator 0.1.11 → 0.1.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/dist/index.cjs.js +35 -17
- package/dist/index.esm.js +35 -17
- package/package.json +1 -1
- package/src/Editable/FormBoolean.jsx +2 -0
- package/src/FormulatorForm.jsx +6 -4
- package/src/FormulatorFormSection.jsx +15 -9
- package/stories/Forms.stories.jsx +9 -1
package/dist/index.cjs.js
CHANGED
|
@@ -29473,6 +29473,7 @@ var FormBoolean = function FormBoolean(_ref) {
|
|
|
29473
29473
|
|
|
29474
29474
|
if (variant === 'checkbox') {
|
|
29475
29475
|
return /*#__PURE__*/React__default["default"].createElement(core$1.Checkbox, {
|
|
29476
|
+
color: "primary",
|
|
29476
29477
|
name: name,
|
|
29477
29478
|
checked: isChecked$1(value, defaultValue),
|
|
29478
29479
|
onChange: handleChange
|
|
@@ -29480,6 +29481,7 @@ var FormBoolean = function FormBoolean(_ref) {
|
|
|
29480
29481
|
}
|
|
29481
29482
|
|
|
29482
29483
|
return /*#__PURE__*/React__default["default"].createElement(core$1.Switch, {
|
|
29484
|
+
color: "primary",
|
|
29483
29485
|
name: name,
|
|
29484
29486
|
checked: isChecked$1(value, defaultValue),
|
|
29485
29487
|
onChange: handleChange
|
|
@@ -75612,7 +75614,7 @@ var FormulatorFormSection = /*#__PURE__*/function (_React$Component) {
|
|
|
75612
75614
|
nested = _this$props2$nested === void 0 ? 0 : _this$props2$nested,
|
|
75613
75615
|
schema = _this$props2.schema,
|
|
75614
75616
|
fields = _this$props2.fields,
|
|
75615
|
-
|
|
75617
|
+
obscuredFields = _this$props2.obscuredFields,
|
|
75616
75618
|
results = _this$props2.results,
|
|
75617
75619
|
data = _this$props2.data,
|
|
75618
75620
|
fieldStates = _this$props2.fieldStates,
|
|
@@ -75648,7 +75650,18 @@ var FormulatorFormSection = /*#__PURE__*/function (_React$Component) {
|
|
|
75648
75650
|
_errors = _fieldProps.errors,
|
|
75649
75651
|
_validating = _fieldProps.validating,
|
|
75650
75652
|
_dirty = _fieldProps.dirty;
|
|
75651
|
-
|
|
75653
|
+
|
|
75654
|
+
if (readOnly) {
|
|
75655
|
+
if (!_value) return false;
|
|
75656
|
+
|
|
75657
|
+
if (Array.isArray(obscuredFields) && obscuredFields.includes(_name)) {
|
|
75658
|
+
return /*#__PURE__*/React__default["default"].createElement(HiddenData, {
|
|
75659
|
+
subject: "Das Feld",
|
|
75660
|
+
label: _label
|
|
75661
|
+
});
|
|
75662
|
+
}
|
|
75663
|
+
}
|
|
75664
|
+
|
|
75652
75665
|
return /*#__PURE__*/React__default["default"].createElement(readOnly ? FormReadOnlyField$1 : FormField$1, {
|
|
75653
75666
|
key: "form-render-component-".concat(cKey),
|
|
75654
75667
|
variant: inputVariant,
|
|
@@ -75685,9 +75698,9 @@ var FormulatorFormSection = /*#__PURE__*/function (_React$Component) {
|
|
|
75685
75698
|
schema: schema,
|
|
75686
75699
|
label: fieldEntry.label,
|
|
75687
75700
|
fields: fieldEntry.fields,
|
|
75688
|
-
hideSensitiveData: hideSensitiveData,
|
|
75689
75701
|
results: results,
|
|
75690
75702
|
data: data,
|
|
75703
|
+
obscuredFields: obscuredFields,
|
|
75691
75704
|
fieldStates: fieldStates,
|
|
75692
75705
|
translations: translations,
|
|
75693
75706
|
errorMessages: errorMessages,
|
|
@@ -75713,7 +75726,18 @@ var FormulatorFormSection = /*#__PURE__*/function (_React$Component) {
|
|
|
75713
75726
|
errors = fieldProps.errors,
|
|
75714
75727
|
validating = fieldProps.validating,
|
|
75715
75728
|
dirty = fieldProps.dirty;
|
|
75716
|
-
|
|
75729
|
+
|
|
75730
|
+
if (readOnly) {
|
|
75731
|
+
if (!value) return false;
|
|
75732
|
+
|
|
75733
|
+
if (Array.isArray(obscuredFields) && obscuredFields.includes(name)) {
|
|
75734
|
+
return /*#__PURE__*/React__default["default"].createElement(HiddenData, {
|
|
75735
|
+
subject: "Das Feld",
|
|
75736
|
+
label: label
|
|
75737
|
+
});
|
|
75738
|
+
}
|
|
75739
|
+
}
|
|
75740
|
+
|
|
75717
75741
|
var apProps = {};
|
|
75718
75742
|
|
|
75719
75743
|
for (var i = 0; i < fields.length; i++) {
|
|
@@ -75747,14 +75771,6 @@ var FormulatorFormSection = /*#__PURE__*/function (_React$Component) {
|
|
|
75747
75771
|
}
|
|
75748
75772
|
|
|
75749
75773
|
var FormFieldComponent = readOnly ? FormReadOnlyField$1 : FormField$1;
|
|
75750
|
-
|
|
75751
|
-
if (hideSensitiveData && (name === 'reportingPin' || name === 'reportingAuthCode')) {
|
|
75752
|
-
return /*#__PURE__*/React__default["default"].createElement(HiddenData, {
|
|
75753
|
-
subject: "Das Feld",
|
|
75754
|
-
label: label
|
|
75755
|
-
});
|
|
75756
|
-
}
|
|
75757
|
-
|
|
75758
75774
|
return /*#__PURE__*/React__default["default"].createElement(FormFieldComponent, {
|
|
75759
75775
|
key: "form-".concat(id, "-").concat(name),
|
|
75760
75776
|
variant: inputVariant,
|
|
@@ -75851,7 +75867,7 @@ FormulatorFormSection.propTypes = {
|
|
|
75851
75867
|
nested: PropTypes__default["default"].number,
|
|
75852
75868
|
sectionId: PropTypes__default["default"].string.isRequired,
|
|
75853
75869
|
fields: PropTypes__default["default"].array.isRequired,
|
|
75854
|
-
|
|
75870
|
+
obscuredFields: PropTypes__default["default"].array,
|
|
75855
75871
|
schema: PropTypes__default["default"].object.isRequired,
|
|
75856
75872
|
results: PropTypes__default["default"].object.isRequired,
|
|
75857
75873
|
data: PropTypes__default["default"].object.isRequired,
|
|
@@ -76321,12 +76337,13 @@ var FormulatorForm = /*#__PURE__*/function (_React$Component) {
|
|
|
76321
76337
|
readOnly = _this$props7.readOnly,
|
|
76322
76338
|
listErrors = _this$props7.listErrors,
|
|
76323
76339
|
schema = _this$props7.schema,
|
|
76324
|
-
hideSensitiveData = _this$props7.hideSensitiveData,
|
|
76325
76340
|
renderSchema = _this$props7.renderSchema,
|
|
76326
76341
|
propDisabled = _this$props7.disabled,
|
|
76327
76342
|
translations = _this$props7.translations,
|
|
76328
76343
|
componentMap = _this$props7.componentMap,
|
|
76329
76344
|
renderComponentMap = _this$props7.renderComponentMap,
|
|
76345
|
+
obscuredFields = _this$props7.obscuredFields,
|
|
76346
|
+
obscuredGroups = _this$props7.obscuredGroups,
|
|
76330
76347
|
errorMessages = _this$props7.errorMessages,
|
|
76331
76348
|
_onReset = _this$props7.onReset;
|
|
76332
76349
|
var _this$state6 = this.state,
|
|
@@ -76358,7 +76375,7 @@ var FormulatorForm = /*#__PURE__*/function (_React$Component) {
|
|
|
76358
76375
|
description = _ref12.description,
|
|
76359
76376
|
fields = _ref12.fields;
|
|
76360
76377
|
|
|
76361
|
-
if (
|
|
76378
|
+
if (readOnly && Array.isArray(obscuredGroups) && obscuredGroups.includes(sectionId)) {
|
|
76362
76379
|
return /*#__PURE__*/React__default["default"].createElement(HiddenData, {
|
|
76363
76380
|
subject: "Der Bereich",
|
|
76364
76381
|
label: label
|
|
@@ -76380,10 +76397,10 @@ var FormulatorForm = /*#__PURE__*/function (_React$Component) {
|
|
|
76380
76397
|
label: label,
|
|
76381
76398
|
desc: description,
|
|
76382
76399
|
fields: fields,
|
|
76383
|
-
hideSensitiveData: hideSensitiveData,
|
|
76384
76400
|
results: results,
|
|
76385
76401
|
data: data,
|
|
76386
76402
|
fieldStates: fieldStates,
|
|
76403
|
+
obscuredFields: obscuredFields,
|
|
76387
76404
|
translations: translations,
|
|
76388
76405
|
errorMessages: errorMessages,
|
|
76389
76406
|
componentMap: componentMap,
|
|
@@ -76426,7 +76443,6 @@ FormulatorForm.propTypes = {
|
|
|
76426
76443
|
listErrors: PropTypes__default["default"].bool,
|
|
76427
76444
|
schema: PropTypes__default["default"].object.isRequired,
|
|
76428
76445
|
data: PropTypes__default["default"].object.isRequired,
|
|
76429
|
-
hideSensitiveData: PropTypes__default["default"].bool,
|
|
76430
76446
|
transientData: PropTypes__default["default"].object,
|
|
76431
76447
|
fieldStates: PropTypes__default["default"].object,
|
|
76432
76448
|
renderSchema: PropTypes__default["default"].object.isRequired,
|
|
@@ -76435,6 +76451,8 @@ FormulatorForm.propTypes = {
|
|
|
76435
76451
|
errorMessages: PropTypes__default["default"].object,
|
|
76436
76452
|
componentMap: PropTypes__default["default"].object,
|
|
76437
76453
|
renderComponentMap: PropTypes__default["default"].object,
|
|
76454
|
+
obscuredFields: PropTypes__default["default"].array,
|
|
76455
|
+
obscuredGroups: PropTypes__default["default"].array,
|
|
76438
76456
|
onSubmit: PropTypes__default["default"].func,
|
|
76439
76457
|
onReset: PropTypes__default["default"].func,
|
|
76440
76458
|
onStatusUpdate: PropTypes__default["default"].func,
|
package/dist/index.esm.js
CHANGED
|
@@ -29429,6 +29429,7 @@ var FormBoolean = function FormBoolean(_ref) {
|
|
|
29429
29429
|
|
|
29430
29430
|
if (variant === 'checkbox') {
|
|
29431
29431
|
return /*#__PURE__*/React__default.createElement(Checkbox, {
|
|
29432
|
+
color: "primary",
|
|
29432
29433
|
name: name,
|
|
29433
29434
|
checked: isChecked$1(value, defaultValue),
|
|
29434
29435
|
onChange: handleChange
|
|
@@ -29436,6 +29437,7 @@ var FormBoolean = function FormBoolean(_ref) {
|
|
|
29436
29437
|
}
|
|
29437
29438
|
|
|
29438
29439
|
return /*#__PURE__*/React__default.createElement(Switch, {
|
|
29440
|
+
color: "primary",
|
|
29439
29441
|
name: name,
|
|
29440
29442
|
checked: isChecked$1(value, defaultValue),
|
|
29441
29443
|
onChange: handleChange
|
|
@@ -75568,7 +75570,7 @@ var FormulatorFormSection = /*#__PURE__*/function (_React$Component) {
|
|
|
75568
75570
|
nested = _this$props2$nested === void 0 ? 0 : _this$props2$nested,
|
|
75569
75571
|
schema = _this$props2.schema,
|
|
75570
75572
|
fields = _this$props2.fields,
|
|
75571
|
-
|
|
75573
|
+
obscuredFields = _this$props2.obscuredFields,
|
|
75572
75574
|
results = _this$props2.results,
|
|
75573
75575
|
data = _this$props2.data,
|
|
75574
75576
|
fieldStates = _this$props2.fieldStates,
|
|
@@ -75604,7 +75606,18 @@ var FormulatorFormSection = /*#__PURE__*/function (_React$Component) {
|
|
|
75604
75606
|
_errors = _fieldProps.errors,
|
|
75605
75607
|
_validating = _fieldProps.validating,
|
|
75606
75608
|
_dirty = _fieldProps.dirty;
|
|
75607
|
-
|
|
75609
|
+
|
|
75610
|
+
if (readOnly) {
|
|
75611
|
+
if (!_value) return false;
|
|
75612
|
+
|
|
75613
|
+
if (Array.isArray(obscuredFields) && obscuredFields.includes(_name)) {
|
|
75614
|
+
return /*#__PURE__*/React__default.createElement(HiddenData, {
|
|
75615
|
+
subject: "Das Feld",
|
|
75616
|
+
label: _label
|
|
75617
|
+
});
|
|
75618
|
+
}
|
|
75619
|
+
}
|
|
75620
|
+
|
|
75608
75621
|
return /*#__PURE__*/React__default.createElement(readOnly ? FormReadOnlyField$1 : FormField$1, {
|
|
75609
75622
|
key: "form-render-component-".concat(cKey),
|
|
75610
75623
|
variant: inputVariant,
|
|
@@ -75641,9 +75654,9 @@ var FormulatorFormSection = /*#__PURE__*/function (_React$Component) {
|
|
|
75641
75654
|
schema: schema,
|
|
75642
75655
|
label: fieldEntry.label,
|
|
75643
75656
|
fields: fieldEntry.fields,
|
|
75644
|
-
hideSensitiveData: hideSensitiveData,
|
|
75645
75657
|
results: results,
|
|
75646
75658
|
data: data,
|
|
75659
|
+
obscuredFields: obscuredFields,
|
|
75647
75660
|
fieldStates: fieldStates,
|
|
75648
75661
|
translations: translations,
|
|
75649
75662
|
errorMessages: errorMessages,
|
|
@@ -75669,7 +75682,18 @@ var FormulatorFormSection = /*#__PURE__*/function (_React$Component) {
|
|
|
75669
75682
|
errors = fieldProps.errors,
|
|
75670
75683
|
validating = fieldProps.validating,
|
|
75671
75684
|
dirty = fieldProps.dirty;
|
|
75672
|
-
|
|
75685
|
+
|
|
75686
|
+
if (readOnly) {
|
|
75687
|
+
if (!value) return false;
|
|
75688
|
+
|
|
75689
|
+
if (Array.isArray(obscuredFields) && obscuredFields.includes(name)) {
|
|
75690
|
+
return /*#__PURE__*/React__default.createElement(HiddenData, {
|
|
75691
|
+
subject: "Das Feld",
|
|
75692
|
+
label: label
|
|
75693
|
+
});
|
|
75694
|
+
}
|
|
75695
|
+
}
|
|
75696
|
+
|
|
75673
75697
|
var apProps = {};
|
|
75674
75698
|
|
|
75675
75699
|
for (var i = 0; i < fields.length; i++) {
|
|
@@ -75703,14 +75727,6 @@ var FormulatorFormSection = /*#__PURE__*/function (_React$Component) {
|
|
|
75703
75727
|
}
|
|
75704
75728
|
|
|
75705
75729
|
var FormFieldComponent = readOnly ? FormReadOnlyField$1 : FormField$1;
|
|
75706
|
-
|
|
75707
|
-
if (hideSensitiveData && (name === 'reportingPin' || name === 'reportingAuthCode')) {
|
|
75708
|
-
return /*#__PURE__*/React__default.createElement(HiddenData, {
|
|
75709
|
-
subject: "Das Feld",
|
|
75710
|
-
label: label
|
|
75711
|
-
});
|
|
75712
|
-
}
|
|
75713
|
-
|
|
75714
75730
|
return /*#__PURE__*/React__default.createElement(FormFieldComponent, {
|
|
75715
75731
|
key: "form-".concat(id, "-").concat(name),
|
|
75716
75732
|
variant: inputVariant,
|
|
@@ -75807,7 +75823,7 @@ FormulatorFormSection.propTypes = {
|
|
|
75807
75823
|
nested: PropTypes__default.number,
|
|
75808
75824
|
sectionId: PropTypes__default.string.isRequired,
|
|
75809
75825
|
fields: PropTypes__default.array.isRequired,
|
|
75810
|
-
|
|
75826
|
+
obscuredFields: PropTypes__default.array,
|
|
75811
75827
|
schema: PropTypes__default.object.isRequired,
|
|
75812
75828
|
results: PropTypes__default.object.isRequired,
|
|
75813
75829
|
data: PropTypes__default.object.isRequired,
|
|
@@ -76277,12 +76293,13 @@ var FormulatorForm = /*#__PURE__*/function (_React$Component) {
|
|
|
76277
76293
|
readOnly = _this$props7.readOnly,
|
|
76278
76294
|
listErrors = _this$props7.listErrors,
|
|
76279
76295
|
schema = _this$props7.schema,
|
|
76280
|
-
hideSensitiveData = _this$props7.hideSensitiveData,
|
|
76281
76296
|
renderSchema = _this$props7.renderSchema,
|
|
76282
76297
|
propDisabled = _this$props7.disabled,
|
|
76283
76298
|
translations = _this$props7.translations,
|
|
76284
76299
|
componentMap = _this$props7.componentMap,
|
|
76285
76300
|
renderComponentMap = _this$props7.renderComponentMap,
|
|
76301
|
+
obscuredFields = _this$props7.obscuredFields,
|
|
76302
|
+
obscuredGroups = _this$props7.obscuredGroups,
|
|
76286
76303
|
errorMessages = _this$props7.errorMessages,
|
|
76287
76304
|
_onReset = _this$props7.onReset;
|
|
76288
76305
|
var _this$state6 = this.state,
|
|
@@ -76314,7 +76331,7 @@ var FormulatorForm = /*#__PURE__*/function (_React$Component) {
|
|
|
76314
76331
|
description = _ref12.description,
|
|
76315
76332
|
fields = _ref12.fields;
|
|
76316
76333
|
|
|
76317
|
-
if (
|
|
76334
|
+
if (readOnly && Array.isArray(obscuredGroups) && obscuredGroups.includes(sectionId)) {
|
|
76318
76335
|
return /*#__PURE__*/React__default.createElement(HiddenData, {
|
|
76319
76336
|
subject: "Der Bereich",
|
|
76320
76337
|
label: label
|
|
@@ -76336,10 +76353,10 @@ var FormulatorForm = /*#__PURE__*/function (_React$Component) {
|
|
|
76336
76353
|
label: label,
|
|
76337
76354
|
desc: description,
|
|
76338
76355
|
fields: fields,
|
|
76339
|
-
hideSensitiveData: hideSensitiveData,
|
|
76340
76356
|
results: results,
|
|
76341
76357
|
data: data,
|
|
76342
76358
|
fieldStates: fieldStates,
|
|
76359
|
+
obscuredFields: obscuredFields,
|
|
76343
76360
|
translations: translations,
|
|
76344
76361
|
errorMessages: errorMessages,
|
|
76345
76362
|
componentMap: componentMap,
|
|
@@ -76382,7 +76399,6 @@ FormulatorForm.propTypes = {
|
|
|
76382
76399
|
listErrors: PropTypes__default.bool,
|
|
76383
76400
|
schema: PropTypes__default.object.isRequired,
|
|
76384
76401
|
data: PropTypes__default.object.isRequired,
|
|
76385
|
-
hideSensitiveData: PropTypes__default.bool,
|
|
76386
76402
|
transientData: PropTypes__default.object,
|
|
76387
76403
|
fieldStates: PropTypes__default.object,
|
|
76388
76404
|
renderSchema: PropTypes__default.object.isRequired,
|
|
@@ -76391,6 +76407,8 @@ FormulatorForm.propTypes = {
|
|
|
76391
76407
|
errorMessages: PropTypes__default.object,
|
|
76392
76408
|
componentMap: PropTypes__default.object,
|
|
76393
76409
|
renderComponentMap: PropTypes__default.object,
|
|
76410
|
+
obscuredFields: PropTypes__default.array,
|
|
76411
|
+
obscuredGroups: PropTypes__default.array,
|
|
76394
76412
|
onSubmit: PropTypes__default.func,
|
|
76395
76413
|
onReset: PropTypes__default.func,
|
|
76396
76414
|
onStatusUpdate: PropTypes__default.func,
|
package/package.json
CHANGED
|
@@ -16,6 +16,7 @@ const FormBoolean = ({ variant, name, value, defaultValue, needsToBeTrue, onChan
|
|
|
16
16
|
if (variant === 'checkbox') {
|
|
17
17
|
return (
|
|
18
18
|
<Checkbox
|
|
19
|
+
color="primary"
|
|
19
20
|
name={name}
|
|
20
21
|
checked={isChecked(value, defaultValue)}
|
|
21
22
|
onChange={handleChange}
|
|
@@ -25,6 +26,7 @@ const FormBoolean = ({ variant, name, value, defaultValue, needsToBeTrue, onChan
|
|
|
25
26
|
|
|
26
27
|
return (
|
|
27
28
|
<Switch
|
|
29
|
+
color="primary"
|
|
28
30
|
name={name}
|
|
29
31
|
checked={isChecked(value, defaultValue)}
|
|
30
32
|
onChange={handleChange}
|
package/src/FormulatorForm.jsx
CHANGED
|
@@ -361,12 +361,13 @@ class FormulatorForm extends React.Component {
|
|
|
361
361
|
readOnly,
|
|
362
362
|
listErrors,
|
|
363
363
|
schema,
|
|
364
|
-
hideSensitiveData,
|
|
365
364
|
renderSchema,
|
|
366
365
|
disabled: propDisabled,
|
|
367
366
|
translations,
|
|
368
367
|
componentMap,
|
|
369
368
|
renderComponentMap,
|
|
369
|
+
obscuredFields,
|
|
370
|
+
obscuredGroups,
|
|
370
371
|
errorMessages,
|
|
371
372
|
onReset
|
|
372
373
|
} = this.props
|
|
@@ -408,7 +409,7 @@ class FormulatorForm extends React.Component {
|
|
|
408
409
|
{
|
|
409
410
|
renderSchema.groups
|
|
410
411
|
.map(({ id: sectionId, label, description, fields }) => {
|
|
411
|
-
if (
|
|
412
|
+
if (readOnly && Array.isArray(obscuredGroups) && obscuredGroups.includes(sectionId)) {
|
|
412
413
|
return <HiddenData subject="Der Bereich" label={label} />
|
|
413
414
|
}
|
|
414
415
|
|
|
@@ -428,10 +429,10 @@ class FormulatorForm extends React.Component {
|
|
|
428
429
|
label={label}
|
|
429
430
|
desc={description}
|
|
430
431
|
fields={fields}
|
|
431
|
-
hideSensitiveData={hideSensitiveData}
|
|
432
432
|
results={results}
|
|
433
433
|
data={data}
|
|
434
434
|
fieldStates={fieldStates}
|
|
435
|
+
obscuredFields={obscuredFields}
|
|
435
436
|
translations={translations}
|
|
436
437
|
errorMessages={errorMessages}
|
|
437
438
|
componentMap={componentMap}
|
|
@@ -513,7 +514,6 @@ FormulatorForm.propTypes = {
|
|
|
513
514
|
listErrors: PropTypes.bool,
|
|
514
515
|
schema: PropTypes.object.isRequired,
|
|
515
516
|
data: PropTypes.object.isRequired,
|
|
516
|
-
hideSensitiveData: PropTypes.bool,
|
|
517
517
|
transientData: PropTypes.object,
|
|
518
518
|
fieldStates: PropTypes.object,
|
|
519
519
|
renderSchema: PropTypes.object.isRequired,
|
|
@@ -522,6 +522,8 @@ FormulatorForm.propTypes = {
|
|
|
522
522
|
errorMessages: PropTypes.object,
|
|
523
523
|
componentMap: PropTypes.object,
|
|
524
524
|
renderComponentMap: PropTypes.object,
|
|
525
|
+
obscuredFields: PropTypes.array,
|
|
526
|
+
obscuredGroups: PropTypes.array,
|
|
525
527
|
onSubmit: PropTypes.func,
|
|
526
528
|
onReset: PropTypes.func,
|
|
527
529
|
onStatusUpdate: PropTypes.func,
|
|
@@ -170,7 +170,7 @@ class FormulatorFormSection extends React.Component {
|
|
|
170
170
|
nested = 0,
|
|
171
171
|
schema,
|
|
172
172
|
fields,
|
|
173
|
-
|
|
173
|
+
obscuredFields,
|
|
174
174
|
results,
|
|
175
175
|
data,
|
|
176
176
|
fieldStates,
|
|
@@ -213,7 +213,12 @@ class FormulatorFormSection extends React.Component {
|
|
|
213
213
|
dirty
|
|
214
214
|
} = fieldProps
|
|
215
215
|
|
|
216
|
-
if (readOnly
|
|
216
|
+
if (readOnly) {
|
|
217
|
+
if (!value) return false
|
|
218
|
+
if (Array.isArray(obscuredFields) && obscuredFields.includes(name)) {
|
|
219
|
+
return <HiddenData subject="Das Feld" label={label} />
|
|
220
|
+
}
|
|
221
|
+
}
|
|
217
222
|
|
|
218
223
|
return React.createElement(
|
|
219
224
|
readOnly ? FormReadOnlyField : FormField,
|
|
@@ -255,9 +260,9 @@ class FormulatorFormSection extends React.Component {
|
|
|
255
260
|
schema={schema}
|
|
256
261
|
label={fieldEntry.label}
|
|
257
262
|
fields={fieldEntry.fields}
|
|
258
|
-
hideSensitiveData={hideSensitiveData}
|
|
259
263
|
results={results}
|
|
260
264
|
data={data}
|
|
265
|
+
obscuredFields={obscuredFields}
|
|
261
266
|
fieldStates={fieldStates}
|
|
262
267
|
translations={translations}
|
|
263
268
|
errorMessages={errorMessages}
|
|
@@ -289,7 +294,12 @@ class FormulatorFormSection extends React.Component {
|
|
|
289
294
|
dirty
|
|
290
295
|
} = fieldProps
|
|
291
296
|
|
|
292
|
-
if (readOnly
|
|
297
|
+
if (readOnly) {
|
|
298
|
+
if (!value) return false
|
|
299
|
+
if (Array.isArray(obscuredFields) && obscuredFields.includes(name)) {
|
|
300
|
+
return <HiddenData subject="Das Feld" label={label} />
|
|
301
|
+
}
|
|
302
|
+
}
|
|
293
303
|
|
|
294
304
|
const apProps = {}
|
|
295
305
|
|
|
@@ -335,10 +345,6 @@ class FormulatorFormSection extends React.Component {
|
|
|
335
345
|
|
|
336
346
|
const FormFieldComponent = readOnly ? FormReadOnlyField : FormField
|
|
337
347
|
|
|
338
|
-
if (hideSensitiveData && (name === 'reportingPin' || name === 'reportingAuthCode')) {
|
|
339
|
-
return <HiddenData subject="Das Feld" label={label} />
|
|
340
|
-
}
|
|
341
|
-
|
|
342
348
|
return (
|
|
343
349
|
React.createElement(
|
|
344
350
|
FormFieldComponent,
|
|
@@ -485,7 +491,7 @@ FormulatorFormSection.propTypes = {
|
|
|
485
491
|
nested: PropTypes.number,
|
|
486
492
|
sectionId: PropTypes.string.isRequired,
|
|
487
493
|
fields: PropTypes.array.isRequired,
|
|
488
|
-
|
|
494
|
+
obscuredFields: PropTypes.array,
|
|
489
495
|
schema: PropTypes.object.isRequired,
|
|
490
496
|
results: PropTypes.object.isRequired,
|
|
491
497
|
data: PropTypes.object.isRequired,
|
|
@@ -156,10 +156,18 @@ RLP.args = {
|
|
|
156
156
|
'invalid-phone': "Ungültige Telefonnummer",
|
|
157
157
|
'invalid-fax': "Ungültige Faxnummer"
|
|
158
158
|
},
|
|
159
|
+
obscuredFields: [
|
|
160
|
+
'reportingPin',
|
|
161
|
+
'reportingAuthCode'
|
|
162
|
+
],
|
|
163
|
+
obscuredGroups: ['bankData'],
|
|
159
164
|
data: {
|
|
160
165
|
ouType: 'private-medical-practice',
|
|
161
166
|
hasBank: true,
|
|
162
|
-
bankValidFrom: '2022-08-14'
|
|
167
|
+
bankValidFrom: '2022-08-14',
|
|
168
|
+
isReporting: true,
|
|
169
|
+
reportingPin: '2554',
|
|
170
|
+
reportingAuthCode: '254hjx'
|
|
163
171
|
},
|
|
164
172
|
renderComponentMap: {
|
|
165
173
|
// contacts: <RoleContactsRepeater />,
|