@escalated-dev/escalated 0.5.0 → 0.7.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.
- package/README.md +102 -0
- package/package.json +37 -6
- package/src/components/ActivityTimeline.stories.js +55 -0
- package/src/components/ActivityTimeline.vue +83 -66
- package/src/components/AdminDashboard.stories.js +1095 -0
- package/src/components/AgentLoadIndicator.stories.js +37 -0
- package/src/components/AgentLoadIndicator.vue +49 -0
- package/src/components/AgentPerformanceCard.vue +44 -0
- package/src/components/ArticleEditor.vue +82 -0
- package/src/components/AssigneeSelect.vue +37 -23
- package/src/components/AttachmentList.vue +53 -37
- package/src/components/AuditLogEntry.vue +95 -0
- package/src/components/BulkActionBar.vue +99 -30
- package/src/components/CategoryTree.vue +89 -0
- package/src/components/ChartWidget.vue +46 -0
- package/src/components/CollisionWarning.stories.js +30 -0
- package/src/components/CollisionWarning.vue +68 -0
- package/src/components/ConditionalFieldRules.vue +135 -0
- package/src/components/ContextPanel.vue +66 -0
- package/src/components/ContextPanelSection.vue +65 -0
- package/src/components/CustomFieldRenderer.vue +159 -0
- package/src/components/EscalatedLayout.vue +400 -69
- package/src/components/FileDropzone.vue +57 -41
- package/src/components/FollowButton.stories.js +30 -0
- package/src/components/FollowButton.vue +53 -28
- package/src/components/KeyboardShortcutHelp.vue +129 -39
- package/src/components/KnowledgePanel.vue +122 -0
- package/src/components/KpiCard.stories.js +32 -0
- package/src/components/KpiCard.vue +88 -0
- package/src/components/MacroDropdown.vue +95 -35
- package/src/components/PermissionMatrix.vue +107 -0
- package/src/components/PinnedNotes.vue +75 -33
- package/src/components/PresenceIndicator.vue +93 -27
- package/src/components/PriorityBadge.stories.js +33 -0
- package/src/components/PriorityBadge.vue +46 -39
- package/src/components/QuickFilters.vue +65 -49
- package/src/components/ReplyComposer.vue +273 -159
- package/src/components/ReplyThread.vue +78 -23
- package/src/components/SatisfactionRating.vue +98 -46
- package/src/components/ScheduleEditor.vue +104 -0
- package/src/components/SideConversation.vue +165 -0
- package/src/components/SideConversationList.vue +147 -0
- package/src/components/SkillTagManager.vue +79 -0
- package/src/components/SlaComplianceChart.vue +53 -0
- package/src/components/SlaTimer.stories.js +35 -0
- package/src/components/SlaTimer.vue +62 -49
- package/src/components/StatsCard.stories.js +24 -0
- package/src/components/StatsCard.vue +58 -46
- package/src/components/StatusBadge.stories.js +53 -0
- package/src/components/StatusBadge.vue +78 -46
- package/src/components/TagSelect.vue +84 -53
- package/src/components/TicketFilters.vue +225 -69
- package/src/components/TicketLinkPanel.vue +193 -0
- package/src/components/TicketList.vue +594 -193
- package/src/components/TicketMergeDialog.vue +157 -0
- package/src/components/TicketSidebar.vue +167 -99
- package/src/components/TicketTypeSelector.vue +21 -0
- package/src/components/TotpInput.stories.js +9 -0
- package/src/components/TotpInput.vue +81 -0
- package/src/components/TwoFactorSetup.vue +113 -0
- package/src/composables/useDebouncedSearch.js +38 -0
- package/src/composables/useI18n.js +80 -0
- package/src/composables/usePluginExtensions.js +95 -3
- package/src/composables/usePluginHooks.js +65 -0
- package/src/defineEscalatedPlugin.js +34 -8
- package/src/index.js +72 -35
- package/src/locales/de.json +442 -0
- package/src/locales/en.json +467 -0
- package/src/locales/es.json +442 -0
- package/src/locales/fr.json +442 -0
- package/src/locales/index.js +6 -0
- package/src/pages/Admin/ApiTokens/Index.vue +231 -67
- package/src/pages/Admin/AuditLog/Index.vue +154 -0
- package/src/pages/Admin/Automations/Form.vue +184 -0
- package/src/pages/Admin/Automations/Index.vue +129 -0
- package/src/pages/Admin/BusinessHours/Form.vue +172 -0
- package/src/pages/Admin/BusinessHours/Index.vue +113 -0
- package/src/pages/Admin/CannedResponses/Index.vue +127 -70
- package/src/pages/Admin/Capacity/Index.vue +134 -0
- package/src/pages/Admin/CustomFields/Form.vue +195 -0
- package/src/pages/Admin/CustomFields/Index.vue +134 -0
- package/src/pages/Admin/CustomObjects/Form.vue +202 -0
- package/src/pages/Admin/CustomObjects/Index.vue +127 -0
- package/src/pages/Admin/CustomObjects/Records.vue +228 -0
- package/src/pages/Admin/Departments/Form.vue +75 -51
- package/src/pages/Admin/Departments/Index.vue +109 -57
- package/src/pages/Admin/EscalationRules/Form.vue +157 -96
- package/src/pages/Admin/EscalationRules/Index.vue +178 -57
- package/src/pages/Admin/Import/Connect.vue +96 -0
- package/src/pages/Admin/Import/Index.vue +102 -0
- package/src/pages/Admin/Import/Mapping.vue +110 -0
- package/src/pages/Admin/Import/Progress.vue +153 -0
- package/src/pages/Admin/Import/Review.vue +76 -0
- package/src/pages/Admin/KnowledgeBase/Articles/Form.vue +142 -0
- package/src/pages/Admin/KnowledgeBase/Articles/Index.vue +195 -0
- package/src/pages/Admin/KnowledgeBase/Categories/Index.vue +193 -0
- package/src/pages/Admin/Macros/Index.vue +250 -89
- package/src/pages/Admin/Plugins/Index.vue +205 -75
- package/src/pages/Admin/Reports/AgentMetrics.vue +115 -0
- package/src/pages/Admin/Reports/CsatReport.vue +127 -0
- package/src/pages/Admin/Reports/Dashboard.vue +211 -0
- package/src/pages/Admin/Reports/SlaReport.vue +166 -0
- package/src/pages/Admin/Reports.vue +139 -34
- package/src/pages/Admin/Roles/Form.vue +71 -0
- package/src/pages/Admin/Roles/Index.vue +122 -0
- package/src/pages/Admin/Settings/CsatSettings.vue +165 -0
- package/src/pages/Admin/Settings/DataRetention.vue +182 -0
- package/src/pages/Admin/Settings/EmailSettings.vue +243 -0
- package/src/pages/Admin/Settings/Sandbox.vue +135 -0
- package/src/pages/Admin/Settings/SsoSettings.vue +218 -0
- package/src/pages/Admin/Settings/TwoFactor.vue +110 -0
- package/src/pages/Admin/Settings.vue +468 -260
- package/src/pages/Admin/Skills/Form.vue +53 -0
- package/src/pages/Admin/Skills/Index.vue +94 -0
- package/src/pages/Admin/SlaPolicies/Form.vue +118 -75
- package/src/pages/Admin/SlaPolicies/Index.vue +120 -59
- package/src/pages/Admin/Statuses/Form.vue +114 -0
- package/src/pages/Admin/Statuses/Index.vue +153 -0
- package/src/pages/Admin/Tags/Index.vue +191 -105
- package/src/pages/Admin/Tickets/Index.vue +91 -39
- package/src/pages/Admin/Tickets/Show.vue +101 -37
- package/src/pages/Admin/Webhooks/DeliveryLog.vue +120 -0
- package/src/pages/Admin/Webhooks/Form.vue +110 -0
- package/src/pages/Admin/Webhooks/Index.vue +136 -0
- package/src/pages/Agent/Dashboard.vue +311 -186
- package/src/pages/Agent/TicketIndex.vue +88 -38
- package/src/pages/Agent/TicketShow.vue +258 -51
- package/src/pages/Customer/Create.vue +36 -9
- package/src/pages/Customer/Index.vue +31 -24
- package/src/pages/Customer/KnowledgeBase/Article.vue +127 -0
- package/src/pages/Customer/KnowledgeBase/Index.vue +151 -0
- package/src/plugin.js +86 -1
- package/src/utils/constants.js +30 -0
- package/src/utils/formatting.js +35 -0
- package/src/utils/sanitizeHtml.js +64 -0
- package/src/pages/Admin/Plugins.vue +0 -129
|
@@ -1,41 +1,57 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { ref, computed, inject } from 'vue';
|
|
3
|
-
|
|
4
|
-
const emit = defineEmits(['files']);
|
|
5
|
-
const dark = inject(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, computed, inject } from 'vue';
|
|
3
|
+
|
|
4
|
+
const emit = defineEmits(['files']);
|
|
5
|
+
const dark = inject(
|
|
6
|
+
'esc-dark',
|
|
7
|
+
computed(() => false),
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
const dragging = ref(false);
|
|
11
|
+
const fileInput = ref(null);
|
|
12
|
+
|
|
13
|
+
function onDrop(e) {
|
|
14
|
+
dragging.value = false;
|
|
15
|
+
if (e.dataTransfer?.files?.length) {
|
|
16
|
+
emit('files', Array.from(e.dataTransfer.files));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function onFileSelect(e) {
|
|
21
|
+
if (e.target.files?.length) {
|
|
22
|
+
emit('files', Array.from(e.target.files));
|
|
23
|
+
e.target.value = '';
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function browse() {
|
|
28
|
+
fileInput.value?.click();
|
|
29
|
+
}
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<div
|
|
34
|
+
role="button"
|
|
35
|
+
aria-label="Drop files here or click to upload"
|
|
36
|
+
:class="[
|
|
37
|
+
'cursor-pointer rounded-lg border-2 border-dashed px-4 py-3 text-center text-xs transition-colors',
|
|
38
|
+
dark
|
|
39
|
+
? dragging
|
|
40
|
+
? 'border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-hover)]'
|
|
41
|
+
: 'border-[var(--esc-panel-border)] hover:border-[var(--esc-panel-border-input)]'
|
|
42
|
+
: dragging
|
|
43
|
+
? 'border-blue-400 bg-blue-50'
|
|
44
|
+
: 'border-gray-300 hover:border-gray-400',
|
|
45
|
+
]"
|
|
46
|
+
@dragover.prevent="dragging = true"
|
|
47
|
+
@dragleave="dragging = false"
|
|
48
|
+
@drop.prevent="onDrop"
|
|
49
|
+
@click="browse"
|
|
50
|
+
>
|
|
51
|
+
<p :class="dark ? 'text-[var(--esc-panel-text-muted)]' : 'text-gray-500'">
|
|
52
|
+
Drop files here or
|
|
53
|
+
<span :class="['font-medium', dark ? 'text-[var(--esc-panel-text)]' : 'text-blue-600']">browse</span>
|
|
54
|
+
</p>
|
|
55
|
+
<input ref="fileInput" type="file" multiple aria-label="Upload files" class="hidden" @change="onFileSelect" />
|
|
56
|
+
</div>
|
|
57
|
+
</template>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import FollowButton from './FollowButton.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/FollowButton',
|
|
5
|
+
component: FollowButton,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const NotFollowing = {
|
|
9
|
+
args: {
|
|
10
|
+
action: '#',
|
|
11
|
+
isFollowing: false,
|
|
12
|
+
followersCount: 3,
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Following = {
|
|
17
|
+
args: {
|
|
18
|
+
action: '#',
|
|
19
|
+
isFollowing: true,
|
|
20
|
+
followersCount: 5,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const NoFollowers = {
|
|
25
|
+
args: {
|
|
26
|
+
action: '#',
|
|
27
|
+
isFollowing: false,
|
|
28
|
+
followersCount: 0,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
@@ -8,7 +8,10 @@ const props = defineProps({
|
|
|
8
8
|
followersCount: { type: Number, default: 0 },
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
-
const escDark = inject(
|
|
11
|
+
const escDark = inject(
|
|
12
|
+
'esc-dark',
|
|
13
|
+
computed(() => false),
|
|
14
|
+
);
|
|
12
15
|
const following = ref(props.isFollowing);
|
|
13
16
|
const count = ref(props.followersCount);
|
|
14
17
|
const processing = ref(false);
|
|
@@ -16,47 +19,69 @@ const processing = ref(false);
|
|
|
16
19
|
function toggle() {
|
|
17
20
|
if (processing.value) return;
|
|
18
21
|
processing.value = true;
|
|
19
|
-
router.post(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
router.post(
|
|
23
|
+
props.action,
|
|
24
|
+
{},
|
|
25
|
+
{
|
|
26
|
+
preserveScroll: true,
|
|
27
|
+
onSuccess: () => {
|
|
28
|
+
following.value = !following.value;
|
|
29
|
+
count.value += following.value ? 1 : -1;
|
|
30
|
+
},
|
|
31
|
+
onFinish: () => {
|
|
32
|
+
processing.value = false;
|
|
33
|
+
},
|
|
24
34
|
},
|
|
25
|
-
|
|
26
|
-
processing.value = false;
|
|
27
|
-
},
|
|
28
|
-
});
|
|
35
|
+
);
|
|
29
36
|
}
|
|
30
37
|
</script>
|
|
31
38
|
|
|
32
39
|
<template>
|
|
33
|
-
<button
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
<button
|
|
41
|
+
:disabled="processing"
|
|
42
|
+
:class="[
|
|
43
|
+
'inline-flex items-center gap-2 rounded-lg px-3 py-2 text-sm font-medium transition-colors',
|
|
44
|
+
escDark
|
|
45
|
+
? following
|
|
46
|
+
? 'bg-cyan-500/15 text-[var(--esc-panel-text)] ring-1 ring-[var(--esc-panel-accent)]/20 hover:bg-cyan-500/25'
|
|
47
|
+
: 'border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-hover)] text-[var(--esc-panel-text-tertiary)] hover:bg-[var(--esc-panel-hover)] hover:text-[var(--esc-panel-text-secondary)]'
|
|
48
|
+
: following
|
|
49
|
+
? 'bg-blue-100 text-blue-700 ring-1 ring-blue-300 hover:bg-blue-200'
|
|
50
|
+
: 'border border-gray-300 bg-white text-gray-600 hover:bg-gray-50 hover:text-gray-800',
|
|
51
|
+
processing && 'opacity-50 cursor-not-allowed',
|
|
52
|
+
]"
|
|
53
|
+
:aria-pressed="following"
|
|
54
|
+
:aria-label="following ? 'Unfollow ticket' : 'Follow ticket'"
|
|
55
|
+
@click="toggle"
|
|
56
|
+
>
|
|
44
57
|
<!-- Eye icon -->
|
|
45
58
|
<svg class="h-4 w-4" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">
|
|
46
59
|
<template v-if="following">
|
|
47
|
-
<path
|
|
60
|
+
<path
|
|
61
|
+
stroke-linecap="round"
|
|
62
|
+
stroke-linejoin="round"
|
|
63
|
+
d="M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"
|
|
64
|
+
/>
|
|
48
65
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
|
|
49
66
|
</template>
|
|
50
67
|
<template v-else>
|
|
51
|
-
<path
|
|
68
|
+
<path
|
|
69
|
+
stroke-linecap="round"
|
|
70
|
+
stroke-linejoin="round"
|
|
71
|
+
d="M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"
|
|
72
|
+
/>
|
|
52
73
|
</template>
|
|
53
74
|
</svg>
|
|
54
75
|
{{ following ? 'Following' : 'Follow' }}
|
|
55
|
-
<span
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
76
|
+
<span
|
|
77
|
+
v-if="count > 0"
|
|
78
|
+
:class="[
|
|
79
|
+
'rounded-full px-1.5 py-0.5 text-xs',
|
|
80
|
+
escDark
|
|
81
|
+
? 'bg-[var(--esc-panel-hover)] text-[var(--esc-panel-text-tertiary)]'
|
|
82
|
+
: 'bg-gray-100 text-gray-500',
|
|
83
|
+
]"
|
|
84
|
+
>
|
|
60
85
|
{{ count }}
|
|
61
86
|
</span>
|
|
62
87
|
</button>
|
|
@@ -7,7 +7,10 @@ const props = defineProps({
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
const emit = defineEmits(['update:show']);
|
|
10
|
-
const escDark = inject(
|
|
10
|
+
const escDark = inject(
|
|
11
|
+
'esc-dark',
|
|
12
|
+
computed(() => false),
|
|
13
|
+
);
|
|
11
14
|
|
|
12
15
|
const shortcutGroups = [
|
|
13
16
|
{
|
|
@@ -34,15 +37,11 @@ const shortcutGroups = [
|
|
|
34
37
|
{
|
|
35
38
|
title: 'Global',
|
|
36
39
|
contexts: ['list', 'detail'],
|
|
37
|
-
shortcuts: [
|
|
38
|
-
{ keys: ['?'], description: 'Show this help' },
|
|
39
|
-
],
|
|
40
|
+
shortcuts: [{ keys: ['?'], description: 'Show this help' }],
|
|
40
41
|
},
|
|
41
42
|
];
|
|
42
43
|
|
|
43
|
-
const filteredGroups = computed(() =>
|
|
44
|
-
shortcutGroups.filter(g => g.contexts.includes(props.context))
|
|
45
|
-
);
|
|
44
|
+
const filteredGroups = computed(() => shortcutGroups.filter((g) => g.contexts.includes(props.context)));
|
|
46
45
|
|
|
47
46
|
function closeModal() {
|
|
48
47
|
emit('update:show', false);
|
|
@@ -51,31 +50,84 @@ function closeModal() {
|
|
|
51
50
|
|
|
52
51
|
<template>
|
|
53
52
|
<Teleport to="body">
|
|
54
|
-
<Transition
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
<Transition
|
|
54
|
+
enter-active-class="transition duration-200 ease-out"
|
|
55
|
+
enter-from-class="opacity-0"
|
|
56
|
+
enter-to-class="opacity-100"
|
|
57
|
+
leave-active-class="transition duration-150 ease-in"
|
|
58
|
+
leave-from-class="opacity-100"
|
|
59
|
+
leave-to-class="opacity-0"
|
|
60
|
+
>
|
|
61
|
+
<div
|
|
62
|
+
v-if="show"
|
|
63
|
+
class="fixed inset-0 z-[100] flex items-center justify-center"
|
|
64
|
+
@keydown.escape="closeModal"
|
|
65
|
+
>
|
|
57
66
|
<!-- Backdrop -->
|
|
58
67
|
<div class="absolute inset-0 bg-black/60 backdrop-blur-sm" @click="closeModal"></div>
|
|
59
68
|
|
|
60
69
|
<!-- Modal -->
|
|
61
|
-
<div
|
|
62
|
-
|
|
70
|
+
<div
|
|
71
|
+
role="dialog"
|
|
72
|
+
aria-modal="true"
|
|
73
|
+
aria-label="Keyboard shortcuts"
|
|
74
|
+
:class="[
|
|
75
|
+
'relative z-10 w-full max-w-lg overflow-hidden rounded-2xl border shadow-2xl',
|
|
76
|
+
escDark
|
|
77
|
+
? 'border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)]'
|
|
78
|
+
: 'border-gray-200 bg-white',
|
|
79
|
+
]"
|
|
80
|
+
>
|
|
63
81
|
<!-- Header -->
|
|
64
|
-
<div
|
|
65
|
-
|
|
82
|
+
<div
|
|
83
|
+
:class="[
|
|
84
|
+
'flex items-center justify-between border-b px-6 py-4',
|
|
85
|
+
escDark ? 'border-[var(--esc-panel-border)]' : 'border-gray-200',
|
|
86
|
+
]"
|
|
87
|
+
>
|
|
66
88
|
<div class="flex items-center gap-3">
|
|
67
|
-
<svg
|
|
68
|
-
|
|
69
|
-
|
|
89
|
+
<svg
|
|
90
|
+
:class="[
|
|
91
|
+
'h-5 w-5',
|
|
92
|
+
escDark ? 'text-[var(--esc-panel-text-tertiary)]' : 'text-gray-500',
|
|
93
|
+
]"
|
|
94
|
+
fill="none"
|
|
95
|
+
stroke="currentColor"
|
|
96
|
+
stroke-width="1.5"
|
|
97
|
+
viewBox="0 0 24 24"
|
|
98
|
+
>
|
|
99
|
+
<path
|
|
100
|
+
stroke-linecap="round"
|
|
101
|
+
stroke-linejoin="round"
|
|
102
|
+
d="M6.75 7.5l3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0021 18V6a2.25 2.25 0 00-2.25-2.25H5.25A2.25 2.25 0 003 6v12a2.25 2.25 0 002.25 2.25z"
|
|
103
|
+
/>
|
|
70
104
|
</svg>
|
|
71
|
-
<h2
|
|
105
|
+
<h2
|
|
106
|
+
:class="[
|
|
107
|
+
'text-base font-semibold',
|
|
108
|
+
escDark ? 'text-[var(--esc-panel-text)]' : 'text-gray-900',
|
|
109
|
+
]"
|
|
110
|
+
>
|
|
72
111
|
Keyboard Shortcuts
|
|
73
112
|
</h2>
|
|
74
113
|
</div>
|
|
75
|
-
<button
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
114
|
+
<button
|
|
115
|
+
aria-label="Close"
|
|
116
|
+
:class="[
|
|
117
|
+
'rounded-lg p-1.5 transition-colors',
|
|
118
|
+
escDark
|
|
119
|
+
? 'text-[var(--esc-panel-text-muted)] hover:bg-[var(--esc-panel-hover)] hover:text-[var(--esc-panel-text-secondary)]'
|
|
120
|
+
: 'text-gray-400 hover:bg-gray-100 hover:text-gray-600',
|
|
121
|
+
]"
|
|
122
|
+
@click="closeModal"
|
|
123
|
+
>
|
|
124
|
+
<svg
|
|
125
|
+
class="h-5 w-5"
|
|
126
|
+
fill="none"
|
|
127
|
+
stroke="currentColor"
|
|
128
|
+
stroke-width="1.5"
|
|
129
|
+
viewBox="0 0 24 24"
|
|
130
|
+
>
|
|
79
131
|
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
|
|
80
132
|
</svg>
|
|
81
133
|
</button>
|
|
@@ -83,25 +135,48 @@ function closeModal() {
|
|
|
83
135
|
|
|
84
136
|
<!-- Body -->
|
|
85
137
|
<div class="max-h-[60vh] overflow-y-auto px-6 py-4">
|
|
86
|
-
<div
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
138
|
+
<div
|
|
139
|
+
v-for="(group, gi) in filteredGroups"
|
|
140
|
+
:key="gi"
|
|
141
|
+
:class="[
|
|
142
|
+
'pb-4',
|
|
143
|
+
gi < filteredGroups.length - 1 && 'mb-4 border-b',
|
|
144
|
+
escDark ? 'border-[var(--esc-panel-border)]' : 'border-gray-100',
|
|
145
|
+
]"
|
|
146
|
+
>
|
|
147
|
+
<h3
|
|
148
|
+
:class="[
|
|
149
|
+
'mb-3 text-xs font-semibold uppercase tracking-wider',
|
|
150
|
+
escDark ? 'text-[var(--esc-panel-text-muted)]' : 'text-gray-500',
|
|
151
|
+
]"
|
|
152
|
+
>
|
|
91
153
|
{{ group.title }}
|
|
92
154
|
</h3>
|
|
93
155
|
<div class="space-y-2">
|
|
94
|
-
<div
|
|
95
|
-
|
|
96
|
-
|
|
156
|
+
<div
|
|
157
|
+
v-for="(shortcut, si) in group.shortcuts"
|
|
158
|
+
:key="si"
|
|
159
|
+
class="flex items-center justify-between"
|
|
160
|
+
>
|
|
161
|
+
<span
|
|
162
|
+
:class="[
|
|
163
|
+
'text-sm',
|
|
164
|
+
escDark ? 'text-[var(--esc-panel-text-secondary)]' : 'text-gray-700',
|
|
165
|
+
]"
|
|
166
|
+
>
|
|
97
167
|
{{ shortcut.description }}
|
|
98
168
|
</span>
|
|
99
169
|
<div class="flex items-center gap-1">
|
|
100
|
-
<kbd
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
170
|
+
<kbd
|
|
171
|
+
v-for="(key, ki) in shortcut.keys"
|
|
172
|
+
:key="ki"
|
|
173
|
+
:class="[
|
|
174
|
+
'inline-flex min-w-[24px] items-center justify-center rounded-md border px-2 py-0.5 text-xs font-semibold',
|
|
175
|
+
escDark
|
|
176
|
+
? 'border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-hover)] text-[var(--esc-panel-text-secondary)]'
|
|
177
|
+
: 'border-gray-300 bg-gray-100 text-gray-700',
|
|
178
|
+
]"
|
|
179
|
+
>
|
|
105
180
|
{{ key }}
|
|
106
181
|
</kbd>
|
|
107
182
|
</div>
|
|
@@ -111,10 +186,25 @@ function closeModal() {
|
|
|
111
186
|
</div>
|
|
112
187
|
|
|
113
188
|
<!-- Footer -->
|
|
114
|
-
<div
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
189
|
+
<div
|
|
190
|
+
:class="[
|
|
191
|
+
'border-t px-6 py-3 text-center text-xs',
|
|
192
|
+
escDark
|
|
193
|
+
? 'border-[var(--esc-panel-border)] text-[var(--esc-panel-text-muted)]'
|
|
194
|
+
: 'border-gray-100 text-gray-400',
|
|
195
|
+
]"
|
|
196
|
+
>
|
|
197
|
+
Press
|
|
198
|
+
<kbd
|
|
199
|
+
:class="[
|
|
200
|
+
'mx-1 inline-flex items-center rounded border px-1.5 py-0.5 text-[10px] font-semibold',
|
|
201
|
+
escDark
|
|
202
|
+
? 'border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-hover)] text-[var(--esc-panel-text-tertiary)]'
|
|
203
|
+
: 'border-gray-300 bg-gray-100 text-gray-600',
|
|
204
|
+
]"
|
|
205
|
+
>Esc</kbd
|
|
206
|
+
>
|
|
207
|
+
to close
|
|
118
208
|
</div>
|
|
119
209
|
</div>
|
|
120
210
|
</div>
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from 'vue';
|
|
3
|
+
|
|
4
|
+
defineProps({
|
|
5
|
+
ticketReference: { type: String, required: true },
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
const emit = defineEmits(['insert-link', 'quote']);
|
|
9
|
+
const searchTerm = ref('');
|
|
10
|
+
const expanded = ref(true);
|
|
11
|
+
|
|
12
|
+
// Placeholder results for knowledge base integration
|
|
13
|
+
const results = ref([]);
|
|
14
|
+
const loading = ref(false);
|
|
15
|
+
let debounceTimer = null;
|
|
16
|
+
|
|
17
|
+
function onSearch(val) {
|
|
18
|
+
window.clearTimeout(debounceTimer);
|
|
19
|
+
if (!val || val.length < 2) {
|
|
20
|
+
results.value = [];
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
debounceTimer = window.setTimeout(() => search(val), 300);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function search(term) {
|
|
27
|
+
loading.value = true;
|
|
28
|
+
// Placeholder: in production, this would call a knowledge base API
|
|
29
|
+
results.value = [
|
|
30
|
+
{
|
|
31
|
+
id: 1,
|
|
32
|
+
title: `How to resolve "${term}" issues`,
|
|
33
|
+
excerpt: `This article explains common solutions for ${term}-related problems that customers frequently encounter.`,
|
|
34
|
+
url: '#',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: 2,
|
|
38
|
+
title: `${term} - FAQ`,
|
|
39
|
+
excerpt: `Frequently asked questions about ${term} and related features.`,
|
|
40
|
+
url: '#',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 3,
|
|
44
|
+
title: `Troubleshooting ${term}`,
|
|
45
|
+
excerpt: `Step-by-step troubleshooting guide for ${term} problems.`,
|
|
46
|
+
url: '#',
|
|
47
|
+
},
|
|
48
|
+
];
|
|
49
|
+
loading.value = false;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function insertLink(article) {
|
|
53
|
+
emit('insert-link', article);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function quoteArticle(article) {
|
|
57
|
+
emit('quote', article);
|
|
58
|
+
}
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<template>
|
|
62
|
+
<div class="rounded-xl border border-white/[0.06] bg-neutral-900/60 p-4">
|
|
63
|
+
<button
|
|
64
|
+
class="flex w-full items-center justify-between text-sm font-semibold text-neutral-200"
|
|
65
|
+
@click="expanded = !expanded"
|
|
66
|
+
>
|
|
67
|
+
<span>Knowledge Base</span>
|
|
68
|
+
<svg
|
|
69
|
+
:class="['h-4 w-4 text-neutral-500 transition-transform', expanded && 'rotate-180']"
|
|
70
|
+
fill="none"
|
|
71
|
+
stroke="currentColor"
|
|
72
|
+
stroke-width="1.5"
|
|
73
|
+
viewBox="0 0 24 24"
|
|
74
|
+
>
|
|
75
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5" />
|
|
76
|
+
</svg>
|
|
77
|
+
</button>
|
|
78
|
+
|
|
79
|
+
<div v-if="expanded" class="mt-3 space-y-3">
|
|
80
|
+
<input
|
|
81
|
+
v-model="searchTerm"
|
|
82
|
+
type="text"
|
|
83
|
+
placeholder="Search knowledge base..."
|
|
84
|
+
class="w-full rounded-lg border border-white/10 bg-neutral-950 px-3 py-2 text-sm text-neutral-200 placeholder-neutral-500 focus:border-white/20 focus:outline-none focus:ring-1 focus:ring-white/10"
|
|
85
|
+
@input="onSearch(searchTerm)"
|
|
86
|
+
/>
|
|
87
|
+
|
|
88
|
+
<div v-if="loading" class="text-xs text-neutral-500">Searching...</div>
|
|
89
|
+
|
|
90
|
+
<div v-else-if="results.length" class="space-y-2">
|
|
91
|
+
<div
|
|
92
|
+
v-for="article in results"
|
|
93
|
+
:key="article.id"
|
|
94
|
+
class="rounded-lg border border-white/[0.04] bg-white/[0.02] p-3"
|
|
95
|
+
>
|
|
96
|
+
<h4 class="text-sm font-medium text-neutral-200">{{ article.title }}</h4>
|
|
97
|
+
<p class="mt-1 text-xs text-neutral-400 line-clamp-2">{{ article.excerpt }}</p>
|
|
98
|
+
<div class="mt-2 flex gap-2">
|
|
99
|
+
<button
|
|
100
|
+
class="rounded px-2 py-0.5 text-[10px] font-medium text-cyan-400 ring-1 ring-cyan-500/20 transition-colors hover:bg-cyan-500/10"
|
|
101
|
+
@click="insertLink(article)"
|
|
102
|
+
>
|
|
103
|
+
Insert Link
|
|
104
|
+
</button>
|
|
105
|
+
<button
|
|
106
|
+
class="rounded px-2 py-0.5 text-[10px] font-medium text-violet-400 ring-1 ring-violet-500/20 transition-colors hover:bg-violet-500/10"
|
|
107
|
+
@click="quoteArticle(article)"
|
|
108
|
+
>
|
|
109
|
+
Quote
|
|
110
|
+
</button>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<div v-else-if="searchTerm.length >= 2 && !loading" class="text-xs text-neutral-500">
|
|
116
|
+
No articles found.
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
<div v-else class="text-xs text-neutral-500">Search for articles to help resolve this ticket.</div>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
</template>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import KpiCard from './KpiCard.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/KpiCard',
|
|
5
|
+
component: KpiCard,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const Basic = { args: { label: 'Total Tickets', value: 1284 } };
|
|
9
|
+
export const WithPositiveTrend = { args: { label: 'Resolved', value: 892, trend: 12 } };
|
|
10
|
+
export const WithNegativeTrend = { args: { label: 'SLA Breaches', value: 7, trend: -34 } };
|
|
11
|
+
|
|
12
|
+
export const WithIcon = {
|
|
13
|
+
args: {
|
|
14
|
+
label: 'Active Agents',
|
|
15
|
+
value: 24,
|
|
16
|
+
trend: 8,
|
|
17
|
+
icon: 'M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z',
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const DashboardRow = {
|
|
22
|
+
render: () => ({
|
|
23
|
+
components: { KpiCard },
|
|
24
|
+
template: `
|
|
25
|
+
<div class="grid grid-cols-3 gap-4" style="max-width: 800px;">
|
|
26
|
+
<KpiCard label="Total Tickets" :value="1284" :trend="5" icon="M2.25 13.5h3.86a2.25 2.25 0 012.012 1.244l.256.512a2.25 2.25 0 002.013 1.244h3.218a2.25 2.25 0 002.013-1.244l.256-.512a2.25 2.25 0 012.013-1.244h3.859" />
|
|
27
|
+
<KpiCard label="Avg Response Time" value="1h 42m" :trend="-18" icon="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" />
|
|
28
|
+
<KpiCard label="CSAT Score" value="94%" :trend="3" icon="M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z" />
|
|
29
|
+
</div>
|
|
30
|
+
`,
|
|
31
|
+
}),
|
|
32
|
+
};
|