@bikdotai/bik-component-library 0.0.594-am.1 → 0.0.595-beta.1
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/assets/icons/locked.svg.js +1 -0
- package/dist/cjs/components/bik-layout/BikSidebar.d.ts +1 -0
- package/dist/cjs/components/bik-layout/BikSidebar.js +1 -1
- package/dist/cjs/components/bik-layout/FeatureModalV2.d.ts +1 -0
- package/dist/cjs/components/bik-layout/FeatureModalV2.js +1 -1
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +6 -1
- package/dist/cjs/components/bik-layout/SidebarStyles.js +1 -1
- package/dist/cjs/components/modals/styledModal.d.ts +1 -0
- package/dist/cjs/components/modals/styledModal.js +1 -1
- package/dist/cjs/components/states/StateComponent.d.ts +1 -3
- package/dist/cjs/components/states/StateComponent.js +1 -1
- package/dist/cjs/components/template-preview/WhatsApp/ChatUI.js +2 -2
- package/dist/cjs/components/template-preview/WhatsApp/ChatUiV2.js +4 -4
- package/dist/esm/assets/icons/locked.svg.js +1 -0
- package/dist/esm/components/bik-layout/BikSidebar.d.ts +1 -0
- package/dist/esm/components/bik-layout/BikSidebar.js +1 -1
- package/dist/esm/components/bik-layout/FeatureModalV2.d.ts +1 -0
- package/dist/esm/components/bik-layout/FeatureModalV2.js +1 -1
- package/dist/esm/components/bik-layout/MockMenus.d.ts +6 -1
- package/dist/esm/components/bik-layout/SidebarStyles.js +1 -1
- package/dist/esm/components/modals/styledModal.d.ts +1 -0
- package/dist/esm/components/modals/styledModal.js +1 -1
- package/dist/esm/components/states/StateComponent.d.ts +1 -3
- package/dist/esm/components/states/StateComponent.js +1 -1
- package/dist/esm/components/template-preview/WhatsApp/ChatUI.js +2 -2
- package/dist/esm/components/template-preview/WhatsApp/ChatUiV2.js +3 -3
- package/package.json +1 -1
- package/dist/cjs/assets/icons/retryIcon.svg.js +0 -1
- package/dist/esm/assets/icons/retryIcon.svg.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import o from"../../../assets/icons/halfRectangle.svg.js";import i from"../../../assets/icons/phone.svg.js";import s from"../../../assets/icons/RedirectToNew.svg.js";import{useMemo as a}from"react";import n from"styled-components";import{Tooltip as
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import o from"../../../assets/icons/halfRectangle.svg.js";import i from"../../../assets/icons/phone.svg.js";import s from"../../../assets/icons/RedirectToNew.svg.js";import{useMemo as a}from"react";import n from"styled-components";import{Tooltip as l}from"../../tooltips/Tooltip.js";import{BodySecondary as p,Caption as m}from"../../TypographyStyle.js";import{COLORS as d,FONTS as c}from"../../../constants/Theme.js";import{WhatsAppFormatToHTML as h}from"../helpers/WhatsAppFormatToHTML.js";import{HEADER_TYPES as f,ACTIONS_TYPES as g}from"../models/TemplateMeta.js";import{ChatBtn as y}from"./ChatBtn.js";import{Container as T,FooterWrapper as x,FooterText as v,TimeStamp as j}from"./ChatUI.style.js";import{MediaCard as w}from"./MediaCard.js";import b from"./RenderTemplateWithVariable.js";const u=n.div`
|
|
2
2
|
position: absolute;
|
|
3
3
|
width: 8px;
|
|
4
4
|
height: 8px;
|
|
5
5
|
left: -7.7px;
|
|
6
6
|
top: -8px;
|
|
7
|
-
`,S=n=>{const{bodyText:S,footerText:N,headerMediaType:A,headerText:M,headerAssetLink:C,headerAssetName:L,quickReplybtn:k,ctaBtn:z,actionTypes:B,textType:E,extras:I,showHeader:P,imagePreviewStyles:R,size:W,children:H,isPreview:O}=n,_=new
|
|
7
|
+
`,S=n=>{const{bodyText:S,footerText:N,headerMediaType:A,headerText:M,headerAssetLink:C,headerAssetName:L,quickReplybtn:k,ctaBtn:z,actionTypes:B,textType:E,extras:I,showHeader:P,imagePreviewStyles:R,size:W,children:H,isPreview:O}=n,_=new h,U=a((()=>({color:d.content.primary,margin:12,fontSize:P?c.caption.fontSize:c.bodySecondary.fontSize,fontWeight:c.bodySecondary.fontWeight,maxWidth:"100%",whiteSpace:"pre-wrap",marginBottom:0,marginTop:8,wordBreak:"break-word"})),[]);return e(T,Object.assign({isPreview:O},{children:[t(u,{children:t(o,{color:"white",height:8,width:8})}),A===f.TEXT?t(b,{bold:!0,text:null==M?void 0:M.replace(/</g,"<").replace(/>/g,">")}):A!==f.NONE?t(w,{headerAssetLink:C,headerAssetName:L,mediaType:A,imagePreviewStyles:A===f.IMAGE?R:{}}):t(r,{}),!!S&&t(r,{children:t(r,H?{children:H}:{children:"html"===E?t("div",{className:"richTextEditor",style:U,dangerouslySetInnerHTML:{__html:_.convertToHTML(S)}}):t(p,{children:null==S?void 0:S.replace(/</g,"<").replace(/>/g,">")})})}),e(x,{children:[t(l,Object.assign({body:null!=N?N:"",placement:"top"},{children:t(v,Object.assign({style:{flex:1}},{children:N}))})),t(j,{children:"16:48"})]}),B===g.QUICK_REPLY?t("div",{children:null==k?void 0:k.map(((e,r)=>t(y,{text:e.text},r)))}):B===g.CTA_BTN?t("div",{children:null==z?void 0:z.map(((e,r)=>t(y,{textTypography:P?m:p,extraContent:I?e.extra:void 0,placeholder:e.placeholder,text:e.text,Icon:"phoneNumber"===e.type?i:s,size:W},r)))}):t(r,{})]}))};export{S as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import r from"../../../assets/icons/copy-code-icon.svg.js";import i from"../../../assets/icons/halfRectangle.svg.js";import s from"../../../assets/icons/phone.svg.js";import
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import r from"../../../assets/icons/copy-code-icon.svg.js";import i from"../../../assets/icons/halfRectangle.svg.js";import s from"../../../assets/icons/phone.svg.js";import l from"../../../assets/icons/qrb.svg.js";import a from"../../../assets/icons/RedirectToNew.svg.js";import n from"styled-components";import{useTemplateModalContext as p}from"../../template-context-mapper/context/templateModalContext.js";import{Tooltip as d}from"../../tooltips/Tooltip.js";import{Caption as m,BodySecondary as c}from"../../TypographyStyle.js";import{COLORS as h}from"../../../constants/Theme.js";import{VariableEditorHelper as f}from"../helpers/VariableEditorHelper.js";import{HEADER_TYPES as x,ACTIONS_TYPES as u}from"../models/TemplateMeta.js";import{ChatBtn as g}from"./ChatBtn.js";import{Container as y,FooterWrapper as T,FooterText as C,TimeStamp as v}from"./ChatUI.style.js";import{LimitedTimeOffer as j}from"./LimitedTimeOffer/LimitedTimeOffer.index.js";import{MediaCard as w}from"./MediaCard.js";const b=n.div`
|
|
2
2
|
position: absolute;
|
|
3
3
|
width: 8px;
|
|
4
4
|
height: 8px;
|
|
@@ -11,9 +11,9 @@ import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import r from"..
|
|
|
11
11
|
font-size: 14px;
|
|
12
12
|
line-height: 20px;
|
|
13
13
|
padding: 8px 12px 0px;
|
|
14
|
-
color: ${
|
|
14
|
+
color: ${h.content.primary};
|
|
15
15
|
word-wrap: break-word;
|
|
16
16
|
`,O=n(I)`
|
|
17
17
|
font-weight: 600;
|
|
18
18
|
margin-bottom: 8px;
|
|
19
|
-
`,E=new f,L=n=>{const{bodyText:
|
|
19
|
+
`,E=new f,L=n=>{const{bodyText:h,footerText:f,headerMediaType:L,headerText:P,headerAssetLink:_,headerAssetName:N,quickReplybtn:M,ctaBtn:R,actionTypes:A,extras:B,showHeader:H,imagePreviewStyles:S,size:U,bodyVariableList:k,headerVariableList:z,buttons:Y,limitedTimeOfferComponent:D,carouselCardIndex:V,isWhatsappCarousel:q,isPreview:K}=n,Q=E.format(null==h?void 0:h.replace(/</g,"<").replace(/>/g,">"),k),W=E.format(null==P?void 0:P.replace(/</g,"<").replace(/>/g,">"),z),{selectedCarouselIndex:G,isProductCarouselType:X,errorIndexes:$,isCarouselHovered:F}=p(),J={COPY_CODE:r,PHONE_NUMBER:s,URL:a,QUICK_REPLY:l};return e(y,Object.assign({isCarouselCard:null!=V&&V>-1,showBorder:null!=V&&V===G||X&&null!=V&&V>-1&&null!=G&&G>-1,hasError:null==$?void 0:$.includes(null!=V?V:-2),isWhatsappCarousel:q,isPreview:K,showDashedBorder:X&&F&&(null!=G?G:-1)<0&&(null!=V?V:-1)>-1},{children:[!q&&t(b,{children:t(i,{color:"white",height:8,width:8})}),L===x.TEXT?t(O,{dangerouslySetInnerHTML:{__html:W}}):L!==x.NONE?t(w,{headerAssetLink:_,headerAssetName:N,mediaType:L,imagePreviewStyles:L===x.IMAGE?S:{}}):t(o,{}),(null==D?void 0:D.dateTime)?t(j,{text:D.text,dateTime:D.dateTime,code:D.code}):t(o,{}),!!h&&t(o,{children:t(I,{dangerouslySetInnerHTML:{__html:Q},style:{flex:1}})}),e(T,{children:[t(d,Object.assign({body:null!=f?f:"",placement:"top"},{children:t(C,Object.assign({style:{flex:1}},{children:f}))})),t(v,{children:"16:48"})]}),Y&&Y.length>0?Y.map(((e,o)=>t(g,{text:"COPY_CODE"===e.type?"Copy code":e.text,Icon:J[e.type],size:U},o))):A===u.QUICK_REPLY?t("div",{children:null==M?void 0:M.map(((e,o)=>t(g,{text:e.text},o)))}):A===u.CTA_BTN?t("div",{children:null==R?void 0:R.map(((e,o)=>t(g,{textTypography:H?m:c,extraContent:B?e.extra:void 0,placeholder:e.placeholder,text:e.text,Icon:"phoneNumber"===e.type?s:a,size:U},o)))}):t(o,{})]}))};export{L as ChatUIV2};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t,r,n=e(require("react"));function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a.apply(this,arguments)}var l=e=>n.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 64 64"},e),t||(t=n.createElement("rect",{width:64,height:64,fill:"#1A872C",rx:32})),r||(r=n.createElement("path",{fill:"#fff",d:"M41.012 14.51a1.667 1.667 0 0 0-2.971-.167l-1.873 3.244c-6.476-1.878-13.635.813-17.157 6.913-4.143 7.174-1.684 16.348 5.49 20.49 7.174 4.143 16.348 1.684 20.49-5.49a14.938 14.938 0 0 0 2.012-7.501 1.667 1.667 0 1 0-3.333.003 11.606 11.606 0 0 1-1.566 5.831c-3.221 5.58-10.356 7.492-15.936 4.27-5.58-3.221-7.492-10.356-4.27-15.936 2.593-4.493 7.724-6.608 12.538-5.58l-1.11 1.92a1.667 1.667 0 0 0 1.632 2.49l7.883-.892a1.667 1.667 0 0 0 1.34-2.322l-3.169-7.273Z"})));exports.default=l;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as t from"react";var e,r;function a(){return a=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},a.apply(this,arguments)}var l=l=>t.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 64 64"},l),e||(e=t.createElement("rect",{width:64,height:64,fill:"#1A872C",rx:32})),r||(r=t.createElement("path",{fill:"#fff",d:"M41.012 14.51a1.667 1.667 0 0 0-2.971-.167l-1.873 3.244c-6.476-1.878-13.635.813-17.157 6.913-4.143 7.174-1.684 16.348 5.49 20.49 7.174 4.143 16.348 1.684 20.49-5.49a14.938 14.938 0 0 0 2.012-7.501 1.667 1.667 0 1 0-3.333.003 11.606 11.606 0 0 1-1.566 5.831c-3.221 5.58-10.356 7.492-15.936 4.27-5.58-3.221-7.492-10.356-4.27-15.936 2.593-4.493 7.724-6.608 12.538-5.58l-1.11 1.92a1.667 1.667 0 0 0 1.632 2.49l7.883-.892a1.667 1.667 0 0 0 1.34-2.322l-3.169-7.273Z"})));export{l as default};
|