react-survey-builder 1.0.46 → 1.0.48
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.js +1 -1
- package/lib/form.js +40 -4
- package/lib/survey-elements/index.js +337 -283
- package/lib/utils/masks.js +131 -0
- package/package.json +1 -1
package/lib/form.js
CHANGED
@@ -508,10 +508,6 @@ var ReactSurvey = function ReactSurvey(_ref) {
|
|
508
508
|
item.disabled = (_ref7 = readOnly || item.readOnly) !== null && _ref7 !== void 0 ? _ref7 : false;
|
509
509
|
item.mutable = true;
|
510
510
|
switch (item.element) {
|
511
|
-
case 'TextInput':
|
512
|
-
case 'EmailInput':
|
513
|
-
case 'NumberInput':
|
514
|
-
case 'TextArea':
|
515
511
|
case 'Dropdown':
|
516
512
|
case 'RadioButtons':
|
517
513
|
case 'Rating':
|
@@ -519,6 +515,46 @@ var ReactSurvey = function ReactSurvey(_ref) {
|
|
519
515
|
case 'Range':
|
520
516
|
case 'Checkbox':
|
521
517
|
return getInputElement(item);
|
518
|
+
case 'TextInput':
|
519
|
+
return /*#__PURE__*/_react["default"].createElement(_surveyElements.TextInput, {
|
520
|
+
name: item.fieldName,
|
521
|
+
ref: function ref(c) {
|
522
|
+
return inputs.current[item.fieldName] = c;
|
523
|
+
},
|
524
|
+
key: "form_".concat(item.id),
|
525
|
+
item: item,
|
526
|
+
value: _getDefaultValue(item)
|
527
|
+
});
|
528
|
+
case 'EmailInput':
|
529
|
+
return /*#__PURE__*/_react["default"].createElement(_surveyElements.EmailInput, {
|
530
|
+
name: item.fieldName,
|
531
|
+
ref: function ref(c) {
|
532
|
+
return inputs.current[item.fieldName] = c;
|
533
|
+
},
|
534
|
+
key: "form_".concat(item.id),
|
535
|
+
item: item,
|
536
|
+
value: _getDefaultValue(item)
|
537
|
+
});
|
538
|
+
case 'NumberInput':
|
539
|
+
return /*#__PURE__*/_react["default"].createElement(_surveyElements.NumberInput, {
|
540
|
+
name: item.fieldName,
|
541
|
+
ref: function ref(c) {
|
542
|
+
return inputs.current[item.fieldName] = c;
|
543
|
+
},
|
544
|
+
key: "form_".concat(item.id),
|
545
|
+
item: item,
|
546
|
+
value: _getDefaultValue(item)
|
547
|
+
});
|
548
|
+
case 'TextArea':
|
549
|
+
return /*#__PURE__*/_react["default"].createElement(_surveyElements.TextArea, {
|
550
|
+
name: item.fieldName,
|
551
|
+
ref: function ref(c) {
|
552
|
+
return inputs.current[item.fieldName] = c;
|
553
|
+
},
|
554
|
+
key: "form_".concat(item.id),
|
555
|
+
item: item,
|
556
|
+
value: _getDefaultValue(item)
|
557
|
+
});
|
522
558
|
case 'PhoneNumber':
|
523
559
|
return /*#__PURE__*/_react["default"].createElement(_surveyElements.PhoneNumber, {
|
524
560
|
name: item.fieldName,
|