@escalated-dev/escalated 0.7.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +380 -357
  3. package/package.json +85 -81
  4. package/src/components/ActiveChatsPanel.vue +246 -246
  5. package/src/components/AdminDashboard.stories.js +1423 -1423
  6. package/src/components/AttachmentList.vue +65 -65
  7. package/src/components/ChatActionBar.vue +226 -226
  8. package/src/components/ChatBubble.vue +162 -162
  9. package/src/components/ChatComposer.vue +308 -308
  10. package/src/components/ChatQueue.vue +222 -222
  11. package/src/components/ChatThread.vue +197 -197
  12. package/src/components/CustomTicketActions.stories.js +71 -0
  13. package/src/components/CustomTicketActions.vue +101 -0
  14. package/src/components/EscalatedLayout.vue +619 -598
  15. package/src/components/FollowButton.vue +20 -1
  16. package/src/components/MentionDropdown.vue +154 -154
  17. package/src/components/MetricComparison.vue +89 -89
  18. package/src/components/PercentileChart.vue +67 -67
  19. package/src/components/PeriodSelector.vue +98 -98
  20. package/src/components/PresenceIndicator.vue +228 -213
  21. package/src/components/ReplyComposer.vue +336 -336
  22. package/src/components/ReplyThread.vue +153 -153
  23. package/src/components/ReportChart.vue +395 -395
  24. package/src/components/ReportExportButton.vue +108 -108
  25. package/src/components/SaveViewDialog.vue +172 -172
  26. package/src/components/SavedViewSidebar.vue +208 -208
  27. package/src/components/SkillTagManager.vue +29 -22
  28. package/src/components/SnoozeButton.vue +247 -247
  29. package/src/components/TicketFilters.vue +270 -270
  30. package/src/components/TicketList.vue +655 -655
  31. package/src/components/TicketSidebar.vue +4 -0
  32. package/src/components/TicketSplitDialog.vue +98 -98
  33. package/src/components/TicketSubjects.stories.js +63 -0
  34. package/src/components/TicketSubjects.vue +107 -0
  35. package/src/components/TwoFactorSetup.vue +1 -37
  36. package/src/components/VariableTokenInput.vue +111 -111
  37. package/src/components/WorkflowActionConfig.vue +287 -287
  38. package/src/components/WorkflowActionList.vue +350 -350
  39. package/src/components/WorkflowConditionBuilder.vue +265 -265
  40. package/src/components/WorkflowTriggerSelector.vue +125 -125
  41. package/src/components/admin/newsletters/AnalyticsTiles.stories.js +14 -0
  42. package/src/components/admin/newsletters/AnalyticsTiles.vue +55 -0
  43. package/src/components/admin/newsletters/DeliveriesTable.stories.js +28 -0
  44. package/src/components/admin/newsletters/DeliveriesTable.vue +104 -0
  45. package/src/components/admin/newsletters/DynamicFilterBuilder.stories.js +11 -0
  46. package/src/components/admin/newsletters/DynamicFilterBuilder.vue +53 -0
  47. package/src/components/admin/newsletters/ListMemberTable.stories.js +12 -0
  48. package/src/components/admin/newsletters/ListMemberTable.vue +53 -0
  49. package/src/components/admin/newsletters/MarkdownEditor.stories.js +6 -0
  50. package/src/components/admin/newsletters/MarkdownEditor.vue +53 -0
  51. package/src/components/admin/newsletters/MergeFieldDropdown.stories.js +6 -0
  52. package/src/components/admin/newsletters/MergeFieldDropdown.vue +84 -0
  53. package/src/components/admin/newsletters/PreviewIframe.stories.js +7 -0
  54. package/src/components/admin/newsletters/PreviewIframe.vue +40 -0
  55. package/src/components/admin/newsletters/SummaryTiles.stories.js +8 -0
  56. package/src/components/admin/newsletters/SummaryTiles.vue +63 -0
  57. package/src/composables/useChat.js +187 -187
  58. package/src/composables/useI18n.js +30 -8
  59. package/src/composables/useMentions.js +134 -134
  60. package/src/composables/usePermissions.js +31 -0
  61. package/src/composables/useRealtime.js +182 -182
  62. package/src/index.js +85 -84
  63. package/src/locales/README.md +13 -0
  64. package/src/locales/ar.json +727 -727
  65. package/src/locales/de.json +690 -690
  66. package/src/locales/en.json +889 -729
  67. package/src/locales/es.json +691 -691
  68. package/src/locales/fr.json +691 -691
  69. package/src/locales/index.js +16 -16
  70. package/src/locales/it.json +727 -727
  71. package/src/locales/ja.json +727 -727
  72. package/src/locales/ko.json +727 -727
  73. package/src/locales/nl.json +727 -727
  74. package/src/locales/pl.json +727 -727
  75. package/src/locales/pt-BR.json +727 -727
  76. package/src/locales/ru.json +727 -727
  77. package/src/locales/tr.json +727 -727
  78. package/src/locales/zh-CN.json +727 -727
  79. package/src/pages/Admin/Newsletters/Compose.vue +192 -0
  80. package/src/pages/Admin/Newsletters/Edit.vue +24 -0
  81. package/src/pages/Admin/Newsletters/Index.vue +141 -0
  82. package/src/pages/Admin/Newsletters/Lists/Create.vue +64 -0
  83. package/src/pages/Admin/Newsletters/Lists/Index.vue +59 -0
  84. package/src/pages/Admin/Newsletters/Lists/Show.vue +53 -0
  85. package/src/pages/Admin/Newsletters/Settings.vue +85 -0
  86. package/src/pages/Admin/Newsletters/Show.vue +140 -0
  87. package/src/pages/Admin/Newsletters/Templates/Create.vue +11 -0
  88. package/src/pages/Admin/Newsletters/Templates/Index.vue +54 -0
  89. package/src/pages/Admin/Newsletters/Templates/Show.vue +65 -0
  90. package/src/pages/Admin/Newsletters/usePreview.js +44 -0
  91. package/src/pages/Admin/Reports/AgentDetail.vue +132 -132
  92. package/src/pages/Admin/Reports/AgentRanking.vue +246 -246
  93. package/src/pages/Admin/Reports/Cohorts.vue +180 -180
  94. package/src/pages/Admin/Reports/Comparison.vue +141 -141
  95. package/src/pages/Admin/Reports/Dashboard.vue +226 -226
  96. package/src/pages/Admin/Reports/ResolutionTimes.vue +164 -164
  97. package/src/pages/Admin/Reports/ResponseTimes.vue +164 -164
  98. package/src/pages/Admin/Reports/SlaTrends.vue +183 -183
  99. package/src/pages/Admin/Settings/SsoSettings.vue +157 -4
  100. package/src/pages/Admin/Settings/TwoFactor.vue +32 -6
  101. package/src/pages/Admin/Settings.vue +1008 -1008
  102. package/src/pages/Admin/Skills/Form.vue +164 -4
  103. package/src/pages/Admin/Skills/Index.vue +14 -3
  104. package/src/pages/Admin/Tickets/Index.vue +126 -126
  105. package/src/pages/Admin/Tickets/Show.vue +254 -249
  106. package/src/pages/Admin/Users/Index.vue +145 -0
  107. package/src/pages/Admin/Workflows/Builder.vue +207 -207
  108. package/src/pages/Admin/Workflows/Index.vue +235 -235
  109. package/src/pages/Admin/Workflows/Logs.vue +286 -286
  110. package/src/pages/Agent/TicketIndex.vue +112 -112
  111. package/src/pages/Agent/TicketShow.vue +547 -494
  112. package/src/pages/Customer/Index.vue +26 -1
  113. package/src/pages/Customer/KnowledgeBase/Article.vue +129 -129
  114. package/src/plugin.js +175 -175
  115. package/src/utils/mentionHighlight.js +24 -24
  116. package/src/widget/EscalatedWidget.vue +804 -804
  117. package/src/widget/index.js +254 -254
package/README.md CHANGED
@@ -1,357 +1,380 @@
1
- <p align="center">
2
- <a href="docs/translations/README.ar.md">العربية</a> •
3
- <a href="docs/translations/README.de.md">Deutsch</a> •
4
- <b>English</b> •
5
- <a href="docs/translations/README.es.md">Español</a> •
6
- <a href="docs/translations/README.fr.md">Français</a> •
7
- <a href="docs/translations/README.it.md">Italiano</a> •
8
- <a href="docs/translations/README.ja.md">日本語</a> •
9
- <a href="docs/translations/README.ko.md">한국어</a> •
10
- <a href="docs/translations/README.nl.md">Nederlands</a> •
11
- <a href="docs/translations/README.pl.md">Polski</a> •
12
- <a href="docs/translations/README.pt-BR.md">Português (BR)</a> •
13
- <a href="docs/translations/README.ru.md">Русский</a> •
14
- <a href="docs/translations/README.tr.md">Türkçe</a> •
15
- <a href="docs/translations/README.zh-CN.md">简体中文</a>
16
- </p>
17
-
18
- <h1>
19
- <img src="https://escalated.dev/apple-touch-icon.png" width="28" style="vertical-align:middle;" />
20
- Escalated
21
- </h1>
22
-
23
- [![Tests](https://github.com/escalated-dev/escalated/actions/workflows/run-tests.yml/badge.svg)](https://github.com/escalated-dev/escalated/actions/workflows/run-tests.yml)
24
- [![npm](https://img.shields.io/npm/v/@escalated-dev/escalated)](https://www.npmjs.com/package/@escalated-dev/escalated)
25
- [![Vue 3](https://img.shields.io/badge/vue-3.x-4FC08D?logo=vue.js&logoColor=white)](https://vuejs.org/)
26
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
27
-
28
- <p align="center">
29
- <img src=".github/profile/demo.gif" alt="Escalated demo: filing a ticket and replying from the agent inbox" width="800" />
30
- </p>
31
-
32
- Escalated is an embeddable support ticket system with SLA tracking, escalation rules, agent workflows, and a customer portal. This repo contains all the shared frontend assets (Vue 3 + Inertia.js) used across every supported backend framework.
33
-
34
- 👉 **Learn more, view demos, and compare Cloud vs Self-Hosted options at** **[https://escalated.dev](https://escalated.dev)**
35
-
36
- **You don't install this package directly.** Start with the backend package for your framework — it handles everything including pulling in these frontend assets.
37
-
38
- ## Features
39
-
40
- - **Ticket splitting** — Split a reply into a new standalone ticket while preserving context
41
- - **Ticket snooze** — Snooze tickets with presets (1h, 4h, tomorrow, next week) and automatic wake
42
- - **Saved views / custom queues** — Save, name, and share filter presets as reusable ticket views
43
- - **Embeddable support widget** — Drop-in `<script>` widget with KB search, ticket form, and status check
44
- - **Real-time updates** — WebSocket support (Pusher/Reverb/Soketi) with automatic polling fallback
45
- - **Knowledge base toggle** — Enable or disable the public knowledge base from admin settings
46
- - **CI: ESLint + Prettier** — Automated code style enforcement on every pull request
47
-
48
- ## Get Started
49
-
50
- Pick your framework:
51
-
52
- | Framework | Repo | Install |
53
- |-----------|------|---------|
54
- | **Laravel** | [escalated-dev/escalated-laravel](https://github.com/escalated-dev/escalated-laravel) | `composer require escalated-dev/escalated-laravel` |
55
- | **Rails** | [escalated-dev/escalated-rails](https://github.com/escalated-dev/escalated-rails) | `gem "escalated"` |
56
- | **Django** | [escalated-dev/escalated-django](https://github.com/escalated-dev/escalated-django) | `pip install escalated-django` |
57
- | **AdonisJS** | [escalated-dev/escalated-adonis](https://github.com/escalated-dev/escalated-adonis) | `npm install @escalated-dev/escalated-adonis` |
58
- | **WordPress** | [escalated-dev/escalated-wordpress](https://github.com/escalated-dev/escalated-wordpress) | [Download escalated.zip](https://github.com/escalated-dev/escalated-wordpress/releases/latest) |
59
- | **Filament** | [escalated-dev/escalated-filament](https://github.com/escalated-dev/escalated-filament) | `composer require escalated-dev/escalated-filament` |
60
- | **React Native** | [escalated-dev/escalated-react-native](https://github.com/escalated-dev/escalated-react-native) | `npm install @escalated-dev/escalated-react-native` |
61
- | **Flutter** | [escalated-dev/escalated-flutter](https://github.com/escalated-dev/escalated-flutter) | See [pubspec.yaml setup](https://github.com/escalated-dev/escalated-flutter#quick-start) |
62
-
63
- Each backend repo has full setup instructions — install command, migrations, config, and frontend integration.
64
-
65
- ## Tailwind CSS
66
-
67
- Escalated components use Tailwind CSS classes. You **must** add this package to your Tailwind `content` config so its classes aren't purged:
68
-
69
- ```js
70
- // tailwind.config.js
71
- export default {
72
- content: [
73
- // ... your existing paths
74
- './node_modules/@escalated-dev/escalated/src/**/*.vue',
75
- ],
76
- }
77
- ```
78
-
79
- Without this, Escalated UI will render but styles like button backgrounds and badge colors will be missing.
80
-
81
- ## Theming
82
-
83
- Escalated renders inside a standalone layout by default. To integrate it into your app's design system, use the `EscalatedPlugin`:
84
-
85
- ```js
86
- import { createApp } from 'vue'
87
- import { EscalatedPlugin } from '@escalated-dev/escalated'
88
- import AppLayout from '@/Layouts/AppLayout.vue'
89
-
90
- const app = createApp(...)
91
-
92
- app.use(EscalatedPlugin, {
93
- layout: AppLayout,
94
- theme: {
95
- primary: '#3b82f6',
96
- radius: '0.75rem',
97
- }
98
- })
99
- ```
100
-
101
- ### Layout Integration
102
-
103
- Pass your app's layout component and all Escalated pages render inside it automatically. The layout component must accept a `#header` slot and a default slot:
104
-
105
- ```vue
106
- <!-- Your layout must support these slots -->
107
- <template>
108
- <div>
109
- <nav>...</nav>
110
- <header><slot name="header" /></header>
111
- <main><slot /></main>
112
- </div>
113
- </template>
114
- ```
115
-
116
- When no layout is provided, Escalated uses its own built-in navigation bar.
117
-
118
- ### CSS Custom Properties
119
-
120
- The `theme` option sets CSS custom properties you can reference in your own styles:
121
-
122
- | Property | Default | Description |
123
- |----------|---------|-------------|
124
- | `--esc-primary` | `#4f46e5` | Primary action color |
125
- | `--esc-primary-hover` | auto-darkened | Primary hover color |
126
- | `--esc-radius` | `0.5rem` | Border radius for inputs and buttons |
127
- | `--esc-radius-lg` | auto-scaled | Border radius for cards and panels |
128
- | `--esc-font-family` | inherit | Font family override |
129
-
130
- ### Framework Examples
131
-
132
- **Laravel** (Inertia + Vue 3):
133
- ```js
134
- import { EscalatedPlugin } from '@escalated-dev/escalated'
135
- import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout.vue'
136
-
137
- app.use(EscalatedPlugin, { layout: AuthenticatedLayout })
138
- ```
139
-
140
- **Rails** (Inertia + Vue 3):
141
- ```js
142
- import { EscalatedPlugin } from '@escalated-dev/escalated'
143
- import AppLayout from '@/layouts/AppLayout.vue'
144
-
145
- app.use(EscalatedPlugin, { layout: AppLayout })
146
- ```
147
-
148
- **Django** (Inertia + Vue 3):
149
- ```js
150
- import { EscalatedPlugin } from '@escalated-dev/escalated'
151
- import BaseLayout from '@/layouts/BaseLayout.vue'
152
-
153
- app.use(EscalatedPlugin, { layout: BaseLayout })
154
- ```
155
-
156
- **AdonisJS** (Inertia + Vue 3):
157
- ```js
158
- import { EscalatedPlugin } from '@escalated-dev/escalated'
159
- import AppLayout from '@/layouts/AppLayout.vue'
160
-
161
- app.use(EscalatedPlugin, { layout: AppLayout })
162
- ```
163
-
164
- ## What's in This Repo
165
-
166
- All the Vue 3 + Inertia.js components that power the Escalated UI. These are identical across Laravel, Rails, Django, and AdonisJS — the backend framework renders them via Inertia.
167
-
168
- ## 📸 Screenshots
169
-
170
- > Screenshots are auto-generated from Storybook via the [component-screenshots](.github/workflows/screenshots.yml) workflow.
171
-
172
- <p align="center">
173
- <strong>Admin Panel (Dark)</strong><br/>
174
- <img src="docs/assets/escalated_admin_1.png" alt="Escalated Admin Panel — dark mode with sidebar navigation, KPI cards, stats, and ticket list" width="800" />
175
- </p>
176
-
177
- <p align="center">
178
- <strong>Admin Panel (Light)</strong><br/>
179
- <img src="docs/assets/escalated_admin_3.png" alt="Escalated Admin Panel — light mode with sidebar navigation, KPI cards, stats, and ticket list" width="800" />
180
- </p>
181
-
182
- <p align="center">
183
- <strong>Ticket Queue</strong><br/>
184
- <img src="docs/assets/escalated_ticket_list.png" alt="Escalated Ticket Queue — agent ticket list with filters, search, bulk actions, and SLA indicators" width="800" />
185
- </p>
186
-
187
- <p align="center">
188
- <strong>Agent Panel</strong><br/>
189
- <img src="docs/assets/escalated_admin_2.png" alt="Escalated Agent Panel — top navigation, stats, and assigned ticket queue" width="800" />
190
- </p>
191
-
192
- <p align="center">
193
- <strong>Ticket Detail View</strong><br/>
194
- <img src="docs/assets/escalated_ticket_view.png" alt="Escalated Ticket Detail View — conversation thread, reply composer, and ticket sidebar with SLA timer" width="800" />
195
- </p>
196
-
197
- ### Pages
198
-
199
- **Customer Portal** — Self-service ticket management
200
- - `pages/Customer/Index.vue` — Ticket list with status filters and search
201
- - `pages/Customer/Create.vue` — New ticket form with file attachments
202
- - `pages/Customer/Show.vue` — Ticket detail with reply thread
203
-
204
- **Agent Dashboard** — Ticket queue and workflows
205
- - `pages/Agent/Dashboard.vue` — Stats overview and recent tickets
206
- - `pages/Agent/TicketIndex.vue` — Filterable ticket queue
207
- - `pages/Agent/TicketShow.vue` — Full ticket view with sidebar, internal notes, canned responses
208
-
209
- **Admin Panel** — System configuration
210
- - `pages/Admin/Reports.vue` — Analytics dashboard
211
- - `pages/Admin/Departments/` — Department CRUD
212
- - `pages/Admin/SlaPolicies/` — SLA policy management
213
- - `pages/Admin/EscalationRules/` — Escalation rule builder
214
- - `pages/Admin/Tags/` — Tag management
215
- - `pages/Admin/CannedResponses/` — Canned response templates
216
-
217
- ### Shared Components
218
-
219
- Reusable building blocks used across the pages above.
220
-
221
- | Component | Description |
222
- |-----------|-------------|
223
- | `StatusBadge` | Colored badge for ticket status |
224
- | `PriorityBadge` | Colored badge for ticket priority |
225
- | `TicketList` | Paginated ticket table |
226
- | `ReplyThread` | Chronological reply display |
227
- | `ReplyComposer` | Reply/note editor with file upload and canned response insertion |
228
- | `ActivityTimeline` | Audit log of ticket events |
229
- | `SlaTimer` | SLA countdown with breach/warning states |
230
- | `TicketFilters` | Status, priority, agent, department filter bar |
231
- | `TicketSidebar` | Ticket detail sidebar (status, SLA, tags, activity) |
232
- | `AssigneeSelect` | Agent assignment dropdown |
233
- | `TagSelect` | Multi-select tag picker |
234
- | `FileDropzone` | Drag-and-drop file upload |
235
- | `AttachmentList` | File attachment display with download links |
236
- | `StatsCard` | Metric card with label, value, and trend |
237
- | `EscalatedLayout` | Top-level layout with navigation (supports host layout injection) |
238
- | `BulkActionBar` | Toolbar for batch operations on selected tickets |
239
- | `QuickFilters` | One-click filter chips (My Tickets, Unassigned, Urgent, SLA Breaching) |
240
- | `MacroDropdown` | Dropdown to apply multi-step macros to a ticket |
241
- | `FollowButton` | Toggle button to follow/unfollow a ticket |
242
- | `SatisfactionRating` | 1-5 star CSAT rating input with optional comment |
243
- | `KeyboardShortcutHelp` | Modal overlay showing all available keyboard shortcuts |
244
- | `PinnedNotes` | Display pinned internal notes at the top of the thread |
245
- | `PresenceIndicator` | Real-time indicator showing who is viewing a ticket |
246
-
247
- ### Composables
248
-
249
- | Composable | Description |
250
- |------------|-------------|
251
- | `useKeyboardShortcuts` | Registers and manages keyboard shortcuts for ticket actions |
252
-
253
- ### Plugin
254
-
255
- | Export | Description |
256
- |--------|-------------|
257
- | `EscalatedPlugin` | Vue plugin for layout injection and CSS theming |
258
-
259
- ## Plugin Development
260
-
261
- Escalated supports framework-agnostic plugins built with the [Plugin SDK](https://github.com/escalated-dev/escalated-plugin-sdk). Plugins are written once in TypeScript and work across all Escalated backends.
262
-
263
- ### How the Frontend Plugin System Works
264
-
265
- The frontend uses `defineEscalatedPlugin()` to register Vue components — custom admin pages, ticket sidebar widgets, or dashboard panels — that are mounted automatically when the plugin is active.
266
-
267
- ```typescript
268
- import { defineEscalatedPlugin } from '@escalated-dev/escalated'
269
- import MySettingsPage from './MySettingsPage.vue'
270
-
271
- export default defineEscalatedPlugin({
272
- name: 'my-plugin',
273
- pages: {
274
- 'admin/my-plugin/settings': MySettingsPage,
275
- },
276
- })
277
- ```
278
-
279
- ### How It Connects to the Backend
280
-
281
- The backend uses `definePlugin()` from the [Plugin SDK](https://github.com/escalated-dev/escalated-plugin-sdk) to handle TypeScript business logic — subscribing to ticket lifecycle hooks, exposing API endpoints, and persisting data. The frontend and backend entries work together as a single npm package.
282
-
283
- ```typescript
284
- // backend entry (index.ts)
285
- import { definePlugin } from '@escalated-dev/plugin-sdk'
286
-
287
- export default definePlugin({
288
- name: 'my-plugin',
289
- version: '1.0.0',
290
- actions: {
291
- 'ticket.created': async (event, ctx) => {
292
- ctx.log.info('New ticket!', event)
293
- },
294
- },
295
- })
296
- ```
297
-
298
- ### Quick Example: Both Entry Points
299
-
300
- A published plugin package typically exports both:
301
-
302
- ```
303
- my-plugin/
304
- index.ts ← backend: definePlugin() for TypeScript logic
305
- frontend.ts ← frontend: defineEscalatedPlugin() for Vue components
306
- ```
307
-
308
- The backend framework (Laravel, Rails, Django, AdonisJS) loads `index.ts` via the [Plugin Runtime](https://github.com/escalated-dev/escalated-plugin-runtime). The Vue app imports `frontend.ts` and registers it with `app.use()`.
309
-
310
- ### Installing Plugins
311
-
312
- ```bash
313
- npm install @escalated-dev/plugin-slack
314
- npm install @escalated-dev/plugin-jira
315
- ```
316
-
317
- ### Resources
318
-
319
- - [Plugin SDK](https://github.com/escalated-dev/escalated-plugin-sdk) — TypeScript SDK for building plugins
320
- - [Plugin Runtime](https://github.com/escalated-dev/escalated-plugin-runtime) — Runtime host for plugins
321
- - [Plugin Development Guide](https://github.com/escalated-dev/escalated-docs) — Full documentation
322
-
323
- ## For Package Maintainers
324
-
325
- If you're building a new backend integration, this package is available on npm:
326
-
327
- ```bash
328
- npm install @escalated-dev/escalated
329
- ```
330
-
331
- ```js
332
- // Import the plugin
333
- import { EscalatedPlugin } from '@escalated-dev/escalated'
334
-
335
- // Import individual components
336
- import { StatusBadge, SlaTimer } from '@escalated-dev/escalated'
337
-
338
- // Or reference pages directly for Inertia resolution
339
- import CustomerIndex from '@escalated-dev/escalated/pages/Customer/Index.vue'
340
- ```
341
-
342
- Peer dependencies: `vue` ^3.3.0, `@inertiajs/vue3` ^1.0.0 || ^2.0.0
343
-
344
- ## Ecosystem
345
-
346
- This is the shared frontend for the Escalated support ticket system. Backend packages available for every major framework:
347
-
348
- - **[Escalated for Laravel](https://github.com/escalated-dev/escalated-laravel)** — Laravel Composer package
349
- - **[Escalated for Rails](https://github.com/escalated-dev/escalated-rails)** — Ruby on Rails engine
350
- - **[Escalated for Django](https://github.com/escalated-dev/escalated-django)** — Django reusable app
351
- - **[Escalated for AdonisJS](https://github.com/escalated-dev/escalated-adonis)** — AdonisJS v6 package
352
- - **[Escalated for Filament](https://github.com/escalated-dev/escalated-filament)** — Filament v3 admin panel plugin
353
- - **[Shared Frontend](https://github.com/escalated-dev/escalated)** — Vue 3 + Inertia.js UI components (you are here)
354
-
355
- ## License
356
-
357
- MIT
1
+ <p align="center">
2
+ <a href="docs/translations/README.ar.md">العربية</a> •
3
+ <a href="docs/translations/README.de.md">Deutsch</a> •
4
+ <b>English</b> •
5
+ <a href="docs/translations/README.es.md">Español</a> •
6
+ <a href="docs/translations/README.fr.md">Français</a> •
7
+ <a href="docs/translations/README.it.md">Italiano</a> •
8
+ <a href="docs/translations/README.ja.md">日本語</a> •
9
+ <a href="docs/translations/README.ko.md">한국어</a> •
10
+ <a href="docs/translations/README.nl.md">Nederlands</a> •
11
+ <a href="docs/translations/README.pl.md">Polski</a> •
12
+ <a href="docs/translations/README.pt-BR.md">Português (BR)</a> •
13
+ <a href="docs/translations/README.ru.md">Русский</a> •
14
+ <a href="docs/translations/README.tr.md">Türkçe</a> •
15
+ <a href="docs/translations/README.zh-CN.md">简体中文</a>
16
+ </p>
17
+
18
+ <h1>
19
+ <img src="https://escalated.dev/apple-touch-icon.png" width="28" style="vertical-align:middle;" />
20
+ Escalated
21
+ </h1>
22
+
23
+ [![Tests](https://github.com/escalated-dev/escalated/actions/workflows/run-tests.yml/badge.svg)](https://github.com/escalated-dev/escalated/actions/workflows/run-tests.yml)
24
+ [![FOSSA Status](https://app.fossa.com/api/projects/custom%2B62107%2Fgithub.com%2Fescalated-dev%2Fescalated.svg?type=shield)](https://app.fossa.com/projects/custom%2B62107%2Fgithub.com%2Fescalated-dev%2Fescalated?ref=badge_shield)
25
+ [![npm](https://img.shields.io/npm/v/@escalated-dev/escalated)](https://www.npmjs.com/package/@escalated-dev/escalated)
26
+ [![Vue 3](https://img.shields.io/badge/vue-3.x-4FC08D?logo=vue.js&logoColor=white)](https://vuejs.org/)
27
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
28
+
29
+ <p align="center">
30
+ <img src=".github/profile/demo.gif" alt="Escalated demo: filing a ticket and replying from the agent inbox" width="800" />
31
+ </p>
32
+
33
+ Escalated is an embeddable support ticket system with SLA tracking, escalation rules, agent workflows, and a customer portal. This repo contains all the shared frontend assets (Vue 3 + Inertia.js) used across every supported backend framework.
34
+
35
+ 👉 **Learn more, view demos, and compare Cloud vs Self-Hosted options at** **[https://escalated.dev](https://escalated.dev)**
36
+
37
+ **You don't install this package directly.** Start with the backend package for your framework — it handles everything including pulling in these frontend assets.
38
+
39
+ ## Features
40
+
41
+ - **Ticket splitting** — Split a reply into a new standalone ticket while preserving context
42
+ - **Ticket snooze** — Snooze tickets with presets (1h, 4h, tomorrow, next week) and automatic wake
43
+ - **Saved views / custom queues** — Save, name, and share filter presets as reusable ticket views
44
+ - **Embeddable support widget** — Drop-in `<script>` widget with KB search, ticket form, and status check
45
+ - **Real-time updates** — WebSocket support (Pusher/Reverb/Soketi) with automatic polling fallback
46
+ - **Knowledge base toggle** — Enable or disable the public knowledge base from admin settings
47
+ - **CI: ESLint + Prettier** — Automated code style enforcement on every pull request
48
+
49
+ ## Get Started
50
+
51
+ Pick your framework:
52
+
53
+ | Framework | Repo | Install |
54
+ |-----------|------|---------|
55
+ | **Laravel** | [escalated-dev/escalated-laravel](https://github.com/escalated-dev/escalated-laravel) | `composer require escalated-dev/escalated-laravel` |
56
+ | **Rails** | [escalated-dev/escalated-rails](https://github.com/escalated-dev/escalated-rails) | `gem "escalated"` |
57
+ | **Django** | [escalated-dev/escalated-django](https://github.com/escalated-dev/escalated-django) | `pip install escalated-django` |
58
+ | **AdonisJS** | [escalated-dev/escalated-adonis](https://github.com/escalated-dev/escalated-adonis) | `npm install @escalated-dev/escalated-adonis` |
59
+ | **WordPress** | [escalated-dev/escalated-wordpress](https://github.com/escalated-dev/escalated-wordpress) | [Download escalated.zip](https://github.com/escalated-dev/escalated-wordpress/releases/latest) |
60
+ | **Filament** | [escalated-dev/escalated-filament](https://github.com/escalated-dev/escalated-filament) | `composer require escalated-dev/escalated-filament` |
61
+ | **React Native** | [escalated-dev/escalated-react-native](https://github.com/escalated-dev/escalated-react-native) | `npm install @escalated-dev/escalated-react-native` |
62
+ | **Flutter** | [escalated-dev/escalated-flutter](https://github.com/escalated-dev/escalated-flutter) | See [pubspec.yaml setup](https://github.com/escalated-dev/escalated-flutter#quick-start) |
63
+
64
+ Each backend repo has full setup instructions — install command, migrations, config, and frontend integration.
65
+
66
+ ## Tailwind CSS
67
+
68
+ Escalated components use Tailwind CSS utility classes (~hundreds of them across 140+ Vue files). **Some Tailwind-compatible class processor must be available in the host app for the UI to render correctly** — without one, every component renders as unstyled DOM with class names that don't resolve to any CSS.
69
+
70
+ ### Recommended: Tailwind in your existing build
71
+
72
+ If your host app already uses Tailwind via Vite / PostCSS / Tailwind CLI, just add this package to your `content` config so its classes aren't purged:
73
+
74
+ ```js
75
+ // tailwind.config.js
76
+ export default {
77
+ content: [
78
+ // ... your existing paths
79
+ './node_modules/@escalated-dev/escalated/src/**/*.vue',
80
+ ],
81
+ }
82
+ ```
83
+
84
+ > **Tailwind 4+ users:** `content` globs are auto-detected from imported modules — you usually don't need to add anything. Skip this step if you're on v4.
85
+
86
+ ### Using Escalated without a Tailwind build step
87
+
88
+ If you don't want a Tailwind toolchain in your build pipeline, you have a few options. Each has trade-offs — pick the one closest to your project's constraints:
89
+
90
+ | Option | When to use | How |
91
+ |---|---|---|
92
+ | **Tailwind Play CDN** | Prototyping, internal tools, demos. Not recommended for production (no purging, ~3 MB script tag). | Add `<script src="https://cdn.tailwindcss.com"></script>` to the page that renders Escalated. The CDN script JIT-compiles classes at runtime. |
93
+ | **Tailwind standalone CLI** | You want a static stylesheet without npm/Vite. | Download the [standalone CLI binary](https://tailwindcss.com/blog/standalone-cli) and run `tailwindcss -i input.css -o public/escalated.css --content './node_modules/@escalated-dev/escalated/src/**/*.vue' --minify`. Link the output stylesheet from your page. |
94
+ | **UnoCSS / Twind in attributify mode** | Already using one of these atomic-CSS engines. | Configure with the Tailwind preset (`@unocss/preset-wind` or `@twind/preset-tailwind`) and add the Escalated package path to the engine's scan config. Class semantics match. |
95
+ | **Forking with hand-rolled CSS** | You categorically cannot ship any Tailwind-compatible tooling and are willing to maintain a fork. | Replace utility classes with scoped CSS per component. Substantial effort; not officially supported. |
96
+
97
+ If none of these fit, please [open a discussion](https://github.com/escalated-dev/escalated/discussions) so we can understand the constraint and consider a pre-compiled CSS distribution.
98
+
99
+ Whatever path you choose, also make sure the [theme tokens](#theming) (CSS custom properties) are applied — those control colour, spacing, and radius and are independent of Tailwind.
100
+
101
+ ## Theming
102
+
103
+ Escalated renders inside a standalone layout by default. To integrate it into your app's design system, use the `EscalatedPlugin`:
104
+
105
+ ```js
106
+ import { createApp } from 'vue'
107
+ import { EscalatedPlugin } from '@escalated-dev/escalated'
108
+ import AppLayout from '@/Layouts/AppLayout.vue'
109
+
110
+ const app = createApp(...)
111
+
112
+ app.use(EscalatedPlugin, {
113
+ layout: AppLayout,
114
+ theme: {
115
+ primary: '#3b82f6',
116
+ radius: '0.75rem',
117
+ }
118
+ })
119
+ ```
120
+
121
+ ### Layout Integration
122
+
123
+ Pass your app's layout component and all Escalated pages render inside it automatically. The layout component must accept a `#header` slot and a default slot:
124
+
125
+ ```vue
126
+ <!-- Your layout must support these slots -->
127
+ <template>
128
+ <div>
129
+ <nav>...</nav>
130
+ <header><slot name="header" /></header>
131
+ <main><slot /></main>
132
+ </div>
133
+ </template>
134
+ ```
135
+
136
+ When no layout is provided, Escalated uses its own built-in navigation bar.
137
+
138
+ ### CSS Custom Properties
139
+
140
+ The `theme` option sets CSS custom properties you can reference in your own styles:
141
+
142
+ | Property | Default | Description |
143
+ |----------|---------|-------------|
144
+ | `--esc-primary` | `#4f46e5` | Primary action color |
145
+ | `--esc-primary-hover` | auto-darkened | Primary hover color |
146
+ | `--esc-radius` | `0.5rem` | Border radius for inputs and buttons |
147
+ | `--esc-radius-lg` | auto-scaled | Border radius for cards and panels |
148
+ | `--esc-font-family` | inherit | Font family override |
149
+
150
+ ### Framework Examples
151
+
152
+ **Laravel** (Inertia + Vue 3):
153
+ ```js
154
+ import { EscalatedPlugin } from '@escalated-dev/escalated'
155
+ import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout.vue'
156
+
157
+ app.use(EscalatedPlugin, { layout: AuthenticatedLayout })
158
+ ```
159
+
160
+ **Rails** (Inertia + Vue 3):
161
+ ```js
162
+ import { EscalatedPlugin } from '@escalated-dev/escalated'
163
+ import AppLayout from '@/layouts/AppLayout.vue'
164
+
165
+ app.use(EscalatedPlugin, { layout: AppLayout })
166
+ ```
167
+
168
+ **Django** (Inertia + Vue 3):
169
+ ```js
170
+ import { EscalatedPlugin } from '@escalated-dev/escalated'
171
+ import BaseLayout from '@/layouts/BaseLayout.vue'
172
+
173
+ app.use(EscalatedPlugin, { layout: BaseLayout })
174
+ ```
175
+
176
+ **AdonisJS** (Inertia + Vue 3):
177
+ ```js
178
+ import { EscalatedPlugin } from '@escalated-dev/escalated'
179
+ import AppLayout from '@/layouts/AppLayout.vue'
180
+
181
+ app.use(EscalatedPlugin, { layout: AppLayout })
182
+ ```
183
+
184
+ ## What's in This Repo
185
+
186
+ All the Vue 3 + Inertia.js components that power the Escalated UI. These are identical across Laravel, Rails, Django, and AdonisJS — the backend framework renders them via Inertia.
187
+
188
+ ## 📸 Screenshots
189
+
190
+ > Screenshots are auto-generated from Storybook via the [component-screenshots](.github/workflows/screenshots.yml) workflow.
191
+
192
+ <p align="center">
193
+ <strong>Admin Panel (Dark)</strong><br/>
194
+ <img src="docs/assets/escalated_admin_1.png" alt="Escalated Admin Panel — dark mode with sidebar navigation, KPI cards, stats, and ticket list" width="800" />
195
+ </p>
196
+
197
+ <p align="center">
198
+ <strong>Admin Panel (Light)</strong><br/>
199
+ <img src="docs/assets/escalated_admin_3.png" alt="Escalated Admin Panel — light mode with sidebar navigation, KPI cards, stats, and ticket list" width="800" />
200
+ </p>
201
+
202
+ <p align="center">
203
+ <strong>Ticket Queue</strong><br/>
204
+ <img src="docs/assets/escalated_ticket_list.png" alt="Escalated Ticket Queue — agent ticket list with filters, search, bulk actions, and SLA indicators" width="800" />
205
+ </p>
206
+
207
+ <p align="center">
208
+ <strong>Agent Panel</strong><br/>
209
+ <img src="docs/assets/escalated_admin_2.png" alt="Escalated Agent Panel — top navigation, stats, and assigned ticket queue" width="800" />
210
+ </p>
211
+
212
+ <p align="center">
213
+ <strong>Ticket Detail View</strong><br/>
214
+ <img src="docs/assets/escalated_ticket_view.png" alt="Escalated Ticket Detail View — conversation thread, reply composer, and ticket sidebar with SLA timer" width="800" />
215
+ </p>
216
+
217
+ ### Pages
218
+
219
+ **Customer Portal** — Self-service ticket management
220
+ - `pages/Customer/Index.vue` — Ticket list with status filters and search
221
+ - `pages/Customer/Create.vue` — New ticket form with file attachments
222
+ - `pages/Customer/Show.vue` — Ticket detail with reply thread
223
+
224
+ **Agent Dashboard** — Ticket queue and workflows
225
+ - `pages/Agent/Dashboard.vue` — Stats overview and recent tickets
226
+ - `pages/Agent/TicketIndex.vue` — Filterable ticket queue
227
+ - `pages/Agent/TicketShow.vue` — Full ticket view with sidebar, internal notes, canned responses
228
+
229
+ **Admin Panel** — System configuration
230
+ - `pages/Admin/Reports.vue` — Analytics dashboard
231
+ - `pages/Admin/Departments/` — Department CRUD
232
+ - `pages/Admin/SlaPolicies/` — SLA policy management
233
+ - `pages/Admin/EscalationRules/` — Escalation rule builder
234
+ - `pages/Admin/Tags/` — Tag management
235
+ - `pages/Admin/CannedResponses/` — Canned response templates
236
+
237
+ ### Shared Components
238
+
239
+ Reusable building blocks used across the pages above.
240
+
241
+ | Component | Description |
242
+ |-----------|-------------|
243
+ | `StatusBadge` | Colored badge for ticket status |
244
+ | `PriorityBadge` | Colored badge for ticket priority |
245
+ | `TicketList` | Paginated ticket table |
246
+ | `ReplyThread` | Chronological reply display |
247
+ | `ReplyComposer` | Reply/note editor with file upload and canned response insertion |
248
+ | `ActivityTimeline` | Audit log of ticket events |
249
+ | `SlaTimer` | SLA countdown with breach/warning states |
250
+ | `TicketFilters` | Status, priority, agent, department filter bar |
251
+ | `TicketSidebar` | Ticket detail sidebar (status, SLA, tags, activity) |
252
+ | `AssigneeSelect` | Agent assignment dropdown |
253
+ | `TagSelect` | Multi-select tag picker |
254
+ | `FileDropzone` | Drag-and-drop file upload |
255
+ | `AttachmentList` | File attachment display with download links |
256
+ | `StatsCard` | Metric card with label, value, and trend |
257
+ | `EscalatedLayout` | Top-level layout with navigation (supports host layout injection) |
258
+ | `BulkActionBar` | Toolbar for batch operations on selected tickets |
259
+ | `QuickFilters` | One-click filter chips (My Tickets, Unassigned, Urgent, SLA Breaching) |
260
+ | `MacroDropdown` | Dropdown to apply multi-step macros to a ticket |
261
+ | `FollowButton` | Toggle button to follow/unfollow a ticket |
262
+ | `SatisfactionRating` | 1-5 star CSAT rating input with optional comment |
263
+ | `KeyboardShortcutHelp` | Modal overlay showing all available keyboard shortcuts |
264
+ | `PinnedNotes` | Display pinned internal notes at the top of the thread |
265
+ | `PresenceIndicator` | Real-time indicator showing who is viewing a ticket |
266
+
267
+ ### Composables
268
+
269
+ | Composable | Description |
270
+ |------------|-------------|
271
+ | `useKeyboardShortcuts` | Registers and manages keyboard shortcuts for ticket actions |
272
+
273
+ ### Plugin
274
+
275
+ | Export | Description |
276
+ |--------|-------------|
277
+ | `EscalatedPlugin` | Vue plugin for layout injection and CSS theming |
278
+
279
+ ## Plugin Development
280
+
281
+ Escalated supports framework-agnostic plugins built with the [Plugin SDK](https://github.com/escalated-dev/escalated-plugin-sdk). Plugins are written once in TypeScript and work across all Escalated backends.
282
+
283
+ ### How the Frontend Plugin System Works
284
+
285
+ The frontend uses `defineEscalatedPlugin()` to register Vue components — custom admin pages, ticket sidebar widgets, or dashboard panels — that are mounted automatically when the plugin is active.
286
+
287
+ ```typescript
288
+ import { defineEscalatedPlugin } from '@escalated-dev/escalated'
289
+ import MySettingsPage from './MySettingsPage.vue'
290
+
291
+ export default defineEscalatedPlugin({
292
+ name: 'my-plugin',
293
+ pages: {
294
+ 'admin/my-plugin/settings': MySettingsPage,
295
+ },
296
+ })
297
+ ```
298
+
299
+ ### How It Connects to the Backend
300
+
301
+ The backend uses `definePlugin()` from the [Plugin SDK](https://github.com/escalated-dev/escalated-plugin-sdk) to handle TypeScript business logic — subscribing to ticket lifecycle hooks, exposing API endpoints, and persisting data. The frontend and backend entries work together as a single npm package.
302
+
303
+ ```typescript
304
+ // backend entry (index.ts)
305
+ import { definePlugin } from '@escalated-dev/plugin-sdk'
306
+
307
+ export default definePlugin({
308
+ name: 'my-plugin',
309
+ version: '1.0.0',
310
+ actions: {
311
+ 'ticket.created': async (event, ctx) => {
312
+ ctx.log.info('New ticket!', event)
313
+ },
314
+ },
315
+ })
316
+ ```
317
+
318
+ ### Quick Example: Both Entry Points
319
+
320
+ A published plugin package typically exports both:
321
+
322
+ ```
323
+ my-plugin/
324
+ index.ts ← backend: definePlugin() for TypeScript logic
325
+ frontend.ts ← frontend: defineEscalatedPlugin() for Vue components
326
+ ```
327
+
328
+ The backend framework (Laravel, Rails, Django, AdonisJS) loads `index.ts` via the [Plugin Runtime](https://github.com/escalated-dev/escalated-plugin-runtime). The Vue app imports `frontend.ts` and registers it with `app.use()`.
329
+
330
+ ### Installing Plugins
331
+
332
+ ```bash
333
+ npm install @escalated-dev/plugin-slack
334
+ npm install @escalated-dev/plugin-jira
335
+ ```
336
+
337
+ ### Resources
338
+
339
+ - [Plugin SDK](https://github.com/escalated-dev/escalated-plugin-sdk) — TypeScript SDK for building plugins
340
+ - [Plugin Runtime](https://github.com/escalated-dev/escalated-plugin-runtime) — Runtime host for plugins
341
+ - [Plugin Development Guide](https://github.com/escalated-dev/escalated-docs) — Full documentation
342
+
343
+ ## For Package Maintainers
344
+
345
+ If you're building a new backend integration, this package is available on npm:
346
+
347
+ ```bash
348
+ npm install @escalated-dev/escalated
349
+ ```
350
+
351
+ ```js
352
+ // Import the plugin
353
+ import { EscalatedPlugin } from '@escalated-dev/escalated'
354
+
355
+ // Import individual components
356
+ import { StatusBadge, SlaTimer } from '@escalated-dev/escalated'
357
+
358
+ // Or reference pages directly for Inertia resolution
359
+ import CustomerIndex from '@escalated-dev/escalated/pages/Customer/Index.vue'
360
+ ```
361
+
362
+ Peer dependencies: `vue` ^3.3.0, `@inertiajs/vue3` ^1.0.0 || ^2.0.0
363
+
364
+ ## Ecosystem
365
+
366
+ This is the shared frontend for the Escalated support ticket system. Host framework packages and client SDKs available across the ecosystem:
367
+
368
+ - **[Escalated for Laravel](https://github.com/escalated-dev/escalated-laravel)** — Laravel Composer package
369
+ - **[Escalated for Rails](https://github.com/escalated-dev/escalated-rails)** — Ruby on Rails engine
370
+ - **[Escalated for Django](https://github.com/escalated-dev/escalated-django)** — Django reusable app
371
+ - **[Escalated for AdonisJS](https://github.com/escalated-dev/escalated-adonis)** — AdonisJS v6 package
372
+ - **[Escalated for WordPress](https://github.com/escalated-dev/escalated-wordpress)** — WordPress plugin
373
+ - **[Escalated for Filament](https://github.com/escalated-dev/escalated-filament)** — Filament v3 admin panel plugin
374
+ - **[Escalated for React Native](https://github.com/escalated-dev/escalated-react-native)** — React Native SDK
375
+ - **[Escalated for Flutter](https://github.com/escalated-dev/escalated-flutter)** — Flutter SDK
376
+ - **[Shared Frontend](https://github.com/escalated-dev/escalated)** — Vue 3 + Inertia.js UI components (you are here)
377
+
378
+ ## License
379
+
380
+ MIT