0.1.94 • Published 2 years ago

smartflow-new-app v0.1.94

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Instalation in react

The web component can be integrated as in the example bellow, but first you need to have the api key.

import React from "react";
import "./App.css";
import { QualifiedElectronicSignature } from "smartflow-new-app";
function App() {
  return (
    <div className="App">
      <QualifiedElectronicSignature
        apiKey="xxxxxxxxxxx"
        fullMode={true}
        env={"prod"}
      />
    </div>
  );
}
export default App;

Installation for angular

  • Install package from npm npm i smartflow-new-app and BootStrap npm install -D -S bootstrap)

  • Update tsconfig.json -> add “jsx”:”react” ad compile options

  • Install react and react-dom and import in wrapper component npm i --save -D @types/react @types/react-dom)

  • For every exported component by smart-flow package, create an wrapper angular component: import { QualifiedElectronicSignature } from 'smartflow-new-app';

  • Add in template mounting point for package component: template: '<div #customReactComponentContainer></div>',

  • Select mounting point using

 @ViewChild(containerElementName, { static: true }) containerRef!: ElementRef;
  • Create a const variable: const containerElementName = 'customReactComponentContainer';

  • Create a render method:

private render() {
    const props: any = {
      apiKey: 'lPgMzXhiyLu7mb2lmgr9ALzjsAV0MI7d',
      env: 'preprod',
    };

    ReactDOM.render(
      React.createElement(QualifiedElectronicSignature, props),
      this.containerRef.nativeElement
    );
  }
  • On ngAfterViewInit call render function

  • The final version should look like this:

import { ElementRef, ViewChild } from '@angular/core';
import { Component } from '@angular/core';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { QualifiedElectronicSignature } from 'smartflow-new-app';
const containerElementName = 'customReactComponentContainer';
@Component({
  selector: 'app-root',
  template: '<div #customReactComponentContainer></div>',
  styleUrls: ['./app.component.css'],
})
export class AppComponent {
  @ViewChild(containerElementName, { static: true }) containerRef!: ElementRef;

  private render() {
    const props: any = {
      apiKey: 'lPgMzXhiyLu7mb2lmgr9ALzjsAV0MI7d',
      env: 'preprod',
    };
    ReactDOM.render(
      React.createElement(QualifiedElectronicSignature, props),
      this.containerRef.nativeElement
    );
  }

  ngAfterViewInit(): void {
    this.render();
  }
}
  • Start the project with ng serve –port 3000
0.1.90

2 years ago

0.1.91

2 years ago

0.1.92

2 years ago

0.1.93

2 years ago

0.1.94

2 years ago

0.1.89

2 years ago

0.1.87

2 years ago

0.1.86

2 years ago

0.1.85

2 years ago

0.1.84

2 years ago

0.1.83

2 years ago

0.1.82

2 years ago

0.1.81

2 years ago

0.1.80

2 years ago

0.1.79

2 years ago

0.1.78

2 years ago

0.1.77

2 years ago

0.1.76

2 years ago

0.1.75

2 years ago

0.1.74

2 years ago

0.1.73

2 years ago

0.1.72

2 years ago

0.1.71

2 years ago

0.1.70

2 years ago

0.1.69

2 years ago

0.1.68

2 years ago

0.1.67

2 years ago

0.1.64

2 years ago

0.1.63

2 years ago

0.1.62

2 years ago

0.1.61

2 years ago

0.1.60

2 years ago

0.1.59

2 years ago

0.1.58

2 years ago

0.1.57

2 years ago

0.1.56

2 years ago

0.1.55

2 years ago

0.1.54

2 years ago

0.1.53

2 years ago

0.1.52

2 years ago

0.1.51

2 years ago

0.1.50

2 years ago

0.1.49

2 years ago

0.1.48

2 years ago

0.1.47

2 years ago

0.1.46

2 years ago

0.1.45

2 years ago

0.1.44

2 years ago

0.1.43

2 years ago

0.1.42

2 years ago

0.1.41

2 years ago

0.1.40

2 years ago

0.1.39

2 years ago

0.1.38

2 years ago

0.1.37

2 years ago

0.1.36

2 years ago

0.1.35

2 years ago

0.1.34

2 years ago

0.1.33

2 years ago

0.1.32

2 years ago

0.1.31

2 years ago

0.1.30

2 years ago

0.1.29

2 years ago

0.1.28

2 years ago

0.1.27

2 years ago

0.1.26

2 years ago

0.1.25

2 years ago

0.1.24

2 years ago

0.1.23

2 years ago

0.1.22

2 years ago

0.1.21

2 years ago

0.1.20

2 years ago

0.1.19

2 years ago

0.1.18

2 years ago

0.1.17

2 years ago

0.1.16

2 years ago

0.1.15

2 years ago

0.1.14

2 years ago

0.1.13

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago