@tellescope/react-components 1.234.0 → 1.235.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.
Files changed (39) hide show
  1. package/lib/cjs/Forms/forms.d.ts.map +1 -1
  2. package/lib/cjs/Forms/forms.js +37 -35
  3. package/lib/cjs/Forms/forms.js.map +1 -1
  4. package/lib/cjs/Forms/forms.v2.d.ts.map +1 -1
  5. package/lib/cjs/Forms/forms.v2.js +37 -35
  6. package/lib/cjs/Forms/forms.v2.js.map +1 -1
  7. package/lib/cjs/Forms/inputs.d.ts +17 -2
  8. package/lib/cjs/Forms/inputs.d.ts.map +1 -1
  9. package/lib/cjs/Forms/inputs.js +308 -36
  10. package/lib/cjs/Forms/inputs.js.map +1 -1
  11. package/lib/cjs/Forms/inputs.v2.d.ts +3 -2
  12. package/lib/cjs/Forms/inputs.v2.d.ts.map +1 -1
  13. package/lib/cjs/Forms/inputs.v2.js +20 -293
  14. package/lib/cjs/Forms/inputs.v2.js.map +1 -1
  15. package/lib/cjs/Forms/types.d.ts +4 -0
  16. package/lib/cjs/Forms/types.d.ts.map +1 -1
  17. package/lib/esm/Forms/forms.d.ts.map +1 -1
  18. package/lib/esm/Forms/forms.js +38 -36
  19. package/lib/esm/Forms/forms.js.map +1 -1
  20. package/lib/esm/Forms/forms.v2.d.ts.map +1 -1
  21. package/lib/esm/Forms/forms.v2.js +38 -36
  22. package/lib/esm/Forms/forms.v2.js.map +1 -1
  23. package/lib/esm/Forms/inputs.d.ts +17 -2
  24. package/lib/esm/Forms/inputs.d.ts.map +1 -1
  25. package/lib/esm/Forms/inputs.js +306 -37
  26. package/lib/esm/Forms/inputs.js.map +1 -1
  27. package/lib/esm/Forms/inputs.v2.d.ts +3 -2
  28. package/lib/esm/Forms/inputs.v2.d.ts.map +1 -1
  29. package/lib/esm/Forms/inputs.v2.js +15 -289
  30. package/lib/esm/Forms/inputs.v2.js.map +1 -1
  31. package/lib/esm/Forms/types.d.ts +4 -0
  32. package/lib/esm/Forms/types.d.ts.map +1 -1
  33. package/lib/tsconfig.tsbuildinfo +1 -1
  34. package/package.json +9 -9
  35. package/src/Forms/forms.tsx +13 -6
  36. package/src/Forms/forms.v2.tsx +9 -2
  37. package/src/Forms/inputs.tsx +449 -65
  38. package/src/Forms/inputs.v2.tsx +12 -593
  39. package/src/Forms/types.ts +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tellescope/react-components",
3
- "version": "1.234.0",
3
+ "version": "1.235.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.234.0",
51
- "@tellescope/sdk": "1.234.0",
52
- "@tellescope/types-client": "1.234.0",
53
- "@tellescope/types-models": "1.234.0",
54
- "@tellescope/types-utilities": "1.234.0",
55
- "@tellescope/utilities": "1.234.0",
56
- "@tellescope/validation": "1.234.0",
50
+ "@tellescope/constants": "1.235.0",
51
+ "@tellescope/sdk": "1.235.0",
52
+ "@tellescope/types-client": "1.235.0",
53
+ "@tellescope/types-models": "1.235.0",
54
+ "@tellescope/types-utilities": "1.235.0",
55
+ "@tellescope/utilities": "1.235.0",
56
+ "@tellescope/validation": "1.235.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",
@@ -83,7 +83,7 @@
83
83
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
84
84
  "react-native": "^0.65.0 || ^0.66.0 || ^0.67.0 || ^0.68.0 || ^0.71.0"
85
85
  },
86
- "gitHead": "6e2ef7605c46376343bafb28028db2bf4506a981",
86
+ "gitHead": "e65a74bc7888764319d66104393c534d0a4c349c",
87
87
  "publishConfig": {
88
88
  "access": "public"
89
89
  }
@@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from "react"
2
2
  import { Button, CircularProgress, FileBlob, FileUploadHandler, Flex, LinearProgress, LoadingButton, Modal, Paper, Styled, Typography, form_display_text_for_language, useFileUpload, useFormResponses, useSession } from "../index"
3
3
  import { useListForFormFields, useOrganizationTheme, useTellescopeForm, WithOrganizationTheme, Response, FileResponse, NextFieldLogicOptions } from "./hooks"
4
4
  import { ChangeHandler, FormInputs } from "./types"
5
- import { AddToDatabaseProps, AddressInput, AllergiesInput, AppointmentBookingInput, BelugaPatientPreferenceInput, ChargeebeeInput, ConditionsInput, DatabaseSelectInput, DateInput, DateStringInput, DropdownInput, EmailInput, EmotiiInput, FileInput, FilesInput, HeightInput, HiddenValueInput, InsuranceInput, LanguageSelect, MedicationsInput, MultipleChoiceInput, NumberInput, PhoneInput, Progress, RankingInput, RatingInput, RedirectInput, RelatedContactsInput, RichTextInput, SignatureInput, StringInput, StringLongInput, StripeInput, TableInput, TimeInput, TimezoneInput, defaultButtonStyles } from "./inputs"
5
+ import { AddToDatabaseProps, AddressInput, AllergiesInput, AppointmentBookingInput, BelugaPatientPreferenceInput, BridgeEligibilityInput, ChargeebeeInput, ConditionsInput, DatabaseSelectInput, DateInput, DateStringInput, DropdownInput, EmailInput, EmotiiInput, FileInput, FilesInput, HeightInput, HiddenValueInput, InsuranceInput, LanguageSelect, MedicationsInput, MultipleChoiceInput, NumberInput, PhoneInput, Progress, RankingInput, RatingInput, RedirectInput, RelatedContactsInput, RichTextInput, SignatureInput, StringInput, StringLongInput, StripeInput, TableInput, TimeInput, TimezoneInput, defaultButtonStyles } from "./inputs"
6
6
  import { PRIMARY_HEX } from "@tellescope/constants"
7
7
  import { FormResponse, FormField, Form, Enduser } from "@tellescope/types-client"
8
8
  import { FormResponseAnswerFileValue, OrganizationTheme } from "@tellescope/types-models"
@@ -182,6 +182,7 @@ export const QuestionForField = ({
182
182
  const Medications = customInputs?.['Medications'] ?? MedicationsInput
183
183
  const RelatedContacts = customInputs?.['Related Contacts'] ?? RelatedContactsInput
184
184
  const Insurance = customInputs?.['Insurance'] ?? InsuranceInput
185
+ const BridgeEligibility = customInputs?.['Bridge Eligibility'] ?? BridgeEligibilityInput
185
186
  const AppointmentBooking = customInputs?.['Appointment Booking'] ?? AppointmentBookingInput
186
187
  const Height = customInputs?.['Height'] ?? HeightInput
187
188
  const Redirect = customInputs?.['Redirect'] ?? RedirectInput
@@ -220,7 +221,7 @@ export const QuestionForField = ({
220
221
  fontSize: field.titleFontSize || (field.type === 'Question Group' ? 22 : 20),
221
222
  fontWeight: field.type === 'Question Group' ? 'bold' : undefined,
222
223
  }}>
223
- {field.title}{!(field.isOptional || field.type === 'description' || field.type === 'Question Group' || field.type === 'Insurance') ? '*' : ''}
224
+ {field.title}{!(field.isOptional || field.type === 'description' || field.type === 'Question Group' || field.type === 'Insurance' || field.type === 'Bridge Eligibility') ? '*' : ''}
224
225
  </Typography>
225
226
  }
226
227
  {!field.title && (field.type === 'Question Group' || field.type === 'signature') && !form?.customization?.hideLogo &&
@@ -371,6 +372,12 @@ export const QuestionForField = ({
371
372
  }, fieldId)}
372
373
  />
373
374
  )
375
+ : field.type === 'Bridge Eligibility' ? (
376
+ <BridgeEligibility field={field} value={value.answer.value as any} form={form}
377
+ enduser={enduser} responses={responses} enduserId={enduserId}
378
+ onChange={onFieldChange as ChangeHandler<'Bridge Eligibility'>}
379
+ />
380
+ )
374
381
  : field.type === 'rating' ? (
375
382
  <Rating field={field} value={value.answer.value as any} onChange={onFieldChange as ChangeHandler<'rating'>} form={form}/>
376
383
  )
@@ -785,15 +792,15 @@ const TellescopeFormWithContext: typeof TellescopeForm = (props) => {
785
792
  const theme = useOrganizationTheme()
786
793
 
787
794
  return (
788
- <TellescopeFormContainer style={props.style} dontAddContext
789
- hideBg={props.hideBg || props.form?.customization?.hideBg}
795
+ <TellescopeFormContainer style={props.style} dontAddContext
796
+ hideBg={props.hideBg || props.form?.customization?.hideBg}
790
797
  logoHeight={props.logoHeight}
791
798
  backgroundColor={props.backgroundColor}
792
799
  hideLogo={props?.customization?.hideLogo}
793
800
  maxWidth={props.form?.customization?.maxWidth}
794
801
  >
795
- {props.submitted
796
- ? <ThanksMessage {...props} showRestartAtEnd={props?.customization?.showRestartAtEnd} />
802
+ {props.submitted
803
+ ? <ThanksMessage {...props} showRestartAtEnd={props?.customization?.showRestartAtEnd} />
797
804
  : (<TellescopeSingleQuestionFlow {...props} theme={theme} />)
798
805
  }
799
806
  </TellescopeFormContainer>
@@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from "react"
2
2
  import { Button, CircularProgress, FileBlob, FileUploadHandler, Flex, LinearProgress, LoadingButton, Modal, Paper, Styled, Typography, WithTheme, form_display_text_for_language, useFileUpload, useFormResponses, useSession } from "../index"
3
3
  import { useListForFormFields, useOrganizationTheme, useTellescopeForm, WithOrganizationTheme, Response, FileResponse, NextFieldLogicOptions } from "./hooks"
4
4
  import { ChangeHandler, FormInputs } from "./types"
5
- import { AddToDatabaseProps, AddressInput, AllergiesInput, AppointmentBookingInput, BelugaPatientPreferenceInput, ChargeebeeInput, ConditionsInput, DatabaseSelectInput, DateInput, DateStringInput, DropdownInput, EmailInput, EmotiiInput, FileInput, FilesInput, HeightInput, HiddenValueInput, InsuranceInput, LanguageSelect, MedicationsInput, MultipleChoiceInput, NumberInput, PhoneInput, Progress, RankingInput, RatingInput, RedirectInput, RelatedContactsInput, RichTextInput, SignatureInput, StringInput, StringLongInput, StripeInput, TableInput, TimeInput, TimezoneInput, defaultButtonStyles } from "./inputs.v2"
5
+ import { AddToDatabaseProps, AddressInput, AllergiesInput, AppointmentBookingInput, BelugaPatientPreferenceInput, BridgeEligibilityInput, ChargeebeeInput, ConditionsInput, DatabaseSelectInput, DateInput, DateStringInput, DropdownInput, EmailInput, EmotiiInput, FileInput, FilesInput, HeightInput, HiddenValueInput, InsuranceInput, LanguageSelect, MedicationsInput, MultipleChoiceInput, NumberInput, PhoneInput, Progress, RankingInput, RatingInput, RedirectInput, RelatedContactsInput, RichTextInput, SignatureInput, StringInput, StringLongInput, StripeInput, TableInput, TimeInput, TimezoneInput, defaultButtonStyles } from "./inputs.v2"
6
6
  import { PRIMARY_HEX } from "@tellescope/constants"
7
7
  import { FormResponse, FormField, Form, Enduser } from "@tellescope/types-client"
8
8
  import { FormResponseAnswerFileValue, OrganizationTheme } from "@tellescope/types-models"
@@ -175,6 +175,7 @@ export const QuestionForField = ({
175
175
  const Medications = customInputs?.['Medications'] ?? MedicationsInput
176
176
  const RelatedContacts = customInputs?.['Related Contacts'] ?? RelatedContactsInput
177
177
  const Insurance = customInputs?.['Insurance'] ?? InsuranceInput
178
+ const BridgeEligibility = customInputs?.['Bridge Eligibility'] ?? BridgeEligibilityInput
178
179
  const AppointmentBooking = customInputs?.['Appointment Booking'] ?? AppointmentBookingInput
179
180
  const Height = customInputs?.['Height'] ?? HeightInput
180
181
  const Redirect = customInputs?.['Redirect'] ?? RedirectInput
@@ -214,7 +215,7 @@ export const QuestionForField = ({
214
215
  fontSize: field.titleFontSize || (field.type === 'Question Group' ? 22 : 20),
215
216
  fontWeight: field.type === 'Question Group' ? 'bold' : undefined,
216
217
  }}>
217
- {field.title}{!(field.isOptional || field.type === 'description' || field.type === 'Question Group' || field.type === 'Insurance') ? '*' : ''}
218
+ {field.title}{!(field.isOptional || field.type === 'description' || field.type === 'Question Group' || field.type === 'Insurance' || field.type === 'Bridge Eligibility') ? '*' : ''}
218
219
  </Typography>
219
220
  }
220
221
  {!field.title && (field.type === 'Question Group' || field.type === 'signature') && !form?.customization?.hideLogo &&
@@ -365,6 +366,12 @@ export const QuestionForField = ({
365
366
  }, fieldId)}
366
367
  />
367
368
  )
369
+ : field.type === 'Bridge Eligibility' ? (
370
+ <BridgeEligibility field={field} value={value.answer.value as any} form={form}
371
+ enduser={enduser} responses={responses} enduserId={enduserId}
372
+ onChange={onFieldChange as ChangeHandler<'Bridge Eligibility'>}
373
+ />
374
+ )
368
375
  : field.type === 'rating' ? (
369
376
  <Rating field={field} value={value.answer.value as any} onChange={onFieldChange as ChangeHandler<'rating'>} form={form}/>
370
377
  )