1.0.2 • Published 8 months ago
complitech-sdk v1.0.2
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
Property | Type | Description |
---|---|---|
name | string | User's full name |
phone | string | User's phone number |
string | User's email address | |
type | string | Registration 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:
- Clone the repository
- Install dependencies:
npm install
- Make your changes
- 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.