@brainfish-ai/widgets-initiator 0.1.1-beta → 0.5.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/LICENSE +21 -0
- package/README.md +94 -34
- package/components.json +16 -0
- package/dist/esm/index.css +4 -0
- package/dist/esm/index.css.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/index.d.ts +801 -0
- package/package.json +141 -32
- package/package.json.bak +153 -0
- package/stats.html +4949 -0
- package/tailwind.config.js +140 -0
- package/.prettierignore +0 -7
- package/.prettierrc +0 -6
- package/dist/web.cjs.js +0 -2
- package/dist/web.cjs.js.map +0 -1
- package/dist/web.js +0 -2
- package/dist/web.js.map +0 -1
- package/index.html +0 -63
- package/postcss.config.cjs +0 -6
- package/src/register.ts +0 -31
- package/src/web.ts +0 -104
- package/tailwind.config.cjs +0 -9
- package/tsconfig.json +0 -14
- package/vite.config.ts +0 -33
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,801 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import React__default, { ReactNode, FC } from 'react';
|
|
4
|
+
import { JSONSchemaType } from 'ajv';
|
|
5
|
+
import { Options } from 'react-markdown';
|
|
6
|
+
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
7
|
+
import { VariantProps } from 'class-variance-authority';
|
|
8
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
9
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
10
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
11
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
12
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
13
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
14
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
15
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
16
|
+
import { DialogProps } from '@radix-ui/react-dialog';
|
|
17
|
+
|
|
18
|
+
declare function customColor(cssVariable: string, fallbackColor?: string): ({ opacityVariable, opacityValue }: {
|
|
19
|
+
opacityVariable: string;
|
|
20
|
+
opacityValue: string;
|
|
21
|
+
}) => string;
|
|
22
|
+
|
|
23
|
+
declare const BrainfishColors: {
|
|
24
|
+
primary: {
|
|
25
|
+
50: string;
|
|
26
|
+
100: string;
|
|
27
|
+
200: string;
|
|
28
|
+
300: string;
|
|
29
|
+
400: string;
|
|
30
|
+
500: string;
|
|
31
|
+
600: string;
|
|
32
|
+
700: string;
|
|
33
|
+
800: string;
|
|
34
|
+
900: string;
|
|
35
|
+
DEFAULT: ({ opacityVariable, opacityValue }: {
|
|
36
|
+
opacityVariable: string;
|
|
37
|
+
opacityValue: string;
|
|
38
|
+
}) => string;
|
|
39
|
+
foreground: ({ opacityVariable, opacityValue }: {
|
|
40
|
+
opacityVariable: string;
|
|
41
|
+
opacityValue: string;
|
|
42
|
+
}) => string;
|
|
43
|
+
};
|
|
44
|
+
dark: {
|
|
45
|
+
50: string;
|
|
46
|
+
100: string;
|
|
47
|
+
200: string;
|
|
48
|
+
300: string;
|
|
49
|
+
400: string;
|
|
50
|
+
500: string;
|
|
51
|
+
600: string;
|
|
52
|
+
700: string;
|
|
53
|
+
800: string;
|
|
54
|
+
900: string;
|
|
55
|
+
DEFAULT: string;
|
|
56
|
+
};
|
|
57
|
+
orange: {
|
|
58
|
+
50: string;
|
|
59
|
+
100: string;
|
|
60
|
+
200: string;
|
|
61
|
+
300: string;
|
|
62
|
+
400: string;
|
|
63
|
+
500: string;
|
|
64
|
+
600: string;
|
|
65
|
+
700: string;
|
|
66
|
+
800: string;
|
|
67
|
+
900: string;
|
|
68
|
+
DEFAULT: string;
|
|
69
|
+
};
|
|
70
|
+
yellow: {
|
|
71
|
+
50: string;
|
|
72
|
+
100: string;
|
|
73
|
+
200: string;
|
|
74
|
+
300: string;
|
|
75
|
+
400: string;
|
|
76
|
+
500: string;
|
|
77
|
+
600: string;
|
|
78
|
+
700: string;
|
|
79
|
+
800: string;
|
|
80
|
+
900: string;
|
|
81
|
+
DEFAULT: string;
|
|
82
|
+
};
|
|
83
|
+
green: {
|
|
84
|
+
50: string;
|
|
85
|
+
100: string;
|
|
86
|
+
200: string;
|
|
87
|
+
300: string;
|
|
88
|
+
400: string;
|
|
89
|
+
500: string;
|
|
90
|
+
600: string;
|
|
91
|
+
700: string;
|
|
92
|
+
800: string;
|
|
93
|
+
900: string;
|
|
94
|
+
DEFAULT: string;
|
|
95
|
+
};
|
|
96
|
+
blue: {
|
|
97
|
+
50: string;
|
|
98
|
+
100: string;
|
|
99
|
+
200: string;
|
|
100
|
+
300: string;
|
|
101
|
+
400: string;
|
|
102
|
+
500: string;
|
|
103
|
+
600: string;
|
|
104
|
+
700: string;
|
|
105
|
+
800: string;
|
|
106
|
+
900: string;
|
|
107
|
+
DEFAULT: string;
|
|
108
|
+
};
|
|
109
|
+
purple: {
|
|
110
|
+
50: string;
|
|
111
|
+
100: string;
|
|
112
|
+
200: string;
|
|
113
|
+
300: string;
|
|
114
|
+
400: string;
|
|
115
|
+
500: string;
|
|
116
|
+
600: string;
|
|
117
|
+
700: string;
|
|
118
|
+
800: string;
|
|
119
|
+
900: string;
|
|
120
|
+
DEFAULT: string;
|
|
121
|
+
};
|
|
122
|
+
pink: {
|
|
123
|
+
50: string;
|
|
124
|
+
100: string;
|
|
125
|
+
200: string;
|
|
126
|
+
300: string;
|
|
127
|
+
400: string;
|
|
128
|
+
500: string;
|
|
129
|
+
600: string;
|
|
130
|
+
700: string;
|
|
131
|
+
800: string;
|
|
132
|
+
900: string;
|
|
133
|
+
DEFAULT: string;
|
|
134
|
+
};
|
|
135
|
+
red: {
|
|
136
|
+
50: string;
|
|
137
|
+
100: string;
|
|
138
|
+
200: string;
|
|
139
|
+
300: string;
|
|
140
|
+
400: string;
|
|
141
|
+
500: string;
|
|
142
|
+
600: string;
|
|
143
|
+
700: string;
|
|
144
|
+
800: string;
|
|
145
|
+
900: string;
|
|
146
|
+
DEFAULT: string;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
type FeatureFlags = { [key: string]: boolean | string | number };
|
|
151
|
+
|
|
152
|
+
type JSONSchema<T> = JSONSchemaType<T>;
|
|
153
|
+
interface TextConfig {
|
|
154
|
+
headerText?: string;
|
|
155
|
+
searchPlaceholder?: string;
|
|
156
|
+
attachImageText?: string;
|
|
157
|
+
allDocumentsText?: string;
|
|
158
|
+
loadingSearchText?: string;
|
|
159
|
+
loadingAnswerText?: string;
|
|
160
|
+
errorText?: string;
|
|
161
|
+
followUpPlaceholder?: string;
|
|
162
|
+
positiveAnswerText?: string;
|
|
163
|
+
negativeAnswerText?: string;
|
|
164
|
+
suggestionsTitle?: string;
|
|
165
|
+
uncertaintyFallbackText?: Record<string, string>;
|
|
166
|
+
}
|
|
167
|
+
declare enum ActionType {
|
|
168
|
+
CallPhone = "call_phone",
|
|
169
|
+
OpenUrl = "open_url",
|
|
170
|
+
SendEmail = "send_email",
|
|
171
|
+
RunCallback = "run_callback"
|
|
172
|
+
}
|
|
173
|
+
type FeedbackResponse = 'accept' | 'reject';
|
|
174
|
+
/**
|
|
175
|
+
* Defines a URL redirect rule with pattern matching
|
|
176
|
+
* @example { source: '/knowledge/:id/:path', destination: '/knowledge/test/:path' }
|
|
177
|
+
*/
|
|
178
|
+
type RedirectRule = {
|
|
179
|
+
source: string;
|
|
180
|
+
destination: string;
|
|
181
|
+
};
|
|
182
|
+
type MarkdownTextBlock = {
|
|
183
|
+
id: string;
|
|
184
|
+
type: 'markdown-text';
|
|
185
|
+
text: string;
|
|
186
|
+
};
|
|
187
|
+
type ActionButtonsBlock = {
|
|
188
|
+
id: string;
|
|
189
|
+
type: 'action-buttons';
|
|
190
|
+
};
|
|
191
|
+
type ActionInputFormBlock = {
|
|
192
|
+
id: string;
|
|
193
|
+
type: 'action-input-form';
|
|
194
|
+
state: 'ready' | 'processing' | 'completed';
|
|
195
|
+
actionId: string;
|
|
196
|
+
initialValues: ActionInputs;
|
|
197
|
+
schema: ActionInputsSchema;
|
|
198
|
+
onSubmit?: (inputs: ActionInputs) => void;
|
|
199
|
+
inputs: ActionInput[];
|
|
200
|
+
};
|
|
201
|
+
type ActionInput = {
|
|
202
|
+
name: string;
|
|
203
|
+
required: boolean;
|
|
204
|
+
schema: {
|
|
205
|
+
type: string;
|
|
206
|
+
title: string;
|
|
207
|
+
description: string;
|
|
208
|
+
oneOf?: {
|
|
209
|
+
const: string;
|
|
210
|
+
title: string;
|
|
211
|
+
}[];
|
|
212
|
+
};
|
|
213
|
+
type: string;
|
|
214
|
+
ui: {
|
|
215
|
+
type: string;
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
type AnswerBlock = MarkdownTextBlock | ActionButtonsBlock | ActionInputFormBlock;
|
|
219
|
+
type AnswerState = 'fetching-search-results' | 'fetching-stream' | 'streaming' | 'getting-action-inputs' | 'completed';
|
|
220
|
+
type Action = {
|
|
221
|
+
id: string;
|
|
222
|
+
type: ActionType;
|
|
223
|
+
action: {
|
|
224
|
+
version: string;
|
|
225
|
+
options: {
|
|
226
|
+
title?: string;
|
|
227
|
+
[key: string]: any;
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
interface Answer {
|
|
232
|
+
id: string;
|
|
233
|
+
state: AnswerState;
|
|
234
|
+
question: string;
|
|
235
|
+
blocks: AnswerBlock[];
|
|
236
|
+
searchResults?: SearchResult[];
|
|
237
|
+
followUpQuestions?: string[];
|
|
238
|
+
searchQueryId?: string;
|
|
239
|
+
feedback?: FeedbackResponse;
|
|
240
|
+
isUncertain?: boolean;
|
|
241
|
+
uncertaintyLanguage?: string | null;
|
|
242
|
+
uncertaintyFallbackText?: string;
|
|
243
|
+
searchIntentId?: string;
|
|
244
|
+
actions?: Action[];
|
|
245
|
+
}
|
|
246
|
+
type ActionInputValue = string | number | boolean | null;
|
|
247
|
+
type ActionInputs = Record<string, ActionInputValue>;
|
|
248
|
+
type ActionInputsSchema = JSONSchemaType<ActionInputs>;
|
|
249
|
+
interface SearchResult {
|
|
250
|
+
id: string;
|
|
251
|
+
title: string;
|
|
252
|
+
url: string;
|
|
253
|
+
}
|
|
254
|
+
interface Collection {
|
|
255
|
+
id: string;
|
|
256
|
+
name: string;
|
|
257
|
+
}
|
|
258
|
+
interface Suggestion {
|
|
259
|
+
id: string;
|
|
260
|
+
question: string;
|
|
261
|
+
conversationId?: string;
|
|
262
|
+
messageCount?: number;
|
|
263
|
+
}
|
|
264
|
+
interface ChatSearchProps {
|
|
265
|
+
suggestions?: Suggestion[];
|
|
266
|
+
collections?: Array<{
|
|
267
|
+
id: string;
|
|
268
|
+
name: string;
|
|
269
|
+
}>;
|
|
270
|
+
selectedCollectionId?: string;
|
|
271
|
+
onCollectionChange?: (collectionId: string) => void;
|
|
272
|
+
searchEndpoint: string;
|
|
273
|
+
answerEndpoint: string;
|
|
274
|
+
answerStreamEndpoint: string;
|
|
275
|
+
feedbackEndpoint?: string;
|
|
276
|
+
loadConversationEndpoint?: string;
|
|
277
|
+
followUpQuestionsEndpoint?: string;
|
|
278
|
+
autocompleteEndpoint?: string;
|
|
279
|
+
disableFollowUpQuestions?: boolean;
|
|
280
|
+
disableImageAttachment?: boolean;
|
|
281
|
+
disableFeedback?: boolean;
|
|
282
|
+
disclaimer?: string;
|
|
283
|
+
offset?: number;
|
|
284
|
+
headers?: Record<string, string>;
|
|
285
|
+
textConfig?: TextConfig;
|
|
286
|
+
searchPath?: string;
|
|
287
|
+
className?: string;
|
|
288
|
+
onToggleSizeButtonClick?: () => void;
|
|
289
|
+
trackEvent?: (eventName: string, data?: Record<string, any>) => void;
|
|
290
|
+
featureFlags?: FeatureFlags;
|
|
291
|
+
onCloseWidget?: () => void;
|
|
292
|
+
isWidgetMode?: boolean;
|
|
293
|
+
nextBestActions?: NextBestAction[];
|
|
294
|
+
bodyActionButtons?: NextBestAction[];
|
|
295
|
+
onNextBestActionClick?: ({ action, searchQueryId, query, answer, }: {
|
|
296
|
+
action: NextBestAction;
|
|
297
|
+
searchQueryId: string;
|
|
298
|
+
query: string;
|
|
299
|
+
answer: string;
|
|
300
|
+
}) => void;
|
|
301
|
+
userData?: Record<string, unknown> | null;
|
|
302
|
+
redirectRules?: RedirectRule[];
|
|
303
|
+
attributesSigned?: string;
|
|
304
|
+
}
|
|
305
|
+
interface ChatSearchState {
|
|
306
|
+
showResults: boolean;
|
|
307
|
+
answers: Answer[];
|
|
308
|
+
isLoading: boolean;
|
|
309
|
+
error?: string;
|
|
310
|
+
}
|
|
311
|
+
type UrlString = string & {
|
|
312
|
+
__url: never;
|
|
313
|
+
};
|
|
314
|
+
declare enum NextBestActionType {
|
|
315
|
+
Link = "link",
|
|
316
|
+
Email = "email",
|
|
317
|
+
Phone = "phone",
|
|
318
|
+
Callback = "callback",
|
|
319
|
+
Function = "function"
|
|
320
|
+
}
|
|
321
|
+
type NextBestAction = {
|
|
322
|
+
id?: string;
|
|
323
|
+
label: string;
|
|
324
|
+
type: NextBestActionType;
|
|
325
|
+
icon?: string | UrlString;
|
|
326
|
+
value: any;
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
interface ChatSearchHandle {
|
|
330
|
+
createNewThread: (firstQuery?: string) => void;
|
|
331
|
+
showFollowUpThread: (show: boolean) => void;
|
|
332
|
+
subscribeToStateChanges: (callback: (state: ChatSearchState) => void) => () => void;
|
|
333
|
+
focusSearchField: () => void;
|
|
334
|
+
showCloseButton: (showButton: boolean) => void;
|
|
335
|
+
}
|
|
336
|
+
declare const ChatSearch: React__default.ForwardRefExoticComponent<ChatSearchProps & React__default.RefAttributes<ChatSearchHandle>>;
|
|
337
|
+
|
|
338
|
+
declare const AnswersActions: {
|
|
339
|
+
readonly SET_ANSWERS: "answers/set_answers";
|
|
340
|
+
readonly CLEAR_ALL: "answers/clear_all";
|
|
341
|
+
readonly APPEND_NEW_ANSWER: "answers/create_empty_answer";
|
|
342
|
+
readonly APPEND_BLOCK: "answers/append_block";
|
|
343
|
+
readonly APPEND_ANSWER_CHUNK: "answers/append_stream_chunk";
|
|
344
|
+
readonly SET_SEARCH_RESULTS: "answers/update_search_results";
|
|
345
|
+
readonly SET_FOLLOW_UP_QUESTIONS: "answers/set_follow_up_questions";
|
|
346
|
+
readonly COMPLETE_ANSWER: "answers/finish_streaming";
|
|
347
|
+
readonly SET_ANSWER_ERROR: "answers/set_error_state";
|
|
348
|
+
readonly SET_USER_FEEDBACK: "answers/set_user_feedback";
|
|
349
|
+
readonly CLEAR_USER_FEEDBACK: "answers/clear_user_feedback";
|
|
350
|
+
readonly MARK_AS_UNCERTAIN: "answers/mark_as_uncertain";
|
|
351
|
+
readonly GET_ACTION_INPUTS: "answers/request_action_inputs";
|
|
352
|
+
readonly INVOKE_ACTION: "answers/invoke_action";
|
|
353
|
+
readonly ADD_ACTION_BUTTONS: "answers/add_action_buttons";
|
|
354
|
+
};
|
|
355
|
+
type SetAnswers = {
|
|
356
|
+
type: typeof AnswersActions.SET_ANSWERS;
|
|
357
|
+
payload: {
|
|
358
|
+
answers: Answer[];
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
type ClearAll = {
|
|
362
|
+
type: typeof AnswersActions.CLEAR_ALL;
|
|
363
|
+
};
|
|
364
|
+
type AppendNewAnswer = {
|
|
365
|
+
type: typeof AnswersActions.APPEND_NEW_ANSWER;
|
|
366
|
+
payload: {
|
|
367
|
+
id?: string;
|
|
368
|
+
query: string;
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
type SetSearchResults = {
|
|
372
|
+
type: typeof AnswersActions.SET_SEARCH_RESULTS;
|
|
373
|
+
payload: {
|
|
374
|
+
searchQueryId: string;
|
|
375
|
+
results: SearchResult[];
|
|
376
|
+
index?: number;
|
|
377
|
+
};
|
|
378
|
+
};
|
|
379
|
+
type AppendAnswerChunk = {
|
|
380
|
+
type: typeof AnswersActions.APPEND_ANSWER_CHUNK;
|
|
381
|
+
payload: {
|
|
382
|
+
text: string;
|
|
383
|
+
index?: number;
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
type SetAnswerError = {
|
|
387
|
+
type: typeof AnswersActions.SET_ANSWER_ERROR;
|
|
388
|
+
payload: {
|
|
389
|
+
error: string;
|
|
390
|
+
index?: number;
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
type SetUserFeedback = {
|
|
394
|
+
type: typeof AnswersActions.SET_USER_FEEDBACK;
|
|
395
|
+
payload: {
|
|
396
|
+
feedback: FeedbackResponse;
|
|
397
|
+
index?: number;
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
type ClearUserFeedback = {
|
|
401
|
+
type: typeof AnswersActions.CLEAR_USER_FEEDBACK;
|
|
402
|
+
payload: {
|
|
403
|
+
index?: number;
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
type SetFollowUpQuestions = {
|
|
407
|
+
type: typeof AnswersActions.SET_FOLLOW_UP_QUESTIONS;
|
|
408
|
+
payload: {
|
|
409
|
+
questions: string[];
|
|
410
|
+
index?: number;
|
|
411
|
+
};
|
|
412
|
+
};
|
|
413
|
+
type AppendBlock = {
|
|
414
|
+
type: typeof AnswersActions.APPEND_BLOCK;
|
|
415
|
+
payload: {
|
|
416
|
+
block: AnswerBlock;
|
|
417
|
+
index?: number;
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
type CompleteAnswer = {
|
|
421
|
+
type: typeof AnswersActions.COMPLETE_ANSWER;
|
|
422
|
+
payload: {
|
|
423
|
+
index?: number;
|
|
424
|
+
};
|
|
425
|
+
};
|
|
426
|
+
type MarkAsUncertain = {
|
|
427
|
+
type: typeof AnswersActions.MARK_AS_UNCERTAIN;
|
|
428
|
+
payload: {
|
|
429
|
+
uncertaintyText: string;
|
|
430
|
+
index?: number;
|
|
431
|
+
};
|
|
432
|
+
};
|
|
433
|
+
type GetActionInputs = {
|
|
434
|
+
type: typeof AnswersActions.GET_ACTION_INPUTS;
|
|
435
|
+
payload: {
|
|
436
|
+
searchIntentId: string;
|
|
437
|
+
actionId: string;
|
|
438
|
+
inputs: ActionInput[];
|
|
439
|
+
schema: JSONSchema<ActionInputs>;
|
|
440
|
+
initialValues: ActionInputs;
|
|
441
|
+
onSubmit: (parameters: ActionInputs) => void;
|
|
442
|
+
index?: number;
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
type AddActionButtons = {
|
|
446
|
+
type: typeof AnswersActions.ADD_ACTION_BUTTONS;
|
|
447
|
+
payload: {
|
|
448
|
+
searchIntentId: string;
|
|
449
|
+
actions: Array<{
|
|
450
|
+
id: string;
|
|
451
|
+
type: string;
|
|
452
|
+
action: {
|
|
453
|
+
version: string;
|
|
454
|
+
options: {
|
|
455
|
+
title?: string;
|
|
456
|
+
[key: string]: any;
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
}>;
|
|
460
|
+
index?: number;
|
|
461
|
+
};
|
|
462
|
+
};
|
|
463
|
+
type InvokeAction = {
|
|
464
|
+
type: typeof AnswersActions.INVOKE_ACTION;
|
|
465
|
+
payload: {
|
|
466
|
+
index?: number;
|
|
467
|
+
};
|
|
468
|
+
};
|
|
469
|
+
type AnswerListAction = SetAnswers | ClearAll | AppendNewAnswer | SetSearchResults | AppendAnswerChunk | SetAnswerError | SetUserFeedback | ClearUserFeedback | SetFollowUpQuestions | AppendBlock | CompleteAnswer | MarkAsUncertain | InvokeAction | GetActionInputs | AddActionButtons;
|
|
470
|
+
|
|
471
|
+
interface ChatSearchContextProps {
|
|
472
|
+
query: string;
|
|
473
|
+
setQuery: React__default.Dispatch<React__default.SetStateAction<string>>;
|
|
474
|
+
queryId: string;
|
|
475
|
+
setQueryId: React__default.Dispatch<React__default.SetStateAction<string>>;
|
|
476
|
+
followUpQuery: string;
|
|
477
|
+
setFollowUpQuery: React__default.Dispatch<React__default.SetStateAction<string>>;
|
|
478
|
+
isSearching: boolean;
|
|
479
|
+
setIsSearching: React__default.Dispatch<React__default.SetStateAction<boolean>>;
|
|
480
|
+
showResults: boolean;
|
|
481
|
+
setShowResults: React__default.Dispatch<React__default.SetStateAction<boolean>>;
|
|
482
|
+
answers: Answer[];
|
|
483
|
+
answerListDispatch: React__default.Dispatch<AnswerListAction>;
|
|
484
|
+
activeAnswerIndex: number;
|
|
485
|
+
setActiveAnswerIndex: React__default.Dispatch<React__default.SetStateAction<number>>;
|
|
486
|
+
conversationId: string | undefined;
|
|
487
|
+
setConversationId: (id: string) => void;
|
|
488
|
+
clearConversationId: () => void;
|
|
489
|
+
isLoadingConversation: boolean;
|
|
490
|
+
setIsLoadingConversation: React__default.Dispatch<React__default.SetStateAction<boolean>>;
|
|
491
|
+
loadError: string;
|
|
492
|
+
setLoadError: React__default.Dispatch<React__default.SetStateAction<string>>;
|
|
493
|
+
showMobileCloseWidgetButton: boolean;
|
|
494
|
+
setShowMobileCloseWidgetButton: React__default.Dispatch<React__default.SetStateAction<boolean>>;
|
|
495
|
+
}
|
|
496
|
+
declare const ChatSearchProvider: React__default.FC<{
|
|
497
|
+
children: ReactNode;
|
|
498
|
+
searchPath?: string;
|
|
499
|
+
}>;
|
|
500
|
+
declare const useChatSearch: () => ChatSearchContextProps;
|
|
501
|
+
|
|
502
|
+
declare const useIsChatSearchDirty: () => boolean;
|
|
503
|
+
|
|
504
|
+
interface Props$1 {
|
|
505
|
+
language: string;
|
|
506
|
+
value: string;
|
|
507
|
+
}
|
|
508
|
+
declare const CodeBlock: FC<Props$1>;
|
|
509
|
+
|
|
510
|
+
type Message = {
|
|
511
|
+
content: string;
|
|
512
|
+
uncertaintyFallbackText?: Record<string, string>;
|
|
513
|
+
};
|
|
514
|
+
interface Props {
|
|
515
|
+
message: Message;
|
|
516
|
+
isStreaming?: boolean;
|
|
517
|
+
redirectRules?: RedirectRule[];
|
|
518
|
+
}
|
|
519
|
+
declare const FormattedMessage: FC<Props>;
|
|
520
|
+
|
|
521
|
+
interface MemoizedReactMarkdownProps extends Options {
|
|
522
|
+
isStreaming?: boolean;
|
|
523
|
+
}
|
|
524
|
+
declare const MemoizedReactMarkdown: FC<MemoizedReactMarkdownProps>;
|
|
525
|
+
|
|
526
|
+
interface MermaidDiagramProps {
|
|
527
|
+
content: string;
|
|
528
|
+
}
|
|
529
|
+
declare const MermaidDiagram: React__default.FC<MermaidDiagramProps>;
|
|
530
|
+
|
|
531
|
+
interface ZoomableImageProps {
|
|
532
|
+
src?: string;
|
|
533
|
+
alt?: string;
|
|
534
|
+
}
|
|
535
|
+
declare const ZoomableImage: React.FC<ZoomableImageProps>;
|
|
536
|
+
|
|
537
|
+
declare const buttonVariants: (props?: ({
|
|
538
|
+
variant?: "link" | "dark" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
539
|
+
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
540
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
541
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
542
|
+
asChild?: boolean;
|
|
543
|
+
}
|
|
544
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
545
|
+
|
|
546
|
+
declare const Collapsible: React__default.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
547
|
+
declare const CollapsibleTrigger: React__default.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
548
|
+
declare const CollapsibleContent: React__default.FC<CollapsiblePrimitive.CollapsibleContentProps>;
|
|
549
|
+
|
|
550
|
+
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
551
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
552
|
+
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
553
|
+
declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
554
|
+
declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
555
|
+
declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
556
|
+
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
557
|
+
inset?: boolean | undefined;
|
|
558
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
559
|
+
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
560
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
561
|
+
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
562
|
+
inset?: boolean | undefined;
|
|
563
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
564
|
+
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
565
|
+
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
566
|
+
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
567
|
+
inset?: boolean | undefined;
|
|
568
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
569
|
+
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
570
|
+
declare const DropdownMenuShortcut: {
|
|
571
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
|
|
572
|
+
displayName: string;
|
|
573
|
+
};
|
|
574
|
+
|
|
575
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
576
|
+
|
|
577
|
+
declare const TooltipProvider: ({ delayDuration, ...props }: TooltipPrimitive.TooltipProviderProps) => React.JSX.Element;
|
|
578
|
+
declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
579
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
580
|
+
interface TooltipContentProps extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> {
|
|
581
|
+
background?: string;
|
|
582
|
+
textColor?: string;
|
|
583
|
+
borderColor?: string;
|
|
584
|
+
}
|
|
585
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
586
|
+
|
|
587
|
+
declare const Textarea: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
588
|
+
|
|
589
|
+
declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
590
|
+
declare const ScrollBar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
591
|
+
|
|
592
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_dist_types.ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
593
|
+
|
|
594
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
595
|
+
|
|
596
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
597
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
598
|
+
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
599
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
600
|
+
|
|
601
|
+
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
602
|
+
children?: React.ReactNode;
|
|
603
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
604
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
605
|
+
} & {
|
|
606
|
+
asChild?: boolean | undefined;
|
|
607
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
608
|
+
label?: string | undefined;
|
|
609
|
+
shouldFilter?: boolean | undefined;
|
|
610
|
+
filter?: ((value: string, search: string, keywords?: string[] | undefined) => number) | undefined;
|
|
611
|
+
defaultValue?: string | undefined;
|
|
612
|
+
value?: string | undefined;
|
|
613
|
+
onValueChange?: ((value: string) => void) | undefined;
|
|
614
|
+
loop?: boolean | undefined;
|
|
615
|
+
disablePointerSelection?: boolean | undefined;
|
|
616
|
+
vimBindings?: boolean | undefined;
|
|
617
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
618
|
+
declare const CommandDialog: ({ children, ...props }: DialogProps) => React.JSX.Element;
|
|
619
|
+
declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
|
|
620
|
+
ref?: React.Ref<HTMLInputElement> | undefined;
|
|
621
|
+
} & {
|
|
622
|
+
asChild?: boolean | undefined;
|
|
623
|
+
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
|
|
624
|
+
value?: string | undefined;
|
|
625
|
+
onValueChange?: ((search: string) => void) | undefined;
|
|
626
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
627
|
+
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
628
|
+
children?: React.ReactNode;
|
|
629
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
630
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
631
|
+
} & {
|
|
632
|
+
asChild?: boolean | undefined;
|
|
633
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
634
|
+
label?: string | undefined;
|
|
635
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
636
|
+
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
637
|
+
children?: React.ReactNode;
|
|
638
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
639
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
640
|
+
} & {
|
|
641
|
+
asChild?: boolean | undefined;
|
|
642
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
643
|
+
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
644
|
+
children?: React.ReactNode;
|
|
645
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
646
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
647
|
+
} & {
|
|
648
|
+
asChild?: boolean | undefined;
|
|
649
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "heading" | "value"> & {
|
|
650
|
+
heading?: React.ReactNode;
|
|
651
|
+
value?: string | undefined;
|
|
652
|
+
forceMount?: boolean | undefined;
|
|
653
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
654
|
+
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
655
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
656
|
+
} & {
|
|
657
|
+
asChild?: boolean | undefined;
|
|
658
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
659
|
+
alwaysRender?: boolean | undefined;
|
|
660
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
661
|
+
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
662
|
+
children?: React.ReactNode;
|
|
663
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
664
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
665
|
+
} & {
|
|
666
|
+
asChild?: boolean | undefined;
|
|
667
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "disabled" | "value"> & {
|
|
668
|
+
disabled?: boolean | undefined;
|
|
669
|
+
onSelect?: ((value: string) => void) | undefined;
|
|
670
|
+
value?: string | undefined;
|
|
671
|
+
keywords?: string[] | undefined;
|
|
672
|
+
forceMount?: boolean | undefined;
|
|
673
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
674
|
+
declare const CommandShortcut: {
|
|
675
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
|
|
676
|
+
displayName: string;
|
|
677
|
+
};
|
|
678
|
+
|
|
679
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
680
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
681
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
682
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
683
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
684
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
685
|
+
declare const DialogHeader: {
|
|
686
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
687
|
+
displayName: string;
|
|
688
|
+
};
|
|
689
|
+
declare const DialogFooter: {
|
|
690
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
691
|
+
displayName: string;
|
|
692
|
+
};
|
|
693
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
694
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
695
|
+
|
|
696
|
+
type SelectOption = {
|
|
697
|
+
label: string;
|
|
698
|
+
value: string;
|
|
699
|
+
};
|
|
700
|
+
interface SimpleSelectProps {
|
|
701
|
+
options: SelectOption[];
|
|
702
|
+
value?: string;
|
|
703
|
+
onChange?: (value: string) => void;
|
|
704
|
+
placeholder?: string;
|
|
705
|
+
disabled?: boolean;
|
|
706
|
+
className?: string;
|
|
707
|
+
appendToBody?: boolean;
|
|
708
|
+
}
|
|
709
|
+
declare function SimpleSelect({ options, value, onChange, placeholder, disabled, className, appendToBody, }: SimpleSelectProps): React.JSX.Element;
|
|
710
|
+
|
|
711
|
+
interface DatePickerProps {
|
|
712
|
+
date: Date | undefined;
|
|
713
|
+
setDate: (date: Date | undefined) => void;
|
|
714
|
+
className?: string;
|
|
715
|
+
placeholder?: string;
|
|
716
|
+
}
|
|
717
|
+
declare function DatePicker({ date, setDate, className, placeholder }: DatePickerProps): React.JSX.Element;
|
|
718
|
+
|
|
719
|
+
interface ComboboxProps {
|
|
720
|
+
options: {
|
|
721
|
+
value: string;
|
|
722
|
+
label: string;
|
|
723
|
+
}[];
|
|
724
|
+
defaultValueLabel: string;
|
|
725
|
+
placeholder: string;
|
|
726
|
+
noResultsLabel: string;
|
|
727
|
+
className?: string;
|
|
728
|
+
onOpenChange?: (open: boolean) => void;
|
|
729
|
+
onChange?: (value: string) => void;
|
|
730
|
+
}
|
|
731
|
+
declare function Combobox({ options, defaultValueLabel, placeholder, noResultsLabel, className, onOpenChange, onChange, }: ComboboxProps): React.JSX.Element;
|
|
732
|
+
|
|
733
|
+
interface FilterOption {
|
|
734
|
+
id: string;
|
|
735
|
+
label: string;
|
|
736
|
+
}
|
|
737
|
+
declare enum Operator {
|
|
738
|
+
IS = "is",
|
|
739
|
+
IS_NOT = "is not",
|
|
740
|
+
CONTAINS = "contains",
|
|
741
|
+
DOES_NOT_CONTAIN = "does not contain",
|
|
742
|
+
STARTS_WITH = "starts with"
|
|
743
|
+
}
|
|
744
|
+
interface FilterValue {
|
|
745
|
+
id: string | number;
|
|
746
|
+
source?: string;
|
|
747
|
+
operator?: Operator;
|
|
748
|
+
value?: string;
|
|
749
|
+
}
|
|
750
|
+
/**
|
|
751
|
+
* Filter rules for each source
|
|
752
|
+
* How this works:
|
|
753
|
+
* - You can define the rules for each source
|
|
754
|
+
* - The rules are used to determine the available operators and value type
|
|
755
|
+
* - The input type is used to determine the type of input displayed in when the dropdown is opened
|
|
756
|
+
* - The getValueOptions function is used to determine the available options for the value
|
|
757
|
+
*
|
|
758
|
+
* @example
|
|
759
|
+
* {
|
|
760
|
+
* 'sourceId': {
|
|
761
|
+
* operators: [
|
|
762
|
+
* { id: 'is', label: 'is' },
|
|
763
|
+
* { id: 'is not', label: 'is not' },
|
|
764
|
+
* ],
|
|
765
|
+
* inputType: 'dropdown' | 'custom',
|
|
766
|
+
* getValueOptions?: () => FilterOption[],
|
|
767
|
+
* },
|
|
768
|
+
* }
|
|
769
|
+
*/
|
|
770
|
+
interface FilterRules {
|
|
771
|
+
[sourceId: string]: {
|
|
772
|
+
operators: FilterOption[];
|
|
773
|
+
inputType: 'dropdown' | 'custom';
|
|
774
|
+
getValueOptions?: () => FilterOption[];
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
interface FilterProps {
|
|
778
|
+
filter: FilterValue;
|
|
779
|
+
sourceOptions: FilterOption[];
|
|
780
|
+
rules: FilterRules;
|
|
781
|
+
onSourceChange?: (sourceId: string) => void;
|
|
782
|
+
onRemoveFilter: (id: string | number) => void;
|
|
783
|
+
onFilterChange: (filter: FilterValue) => void;
|
|
784
|
+
selectPlaceholder?: string;
|
|
785
|
+
customValuePlaceholder?: string;
|
|
786
|
+
customValueButtonLabel?: string;
|
|
787
|
+
sourceFirstMessage?: string;
|
|
788
|
+
}
|
|
789
|
+
declare const Filter: React__default.ForwardRefExoticComponent<FilterProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
790
|
+
|
|
791
|
+
interface FiltersProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
792
|
+
filters: FilterValue[];
|
|
793
|
+
onFilterChange: (filter: FilterValue) => void;
|
|
794
|
+
onFilterRemove: (filterId: string | number) => void;
|
|
795
|
+
sourceOptions: FilterOption[];
|
|
796
|
+
rules: FilterRules;
|
|
797
|
+
}
|
|
798
|
+
declare const Filters: ({ filters, onFilterChange, onFilterRemove, sourceOptions, rules, className }: FiltersProps) => React__default.JSX.Element;
|
|
799
|
+
|
|
800
|
+
export { BrainfishColors, Button, ChatSearch, ChatSearchProvider, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Filter, Filters, FormattedMessage, Input, Label, MemoizedReactMarkdown, MermaidDiagram, Operator, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, SimpleSelect, Switch, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, ZoomableImage, buttonVariants, customColor, useChatSearch, useIsChatSearchDirty };
|
|
801
|
+
export type { Answer, ButtonProps, ChatSearchHandle, ChatSearchProps, ChatSearchState, Collection, ComboboxProps, FilterOption, FilterRules, FilterValue, MemoizedReactMarkdownProps, Props, SelectOption, SimpleSelectProps, TooltipContentProps };
|