@bikdotai/bik-component-library 0.0.796 → 0.0.797
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/{thumbs_down.svg.js → thumb-down-line.svg.js} +1 -1
- package/dist/cjs/assets/icons/{thumbs_up.svg.js → thumb-up-line.svg.js} +1 -1
- package/dist/cjs/components/WhatsAppTextEditor/AIRephraseButton.js +1 -1
- package/dist/cjs/components/WhatsAppTextEditor/WhatsAppTextEditor.js +2 -2
- package/dist/cjs/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js +1 -1
- package/dist/cjs/components/carousel-preview/CarouselPreview.js +1 -1
- package/dist/cjs/components/template-preview/TemplatePreview.js +1 -1
- package/dist/cjs/components/template-preview/TemplatePreview.styled.d.ts +1 -0
- package/dist/cjs/components/template-preview/TemplatePreview.styled.js +11 -0
- package/dist/esm/assets/icons/thumb-down-line.svg.js +1 -0
- package/dist/esm/assets/icons/thumb-up-line.svg.js +1 -0
- package/dist/esm/components/WhatsAppTextEditor/AIRephraseButton.js +1 -1
- package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditor.js +2 -2
- package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js +1 -1
- package/dist/esm/components/carousel-preview/CarouselPreview.js +1 -1
- package/dist/esm/components/template-preview/TemplatePreview.js +1 -1
- package/dist/esm/components/template-preview/TemplatePreview.styled.d.ts +1 -0
- package/dist/esm/components/template-preview/TemplatePreview.styled.js +11 -0
- package/package.json +1 -1
- package/dist/esm/assets/icons/thumbs_down.svg.js +0 -1
- package/dist/esm/assets/icons/thumbs_up.svg.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import o from"react";import l from"react-slick";import{Container as
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import o from"react";import l from"../../assets/icons/aiContentIcon.svg.js";import{AiContentBadge as t}from"../template-preview/TemplatePreview.styled.js";import s from"react-slick";import{Container as i,CarouselSlickContainer as n}from"./CarouselPreview.style.js";import a from"./CarouselPreviewCard.js";import{useTemplateModalContext as d}from"../template-context-mapper/context/templateModalContext.js";import{determineCardIndex as c,isRCSChannel as m}from"../template-preview/helpers/templateMiscHelper.js";import{RCSCarousalContainer as u}from"../template-preview/RCS/RCSPreview.styled.js";import{CustomCarouselRightArrow as p,CustomCarouselLeftArrow as v}from"./CustomCarouselArrows.js";const w=o.forwardRef((o=>{let{channel:s,template:n,isPreview:p,removeBottomBorder:v,borderRadius:w,showArrows:C,hideBorder:f,showSampleValues:P}=o;var g,j;const{sliderRef:x,selectedCarouselIndex:I,cardCount:b,setIsCarouselHovered:R,cardIndex:S,showVariablePicker:A}=d(),V=-1==S?c(s):S,B=null===(j=null===(g=null==n?void 0:n.components)||void 0===g?void 0:g[V])||void 0===j?void 0:j.cards,T=(null==B?void 0:B.length)?e(h,{cards:B,cardCount:null!=b?b:0,selectedCarouselIndex:null!=I?I:-1,sliderRef:x,isPreview:p,showArrows:C,channel:s,template:n,setIsCarouselHovered:R,showSampleValues:!!P,showVariablePicker:A}):null;return m(s)?e(u,Object.assign({borderRadius:w},{children:T})):r(i,Object.assign({removeBottomBorder:v,borderRadius:w,hideBorder:f},{children:[(!!(null==n?void 0:n.aiContentConfigId)||!!(null==n?void 0:n.isAiGenerated))&&e(t,{children:e(l,{width:48,height:48})}),e(a,{channel:s,currentTemplate:n,carouselCardIndex:-1,isPreview:p,width:"77%"}),T]}))})),h=r=>{let{cards:o,cardCount:l,selectedCarouselIndex:t,sliderRef:i,isPreview:d,showArrows:c,channel:m,template:u,setIsCarouselHovered:w,showSampleValues:h,showVariablePicker:C}=r;return e(n,Object.assign({cardCount:l,selectedCarouselIndex:t,onMouseEnter:()=>!C&&(null==w?void 0:w(!0)),onMouseLeave:()=>!C&&(null==w?void 0:w(!1))},{children:e(s,Object.assign({ref:i,swipeToSlide:!0,draggable:!0,swipe:!0,infinite:!1,focusOnSelect:!d,centerMode:!0,arrows:c,adaptiveHeight:!0,nextArrow:e(p,{isPreview:null!=d&&d}),prevArrow:e(v,{isPreview:null!=d&&d})},{children:null==o?void 0:o.map(((r,o)=>{var l,t;const s={components:r.components,mapping:null===(t=null===(l=null==u?void 0:u.mapping)||void 0===l?void 0:l.cards)||void 0===t?void 0:t[o],content:null==u?void 0:u.content,templateType:null==u?void 0:u.templateType};return e(a,{channel:m,currentTemplate:s,carouselCardIndex:o,isPreview:d,width:"100%",showSampleValues:h},o)}))}))}))};export{w as CarouselPreview};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import{useTemplateModalContext as l}from"../template-context-mapper/context/templateModalContext.js";import n from"../../utils/StringUtils.js";import{COLORS as o}from"../../constants/Theme.js";import a from"../../assets/icons/aiContentIcon.svg.js";import{TitleRegular as s}from"../TypographyStyle.js";import
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import{useTemplateModalContext as l}from"../template-context-mapper/context/templateModalContext.js";import n from"../../utils/StringUtils.js";import{COLORS as o}from"../../constants/Theme.js";import a from"../../assets/icons/aiContentIcon.svg.js";import{AiContentBadge as r}from"./TemplatePreview.styled.js";import{TitleRegular as s}from"../TypographyStyle.js";import d from"./EmailTemplateThumbnailPreview.js";import{CHANNEL_TYPE as p}from"./models/Channels.js";import m from"./SmsTemplatePreview.js";import u from"./webpush/WebpushPreview.js";import c from"./WhatsAppTemplatePreview.js";const v=v=>{let{template:C,channel:b,whatsAppSpecificMeta:g,templateCreationsInfo:y,hideHeader:S,size:j,onlyTemplateContent:f,emailSpecificMeta:w,smsSpecificMeta:T,showSampleValues:P,carouselCardIndex:x,isWhatsappCarousel:O,isPreview:W,applyBorderBottom:H,webPushSpecificMeta:I,hidePointerEvents:A}=v;var B,E;const{setSelectedCarouselIndex:M}=l();return b===p.SMS?e("div",Object.assign({style:Object.assign({marginTop:y?16:0,border:y?`1px solid ${o.stroke.primary}`:"none",borderRadius:4},null==T?void 0:T.templateContainerStyles)},{children:e(m,{template:C,hideHeader:S,onlyTemplateContent:f,size:null!=j?j:"large",variableStore:null==T?void 0:T.smsVariableStore,display_content:null==T?void 0:T.smsDisplayContent,uniqueId:null==T?void 0:T.uniqueId})})):b===p.EMAIL?e("div",Object.assign({style:Object.assign({marginTop:y?16:0},null==w?void 0:w.templateContainerStyles)},{children:e(d,{template:C,handleViewTemplate:()=>{var e;null===(e=null==w?void 0:w.handleViewTemplate)||void 0===e||e.call(w)},hideHeader:S,hideViewButton:null==w?void 0:w.hideViewButtonForEmail,containerStyle:null==w?void 0:w.containerStyle,emailDisplayContent:null==w?void 0:w.emailDisplayContent,emailHtmlContainerId:null==w?void 0:w.emailHtmlContainerId,applyBorderBottom:H,hidePointerEvents:A})})):b===p.WHATSAPP||b===p.RCS?t("div",Object.assign({style:Object.assign(Object.assign(Object.assign({},null==g?void 0:g.templateContainerStyles),y?h.WhatsAppWrapper:{}),{position:"relative"}),onClick:()=>{var e,t;if(M&&O){if(-1===x&&!(null===(t=null===(e=null==C?void 0:C.mapping)||void 0===e?void 0:e.body)||void 0===t?void 0:t.length))return;M(null!=x?x:-1)}}},{children:[y?e("div",Object.assign({style:{padding:16}},{children:e(s,{children:n.convertToTitleCase(null!==(B=null==C?void 0:C.label)&&void 0!==B?B:"")})})):e(i,{}),e(c,{showSampleValues:P,showHeader:null==g?void 0:g.showWhatsAppHeader,extras:null==g?void 0:g.whatsAppExtras,template:C,size:y?"small":null!=j?j:"large",containerStyle:Object.assign(Object.assign({borderWidth:y?0:1,borderTopWidth:1},null!==(E=null==g?void 0:g.containerStyle)&&void 0!==E?E:{}),{height:"100%"}),zeroStateComponent:null==g?void 0:g.zeroStateComponent,usePlaceHolderName:null==g?void 0:g.usePlaceHolderName,carouselCardIndex:x,isWhatsappCarousel:O,isPreview:W,channel:b}),(!!(null==C?void 0:C.aiContentConfigId)||!!(null==C?void 0:C.isAiGenerated))&&!O&&e(r,{children:e(a,{width:48,height:48})})]})):b==p.WEBPUSH?e("div",Object.assign({style:Object.assign({},null==I?void 0:I.containerStyle)},{children:e(u,{template:C,extraContainerCss:null==I?void 0:I.extraContainerCss})})):e(i,{})},h={WhatsAppWrapper:{backgroundColor:o.surface.standard,borderRadius:4,border:`1px solid ${o.background.inactive}`,marginTop:16}};export{v as TemplatePreview};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AiContentBadge: import("styled-components").StyledComponent<"div", any, {}, never>;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as r from"react";var t;function e(){return e=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},e.apply(this,arguments)}var n=n=>r.createElement("svg",e({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},n),t||(t=r.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.4,d:"M6.2 8.9V2.6m0 6.3 1.95 3.75c.31.59.98.85 1.6.61.57-.23.9-.83.78-1.44l-.48-2.62h2.07c.89 0 1.57-.79 1.44-1.67l-.61-4.16c-.11-.73-.74-1.27-1.48-1.27H7.4c-.42 0-.82.18-1.1.48l-.1.11m0 6.21H3.57c-.56 0-1.02-.46-1.02-1.03V3.62c0-.57.46-1.02 1.02-1.02H6.2"})));export{n as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as r from"react";var t;function e(){return e=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},e.apply(this,arguments)}var n=n=>r.createElement("svg",e({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},n),t||(t=r.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.4,d:"M6.2 7.1v6.3m0-6.3 1.95-3.75c.31-.59.98-.85 1.6-.61.57.23.9.83.78 1.44l-.48 2.62h2.07c.89 0 1.57.79 1.44 1.67l-.61 4.16c-.11.73-.74 1.27-1.48 1.27H7.4c-.42 0-.82-.18-1.1-.48l-.1-.11m0-6.21H3.57c-.56 0-1.02.46-1.02 1.03v4.25c0 .57.46 1.02 1.02 1.02H6.2"})));export{n as default};
|