@tellescope/react-components 1.197.0 → 1.199.0
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 +2 -1
- package/lib/cjs/Forms/hooks.d.ts.map +1 -1
- package/lib/cjs/Forms/hooks.js +4 -2
- package/lib/cjs/Forms/hooks.js.map +1 -1
- package/lib/esm/CMS/components.d.ts +0 -1
- package/lib/esm/CMS/components.d.ts.map +1 -1
- package/lib/esm/Forms/forms.d.ts +3 -3
- package/lib/esm/Forms/hooks.d.ts +2 -1
- package/lib/esm/Forms/hooks.d.ts.map +1 -1
- package/lib/esm/Forms/hooks.js +4 -2
- package/lib/esm/Forms/hooks.js.map +1 -1
- package/lib/esm/Forms/inputs.d.ts +1 -1
- package/lib/esm/Forms/inputs.native.d.ts +0 -1
- package/lib/esm/Forms/inputs.native.d.ts.map +1 -1
- package/lib/esm/controls.d.ts +2 -2
- package/lib/esm/inputs.d.ts +1 -1
- package/lib/esm/layout.d.ts +1 -1
- package/lib/esm/state.d.ts +288 -288
- package/lib/esm/theme.native.d.ts +0 -1
- package/lib/esm/theme.native.d.ts.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/src/Forms/hooks.tsx +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tellescope/react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.199.0",
|
|
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.
|
|
51
|
-
"@tellescope/sdk": "^1.
|
|
52
|
-
"@tellescope/types-client": "^1.
|
|
53
|
-
"@tellescope/types-models": "^1.
|
|
54
|
-
"@tellescope/types-utilities": "^1.
|
|
55
|
-
"@tellescope/utilities": "^1.
|
|
56
|
-
"@tellescope/validation": "^1.
|
|
50
|
+
"@tellescope/constants": "^1.199.0",
|
|
51
|
+
"@tellescope/sdk": "^1.199.0",
|
|
52
|
+
"@tellescope/types-client": "^1.199.0",
|
|
53
|
+
"@tellescope/types-models": "^1.199.0",
|
|
54
|
+
"@tellescope/types-utilities": "^1.199.0",
|
|
55
|
+
"@tellescope/utilities": "^1.199.0",
|
|
56
|
+
"@tellescope/validation": "^1.199.0",
|
|
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": "bed255f47e68dacc8642e2ff253df5646514f0ff",
|
|
88
88
|
"publishConfig": {
|
|
89
89
|
"access": "public"
|
|
90
90
|
}
|
package/src/Forms/hooks.tsx
CHANGED
|
@@ -363,6 +363,7 @@ interface UseTellescopeFormOptions {
|
|
|
363
363
|
urlLogicValue?: string,
|
|
364
364
|
enduser?: Partial<Enduser>,
|
|
365
365
|
isPublicForm?: boolean,
|
|
366
|
+
dontAutoadvance?: boolean,
|
|
366
367
|
}
|
|
367
368
|
|
|
368
369
|
const OrganizationThemeContext = createContext(null as any as {
|
|
@@ -511,7 +512,7 @@ const shouldCallout = (field: FormField | undefined, value: FormResponseValueAns
|
|
|
511
512
|
|
|
512
513
|
export type Response = FormResponseValue & { touched: boolean, includeInSubmit: boolean, field: FormField }
|
|
513
514
|
export type FileResponse = { fieldId: string, fieldTitle: string, blobs?: FileBlob[] }
|
|
514
|
-
export const useTellescopeForm = ({ isPublicForm, form, urlLogicValue, customization, carePlanId, calendarEventId, context, ga4measurementId, rootResponseId, parentResponseId, accessCode, existingResponses, automationStepId, enduserId, formResponseId, fields, isInternalNote, formTitle, submitRedirectURL,enduser }: UseTellescopeFormOptions) => {
|
|
515
|
+
export const useTellescopeForm = ({ dontAutoadvance, isPublicForm, form, urlLogicValue, customization, carePlanId, calendarEventId, context, ga4measurementId, rootResponseId, parentResponseId, accessCode, existingResponses, automationStepId, enduserId, formResponseId, fields, isInternalNote, formTitle, submitRedirectURL,enduser }: UseTellescopeFormOptions) => {
|
|
515
516
|
const { amPm, hoursAmPm, minutes } = get_time_values(new Date())
|
|
516
517
|
|
|
517
518
|
const root = useTreeForFormFields(fields)
|
|
@@ -1348,6 +1349,7 @@ export const useTellescopeForm = ({ isPublicForm, form, urlLogicValue, customiza
|
|
|
1348
1349
|
}, [prevFieldStackRef, currentValue, isNextDisabled, updateFormResponse, session, responses, logicOptions])
|
|
1349
1350
|
|
|
1350
1351
|
useEffect(() => {
|
|
1352
|
+
if (dontAutoadvance) return
|
|
1351
1353
|
if (!autoAdvanceRef.current) return
|
|
1352
1354
|
autoAdvanceRef.current = false
|
|
1353
1355
|
|
|
@@ -1355,7 +1357,7 @@ export const useTellescopeForm = ({ isPublicForm, form, urlLogicValue, customiza
|
|
|
1355
1357
|
const t = setTimeout(goToNextField, 250)
|
|
1356
1358
|
|
|
1357
1359
|
return () => { clearTimeout(t) }
|
|
1358
|
-
}, [responses, goToNextField])
|
|
1360
|
+
}, [responses, goToNextField, dontAutoadvance])
|
|
1359
1361
|
|
|
1360
1362
|
const isPreviousDisabled = useCallback(() => (
|
|
1361
1363
|
prevFieldStackRef.current.length === 0
|