@bikdotai/bik-component-library 0.0.799 → 0.0.800-beta.0

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.
Files changed (19) hide show
  1. package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
  2. package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  3. package/dist/cjs/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
  4. package/dist/cjs/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  5. package/dist/cjs/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
  6. package/dist/cjs/components/bik-layout/MockMenus.d.ts +1 -0
  7. package/dist/cjs/components/template-preview/WhatsApp/ChatUiV2.js +5 -5
  8. package/dist/cjs/components/template-preview/models/WhatsAppTemplate.d.ts +4 -3
  9. package/dist/cjs/components/template-preview/models/WhatsAppTemplate.js +1 -1
  10. package/dist/esm/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
  11. package/dist/esm/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  12. package/dist/esm/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
  13. package/dist/esm/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  14. package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
  15. package/dist/esm/components/bik-layout/MockMenus.d.ts +1 -0
  16. package/dist/esm/components/template-preview/WhatsApp/ChatUiV2.js +5 -5
  17. package/dist/esm/components/template-preview/models/WhatsAppTemplate.d.ts +4 -3
  18. package/dist/esm/components/template-preview/models/WhatsAppTemplate.js +1 -1
  19. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
2
+ import { QueryBuilderNodeProps } from "../../../Types/QueryBuilderNodeProps.type";
3
3
  declare const EventsTrigger: React.FC<QueryBuilderNodeProps>;
4
4
  export default EventsTrigger;
@@ -1,2 +1,2 @@
1
- import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
1
+ import { QueryBuilderAPIData } from "../../../Types/QueryBuilderAPI.type";
2
2
  export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
2
+ import { QueryBuilderNodeProps } from "../../../Types/QueryBuilderNodeProps.type";
3
3
  declare const IGTrigger: React.FC<QueryBuilderNodeProps>;
4
4
  export default IGTrigger;
@@ -1,2 +1,2 @@
1
- import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
1
+ import { QueryBuilderAPIData } from "../../../Types/QueryBuilderAPI.type";
2
2
  export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { DropdownOption } from "../../../dropdown/type";
3
- import { QueryBuilderProperty } from "../../types/QueryBuilder.type";
4
- import { QueryBuilderNodeProps } from "../../types/QueryBuilderNodeProps.type";
3
+ import { QueryBuilderProperty } from "../../Types/QueryBuilder.type";
4
+ import { QueryBuilderNodeProps } from "../../Types/QueryBuilderNodeProps.type";
5
5
  declare const BaseTriggerQueryBuilderNode: React.FC<QueryBuilderNodeProps & {
6
6
  cacheKey: string;
7
7
  propertyAddBtnText: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const Menus: ({
2
3
  displayName: string;
3
4
  key: number;
@@ -1,19 +1,19 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/chevronDownOutline.svg.js"),r=require("../../../assets/icons/copy-code-icon.svg.js"),s=require("../../../assets/icons/halfRectangle.svg.js"),i=require("../../../assets/icons/phone.svg.js"),a=require("../../../assets/icons/qrb.svg.js"),o=require("../../../assets/icons/RedirectToNew.svg.js"),l=require("styled-components"),n=require("../../template-context-mapper/context/templateModalContext.js"),d=require("../../tooltips/Tooltip.js"),p=require("../../TypographyStyle.js"),u=require("../../../constants/Theme.js"),x=require("../helpers/VariableEditorHelper.js"),c=require("../models/TemplateMeta.js"),h=require("./ChatBtn.js"),m=require("./ChatUI.style.js"),j=require("./LimitedTimeOffer/LimitedTimeOffer.index.js"),f=require("./MediaCard.js");function C(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var T=C(l);const y=T.default.div`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/chevronDownOutline.svg.js"),r=require("../../../assets/icons/copy-code-icon.svg.js"),s=require("../../../assets/icons/halfRectangle.svg.js"),i=require("../../../assets/icons/phone.svg.js"),a=require("../../../assets/icons/qrb.svg.js"),o=require("../../../assets/icons/user_icon.svg.js"),l=require("../../../assets/icons/RedirectToNew.svg.js"),n=require("styled-components"),d=require("../../template-context-mapper/context/templateModalContext.js"),p=require("../../tooltips/Tooltip.js"),u=require("../../TypographyStyle.js"),c=require("../../../constants/Theme.js"),x=require("../helpers/VariableEditorHelper.js"),h=require("../models/TemplateMeta.js"),m=require("./ChatBtn.js"),j=require("./ChatUI.style.js"),T=require("./LimitedTimeOffer/LimitedTimeOffer.index.js"),C=require("./MediaCard.js");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=f(n);const y=g.default.div`
2
2
  position: absolute;
3
3
  width: 8px;
4
4
  height: 8px;
5
5
  left: -7.7px;
6
6
  top: -8px;
7
- `,g=T.default.div`
7
+ `,E=g.default.div`
8
8
  font-family: 'Inter';
9
9
  font-style: normal;
10
10
  font-weight: 400;
11
11
  font-size: 14px;
12
12
  line-height: 20px;
13
13
  padding: 8px 12px 0px;
14
- color: ${u.COLORS.content.primary};
14
+ color: ${c.COLORS.content.primary};
15
15
  word-wrap: break-word;
16
- `,v=T.default(g)`
16
+ `,v=g.default(E)`
17
17
  font-weight: 600;
18
18
  margin-bottom: 8px;
19
- `,E=new x.VariableEditorHelper;exports.ChatUIV2=l=>{const{bodyText:u,footerText:x,headerMediaType:C,headerText:T,headerAssetLink:O,headerAssetName:I,quickReplybtn:S,ctaBtn:L,actionTypes:_,extras:q,showHeader:P,imagePreviewStyles:b,size:w,bodyVariableList:A,headerVariableList:M,buttons:N,limitedTimeOfferComponent:R,carouselCardIndex:H,isWhatsappCarousel:B,isPreview:Y,children:D,hideFooter:F=!1}=l,U=E.format(null==u?void 0:u.replace(/</g,"&lt;").replace(/>/g,"&gt;"),A),V=E.format(null==T?void 0:T.replace(/</g,"&lt;").replace(/>/g,"&gt;"),M),{selectedCarouselIndex:k,isProductCarouselType:z,errorIndexes:W,isCarouselHovered:K}=n.useTemplateModalContext(),Q={COPY_CODE:r.default,PHONE_NUMBER:i.default,URL:o.default,QUICK_REPLY:a.default,VOICE_CALL:i.default,CALL_PERMISSION:t.default};return e.jsxs(m.Container,Object.assign({isCarouselCard:null!=H&&H>-1,showBorder:null!=H&&H===k||z&&null!=H&&H>-1&&null!=k&&k>-1,hasError:null==W?void 0:W.includes(null!=H?H:-2),isWhatsappCarousel:B,isPreview:Y,showDashedBorder:z&&K&&(null!=k?k:-1)<0&&(null!=H?H:-1)>-1},{children:[!B&&e.jsx(y,{children:e.jsx(s.default,{color:"white",height:8,width:8})}),C===c.HEADER_TYPES.TEXT?e.jsx(v,{dangerouslySetInnerHTML:{__html:V}}):C!==c.HEADER_TYPES.NONE?e.jsx(f.MediaCard,{headerAssetLink:O,headerAssetName:I,mediaType:C,imagePreviewStyles:C===c.HEADER_TYPES.IMAGE?b:{}}):e.jsx(e.Fragment,{}),(null==R?void 0:R.dateTime)?e.jsx(j.LimitedTimeOffer,{text:R.text,dateTime:R.dateTime,code:R.code}):e.jsx(e.Fragment,{}),!!u&&e.jsx(e.Fragment,{children:e.jsx(g,{dangerouslySetInnerHTML:{__html:U},style:{flex:1}})}),D,!F&&e.jsxs(m.FooterWrapper,{children:[e.jsx(d.Tooltip,Object.assign({body:null!=x?x:"",placement:"top"},{children:e.jsx(m.FooterText,Object.assign({style:{flex:1}},{children:x}))})),e.jsx(m.TimeStamp,{children:"16:48"})]}),N&&N.length>0?N.map(((t,r)=>e.jsx(h.ChatBtn,{text:"COPY_CODE"===t.type?"Copy code":t.text,Icon:Q[t.type],size:w,iconPosition:"CALL_PERMISSION"===t.type?"right":"left",textTypography:"CALL_PERMISSION"===t.type?p.TitleSmall:void 0},r))):_===c.ACTIONS_TYPES.QUICK_REPLY?e.jsx("div",{children:null==S?void 0:S.map(((t,r)=>e.jsx(h.ChatBtn,{text:t.text},r)))}):_===c.ACTIONS_TYPES.CTA_BTN?e.jsx("div",{children:null==L?void 0:L.map(((t,r)=>e.jsx(h.ChatBtn,{textTypography:P?p.Caption:p.BodySecondary,extraContent:q?t.extra:void 0,placeholder:t.placeholder,text:t.text,Icon:"phoneNumber"===t.type?i.default:o.default,size:w},r)))}):e.jsx(e.Fragment,{})]}))},exports.HtmlContainer=g;
19
+ `,O=new x.VariableEditorHelper;exports.ChatUIV2=n=>{const{bodyText:c,footerText:x,headerMediaType:f,headerText:g,headerAssetLink:_,headerAssetName:I,quickReplybtn:S,ctaBtn:q,actionTypes:L,extras:P,showHeader:b,imagePreviewStyles:w,size:A,bodyVariableList:N,headerVariableList:R,buttons:M,limitedTimeOfferComponent:H,carouselCardIndex:B,isWhatsappCarousel:Y,isPreview:F,children:D,hideFooter:U=!1}=n,V=O.format(null==c?void 0:c.replace(/</g,"&lt;").replace(/>/g,"&gt;"),N),k=O.format(null==g?void 0:g.replace(/</g,"&lt;").replace(/>/g,"&gt;"),R),{selectedCarouselIndex:z,isProductCarouselType:Q,errorIndexes:W,isCarouselHovered:K}=d.useTemplateModalContext(),G={COPY_CODE:r.default,PHONE_NUMBER:i.default,URL:l.default,QUICK_REPLY:a.default,VOICE_CALL:i.default,CALL_PERMISSION:t.default,REQUEST_CONTACT_INFO:o.default};return e.jsxs(j.Container,Object.assign({isCarouselCard:null!=B&&B>-1,showBorder:null!=B&&B===z||Q&&null!=B&&B>-1&&null!=z&&z>-1,hasError:null==W?void 0:W.includes(null!=B?B:-2),isWhatsappCarousel:Y,isPreview:F,showDashedBorder:Q&&K&&(null!=z?z:-1)<0&&(null!=B?B:-1)>-1},{children:[!Y&&e.jsx(y,{children:e.jsx(s.default,{color:"white",height:8,width:8})}),f===h.HEADER_TYPES.TEXT?e.jsx(v,{dangerouslySetInnerHTML:{__html:k}}):f!==h.HEADER_TYPES.NONE?e.jsx(C.MediaCard,{headerAssetLink:_,headerAssetName:I,mediaType:f,imagePreviewStyles:f===h.HEADER_TYPES.IMAGE?w:{}}):e.jsx(e.Fragment,{}),(null==H?void 0:H.dateTime)?e.jsx(T.LimitedTimeOffer,{text:H.text,dateTime:H.dateTime,code:H.code}):e.jsx(e.Fragment,{}),!!c&&e.jsx(e.Fragment,{children:e.jsx(E,{dangerouslySetInnerHTML:{__html:V},style:{flex:1}})}),D,!U&&e.jsxs(j.FooterWrapper,{children:[e.jsx(p.Tooltip,Object.assign({body:null!=x?x:"",placement:"top"},{children:e.jsx(j.FooterText,Object.assign({style:{flex:1}},{children:x}))})),e.jsx(j.TimeStamp,{children:"16:48"})]}),M&&M.length>0?M.map(((t,r)=>e.jsx(m.ChatBtn,{text:"COPY_CODE"===t.type?"Copy code":t.text,Icon:G[t.type],size:A,iconPosition:"CALL_PERMISSION"===t.type?"right":"left",textTypography:"CALL_PERMISSION"===t.type?u.TitleSmall:void 0},r))):L===h.ACTIONS_TYPES.QUICK_REPLY?e.jsx("div",{children:null==S?void 0:S.map(((t,r)=>e.jsx(m.ChatBtn,{text:t.text},r)))}):L===h.ACTIONS_TYPES.CTA_BTN?e.jsx("div",{children:null==q?void 0:q.map(((t,r)=>e.jsx(m.ChatBtn,{textTypography:b?u.Caption:u.BodySecondary,extraContent:P?t.extra:void 0,placeholder:t.placeholder,text:t.text,Icon:"phoneNumber"===t.type?i.default:l.default,size:A},r)))}):e.jsx(e.Fragment,{})]}))},exports.HtmlContainer=E;
@@ -19,7 +19,7 @@ export type WhatsAppTemplate = {
19
19
  has_expiration: boolean;
20
20
  };
21
21
  buttons?: {
22
- type: 'QUICK_REPLY' | 'URL' | 'PHONE_NUMBER' | 'COPY_CODE' | 'VOICE_CALL';
22
+ type: 'QUICK_REPLY' | 'URL' | 'PHONE_NUMBER' | 'COPY_CODE' | 'VOICE_CALL' | 'REQUEST_CONTACT_INFO';
23
23
  text?: string;
24
24
  url?: string;
25
25
  example?: string[];
@@ -59,7 +59,7 @@ export type WhatsAppTemplate = {
59
59
  showCallPermissionCard?: boolean;
60
60
  callPermissionText?: string;
61
61
  };
62
- export type WhatsappTemplateButtonTypes = 'QUICK_REPLY' | 'URL' | 'PHONE_NUMBER' | 'COPY_CODE' | 'VOICE_CALL' | 'CALL_PERMISSION';
62
+ export type WhatsappTemplateButtonTypes = 'QUICK_REPLY' | 'URL' | 'PHONE_NUMBER' | 'COPY_CODE' | 'VOICE_CALL' | 'CALL_PERMISSION' | 'REQUEST_CONTACT_INFO';
63
63
  export type CreateTemplateType = {
64
64
  /** Data */
65
65
  headerType: HEADER_TYPES;
@@ -291,7 +291,8 @@ export declare enum BUTTON_TYPE {
291
291
  URL = "URL",
292
292
  PHONE_NUMBER = "PHONE_NUMBER",
293
293
  COPY_CODE = "COPY_CODE",
294
- VOICE_CALL = "VOICE_CALL"
294
+ VOICE_CALL = "VOICE_CALL",
295
+ REQUEST_CONTACT_INFO = "REQUEST_CONTACT_INFO"
295
296
  }
296
297
  export declare enum POD {
297
298
  CHATBOT = "CHATBOT",
@@ -1 +1 @@
1
- "use strict";var E,T,O;Object.defineProperty(exports,"__esModule",{value:!0}),exports.TEMPLATE_QUALITY=void 0,(E=exports.TEMPLATE_QUALITY||(exports.TEMPLATE_QUALITY={})).GREEN="GREEN",E.YELLOW="YELLOW",E.RED="RED",E.UNKNOWN="UNKNOWN",exports.BUTTON_TYPE=void 0,(T=exports.BUTTON_TYPE||(exports.BUTTON_TYPE={})).QUICK_REPLY="QUICK_REPLY",T.URL="URL",T.PHONE_NUMBER="PHONE_NUMBER",T.COPY_CODE="COPY_CODE",T.VOICE_CALL="VOICE_CALL",exports.POD=void 0,(O=exports.POD||(exports.POD={})).CHATBOT="CHATBOT",O.GROWTH="GROWTH",O.CAMPAIGN="CAMPAIGN",O.CRM="CRM",O.INTEGRATIONS="INTEGRATIONS",O.OPENAI="OPENAI",O.DM="DM",O.FRONTEND="FRONTEND";
1
+ "use strict";var E,T,O;Object.defineProperty(exports,"__esModule",{value:!0}),exports.TEMPLATE_QUALITY=void 0,(E=exports.TEMPLATE_QUALITY||(exports.TEMPLATE_QUALITY={})).GREEN="GREEN",E.YELLOW="YELLOW",E.RED="RED",E.UNKNOWN="UNKNOWN",exports.BUTTON_TYPE=void 0,(T=exports.BUTTON_TYPE||(exports.BUTTON_TYPE={})).QUICK_REPLY="QUICK_REPLY",T.URL="URL",T.PHONE_NUMBER="PHONE_NUMBER",T.COPY_CODE="COPY_CODE",T.VOICE_CALL="VOICE_CALL",T.REQUEST_CONTACT_INFO="REQUEST_CONTACT_INFO",exports.POD=void 0,(O=exports.POD||(exports.POD={})).CHATBOT="CHATBOT",O.GROWTH="GROWTH",O.CAMPAIGN="CAMPAIGN",O.CRM="CRM",O.INTEGRATIONS="INTEGRATIONS",O.OPENAI="OPENAI",O.DM="DM",O.FRONTEND="FRONTEND";
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
2
+ import { QueryBuilderNodeProps } from "../../../Types/QueryBuilderNodeProps.type";
3
3
  declare const EventsTrigger: React.FC<QueryBuilderNodeProps>;
4
4
  export default EventsTrigger;
@@ -1,2 +1,2 @@
1
- import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
1
+ import { QueryBuilderAPIData } from "../../../Types/QueryBuilderAPI.type";
2
2
  export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
2
+ import { QueryBuilderNodeProps } from "../../../Types/QueryBuilderNodeProps.type";
3
3
  declare const IGTrigger: React.FC<QueryBuilderNodeProps>;
4
4
  export default IGTrigger;
@@ -1,2 +1,2 @@
1
- import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
1
+ import { QueryBuilderAPIData } from "../../../Types/QueryBuilderAPI.type";
2
2
  export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { DropdownOption } from "../../../dropdown/type";
3
- import { QueryBuilderProperty } from "../../types/QueryBuilder.type";
4
- import { QueryBuilderNodeProps } from "../../types/QueryBuilderNodeProps.type";
3
+ import { QueryBuilderProperty } from "../../Types/QueryBuilder.type";
4
+ import { QueryBuilderNodeProps } from "../../Types/QueryBuilderNodeProps.type";
5
5
  declare const BaseTriggerQueryBuilderNode: React.FC<QueryBuilderNodeProps & {
6
6
  cacheKey: string;
7
7
  propertyAddBtnText: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const Menus: ({
2
3
  displayName: string;
3
4
  key: number;
@@ -1,19 +1,19 @@
1
- import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import r from"../../../assets/icons/chevronDownOutline.svg.js";import i from"../../../assets/icons/copy-code-icon.svg.js";import s from"../../../assets/icons/halfRectangle.svg.js";import l from"../../../assets/icons/phone.svg.js";import n from"../../../assets/icons/qrb.svg.js";import a from"../../../assets/icons/RedirectToNew.svg.js";import p from"styled-components";import{useTemplateModalContext as d}from"../../template-context-mapper/context/templateModalContext.js";import{Tooltip as m}from"../../tooltips/Tooltip.js";import{TitleSmall as c,Caption as h,BodySecondary as f}from"../../TypographyStyle.js";import{COLORS as x}from"../../../constants/Theme.js";import{VariableEditorHelper as y}from"../helpers/VariableEditorHelper.js";import{HEADER_TYPES as g,ACTIONS_TYPES as u}from"../models/TemplateMeta.js";import{ChatBtn as C}from"./ChatBtn.js";import{Container as T,FooterWrapper as v,FooterText as j,TimeStamp as I}from"./ChatUI.style.js";import{LimitedTimeOffer as L}from"./LimitedTimeOffer/LimitedTimeOffer.index.js";import{MediaCard as w}from"./MediaCard.js";const O=p.div`
1
+ import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import r from"../../../assets/icons/chevronDownOutline.svg.js";import i from"../../../assets/icons/copy-code-icon.svg.js";import s from"../../../assets/icons/halfRectangle.svg.js";import l from"../../../assets/icons/phone.svg.js";import n from"../../../assets/icons/qrb.svg.js";import a from"../../../assets/icons/user_icon.svg.js";import p from"../../../assets/icons/RedirectToNew.svg.js";import d from"styled-components";import{useTemplateModalContext as m}from"../../template-context-mapper/context/templateModalContext.js";import{Tooltip as c}from"../../tooltips/Tooltip.js";import{TitleSmall as h,Caption as f,BodySecondary as x}from"../../TypographyStyle.js";import{COLORS as g}from"../../../constants/Theme.js";import{VariableEditorHelper as u}from"../helpers/VariableEditorHelper.js";import{HEADER_TYPES as y,ACTIONS_TYPES as C}from"../models/TemplateMeta.js";import{ChatBtn as T}from"./ChatBtn.js";import{Container as v,FooterWrapper as j,FooterText as I,TimeStamp as L}from"./ChatUI.style.js";import{LimitedTimeOffer as O}from"./LimitedTimeOffer/LimitedTimeOffer.index.js";import{MediaCard as w}from"./MediaCard.js";const E=d.div`
2
2
  position: absolute;
3
3
  width: 8px;
4
4
  height: 8px;
5
5
  left: -7.7px;
6
6
  top: -8px;
7
- `,b=p.div`
7
+ `,_=d.div`
8
8
  font-family: 'Inter';
9
9
  font-style: normal;
10
10
  font-weight: 400;
11
11
  font-size: 14px;
12
12
  line-height: 20px;
13
13
  padding: 8px 12px 0px;
14
- color: ${x.content.primary};
14
+ color: ${g.content.primary};
15
15
  word-wrap: break-word;
16
- `,E=p(b)`
16
+ `,b=d(_)`
17
17
  font-weight: 600;
18
18
  margin-bottom: 8px;
19
- `,P=new y,_=p=>{const{bodyText:x,footerText:y,headerMediaType:_,headerText:N,headerAssetLink:M,headerAssetName:S,quickReplybtn:A,ctaBtn:R,actionTypes:B,extras:H,showHeader:U,imagePreviewStyles:k,size:z,bodyVariableList:D,headerVariableList:V,buttons:Y,limitedTimeOfferComponent:q,carouselCardIndex:K,isWhatsappCarousel:Q,isPreview:W,children:F,hideFooter:G=!1}=p,X=P.format(null==x?void 0:x.replace(/</g,"&lt;").replace(/>/g,"&gt;"),D),$=P.format(null==N?void 0:N.replace(/</g,"&lt;").replace(/>/g,"&gt;"),V),{selectedCarouselIndex:J,isProductCarouselType:Z,errorIndexes:ee,isCarouselHovered:te}=d(),oe={COPY_CODE:i,PHONE_NUMBER:l,URL:a,QUICK_REPLY:n,VOICE_CALL:l,CALL_PERMISSION:r};return e(T,Object.assign({isCarouselCard:null!=K&&K>-1,showBorder:null!=K&&K===J||Z&&null!=K&&K>-1&&null!=J&&J>-1,hasError:null==ee?void 0:ee.includes(null!=K?K:-2),isWhatsappCarousel:Q,isPreview:W,showDashedBorder:Z&&te&&(null!=J?J:-1)<0&&(null!=K?K:-1)>-1},{children:[!Q&&t(O,{children:t(s,{color:"white",height:8,width:8})}),_===g.TEXT?t(E,{dangerouslySetInnerHTML:{__html:$}}):_!==g.NONE?t(w,{headerAssetLink:M,headerAssetName:S,mediaType:_,imagePreviewStyles:_===g.IMAGE?k:{}}):t(o,{}),(null==q?void 0:q.dateTime)?t(L,{text:q.text,dateTime:q.dateTime,code:q.code}):t(o,{}),!!x&&t(o,{children:t(b,{dangerouslySetInnerHTML:{__html:X},style:{flex:1}})}),F,!G&&e(v,{children:[t(m,Object.assign({body:null!=y?y:"",placement:"top"},{children:t(j,Object.assign({style:{flex:1}},{children:y}))})),t(I,{children:"16:48"})]}),Y&&Y.length>0?Y.map(((e,o)=>t(C,{text:"COPY_CODE"===e.type?"Copy code":e.text,Icon:oe[e.type],size:z,iconPosition:"CALL_PERMISSION"===e.type?"right":"left",textTypography:"CALL_PERMISSION"===e.type?c:void 0},o))):B===u.QUICK_REPLY?t("div",{children:null==A?void 0:A.map(((e,o)=>t(C,{text:e.text},o)))}):B===u.CTA_BTN?t("div",{children:null==R?void 0:R.map(((e,o)=>t(C,{textTypography:U?h:f,extraContent:H?e.extra:void 0,placeholder:e.placeholder,text:e.text,Icon:"phoneNumber"===e.type?l:a,size:z},o)))}):t(o,{})]}))};export{_ as ChatUIV2,b as HtmlContainer};
19
+ `,N=new u,P=d=>{const{bodyText:g,footerText:u,headerMediaType:P,headerText:S,headerAssetLink:A,headerAssetName:M,quickReplybtn:R,ctaBtn:B,actionTypes:H,extras:U,showHeader:k,imagePreviewStyles:z,size:D,bodyVariableList:V,headerVariableList:Y,buttons:Q,limitedTimeOfferComponent:q,carouselCardIndex:F,isWhatsappCarousel:K,isPreview:W,children:G,hideFooter:X=!1}=d,$=N.format(null==g?void 0:g.replace(/</g,"&lt;").replace(/>/g,"&gt;"),V),J=N.format(null==S?void 0:S.replace(/</g,"&lt;").replace(/>/g,"&gt;"),Y),{selectedCarouselIndex:Z,isProductCarouselType:ee,errorIndexes:te,isCarouselHovered:oe}=m(),re={COPY_CODE:i,PHONE_NUMBER:l,URL:p,QUICK_REPLY:n,VOICE_CALL:l,CALL_PERMISSION:r,REQUEST_CONTACT_INFO:a};return e(v,Object.assign({isCarouselCard:null!=F&&F>-1,showBorder:null!=F&&F===Z||ee&&null!=F&&F>-1&&null!=Z&&Z>-1,hasError:null==te?void 0:te.includes(null!=F?F:-2),isWhatsappCarousel:K,isPreview:W,showDashedBorder:ee&&oe&&(null!=Z?Z:-1)<0&&(null!=F?F:-1)>-1},{children:[!K&&t(E,{children:t(s,{color:"white",height:8,width:8})}),P===y.TEXT?t(b,{dangerouslySetInnerHTML:{__html:J}}):P!==y.NONE?t(w,{headerAssetLink:A,headerAssetName:M,mediaType:P,imagePreviewStyles:P===y.IMAGE?z:{}}):t(o,{}),(null==q?void 0:q.dateTime)?t(O,{text:q.text,dateTime:q.dateTime,code:q.code}):t(o,{}),!!g&&t(o,{children:t(_,{dangerouslySetInnerHTML:{__html:$},style:{flex:1}})}),G,!X&&e(j,{children:[t(c,Object.assign({body:null!=u?u:"",placement:"top"},{children:t(I,Object.assign({style:{flex:1}},{children:u}))})),t(L,{children:"16:48"})]}),Q&&Q.length>0?Q.map(((e,o)=>t(T,{text:"COPY_CODE"===e.type?"Copy code":e.text,Icon:re[e.type],size:D,iconPosition:"CALL_PERMISSION"===e.type?"right":"left",textTypography:"CALL_PERMISSION"===e.type?h:void 0},o))):H===C.QUICK_REPLY?t("div",{children:null==R?void 0:R.map(((e,o)=>t(T,{text:e.text},o)))}):H===C.CTA_BTN?t("div",{children:null==B?void 0:B.map(((e,o)=>t(T,{textTypography:k?f:x,extraContent:U?e.extra:void 0,placeholder:e.placeholder,text:e.text,Icon:"phoneNumber"===e.type?l:p,size:D},o)))}):t(o,{})]}))};export{P as ChatUIV2,_ as HtmlContainer};
@@ -19,7 +19,7 @@ export type WhatsAppTemplate = {
19
19
  has_expiration: boolean;
20
20
  };
21
21
  buttons?: {
22
- type: 'QUICK_REPLY' | 'URL' | 'PHONE_NUMBER' | 'COPY_CODE' | 'VOICE_CALL';
22
+ type: 'QUICK_REPLY' | 'URL' | 'PHONE_NUMBER' | 'COPY_CODE' | 'VOICE_CALL' | 'REQUEST_CONTACT_INFO';
23
23
  text?: string;
24
24
  url?: string;
25
25
  example?: string[];
@@ -59,7 +59,7 @@ export type WhatsAppTemplate = {
59
59
  showCallPermissionCard?: boolean;
60
60
  callPermissionText?: string;
61
61
  };
62
- export type WhatsappTemplateButtonTypes = 'QUICK_REPLY' | 'URL' | 'PHONE_NUMBER' | 'COPY_CODE' | 'VOICE_CALL' | 'CALL_PERMISSION';
62
+ export type WhatsappTemplateButtonTypes = 'QUICK_REPLY' | 'URL' | 'PHONE_NUMBER' | 'COPY_CODE' | 'VOICE_CALL' | 'CALL_PERMISSION' | 'REQUEST_CONTACT_INFO';
63
63
  export type CreateTemplateType = {
64
64
  /** Data */
65
65
  headerType: HEADER_TYPES;
@@ -291,7 +291,8 @@ export declare enum BUTTON_TYPE {
291
291
  URL = "URL",
292
292
  PHONE_NUMBER = "PHONE_NUMBER",
293
293
  COPY_CODE = "COPY_CODE",
294
- VOICE_CALL = "VOICE_CALL"
294
+ VOICE_CALL = "VOICE_CALL",
295
+ REQUEST_CONTACT_INFO = "REQUEST_CONTACT_INFO"
295
296
  }
296
297
  export declare enum POD {
297
298
  CHATBOT = "CHATBOT",
@@ -1 +1 @@
1
- var E,N,O;!function(E){E.GREEN="GREEN",E.YELLOW="YELLOW",E.RED="RED",E.UNKNOWN="UNKNOWN"}(E||(E={})),function(E){E.QUICK_REPLY="QUICK_REPLY",E.URL="URL",E.PHONE_NUMBER="PHONE_NUMBER",E.COPY_CODE="COPY_CODE",E.VOICE_CALL="VOICE_CALL"}(N||(N={})),function(E){E.CHATBOT="CHATBOT",E.GROWTH="GROWTH",E.CAMPAIGN="CAMPAIGN",E.CRM="CRM",E.INTEGRATIONS="INTEGRATIONS",E.OPENAI="OPENAI",E.DM="DM",E.FRONTEND="FRONTEND"}(O||(O={}));export{N as BUTTON_TYPE,O as POD,E as TEMPLATE_QUALITY};
1
+ var E,N,O;!function(E){E.GREEN="GREEN",E.YELLOW="YELLOW",E.RED="RED",E.UNKNOWN="UNKNOWN"}(E||(E={})),function(E){E.QUICK_REPLY="QUICK_REPLY",E.URL="URL",E.PHONE_NUMBER="PHONE_NUMBER",E.COPY_CODE="COPY_CODE",E.VOICE_CALL="VOICE_CALL",E.REQUEST_CONTACT_INFO="REQUEST_CONTACT_INFO"}(N||(N={})),function(E){E.CHATBOT="CHATBOT",E.GROWTH="GROWTH",E.CAMPAIGN="CAMPAIGN",E.CRM="CRM",E.INTEGRATIONS="INTEGRATIONS",E.OPENAI="OPENAI",E.DM="DM",E.FRONTEND="FRONTEND"}(O||(O={}));export{N as BUTTON_TYPE,O as POD,E as TEMPLATE_QUALITY};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.799",
3
+ "version": "0.0.800-beta.0",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",