@bikdotai/bik-component-library 0.0.740-beta.6 → 0.0.740
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/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
- package/dist/cjs/components/QueryBuilder/helpers/MetaCustomProcessor.d.ts +1 -1
- package/dist/cjs/components/SearchFilter/components/FilterChipListRenderer.js +1 -1
- package/dist/cjs/components/SearchFilter/components/SearchFilterItem.js +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/scoreBlock/index.d.ts +3 -0
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/scoreBlock/types.js +1 -0
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/cjs/components/postPicker/postPicker.js +1 -1
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
- package/dist/esm/components/QueryBuilder/helpers/MetaCustomProcessor.d.ts +1 -1
- package/dist/esm/components/SearchFilter/components/FilterChipListRenderer.js +1 -1
- package/dist/esm/components/SearchFilter/components/SearchFilterItem.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/scoreBlock/index.d.ts +3 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/scoreBlock/types.js +1 -0
- package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/esm/components/postPicker/postPicker.js +1 -1
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/components/BikGiftedChat/Bubble/Bubble.d.ts +0 -5
- package/dist/cjs/components/BikGiftedChat/Bubble/Bubble.js +0 -1
- package/dist/cjs/components/BikGiftedChat/Bubble/types.d.ts +0 -25
- package/dist/cjs/components/BikGiftedChat/GiftedChat/Day.d.ts +0 -15
- package/dist/cjs/components/BikGiftedChat/GiftedChat/Day.js +0 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/GiftedChat.d.ts +0 -5
- package/dist/cjs/components/BikGiftedChat/GiftedChat/GiftedChat.js +0 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/messageHelpers.d.ts +0 -6
- package/dist/cjs/components/BikGiftedChat/GiftedChat/messageHelpers.js +0 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/scrollHooks.d.ts +0 -10
- package/dist/cjs/components/BikGiftedChat/GiftedChat/scrollHooks.js +0 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/types.d.ts +0 -95
- package/dist/cjs/components/BikGiftedChat/GiftedChat/types.js +0 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/utils.d.ts +0 -22
- package/dist/cjs/components/BikGiftedChat/GiftedChat/utils.js +0 -1
- package/dist/cjs/components/BikGiftedChat/index.d.ts +0 -5
- package/dist/cjs/components/BikGiftedChat/types.d.ts +0 -24
- package/dist/cjs/hooks/useWindowSize.d.ts +0 -2
- package/dist/cjs/hooks/useWindowSize.js +0 -1
- package/dist/esm/components/BikGiftedChat/Bubble/Bubble.d.ts +0 -5
- package/dist/esm/components/BikGiftedChat/Bubble/Bubble.js +0 -1
- package/dist/esm/components/BikGiftedChat/Bubble/types.d.ts +0 -25
- package/dist/esm/components/BikGiftedChat/GiftedChat/Day.d.ts +0 -15
- package/dist/esm/components/BikGiftedChat/GiftedChat/Day.js +0 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/GiftedChat.d.ts +0 -5
- package/dist/esm/components/BikGiftedChat/GiftedChat/GiftedChat.js +0 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/messageHelpers.d.ts +0 -6
- package/dist/esm/components/BikGiftedChat/GiftedChat/messageHelpers.js +0 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/scrollHooks.d.ts +0 -10
- package/dist/esm/components/BikGiftedChat/GiftedChat/scrollHooks.js +0 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/types.d.ts +0 -95
- package/dist/esm/components/BikGiftedChat/GiftedChat/types.js +0 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/utils.d.ts +0 -22
- package/dist/esm/components/BikGiftedChat/GiftedChat/utils.js +0 -1
- package/dist/esm/components/BikGiftedChat/index.d.ts +0 -5
- package/dist/esm/components/BikGiftedChat/types.d.ts +0 -24
- package/dist/esm/hooks/useWindowSize.d.ts +0 -2
- package/dist/esm/hooks/useWindowSize.js +0 -1
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BubbleProps } from '../Bubble/types';
|
|
3
|
-
import { IMessage, LeftRightStyle, User } from '../types';
|
|
4
|
-
export interface ListViewProps {
|
|
5
|
-
style?: React.CSSProperties;
|
|
6
|
-
onEndReached?: () => void;
|
|
7
|
-
onEndReachedThreshold?: number;
|
|
8
|
-
onScroll?: (event: React.UIEvent<HTMLDivElement>) => void;
|
|
9
|
-
ref?: React.RefObject<HTMLDivElement> | React.MutableRefObject<HTMLDivElement | null>;
|
|
10
|
-
}
|
|
11
|
-
export interface AvatarProps<TMessage extends IMessage = IMessage> {
|
|
12
|
-
currentMessage: TMessage;
|
|
13
|
-
previousMessage?: TMessage;
|
|
14
|
-
nextMessage?: TMessage;
|
|
15
|
-
position: 'left' | 'right';
|
|
16
|
-
user: User;
|
|
17
|
-
renderAvatarOnTop?: boolean;
|
|
18
|
-
showUserAvatar?: boolean;
|
|
19
|
-
showAvatarForEveryMessage?: boolean;
|
|
20
|
-
imageStyle?: LeftRightStyle<React.CSSProperties>;
|
|
21
|
-
containerStyle?: LeftRightStyle<React.CSSProperties>;
|
|
22
|
-
[key: string]: any;
|
|
23
|
-
}
|
|
24
|
-
export interface DayProps {
|
|
25
|
-
createdAt?: Date | number | string;
|
|
26
|
-
dateFormat?: string;
|
|
27
|
-
dateFormatCalendar?: {
|
|
28
|
-
sameDay?: string;
|
|
29
|
-
nextDay?: string;
|
|
30
|
-
nextWeek?: string;
|
|
31
|
-
lastDay?: string;
|
|
32
|
-
lastWeek?: string;
|
|
33
|
-
sameElse?: string;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
export interface GiftedChatProps<TMessage extends IMessage = IMessage> {
|
|
37
|
-
messages: TMessage[];
|
|
38
|
-
user: User;
|
|
39
|
-
renderBubble?: (props: BubbleProps<TMessage>) => React.ReactNode;
|
|
40
|
-
renderAvatar?: (props: AvatarProps<TMessage>) => React.ReactNode;
|
|
41
|
-
renderDay?: (props: DayProps) => React.ReactNode;
|
|
42
|
-
renderLoading?: () => React.ReactNode;
|
|
43
|
-
renderChatEmpty?: () => React.ReactNode;
|
|
44
|
-
listViewProps?: ListViewProps;
|
|
45
|
-
topThreshold?: number;
|
|
46
|
-
renderAvatarOnTop?: boolean;
|
|
47
|
-
showUserAvatar?: boolean;
|
|
48
|
-
showAvatarForEveryMessage?: boolean;
|
|
49
|
-
inverted?: boolean;
|
|
50
|
-
onLongPress?: (context?: any, message?: TMessage) => void;
|
|
51
|
-
onPress?: (context?: any, message?: TMessage) => void;
|
|
52
|
-
messageIdGenerator?: (message?: TMessage) => string;
|
|
53
|
-
[key: string]: any;
|
|
54
|
-
}
|
|
55
|
-
export interface ScrollState {
|
|
56
|
-
isInitialMount: boolean;
|
|
57
|
-
isUserScrolling: boolean;
|
|
58
|
-
isLoadingOldMessages: boolean;
|
|
59
|
-
isAtBottom: boolean;
|
|
60
|
-
hasTriggeredEndReached: boolean;
|
|
61
|
-
lastMessagesLength: number;
|
|
62
|
-
previousScrollHeight: number;
|
|
63
|
-
previousScrollTop: number;
|
|
64
|
-
scrollTimeout: number | null;
|
|
65
|
-
}
|
|
66
|
-
export declare enum CHAT_ACTIVITY_TYPES_FOR_CALL_BUBBLE {
|
|
67
|
-
CALLING_CALL = "CALLING_CALL",
|
|
68
|
-
RINGING_CALL = "RINGING_CALL",
|
|
69
|
-
ONGOING_CALL = "ONGOING_CALL",
|
|
70
|
-
COMPLETED_CALL = "COMPLETED_CALL",
|
|
71
|
-
MISSED_CALL = "MISSED_CALL",
|
|
72
|
-
REQUESTED_CALLBACK = "REQUESTED_CALLBACK",
|
|
73
|
-
DECLINED_CALL = "DECLINED_CALL",
|
|
74
|
-
DISCONNECTED_CALL = "DISCONNECTED_CALL",
|
|
75
|
-
UNANSWERED_CALL = "UNANSWERED_CALL"
|
|
76
|
-
}
|
|
77
|
-
export declare const enum MESSAGE_CHANNELS {
|
|
78
|
-
INSTAGRAM = "instagram",
|
|
79
|
-
MESSENGER = "messenger",
|
|
80
|
-
WHATSAPP = "whatsapp",
|
|
81
|
-
GMAIL = "gmail",
|
|
82
|
-
LIVECHAT = "livechat",
|
|
83
|
-
GOOGLE_BUSINESS_CHAT = "gbm",
|
|
84
|
-
SHOPIFY = "shopify",
|
|
85
|
-
FACEBOOK = "facebook",
|
|
86
|
-
EMAIL = "email",
|
|
87
|
-
SMTP = "smtp",
|
|
88
|
-
FACEBOOK_CATALOG = "facebook-catalog",
|
|
89
|
-
WHATSAPP_VOICE_CALL = "whatsapp-voice-call",
|
|
90
|
-
CREATE_SIGNATURE = "create-signature",
|
|
91
|
-
EDIT_SIGNATURE = "edit-signature",
|
|
92
|
-
WEBPUSH = "webpush",
|
|
93
|
-
TASKS = "tasks",
|
|
94
|
-
RCS = "rcs"
|
|
95
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var L,A;!function(L){L.CALLING_CALL="CALLING_CALL",L.RINGING_CALL="RINGING_CALL",L.ONGOING_CALL="ONGOING_CALL",L.COMPLETED_CALL="COMPLETED_CALL",L.MISSED_CALL="MISSED_CALL",L.REQUESTED_CALLBACK="REQUESTED_CALLBACK",L.DECLINED_CALL="DECLINED_CALL",L.DISCONNECTED_CALL="DISCONNECTED_CALL",L.UNANSWERED_CALL="UNANSWERED_CALL"}(L||(L={})),function(L){L.INSTAGRAM="instagram",L.MESSENGER="messenger",L.WHATSAPP="whatsapp",L.GMAIL="gmail",L.LIVECHAT="livechat",L.GOOGLE_BUSINESS_CHAT="gbm",L.SHOPIFY="shopify",L.FACEBOOK="facebook",L.EMAIL="email",L.SMTP="smtp",L.FACEBOOK_CATALOG="facebook-catalog",L.WHATSAPP_VOICE_CALL="whatsapp-voice-call",L.CREATE_SIGNATURE="create-signature",L.EDIT_SIGNATURE="edit-signature",L.WEBPUSH="webpush",L.TASKS="tasks",L.RCS="rcs"}(A||(A={}));export{L as CHAT_ACTIVITY_TYPES_FOR_CALL_BUBBLE,A as MESSAGE_CHANNELS};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { IMessage } from '../types';
|
|
3
|
-
export declare const BOTTOM_THRESHOLD = 100;
|
|
4
|
-
export declare const TOP_THRESHOLD = 600;
|
|
5
|
-
export declare const SCROLL_IDLE_MS = 300;
|
|
6
|
-
export declare const Constants: {
|
|
7
|
-
readonly ChatActivity: {
|
|
8
|
-
readonly Category: {
|
|
9
|
-
readonly ACTIVITY: "ACTIVITY";
|
|
10
|
-
readonly MESSAGE: "MESSAGE";
|
|
11
|
-
};
|
|
12
|
-
readonly Type: {
|
|
13
|
-
readonly PRIVATE_NOTE: "PRIVATE_NOTE";
|
|
14
|
-
readonly CALL: "CALL";
|
|
15
|
-
readonly AUTOMATION: "AUTOMATION";
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export declare const isSameDay: (a?: IMessage, b?: IMessage) => boolean;
|
|
20
|
-
export declare const normalizeRef: <T>(ref: import("react").Ref<T> | undefined, fallback: import("react").RefObject<T>) => import("react").MutableRefObject<T | null>;
|
|
21
|
-
export declare const isScrollAtBottom: (el: HTMLDivElement | null) => boolean;
|
|
22
|
-
export declare const isStringifiedArray: (value: any) => [boolean, [] | null];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isSameDay as t}from"date-fns";const r=100,e=600,n=300,c={ChatActivity:{Category:{ACTIVITY:"ACTIVITY",MESSAGE:"MESSAGE"},Type:{PRIVATE_NOTE:"PRIVATE_NOTE",CALL:"CALL",AUTOMATION:"AUTOMATION"}}},A=(r,e)=>!(!(null==r?void 0:r.createdAt)||!(null==e?void 0:e.createdAt))&&t(new Date(r.createdAt),new Date(e.createdAt)),o=(t,r)=>{if(!t)return r;if("object"==typeof t&&null!==t&&"current"in t)return t;if("function"==typeof t){const e={current:r.current};return t(r.current),e}return r},i=t=>{if(!t)return!1;const{scrollTop:r,scrollHeight:e,clientHeight:n}=t;return r+n>=e-100},u=t=>{try{const r="string"==typeof t?JSON.parse(t):t;return[Array.isArray(r),r]}catch(t){return[!1,null]}};export{r as BOTTOM_THRESHOLD,c as Constants,n as SCROLL_IDLE_MS,e as TOP_THRESHOLD,A as isSameDay,i as isScrollAtBottom,u as isStringifiedArray,o as normalizeRef};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export type { IMessage, User, LeftRightStyle } from './types';
|
|
2
|
-
export { default as BikGiftedChat } from './GiftedChat/GiftedChat';
|
|
3
|
-
export { Bubble } from './Bubble/Bubble';
|
|
4
|
-
export type { BubbleProps } from './Bubble/types';
|
|
5
|
-
export type { GiftedChatProps, DayProps, AvatarProps as GiftedChatAvatarProps, ListViewProps, ScrollState, } from './GiftedChat/types';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export interface User {
|
|
2
|
-
_id: string | number;
|
|
3
|
-
name?: string;
|
|
4
|
-
avatar?: string | number;
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
}
|
|
7
|
-
export interface IMessage<TUser extends User = User> {
|
|
8
|
-
_id: string | number;
|
|
9
|
-
text: string;
|
|
10
|
-
createdAt: Date | number | string;
|
|
11
|
-
user: TUser;
|
|
12
|
-
image?: string;
|
|
13
|
-
video?: string;
|
|
14
|
-
audio?: string;
|
|
15
|
-
system?: boolean;
|
|
16
|
-
sent?: boolean;
|
|
17
|
-
received?: boolean;
|
|
18
|
-
pending?: boolean;
|
|
19
|
-
[key: string]: any;
|
|
20
|
-
}
|
|
21
|
-
export interface LeftRightStyle<T> {
|
|
22
|
-
left?: T;
|
|
23
|
-
right?: T;
|
|
24
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useState as n,useEffect as e,useLayoutEffect as o}from"react";const d=()=>{var d;const[i,t]=n("undefined"!=typeof window&&(null===(d=null===window||void 0===window?void 0:window.document)||void 0===d?void 0:d.body.clientWidth)<767||!1);let w;return w="undefined"==typeof window?e:o,w((()=>{function n(){t(window.document.body.clientWidth<767)}return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)}),[]),i};export{d as useWindowSize};
|