1.1.11 • Published 2 days ago

@vergelijkdirect/comparison-forms v1.1.11

Weekly downloads
-
License
ISC
Repository
bitbucket
Last release
2 days ago

Vergelijkdirect comparison forms

This project designed to provide single source of true for insurances forms. It supports two mode: standalone and embedded. Standalone designed as SSR application, with its own server and clients sides. Can be implemented due i-frame anywhere. Embedded version using node dependency comparison-forms, that can be downloaded from NPM.

How to install

Standalone mode

1.Insert i-frame tag anywhere in your project, with next data:

QueryparamsMeaningExample
Page addressCorresponds to type of form/motor-form
linkIndicate address, where user should be redirected after forms submit&link=verzekeringen/results-page
titleSpecify forms title&title=Motorverzekering vergelijken
full-form-widthSpecify, should form has 100% width of parent component, or should has strong standard borders&full-form-width=true

Example: <iframe src="localhost:3000/motor-form?link=http://google.com"&has-new-design=1&title=Motorverzekering vergelijken&full-form-width=true">

Embedded mode

1.Install package @vergelijkdirect/comparison-forms (Strongly recommend to use exact version of package)

npm i @vergelijkdirect/comparison-forms --save-exact

2.Ensure, that version of Vue is >2.7.14, and version of Node is 20.6.1 3.In entry js file (for example vd-partner.ts in partner-front) import comparisonFormsPlugin

import comparisonFormsPlugin from '@vergelijkdirect/comparison-forms';

4.Make Vue use plugin

Vue.use(comparisonFormsPlugin);

5.During creating vue-instance of app, add property:

provide: { 'ITC': Vue.prototype.$transmissionClient },

6.For correct work of styles add globally or in correspond component styles import

import '@vergelijkdirect/comparison-forms/styles';

7.Use component to render appropriate form. Below indicated props types:

PropsType/requiredMeaningExample
form-componentString/YesCorresponds to type of formmotor-form
linkString/NoIndicate address, where user should be redirected after forms submit&link=verzekeringen/results-page
has-new-designBoolean/NoIndicate which version of form styles implemented. Missing value or false mean old form, true - new redesign form (non-required)true
is-on-result-pageBoolean/NoIndicate is form used for aanvragen flow (result page, coverages page etc), or for starting landing page (for exampple VD project)true
is-on-coverage-pageBoolean/NoIndicate is form used for aanvragen flow (coverages page), or for starting landing page (for exampple VD project)true
classesString/NoIndicate which classes should be implemented for root element (vd-form-card)vd-form-flat
insurance-stateObject/NoThere should be indicated object with data for insurance. Used to show data in inputs, if user already filled in form.for motor insurance can be included object motorState from store
user-informationObject/NoThere should be indicated object with user's data. Used to show data in inputs, if user already filled in form.Usually it's userInformation object from store
base-urlString/NoBase url should be used only for loans create forms, specify base url/
titleString/NoSpecify title of form (by default has value vergelijken)Motorverzekering vergelijken
show-titleBoolean/NoBoolean, that specify should title, in title prop be showed (Use value false, if there is external modal title, to prevent double titles)false
form-orientationString/NoSpecify form orientation (Vertical or Horizontal) Should be used only for create loan formVertical
comparisonComparison/NoPass existing comparison for update actions in form. Required value for loans upgrade formComparison instance object
statusString/NoNow used only for travels, but will be implement instead of is-on-result/coverage page. Indicate location of form.IS_ON_FAMILY_PAGE
@changeFunction/NoFunction, that should be called, when user submit form. Has parameters ({ insuranceState: {...}, userInformation: {...} }), that can be used for furtner actions with this dataAny function, that should be called after form submit
@emit-event-hubFunction/NoFunction, that should be called, when user want to use external emit event. Has parameters ({ event: String, data: {...}})emit('emit-event-hub', { event: 'call-some-external-event', data: { ...any data })

Example

            <embedded-comparison-forms
                v-if="isFormOpen"
                @change="submitForm"
                @emit-event="emitEvent"
                :form-component="'motor-form'"
                :user-information="userInformation"
                :insurance-state="motorState"
                :has-new-design="true"
                :is-on-result-page="true"
                :classes="'w-100 vd-form-card--flat'"
                :link="'/'"
                :show-title="false"
            />

THE LIST OF AVAILABLE FORMS

  • motor-form
  • motor-form-horizontal
  • create-loan-comparison-form
  • update-loan-comparison-form
  • car-form
  • car-form-horizontal
  • moped-form
  • moped-form-horizontal
  • pet-form
  • pet-form-horizontal
  • bike-form
  • bike-form-horizontal
  • caravan-form
  • caravan-form-horizontal
  • liability-form
  • liability-form-horizontal
  • travel-form
  • travel-form-horizontal
  • legal-assistance-form
  • legal-assistance-form-horizontal
  • house-form
  • house-form-horizontal
  • package-form

Those names should be used in form-component prop for embedded mode, or for link address for standalone version, and should be exact as in this list.

NOTICE: If there is :link prop, user will be redirected to this address with appropriate queryparams.

Embedded mode Comparison forms commands

  • npm run watch - launch dev mode SSR app
  • npm run serve - launch prod mode SSR app
  • npm run test - launch test mode SSR app
  • npm run build - make build
  • npm run rollup - make rollup of comparison forms
1.1.11

2 days ago

1.1.10

3 days ago

1.1.10-rc.10

6 days ago

1.1.10-rc.7

8 days ago

1.1.10-rc.8

8 days ago

1.1.10-rc.6

8 days ago

1.1.10-rc.9

8 days ago

1.1.10-rc.5

10 days ago

1.1.10-rc.3

13 days ago

1.1.10-rc.4

13 days ago

1.1.10-rc.1

13 days ago

1.1.10-rc.2

13 days ago

1.1.10-rc.0

13 days ago

1.1.9

14 days ago

1.1.8

14 days ago

1.1.8-rc.0

14 days ago

1.1.8-rc.1

14 days ago

1.1.6-rc.5

15 days ago

1.1.6-rc.6

15 days ago

1.1.7

15 days ago

1.1.6

15 days ago

1.1.6-rc.4

16 days ago

1.1.6-rc.0

16 days ago

1.1.6-rc.1

16 days ago

1.1.6-rc.2

16 days ago

1.1.6-rc.3

16 days ago

1.1.5

17 days ago

1.1.4

17 days ago

1.1.3

17 days ago

1.1.2

17 days ago

1.1.1

20 days ago

1.1.0

20 days ago

1.0.216

21 days ago

1.0.213

21 days ago

1.0.215

21 days ago

1.0.214

21 days ago

1.0.200

24 days ago

1.0.206

23 days ago

1.0.205

23 days ago

1.0.208

23 days ago

1.0.207

23 days ago

1.0.202

23 days ago

1.0.201

23 days ago

1.0.204

23 days ago

1.0.203

23 days ago

1.0.211

22 days ago

1.0.210

23 days ago

1.0.212

22 days ago

1.0.209

23 days ago

1.0.198

28 days ago

1.0.199

28 days ago

1.0.197

30 days ago

1.0.194

30 days ago

1.0.193

30 days ago

1.0.196

30 days ago

1.0.195

30 days ago

1.0.190

1 month ago

1.0.192

1 month ago

1.0.191

1 month ago

1.0.189

1 month ago

1.0.187

1 month ago

1.0.186

1 month ago

1.0.188

1 month ago

1.0.185

1 month ago

1.0.183

1 month ago

1.0.182

1 month ago

1.0.184

1 month ago

1.0.181

1 month ago

1.0.180

2 months ago

1.0.176

2 months ago

1.0.178

2 months ago

1.0.177

2 months ago

1.0.175

2 months ago

1.0.172

2 months ago

1.0.171

2 months ago

1.0.174

2 months ago

1.0.173

2 months ago

1.0.170

2 months ago

1.0.165

2 months ago

1.0.164

2 months ago

1.0.167

2 months ago

1.0.166

2 months ago

1.0.161

2 months ago

1.0.169

2 months ago

1.0.160

2 months ago

1.0.159

2 months ago

1.0.154

2 months ago

1.0.153

2 months ago

1.0.156

2 months ago

1.0.155

2 months ago

1.0.152

2 months ago

1.0.151

2 months ago

1.0.158

2 months ago

1.0.157

2 months ago

1.0.149

2 months ago

1.0.148

2 months ago

1.0.150

2 months ago

1.0.143

2 months ago

1.0.145

2 months ago

1.0.144

2 months ago

1.0.147

2 months ago

1.0.146

2 months ago

1.0.142

2 months ago

1.0.141

2 months ago

1.0.140

2 months ago

1.0.139

2 months ago

1.0.132

2 months ago

1.0.134

2 months ago

1.0.133

2 months ago

1.0.136

2 months ago

1.0.135

2 months ago

1.0.138

2 months ago

1.0.137

2 months ago

1.0.131

2 months ago

1.0.130

2 months ago

1.0.121

2 months ago

1.0.120

2 months ago

1.0.123

2 months ago

1.0.122

2 months ago

1.0.129

2 months ago

1.0.128

2 months ago

1.0.125

2 months ago

1.0.124

2 months ago

1.0.127

2 months ago

1.0.126

2 months ago

1.0.118

2 months ago

1.0.117

2 months ago

1.0.119

2 months ago

1.0.116

2 months ago

1.0.115

2 months ago

1.0.112

2 months ago

1.0.111

2 months ago

1.0.114

2 months ago

1.0.113

2 months ago

1.0.107

2 months ago

1.0.106

2 months ago

1.0.109

2 months ago

1.0.108

2 months ago

1.0.105

2 months ago

1.0.110

2 months ago

1.0.104

3 months ago

1.0.103

3 months ago

1.0.101

3 months ago

1.0.102

3 months ago

1.0.100

3 months ago

1.0.99

3 months ago

1.0.98

3 months ago

1.0.97

3 months ago

1.0.88

3 months ago

1.0.87

3 months ago

1.0.89

3 months ago

1.0.91

3 months ago

1.0.90

3 months ago

1.0.94

3 months ago

1.0.93

3 months ago

1.0.92

3 months ago

1.0.96

3 months ago

1.0.84

3 months ago

1.0.86

3 months ago

1.0.85

3 months ago

1.0.83

3 months ago

1.0.82

3 months ago

1.0.81

3 months ago

1.0.80

3 months ago

1.0.79

3 months ago

1.0.78

3 months ago

1.0.73

3 months ago

1.0.72

3 months ago

1.0.71

3 months ago

1.0.70

3 months ago

1.0.77

3 months ago

1.0.76

3 months ago

1.0.75

3 months ago

1.0.74

3 months ago

1.0.69

3 months ago

1.0.68

3 months ago

1.0.66

3 months ago

1.0.65

3 months ago

1.0.64

3 months ago

1.0.67

3 months ago

1.0.62

3 months ago

1.0.63

3 months ago

1.0.60

3 months ago

1.0.59

3 months ago

1.0.58

3 months ago

1.0.57

3 months ago