1.0.2 • Published 8 months ago

complitech-sdk v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

CompliTech SDK

A flexible and easy-to-use SDK for integrating CompliTech registration forms into any JavaScript project. Available for vanilla JavaScript, React, and Vue.js applications.

Features

  • 📝 Simple registration form collection (name, phone, email, type)
  • 🎨 Pre-styled and responsive design
  • ⚡ Framework-specific versions (React & Vue.js)
  • 🔄 Pre-filled data support
  • 🌐 Browser compatibility via CDN
  • 📦 npm package support

Installation

You can install the CompliTech SDK using npm:

npm install complitech-sdk

Or include it directly via CDN:

<script src="https://unpkg.com/complitech-sdk@1.0.0/lib/complitech-sdk.js"></script>

Usage

Vanilla JavaScript

<!-- Add container to your HTML -->
<div id="complitech-container"></div>

<script>
  // Initialize the SDK
  const sdk = new CompliTechSDK();
  sdk.init('complitech-container');

  // Or initialize with pre-filled data
  const sdk = new CompliTechSDK({
    name: 'John Doe',
    phone: '1234567890',
    email: 'john@example.com',
    type: 'company'
  });
  sdk.init('complitech-container');
</script>

React

import { CompliTechFormReact } from 'complitech-sdk';

function App() {
  // Basic usage
  return <CompliTechFormReact />;

  // With pre-filled data
  const preFillData = {
    name: 'John Doe',
    phone: '1234567890',
    email: 'john@example.com',
    type: 'company'
  };

  return <CompliTechFormReact preFillData={preFillData} />;
}

Vue.js

<template>
  <CompliTechFormVue :preFillData="preFillData" />
</template>

<script>
import { CompliTechFormVue } from 'complitech-sdk';

export default {
  components: {
    CompliTechFormVue
  },
  data() {
    return {
      // Optional pre-filled data
      preFillData: {
        name: 'John Doe',
        phone: '1234567890',
        email: 'john@example.com',
        type: 'company'
      }
    }
  }
}
</script>

Configuration Options

Pre-filled Data Object

PropertyTypeDescription
namestringUser's full name
phonestringUser's phone number
emailstringUser's email address
typestringRegistration type ('company', 'business', 'TIN')

Browser Support

The SDK supports all modern browsers:

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)

Development

To contribute to the development of this SDK:

  1. Clone the repository
  2. Install dependencies: npm install
  3. Make your changes
  4. Submit a pull request

License

MIT License - see the LICENSE.md file for details

Support

For support, please open an issue in the GitHub repository or contact support@complitech.pro

Security

If you discover any security-related issues, please email security@complitech.pro instead of using the issue tracker.

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago