Constructor
new VlocityDCSignin()
Example
Sample Usage -
Include the component in your template by adding <vlocity-dc-signin> custom tag
<vlocity-dc-signin></vlocity-dc-signin>
KEY INFO -
events fired : "vlocity-dc-checkout-success"
events registered :
| Event Name | Event source component | Callback Function | Description |
|--------------------------|-----------------------------|--------------------|--------------------------|
| vlocity-dc-sign-in | vlocity-dc-checkout | doSignIn() | Event triggered to login |
Dependency - vlocity-dc-signin is an independent component and has no dependency on any parent component.
Sample with slots -
<vlocity-dc-signin>
<span slot="{slot_name}">
Custom HTML elements goes here
</span>
</vlocity-dc-signin>
List of available slots -
| Slot names | Dynamic | Description | Impact |
|------------------------|-------------|---------------------------------|------------------------------|
| dc-login-radio-toggle | - | Wrapper for login radio buttons | Replaces login radio buttons |
| dc-sign-up | - | Wrapper for sign-up form | Replaces sign-up form |
| dc-sign-up | - | Wrapper for sign-in form | Replaces sign-in form |
Extends
- LitElement
Methods
(static) checkValidationErrors()
Method to validate the form inputs.
(async, static) doSignIn()
Method to do the login.
(async, static) doSignUp()
Method to do the sign-up.
(static) getValidEmail(String)
Method to check given input is valid email or not.
Parameters:
Name | Type | Description |
---|---|---|
String |
(static) handleLoginFailure()
A custom function to be used by customers for handling api failures
(static) handleSignInFormChange(Object)
Method to handle sign-in form changes.
Parameters:
Name | Type | Description |
---|---|---|
Object |
event |
(static) handleSignUpFailure()
A custom function to be used by customers for handling api failures
(static) signInPostHook()
A custom function to be used by customers for customisation, any custom action after fetch offers call can be written here
(static) signInPreHook()
A custom function to be used by customers for customisation, any custom action prior to fetch offers call can be written here
(static) signInPreSDKCalls()
This function is used to do any changes prior to sdk calls
(static) signInProcessResponse(response)
This function is used to process signIn response
Parameters:
Name | Type | Description |
---|---|---|
response |
object | Response Object from SDK call. |
(static) signInSDKCall()
This function is used to do actual sdk calls
(static) signUpGetInput()
Function to fetch the sign in user sdk call inputs
(static) signUpPostHook()
A custom function to be used by customers for customisation, any custom action after fetch offers call can be written here
(static) signUpPreSDKCalls()
This function is used to do any changes prior to sdk calls
(static) signUpProcessResponse(response)
This function is used to process signUp response
Parameters:
Name | Type | Description |
---|---|---|
response |
object | Response Object from SDK call. |
(static) signUpSDKCall()
This function is used to do actual sdk calls