@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.cjs.js
CHANGED
|
@@ -16087,7 +16087,7 @@ var getNumberFromUrl = function getNumberFromUrl(_ref6) {
|
|
|
16087
16087
|
var parsedValue = kind === QUESTION_KIND.INTEGER.value ? parseInt(fieldCodeValue) : parseFloat(fieldCodeValue);
|
|
16088
16088
|
return parsedValue || "";
|
|
16089
16089
|
};
|
|
16090
|
-
var getLabel
|
|
16090
|
+
var getLabel = function getLabel(label, isRequired) {
|
|
16091
16091
|
return isRequired ? "".concat(label, "*") : label;
|
|
16092
16092
|
};
|
|
16093
16093
|
var generateInitValues = function generateInitValues(_ref7) {
|
|
@@ -16353,7 +16353,7 @@ var DateField = function DateField(_ref) {
|
|
|
16353
16353
|
className: "neeto-form-engine-input__label-wrapper"
|
|
16354
16354
|
}, label && /*#__PURE__*/React__default["default"].createElement("label", {
|
|
16355
16355
|
className: "neeto-form-engine-label"
|
|
16356
|
-
}, getLabel
|
|
16356
|
+
}, getLabel(label, isRequired))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
16357
16357
|
className: "neeto-form-engine-date-picker"
|
|
16358
16358
|
}, /*#__PURE__*/React__default["default"].createElement(formik.Field, {
|
|
16359
16359
|
name: name || nodeId,
|
|
@@ -26526,7 +26526,7 @@ var OptionsField = function OptionsField(_ref) {
|
|
|
26526
26526
|
isRequired: isRequired,
|
|
26527
26527
|
name: name,
|
|
26528
26528
|
error: getError(meta),
|
|
26529
|
-
label: getLabel
|
|
26529
|
+
label: getLabel(label, isRequired),
|
|
26530
26530
|
options: transformedOptions,
|
|
26531
26531
|
type: kind,
|
|
26532
26532
|
value: isDropdown ? neetoCist.findBy({
|
|
@@ -26649,7 +26649,7 @@ var RatingField = function RatingField(_ref) {
|
|
|
26649
26649
|
field = _ref2.field;
|
|
26650
26650
|
return /*#__PURE__*/React__default["default"].createElement(Rating$1, _extends$8({}, field, {
|
|
26651
26651
|
error: meta.touched ? meta.error : "",
|
|
26652
|
-
label: getLabel
|
|
26652
|
+
label: getLabel(label, isRequired),
|
|
26653
26653
|
averageRatingLabel: fieldWithFallback(question, "averageRatingLabel") || RATING_VALUES.AVERAGE.label,
|
|
26654
26654
|
highestRatingLabel: fieldWithFallback(question, "highestRatingLabel") || RATING_VALUES.GOOD.label,
|
|
26655
26655
|
lowestRatingLabel: fieldWithFallback(question, "lowestRatingLabel") || RATING_VALUES.BAD.label
|
|
@@ -26677,7 +26677,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
26677
26677
|
className: "neeto-form-engine-input__label-wrapper"
|
|
26678
26678
|
}, label && /*#__PURE__*/React__default["default"].createElement("label", {
|
|
26679
26679
|
className: "neeto-form-engine-label"
|
|
26680
|
-
}, getLabel
|
|
26680
|
+
}, getLabel(label, isRequired))), /*#__PURE__*/React__default["default"].createElement(formik.FastField, _extends$8({
|
|
26681
26681
|
debouncedPlaceholder: debouncedPlaceholder,
|
|
26682
26682
|
error: errors[name],
|
|
26683
26683
|
name: name || nodeId,
|
|
@@ -26802,7 +26802,7 @@ var StarRatingField = function StarRatingField(_ref) {
|
|
|
26802
26802
|
shape: shape,
|
|
26803
26803
|
count: sanitizedCount,
|
|
26804
26804
|
error: meta.touched ? meta.error : "",
|
|
26805
|
-
label: getLabel
|
|
26805
|
+
label: getLabel(label, isRequired)
|
|
26806
26806
|
}, field));
|
|
26807
26807
|
});
|
|
26808
26808
|
};
|
|
@@ -29909,17 +29909,9 @@ var FileUpload = function FileUpload(_ref) {
|
|
|
29909
29909
|
}));
|
|
29910
29910
|
};
|
|
29911
29911
|
|
|
29912
|
-
var
|
|
29913
|
-
var
|
|
29912
|
+
var getValue = function getValue(_ref) {
|
|
29913
|
+
var value = _ref.value,
|
|
29914
29914
|
kind = _ref.kind;
|
|
29915
|
-
if (kind === QUESTION_KIND.ADDITIONAL_GUESTS.value) {
|
|
29916
|
-
return i18next.t("neetoForm.labels.additionalGuests");
|
|
29917
|
-
}
|
|
29918
|
-
return label;
|
|
29919
|
-
};
|
|
29920
|
-
var getValue = function getValue(_ref2) {
|
|
29921
|
-
var value = _ref2.value,
|
|
29922
|
-
kind = _ref2.kind;
|
|
29923
29915
|
if (ramda.isEmpty(value)) return /*#__PURE__*/React__default["default"].createElement("i", null, i18next.t("neetoForm.common.unanswered"));
|
|
29924
29916
|
if (kind === QUESTION_KIND.DATE.value) {
|
|
29925
29917
|
return value && utils.dateFormat.date(value);
|
|
@@ -29938,17 +29930,17 @@ var getEditorContent = function getEditorContent(value) {
|
|
|
29938
29930
|
}
|
|
29939
29931
|
return value;
|
|
29940
29932
|
};
|
|
29941
|
-
var Submission = function Submission(
|
|
29942
|
-
var
|
|
29943
|
-
formId =
|
|
29944
|
-
|
|
29945
|
-
submissionId =
|
|
29946
|
-
|
|
29947
|
-
className =
|
|
29948
|
-
|
|
29949
|
-
questionLabelProps =
|
|
29950
|
-
|
|
29951
|
-
answerProps =
|
|
29933
|
+
var Submission = function Submission(_ref2) {
|
|
29934
|
+
var _ref2$formId = _ref2.formId,
|
|
29935
|
+
formId = _ref2$formId === void 0 ? "" : _ref2$formId,
|
|
29936
|
+
_ref2$submissionId = _ref2.submissionId,
|
|
29937
|
+
submissionId = _ref2$submissionId === void 0 ? "" : _ref2$submissionId,
|
|
29938
|
+
_ref2$className = _ref2.className,
|
|
29939
|
+
className = _ref2$className === void 0 ? "" : _ref2$className,
|
|
29940
|
+
_ref2$questionLabelPr = _ref2.questionLabelProps,
|
|
29941
|
+
questionLabelProps = _ref2$questionLabelPr === void 0 ? {} : _ref2$questionLabelPr,
|
|
29942
|
+
_ref2$answerProps = _ref2.answerProps,
|
|
29943
|
+
answerProps = _ref2$answerProps === void 0 ? {} : _ref2$answerProps;
|
|
29952
29944
|
var _useSubmission = useSubmission({
|
|
29953
29945
|
formId: formId,
|
|
29954
29946
|
submissionId: submissionId,
|
|
@@ -29996,20 +29988,17 @@ var Submission = function Submission(_ref3) {
|
|
|
29996
29988
|
}
|
|
29997
29989
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
29998
29990
|
className: classnames__default["default"]("mx-auto flex h-full w-full flex-col items-start", _defineProperty$6({}, className, className))
|
|
29999
|
-
}, responses.map(function (
|
|
30000
|
-
var kind =
|
|
30001
|
-
label =
|
|
30002
|
-
value =
|
|
29991
|
+
}, responses.map(function (_ref3) {
|
|
29992
|
+
var kind = _ref3.kind,
|
|
29993
|
+
label = _ref3.label,
|
|
29994
|
+
value = _ref3.value;
|
|
30003
29995
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
30004
29996
|
className: "mb-4",
|
|
30005
29997
|
key: label
|
|
30006
29998
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, _extends$8({
|
|
30007
29999
|
style: "h5",
|
|
30008
30000
|
weight: "light"
|
|
30009
|
-
}, questionLabelProps),
|
|
30010
|
-
label: label,
|
|
30011
|
-
kind: kind
|
|
30012
|
-
})), renderSubmittedValue(kind, value));
|
|
30001
|
+
}, questionLabelProps), label), renderSubmittedValue(kind, value));
|
|
30013
30002
|
}));
|
|
30014
30003
|
};
|
|
30015
30004
|
|