diy-template-components 0.1.24 → 0.1.27
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/build/index.es.js +27 -7
- package/build/index.es.js.map +1 -1
- package/build/index.js +27 -7
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -7029,7 +7029,8 @@ const useCoursePromotionPage = createUseStyles(theme => {
|
|
|
7029
7029
|
priceContainer: {
|
|
7030
7030
|
display: 'flex',
|
|
7031
7031
|
flexDirection: 'column',
|
|
7032
|
-
width: 'fit-content'
|
|
7032
|
+
width: 'fit-content',
|
|
7033
|
+
minHeight: '62px'
|
|
7033
7034
|
},
|
|
7034
7035
|
originalPrice: {
|
|
7035
7036
|
textDecoration: 'line-through',
|
|
@@ -7455,6 +7456,9 @@ const useFormPageStyles = createUseStyles(theme => ({
|
|
|
7455
7456
|
fontSize: '20px',
|
|
7456
7457
|
margin: '10px 0'
|
|
7457
7458
|
},
|
|
7459
|
+
inputFieldRequired: {
|
|
7460
|
+
color: '#F41828'
|
|
7461
|
+
},
|
|
7458
7462
|
checkboxFieldControl: {
|
|
7459
7463
|
padding: '6px 0',
|
|
7460
7464
|
'& label': {
|
|
@@ -7498,9 +7502,13 @@ const formPageMock = {
|
|
|
7498
7502
|
questions: [{
|
|
7499
7503
|
_id: '22',
|
|
7500
7504
|
text: 'Question 0',
|
|
7501
|
-
type: '
|
|
7505
|
+
type: 'MC',
|
|
7502
7506
|
options: [{
|
|
7503
|
-
value: ''
|
|
7507
|
+
value: 'pp'
|
|
7508
|
+
}, {
|
|
7509
|
+
value: 'paasdp'
|
|
7510
|
+
}, {
|
|
7511
|
+
value: 'pasdasdp'
|
|
7504
7512
|
}],
|
|
7505
7513
|
isRequired: false,
|
|
7506
7514
|
order: 1
|
|
@@ -7511,7 +7519,7 @@ const formPageMock = {
|
|
|
7511
7519
|
options: [{
|
|
7512
7520
|
value: ''
|
|
7513
7521
|
}],
|
|
7514
|
-
isRequired:
|
|
7522
|
+
isRequired: true,
|
|
7515
7523
|
order: 1
|
|
7516
7524
|
}, {
|
|
7517
7525
|
_id: '24',
|
|
@@ -7543,6 +7551,12 @@ const FormPage = ({
|
|
|
7543
7551
|
let formResponse = [];
|
|
7544
7552
|
|
|
7545
7553
|
for (const [key, value] of Object.entries(formData)) {
|
|
7554
|
+
if (value.questionType === 'MC') {
|
|
7555
|
+
if (value.solutionArray.length > 1) {
|
|
7556
|
+
value.solutionArray.shift();
|
|
7557
|
+
}
|
|
7558
|
+
}
|
|
7559
|
+
|
|
7546
7560
|
formResponse.push({
|
|
7547
7561
|
questionId: key,
|
|
7548
7562
|
questionName: value.questionName,
|
|
@@ -7637,7 +7651,9 @@ const FormPage = ({
|
|
|
7637
7651
|
className: classes.inputField
|
|
7638
7652
|
}, /*#__PURE__*/React.createElement("label", {
|
|
7639
7653
|
className: classes.inputFieldLabel
|
|
7640
|
-
}, item.text
|
|
7654
|
+
}, item.text, ' ', item.isRequired && /*#__PURE__*/React.createElement("span", {
|
|
7655
|
+
className: classes.inputFieldRequired
|
|
7656
|
+
}, "*")), /*#__PURE__*/React.createElement("input", {
|
|
7641
7657
|
className: classes.inputFieldControl,
|
|
7642
7658
|
required: item.isRequired,
|
|
7643
7659
|
type: "text",
|
|
@@ -7658,7 +7674,9 @@ const FormPage = ({
|
|
|
7658
7674
|
className: classes.checkboxField
|
|
7659
7675
|
}, /*#__PURE__*/React.createElement("div", {
|
|
7660
7676
|
className: classes.checkBoxFieldLabel
|
|
7661
|
-
}, item.text
|
|
7677
|
+
}, item.text, ' ', item.isRequired && /*#__PURE__*/React.createElement("span", {
|
|
7678
|
+
className: classes.inputFieldRequired
|
|
7679
|
+
}, "*")), item.options.map((option, index) => /*#__PURE__*/React.createElement("div", {
|
|
7662
7680
|
className: classes.checkboxFieldControl
|
|
7663
7681
|
}, /*#__PURE__*/React.createElement("input", {
|
|
7664
7682
|
value: option.value,
|
|
@@ -7673,7 +7691,9 @@ const FormPage = ({
|
|
|
7673
7691
|
className: classes.checkboxField
|
|
7674
7692
|
}, /*#__PURE__*/React.createElement("div", {
|
|
7675
7693
|
className: classes.checkBoxFieldLabel
|
|
7676
|
-
}, item.text
|
|
7694
|
+
}, item.text, ' ', item.isRequired && /*#__PURE__*/React.createElement("span", {
|
|
7695
|
+
className: classes.inputFieldRequired
|
|
7696
|
+
}, "*")), item.options.map((option, index) => /*#__PURE__*/React.createElement("div", {
|
|
7677
7697
|
className: classes.checkboxFieldControl
|
|
7678
7698
|
}, /*#__PURE__*/React.createElement("input", {
|
|
7679
7699
|
// value={option.value}
|