acaciasoft-internal-ticketing

1.1.12 • Public • Published

Acaciasoft Internal Ticketing

A reusable Vue 3 widget for submitting internal tickets. It helps teams intake work requests efficiently by collecting the necessary information and sending it to the backend system.


✨ Features

  • 📋 Easy work request intake with custom config
  • 🔒 Secure integration using access tokens
  • 🧹 Pluggable and self-contained widget
  • 🎨 Styled with Tailwind CSS
  • ⚙️ Powered by Vue 3 and Vite

📚 Table of Contents


📆 Installation

You can install the widget via NPM:

npm install acaciasoft-internal-ticketing

Alternatively, use the widget directly from a CDN:

<!-- vue -->
<script src="https://unpkg.com/vue@3/dist/vue.global.prod.js"></script>

<!-- Stylesheet -->
<link rel="stylesheet" href="https://unpkg.com/acaciasoft-internal-ticketing@latest/dist/acaciasoft-internal-ticketing.css" />

<!-- UMD Script -->
<script src="https://unpkg.com/acaciasoft-internal-ticketing@latest/dist/acacia-ticketing.umd.js"></script>

🚀 Usage

Basic Setup (via NPM)

import AcaciaTicketing from 'acaciasoft-internal-ticketing';
import 'acaciasoft-internal-ticketing/dist/acaciasoft-internal-ticketing.css';

const ticketing = new AcaciaTicketing();

ticketing.config({
  url: 'https://',
  name: 'John Doe',
  email: 'john@example.com',
  projectId: 5,
  clientId: 12,
  token: 'your-token',
  containerId: '#container' // Optional
});

ticketing.init();

CDN Setup (via UNPKG)

<!-- vue -->
<script src="https://unpkg.com/vue@3/dist/vue.global.prod.js"></script>

<!-- Stylesheet -->
<link rel="stylesheet" href="https://unpkg.com/acaciasoft-internal-ticketing@latest/dist/acaciasoft-internal-ticketing.css" />

<!-- UMD Script -->
<script src="https://unpkg.com/acaciasoft-internal-ticketing@latest/dist/acacia-ticketing.umd.js"></script>

<!-- Container -->
<div id="container"></div>

<!-- Init Script -->
<script>
  //make sure the DOM is loaded
  window.addEventListener('DOMContentLoaded', () => {
    const ticketing = new AcaciaTicketing();
    ticketing.config({
      url: 'https://',
      name: 'John Doe',
      email: 'john@example.com',
      projectId: 5,
      clientId: 12,
      containerId: '#container',
      token: 'your-token'
    });
    ticketing.init();
  });
</script>

You can replace @latest with a specific version like @1.1.4 to lock to a known version.

More Flexible Setup (via NPM and CDN)

ticketing
  .setUrl('https://')
  .setToken('your-token')
  .setClientId(12)
  .setProjectId(5)
  .setUser({ name: 'John Doe', email: 'john@example.com' })
  .setContainerId('#container')
  .init();

// Or use more granular methods:
ticketing
  .setUrl('https://')
  .setToken('your-token')
  .setClientId(12)
  .setProjectId(5)
  .setName('John Doe')
  .setEmail('john@example.com')
  .init();

HTML Container

Ensure the container element exists and loaded in DOM:

<div id="container"></div>

⚙️ Configuration Options

Option Type Required Description
name string The full name of the requester.
email string Email address for the ticket.
projectId number Internal project identifier.
clientId number Identifier for the requesting client.
token string Access token to secure the request.
url string The URL endpoint for the request.
containerId string The element ID to mount the widget into (default: #acacia-ticketing).

🛠️ Development

npm run dev     # Start local dev server
npm run build   # Build for production
npm run preview # Preview the production build

📁 Build Outputs

The dist/ folder contains the final build files:

dist/
├── acacia-ticketing.es.js              # ESM version for modern bundlers
├── acacia-ticketing.umd.js             # UMD version for use in <script> tags
└── acaciasoft-internal-ticketing.css   # Standalone CSS file

🧹 Tech Stack

  • Vue 3
  • Tailwind CSS
  • Vite
  • Vee-Validate + Yup
  • Vue3 Toastify

👤 Author

Acaciasoft


📄 License

ISC

Package Sidebar

Install

npm i acaciasoft-internal-ticketing

Weekly Downloads

11

Version

1.1.12

License

ISC

Unpacked Size

612 kB

Total Files

7

Last publish

Collaborators

  • mrlonzanida