@bikdotai/bik-component-library 0.0.736-beta.8 → 0.0.736
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/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
- 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 +3 -0
- package/dist/cjs/components/bik-chatbot/types/components.d.ts +3 -0
- package/dist/cjs/components/spinner/Spinner.d.ts +0 -1
- package/dist/cjs/components/spinner/Spinner.js +4 -5
- package/dist/cjs/components/spinner/lotties/black.json.js +1 -0
- package/dist/cjs/components/spinner/lotties/brand.json.js +1 -0
- package/dist/cjs/components/spinner/lotties/red.json.js +1 -0
- package/dist/cjs/components/spinner/lotties/white.json.js +1 -0
- package/dist/cjs/components/spinner/themes.d.ts +0 -3
- package/dist/cjs/components/spinner/themes.js +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
- 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 +3 -0
- package/dist/esm/components/bik-chatbot/types/components.d.ts +3 -0
- package/dist/esm/components/spinner/Spinner.d.ts +0 -1
- package/dist/esm/components/spinner/Spinner.js +6 -7
- package/dist/esm/components/spinner/lotties/black.json.js +1 -0
- package/dist/esm/components/spinner/lotties/brand.json.js +1 -0
- package/dist/esm/components/spinner/lotties/red.json.js +1 -0
- package/dist/esm/components/spinner/lotties/white.json.js +1 -0
- package/dist/esm/components/spinner/themes.d.ts +0 -3
- package/dist/esm/components/spinner/themes.js +1 -1
- package/package.json +2 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryBuilderNodeProps } from "../../../
|
|
2
|
+
import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
|
|
3
3
|
declare const EventsTrigger: React.FC<QueryBuilderNodeProps>;
|
|
4
4
|
export default EventsTrigger;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { QueryBuilderAPIData } from "../../../
|
|
1
|
+
import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
|
|
2
2
|
export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryBuilderNodeProps } from "../../../
|
|
2
|
+
import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
|
|
3
3
|
declare const IGTrigger: React.FC<QueryBuilderNodeProps>;
|
|
4
4
|
export default IGTrigger;
|
package/dist/cjs/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { QueryBuilderAPIData } from "../../../
|
|
1
|
+
import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
|
|
2
2
|
export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
|
package/dist/cjs/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DropdownOption } from "../../../dropdown/type";
|
|
3
|
-
import { QueryBuilderProperty } from "../../
|
|
4
|
-
import { QueryBuilderNodeProps } from "../../
|
|
3
|
+
import { QueryBuilderProperty } from "../../types/QueryBuilder.type";
|
|
4
|
+
import { QueryBuilderNodeProps } from "../../types/QueryBuilderNodeProps.type";
|
|
5
5
|
declare const BaseTriggerQueryBuilderNode: React.FC<QueryBuilderNodeProps & {
|
|
6
6
|
cacheKey: string;
|
|
7
7
|
propertyAddBtnText: string;
|
|
@@ -22,6 +22,7 @@ import { BIKChatbotProps, SystemConfig } from '../types';
|
|
|
22
22
|
* @prop width - Width of the chatbot container (default: undefined, will use maxWidth constraint)
|
|
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
|
+
* @prop useCase - Optional use case identifier for the chatbot
|
|
25
26
|
*/
|
|
26
27
|
export interface BIKChatbotWithStyleProps extends BIKChatbotProps {
|
|
27
28
|
width?: string | number;
|
|
@@ -31,6 +32,7 @@ export interface BIKChatbotWithStyleProps extends BIKChatbotProps {
|
|
|
31
32
|
chatWindowHeight?: string | number;
|
|
32
33
|
tools?: string[];
|
|
33
34
|
onSystemReady?: (system: SystemConfig) => void;
|
|
35
|
+
useCase?: string;
|
|
34
36
|
}
|
|
35
37
|
export declare const BIKChatbot: FC<BIKChatbotWithStyleProps>;
|
|
36
38
|
export default BIKChatbot;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../contexts/AIContext.js"),t=require("./AIChat.js");const o=o=>{let{systemPrompt:r,systemId:a,functions:i,functionHandler:n,onMessageReceived:d,displayInUI:l,maxToolCalls:c,maxTokens:h,model:m,conversationId:u,className:p,height:x,showHeader:g=!0,placeholder:y,iceBreakers:I,videoStarter:f,onMessageSent:v,onIceBreakerClick:b,chatState:j,inputDisabled:C,requestExecutor:S,baseUrl:k,endpointPath:w,responseFormat:H,responseSchema:P,width:q,maxWidth:E,fullHeight:M,style:B,chatWindowHeight:A,tools:O,onSystemReady:R,useCase:T}=o;if(!r)throw new Error("systemPrompt is required for generic mode.");const U=Object.assign({width:q||void 0,maxWidth:q?void 0:E||480,height:M?"100%":x||(null==B?void 0:B.height)||void 0,display:"flex",flexDirection:"column",border:"1px solid #E0E0E0",background:"#fff"},B);return e.jsx("div",Object.assign({className:p,style:U},{children:e.jsx(s.AIProvider,Object.assign({systemPrompt:r,systemId:a,functions:i,functionHandler:n,responseFormat:H,responseSchema:P,onMessageReceived:d,displayInUI:l,maxToolCalls:c,maxTokens:h,customModel:m,conversationId:u,requestExecutor:S,baseUrl:k,endpointPath:w,tools:O,onSystemReady:R,useCase:T},{children:e.jsx(t.AIChat,{height:M?"100%":x,chatWindowHeight:A,showHeader:g,placeholder:y,iceBreakers:I,videoStarter:f,onMessageSent:v,onIceBreakerClick:b,chatState:j,inputDisabled:C})}))}))};exports.BIKChatbot=o,exports.default=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),t=require("react"),o=require("../services/callToChatbot.js"),r=require("../services/useAIChat.js"),n=require("../types/ai.js");const i=t.createContext(null);exports.AIProvider=a=>{let{children:u,systemPrompt:l,systemId:d,functions:c,tools:m,functionHandler:p,onMessageReceived:v,displayInUI:f,maxToolCalls:A,maxTokens:g,requestExecutor:E,baseUrl:I,endpointPath:x,responseFormat:y,conversationId:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),t=require("react"),o=require("../services/callToChatbot.js"),r=require("../services/useAIChat.js"),n=require("../types/ai.js");const i=t.createContext(null);exports.AIProvider=a=>{let{children:u,systemPrompt:l,systemId:d,functions:c,tools:m,functionHandler:p,onMessageReceived:v,displayInUI:f,maxToolCalls:A,maxTokens:g,requestExecutor:E,baseUrl:I,endpointPath:x,responseFormat:y,conversationId:C="default-session",customModel:h,onSystemReady:L,useCase:q}=a;const[P,b]=t.useState(null),[M,_]=t.useState(!0),[j,w]=t.useState(null),D=t.useRef(null);t.useEffect((()=>l?E&&I?void w(null):(w("Chatbot authentication not configured: RequestExecutor and baseUrl are required"),void _(!1)):(w("systemPrompt is required for generic mode"),void _(!1))),[l,E,I]);const O=t.useCallback((()=>e.__awaiter(void 0,void 0,void 0,(function*(){try{_(!0),w(null);const e=h||n.DEFAULT_MODEL;if(!n.ALLOWED_MODELS.includes(e))throw new Error(`Unsupported model: ${h||"default"}. Allowed models are: ${n.ALLOWED_MODELS.join(", ")}`);b({id:d||"generic",name:d?`${d} `:"Generic AI Assistant",model:e,systemPrompt:l,functions:c,tools:m})}catch(e){const s=(null==e?void 0:e.message)||"Failed to create AI system";w(s)}finally{_(!1)}}))),[h,l,d,c]);t.useEffect((()=>{l&&O()}),[O]),t.useEffect((()=>{P&&L&&P.id!==D.current&&(D.current=P.id,L(P)),P||(D.current=null)}),[P]);const{messages:R,conversation:T,sendMessage:U,isApiCallInProgress:F}=r.useAIChat({system:P||{id:"loading",name:"Loading...",model:n.DEFAULT_MODEL,systemPrompt:"Loading...",functions:[]},conversationId:C,skipInitialization:!P,customFunctions:c,functionHandler:p,responseFormat:y,onMessageReceived:v,displayInUI:f,maxToolCalls:A,maxTokens:g,apiAdapter:E&&I?o.createExecutorApiAdapter(E,I,x||void 0):()=>{throw new Error("Chatbot authentication not configured: RequestExecutor is required")},useCase:q}),S={isReady:!!P&&!M,isLoading:M,isApiCallInProgress:F,system:P,messages:R,conversation:T,sendMessage:U,error:j};return s.jsx(i.Provider,Object.assign({value:S},{children:u}))},exports.useAIContext=()=>{const e=t.useContext(i);if(!e)throw new Error("useAIContext must be used within an AIProvider");return e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("../utils/guardrails.js"),s=require("./callToChatbot.js");exports.AIService=class{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}),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.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.__rest(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:t.injectSafetyPrompt(this.system.systemPrompt)}}generate(s,i){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"default",n=arguments.length>3?arguments[3]:void 0;return e.__awaiter(this,void 0,void 0,(function*(){const e=s.map((e=>({role:e.role,text:t.sanitizeUserInput(e.content)}))),o=[{role:"system",text:this.makeSystemMessage().content},...e];return this.generateWithRecursiveToolCalls(o,i,a,n)}))}generateWithRecursiveToolCalls(t,i,a,n){var o,r,l,c,d,h,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("../utils/guardrails.js"),s=require("./callToChatbot.js");exports.AIService=class{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}),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.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.__rest(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:t.injectSafetyPrompt(this.system.systemPrompt)}}generate(s,i){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"default",n=arguments.length>3?arguments[3]:void 0;return e.__awaiter(this,void 0,void 0,(function*(){const e=s.map((e=>({role:e.role,text:t.sanitizeUserInput(e.content)}))),o=[{role:"system",text:this.makeSystemMessage().content},...e];return this.generateWithRecursiveToolCalls(o,i,a,n)}))}generateWithRecursiveToolCalls(t,i,a,n){var o,r,l,c,d,u,h,p,m,y;return e.__awaiter(this,void 0,void 0,(function*(){const e=t.map((e=>({role:e.role,text:e.text})));let f,g=n,v=0;for(;v<this.maxToolCalls;){let t;v++;try{if(f)t=f,f=void 0;else{let n;if(1===v&&g){const t=[...e].reverse().find((e=>"user"===e.role));t&&(n=[{role:"user",content:t.text}])}t=yield s.callToChatbot(e,a,i,this.system.id,this.apiAdapter,g,this.system.functions,this.system.model,n,this.system.tools,this.maxTokens,this.useCase)}}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=t.responseId,!t.toolCall){if(t.assistantText)if("json"===this.responseFormat){const e=null!==(o=t.parsed)&&void 0!==o?o:this.tryParseAssistantJson(t.assistantText);if(null!=e){const t=Array.isArray(e)?e:[e];this.displayInUI&&this.dispatchParsedResponses(t),null===(r=this.onMessageReceived)||void 0===r||r.call(this,e)}else{const e=t.assistantText.trim();this.displayInUI&&e&&this.dispatchMessage({id:`m-${Date.now()}`,role:"assistant",content:e,timestamp:Date.now()}),null===(l=this.onMessageReceived)||void 0===l||l.call(this,t.assistantText)}}else this.displayInUI&&this.dispatchMessage({id:`m-${Date.now()}`,role:"assistant",content:t.assistantText,timestamp:Date.now()}),null===(c=this.onMessageReceived)||void 0===c||c.call(this,t.assistantText);return{responseId:g}}const{name:n,args:b,toolCallId:I,callId:x}=t.toolCall;I&&e.push({role:"assistant",text:"",toolCallId:I,toolName:n,toolArgs:JSON.stringify(b)});try{const t="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:n,args:t}});const o=yield this.functionHandler(n,t);if(I?e.push({role:"tool",text:JSON.stringify(o),toolCallId:I}):e.push({role:"tool",text:JSON.stringify(o)}),x){const t="object"==typeof o&&null!==o?o:String(o),r=this.sanitizeToolOutput(n,t);try{const e="string"==typeof t?t:JSON.stringify(t);null===(u=this.onMessageReceived)||void 0===u||u.call(this,{type:"TOOL_RESULT",data:{name:n,preview:e.slice(0,1e3)}})}catch(e){}const l=[{type:"function_call_output",call_id:x,output:r}],c=yield s.callToChatbot(e,a,i,this.system.id,this.apiAdapter,g,this.system.functions,this.system.model,l,this.system.tools,this.maxTokens,this.useCase);if(g=c.responseId,!c.toolCall){if(c.assistantText)if("json"===this.responseFormat){const e=null!==(h=c.parsed)&&void 0!==h?h: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}}))}};
|
|
@@ -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): 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): Promise<GenericAIResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("../types/ai.js");exports.callToChatbot=function(o){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("../types/ai.js");exports.callToChatbot=function(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",r=arguments.length>4?arguments[4]:void 0,l=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]:t.DEFAULT_MODEL,u=arguments.length>8?arguments[8]:void 0,c=arguments.length>9?arguments[9]:void 0,p=arguments.length>10?arguments[10]:void 0,v=arguments.length>11?arguments[11]:void 0;return e.__awaiter(this,void 0,void 0,(function*(){if(!r)throw new Error("Chatbot authentication not configured: RequestExecutor is required");const e=u&&u.length>0?u:function(e){return e.map((e=>{let{role:t,text:o}=e;return{role:t,content:o}}))}(o),t={input:e,intent:n,conversationId:s,systemId:i,previousResponseId:l,customFunctions:a,builtinTools:c,model:d,maxTokens:null!=p?p:4e3,useCase:v};return yield r(t)}))},exports.createExecutorApiAdapter=function(t,o){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/bik-ai/call-chatbot";return s=>e.__awaiter(this,void 0,void 0,(function*(){var e,i;const{input:r,model:l,maxTokens:a=4e3,previousResponseId:d,customFunctions:u,builtinTools:c}=s,p={input:r,tools:[...(c||[]).map((e=>({type:e}))),...(v=u,v&&0!==v.length?v.map((e=>({type:"function",name:e.name,description:e.description,parameters:e.parameters}))):[])],model:l,max_output_tokens:a,previous_response_id:d,output_parser:"bik_chatbot_parser",use_case:s.useCase};var v;const h=`${o.replace(/\/$/,"")}${n}`,{status:g,data:m,error:_}=yield t.sendData({apiPath:h,apiMethod:"POST",requestBody:p});if(200!==g||!(null==m?void 0:m.success)){const t=(null===(i=null===(e=null==m?void 0:m.errors)||void 0===e?void 0:e[0])||void 0===i?void 0:i.message)||_;throw new Error("Backend error: "+(t?` - ${String(t)}`:""))}return function(e){const t={assistantText:e.assistantText,parsed:e.parsed,lastResponseId:e.lastResponseId,responseId:e.responseId};return e.toolCall&&(t.toolCall={name:e.toolCall.name,args:e.toolCall.args,toolCallId:e.toolCall.id,callId:e.toolCall.call_id}),t}(m.data)}))};
|
|
@@ -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, }: Omit<UseAIChatProps, 'updateUI'>): {
|
|
2
|
+
export declare function useAIChat({ system, conversationId, skipInitialization, customFunctions, functionHandler, responseFormat, onMessageReceived, displayInUI, maxToolCalls, maxTokens, apiAdapter, useCase, }: Omit<UseAIChatProps, 'updateUI'>): {
|
|
3
3
|
messages: ChatMessage[];
|
|
4
4
|
conversation: SessionRecord;
|
|
5
5
|
sendMessage: (content: string, intent?: string) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),s=require("react"),t=require("../types/chat.js"),a=require("./aiService.js"),n=require("./db.js");exports.useAIChat=function(i){var o=this;let{system:r,conversationId:c,skipInitialization:d=!1,customFunctions:l,functionHandler:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),s=require("react"),t=require("../types/chat.js"),a=require("./aiService.js"),n=require("./db.js");exports.useAIChat=function(i){var o=this;let{system:r,conversationId:c,skipInitialization:d=!1,customFunctions:l,functionHandler:u,responseFormat:g,onMessageReceived:m,displayInUI:b,maxToolCalls:j,maxTokens:p,apiAdapter:O,useCase:v}=i;const[I,S]=s.useState((()=>t.createSessionRecord(c))),[f,w]=s.useState([]),[y,h]=s.useState(),[A,C]=s.useState(!1);s.useEffect((()=>{n.loadSession(c).then((e=>{var s;e&&(S(e),w(e.messages),h(null===(s=e.metadata)||void 0===s?void 0:s.lastResponseId))}))}),[c]);const R=s.useMemo((()=>d?null:new a.AIService({system:Object.assign(Object.assign({},r),{handleCallback:(e,s)=>{var t;null===(t=r.handleCallback)||void 0===t||t.call(r,e,s)}}),dispatchMessage:e=>{w((s=>[...s,e])),S((s=>{const t=Object.assign(Object.assign({},s),{updatedAt:Date.now(),messages:[...s.messages,e]});return n.saveSession(t.sessionId,Object.assign(Object.assign({},t),{metadata:Object.assign(Object.assign({},t.metadata||{}),{lastResponseId:y})})),t}))},customFunctions:l,functionHandler:u,responseFormat:g,onMessageReceived:m,displayInUI:b,maxToolCalls:j,maxTokens:p,apiAdapter:O,useCase:v})),[r.id,d,p]);return{messages:f,conversation:I,sendMessage:function(s){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";return e.__awaiter(o,void 0,void 0,(function*(){if(!R)return;const e={id:`u-${Date.now()}`,role:"user",content:s,timestamp:Date.now()};w((s=>[...s,e])),S((s=>{const t=Object.assign(Object.assign({},s),{updatedAt:Date.now(),messages:[...s.messages,e]});return n.saveSession(t.sessionId,Object.assign(Object.assign({},t),{metadata:Object.assign(Object.assign({},t.metadata||{}),{lastResponseId:y})})),t})),C(!0);try{const s=yield R.generate([...f,e].map((e=>({role:e.role,content:e.content}))),c,t,y);(null==s?void 0:s.responseId)&&(h(s.responseId),S((e=>{const t=Object.assign(Object.assign({},e),{metadata:Object.assign(Object.assign({},e.metadata||{}),{lastResponseId:s.responseId})});return n.saveSession(t.sessionId,t),t})))}catch(e){const s=(null==e?void 0:e.message)||"Something went wrong. Please try again.",t={id:`err-${Date.now()}`,role:"system",content:s,timestamp:Date.now()};w((e=>[...e,t])),S((e=>{const s=Object.assign(Object.assign({},e),{updatedAt:Date.now(),messages:[...e.messages,t]});return n.saveSession(s.sessionId,Object.assign(Object.assign({},s),{metadata:Object.assign(Object.assign({},s.metadata||{}),{lastResponseId:y})})),s}))}finally{C(!1)}}))},isApiCallInProgress:A}};
|
|
@@ -111,6 +111,8 @@ export interface BackendApiRequest {
|
|
|
111
111
|
model: string;
|
|
112
112
|
max_output_tokens: number;
|
|
113
113
|
previous_response_id?: string;
|
|
114
|
+
output_parser?: string;
|
|
115
|
+
use_case?: string;
|
|
114
116
|
}
|
|
115
117
|
export interface BackendApiResponse {
|
|
116
118
|
status: number;
|
|
@@ -155,4 +157,5 @@ export type CallToChatbotRequest = {
|
|
|
155
157
|
builtinTools?: string[];
|
|
156
158
|
model: string;
|
|
157
159
|
maxTokens?: number;
|
|
160
|
+
useCase?: string;
|
|
158
161
|
};
|
|
@@ -91,6 +91,7 @@ export interface AIProviderProps {
|
|
|
91
91
|
onUIUpdate?: (signal: unknown) => void;
|
|
92
92
|
customModel?: string;
|
|
93
93
|
onSystemReady?: (system: SystemConfig) => void;
|
|
94
|
+
useCase?: string;
|
|
94
95
|
}
|
|
95
96
|
export interface AIContextState {
|
|
96
97
|
isReady: boolean;
|
|
@@ -115,6 +116,7 @@ export interface UseAIChatProps {
|
|
|
115
116
|
maxTokens?: number;
|
|
116
117
|
apiAdapter: APIAdapter;
|
|
117
118
|
responseFormat?: ResponseFormat;
|
|
119
|
+
useCase?: string;
|
|
118
120
|
}
|
|
119
121
|
export interface AIServiceConstructorProps {
|
|
120
122
|
system: SystemConfig;
|
|
@@ -127,4 +129,5 @@ export interface AIServiceConstructorProps {
|
|
|
127
129
|
maxTokens?: number;
|
|
128
130
|
apiAdapter: APIAdapter;
|
|
129
131
|
responseFormat?: 'text' | 'json';
|
|
132
|
+
useCase?: string;
|
|
130
133
|
}
|
|
@@ -6,7 +6,6 @@ export declare const Spinner: {
|
|
|
6
6
|
export declare const PureSpinner: import("styled-components").StyledComponent<"div", any, {
|
|
7
7
|
width: string;
|
|
8
8
|
height: string;
|
|
9
|
-
size?: "small" | "large" | undefined;
|
|
10
9
|
color?: string | undefined;
|
|
11
10
|
backgroundColor?: string | undefined;
|
|
12
11
|
}, never>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("styled-components"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react-lottie"),t=require("styled-components"),n=require("../../constants/Theme.js"),i=require("./lotties/black.json.js"),o=require("./lotties/brand.json.js"),s=require("./lotties/red.json.js"),a=require("./lotties/white.json.js"),l=require("./themes.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=d(r),c=d(t);const p={[n.COLORS.stroke.brand]:o,[n.COLORS.content.primary]:i,[n.COLORS.content.primaryInverse]:a,[n.COLORS.content.negative]:s},j=r=>{let{size:t,color:i,className:o}=r;const s={loop:!0,autoplay:!0,animationData:p[null!=i?i:n.COLORS.stroke.brand],rendererSettings:{preserveAspectRatio:"xMidYMid slice"}};return e.jsx("div",Object.assign({className:`spinner-container ${o}`},{children:e.jsx(u.default,{options:s,width:l.SizeMap[t],isStopped:!1,isPaused:!1})}))};j.displayName="Spinner";const m=c.default.div`
|
|
2
2
|
width: ${e=>e.width};
|
|
3
3
|
height: ${e=>e.height};
|
|
4
|
-
border: ${e=>e.
|
|
5
|
-
|
|
6
|
-
border-bottom-color: ${e=>{var r;return null!==(r=e.color)&&void 0!==r?r:t.COLORS.stroke.brand}};
|
|
4
|
+
border: 5px solid ${e=>{var r;return null!==(r=e.backgroundColor)&&void 0!==r?r:"transparent"}};
|
|
5
|
+
border-bottom-color: ${e=>{var r;return null!==(r=e.color)&&void 0!==r?r:n.COLORS.stroke.brand}};
|
|
7
6
|
border-radius: 50%;
|
|
8
7
|
display: inline-block;
|
|
9
8
|
animation: rotation 1s linear infinite;
|
|
@@ -16,4 +15,4 @@
|
|
|
16
15
|
transform: rotate(360deg);
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
|
-
`;exports.PureSpinner=
|
|
18
|
+
`;exports.PureSpinner=m,exports.Spinner=j;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var a="loader for public",i={g:"LottieFiles AE 0.1.21"},t=[{ty:4,nm:"Shape Layer 1",sr:1,st:0,op:300,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,td:1,ao:0,ks:{a:{a:0,k:[3.002,-217.775,0],ix:1},s:{a:0,k:[100,100,100],ix:6},sk:{a:0,k:0},p:{a:0,k:[3.002,-217.775,0],ix:2},r:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:0},{s:[360],t:90}],ix:10},sa:{a:0,k:0},o:{a:0,k:100,ix:11}},ef:[],shapes:[{ty:"gr",bm:0,hd:!1,mn:"ADBE Vector Group",nm:"Ellipse 1",ix:1,cix:2,np:3,it:[{ty:"el",bm:0,hd:!1,mn:"ADBE Vector Shape - Ellipse",nm:"Ellipse Path 1",d:1,p:{a:0,k:[0,0],ix:3},s:{a:0,k:[239.598,239.598],ix:2}},{ty:"st",bm:0,hd:!1,mn:"ADBE Vector Graphic - Stroke",nm:"Stroke 1",lc:2,lj:1,ml:4,o:{a:0,k:100,ix:4},w:{a:0,k:28,ix:5},c:{a:0,k:[1,1,1],ix:3}},{ty:"tr",a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},sk:{a:0,k:0,ix:4},p:{a:0,k:[3.002,-217.775],ix:2},r:{a:0,k:0,ix:6},sa:{a:0,k:0,ix:5},o:{a:0,k:100,ix:7}}]},{ty:"tm",bm:0,hd:!1,mn:"ADBE Vector Filter - Trim",nm:"Trim Paths 1",ix:2,e:{a:1,k:[{o:{x:.333,y:0},i:{x:.667,y:1},s:[10],t:0},{s:[70],t:44.25}],ix:2},o:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:0},{s:[144],t:90}],ix:3},s:{a:1,k:[{o:{x:.333,y:0},i:{x:.667,y:1},s:[0],t:44.25},{s:[60],t:90}],ix:1},m:1}],ind:1,parent:2},{ty:4,nm:"color",sr:1,st:0,op:300,ip:0,hd:!1,ddd:0,bm:0,tt:1,hasMask:!1,ao:0,ks:{a:{a:0,k:[3.002,-217.775,0],ix:1},s:{a:0,k:[89.983,89.983,100],ix:6},sk:{a:0,k:0},p:{a:0,k:[123,123,0],ix:2},r:{a:0,k:360,ix:10},sa:{a:0,k:0},o:{a:0,k:100,ix:11}},ef:[],shapes:[{ty:"gr",bm:0,hd:!1,mn:"ADBE Vector Group",nm:"Ellipse 1",ix:1,cix:2,np:3,it:[{ty:"el",bm:0,hd:!1,mn:"ADBE Vector Shape - Ellipse",nm:"Ellipse Path 1",d:1,p:{a:0,k:[0,0],ix:3},s:{a:0,k:[239.598,239.598],ix:2}},{ty:"gs",bm:0,hd:!1,mn:"ADBE Vector Graphic - G-Stroke",nm:"Gradient Stroke 1",e:{a:0,k:[122.126,120.78],ix:5},g:{p:3,k:{a:0,k:[0,.12941176470588237,.12941176470588237,.12941176470588237,.5,.12941176470588237,.12941176470588237,.12941176470588237,1,.12941176470588237,.12941176470588237,.12941176470588237],ix:8}},t:1,a:{a:0,k:0},h:{a:0,k:0},s:{a:0,k:[-118.969,-118.703],ix:4},lc:2,lj:1,ml:4,o:{a:0,k:100,ix:9},w:{a:0,k:32,ix:10}},{ty:"tr",a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},sk:{a:0,k:0,ix:4},p:{a:0,k:[3.002,-217.775],ix:2},r:{a:0,k:0,ix:6},sa:{a:0,k:0,ix:5},o:{a:0,k:100,ix:7}}]},{ty:"tm",bm:0,hd:!1,mn:"ADBE Vector Filter - Trim",nm:"Trim Paths 1",ix:2,e:{a:0,k:100,ix:2},o:{a:0,k:0,ix:3},s:{a:0,k:0,ix:1},m:1}],ind:2}],s="5.5.7",x=[],e={nm:a,ddd:0,h:246,w:246,meta:i,layers:t,v:s,fr:60,op:90,ip:0,assets:x};exports.assets=x,exports.ddd=0,exports.default=e,exports.fr=60,exports.h=246,exports.ip=0,exports.layers=t,exports.meta=i,exports.nm=a,exports.op=90,exports.v=s,exports.w=246;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var a="loader for public",i={g:"LottieFiles AE 0.1.21"},t=[{ty:4,nm:"Shape Layer 1",sr:1,st:0,op:300,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,td:1,ao:0,ks:{a:{a:0,k:[3.002,-217.775,0],ix:1},s:{a:0,k:[100,100,100],ix:6},sk:{a:0,k:0},p:{a:0,k:[3.002,-217.775,0],ix:2},r:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:0},{s:[360],t:90}],ix:10},sa:{a:0,k:0},o:{a:0,k:100,ix:11}},ef:[],shapes:[{ty:"gr",bm:0,hd:!1,mn:"ADBE Vector Group",nm:"Ellipse 1",ix:1,cix:2,np:3,it:[{ty:"el",bm:0,hd:!1,mn:"ADBE Vector Shape - Ellipse",nm:"Ellipse Path 1",d:1,p:{a:0,k:[0,0],ix:3},s:{a:0,k:[239.598,239.598],ix:2}},{ty:"st",bm:0,hd:!1,mn:"ADBE Vector Graphic - Stroke",nm:"Stroke 1",lc:2,lj:1,ml:4,o:{a:0,k:100,ix:4},w:{a:0,k:28,ix:5},c:{a:0,k:[1,1,1],ix:3}},{ty:"tr",a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},sk:{a:0,k:0,ix:4},p:{a:0,k:[3.002,-217.775],ix:2},r:{a:0,k:0,ix:6},sa:{a:0,k:0,ix:5},o:{a:0,k:100,ix:7}}]},{ty:"tm",bm:0,hd:!1,mn:"ADBE Vector Filter - Trim",nm:"Trim Paths 1",ix:2,e:{a:1,k:[{o:{x:.333,y:0},i:{x:.667,y:1},s:[10],t:0},{s:[70],t:44.25}],ix:2},o:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:0},{s:[144],t:90}],ix:3},s:{a:1,k:[{o:{x:.333,y:0},i:{x:.667,y:1},s:[0],t:44.25},{s:[60],t:90}],ix:1},m:1}],ind:1,parent:2},{ty:4,nm:"color",sr:1,st:0,op:300,ip:0,hd:!1,ddd:0,bm:0,tt:1,hasMask:!1,ao:0,ks:{a:{a:0,k:[3.002,-217.775,0],ix:1},s:{a:0,k:[89.983,89.983,100],ix:6},sk:{a:0,k:0},p:{a:0,k:[123,123,0],ix:2},r:{a:0,k:360,ix:10},sa:{a:0,k:0},o:{a:0,k:100,ix:11}},ef:[],shapes:[{ty:"gr",bm:0,hd:!1,mn:"ADBE Vector Group",nm:"Ellipse 1",ix:1,cix:2,np:3,it:[{ty:"el",bm:0,hd:!1,mn:"ADBE Vector Shape - Ellipse",nm:"Ellipse Path 1",d:1,p:{a:0,k:[0,0],ix:3},s:{a:0,k:[239.598,239.598],ix:2}},{ty:"gs",bm:0,hd:!1,mn:"ADBE Vector Graphic - G-Stroke",nm:"Gradient Stroke 1",e:{a:0,k:[122.126,120.78],ix:5},g:{p:3,k:{a:0,k:[0,.45098039215686275,.11372549019607843,.8117647058823529,.5,.45098039215686275,.11372549019607843,.8117647058823529,1,.45098039215686275,.11372549019607843,.8117647058823529],ix:8}},t:1,a:{a:0,k:0},h:{a:0,k:0},s:{a:0,k:[-118.969,-118.703],ix:4},lc:2,lj:1,ml:4,o:{a:0,k:100,ix:9},w:{a:0,k:32,ix:10}},{ty:"tr",a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},sk:{a:0,k:0,ix:4},p:{a:0,k:[3.002,-217.775],ix:2},r:{a:0,k:0,ix:6},sa:{a:0,k:0,ix:5},o:{a:0,k:100,ix:7}}]},{ty:"tm",bm:0,hd:!1,mn:"ADBE Vector Filter - Trim",nm:"Trim Paths 1",ix:2,e:{a:0,k:100,ix:2},o:{a:0,k:0,ix:3},s:{a:0,k:0,ix:1},m:1}],ind:2}],s="5.5.7",x=[],e={nm:a,ddd:0,h:246,w:246,meta:i,layers:t,v:s,fr:60,op:90,ip:0,assets:x};exports.assets=x,exports.ddd=0,exports.default=e,exports.fr=60,exports.h=246,exports.ip=0,exports.layers=t,exports.meta=i,exports.nm=a,exports.op=90,exports.v=s,exports.w=246;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var a="loader for public",i={g:"LottieFiles AE 0.1.21"},t=[{ty:4,nm:"Shape Layer 1",sr:1,st:0,op:300,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,td:1,ao:0,ks:{a:{a:0,k:[3.002,-217.775,0],ix:1},s:{a:0,k:[100,100,100],ix:6},sk:{a:0,k:0},p:{a:0,k:[3.002,-217.775,0],ix:2},r:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:0},{s:[360],t:90}],ix:10},sa:{a:0,k:0},o:{a:0,k:100,ix:11}},ef:[],shapes:[{ty:"gr",bm:0,hd:!1,mn:"ADBE Vector Group",nm:"Ellipse 1",ix:1,cix:2,np:3,it:[{ty:"el",bm:0,hd:!1,mn:"ADBE Vector Shape - Ellipse",nm:"Ellipse Path 1",d:1,p:{a:0,k:[0,0],ix:3},s:{a:0,k:[239.598,239.598],ix:2}},{ty:"st",bm:0,hd:!1,mn:"ADBE Vector Graphic - Stroke",nm:"Stroke 1",lc:2,lj:1,ml:4,o:{a:0,k:100,ix:4},w:{a:0,k:28,ix:5},c:{a:0,k:[1,1,1],ix:3}},{ty:"tr",a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},sk:{a:0,k:0,ix:4},p:{a:0,k:[3.002,-217.775],ix:2},r:{a:0,k:0,ix:6},sa:{a:0,k:0,ix:5},o:{a:0,k:100,ix:7}}]},{ty:"tm",bm:0,hd:!1,mn:"ADBE Vector Filter - Trim",nm:"Trim Paths 1",ix:2,e:{a:1,k:[{o:{x:.333,y:0},i:{x:.667,y:1},s:[10],t:0},{s:[70],t:44.25}],ix:2},o:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:0},{s:[144],t:90}],ix:3},s:{a:1,k:[{o:{x:.333,y:0},i:{x:.667,y:1},s:[0],t:44.25},{s:[60],t:90}],ix:1},m:1}],ind:1,parent:2},{ty:4,nm:"color",sr:1,st:0,op:300,ip:0,hd:!1,ddd:0,bm:0,tt:1,hasMask:!1,ao:0,ks:{a:{a:0,k:[3.002,-217.775,0],ix:1},s:{a:0,k:[89.983,89.983,100],ix:6},sk:{a:0,k:0},p:{a:0,k:[123,123,0],ix:2},r:{a:0,k:360,ix:10},sa:{a:0,k:0},o:{a:0,k:100,ix:11}},ef:[],shapes:[{ty:"gr",bm:0,hd:!1,mn:"ADBE Vector Group",nm:"Ellipse 1",ix:1,cix:2,np:3,it:[{ty:"el",bm:0,hd:!1,mn:"ADBE Vector Shape - Ellipse",nm:"Ellipse Path 1",d:1,p:{a:0,k:[0,0],ix:3},s:{a:0,k:[239.598,239.598],ix:2}},{ty:"gs",bm:0,hd:!1,mn:"ADBE Vector Graphic - G-Stroke",nm:"Gradient Stroke 1",e:{a:0,k:[122.126,120.78],ix:5},g:{p:3,k:{a:0,k:[0,.7254901960784313,.13725490196078433,.12941176470588237,.5,.7254901960784313,.13725490196078433,.12941176470588237,1,.7254901960784313,.13725490196078433,.12941176470588237],ix:8}},t:1,a:{a:0,k:0},h:{a:0,k:0},s:{a:0,k:[-118.969,-118.703],ix:4},lc:2,lj:1,ml:4,o:{a:0,k:100,ix:9},w:{a:0,k:32,ix:10}},{ty:"tr",a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},sk:{a:0,k:0,ix:4},p:{a:0,k:[3.002,-217.775],ix:2},r:{a:0,k:0,ix:6},sa:{a:0,k:0,ix:5},o:{a:0,k:100,ix:7}}]},{ty:"tm",bm:0,hd:!1,mn:"ADBE Vector Filter - Trim",nm:"Trim Paths 1",ix:2,e:{a:0,k:100,ix:2},o:{a:0,k:0,ix:3},s:{a:0,k:0,ix:1},m:1}],ind:2}],s="5.5.7",x=[],e={nm:a,ddd:0,h:246,w:246,meta:i,layers:t,v:s,fr:60,op:90,ip:0,assets:x};exports.assets=x,exports.ddd=0,exports.default=e,exports.fr=60,exports.h=246,exports.ip=0,exports.layers=t,exports.meta=i,exports.nm=a,exports.op=90,exports.v=s,exports.w=246;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var a="loader for public",i={g:"LottieFiles AE 0.1.21"},t=[{ty:4,nm:"Shape Layer 1",sr:1,st:0,op:300,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,td:1,ao:0,ks:{a:{a:0,k:[3.002,-217.775,0],ix:1},s:{a:0,k:[100,100,100],ix:6},sk:{a:0,k:0},p:{a:0,k:[3.002,-217.775,0],ix:2},r:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:0},{s:[360],t:90}],ix:10},sa:{a:0,k:0},o:{a:0,k:100,ix:11}},ef:[],shapes:[{ty:"gr",bm:0,hd:!1,mn:"ADBE Vector Group",nm:"Ellipse 1",ix:1,cix:2,np:3,it:[{ty:"el",bm:0,hd:!1,mn:"ADBE Vector Shape - Ellipse",nm:"Ellipse Path 1",d:1,p:{a:0,k:[0,0],ix:3},s:{a:0,k:[239.598,239.598],ix:2}},{ty:"st",bm:0,hd:!1,mn:"ADBE Vector Graphic - Stroke",nm:"Stroke 1",lc:2,lj:1,ml:4,o:{a:0,k:100,ix:4},w:{a:0,k:28,ix:5},c:{a:0,k:[1,1,1],ix:3}},{ty:"tr",a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},sk:{a:0,k:0,ix:4},p:{a:0,k:[3.002,-217.775],ix:2},r:{a:0,k:0,ix:6},sa:{a:0,k:0,ix:5},o:{a:0,k:100,ix:7}}]},{ty:"tm",bm:0,hd:!1,mn:"ADBE Vector Filter - Trim",nm:"Trim Paths 1",ix:2,e:{a:1,k:[{o:{x:.333,y:0},i:{x:.667,y:1},s:[10],t:0},{s:[70],t:44.25}],ix:2},o:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:0},{s:[144],t:90}],ix:3},s:{a:1,k:[{o:{x:.333,y:0},i:{x:.667,y:1},s:[0],t:44.25},{s:[60],t:90}],ix:1},m:1}],ind:1,parent:2},{ty:4,nm:"color",sr:1,st:0,op:300,ip:0,hd:!1,ddd:0,bm:0,tt:1,hasMask:!1,ao:0,ks:{a:{a:0,k:[3.002,-217.775,0],ix:1},s:{a:0,k:[89.983,89.983,100],ix:6},sk:{a:0,k:0},p:{a:0,k:[123,123,0],ix:2},r:{a:0,k:360,ix:10},sa:{a:0,k:0},o:{a:0,k:100,ix:11}},ef:[],shapes:[{ty:"gr",bm:0,hd:!1,mn:"ADBE Vector Group",nm:"Ellipse 1",ix:1,cix:2,np:3,it:[{ty:"el",bm:0,hd:!1,mn:"ADBE Vector Shape - Ellipse",nm:"Ellipse Path 1",d:1,p:{a:0,k:[0,0],ix:3},s:{a:0,k:[239.598,239.598],ix:2}},{ty:"gs",bm:0,hd:!1,mn:"ADBE Vector Graphic - G-Stroke",nm:"Gradient Stroke 1",e:{a:0,k:[122.126,120.78],ix:5},g:{p:3,k:{a:0,k:[0,1,1,1,.5,1,1,1,1,1,1,1],ix:8}},t:1,a:{a:0,k:0},h:{a:0,k:0},s:{a:0,k:[-118.969,-118.703],ix:4},lc:2,lj:1,ml:4,o:{a:0,k:100,ix:9},w:{a:0,k:32,ix:10}},{ty:"tr",a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},sk:{a:0,k:0,ix:4},p:{a:0,k:[3.002,-217.775],ix:2},r:{a:0,k:0,ix:6},sa:{a:0,k:0,ix:5},o:{a:0,k:100,ix:7}}]},{ty:"tm",bm:0,hd:!1,mn:"ADBE Vector Filter - Trim",nm:"Trim Paths 1",ix:2,e:{a:0,k:100,ix:2},o:{a:0,k:0,ix:3},s:{a:0,k:0,ix:1},m:1}],ind:2}],s="5.5.7",x=[],e={nm:a,ddd:0,h:246,w:246,meta:i,layers:t,v:s,fr:60,op:90,ip:0,assets:x};exports.assets=x,exports.ddd=0,exports.default=e,exports.fr=60,exports.h=246,exports.ip=0,exports.layers=t,exports.meta=i,exports.nm=a,exports.op=90,exports.v=s,exports.w=246;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.SizeMap={small:16,large:40};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryBuilderNodeProps } from "../../../
|
|
2
|
+
import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
|
|
3
3
|
declare const EventsTrigger: React.FC<QueryBuilderNodeProps>;
|
|
4
4
|
export default EventsTrigger;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { QueryBuilderAPIData } from "../../../
|
|
1
|
+
import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
|
|
2
2
|
export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryBuilderNodeProps } from "../../../
|
|
2
|
+
import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
|
|
3
3
|
declare const IGTrigger: React.FC<QueryBuilderNodeProps>;
|
|
4
4
|
export default IGTrigger;
|
package/dist/esm/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { QueryBuilderAPIData } from "../../../
|
|
1
|
+
import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
|
|
2
2
|
export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
|
package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DropdownOption } from "../../../dropdown/type";
|
|
3
|
-
import { QueryBuilderProperty } from "../../
|
|
4
|
-
import { QueryBuilderNodeProps } from "../../
|
|
3
|
+
import { QueryBuilderProperty } from "../../types/QueryBuilder.type";
|
|
4
|
+
import { QueryBuilderNodeProps } from "../../types/QueryBuilderNodeProps.type";
|
|
5
5
|
declare const BaseTriggerQueryBuilderNode: React.FC<QueryBuilderNodeProps & {
|
|
6
6
|
cacheKey: string;
|
|
7
7
|
propertyAddBtnText: string;
|
|
@@ -22,6 +22,7 @@ import { BIKChatbotProps, SystemConfig } from '../types';
|
|
|
22
22
|
* @prop width - Width of the chatbot container (default: undefined, will use maxWidth constraint)
|
|
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
|
+
* @prop useCase - Optional use case identifier for the chatbot
|
|
25
26
|
*/
|
|
26
27
|
export interface BIKChatbotWithStyleProps extends BIKChatbotProps {
|
|
27
28
|
width?: string | number;
|
|
@@ -31,6 +32,7 @@ export interface BIKChatbotWithStyleProps extends BIKChatbotProps {
|
|
|
31
32
|
chatWindowHeight?: string | number;
|
|
32
33
|
tools?: string[];
|
|
33
34
|
onSystemReady?: (system: SystemConfig) => void;
|
|
35
|
+
useCase?: string;
|
|
34
36
|
}
|
|
35
37
|
export declare const BIKChatbot: FC<BIKChatbotWithStyleProps>;
|
|
36
38
|
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
|
|
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:a,systemId:r,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}=o;if(!a)throw new Error("systemPrompt is required for generic mode.");const D=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:D},{children:e(t,Object.assign({systemPrompt:a,systemId:r,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},{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
|
|
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:y,onMessageReceived:I,displayInUI:h,maxToolCalls:C,maxTokens:x,requestExecutor:A,baseUrl:P,endpointPath:b,responseFormat:w,conversationId:j="default-session",customModel:q,onSystemReady:E,useCase:R}=i;const[M,T]=o(null),[U,F]=o(!0),[k,L]=o(null),$=t(null);n((()=>p?A&&P?void L(null):(L("Chatbot authentication not configured: RequestExecutor and baseUrl are required"),void F(!1)):(L("systemPrompt is required for generic mode"),void F(!1))),[p,A,P]);const H=r((()=>e(void 0,void 0,void 0,(function*(){try{F(!0),L(null);const e=q||u;if(!c.includes(e))throw new Error(`Unsupported model: ${q||"default"}. Allowed models are: ${c.join(", ")}`);T({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";L(s)}finally{F(!1)}}))),[q,p,f,v]);n((()=>{p&&H()}),[H]),n((()=>{M&&E&&M.id!==$.current&&($.current=M.id,E(M)),M||($.current=null)}),[M]);const{messages:_,conversation:z,sendMessage:G,isApiCallInProgress:O}=d({system:M||{id:"loading",name:"Loading...",model:u,systemPrompt:"Loading...",functions:[]},conversationId:j,skipInitialization:!M,customFunctions:v,functionHandler:y,responseFormat:w,onMessageReceived:I,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}),S={isReady:!!M&&!U,isLoading:U,isApiCallInProgress:O,system:M,messages:_,conversation:z,sendMessage:G,error:k};return s(m.Provider,Object.assign({value:S},{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 n{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}),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.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",n=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)}))),o=[{role:"system",text:this.makeSystemMessage().content},...t];return this.generateWithRecursiveToolCalls(o,s,a,n)}))}generateWithRecursiveToolCalls(e,s,i,n){var o,r,l,c,d,h,p,
|
|
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 n{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}),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.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",n=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)}))),o=[{role:"system",text:this.makeSystemMessage().content},...t];return this.generateWithRecursiveToolCalls(o,s,a,n)}))}generateWithRecursiveToolCalls(e,s,i,n){var o,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=n,v=0;for(;v<this.maxToolCalls;){let e;v++;try{if(f)e=f,f=void 0;else{let n;if(1===v&&g){const e=[...t].reverse().find((e=>"user"===e.role));e&&(n=[{role:"user",content:e.text}])}e=yield a(t,i,s,this.system.id,this.apiAdapter,g,this.system.functions,this.system.model,n,this.system.tools,this.maxTokens,this.useCase)}}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!==(o=e.parsed)&&void 0!==o?o: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:n,args:b,toolCallId:I,callId:x}=e.toolCall;I&&t.push({role:"assistant",text:"",toolCallId:I,toolName:n,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:n,args:e}});const o=yield this.functionHandler(n,e);if(I?t.push({role:"tool",text:JSON.stringify(o),toolCallId:I}):t.push({role:"tool",text:JSON.stringify(o)}),x){const e="object"==typeof o&&null!==o?o:String(o),r=this.sanitizeToolOutput(n,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:n,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);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{n 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): 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): Promise<GenericAIResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t}from"../../../_virtual/_tslib.js";import{DEFAULT_MODEL as
|
|
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,c={input:l,tools:[...(p||[]).map((t=>({type:t}))),...(v=u,v&&0!==v.length?v.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};var v;const h=`${o.replace(/\/$/,"")}${n}`,{status:m,data:g,error:f}=yield e.sendData({apiPath:h,apiMethod:"POST",requestBody:c});if(200!==m||!(null==g?void 0:g.success)){const e=(null===(i=null===(t=null==g?void 0:g.errors)||void 0===t?void 0:t[0])||void 0===i?void 0:i.message)||f;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}(g.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;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};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, }: Omit<UseAIChatProps, 'updateUI'>): {
|
|
2
|
+
export declare function useAIChat({ system, conversationId, skipInitialization, customFunctions, functionHandler, responseFormat, onMessageReceived, displayInUI, maxToolCalls, maxTokens, apiAdapter, useCase, }: 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:
|
|
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[y,h]=e((()=>n(m))),[C,D]=e([]),[R,A]=e(),[k,x]=e(!1);t((()=>{i(m).then((s=>{var e;s&&(h(s),D(s.messages),A(null===(e=s.metadata)||void 0===e?void 0:e.lastResponseId))}))}),[m]);const F=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=>{D((e=>[...e,s])),h((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:R})})),t}))},customFunctions:p,functionHandler:u,responseFormat:b,onMessageReceived:j,displayInUI:O,maxToolCalls:I,maxTokens:v,apiAdapter:f,useCase:w})),[l.id,g,v]);return{messages:C,conversation:y,sendMessage:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";return s(d,void 0,void 0,(function*(){if(!F)return;const s={id:`u-${Date.now()}`,role:"user",content:e,timestamp:Date.now()};D((e=>[...e,s])),h((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:R})})),t})),x(!0);try{const e=yield F.generate([...C,s].map((s=>({role:s.role,content:s.content}))),m,t,R);(null==e?void 0:e.responseId)&&(A(e.responseId),h((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()};D((s=>[...s,t])),h((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:R})})),e}))}finally{x(!1)}}))},isApiCallInProgress:k}}export{r as useAIChat};
|
|
@@ -111,6 +111,8 @@ export interface BackendApiRequest {
|
|
|
111
111
|
model: string;
|
|
112
112
|
max_output_tokens: number;
|
|
113
113
|
previous_response_id?: string;
|
|
114
|
+
output_parser?: string;
|
|
115
|
+
use_case?: string;
|
|
114
116
|
}
|
|
115
117
|
export interface BackendApiResponse {
|
|
116
118
|
status: number;
|
|
@@ -155,4 +157,5 @@ export type CallToChatbotRequest = {
|
|
|
155
157
|
builtinTools?: string[];
|
|
156
158
|
model: string;
|
|
157
159
|
maxTokens?: number;
|
|
160
|
+
useCase?: string;
|
|
158
161
|
};
|
|
@@ -91,6 +91,7 @@ export interface AIProviderProps {
|
|
|
91
91
|
onUIUpdate?: (signal: unknown) => void;
|
|
92
92
|
customModel?: string;
|
|
93
93
|
onSystemReady?: (system: SystemConfig) => void;
|
|
94
|
+
useCase?: string;
|
|
94
95
|
}
|
|
95
96
|
export interface AIContextState {
|
|
96
97
|
isReady: boolean;
|
|
@@ -115,6 +116,7 @@ export interface UseAIChatProps {
|
|
|
115
116
|
maxTokens?: number;
|
|
116
117
|
apiAdapter: APIAdapter;
|
|
117
118
|
responseFormat?: ResponseFormat;
|
|
119
|
+
useCase?: string;
|
|
118
120
|
}
|
|
119
121
|
export interface AIServiceConstructorProps {
|
|
120
122
|
system: SystemConfig;
|
|
@@ -127,4 +129,5 @@ export interface AIServiceConstructorProps {
|
|
|
127
129
|
maxTokens?: number;
|
|
128
130
|
apiAdapter: APIAdapter;
|
|
129
131
|
responseFormat?: 'text' | 'json';
|
|
132
|
+
useCase?: string;
|
|
130
133
|
}
|
|
@@ -6,7 +6,6 @@ export declare const Spinner: {
|
|
|
6
6
|
export declare const PureSpinner: import("styled-components").StyledComponent<"div", any, {
|
|
7
7
|
width: string;
|
|
8
8
|
height: string;
|
|
9
|
-
size?: "small" | "large" | undefined;
|
|
10
9
|
color?: string | undefined;
|
|
11
10
|
backgroundColor?: string | undefined;
|
|
12
11
|
}, never>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import{jsx as
|
|
2
|
-
width: ${
|
|
3
|
-
height: ${
|
|
4
|
-
border: ${
|
|
5
|
-
|
|
6
|
-
border-bottom-color: ${r=>{var o;return null!==(o=r.color)&&void 0!==o?o:t.stroke.brand}};
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import o from"react-lottie";import r from"styled-components";import{COLORS as e}from"../../constants/Theme.js";import*as i from"./lotties/black.json.js";import*as n from"./lotties/brand.json.js";import*as s from"./lotties/red.json.js";import*as a from"./lotties/white.json.js";import{SizeMap as m}from"./themes.js";const l={[e.stroke.brand]:n,[e.content.primary]:i,[e.content.primaryInverse]:a,[e.content.negative]:s},d=r=>{let{size:i,color:n,className:s}=r;const a={loop:!0,autoplay:!0,animationData:l[null!=n?n:e.stroke.brand],rendererSettings:{preserveAspectRatio:"xMidYMid slice"}};return t("div",Object.assign({className:`spinner-container ${s}`},{children:t(o,{options:a,width:m[i],isStopped:!1,isPaused:!1})}))};d.displayName="Spinner";const p=r.div`
|
|
2
|
+
width: ${t=>t.width};
|
|
3
|
+
height: ${t=>t.height};
|
|
4
|
+
border: 5px solid ${t=>{var o;return null!==(o=t.backgroundColor)&&void 0!==o?o:"transparent"}};
|
|
5
|
+
border-bottom-color: ${t=>{var o;return null!==(o=t.color)&&void 0!==o?o:e.stroke.brand}};
|
|
7
6
|
border-radius: 50%;
|
|
8
7
|
display: inline-block;
|
|
9
8
|
animation: rotation 1s linear infinite;
|
|
@@ -16,4 +15,4 @@ import{jsx as r}from"react/jsx-runtime";import o from"styled-components";import{
|
|
|
16
15
|
transform: rotate(360deg);
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
|
-
`;export{
|
|
18
|
+
`;export{p as PureSpinner,d as Spinner};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a="loader for public",i=0,k=246,t=246,x={g:"LottieFiles AE 0.1.21"},s=[{ty:4,nm:"Shape Layer 1",sr:1,st:0,op:300,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,td:1,ao:0,ks:{a:{a:0,k:[3.002,-217.775,0],ix:1},s:{a:0,k:[100,100,100],ix:6},sk:{a:0,k:0},p:{a:0,k:[3.002,-217.775,0],ix:2},r:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:0},{s:[360],t:90}],ix:10},sa:{a:0,k:0},o:{a:0,k:100,ix:11}},ef:[],shapes:[{ty:"gr",bm:0,hd:!1,mn:"ADBE Vector Group",nm:"Ellipse 1",ix:1,cix:2,np:3,it:[{ty:"el",bm:0,hd:!1,mn:"ADBE Vector Shape - Ellipse",nm:"Ellipse Path 1",d:1,p:{a:0,k:[0,0],ix:3},s:{a:0,k:[239.598,239.598],ix:2}},{ty:"st",bm:0,hd:!1,mn:"ADBE Vector Graphic - Stroke",nm:"Stroke 1",lc:2,lj:1,ml:4,o:{a:0,k:100,ix:4},w:{a:0,k:28,ix:5},c:{a:0,k:[1,1,1],ix:3}},{ty:"tr",a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},sk:{a:0,k:0,ix:4},p:{a:0,k:[3.002,-217.775],ix:2},r:{a:0,k:0,ix:6},sa:{a:0,k:0,ix:5},o:{a:0,k:100,ix:7}}]},{ty:"tm",bm:0,hd:!1,mn:"ADBE Vector Filter - Trim",nm:"Trim Paths 1",ix:2,e:{a:1,k:[{o:{x:.333,y:0},i:{x:.667,y:1},s:[10],t:0},{s:[70],t:44.25}],ix:2},o:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:0},{s:[144],t:90}],ix:3},s:{a:1,k:[{o:{x:.333,y:0},i:{x:.667,y:1},s:[0],t:44.25},{s:[60],t:90}],ix:1},m:1}],ind:1,parent:2},{ty:4,nm:"color",sr:1,st:0,op:300,ip:0,hd:!1,ddd:0,bm:0,tt:1,hasMask:!1,ao:0,ks:{a:{a:0,k:[3.002,-217.775,0],ix:1},s:{a:0,k:[89.983,89.983,100],ix:6},sk:{a:0,k:0},p:{a:0,k:[123,123,0],ix:2},r:{a:0,k:360,ix:10},sa:{a:0,k:0},o:{a:0,k:100,ix:11}},ef:[],shapes:[{ty:"gr",bm:0,hd:!1,mn:"ADBE Vector Group",nm:"Ellipse 1",ix:1,cix:2,np:3,it:[{ty:"el",bm:0,hd:!1,mn:"ADBE Vector Shape - Ellipse",nm:"Ellipse Path 1",d:1,p:{a:0,k:[0,0],ix:3},s:{a:0,k:[239.598,239.598],ix:2}},{ty:"gs",bm:0,hd:!1,mn:"ADBE Vector Graphic - G-Stroke",nm:"Gradient Stroke 1",e:{a:0,k:[122.126,120.78],ix:5},g:{p:3,k:{a:0,k:[0,.12941176470588237,.12941176470588237,.12941176470588237,.5,.12941176470588237,.12941176470588237,.12941176470588237,1,.12941176470588237,.12941176470588237,.12941176470588237],ix:8}},t:1,a:{a:0,k:0},h:{a:0,k:0},s:{a:0,k:[-118.969,-118.703],ix:4},lc:2,lj:1,ml:4,o:{a:0,k:100,ix:9},w:{a:0,k:32,ix:10}},{ty:"tr",a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},sk:{a:0,k:0,ix:4},p:{a:0,k:[3.002,-217.775],ix:2},r:{a:0,k:0,ix:6},sa:{a:0,k:0,ix:5},o:{a:0,k:100,ix:7}}]},{ty:"tm",bm:0,hd:!1,mn:"ADBE Vector Filter - Trim",nm:"Trim Paths 1",ix:2,e:{a:0,k:100,ix:2},o:{a:0,k:0,ix:3},s:{a:0,k:0,ix:1},m:1}],ind:2}],e="5.5.7",r=60,m=90,o=0,p=[],l={nm:a,ddd:0,h:246,w:246,meta:x,layers:s,v:e,fr:60,op:90,ip:0,assets:p};export{p as assets,i as ddd,l as default,r as fr,k as h,o as ip,s as layers,x as meta,a as nm,m as op,e as v,t as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a="loader for public",i=0,k=246,t=246,x={g:"LottieFiles AE 0.1.21"},s=[{ty:4,nm:"Shape Layer 1",sr:1,st:0,op:300,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,td:1,ao:0,ks:{a:{a:0,k:[3.002,-217.775,0],ix:1},s:{a:0,k:[100,100,100],ix:6},sk:{a:0,k:0},p:{a:0,k:[3.002,-217.775,0],ix:2},r:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:0},{s:[360],t:90}],ix:10},sa:{a:0,k:0},o:{a:0,k:100,ix:11}},ef:[],shapes:[{ty:"gr",bm:0,hd:!1,mn:"ADBE Vector Group",nm:"Ellipse 1",ix:1,cix:2,np:3,it:[{ty:"el",bm:0,hd:!1,mn:"ADBE Vector Shape - Ellipse",nm:"Ellipse Path 1",d:1,p:{a:0,k:[0,0],ix:3},s:{a:0,k:[239.598,239.598],ix:2}},{ty:"st",bm:0,hd:!1,mn:"ADBE Vector Graphic - Stroke",nm:"Stroke 1",lc:2,lj:1,ml:4,o:{a:0,k:100,ix:4},w:{a:0,k:28,ix:5},c:{a:0,k:[1,1,1],ix:3}},{ty:"tr",a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},sk:{a:0,k:0,ix:4},p:{a:0,k:[3.002,-217.775],ix:2},r:{a:0,k:0,ix:6},sa:{a:0,k:0,ix:5},o:{a:0,k:100,ix:7}}]},{ty:"tm",bm:0,hd:!1,mn:"ADBE Vector Filter - Trim",nm:"Trim Paths 1",ix:2,e:{a:1,k:[{o:{x:.333,y:0},i:{x:.667,y:1},s:[10],t:0},{s:[70],t:44.25}],ix:2},o:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:0},{s:[144],t:90}],ix:3},s:{a:1,k:[{o:{x:.333,y:0},i:{x:.667,y:1},s:[0],t:44.25},{s:[60],t:90}],ix:1},m:1}],ind:1,parent:2},{ty:4,nm:"color",sr:1,st:0,op:300,ip:0,hd:!1,ddd:0,bm:0,tt:1,hasMask:!1,ao:0,ks:{a:{a:0,k:[3.002,-217.775,0],ix:1},s:{a:0,k:[89.983,89.983,100],ix:6},sk:{a:0,k:0},p:{a:0,k:[123,123,0],ix:2},r:{a:0,k:360,ix:10},sa:{a:0,k:0},o:{a:0,k:100,ix:11}},ef:[],shapes:[{ty:"gr",bm:0,hd:!1,mn:"ADBE Vector Group",nm:"Ellipse 1",ix:1,cix:2,np:3,it:[{ty:"el",bm:0,hd:!1,mn:"ADBE Vector Shape - Ellipse",nm:"Ellipse Path 1",d:1,p:{a:0,k:[0,0],ix:3},s:{a:0,k:[239.598,239.598],ix:2}},{ty:"gs",bm:0,hd:!1,mn:"ADBE Vector Graphic - G-Stroke",nm:"Gradient Stroke 1",e:{a:0,k:[122.126,120.78],ix:5},g:{p:3,k:{a:0,k:[0,.45098039215686275,.11372549019607843,.8117647058823529,.5,.45098039215686275,.11372549019607843,.8117647058823529,1,.45098039215686275,.11372549019607843,.8117647058823529],ix:8}},t:1,a:{a:0,k:0},h:{a:0,k:0},s:{a:0,k:[-118.969,-118.703],ix:4},lc:2,lj:1,ml:4,o:{a:0,k:100,ix:9},w:{a:0,k:32,ix:10}},{ty:"tr",a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},sk:{a:0,k:0,ix:4},p:{a:0,k:[3.002,-217.775],ix:2},r:{a:0,k:0,ix:6},sa:{a:0,k:0,ix:5},o:{a:0,k:100,ix:7}}]},{ty:"tm",bm:0,hd:!1,mn:"ADBE Vector Filter - Trim",nm:"Trim Paths 1",ix:2,e:{a:0,k:100,ix:2},o:{a:0,k:0,ix:3},s:{a:0,k:0,ix:1},m:1}],ind:2}],e="5.5.7",r=60,m=90,o=0,p=[],l={nm:a,ddd:0,h:246,w:246,meta:x,layers:s,v:e,fr:60,op:90,ip:0,assets:p};export{p as assets,i as ddd,l as default,r as fr,k as h,o as ip,s as layers,x as meta,a as nm,m as op,e as v,t as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a="loader for public",i=0,k=246,t=246,x={g:"LottieFiles AE 0.1.21"},s=[{ty:4,nm:"Shape Layer 1",sr:1,st:0,op:300,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,td:1,ao:0,ks:{a:{a:0,k:[3.002,-217.775,0],ix:1},s:{a:0,k:[100,100,100],ix:6},sk:{a:0,k:0},p:{a:0,k:[3.002,-217.775,0],ix:2},r:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:0},{s:[360],t:90}],ix:10},sa:{a:0,k:0},o:{a:0,k:100,ix:11}},ef:[],shapes:[{ty:"gr",bm:0,hd:!1,mn:"ADBE Vector Group",nm:"Ellipse 1",ix:1,cix:2,np:3,it:[{ty:"el",bm:0,hd:!1,mn:"ADBE Vector Shape - Ellipse",nm:"Ellipse Path 1",d:1,p:{a:0,k:[0,0],ix:3},s:{a:0,k:[239.598,239.598],ix:2}},{ty:"st",bm:0,hd:!1,mn:"ADBE Vector Graphic - Stroke",nm:"Stroke 1",lc:2,lj:1,ml:4,o:{a:0,k:100,ix:4},w:{a:0,k:28,ix:5},c:{a:0,k:[1,1,1],ix:3}},{ty:"tr",a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},sk:{a:0,k:0,ix:4},p:{a:0,k:[3.002,-217.775],ix:2},r:{a:0,k:0,ix:6},sa:{a:0,k:0,ix:5},o:{a:0,k:100,ix:7}}]},{ty:"tm",bm:0,hd:!1,mn:"ADBE Vector Filter - Trim",nm:"Trim Paths 1",ix:2,e:{a:1,k:[{o:{x:.333,y:0},i:{x:.667,y:1},s:[10],t:0},{s:[70],t:44.25}],ix:2},o:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:0},{s:[144],t:90}],ix:3},s:{a:1,k:[{o:{x:.333,y:0},i:{x:.667,y:1},s:[0],t:44.25},{s:[60],t:90}],ix:1},m:1}],ind:1,parent:2},{ty:4,nm:"color",sr:1,st:0,op:300,ip:0,hd:!1,ddd:0,bm:0,tt:1,hasMask:!1,ao:0,ks:{a:{a:0,k:[3.002,-217.775,0],ix:1},s:{a:0,k:[89.983,89.983,100],ix:6},sk:{a:0,k:0},p:{a:0,k:[123,123,0],ix:2},r:{a:0,k:360,ix:10},sa:{a:0,k:0},o:{a:0,k:100,ix:11}},ef:[],shapes:[{ty:"gr",bm:0,hd:!1,mn:"ADBE Vector Group",nm:"Ellipse 1",ix:1,cix:2,np:3,it:[{ty:"el",bm:0,hd:!1,mn:"ADBE Vector Shape - Ellipse",nm:"Ellipse Path 1",d:1,p:{a:0,k:[0,0],ix:3},s:{a:0,k:[239.598,239.598],ix:2}},{ty:"gs",bm:0,hd:!1,mn:"ADBE Vector Graphic - G-Stroke",nm:"Gradient Stroke 1",e:{a:0,k:[122.126,120.78],ix:5},g:{p:3,k:{a:0,k:[0,.7254901960784313,.13725490196078433,.12941176470588237,.5,.7254901960784313,.13725490196078433,.12941176470588237,1,.7254901960784313,.13725490196078433,.12941176470588237],ix:8}},t:1,a:{a:0,k:0},h:{a:0,k:0},s:{a:0,k:[-118.969,-118.703],ix:4},lc:2,lj:1,ml:4,o:{a:0,k:100,ix:9},w:{a:0,k:32,ix:10}},{ty:"tr",a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},sk:{a:0,k:0,ix:4},p:{a:0,k:[3.002,-217.775],ix:2},r:{a:0,k:0,ix:6},sa:{a:0,k:0,ix:5},o:{a:0,k:100,ix:7}}]},{ty:"tm",bm:0,hd:!1,mn:"ADBE Vector Filter - Trim",nm:"Trim Paths 1",ix:2,e:{a:0,k:100,ix:2},o:{a:0,k:0,ix:3},s:{a:0,k:0,ix:1},m:1}],ind:2}],e="5.5.7",r=60,m=90,o=0,p=[],l={nm:a,ddd:0,h:246,w:246,meta:x,layers:s,v:e,fr:60,op:90,ip:0,assets:p};export{p as assets,i as ddd,l as default,r as fr,k as h,o as ip,s as layers,x as meta,a as nm,m as op,e as v,t as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a="loader for public",i=0,k=246,t=246,x={g:"LottieFiles AE 0.1.21"},s=[{ty:4,nm:"Shape Layer 1",sr:1,st:0,op:300,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,td:1,ao:0,ks:{a:{a:0,k:[3.002,-217.775,0],ix:1},s:{a:0,k:[100,100,100],ix:6},sk:{a:0,k:0},p:{a:0,k:[3.002,-217.775,0],ix:2},r:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:0},{s:[360],t:90}],ix:10},sa:{a:0,k:0},o:{a:0,k:100,ix:11}},ef:[],shapes:[{ty:"gr",bm:0,hd:!1,mn:"ADBE Vector Group",nm:"Ellipse 1",ix:1,cix:2,np:3,it:[{ty:"el",bm:0,hd:!1,mn:"ADBE Vector Shape - Ellipse",nm:"Ellipse Path 1",d:1,p:{a:0,k:[0,0],ix:3},s:{a:0,k:[239.598,239.598],ix:2}},{ty:"st",bm:0,hd:!1,mn:"ADBE Vector Graphic - Stroke",nm:"Stroke 1",lc:2,lj:1,ml:4,o:{a:0,k:100,ix:4},w:{a:0,k:28,ix:5},c:{a:0,k:[1,1,1],ix:3}},{ty:"tr",a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},sk:{a:0,k:0,ix:4},p:{a:0,k:[3.002,-217.775],ix:2},r:{a:0,k:0,ix:6},sa:{a:0,k:0,ix:5},o:{a:0,k:100,ix:7}}]},{ty:"tm",bm:0,hd:!1,mn:"ADBE Vector Filter - Trim",nm:"Trim Paths 1",ix:2,e:{a:1,k:[{o:{x:.333,y:0},i:{x:.667,y:1},s:[10],t:0},{s:[70],t:44.25}],ix:2},o:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0],t:0},{s:[144],t:90}],ix:3},s:{a:1,k:[{o:{x:.333,y:0},i:{x:.667,y:1},s:[0],t:44.25},{s:[60],t:90}],ix:1},m:1}],ind:1,parent:2},{ty:4,nm:"color",sr:1,st:0,op:300,ip:0,hd:!1,ddd:0,bm:0,tt:1,hasMask:!1,ao:0,ks:{a:{a:0,k:[3.002,-217.775,0],ix:1},s:{a:0,k:[89.983,89.983,100],ix:6},sk:{a:0,k:0},p:{a:0,k:[123,123,0],ix:2},r:{a:0,k:360,ix:10},sa:{a:0,k:0},o:{a:0,k:100,ix:11}},ef:[],shapes:[{ty:"gr",bm:0,hd:!1,mn:"ADBE Vector Group",nm:"Ellipse 1",ix:1,cix:2,np:3,it:[{ty:"el",bm:0,hd:!1,mn:"ADBE Vector Shape - Ellipse",nm:"Ellipse Path 1",d:1,p:{a:0,k:[0,0],ix:3},s:{a:0,k:[239.598,239.598],ix:2}},{ty:"gs",bm:0,hd:!1,mn:"ADBE Vector Graphic - G-Stroke",nm:"Gradient Stroke 1",e:{a:0,k:[122.126,120.78],ix:5},g:{p:3,k:{a:0,k:[0,1,1,1,.5,1,1,1,1,1,1,1],ix:8}},t:1,a:{a:0,k:0},h:{a:0,k:0},s:{a:0,k:[-118.969,-118.703],ix:4},lc:2,lj:1,ml:4,o:{a:0,k:100,ix:9},w:{a:0,k:32,ix:10}},{ty:"tr",a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},sk:{a:0,k:0,ix:4},p:{a:0,k:[3.002,-217.775],ix:2},r:{a:0,k:0,ix:6},sa:{a:0,k:0,ix:5},o:{a:0,k:100,ix:7}}]},{ty:"tm",bm:0,hd:!1,mn:"ADBE Vector Filter - Trim",nm:"Trim Paths 1",ix:2,e:{a:0,k:100,ix:2},o:{a:0,k:0,ix:3},s:{a:0,k:0,ix:1},m:1}],ind:2}],e="5.5.7",r=60,m=90,o=0,p=[],l={nm:a,ddd:0,h:246,w:246,meta:x,layers:s,v:e,fr:60,op:90,ip:0,assets:p};export{p as assets,i as ddd,l as default,r as fr,k as h,o as ip,s as layers,x as meta,a as nm,m as op,e as v,t as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const l={small:16,large:40}
|
|
1
|
+
const l={small:16,large:40};export{l as SizeMap};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bikdotai/bik-component-library",
|
|
3
|
-
"version": "0.0.736
|
|
3
|
+
"version": "0.0.736",
|
|
4
4
|
"description": "Bik Component Library",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"react-easy-crop": "^4.7.4",
|
|
70
70
|
"react-image-crop": "^10.0.9",
|
|
71
71
|
"react-joyride": "^2.9.3",
|
|
72
|
+
"react-lottie": "^1.2.3",
|
|
72
73
|
"react-popper": "^2.3.0",
|
|
73
74
|
"react-slick": "^0.30.2",
|
|
74
75
|
"react-toastify": "^9.1.2",
|