@bigbinary/neeto-form-frontend 1.2.45 → 1.2.46
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/app/javascript/src/translations/en.json +0 -3
- package/dist/index.cjs.js +24 -35
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +24 -35
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16049,7 +16049,7 @@ var getNumberFromUrl = function getNumberFromUrl(_ref6) {
|
|
|
16049
16049
|
var parsedValue = kind === QUESTION_KIND.INTEGER.value ? parseInt(fieldCodeValue) : parseFloat(fieldCodeValue);
|
|
16050
16050
|
return parsedValue || "";
|
|
16051
16051
|
};
|
|
16052
|
-
var getLabel
|
|
16052
|
+
var getLabel = function getLabel(label, isRequired) {
|
|
16053
16053
|
return isRequired ? "".concat(label, "*") : label;
|
|
16054
16054
|
};
|
|
16055
16055
|
var generateInitValues = function generateInitValues(_ref7) {
|
|
@@ -16315,7 +16315,7 @@ var DateField = function DateField(_ref) {
|
|
|
16315
16315
|
className: "neeto-form-engine-input__label-wrapper"
|
|
16316
16316
|
}, label && /*#__PURE__*/React__default.createElement("label", {
|
|
16317
16317
|
className: "neeto-form-engine-label"
|
|
16318
|
-
}, getLabel
|
|
16318
|
+
}, getLabel(label, isRequired))), /*#__PURE__*/React__default.createElement("div", {
|
|
16319
16319
|
className: "neeto-form-engine-date-picker"
|
|
16320
16320
|
}, /*#__PURE__*/React__default.createElement(Field, {
|
|
16321
16321
|
name: name || nodeId,
|
|
@@ -26488,7 +26488,7 @@ var OptionsField = function OptionsField(_ref) {
|
|
|
26488
26488
|
isRequired: isRequired,
|
|
26489
26489
|
name: name,
|
|
26490
26490
|
error: getError(meta),
|
|
26491
|
-
label: getLabel
|
|
26491
|
+
label: getLabel(label, isRequired),
|
|
26492
26492
|
options: transformedOptions,
|
|
26493
26493
|
type: kind,
|
|
26494
26494
|
value: isDropdown ? findBy({
|
|
@@ -26611,7 +26611,7 @@ var RatingField = function RatingField(_ref) {
|
|
|
26611
26611
|
field = _ref2.field;
|
|
26612
26612
|
return /*#__PURE__*/React__default.createElement(Rating$1, _extends$8({}, field, {
|
|
26613
26613
|
error: meta.touched ? meta.error : "",
|
|
26614
|
-
label: getLabel
|
|
26614
|
+
label: getLabel(label, isRequired),
|
|
26615
26615
|
averageRatingLabel: fieldWithFallback(question, "averageRatingLabel") || RATING_VALUES.AVERAGE.label,
|
|
26616
26616
|
highestRatingLabel: fieldWithFallback(question, "highestRatingLabel") || RATING_VALUES.GOOD.label,
|
|
26617
26617
|
lowestRatingLabel: fieldWithFallback(question, "lowestRatingLabel") || RATING_VALUES.BAD.label
|
|
@@ -26639,7 +26639,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
26639
26639
|
className: "neeto-form-engine-input__label-wrapper"
|
|
26640
26640
|
}, label && /*#__PURE__*/React__default.createElement("label", {
|
|
26641
26641
|
className: "neeto-form-engine-label"
|
|
26642
|
-
}, getLabel
|
|
26642
|
+
}, getLabel(label, isRequired))), /*#__PURE__*/React__default.createElement(FastField, _extends$8({
|
|
26643
26643
|
debouncedPlaceholder: debouncedPlaceholder,
|
|
26644
26644
|
error: errors[name],
|
|
26645
26645
|
name: name || nodeId,
|
|
@@ -26764,7 +26764,7 @@ var StarRatingField = function StarRatingField(_ref) {
|
|
|
26764
26764
|
shape: shape,
|
|
26765
26765
|
count: sanitizedCount,
|
|
26766
26766
|
error: meta.touched ? meta.error : "",
|
|
26767
|
-
label: getLabel
|
|
26767
|
+
label: getLabel(label, isRequired)
|
|
26768
26768
|
}, field));
|
|
26769
26769
|
});
|
|
26770
26770
|
};
|
|
@@ -29871,17 +29871,9 @@ var FileUpload = function FileUpload(_ref) {
|
|
|
29871
29871
|
}));
|
|
29872
29872
|
};
|
|
29873
29873
|
|
|
29874
|
-
var
|
|
29875
|
-
var
|
|
29874
|
+
var getValue = function getValue(_ref) {
|
|
29875
|
+
var value = _ref.value,
|
|
29876
29876
|
kind = _ref.kind;
|
|
29877
|
-
if (kind === QUESTION_KIND.ADDITIONAL_GUESTS.value) {
|
|
29878
|
-
return t$4("neetoForm.labels.additionalGuests");
|
|
29879
|
-
}
|
|
29880
|
-
return label;
|
|
29881
|
-
};
|
|
29882
|
-
var getValue = function getValue(_ref2) {
|
|
29883
|
-
var value = _ref2.value,
|
|
29884
|
-
kind = _ref2.kind;
|
|
29885
29877
|
if (isEmpty(value)) return /*#__PURE__*/React__default.createElement("i", null, t$4("neetoForm.common.unanswered"));
|
|
29886
29878
|
if (kind === QUESTION_KIND.DATE.value) {
|
|
29887
29879
|
return value && dateFormat.date(value);
|
|
@@ -29900,17 +29892,17 @@ var getEditorContent = function getEditorContent(value) {
|
|
|
29900
29892
|
}
|
|
29901
29893
|
return value;
|
|
29902
29894
|
};
|
|
29903
|
-
var Submission = function Submission(
|
|
29904
|
-
var
|
|
29905
|
-
formId =
|
|
29906
|
-
|
|
29907
|
-
submissionId =
|
|
29908
|
-
|
|
29909
|
-
className =
|
|
29910
|
-
|
|
29911
|
-
questionLabelProps =
|
|
29912
|
-
|
|
29913
|
-
answerProps =
|
|
29895
|
+
var Submission = function Submission(_ref2) {
|
|
29896
|
+
var _ref2$formId = _ref2.formId,
|
|
29897
|
+
formId = _ref2$formId === void 0 ? "" : _ref2$formId,
|
|
29898
|
+
_ref2$submissionId = _ref2.submissionId,
|
|
29899
|
+
submissionId = _ref2$submissionId === void 0 ? "" : _ref2$submissionId,
|
|
29900
|
+
_ref2$className = _ref2.className,
|
|
29901
|
+
className = _ref2$className === void 0 ? "" : _ref2$className,
|
|
29902
|
+
_ref2$questionLabelPr = _ref2.questionLabelProps,
|
|
29903
|
+
questionLabelProps = _ref2$questionLabelPr === void 0 ? {} : _ref2$questionLabelPr,
|
|
29904
|
+
_ref2$answerProps = _ref2.answerProps,
|
|
29905
|
+
answerProps = _ref2$answerProps === void 0 ? {} : _ref2$answerProps;
|
|
29914
29906
|
var _useSubmission = useSubmission({
|
|
29915
29907
|
formId: formId,
|
|
29916
29908
|
submissionId: submissionId,
|
|
@@ -29958,20 +29950,17 @@ var Submission = function Submission(_ref3) {
|
|
|
29958
29950
|
}
|
|
29959
29951
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
29960
29952
|
className: classnames("mx-auto flex h-full w-full flex-col items-start", _defineProperty$6({}, className, className))
|
|
29961
|
-
}, responses.map(function (
|
|
29962
|
-
var kind =
|
|
29963
|
-
label =
|
|
29964
|
-
value =
|
|
29953
|
+
}, responses.map(function (_ref3) {
|
|
29954
|
+
var kind = _ref3.kind,
|
|
29955
|
+
label = _ref3.label,
|
|
29956
|
+
value = _ref3.value;
|
|
29965
29957
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
29966
29958
|
className: "mb-4",
|
|
29967
29959
|
key: label
|
|
29968
29960
|
}, /*#__PURE__*/React__default.createElement(Typography, _extends$8({
|
|
29969
29961
|
style: "h5",
|
|
29970
29962
|
weight: "light"
|
|
29971
|
-
}, questionLabelProps),
|
|
29972
|
-
label: label,
|
|
29973
|
-
kind: kind
|
|
29974
|
-
})), renderSubmittedValue(kind, value));
|
|
29963
|
+
}, questionLabelProps), label), renderSubmittedValue(kind, value));
|
|
29975
29964
|
}));
|
|
29976
29965
|
};
|
|
29977
29966
|
|