@bikdotai/bik-component-library 0.0.646-beta.7 → 0.0.646-beta.9
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/collectionScreen.d.ts +2 -0
- package/dist/cjs/components/product-picker-v2/collectionScreen.js +1 -1
- package/dist/cjs/components/product-picker-v2/modal.d.ts +6 -1
- package/dist/cjs/components/product-picker-v2/modal.js +1 -1
- package/dist/cjs/components/product-picker-v2/reducers.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/collectionScreen.d.ts +2 -0
- package/dist/esm/components/product-picker-v2/collectionScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/modal.d.ts +6 -1
- package/dist/esm/components/product-picker-v2/modal.js +1 -1
- package/dist/esm/components/product-picker-v2/reducers.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 +1 -1
- 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 +0,0 @@
|
|
|
1
|
-
import*as e from"react";var t,r;function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},a.apply(this,arguments)}var c=c=>e.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 38 38"},c),t||(t=e.createElement("path",{d:"M19.43 12.374a3.334 3.334 0 0 0-3.707 2.18 1.667 1.667 0 0 1-3.145-1.107 6.667 6.667 0 0 1 12.956 2.221c-.001 2.55-1.892 4.235-3.243 5.135a13.418 13.418 0 0 1-2.81 1.415c-.79.274-.087.03-.087.03a1.667 1.667 0 0 1-1.056-3.162l.027-.01a9.716 9.716 0 0 0 .607-.246c.41-.182.947-.45 1.47-.8 1.15-.766 1.758-1.582 1.758-2.363v-.003a3.334 3.334 0 0 0-2.77-3.29ZM18.992 25.667c-.916 0-1.659.746-1.659 1.666 0 .92.743 1.667 1.659 1.667h.016c.916 0 1.659-.746 1.659-1.667 0-.92-.743-1.666-1.659-1.666h-.016Z"})),r||(r=e.createElement("path",{fillRule:"evenodd",d:"M.667 19C.667 8.875 8.875.667 19 .667 29.125.667 37.333 8.875 37.333 19c0 10.125-8.208 18.333-18.333 18.333C8.875 37.333.667 29.125.667 19ZM19 4C10.716 4 4 10.716 4 19c0 8.284 6.716 15 15 15 8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15Z",clipRule:"evenodd"})));export{c as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as a from"react";var c;function l(){return l=Object.assign?Object.assign.bind():function(a){for(var c=1;c<arguments.length;c++){var l=arguments[c];for(var r in l)Object.prototype.hasOwnProperty.call(l,r)&&(a[r]=l[r])}return a},l.apply(this,arguments)}var r=r=>a.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},r),c||(c=a.createElement("path",{fill:"currentColor",d:"M14.127 6.732c.178-.482.223-.964.178-1.444-.044-.481-.223-.963-.446-1.4A3.83 3.83 0 0 0 12.211 2.4a3.55 3.55 0 0 0-2.228-.218 4.675 4.675 0 0 0-1.203-.875C8.334 1.087 7.8 1 7.31 1a3.733 3.733 0 0 0-2.14.657 3.386 3.386 0 0 0-1.292 1.75c-.535.13-.98.35-1.426.612-.4.306-.713.7-.98 1.094-.4.656-.535 1.4-.446 2.144.09.742.4 1.441.892 2.011-.169.463-.23.956-.179 1.444.045.482.223.963.446 1.4.401.657.98 1.182 1.649 1.488.713.306 1.47.394 2.228.219.356.35.757.656 1.203.875.445.218.98.306 1.47.306a3.733 3.733 0 0 0 2.14-.656 3.383 3.383 0 0 0 1.291-1.75 3.269 3.269 0 0 0 1.382-.612c.4-.307.757-.657.98-1.095.4-.655.535-1.4.446-2.143-.09-.744-.357-1.443-.847-2.012Zm-5.347 7.35c-.713 0-1.248-.22-1.738-.613 0 0 .044-.044.09-.044l2.851-1.618a.345.345 0 0 0 .178-.175.393.393 0 0 0 .045-.22V7.476l1.203.7v3.237c.012.347-.047.692-.173 1.016a2.575 2.575 0 0 1-.564.867 2.63 2.63 0 0 1-.865.583 2.668 2.668 0 0 1-1.027.204Zm-5.748-2.407c-.312-.525-.446-1.138-.312-1.75 0 0 .045.044.089.044l2.851 1.619c.069.035.146.05.224.044.089 0 .178 0 .222-.044l3.476-1.969v1.356l-2.896 1.662a2.688 2.688 0 0 1-2.006.263 2.6 2.6 0 0 1-1.648-1.225Zm-.758-6.08a2.702 2.702 0 0 1 1.382-1.14v3.327c0 .086 0 .175.044.218.035.078.099.14.178.175l3.476 1.97-1.203.7-2.852-1.62a2.623 2.623 0 0 1-.784-.665 2.57 2.57 0 0 1-.463-.91c-.179-.656-.134-1.443.222-2.056Zm9.848 2.23L8.646 5.857l1.203-.7 2.852 1.618c.445.263.802.612 1.025 1.05.222.437.356.92.312 1.444a2.575 2.575 0 0 1-.535 1.356c-.312.394-.713.7-1.203.875V8.175c0-.088 0-.175-.045-.218 0 0-.044-.089-.133-.132Zm1.203-1.75s-.045-.043-.09-.043l-2.851-1.62c-.09-.043-.134-.043-.223-.043s-.178 0-.223.044L6.463 6.382V5.025l2.896-1.662c.446-.263.936-.35 1.47-.35.49 0 .98.175 1.426.481.402.306.758.7.936 1.138.178.437.223.962.134 1.443Zm-7.486 2.45-1.203-.7v-3.28c0-.482.133-1.007.4-1.4.268-.438.67-.745 1.115-.963.454-.224.969-.301 1.47-.22.49.045.98.263 1.382.57 0 0-.045.043-.09.043l-2.851 1.62a.345.345 0 0 0-.178.174c-.045.088-.045.131-.045.219v3.937Zm.624-1.4 1.56-.875 1.559.875v1.75l-1.56.875-1.56-.875v-1.75Z"})));export{r as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as a from"react";var r,t;function e(){return e=Object.assign?Object.assign.bind():function(a){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(a[e]=t[e])}return a},e.apply(this,arguments)}var n=n=>a.createElement("svg",e({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},n),r||(r=a.createElement("path",{fill:"currentColor",d:"M2.167 4.667a2.5 2.5 0 0 1 2.5-2.5h1.666a.833.833 0 0 0 0-1.667H4.667A4.167 4.167 0 0 0 .5 4.667v6.666A4.167 4.167 0 0 0 4.667 15.5h6.666a4.167 4.167 0 0 0 4.167-4.167V9.667a.833.833 0 1 0-1.667 0v1.666a2.5 2.5 0 0 1-2.5 2.5H4.667a2.5 2.5 0 0 1-2.5-2.5V4.667Z"})),t||(t=a.createElement("path",{fill:"currentColor",d:"M10.5.5a.833.833 0 0 0 0 1.667h2.155L7.41 7.41a.833.833 0 0 0 1.178 1.178l5.244-5.244V5.5a.833.833 0 0 0 1.667 0V1.333A.833.833 0 0 0 14.667.5H10.5Z"})));export{n as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as e from"react";var r,t;function a(){return a=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},a.apply(this,arguments)}var l=l=>e.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 21 18"},l),r||(r=e.createElement("path",{fill:"currentColor",d:"M1.2 0a1 1 0 0 0 0 2h5v15a1 1 0 1 0 2 0V2h5a1 1 0 0 0 0-2h-12Z"})),t||(t=e.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M17.646 12.816a5.71 5.71 0 0 0 .04-.101A4 4 0 1 1 20.2 9v.035c0 .998 0 2.782-.697 4.524-.729 1.823-2.201 3.555-5.016 4.399a1 1 0 0 1-.574-1.916c2.185-.656 3.213-1.924 3.733-3.226ZM14.2 9a2 2 0 1 1 4 0 2 2 0 0 1-4 0Z",clipRule:"evenodd"})));export{l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as a from"react";var e;function c(){return c=Object.assign?Object.assign.bind():function(a){for(var e=1;e<arguments.length;e++){var c=arguments[e];for(var r in c)Object.prototype.hasOwnProperty.call(c,r)&&(a[r]=c[r])}return a},c.apply(this,arguments)}var r=r=>a.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},r),e||(e=a.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.667 8A6.667 6.667 0 0 1 8 14.668h-.004a6.667 6.667 0 1 1 6.67-6.666Zm-1.888 2.37a5.356 5.356 0 0 1-2.41 2.41c.043-.087.085-.175.126-.266.2-.452.37-.962.502-1.516a8.789 8.789 0 0 0 1.516-.502c.09-.04.18-.082.266-.126ZM13.333 8c0 .152-.066.346-.287.58-.225.235-.582.478-1.074.697-.221.098-.463.189-.724.27a13.914 13.914 0 0 0 0-3.093c.26.081.503.172.724.27.492.219.849.462 1.074.698.221.233.287.427.287.579Zm-.554-2.369a6.57 6.57 0 0 0-.266-.125c-.451-.201-.962-.37-1.516-.503a8.796 8.796 0 0 0-.502-1.516c-.04-.09-.082-.179-.126-.266a5.356 5.356 0 0 1 2.41 2.41Zm-3.233-.879a6.724 6.724 0 0 0-.27-.723c-.219-.492-.462-.85-.698-1.074-.233-.221-.427-.288-.578-.288-.152 0-.346.067-.579.288-.236.225-.48.582-.698 1.074-.098.22-.188.463-.27.723a13.908 13.908 0 0 1 3.093 0Zm-4.544.251a8.79 8.79 0 0 1 .503-1.516c.04-.09.082-.179.125-.265a5.356 5.356 0 0 0-2.41 2.41 6.59 6.59 0 0 1 .267-.126c.451-.2.961-.37 1.515-.503ZM3.221 10.37a5.356 5.356 0 0 0 2.409 2.41 6.638 6.638 0 0 1-.125-.266c-.2-.452-.37-.962-.503-1.516a8.794 8.794 0 0 1-1.515-.502c-.09-.04-.18-.082-.266-.126Zm1.53-.823a6.722 6.722 0 0 1-.723-.27c-.492-.219-.849-.462-1.074-.698-.221-.233-.287-.427-.287-.578 0-.152.066-.346.287-.579.225-.236.582-.48 1.074-.698.22-.098.463-.188.723-.27a13.91 13.91 0 0 0 0 3.093Zm1.387.315A12.293 12.293 0 0 1 6 8.001c0-.658.049-1.284.138-1.862A12.293 12.293 0 0 1 8 6.001c.657 0 1.284.049 1.861.138C9.951 6.717 10 7.343 10 8c0 .657-.05 1.284-.139 1.861-.577.09-1.204.139-1.861.139-.658 0-1.284-.05-1.862-.139Zm.315 1.387c.082.26.172.503.27.723.219.492.462.85.698 1.074.233.222.427.288.579.288.15 0 .345-.066.578-.288.236-.225.48-.582.698-1.073a6.73 6.73 0 0 0 .27-.724 13.907 13.907 0 0 1-3.093 0Z",clipRule:"evenodd"})));export{r as default};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { footerButtonOptionModel, MessageSource } from './model';
|
|
3
|
-
interface SourceInfoFooterProps {
|
|
4
|
-
sourceIntent: string;
|
|
5
|
-
messageSource?: MessageSource;
|
|
6
|
-
hideAddDataButton?: boolean;
|
|
7
|
-
hideHeading?: boolean;
|
|
8
|
-
insights?: string;
|
|
9
|
-
faqCount?: number;
|
|
10
|
-
storeId: string;
|
|
11
|
-
trainingSourceCount: {
|
|
12
|
-
[k in string]: number;
|
|
13
|
-
};
|
|
14
|
-
ShowTrainingDataSource: Record<string, string>;
|
|
15
|
-
ChecklistType: Record<string, string>;
|
|
16
|
-
footerButtonOption?: footerButtonOptionModel;
|
|
17
|
-
}
|
|
18
|
-
declare const SourceInfoFooter: import("react").MemoExoticComponent<(props: SourceInfoFooterProps) => import("react/jsx-runtime").JSX.Element>;
|
|
19
|
-
export default SourceInfoFooter;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import i from"../../assets/icons/alert_triangle.svg.js";import o from"../../assets/icons/plus.svg.js";import{memo as s,useState as l,useMemo as d,useEffect as r}from"react";import{COLORS as a}from"../../constants/Theme.js";import{Button as c}from"../button/Button.js";import{BodyCaption as u}from"../TypographyStyle.js";import{SourceInfoFooterStyle as h}from"./DataSourcePanel.style.js";const g=s((s=>{const{sourceIntent:g,hideHeading:T,messageSource:v,trainingSourceCount:b={},ShowTrainingDataSource:f={},ChecklistType:p,footerButtonOption:y}=s,[O,_]=l({}),I=f,[j,C]=l(!0),[D,N]=l(!0),R=d((()=>{const e=(null==b?void 0:b[g])||0;return e<=1?"There is "+e+"data source added to the identified intent":`There are ${e} data sources added to the identified intent`}),[b,g]);return r((()=>{var e,t;if(g){if(null===(e=null==v?void 0:v.sources)||void 0===e?void 0:e.length)if(I[g])g===p.ORDER_ENQUIRY&&N(!1);else{const e=null!==(t=null==y?void 0:y.title)&&void 0!==t?t:v.sources[0].insights,n=null==y?void 0:y.subtitle;_({title:e,subTitle:n})}(I[g]||[p.PRODUCT_DETAILS,p.ORDER_MODIFICATION,p.ORDER_CANCELLATION,p.ORDER_TRACKING].includes(g))&&C(!1)}}),[null==v?void 0:v.messageId,b,g]),e(h,{children:!O.title&&b&&g in b?t(n,{children:[e(m,{hideHeading:null!=T&&T}),t("div",Object.assign({className:"source_info_details "+(b[g]>0?"":"no_data_source")},{children:[b[g]>0&&D?t(n,{children:[e(u,{children:R}),e(u,Object.assign({color:a.content.secondary},{children:"Improve responses by adding more data sources for the identified intent"}))]}):D&&t("div",Object.assign({className:"no_data_source_title"},{children:[e(i,{width:15,height:15,color:a.content.negative,style:{marginTop:2}}),e(u,{children:"No data sources added to the identified link"})]})),!y||y.hideAddDataButton||j?e(n,{}):e(c,{size:"small",buttonType:"tertiary",LeadingIcon:o,buttonText:(null==y?void 0:y.buttonTitle.length)>0?null==y?void 0:y.buttonTitle:"Add relevant data",matchParentWidth:!0,onClick:y.onClick,style:{backgroundColor:"unset"}})]}))]}):t(n,{children:[e(m,{hideHeading:null!=T&&T}),t("div",Object.assign({className:"source_info_details"},{children:[D&&t(n,{children:[e(u,{children:O.title}),e(u,Object.assign({color:a.content.secondary},{children:O.subTitle}))]}),!y||y.hideAddDataButton||j?e(n,{}):e(c,{size:"small",buttonType:"tertiary",LeadingIcon:o,buttonText:(null==y?void 0:y.buttonTitle.length)>0?null==y?void 0:y.buttonTitle:"Add relevant data",matchParentWidth:!0,onClick:y.onClick,style:{backgroundColor:"unset"}})]}))]})})})),m=s((t=>t.hideHeading?null:e(u,Object.assign({color:a.content.secondary},{children:"Training insights"}))));m.displayName="TrainingInsightsHeading",g.displayName="SourceInfoFooter";export{g as default};
|
|
@@ -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};
|