@bikdotai/bik-component-library 0.0.738-beta.0 → 0.0.738-beta.5
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/cjs/components/TablePagination/TablePaginationCard.d.ts +1 -1
- package/dist/cjs/components/WhatsAppTextEditor/CustomEditor.styled.d.ts +3 -3
- package/dist/cjs/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.d.ts +1 -1
- package/dist/cjs/components/analytics-card/AnalyticsCard.styled.d.ts +2 -2
- package/dist/cjs/components/analytics-chips-and-dropdowns/CommonStyles.d.ts +5 -5
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.styled.d.ts +3 -3
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapStyled.d.ts +8 -8
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.d.ts +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.styled.d.ts +5 -5
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/scoreBlock/ScoreBlock.styled.d.ts +5 -5
- package/dist/cjs/components/banner/Banner.styled.d.ts +20 -20
- package/dist/cjs/components/bik-chatbot/components/BIKChatbot.d.ts +2 -0
- package/dist/cjs/components/bik-chatbot/components/BIKChatbot.js +1 -1
- package/dist/cjs/components/bik-chatbot/contexts/AIContext.js +1 -1
- package/dist/cjs/components/bik-chatbot/services/aiService.d.ts +1 -0
- package/dist/cjs/components/bik-chatbot/services/aiService.js +1 -1
- package/dist/cjs/components/bik-chatbot/services/callToChatbot.d.ts +1 -1
- package/dist/cjs/components/bik-chatbot/services/callToChatbot.js +1 -1
- package/dist/cjs/components/bik-chatbot/services/useAIChat.d.ts +1 -1
- package/dist/cjs/components/bik-chatbot/services/useAIChat.js +1 -1
- package/dist/cjs/components/bik-chatbot/types/ai.d.ts +2 -0
- package/dist/cjs/components/bik-chatbot/types/components.d.ts +3 -0
- package/dist/cjs/components/bik-layout/CommonStyles.d.ts +17 -17
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/cjs/components/button/Button.styled.d.ts +1 -1
- package/dist/cjs/components/card-selection-modal/CardSelectionModal.styled.d.ts +2 -2
- package/dist/cjs/components/carousel-preview/CarouselPreview.js +1 -1
- package/dist/cjs/components/carousel-secondary/CarouselSecondary.style.d.ts +6 -6
- package/dist/cjs/components/checkList/CheckList.styled.d.ts +1 -1
- package/dist/cjs/components/colourInput/ColourInput.styled.d.ts +2 -2
- package/dist/cjs/components/country-code-picker/CountryCodePicker.modal.js +1 -1
- package/dist/cjs/components/country-code-picker/CountryCodePicker.styled.d.ts +2 -2
- package/dist/cjs/components/country-code-picker/CountryPicker.d.ts +72 -0
- package/dist/cjs/components/country-code-picker/CountryPicker.js +1 -0
- package/dist/cjs/components/country-code-picker/CountryPicker.styled.d.ts +12 -0
- package/dist/cjs/components/country-code-picker/CountryPicker.styled.js +1 -0
- package/dist/cjs/components/country-code-picker/index.d.ts +1 -0
- package/dist/cjs/components/custom-date-time/CustomDateTime.styled.d.ts +1 -1
- package/dist/cjs/components/dashboard-review-popup/DashboardReviewPopUp.styled.d.ts +2 -2
- package/dist/cjs/components/dashboard-review-popup/components/FiveStar.styled.d.ts +2 -2
- package/dist/cjs/components/dashboard-review-popup/components/Form.styled.d.ts +6 -6
- package/dist/cjs/components/datePicker/DatePicker.styled.d.ts +4 -4
- package/dist/cjs/components/discount-modal/DiscountModal.styled.d.ts +5 -5
- package/dist/cjs/components/input/Input.styled.d.ts +4 -4
- package/dist/cjs/components/keywords-input/KeywordsInput.styled.d.ts +1 -1
- package/dist/cjs/components/list-item/ListItem.styled.d.ts +1 -1
- package/dist/cjs/components/modals/modal.styled.d.ts +4 -4
- package/dist/cjs/components/pagination/Pagination.styled.d.ts +1 -1
- package/dist/cjs/components/plans/DurationSelectorStyles.d.ts +1 -1
- package/dist/cjs/components/plans/SubscriptionPlanSelector.d.ts +2 -2
- package/dist/cjs/components/plans/SubscriptionPlanStyled.d.ts +2 -2
- package/dist/cjs/components/product-picker/ProductPicker.styled.d.ts +2 -2
- package/dist/cjs/components/progress-bar/ProgressBarComponent.d.ts +1 -1
- package/dist/cjs/components/radioList/RadioList.styled.d.ts +1 -1
- package/dist/cjs/components/sample-button/SampleButton.styled.d.ts +1 -1
- package/dist/cjs/components/shimmer/ShimmerComponent/ShimmerStyled.d.ts +2 -2
- package/dist/cjs/components/switch/Switch.d.ts +3 -3
- package/dist/cjs/components/tabs/Tabs.styles.d.ts +5 -5
- package/dist/cjs/components/tag/Tag.styled.d.ts +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
- package/dist/cjs/components/testimonial-card/TestimonialCard.style.d.ts +9 -9
- package/dist/cjs/components/toaster/Toaster.styled.d.ts +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/components/TablePagination/TablePaginationCard.d.ts +1 -1
- package/dist/esm/components/WhatsAppTextEditor/CustomEditor.styled.d.ts +3 -3
- package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.d.ts +1 -1
- package/dist/esm/components/analytics-card/AnalyticsCard.styled.d.ts +2 -2
- package/dist/esm/components/analytics-chips-and-dropdowns/CommonStyles.d.ts +5 -5
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.styled.d.ts +3 -3
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapStyled.d.ts +8 -8
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.d.ts +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.styled.d.ts +5 -5
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/scoreBlock/ScoreBlock.styled.d.ts +5 -5
- package/dist/esm/components/banner/Banner.styled.d.ts +20 -20
- package/dist/esm/components/bik-chatbot/components/BIKChatbot.d.ts +2 -0
- package/dist/esm/components/bik-chatbot/components/BIKChatbot.js +1 -1
- package/dist/esm/components/bik-chatbot/contexts/AIContext.js +1 -1
- package/dist/esm/components/bik-chatbot/services/aiService.d.ts +1 -0
- package/dist/esm/components/bik-chatbot/services/aiService.js +1 -1
- package/dist/esm/components/bik-chatbot/services/callToChatbot.d.ts +1 -1
- package/dist/esm/components/bik-chatbot/services/callToChatbot.js +1 -1
- package/dist/esm/components/bik-chatbot/services/useAIChat.d.ts +1 -1
- package/dist/esm/components/bik-chatbot/services/useAIChat.js +1 -1
- package/dist/esm/components/bik-chatbot/types/ai.d.ts +2 -0
- package/dist/esm/components/bik-chatbot/types/components.d.ts +3 -0
- package/dist/esm/components/bik-layout/CommonStyles.d.ts +17 -17
- package/dist/esm/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/esm/components/button/Button.styled.d.ts +1 -1
- package/dist/esm/components/card-selection-modal/CardSelectionModal.styled.d.ts +2 -2
- package/dist/esm/components/carousel-preview/CarouselPreview.js +1 -1
- package/dist/esm/components/carousel-secondary/CarouselSecondary.style.d.ts +6 -6
- package/dist/esm/components/checkList/CheckList.styled.d.ts +1 -1
- package/dist/esm/components/colourInput/ColourInput.styled.d.ts +2 -2
- package/dist/esm/components/country-code-picker/CountryCodePicker.modal.js +1 -1
- package/dist/esm/components/country-code-picker/CountryCodePicker.styled.d.ts +2 -2
- package/dist/esm/components/country-code-picker/CountryPicker.d.ts +72 -0
- package/dist/esm/components/country-code-picker/CountryPicker.js +1 -0
- package/dist/esm/components/country-code-picker/CountryPicker.styled.d.ts +12 -0
- package/dist/esm/components/country-code-picker/CountryPicker.styled.js +1 -0
- package/dist/esm/components/country-code-picker/index.d.ts +1 -0
- package/dist/esm/components/custom-date-time/CustomDateTime.styled.d.ts +1 -1
- package/dist/esm/components/dashboard-review-popup/DashboardReviewPopUp.styled.d.ts +2 -2
- package/dist/esm/components/dashboard-review-popup/components/FiveStar.styled.d.ts +2 -2
- package/dist/esm/components/dashboard-review-popup/components/Form.styled.d.ts +6 -6
- package/dist/esm/components/datePicker/DatePicker.styled.d.ts +4 -4
- package/dist/esm/components/discount-modal/DiscountModal.styled.d.ts +5 -5
- package/dist/esm/components/input/Input.styled.d.ts +4 -4
- package/dist/esm/components/keywords-input/KeywordsInput.styled.d.ts +1 -1
- package/dist/esm/components/list-item/ListItem.styled.d.ts +1 -1
- package/dist/esm/components/modals/modal.styled.d.ts +4 -4
- package/dist/esm/components/pagination/Pagination.styled.d.ts +1 -1
- package/dist/esm/components/plans/DurationSelectorStyles.d.ts +1 -1
- package/dist/esm/components/plans/SubscriptionPlanSelector.d.ts +2 -2
- package/dist/esm/components/plans/SubscriptionPlanStyled.d.ts +2 -2
- package/dist/esm/components/product-picker/ProductPicker.styled.d.ts +2 -2
- package/dist/esm/components/progress-bar/ProgressBarComponent.d.ts +1 -1
- package/dist/esm/components/radioList/RadioList.styled.d.ts +1 -1
- package/dist/esm/components/sample-button/SampleButton.styled.d.ts +1 -1
- package/dist/esm/components/shimmer/ShimmerComponent/ShimmerStyled.d.ts +2 -2
- package/dist/esm/components/switch/Switch.d.ts +3 -3
- package/dist/esm/components/tabs/Tabs.styles.d.ts +5 -5
- package/dist/esm/components/tag/Tag.styled.d.ts +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
- package/dist/esm/components/testimonial-card/TestimonialCard.style.d.ts +9 -9
- package/dist/esm/components/toaster/Toaster.styled.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const CustomRightBorder: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: React.ElementType<any
|
|
4
|
+
as?: React.ElementType<any> | undefined;
|
|
5
5
|
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
6
|
export declare enum EditorActionTypes {
|
|
7
7
|
'BOLD' = "BOLD",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ModeType } from './AnalyticsCard';
|
|
3
3
|
export declare const AnalyticsContainer: import("@emotion/styled").StyledComponent<{
|
|
4
4
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
-
as?: import("react").ElementType<any
|
|
5
|
+
as?: import("react").ElementType<any> | undefined;
|
|
6
6
|
} & {
|
|
7
7
|
width: string;
|
|
8
8
|
mode?: ModeType | undefined;
|
|
@@ -10,7 +10,7 @@ export declare const AnalyticsContainer: import("@emotion/styled").StyledCompone
|
|
|
10
10
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
11
11
|
export declare const CardDataContainer: import("@emotion/styled").StyledComponent<{
|
|
12
12
|
theme?: import("@emotion/react").Theme | undefined;
|
|
13
|
-
as?: import("react").ElementType<any
|
|
13
|
+
as?: import("react").ElementType<any> | undefined;
|
|
14
14
|
} & {
|
|
15
15
|
count: number;
|
|
16
16
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const AnalyticsChipContainer: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
5
|
} & {
|
|
6
6
|
backgroundColor?: string | undefined;
|
|
7
7
|
width?: string | number | undefined;
|
|
8
8
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
9
9
|
export declare const AnalyticsMultiWrapper: import("@emotion/styled").StyledComponent<{
|
|
10
10
|
theme?: import("@emotion/react").Theme | undefined;
|
|
11
|
-
as?: import("react").ElementType<any
|
|
11
|
+
as?: import("react").ElementType<any> | undefined;
|
|
12
12
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
13
13
|
export declare const MainDropdown: import("@emotion/styled").StyledComponent<{
|
|
14
14
|
[x: string]: any;
|
|
@@ -27,7 +27,7 @@ export declare const MainDropdown: import("@emotion/styled").StyledComponent<{
|
|
|
27
27
|
}, {}, {}>;
|
|
28
28
|
export declare const ItemMenuContainer: import("@emotion/styled").StyledComponent<{
|
|
29
29
|
theme?: import("@emotion/react").Theme | undefined;
|
|
30
|
-
as?: import("react").ElementType<any
|
|
30
|
+
as?: import("react").ElementType<any> | undefined;
|
|
31
31
|
} & {
|
|
32
32
|
isSelected?: boolean | undefined;
|
|
33
33
|
isLastItem?: boolean | undefined;
|
|
@@ -35,11 +35,11 @@ export declare const ItemMenuContainer: import("@emotion/styled").StyledComponen
|
|
|
35
35
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
36
36
|
export declare const AnalyticsTrendContainer: import("@emotion/styled").StyledComponent<{
|
|
37
37
|
theme?: import("@emotion/react").Theme | undefined;
|
|
38
|
-
as?: import("react").ElementType<any
|
|
38
|
+
as?: import("react").ElementType<any> | undefined;
|
|
39
39
|
} & {
|
|
40
40
|
card: boolean;
|
|
41
41
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
42
42
|
export declare const IconContainer: import("@emotion/styled").StyledComponent<{
|
|
43
43
|
theme?: import("@emotion/react").Theme | undefined;
|
|
44
|
-
as?: import("react").ElementType<any
|
|
44
|
+
as?: import("react").ElementType<any> | undefined;
|
|
45
45
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.styled.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const LegendContainer: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
5
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
6
|
export declare const LegendColor: import("@emotion/styled").StyledComponent<{
|
|
7
7
|
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
-
as?: import("react").ElementType<any
|
|
8
|
+
as?: import("react").ElementType<any> | undefined;
|
|
9
9
|
} & {
|
|
10
10
|
color: string;
|
|
11
11
|
newStyle?: boolean | undefined;
|
|
@@ -13,7 +13,7 @@ export declare const LegendColor: import("@emotion/styled").StyledComponent<{
|
|
|
13
13
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
14
14
|
export declare const LegendWrapper: import("@emotion/styled").StyledComponent<{
|
|
15
15
|
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
-
as?: import("react").ElementType<any
|
|
16
|
+
as?: import("react").ElementType<any> | undefined;
|
|
17
17
|
} & {
|
|
18
18
|
position?: string | undefined;
|
|
19
19
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const HeatBoxStyled: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
5
|
} & {
|
|
6
6
|
isLooseFit?: boolean | undefined;
|
|
7
7
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
8
8
|
export declare const HeatBox: import("@emotion/styled").StyledComponent<{
|
|
9
9
|
theme?: import("@emotion/react").Theme | undefined;
|
|
10
|
-
as?: import("react").ElementType<any
|
|
10
|
+
as?: import("react").ElementType<any> | undefined;
|
|
11
11
|
} & {
|
|
12
12
|
heatBoxHeight?: number | undefined;
|
|
13
13
|
heatBoxWidth?: number | undefined;
|
|
14
14
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
15
15
|
export declare const HeatBoxLegend: import("@emotion/styled").StyledComponent<{
|
|
16
16
|
theme?: import("@emotion/react").Theme | undefined;
|
|
17
|
-
as?: import("react").ElementType<any
|
|
17
|
+
as?: import("react").ElementType<any> | undefined;
|
|
18
18
|
} & {
|
|
19
19
|
color: string;
|
|
20
20
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
21
21
|
export declare const LegendContainer: import("@emotion/styled").StyledComponent<{
|
|
22
22
|
theme?: import("@emotion/react").Theme | undefined;
|
|
23
|
-
as?: import("react").ElementType<any
|
|
23
|
+
as?: import("react").ElementType<any> | undefined;
|
|
24
24
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
25
25
|
export declare const LegendItem: import("@emotion/styled").StyledComponent<{
|
|
26
26
|
theme?: import("@emotion/react").Theme | undefined;
|
|
27
|
-
as?: import("react").ElementType<any
|
|
27
|
+
as?: import("react").ElementType<any> | undefined;
|
|
28
28
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
29
29
|
export declare const LegendValue: import("@emotion/styled").StyledComponent<{
|
|
30
30
|
theme?: import("@emotion/react").Theme | undefined;
|
|
31
|
-
as?: import("react").ElementType<any
|
|
31
|
+
as?: import("react").ElementType<any> | undefined;
|
|
32
32
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
33
33
|
export declare const LegendLabels: import("@emotion/styled").StyledComponent<{
|
|
34
34
|
theme?: import("@emotion/react").Theme | undefined;
|
|
35
|
-
as?: import("react").ElementType<any
|
|
35
|
+
as?: import("react").ElementType<any> | undefined;
|
|
36
36
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
37
37
|
export declare const LegendCaption: import("@emotion/styled").StyledComponent<{
|
|
38
38
|
theme?: import("@emotion/react").Theme | undefined;
|
|
39
|
-
as?: import("react").ElementType<any
|
|
39
|
+
as?: import("react").ElementType<any> | undefined;
|
|
40
40
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ export interface HeatMapVerticalInputInterface {
|
|
|
10
10
|
export declare const HeatMapVertical: React.FC<HeatMapVerticalInputInterface>;
|
|
11
11
|
export declare const HeatBoxStyled: import("@emotion/styled").StyledComponent<{
|
|
12
12
|
theme?: import("@emotion/react").Theme | undefined;
|
|
13
|
-
as?: React.ElementType<any
|
|
13
|
+
as?: React.ElementType<any> | undefined;
|
|
14
14
|
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const Container: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
5
|
} & {
|
|
6
6
|
separator?: boolean | undefined;
|
|
7
7
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
8
8
|
export declare const Row: import("@emotion/styled").StyledComponent<{
|
|
9
9
|
theme?: import("@emotion/react").Theme | undefined;
|
|
10
|
-
as?: import("react").ElementType<any
|
|
10
|
+
as?: import("react").ElementType<any> | undefined;
|
|
11
11
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
12
12
|
export declare const Column: import("@emotion/styled").StyledComponent<{
|
|
13
13
|
theme?: import("@emotion/react").Theme | undefined;
|
|
14
|
-
as?: import("react").ElementType<any
|
|
14
|
+
as?: import("react").ElementType<any> | undefined;
|
|
15
15
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
16
16
|
export declare const StyledChip: import("@emotion/styled").StyledComponent<{
|
|
17
17
|
theme?: import("@emotion/react").Theme | undefined;
|
|
18
|
-
as?: import("react").ElementType<any
|
|
18
|
+
as?: import("react").ElementType<any> | undefined;
|
|
19
19
|
} & {
|
|
20
20
|
type: 'positive' | 'neutral' | 'negative';
|
|
21
21
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
22
22
|
export declare const StyledBarContainer: import("@emotion/styled").StyledComponent<{
|
|
23
23
|
theme?: import("@emotion/react").Theme | undefined;
|
|
24
|
-
as?: import("react").ElementType<any
|
|
24
|
+
as?: import("react").ElementType<any> | undefined;
|
|
25
25
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
package/dist/esm/components/analytics-chips-and-dropdowns/chart/scoreBlock/ScoreBlock.styled.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const Container: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
5
|
} & {
|
|
6
6
|
separator?: boolean | undefined;
|
|
7
7
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
8
8
|
export declare const Row: import("@emotion/styled").StyledComponent<{
|
|
9
9
|
theme?: import("@emotion/react").Theme | undefined;
|
|
10
|
-
as?: import("react").ElementType<any
|
|
10
|
+
as?: import("react").ElementType<any> | undefined;
|
|
11
11
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
12
12
|
export declare const Column: import("@emotion/styled").StyledComponent<{
|
|
13
13
|
theme?: import("@emotion/react").Theme | undefined;
|
|
14
|
-
as?: import("react").ElementType<any
|
|
14
|
+
as?: import("react").ElementType<any> | undefined;
|
|
15
15
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
16
16
|
export declare const StyledChip: import("@emotion/styled").StyledComponent<{
|
|
17
17
|
theme?: import("@emotion/react").Theme | undefined;
|
|
18
|
-
as?: import("react").ElementType<any
|
|
18
|
+
as?: import("react").ElementType<any> | undefined;
|
|
19
19
|
} & {
|
|
20
20
|
type: 'positive' | 'neutral' | 'negative';
|
|
21
21
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
22
22
|
export declare const StyledBarContainer: import("@emotion/styled").StyledComponent<{
|
|
23
23
|
theme?: import("@emotion/react").Theme | undefined;
|
|
24
|
-
as?: import("react").ElementType<any
|
|
24
|
+
as?: import("react").ElementType<any> | undefined;
|
|
25
25
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,87 +1,87 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const CardBannerWrapper: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
5
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
6
|
export declare const CardBannerContent: import("@emotion/styled").StyledComponent<{
|
|
7
7
|
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
-
as?: import("react").ElementType<any
|
|
8
|
+
as?: import("react").ElementType<any> | undefined;
|
|
9
9
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
10
|
export declare const CardBannerIconsWrapper: import("@emotion/styled").StyledComponent<{
|
|
11
11
|
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
-
as?: import("react").ElementType<any
|
|
12
|
+
as?: import("react").ElementType<any> | undefined;
|
|
13
13
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
14
14
|
export declare const CardBannerButtonWrapper: import("@emotion/styled").StyledComponent<{
|
|
15
15
|
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
-
as?: import("react").ElementType<any
|
|
16
|
+
as?: import("react").ElementType<any> | undefined;
|
|
17
17
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
18
18
|
export declare const CompanyImageWrapper: import("@emotion/styled").StyledComponent<{
|
|
19
19
|
theme?: import("@emotion/react").Theme | undefined;
|
|
20
|
-
as?: import("react").ElementType<any
|
|
20
|
+
as?: import("react").ElementType<any> | undefined;
|
|
21
21
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
22
22
|
export declare const ButtonWrapper: import("@emotion/styled").StyledComponent<{
|
|
23
23
|
theme?: import("@emotion/react").Theme | undefined;
|
|
24
|
-
as?: import("react").ElementType<any
|
|
24
|
+
as?: import("react").ElementType<any> | undefined;
|
|
25
25
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
26
26
|
export declare const ImageWrapper: import("@emotion/styled").StyledComponent<{
|
|
27
27
|
theme?: import("@emotion/react").Theme | undefined;
|
|
28
|
-
as?: import("react").ElementType<any
|
|
28
|
+
as?: import("react").ElementType<any> | undefined;
|
|
29
29
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
30
30
|
export declare const CardWrapper: import("@emotion/styled").StyledComponent<{
|
|
31
31
|
theme?: import("@emotion/react").Theme | undefined;
|
|
32
|
-
as?: import("react").ElementType<any
|
|
32
|
+
as?: import("react").ElementType<any> | undefined;
|
|
33
33
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
34
34
|
export declare const CardFooterWrapper: import("@emotion/styled").StyledComponent<{
|
|
35
35
|
theme?: import("@emotion/react").Theme | undefined;
|
|
36
|
-
as?: import("react").ElementType<any
|
|
36
|
+
as?: import("react").ElementType<any> | undefined;
|
|
37
37
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
38
38
|
export declare const CardImageWrapper: import("@emotion/styled").StyledComponent<{
|
|
39
39
|
theme?: import("@emotion/react").Theme | undefined;
|
|
40
|
-
as?: import("react").ElementType<any
|
|
40
|
+
as?: import("react").ElementType<any> | undefined;
|
|
41
41
|
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
42
42
|
theme?: import("@emotion/react").Theme | undefined;
|
|
43
43
|
}, {}, {}>;
|
|
44
44
|
export declare const CardButtonWrapper: import("@emotion/styled").StyledComponent<{
|
|
45
45
|
theme?: import("@emotion/react").Theme | undefined;
|
|
46
|
-
as?: import("react").ElementType<any
|
|
46
|
+
as?: import("react").ElementType<any> | undefined;
|
|
47
47
|
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
48
48
|
theme?: import("@emotion/react").Theme | undefined;
|
|
49
49
|
}, {}, {}>;
|
|
50
50
|
export declare const BannerContainer: import("@emotion/styled").StyledComponent<{
|
|
51
51
|
theme?: import("@emotion/react").Theme | undefined;
|
|
52
|
-
as?: import("react").ElementType<any
|
|
52
|
+
as?: import("react").ElementType<any> | undefined;
|
|
53
53
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
54
54
|
export declare const MainContentWrapper: import("@emotion/styled").StyledComponent<{
|
|
55
55
|
theme?: import("@emotion/react").Theme | undefined;
|
|
56
|
-
as?: import("react").ElementType<any
|
|
56
|
+
as?: import("react").ElementType<any> | undefined;
|
|
57
57
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
58
58
|
export declare const TextWrapper: import("@emotion/styled").StyledComponent<{
|
|
59
59
|
theme?: import("@emotion/react").Theme | undefined;
|
|
60
|
-
as?: import("react").ElementType<any
|
|
60
|
+
as?: import("react").ElementType<any> | undefined;
|
|
61
61
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
62
62
|
export declare const TagWrapper: import("@emotion/styled").StyledComponent<{
|
|
63
63
|
theme?: import("@emotion/react").Theme | undefined;
|
|
64
|
-
as?: import("react").ElementType<any
|
|
64
|
+
as?: import("react").ElementType<any> | undefined;
|
|
65
65
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
66
66
|
export declare const BottomButtonWrapper: import("@emotion/styled").StyledComponent<{
|
|
67
67
|
theme?: import("@emotion/react").Theme | undefined;
|
|
68
|
-
as?: import("react").ElementType<any
|
|
68
|
+
as?: import("react").ElementType<any> | undefined;
|
|
69
69
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
70
70
|
export declare const BannerWithImageContainer: import("@emotion/styled").StyledComponent<{
|
|
71
71
|
theme?: import("@emotion/react").Theme | undefined;
|
|
72
|
-
as?: import("react").ElementType<any
|
|
72
|
+
as?: import("react").ElementType<any> | undefined;
|
|
73
73
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
74
74
|
export declare const ContentWrapper: import("@emotion/styled").StyledComponent<{
|
|
75
75
|
theme?: import("@emotion/react").Theme | undefined;
|
|
76
|
-
as?: import("react").ElementType<any
|
|
76
|
+
as?: import("react").ElementType<any> | undefined;
|
|
77
77
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
78
78
|
export declare const BannerImageWrapper: import("@emotion/styled").StyledComponent<{
|
|
79
79
|
theme?: import("@emotion/react").Theme | undefined;
|
|
80
|
-
as?: import("react").ElementType<any
|
|
80
|
+
as?: import("react").ElementType<any> | undefined;
|
|
81
81
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
82
82
|
export declare const BannerWithImageButtonWrapper: import("@emotion/styled").StyledComponent<{
|
|
83
83
|
theme?: import("@emotion/react").Theme | undefined;
|
|
84
|
-
as?: import("react").ElementType<any
|
|
84
|
+
as?: import("react").ElementType<any> | undefined;
|
|
85
85
|
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
86
86
|
theme?: import("@emotion/react").Theme | undefined;
|
|
87
87
|
}, {}, {}>;
|
|
@@ -23,6 +23,7 @@ import { BIKChatbotProps, SystemConfig } from '../types';
|
|
|
23
23
|
* @prop maxWidth - Maximum width constraint (default: 480px, only applies if width is not set)
|
|
24
24
|
* @prop onSystemReady - Callback fired when system is initialized, receives SystemConfig with name, id, model, etc.
|
|
25
25
|
* @prop useCase - Optional use case identifier for the chatbot
|
|
26
|
+
* @prop storeId - Optional store ID identifier for the chatbot
|
|
26
27
|
*/
|
|
27
28
|
export interface BIKChatbotWithStyleProps extends BIKChatbotProps {
|
|
28
29
|
width?: string | number;
|
|
@@ -33,6 +34,7 @@ export interface BIKChatbotWithStyleProps extends BIKChatbotProps {
|
|
|
33
34
|
tools?: string[];
|
|
34
35
|
onSystemReady?: (system: SystemConfig) => void;
|
|
35
36
|
useCase?: string;
|
|
37
|
+
storeId?: string;
|
|
36
38
|
}
|
|
37
39
|
export declare const BIKChatbot: FC<BIKChatbotWithStyleProps>;
|
|
38
40
|
export default BIKChatbot;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{AIProvider as t}from"../contexts/AIContext.js";import{AIChat as s}from"./AIChat.js";const o=o=>{let{systemPrompt:
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{AIProvider as t}from"../contexts/AIContext.js";import{AIChat as s}from"./AIChat.js";const o=o=>{let{systemPrompt:r,systemId:a,functions:i,functionHandler:n,onMessageReceived:d,displayInUI:l,maxToolCalls:c,maxTokens:m,model:h,conversationId:p,className:u,height:f,showHeader:g=!0,placeholder:x,iceBreakers:y,videoStarter:I,onMessageSent:v,onIceBreakerClick:S,chatState:b,inputDisabled:k,requestExecutor:w,baseUrl:C,endpointPath:H,responseFormat:j,responseSchema:E,width:M,maxWidth:P,fullHeight:B,style:R,chatWindowHeight:T,tools:U,onSystemReady:W,useCase:q,storeId:D}=o;if(!r)throw new Error("systemPrompt is required for generic mode.");const O=Object.assign({width:M||void 0,maxWidth:M?void 0:P||480,height:B?"100%":f||(null==R?void 0:R.height)||void 0,display:"flex",flexDirection:"column",border:"1px solid #E0E0E0",background:"#fff"},R);return e("div",Object.assign({className:u,style:O},{children:e(t,Object.assign({systemPrompt:r,systemId:a,functions:i,functionHandler:n,responseFormat:j,responseSchema:E,onMessageReceived:d,displayInUI:l,maxToolCalls:c,maxTokens:m,customModel:h,conversationId:p,requestExecutor:w,baseUrl:C,endpointPath:H,tools:U,onSystemReady:W,useCase:q,storeId:D},{children:e(s,{height:B?"100%":f,chatWindowHeight:T,showHeader:g,placeholder:x,iceBreakers:y,videoStarter:I,onMessageSent:v,onIceBreakerClick:S,chatState:b,inputDisabled:k})}))}))};export{o as BIKChatbot,o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e}from"../../../_virtual/_tslib.js";import{jsx as s}from"react/jsx-runtime";import{useState as o,useRef as t,useEffect as n,useCallback as r,useContext as i,createContext as a}from"react";import{createExecutorApiAdapter as l}from"../services/callToChatbot.js";import{useAIChat as d}from"../services/useAIChat.js";import{DEFAULT_MODEL as u,ALLOWED_MODELS as c}from"../types/ai.js";const m=a(null),p=i=>{let{children:a,systemPrompt:p,systemId:f,functions:v,tools:g,functionHandler:
|
|
1
|
+
import{__awaiter as e}from"../../../_virtual/_tslib.js";import{jsx as s}from"react/jsx-runtime";import{useState as o,useRef as t,useEffect as n,useCallback as r,useContext as i,createContext as a}from"react";import{createExecutorApiAdapter as l}from"../services/callToChatbot.js";import{useAIChat as d}from"../services/useAIChat.js";import{DEFAULT_MODEL as u,ALLOWED_MODELS as c}from"../types/ai.js";const m=a(null),p=i=>{let{children:a,systemPrompt:p,systemId:f,functions:v,tools:g,functionHandler:I,onMessageReceived:y,displayInUI:h,maxToolCalls:C,maxTokens:x,requestExecutor:A,baseUrl:P,endpointPath:b,responseFormat:w,conversationId:j="default-session",customModel:q,onSystemReady:E,useCase:R,storeId:M}=i;const[T,U]=o(null),[F,k]=o(!0),[L,$]=o(null),H=t(null);n((()=>p?A&&P?void $(null):($("Chatbot authentication not configured: RequestExecutor and baseUrl are required"),void k(!1)):($("systemPrompt is required for generic mode"),void k(!1))),[p,A,P]);const _=r((()=>e(void 0,void 0,void 0,(function*(){try{k(!0),$(null);const e=q||u;if(!c.includes(e))throw new Error(`Unsupported model: ${q||"default"}. Allowed models are: ${c.join(", ")}`);U({id:f||"generic",name:f?`${f} `:"Generic AI Assistant",model:e,systemPrompt:p,functions:v,tools:g})}catch(e){const s=(null==e?void 0:e.message)||"Failed to create AI system";$(s)}finally{k(!1)}}))),[q,p,f,v]);n((()=>{p&&_()}),[_]),n((()=>{T&&E&&T.id!==H.current&&(H.current=T.id,E(T)),T||(H.current=null)}),[T]);const{messages:z,conversation:G,sendMessage:O,isApiCallInProgress:S}=d({system:T||{id:"loading",name:"Loading...",model:u,systemPrompt:"Loading...",functions:[]},conversationId:j,skipInitialization:!T,customFunctions:v,functionHandler:I,responseFormat:w,onMessageReceived:y,displayInUI:h,maxToolCalls:C,maxTokens:x,apiAdapter:A&&P?l(A,P,b||void 0):()=>{throw new Error("Chatbot authentication not configured: RequestExecutor is required")},useCase:R,storeId:M}),B={isReady:!!T&&!F,isLoading:F,isApiCallInProgress:S,system:T,messages:z,conversation:G,sendMessage:O,error:L};return s(m.Provider,Object.assign({value:B},{children:a}))},f=()=>{const e=i(m);if(!e)throw new Error("useAIContext must be used within an AIProvider");return e};export{p as AIProvider,f as useAIContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as e,__awaiter as t}from"../../../_virtual/_tslib.js";import{injectSafetyPrompt as s,sanitizeUserInput as i}from"../utils/guardrails.js";import{callToChatbot as a}from"./callToChatbot.js";class
|
|
1
|
+
import{__rest as e,__awaiter as t}from"../../../_virtual/_tslib.js";import{injectSafetyPrompt as s,sanitizeUserInput as i}from"../utils/guardrails.js";import{callToChatbot as a}from"./callToChatbot.js";class o{constructor(e){if(Object.defineProperty(this,"system",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"dispatchMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"customFunctions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionHandler",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"onMessageReceived",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"displayInUI",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"maxToolCalls",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"maxTokens",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"apiAdapter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"responseFormat",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"useCase",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"storeId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.system=e.system,this.dispatchMessage=e.dispatchMessage,this.customFunctions=e.customFunctions,this.functionHandler=e.functionHandler,this.onMessageReceived=e.onMessageReceived,this.displayInUI=!1!==e.displayInUI,this.maxToolCalls=e.maxToolCalls||10,this.maxTokens=e.maxTokens,this.apiAdapter=e.apiAdapter,this.responseFormat=e.responseFormat,this.useCase=e.useCase,this.storeId=e.storeId,!this.apiAdapter)throw new Error("Chatbot authentication not configured: RequestExecutor is required")}sanitizeToolOutput(t,s){try{if(null!==s&&"object"==typeof s){const t=s,{success:i}=t,a=e(t,["success"]);return JSON.stringify(a)}return"string"==typeof s?s:String(s)}catch(e){return"string"==typeof s?s:String(s)}}tryParseAssistantJson(e){if(!e)return null;let t=e.trim();t=t.replace(/^```json\s*/i,"").replace(/^```\s*/i,"").replace(/\s*```$/g,"").trim();try{return JSON.parse(t)}catch(s){try{const e=`[${t.replace(/}\s*{/g,"},{")}]`;return JSON.parse(e)}catch(t){return e}}}dispatchParsedResponses(e){if(!this.displayInUI)return;const t=Date.now();e.forEach(((e,s)=>{let i="",a="assistant";if(e&&"object"==typeof e){const t=e;"string"==typeof t.response?i=t.response:"string"==typeof t.content&&(i=t.content),"system"===t.role&&(a="system")}else"string"==typeof e&&(i=e);i&&this.dispatchMessage({id:`m-${t}-${s}`,role:a,content:i,timestamp:t+s})}))}makeSystemMessage(){return{role:"system",content:s(this.system.systemPrompt)}}generate(e,s){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"default",o=arguments.length>3?arguments[3]:void 0;return t(this,void 0,void 0,(function*(){const t=e.map((e=>({role:e.role,text:i(e.content)}))),n=[{role:"system",text:this.makeSystemMessage().content},...t];return this.generateWithRecursiveToolCalls(n,s,a,o)}))}generateWithRecursiveToolCalls(e,s,i,o){var n,r,l,c,d,h,u,p,m,y;return t(this,void 0,void 0,(function*(){const t=e.map((e=>({role:e.role,text:e.text})));let f,g=o,v=0;for(;v<this.maxToolCalls;){let e;v++;try{if(f)e=f,f=void 0;else{let o;if(1===v&&g){const e=[...t].reverse().find((e=>"user"===e.role));e&&(o=[{role:"user",content:e.text}])}e=yield a(t,i,s,this.system.id,this.apiAdapter,g,this.system.functions,this.system.model,o,this.system.tools,this.maxTokens,this.useCase,this.storeId)}}catch(e){return this.displayInUI&&this.dispatchMessage({id:`m-${Date.now()}`,role:"system",content:`AI error: ${String((null==e?void 0:e.message)||e)}`,timestamp:Date.now()}),{}}if(g=e.responseId,!e.toolCall){if(e.assistantText)if("json"===this.responseFormat){const t=null!==(n=e.parsed)&&void 0!==n?n:this.tryParseAssistantJson(e.assistantText);if(null!=t){const e=Array.isArray(t)?t:[t];this.displayInUI&&this.dispatchParsedResponses(e),null===(r=this.onMessageReceived)||void 0===r||r.call(this,t)}else{const t=e.assistantText.trim();this.displayInUI&&t&&this.dispatchMessage({id:`m-${Date.now()}`,role:"assistant",content:t,timestamp:Date.now()}),null===(l=this.onMessageReceived)||void 0===l||l.call(this,e.assistantText)}}else this.displayInUI&&this.dispatchMessage({id:`m-${Date.now()}`,role:"assistant",content:e.assistantText,timestamp:Date.now()}),null===(c=this.onMessageReceived)||void 0===c||c.call(this,e.assistantText);return{responseId:g}}const{name:o,args:b,toolCallId:I,callId:x}=e.toolCall;I&&t.push({role:"assistant",text:"",toolCallId:I,toolName:o,toolArgs:JSON.stringify(b)});try{const e="string"==typeof b?(()=>{try{return JSON.parse(b)}catch(e){return b}})():b;null===(d=this.onMessageReceived)||void 0===d||d.call(this,{type:"TOOL_CALL",data:{name:o,args:e}});const n=yield this.functionHandler(o,e);if(I?t.push({role:"tool",text:JSON.stringify(n),toolCallId:I}):t.push({role:"tool",text:JSON.stringify(n)}),x){const e="object"==typeof n&&null!==n?n:String(n),r=this.sanitizeToolOutput(o,e);try{const t="string"==typeof e?e:JSON.stringify(e);null===(h=this.onMessageReceived)||void 0===h||h.call(this,{type:"TOOL_RESULT",data:{name:o,preview:t.slice(0,1e3)}})}catch(e){}const l=[{type:"function_call_output",call_id:x,output:r}],c=yield a(t,i,s,this.system.id,this.apiAdapter,g,this.system.functions,this.system.model,l,this.system.tools,this.maxTokens,this.useCase,this.storeId);if(g=c.responseId,!c.toolCall){if(c.assistantText)if("json"===this.responseFormat){const e=null!==(u=c.parsed)&&void 0!==u?u:this.tryParseAssistantJson(c.assistantText);if(null!=e){const t=Array.isArray(e)?e:[e];this.displayInUI&&this.dispatchParsedResponses(t),null===(p=this.onMessageReceived)||void 0===p||p.call(this,e)}else this.displayInUI&&this.dispatchMessage({id:`m-${Date.now()}`,role:"assistant",content:c.assistantText,timestamp:Date.now()}),null===(m=this.onMessageReceived)||void 0===m||m.call(this,c.assistantText)}else this.displayInUI&&this.dispatchMessage({id:`m-${Date.now()}`,role:"assistant",content:c.assistantText,timestamp:Date.now()}),null===(y=this.onMessageReceived)||void 0===y||y.call(this,c.assistantText);return{responseId:g}}f=c}else;}catch(e){return this.displayInUI&&this.dispatchMessage({id:`m-${Date.now()}`,role:"system",content:`Tool error: ${String((null==e?void 0:e.message)||e)}`,timestamp:Date.now()}),{responseId:g}}}return this.displayInUI&&this.dispatchMessage({id:`m-${Date.now()}`,role:"system",content:`Maximum tool call iterations (${this.maxToolCalls}) reached.`,timestamp:Date.now()}),{responseId:g}}))}}export{o as AIService};
|
|
@@ -3,4 +3,4 @@ export declare function createExecutorApiAdapter(executor: ApiRequestExecutor, b
|
|
|
3
3
|
export declare function callToChatbot(history: {
|
|
4
4
|
role: string;
|
|
5
5
|
text: string;
|
|
6
|
-
}[], intent: string | undefined, conversationId: string | undefined, systemId: string | undefined, apiAdapter: APIAdapter, previousResponseId?: string, customFunctions?: FunctionDefinition[], model?: string, nextInput?: Array<ChatMessageItem | FunctionCallOutputItem>, builtinTools?: string[], maxTokens?: number, useCase?: string): Promise<GenericAIResponse>;
|
|
6
|
+
}[], intent: string | undefined, conversationId: string | undefined, systemId: string | undefined, apiAdapter: APIAdapter, previousResponseId?: string, customFunctions?: FunctionDefinition[], model?: string, nextInput?: Array<ChatMessageItem | FunctionCallOutputItem>, builtinTools?: string[], maxTokens?: number, useCase?: string, storeId?: string): Promise<GenericAIResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t}from"../../../_virtual/_tslib.js";import{DEFAULT_MODEL as e}from"../types/ai.js";function o(e,o){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/bik-ai/call-chatbot";return s=>t(this,void 0,void 0,(function*(){var t,i;const{input:l,model:r,maxTokens:a=4e3,previousResponseId:d,customFunctions:u,builtinTools:p}=s,
|
|
1
|
+
import{__awaiter as t}from"../../../_virtual/_tslib.js";import{DEFAULT_MODEL as e}from"../types/ai.js";function o(e,o){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/bik-ai/call-chatbot";return s=>t(this,void 0,void 0,(function*(){var t,i;const{input:l,model:r,maxTokens:a=4e3,previousResponseId:d,customFunctions:u,builtinTools:p,storeId:c}=s,v={input:l,tools:[...(p||[]).map((t=>({type:t}))),...(h=u,h&&0!==h.length?h.map((t=>({type:"function",name:t.name,description:t.description,parameters:t.parameters}))):[])],model:r,max_output_tokens:a,previous_response_id:d,output_parser:"bik_chatbot_parser",use_case:s.useCase,store_id:c};var h;const m=`${o.replace(/\/$/,"")}${n}`,{status:g,data:f,error:I}=yield e.sendData({apiPath:m,apiMethod:"POST",requestBody:v});if(200!==g||!(null==f?void 0:f.success)){const e=(null===(i=null===(t=null==f?void 0:f.errors)||void 0===t?void 0:t[0])||void 0===i?void 0:i.message)||I;throw new Error("Backend error: "+(e?` - ${String(e)}`:""))}return function(t){const e={assistantText:t.assistantText,parsed:t.parsed,lastResponseId:t.lastResponseId,responseId:t.responseId};return t.toolCall&&(e.toolCall={name:t.toolCall.name,args:t.toolCall.args,toolCallId:t.toolCall.id,callId:t.toolCall.call_id}),e}(f.data)}))}function n(o){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"default-session",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"generic",l=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,d=arguments.length>7&&void 0!==arguments[7]?arguments[7]:e,u=arguments.length>8?arguments[8]:void 0,p=arguments.length>9?arguments[9]:void 0,c=arguments.length>10?arguments[10]:void 0,v=arguments.length>11?arguments[11]:void 0,h=arguments.length>12?arguments[12]:void 0;return t(this,void 0,void 0,(function*(){if(!l)throw new Error("Chatbot authentication not configured: RequestExecutor is required");const t=u&&u.length>0?u:function(t){return t.map((t=>{let{role:e,text:o}=t;return{role:e,content:o}}))}(o),e={input:t,intent:n,conversationId:s,systemId:i,previousResponseId:r,customFunctions:a,builtinTools:p,model:d,maxTokens:null!=c?c:4e3,useCase:v,storeId:h};return yield l(e)}))}export{n as callToChatbot,o as createExecutorApiAdapter};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChatMessage, SessionRecord, UseAIChatProps } from '../types';
|
|
2
|
-
export declare function useAIChat({ system, conversationId, skipInitialization, customFunctions, functionHandler, responseFormat, onMessageReceived, displayInUI, maxToolCalls, maxTokens, apiAdapter, useCase, }: Omit<UseAIChatProps, 'updateUI'>): {
|
|
2
|
+
export declare function useAIChat({ system, conversationId, skipInitialization, customFunctions, functionHandler, responseFormat, onMessageReceived, displayInUI, maxToolCalls, maxTokens, apiAdapter, useCase, storeId, }: Omit<UseAIChatProps, 'updateUI'>): {
|
|
3
3
|
messages: ChatMessage[];
|
|
4
4
|
conversation: SessionRecord;
|
|
5
5
|
sendMessage: (content: string, intent?: string) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as s}from"../../../_virtual/_tslib.js";import{useState as e,useEffect as t,useMemo as a}from"react";import{createSessionRecord as n}from"../types/chat.js";import{AIService as o}from"./aiService.js";import{loadSession as i,saveSession as c}from"./db.js";function r(r){var d=this;let{system:l,conversationId:m,skipInitialization:g=!1,customFunctions:p,functionHandler:u,responseFormat:b,onMessageReceived:j,displayInUI:O,maxToolCalls:I,maxTokens:v,apiAdapter:f,useCase:w}=r;const[
|
|
1
|
+
import{__awaiter as s}from"../../../_virtual/_tslib.js";import{useState as e,useEffect as t,useMemo as a}from"react";import{createSessionRecord as n}from"../types/chat.js";import{AIService as o}from"./aiService.js";import{loadSession as i,saveSession as c}from"./db.js";function r(r){var d=this;let{system:l,conversationId:m,skipInitialization:g=!1,customFunctions:p,functionHandler:u,responseFormat:b,onMessageReceived:j,displayInUI:O,maxToolCalls:I,maxTokens:v,apiAdapter:f,useCase:w,storeId:y}=r;const[h,C]=e((()=>n(m))),[D,R]=e([]),[A,k]=e(),[x,F]=e(!1);t((()=>{i(m).then((s=>{var e;s&&(C(s),R(s.messages),k(null===(e=s.metadata)||void 0===e?void 0:e.lastResponseId))}))}),[m]);const M=a((()=>g?null:new o({system:Object.assign(Object.assign({},l),{handleCallback:(s,e)=>{var t;null===(t=l.handleCallback)||void 0===t||t.call(l,s,e)}}),dispatchMessage:s=>{R((e=>[...e,s])),C((e=>{const t=Object.assign(Object.assign({},e),{updatedAt:Date.now(),messages:[...e.messages,s]});return c(t.sessionId,Object.assign(Object.assign({},t),{metadata:Object.assign(Object.assign({},t.metadata||{}),{lastResponseId:A})})),t}))},customFunctions:p,functionHandler:u,responseFormat:b,onMessageReceived:j,displayInUI:O,maxToolCalls:I,maxTokens:v,apiAdapter:f,useCase:w,storeId:y})),[l.id,g,v]);return{messages:D,conversation:h,sendMessage:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";return s(d,void 0,void 0,(function*(){if(!M)return;const s={id:`u-${Date.now()}`,role:"user",content:e,timestamp:Date.now()};R((e=>[...e,s])),C((e=>{const t=Object.assign(Object.assign({},e),{updatedAt:Date.now(),messages:[...e.messages,s]});return c(t.sessionId,Object.assign(Object.assign({},t),{metadata:Object.assign(Object.assign({},t.metadata||{}),{lastResponseId:A})})),t})),F(!0);try{const e=yield M.generate([...D,s].map((s=>({role:s.role,content:s.content}))),m,t,A);(null==e?void 0:e.responseId)&&(k(e.responseId),C((s=>{const t=Object.assign(Object.assign({},s),{metadata:Object.assign(Object.assign({},s.metadata||{}),{lastResponseId:e.responseId})});return c(t.sessionId,t),t})))}catch(s){const e=(null==s?void 0:s.message)||"Something went wrong. Please try again.",t={id:`err-${Date.now()}`,role:"system",content:e,timestamp:Date.now()};R((s=>[...s,t])),C((s=>{const e=Object.assign(Object.assign({},s),{updatedAt:Date.now(),messages:[...s.messages,t]});return c(e.sessionId,Object.assign(Object.assign({},e),{metadata:Object.assign(Object.assign({},e.metadata||{}),{lastResponseId:A})})),e}))}finally{F(!1)}}))},isApiCallInProgress:x}}export{r as useAIChat};
|
|
@@ -113,6 +113,7 @@ export interface BackendApiRequest {
|
|
|
113
113
|
previous_response_id?: string;
|
|
114
114
|
output_parser?: string;
|
|
115
115
|
use_case?: string;
|
|
116
|
+
store_id?: string;
|
|
116
117
|
}
|
|
117
118
|
export interface BackendApiResponse {
|
|
118
119
|
status: number;
|
|
@@ -158,4 +159,5 @@ export type CallToChatbotRequest = {
|
|
|
158
159
|
model: string;
|
|
159
160
|
maxTokens?: number;
|
|
160
161
|
useCase?: string;
|
|
162
|
+
storeId?: string;
|
|
161
163
|
};
|
|
@@ -92,6 +92,7 @@ export interface AIProviderProps {
|
|
|
92
92
|
customModel?: string;
|
|
93
93
|
onSystemReady?: (system: SystemConfig) => void;
|
|
94
94
|
useCase?: string;
|
|
95
|
+
storeId?: string;
|
|
95
96
|
}
|
|
96
97
|
export interface AIContextState {
|
|
97
98
|
isReady: boolean;
|
|
@@ -117,6 +118,7 @@ export interface UseAIChatProps {
|
|
|
117
118
|
apiAdapter: APIAdapter;
|
|
118
119
|
responseFormat?: ResponseFormat;
|
|
119
120
|
useCase?: string;
|
|
121
|
+
storeId?: string;
|
|
120
122
|
}
|
|
121
123
|
export interface AIServiceConstructorProps {
|
|
122
124
|
system: SystemConfig;
|
|
@@ -130,4 +132,5 @@ export interface AIServiceConstructorProps {
|
|
|
130
132
|
apiAdapter: APIAdapter;
|
|
131
133
|
responseFormat?: 'text' | 'json';
|
|
132
134
|
useCase?: string;
|
|
135
|
+
storeId?: string;
|
|
133
136
|
}
|