@bikdotai/bik-component-library 0.0.742-beta.19 → 0.0.742-beta.21
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/BikGiftedChat/Bubble/Bubble.js +1 -1
- package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryResponseList.style.js +2 -2
- package/dist/esm/components/BikGiftedChat/Bubble/Bubble.js +1 -1
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.style.js +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),n=require("../../../constants/Theme.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),n=require("../../../constants/Theme.js"),s=require("../../../hooks/useWindowSize.js"),t=require("../GiftedChat/types.js"),l=require("../GiftedChat/utils.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const r=a=>{var r,o,d,u;const{currentMessage:c,position:g,renderMessageText:v,renderTicks:f,renderTime:m,renderCustomView:b,isCustomViewBottom:h,isUnsatisfactoryMessageFn:y,messagesGroupedByAiTraceId:j,onPress:O,containerStyle:S,bubbleStyles:C,appType:p}=a,x=s.useWindowSize(),A=c,T=i.useMemo((()=>A.category===l.Constants.ChatActivity.Category.ACTIVITY&&A.activityType===l.Constants.ChatActivity.Type.PRIVATE_NOTE),[A.category,A.activityType]),M=i.useMemo((()=>{const[e,i]=l.isStringifiedArray(null==A?void 0:A.message);return e&&i&&Array.isArray(i)}),[null==A?void 0:A.message]),I=i.useMemo((()=>{var e,i,s;console.log("currentMessage",c),console.log("message",A),console.log("bubbleStyles",C);const l={borderRadius:8,minHeight:20,margin:0,flexGrow:x?1:0},a=(null==A?void 0:A.channelId)===t.MESSAGE_CHANNELS.GMAIL||(null==A?void 0:A.channelName)===t.MESSAGE_CHANNELS.GMAIL,r=(null==A?void 0:A.channelId)===t.MESSAGE_CHANNELS.SMTP||(null==A?void 0:A.channelName)===t.MESSAGE_CHANNELS.SMTP;let o={};if("left"===g)o="manifest"===p?C.left:Object.assign(Object.assign({},x||a||r?{maxWidth:"100%"}:{}),T?{background:(null===(e=null==A?void 0:A.meta)||void 0===e?void 0:e.aiUsed)?"linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)":n.COLORS.background.warning.light}:{backgroundColor:(null==A?void 0:A.isPrivateMail)?n.COLORS.background.blue.light:n.COLORS.surface.hovered});else if("right"===g)if("manifest"===p)o=C.right;else{const e=y&&y({aiTraceId:null===(i=A.eventProperties)||void 0===i?void 0:i.aiTraceId,messagesGroupedByAiTraceId:j});o=Object.assign(Object.assign({backgroundColor:"failed"===A.status||e?n.COLORS.background.negative.light:n.COLORS.background.brandVeryLight},T?{background:(null===(s=null==A?void 0:A.meta)||void 0===s?void 0:s.aiUsed)?"linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)":n.COLORS.background.warning.light}:{}),!x&&M?{maxWidth:500}:{})}return"manifest"===p?Object.assign({},o):Object.assign(Object.assign({},l),o)}),[null==A?void 0:A.channelId,null==A?void 0:A.channelName,null===(r=null==A?void 0:A.meta)||void 0===r?void 0:r.aiUsed,null==A?void 0:A.status,null===(o=null==A?void 0:A.eventProperties)||void 0===o?void 0:o.aiTraceId,g,x,T,M,y,j,null==A?void 0:A.isPrivateMail]),E=i.useCallback((()=>e.jsxs("div",{children:[!h&&(null==b?void 0:b(a)),null==v?void 0:v(a),h&&(null==b?void 0:b(a))]})),[h,b,v,a]);return e.jsx("div",Object.assign({style:Object.assign(Object.assign(Object.assign({display:"flex",marginTop:"manifest"===p?0:6,marginBottom:"manifest"===p?0:(null===(u=null===(d=null==c?void 0:c.messageInformation)||void 0===d?void 0:d.reactions)||void 0===u?void 0:u.length)>0?24:6,flexGrow:x?1:0},"manifest"===p?Object.assign({alignItems:"flex-end"},"right"===g?{cursor:"pointer"}:{}):{}),"manifest"===p&&"left"===g&&(null==S?void 0:S.left)?S.left:{}),"manifest"===p&&"right"===g&&(null==S?void 0:S.right)?S.right:{})},"manifest"===p?{onClick:O}:{},{children:e.jsx("div",Object.assign({style:I},{children:e.jsxs("div",{children:[e.jsx("div",Object.assign({id:c.chatActivityId||`message-${c.psqlId}`},{children:E()})),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginLeft:"32px"}},{children:[null==m?void 0:m(a),null==f?void 0:f(c)]}))]})}))}))},o=a(i).default.memo(r);exports.Bubble=o,exports.default=o;
|
package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryResponseList.style.js
CHANGED
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
height: 100%; //calc(100% - 92px);
|
|
15
15
|
overflow-y: scroll;
|
|
16
16
|
padding-right: 8px;
|
|
17
|
-
|
|
17
|
+
& div::-webkit-scrollbar-thumb {
|
|
18
18
|
background: #888;
|
|
19
19
|
border-radius: 8px;
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
& div::-webkit-scrollbar {
|
|
22
22
|
width: 6px;
|
|
23
23
|
display: block;
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as i}from"react/jsx-runtime";import n,{useMemo as t,useCallback as
|
|
1
|
+
import{jsxs as e,jsx as i}from"react/jsx-runtime";import n,{useMemo as t,useCallback as l}from"react";import{COLORS as s}from"../../../constants/Theme.js";import{useWindowSize as a}from"../../../hooks/useWindowSize.js";import{MESSAGE_CHANNELS as o}from"../GiftedChat/types.js";import{Constants as r,isStringifiedArray as d}from"../GiftedChat/utils.js";const c=n=>{var c,g,u,v;const{currentMessage:m,position:f,renderMessageText:h,renderTicks:b,renderTime:y,renderCustomView:p,isCustomViewBottom:j,isUnsatisfactoryMessageFn:T,messagesGroupedByAiTraceId:I,onPress:O,containerStyle:x,bubbleStyles:k,appType:C}=n,A=a(),M=m,w=t((()=>M.category===r.ChatActivity.Category.ACTIVITY&&M.activityType===r.ChatActivity.Type.PRIVATE_NOTE),[M.category,M.activityType]),G=t((()=>{const[e,i]=d(null==M?void 0:M.message);return e&&i&&Array.isArray(i)}),[null==M?void 0:M.message]),P=t((()=>{var e,i,n;console.log("currentMessage",m),console.log("message",M),console.log("bubbleStyles",k);const t={borderRadius:8,minHeight:20,margin:0,flexGrow:A?1:0},l=(null==M?void 0:M.channelId)===o.GMAIL||(null==M?void 0:M.channelName)===o.GMAIL,a=(null==M?void 0:M.channelId)===o.SMTP||(null==M?void 0:M.channelName)===o.SMTP;let r={};if("left"===f)r="manifest"===C?k.left:Object.assign(Object.assign({},A||l||a?{maxWidth:"100%"}:{}),w?{background:(null===(e=null==M?void 0:M.meta)||void 0===e?void 0:e.aiUsed)?"linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)":s.background.warning.light}:{backgroundColor:(null==M?void 0:M.isPrivateMail)?s.background.blue.light:s.surface.hovered});else if("right"===f)if("manifest"===C)r=k.right;else{const e=T&&T({aiTraceId:null===(i=M.eventProperties)||void 0===i?void 0:i.aiTraceId,messagesGroupedByAiTraceId:I});r=Object.assign(Object.assign({backgroundColor:"failed"===M.status||e?s.background.negative.light:s.background.brandVeryLight},w?{background:(null===(n=null==M?void 0:M.meta)||void 0===n?void 0:n.aiUsed)?"linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)":s.background.warning.light}:{}),!A&&G?{maxWidth:500}:{})}return"manifest"===C?Object.assign({},r):Object.assign(Object.assign({},t),r)}),[null==M?void 0:M.channelId,null==M?void 0:M.channelName,null===(c=null==M?void 0:M.meta)||void 0===c?void 0:c.aiUsed,null==M?void 0:M.status,null===(g=null==M?void 0:M.eventProperties)||void 0===g?void 0:g.aiTraceId,f,A,w,G,T,I,null==M?void 0:M.isPrivateMail]),S=l((()=>e("div",{children:[!j&&(null==p?void 0:p(n)),null==h?void 0:h(n),j&&(null==p?void 0:p(n))]})),[j,p,h,n]);return i("div",Object.assign({style:Object.assign(Object.assign(Object.assign({display:"flex",marginTop:"manifest"===C?0:6,marginBottom:"manifest"===C?0:(null===(v=null===(u=null==m?void 0:m.messageInformation)||void 0===u?void 0:u.reactions)||void 0===v?void 0:v.length)>0?24:6,flexGrow:A?1:0},"manifest"===C?Object.assign({alignItems:"flex-end"},"right"===f?{cursor:"pointer"}:{}):{}),"manifest"===C&&"left"===f&&(null==x?void 0:x.left)?x.left:{}),"manifest"===C&&"right"===f&&(null==x?void 0:x.right)?x.right:{})},"manifest"===C?{onClick:O}:{},{children:i("div",Object.assign({style:P},{children:e("div",{children:[i("div",Object.assign({id:m.chatActivityId||`message-${m.psqlId}`},{children:S()})),e("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginLeft:"32px"}},{children:[null==y?void 0:y(n),null==b?void 0:b(m)]}))]})}))}))},g=n.memo(c);export{g as Bubble,g as default};
|
package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.style.js
CHANGED
|
@@ -14,11 +14,11 @@ import o from"styled-components";import{COLORS as r}from"../../constants/Theme.j
|
|
|
14
14
|
height: 100%; //calc(100% - 92px);
|
|
15
15
|
overflow-y: scroll;
|
|
16
16
|
padding-right: 8px;
|
|
17
|
-
|
|
17
|
+
& div::-webkit-scrollbar-thumb {
|
|
18
18
|
background: #888;
|
|
19
19
|
border-radius: 8px;
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
& div::-webkit-scrollbar {
|
|
22
22
|
width: 6px;
|
|
23
23
|
display: block;
|
|
24
24
|
}
|