@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/lib/cjs/Forms/forms.d.ts.map +1 -1
- package/lib/cjs/Forms/forms.js +66 -55
- package/lib/cjs/Forms/forms.js.map +1 -1
- package/lib/esm/CMS/components.d.ts +0 -1
- package/lib/esm/CMS/components.d.ts.map +1 -1
- package/lib/esm/Forms/forms.d.ts +3 -3
- package/lib/esm/Forms/forms.d.ts.map +1 -1
- package/lib/esm/Forms/forms.js +67 -56
- package/lib/esm/Forms/forms.js.map +1 -1
- package/lib/esm/Forms/inputs.d.ts +1 -1
- package/lib/esm/controls.d.ts +2 -2
- package/lib/esm/inputs.d.ts +1 -1
- package/lib/esm/inputs.native.d.ts +0 -1
- package/lib/esm/inputs.native.d.ts.map +1 -1
- package/lib/esm/layout.d.ts +1 -1
- package/lib/esm/state.d.ts +44 -44
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/src/Forms/forms.tsx +22 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tellescope/react-components",
|
|
3
|
-
"version": "1.
|
|
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.
|
|
51
|
-
"@tellescope/sdk": "^1.
|
|
52
|
-
"@tellescope/types-client": "^1.
|
|
53
|
-
"@tellescope/types-models": "^1.
|
|
54
|
-
"@tellescope/types-utilities": "^1.
|
|
55
|
-
"@tellescope/utilities": "^1.
|
|
56
|
-
"@tellescope/validation": "^1.
|
|
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": "
|
|
86
|
+
"gitHead": "ed57eae72bced200381c5a7cf8703153886d2b4d",
|
|
87
87
|
"publishConfig": {
|
|
88
88
|
"access": "public"
|
|
89
89
|
}
|
package/src/Forms/forms.tsx
CHANGED
|
@@ -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
|
|
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'
|