@tellescope/react-components 1.244.2 → 1.244.4
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/form_responses.js +1 -1
- package/lib/cjs/Forms/form_responses.js.map +1 -1
- package/lib/cjs/Forms/inputs.d.ts.map +1 -1
- package/lib/cjs/Forms/inputs.js +14 -1
- package/lib/cjs/Forms/inputs.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/form_responses.js +1 -1
- package/lib/esm/Forms/form_responses.js.map +1 -1
- package/lib/esm/Forms/forms.d.ts +3 -3
- package/lib/esm/Forms/forms.v2.d.ts +3 -3
- package/lib/esm/Forms/inputs.d.ts +2 -2
- package/lib/esm/Forms/inputs.d.ts.map +1 -1
- package/lib/esm/Forms/inputs.js +14 -1
- package/lib/esm/Forms/inputs.js.map +1 -1
- 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 +330 -330
- 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 +9 -9
- package/src/Forms/form_responses.tsx +1 -1
- package/src/Forms/inputs.tsx +12 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tellescope/react-components",
|
|
3
|
-
"version": "1.244.
|
|
3
|
+
"version": "1.244.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/cjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
"@reduxjs/toolkit": "1.9.0",
|
|
52
52
|
"@stripe/react-stripe-js": "2.9.0",
|
|
53
53
|
"@stripe/stripe-js": "1.52.1",
|
|
54
|
-
"@tellescope/constants": "1.244.
|
|
55
|
-
"@tellescope/sdk": "1.244.
|
|
56
|
-
"@tellescope/types-client": "1.244.
|
|
57
|
-
"@tellescope/types-models": "1.244.
|
|
58
|
-
"@tellescope/types-utilities": "1.244.
|
|
59
|
-
"@tellescope/utilities": "1.244.
|
|
60
|
-
"@tellescope/validation": "1.244.
|
|
54
|
+
"@tellescope/constants": "1.244.4",
|
|
55
|
+
"@tellescope/sdk": "1.244.4",
|
|
56
|
+
"@tellescope/types-client": "1.244.4",
|
|
57
|
+
"@tellescope/types-models": "1.244.4",
|
|
58
|
+
"@tellescope/types-utilities": "1.244.4",
|
|
59
|
+
"@tellescope/utilities": "1.244.4",
|
|
60
|
+
"@tellescope/validation": "1.244.4",
|
|
61
61
|
"css-to-react-native": "3.0.0",
|
|
62
62
|
"draft-js": "0.11.7",
|
|
63
63
|
"draftjs-to-html": "0.9.1",
|
|
@@ -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": "838dd43ad5ba465b2f0fcbeda4808b38cb20c2f7",
|
|
88
88
|
"publishConfig": {
|
|
89
89
|
"access": "public"
|
|
90
90
|
}
|
|
@@ -49,7 +49,7 @@ export const ResponseAnswer = ({ formResponse, fieldId, isHTML, answer: a, print
|
|
|
49
49
|
)}
|
|
50
50
|
</div>
|
|
51
51
|
)
|
|
52
|
-
: a.value === '_question_group' ? <></>
|
|
52
|
+
: (a.value === '_question_group' || a.type === 'Question Group') ? <></>
|
|
53
53
|
: a.type === 'ranking'
|
|
54
54
|
? <ol style={{ margin: 0 }}>
|
|
55
55
|
{a.value.map((t, i) =>
|
package/src/Forms/inputs.tsx
CHANGED
|
@@ -5198,9 +5198,19 @@ export const ChargeebeeInput = ({ field, value, onChange, setCustomerId, respons
|
|
|
5198
5198
|
? addressResponse.answer.value as { addressLineOne?: string, addressLineTwo?: string, city?: string, state?: string, zipCode?: string }
|
|
5199
5199
|
: undefined
|
|
5200
5200
|
|
|
5201
|
+
const PUBLIC_FORM_ADDRESS_ERROR = 'A complete address question is required before a Chargebee payment field on public forms'
|
|
5202
|
+
|
|
5201
5203
|
session.api.form_responses.chargebee_details({ fieldId: field.id, billingAddress })
|
|
5202
5204
|
.then(({ url }) => setUrl(url ?? ''))
|
|
5203
|
-
.catch(
|
|
5205
|
+
.catch((err: any) => {
|
|
5206
|
+
const message = typeof err === 'string' ? err : (err?.message ?? err?.toString() ?? '')
|
|
5207
|
+
if (message === PUBLIC_FORM_ADDRESS_ERROR) {
|
|
5208
|
+
setError(PUBLIC_FORM_ADDRESS_ERROR)
|
|
5209
|
+
} else {
|
|
5210
|
+
console.error('[ChargebeeInput] failed to load checkout:', err)
|
|
5211
|
+
setError('Something went wrong loading the payment form. Please try again.')
|
|
5212
|
+
}
|
|
5213
|
+
})
|
|
5204
5214
|
}, [session])
|
|
5205
5215
|
|
|
5206
5216
|
const loadAnswerRef = useRef(false)
|
|
@@ -5243,6 +5253,7 @@ export const ChargeebeeInput = ({ field, value, onChange, setCustomerId, respons
|
|
|
5243
5253
|
</Grid>
|
|
5244
5254
|
)
|
|
5245
5255
|
}
|
|
5256
|
+
if (!url && error) return <Typography color="error">{error}</Typography>
|
|
5246
5257
|
if (!url) return <LinearProgress />
|
|
5247
5258
|
return (
|
|
5248
5259
|
<>
|