@tellescope/react-components 1.204.2 → 1.205.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.map +1 -1
- package/lib/cjs/Forms/hooks.js +10 -2
- package/lib/cjs/Forms/hooks.js.map +1 -1
- package/lib/cjs/Forms/inputs.d.ts.map +1 -1
- package/lib/cjs/Forms/inputs.js +2 -1
- package/lib/cjs/Forms/inputs.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/form_responses.d.ts +0 -1
- package/lib/esm/Forms/form_responses.d.ts.map +1 -1
- package/lib/esm/Forms/forms.d.ts +3 -3
- package/lib/esm/Forms/hooks.d.ts +0 -1
- package/lib/esm/Forms/hooks.d.ts.map +1 -1
- package/lib/esm/Forms/hooks.js +10 -2
- package/lib/esm/Forms/hooks.js.map +1 -1
- package/lib/esm/Forms/inputs.d.ts +1 -1
- package/lib/esm/Forms/inputs.d.ts.map +1 -1
- package/lib/esm/Forms/inputs.js +3 -2
- package/lib/esm/Forms/inputs.js.map +1 -1
- package/lib/esm/controls.d.ts +2 -2
- package/lib/esm/inputs.d.ts +1 -1
- package/lib/esm/inputs.native.d.ts +0 -1
- package/lib/esm/inputs.native.d.ts.map +1 -1
- package/lib/esm/state.d.ts +52 -52
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/src/Forms/hooks.tsx +9 -2
- package/src/Forms/inputs.tsx +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tellescope/react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.205.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.205.0",
|
|
51
|
+
"@tellescope/sdk": "^1.205.0",
|
|
52
|
+
"@tellescope/types-client": "^1.205.0",
|
|
53
|
+
"@tellescope/types-models": "^1.205.0",
|
|
54
|
+
"@tellescope/types-utilities": "^1.205.0",
|
|
55
|
+
"@tellescope/utilities": "^1.205.0",
|
|
56
|
+
"@tellescope/validation": "^1.205.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": "2207d17c9959fcef3194f08245f8890817739b4e",
|
|
88
88
|
"publishConfig": {
|
|
89
89
|
"access": "public"
|
|
90
90
|
}
|
package/src/Forms/hooks.tsx
CHANGED
|
@@ -596,7 +596,14 @@ export const useTellescopeForm = ({ dontAutoadvance, isPublicForm, form, urlLogi
|
|
|
596
596
|
if (gtmEventRef.current[activeField.value.id]) return
|
|
597
597
|
gtmEventRef.current[activeField.value.id] = true
|
|
598
598
|
|
|
599
|
-
emit_gtm_event({
|
|
599
|
+
emit_gtm_event({
|
|
600
|
+
event: 'form_progress',
|
|
601
|
+
formId: activeField.value.formId,
|
|
602
|
+
fieldId: activeField.value.id,
|
|
603
|
+
title: activeField.value.title,
|
|
604
|
+
previousTitle: prevFieldStackRef.current[prevFieldStackRef.current.length - 1]?.value?.title || '',
|
|
605
|
+
status: ''
|
|
606
|
+
})
|
|
600
607
|
}, [activeField])
|
|
601
608
|
|
|
602
609
|
// placeholders for initial fields, reset when fields prop changes, since questions are now different (e.g. different form selected)
|
|
@@ -1260,7 +1267,7 @@ export const useTellescopeForm = ({ dontAutoadvance, isPublicForm, form, urlLogi
|
|
|
1260
1267
|
value: 2,
|
|
1261
1268
|
});
|
|
1262
1269
|
}
|
|
1263
|
-
emit_gtm_event({ event: 'form_submitted', formId: formResponse.formId })
|
|
1270
|
+
emit_gtm_event({ event: 'form_submitted', formId: formResponse.formId, fieldId: '', title: '', status: '', previousTitle: '', })
|
|
1264
1271
|
updateLocalFormResponse(formResponse.id, formResponse)
|
|
1265
1272
|
options?.onPreRedirect?.() // in case redirect on success
|
|
1266
1273
|
options?.onSuccess?.(formResponse)
|
package/src/Forms/inputs.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { Autocomplete, Box, Button, Checkbox, Chip, Divider, FormControl, FormCo
|
|
|
4
4
|
import { FormInputProps } from "./types"
|
|
5
5
|
import { useDropzone } from "react-dropzone"
|
|
6
6
|
import { CANVAS_TITLE, EMOTII_TITLE, INSURANCE_RELATIONSHIPS, INSURANCE_RELATIONSHIPS_CANVAS, PRIMARY_HEX, RELATIONSHIP_TYPES, TELLESCOPE_GENDERS } from "@tellescope/constants"
|
|
7
|
-
import { MM_DD_YYYY_to_YYYY_MM_DD, capture_is_supported, downloadFile, first_letter_capitalized, form_response_value_to_string, getLocalTimezone, getPublicFileURL, mm_dd_yyyy, replace_enduser_template_values, truncate_string, user_display_name } from "@tellescope/utilities"
|
|
7
|
+
import { MM_DD_YYYY_to_YYYY_MM_DD, capture_is_supported, downloadFile, emit_gtm_event, first_letter_capitalized, form_response_value_to_string, getLocalTimezone, getPublicFileURL, mm_dd_yyyy, replace_enduser_template_values, truncate_string, user_display_name } from "@tellescope/utilities"
|
|
8
8
|
import { DatabaseSelectResponse, Enduser, EnduserRelationship, FormResponseValue, InsuranceRelationship, MedicationResponse, MultipleChoiceOptions, TellescopeGender } from "@tellescope/types-models"
|
|
9
9
|
import { VALID_STATES, emailValidator, phoneValidator } from "@tellescope/validation"
|
|
10
10
|
import Slider from '@mui/material/Slider';
|
|
@@ -2857,6 +2857,7 @@ export const AppointmentBookingInput = ({ formResponseId, field, value, onChange
|
|
|
2857
2857
|
&& (!m?.data?.entropy || m?.data?.entropy === loaded?.entropy)
|
|
2858
2858
|
) {
|
|
2859
2859
|
onChange(m.data.bookedEventId, field.id)
|
|
2860
|
+
emit_gtm_event({ event: 'form_progress', fieldId: field.id, formId: field.formId, title: field.title, status: "Appointment Booked" })
|
|
2860
2861
|
}
|
|
2861
2862
|
if (m?.data?.type === 'CalendarPicker') {
|
|
2862
2863
|
setHeight(750)
|
|
@@ -2873,7 +2874,7 @@ export const AppointmentBookingInput = ({ formResponseId, field, value, onChange
|
|
|
2873
2874
|
|
|
2874
2875
|
window.addEventListener('message', handleMessage)
|
|
2875
2876
|
return () => { window.removeEventListener('message', handleMessage) }
|
|
2876
|
-
}, [field?.id, onChange, acknowledgedWarning, value, loaded?.entropy])
|
|
2877
|
+
}, [field?.id, field?.formId, field?.title, onChange, acknowledgedWarning, value, loaded?.entropy])
|
|
2877
2878
|
|
|
2878
2879
|
if (value) {
|
|
2879
2880
|
return (
|