@bikdotai/bik-component-library 0.0.646-beta.5 → 0.0.646-beta.6

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.
Files changed (79) hide show
  1. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
  2. package/dist/cjs/components/dropdown/ChipInput.d.ts +1 -1
  3. package/dist/cjs/components/dropdown/ChipInput.js +1 -1
  4. package/dist/cjs/components/dropdown/Dropdown.d.ts +1 -1
  5. package/dist/cjs/components/dropdown/Dropdown.js +1 -1
  6. package/dist/cjs/components/input/Input.d.ts +1 -1
  7. package/dist/cjs/components/input/Input.js +1 -1
  8. package/dist/cjs/components/input/Input.styled.js +1 -1
  9. package/dist/cjs/components/modals/styledModal.d.ts +1 -0
  10. package/dist/cjs/components/modals/styledModal.js +1 -1
  11. package/dist/cjs/components/product-picker-v2/modal.d.ts +5 -1
  12. package/dist/cjs/components/product-picker-v2/modal.js +1 -1
  13. package/dist/cjs/components/product-picker-v2/utility.d.ts +13 -1
  14. package/dist/cjs/components/product-picker-v2/utility.js +1 -1
  15. package/dist/cjs/index.d.ts +0 -3
  16. package/dist/cjs/index.js +1 -1
  17. package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
  18. package/dist/esm/components/dropdown/ChipInput.d.ts +1 -1
  19. package/dist/esm/components/dropdown/ChipInput.js +1 -1
  20. package/dist/esm/components/dropdown/Dropdown.d.ts +1 -1
  21. package/dist/esm/components/dropdown/Dropdown.js +1 -1
  22. package/dist/esm/components/input/Input.d.ts +1 -1
  23. package/dist/esm/components/input/Input.js +1 -1
  24. package/dist/esm/components/input/Input.styled.js +1 -1
  25. package/dist/esm/components/modals/styledModal.d.ts +1 -0
  26. package/dist/esm/components/modals/styledModal.js +1 -1
  27. package/dist/esm/components/product-picker-v2/modal.d.ts +5 -1
  28. package/dist/esm/components/product-picker-v2/modal.js +1 -1
  29. package/dist/esm/components/product-picker-v2/utility.d.ts +13 -1
  30. package/dist/esm/components/product-picker-v2/utility.js +1 -1
  31. package/dist/esm/index.d.ts +0 -3
  32. package/dist/esm/index.js +1 -1
  33. package/package.json +1 -1
  34. package/dist/cjs/assets/icons/boxV2.svg.js +0 -1
  35. package/dist/cjs/assets/icons/help.svg.js +0 -1
  36. package/dist/cjs/assets/icons/openai.svg.js +0 -1
  37. package/dist/cjs/assets/icons/redirect.svg.js +0 -1
  38. package/dist/cjs/assets/icons/text_t9.svg.js +0 -1
  39. package/dist/cjs/assets/icons/website.svg.js +0 -1
  40. package/dist/cjs/components/data-source-panel/DataSourceInfoFooter.d.ts +0 -19
  41. package/dist/cjs/components/data-source-panel/DataSourceInfoFooter.js +0 -1
  42. package/dist/cjs/components/data-source-panel/DataSourcePanel.d.ts +0 -23
  43. package/dist/cjs/components/data-source-panel/DataSourcePanel.js +0 -1
  44. package/dist/cjs/components/data-source-panel/DataSourcePanel.style.d.ts +0 -3
  45. package/dist/cjs/components/data-source-panel/DataSourcePanel.style.js +0 -123
  46. package/dist/cjs/components/data-source-panel/index.d.ts +0 -1
  47. package/dist/cjs/components/data-source-panel/model.d.ts +0 -135
  48. package/dist/cjs/components/data-source-panel/model.js +0 -1
  49. package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.d.ts +0 -14
  50. package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.js +0 -1
  51. package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.style.d.ts +0 -1
  52. package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.style.js +0 -42
  53. package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryResponseList.d.ts +0 -14
  54. package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryResponseList.js +0 -1
  55. package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryResponseList.style.d.ts +0 -1
  56. package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryResponseList.style.js +0 -38
  57. package/dist/esm/assets/icons/boxV2.svg.js +0 -1
  58. package/dist/esm/assets/icons/help.svg.js +0 -1
  59. package/dist/esm/assets/icons/openai.svg.js +0 -1
  60. package/dist/esm/assets/icons/redirect.svg.js +0 -1
  61. package/dist/esm/assets/icons/text_t9.svg.js +0 -1
  62. package/dist/esm/assets/icons/website.svg.js +0 -1
  63. package/dist/esm/components/data-source-panel/DataSourceInfoFooter.d.ts +0 -19
  64. package/dist/esm/components/data-source-panel/DataSourceInfoFooter.js +0 -1
  65. package/dist/esm/components/data-source-panel/DataSourcePanel.d.ts +0 -23
  66. package/dist/esm/components/data-source-panel/DataSourcePanel.js +0 -1
  67. package/dist/esm/components/data-source-panel/DataSourcePanel.style.d.ts +0 -3
  68. package/dist/esm/components/data-source-panel/DataSourcePanel.style.js +0 -123
  69. package/dist/esm/components/data-source-panel/index.d.ts +0 -1
  70. package/dist/esm/components/data-source-panel/model.d.ts +0 -135
  71. package/dist/esm/components/data-source-panel/model.js +0 -1
  72. package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.d.ts +0 -14
  73. package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.js +0 -1
  74. package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.style.d.ts +0 -1
  75. package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.style.js +0 -42
  76. package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.d.ts +0 -14
  77. package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.js +0 -1
  78. package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.style.d.ts +0 -1
  79. package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.style.js +0 -38
@@ -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};
@@ -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>;
@@ -1 +0,0 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as s,useEffect as n}from"react";import{COLORS as i}from"../../constants/Theme.js";import{Button as a}from"../button/Button.js";import{StyledModal as l}from"../modals/styledModal.js";import{BikShimmer as c}from"../shimmer/ShimmerComponent/BikShimmer.js";import{BodyPrimary as r,TitleSmall as o,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]=s(),[N,w]=s(!1);return n((()=>{b&&(w(!0),v().then((e=>{x(e),w(!1)})))}),[v,b]),e(l,Object.assign({onClose:()=>p(!1),open:g,headingTitle:"Improve unsatisfactory response"},{children:t(m,{children:[e("div",{children:e(r,Object.assign({style:{color:i.content.primary}},{children:"Intent wise distribution of unsatisfactory response"}))}),t("div",Object.assign({className:"modal-table"},{children:[t("div",Object.assign({className:"table-row header"},{children:[e("div",Object.assign({className:"table-cell"},{children:e(o,Object.assign({style:{color:i.content.primary}},{children:"Intent"}))})),e("div",Object.assign({className:"table-cell center-align"},{children:e(o,Object.assign({style:{color:i.content.primary}},{children:"Unsatisfactory response"}))})),e("div",Object.assign({className:"table-cell center-align"},{children:e(o,Object.assign({style:{color:i.content.primary}},{children:"Action"}))}))]})),N&&[0,1,2,3,4,5,6].map((s=>t("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"}]})}))]}),s))),!N&&j.map((s=>t("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[s]}))})),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[s])||"--"}))})),e("div",Object.assign({className:"table-cell center-align"},{children:e(a,{buttonText:"Fix",buttonType:"tertiary",size:"small",onClick:()=>O(s),disabled:!(null==u?void 0:u[s])})}))]}),s)))]}))]})}))};export{h as UnsatisfactoryCountIntentWiseModal};
@@ -1 +0,0 @@
1
- export declare const ModalBody: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -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,14 +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
- }
14
- 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}from"react";import{COLORS as r}from"../../constants/Theme.js";import{Avatar as a}from"../avatar/Avatar.js";import{SIZE as c,AVATAR_TYPES as l,AVATAR_BACKGROUND as d}from"../avatar/AvatarHelper.js";import{Button as p}from"../button/Button.js";import{StateComponent as y,StateInterface as m}from"../states/StateComponent.js";import"../../_virtual/_tslib.js";import{TitleRegular as f,BodySecondary as h,Caption as g}from"../TypographyStyle.js";import{UnsatisfactoryCountIntentWiseModal as u}from"./UnsatisfactoryCountIntentWiseModal.js";import{IncorrectRepliesStyle as v}from"./UnsatisfactoryResponseList.style.js";const b=b=>{const{storeId:j,incorrectMessages:I,onIncorrectMessageBubbleClick:w,setShowIncorrectReplies:C,ChecklistType:x,IntentHeaderTitle:O,redirectToUnsatisfactoryResponse:U,fetchUnsatisfactoryResponseCountIntentWise:M}=b,[R,T]=i(""),k=null==I?void 0:I.length,[N,S]=i(!1);return e(v,{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(f,{children:"Unsatifactory responses"}),t("div",Object.assign({style:{cursor:"pointer"},onClick:()=>C(!1)},{children:t(s,{height:16,width:16,color:r.content.primary})}))]})),t(h,Object.assign({style:{color:r.content.secondary}},{children:"Spot unsatisfactory replies, dive deeper, and enhance with relevant data for improved responses."}))]})),!(null==I?void 0:I.length)&&t("div",Object.assign({style:{display:"flex",justifyContent:"center",alignItems:"center"}},{children:t(y,{states:m.WARNING,heading:"No unsatisfactory responses",subline:"As of now, all responses are correct",isButtonEnabled:!1,width:0,size:c.SMALL,icon:t(a,{type:l.ICON,size:c.MEDIUM,background:d.LIGHT,icon:()=>t(n,{width:16,height:16,color:r.content.warning})})})})),t("div",Object.assign({style:{display:"flex",width:"100%",justifyContent:(null==I?void 0:I.length)?"flex-start":"center"}},{children:t(p,{buttonText:"Fix all unsatisfactory responses",buttonType:"tertiary",size:"small",onClick:()=>{S(!0)},disabled:!k})})),t(u,{storeId:j,setShowUnsatisfactoryResponseModal:S,showUnsatisfactoryResponseModal:N,ChecklistType:x,UnsatisfactoryResponseIntentList:[],IntentHeaderTitle:O,fetchUnsatisfactoryResponseCountIntentWise:M,viewIntentWiseUnsatisfactoryResponse:U}),!!(null==I?void 0:I.length)&&t("div",Object.assign({className:"wrapper"},{children:I.map(((s,n)=>e("div",Object.assign({className:"bubble",onClick:()=>{w(s.messageId),T(s.messageId)},style:R===s.messageId?{backgroundColor:r.surface.hovered}:{}},{children:[t(h,Object.assign({style:{color:r.content.primary}},{children:s.message})),t("div",{children:e(g,Object.assign({style:{color:r.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{b as UnsatisfactoryResponseList};
@@ -1 +0,0 @@
1
- export declare const IncorrectRepliesStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -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};