@bikdotai/bik-component-library 0.0.646-beta.11 → 0.0.646-beta.2
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/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/cjs/components/dropdown/ChipInput.d.ts +1 -1
- package/dist/cjs/components/dropdown/ChipInput.js +1 -1
- package/dist/cjs/components/dropdown/Dropdown.d.ts +1 -1
- package/dist/cjs/components/dropdown/Dropdown.js +1 -1
- package/dist/cjs/components/input/Input.d.ts +1 -1
- package/dist/cjs/components/input/Input.js +1 -1
- package/dist/cjs/components/input/Input.styled.js +1 -1
- package/dist/cjs/components/modals/styledModal.d.ts +1 -0
- package/dist/cjs/components/modals/styledModal.js +1 -1
- package/dist/cjs/components/product-picker-v2/modal.d.ts +5 -1
- package/dist/cjs/components/product-picker-v2/modal.js +1 -1
- package/dist/cjs/components/product-picker-v2/utility.d.ts +13 -1
- package/dist/cjs/components/product-picker-v2/utility.js +1 -1
- package/dist/cjs/index.d.ts +0 -3
- package/dist/cjs/index.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/esm/components/dropdown/ChipInput.d.ts +1 -1
- package/dist/esm/components/dropdown/ChipInput.js +1 -1
- package/dist/esm/components/dropdown/Dropdown.d.ts +1 -1
- package/dist/esm/components/dropdown/Dropdown.js +1 -1
- package/dist/esm/components/input/Input.d.ts +1 -1
- package/dist/esm/components/input/Input.js +1 -1
- package/dist/esm/components/input/Input.styled.js +1 -1
- package/dist/esm/components/modals/styledModal.d.ts +1 -0
- package/dist/esm/components/modals/styledModal.js +1 -1
- package/dist/esm/components/product-picker-v2/modal.d.ts +5 -1
- package/dist/esm/components/product-picker-v2/modal.js +1 -1
- package/dist/esm/components/product-picker-v2/utility.d.ts +13 -1
- package/dist/esm/components/product-picker-v2/utility.js +1 -1
- package/dist/esm/index.d.ts +0 -3
- package/dist/esm/index.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/assets/icons/boxV2.svg.js +0 -1
- package/dist/cjs/assets/icons/help.svg.js +0 -1
- package/dist/cjs/assets/icons/openai.svg.js +0 -1
- package/dist/cjs/assets/icons/redirect.svg.js +0 -1
- package/dist/cjs/assets/icons/text_t9.svg.js +0 -1
- package/dist/cjs/assets/icons/website.svg.js +0 -1
- package/dist/cjs/components/data-source-panel/DataSourceInfoFooter.d.ts +0 -19
- package/dist/cjs/components/data-source-panel/DataSourceInfoFooter.js +0 -1
- package/dist/cjs/components/data-source-panel/DataSourcePanel.d.ts +0 -23
- package/dist/cjs/components/data-source-panel/DataSourcePanel.js +0 -1
- package/dist/cjs/components/data-source-panel/DataSourcePanel.style.d.ts +0 -3
- package/dist/cjs/components/data-source-panel/DataSourcePanel.style.js +0 -123
- package/dist/cjs/components/data-source-panel/index.d.ts +0 -1
- package/dist/cjs/components/data-source-panel/model.d.ts +0 -135
- package/dist/cjs/components/data-source-panel/model.js +0 -1
- package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.d.ts +0 -14
- package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.js +0 -1
- package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.style.d.ts +0 -1
- package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.style.js +0 -42
- package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryResponseList.d.ts +0 -15
- package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryResponseList.js +0 -1
- package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryResponseList.style.d.ts +0 -1
- package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryResponseList.style.js +0 -38
- package/dist/esm/assets/icons/boxV2.svg.js +0 -1
- package/dist/esm/assets/icons/help.svg.js +0 -1
- package/dist/esm/assets/icons/openai.svg.js +0 -1
- package/dist/esm/assets/icons/redirect.svg.js +0 -1
- package/dist/esm/assets/icons/text_t9.svg.js +0 -1
- package/dist/esm/assets/icons/website.svg.js +0 -1
- package/dist/esm/components/data-source-panel/DataSourceInfoFooter.d.ts +0 -19
- package/dist/esm/components/data-source-panel/DataSourceInfoFooter.js +0 -1
- package/dist/esm/components/data-source-panel/DataSourcePanel.d.ts +0 -23
- package/dist/esm/components/data-source-panel/DataSourcePanel.js +0 -1
- package/dist/esm/components/data-source-panel/DataSourcePanel.style.d.ts +0 -3
- package/dist/esm/components/data-source-panel/DataSourcePanel.style.js +0 -123
- package/dist/esm/components/data-source-panel/index.d.ts +0 -1
- package/dist/esm/components/data-source-panel/model.d.ts +0 -135
- package/dist/esm/components/data-source-panel/model.js +0 -1
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.d.ts +0 -14
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.js +0 -1
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.style.d.ts +0 -1
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.style.js +0 -42
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.d.ts +0 -15
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.js +0 -1
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.style.d.ts +0 -1
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.style.js +0 -38
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { AllSourceInfoDetailsCustomDataModel, CustomDataType, DataSourcePanelZeroState, footerButtonOptionModel, InfoContent, MessageSource } from './model';
|
|
3
|
-
export interface DataSourcePanelProps {
|
|
4
|
-
storeId: string;
|
|
5
|
-
messageSource: MessageSource;
|
|
6
|
-
setMessageSourcePanel: (source?: MessageSource) => void;
|
|
7
|
-
hideCloseButton?: boolean;
|
|
8
|
-
title?: string;
|
|
9
|
-
allSourceInfoDetail: AllSourceInfoDetailsCustomDataModel;
|
|
10
|
-
isSourceInfoFetched?: boolean;
|
|
11
|
-
faqCount: number;
|
|
12
|
-
editableSources: CustomDataType[];
|
|
13
|
-
redirect: (sourceInfo: InfoContent) => void;
|
|
14
|
-
trainingSourceCount: {
|
|
15
|
-
[k in string]: number;
|
|
16
|
-
};
|
|
17
|
-
zeroStateButton: DataSourcePanelZeroState;
|
|
18
|
-
ChecklistType: Record<string, string>;
|
|
19
|
-
IntentComponentMap: Record<string, JSX.Element>;
|
|
20
|
-
ShowTrainingDataSource: Record<string, string>;
|
|
21
|
-
footerButtonOption?: footerButtonOptionModel;
|
|
22
|
-
}
|
|
23
|
-
export declare const DataSourcePanel: React.FC<DataSourcePanelProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as i}from"react/jsx-runtime";import o from"../../assets/icons/boxV2.svg.js";import s from"../../assets/icons/cross.svg.js";import n from"../../assets/icons/edit.svg.js";import r from"../../assets/icons/filePdf.svg.js";import l from"../../assets/icons/help.svg.js";import a from"../../assets/icons/info.svg.js";import d from"../../assets/icons/openai.svg.js";import c from"../../assets/icons/plus.svg.js";import p from"../../assets/icons/redirect.svg.js";import u from"../../assets/icons/text_t9.svg.js";import g from"../../assets/icons/website.svg.js";import{useState as h,useEffect as m}from"react";import{COLORS as v}from"../../constants/Theme.js";import{Button as f}from"../button/Button.js";import{IconButton as y}from"../icon-button/IconButton.js";import{BikShimmer as C}from"../shimmer/ShimmerComponent/BikShimmer.js";import{Tag as x}from"../tag/Tag.js";import{Tooltip as b}from"../tooltips/Tooltip.js";import{TitleSmall as I,BodyCaption as L,BodySecondary as j}from"../TypographyStyle.js";import w from"./DataSourceInfoFooter.js";import{SourceInfoDetailsStyle as T}from"./DataSourcePanel.style.js";import{CustomDataType as E}from"./model.js";const S=S=>{var O,N;const{storeId:k,messageSource:D,setMessageSourcePanel:A,hideCloseButton:_,faqCount:B=0,isSourceInfoFetched:F,allSourceInfoDetail:K,ChecklistType:P,IntentComponentMap:W,title:q,zeroStateButton:M,editableSources:H,redirect:Q,trainingSourceCount:$,ShowTrainingDataSource:R,footerButtonOption:U}=S,{sources:X}=D,z=["blog","article","page","policy"],[G,V]=h(!1),[J,Y]=h(!1);m((()=>{var e,t,i,o;(null==D?void 0:D.messageId)&&(V(!0),setTimeout((()=>V(!1)),200),Y(!1!==(null===(t=null===(e=D.sources)||void 0===e?void 0:e[0])||void 0===t?void 0:t.isTrainable)||!!(null===(o=null===(i=D.sources)||void 0===i?void 0:i[0])||void 0===o?void 0:o.insights)))}),[null==D?void 0:D.messageId]);const Z=e=>!(0!==e.length&&!(null==D?void 0:D.isUnsatisfactoryAnswer)),ee=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var i;return"custom"==e?e=E.FILES:z.includes(e)?e=E.FETCHED_LINKS:"url"==e?e=E.WEBSITE_LINKS:"text"===e?e=E.TEXTS:"faq"===e&&(e=E.FAQ),t?e:null===(i=null==e?void 0:e.toLowerCase())||void 0===i?void 0:i.replace(/_/g," ")};return G||!F?e(T,{children:e(C,{boxes:[{width:"100px",height:"16px"},{width:"0",height:"4px"},{width:"100%",height:"32px"},{width:"100%",height:"32px"},{width:"100%",height:"32px"},{width:"100%",height:"32px"},{width:"0",height:"4px"},{width:"100%",height:"16px"}]})}):e(t,{children:e(T,{children:!!(null==X?void 0:X.length)&&i(t,{children:[i("div",Object.assign({className:"pop-up-header",style:{display:"flex",flexDirection:"column",paddingBottom:"12px"}},{children:[!!q&&e(I,{children:q}),i("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:"12px",alignItems:"center"}},{children:[e(L,Object.assign({color:v.content.secondary},{children:"Intent"})),null!==(O=W[D.intent])&&void 0!==O?O:W.GENERIC,!_&&e("div",Object.assign({style:{display:"flex",marginLeft:"auto",cursor:"pointer"},onClick:()=>A(void 0)},{children:e(s,{height:20,width:20,color:v.content.secondary})}))]})),Z(X)?e("div",Object.assign({style:{display:"flex",margin:"auto",justifyContent:"center",alignItems:"center",height:"calc(100vh - 300px)"}},{children:(()=>{var t,o;return i("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",margin:"0px 30px",gap:"8px"}},{children:[e("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"12px",backgroundColor:`${v.background.negative.light}`,borderRadius:"100px"}},{children:e(a,{width:24,height:24,color:v.stroke.negative.vibrant})})),e("div",Object.assign({style:{justifyContent:"center",alignItems:"center",marginBottom:"-4px"}},{children:e(I,{children:"Insufficient data"})})),e(j,Object.assign({color:v.content.secondary,style:{display:"flex",justifyContent:"center",textAlign:"center"}},{children:"No data available to answer this query. Add an FAQ to address it in the future"})),M&&e("div",Object.assign({style:{display:"flex",width:"100%"}},{children:e(f,{LeadingIcon:null!==(t=M.leadingIcon)&&void 0!==t?t:c,buttonText:null!==(o=M.title)&&void 0!==o?o:"Add FAQ",buttonType:"secondary",size:"small",matchParentWidth:!0,onClick:()=>{M.onClick()}})}))]}))})()})):e(x,{LeadingIcon:a,version:"2.0",type:"grey",theme:"light",alignIcon:"start",contentPadding:12,tagText:D.isEditable?"If any of the information is incorrect, update the original data source and sync it again. Alternatively, you can make local corrections directly in Manifest.":"Edit the original source and save again to update the response"})]})),!Z(X)&&e("div",Object.assign({className:"info-container"},{children:e("div",Object.assign({style:{padding:"0 8px",maxWidth:"100%"}},{children:X.map(((s,a)=>{var c,h,m,f,C,x,I,w,T,S,O,N,k,D;const A=ee(s.type||s.subTitle||"OpenAI"),_=ee(s.type||s.subTitle||"OpenAI",!0),B=(F=A)?"faq"==F.toLocaleLowerCase()?"FAQ":"openai"==F.toLocaleLowerCase()?"OPENAI":"files"==F.toLocaleLowerCase()?"PDF":"texts"==F.toLocaleLowerCase()?"Custom text":((F=(F=F.charAt(0).toUpperCase()+F.slice(1).toLowerCase()).replace("_"," ")).endsWith("s")&&(F=F.slice(0,-1)),F.replace("Website","Manual")):"";var F;const W=null==H?void 0:H.includes(_),q="Products"===s.subTitle?K[null!==(c=s.productId)&&void 0!==c?c:"Products"]:K[null!==(h=s.docId)&&void 0!==h?h:""],M=_.toLowerCase()===(null===(m=E.FAQ)||void 0===m?void 0:m.toLowerCase())?"faq"===(null===(f=s.title)||void 0===f?void 0:f.toLowerCase())?s.subTitle:s.title:_.toLowerCase()===(null===(C=E.FILES)||void 0===C?void 0:C.toLowerCase())||_.toLowerCase()===(null===(x=E.FETCHED_LINKS)||void 0===x?void 0:x.toLowerCase())||_.toLowerCase()===(null===(I=E.TEXTS)||void 0===I?void 0:I.toLowerCase())?s.title:_.toLowerCase()===(null===(w=E.WEBSITE_LINKS)||void 0===w?void 0:w.toLowerCase())?s.title.split("/")[s.title.split("/").length-1].replace(/[^\w\s]/gi," ").replace(/^(.)(.*)$/,((e,t,i)=>t.toUpperCase()+i)):s.intent===P.EMAIL_COLLECTION?B:s.title,$="faq"===_.toLowerCase()?null===(T=null==q?void 0:q.data)||void 0===T?void 0:T.answer:_.toLowerCase()===(null===(S=E.FETCHED_LINKS)||void 0===S?void 0:S.toLowerCase())||_.toLowerCase()===(null===(O=E.WEBSITE_LINKS)||void 0===O?void 0:O.toLowerCase())||_.toLowerCase()===(null===(N=E.TEXTS)||void 0===N?void 0:N.toLowerCase())?null!==(D=null===(k=null==q?void 0:q.data)||void 0===k?void 0:k.fileContentText)&&void 0!==D?D:"":s.intent===P.EMAIL_COLLECTION?"Collect leads before replying to messages":"";return i("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"8px",padding:"24px 0px",borderBottom:`1px solid ${v.stroke.primary}`}},{children:[i("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:"12px",justifyContent:"space-between",alignItems:"center"}},{children:[e("div",Object.assign({style:{flex:1}},{children:e(b,Object.assign({body:M,placement:"top"},{children:e(j,Object.assign({style:_==E.FETCHED_LINKS||_==E.WEBSITE_LINKS?{cursor:"pointer",textDecoration:"underline"}:{},color:v.content.primary,className:"clamp-title",onClick:()=>_==E.FETCHED_LINKS||_==E.WEBSITE_LINKS?Q(s):{}},{children:M}))}))})),i("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",gap:"4px",flex:"none"}},{children:[s.intent!==P.EMAIL_COLLECTION&&i(t,{children:[(U=A,e("products"==U?o:"files"==U?r:"website links"==U||"fetched links"==U?g:"faq"==U?l:"texts"==U?u:d,{height:16,width:16,color:v.content.secondary})),e(L,Object.assign({color:v.content.secondary},{children:B}))]}),(s.link||s.docId)&&e("div",Object.assign({style:{cursor:"pointer",marginLeft:"4px"}},{children:e(y,W?{Icon:n,height:16,width:16,bordered:!0,onClick:()=>null==q?void 0:q.onEditClick(q.data,q.type),disabled:!q,disabledTooltip:"This source is deleted"}:{Icon:p,height:16,width:16,bordered:!0,disabled:"custom"===s.type&&!q,disabledTooltip:"This source is deleted",onClick:()=>Q(s)})}))]}))]})),(null!=$?$:"").trim()&&e("div",Object.assign({style:{padding:"4px 8px",border:`1px dashed ${v.stroke.primary}`,borderRadius:"4px",backgroundColor:v.surface.subdued}},{children:e(L,Object.assign({color:v.content.primary,className:"clamp-description"},{children:(R=null!=$?$:"",R.replace(/(<([^>]+)>)/gi,"")).trim()}))}))]}),`info-${a}`);var R,U}))}))})),J&&!Z(X)&&e("div",Object.assign({className:"footer"},{children:e(w,{storeId:k,messageSource:D,sourceIntent:null!==(N=D.intent)&&void 0!==N?N:P.GENERIC,faqCount:B,trainingSourceCount:$,ShowTrainingDataSource:R,ChecklistType:P,footerButtonOption:U})}))]})})})};export{S as DataSourcePanel};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const SourceInfoDetailsStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
-
export declare const WithoutContentSourceInfoDetailsStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export declare const SourceInfoFooterStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import e from"styled-components";import{COLORS as o}from"../../constants/Theme.js";const i=e.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
margin: 0px 8px 0px 8px;
|
|
4
|
-
padding: 20px 0px 20px 0px;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
max-height: calc(100vh - 130px);
|
|
7
|
-
.info-container {
|
|
8
|
-
border-radius: 8px;
|
|
9
|
-
}
|
|
10
|
-
.pop-up-header {
|
|
11
|
-
padding: 6px 8px;
|
|
12
|
-
background-color: rgba(255, 255, 255, 0.1);
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
gap: 24px;
|
|
16
|
-
}
|
|
17
|
-
.footer {
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
margin: 24px 8px 0px 8px;
|
|
21
|
-
}
|
|
22
|
-
.clamp-title {
|
|
23
|
-
overflow: hidden;
|
|
24
|
-
text-overflow: ellipsis;
|
|
25
|
-
display: -webkit-box;
|
|
26
|
-
-webkit-line-clamp: 1;
|
|
27
|
-
-webkit-box-orient: vertical;
|
|
28
|
-
white-space: pre-line;
|
|
29
|
-
}
|
|
30
|
-
.clamp-description {
|
|
31
|
-
overflow: hidden;
|
|
32
|
-
text-overflow: ellipsis;
|
|
33
|
-
display: -webkit-box;
|
|
34
|
-
-webkit-line-clamp: 5;
|
|
35
|
-
-webkit-box-orient: vertical;
|
|
36
|
-
white-space: pre-line;
|
|
37
|
-
}
|
|
38
|
-
overflow-y: scroll;
|
|
39
|
-
&::-webkit-scrollbar-thumb {
|
|
40
|
-
background: ${o.stroke.primary};
|
|
41
|
-
border-radius: 78px;
|
|
42
|
-
}
|
|
43
|
-
&::-webkit-scrollbar {
|
|
44
|
-
width: 8px;
|
|
45
|
-
display: block;
|
|
46
|
-
}
|
|
47
|
-
`;e.div`
|
|
48
|
-
display: flex;
|
|
49
|
-
margin: 16px 0px 0px 0px;
|
|
50
|
-
padding: 0px 0px 16px 0px;
|
|
51
|
-
flex-direction: column;
|
|
52
|
-
border-bottom: 1px solid ${o.stroke.primary};
|
|
53
|
-
.info-container {
|
|
54
|
-
border-radius: 8px;
|
|
55
|
-
background-color: ${o.surface.grey};
|
|
56
|
-
max-height: calc(100vh - 380px);
|
|
57
|
-
overflow-y: scroll;
|
|
58
|
-
&::-webkit-scrollbar-thumb {
|
|
59
|
-
background: #888;
|
|
60
|
-
border-radius: 8px;
|
|
61
|
-
}
|
|
62
|
-
&::-webkit-scrollbar {
|
|
63
|
-
width: 4px;
|
|
64
|
-
display: block;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
.pop-up-header {
|
|
68
|
-
padding: 6px 8px;
|
|
69
|
-
background-color: rgba(255, 255, 255, 0.1);
|
|
70
|
-
display: flex;
|
|
71
|
-
flex-direction: column;
|
|
72
|
-
gap: 16px;
|
|
73
|
-
}
|
|
74
|
-
.info-wrapper {
|
|
75
|
-
padding: 16px 0;
|
|
76
|
-
border-bottom: 1px solid ${o.stroke.primary};
|
|
77
|
-
display: flex;
|
|
78
|
-
flex-direction: column;
|
|
79
|
-
row-gap: 8px;
|
|
80
|
-
.info-item {
|
|
81
|
-
display: flex;
|
|
82
|
-
justify-content: space-between;
|
|
83
|
-
align-items: start;
|
|
84
|
-
gap: 12px;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
.info-wrapper:last-child {
|
|
88
|
-
border-bottom: none;
|
|
89
|
-
}
|
|
90
|
-
.footer {
|
|
91
|
-
display: flex;
|
|
92
|
-
flex-direction: column;
|
|
93
|
-
margin-top: 16px;
|
|
94
|
-
}
|
|
95
|
-
.clamp-text {
|
|
96
|
-
overflow: hidden;
|
|
97
|
-
text-overflow: ellipsis;
|
|
98
|
-
display: -webkit-box;
|
|
99
|
-
-webkit-line-clamp: 1;
|
|
100
|
-
-webkit-box-orient: vertical;
|
|
101
|
-
white-space: pre-line;
|
|
102
|
-
}
|
|
103
|
-
`;const r=e.div`
|
|
104
|
-
display: flex;
|
|
105
|
-
flex-direction: column;
|
|
106
|
-
gap: 8px;
|
|
107
|
-
|
|
108
|
-
.source_info_details {
|
|
109
|
-
display: flex;
|
|
110
|
-
flex-direction: column;
|
|
111
|
-
gap: 8px;
|
|
112
|
-
padding: 12px;
|
|
113
|
-
border-radius: 12px;
|
|
114
|
-
background-color: ${o.surface.grey};
|
|
115
|
-
}
|
|
116
|
-
.no_data_source {
|
|
117
|
-
background-color: ${o.background.negative.light};
|
|
118
|
-
}
|
|
119
|
-
.no_data_source_title {
|
|
120
|
-
display: flex;
|
|
121
|
-
gap: 8px;
|
|
122
|
-
}
|
|
123
|
-
`;export{i as SourceInfoDetailsStyle,r as SourceInfoFooterStyle};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './DataSourcePanel';
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface MessageSource {
|
|
3
|
-
sources: InfoContent[];
|
|
4
|
-
intent: string;
|
|
5
|
-
messageId: string;
|
|
6
|
-
output_message_id?: string;
|
|
7
|
-
isUnsatisfactoryAnswer?: boolean;
|
|
8
|
-
isEditable?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export interface InfoContent {
|
|
11
|
-
title: string;
|
|
12
|
-
docId?: string;
|
|
13
|
-
subTitle?: string;
|
|
14
|
-
link?: string | string[];
|
|
15
|
-
type?: string;
|
|
16
|
-
intent?: string;
|
|
17
|
-
productId?: string;
|
|
18
|
-
variantId?: string;
|
|
19
|
-
imageUrl?: string;
|
|
20
|
-
isTrainable?: boolean;
|
|
21
|
-
subIntent?: string;
|
|
22
|
-
insights?: string;
|
|
23
|
-
}
|
|
24
|
-
export interface DataSourcePanelZeroState {
|
|
25
|
-
title: string;
|
|
26
|
-
leadingIcon: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
|
|
27
|
-
onClick: () => void;
|
|
28
|
-
}
|
|
29
|
-
export interface AllSourceInfoDetailsCustomDataModel {
|
|
30
|
-
[keys: string]: SourceInfoDetailsCustomDataModel;
|
|
31
|
-
}
|
|
32
|
-
export interface SourceInfoDetailsCustomDataModel {
|
|
33
|
-
storeId: string;
|
|
34
|
-
type: CustomDataType;
|
|
35
|
-
data: FileMetaData | CustomDataDocument | CustomDataFaqModel;
|
|
36
|
-
content?: string;
|
|
37
|
-
docId: string;
|
|
38
|
-
onEditClick: (item: FileMetaData | CustomDataDocument | CustomDataFaqModel, type: string) => void;
|
|
39
|
-
redirect?: (source: InfoContent) => void;
|
|
40
|
-
}
|
|
41
|
-
export declare enum CustomDataCategories {
|
|
42
|
-
PAGE = "page",
|
|
43
|
-
POLICY = "policy",
|
|
44
|
-
ARTICLE = "article",
|
|
45
|
-
UPLOADED = "uploaded",
|
|
46
|
-
TEXT = "text"
|
|
47
|
-
}
|
|
48
|
-
export type CustomDataCategory = keyof typeof CustomDataCategories;
|
|
49
|
-
export declare enum CustomDataType {
|
|
50
|
-
FAQ = "FAQ",
|
|
51
|
-
FILES = "FILES",
|
|
52
|
-
WEBSITE_LINKS = "WEBSITE_LINKS",
|
|
53
|
-
TEXTS = "TEXTS",
|
|
54
|
-
FETCHED_LINKS = "FETCHED_LINKS",
|
|
55
|
-
URL = "URL",
|
|
56
|
-
TRAINING_TEMPLATE = "TRAINING_TEMPLATE"
|
|
57
|
-
}
|
|
58
|
-
export interface FileMetaData {
|
|
59
|
-
fileId: string;
|
|
60
|
-
fileName: string;
|
|
61
|
-
fileSize: string;
|
|
62
|
-
fileType: string;
|
|
63
|
-
fileUrl: string;
|
|
64
|
-
uploadType: 'URL' | 'FileUpload';
|
|
65
|
-
uploadDate: Date;
|
|
66
|
-
characterCount?: number;
|
|
67
|
-
intent?: string;
|
|
68
|
-
fileContent?: string;
|
|
69
|
-
fileContentPath?: string;
|
|
70
|
-
fileContentText?: string;
|
|
71
|
-
isActive?: boolean;
|
|
72
|
-
}
|
|
73
|
-
export interface CustomDataDocument {
|
|
74
|
-
category: CustomDataCategory;
|
|
75
|
-
id: string;
|
|
76
|
-
handle?: string;
|
|
77
|
-
title?: string;
|
|
78
|
-
createdAt?: Date;
|
|
79
|
-
updatedAt?: Date;
|
|
80
|
-
url?: string;
|
|
81
|
-
isActive?: boolean;
|
|
82
|
-
characterCount?: number;
|
|
83
|
-
intent?: string;
|
|
84
|
-
wasManualLinkAdded?: boolean;
|
|
85
|
-
fileContent?: string;
|
|
86
|
-
fileContentText?: string;
|
|
87
|
-
fileId?: string;
|
|
88
|
-
fileContentPath?: string;
|
|
89
|
-
fileName?: string;
|
|
90
|
-
lastEditedAt?: number;
|
|
91
|
-
}
|
|
92
|
-
export interface CustomDataFaqModel {
|
|
93
|
-
id: string;
|
|
94
|
-
question: string;
|
|
95
|
-
answer: string;
|
|
96
|
-
createdAt: Date;
|
|
97
|
-
updatedAt?: Date;
|
|
98
|
-
questionSpecificProducts?: Array<FaqProductModel>;
|
|
99
|
-
products?: Array<FaqProductModel>;
|
|
100
|
-
cta?: Array<LiveChatCTA>;
|
|
101
|
-
intent?: string;
|
|
102
|
-
crmNoteMeta?: CRMNoteMeta;
|
|
103
|
-
fromEditResponse?: boolean;
|
|
104
|
-
isTemplateFAQ?: boolean;
|
|
105
|
-
isSatisfactoryAnswer?: boolean;
|
|
106
|
-
}
|
|
107
|
-
export interface FaqProductModel {
|
|
108
|
-
id: string;
|
|
109
|
-
variantId: string;
|
|
110
|
-
name: string;
|
|
111
|
-
imageUrl: string;
|
|
112
|
-
}
|
|
113
|
-
export interface CRMNoteMeta {
|
|
114
|
-
createdAt: Date;
|
|
115
|
-
sessionId: string;
|
|
116
|
-
userId: number;
|
|
117
|
-
messageId: string;
|
|
118
|
-
customerId: string;
|
|
119
|
-
updatedAt: Date;
|
|
120
|
-
}
|
|
121
|
-
export interface LiveChatCTA {
|
|
122
|
-
url: string;
|
|
123
|
-
cta: string;
|
|
124
|
-
buttonType: string;
|
|
125
|
-
}
|
|
126
|
-
export interface footerButtonOptionModel {
|
|
127
|
-
title?: string;
|
|
128
|
-
subtitle?: string;
|
|
129
|
-
buttonTitle: string;
|
|
130
|
-
addFaqProps?: any;
|
|
131
|
-
redirectUrl?: string;
|
|
132
|
-
hideAddDataButton?: boolean;
|
|
133
|
-
navigate?: (pagePathKey: Record<string, string>, params?: object, queryParam?: object, openInNewTab?: boolean) => void;
|
|
134
|
-
onClick: () => void;
|
|
135
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var E,T;!function(E){E.PAGE="page",E.POLICY="policy",E.ARTICLE="article",E.UPLOADED="uploaded",E.TEXT="text"}(E||(E={})),function(E){E.FAQ="FAQ",E.FILES="FILES",E.WEBSITE_LINKS="WEBSITE_LINKS",E.TEXTS="TEXTS",E.FETCHED_LINKS="FETCHED_LINKS",E.URL="URL",E.TRAINING_TEMPLATE="TRAINING_TEMPLATE"}(T||(T={}));export{E as CustomDataCategories,T as CustomDataType};
|
package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface UnsatisfactoryCountIntentWiseProps {
|
|
3
|
-
storeId?: string;
|
|
4
|
-
showUnsatisfactoryResponseModal: boolean;
|
|
5
|
-
setShowUnsatisfactoryResponseModal: (value: boolean) => void;
|
|
6
|
-
ChecklistType: Record<string, string>;
|
|
7
|
-
UnsatisfactoryResponseIntentList: string[];
|
|
8
|
-
IntentHeaderTitle: Record<string, string>;
|
|
9
|
-
viewIntentWiseUnsatisfactoryResponse: (intent: string) => void;
|
|
10
|
-
fetchUnsatisfactoryResponseCountIntentWise: () => Promise<{
|
|
11
|
-
[keys in string]?: number;
|
|
12
|
-
}>;
|
|
13
|
-
}
|
|
14
|
-
export declare const UnsatisfactoryCountIntentWiseModal: React.FC<UnsatisfactoryCountIntentWiseProps>;
|
package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as s}from"react/jsx-runtime";import{useState as t,useEffect as n}from"react";import{COLORS as i}from"../../constants/Theme.js";import{Button as l}from"../button/Button.js";import{StyledModal as a}from"../modals/styledModal.js";import{BikShimmer as c}from"../shimmer/ShimmerComponent/BikShimmer.js";import{BodyPrimary as o,TitleSmall as r,BodySecondary as d}from"../TypographyStyle.js";import{ModalBody as m}from"./UnsatisfactoryCountIntentWiseModal.style.js";const h=h=>{const{storeId:b,setShowUnsatisfactoryResponseModal:p,showUnsatisfactoryResponseModal:g,ChecklistType:y,UnsatisfactoryResponseIntentList:j,viewIntentWiseUnsatisfactoryResponse:O,IntentHeaderTitle:f,fetchUnsatisfactoryResponseCountIntentWise:v}=h,[u,x]=t(),[N,w]=t(!1);return n((()=>{b&&(w(!0),console.log("KB storeId",b),v().then((e=>{console.log("KB response",e),x(e),w(!1)})))}),[b]),e(a,Object.assign({onClose:()=>p(!1),open:g,headingTitle:"Improve unsatisfactory response"},{children:s(m,{children:[e("div",{children:e(o,Object.assign({style:{color:i.content.primary}},{children:"Intent wise distribution of unsatisfactory response"}))}),s("div",Object.assign({className:"modal-table"},{children:[s("div",Object.assign({className:"table-row header"},{children:[e("div",Object.assign({className:"table-cell"},{children:e(r,Object.assign({style:{color:i.content.primary}},{children:"Intent"}))})),e("div",Object.assign({className:"table-cell center-align"},{children:e(r,Object.assign({style:{color:i.content.primary}},{children:"Unsatisfactory response"}))})),e("div",Object.assign({className:"table-cell center-align"},{children:e(r,Object.assign({style:{color:i.content.primary}},{children:"Action"}))}))]})),N&&[0,1,2,3,4,5,6].map((t=>s("div",Object.assign({className:"table-row"},{children:[e("div",Object.assign({className:"table-cell"},{children:e(c,{boxes:[{width:"196px",height:"20px"}]})})),e("div",Object.assign({className:"table-cell center-align"},{children:e(c,{boxes:[{width:"176px",height:"20px"}]})})),e("div",Object.assign({className:"table-cell center-align"},{children:e(c,{boxes:[{width:"56px",height:"20px"}]})}))]}),t))),!N&&j.map((t=>s("div",Object.assign({className:"table-row"},{children:[e("div",Object.assign({className:"table-cell"},{children:e(d,Object.assign({style:{color:i.content.primary}},{children:f[t]}))})),e("div",Object.assign({className:"table-cell center-align"},{children:e(d,Object.assign({style:{color:i.content.primary}},{children:(null==u?void 0:u[t])||"--"}))})),e("div",Object.assign({className:"table-cell center-align"},{children:e(l,{buttonText:"Fix",buttonType:"tertiary",size:"small",onClick:()=>O(t),disabled:!(null==u?void 0:u[t])})}))]}),t)))]}))]})}))};export{h as UnsatisfactoryCountIntentWiseModal};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ModalBody: import("styled-components").StyledComponent<"div", any, {}, never>;
|
package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.style.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import e from"styled-components";import{COLORS as o}from"../../constants/Theme.js";const r=e.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
min-height: 480px;
|
|
5
|
-
max-height: 504px;
|
|
6
|
-
padding: 24px;
|
|
7
|
-
gap: 16px;
|
|
8
|
-
border-top: 1px solid ${o.stroke.primary};
|
|
9
|
-
.modal-table {
|
|
10
|
-
display: flex;
|
|
11
|
-
flex: 1;
|
|
12
|
-
height: calc(100% - 40px);
|
|
13
|
-
overflow-y: scroll;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
border: 1px solid ${o.stroke.primary};
|
|
16
|
-
border-radius: 8px;
|
|
17
|
-
width: 100%;
|
|
18
|
-
.header {
|
|
19
|
-
background-color: ${o.surface.subdued};
|
|
20
|
-
border-radius: 8px;
|
|
21
|
-
border-top: none !important;
|
|
22
|
-
position: sticky;
|
|
23
|
-
top: 0;
|
|
24
|
-
}
|
|
25
|
-
.center-align {
|
|
26
|
-
display: flex;
|
|
27
|
-
justify-content: center;
|
|
28
|
-
}
|
|
29
|
-
.table-row {
|
|
30
|
-
display: grid;
|
|
31
|
-
grid-template-columns: auto 240px 100px;
|
|
32
|
-
align-items: center;
|
|
33
|
-
border-top: 1px solid ${o.stroke.primary};
|
|
34
|
-
.table-cell {
|
|
35
|
-
height: 48px !important;
|
|
36
|
-
align-items: center;
|
|
37
|
-
display: flex;
|
|
38
|
-
padding: 0 16px;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
`;export{r as ModalBody};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface UnsatisfactoryResponseListProps {
|
|
3
|
-
storeId?: string;
|
|
4
|
-
incorrectMessages: any;
|
|
5
|
-
onIncorrectMessageBubbleClick: (messageId: string) => void;
|
|
6
|
-
setShowIncorrectReplies: (show: boolean) => void;
|
|
7
|
-
ChecklistType: Record<string, string>;
|
|
8
|
-
IntentHeaderTitle: Record<string, string>;
|
|
9
|
-
redirectToUnsatisfactoryResponse: (intent: string) => void;
|
|
10
|
-
fetchUnsatisfactoryResponseCountIntentWise: () => Promise<{
|
|
11
|
-
[keys in string]?: number;
|
|
12
|
-
}>;
|
|
13
|
-
fetchUnsatisfactoryResponseCount: () => Promise<number>;
|
|
14
|
-
}
|
|
15
|
-
export declare const UnsatisfactoryResponseList: React.FC<UnsatisfactoryResponseListProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import s from"../../assets/icons/cross.svg.js";import n from"../../assets/icons/info.svg.js";import{format as o}from"date-fns";import{useState as i,useEffect as r}from"react";import{COLORS as a}from"../../constants/Theme.js";import{Avatar as c}from"../avatar/Avatar.js";import{SIZE as l,AVATAR_TYPES as d,AVATAR_BACKGROUND as p}from"../avatar/AvatarHelper.js";import{Button as y}from"../button/Button.js";import{StateComponent as m,StateInterface as f}from"../states/StateComponent.js";import"../../_virtual/_tslib.js";import{TitleRegular as h,BodySecondary as g,Caption as u}from"../TypographyStyle.js";import{UnsatisfactoryCountIntentWiseModal as v}from"./UnsatisfactoryCountIntentWiseModal.js";import{IncorrectRepliesStyle as b}from"./UnsatisfactoryResponseList.style.js";const j=j=>{const{storeId:I,incorrectMessages:C,onIncorrectMessageBubbleClick:w,setShowIncorrectReplies:U,ChecklistType:x,IntentHeaderTitle:O,redirectToUnsatisfactoryResponse:R,fetchUnsatisfactoryResponseCountIntentWise:M,fetchUnsatisfactoryResponseCount:T}=j,[k,N]=i(""),[S,A]=i((null==C?void 0:C.length)>0),[L,W]=i(!1);return r((()=>{S||T().then((e=>{e>0&&A(!0),0===e&&U(!1)}))}),[]),e(b,{children:[e("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"8px"}},{children:[e("div",Object.assign({style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},{children:[t(h,{children:"Unsatifactory responses"}),t("div",Object.assign({style:{cursor:"pointer"},onClick:()=>U(!1)},{children:t(s,{height:16,width:16,color:a.content.primary})}))]})),t(g,Object.assign({style:{color:a.content.secondary}},{children:"Spot unsatisfactory replies, dive deeper, and enhance with relevant data for improved responses."}))]})),!(null==C?void 0:C.length)&&t("div",Object.assign({style:{display:"flex",justifyContent:"center",alignItems:"center"}},{children:t(m,{states:f.WARNING,heading:"No unsatisfactory responses",subline:"As of now, all responses are correct",isButtonEnabled:!1,width:0,size:l.SMALL,icon:t(c,{type:d.ICON,size:l.MEDIUM,background:p.LIGHT,icon:()=>t(n,{width:16,height:16,color:a.content.warning})})})})),t("div",Object.assign({style:{display:"flex",width:"100%",justifyContent:(null==C?void 0:C.length)?"flex-start":"center"}},{children:t(y,{buttonText:"Fix all unsatisfactory responses",buttonType:"tertiary",size:"small",onClick:()=>{W(!0)},disabled:!S})})),t(v,{storeId:I,setShowUnsatisfactoryResponseModal:W,showUnsatisfactoryResponseModal:L,ChecklistType:x,UnsatisfactoryResponseIntentList:[],IntentHeaderTitle:O,fetchUnsatisfactoryResponseCountIntentWise:M,viewIntentWiseUnsatisfactoryResponse:R}),!!(null==C?void 0:C.length)&&t("div",Object.assign({className:"wrapper"},{children:C.map(((s,n)=>e("div",Object.assign({className:"bubble",onClick:()=>{w(s.messageId),N(s.messageId)},style:k===s.messageId?{backgroundColor:a.surface.hovered}:{}},{children:[t(g,Object.assign({style:{color:a.content.primary}},{children:s.message})),t("div",{children:e(u,Object.assign({style:{color:a.content.secondary}},{children:[o(new Date(null==s?void 0:s.date),"hh:mm a")," |"," ",o(new Date(null==s?void 0:s.date),"dd/MM/yyyy")]}))})]}),"incorrect-reply-"+n)))}))]})};export{j as UnsatisfactoryResponseList};
|
package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.style.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const IncorrectRepliesStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.style.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import o from"styled-components";import{COLORS as r}from"../../constants/Theme.js";const e=o.div`
|
|
2
|
-
min-width: 100%;
|
|
3
|
-
padding: 20px;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
gap: 16px;
|
|
7
|
-
height: 100%;
|
|
8
|
-
overflow-y: scroll;
|
|
9
|
-
flex: 1 1 0;
|
|
10
|
-
.wrapper {
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
gap: 8px;
|
|
14
|
-
height: calc(100% - 92px);
|
|
15
|
-
overflow-y: scroll;
|
|
16
|
-
padding-right: 8px;
|
|
17
|
-
&::-webkit-scrollbar-thumb {
|
|
18
|
-
background: #888;
|
|
19
|
-
border-radius: 8px;
|
|
20
|
-
}
|
|
21
|
-
&::-webkit-scrollbar {
|
|
22
|
-
width: 6px;
|
|
23
|
-
display: block;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
.bubble {
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-direction: column;
|
|
29
|
-
padding: 12px;
|
|
30
|
-
border-radius: 12px;
|
|
31
|
-
row-gap: 4px;
|
|
32
|
-
cursor: pointer;
|
|
33
|
-
background-color: ${r.surface.subdued};
|
|
34
|
-
}
|
|
35
|
-
.bubble:hover {
|
|
36
|
-
background-color: ${r.surface.hovered};
|
|
37
|
-
}
|
|
38
|
-
`;export{e as IncorrectRepliesStyle};
|