@bikdotai/bik-component-library 0.0.655-10 → 0.0.655-11

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../assets/icons/cross.svg.js"),t=require("../../assets/icons/info.svg.js"),n=require("date-fns"),r=require("react"),i=require("../../constants/Theme.js"),a=require("../avatar/Avatar.js"),o=require("../avatar/AvatarHelper.js"),l=require("../button/Button.js"),c=require("../data-source-panel/model.js"),d=require("../states/StateComponent.js");require("../../_virtual/_tslib.js");var u=require("../TypographyStyle.js"),y=require("./UnsatisfactoryCountIntentWiseModal.js"),p=require("./UnsatisfactoryResponseList.style.js");exports.UnsatisfactoryResponseList=h=>{const{storeId:j,appType:f,incorrectMessages:g,onIncorrectMessageBubbleClick:v,setShowIncorrectReplies:x,ChecklistType:I,IntentWiseUnsatisfactoryResponse:b,IntentHeaderTitle:C,redirectToUnsatisfactoryResponse:O,fetchUnsatisfactoryResponseCountIntentWise:S,fetchUnsatisfactoryResponseCount:m}=h,[R,T]=r.useState(""),[A,w]=r.useState((null==g?void 0:g.length)>0),[U,q]=r.useState(!1);return r.useEffect((()=>{!A&&m&&m().then((e=>{e>0&&w(!0),0===e&&x(!1)}))}),[]),e.jsx("div",Object.assign({style:{overflow:"scroll",height:"100%"}},{children:e.jsxs(p.IncorrectRepliesStyle,{children:[f==c.AppType.MANIFEST&&e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"8px"}},{children:[e.jsxs("div",Object.assign({style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},{children:[e.jsx(u.TitleRegular,{children:"Unsatisfactory responses"}),e.jsx("div",Object.assign({style:{cursor:"pointer"},onClick:()=>x(!1)},{children:e.jsx(s.default,{height:16,width:16,color:i.COLORS.content.primary})}))]})),e.jsx(u.BodySecondary,Object.assign({style:{color:i.COLORS.content.secondary}},{children:"Spot unsatisfactory replies, dive deeper, and enhance with relevant data for improved responses."}))]})),!(null==g?void 0:g.length)&&e.jsx("div",Object.assign({style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:e.jsx(d.StateComponent,{states:d.StateInterface.WARNING,heading:"No unsatisfactory responses",subline:"As of now, all responses are correct",isButtonEnabled:!1,width:0,size:o.SIZE.SMALL,icon:e.jsx(a.Avatar,{type:o.AVATAR_TYPES.ICON,size:o.SIZE.MEDIUM,background:o.AVATAR_BACKGROUND.LIGHT,icon:()=>e.jsx(t.default,{width:16,height:16,color:i.COLORS.content.warning})})})})),(null==g?void 0:g.length)&&e.jsxs(e.Fragment,{children:[f==c.AppType.MANIFEST&&e.jsx("div",Object.assign({style:{display:"flex",width:"100%",justifyContent:(null==g?void 0:g.length)?"flex-start":"center"}},{children:e.jsx(l.Button,{buttonText:"Fix all unsatisfactory responses",buttonType:"tertiary",size:"small",onClick:()=>{q(!0)},disabled:!A})})),e.jsx(y.UnsatisfactoryCountIntentWiseModal,{storeId:j,setShowUnsatisfactoryResponseModal:q,showUnsatisfactoryResponseModal:U,ChecklistType:I,UnsatisfactoryResponseIntentList:b,IntentHeaderTitle:C,fetchUnsatisfactoryResponseCountIntentWise:S,viewIntentWiseUnsatisfactoryResponse:O}),!!(null==g?void 0:g.length)&&e.jsx("div",Object.assign({className:"wrapper"},{children:g.map(((s,t)=>e.jsxs("div",Object.assign({className:"bubble",onClick:()=>{v(s.messageId),T(s.messageId)},style:R===s.messageId?{backgroundColor:i.COLORS.surface.hovered}:{}},{children:[e.jsx(u.BodySecondary,Object.assign({style:{color:i.COLORS.content.primary}},{children:s.message})),e.jsx("div",{children:e.jsxs(u.Caption,Object.assign({style:{color:i.COLORS.content.secondary}},{children:[n.format(new Date(null==s?void 0:s.date),"hh:mm a")," |"," ",n.format(new Date(null==s?void 0:s.date),"dd/MM/yyyy")]}))})]}),"incorrect-reply-"+t)))}))]})]})}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../assets/icons/cross.svg.js"),t=require("../../assets/icons/info.svg.js"),n=require("date-fns"),r=require("react"),i=require("../../constants/Theme.js"),a=require("../avatar/Avatar.js"),o=require("../avatar/AvatarHelper.js"),l=require("../button/Button.js"),c=require("../data-source-panel/model.js"),d=require("../states/StateComponent.js");require("../../_virtual/_tslib.js");var u=require("../TypographyStyle.js"),y=require("./UnsatisfactoryCountIntentWiseModal.js"),p=require("./UnsatisfactoryResponseList.style.js");exports.UnsatisfactoryResponseList=h=>{const{storeId:j,appType:f,incorrectMessages:g,onIncorrectMessageBubbleClick:v,setShowIncorrectReplies:x,ChecklistType:I,IntentWiseUnsatisfactoryResponse:b,IntentHeaderTitle:C,redirectToUnsatisfactoryResponse:O,fetchUnsatisfactoryResponseCountIntentWise:S,fetchUnsatisfactoryResponseCount:m}=h,[R,T]=r.useState(""),[A,w]=r.useState((null==g?void 0:g.length)>0),[U,q]=r.useState(!1);return r.useEffect((()=>{!A&&m&&m().then((e=>{e>0&&w(!0),0===e&&x(!1)}))}),[]),e.jsx("div",Object.assign({style:{overflow:"scroll",height:"100%"}},{children:e.jsxs(p.IncorrectRepliesStyle,{children:[f==c.AppType.MANIFEST&&e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"8px"}},{children:[e.jsxs("div",Object.assign({style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},{children:[e.jsx(u.TitleRegular,{children:"Unsatisfactory responses"}),e.jsx("div",Object.assign({style:{cursor:"pointer"},onClick:()=>x(!1)},{children:e.jsx(s.default,{height:16,width:16,color:i.COLORS.content.primary})}))]})),e.jsx(u.BodySecondary,Object.assign({style:{color:i.COLORS.content.secondary}},{children:"Spot unsatisfactory replies, dive deeper, and enhance with relevant data for improved responses."}))]})),!(null==g?void 0:g.length)&&e.jsx("div",Object.assign({style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:e.jsx(d.StateComponent,{states:d.StateInterface.WARNING,heading:"No unsatisfactory responses",subline:"As of now, all responses are correct",isButtonEnabled:!1,width:0,size:o.SIZE.SMALL,icon:e.jsx(a.Avatar,{type:o.AVATAR_TYPES.ICON,size:o.SIZE.MEDIUM,background:o.AVATAR_BACKGROUND.LIGHT,icon:()=>e.jsx(t.default,{width:16,height:16,color:i.COLORS.content.warning})})})})),!!(null==g?void 0:g.length)&&e.jsxs(e.Fragment,{children:[f==c.AppType.MANIFEST&&e.jsx("div",Object.assign({style:{display:"flex",width:"100%",justifyContent:(null==g?void 0:g.length)?"flex-start":"center"}},{children:e.jsx(l.Button,{buttonText:"Fix all unsatisfactory responses",buttonType:"tertiary",size:"small",onClick:()=>{q(!0)},disabled:!A})})),e.jsx(y.UnsatisfactoryCountIntentWiseModal,{storeId:j,setShowUnsatisfactoryResponseModal:q,showUnsatisfactoryResponseModal:U,ChecklistType:I,UnsatisfactoryResponseIntentList:b,IntentHeaderTitle:C,fetchUnsatisfactoryResponseCountIntentWise:S,viewIntentWiseUnsatisfactoryResponse:O}),g&&(null==g?void 0:g.length)>0&&e.jsx("div",Object.assign({className:"wrapper"},{children:g.map(((s,t)=>e.jsxs("div",Object.assign({className:"bubble",onClick:()=>{v(s.messageId),T(s.messageId)},style:R===s.messageId?{backgroundColor:i.COLORS.surface.hovered}:{}},{children:[e.jsx(u.BodySecondary,Object.assign({style:{color:i.COLORS.content.primary}},{children:s.message})),e.jsx("div",{children:e.jsxs(u.Caption,Object.assign({style:{color:i.COLORS.content.secondary}},{children:[n.format(new Date(null==s?void 0:s.date),"hh:mm a")," |"," ",n.format(new Date(null==s?void 0:s.date),"dd/MM/yyyy")]}))})]}),"incorrect-reply-"+t)))}))]})]})}))};
@@ -4,7 +4,7 @@
4
4
  display: flex;
5
5
  flex-direction: column;
6
6
  gap: 16px;
7
- height: 95vh;
7
+ height: 100%;
8
8
  overflow-y: scroll;
9
9
  flex: 1 1 0;
10
10
  .wrapper {
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t,Fragment as s}from"react/jsx-runtime";import n from"../../assets/icons/cross.svg.js";import o from"../../assets/icons/info.svg.js";import{format as i}from"date-fns";import{useState as r,useEffect as a}from"react";import{COLORS as l}from"../../constants/Theme.js";import{Avatar as c}from"../avatar/Avatar.js";import{SIZE as d,AVATAR_TYPES as p,AVATAR_BACKGROUND as y}from"../avatar/AvatarHelper.js";import{Button as h}from"../button/Button.js";import{AppType as m}from"../data-source-panel/model.js";import{StateComponent as f,StateInterface as g}from"../states/StateComponent.js";import"../../_virtual/_tslib.js";import{TitleRegular as u,BodySecondary as v,Caption as j}from"../TypographyStyle.js";import{UnsatisfactoryCountIntentWiseModal as b}from"./UnsatisfactoryCountIntentWiseModal.js";import{IncorrectRepliesStyle as I}from"./UnsatisfactoryResponseList.style.js";const w=w=>{const{storeId:C,appType:T,incorrectMessages:U,onIncorrectMessageBubbleClick:M,setShowIncorrectReplies:O,ChecklistType:R,IntentWiseUnsatisfactoryResponse:x,IntentHeaderTitle:k,redirectToUnsatisfactoryResponse:N,fetchUnsatisfactoryResponseCountIntentWise:S,fetchUnsatisfactoryResponseCount:A}=w,[W,L]=r(""),[D,E]=r((null==U?void 0:U.length)>0),[H,z]=r(!1);return a((()=>{!D&&A&&A().then((e=>{e>0&&E(!0),0===e&&O(!1)}))}),[]),e("div",Object.assign({style:{overflow:"scroll",height:"100%"}},{children:t(I,{children:[T==m.MANIFEST&&t("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"8px"}},{children:[t("div",Object.assign({style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},{children:[e(u,{children:"Unsatisfactory responses"}),e("div",Object.assign({style:{cursor:"pointer"},onClick:()=>O(!1)},{children:e(n,{height:16,width:16,color:l.content.primary})}))]})),e(v,Object.assign({style:{color:l.content.secondary}},{children:"Spot unsatisfactory replies, dive deeper, and enhance with relevant data for improved responses."}))]})),!(null==U?void 0:U.length)&&e("div",Object.assign({style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:e(f,{states:g.WARNING,heading:"No unsatisfactory responses",subline:"As of now, all responses are correct",isButtonEnabled:!1,width:0,size:d.SMALL,icon:e(c,{type:p.ICON,size:d.MEDIUM,background:y.LIGHT,icon:()=>e(o,{width:16,height:16,color:l.content.warning})})})})),(null==U?void 0:U.length)&&t(s,{children:[T==m.MANIFEST&&e("div",Object.assign({style:{display:"flex",width:"100%",justifyContent:(null==U?void 0:U.length)?"flex-start":"center"}},{children:e(h,{buttonText:"Fix all unsatisfactory responses",buttonType:"tertiary",size:"small",onClick:()=>{z(!0)},disabled:!D})})),e(b,{storeId:C,setShowUnsatisfactoryResponseModal:z,showUnsatisfactoryResponseModal:H,ChecklistType:R,UnsatisfactoryResponseIntentList:x,IntentHeaderTitle:k,fetchUnsatisfactoryResponseCountIntentWise:S,viewIntentWiseUnsatisfactoryResponse:N}),!!(null==U?void 0:U.length)&&e("div",Object.assign({className:"wrapper"},{children:U.map(((s,n)=>t("div",Object.assign({className:"bubble",onClick:()=>{M(s.messageId),L(s.messageId)},style:W===s.messageId?{backgroundColor:l.surface.hovered}:{}},{children:[e(v,Object.assign({style:{color:l.content.primary}},{children:s.message})),e("div",{children:t(j,Object.assign({style:{color:l.content.secondary}},{children:[i(new Date(null==s?void 0:s.date),"hh:mm a")," |"," ",i(new Date(null==s?void 0:s.date),"dd/MM/yyyy")]}))})]}),"incorrect-reply-"+n)))}))]})]})}))};export{w as UnsatisfactoryResponseList};
1
+ import{jsx as e,jsxs as t,Fragment as s}from"react/jsx-runtime";import n from"../../assets/icons/cross.svg.js";import o from"../../assets/icons/info.svg.js";import{format as i}from"date-fns";import{useState as r,useEffect as a}from"react";import{COLORS as l}from"../../constants/Theme.js";import{Avatar as c}from"../avatar/Avatar.js";import{SIZE as d,AVATAR_TYPES as p,AVATAR_BACKGROUND as y}from"../avatar/AvatarHelper.js";import{Button as h}from"../button/Button.js";import{AppType as m}from"../data-source-panel/model.js";import{StateComponent as f,StateInterface as g}from"../states/StateComponent.js";import"../../_virtual/_tslib.js";import{TitleRegular as u,BodySecondary as v,Caption as j}from"../TypographyStyle.js";import{UnsatisfactoryCountIntentWiseModal as b}from"./UnsatisfactoryCountIntentWiseModal.js";import{IncorrectRepliesStyle as I}from"./UnsatisfactoryResponseList.style.js";const w=w=>{const{storeId:C,appType:T,incorrectMessages:U,onIncorrectMessageBubbleClick:M,setShowIncorrectReplies:O,ChecklistType:R,IntentWiseUnsatisfactoryResponse:x,IntentHeaderTitle:k,redirectToUnsatisfactoryResponse:N,fetchUnsatisfactoryResponseCountIntentWise:S,fetchUnsatisfactoryResponseCount:A}=w,[W,L]=r(""),[D,E]=r((null==U?void 0:U.length)>0),[H,z]=r(!1);return a((()=>{!D&&A&&A().then((e=>{e>0&&E(!0),0===e&&O(!1)}))}),[]),e("div",Object.assign({style:{overflow:"scroll",height:"100%"}},{children:t(I,{children:[T==m.MANIFEST&&t("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"8px"}},{children:[t("div",Object.assign({style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},{children:[e(u,{children:"Unsatisfactory responses"}),e("div",Object.assign({style:{cursor:"pointer"},onClick:()=>O(!1)},{children:e(n,{height:16,width:16,color:l.content.primary})}))]})),e(v,Object.assign({style:{color:l.content.secondary}},{children:"Spot unsatisfactory replies, dive deeper, and enhance with relevant data for improved responses."}))]})),!(null==U?void 0:U.length)&&e("div",Object.assign({style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:e(f,{states:g.WARNING,heading:"No unsatisfactory responses",subline:"As of now, all responses are correct",isButtonEnabled:!1,width:0,size:d.SMALL,icon:e(c,{type:p.ICON,size:d.MEDIUM,background:y.LIGHT,icon:()=>e(o,{width:16,height:16,color:l.content.warning})})})})),!!(null==U?void 0:U.length)&&t(s,{children:[T==m.MANIFEST&&e("div",Object.assign({style:{display:"flex",width:"100%",justifyContent:(null==U?void 0:U.length)?"flex-start":"center"}},{children:e(h,{buttonText:"Fix all unsatisfactory responses",buttonType:"tertiary",size:"small",onClick:()=>{z(!0)},disabled:!D})})),e(b,{storeId:C,setShowUnsatisfactoryResponseModal:z,showUnsatisfactoryResponseModal:H,ChecklistType:R,UnsatisfactoryResponseIntentList:x,IntentHeaderTitle:k,fetchUnsatisfactoryResponseCountIntentWise:S,viewIntentWiseUnsatisfactoryResponse:N}),U&&(null==U?void 0:U.length)>0&&e("div",Object.assign({className:"wrapper"},{children:U.map(((s,n)=>t("div",Object.assign({className:"bubble",onClick:()=>{M(s.messageId),L(s.messageId)},style:W===s.messageId?{backgroundColor:l.surface.hovered}:{}},{children:[e(v,Object.assign({style:{color:l.content.primary}},{children:s.message})),e("div",{children:t(j,Object.assign({style:{color:l.content.secondary}},{children:[i(new Date(null==s?void 0:s.date),"hh:mm a")," |"," ",i(new Date(null==s?void 0:s.date),"dd/MM/yyyy")]}))})]}),"incorrect-reply-"+n)))}))]})]})}))};export{w as UnsatisfactoryResponseList};
@@ -4,7 +4,7 @@ import o from"styled-components";import{COLORS as r}from"../../constants/Theme.j
4
4
  display: flex;
5
5
  flex-direction: column;
6
6
  gap: 16px;
7
- height: 95vh;
7
+ height: 100%;
8
8
  overflow-y: scroll;
9
9
  flex: 1 1 0;
10
10
  .wrapper {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.655-10",
3
+ "version": "0.0.655-11",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",