@bikdotai/bik-component-library 0.0.742-beta.7 → 0.0.742-beta.70
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/BikGiftedChat/Bubble/types.d.ts +13 -0
- package/dist/cjs/components/BikGiftedChat/Bubble/types.js +1 -0
- package/dist/cjs/components/BikGiftedChat/GiftedChat/Day.d.ts +2 -0
- package/dist/cjs/components/BikGiftedChat/GiftedChat/Day.js +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/GiftedChat.js +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/types.d.ts +60 -2
- package/dist/cjs/components/TypographyStyle.d.ts +8 -0
- package/dist/cjs/components/TypographyStyle.js +14 -13
- package/dist/cjs/components/carousel-preview/CarouselPreview.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
- package/dist/cjs/components/list-item/themes.d.ts +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
- package/dist/cjs/components/toaster/Toaster.d.ts +2 -0
- package/dist/cjs/components/toaster/Toaster.js +1 -1
- package/dist/cjs/components/toaster/Toaster.styled.js +1 -1
- package/dist/cjs/constants/Theme.d.ts +5 -0
- package/dist/cjs/constants/Theme.js +1 -1
- package/dist/esm/components/BikGiftedChat/Bubble/Bubble.js +1 -1
- package/dist/esm/components/BikGiftedChat/Bubble/types.d.ts +13 -0
- package/dist/esm/components/BikGiftedChat/Bubble/types.js +1 -0
- package/dist/esm/components/BikGiftedChat/GiftedChat/Day.d.ts +2 -0
- package/dist/esm/components/BikGiftedChat/GiftedChat/Day.js +1 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/GiftedChat.js +1 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/types.d.ts +60 -2
- package/dist/esm/components/TypographyStyle.d.ts +8 -0
- package/dist/esm/components/TypographyStyle.js +13 -12
- package/dist/esm/components/carousel-preview/CarouselPreview.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
- package/dist/esm/components/list-item/themes.d.ts +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
- package/dist/esm/components/toaster/Toaster.d.ts +2 -0
- package/dist/esm/components/toaster/Toaster.js +1 -1
- package/dist/esm/components/toaster/Toaster.styled.js +1 -1
- package/dist/esm/constants/Theme.d.ts +5 -0
- package/dist/esm/constants/Theme.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),t=require("../../../constants/Theme.js"),n=require("../../../hooks/useWindowSize.js"),s=require("../GiftedChat/types.js"),a=require("../GiftedChat/utils.js"),r=require("./types.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const o=l=>{var o,d,u,c;const{currentMessage:f,position:g,renderMessageText:p,renderTicks:v,renderTime:h,renderCustomView:y,isCustomViewBottom:b,isUnsatisfactoryMessageFn:j,messagesGroupedByAiTraceId:C,onPress:m,containerStyle:A,bubbleStyles:T,appType:O=r.GiftedChatAppType.Bik}=l,M=n.useWindowSize(),S=f,x=i.useMemo((()=>S.category===a.Constants.ChatActivity.Category.ACTIVITY&&S.activityType===a.Constants.ChatActivity.Type.PRIVATE_NOTE),[S.category,S.activityType]),G=i.useMemo((()=>{const[e,i]=a.isStringifiedArray(null==S?void 0:S.message);return e&&i&&Array.isArray(i)}),[null==S?void 0:S.message]),I=i.useMemo((()=>{var e,i,n;const a={borderRadius:8,minHeight:20,margin:0,flexGrow:M?1:0},l=(null==S?void 0:S.channelId)===s.MESSAGE_CHANNELS.GMAIL||(null==S?void 0:S.channelName)===s.MESSAGE_CHANNELS.GMAIL,o=(null==S?void 0:S.channelId)===s.MESSAGE_CHANNELS.SMTP||(null==S?void 0:S.channelName)===s.MESSAGE_CHANNELS.SMTP;let d={};if("left"===g)d=O===r.GiftedChatAppType.Manifest?T&&"object"==typeof T.left?T.left:{}:Object.assign(Object.assign({},M||l||o?{maxWidth:"100%"}:{}),x?{background:(null===(e=null==S?void 0:S.meta)||void 0===e?void 0:e.aiUsed)?"linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)":t.COLORS.background.warning.light}:{backgroundColor:(null==S?void 0:S.isPrivateMail)?t.COLORS.background.blue.light:t.COLORS.surface.hovered});else if("right"===g)if(O===r.GiftedChatAppType.Manifest)d=T&&"object"==typeof T.right?T.right:{};else{const e=j&&j({aiTraceId:null===(i=S.eventProperties)||void 0===i?void 0:i.aiTraceId,messagesGroupedByAiTraceId:C});d=Object.assign(Object.assign({backgroundColor:"failed"===S.status||e?t.COLORS.background.negative.light:t.COLORS.background.brandVeryLight},x?{background:(null===(n=null==S?void 0:S.meta)||void 0===n?void 0:n.aiUsed)?"linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)":t.COLORS.background.warning.light}:{}),!M&&G?{maxWidth:500}:{})}return O===r.GiftedChatAppType.Manifest?Object.assign({},d):Object.assign(Object.assign({},a),d)}),[null==S?void 0:S.channelId,null==S?void 0:S.channelName,null===(o=null==S?void 0:S.meta)||void 0===o?void 0:o.aiUsed,null==S?void 0:S.status,null===(d=null==S?void 0:S.eventProperties)||void 0===d?void 0:d.aiTraceId,g,M,x,G,j,C,null==S?void 0:S.isPrivateMail,T,O]),k=i.useCallback((()=>e.jsxs("div",{children:[!b&&(null==y?void 0:y(l)),null==p?void 0:p(l),b&&(null==y?void 0:y(l))]})),[b,y,p,l]);return e.jsx("div",Object.assign({style:Object.assign(Object.assign({display:"flex",marginTop:O===r.GiftedChatAppType.Manifest?0:6,marginBottom:O===r.GiftedChatAppType.Manifest?0:(null===(c=null===(u=null==f?void 0:f.messageInformation)||void 0===u?void 0:u.reactions)||void 0===c?void 0:c.length)>0?24:6,flexGrow:M?1:0},O===r.GiftedChatAppType.Manifest?Object.assign({alignItems:"flex-end"},"right"===g?{cursor:"pointer"}:{}):{}),O!==r.GiftedChatAppType.Manifest||"object"!=typeof A?{}:"left"===g&&"left"in A&&A.left&&"object"==typeof A.left?A.left:"right"===g&&"right"in A&&A.right&&"object"==typeof A.right?A.right:{})},O===r.GiftedChatAppType.Manifest?{onClick:m}:{},{children:e.jsx("div",Object.assign({style:I},{children:e.jsxs("div",{children:[e.jsx("div",Object.assign({id:f.chatActivityId||`message-${f.psqlId}`},{children:k()})),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginLeft:"32px"}},{children:[null==h?void 0:h(l),null==v?void 0:v(f)]}))]})}))}))},d=l(i).default.memo(o);exports.Bubble=d,exports.default=d;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IMessage, User } from '../types';
|
|
3
|
+
export declare enum GiftedChatAppType {
|
|
4
|
+
Bik = "bik",
|
|
5
|
+
Manifest = "manifest"
|
|
6
|
+
}
|
|
3
7
|
export interface BubbleProps<TMessage extends IMessage = IMessage> {
|
|
4
8
|
currentMessage: TMessage;
|
|
5
9
|
previousMessage?: TMessage;
|
|
@@ -22,4 +26,13 @@ export interface BubbleProps<TMessage extends IMessage = IMessage> {
|
|
|
22
26
|
messagesGroupedByAiTraceId?: any;
|
|
23
27
|
}) => boolean;
|
|
24
28
|
messagesGroupedByAiTraceId?: any;
|
|
29
|
+
containerStyle?: {
|
|
30
|
+
left?: React.CSSProperties;
|
|
31
|
+
right?: React.CSSProperties;
|
|
32
|
+
} | React.CSSProperties;
|
|
33
|
+
bubbleStyles?: {
|
|
34
|
+
left?: React.CSSProperties;
|
|
35
|
+
right?: React.CSSProperties;
|
|
36
|
+
} | React.CSSProperties;
|
|
37
|
+
appType?: GiftedChatAppType;
|
|
25
38
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e;Object.defineProperty(exports,"__esModule",{value:!0}),exports.GiftedChatAppType=void 0,(e=exports.GiftedChatAppType||(exports.GiftedChatAppType={})).Bik="bik",e.Manifest="manifest";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { GiftedChatAppType } from '../Bubble/types';
|
|
2
3
|
export interface DayProps {
|
|
3
4
|
createdAt?: Date | number | string;
|
|
4
5
|
dateFormat?: string;
|
|
@@ -10,6 +11,7 @@ export interface DayProps {
|
|
|
10
11
|
lastWeek?: string;
|
|
11
12
|
sameElse?: string;
|
|
12
13
|
};
|
|
14
|
+
appType?: GiftedChatAppType;
|
|
13
15
|
}
|
|
14
16
|
export declare const Day: React.NamedExoticComponent<DayProps>;
|
|
15
17
|
export default Day;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("date-fns"),r=require("react"),a=require("../../../constants/Theme.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("date-fns"),r=require("react"),a=require("../../../constants/Theme.js"),n=require("../../TypographyStyle.js"),s=require("../Bubble/types.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const o=i=>{let{createdAt:o,dateFormat:l="D MMMM YY",dateFormatCalendar:d,appType:p=s.GiftedChatAppType.Bik}=i;const y=r.useMemo((()=>{if(null==o)return null;let e;if("number"==typeof o)e=t.startOfDay(new Date(o));else if(o instanceof Date)e=t.startOfDay(o);else{if("string"!=typeof o)return null;e=t.startOfDay(new Date(o))}if(p===s.GiftedChatAppType.Manifest)return t.format(e,"MMM d, yyyy");const r=t.startOfDay(new Date);if(!t.isSameYear(r,e))return t.format(e,"EEEE, d MMMM yy");const a=t.differenceInDays(r,e);return a<1?(null==d?void 0:d.sameDay)?d.sameDay.replace(/\[|\]/g,""):"Today":1===a?"Yesterday":t.format(e,"EEEE, d MMMM yy")}),[o,l,d,p]);return y?p===s.GiftedChatAppType.Manifest?e.jsx("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:5,marginBottom:10}},{children:e.jsx("span",Object.assign({style:{background:"transparent",color:"#b2b2b2",fontSize:12,fontWeight:600,padding:"2px 8px"}},{children:y}))})):e.jsxs("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"center",margin:"12px 0px 12px 8px"}},{children:[e.jsx("div",{style:{flex:1,height:"1px",backgroundColor:a.COLORS.stroke.primary}}),e.jsx("div",Object.assign({style:{border:`1px solid ${a.COLORS.stroke.primary}`,borderRadius:"16px",padding:"4px 12px"}},{children:e.jsx(n.BodyCaption,Object.assign({style:{color:a.COLORS.content.secondary}},{children:y}))})),e.jsx("div",{style:{flex:1,height:"1px",backgroundColor:a.COLORS.stroke.primary}})]})):null},l=i(r).default.memo(o);exports.Day=l,exports.default=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),s=require("react"),t=require("../../../constants/Theme.js"),i=require("../../../hooks/useWindowSize.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),s=require("react"),t=require("../../../constants/Theme.js"),i=require("../../../hooks/useWindowSize.js"),a=require("../../TypographyStyle.js"),n=require("../Bubble/types.js"),l=require("./Day.js"),o=require("./messageHelpers.js"),d=require("./scrollHooks.js"),u=require("./types.js"),c=require("./utils.js");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=g(s);const h=(g,h)=>{var v;const f=g||{},{messages:y=[],user:b,renderBubble:j,renderAvatar:m,renderDay:x,renderLoading:O,renderChatEmpty:A,listViewProps:T={},renderAvatarOnTop:C=!1,showUserAvatar:M=!1,showAvatarForEveryMessage:S=!1,inverted:w=!1,messageIdGenerator:R,topThreshold:_=c.TOP_THRESHOLD,appType:E=n.GiftedChatAppType.Bik}=f,L=e.__rest(f,["messages","user","renderBubble","renderAvatar","renderDay","renderLoading","renderChatEmpty","listViewProps","renderAvatarOnTop","showUserAvatar","showAvatarForEveryMessage","inverted","messageIdGenerator","topThreshold","appType"]),k=i.useWindowSize(),G=s.useRef(null),q=c.normalizeRef(T.ref||h,G),B=s.useRef({isInitialMount:!0,isUserScrolling:!1,isLoadingOldMessages:!1,isAtBottom:!0,hasTriggeredEndReached:!1,lastMessagesLength:null!==(v=null==y?void 0:y.length)&&void 0!==v?v:0,previousScrollHeight:0,previousScrollTop:0,scrollTimeout:null}),H=s.useMemo((()=>y&&0!==y.length?[...y].reverse():[]),[y]),I=d.useScrollToBottom(q,B);s.useImperativeHandle(h,(()=>q.current)),d.useInitialMountScroll(q,B,H.length,I),d.useScrollCleanup(B),d.useRestoreScrollPosition(q,B,H.length),d.useAutoScrollOnNewMessages(q,B,y.length,I),d.useResizeObserverForFirstMessage(null==y?void 0:y[0],B,I,R);const P=d.useScrollHandler(B,T.onEndReached,T.onScroll,_),D=s.useCallback((e=>{var r;return Boolean(e&&b&&(null===(r=e.user)||void 0===r?void 0:r._id)===b._id)}),[b]),F=s.useCallback(((e,r)=>!!M&&(!!S||(!r||r.user._id!==e.user._id))),[M,S]),N=s.useCallback(((e,s,i)=>{const l=D(e)?"right":"left",o=Object.assign({currentMessage:e,previousMessage:s,nextMessage:i,position:l,user:b},L);return j?j(o):r.jsx("div",Object.assign({style:Object.assign(Object.assign({maxWidth:E===n.GiftedChatAppType.Manifest?"50%":"70%",width:"fit-content"},E===n.GiftedChatAppType.Manifest?{minWidth:"130px"}:{}),{padding:"8px 12px",borderRadius:E===n.GiftedChatAppType.Manifest?16:4,border:"left"===l&&E===n.GiftedChatAppType.Manifest?"1px solid rgb(224, 224, 224)":"none",backgroundColor:"right"===l?E===n.GiftedChatAppType.Manifest?t.COLORS.background.brandTint:t.COLORS.background.brandLight:E===n.GiftedChatAppType.Manifest?t.COLORS.background.pureWhite:t.COLORS.background.inactive,color:t.COLORS.content.primary,wordBreak:"break-word"})},{children:r.jsx(a.BodySecondary,{children:e.text})}))}),[D,b,j,L]),W=s.useCallback(((e,r,s)=>{if(!F(e,s))return null;const t=D(e)?"right":"left";return m?m({currentMessage:e,previousMessage:r,nextMessage:s,position:t,user:b,renderAvatarOnTop:C,showUserAvatar:M,showAvatarForEveryMessage:S}):null}),[F,D,b,C,M,S,m]);return y&&0!==y.length?r.jsxs("div",Object.assign({ref:q,style:Object.assign({flex:1,overflowY:"auto",overflowX:"hidden",display:"flex",flexDirection:"column"},T.style),onScroll:P},{children:[r.jsx("div",{style:{flex:"1 0 auto"}}),r.jsx("div",Object.assign({style:{display:"flex",flexDirection:"column",flex:"0 0 auto"}},{children:H.map(((e,s)=>{var t,i,a,d,g;const h=D(e)?"right":"left",v=H[s-1],f=H[s+1],y=!c.isSameDay(e,v),b=o.getMessagePlacement(e,h),j=o.shouldCenterAlign(e),m=(null==e?void 0:e.channelId)===u.MESSAGE_CHANNELS.SMTP||(null==e?void 0:e.channelName)===u.MESSAGE_CHANNELS.SMTP,O=e.category===c.Constants.ChatActivity.Category.ACTIVITY&&e.activityType===c.Constants.ChatActivity.Type.PRIVATE_NOTE;return r.jsxs(p.default.Fragment,{children:[y&&(x?x({createdAt:e.createdAt}):r.jsx(l.Day,{createdAt:e.createdAt,appType:E})),r.jsxs("div",Object.assign({style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},k?{margin:"0 4px"}:{}),j?{}:{display:"flex"}),E!==n.GiftedChatAppType.Manifest?k||2!==(null===(t=null==e?void 0:e.user)||void 0===t?void 0:t._id)?{marginRight:8}:{marginLeft:8}:{}),m&&!O&&k?{marginLeft:8,marginRight:8}:{}),{justifyContent:b,marginBottom:8})},{children:[!k&&"left"===h&&r.jsx("div",Object.assign({style:{margin:"0 8px"}},{children:W(e,v,f)})),r.jsx("div",Object.assign({id:`message-bubble-${null!==(i=e._id)&&void 0!==i?i:`${s}-${null!==(a=null==R?void 0:R())&&void 0!==a?a:"id"}`}`,style:E===n.GiftedChatAppType.Manifest?{width:"100%"}:k&&m?{display:"flex",flexGrow:1}:{}},{children:N(e,v,f)})),!k&&"right"===h&&r.jsx("div",Object.assign({style:{margin:"0 8px"}},{children:W(e,v,f)}))]}))]},null!==(d=e._id)&&void 0!==d?d:`${s}-${null!==(g=null==R?void 0:R())&&void 0!==g?g:"id"}`)}))}))]})):A?r.jsx(r.Fragment,{children:A()}):null};var v=s.forwardRef(h);exports.default=v;
|
|
@@ -1,78 +1,136 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BubbleProps } from '../Bubble/types';
|
|
2
|
+
import { BubbleProps, GiftedChatAppType } from '../Bubble/types';
|
|
3
3
|
import { IMessage, LeftRightStyle, User } from '../types';
|
|
4
4
|
export interface ListViewProps {
|
|
5
|
+
/** Custom styles for the container. */
|
|
5
6
|
style?: React.CSSProperties;
|
|
7
|
+
/** Callback when end of list is reached. */
|
|
6
8
|
onEndReached?: () => void;
|
|
9
|
+
/** Threshold for triggering end reached. */
|
|
7
10
|
onEndReachedThreshold?: number;
|
|
11
|
+
/** Scroll event handler. */
|
|
8
12
|
onScroll?: (event: React.UIEvent<HTMLDivElement>) => void;
|
|
13
|
+
/** Ref for the scrollable container. */
|
|
9
14
|
ref?: React.RefObject<HTMLDivElement> | React.MutableRefObject<HTMLDivElement | null>;
|
|
10
15
|
}
|
|
11
16
|
export interface AvatarProps<TMessage extends IMessage = IMessage> {
|
|
17
|
+
/** The current message for the avatar. */
|
|
12
18
|
currentMessage: TMessage;
|
|
19
|
+
/** The previous message. */
|
|
13
20
|
previousMessage?: TMessage;
|
|
21
|
+
/** The next message. */
|
|
14
22
|
nextMessage?: TMessage;
|
|
23
|
+
/** Position of the avatar ('left' or 'right'). */
|
|
15
24
|
position: 'left' | 'right';
|
|
25
|
+
/** The user object. */
|
|
16
26
|
user: User;
|
|
27
|
+
/** Whether to render avatar on top. */
|
|
17
28
|
renderAvatarOnTop?: boolean;
|
|
29
|
+
/** Whether to show user avatar. */
|
|
18
30
|
showUserAvatar?: boolean;
|
|
31
|
+
/** Show avatar for every message. */
|
|
19
32
|
showAvatarForEveryMessage?: boolean;
|
|
33
|
+
/** Custom styles for avatar image. */
|
|
20
34
|
imageStyle?: LeftRightStyle<React.CSSProperties>;
|
|
35
|
+
/** Custom styles for avatar container. */
|
|
21
36
|
containerStyle?: LeftRightStyle<React.CSSProperties>;
|
|
22
37
|
[key: string]: any;
|
|
23
38
|
}
|
|
24
39
|
export interface DayProps {
|
|
40
|
+
/** Date/time for the separator. */
|
|
25
41
|
createdAt?: Date | number | string;
|
|
42
|
+
/** Format for displaying the date. */
|
|
26
43
|
dateFormat?: string;
|
|
44
|
+
/** Calendar format options. */
|
|
27
45
|
dateFormatCalendar?: {
|
|
46
|
+
/** Format for same day. */
|
|
28
47
|
sameDay?: string;
|
|
48
|
+
/** Format for next day. */
|
|
29
49
|
nextDay?: string;
|
|
50
|
+
/** Format for next week. */
|
|
30
51
|
nextWeek?: string;
|
|
52
|
+
/** Format for last day. */
|
|
31
53
|
lastDay?: string;
|
|
54
|
+
/** Format for last week. */
|
|
32
55
|
lastWeek?: string;
|
|
56
|
+
/** Format for other days. */
|
|
33
57
|
sameElse?: string;
|
|
34
58
|
};
|
|
35
59
|
}
|
|
36
60
|
export interface GiftedChatProps<TMessage extends IMessage = IMessage> {
|
|
61
|
+
/** Array of chat messages. */
|
|
37
62
|
messages: TMessage[];
|
|
63
|
+
/** The current user object. */
|
|
38
64
|
user: User;
|
|
65
|
+
/** Custom bubble renderer. */
|
|
39
66
|
renderBubble?: (props: BubbleProps<TMessage>) => React.ReactNode;
|
|
67
|
+
/** Custom avatar renderer. */
|
|
40
68
|
renderAvatar?: (props: AvatarProps<TMessage>) => React.ReactNode;
|
|
69
|
+
/** Custom day separator renderer. */
|
|
41
70
|
renderDay?: (props: DayProps) => React.ReactNode;
|
|
71
|
+
/** Custom loading renderer. */
|
|
42
72
|
renderLoading?: () => React.ReactNode;
|
|
73
|
+
/** Custom empty chat renderer. */
|
|
43
74
|
renderChatEmpty?: () => React.ReactNode;
|
|
75
|
+
/** Props for the scrollable list view. */
|
|
44
76
|
listViewProps?: ListViewProps;
|
|
77
|
+
/** Scroll threshold for loading old messages. */
|
|
45
78
|
topThreshold?: number;
|
|
79
|
+
/** Whether to render avatar on top. */
|
|
46
80
|
renderAvatarOnTop?: boolean;
|
|
81
|
+
/** Whether to show user avatar. */
|
|
47
82
|
showUserAvatar?: boolean;
|
|
83
|
+
/** Show avatar for every message. */
|
|
48
84
|
showAvatarForEveryMessage?: boolean;
|
|
85
|
+
/** Whether to invert the message list. */
|
|
49
86
|
inverted?: boolean;
|
|
87
|
+
/** Handler for long press on message. */
|
|
50
88
|
onLongPress?: (context?: any, message?: TMessage) => void;
|
|
89
|
+
/** Handler for press on message. */
|
|
51
90
|
onPress?: (context?: any, message?: TMessage) => void;
|
|
91
|
+
/** Function to generate message IDs. */
|
|
52
92
|
messageIdGenerator?: (message?: TMessage) => string;
|
|
53
|
-
|
|
93
|
+
appType?: GiftedChatAppType;
|
|
54
94
|
[key: string]: any;
|
|
55
95
|
}
|
|
56
96
|
export interface ScrollState {
|
|
97
|
+
/** Is initial mount of the component. */
|
|
57
98
|
isInitialMount: boolean;
|
|
99
|
+
/** Is user currently scrolling. */
|
|
58
100
|
isUserScrolling: boolean;
|
|
101
|
+
/** Is loading old messages. */
|
|
59
102
|
isLoadingOldMessages: boolean;
|
|
103
|
+
/** Is scroll at bottom. */
|
|
60
104
|
isAtBottom: boolean;
|
|
105
|
+
/** Has end reached been triggered. */
|
|
61
106
|
hasTriggeredEndReached: boolean;
|
|
107
|
+
/** Last known messages length. */
|
|
62
108
|
lastMessagesLength: number;
|
|
109
|
+
/** Previous scroll height. */
|
|
63
110
|
previousScrollHeight: number;
|
|
111
|
+
/** Previous scroll top position. */
|
|
64
112
|
previousScrollTop: number;
|
|
113
|
+
/** Debounce timer for scroll events. */
|
|
65
114
|
scrollTimeout: number | null;
|
|
66
115
|
}
|
|
67
116
|
export declare enum CHAT_ACTIVITY_TYPES_FOR_CALL_BUBBLE {
|
|
117
|
+
/** User is calling another user. */
|
|
68
118
|
CALLING_CALL = "CALLING_CALL",
|
|
119
|
+
/** Call is ringing for the recipient. */
|
|
69
120
|
RINGING_CALL = "RINGING_CALL",
|
|
121
|
+
/** Call is ongoing between users. */
|
|
70
122
|
ONGOING_CALL = "ONGOING_CALL",
|
|
123
|
+
/** Call has been completed. */
|
|
71
124
|
COMPLETED_CALL = "COMPLETED_CALL",
|
|
125
|
+
/** Call was missed by the recipient. */
|
|
72
126
|
MISSED_CALL = "MISSED_CALL",
|
|
127
|
+
/** Callback was requested. */
|
|
73
128
|
REQUESTED_CALLBACK = "REQUESTED_CALLBACK",
|
|
129
|
+
/** Call was declined by the recipient. */
|
|
74
130
|
DECLINED_CALL = "DECLINED_CALL",
|
|
131
|
+
/** Call was disconnected. */
|
|
75
132
|
DISCONNECTED_CALL = "DISCONNECTED_CALL",
|
|
133
|
+
/** Call was unanswered. */
|
|
76
134
|
UNANSWERED_CALL = "UNANSWERED_CALL"
|
|
77
135
|
}
|
|
78
136
|
export declare const enum MESSAGE_CHANNELS {
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
interface customStyles {
|
|
2
|
+
fontWeight?: number;
|
|
3
|
+
fontSize?: number;
|
|
4
|
+
width?: number;
|
|
5
|
+
}
|
|
1
6
|
export declare const TitleXlarge: import("styled-components").StyledComponent<"div", any, {
|
|
2
7
|
numberOfLines?: number | undefined;
|
|
3
8
|
color?: string | undefined;
|
|
@@ -37,6 +42,7 @@ export declare const BodyPrimary: import("styled-components").StyledComponent<"d
|
|
|
37
42
|
export declare const BodySecondary: import("styled-components").StyledComponent<"div", any, {
|
|
38
43
|
numberOfLines?: number | undefined;
|
|
39
44
|
color?: string | undefined;
|
|
45
|
+
customStyles?: customStyles | undefined;
|
|
40
46
|
}, never>;
|
|
41
47
|
export declare const ButtonRegularAI: import("styled-components").StyledComponent<"div", any, {
|
|
42
48
|
numberOfLines?: number | undefined;
|
|
@@ -50,6 +56,7 @@ export declare const BodyPrimaryLink: import("styled-components").StyledComponen
|
|
|
50
56
|
export declare const BodySecondaryLink: import("styled-components").StyledComponent<"div", any, {
|
|
51
57
|
numberOfLines?: number | undefined;
|
|
52
58
|
color?: string | undefined;
|
|
59
|
+
customStyles?: customStyles | undefined;
|
|
53
60
|
}, never>;
|
|
54
61
|
export declare const BodyCaption: import("styled-components").StyledComponent<"div", any, {
|
|
55
62
|
numberOfLines?: number | undefined;
|
|
@@ -111,3 +118,4 @@ export declare const Tiny: import("styled-components").StyledComponent<"div", an
|
|
|
111
118
|
numberOfLines?: number | undefined;
|
|
112
119
|
color?: string | undefined;
|
|
113
120
|
}, never>;
|
|
121
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../constants/Theme.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(e);const n=e=>e+"px",l=o.default.div`
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../constants/Theme.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(e);const n=e=>void 0===e||null==e?"":e+"px",l=o.default.div`
|
|
2
2
|
font-family: Inter;
|
|
3
3
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
4
4
|
font-weight: ${t.FONTS.titleXLarge.fontWeight};
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
overflow: hidden;
|
|
79
79
|
display: -webkit-box;
|
|
80
80
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
81
|
-
`,
|
|
81
|
+
`,h=o.default.div`
|
|
82
82
|
font-family: Inter;
|
|
83
83
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
84
84
|
font-weight: ${t.FONTS.bodyPrimary.fontWeight};
|
|
@@ -88,11 +88,12 @@
|
|
|
88
88
|
overflow: hidden;
|
|
89
89
|
display: -webkit-box;
|
|
90
90
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
91
|
-
`,
|
|
91
|
+
`,g=o.default.div`
|
|
92
92
|
font-family: Inter;
|
|
93
|
+
width: ${e=>{var t;return n(null===(t=e.customStyles)||void 0===t?void 0:t.width)}};
|
|
93
94
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
94
|
-
font-weight: ${t.FONTS.bodySecondary.fontWeight};
|
|
95
|
-
font-size: ${n(t.FONTS.bodySecondary.fontSize)};
|
|
95
|
+
font-weight: ${e=>{var i;return(null===(i=e.customStyles)||void 0===i?void 0:i.fontWeight)||t.FONTS.bodySecondary.fontWeight}};
|
|
96
|
+
font-size: ${e=>{var i;return n(null===(i=e.customStyles)||void 0===i?void 0:i.fontSize)||n(t.FONTS.bodySecondary.fontSize)}};
|
|
96
97
|
line-height: ${n(t.FONTS.bodySecondary.lineHeight)};
|
|
97
98
|
-webkit-box-orient: vertical;
|
|
98
99
|
overflow: hidden;
|
|
@@ -114,12 +115,12 @@
|
|
|
114
115
|
-webkit-text-fill-color: transparent;
|
|
115
116
|
background-clip: text;
|
|
116
117
|
text-fill-color: transparent;
|
|
117
|
-
`,p=o.default(
|
|
118
|
+
`,p=o.default(h)`
|
|
118
119
|
text-decoration: underline;
|
|
119
120
|
color: ${t.COLORS.content.brand};
|
|
120
121
|
text-decoration-color: ${t.COLORS.content.brand};
|
|
121
122
|
cursor: pointer;
|
|
122
|
-
`,w=o.default(
|
|
123
|
+
`,w=o.default(g)`
|
|
123
124
|
text-decoration: underline;
|
|
124
125
|
color: ${t.COLORS.content.brand};
|
|
125
126
|
text-decoration-color: ${t.COLORS.content.brand};
|
|
@@ -136,7 +137,7 @@
|
|
|
136
137
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
137
138
|
word-break: break-word;
|
|
138
139
|
overflow-wrap: break-word;
|
|
139
|
-
`,
|
|
140
|
+
`,s=o.default.div`
|
|
140
141
|
font-family: Inter;
|
|
141
142
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
142
143
|
font-weight: ${t.FONTS.caption.fontWeight};
|
|
@@ -152,7 +153,7 @@
|
|
|
152
153
|
-webkit-text-fill-color: transparent;
|
|
153
154
|
background-clip: text;
|
|
154
155
|
text-fill-color: transparent;
|
|
155
|
-
|
|
156
|
+
`,x=o.default.div`
|
|
156
157
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
157
158
|
font-weight: ${t.FONTS.tiny.fontWeight};
|
|
158
159
|
font-size: ${n(t.FONTS.tiny.fontSize)};
|
|
@@ -161,7 +162,7 @@
|
|
|
161
162
|
overflow: hidden;
|
|
162
163
|
display: -webkit-box;
|
|
163
164
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
164
|
-
|
|
165
|
+
`,$=o.default.div`
|
|
165
166
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
166
167
|
font-weight: ${t.FONTS.tiny.fontWeight};
|
|
167
168
|
font-size: ${n(t.FONTS.tiny.fontSize)};
|
|
@@ -212,7 +213,7 @@
|
|
|
212
213
|
overflow: hidden;
|
|
213
214
|
display: -webkit-box;
|
|
214
215
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
215
|
-
`,
|
|
216
|
+
`,v=o.default.div`
|
|
216
217
|
font-family: Inter;
|
|
217
218
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
218
219
|
font-weight: ${t.FONTS.subHeading.fontWeight};
|
|
@@ -222,7 +223,7 @@
|
|
|
222
223
|
overflow: hidden;
|
|
223
224
|
display: -webkit-box;
|
|
224
225
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
225
|
-
`,
|
|
226
|
+
`,T=o.default.div`
|
|
226
227
|
font-family: Inter;
|
|
227
228
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
228
229
|
font-weight: ${t.FONTS.bodyRegular.fontWeight};
|
|
@@ -292,4 +293,4 @@
|
|
|
292
293
|
overflow: hidden;
|
|
293
294
|
display: -webkit-box;
|
|
294
295
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
295
|
-
`;exports.AiBodyCaption=
|
|
296
|
+
`;exports.AiBodyCaption=s,exports.AiBodyTiny=$,exports.BodyCaption=y,exports.BodyLarge=O,exports.BodyPrimary=h,exports.BodyPrimaryLink=p,exports.BodyRegular=T,exports.BodySecondary=g,exports.BodySecondaryLink=w,exports.BodySmall=z,exports.BodyTiny=x,exports.ButtonLarge=m,exports.ButtonLargeAI=u,exports.ButtonRegular=k,exports.ButtonRegularAI=S,exports.Caption=F,exports.CaptionBold=R,exports.Display=c,exports.SmallRegular=f,exports.SubHeading=v,exports.TextPlaceholder=N,exports.Tiny=C,exports.TitleFour=L,exports.TitleLarge=r,exports.TitleMedium=a,exports.TitleRegular=d,exports.TitleSmall=b,exports.TitleXlarge=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),l=require("react-slick"),s=require("./CarouselPreview.style.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),l=require("react-slick"),s=require("./CarouselPreview.style.js"),o=require("./CarouselPreviewCard.js"),t=require("../template-context-mapper/context/templateModalContext.js"),a=require("../template-preview/helpers/templateMiscHelper.js"),n=require("../template-preview/RCS/RCSPreview.styled.js"),i=require("./CustomCarouselArrows.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=d(r),c=d(l);const v=u.default.forwardRef((r=>{let{channel:l,template:i,isPreview:d,removeBottomBorder:u,borderRadius:c,showArrows:v,hideBorder:w,showSampleValues:C}=r;var m,h;const{sliderRef:x,selectedCarouselIndex:j,cardCount:f,setIsCarouselHovered:P,cardIndex:b,showVariablePicker:R}=t.useTemplateModalContext(),g=-1==b?a.determineCardIndex(l):b,I=null===(h=null===(m=null==i?void 0:i.components)||void 0===m?void 0:m[g])||void 0===h?void 0:h.cards,S=(null==I?void 0:I.length)?e.jsx(p,{cards:I,cardCount:null!=f?f:0,selectedCarouselIndex:null!=j?j:-1,sliderRef:x,isPreview:d,showArrows:v,channel:l,template:i,setIsCarouselHovered:P,showSampleValues:!!C,showVariablePicker:R}):null;return a.isRCSChannel(l)?e.jsx(n.RCSCarousalContainer,Object.assign({borderRadius:c},{children:S})):e.jsxs(s.Container,Object.assign({removeBottomBorder:u,borderRadius:c,hideBorder:w},{children:[e.jsx(o.default,{channel:l,currentTemplate:i,carouselCardIndex:-1,isPreview:d,width:"77%"}),S]}))})),p=r=>{let{cards:l,cardCount:t,selectedCarouselIndex:a,sliderRef:n,isPreview:d,showArrows:u,channel:v,template:p,setIsCarouselHovered:w,showSampleValues:C,showVariablePicker:m}=r;return e.jsx(s.CarouselSlickContainer,Object.assign({cardCount:t,selectedCarouselIndex:a,onMouseEnter:()=>!m&&(null==w?void 0:w(!0)),onMouseLeave:()=>!m&&(null==w?void 0:w(!1))},{children:e.jsx(c.default,Object.assign({ref:n,swipeToSlide:!0,draggable:!0,swipe:!0,infinite:!1,focusOnSelect:!d,centerMode:!0,arrows:u,adaptiveHeight:!0,nextArrow:e.jsx(i.CustomCarouselRightArrow,{isPreview:null!=d&&d}),prevArrow:e.jsx(i.CustomCarouselLeftArrow,{isPreview:null!=d&&d})},{children:null==l?void 0:l.map(((r,l)=>{var s,t;const a={components:r.components,mapping:null===(t=null===(s=null==p?void 0:p.mapping)||void 0===s?void 0:s.cards)||void 0===t?void 0:t[l],content:null==p?void 0:p.content,templateType:null==p?void 0:p.templateType};return e.jsx(o.default,{channel:v,currentTemplate:a,carouselCardIndex:l,isPreview:d,width:"100%",showSampleValues:C},l)}))}))}))};exports.CarouselPreview=v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=require("./MenuItem.js"),s=require("./MenuList.styled.js");const r=n.forwardRef(((r,o)=>{let{options:i,isMultiSelect:c,showDescription:l,onSelect:u,version:a,onInfiniteScroll:d,onDropdownItemClick:p,useDefaultCursor:f,focusedIndex:j=-1}=r;const b=n.useRef(null),x=n.useRef(null),g=n.useCallback((()=>{b.current&&b.current.disconnect(),b.current=new IntersectionObserver((e=>{e[0].isIntersecting&&(null==d||d())})),x.current&&b.current.observe(x.current)}),[d]);n.useEffect((()=>(g(),()=>{b.current&&b.current.disconnect()})),[g,i]);const I=new Map;let h=-1;return i.forEach((e=>{if(e.options)e.options.forEach((e=>{e.disabled||(h++,I.set(e,h))}));else{const n=e;n.disabled||(h++,I.set(n,h))}})),e.jsx(e.Fragment,{children:i.map(((n,r)=>{const d=r===i.length-1;if(n.options){const i=n;return e.jsxs("div",Object.assign({style:{marginTop:"2.0"===a?2:0}},{children:[e.jsxs(s.StyledGroupedLabel,Object.assign({version:a},{children:[i.leadingIcon?e.jsx("span",Object.assign({style:{marginRight:8}},{children:i.leadingIcon})):null,i.label]})),i.options.map(((n,s)=>{const d=I.get(n),b=d===j&&!n.disabled;return e.jsx(t.MenuItem,{version:a,last:s===i.options.length-1,onSelect:u,showDescription:l,onDropdownItemClick:p,isMultiSelect:c,option:n,useDefaultCursor:f,isFocused:b,dataIndex:d,ref:e=>{o&&"object"==typeof o&&o.current&&e&&e&&e&&e&&(o.current[r]=e)}},`${r}-${s}`)})),d?e.jsx("span",{ref:x}):null]}),r)}const b=n,g=I.get(b),h=g===j&&!b.disabled;return e.jsxs("div",{children:[e.jsx(t.MenuItem,{version:a,last:d,onSelect:u,showDescription:l,onDropdownItemClick:p,isMultiSelect:c,option:b,useDefaultCursor:f,isFocused:h,dataIndex:g,ref:e=>{o&&"object"==typeof o&&o.current&&e&&(o.current[r]=e)}},
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=require("./MenuItem.js"),s=require("./MenuList.styled.js");const r=n.forwardRef(((r,o)=>{let{options:i,isMultiSelect:c,showDescription:l,onSelect:u,version:a,onInfiniteScroll:d,onDropdownItemClick:p,useDefaultCursor:f,focusedIndex:j=-1}=r;const b=n.useRef(null),x=n.useRef(null),g=n.useCallback((()=>{b.current&&b.current.disconnect(),b.current=new IntersectionObserver((e=>{e[0].isIntersecting&&(null==d||d())})),x.current&&b.current.observe(x.current)}),[d]);n.useEffect((()=>(g(),()=>{b.current&&b.current.disconnect()})),[g,i]);const I=new Map;let h=-1;return i.forEach((e=>{if(e.options)e.options.forEach((e=>{e.disabled||(h++,I.set(e,h))}));else{const n=e;n.disabled||(h++,I.set(n,h))}})),e.jsx(e.Fragment,{children:i.map(((n,r)=>{const d=r===i.length-1;if(n.options){const i=n;return e.jsxs("div",Object.assign({style:{marginTop:"2.0"===a?2:0}},{children:[e.jsxs(s.StyledGroupedLabel,Object.assign({version:a},{children:[i.leadingIcon?e.jsx("span",Object.assign({style:{marginRight:8}},{children:i.leadingIcon})):null,i.label]})),i.options.map(((n,s)=>{const d=I.get(n),b=d===j&&!n.disabled;return e.jsx(t.MenuItem,{version:a,last:s===i.options.length-1,onSelect:u,showDescription:l,onDropdownItemClick:p,isMultiSelect:c,option:n,useDefaultCursor:f,isFocused:b,dataIndex:d,ref:e=>{o&&"object"==typeof o&&o.current&&e&&e&&e&&e&&(o.current[r]=e)}},`${r}-${s}`)})),d?e.jsx("span",{ref:x}):null]}),r)}const b=n,g=I.get(b),h=g===j&&!b.disabled;return e.jsxs("div",{children:[e.jsx(t.MenuItem,{version:a,last:d,onSelect:u,showDescription:l,onDropdownItemClick:p,isMultiSelect:c,option:b,useDefaultCursor:f,isFocused:h,dataIndex:g,ref:e=>{o&&"object"==typeof o&&o.current&&e&&(o.current[r]=e)}},b.value),d?e.jsx("span",{ref:x}):null]},r)}))})}));exports.MenuList=r;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Variant } from './ListItem';
|
|
2
2
|
export declare function getColor(variant: Variant): string;
|
|
3
|
-
export declare function getTheme(variant: Variant, version?: '1.0' | '2.0'): import("@emotion/
|
|
3
|
+
export declare function getTheme(variant: Variant, version?: '1.0' | '2.0'): import("@emotion/react").SerializedStyles;
|
package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@bikdotai/bik-models/growth/models/bik-store"),l=require("../../../assets/icons/arrow_back.svg.js"),n=require("../../../assets/icons/chevronLeft.svg.js"),i=require("../../../assets/icons/chevronRight.svg.js"),o=require("../../../assets/icons/PlusIcon.js"),r=require("lodash"),a=require("react"),s=require("../../button/Button.js"),d=require("../../icon-button/IconButton.js"),c=require("../../product-picker-v2/modal.js"),u=require("../../product-picker-v2/type.js"),p=require("../Badge/index.js"),v=require("../context/templateModalContext.js"),h=require("./EditWhatsAppTemplateV2.js"),m=require("./ProductBox.js");require("../../template-preview/TemplatePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js");var g=require("../../../constants/Theme.js");require("../../curtain/CurtainHelper.js"),require("../../variable-picker-v3/model.js"),require("../../template-preview/models/TemplateMeta.js");var y=require("../../template-preview/models/WhatsAppTemplate.js");require("../../template-preview/models/Channels.js");var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@bikdotai/bik-models/growth/models/bik-store"),l=require("../../../assets/icons/arrow_back.svg.js"),n=require("../../../assets/icons/chevronLeft.svg.js"),i=require("../../../assets/icons/chevronRight.svg.js"),o=require("../../../assets/icons/PlusIcon.js"),r=require("lodash"),a=require("react"),s=require("../../button/Button.js"),d=require("../../icon-button/IconButton.js"),c=require("../../product-picker-v2/modal.js"),u=require("../../product-picker-v2/type.js"),p=require("../Badge/index.js"),v=require("../context/templateModalContext.js"),h=require("./EditWhatsAppTemplateV2.js"),m=require("./ProductBox.js");require("../../template-preview/TemplatePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js");var g=require("../../../constants/Theme.js");require("../../curtain/CurtainHelper.js"),require("../../variable-picker-v3/model.js"),require("../../template-preview/models/TemplateMeta.js");var y=require("../../template-preview/models/WhatsAppTemplate.js");require("../../template-preview/models/Channels.js");var x=require("../../template-preview/helpers/templateMiscHelper.js"),j=require("../../TypographyStyle.js");exports.default=f=>{let{template:b,whatsappSpecificPickerMeta:C,showVariableModal:O,variableListForImage:I,discountCode:S,setDiscountCode:k}=f;var q,w,P,T,B,L,R,E;const{selectedCarouselIndex:M,setTemplate:A,pickerConf:D,isProductCarouselType:F,pod:V,cardCount:W,carouselProducts:N,setCarouselProducts:$,isError:_,cardImages:z,disableEditVariable:G,onDeleteSelectedProducts:H,setSelectedCarouselIndex:K,setVariableCallback:J,setShowVariablePicker:Q,sliderRef:U}=v.useTemplateModalContext(),[X,Y]=a.useState(x.isRCSChannel(null==b?void 0:b.channel)?"Carousel Cards":-1==M?"First Message (Step 1/2)":F?"Product Carousel "+((null===(w=null===(q=null==b?void 0:b.mapping)||void 0===q?void 0:q.body)||void 0===w?void 0:w.length)?"(Step 2/2)":""):"Carousel Cards "+((null===(T=null===(P=null==b?void 0:b.mapping)||void 0===P?void 0:P.body)||void 0===T?void 0:T.length)?"(Step 2/2)":"")),[Z,ee]=a.useState(!1),[te,le]=a.useState(!1),ne=M===(null!=W?W:-1)-1,ie=(null!=M?M:-1)<1;a.useEffect((()=>{var e,t,l,n;Y(x.isRCSChannel(null==b?void 0:b.channel)?"Carousel Cards":-1==M?"First Message (Step 1/2)":F?"Product Carousel "+((null===(t=null===(e=null==b?void 0:b.mapping)||void 0===e?void 0:e.body)||void 0===t?void 0:t.length)?"(Step 2/2)":""):"Carousel Cards "+((null===(n=null===(l=null==b?void 0:b.mapping)||void 0===l?void 0:l.body)||void 0===n?void 0:n.length)?"(Step 2/2)":""))}),[M]),a.useEffect((()=>{Q(!1)}),[M]);const oe=e=>{null==$||$([{name:"variable",productName:e.actualValue}])};return a.useEffect((()=>{-1===M&&x.isRCSChannel(null==b?void 0:b.channel)&&(null==K||K(0))}),[M,null==b?void 0:b.channel]),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"16px"}},{children:[e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",alignItems:"center"}},{children:[!x.isRCSChannel(null==b?void 0:b.channel)&&null!=M&&M>=0&&!!(null===(L=null===(B=null==b?void 0:b.mapping)||void 0===B?void 0:B.body)||void 0===L?void 0:L.length)&&e.jsx(d.IconButton,{Icon:l.default,onClick:()=>{null==K||K(-1)}}),e.jsx(j.TitleMedium,Object.assign({style:{marginLeft:10}},{children:X}))]})),F&&(null!==(R=null==N?void 0:N.length)&&void 0!==R?R:0)>0&&null!=M&&M>=0&&e.jsxs("div",Object.assign({style:{display:"flex",rowGap:8,marginBottom:16,marginLeft:10,marginRight:10,flexDirection:"column"}},{children:[e.jsx(m.ProductBox,{editItem:()=>{1===(null==N?void 0:N.length)&&"variable"===N[0].name?(J((()=>oe)),Q(!0)):ee(!Z)},cardBody:1===(null==N?void 0:N.length)&&"variable"===N[0].name?`${N[0].productName}`:`${null==N?void 0:N.length} Products Selected`,hideIcon:1===(null==N?void 0:N.length)&&"variable"===N[0].name,deleteItem:()=>{var e;if(1===(null==N?void 0:N.length)&&"variable"===N[0].name)return void(null==$||$([]));const t=r.cloneDeep(Object.assign({},b));t&&(z&&z.length>0?null==z||z.forEach(((e,l)=>{var n;t.components[1].cards[l].components[0].example.header_handle=[null!==(n=z[l])&&void 0!==n?n:"https://res.cloudinary.com/drqhot9ot/image/upload/v1708753454/fake-product.png"]})):null===(e=null==t?void 0:t.components[1].cards)||void 0===e||e.forEach(((e,l)=>{t.components[1].cards[l].components[0].example.header_handle=["https://res.cloudinary.com/drqhot9ot/image/upload/v1708753454/fake-product.png"]})),null==A||A(t)),null==$||$([]),null==H||H()}}),N&&(null==N?void 0:N.length)>0&&"variable"!=N[0].name&&e.jsx(s.Button,{disabled:(null!==(E=null==N?void 0:N.length)&&void 0!==E?E:0)<=1,style:{alignSelf:"flex-end"},onClick:()=>{le(!0),ee(!0)},buttonText:"Rearrange Products",buttonType:"tertiary"})]})),!G&&F&&0===(null==N?void 0:N.length)&&null!=M&&M>=0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({style:{marginLeft:12}},{children:[e.jsx(j.TitleRegular,{children:"Product(s)"}),e.jsx(j.BodySecondary,{children:`Select ${null!=W?W:1} products`})]})),e.jsxs("div",Object.assign({style:{marginTop:16,marginBottom:16,marginLeft:_?16:12,marginRight:_?16:12,flexDirection:"column",display:"flex",alignItems:"center"}},{children:[e.jsx(s.Button,{matchParentWidth:!0,style:{flex:1,display:"flex",width:"100%",marginBottom:12,border:_?`2px dashed ${g.COLORS.content.negative}`:void 0},size:"medium",buttonText:"Add Product(s)",buttonType:_?"tertiaryGray":"dashBold",LeadingIcon:()=>e.jsx("div",Object.assign({style:{display:"flex",width:18,height:18}},{children:e.jsx(o.default,{width:18,height:18,color:g.COLORS.content.secondary})})),onClick:e=>{ee(!0)}}),V===y.POD.CHATBOT&&e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({style:{display:"flex",flex:1,alignItems:"center",justifyContent:"space-between",flexDirection:"row",width:"100%"}},{children:[e.jsx("div",{style:{width:"100%",height:1,backgroundColor:"#E0E0E0",marginRight:8,flex:1}}),e.jsx(j.BodyCaption,Object.assign({style:{color:"#616161",overflow:"unset"}},{children:"OR"})),e.jsx("div",{style:{width:"100%",height:1,backgroundColor:"#E0E0E0",marginLeft:8,flex:1}})]})),e.jsx(s.Button,{matchParentWidth:!0,style:{flex:1,display:"flex",marginTop:12,width:"100%",border:_?`2px dashed ${g.COLORS.content.negative}`:void 0},size:"medium",buttonText:"Add Product(s) Variable",buttonType:_?"tertiaryGray":"dashBold",LeadingIcon:()=>e.jsx("div",Object.assign({style:{display:"flex"}},{children:e.jsx(o.default,{width:18,height:18,color:g.COLORS.content.secondary})})),onClick:e=>{J((()=>oe)),Q(!0)}})]})]})),_&&e.jsx("div",Object.assign({style:{marginLeft:10,marginBottom:16}},{children:e.jsx(p.Badge,{padding:"8px",errorText:"Please add products"})}))]}),!F&&(null!=M?M:-1)>-1&&e.jsxs("div",Object.assign({style:{display:"flex",background:g.COLORS.surface.hovered,alignItems:"center"}},{children:[e.jsx(d.IconButton,{Icon:n.default,disabled:ie,width:8,height:14,svgStyle:ie?{}:{color:g.COLORS.content.secondary},onClick:()=>{var e;null===(e=null==U?void 0:U.current)||void 0===e||e.slickPrev(),(null!=M?M:-1)<1||null==K||K((e=>e-1))}}),e.jsx(j.TitleRegular,Object.assign({style:{flex:1,display:"flex",justifyContent:"center"},color:g.COLORS.content.secondary},{children:`Card ${(null!=M?M:0)+1}/${W}`})),e.jsx(d.IconButton,{Icon:i.default,width:8,height:14,disabled:ne,svgStyle:ne?{}:{color:g.COLORS.content.secondary},onClick:()=>{var e;null===(e=null==U?void 0:U.current)||void 0===e||e.slickNext(),(null!=M?M:-1)>=(null!=W?W:-1)-1||null==K||K((e=>e+1))}})]})),e.jsx(h.default,{whatsappSpecificPickerMeta:C,template:b,onTemplateChange:e=>{null==A||A(e)},showVariableModal:O,variableListForImage:I,discountCode:S,setDiscountCode:k}),Z&&D&&e.jsx(c.ProductPickerModal,{zIndex:200,startupScreen:te?u.ScreenName.RearrangeProducts:u.ScreenName.Collections,rearrangeEnabled:!0,storeId:D.storeId,selectedItems:(e=>{if(e.length>0){const t={};for(const l of e){const e=null==l?void 0:l.collectionId,n=l.productId,i=l.variantId;e in t||(t[e]={products:{},name:"",image:"",isSmartCollection:!1}),n in t[e].products||(t[e].products[n]={variants:{},name:(null==l?void 0:l.productName)||"",image:(null==l?void 0:l.productImage)||""}),t[e].products[n].variants[i]={name:(null==l?void 0:l.name)||"",price:"",image:(null==l?void 0:l.image)||"",quantity:l.quantity||0,displayOrder:l.displayOrder}}return t}return{}})(null!=N?N:[]),collectionFetcher:D.fetchCollections,productFetcher:D.fetchProducts,onAdd:(e,t)=>{var l,n,i,o,a,s;le(!1);const d=[];delete e.isCustom;for(const t of Object.keys(e)){const r=e[t].products;if(void 0!==r&&Object.keys(r).length)for(const e of Object.keys(r)){const c=r[e].variants;if(void 0!==c&&Object.keys(c).length)for(const u of Object.keys(c)){const{name:p,image:v,quantity:h,displayOrder:m}=c[u],g={name:p,image:null!==(n=null!=v?v:null===(l=r[e])||void 0===l?void 0:l.image)&&void 0!==n?n:"",quantity:h,variantId:u,productId:e,displayOrder:m,collectionId:t,productName:null!==(o=null===(i=r[e])||void 0===i?void 0:i.name)&&void 0!==o?o:"",productImage:null!==(s=null===(a=r[e])||void 0===a?void 0:a.image)&&void 0!==s?s:""};d.push(g)}}}const c=d.sort(((e,t)=>e.displayOrder-t.displayOrder)),u=d.map((e=>e.image)),p=r.cloneDeep(Object.assign({},b));p&&(u.forEach(((e,t)=>{var l;p.components[1].cards[t].components[0].example.header_handle=e?[e]:[null!==(l=null==z?void 0:z[t])&&void 0!==l?l:""]})),null==A||A(p)),null==$||$(c),ee(!1)},searchInCollectionFetcher:D.searchInCollection,searchFetcher:D.searchProducts,visible:Z,onClose:()=>{ee(!1)},exactLimit:null!=W?W:1,appType:D.appType||t.ApplicationType.BIK})]}))};
|
|
@@ -11,6 +11,8 @@ export type ToasterProps = {
|
|
|
11
11
|
subText?: string;
|
|
12
12
|
position?: ToastPosition;
|
|
13
13
|
type?: 'info' | 'success' | 'error' | 'default' | 'warning';
|
|
14
|
+
duration?: number;
|
|
15
|
+
blocking?: boolean;
|
|
14
16
|
closeOnClick?: boolean;
|
|
15
17
|
hideProgressBar?: boolean;
|
|
16
18
|
autoClose?: number | false | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),e=require("../../assets/icons/alert_triangle.svg.js"),o=require("../../assets/icons/check.svg.js"),n=require("../../assets/icons/cross.svg.js"),s=require("../../assets/icons/errorInfo.svg.js"),i=require("../../assets/icons/info.svg.js"),r=require("react"),l=require("react-dom"),u=require("react-toastify"),c=require("../button/Button.js"),a=require("./Toaster.styled.js"),d=require("../TypographyStyle.js"),x=require("../../constants/Theme.js");function h(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var p=h(r),y=h(l);const g=e=>t.jsxs(d.BodySecondary,Object.assign({color:"#9E9E9E",customStyles:{fontWeight:600,fontSize:14,width:25}},{children:[e.duration,"s"]})),v=e=>{const o="default"===e.type?x.COLORS.content.primary:"success"===e.type?x.COLORS.content.positive:"error"===e.type?x.COLORS.content.negative:"warning"===e.type?x.COLORS.content.warning:x.COLORS.content.brand,{timerValue:s}=r.useContext(b),i=(!e.blocking||-1!==s)&&(e.blocking&&s>0);return t.jsx("div",Object.assign({tabIndex:i?-1:0,role:"button",style:{width:s>0?25:20,display:"flex",cursor:i?"not-allowed":"pointer",alignSelf:""+(e.alignTop?"flex-start":"center"),opacity:i?.5:1},onClick:()=>{!i&&e.closeToast&&e.closeToast()},onKeyDown:t=>{"Enter"===t.key&&!i&&e.closeToast&&e.closeToast()}},{children:s>0?t.jsx(g,{duration:s}):t.jsx(n.default,{height:20,width:20,color:o})}))},f=e=>{var o,n;const s=x.COLORS.content.placeholder,{toasterText:i}=r.useContext(b);return t.jsx(t.Fragment,{children:t.jsxs("div",Object.assign({style:{display:"flex",flexGrow:1}},{children:[t.jsx("div",Object.assign({style:{flexGrow:1,marginRight:32,display:"flex",alignItems:"center"}},{children:t.jsxs("div",{children:[e.subText?t.jsx(d.TitleSmall,Object.assign({color:"inherit"},{children:null!==(o=e.toastText)&&void 0!==o?o:i})):t.jsx(d.BodySecondary,Object.assign({color:"inherit"},{children:null!==(n=e.toastText)&&void 0!==n?n:i})),e.subText&&t.jsx("div",Object.assign({style:{marginTop:2}},{children:t.jsx(d.BodyCaption,Object.assign({color:x.COLORS.content.secondary},{children:e.subText}))}))]})})),e.showButton&&t.jsx("div",Object.assign({style:{display:"flex",flexDirection:"column",alignSelf:"center",padding:"6px 4px",marginRight:{showSecondButton:4,showButton:0}[e.showSecondButton?"showSecondButton":"showButton"]}},{children:t.jsx(c.Button,{buttonText:e.buttonText,buttonType:"tertiaryGray",color:x.COLORS.content.secondary,onClick:e.onButtonClick})})),e.showSecondButton&&t.jsx("div",Object.assign({style:{display:"flex",flexDirection:"column",alignSelf:"center",padding:"6px 4px"}},{children:t.jsx(c.Button,{buttonText:e.secondButtonText,buttonType:"tertiaryGray",color:x.COLORS.content.secondary,onClick:e.onSecondButtonClick})})),e.showButton||e.showSecondButton?t.jsx("div",{style:{height:28,alignSelf:"center",marginLeft:8,marginRight:8,borderRight:`1px solid ${s}`,borderRadius:1}}):null]}))})},b=p.default.createContext({toasterText:"",timerValue:-1});exports.Toaster=n=>{const l=r.useRef(n.toastId||"default-toast"),[c,d]=r.useState(n.text),[h,p]=r.useState(n.duration||-1),g=u.cssTransition({enter:"Toastify__slide-enter",exit:"Toastify__slide-exit"}),j="default"===n.type?null:"success"===n.type?t.jsx(o.default,{width:20,height:20,color:x.COLORS.content.positive}):"error"===n.type?t.jsx(s.default,{width:20,height:20,color:x.COLORS.content.negative}):"warning"===n.type?t.jsx(e.default,{width:20,height:20,color:x.COLORS.content.warning}):t.jsx(i.default,{width:20,height:20,color:x.COLORS.content.brand});r.useEffect((()=>{l.current&&l.current===n.toastId?(d(n.text),u.toast.update(l.current,{autoClose:n.autoClose})):l.current&&l.current!==n.toastId&&T(n.text)}),[n.toastId,n.text]),r.useEffect((()=>{if(!n.duration)return;p(n.duration);const t=setInterval((()=>{p((e=>{const o=e-1;return o<=0?(clearInterval(t),-1):o}))}),1e3);return()=>clearInterval(t)}),[n.duration,n.toastId]);const T=e=>{var o,s,i,r,c,a,d,x,h,p,y,b,T,B,C,O;void 0!==n.hideLeftIcon||n.leftIcon?u.toast(t.jsx(f,{toastText:e,type:n.type||"info",buttonText:null===(o=n.buttonProps)||void 0===o?void 0:o.buttonText,secondButtonText:null===(s=n.secondButtonProps)||void 0===s?void 0:s.buttonText,showButton:null===(i=n.buttonProps)||void 0===i?void 0:i.showButton,showSecondButton:null===(r=n.secondButtonProps)||void 0===r?void 0:r.showButton,onButtonClick:null===(c=n.buttonProps)||void 0===c?void 0:c.onButtonClick,onSecondButtonClick:null===(a=n.secondButtonProps)||void 0===a?void 0:a.onButtonClick,subText:n.subText}),{onClose:n.onCloseToast?n.onCloseToast:()=>({}),icon:!0!==n.hideLeftIcon&&(n.leftIcon?n.leftIcon:"default"!==n.type&&t.jsx("div",Object.assign({style:{display:"flex",alignItems:"flex-start"}},{children:j}))),type:n.type,closeButton:t.jsx(v,{type:n.type||"default",alignTop:!(!n.subText||(null===(d=n.buttonProps)||void 0===d?void 0:d.showButton)||(null===(x=n.secondButtonProps)||void 0===x?void 0:x.showButton)),blocking:n.blocking}),toastId:n.toastId||"default-toast",transition:g}):l.current=u.toast(t.jsx(f,{toastText:e,type:n.type||"info",buttonText:null===(h=n.buttonProps)||void 0===h?void 0:h.buttonText,secondButtonText:null===(p=n.secondButtonProps)||void 0===p?void 0:p.buttonText,showButton:null===(y=n.buttonProps)||void 0===y?void 0:y.showButton,showSecondButton:null===(b=n.secondButtonProps)||void 0===b?void 0:b.showButton,onButtonClick:null===(T=n.buttonProps)||void 0===T?void 0:T.onButtonClick,onSecondButtonClick:null===(B=n.secondButtonProps)||void 0===B?void 0:B.onButtonClick,subText:n.subText}),{onClose:n.onCloseToast?n.onCloseToast:()=>({}),type:n.type,icon:"default"!==n.type&&t.jsx("div",Object.assign({style:{display:"flex",alignItems:"flex-start"}},{children:j})),closeButton:t.jsx(v,{type:n.type||"default",alignTop:!(!n.subText||(null===(C=n.buttonProps)||void 0===C?void 0:C.showButton)||(null===(O=n.secondButtonProps)||void 0===O?void 0:O.showButton)),blocking:n.blocking}),toastId:n.toastId||"default-toast",transition:g})};return r.useEffect((()=>{T()}),[]),y.default.createPortal(t.jsx(a.ToasterStyled,Object.assign({width:n.width,height:n.height,zIndex:n.zIndex,isSubTextIncluded:!!n.subText,type:n.type},{children:t.jsx(b.Provider,Object.assign({value:{toasterText:c,timerValue:h}},{children:t.jsx(u.ToastContainer,{position:n.position||"top-right",closeOnClick:n.closeOnClick||!1,hideProgressBar:n.hideProgressBar||!1,draggable:!1,autoClose:n.autoClose||!1,theme:"colored"})}))})),document.body)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var c=require("@emotion/styled/base"),t=require("../../constants/Theme.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var c=require("@emotion/styled/base"),t=require("../../constants/Theme.js"),d=require("../../constants/zindex.js");function b(c){return c&&"object"==typeof c&&"default"in c?c:{default:c}}const l=b(c).default("div","production"===process.env.NODE_ENV?{target:"e1tdeuzc0"}:{target:"e1tdeuzc0",label:"ToasterStyled"})("--toastify-color-light:#fff;--toastify-color-dark:#121212;--toastify-text-color-success:",t.COLORS.content.primary,";--toastify-text-color-error:",t.COLORS.content.primary,";--toastify-text-color-warning:",t.COLORS.content.primary,";--toastify-text-color-info:",t.COLORS.content.primary,";--toastify-color-info:",t.COLORS.background.brandLight,";--toastify-color-success:",t.COLORS.background.positive.light,";--toastify-color-error:",t.COLORS.background.negative.light,";--toastify-color-warning:",t.COLORS.background.warning.light,";--toastify-text-color-light:",t.COLORS.content.primary,";--toastify-toast-width:fit-content;--toastify-toast-min-height:",(c=>c.height||(c.isSubTextIncluded?"70px":"56px")),";--toastify-toast-max-height:",(c=>c.height||"fit-content"),";font-family:inherit;z-index:",(c=>c.zIndex||d.ComponentZindex.TOASTER),";.custom-position{position:relative;}.Toastify__toast-container{padding:0;}.Toastify__toast--success{border:1px solid ",t.COLORS.stroke.positive.lightAlt,";}.Toastify__toast--info{border:1px solid ",t.COLORS.stroke.brandLightAlt,";}.Toastify__toast--default{border:1px solid ",t.COLORS.stroke.primary,";}.Toastify__toast--error{border:1px solid ",t.COLORS.stroke.negative.lightAlt,";}.Toastify__toast--warning{border:1px solid ",t.COLORS.stroke.warning.lightAlt,";}.Toastify__toast{padding:",(c=>c.isSubTextIncluded?"16px":"12px"),";max-width:",(c=>c.width),";border-radius:8px;}.Toastify__progress-bar{height:4px;}.Toastify__close-button{display:block;margin:auto;}.Toastify__toast-icon{align-self:center;margin-inline-end:12px;height:",(c=>c.isSubTextIncluded?"38px":"20px"),";}.Toastify__toast-body{padding:0;}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--default{background:",t.COLORS.content.brand,";}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info{background:",t.COLORS.content.brand,";}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning{background:",t.COLORS.content.warning,";}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success{background:",t.COLORS.content.positive,";}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:",t.COLORS.content.negative,";}.Toastify__toast-body>div:last-child{display:flex;}.Toastify__slide-enter{animation:slideIn 1s ease forwards,bounce cubic-bezier(0.68, -0.55, 0.27, 1.55) 0.5s both;}.Toastify__slide-exit{animation:slideOut 0.5s ease-in-out forwards;}@keyframes bounce{0%,20%,50%,80%,100%{transform:translateY(0);}40%{transform:translateX(-20px);}60%{transform:translateX(20px);}}@keyframes slideIn{0%{transform:translateX(-100%);opacity:0;}100%{transform:translateX(0);opacity:1;}}@keyframes slideOut{0%{transform:translateX(0);opacity:1;}100%{transform:translateX(100%);opacity:0;}}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlRvYXN0ZXIuc3R5bGVkLnRzeCJd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XR5OiAwO1xuXHRcdH1cblx0fVxuYDtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9VG9hc3Rlci5zdHlsZWQuanMubWFwIl19 */"));exports.ToasterStyled=l;
|
|
@@ -3,6 +3,7 @@ export declare const BASE_COLORS: {
|
|
|
3
3
|
900: string;
|
|
4
4
|
800: string;
|
|
5
5
|
500: string;
|
|
6
|
+
100: string;
|
|
6
7
|
50: string;
|
|
7
8
|
10: string;
|
|
8
9
|
};
|
|
@@ -51,6 +52,8 @@ export declare const COLORS: {
|
|
|
51
52
|
brand: string;
|
|
52
53
|
brandLight: string;
|
|
53
54
|
brandVeryLight: string;
|
|
55
|
+
pureWhite: string;
|
|
56
|
+
brandTint: string;
|
|
54
57
|
negative: {
|
|
55
58
|
vibrant: string;
|
|
56
59
|
light: string;
|
|
@@ -342,6 +345,8 @@ export declare const DEFAULT_THEME: {
|
|
|
342
345
|
brand: string;
|
|
343
346
|
brandLight: string;
|
|
344
347
|
brandVeryLight: string;
|
|
348
|
+
pureWhite: string;
|
|
349
|
+
brandTint: string;
|
|
345
350
|
negative: {
|
|
346
351
|
vibrant: string;
|
|
347
352
|
light: string;
|