@tellescope/react-components 1.223.0 → 1.224.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.223.0",
3
+ "version": "1.224.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.223.0",
51
- "@tellescope/sdk": "^1.223.0",
52
- "@tellescope/types-client": "^1.223.0",
53
- "@tellescope/types-models": "^1.223.0",
54
- "@tellescope/types-utilities": "^1.223.0",
55
- "@tellescope/utilities": "^1.223.0",
56
- "@tellescope/validation": "^1.223.0",
50
+ "@tellescope/constants": "^1.224.0",
51
+ "@tellescope/sdk": "^1.224.0",
52
+ "@tellescope/types-client": "^1.224.0",
53
+ "@tellescope/types-models": "^1.224.0",
54
+ "@tellescope/types-utilities": "^1.224.0",
55
+ "@tellescope/utilities": "^1.224.0",
56
+ "@tellescope/validation": "^1.224.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": "c4041968a142a3ab45430b3f2dccfa0bbc36e3d9",
86
+ "gitHead": "ed57eae72bced200381c5a7cf8703153886d2b4d",
87
87
  "publishConfig": {
88
88
  "access": "public"
89
89
  }
@@ -6,7 +6,7 @@ import { AddToDatabaseProps, AddressInput, AllergiesInput, AppointmentBookingInp
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"
9
- import { field_can_autosubmit, formatted_date, object_is_empty, objects_equivalent, read_local_storage, remove_script_tags, responses_satisfy_conditions, truncate_string } from "@tellescope/utilities"
9
+ import { field_can_autosubmit, form_response_value_to_string, formatted_date, object_is_empty, objects_equivalent, read_local_storage, remove_script_tags, responses_satisfy_conditions, truncate_string } from "@tellescope/utilities"
10
10
  import { Divider } from "@mui/material"
11
11
 
12
12
  export const TellescopeFormContainer = ({ businessId, organizationIds, ...props } : {
@@ -241,7 +241,27 @@ export const QuestionForField = ({
241
241
  }
242
242
 
243
243
  {
244
- field.type === 'file' ? (
244
+ // If field has pre-populated value and is set to be disabled when pre-populated, show as underlined text
245
+ field.disabledWhenPrepopulated && value.answer.value !== undefined && value.answer.value !== null && value.answer.value !== '' ? (
246
+ <div
247
+ style={{
248
+ padding: '8px 0',
249
+ borderBottom: '1px solid rgba(0, 0, 0, 0.42)',
250
+ width: '100%'
251
+ }}
252
+ >
253
+ <Typography
254
+ style={{
255
+ fontSize: '1rem',
256
+ color: 'rgba(0, 0, 0, 0.87)',
257
+ whiteSpace: 'pre-wrap'
258
+ }}
259
+ >
260
+ {form_response_value_to_string(value.answer.value)}
261
+ </Typography>
262
+ </div>
263
+ )
264
+ : field.type === 'file' ? (
245
265
  <File field={field} value={file.blobs?.[0] as any} onChange={onAddFile as any} form={form}
246
266
  existingFileName={
247
267
  value.answer.type === 'file'