@tellescope/react-components 1.242.4 → 1.242.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tellescope/react-components",
3
- "version": "1.242.4",
3
+ "version": "1.242.6",
4
4
  "description": "",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",
@@ -47,13 +47,13 @@
47
47
  "@reduxjs/toolkit": "1.9.0",
48
48
  "@stripe/react-stripe-js": "2.9.0",
49
49
  "@stripe/stripe-js": "1.52.1",
50
- "@tellescope/constants": "1.242.4",
51
- "@tellescope/sdk": "1.242.4",
52
- "@tellescope/types-client": "1.242.4",
53
- "@tellescope/types-models": "1.242.4",
54
- "@tellescope/types-utilities": "1.242.4",
55
- "@tellescope/utilities": "1.242.4",
56
- "@tellescope/validation": "1.242.4",
50
+ "@tellescope/constants": "1.242.6",
51
+ "@tellescope/sdk": "1.242.6",
52
+ "@tellescope/types-client": "1.242.6",
53
+ "@tellescope/types-models": "1.242.6",
54
+ "@tellescope/types-utilities": "1.242.6",
55
+ "@tellescope/utilities": "1.242.6",
56
+ "@tellescope/validation": "1.242.6",
57
57
  "@typescript-eslint/eslint-plugin": "4.33.0",
58
58
  "@typescript-eslint/parser": "4.33.0",
59
59
  "css-to-react-native": "3.0.0",
@@ -84,7 +84,7 @@
84
84
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
85
85
  "react-native": "^0.65.0 || ^0.66.0 || ^0.67.0 || ^0.68.0 || ^0.71.0"
86
86
  },
87
- "gitHead": "2cc056d6fbed2bbbcad71c151a6643f4b2cae3a0",
87
+ "gitHead": "738c7a7e146166f3f07b16c50e9fc63877280163",
88
88
  "publishConfig": {
89
89
  "access": "public"
90
90
  }
@@ -773,9 +773,21 @@ export const useTellescopeForm = ({ dontAutoadvance, isPublicForm, form, urlLogi
773
773
  return activeField
774
774
  }, [activeField, templatedResponses])
775
775
 
776
+ const activeResponses = templatedResponses.filter(r => r.includeInSubmit)
777
+
778
+ // Include Question Group sub-field responses for scoring
779
+ for (const r of activeResponses) {
780
+ if (r?.answer?.type !== 'Question Group') continue
781
+ for (const f of (r.answer.value ?? []) as { id: string }[]) {
782
+ const match = templatedResponses.find(tr => tr.fieldId === f?.id)
783
+ if (!match || activeResponses.find(ar => ar.fieldId === match.fieldId)) continue
784
+ activeResponses.push(match)
785
+ }
786
+ }
787
+
776
788
  const logicOptions: NextFieldLogicOptions = {
777
789
  urlLogicValue,
778
- activeResponses: templatedResponses.filter(r => r.includeInSubmit),
790
+ activeResponses,
779
791
  dateOfBirth: enduser?.dateOfBirth,
780
792
  gender: enduser?.gender,
781
793
  state: enduser?.state,