@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/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$1 = function getLabel(label, isRequired) {
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$1(label, isRequired))), /*#__PURE__*/React__default.createElement("div", {
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$1(label, isRequired),
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$1(label, isRequired),
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$1(label, isRequired))), /*#__PURE__*/React__default.createElement(FastField, _extends$8({
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$1(label, isRequired)
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 getLabel = function getLabel(_ref) {
29875
- var label = _ref.label,
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(_ref3) {
29904
- var _ref3$formId = _ref3.formId,
29905
- formId = _ref3$formId === void 0 ? "" : _ref3$formId,
29906
- _ref3$submissionId = _ref3.submissionId,
29907
- submissionId = _ref3$submissionId === void 0 ? "" : _ref3$submissionId,
29908
- _ref3$className = _ref3.className,
29909
- className = _ref3$className === void 0 ? "" : _ref3$className,
29910
- _ref3$questionLabelPr = _ref3.questionLabelProps,
29911
- questionLabelProps = _ref3$questionLabelPr === void 0 ? {} : _ref3$questionLabelPr,
29912
- _ref3$answerProps = _ref3.answerProps,
29913
- answerProps = _ref3$answerProps === void 0 ? {} : _ref3$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 (_ref4) {
29962
- var kind = _ref4.kind,
29963
- label = _ref4.label,
29964
- value = _ref4.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), getLabel({
29972
- label: label,
29973
- kind: kind
29974
- })), renderSubmittedValue(kind, value));
29963
+ }, questionLabelProps), label), renderSubmittedValue(kind, value));
29975
29964
  }));
29976
29965
  };
29977
29966