@tellescope/react-components 1.234.1 → 1.235.1

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 (46) hide show
  1. package/lib/cjs/CMS/ContentViewer.d.ts.map +1 -1
  2. package/lib/cjs/CMS/ContentViewer.js +26 -22
  3. package/lib/cjs/CMS/ContentViewer.js.map +1 -1
  4. package/lib/cjs/Forms/forms.d.ts.map +1 -1
  5. package/lib/cjs/Forms/forms.js +37 -35
  6. package/lib/cjs/Forms/forms.js.map +1 -1
  7. package/lib/cjs/Forms/forms.v2.d.ts.map +1 -1
  8. package/lib/cjs/Forms/forms.v2.js +37 -35
  9. package/lib/cjs/Forms/forms.v2.js.map +1 -1
  10. package/lib/cjs/Forms/inputs.d.ts +17 -2
  11. package/lib/cjs/Forms/inputs.d.ts.map +1 -1
  12. package/lib/cjs/Forms/inputs.js +429 -37
  13. package/lib/cjs/Forms/inputs.js.map +1 -1
  14. package/lib/cjs/Forms/inputs.v2.d.ts +3 -2
  15. package/lib/cjs/Forms/inputs.v2.d.ts.map +1 -1
  16. package/lib/cjs/Forms/inputs.v2.js +21 -294
  17. package/lib/cjs/Forms/inputs.v2.js.map +1 -1
  18. package/lib/cjs/Forms/types.d.ts +4 -0
  19. package/lib/cjs/Forms/types.d.ts.map +1 -1
  20. package/lib/esm/CMS/ContentViewer.d.ts.map +1 -1
  21. package/lib/esm/CMS/ContentViewer.js +27 -23
  22. package/lib/esm/CMS/ContentViewer.js.map +1 -1
  23. package/lib/esm/Forms/forms.d.ts.map +1 -1
  24. package/lib/esm/Forms/forms.js +38 -36
  25. package/lib/esm/Forms/forms.js.map +1 -1
  26. package/lib/esm/Forms/forms.v2.d.ts.map +1 -1
  27. package/lib/esm/Forms/forms.v2.js +38 -36
  28. package/lib/esm/Forms/forms.v2.js.map +1 -1
  29. package/lib/esm/Forms/inputs.d.ts +17 -2
  30. package/lib/esm/Forms/inputs.d.ts.map +1 -1
  31. package/lib/esm/Forms/inputs.js +427 -38
  32. package/lib/esm/Forms/inputs.js.map +1 -1
  33. package/lib/esm/Forms/inputs.v2.d.ts +3 -2
  34. package/lib/esm/Forms/inputs.v2.d.ts.map +1 -1
  35. package/lib/esm/Forms/inputs.v2.js +16 -290
  36. package/lib/esm/Forms/inputs.v2.js.map +1 -1
  37. package/lib/esm/Forms/types.d.ts +4 -0
  38. package/lib/esm/Forms/types.d.ts.map +1 -1
  39. package/lib/tsconfig.tsbuildinfo +1 -1
  40. package/package.json +44 -44
  41. package/src/CMS/ContentViewer.tsx +16 -2
  42. package/src/Forms/forms.tsx +13 -6
  43. package/src/Forms/forms.v2.tsx +9 -2
  44. package/src/Forms/inputs.tsx +563 -66
  45. package/src/Forms/inputs.v2.tsx +13 -594
  46. 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.1",
3
+ "version": "1.235.1",
4
4
  "description": "",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",
@@ -30,60 +30,60 @@
30
30
  "homepage": "https://github.com/tellescope-os/enduser-authentication#readme",
31
31
  "devDependencies": {
32
32
  "@babel/core": "7.28.5",
33
- "@types/css-to-react-native": "^3.0.0",
34
- "@types/react": "^17.0.27",
35
- "@types/react-beautiful-dnd": "^13.1.2",
36
- "@types/react-dom": "^17.0.9",
37
- "@types/react-native": "^0.65.24",
38
- "@types/react-window": "^1.8.5",
33
+ "@types/css-to-react-native": "3.0.0",
34
+ "@types/react": "17.0.52",
35
+ "@types/react-beautiful-dnd": "13.1.2",
36
+ "@types/react-dom": "17.0.18",
37
+ "@types/react-native": "0.65.27",
38
+ "@types/react-window": "1.8.5",
39
39
  "babel-loader": "8.4.1",
40
40
  "react-native": "0.68.0",
41
41
  "typescript": "4.9.3"
42
42
  },
43
43
  "dependencies": {
44
- "@emotion/css": "^11.9.0",
45
- "@mui/icons-material": "^5.0.1",
46
- "@mui/material": "^5.0.2",
47
- "@reduxjs/toolkit": "^1.6.2",
48
- "@stripe/react-stripe-js": "^2.9.0",
49
- "@stripe/stripe-js": "^1.52.1",
50
- "@tellescope/constants": "1.234.1",
51
- "@tellescope/sdk": "1.234.1",
52
- "@tellescope/types-client": "1.234.1",
53
- "@tellescope/types-models": "1.234.1",
54
- "@tellescope/types-utilities": "1.234.1",
55
- "@tellescope/utilities": "1.234.1",
56
- "@tellescope/validation": "1.234.1",
57
- "@typescript-eslint/eslint-plugin": "^4.33.0",
58
- "@typescript-eslint/parser": "^4.33.0",
59
- "css-to-react-native": "^3.0.0",
60
- "draft-js": "^0.11.7",
61
- "draftjs-to-html": "^0.9.1",
62
- "eslint": "^7.32.0",
63
- "eslint-plugin-react": "^7.26.1",
64
- "formik": "^2.2.9",
65
- "heic2any": "^0.0.4",
66
- "html-to-draftjs": "^1.5.0",
67
- "react-beautiful-dnd": "^13.1.1",
68
- "react-datepicker": "^3.4.1",
69
- "react-draft-wysiwyg": "^1.15.0",
70
- "react-draggable": "^4.4.6",
71
- "react-dropzone": "^11.4.2",
72
- "react-ga4": "^1.4.1",
73
- "react-native-paper": "^4.10.0",
74
- "react-native-render-html": "^6.3.4",
75
- "react-native-vector-icons": "^9.0.0",
76
- "react-native-video": "^5.2.0",
77
- "react-redux": "^7.2.6",
78
- "react-window": "^1.8.9",
79
- "yup": "^0.32.10"
44
+ "@emotion/css": "11.10.5",
45
+ "@mui/icons-material": "5.10.15",
46
+ "@mui/material": "5.10.15",
47
+ "@reduxjs/toolkit": "1.9.0",
48
+ "@stripe/react-stripe-js": "2.9.0",
49
+ "@stripe/stripe-js": "1.52.1",
50
+ "@tellescope/constants": "1.235.1",
51
+ "@tellescope/sdk": "1.235.1",
52
+ "@tellescope/types-client": "1.235.1",
53
+ "@tellescope/types-models": "1.235.1",
54
+ "@tellescope/types-utilities": "1.235.1",
55
+ "@tellescope/utilities": "1.235.1",
56
+ "@tellescope/validation": "1.235.1",
57
+ "@typescript-eslint/eslint-plugin": "4.33.0",
58
+ "@typescript-eslint/parser": "4.33.0",
59
+ "css-to-react-native": "3.0.0",
60
+ "draft-js": "0.11.7",
61
+ "draftjs-to-html": "0.9.1",
62
+ "eslint": "7.32.0",
63
+ "eslint-plugin-react": "7.31.11",
64
+ "formik": "2.2.9",
65
+ "heic2any": "0.0.4",
66
+ "html-to-draftjs": "1.5.0",
67
+ "react-beautiful-dnd": "13.1.1",
68
+ "react-datepicker": "3.8.0",
69
+ "react-draft-wysiwyg": "1.15.0",
70
+ "react-draggable": "4.4.6",
71
+ "react-dropzone": "11.7.1",
72
+ "react-ga4": "1.4.1",
73
+ "react-native-paper": "4.12.5",
74
+ "react-native-render-html": "6.3.4",
75
+ "react-native-vector-icons": "9.2.0",
76
+ "react-native-video": "5.2.1",
77
+ "react-redux": "7.2.9",
78
+ "react-window": "1.8.9",
79
+ "yup": "0.32.11"
80
80
  },
81
81
  "peerDependencies": {
82
82
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
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": "aa1d9a213f074e0b843c04cdbe2bb165c7997e07",
86
+ "gitHead": "6074a136e42e3b435d10fef5d3d736d9db2e6acb",
87
87
  "publishConfig": {
88
88
  "access": "public"
89
89
  }
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useLayoutEffect, useRef, useState } from "react"
2
2
  import { ManagedContentRecord } from "@tellescope/types-client"
3
- import { remove_script_tags } from "@tellescope/utilities"
3
+ import { remove_script_tags, sanitize_html_for_cms } from "@tellescope/utilities"
4
4
  import { Button, Grid, Typography } from "@mui/material"
5
5
  import { PDFBlockUI } from "./components"
6
6
  import { css } from "@emotion/css"
@@ -229,7 +229,18 @@ export const ArticleViewer = ({
229
229
  )
230
230
  }}
231
231
  />
232
- )
232
+ )
233
+ : block.type === 'raw-html' ? (
234
+ <div style={{
235
+ fontSize: 18,
236
+ lineHeight: '25pt',
237
+ ...blockStyleToCSS(block.style)
238
+ }}
239
+ dangerouslySetInnerHTML={{
240
+ __html: sanitize_html_for_cms(block.info.html)
241
+ }}
242
+ />
243
+ )
233
244
  : block.type === 'image' ? (
234
245
  <img src={block.info.link} alt={block.info.alt || ''} style={{
235
246
  maxWidth: block.info.maxWidth || '100%',
@@ -297,6 +308,9 @@ export const html_for_article = (article: ManagedContentRecord, options?: { root
297
308
  : block.type === 'html' ? (
298
309
  `<div>${remove_script_tags(remove_script_tags(block.info.html))}</div>`
299
310
  )
311
+ : block.type === 'raw-html' ? (
312
+ `<div>${sanitize_html_for_cms(block.info.html)}</div>`
313
+ )
300
314
  : block.type === 'image' ? (
301
315
  // wrap with div to supporting centering later
302
316
  `<div style="">
@@ -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
  )