pixelon 0.3.24 → 0.3.26
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/components/atoms/chat/AudioWaves/AudioWaves(1).d.ts +21 -0
- package/dist/components/atoms/chat/AudioWaves/index(1).d.ts +2 -0
- package/dist/components/atoms/chat/DateDivider/DateDivider(1).d.ts +7 -0
- package/dist/components/atoms/chat/Loader/Loader(1).d.ts +10 -0
- package/dist/components/atoms/chat/Loader/index(1).d.ts +2 -0
- package/dist/components/atoms/chat/Select/index(1).d.ts +2 -0
- package/dist/components/atoms/lumi/Button/Button(1).d.ts +17 -0
- package/dist/components/atoms/lumi/Checkbox/Checkbox(1).d.ts +5 -0
- package/dist/components/atoms/lumi/Checkbox/index(1).d.ts +2 -0
- package/dist/components/atoms/lumi/Checkbox/index(2).d.ts +2 -0
- package/dist/components/atoms/lumi/Checkbox/types(1).d.ts +93 -0
- package/dist/components/atoms/lumi/CurrencyDisplay/index(1).d.ts +2 -0
- package/dist/components/atoms/lumi/DateDisplay/index(1).d.ts +2 -0
- package/dist/components/atoms/lumi/DateDisplay/index(2).d.ts +2 -0
- package/dist/components/atoms/lumi/DateInput/DateInput(1).d.ts +27 -0
- package/dist/components/atoms/lumi/DateInput/WebDatePicker(1).d.ts +19 -0
- package/dist/components/atoms/lumi/DateInput/WebDatePicker(2).d.ts +19 -0
- package/dist/components/atoms/lumi/Icon/Icon(1).d.ts +52 -0
- package/dist/components/atoms/lumi/Input/index(1).d.ts +3 -0
- package/dist/components/atoms/lumi/Popover/index(1).d.ts +2 -0
- package/dist/components/atoms/lumi/Popover/types(1).d.ts +62 -0
- package/dist/components/atoms/lumi/TextArea/index(1).d.ts +2 -0
- package/dist/components/atoms/lumi/TextArea/types(1).d.ts +35 -0
- package/dist/components/atoms/lumi/TimeInput/TimeInput(1).d.ts +27 -0
- package/dist/components/atoms/lumi/TimeInput/TimeInput(2).d.ts +27 -0
- package/dist/components/molecules/chat/Drawer/Drawer.d.ts +2 -0
- package/dist/components/molecules/chat/FullscreenViewer/hooks/useSwipeGestures(1).d.ts +12 -0
- package/dist/components/molecules/chat/StructuredContent/StructuredContent(1).d.ts +10 -0
- package/dist/components/molecules/chat/StructuredContent/components/CarouselDisplay/CarouselDisplay.d.ts +4 -0
- package/dist/components/molecules/chat/StructuredContent/components/CarouselDisplay/components/CarouselCard/CarouselCard.d.ts +15 -0
- package/dist/components/molecules/chat/StructuredContent/components/CarouselDisplay/components/CarouselConfirm/CarouselConfirm.d.ts +10 -0
- package/dist/components/molecules/chat/StructuredContent/components/CarouselDisplay/components/CarouselSearch/CarouselSearch.d.ts +8 -0
- package/dist/components/molecules/chat/StructuredContent/components/CarouselDisplay/components/CarouselTrack/CarouselTrack.d.ts +11 -0
- package/dist/components/molecules/chat/StructuredContent/components/CarouselDisplay/store/actions.d.ts +26 -0
- package/dist/components/molecules/chat/StructuredContent/components/CarouselDisplay/store/carouselStore.d.ts +8 -0
- package/dist/components/molecules/chat/StructuredContent/components/CarouselDisplay/store/index.d.ts +6 -0
- package/dist/components/molecules/chat/StructuredContent/components/CarouselDisplay/store/storeKeys.d.ts +10 -0
- package/dist/components/molecules/chat/StructuredContent/components/CarouselDisplay/store/types.d.ts +11 -0
- package/dist/components/molecules/chat/StructuredContent/components/CarouselDisplay/types.d.ts +43 -0
- package/dist/components/molecules/chat/StructuredContent/components/CarouselDisplay/useCarouselSearch.d.ts +15 -0
- package/dist/components/molecules/chat/StructuredContent/components/CarouselDisplay/useStoreState.d.ts +3 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/DynamicField(1).d.ts +13 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/DynamicField.d.ts +13 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/ReactiveForm.d.ts +4 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/ReactiveFormView.d.ts +10 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/buildYupSchema(1).d.ts +4 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/buildYupSchema.d.ts +4 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/resolveVariables.d.ts +20 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/types(1).d.ts +91 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/types.d.ts +100 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/useReactiveEndpoints(1).d.ts +17 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/useReactiveEndpoints(2).d.ts +23 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/useReactiveEndpoints.d.ts +23 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/useReactiveForm(1).d.ts +38 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/useReactiveForm.d.ts +38 -0
- package/dist/components/molecules/chat/StructuredContent/components/index.d.ts +2 -0
- package/dist/components/molecules/chat/StructuredContent/helpers/contentParser(1).d.ts +7 -0
- package/dist/components/molecules/chat/StructuredContent/helpers/fetchViaEventBus.d.ts +2 -0
- package/dist/components/molecules/chat/StructuredContent/index(1).d.ts +2 -0
- package/dist/components/molecules/lumi/Breadcrumb/Breadcrumb(1).d.ts +10 -0
- package/dist/components/molecules/lumi/Breadcrumb/Breadcrumb(2).d.ts +10 -0
- package/dist/components/molecules/lumi/Breadcrumb/types(1).d.ts +105 -0
- package/dist/components/molecules/lumi/Checkbox/Checkbox(1).d.ts +11 -0
- package/dist/components/molecules/lumi/Checkbox/index(1).d.ts +4 -0
- package/dist/components/molecules/lumi/Checkbox/use-cases/index(1).d.ts +1 -0
- package/dist/components/molecules/lumi/Checkbox/validation-helpers(1).d.ts +151 -0
- package/dist/components/molecules/lumi/DateInput/FormDateInput(1).d.ts +12 -0
- package/dist/components/molecules/lumi/DateInput/index(1).d.ts +2 -0
- package/dist/components/molecules/lumi/DateInput/use-cases/FormDateInputClearWithResetUseCase(1).d.ts +21 -0
- package/dist/components/molecules/lumi/DateInput/use-cases/FormDateInputErrorVisibilityUseCase(1).d.ts +21 -0
- package/dist/components/molecules/lumi/Drawer/Drawer(1).d.ts +39 -0
- package/dist/components/molecules/lumi/Drawer/index(1).d.ts +2 -0
- package/dist/components/molecules/lumi/DropdownMenu/DropdownMenu(1).d.ts +22 -0
- package/dist/components/molecules/lumi/DropdownMenu/index(1).d.ts +2 -0
- package/dist/components/molecules/lumi/DropdownMenu/types(1).d.ts +29 -0
- package/dist/components/molecules/lumi/Filter/FilterRow(1).d.ts +13 -0
- package/dist/components/molecules/lumi/Filter/helpers/conditionHelpers(1).d.ts +14 -0
- package/dist/components/molecules/lumi/Filter/index(1).d.ts +5 -0
- package/dist/components/molecules/lumi/Filter/types(1).d.ts +115 -0
- package/dist/components/molecules/lumi/Input/Input(1).d.ts +12 -0
- package/dist/components/molecules/lumi/Menu/Menu(1).d.ts +18 -0
- package/dist/components/molecules/lumi/Menu/MenuContext(1).d.ts +41 -0
- package/dist/components/molecules/lumi/Menu/MenuItem(1).d.ts +6 -0
- package/dist/components/molecules/lumi/Menu/MenuItem(2).d.ts +6 -0
- package/dist/components/molecules/lumi/Menu/MenuItemGroup(1).d.ts +6 -0
- package/dist/components/molecules/lumi/Menu/SubMenu(1).d.ts +6 -0
- package/dist/components/molecules/lumi/Menu/iconHelper(1).d.ts +15 -0
- package/dist/components/molecules/lumi/Menu/index(1).d.ts +8 -0
- package/dist/components/molecules/lumi/Menu/index(2).d.ts +8 -0
- package/dist/components/molecules/lumi/Menu/types(1).d.ts +119 -0
- package/dist/components/molecules/lumi/Pagination/Pagination(1).d.ts +4 -0
- package/dist/components/molecules/lumi/Pagination/index(1).d.ts +2 -0
- package/dist/components/molecules/lumi/Select/Select(1).d.ts +14 -0
- package/dist/components/molecules/lumi/Select/Select(2).d.ts +14 -0
- package/dist/components/molecules/lumi/Select/Select(3).d.ts +14 -0
- package/dist/components/molecules/lumi/Select/index(1).d.ts +2 -0
- package/dist/components/molecules/lumi/Select/index(2).d.ts +2 -0
- package/dist/components/molecules/lumi/Select/use-cases/FormSelectClearWithResetUseCase(1).d.ts +21 -0
- package/dist/components/molecules/lumi/Select/use-cases/FormSelectClearWithResetUseCase(2).d.ts +21 -0
- package/dist/components/molecules/lumi/Select/use-cases/index(1).d.ts +2 -0
- package/dist/components/molecules/lumi/Select/use-cases/index(2).d.ts +2 -0
- package/dist/components/molecules/lumi/Table/Table(1).d.ts +6 -0
- package/dist/components/molecules/lumi/Table/Table(2).d.ts +6 -0
- package/dist/components/molecules/lumi/Table/index(1).d.ts +2 -0
- package/dist/components/molecules/lumi/Table/types(1).d.ts +177 -0
- package/dist/components/molecules/lumi/Table/types(2).d.ts +177 -0
- package/dist/components/molecules/lumi/Tabs/Tabs(1).d.ts +4 -0
- package/dist/components/molecules/lumi/Tabs/Tabs(2).d.ts +4 -0
- package/dist/components/molecules/lumi/Tabs/index(1).d.ts +2 -0
- package/dist/components/molecules/lumi/Tabs/index(2).d.ts +2 -0
- package/dist/components/molecules/lumi/TimeInput/FormTimeInput(1).d.ts +12 -0
- package/dist/components/molecules/lumi/TimeInput/use-cases/FormTimeInputClearWithResetUseCase(1).d.ts +21 -0
- package/dist/components/molecules/lumi/TimeInput/use-cases/FormTimeInputErrorVisibilityUseCase(1).d.ts +21 -0
- package/dist/components/molecules/lumi/TimeInput/use-cases/index(1).d.ts +4 -0
- package/dist/components/organisms/chat/Chat/Chat(1).d.ts +12 -0
- package/dist/components/organisms/chat/Chat/hooks/useChatHandlers(1).d.ts +15 -0
- package/dist/components/organisms/chat/Chat/hooks/useChatStore.d.ts +3 -0
- package/dist/components/organisms/chat/Chat/hooks/useKeyboardLock(1).d.ts +15 -0
- package/dist/components/organisms/chat/Chat/index(1).d.ts +3 -0
- package/dist/components/organisms/chat/Chat/store/actions.d.ts +3 -0
- package/dist/components/organisms/chat/Chat/store/index(1).d.ts +4 -0
- package/dist/components/organisms/chat/Chat/store/types.d.ts +3 -0
- package/dist/components/organisms/chat/Chat/use-cases/GroupMessagesByDateUseCase(1).d.ts +20 -0
- package/dist/components/organisms/chat/index(1).d.ts +3 -0
- package/dist/components/organisms/chat/index(2).d.ts +3 -0
- package/dist/components/organisms/lumi/ActionBar/ActionBar(1).d.ts +18 -0
- package/dist/components/organisms/lumi/ActionBar/types(1).d.ts +57 -0
- package/dist/components/organisms/lumi/BaseNavbar/types(1).d.ts +34 -0
- package/dist/components/organisms/lumi/BaseWorkspace/BaseWorkspace(1).d.ts +28 -0
- package/dist/components/organisms/lumi/BaseWorkspace/index(1).d.ts +2 -0
- package/dist/components/organisms/lumi/Calendar/components/CalendarEvent(1).d.ts +18 -0
- package/dist/components/organisms/lumi/Calendar/components/CalendarEvent(2).d.ts +18 -0
- package/dist/components/organisms/lumi/Calendar/components/CalendarEvent(3).d.ts +18 -0
- package/dist/components/organisms/lumi/Calendar/components/CalendarHeader(1).d.ts +14 -0
- package/dist/components/organisms/lumi/Calendar/components/TimeGutter(1).d.ts +10 -0
- package/dist/components/organisms/lumi/Calendar/components/TimeGutter(2).d.ts +10 -0
- package/dist/components/organisms/lumi/Calendar/hooks/index(1).d.ts +4 -0
- package/dist/components/organisms/lumi/Calendar/hooks/useCalendarHeight(1).d.ts +58 -0
- package/dist/components/organisms/lumi/Calendar/hooks/useCalendarHeight(2).d.ts +58 -0
- package/dist/components/organisms/lumi/Calendar/hooks/useEventLayout(1).d.ts +21 -0
- package/dist/components/organisms/lumi/Calendar/hooks/useEventLayout(2).d.ts +21 -0
- package/dist/components/organisms/lumi/Calendar/hooks/useTimeSlots(1).d.ts +14 -0
- package/dist/components/organisms/lumi/Calendar/hooks/useTimeSlots(2).d.ts +14 -0
- package/dist/components/organisms/lumi/Calendar/hooks/useTimeSlots(3).d.ts +14 -0
- package/dist/components/organisms/lumi/Calendar/i18n/index(1).d.ts +1 -0
- package/dist/components/organisms/lumi/Calendar/i18n/index(2).d.ts +1 -0
- package/dist/components/organisms/lumi/Calendar/i18n/translations(1).d.ts +34 -0
- package/dist/components/organisms/lumi/Calendar/index(1).d.ts +2 -0
- package/dist/components/organisms/lumi/Calendar/utils/dateUtils(1).d.ts +140 -0
- package/dist/components/organisms/lumi/Calendar/utils/dateUtils(2).d.ts +140 -0
- package/dist/components/organisms/lumi/Calendar/utils/index(1).d.ts +2 -0
- package/dist/components/organisms/lumi/Calendar/utils/multiDayUtils(1).d.ts +73 -0
- package/dist/components/organisms/lumi/Calendar/views/DayView(1).d.ts +17 -0
- package/dist/components/organisms/lumi/Calendar/views/DayView(2).d.ts +17 -0
- package/dist/components/organisms/lumi/Calendar/views/MonthView(1).d.ts +17 -0
- package/dist/components/organisms/lumi/Calendar/views/MonthView(2).d.ts +17 -0
- package/dist/components/organisms/lumi/Calendar/views/WeekView(1).d.ts +19 -0
- package/dist/components/organisms/lumi/Calendar/views/WeekView(2).d.ts +19 -0
- package/dist/components/organisms/lumi/Calendar/views/YearView(1).d.ts +13 -0
- package/dist/components/organisms/lumi/Calendar/views/index(1).d.ts +4 -0
- package/dist/components/organisms/lumi/Calendar/views/index(2).d.ts +4 -0
- package/dist/components/organisms/lumi/DashboardNavbar/index(1).d.ts +7 -0
- package/dist/components/organisms/lumi/DashboardNavbar/types(1).d.ts +52 -0
- package/dist/components/organisms/lumi/DashboardWorkspace/DashboardWorkspace(1).d.ts +23 -0
- package/dist/components/organisms/lumi/DashboardWorkspace/DashboardWorkspace(2).d.ts +23 -0
- package/dist/components/organisms/lumi/DashboardWorkspace/index(1).d.ts +7 -0
- package/dist/components/organisms/lumi/DashboardWorkspace/index(2).d.ts +7 -0
- package/dist/components/organisms/lumi/DashboardWorkspace/types(1).d.ts +60 -0
- package/dist/components/organisms/lumi/DashboardWorkspace/types(2).d.ts +60 -0
- package/dist/components/organisms/lumi/DynamicForm/DynamicForm(1).d.ts +21 -0
- package/dist/components/organisms/lumi/DynamicForm/helpers/fieldMapper(1).d.ts +17 -0
- package/dist/components/organisms/lumi/DynamicForm/helpers/fieldMapper(2).d.ts +17 -0
- package/dist/components/organisms/lumi/DynamicForm/helpers/fieldRenderer(1).d.ts +6 -0
- package/dist/components/organisms/lumi/DynamicForm/helpers/fieldRenderer(2).d.ts +6 -0
- package/dist/components/organisms/lumi/DynamicForm/index(1).d.ts +2 -0
- package/dist/components/organisms/lumi/DynamicForm/index(2).d.ts +2 -0
- package/dist/components/organisms/lumi/DynamicForm/types(1).d.ts +96 -0
- package/dist/components/organisms/lumi/DynamicForm/types(2).d.ts +96 -0
- package/dist/components/organisms/lumi/FormDrawer/FormDrawer(1).d.ts +5 -0
- package/dist/components/organisms/lumi/FormDrawer/index(1).d.ts +3 -0
- package/dist/components/organisms/lumi/FormDrawer/types(1).d.ts +61 -0
- package/dist/components/organisms/lumi/FormDrawer/types(2).d.ts +61 -0
- package/dist/components/organisms/lumi/Stepper/StepIndicator(1).d.ts +4 -0
- package/dist/components/organisms/lumi/Stepper/Stepper(1).d.ts +5 -0
- package/dist/components/organisms/lumi/Stepper/index(1).d.ts +3 -0
- package/dist/components/organisms/lumi/Stepper/types(1).d.ts +96 -0
- package/dist/components/organisms/lumi/Stepper/types(2).d.ts +96 -0
- package/dist/components/organisms/lumi/index(1).d.ts +10 -0
- package/dist/components/organisms/lumi/index(2).d.ts +10 -0
- package/dist/components/templates/chat/ChatWidget/ChatWidget(1).d.ts +10 -0
- package/dist/components/templates/chat/ChatWidget/hooks/index(1).d.ts +1 -0
- package/dist/components/templates/chat/ChatWidget/index(1).d.ts +2 -0
- package/dist/components/templates/chat/ChatWidget/index(2).d.ts +2 -0
- package/dist/components/templates/chat/ChatWidget/types(1).d.ts +90 -0
- package/dist/components/templates/lumi/Base/hooks/index(1).d.ts +2 -0
- package/dist/components/templates/lumi/Base/hooks/useAppHeight(1).d.ts +21 -0
- package/dist/components/templates/lumi/Base/index(1).d.ts +2 -0
- package/dist/components/templates/lumi/Base/types(1).d.ts +54 -0
- package/dist/components/templates/lumi/Crud/Crud(1).d.ts +6 -0
- package/dist/components/templates/lumi/Crud/Crud(2).d.ts +6 -0
- package/dist/components/templates/lumi/Crud/helpers/fieldMapper(1).d.ts +13 -0
- package/dist/components/templates/lumi/Crud/hooks/useCrudActions(1).d.ts +11 -0
- package/dist/components/templates/lumi/Crud/index(1).d.ts +2 -0
- package/dist/components/templates/lumi/Crud/store/actions(1).d.ts +45 -0
- package/dist/components/templates/lumi/Crud/store/crudStore(1).d.ts +8 -0
- package/dist/components/templates/lumi/Crud/store/index(1).d.ts +5 -0
- package/dist/components/templates/lumi/Crud/store/types(1).d.ts +71 -0
- package/dist/components/templates/lumi/Dashboard/Dashboard(1).d.ts +25 -0
- package/dist/components/templates/lumi/Dashboard/hooks/index(1).d.ts +12 -0
- package/dist/components/templates/lumi/Dashboard/hooks/index(2).d.ts +12 -0
- package/dist/components/templates/lumi/Dashboard/hooks/useDashboardStore(1).d.ts +34 -0
- package/dist/components/templates/lumi/Dashboard/hooks/useScrollToTop(1).d.ts +47 -0
- package/dist/components/templates/lumi/Dashboard/index(1).d.ts +10 -0
- package/dist/components/templates/lumi/Dashboard/store/storeKeys(1).d.ts +13 -0
- package/dist/components/templates/lumi/Dashboard/store/types(1).d.ts +73 -0
- package/dist/components/templates/lumi/Dashboard/store/types(2).d.ts +73 -0
- package/dist/components/templates/lumi/Dashboard/types(1).d.ts +114 -0
- package/dist/components/templates/lumi/Dashboard/types(2).d.ts +114 -0
- package/dist/components/templates/lumi/index(1).d.ts +3 -0
- package/dist/core/chat/ChatConfigContext(1).d.ts +36 -0
- package/dist/core/chat/chatMessage.d.ts +1 -1
- package/dist/core/eventBus/chatEventBus.d.ts +72 -0
- package/dist/index(1).esm.js +19378 -0
- package/dist/index(1).js +19487 -0
- package/dist/index.esm.js +2260 -382
- package/dist/index.js +2260 -382
- package/dist/styles(1).css +1 -0
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
- package/src/styles/index.scss +7 -0
package/dist/components/molecules/chat/StructuredContent/components/CarouselDisplay/types.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export type CarouselItemType = 'image' | 'text' | 'file';
|
|
2
|
+
export type CarouselItemStatus = 'loading' | 'ready';
|
|
3
|
+
export type SelectionMode = 'none' | 'single' | 'multiple' | 'removable';
|
|
4
|
+
export type CarouselSize = 'small' | 'medium' | 'large' | 'auto';
|
|
5
|
+
export interface CarouselItem {
|
|
6
|
+
id: string;
|
|
7
|
+
type: CarouselItemType;
|
|
8
|
+
title?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
src?: string;
|
|
11
|
+
file_type?: string;
|
|
12
|
+
status: CarouselItemStatus;
|
|
13
|
+
metadata?: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
export interface CarouselSearchEndpoint {
|
|
16
|
+
url: string;
|
|
17
|
+
method: string;
|
|
18
|
+
service: string;
|
|
19
|
+
query_param?: string;
|
|
20
|
+
params?: Record<string, string>;
|
|
21
|
+
body?: Record<string, unknown>;
|
|
22
|
+
response_path?: string;
|
|
23
|
+
id_field: string;
|
|
24
|
+
title_field: string;
|
|
25
|
+
description_field?: string;
|
|
26
|
+
src_field?: string;
|
|
27
|
+
file_type_field?: string;
|
|
28
|
+
item_type: CarouselItemType;
|
|
29
|
+
extra_fields?: string[];
|
|
30
|
+
limit?: number;
|
|
31
|
+
}
|
|
32
|
+
export interface CarouselProps {
|
|
33
|
+
items: CarouselItem[];
|
|
34
|
+
size?: CarouselSize;
|
|
35
|
+
selection_mode?: SelectionMode;
|
|
36
|
+
confirm_label?: string;
|
|
37
|
+
searchable?: boolean;
|
|
38
|
+
search_endpoint?: CarouselSearchEndpoint;
|
|
39
|
+
field_name?: string;
|
|
40
|
+
}
|
|
41
|
+
export declare function calcPageLimit(size: Exclude<CarouselSize, 'auto'>, containerWidth: number): number;
|
|
42
|
+
export declare function resolveSize(size: CarouselSize | undefined, itemCount: number): Exclude<CarouselSize, 'auto'>;
|
|
43
|
+
export declare function mapResponseToItems(data: unknown, endpoint: CarouselSearchEndpoint): CarouselItem[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ChatEventBus } from '../../../../../../core/eventBus/chatEventBus';
|
|
2
|
+
import type { CarouselSearchEndpoint } from './types';
|
|
3
|
+
import type { CarouselActions } from './store';
|
|
4
|
+
interface UseCarouselSearchParams {
|
|
5
|
+
actions: CarouselActions;
|
|
6
|
+
endpoint?: CarouselSearchEndpoint;
|
|
7
|
+
eventBus?: ChatEventBus;
|
|
8
|
+
pageLimit: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function useCarouselSearch({ actions, endpoint, eventBus, pageLimit }: UseCarouselSearchParams): {
|
|
11
|
+
search: (query: string, page?: number) => Promise<void>;
|
|
12
|
+
loadNext: () => void;
|
|
13
|
+
loadPrev: () => void;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactiveFormField, FieldState } from './types';
|
|
3
|
+
import 'react-datepicker/dist/react-datepicker.css';
|
|
4
|
+
export interface DynamicFieldProps {
|
|
5
|
+
field: ReactiveFormField;
|
|
6
|
+
value: unknown;
|
|
7
|
+
error?: string;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
fieldState: FieldState;
|
|
10
|
+
onChange: (value: unknown, label: string, extraData?: Record<string, unknown>) => void;
|
|
11
|
+
drawerPlacement?: 'bottom' | 'right';
|
|
12
|
+
}
|
|
13
|
+
export declare const DynamicField: React.FC<DynamicFieldProps>;
|
package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/DynamicField.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactiveFormField, FieldState } from './types';
|
|
3
|
+
import 'react-datepicker/dist/react-datepicker.css';
|
|
4
|
+
export interface DynamicFieldProps {
|
|
5
|
+
field: ReactiveFormField;
|
|
6
|
+
value: unknown;
|
|
7
|
+
error?: string;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
fieldState: FieldState;
|
|
10
|
+
onChange: (value: unknown, label: string, extraData?: Record<string, unknown>) => void;
|
|
11
|
+
drawerPlacement?: 'bottom' | 'right';
|
|
12
|
+
}
|
|
13
|
+
export declare const DynamicField: React.FC<DynamicFieldProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactiveFormProps } from './types';
|
|
3
|
+
import type { UseReactiveFormReturn } from './useReactiveForm';
|
|
4
|
+
import './ReactiveFormView.scss';
|
|
5
|
+
interface ReactiveFormViewProps extends ReactiveFormProps {
|
|
6
|
+
form: UseReactiveFormReturn;
|
|
7
|
+
drawerPlacement?: 'bottom' | 'right';
|
|
8
|
+
}
|
|
9
|
+
export declare const ReactiveFormView: React.FC<ReactiveFormViewProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as yup from 'yup';
|
|
2
|
+
import type { ReactiveFormField } from './types';
|
|
3
|
+
export declare function buildYupSchema(fields: ReactiveFormField[]): yup.ObjectSchema<Record<string, unknown>>;
|
|
4
|
+
export declare function buildInitialValues(fields: ReactiveFormField[]): Record<string, unknown>;
|
package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/buildYupSchema.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as yup from 'yup';
|
|
2
|
+
import type { ReactiveFormField } from './types';
|
|
3
|
+
export declare function buildYupSchema(fields: ReactiveFormField[]): yup.ObjectSchema<Record<string, unknown>>;
|
|
4
|
+
export declare function buildInitialValues(fields: ReactiveFormField[]): Record<string, unknown>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { FieldState } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Resuelve variables $field en un string con valores del formulario.
|
|
4
|
+
*
|
|
5
|
+
* Sintaxis:
|
|
6
|
+
* - $field_name -> value del campo
|
|
7
|
+
* - $field_name.label -> label de la opción seleccionada
|
|
8
|
+
* - $field_name.labels -> labels concatenados (select_multiple)
|
|
9
|
+
* - $field_name.prop -> propiedad extra del item seleccionado
|
|
10
|
+
*/
|
|
11
|
+
export declare function resolveVariable(template: string, formValues: Record<string, unknown>, fieldStates: Record<string, FieldState>): unknown;
|
|
12
|
+
export declare function resolveBody(obj: unknown, formValues: Record<string, unknown>, fieldStates: Record<string, FieldState>): unknown;
|
|
13
|
+
export declare function resolveParams(params: Record<string, string>, formValues: Record<string, unknown>, fieldStates: Record<string, FieldState>): Record<string, unknown>;
|
|
14
|
+
export declare function resolveSummaryRows(rows: Array<{
|
|
15
|
+
label: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}>, formValues: Record<string, unknown>, fieldStates: Record<string, FieldState>): Array<{
|
|
18
|
+
label: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}>;
|
package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/types(1).d.ts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export interface ReactiveFormTrigger {
|
|
2
|
+
label: string;
|
|
3
|
+
icon?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ReactiveFormStep {
|
|
6
|
+
title: string;
|
|
7
|
+
fields: string[];
|
|
8
|
+
}
|
|
9
|
+
export interface FieldEndpoint {
|
|
10
|
+
url: string;
|
|
11
|
+
method: string;
|
|
12
|
+
service: string;
|
|
13
|
+
params?: Record<string, string>;
|
|
14
|
+
body?: Record<string, unknown>;
|
|
15
|
+
response_path?: string;
|
|
16
|
+
value_field: string;
|
|
17
|
+
label_field: string;
|
|
18
|
+
extra_fields?: string[];
|
|
19
|
+
}
|
|
20
|
+
export interface FieldOptionsFrom {
|
|
21
|
+
source_field: string;
|
|
22
|
+
data_field: string;
|
|
23
|
+
value_template: string;
|
|
24
|
+
label_template: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ValidationRule {
|
|
27
|
+
value: number | string;
|
|
28
|
+
message: string;
|
|
29
|
+
}
|
|
30
|
+
export interface FieldValidation {
|
|
31
|
+
required?: string;
|
|
32
|
+
min?: ValidationRule;
|
|
33
|
+
max?: ValidationRule;
|
|
34
|
+
min_date?: ValidationRule;
|
|
35
|
+
max_date?: ValidationRule;
|
|
36
|
+
pattern?: {
|
|
37
|
+
value: string;
|
|
38
|
+
message: string;
|
|
39
|
+
};
|
|
40
|
+
email?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface ReactiveFormField {
|
|
43
|
+
name: string;
|
|
44
|
+
label?: string;
|
|
45
|
+
type: 'select' | 'select_multiple' | 'date' | 'time' | 'text' | 'email' | 'number' | 'textarea' | 'hidden';
|
|
46
|
+
default_value?: unknown;
|
|
47
|
+
placeholder?: string;
|
|
48
|
+
validation?: FieldValidation;
|
|
49
|
+
depends_on?: string | string[];
|
|
50
|
+
endpoint?: FieldEndpoint;
|
|
51
|
+
options_from?: FieldOptionsFrom;
|
|
52
|
+
options?: Array<{
|
|
53
|
+
value: string;
|
|
54
|
+
label: string;
|
|
55
|
+
}>;
|
|
56
|
+
}
|
|
57
|
+
export interface ReactiveFormSubmit {
|
|
58
|
+
url: string;
|
|
59
|
+
method: string;
|
|
60
|
+
service: string;
|
|
61
|
+
label: string;
|
|
62
|
+
payload_map: Record<string, unknown>;
|
|
63
|
+
}
|
|
64
|
+
export interface ReactiveFormSummary {
|
|
65
|
+
title: string;
|
|
66
|
+
rows: Array<{
|
|
67
|
+
label: string;
|
|
68
|
+
value: string;
|
|
69
|
+
}>;
|
|
70
|
+
}
|
|
71
|
+
export interface ReactiveFormProps {
|
|
72
|
+
title: string;
|
|
73
|
+
trigger: ReactiveFormTrigger;
|
|
74
|
+
steps: ReactiveFormStep[];
|
|
75
|
+
fields: ReactiveFormField[];
|
|
76
|
+
submit: ReactiveFormSubmit;
|
|
77
|
+
summary: ReactiveFormSummary;
|
|
78
|
+
}
|
|
79
|
+
export type FormStatus = 'closed' | 'open' | 'completed' | 'warning' | 'error';
|
|
80
|
+
export interface FieldState {
|
|
81
|
+
value: unknown;
|
|
82
|
+
label: string;
|
|
83
|
+
options: Array<{
|
|
84
|
+
value: string;
|
|
85
|
+
label: string;
|
|
86
|
+
[key: string]: unknown;
|
|
87
|
+
}>;
|
|
88
|
+
loading: boolean;
|
|
89
|
+
error: string | null;
|
|
90
|
+
extraData?: Record<string, unknown>;
|
|
91
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export interface ReactiveFormTrigger {
|
|
2
|
+
label: string;
|
|
3
|
+
icon?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ReactiveFormStep {
|
|
6
|
+
title: string;
|
|
7
|
+
fields: string[];
|
|
8
|
+
}
|
|
9
|
+
export interface FieldEndpoint {
|
|
10
|
+
url: string;
|
|
11
|
+
method: string;
|
|
12
|
+
service: string;
|
|
13
|
+
params?: Record<string, string>;
|
|
14
|
+
body?: Record<string, unknown>;
|
|
15
|
+
response_path?: string;
|
|
16
|
+
value_field: string;
|
|
17
|
+
label_field: string;
|
|
18
|
+
extra_fields?: string[];
|
|
19
|
+
}
|
|
20
|
+
export interface FieldOptionsFrom {
|
|
21
|
+
source_field: string;
|
|
22
|
+
data_field: string;
|
|
23
|
+
value_template: string;
|
|
24
|
+
label_template: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ValidationRule {
|
|
27
|
+
value: number | string;
|
|
28
|
+
message: string;
|
|
29
|
+
}
|
|
30
|
+
export interface FieldValidation {
|
|
31
|
+
required?: string;
|
|
32
|
+
min?: ValidationRule;
|
|
33
|
+
max?: ValidationRule;
|
|
34
|
+
min_date?: ValidationRule;
|
|
35
|
+
max_date?: ValidationRule;
|
|
36
|
+
pattern?: {
|
|
37
|
+
value: string;
|
|
38
|
+
message: string;
|
|
39
|
+
};
|
|
40
|
+
email?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface ReactiveFormField {
|
|
43
|
+
name: string;
|
|
44
|
+
label?: string;
|
|
45
|
+
type: 'select' | 'select_multiple' | 'date' | 'time' | 'text' | 'email' | 'number' | 'textarea' | 'hidden';
|
|
46
|
+
default_value?: unknown;
|
|
47
|
+
placeholder?: string;
|
|
48
|
+
validation?: FieldValidation;
|
|
49
|
+
depends_on?: string | string[];
|
|
50
|
+
endpoint?: FieldEndpoint;
|
|
51
|
+
options_from?: FieldOptionsFrom;
|
|
52
|
+
options?: Array<{
|
|
53
|
+
value: string;
|
|
54
|
+
label: string;
|
|
55
|
+
}>;
|
|
56
|
+
default_match?: string[];
|
|
57
|
+
min_date?: string;
|
|
58
|
+
max_date?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface ReactiveFormSubmit {
|
|
61
|
+
url: string;
|
|
62
|
+
method: string;
|
|
63
|
+
service: string;
|
|
64
|
+
label: string;
|
|
65
|
+
payload_map: Record<string, unknown>;
|
|
66
|
+
}
|
|
67
|
+
export interface SummaryAction {
|
|
68
|
+
label: string;
|
|
69
|
+
variant?: 'primary' | 'secondary';
|
|
70
|
+
action: 'submit' | 'close' | 'back';
|
|
71
|
+
}
|
|
72
|
+
export interface ReactiveFormSummary {
|
|
73
|
+
title: string;
|
|
74
|
+
rows: Array<{
|
|
75
|
+
label: string;
|
|
76
|
+
value: string;
|
|
77
|
+
}>;
|
|
78
|
+
actions?: SummaryAction[];
|
|
79
|
+
}
|
|
80
|
+
export interface ReactiveFormProps {
|
|
81
|
+
title: string;
|
|
82
|
+
trigger: ReactiveFormTrigger;
|
|
83
|
+
steps: ReactiveFormStep[];
|
|
84
|
+
fields: ReactiveFormField[];
|
|
85
|
+
submit: ReactiveFormSubmit;
|
|
86
|
+
summary: ReactiveFormSummary;
|
|
87
|
+
}
|
|
88
|
+
export type FormStatus = 'closed' | 'open' | 'completed' | 'warning' | 'error';
|
|
89
|
+
export interface FieldState {
|
|
90
|
+
value: unknown;
|
|
91
|
+
label: string;
|
|
92
|
+
options: Array<{
|
|
93
|
+
value: string;
|
|
94
|
+
label: string;
|
|
95
|
+
[key: string]: unknown;
|
|
96
|
+
}>;
|
|
97
|
+
loading: boolean;
|
|
98
|
+
error: string | null;
|
|
99
|
+
extraData?: Record<string, unknown>;
|
|
100
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactiveFormField, FieldState } from './types';
|
|
2
|
+
type FieldStatesMap = Record<string, FieldState>;
|
|
3
|
+
type FormValues = Record<string, unknown>;
|
|
4
|
+
declare function getDependencies(field: ReactiveFormField): string[];
|
|
5
|
+
declare function allDepsResolved(deps: string[], formValues: FormValues): boolean;
|
|
6
|
+
interface UseReactiveEndpointsParams {
|
|
7
|
+
fields: ReactiveFormField[];
|
|
8
|
+
fieldStates: FieldStatesMap;
|
|
9
|
+
setFieldState: (name: string, partial: Partial<FieldState>) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function useReactiveEndpoints({ fields, fieldStates, setFieldState }: UseReactiveEndpointsParams): {
|
|
12
|
+
loadEndpoint: (field: ReactiveFormField, formValues: FormValues) => Promise<void>;
|
|
13
|
+
resolveOptionsFrom: (field: ReactiveFormField, formValues: FormValues) => void;
|
|
14
|
+
getDependencies: typeof getDependencies;
|
|
15
|
+
allDepsResolved: typeof allDepsResolved;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ChatEventBus } from '../../../../../../core/eventBus/chatEventBus';
|
|
2
|
+
import type { ReactiveFormField, FieldState } from './types';
|
|
3
|
+
type FieldStatesMap = Record<string, FieldState>;
|
|
4
|
+
type FormValues = Record<string, unknown>;
|
|
5
|
+
declare function fetchViaEventBus(eventBus: ChatEventBus, service: string, url: string, method: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
6
|
+
declare function getDependencies(field: ReactiveFormField): string[];
|
|
7
|
+
declare function allDepsResolved(deps: string[], formValues: FormValues): boolean;
|
|
8
|
+
interface UseReactiveEndpointsParams {
|
|
9
|
+
fields: ReactiveFormField[];
|
|
10
|
+
fieldStates: FieldStatesMap;
|
|
11
|
+
setFieldState: (name: string, partial: Partial<FieldState>) => void;
|
|
12
|
+
eventBus?: ChatEventBus;
|
|
13
|
+
timezone?: string;
|
|
14
|
+
formTitle?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function useReactiveEndpoints({ fields, fieldStates, setFieldState, eventBus, timezone, formTitle }: UseReactiveEndpointsParams): {
|
|
17
|
+
loadEndpoint: (field: ReactiveFormField, formValues: FormValues) => Promise<void>;
|
|
18
|
+
resolveOptionsFrom: (field: ReactiveFormField, formValues: FormValues) => void;
|
|
19
|
+
getDependencies: typeof getDependencies;
|
|
20
|
+
allDepsResolved: typeof allDepsResolved;
|
|
21
|
+
fetchViaEventBus: ((service: string, url: string, method: string, body?: Record<string, unknown> | undefined) => Promise<unknown>) | undefined;
|
|
22
|
+
};
|
|
23
|
+
export { fetchViaEventBus };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ChatEventBus } from '../../../../../../core/eventBus/chatEventBus';
|
|
2
|
+
import type { ReactiveFormField, FieldState } from './types';
|
|
3
|
+
import { fetchViaEventBus } from '../../helpers/fetchViaEventBus';
|
|
4
|
+
type FieldStatesMap = Record<string, FieldState>;
|
|
5
|
+
type FormValues = Record<string, unknown>;
|
|
6
|
+
declare function getDependencies(field: ReactiveFormField): string[];
|
|
7
|
+
declare function allDepsResolved(deps: string[], formValues: FormValues): boolean;
|
|
8
|
+
interface UseReactiveEndpointsParams {
|
|
9
|
+
fields: ReactiveFormField[];
|
|
10
|
+
fieldStates: FieldStatesMap;
|
|
11
|
+
setFieldState: (name: string, partial: Partial<FieldState>) => void;
|
|
12
|
+
eventBus?: ChatEventBus;
|
|
13
|
+
timezone?: string;
|
|
14
|
+
formTitle?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function useReactiveEndpoints({ fields, fieldStates, setFieldState, eventBus, timezone, formTitle }: UseReactiveEndpointsParams): {
|
|
17
|
+
loadEndpoint: (field: ReactiveFormField, formValues: FormValues) => Promise<void>;
|
|
18
|
+
resolveOptionsFrom: (field: ReactiveFormField, formValues: FormValues) => void;
|
|
19
|
+
getDependencies: typeof getDependencies;
|
|
20
|
+
allDepsResolved: typeof allDepsResolved;
|
|
21
|
+
fetchViaEventBus: ((service: string, url: string, method: string, body?: Record<string, unknown> | undefined) => Promise<unknown>) | undefined;
|
|
22
|
+
};
|
|
23
|
+
export { fetchViaEventBus };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { buildYupSchema } from './buildYupSchema';
|
|
2
|
+
import type { ChatEventBus } from '../../../../../../core/eventBus/chatEventBus';
|
|
3
|
+
import type { ReactiveFormProps, ReactiveFormField, FieldState, FormStatus } from './types';
|
|
4
|
+
export interface UseReactiveFormReturn {
|
|
5
|
+
formStatus: FormStatus;
|
|
6
|
+
setFormStatus: (status: FormStatus) => void;
|
|
7
|
+
submitMessage: string;
|
|
8
|
+
currentStep: number;
|
|
9
|
+
setCurrentStep: (step: number | ((s: number) => number)) => void;
|
|
10
|
+
values: Record<string, unknown>;
|
|
11
|
+
errors: Record<string, string>;
|
|
12
|
+
touched: Record<string, boolean>;
|
|
13
|
+
fieldStates: Record<string, FieldState>;
|
|
14
|
+
validationSchema: ReturnType<typeof buildYupSchema>;
|
|
15
|
+
totalSteps: number;
|
|
16
|
+
handleTriggerClick: () => void;
|
|
17
|
+
setFieldValue: (name: string, value: unknown) => void;
|
|
18
|
+
handleFieldChange: (fieldName: string, value: unknown, label: string, extraData?: Record<string, unknown>) => void;
|
|
19
|
+
validateFields: (fieldNames: string[]) => Promise<Record<string, string>>;
|
|
20
|
+
validateStep: (stepIndex: number) => Promise<boolean>;
|
|
21
|
+
handleNext: () => Promise<void>;
|
|
22
|
+
handleBack: () => void;
|
|
23
|
+
handleSubmit: () => Promise<void>;
|
|
24
|
+
getDependencies: (field: ReactiveFormField) => string[];
|
|
25
|
+
allDepsResolved: (deps: string[], formValues: Record<string, unknown>) => boolean;
|
|
26
|
+
resolveSummaryRows: (rows: Array<{
|
|
27
|
+
label: string;
|
|
28
|
+
value: string;
|
|
29
|
+
}>) => Array<{
|
|
30
|
+
label: string;
|
|
31
|
+
value: string;
|
|
32
|
+
}>;
|
|
33
|
+
}
|
|
34
|
+
interface UseReactiveFormParams extends Pick<ReactiveFormProps, 'title' | 'fields' | 'steps' | 'submit' | 'summary'> {
|
|
35
|
+
eventBus?: ChatEventBus;
|
|
36
|
+
}
|
|
37
|
+
export declare function useReactiveForm(props: UseReactiveFormParams): UseReactiveFormReturn;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { buildYupSchema } from './buildYupSchema';
|
|
2
|
+
import type { ChatEventBus } from '../../../../../../core/eventBus/chatEventBus';
|
|
3
|
+
import type { ReactiveFormProps, ReactiveFormField, FieldState, FormStatus } from './types';
|
|
4
|
+
export interface UseReactiveFormReturn {
|
|
5
|
+
formStatus: FormStatus;
|
|
6
|
+
setFormStatus: (status: FormStatus) => void;
|
|
7
|
+
submitMessage: string;
|
|
8
|
+
currentStep: number;
|
|
9
|
+
setCurrentStep: (step: number | ((s: number) => number)) => void;
|
|
10
|
+
values: Record<string, unknown>;
|
|
11
|
+
errors: Record<string, string>;
|
|
12
|
+
touched: Record<string, boolean>;
|
|
13
|
+
fieldStates: Record<string, FieldState>;
|
|
14
|
+
validationSchema: ReturnType<typeof buildYupSchema>;
|
|
15
|
+
totalSteps: number;
|
|
16
|
+
handleTriggerClick: () => void;
|
|
17
|
+
setFieldValue: (name: string, value: unknown) => void;
|
|
18
|
+
handleFieldChange: (fieldName: string, value: unknown, label: string, extraData?: Record<string, unknown>) => void;
|
|
19
|
+
validateFields: (fieldNames: string[]) => Promise<Record<string, string>>;
|
|
20
|
+
validateStep: (stepIndex: number) => Promise<boolean>;
|
|
21
|
+
handleNext: () => Promise<void>;
|
|
22
|
+
handleBack: () => void;
|
|
23
|
+
handleSubmit: () => Promise<void>;
|
|
24
|
+
getDependencies: (field: ReactiveFormField) => string[];
|
|
25
|
+
allDepsResolved: (deps: string[], formValues: Record<string, unknown>) => boolean;
|
|
26
|
+
resolveSummaryRows: (rows: Array<{
|
|
27
|
+
label: string;
|
|
28
|
+
value: string;
|
|
29
|
+
}>) => Array<{
|
|
30
|
+
label: string;
|
|
31
|
+
value: string;
|
|
32
|
+
}>;
|
|
33
|
+
}
|
|
34
|
+
interface UseReactiveFormParams extends Pick<ReactiveFormProps, 'title' | 'fields' | 'steps' | 'submit' | 'summary'> {
|
|
35
|
+
eventBus?: ChatEventBus;
|
|
36
|
+
}
|
|
37
|
+
export declare function useReactiveForm(props: UseReactiveFormParams): UseReactiveFormReturn;
|
|
38
|
+
export {};
|
|
@@ -6,3 +6,5 @@ export { ConfirmButton } from './ConfirmButton/ConfirmButton';
|
|
|
6
6
|
export { CardDisplay } from './CardDisplay/CardDisplay';
|
|
7
7
|
export { BadgeDisplay } from './BadgeDisplay/BadgeDisplay';
|
|
8
8
|
export { TimeInputWithConfirm } from './TimeInputWithConfirm/TimeInputWithConfirm';
|
|
9
|
+
export { ReactiveForm } from './ReactiveForm/ReactiveForm';
|
|
10
|
+
export { CarouselDisplay } from './CarouselDisplay/CarouselDisplay';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { UIComponentData } from './types';
|
|
2
|
+
export type { UIComponentData as ComponentData };
|
|
3
|
+
export interface StructuredMessage {
|
|
4
|
+
message: string;
|
|
5
|
+
component: UIComponentData | UIComponentData[] | null;
|
|
6
|
+
}
|
|
7
|
+
export declare function parseContent(content: string): StructuredMessage | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type FC } from "react";
|
|
2
|
+
import type { BreadcrumbProps } from "./types";
|
|
3
|
+
import "./Breadcrumb.scss";
|
|
4
|
+
/**
|
|
5
|
+
* Breadcrumb - Componente de navegación por migas de pan
|
|
6
|
+
*
|
|
7
|
+
* Muestra la ubicación actual del usuario en la jerarquía de navegación,
|
|
8
|
+
* permitiendo navegar fácilmente a niveles superiores.
|
|
9
|
+
*/
|
|
10
|
+
export declare const Breadcrumb: FC<BreadcrumbProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type FC } from "react";
|
|
2
|
+
import type { BreadcrumbProps } from "./types";
|
|
3
|
+
import "./Breadcrumb.scss";
|
|
4
|
+
/**
|
|
5
|
+
* Breadcrumb - Componente de navegación por migas de pan
|
|
6
|
+
*
|
|
7
|
+
* Muestra la ubicación actual del usuario en la jerarquía de navegación,
|
|
8
|
+
* permitiendo navegar fácilmente a niveles superiores.
|
|
9
|
+
*/
|
|
10
|
+
export declare const Breadcrumb: FC<BreadcrumbProps>;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { ReactNode, CSSProperties, MouseEvent } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Tamaño del breadcrumb
|
|
4
|
+
*/
|
|
5
|
+
export type BreadcrumbSize = 'small' | 'medium' | 'large';
|
|
6
|
+
/**
|
|
7
|
+
* Props para un item del dropdown menu
|
|
8
|
+
*/
|
|
9
|
+
export interface BreadcrumbItemDropdownItem {
|
|
10
|
+
/** Clave única del item */
|
|
11
|
+
key: string;
|
|
12
|
+
/** Texto a mostrar */
|
|
13
|
+
label: string;
|
|
14
|
+
/** Ruta del link */
|
|
15
|
+
href?: string;
|
|
16
|
+
/** Icono opcional */
|
|
17
|
+
icon?: ReactNode;
|
|
18
|
+
/** Callback al hacer click */
|
|
19
|
+
onClick?: (e: MouseEvent<HTMLAnchorElement>) => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Props para el dropdown menu
|
|
23
|
+
*/
|
|
24
|
+
export interface BreadcrumbItemMenu {
|
|
25
|
+
/** Items del dropdown */
|
|
26
|
+
items: BreadcrumbItemDropdownItem[];
|
|
27
|
+
/** Callback cuando se selecciona un item */
|
|
28
|
+
onClick?: (item: BreadcrumbItemDropdownItem) => void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Props para un item individual del breadcrumb
|
|
32
|
+
*/
|
|
33
|
+
export interface BreadcrumbItem {
|
|
34
|
+
/** Texto o contenido a mostrar */
|
|
35
|
+
title: ReactNode;
|
|
36
|
+
/** Ruta del link (si es undefined, no será clickeable) */
|
|
37
|
+
href?: string;
|
|
38
|
+
/** Icono opcional */
|
|
39
|
+
icon?: ReactNode;
|
|
40
|
+
/** Si el item está deshabilitado */
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
/** Menú dropdown para items colapsados */
|
|
43
|
+
menu?: BreadcrumbItemMenu;
|
|
44
|
+
/** Callback al hacer click */
|
|
45
|
+
onClick?: (e: MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
|
|
46
|
+
/** Clase CSS adicional */
|
|
47
|
+
className?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Props para el componente Breadcrumb
|
|
51
|
+
*/
|
|
52
|
+
export interface BreadcrumbProps {
|
|
53
|
+
/** Items del breadcrumb */
|
|
54
|
+
items?: BreadcrumbItem[];
|
|
55
|
+
/** Separador entre items (puede ser string o ReactNode) */
|
|
56
|
+
separator?: ReactNode;
|
|
57
|
+
/** Máximo número de items a mostrar antes de colapsar */
|
|
58
|
+
maxItems?: number;
|
|
59
|
+
/** Número de items a mostrar antes del colapso */
|
|
60
|
+
itemsBeforeCollapse?: number;
|
|
61
|
+
/** Número de items a mostrar después del colapso */
|
|
62
|
+
itemsAfterCollapse?: number;
|
|
63
|
+
/** Tamaño del breadcrumb */
|
|
64
|
+
size?: BreadcrumbSize;
|
|
65
|
+
/** Si debe mostrar icono de home en el primer item */
|
|
66
|
+
showHomeIcon?: boolean;
|
|
67
|
+
/** Callback cuando se hace click en un item */
|
|
68
|
+
onItemClick?: (item: BreadcrumbItem, index: number) => void;
|
|
69
|
+
/** Clase CSS adicional */
|
|
70
|
+
className?: string;
|
|
71
|
+
/** Estilos inline */
|
|
72
|
+
style?: CSSProperties;
|
|
73
|
+
/** Test ID para testing */
|
|
74
|
+
'data-testid'?: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Props para el componente BreadcrumbItem
|
|
78
|
+
*/
|
|
79
|
+
export interface BreadcrumbItemProps {
|
|
80
|
+
/** Contenido del item */
|
|
81
|
+
children: ReactNode;
|
|
82
|
+
/** Ruta del link */
|
|
83
|
+
href?: string;
|
|
84
|
+
/** Icono opcional */
|
|
85
|
+
icon?: ReactNode;
|
|
86
|
+
/** Si es el último item (actual) */
|
|
87
|
+
isLast?: boolean;
|
|
88
|
+
/** Si el item está deshabilitado */
|
|
89
|
+
disabled?: boolean;
|
|
90
|
+
/** Menú dropdown para items colapsados */
|
|
91
|
+
menu?: BreadcrumbItemMenu;
|
|
92
|
+
/** Callback al hacer click */
|
|
93
|
+
onClick?: (e: MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
|
|
94
|
+
/** Clase CSS adicional */
|
|
95
|
+
className?: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Props para el componente BreadcrumbSeparator
|
|
99
|
+
*/
|
|
100
|
+
export interface BreadcrumbSeparatorProps {
|
|
101
|
+
/** Contenido del separador */
|
|
102
|
+
children?: ReactNode;
|
|
103
|
+
/** Clase CSS adicional */
|
|
104
|
+
className?: string;
|
|
105
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Control } from "react-hook-form";
|
|
2
|
+
import { type CheckboxProps as LumiCheckboxProps } from "../../../atoms/lumi/Checkbox";
|
|
3
|
+
export interface FormCheckboxProps extends Omit<LumiCheckboxProps, "error" | "onChange" | "checked" | "onBlur" | "name"> {
|
|
4
|
+
name: string;
|
|
5
|
+
control: Control<any>;
|
|
6
|
+
}
|
|
7
|
+
export declare const Checkbox: {
|
|
8
|
+
({ name, control, ...props }: FormCheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
export default Checkbox;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Checkbox, type FormCheckboxProps } from "./Checkbox";
|
|
2
|
+
export { Checkbox as default } from "./Checkbox";
|
|
3
|
+
export { checkboxValidation, checkboxGroupValidation, commonSchemas, checkboxUtils, } from "./validation-helpers";
|
|
4
|
+
export { useFormCheckboxErrorVisibility, type FormCheckboxErrorVisibilityOptions, } from "./use-cases";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useFormCheckboxErrorVisibility, type FormCheckboxErrorVisibilityOptions, } from "./FormCheckboxErrorVisibilityUseCase";
|