@tellescope/react-components 1.119.0 → 1.120.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.119.0",
3
+ "version": "1.120.0",
4
4
  "description": "",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",
@@ -47,12 +47,12 @@
47
47
  "@reduxjs/toolkit": "^1.6.2",
48
48
  "@stripe/react-stripe-js": "^2.1.0",
49
49
  "@stripe/stripe-js": "^1.52.1",
50
- "@tellescope/constants": "^1.119.0",
51
- "@tellescope/sdk": "^1.119.0",
52
- "@tellescope/types-client": "^1.119.0",
53
- "@tellescope/types-models": "^1.119.0",
50
+ "@tellescope/constants": "^1.120.0",
51
+ "@tellescope/sdk": "^1.120.0",
52
+ "@tellescope/types-client": "^1.120.0",
53
+ "@tellescope/types-models": "^1.120.0",
54
54
  "@tellescope/types-utilities": "^1.69.3",
55
- "@tellescope/utilities": "^1.119.0",
55
+ "@tellescope/utilities": "^1.120.0",
56
56
  "@typescript-eslint/eslint-plugin": "^4.33.0",
57
57
  "@typescript-eslint/parser": "^4.33.0",
58
58
  "css-to-react-native": "^3.0.0",
@@ -79,7 +79,7 @@
79
79
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
80
80
  "react-native": "^0.65.0 || ^0.66.0 || ^0.67.0 || ^0.68.0 || ^0.71.0"
81
81
  },
82
- "gitHead": "28eda5c62796a87a23d99063f9a981a0d4415751",
82
+ "gitHead": "2c480c5b013f8eabe566d7e4abe20809a36b3249",
83
83
  "publishConfig": {
84
84
  "access": "public"
85
85
  }
@@ -4,7 +4,7 @@ import { Autocomplete, Box, Button, Checkbox, Divider, FormControl, FormControlL
4
4
  import { FormInputProps } from "./types"
5
5
  import { useDropzone } from "react-dropzone"
6
6
  import { 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, truncate_string, user_display_name } from "@tellescope/utilities"
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"
8
8
  import { Enduser, EnduserRelationship, FormResponseValue, InsuranceRelationship, MultipleChoiceOptions, TellescopeGender } from "@tellescope/types-models"
9
9
  import { VALID_STATES, emailValidator, phoneValidator } from "@tellescope/validation"
10
10
  import Slider from '@mui/material/Slider';
@@ -2648,6 +2648,19 @@ export const RedirectInput = ({ groupId, groupInsance, formResponseId, field, su
2648
2648
 
2649
2649
  useEffect(() => {
2650
2650
  if (session.type === 'user') { return }
2651
+
2652
+ if (field.options?.redirectExternalUrl) {
2653
+ submit?.()
2654
+ .finally(() => {
2655
+ if (!field.options?.redirectExternalUrl) { return }
2656
+
2657
+ window.location.href = replace_enduser_template_values(field.options.redirectExternalUrl, session.userInfo as any)
2658
+ })
2659
+ .catch(console.error)
2660
+
2661
+ return
2662
+ }
2663
+
2651
2664
  if (!field.options?.redirectFormId) { return }
2652
2665
 
2653
2666
  session.api.form_responses.prepare_form_response({