@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tellescope/react-components",
3
- "version": "1.185.1",
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.1",
51
- "@tellescope/sdk": "^1.185.1",
52
- "@tellescope/types-client": "^1.185.1",
53
- "@tellescope/types-models": "^1.185.1",
54
- "@tellescope/types-utilities": "^1.185.1",
55
- "@tellescope/utilities": "^1.185.1",
56
- "@tellescope/validation": "^1.185.1",
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": "76ab045b222f3d87a67ed3d71ceb56044545a6d3",
87
+ "gitHead": "f295e385c155897b5252d36d6c1cede51c8ae30f",
88
88
  "publishConfig": {
89
89
  "access": "public"
90
90
  }
@@ -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")}
@@ -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
- const goToNextField = useCallback((answer?: FormResponseValue['answer']) => {
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