@tellescope/react-components 1.242.5 → 1.242.7
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/lib/cjs/Forms/hooks.d.ts.map +1 -1
- package/lib/cjs/Forms/hooks.js +43 -26
- package/lib/cjs/Forms/hooks.js.map +1 -1
- package/lib/esm/Forms/hooks.d.ts.map +1 -1
- package/lib/esm/Forms/hooks.js +43 -26
- package/lib/esm/Forms/hooks.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/src/Forms/hooks.tsx +13 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tellescope/react-components",
|
|
3
|
-
"version": "1.242.
|
|
3
|
+
"version": "1.242.7",
|
|
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.
|
|
51
|
-
"@tellescope/sdk": "1.242.
|
|
52
|
-
"@tellescope/types-client": "1.242.
|
|
53
|
-
"@tellescope/types-models": "1.242.
|
|
54
|
-
"@tellescope/types-utilities": "1.242.
|
|
55
|
-
"@tellescope/utilities": "1.242.
|
|
56
|
-
"@tellescope/validation": "1.242.
|
|
50
|
+
"@tellescope/constants": "1.242.7",
|
|
51
|
+
"@tellescope/sdk": "1.242.7",
|
|
52
|
+
"@tellescope/types-client": "1.242.7",
|
|
53
|
+
"@tellescope/types-models": "1.242.7",
|
|
54
|
+
"@tellescope/types-utilities": "1.242.7",
|
|
55
|
+
"@tellescope/utilities": "1.242.7",
|
|
56
|
+
"@tellescope/validation": "1.242.7",
|
|
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": "
|
|
87
|
+
"gitHead": "59f8a434d6e3132e05be51c1d956b81865338ff8",
|
|
88
88
|
"publishConfig": {
|
|
89
89
|
"access": "public"
|
|
90
90
|
}
|
package/src/Forms/hooks.tsx
CHANGED
|
@@ -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
|
|
790
|
+
activeResponses,
|
|
779
791
|
dateOfBirth: enduser?.dateOfBirth,
|
|
780
792
|
gender: enduser?.gender,
|
|
781
793
|
state: enduser?.state,
|