@clxmedia/clxforms-client 1.0.27 → 1.0.28

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.
@@ -52,8 +52,8 @@ const CLXFormLayoutProcessor = ({ mode, responseData, formRights }) => {
52
52
  return Object.assign(Object.assign({}, section), { is_complete: true, has_ai: false, question_layouts: [] });
53
53
  }
54
54
  const is_section_complete = isSectionComplete(section, sectionResponses);
55
- const has_ai = section.question_layouts.some(ql => { var _a; return ql.is_enabled && ((_a = sectionResponses[ql.form_question_slug]) === null || _a === void 0 ? void 0 : _a.last_answered_by) === AI_RESPONSE_EMAIL; });
56
- return Object.assign(Object.assign({}, section), { is_complete: is_section_complete, has_ai, question_layouts: section.question_layouts.map(questionLayout => questionLayoutProcessor(questionLayout, sectionResponses)) });
55
+ const question_layouts = section.question_layouts.map(questionLayout => questionLayoutProcessor(questionLayout, sectionResponses));
56
+ return Object.assign(Object.assign({}, section), { is_complete: is_section_complete, has_ai: question_layouts.some(ql => { var _a; return ql.is_enabled && ((_a = sectionResponses[ql.form_question_slug]) === null || _a === void 0 ? void 0 : _a.last_answered_by) === AI_RESPONSE_EMAIL; }), question_layouts });
57
57
  };
58
58
  const stepProcessor = (step) => {
59
59
  if (step.conditions && !(0, rules_processor_1.CLXRulesetProcessor)({ responseData: responseCopy }).processRuleSet(step.conditions)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clxmedia/clxforms-client",
3
- "version": "1.0.27",
3
+ "version": "1.0.28",
4
4
  "description": "CLXperience Forms Client",
5
5
  "author": "Brandon Thompson <brandont@clxmedia.com>",
6
6
  "license": "MIT",