@tellescope/react-components 1.242.6 → 1.242.8
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 +1 -0
- package/lib/cjs/Forms/forms.d.ts.map +1 -1
- package/lib/cjs/Forms/forms.js +7 -6
- package/lib/cjs/Forms/forms.js.map +1 -1
- package/lib/cjs/Forms/forms.v2.d.ts +1 -0
- package/lib/cjs/Forms/forms.v2.d.ts.map +1 -1
- package/lib/cjs/Forms/forms.v2.js +2 -2
- package/lib/cjs/Forms/forms.v2.js.map +1 -1
- package/lib/esm/CMS/components.d.ts +1 -0
- package/lib/esm/CMS/components.d.ts.map +1 -1
- package/lib/esm/Forms/forms.d.ts +4 -3
- package/lib/esm/Forms/forms.d.ts.map +1 -1
- package/lib/esm/Forms/forms.js +7 -6
- package/lib/esm/Forms/forms.js.map +1 -1
- package/lib/esm/Forms/forms.v2.d.ts +4 -3
- package/lib/esm/Forms/forms.v2.d.ts.map +1 -1
- package/lib/esm/Forms/forms.v2.js +2 -2
- package/lib/esm/Forms/forms.v2.js.map +1 -1
- package/lib/esm/Forms/inputs.d.ts +2 -2
- package/lib/esm/Forms/inputs.native.d.ts +1 -0
- package/lib/esm/Forms/inputs.native.d.ts.map +1 -1
- package/lib/esm/TwilioVideo/hooks.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 +1 -0
- package/lib/esm/inputs.native.d.ts.map +1 -1
- package/lib/esm/state.d.ts +323 -323
- package/lib/esm/theme.native.d.ts +1 -0
- package/lib/esm/theme.native.d.ts.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -13
- package/src/Forms/forms.tsx +11 -7
- package/src/Forms/forms.v2.tsx +7 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tellescope/react-components",
|
|
3
|
-
"version": "1.242.
|
|
3
|
+
"version": "1.242.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/cjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -36,7 +36,11 @@
|
|
|
36
36
|
"@types/react-dom": "17.0.18",
|
|
37
37
|
"@types/react-native": "0.65.27",
|
|
38
38
|
"@types/react-window": "1.8.5",
|
|
39
|
+
"@typescript-eslint/eslint-plugin": "4.33.0",
|
|
40
|
+
"@typescript-eslint/parser": "4.33.0",
|
|
39
41
|
"babel-loader": "8.4.1",
|
|
42
|
+
"eslint": "7.32.0",
|
|
43
|
+
"eslint-plugin-react": "7.31.11",
|
|
40
44
|
"react-native": "0.68.0",
|
|
41
45
|
"typescript": "4.9.3"
|
|
42
46
|
},
|
|
@@ -47,20 +51,16 @@
|
|
|
47
51
|
"@reduxjs/toolkit": "1.9.0",
|
|
48
52
|
"@stripe/react-stripe-js": "2.9.0",
|
|
49
53
|
"@stripe/stripe-js": "1.52.1",
|
|
50
|
-
"@tellescope/constants": "1.242.
|
|
51
|
-
"@tellescope/sdk": "1.242.
|
|
52
|
-
"@tellescope/types-client": "1.242.
|
|
53
|
-
"@tellescope/types-models": "1.242.
|
|
54
|
-
"@tellescope/types-utilities": "1.242.
|
|
55
|
-
"@tellescope/utilities": "1.242.
|
|
56
|
-
"@tellescope/validation": "1.242.
|
|
57
|
-
"@typescript-eslint/eslint-plugin": "4.33.0",
|
|
58
|
-
"@typescript-eslint/parser": "4.33.0",
|
|
54
|
+
"@tellescope/constants": "1.242.8",
|
|
55
|
+
"@tellescope/sdk": "1.242.8",
|
|
56
|
+
"@tellescope/types-client": "1.242.8",
|
|
57
|
+
"@tellescope/types-models": "1.242.8",
|
|
58
|
+
"@tellescope/types-utilities": "1.242.8",
|
|
59
|
+
"@tellescope/utilities": "1.242.8",
|
|
60
|
+
"@tellescope/validation": "1.242.8",
|
|
59
61
|
"css-to-react-native": "3.0.0",
|
|
60
62
|
"draft-js": "0.11.7",
|
|
61
63
|
"draftjs-to-html": "0.9.1",
|
|
62
|
-
"eslint": "7.32.0",
|
|
63
|
-
"eslint-plugin-react": "7.31.11",
|
|
64
64
|
"formik": "2.2.9",
|
|
65
65
|
"heic2any": "0.0.4",
|
|
66
66
|
"html-to-draftjs": "1.5.0",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
85
85
|
"react-native": "^0.65.0 || ^0.66.0 || ^0.67.0 || ^0.68.0 || ^0.71.0"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "9e582b9f1cccd317d4f18d1b656473013bc6222c",
|
|
88
88
|
"publishConfig": {
|
|
89
89
|
"access": "public"
|
|
90
90
|
}
|
package/src/Forms/forms.tsx
CHANGED
|
@@ -9,14 +9,15 @@ import { FormResponseAnswerFileValue, OrganizationTheme } from "@tellescope/type
|
|
|
9
9
|
import { calculate_form_scoring, 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
|
-
export const TellescopeFormContainer = ({ businessId, organizationIds, ...props } : {
|
|
13
|
-
businessId?: string,
|
|
14
|
-
organizationIds?: string[],
|
|
12
|
+
export const TellescopeFormContainer = ({ businessId, organizationIds, ...props } : {
|
|
13
|
+
businessId?: string,
|
|
14
|
+
organizationIds?: string[],
|
|
15
15
|
dontAddContext?: boolean,
|
|
16
|
-
children: React.ReactNode,
|
|
16
|
+
children: React.ReactNode,
|
|
17
17
|
hideBg?: boolean,
|
|
18
18
|
backgroundColor?: string,
|
|
19
19
|
hideLogo?: boolean,
|
|
20
|
+
logoURL?: string,
|
|
20
21
|
logoHeight?: number,
|
|
21
22
|
language?: string,
|
|
22
23
|
onChangeLanguage?: (l: string) => void,
|
|
@@ -35,17 +36,19 @@ export const TellescopeFormContainer = ({ businessId, organizationIds, ...props
|
|
|
35
36
|
)
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
const TellescopeFormContainerWithTheme: typeof TellescopeFormContainer = ({ paperMinHeight=575, children, language, onChangeLanguage, style, hideBg, backgroundColor, hideLogo, logoHeight, maxWidth }) => {
|
|
39
|
+
const TellescopeFormContainerWithTheme: typeof TellescopeFormContainer = ({ paperMinHeight=575, children, language, onChangeLanguage, style, hideBg, backgroundColor, hideLogo, logoURL, logoHeight, maxWidth }) => {
|
|
39
40
|
const theme = useOrganizationTheme()
|
|
40
41
|
|
|
42
|
+
const resolvedLogoURL = logoURL || theme.logoURL
|
|
43
|
+
|
|
41
44
|
const formContent = (
|
|
42
45
|
<Flex flex={1} column>
|
|
43
46
|
{hideLogo
|
|
44
47
|
? null
|
|
45
|
-
:
|
|
48
|
+
: resolvedLogoURL
|
|
46
49
|
? (
|
|
47
50
|
<Flex alignItems="center" justifyContent={"center"} style={{ height: logoHeight || LOGO_HEIGHT, marginTop: 10 }}>
|
|
48
|
-
<img src={
|
|
51
|
+
<img src={resolvedLogoURL} alt={theme.name} style={{ height: logoHeight || LOGO_HEIGHT, maxWidth: 225 }} /> {/* todo: replace with something that resolves better for native */}
|
|
49
52
|
</Flex>
|
|
50
53
|
)
|
|
51
54
|
: (
|
|
@@ -801,6 +804,7 @@ const TellescopeFormWithContext: typeof TellescopeForm = (props) => {
|
|
|
801
804
|
return (
|
|
802
805
|
<TellescopeFormContainer style={props.style} dontAddContext
|
|
803
806
|
hideBg={props.hideBg || props.form?.customization?.hideBg}
|
|
807
|
+
logoURL={props.form?.customization?.logoURL}
|
|
804
808
|
logoHeight={props.logoHeight}
|
|
805
809
|
backgroundColor={props.backgroundColor}
|
|
806
810
|
hideLogo={props?.customization?.hideLogo}
|
package/src/Forms/forms.v2.tsx
CHANGED
|
@@ -9,14 +9,15 @@ import { FormResponseAnswerFileValue, OrganizationTheme } from "@tellescope/type
|
|
|
9
9
|
import { calculate_form_scoring, 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
|
-
export const TellescopeFormContainerV2 = ({ businessId, organizationIds, ...props } : {
|
|
13
|
-
businessId?: string,
|
|
14
|
-
organizationIds?: string[],
|
|
12
|
+
export const TellescopeFormContainerV2 = ({ businessId, organizationIds, ...props } : {
|
|
13
|
+
businessId?: string,
|
|
14
|
+
organizationIds?: string[],
|
|
15
15
|
dontAddContext?: boolean,
|
|
16
|
-
children: React.ReactNode,
|
|
16
|
+
children: React.ReactNode,
|
|
17
17
|
hideBg?: boolean,
|
|
18
18
|
backgroundColor?: string,
|
|
19
19
|
hideLogo?: boolean,
|
|
20
|
+
logoURL?: string,
|
|
20
21
|
logoHeight?: number,
|
|
21
22
|
language?: string,
|
|
22
23
|
onChangeLanguage?: (l: string) => void,
|
|
@@ -632,10 +633,10 @@ export const TellescopeSingleQuestionFlowV2: typeof TellescopeFormV2 = ({
|
|
|
632
633
|
|
|
633
634
|
{/* V2: Logo below progress bar, left-aligned */}
|
|
634
635
|
{!customization?.hideLogo && (
|
|
635
|
-
theme?.logoURL
|
|
636
|
+
(customization?.logoURL || theme?.logoURL)
|
|
636
637
|
? (
|
|
637
638
|
<Flex alignItems="flex-start" style={{ marginBottom: '20px' }}>
|
|
638
|
-
<img src={theme
|
|
639
|
+
<img src={customization?.logoURL || theme?.logoURL} alt={theme?.name} style={{ height: customization?.logoHeight || LOGO_HEIGHT, maxWidth: 225 }} />
|
|
639
640
|
</Flex>
|
|
640
641
|
)
|
|
641
642
|
: (
|