@bikdotai/bik-component-library 0.0.742-beta.13 → 0.0.742-beta.14

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"),i=require("react"),n=require("../../../constants/Theme.js"),s=require("../../../hooks/useWindowSize.js"),t=require("../GiftedChat/types.js"),a=require("../GiftedChat/utils.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const r=l=>{var r,o,d,u;const{currentMessage:c,position:v,renderMessageText:g,renderTicks:f,renderTime:m,renderCustomView:h,isCustomViewBottom:y,isUnsatisfactoryMessageFn:b,messagesGroupedByAiTraceId:j,dynamicStyles1:O,appType:C}=l;console.log("sample");const S=s.useWindowSize(),p=c,x=i.useMemo((()=>p.category===a.Constants.ChatActivity.Category.ACTIVITY&&p.activityType===a.Constants.ChatActivity.Type.PRIVATE_NOTE),[p.category,p.activityType]),A=i.useMemo((()=>{const[e,i]=a.isStringifiedArray(null==p?void 0:p.message);return e&&i&&Array.isArray(i)}),[null==p?void 0:p.message]),T=i.useMemo((()=>{var e,i,s;const a={borderRadius:8,minHeight:20,margin:0,flexGrow:S?1:0},l=(null==p?void 0:p.channelId)===t.MESSAGE_CHANNELS.GMAIL||(null==p?void 0:p.channelName)===t.MESSAGE_CHANNELS.GMAIL,r=(null==p?void 0:p.channelId)===t.MESSAGE_CHANNELS.SMTP||(null==p?void 0:p.channelName)===t.MESSAGE_CHANNELS.SMTP;let o={};if("left"===v)o="manifest"===C?O.left:Object.assign(Object.assign({},S||l||r?{maxWidth:"100%"}:{}),x?{background:(null===(e=null==p?void 0:p.meta)||void 0===e?void 0:e.aiUsed)?"linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)":n.COLORS.background.warning.light}:{backgroundColor:(null==p?void 0:p.isPrivateMail)?n.COLORS.background.blue.light:n.COLORS.surface.hovered});else if("right"===v)if("manifest"===C)o=O.right;else{const e=b&&b({aiTraceId:null===(i=p.eventProperties)||void 0===i?void 0:i.aiTraceId,messagesGroupedByAiTraceId:j});o=Object.assign(Object.assign({backgroundColor:"failed"===p.status||e?n.COLORS.background.negative.light:n.COLORS.background.brandVeryLight},x?{background:(null===(s=null==p?void 0:p.meta)||void 0===s?void 0:s.aiUsed)?"linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)":n.COLORS.background.warning.light}:{}),!S&&A?{maxWidth:500}:{})}return"manifest"===C?Object.assign({},o):Object.assign(Object.assign({},a),o)}),[null==p?void 0:p.channelId,null==p?void 0:p.channelName,null===(r=null==p?void 0:p.meta)||void 0===r?void 0:r.aiUsed,null==p?void 0:p.status,null===(o=null==p?void 0:p.eventProperties)||void 0===o?void 0:o.aiTraceId,v,S,x,A,b,j,null==p?void 0:p.isPrivateMail]),M=i.useCallback((()=>e.jsxs("div",{children:[!y&&(null==h?void 0:h(l)),null==g?void 0:g(l),y&&(null==h?void 0:h(l))]})),[y,h,g,l]);return e.jsx("div",Object.assign({style:{display:"flex",marginTop:6,marginBottom:(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:S?1:0}},{children:e.jsx("div",Object.assign({style:T},{children:e.jsxs("div",{children:[e.jsx("div",Object.assign({id:c.chatActivityId||`message-${c.psqlId}`},{children:M()})),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginLeft:"32px"}},{children:[null==m?void 0:m(l),null==f?void 0:f(c)]}))]})}))}))},o=l(i).default.memo(r);exports.Bubble=o,exports.default=o;
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"),a=require("../GiftedChat/utils.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const r=l=>{var r,o,d,u;const{currentMessage:c,position:v,renderMessageText:g,renderTicks:f,renderTime:m,renderCustomView:h,isCustomViewBottom:y,isUnsatisfactoryMessageFn:b,messagesGroupedByAiTraceId:j,onPress:C,dynamicStyles1:O,appType:S}=l;console.log("sample");const p=s.useWindowSize(),x=c,A=i.useMemo((()=>x.category===a.Constants.ChatActivity.Category.ACTIVITY&&x.activityType===a.Constants.ChatActivity.Type.PRIVATE_NOTE),[x.category,x.activityType]),T=i.useMemo((()=>{const[e,i]=a.isStringifiedArray(null==x?void 0:x.message);return e&&i&&Array.isArray(i)}),[null==x?void 0:x.message]),M=i.useMemo((()=>{var e,i,s;const a={borderRadius:8,minHeight:20,margin:0,flexGrow:p?1:0},l=(null==x?void 0:x.channelId)===t.MESSAGE_CHANNELS.GMAIL||(null==x?void 0:x.channelName)===t.MESSAGE_CHANNELS.GMAIL,r=(null==x?void 0:x.channelId)===t.MESSAGE_CHANNELS.SMTP||(null==x?void 0:x.channelName)===t.MESSAGE_CHANNELS.SMTP;let o={};if("left"===v)o="manifest"===S?O.left:Object.assign(Object.assign({},p||l||r?{maxWidth:"100%"}:{}),A?{background:(null===(e=null==x?void 0:x.meta)||void 0===e?void 0:e.aiUsed)?"linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)":n.COLORS.background.warning.light}:{backgroundColor:(null==x?void 0:x.isPrivateMail)?n.COLORS.background.blue.light:n.COLORS.surface.hovered});else if("right"===v)if("manifest"===S)o=O.right;else{const e=b&&b({aiTraceId:null===(i=x.eventProperties)||void 0===i?void 0:i.aiTraceId,messagesGroupedByAiTraceId:j});o=Object.assign(Object.assign({backgroundColor:"failed"===x.status||e?n.COLORS.background.negative.light:n.COLORS.background.brandVeryLight},A?{background:(null===(s=null==x?void 0:x.meta)||void 0===s?void 0:s.aiUsed)?"linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)":n.COLORS.background.warning.light}:{}),!p&&T?{maxWidth:500}:{})}return"manifest"===S?Object.assign({},o):Object.assign(Object.assign({},a),o)}),[null==x?void 0:x.channelId,null==x?void 0:x.channelName,null===(r=null==x?void 0:x.meta)||void 0===r?void 0:r.aiUsed,null==x?void 0:x.status,null===(o=null==x?void 0:x.eventProperties)||void 0===o?void 0:o.aiTraceId,v,p,A,T,b,j,null==x?void 0:x.isPrivateMail]),I=i.useCallback((()=>e.jsxs("div",{children:[!y&&(null==h?void 0:h(l)),null==g?void 0:g(l),y&&(null==h?void 0:h(l))]})),[y,h,g,l]);return e.jsx("div",Object.assign({style:{display:"flex",marginTop:6,marginBottom:(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:p?1:0},onClick:C},{children:e.jsx("div",Object.assign({style:M},{children:e.jsxs("div",{children:[e.jsx("div",Object.assign({id:c.chatActivityId||`message-${c.psqlId}`},{children:I()})),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginLeft:"32px"}},{children:[null==m?void 0:m(l),null==f?void 0:f(c)]}))]})}))}))},o=l(i).default.memo(r);exports.Bubble=o,exports.default=o;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const Menus: ({
2
3
  displayName: string;
3
4
  key: number;
@@ -1 +1 @@
1
- import{jsxs as e,jsx as i}from"react/jsx-runtime";import n,{useMemo as t,useCallback as a}from"react";import{COLORS as l}from"../../../constants/Theme.js";import{useWindowSize as o}from"../../../hooks/useWindowSize.js";import{MESSAGE_CHANNELS as s}from"../GiftedChat/types.js";import{Constants as r,isStringifiedArray as d}from"../GiftedChat/utils.js";const c=n=>{var c,u,v,g;const{currentMessage:m,position:f,renderMessageText:h,renderTicks:y,renderTime:p,renderCustomView:b,isCustomViewBottom:T,isUnsatisfactoryMessageFn:j,messagesGroupedByAiTraceId:I,dynamicStyles1:x,appType:O}=n;console.log("sample");const k=o(),A=m,C=t((()=>A.category===r.ChatActivity.Category.ACTIVITY&&A.activityType===r.ChatActivity.Type.PRIVATE_NOTE),[A.category,A.activityType]),M=t((()=>{const[e,i]=d(null==A?void 0:A.message);return e&&i&&Array.isArray(i)}),[null==A?void 0:A.message]),w=t((()=>{var e,i,n;const t={borderRadius:8,minHeight:20,margin:0,flexGrow:k?1:0},a=(null==A?void 0:A.channelId)===s.GMAIL||(null==A?void 0:A.channelName)===s.GMAIL,o=(null==A?void 0:A.channelId)===s.SMTP||(null==A?void 0:A.channelName)===s.SMTP;let r={};if("left"===f)r="manifest"===O?x.left:Object.assign(Object.assign({},k||a||o?{maxWidth:"100%"}:{}),C?{background:(null===(e=null==A?void 0:A.meta)||void 0===e?void 0:e.aiUsed)?"linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)":l.background.warning.light}:{backgroundColor:(null==A?void 0:A.isPrivateMail)?l.background.blue.light:l.surface.hovered});else if("right"===f)if("manifest"===O)r=x.right;else{const e=j&&j({aiTraceId:null===(i=A.eventProperties)||void 0===i?void 0:i.aiTraceId,messagesGroupedByAiTraceId:I});r=Object.assign(Object.assign({backgroundColor:"failed"===A.status||e?l.background.negative.light:l.background.brandVeryLight},C?{background:(null===(n=null==A?void 0:A.meta)||void 0===n?void 0:n.aiUsed)?"linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)":l.background.warning.light}:{}),!k&&M?{maxWidth:500}:{})}return"manifest"===O?Object.assign({},r):Object.assign(Object.assign({},t),r)}),[null==A?void 0:A.channelId,null==A?void 0:A.channelName,null===(c=null==A?void 0:A.meta)||void 0===c?void 0:c.aiUsed,null==A?void 0:A.status,null===(u=null==A?void 0:A.eventProperties)||void 0===u?void 0:u.aiTraceId,f,k,C,M,j,I,null==A?void 0:A.isPrivateMail]),G=a((()=>e("div",{children:[!T&&(null==b?void 0:b(n)),null==h?void 0:h(n),T&&(null==b?void 0:b(n))]})),[T,b,h,n]);return i("div",Object.assign({style:{display:"flex",marginTop:6,marginBottom:(null===(g=null===(v=null==m?void 0:m.messageInformation)||void 0===v?void 0:v.reactions)||void 0===g?void 0:g.length)>0?24:6,flexGrow:k?1:0}},{children:i("div",Object.assign({style:w},{children:e("div",{children:[i("div",Object.assign({id:m.chatActivityId||`message-${m.psqlId}`},{children:G()})),e("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginLeft:"32px"}},{children:[null==p?void 0:p(n),null==y?void 0:y(m)]}))]})}))}))},u=n.memo(c);export{u as Bubble,u as default};
1
+ import{jsxs as e,jsx as i}from"react/jsx-runtime";import n,{useMemo as t,useCallback as a}from"react";import{COLORS as l}from"../../../constants/Theme.js";import{useWindowSize as o}from"../../../hooks/useWindowSize.js";import{MESSAGE_CHANNELS as s}from"../GiftedChat/types.js";import{Constants as r,isStringifiedArray as d}from"../GiftedChat/utils.js";const c=n=>{var c,u,v,g;const{currentMessage:m,position:f,renderMessageText:h,renderTicks:y,renderTime:p,renderCustomView:b,isCustomViewBottom:T,isUnsatisfactoryMessageFn:j,messagesGroupedByAiTraceId:I,onPress:k,dynamicStyles1:x,appType:C}=n;console.log("sample");const O=o(),A=m,M=t((()=>A.category===r.ChatActivity.Category.ACTIVITY&&A.activityType===r.ChatActivity.Type.PRIVATE_NOTE),[A.category,A.activityType]),w=t((()=>{const[e,i]=d(null==A?void 0:A.message);return e&&i&&Array.isArray(i)}),[null==A?void 0:A.message]),G=t((()=>{var e,i,n;const t={borderRadius:8,minHeight:20,margin:0,flexGrow:O?1:0},a=(null==A?void 0:A.channelId)===s.GMAIL||(null==A?void 0:A.channelName)===s.GMAIL,o=(null==A?void 0:A.channelId)===s.SMTP||(null==A?void 0:A.channelName)===s.SMTP;let r={};if("left"===f)r="manifest"===C?x.left:Object.assign(Object.assign({},O||a||o?{maxWidth:"100%"}:{}),M?{background:(null===(e=null==A?void 0:A.meta)||void 0===e?void 0:e.aiUsed)?"linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)":l.background.warning.light}:{backgroundColor:(null==A?void 0:A.isPrivateMail)?l.background.blue.light:l.surface.hovered});else if("right"===f)if("manifest"===C)r=x.right;else{const e=j&&j({aiTraceId:null===(i=A.eventProperties)||void 0===i?void 0:i.aiTraceId,messagesGroupedByAiTraceId:I});r=Object.assign(Object.assign({backgroundColor:"failed"===A.status||e?l.background.negative.light:l.background.brandVeryLight},M?{background:(null===(n=null==A?void 0:A.meta)||void 0===n?void 0:n.aiUsed)?"linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)":l.background.warning.light}:{}),!O&&w?{maxWidth:500}:{})}return"manifest"===C?Object.assign({},r):Object.assign(Object.assign({},t),r)}),[null==A?void 0:A.channelId,null==A?void 0:A.channelName,null===(c=null==A?void 0:A.meta)||void 0===c?void 0:c.aiUsed,null==A?void 0:A.status,null===(u=null==A?void 0:A.eventProperties)||void 0===u?void 0:u.aiTraceId,f,O,M,w,j,I,null==A?void 0:A.isPrivateMail]),P=a((()=>e("div",{children:[!T&&(null==b?void 0:b(n)),null==h?void 0:h(n),T&&(null==b?void 0:b(n))]})),[T,b,h,n]);return i("div",Object.assign({style:{display:"flex",marginTop:6,marginBottom:(null===(g=null===(v=null==m?void 0:m.messageInformation)||void 0===v?void 0:v.reactions)||void 0===g?void 0:g.length)>0?24:6,flexGrow:O?1:0},onClick:k},{children:i("div",Object.assign({style:G},{children:e("div",{children:[i("div",Object.assign({id:m.chatActivityId||`message-${m.psqlId}`},{children:P()})),e("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginLeft:"32px"}},{children:[null==p?void 0:p(n),null==y?void 0:y(m)]}))]})}))}))},u=n.memo(c);export{u as Bubble,u as default};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const Menus: ({
2
3
  displayName: string;
3
4
  key: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.742-beta.13",
3
+ "version": "0.0.742-beta.14",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",