@bikdotai/bik-component-library 0.0.662-3 → 0.0.662-4
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("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),s=require("../../assets/icons/chevronRight2.svg.js"),i=require("react"),n=require("../../constants/Theme.js"),c=require("../buttonGroup/ButtonGroup.js"),a=require("../product-picker-v2/modal.js"),o=require("../switch/Switch.js"),l=require("../text-picker/TextPickerModal.js"),r=require("../TypographyStyle.js"),d=require("./AiAssist.style.js"),O=require("./Components/SelectionModal.js"),u=require("./constants.js"),T=require("./model.js");exports.AiAssist=j=>{const{preSelectedData:p,onChange:g,productPickerData:D,storeId:b,checkListType:h,documentPickerData:C,intentPickerData:A}=j,[y,v]=i.useState(null!=p?p:T.DefaultAiAssistData),[m
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),s=require("../../assets/icons/chevronRight2.svg.js"),i=require("react"),n=require("../../constants/Theme.js"),c=require("../buttonGroup/ButtonGroup.js"),a=require("../product-picker-v2/modal.js"),o=require("../switch/Switch.js"),l=require("../text-picker/TextPickerModal.js"),r=require("../TypographyStyle.js"),d=require("./AiAssist.style.js"),O=require("./Components/SelectionModal.js"),u=require("./constants.js"),T=require("./model.js");exports.AiAssist=j=>{const{preSelectedData:p,onChange:g,productPickerData:D,storeId:b,checkListType:h,documentPickerData:C,intentPickerData:A}=j,[y,v]=i.useState(null!=p?p:T.DefaultAiAssistData),[U,m]=i.useState(),[x,E]=i.useState(),[N,M]=i.useState({}),[S,f]=i.useState(0),[P,R]=i.useState({}),[L,I]=i.useState({}),k=i.useMemo((()=>y.PRODUCT),[y]),F=i.useMemo((()=>y.DOCUMENT),[y]);i.useEffect((()=>g(y)),[y]),i.useEffect((()=>{p&&p.DOCUMENT&&Array.isArray(p.DOCUMENT.intents)&&(R((()=>{const e={};return p.DOCUMENT.intents.forEach((t=>{e[t]=[t]})),e})),v(p)),p&&p.DOCUMENT&&Array.isArray(p.DOCUMENT.documentData)&&(I((()=>{const e={};return p.DOCUMENT.documentData.forEach((t=>{e[t.type]=[...e[t.type]||[],t.id]})),e})),v(p))}),[p]);return i.useEffect((()=>{console.log("KB",y)}),[y]),t.jsxs(t.Fragment,{children:[t.jsxs(d.AiAssistMainContainer,{children:[t.jsx(r.TitleRegular,{children:"Choose Data"}),t.jsxs("div",Object.assign({className:"ai-assist-data-selection"},{children:[t.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",marginBottom:"-4px"}},{children:[t.jsx(r.BodyPrimary,{children:"Choose all store data"}),t.jsx("div",Object.assign({style:{marginLeft:"auto"}},{children:t.jsx(o.Switch,{onValueChange:t=>e.__awaiter(void 0,void 0,void 0,(function*(){yield(e=>{v((t=>Object.assign(Object.assign({},t),{selectionType:e?T.AiAssistDataSelectionType.FULL:T.AiAssistDataSelectionType.PARTIAL})))})(t)})),value:y.selectionType===T.AiAssistDataSelectionType.FULL})}))]})),y.selectionType!==T.AiAssistDataSelectionType.FULL&&t.jsxs(t.Fragment,{children:[t.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"12px"}},{children:[t.jsx(r.TitleRegular,{children:"Select Products"}),t.jsx(c.ButtonGroup,{buttonGroup:u.AiAssistProductSelectionType,gap:"16px",onButtonClick:e=>{m(void 0),(e=>{v((t=>Object.assign(Object.assign({},t),{PRODUCT:Object.assign(Object.assign({},t.PRODUCT),{selectionType:e})})))})(e)},size:"large",activeButtonId:y.PRODUCT.selectionType,iconPosition:"left",iconHeight:"24px",iconWidth:"24px",borderRadius:"8px",height:"60px",iconGap:"8px"}),t.jsxs(d.AiAssistSelectionCard,Object.assign({disable:k.selectionType===T.AiAssistDataSelectionType.FULL,onClick:()=>{k.selectionType!==T.AiAssistDataSelectionType.FULL&&m(T.AiAssistDataType.PRODUCT)}},{children:[t.jsx(r.TitleSmall,Object.assign({color:n.COLORS.content.secondary},{children:k.selectionType===T.AiAssistDataSelectionType.FULL?"All products selected":`${k.productData.length} products selected`})),t.jsx(s.default,{width:20,height:20})]}))]})),t.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"12px"}},{children:[t.jsx(r.TitleRegular,{children:"Select Documents"}),t.jsx(c.ButtonGroup,{buttonGroup:u.AiAssistDocumentSelectionType,gap:"16px",onButtonClick:e=>{m(void 0),(e=>{v((t=>Object.assign(Object.assign({},t),{DOCUMENT:Object.assign(Object.assign({},t.DOCUMENT),{selectionType:e})})))})(e)},size:"large",activeButtonId:y.DOCUMENT.selectionType,iconPosition:"top",iconHeight:"24px",iconWidth:"24px",borderRadius:"8px",height:"90px",iconGap:"12px"}),t.jsxs(d.AiAssistSelectionCard,Object.assign({disable:F.selectionType===T.AiAssistDataSelectionType.FULL,onClick:()=>{F.selectionType===T.AiAssistDataSelectionType.INTENT?m("INTENT"):F.selectionType===T.AiAssistDataSelectionType.PARTIAL&&m(T.AiAssistDataType.DOCUMENT)}},{children:[t.jsx(r.TitleSmall,Object.assign({color:n.COLORS.content.secondary},{children:F.selectionType===T.AiAssistDataSelectionType.FULL?"All documents selected":F.selectionType===T.AiAssistDataSelectionType.INTENT?`${F.intents.length} intents selected`:`${F.documentData.length} documents selected`})),t.jsx(s.default,{width:20,height:20})]}))]}))]})]}))]}),"PRODUCT"==U&&t.jsx(a.ProductPickerModal,{searchFetcher:D.searchFetcher,productFetcher:D.productFetcher,collectionFetcher:D.collectionFetcher,searchInCollectionFetcher:D.searchInCollectionFetcher,storeId:b,selectedItems:N,onAdd:e=>{Object.values(e).forEach((e=>{e.products})),f(0),M(Object.assign({},e)),v((t=>Object.assign(Object.assign({},t),{PRODUCT:Object.assign(Object.assign({},t.PRODUCT),{productData:Object.values(e).flatMap((e=>e.products?Object.values(e.products).map((e=>({id:e.id,name:e.name,imageUrl:e.image,description:e.description}))):[])),collectionData:Object.entries(e).map((e=>{let[t,s]=e;var i;return{id:t,name:s.name,imageUrl:s.image,description:null!==(i=null==s?void 0:s.description)&&void 0!==i?i:""}}))})}))),m(void 0),E(void 0)},onClickSave:S,onClose:()=>{f(0),m(void 0),E(void 0)},limit:50,visible:!!U&&(0==k.productData.length||x===T.AiAssistDataType.PRODUCT),renderWithoutModal:!1,pickerType:"PRODUCT",hideSelectionCount:!1,hideVariantCheckbox:!1,hideProductVariants:!0,hideCollectionCheckbox:!1}),"DOCUMENT"==U&&t.jsx(l.TextPickerModal,{visible:!!U&&(0==F.documentData.length||x===T.AiAssistDataType.DOCUMENT),categories:C,selectedItems:L,onAdd:e=>{var t;t=e,I(Object.assign({},t)),v((e=>Object.assign(Object.assign({},e),{DOCUMENT:Object.assign(Object.assign({},e.DOCUMENT),{documentData:Object.entries(t).flatMap((e=>{let[t,s]=e;return s.map((e=>{var s,i;return{id:e,type:t,name:(null===(i=null===(s=C.find((e=>e.id===t)))||void 0===s?void 0:s.items.find((t=>t.id===e)))||void 0===i?void 0:i.name)||""}}))}))})}))),m(void 0),E(void 0)},onClose:()=>{m(void 0),E(void 0)},title:"Select Documents"}),"INTENT"==U&&t.jsx(l.TextPickerModal,{visible:!!U&&(0==F.intents.length||"INTENT"===x),isOneDimensional:!0,categories:A,selectedItems:P,onAdd:e=>{return t=e,R(Object.assign({},t)),v((e=>Object.assign(Object.assign({},e),{DOCUMENT:Object.assign(Object.assign({},e.DOCUMENT),{intents:Object.values(t).flat()})}))),m(void 0),void E(void 0);var t},onClose:()=>{m(void 0),E(void 0)},title:"Select Intents"}),!!U&&t.jsx(O.SelectionModal,{selectionType:U,localAiAssistSelectedData:y,checkListType:h,isOpen:!!U&&("PRODUCT"==U&&k.productData.length>0||"DOCUMENT"==U&&F.documentData.length>0||"INTENT"==U&&F.intents.length>0),onClose:()=>{m(void 0),E(void 0)},onRemoveAll:()=>{"PRODUCT"==U?(v((e=>Object.assign(Object.assign({},e),{PRODUCT:Object.assign(Object.assign({},e.PRODUCT),{productData:[],collectionData:[]})}))),M({}),m(void 0),E(void 0)):"DOCUMENT"==U?(v((e=>Object.assign(Object.assign({},e),{DOCUMENT:Object.assign(Object.assign({},e.DOCUMENT),{documentData:[]})}))),I({}),m(void 0),E(void 0)):"INTENT"==U&&(v((e=>Object.assign(Object.assign({},e),{DOCUMENT:Object.assign(Object.assign({},e.DOCUMENT),{intents:[]})}))),R({}),m(void 0),E(void 0))},onRemoveSelected:(e,t)=>((e,t)=>{if("PRODUCT"==U){const s=Object.assign({},N);Object.entries(s).forEach((e=>{let[i,n]=e;s[i].products=Array.isArray(null==n?void 0:n.products)?Object.fromEntries(n.products.filter((e=>e.id!==t)).map((e=>[e.id,e]))):{}})),M(s),v((t=>Object.assign(Object.assign({},t),{PRODUCT:Object.assign(Object.assign({},t.PRODUCT),{productData:t.PRODUCT.productData.filter(((t,s)=>s!==e))})})))}else if("DOCUMENT"==U){const s=Object.assign({},L);Object.entries(s).forEach((e=>{let[i,n]=e;s[i]=n.filter((e=>e!==t))})),I(s),v((t=>Object.assign(Object.assign({},t),{DOCUMENT:Object.assign(Object.assign({},t.DOCUMENT),{documentData:t.DOCUMENT.documentData.filter(((t,s)=>s!==e))})})))}else"INTENT"==U&&(R((e=>{const s=Object.assign({},e);return Object.entries(s).forEach((e=>{let[i,n]=e;s[i]=n.filter((e=>e!==t))})),s})),v((t=>Object.assign(Object.assign({},t),{DOCUMENT:Object.assign(Object.assign({},t.DOCUMENT),{intents:t.DOCUMENT.intents.filter(((t,s)=>s!==e))})}))))})(e,t),onAdd:()=>E(U)})]})};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),r=require("../../constants/Theme.js");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),r=require("../../constants/Theme.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(e);o.default.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: row;
|
|
4
4
|
width: 100vw;
|
|
5
5
|
height: 90vh;
|
|
6
6
|
background-color: ${r.COLORS.surface.subdued};
|
|
7
7
|
margin: 16px;
|
|
8
|
-
|
|
8
|
+
`;const d=o.default.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
gap: 2px;
|
|
12
|
-
width: 33%;
|
|
12
|
+
// width: 33%;
|
|
13
|
+
width: 100%;
|
|
13
14
|
height: 100%;
|
|
14
15
|
background-color: #fff;
|
|
15
16
|
border-radius: 8px;
|
|
16
17
|
border: 1px solid ${r.COLORS.stroke.primary};
|
|
17
|
-
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
|
18
|
+
// box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
|
18
19
|
padding: 16px;
|
|
19
|
-
margin: 16px 2px; // TODO: remove this margin when integrating with the main component
|
|
20
|
+
// margin: 16px 2px; // TODO: remove this margin when integrating with the main component
|
|
20
21
|
position: relative;
|
|
21
22
|
overflow: hidden;
|
|
22
23
|
z-index: 1;
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
background-color: ${r.COLORS.background.brandLight};
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
|
-
`,
|
|
48
|
+
`,a=o.default.div`
|
|
48
49
|
display: flex;
|
|
49
50
|
flex-direction: row;
|
|
50
51
|
gap: 8px;
|
|
@@ -62,7 +63,7 @@
|
|
|
62
63
|
&:active {
|
|
63
64
|
background-color: ${e=>e.disable?r.COLORS.surface.subdued:r.COLORS.background.brandLight};
|
|
64
65
|
}
|
|
65
|
-
`,
|
|
66
|
+
`,t=o.default.div`
|
|
66
67
|
display: flex;
|
|
67
68
|
flex-direction: column;
|
|
68
69
|
gap: 16px;
|
|
@@ -108,4 +109,4 @@
|
|
|
108
109
|
padding: 16px;
|
|
109
110
|
background-color: ${r.COLORS.surface.standard};
|
|
110
111
|
}
|
|
111
|
-
`;exports.AiAssistMainContainer=d,exports.AiAssistSelectionCard=
|
|
112
|
+
`;exports.AiAssistMainContainer=d,exports.AiAssistSelectionCard=a,exports.AiAssistSelectionModalMainContainer=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e}from"../../_virtual/_tslib.js";import{
|
|
1
|
+
import{__awaiter as e}from"../../_virtual/_tslib.js";import{jsxs as t,Fragment as i,jsx as s}from"react/jsx-runtime";import n from"../../assets/icons/chevronRight2.svg.js";import{useState as c,useMemo as o,useEffect as a}from"react";import{COLORS as r}from"../../constants/Theme.js";import{ButtonGroup as l}from"../buttonGroup/ButtonGroup.js";import{ProductPickerModal as d}from"../product-picker-v2/modal.js";import{Switch as O}from"../switch/Switch.js";import{TextPickerModal as p}from"../text-picker/TextPickerModal.js";import{TitleRegular as g,BodyPrimary as T,TitleSmall as j}from"../TypographyStyle.js";import{AiAssistMainContainer as b,AiAssistSelectionCard as u}from"./AiAssist.style.js";import{SelectionModal as D}from"./Components/SelectionModal.js";import{AiAssistProductSelectionType as m,AiAssistDocumentSelectionType as h}from"./constants.js";import{DefaultAiAssistData as C,AiAssistDataSelectionType as v,AiAssistDataType as U}from"./model.js";const N=N=>{const{preSelectedData:E,onChange:f,productPickerData:y,storeId:M,checkListType:P,documentPickerData:x,intentPickerData:R}=N,[A,I]=c(null!=E?E:C),[L,k]=c(),[F,S]=c(),[B,G]=c({}),[w,V]=c(0),[W,$]=c({}),[z,H]=c({}),_=o((()=>A.PRODUCT),[A]),K=o((()=>A.DOCUMENT),[A]);a((()=>f(A)),[A]),a((()=>{E&&E.DOCUMENT&&Array.isArray(E.DOCUMENT.intents)&&($((()=>{const e={};return E.DOCUMENT.intents.forEach((t=>{e[t]=[t]})),e})),I(E)),E&&E.DOCUMENT&&Array.isArray(E.DOCUMENT.documentData)&&(H((()=>{const e={};return E.DOCUMENT.documentData.forEach((t=>{e[t.type]=[...e[t.type]||[],t.id]})),e})),I(E))}),[E]);return a((()=>{console.log("KB",A)}),[A]),t(i,{children:[t(b,{children:[s(g,{children:"Choose Data"}),t("div",Object.assign({className:"ai-assist-data-selection"},{children:[t("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",marginBottom:"-4px"}},{children:[s(T,{children:"Choose all store data"}),s("div",Object.assign({style:{marginLeft:"auto"}},{children:s(O,{onValueChange:t=>e(void 0,void 0,void 0,(function*(){yield(e=>{I((t=>Object.assign(Object.assign({},t),{selectionType:e?v.FULL:v.PARTIAL})))})(t)})),value:A.selectionType===v.FULL})}))]})),A.selectionType!==v.FULL&&t(i,{children:[t("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"12px"}},{children:[s(g,{children:"Select Products"}),s(l,{buttonGroup:m,gap:"16px",onButtonClick:e=>{k(void 0),(e=>{I((t=>Object.assign(Object.assign({},t),{PRODUCT:Object.assign(Object.assign({},t.PRODUCT),{selectionType:e})})))})(e)},size:"large",activeButtonId:A.PRODUCT.selectionType,iconPosition:"left",iconHeight:"24px",iconWidth:"24px",borderRadius:"8px",height:"60px",iconGap:"8px"}),t(u,Object.assign({disable:_.selectionType===v.FULL,onClick:()=>{_.selectionType!==v.FULL&&k(U.PRODUCT)}},{children:[s(j,Object.assign({color:r.content.secondary},{children:_.selectionType===v.FULL?"All products selected":`${_.productData.length} products selected`})),s(n,{width:20,height:20})]}))]})),t("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"12px"}},{children:[s(g,{children:"Select Documents"}),s(l,{buttonGroup:h,gap:"16px",onButtonClick:e=>{k(void 0),(e=>{I((t=>Object.assign(Object.assign({},t),{DOCUMENT:Object.assign(Object.assign({},t.DOCUMENT),{selectionType:e})})))})(e)},size:"large",activeButtonId:A.DOCUMENT.selectionType,iconPosition:"top",iconHeight:"24px",iconWidth:"24px",borderRadius:"8px",height:"90px",iconGap:"12px"}),t(u,Object.assign({disable:K.selectionType===v.FULL,onClick:()=>{K.selectionType===v.INTENT?k("INTENT"):K.selectionType===v.PARTIAL&&k(U.DOCUMENT)}},{children:[s(j,Object.assign({color:r.content.secondary},{children:K.selectionType===v.FULL?"All documents selected":K.selectionType===v.INTENT?`${K.intents.length} intents selected`:`${K.documentData.length} documents selected`})),s(n,{width:20,height:20})]}))]}))]})]}))]}),"PRODUCT"==L&&s(d,{searchFetcher:y.searchFetcher,productFetcher:y.productFetcher,collectionFetcher:y.collectionFetcher,searchInCollectionFetcher:y.searchInCollectionFetcher,storeId:M,selectedItems:B,onAdd:e=>{Object.values(e).forEach((e=>{e.products})),V(0),G(Object.assign({},e)),I((t=>Object.assign(Object.assign({},t),{PRODUCT:Object.assign(Object.assign({},t.PRODUCT),{productData:Object.values(e).flatMap((e=>e.products?Object.values(e.products).map((e=>({id:e.id,name:e.name,imageUrl:e.image,description:e.description}))):[])),collectionData:Object.entries(e).map((e=>{let[t,i]=e;var s;return{id:t,name:i.name,imageUrl:i.image,description:null!==(s=null==i?void 0:i.description)&&void 0!==s?s:""}}))})}))),k(void 0),S(void 0)},onClickSave:w,onClose:()=>{V(0),k(void 0),S(void 0)},limit:50,visible:!!L&&(0==_.productData.length||F===U.PRODUCT),renderWithoutModal:!1,pickerType:"PRODUCT",hideSelectionCount:!1,hideVariantCheckbox:!1,hideProductVariants:!0,hideCollectionCheckbox:!1}),"DOCUMENT"==L&&s(p,{visible:!!L&&(0==K.documentData.length||F===U.DOCUMENT),categories:x,selectedItems:z,onAdd:e=>{var t;t=e,H(Object.assign({},t)),I((e=>Object.assign(Object.assign({},e),{DOCUMENT:Object.assign(Object.assign({},e.DOCUMENT),{documentData:Object.entries(t).flatMap((e=>{let[t,i]=e;return i.map((e=>{var i,s;return{id:e,type:t,name:(null===(s=null===(i=x.find((e=>e.id===t)))||void 0===i?void 0:i.items.find((t=>t.id===e)))||void 0===s?void 0:s.name)||""}}))}))})}))),k(void 0),S(void 0)},onClose:()=>{k(void 0),S(void 0)},title:"Select Documents"}),"INTENT"==L&&s(p,{visible:!!L&&(0==K.intents.length||"INTENT"===F),isOneDimensional:!0,categories:R,selectedItems:W,onAdd:e=>{return t=e,$(Object.assign({},t)),I((e=>Object.assign(Object.assign({},e),{DOCUMENT:Object.assign(Object.assign({},e.DOCUMENT),{intents:Object.values(t).flat()})}))),k(void 0),void S(void 0);var t},onClose:()=>{k(void 0),S(void 0)},title:"Select Intents"}),!!L&&s(D,{selectionType:L,localAiAssistSelectedData:A,checkListType:P,isOpen:!!L&&("PRODUCT"==L&&_.productData.length>0||"DOCUMENT"==L&&K.documentData.length>0||"INTENT"==L&&K.intents.length>0),onClose:()=>{k(void 0),S(void 0)},onRemoveAll:()=>{"PRODUCT"==L?(I((e=>Object.assign(Object.assign({},e),{PRODUCT:Object.assign(Object.assign({},e.PRODUCT),{productData:[],collectionData:[]})}))),G({}),k(void 0),S(void 0)):"DOCUMENT"==L?(I((e=>Object.assign(Object.assign({},e),{DOCUMENT:Object.assign(Object.assign({},e.DOCUMENT),{documentData:[]})}))),H({}),k(void 0),S(void 0)):"INTENT"==L&&(I((e=>Object.assign(Object.assign({},e),{DOCUMENT:Object.assign(Object.assign({},e.DOCUMENT),{intents:[]})}))),$({}),k(void 0),S(void 0))},onRemoveSelected:(e,t)=>((e,t)=>{if("PRODUCT"==L){const i=Object.assign({},B);Object.entries(i).forEach((e=>{let[s,n]=e;i[s].products=Array.isArray(null==n?void 0:n.products)?Object.fromEntries(n.products.filter((e=>e.id!==t)).map((e=>[e.id,e]))):{}})),G(i),I((t=>Object.assign(Object.assign({},t),{PRODUCT:Object.assign(Object.assign({},t.PRODUCT),{productData:t.PRODUCT.productData.filter(((t,i)=>i!==e))})})))}else if("DOCUMENT"==L){const i=Object.assign({},z);Object.entries(i).forEach((e=>{let[s,n]=e;i[s]=n.filter((e=>e!==t))})),H(i),I((t=>Object.assign(Object.assign({},t),{DOCUMENT:Object.assign(Object.assign({},t.DOCUMENT),{documentData:t.DOCUMENT.documentData.filter(((t,i)=>i!==e))})})))}else"INTENT"==L&&($((e=>{const i=Object.assign({},e);return Object.entries(i).forEach((e=>{let[s,n]=e;i[s]=n.filter((e=>e!==t))})),i})),I((t=>Object.assign(Object.assign({},t),{DOCUMENT:Object.assign(Object.assign({},t.DOCUMENT),{intents:t.DOCUMENT.intents.filter(((t,i)=>i!==e))})}))))})(e,t),onAdd:()=>S(L)})]})};export{N as AiAssist};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import r from"styled-components";import{COLORS as e}from"../../constants/Theme.js";
|
|
1
|
+
import r from"styled-components";import{COLORS as e}from"../../constants/Theme.js";r.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: row;
|
|
4
4
|
width: 100vw;
|
|
5
5
|
height: 90vh;
|
|
6
6
|
background-color: ${e.surface.subdued};
|
|
7
7
|
margin: 16px;
|
|
8
|
-
|
|
8
|
+
`;const o=r.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
gap: 2px;
|
|
12
|
-
width: 33%;
|
|
12
|
+
// width: 33%;
|
|
13
|
+
width: 100%;
|
|
13
14
|
height: 100%;
|
|
14
15
|
background-color: #fff;
|
|
15
16
|
border-radius: 8px;
|
|
16
17
|
border: 1px solid ${e.stroke.primary};
|
|
17
|
-
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
|
18
|
+
// box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
|
18
19
|
padding: 16px;
|
|
19
|
-
margin: 16px 2px; // TODO: remove this margin when integrating with the main component
|
|
20
|
+
// margin: 16px 2px; // TODO: remove this margin when integrating with the main component
|
|
20
21
|
position: relative;
|
|
21
22
|
overflow: hidden;
|
|
22
23
|
z-index: 1;
|
|
@@ -44,7 +45,7 @@ import r from"styled-components";import{COLORS as e}from"../../constants/Theme.j
|
|
|
44
45
|
background-color: ${e.background.brandLight};
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
|
-
`,
|
|
48
|
+
`,i=r.div`
|
|
48
49
|
display: flex;
|
|
49
50
|
flex-direction: row;
|
|
50
51
|
gap: 8px;
|
|
@@ -62,7 +63,7 @@ import r from"styled-components";import{COLORS as e}from"../../constants/Theme.j
|
|
|
62
63
|
&:active {
|
|
63
64
|
background-color: ${r=>r.disable?e.surface.subdued:e.background.brandLight};
|
|
64
65
|
}
|
|
65
|
-
`,
|
|
66
|
+
`,d=r.div`
|
|
66
67
|
display: flex;
|
|
67
68
|
flex-direction: column;
|
|
68
69
|
gap: 16px;
|
|
@@ -108,4 +109,4 @@ import r from"styled-components";import{COLORS as e}from"../../constants/Theme.j
|
|
|
108
109
|
padding: 16px;
|
|
109
110
|
background-color: ${e.surface.standard};
|
|
110
111
|
}
|
|
111
|
-
`;export{
|
|
112
|
+
`;export{o as AiAssistMainContainer,i as AiAssistSelectionCard,d as AiAssistSelectionModalMainContainer};
|