2.0.2-rc4 • Published 10 months ago

@enaio-client/communication-library v2.0.2-rc4

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

@enaio-client/communication-library

Description

The Communication Library facilitates secure cross-origin communication between the enaio® webclient and dashlets/modal dialogs, using window.postMessage(). This library streamlines the process, ensuring compatibility with the enaio® client, and offers an effortless solution for managing postMessage communication, enhancing the usability and interoperability of your applications.

Installation

In a Node.js Project

npm install @enaio-client/communication-library

In a Browser Project

Include the library directly in your HTML file:

<script src="path/to/communication-library/dist/communication-library.js"></script>

Usage

In a Node.js Environment

Import the library using CommonJS or ES6 module syntax:

CommonJS:

const lib = require('@enaio-client/communication-library');

ES6:

import * as lib from '@enaio-client/communication-library';

In a Browser Environment

Access the library using the global variable defined in your build configuration:

var lib = window.CommunicationLibrary;

Examples

Register Initialization Callback

lib.registerOnInitCallback(onInit);

function onInit(data) {
  // Initialization logic here
}

Open Index Data

async function openIndexData() {
  try {
    await lib.openIndexData(false, 'edit', 'objectId');
  } catch (error) {
    console.error(error);
  }
}

Building the Package

To build the package, run:

npm run build

This will generate a bundled file in the dist folder.

Testing

To test the package, run:

npm test

This will execute tests defined in your karma.conf.js file.

Repository

Git Repository

Keywords

  • optimal-systems
  • enaio
  • communication-library

License

This project is licensed under the ISC License.

2.0.1

11 months ago

2.0.0

1 year ago

2.0.2-rc1

11 months ago

2.0.2-rc5

10 months ago

2.0.2-rc4

10 months ago

2.0.2-rc3

10 months ago

2.0.2-rc2

11 months ago

2.0.1-rc2

1 year ago

2.0.1-rc1

1 year ago

2.0.1-rc4

11 months ago

2.0.1-rc3

11 months ago

2.0.1-rc5

11 months ago

2.0.0-rc

1 year ago

2.0.2-rc6

10 months ago

2.0.0-rc1

1 year ago

1.3.1

1 year ago

1.3.0-rc.8

1 year ago

1.3.0-rc.2

1 year ago

1.3.0-rc.3

1 year ago

1.3.0-rc.6

1 year ago

1.3.0-rc.7

1 year ago

1.3.0-rc.4

1 year ago

1.3.0-rc.5

1 year ago

1.3.0

1 year ago

1.0.0-rc.26

1 year ago

1.3.0-rc.1

1 year ago

1.0.0-rc.27

1 year ago

1.0.0-rc.25

1 year ago

1.0.0-rc.24

1 year ago

1.0.0-rc.23

1 year ago

1.0.0-rc.22

1 year ago

1.2.101

1 year ago

1.2.100

1 year ago

1.2.1-rc2

1 year ago

1.2.1-rc1

1 year ago

1.2.1

1 year ago

1.0.0-rc.21

1 year ago

1.0.0-rc.20

1 year ago

1.0.0-rc.19

1 year ago

1.0.0-rc.17

1 year ago

1.0.0-rc.16

1 year ago

1.0.0-rc.15

1 year ago

1.0.0-rc.14

1 year ago

1.0.0-rc.13

1 year ago

1.0.0-rc.12

1 year ago

1.0.0-rc.11

1 year ago

1.0.0-rc.10

1 year ago

1.0.0-rc.9

1 year ago

1.0.0-rc.8

1 year ago

1.0.0-rc.7

1 year ago

1.0.0-rc.6

1 year ago

1.0.0-rc.5

1 year ago

1.0.0-rc.4

1 year ago

1.0.0-rc.3

1 year ago

1.0.0-rc.2

1 year ago

1.0.0-rc.1

1 year ago