@rkosafo/cai.components 0.0.41 → 0.0.44
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.
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
showOverflowActionButton = true,
|
|
19
19
|
caseStatus = '',
|
|
20
20
|
logoUrl = '',
|
|
21
|
-
|
|
21
|
+
showFollowOverflowAction = true,
|
|
22
22
|
showCloseOverflowAction = true,
|
|
23
23
|
onOverflowActionClicked,
|
|
24
24
|
onToggleFollowCase,
|
|
@@ -122,10 +122,10 @@
|
|
|
122
122
|
transition:slide
|
|
123
123
|
use:clickOutsideAction
|
|
124
124
|
>
|
|
125
|
-
{#if
|
|
125
|
+
{#if showFollowOverflowAction}
|
|
126
126
|
{#if !isFollowingCase}
|
|
127
127
|
<DropdownItem
|
|
128
|
-
class="flex items-center gap-1 whitespace-nowrap "
|
|
128
|
+
class="flex w-full appearance-none items-center gap-1 whitespace-nowrap list-none"
|
|
129
129
|
onclick={() => {
|
|
130
130
|
onToggleFollowCase?.('follow');
|
|
131
131
|
showMenu = false;
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
>
|
|
134
134
|
{:else}
|
|
135
135
|
<DropdownItem
|
|
136
|
-
class="flex items-center gap-1 whitespace-nowrap "
|
|
136
|
+
class="flex w-full appearance-none items-center gap-1 whitespace-nowrap list-none"
|
|
137
137
|
onclick={() => {
|
|
138
138
|
onToggleFollowCase?.('unfollow');
|
|
139
139
|
showMenu = false;
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
{#if overflowActionsList.length > 0}
|
|
146
146
|
{#each overflowActionsList as item}
|
|
147
147
|
<DropdownItem
|
|
148
|
-
class="flex items-center gap-1 whitespace-nowrap "
|
|
148
|
+
class="flex w-full appearance-none items-center gap-1 whitespace-nowrap list-none"
|
|
149
149
|
onclick={() => {
|
|
150
150
|
onOverflowActionClicked?.(item);
|
|
151
151
|
showMenu = false;
|
|
@@ -155,9 +155,9 @@
|
|
|
155
155
|
>
|
|
156
156
|
{/each}
|
|
157
157
|
{/if}
|
|
158
|
-
{#if
|
|
158
|
+
{#if showCloseOverflowAction}
|
|
159
159
|
<DropdownItem
|
|
160
|
-
class="flex items-center gap-1 whitespace-nowrap text-red-600"
|
|
160
|
+
class="flex w-full appearance-none items-center gap-1 whitespace-nowrap text-red-600 list-none"
|
|
161
161
|
onclick={() => {
|
|
162
162
|
onCloseCase?.();
|
|
163
163
|
showMenu = false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { clickOutsideAction, IconifyIcon } from '../../index.js';
|
|
2
|
+
import { clickOutsideAction, cn, IconifyIcon } from '../../index.js';
|
|
3
3
|
import type { CommandListType, IMentionableItem, ISlashCommand, RichTextProps } from './index.js';
|
|
4
4
|
|
|
5
5
|
let {
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
mentionableItems = [],
|
|
11
11
|
onMention,
|
|
12
12
|
onSend,
|
|
13
|
-
onSlash
|
|
13
|
+
onSlash,
|
|
14
|
+
class: className = ''
|
|
14
15
|
}: RichTextProps = $props();
|
|
15
16
|
|
|
16
17
|
let showCommandList = $state(false);
|
|
@@ -163,7 +164,7 @@
|
|
|
163
164
|
onkeyup={onKeyUp}
|
|
164
165
|
onkeydown={onKeyDown}
|
|
165
166
|
rows="1"
|
|
166
|
-
class=
|
|
167
|
+
class={cn('mt-1 flex-grow rounded-md bg-transparent p-2 focus:outline-none', className)}
|
|
167
168
|
{placeholder}
|
|
168
169
|
></textarea>
|
|
169
170
|
{#if loading}
|
|
@@ -26,7 +26,7 @@ export interface ChatHeaderProps {
|
|
|
26
26
|
showOverflowActionButton?: boolean;
|
|
27
27
|
caseStatus?: string;
|
|
28
28
|
isFollowingCase?: boolean;
|
|
29
|
-
|
|
29
|
+
showFollowOverflowAction?: boolean;
|
|
30
30
|
showCloseOverflowAction?: boolean;
|
|
31
31
|
onCloseCase?: () => void;
|
|
32
32
|
onOverflowActionClicked?: (val: ChatHeaderOverflowAction) => void;
|
|
@@ -56,6 +56,7 @@ export interface RichTextProps {
|
|
|
56
56
|
onSend?: () => void;
|
|
57
57
|
onSlash?: (val: ISlashCommand) => void;
|
|
58
58
|
onMention?: (val: IMentionableItem) => void;
|
|
59
|
+
class?: string;
|
|
59
60
|
}
|
|
60
61
|
export type CommandListType = 'slash' | 'mention';
|
|
61
62
|
export interface PreviewPageSrc {
|