trakiframetest
TypeScript icon, indicating that this package has built-in type declarations

0.0.9 • Public • Published

Trak Iframe

Trak Iframe

Iframe to load authorised trak urls
Explore Trak »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started

About The Project

Trak Iframe focusing to embeded authorised way of showing websites inside a Iframe.

Getting Started

Trak Iframe

Installation

_Below is an example of how we can add trak iframe into your project.

  1. Install Trak Iframe Package

    Using Npm

        npm install trakiframe

    Using Yarn

        yarn add trakiframe
  2. Import Trak Iframe
         const TrakComponent = require('trakiframe');
    or
      import * as Trak from 'trakiframe';
  3. Initialize Trak Iframe with Token using init method
     TrakComponent.init({
         token: 'Token',
     })
    using init method with publickey and token
     TrakComponent.init({
         token: 'Token',
         publicKey: <---key---->
     })
    or using init method encrypting using package function
     TrakComponent.init({
         token: TrakComponent.encrypt(token),
     })
  4. Load iframe using show method eg: button Click
        TrakComponent.show({...});
         const mountComponent = () => {
             TrakComponent.show({
                 'physiotherapist_name': 'fer',
                 'patient_name': 'qqqq',
                 'component': 'metrics',
             })
         }
         <button onClick={mountComponent}>Click</button>
  5. Remove iframe using remove method
        TrakComponent.remove();

In Angular style fix

Import styles from package to app

1.in Angular.json file projects -> demo -> architect -> build -> options -> styles

add
```json 
    "./node_modules/trakiframe/trakStyle.css"
```

License

Distributed under the MIT License. See LICENSE.txt for more information.

/trakiframetest/

    Package Sidebar

    Install

    npm i trakiframetest

    Weekly Downloads

    2

    Version

    0.0.9

    License

    ISC

    Unpacked Size

    13.6 kB

    Total Files

    8

    Last publish

    Collaborators

    • traktest