@altimateai/ui-components 0.0.1-beta.6 → 0.0.1-beta.8
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/dist/Button-BKBSxoPA.d.ts +14 -0
- package/dist/CoachForm.css +1 -1
- package/dist/CoachForm.js +22686 -15999
- package/dist/NativeSelect.js +8994 -0
- package/dist/assets/icons/index.js +1 -1
- package/dist/chatbotV2/index.d.ts +8 -112
- package/dist/chatbotV2/index.js +11 -10
- package/dist/flowchart-elk-definition-170a3958.js +4 -5
- package/dist/index.css +1 -1
- package/dist/index.d.ts +76 -13
- package/dist/index.js +68 -31
- package/dist/index2.js +52 -52
- package/dist/is_dark.js +1 -1
- package/dist/lineage/index.js +21 -22
- package/dist/main.js +44 -47
- package/dist/mindmap-definition-44684416.js +4 -5
- package/dist/redux-toolkit.modern.js +995 -886
- package/dist/shadcn/index.d.ts +27 -22
- package/dist/shadcn/index.js +3073 -4254
- package/dist/storybook/Select.stories.tsx +23 -0
- package/dist/timeline-definition-8e5a9bc6.js +1 -1
- package/dist/types-6QSONCz1.d.ts +249 -0
- package/package.json +1 -1
- package/dist/Accordion.js +0 -7781
- package/dist/Badge.js +0 -7
- package/dist/Tooltip.js +0 -115
- package/dist/chatbot/index.d.ts +0 -43
- package/dist/chatbot/index.js +0 -186
- package/dist/index2.css +0 -1
- package/dist/types-FVWfXDNw.d.ts +0 -104
- package/dist/v4.css +0 -1
- package/dist/v4.js +0 -6839
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
SelectGroup,
|
|
9
9
|
SelectLabel,
|
|
10
10
|
SelectSeparator,
|
|
11
|
+
NativeSelect,
|
|
11
12
|
} from "../shadcn";
|
|
12
13
|
|
|
13
14
|
export default {
|
|
@@ -93,3 +94,25 @@ export const WithDefaultValue: StoryFn = () => (
|
|
|
93
94
|
</SelectContent>
|
|
94
95
|
</Select>
|
|
95
96
|
);
|
|
97
|
+
|
|
98
|
+
export const NativeSelectExample: StoryFn = () => {
|
|
99
|
+
const options = [
|
|
100
|
+
{ value: "apple", label: "Apple" },
|
|
101
|
+
{ value: "banana", label: "Banana" },
|
|
102
|
+
{ value: "orange", label: "Orange" },
|
|
103
|
+
];
|
|
104
|
+
|
|
105
|
+
return (
|
|
106
|
+
<div className="al-flex al-flex-col al-gap-4">
|
|
107
|
+
<NativeSelect
|
|
108
|
+
options={options}
|
|
109
|
+
placeholder="Select a fruit"
|
|
110
|
+
onChange={value => console.log("Selected:", value)}
|
|
111
|
+
/>
|
|
112
|
+
|
|
113
|
+
<NativeSelect options={options} placeholder="Disabled select" disabled />
|
|
114
|
+
|
|
115
|
+
<NativeSelect options={options} placeholder="With default value" value="banana" />
|
|
116
|
+
</div>
|
|
117
|
+
);
|
|
118
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as kt, p as vt, j as wt, k as rt, l as I, s as St, m as Et, n as Tt, o as et } from "./CoachForm.js";
|
|
2
2
|
import { s as q } from "./redux-toolkit.modern.js";
|
|
3
3
|
import { i as It } from "./is_dark.js";
|
|
4
4
|
var X = function() {
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { ReactNode, Dispatch, ComponentType } from 'react';
|
|
2
|
+
import { UnknownAction } from '@reduxjs/toolkit';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
interface AgentAction {
|
|
6
|
+
id?: string;
|
|
7
|
+
type: "info" | "analysis";
|
|
8
|
+
content: string;
|
|
9
|
+
timestamp: number;
|
|
10
|
+
artifacts?: Artifact[];
|
|
11
|
+
}
|
|
12
|
+
declare enum LoadingState {
|
|
13
|
+
LOADING = "LOADING",
|
|
14
|
+
LOADED = "LOADED",
|
|
15
|
+
ERROR = "ERROR",
|
|
16
|
+
UNINITIALIZED = "UNINITIALIZED"
|
|
17
|
+
}
|
|
18
|
+
interface AssistantMeta {
|
|
19
|
+
avatar: string;
|
|
20
|
+
name: string;
|
|
21
|
+
}
|
|
22
|
+
interface Feedback {
|
|
23
|
+
rating?: "up" | "down";
|
|
24
|
+
comment?: string;
|
|
25
|
+
}
|
|
26
|
+
interface ChatSession {
|
|
27
|
+
id: string;
|
|
28
|
+
messages: ChatMessage[];
|
|
29
|
+
context?: {
|
|
30
|
+
files?: File[];
|
|
31
|
+
selectedOptions?: string[];
|
|
32
|
+
[x: string]: unknown;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
interface FileUploadProps {
|
|
36
|
+
allowedFiles: string;
|
|
37
|
+
contextFieldKey: string;
|
|
38
|
+
}
|
|
39
|
+
interface ChatbotUrls {
|
|
40
|
+
origin?: string;
|
|
41
|
+
askPath?: string;
|
|
42
|
+
proceedPath?: string;
|
|
43
|
+
frontendUrl?: string;
|
|
44
|
+
followupPath?: string;
|
|
45
|
+
}
|
|
46
|
+
interface ChatbotProps {
|
|
47
|
+
helloMessage?: React.ReactNode;
|
|
48
|
+
assistantMeta?: AssistantMeta;
|
|
49
|
+
context?: Record<string, unknown>;
|
|
50
|
+
fileUploadProps?: FileUploadProps;
|
|
51
|
+
}
|
|
52
|
+
interface ChatbotProviderProps extends ChatbotProps {
|
|
53
|
+
taskLabel?: keyof typeof TaskLabels;
|
|
54
|
+
initialValidation?: ChatState["initialValidation"];
|
|
55
|
+
onError?: (error: unknown) => void;
|
|
56
|
+
urls?: ChatbotUrls;
|
|
57
|
+
disableContext?: boolean;
|
|
58
|
+
requestParams?: RequestInit;
|
|
59
|
+
components?: {
|
|
60
|
+
feedback?: ReactNode;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
type InteractionType = "text" | "select" | "multiSelect" | "confirm";
|
|
64
|
+
interface InteractionChoice {
|
|
65
|
+
id: string;
|
|
66
|
+
label: string;
|
|
67
|
+
value: string;
|
|
68
|
+
}
|
|
69
|
+
interface InteractionRequest {
|
|
70
|
+
type: InteractionType;
|
|
71
|
+
id: string;
|
|
72
|
+
prompt: string;
|
|
73
|
+
required?: boolean;
|
|
74
|
+
choices?: InteractionChoice[];
|
|
75
|
+
validation?: {
|
|
76
|
+
pattern?: string;
|
|
77
|
+
message?: string;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
interface ChatMessage {
|
|
81
|
+
id: string;
|
|
82
|
+
content: string;
|
|
83
|
+
role: "user" | "assistant";
|
|
84
|
+
timestamp: number;
|
|
85
|
+
actions?: AgentAction[];
|
|
86
|
+
interaction?: InteractionRequest;
|
|
87
|
+
artifacts?: Artifact[];
|
|
88
|
+
heading: string;
|
|
89
|
+
citations?: Citation[];
|
|
90
|
+
}
|
|
91
|
+
interface Artifact {
|
|
92
|
+
content: string;
|
|
93
|
+
entity: string;
|
|
94
|
+
name: string;
|
|
95
|
+
type: string;
|
|
96
|
+
}
|
|
97
|
+
interface ChatResponse {
|
|
98
|
+
content: string;
|
|
99
|
+
actions?: AgentAction[];
|
|
100
|
+
interaction?: InteractionRequest;
|
|
101
|
+
role: "assistant" | "user";
|
|
102
|
+
timestamp: number;
|
|
103
|
+
artifacts?: Artifact[];
|
|
104
|
+
heading: string;
|
|
105
|
+
}
|
|
106
|
+
interface ChatState {
|
|
107
|
+
sessions: Record<string, ChatSession>;
|
|
108
|
+
currentSessionId: string | null;
|
|
109
|
+
loadingState: LoadingState;
|
|
110
|
+
error: string | null;
|
|
111
|
+
abortController: AbortController | null;
|
|
112
|
+
currentActions: AgentAction[];
|
|
113
|
+
taskLabel?: keyof typeof TaskLabels;
|
|
114
|
+
initialValidation?: (data: {
|
|
115
|
+
context: ChatSession["context"];
|
|
116
|
+
}) => Promise<void>;
|
|
117
|
+
urls?: ChatbotUrls;
|
|
118
|
+
disableContext?: boolean;
|
|
119
|
+
requestParams?: RequestInit;
|
|
120
|
+
components?: {
|
|
121
|
+
feedback?: ReactNode;
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
interface AgentStreamResponse {
|
|
125
|
+
id?: string;
|
|
126
|
+
type: "info" | "agent_outcome" | "require_user_action" | "analysis" | "error" | "citations";
|
|
127
|
+
heading?: string;
|
|
128
|
+
content: string;
|
|
129
|
+
interaction?: {
|
|
130
|
+
type: "text" | "multiSelect" | "confirm" | "select";
|
|
131
|
+
id: string;
|
|
132
|
+
prompt: string;
|
|
133
|
+
required?: boolean;
|
|
134
|
+
choices?: Array<{
|
|
135
|
+
id: string;
|
|
136
|
+
label: string;
|
|
137
|
+
value: string;
|
|
138
|
+
}>;
|
|
139
|
+
};
|
|
140
|
+
artifacts?: Artifact[];
|
|
141
|
+
citations?: Citation[];
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
interface TeamMateState {
|
|
145
|
+
showCoachingForm: boolean;
|
|
146
|
+
}
|
|
147
|
+
interface TeamMateContextProps {
|
|
148
|
+
state: TeamMateState;
|
|
149
|
+
dispatch: Dispatch<UnknownAction>;
|
|
150
|
+
}
|
|
151
|
+
interface CoachAiResponse {
|
|
152
|
+
ai_response: string;
|
|
153
|
+
category: string;
|
|
154
|
+
personalizationScope: string;
|
|
155
|
+
}
|
|
156
|
+
interface CoachAiConfirmationResponse {
|
|
157
|
+
ok: boolean;
|
|
158
|
+
train_doc_uid: string;
|
|
159
|
+
frontend_url: string;
|
|
160
|
+
}
|
|
161
|
+
declare enum ContentCategory {
|
|
162
|
+
TERM_CLARIFICATION = "TermClarification",
|
|
163
|
+
GENERAL_GUIDELINES = "GeneralGuidelines",
|
|
164
|
+
BUSINESS_EXPLANATION = "BusinessExplanation"
|
|
165
|
+
}
|
|
166
|
+
declare enum TaskLabels {
|
|
167
|
+
DocGen = "DocGen",
|
|
168
|
+
ChartBot = "ChartBot",
|
|
169
|
+
SqlBot = "SqlExpert",
|
|
170
|
+
OpportunitiesBot = "OpportunitiesBot",
|
|
171
|
+
ProjectGovernor = "ProjectGovernor",
|
|
172
|
+
TeradataToSnowflakeMigrator = "TeradataToSnowflakeMigrator",
|
|
173
|
+
AlertManager = "AlertManager"
|
|
174
|
+
}
|
|
175
|
+
declare enum PersonalizationScope {
|
|
176
|
+
USER_SPECIFIC = "UserSpecific",
|
|
177
|
+
ALL_USERS = "AllUsers"
|
|
178
|
+
}
|
|
179
|
+
declare const learningSchema: z.ZodObject<{
|
|
180
|
+
train_doc_uid: z.ZodString;
|
|
181
|
+
userId: z.ZodString;
|
|
182
|
+
display_name: z.ZodString;
|
|
183
|
+
taskLabel: z.ZodString;
|
|
184
|
+
category: z.ZodEnum<[string, ...string[]]>;
|
|
185
|
+
personalizationScope: z.ZodDefault<z.ZodEnum<[string, ...string[]]>>;
|
|
186
|
+
createdDate: z.ZodString;
|
|
187
|
+
updatedDate: z.ZodString;
|
|
188
|
+
content: z.ZodString;
|
|
189
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
190
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
191
|
+
}, "strip", z.ZodTypeAny, {
|
|
192
|
+
content: string;
|
|
193
|
+
isActive: boolean;
|
|
194
|
+
display_name: string;
|
|
195
|
+
userId: string;
|
|
196
|
+
taskLabel: string;
|
|
197
|
+
category: string;
|
|
198
|
+
personalizationScope: string;
|
|
199
|
+
train_doc_uid: string;
|
|
200
|
+
createdDate: string;
|
|
201
|
+
updatedDate: string;
|
|
202
|
+
metadata?: Record<string, unknown> | undefined;
|
|
203
|
+
}, {
|
|
204
|
+
content: string;
|
|
205
|
+
display_name: string;
|
|
206
|
+
userId: string;
|
|
207
|
+
taskLabel: string;
|
|
208
|
+
category: string;
|
|
209
|
+
train_doc_uid: string;
|
|
210
|
+
createdDate: string;
|
|
211
|
+
updatedDate: string;
|
|
212
|
+
metadata?: Record<string, unknown> | undefined;
|
|
213
|
+
isActive?: boolean | undefined;
|
|
214
|
+
personalizationScope?: string | undefined;
|
|
215
|
+
}>;
|
|
216
|
+
interface Learning extends z.infer<typeof learningSchema> {
|
|
217
|
+
}
|
|
218
|
+
declare enum TeamMateAvailability {
|
|
219
|
+
EXTENSION = "VSCode Extension",
|
|
220
|
+
SAAS = "SaaS"
|
|
221
|
+
}
|
|
222
|
+
interface TeamMateComponentProps<T = void> {
|
|
223
|
+
onClose?: (data?: T) => void;
|
|
224
|
+
frontendUrl?: string;
|
|
225
|
+
urls?: ChatbotUrls;
|
|
226
|
+
}
|
|
227
|
+
interface TeamMateConfig<T = unknown> {
|
|
228
|
+
name: string;
|
|
229
|
+
avatar: string;
|
|
230
|
+
description: string;
|
|
231
|
+
availability: TeamMateAvailability[];
|
|
232
|
+
key: TaskLabels;
|
|
233
|
+
seeInAction?: boolean;
|
|
234
|
+
comingSoon?: boolean | (() => boolean);
|
|
235
|
+
displayComponent?: ComponentType<TeamMateComponentProps<T>>;
|
|
236
|
+
formComponent?: ComponentType<TeamMateComponentProps<T>>;
|
|
237
|
+
}
|
|
238
|
+
declare enum TeamMateActionType {
|
|
239
|
+
SEE_IN_ACTION = "SEE_IN_ACTION",
|
|
240
|
+
REQUEST_ACCESS = "REQUEST_ACCESS",
|
|
241
|
+
VIEW_DETAILS = "VIEW_DETAILS"
|
|
242
|
+
}
|
|
243
|
+
interface Citation {
|
|
244
|
+
id: string;
|
|
245
|
+
content: string;
|
|
246
|
+
taskLabel: TaskLabels;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export { type Artifact as A, type CoachAiResponse as C, type Feedback as F, type InteractionRequest as I, type Learning as L, PersonalizationScope as P, TaskLabels as T, type TeamMateContextProps as a, type TeamMateState as b, type TeamMateConfig as c, TeamMateActionType as d, TeamMateAvailability as e, type CoachAiConfirmationResponse as f, ContentCategory as g, type TeamMateComponentProps as h, type Citation as i, type ChatbotProps as j, type ChatbotProviderProps as k, learningSchema as l, type ChatMessage as m, type AgentAction as n, LoadingState as o, type AssistantMeta as p, type ChatSession as q, type FileUploadProps as r, type ChatbotUrls as s, type InteractionType as t, type InteractionChoice as u, type ChatResponse as v, type ChatState as w, type AgentStreamResponse as x };
|