0.0.1 • Published 22 days ago

@embedded-banking-fundr/pbl-playground v0.0.1

Weekly downloads
-
License
-
Repository
-
Last release
22 days ago

Rabobank Payment Based Lending Web Component

Install

To incorporate the Rabobank Payment Based Lending Web component into your project, install it using npm or yarn:

NPM

npm i @embedded-banking-fundr/rabobank-pbl@stable

Attributes/Properties

Use these properties to configure the Rabo widget and pass them to the widget via the initRaboWidget function. The initRaboWidget returns a cleanup function that should be run everytime the widgets gets removed from the dom. This is to make sure all data in the store gets reset and nothing stays behind.

PropertyDescriptionTypeExampleRequired
apiKeyIdentifier for the partner widget.String"DLS_Widget"x
partnerIdIdentifier for the partner widget.String"DLS_Widget"x
modeMode of the widget.String"sandbox" / "production"
contactDetailsContact person's details.Object
contactDetails.nameContact person's name.String"John"
contactDetails.phoneContact person's phone number.String"123-456-7890"
contactDetails.emailContact person's email address.String"johndoe@example.com"
contactDetails.surnameContact person's surname.String"Doe"
kvkNumberKVK number for the company.String"33236408"
campaignIdCampaign name.String
loanAmountDesired amount for the loanString"10.000"

Usage in Different Frameworks

REACT

import { initRaboWidget } from '@embedded-banking-fundr/rabobank-pbl';
const config = {
  apiKey: 'API_KEY',
  mode: 'sandbox' | 'production',
  partnerId: 'PARTNER_ID',
  //... other config props
}

const cleanupWidget = initRaboWidget(config);

const PblWrapper = () => {
  return (
    <rabobank-pbl></rabobank-pbl>
  );
};

export default PblWrapper;

ANGULAR

Update your app.module.ts to include "CUSTOM_ELEMENTS_SCHEMA":

import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
...

@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        BrowserModule
    ],
    providers: [],
    bootstrap: [AppComponent],
    schemas:[CUSTOM_ELEMENTS_SCHEMA]
})

Then, define your component:

import { Component, ElementRef, Input, ViewChild } from '@angular/core';
import { initRaboWidget } from '@embedded-banking-fundr/rabobank-pbl';

@Component({
  selector: 'app-rabobank-pbl-wrapper',
  template:
    '<rabobank-pbl></rabobank-pbl>',
})
export class PblWrapperComponent {
  @ViewChild('rabobank-pbl') pbl: ElementRef | undefined;
  config = {
    apiKey: 'API_KEY',
    mode: 'sandbox' | 'production',
    partnerId: 'PARTNER_ID',
    //... other config props
  }
  constructor() {
    cleanupWidget = initRaboWidget(config);
  }
}

VUE

<script setup>
import { initRaboWidget } from '@embedded-banking-fundr/rabobank-pbl';
const config = {
  apiKey: 'API_KEY',
  mode: 'sandbox' | 'production',
  partnerId: 'PARTNER_ID',
  //... other config props
};
const cleanupWidget = initRaboWidget(config);
</script>

<template>  
  <rabobank-pbl></rabobank-pbl>
</template>

Styling

Adjust the component's appearance through CSS variables:

<style>
  rabobank-pbl {
    --rabobank-color-primary: #123456;
    --rabobank-color-secondary: #abcdef;
    --rabobank-svg-primary: #123456;
    --rabobank-svg-primary-light: rgba(18, 52, 86, 0.69);
    --rabobank-svg-secondary: #abcdef;
  }
</style>

Event Handling

The component emits several events that you can subscribe to for notifications about various interactions and states. Below is a list of events with their descriptions:

Subscribing to Events

To react to these events, you can subscribe to them anywhere in your application using the subscribeToEvent function. Here's how you can subscribe and handle an event:

import { subscribeToEvent } from '@embedded-banking-fundr/rabobank-pbl';

// Example: Subscribing to the 'started' event
const subscription = subscribeToEvent('started', (data) => {
  console.log('lending origination process started', data);
});

// Remember to unsubscribe when you're done listening to the event
subscription.unsubscribe();

Available Events and Data

Event NameDescriptionData
startedEmitted when user starts the journey.{ partnerId, caseId }
abandonEmitted when a user abandons the lending process, or on time out{ partnerId, caseId, invoiceId? }
concludedEmitted when the lending process is completed and the user closes the widget.{ partnerId, caseId, invoiceId? }
exitEmitted after both abandon and concluded.{ partnerId, caseId, invoiceId? }

This event handling system allows you to monitor and react to various states and interactions within the lending process.

0.0.166

22 days ago

0.0.164

24 days ago

0.0.163

24 days ago

0.0.165

24 days ago

0.0.162

1 month ago

0.0.161

1 month ago

0.0.160

1 month ago

0.0.158

2 months ago

0.0.153

2 months ago

0.0.152

2 months ago

0.0.151

2 months ago

0.0.157

2 months ago

0.0.156

2 months ago

0.0.155

2 months ago

0.0.154

2 months ago

0.0.159-next.0

2 months ago

0.0.151-next.0

2 months ago

0.0.139

2 months ago

0.0.138

2 months ago

0.0.137

2 months ago

0.0.136

2 months ago

0.0.149

2 months ago

0.0.148

2 months ago

0.0.147

2 months ago

0.0.142

2 months ago

0.0.141

2 months ago

0.0.140

2 months ago

0.0.146

2 months ago

0.0.145

2 months ago

0.0.144

2 months ago

0.0.143

2 months ago

0.0.105

2 months ago

0.0.104

2 months ago

0.0.109

2 months ago

0.0.108

2 months ago

0.0.107

2 months ago

0.0.102

2 months ago

0.0.101

2 months ago

0.0.100

2 months ago

0.0.117

2 months ago

0.0.116

2 months ago

0.0.115

2 months ago

0.0.114

2 months ago

0.0.119

2 months ago

0.0.118

2 months ago

0.0.113

2 months ago

0.0.112

2 months ago

0.0.111

2 months ago

0.0.110

2 months ago

0.0.128

2 months ago

0.0.127

2 months ago

0.0.126

2 months ago

0.0.125

2 months ago

0.0.129

2 months ago

0.0.120

2 months ago

0.0.104-next.0

2 months ago

0.0.124

2 months ago

0.0.123

2 months ago

0.0.122

2 months ago

0.0.121

2 months ago

0.0.131

2 months ago

0.0.130

2 months ago

0.0.135

2 months ago

0.0.134

2 months ago

0.0.133

2 months ago

0.0.132

2 months ago

0.0.107-next.0

2 months ago

0.0.84

2 months ago

0.0.85

2 months ago

0.0.86

2 months ago

0.0.87

2 months ago

0.0.88

2 months ago

0.0.89

2 months ago

0.0.80

2 months ago

0.0.81

2 months ago

0.0.82

2 months ago

0.0.83

2 months ago

0.0.73

2 months ago

0.0.74

2 months ago

0.0.75

2 months ago

0.0.76

2 months ago

0.0.77

2 months ago

0.0.78

2 months ago

0.0.79

2 months ago

0.0.70

2 months ago

0.0.71

2 months ago

0.0.72

2 months ago

0.0.62

2 months ago

0.0.63

2 months ago

0.0.64

2 months ago

0.0.65

2 months ago

0.0.66

2 months ago

0.0.67

2 months ago

0.0.68

2 months ago

0.0.69

2 months ago

0.0.61

2 months ago

0.0.99-next.0

2 months ago

0.0.65-next.0

2 months ago

0.0.95

2 months ago

0.0.96

2 months ago

0.0.97

2 months ago

0.0.90

2 months ago

0.0.91

2 months ago

0.0.92

2 months ago

0.0.93

2 months ago

0.0.94

2 months ago

0.0.60

2 months ago

0.0.59

2 months ago

0.0.54

2 months ago

0.0.55

2 months ago

0.0.56

2 months ago

0.0.57

2 months ago

0.0.58

2 months ago

0.0.40

2 months ago

0.0.41

2 months ago

0.0.42

2 months ago

0.0.44

2 months ago

0.0.45

2 months ago

0.0.46

2 months ago

0.0.47

2 months ago

0.0.37

2 months ago

0.0.38

2 months ago

0.0.39

2 months ago

0.0.31

2 months ago

0.0.32

2 months ago

0.0.33

2 months ago

0.0.34

2 months ago

0.0.35

2 months ago

0.0.36

2 months ago

0.0.44-next.0

2 months ago

0.0.51

2 months ago

0.0.52

2 months ago

0.0.53

2 months ago

0.0.50

2 months ago

0.0.48

2 months ago

0.0.49

2 months ago

0.0.30

2 months ago

0.0.29

2 months ago

0.0.28

2 months ago

0.0.27

2 months ago

0.0.26

2 months ago

0.0.25

2 months ago

0.0.24

2 months ago

0.0.23

2 months ago

0.0.22

2 months ago

0.0.21

2 months ago

0.0.20

2 months ago

0.0.19

2 months ago

0.0.18

2 months ago

0.0.17

2 months ago

0.0.16

2 months ago

0.0.15

2 months ago

0.0.14

2 months ago

0.0.13

2 months ago

0.0.12

2 months ago

0.0.11

2 months ago

0.0.10

2 months ago

0.0.9

2 months ago

0.0.8

2 months ago

0.0.8-next.0

2 months ago

0.0.6

2 months ago

0.0.5

2 months ago

0.0.4

2 months ago

0.0.3

2 months ago

0.0.2

2 months ago

0.0.1

2 months ago