@tellescope/react-components 1.185.1 → 1.185.2
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/forms.js +2 -2
- package/lib/cjs/Forms/forms.js.map +1 -1
- package/lib/cjs/Forms/hooks.d.ts +1 -1
- package/lib/cjs/Forms/hooks.d.ts.map +1 -1
- package/lib/cjs/Forms/hooks.js +1 -0
- package/lib/cjs/Forms/hooks.js.map +1 -1
- package/lib/esm/Forms/form_responses.d.ts +1 -0
- package/lib/esm/Forms/form_responses.d.ts.map +1 -1
- package/lib/esm/Forms/forms.d.ts +3 -3
- package/lib/esm/Forms/forms.js +2 -2
- package/lib/esm/Forms/forms.js.map +1 -1
- package/lib/esm/Forms/hooks.d.ts +1 -2
- package/lib/esm/Forms/hooks.d.ts.map +1 -1
- package/lib/esm/Forms/hooks.js +1 -0
- package/lib/esm/Forms/hooks.js.map +1 -1
- package/lib/esm/controls.d.ts +2 -2
- package/lib/esm/inputs.native.d.ts +1 -0
- package/lib/esm/inputs.native.d.ts.map +1 -1
- package/lib/esm/layout.d.ts +1 -1
- package/lib/esm/state.d.ts +72 -72
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/src/Forms/forms.tsx +2 -2
- package/src/Forms/hooks.tsx +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tellescope/react-components",
|
|
3
|
-
"version": "1.185.
|
|
3
|
+
"version": "1.185.2",
|
|
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.6.2",
|
|
48
48
|
"@stripe/react-stripe-js": "^2.9.0",
|
|
49
49
|
"@stripe/stripe-js": "^1.52.1",
|
|
50
|
-
"@tellescope/constants": "^1.185.
|
|
51
|
-
"@tellescope/sdk": "^1.185.
|
|
52
|
-
"@tellescope/types-client": "^1.185.
|
|
53
|
-
"@tellescope/types-models": "^1.185.
|
|
54
|
-
"@tellescope/types-utilities": "^1.185.
|
|
55
|
-
"@tellescope/utilities": "^1.185.
|
|
56
|
-
"@tellescope/validation": "^1.185.
|
|
50
|
+
"@tellescope/constants": "^1.185.2",
|
|
51
|
+
"@tellescope/sdk": "^1.185.2",
|
|
52
|
+
"@tellescope/types-client": "^1.185.2",
|
|
53
|
+
"@tellescope/types-models": "^1.185.2",
|
|
54
|
+
"@tellescope/types-utilities": "^1.185.2",
|
|
55
|
+
"@tellescope/utilities": "^1.185.2",
|
|
56
|
+
"@tellescope/validation": "^1.185.2",
|
|
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",
|
|
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": "f295e385c155897b5252d36d6c1cede51c8ae30f",
|
|
88
88
|
"publishConfig": {
|
|
89
89
|
"access": "public"
|
|
90
90
|
}
|
package/src/Forms/forms.tsx
CHANGED
|
@@ -531,7 +531,7 @@ export const TellescopeSingleQuestionFlow: typeof TellescopeForm = ({
|
|
|
531
531
|
if (activeField.value.type === 'stringLong') return //
|
|
532
532
|
if (activeField.value.type === 'Question Group') return // ensure enter is allowed in stringLong at end of a question group before next
|
|
533
533
|
if (isNextDisabled()) return
|
|
534
|
-
goToNextField()
|
|
534
|
+
goToNextField(undefined)
|
|
535
535
|
}
|
|
536
536
|
}, [activeField, isNextDisabled, goToNextField, isPreviousDisabled, goToPreviousField])
|
|
537
537
|
|
|
@@ -617,7 +617,7 @@ export const TellescopeSingleQuestionFlow: typeof TellescopeForm = ({
|
|
|
617
617
|
/>
|
|
618
618
|
)
|
|
619
619
|
: (
|
|
620
|
-
<Button variant="contained" disabled={isNextDisabled()} onClick={goToNextField}
|
|
620
|
+
<Button variant="contained" disabled={isNextDisabled()} onClick={() => goToNextField(undefined)}
|
|
621
621
|
style={{ ...defaultButtonStyles, width: 100 }}
|
|
622
622
|
>
|
|
623
623
|
{form_display_text_for_language(form, "Next")}
|
package/src/Forms/hooks.tsx
CHANGED
|
@@ -1301,7 +1301,8 @@ export const useTellescopeForm = ({ isPublicForm, form, urlLogicValue, customiza
|
|
|
1301
1301
|
}, [activeField, validateField, uploadingFiles])
|
|
1302
1302
|
|
|
1303
1303
|
const autoAdvanceRef = useRef(false)
|
|
1304
|
-
|
|
1304
|
+
// don't make option, to avoid user passing invalid data, like an onclick event
|
|
1305
|
+
const goToNextField = useCallback((answer: FormResponseValue['answer'] | undefined) => {
|
|
1305
1306
|
if (!currentValue) return
|
|
1306
1307
|
if (isNextDisabled() && currentValue?.answer.type !== 'Hidden Value') return
|
|
1307
1308
|
|