@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tellescope/react-components",
3
- "version": "1.204.2",
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.204.2",
51
- "@tellescope/sdk": "^1.204.2",
52
- "@tellescope/types-client": "^1.204.2",
53
- "@tellescope/types-models": "^1.204.2",
54
- "@tellescope/types-utilities": "^1.204.2",
55
- "@tellescope/utilities": "^1.204.2",
56
- "@tellescope/validation": "^1.204.2",
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": "375efe3ae17613832fc10b212b0c3d2fce0a31cd",
87
+ "gitHead": "2207d17c9959fcef3194f08245f8890817739b4e",
88
88
  "publishConfig": {
89
89
  "access": "public"
90
90
  }
@@ -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({ event: 'form_progress', formId: activeField.value.formId, fieldId: activeField.value.id, title: activeField.value.title })
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)
@@ -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 (