@wealthx/shadcn 1.5.28 → 1.5.29
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/.turbo/turbo-build.log +104 -104
- package/CHANGELOG.md +6 -0
- package/dist/{chunk-CE2WONIY.mjs → chunk-AE4JKISB.mjs} +27 -31
- package/dist/chunk-BZWQU52U.mjs +1025 -0
- package/dist/components/ui/ai-builder/index.js +993 -12
- package/dist/components/ui/ai-builder/index.mjs +27 -3
- package/dist/components/ui/ai-conversations/index.js +27 -31
- package/dist/components/ui/ai-conversations/index.mjs +1 -1
- package/dist/index.js +4976 -4972
- package/dist/index.mjs +2 -2
- package/dist/styles.css +1 -1
- package/package.json +4 -1
- package/src/components/index.tsx +0 -2
- package/src/components/ui/ai-builder/agent-card.tsx +7 -5
- package/src/components/ui/ai-builder/agent-settings.tsx +709 -0
- package/src/components/ui/ai-builder/index.tsx +27 -2
- package/src/components/ui/ai-builder/service-config-modal.tsx +11 -11
- package/src/components/ui/ai-builder/types.ts +27 -15
- package/src/components/ui/ai-conversations/thread.tsx +9 -11
- package/src/styles/styles-css.ts +1 -1
- package/dist/chunk-T5PGVLMR.mjs +0 -479
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
export type {
|
|
2
2
|
AiBuilderAgentItem,
|
|
3
3
|
AiBuilderEmailCategories,
|
|
4
|
-
AiBuilderEmailFilterCategory,
|
|
5
|
-
AiBuilderEmailFilters,
|
|
6
4
|
AiBuilderServiceData,
|
|
7
5
|
AiBuilderServiceType,
|
|
6
|
+
AiBuilderAgentTone,
|
|
7
|
+
AiBuilderAgentLanguage,
|
|
8
|
+
AiBuilderAgentConfig,
|
|
9
|
+
AiBuilderAgentGeneralSettings,
|
|
10
|
+
AiBuilderResponseTemplate,
|
|
11
|
+
AiBuilderRuleItem,
|
|
8
12
|
} from "./types";
|
|
9
13
|
|
|
10
14
|
export { AgentCard, AgentMenuModal } from "./agent-card";
|
|
@@ -21,3 +25,24 @@ export type {
|
|
|
21
25
|
|
|
22
26
|
export { ServiceConfigurationModal } from "./service-config-modal";
|
|
23
27
|
export type { ServiceConfigurationModalProps } from "./service-config-modal";
|
|
28
|
+
|
|
29
|
+
export {
|
|
30
|
+
SettingRow,
|
|
31
|
+
SettingCard,
|
|
32
|
+
AgentConfigForm,
|
|
33
|
+
ResponseTemplateEditModal,
|
|
34
|
+
RuleOrderBadge,
|
|
35
|
+
RuleSetSection,
|
|
36
|
+
SectionHeader,
|
|
37
|
+
AddEditRuleModal,
|
|
38
|
+
} from "./agent-settings";
|
|
39
|
+
export type {
|
|
40
|
+
SettingRowProps,
|
|
41
|
+
SettingCardProps,
|
|
42
|
+
AgentConfigFormProps,
|
|
43
|
+
ResponseTemplateEditModalProps,
|
|
44
|
+
RuleOrderBadgeProps,
|
|
45
|
+
RuleSetSectionProps,
|
|
46
|
+
SectionHeaderProps,
|
|
47
|
+
AddEditRuleModalProps,
|
|
48
|
+
} from "./agent-settings";
|
|
@@ -50,7 +50,7 @@ export function ServiceConfigurationModal({
|
|
|
50
50
|
}: ServiceConfigurationModalProps) {
|
|
51
51
|
return (
|
|
52
52
|
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
53
|
-
<DialogContent className="max-w-md">
|
|
53
|
+
<DialogContent className="flex max-h-[90vh] flex-col max-w-md">
|
|
54
54
|
{isConnected ? (
|
|
55
55
|
<>
|
|
56
56
|
<DialogHeader>
|
|
@@ -60,7 +60,7 @@ export function ServiceConfigurationModal({
|
|
|
60
60
|
</DialogDescription>
|
|
61
61
|
</DialogHeader>
|
|
62
62
|
|
|
63
|
-
<div className="flex flex-col gap-4 py-2">
|
|
63
|
+
<div className="flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto py-2">
|
|
64
64
|
<div className="flex items-center gap-2 px-3 py-2 text-xs font-medium bg-success/10 text-success">
|
|
65
65
|
<CheckCircle2 className="h-3.5 w-3.5 shrink-0" />
|
|
66
66
|
Active — integration is running
|
|
@@ -158,13 +158,13 @@ export function ServiceConfigurationModal({
|
|
|
158
158
|
</p>
|
|
159
159
|
</div>
|
|
160
160
|
<Card className="py-0">
|
|
161
|
-
<CardContent className="flex flex-col gap-3 p-3
|
|
161
|
+
<CardContent className="flex flex-col gap-3 p-3">
|
|
162
162
|
{serviceData.emailCategories.available.map(
|
|
163
163
|
(category) => {
|
|
164
164
|
const checked =
|
|
165
|
-
serviceData.emailCategories!.selected.
|
|
166
|
-
category
|
|
167
|
-
)
|
|
165
|
+
serviceData.emailCategories!.selected.includes(
|
|
166
|
+
category
|
|
167
|
+
);
|
|
168
168
|
return (
|
|
169
169
|
<div
|
|
170
170
|
key={category}
|
|
@@ -181,10 +181,10 @@ export function ServiceConfigurationModal({
|
|
|
181
181
|
category,
|
|
182
182
|
]
|
|
183
183
|
: serviceData.emailCategories!.selected.filter(
|
|
184
|
-
(c) => c !== category
|
|
184
|
+
(c) => c !== category
|
|
185
185
|
);
|
|
186
186
|
serviceData.emailCategories!.onChange(
|
|
187
|
-
next
|
|
187
|
+
next
|
|
188
188
|
);
|
|
189
189
|
}}
|
|
190
190
|
/>
|
|
@@ -196,7 +196,7 @@ export function ServiceConfigurationModal({
|
|
|
196
196
|
</label>
|
|
197
197
|
</div>
|
|
198
198
|
);
|
|
199
|
-
}
|
|
199
|
+
}
|
|
200
200
|
)}
|
|
201
201
|
</CardContent>
|
|
202
202
|
</Card>
|
|
@@ -227,7 +227,7 @@ export function ServiceConfigurationModal({
|
|
|
227
227
|
onCheckedChange={(v) =>
|
|
228
228
|
serviceData.emailFilters!.onFilterChange(
|
|
229
229
|
category.id,
|
|
230
|
-
!!v
|
|
230
|
+
!!v
|
|
231
231
|
)
|
|
232
232
|
}
|
|
233
233
|
/>
|
|
@@ -238,7 +238,7 @@ export function ServiceConfigurationModal({
|
|
|
238
238
|
{category.label}
|
|
239
239
|
</label>
|
|
240
240
|
</div>
|
|
241
|
-
)
|
|
241
|
+
)
|
|
242
242
|
)}
|
|
243
243
|
</CardContent>
|
|
244
244
|
</Card>
|
|
@@ -19,18 +19,6 @@ export type AiBuilderEmailCategories = {
|
|
|
19
19
|
onChange: (categories: string[]) => void;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
export type AiBuilderEmailFilterCategory = {
|
|
23
|
-
id: string;
|
|
24
|
-
label: string;
|
|
25
|
-
enabled: boolean;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export type AiBuilderEmailFilters = {
|
|
29
|
-
description: string;
|
|
30
|
-
categories: AiBuilderEmailFilterCategory[];
|
|
31
|
-
onFilterChange: (categoryId: string, enabled: boolean) => void;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
22
|
export type AiBuilderServiceData = {
|
|
35
23
|
accountIdentifier: string;
|
|
36
24
|
accountIdentifierLabel: string;
|
|
@@ -41,8 +29,32 @@ export type AiBuilderServiceData = {
|
|
|
41
29
|
syncDescription: string;
|
|
42
30
|
syncEnabled: boolean;
|
|
43
31
|
onSyncToggle: (enabled: boolean) => void;
|
|
44
|
-
/** When set, renders an "Email
|
|
32
|
+
/** When set, renders an "Email Filters" section with per-category checkboxes. */
|
|
45
33
|
emailCategories?: AiBuilderEmailCategories;
|
|
46
|
-
|
|
47
|
-
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type AiBuilderAgentTone = "Professional" | "Friendly" | "Enthusiastic";
|
|
37
|
+
export type AiBuilderAgentLanguage = "American English" | "Australian English";
|
|
38
|
+
|
|
39
|
+
export type AiBuilderAgentConfig = {
|
|
40
|
+
name: string;
|
|
41
|
+
businessDescription: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type AiBuilderAgentGeneralSettings = {
|
|
45
|
+
autoResponse: boolean;
|
|
46
|
+
tone: AiBuilderAgentTone;
|
|
47
|
+
language: AiBuilderAgentLanguage;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export type AiBuilderResponseTemplate = {
|
|
51
|
+
channel: "email" | "chat";
|
|
52
|
+
isEnabled: boolean;
|
|
53
|
+
content: string;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export type AiBuilderRuleItem = {
|
|
57
|
+
id: string;
|
|
58
|
+
text: string;
|
|
59
|
+
isEnabled: boolean;
|
|
48
60
|
};
|
|
@@ -367,6 +367,7 @@ export function ChatComposer({
|
|
|
367
367
|
}: ChatComposerProps) {
|
|
368
368
|
// Semi-controlled: owns channel state for uncontrolled usage, notifies parent on change.
|
|
369
369
|
// Force chat when email isn't integrated so the panel never lands on a hidden tab.
|
|
370
|
+
const initialChannelRef = React.useRef(channelProp);
|
|
370
371
|
const [channel, setChannel] = React.useState<AiConvChannel>(
|
|
371
372
|
isEmailIntegrated ? channelProp : "chat",
|
|
372
373
|
);
|
|
@@ -558,12 +559,6 @@ export function ChatComposer({
|
|
|
558
559
|
<ComposerToolbarButton label="Attach file" icon={Paperclip} />
|
|
559
560
|
</div>
|
|
560
561
|
<div className="flex items-center gap-2">
|
|
561
|
-
{onLetAiHandle && (
|
|
562
|
-
<Button variant="outline" size="sm" onClick={onLetAiHandle}>
|
|
563
|
-
<Bot className="mr-1.5 size-3.5" />
|
|
564
|
-
Let AI Handle
|
|
565
|
-
</Button>
|
|
566
|
-
)}
|
|
567
562
|
<Button
|
|
568
563
|
size="sm"
|
|
569
564
|
onClick={() => {
|
|
@@ -596,12 +591,15 @@ export function ChatComposer({
|
|
|
596
591
|
className="min-h-0 flex-1 resize-none text-base"
|
|
597
592
|
/>
|
|
598
593
|
<div className="flex items-center justify-between">
|
|
599
|
-
|
|
600
|
-
<
|
|
601
|
-
|
|
602
|
-
|
|
594
|
+
{initialChannelRef.current !== "email" && (
|
|
595
|
+
<Button variant="outline" size="sm" onClick={onLetAiHandle}>
|
|
596
|
+
<Bot className="mr-1.5 size-3.5" />
|
|
597
|
+
Let AI Handle
|
|
598
|
+
</Button>
|
|
599
|
+
)}
|
|
603
600
|
<Button
|
|
604
601
|
size="sm"
|
|
602
|
+
className="ml-auto"
|
|
605
603
|
onClick={() => onSend?.(inputValue)}
|
|
606
604
|
disabled={!inputValue.trim()}
|
|
607
605
|
>
|
|
@@ -793,7 +791,7 @@ export function ChatThread({
|
|
|
793
791
|
Take Over
|
|
794
792
|
</Button>
|
|
795
793
|
)}
|
|
796
|
-
{!isClosed && !aiIsHandling && (
|
|
794
|
+
{!isClosed && !aiIsHandling && channel !== "email" && (
|
|
797
795
|
<Button variant="outline" size="sm" onClick={onLetAiHandle}>
|
|
798
796
|
<Bot className="mr-1.5 size-3.5" />
|
|
799
797
|
Let AI Handle
|