@bikdotai/bik-component-library 0.0.398-beta-styles → 0.0.398
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/add-variableV2/AddVariableV2.d.ts +1 -0
- package/dist/cjs/components/bik-layout/BikSidebar.js +1 -1
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/cjs/components/input-with-vars/InputWithVariables.d.ts +14 -6
- package/dist/cjs/components/input-with-vars/InputWithVariables.js +3 -3
- package/dist/cjs/components/product-picker-v2/collectionScreen.d.ts +2 -0
- package/dist/cjs/components/product-picker-v2/collectionScreen.js +1 -1
- package/dist/cjs/components/product-picker-v2/modal.d.ts +5 -1
- package/dist/cjs/components/product-picker-v2/modal.js +1 -1
- package/dist/cjs/components/product-picker-v2/productScreen.d.ts +7 -0
- package/dist/cjs/components/product-picker-v2/productScreen.js +1 -1
- package/dist/cjs/components/product-picker-v2/searchScreen.d.ts +4 -0
- package/dist/cjs/components/product-picker-v2/searchScreen.js +1 -1
- package/dist/cjs/components/product-picker-v2/style.d.ts +2 -0
- package/dist/cjs/components/product-picker-v2/style.js +24 -16
- package/dist/cjs/components/shimmer-image/ShimmerImage.d.ts +1 -0
- package/dist/cjs/components/shimmer-image/ShimmerImage.js +1 -1
- package/dist/cjs/components/side-modal/SideModal.d.ts +4 -2
- package/dist/cjs/components/side-modal/SideModal.js +1 -1
- package/dist/cjs/components/side-modal/SideModal.style.d.ts +4 -1
- package/dist/cjs/components/side-modal/SideModal.style.js +4 -1
- package/dist/cjs/components/template-context-mapper/TemplateContextMapper.d.ts +7 -3
- package/dist/cjs/components/template-context-mapper/TemplateContextMapper.js +1 -1
- package/dist/cjs/components/template-context-mapper/context/templateModalContext.d.ts +5 -1
- package/dist/cjs/components/template-context-mapper/modalElements/BackTrackComponent.d.ts +4 -0
- package/dist/cjs/components/template-context-mapper/modalElements/BackTrackComponent.js +1 -0
- package/dist/cjs/components/template-context-mapper/modalElements/Body.d.ts +2 -0
- package/dist/cjs/components/template-context-mapper/modalElements/Body.js +5 -5
- package/dist/cjs/components/template-context-mapper/modalElements/DesktopPreview.d.ts +1 -0
- package/dist/cjs/components/template-context-mapper/modalElements/DesktopPreview.js +2 -2
- package/dist/cjs/components/template-context-mapper/modalElements/DiscountCodeComponent.d.ts +6 -0
- package/dist/cjs/components/template-context-mapper/modalElements/DiscountCodeComponent.js +1 -0
- package/dist/cjs/components/template-context-mapper/modalElements/EditMediaModal.d.ts +11 -0
- package/dist/cjs/components/template-context-mapper/modalElements/EditMediaModal.js +1 -0
- package/dist/cjs/components/template-context-mapper/modalElements/EditMediaV2.d.ts +3 -0
- package/dist/cjs/components/template-context-mapper/modalElements/EditMediaV2.js +2 -2
- package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppTemplateMediaV2.d.ts +2 -0
- package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppTemplateMediaV2.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.d.ts +4 -1
- package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/MobilePreview.d.ts +1 -0
- package/dist/cjs/components/template-context-mapper/modalElements/MobilePreview.js +3 -3
- package/dist/cjs/components/template-context-mapper/modalElements/TemplateSelectModalContent.d.ts +3 -1
- package/dist/cjs/components/template-context-mapper/modalElements/TemplateSelectModalContent.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/VariableConnector.d.ts +3 -1
- package/dist/cjs/components/template-context-mapper/modalElements/VariableConnector.js +3 -3
- package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorsPanel.js +4 -3
- package/dist/cjs/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
- package/dist/cjs/components/template-preview/TemplatePreview.d.ts +2 -1
- package/dist/cjs/components/template-preview/TemplatePreview.js +1 -1
- package/dist/cjs/components/template-preview/WhatsApp/ChatUI.style.js +5 -5
- package/dist/cjs/components/template-preview/WhatsAppTemplatePreview.d.ts +1 -0
- package/dist/cjs/components/template-preview/WhatsAppTemplatePreview.js +1 -1
- package/dist/cjs/components/template-preview/constants/regexPatterns.js +1 -1
- package/dist/cjs/components/template-preview/helpers/TemplateCreatorHelper.d.ts +6 -1
- package/dist/cjs/components/template-preview/helpers/TemplateCreatorHelper.js +1 -1
- package/dist/cjs/components/template-preview/models/WhatsAppTemplate.d.ts +21 -0
- package/dist/cjs/components/template-preview/models/WhatsAppTemplate.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/components/add-variableV2/AddVariableV2.d.ts +1 -0
- package/dist/esm/components/bik-layout/BikSidebar.js +1 -1
- package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/esm/components/input-with-vars/InputWithVariables.d.ts +14 -6
- package/dist/esm/components/input-with-vars/InputWithVariables.js +3 -3
- package/dist/esm/components/product-picker-v2/collectionScreen.d.ts +2 -0
- package/dist/esm/components/product-picker-v2/collectionScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/modal.d.ts +5 -1
- package/dist/esm/components/product-picker-v2/modal.js +1 -1
- package/dist/esm/components/product-picker-v2/productScreen.d.ts +7 -0
- package/dist/esm/components/product-picker-v2/productScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/searchScreen.d.ts +4 -0
- package/dist/esm/components/product-picker-v2/searchScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/style.d.ts +2 -0
- package/dist/esm/components/product-picker-v2/style.js +20 -12
- package/dist/esm/components/shimmer-image/ShimmerImage.d.ts +1 -0
- package/dist/esm/components/shimmer-image/ShimmerImage.js +1 -1
- package/dist/esm/components/side-modal/SideModal.d.ts +4 -2
- package/dist/esm/components/side-modal/SideModal.js +1 -1
- package/dist/esm/components/side-modal/SideModal.style.d.ts +4 -1
- package/dist/esm/components/side-modal/SideModal.style.js +15 -12
- package/dist/esm/components/template-context-mapper/TemplateContextMapper.d.ts +7 -3
- package/dist/esm/components/template-context-mapper/TemplateContextMapper.js +1 -1
- package/dist/esm/components/template-context-mapper/context/templateModalContext.d.ts +5 -1
- package/dist/esm/components/template-context-mapper/modalElements/BackTrackComponent.d.ts +4 -0
- package/dist/esm/components/template-context-mapper/modalElements/BackTrackComponent.js +1 -0
- package/dist/esm/components/template-context-mapper/modalElements/Body.d.ts +2 -0
- package/dist/esm/components/template-context-mapper/modalElements/Body.js +4 -4
- package/dist/esm/components/template-context-mapper/modalElements/DesktopPreview.d.ts +1 -0
- package/dist/esm/components/template-context-mapper/modalElements/DesktopPreview.js +4 -4
- package/dist/esm/components/template-context-mapper/modalElements/DiscountCodeComponent.d.ts +6 -0
- package/dist/esm/components/template-context-mapper/modalElements/DiscountCodeComponent.js +1 -0
- package/dist/esm/components/template-context-mapper/modalElements/EditMediaModal.d.ts +11 -0
- package/dist/esm/components/template-context-mapper/modalElements/EditMediaModal.js +1 -0
- package/dist/esm/components/template-context-mapper/modalElements/EditMediaV2.d.ts +3 -0
- package/dist/esm/components/template-context-mapper/modalElements/EditMediaV2.js +2 -2
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateMediaV2.d.ts +2 -0
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateMediaV2.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.d.ts +4 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/MobilePreview.d.ts +1 -0
- package/dist/esm/components/template-context-mapper/modalElements/MobilePreview.js +4 -4
- package/dist/esm/components/template-context-mapper/modalElements/TemplateSelectModalContent.d.ts +3 -1
- package/dist/esm/components/template-context-mapper/modalElements/TemplateSelectModalContent.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnector.d.ts +3 -1
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnector.js +2 -2
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorsPanel.js +4 -3
- package/dist/esm/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
- package/dist/esm/components/template-preview/TemplatePreview.d.ts +2 -1
- package/dist/esm/components/template-preview/TemplatePreview.js +1 -1
- package/dist/esm/components/template-preview/WhatsApp/ChatUI.style.js +1 -1
- package/dist/esm/components/template-preview/WhatsAppTemplatePreview.d.ts +1 -0
- package/dist/esm/components/template-preview/WhatsAppTemplatePreview.js +1 -1
- package/dist/esm/components/template-preview/constants/regexPatterns.js +1 -1
- package/dist/esm/components/template-preview/helpers/TemplateCreatorHelper.d.ts +6 -1
- package/dist/esm/components/template-preview/helpers/TemplateCreatorHelper.js +1 -1
- package/dist/esm/components/template-preview/models/WhatsAppTemplate.d.ts +21 -0
- package/dist/esm/components/template-preview/models/WhatsAppTemplate.js +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
|
@@ -4,12 +4,12 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
4
4
|
max-height: 600px;
|
|
5
5
|
min-height: 600px;
|
|
6
6
|
flex-direction: column;
|
|
7
|
-
`,
|
|
7
|
+
`,o=e.div`
|
|
8
8
|
overflow-y: scroll;
|
|
9
9
|
overflow-x: hidden;
|
|
10
|
-
`,
|
|
10
|
+
`,n=e.div`
|
|
11
11
|
height: 64px;
|
|
12
|
-
background-color: ${e=>e.isDisabled?"#F0F0F0":"white"};
|
|
12
|
+
background-color: ${e=>e.isDisabled?"#F0F0F0":e.isActive?i.background.positive.light:"white"};
|
|
13
13
|
border-bottom: 1px solid #e0e0e0;
|
|
14
14
|
padding: 12px 24px;
|
|
15
15
|
display: flex;
|
|
@@ -17,17 +17,21 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
17
17
|
column-gap: 16px;
|
|
18
18
|
justify-content: space-between;
|
|
19
19
|
align-items: center;
|
|
20
|
-
|
|
20
|
+
:hover {
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
background-color: ${i.surface.hovered};
|
|
23
|
+
}
|
|
24
|
+
`,r=e.div`
|
|
21
25
|
display: flex;
|
|
22
26
|
flex-direction: row;
|
|
23
27
|
justify-content: center;
|
|
24
28
|
align-items: center;
|
|
25
29
|
column-gap: 18px;
|
|
26
|
-
`,
|
|
30
|
+
`,d=e.div`
|
|
27
31
|
display: flex;
|
|
28
32
|
flex-direction: column;
|
|
29
33
|
justify-content: center;
|
|
30
|
-
`,
|
|
34
|
+
`,l=e.div`
|
|
31
35
|
display: flex;
|
|
32
36
|
flex-direction: row;
|
|
33
37
|
max-height: 32px;
|
|
@@ -37,16 +41,16 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
37
41
|
align-items: center;
|
|
38
42
|
padding: 8px 16px;
|
|
39
43
|
margin-top: 16px;
|
|
40
|
-
`,
|
|
44
|
+
`,p=e.div`
|
|
41
45
|
display: flex;
|
|
42
46
|
flex-direction: row;
|
|
43
47
|
column-gap: 16px;
|
|
44
48
|
padding: 12px 16px;
|
|
45
49
|
border-bottom: 1px solid #e0e0e0;
|
|
46
50
|
align-items: center;
|
|
47
|
-
`,
|
|
51
|
+
`,x=e.div`
|
|
48
52
|
height: 64px;
|
|
49
|
-
background-color: white;
|
|
53
|
+
background-color: ${e=>e.isActive?i.background.positive.light:"white"};
|
|
50
54
|
border-bottom: 1px solid #e0e0e0;
|
|
51
55
|
padding: 12px 16px;
|
|
52
56
|
display: flex;
|
|
@@ -55,7 +59,11 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
55
59
|
justify-content: flex-start;
|
|
56
60
|
align-items: center;
|
|
57
61
|
padding-left: ${e=>e.isVariant?"42px":"16px"};
|
|
58
|
-
|
|
62
|
+
:hover {
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
background-color: ${i.surface.hovered};
|
|
65
|
+
}
|
|
66
|
+
`,c=e.div`
|
|
59
67
|
display: flex;
|
|
60
68
|
flex-direction: row;
|
|
61
69
|
max-height: 32px;
|
|
@@ -64,7 +72,7 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
64
72
|
justify-content: flex-start;
|
|
65
73
|
align-items: center;
|
|
66
74
|
padding: 8px 16px;
|
|
67
|
-
`,
|
|
75
|
+
`,a=e.div`
|
|
68
76
|
display: flex;
|
|
69
77
|
flex-direction: column;
|
|
70
78
|
`,s=e.div`
|
|
@@ -99,4 +107,4 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
99
107
|
align-items: center;
|
|
100
108
|
border: 1px solid ${i.stroke.primary};
|
|
101
109
|
border-radius: 4px;
|
|
102
|
-
`;export{
|
|
110
|
+
`;export{d as CollectionCardDetailStyle,r as CollectionCardInfoStyle,n as CollectionCardStyle,a as CollectionNameHolder,t as ContainerStyle,x as ProductCardStyle,p as ProductScreenCollectionCardStyle,l as ProductScreenHeader,o as ScrollContainerStyle,c as SelectedScreenHeader,g as VariantCardGridStyle,s as VariantCardListStyle};
|
|
@@ -7,4 +7,5 @@ export type ShimmerImageProps = {
|
|
|
7
7
|
borderRadius?: number;
|
|
8
8
|
defaultImageUrl?: string;
|
|
9
9
|
};
|
|
10
|
+
export declare const DEFAULT_IMAGE = "https://firebasestorage.googleapis.com/v0/b/bikayi-chat.appspot.com/o/images-uid%2F9034204a-cbf9-4b93-8b28-ccf880d273f9?alt=media&token=318529b5-8df0-4644-85b0-40fff1dc1d5c";
|
|
10
11
|
export declare const ShimmerImage: React.FC<ShimmerImageProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useState as t,useEffect as i}from"react";import{BikShimmer as o}from"../shimmer/ShimmerComponent/BikShimmer.js";const a="https://firebasestorage.googleapis.com/v0/b/bikayi-chat.appspot.com/o/images-uid%2F9034204a-cbf9-4b93-8b28-ccf880d273f9?alt=media&token=318529b5-8df0-4644-85b0-40fff1dc1d5c",l=l=>{let{imageUrl:s,width:d,height:n,borderRadius:m,alt:h,defaultImageUrl:c=a}=l;const[g,p]=t(!0),[b,u]=t(!1);return i((()=>{const e=new Image;return e.src=s,e.onload=()=>{u(!1),p(!1)},e.onerror=()=>{u(!0),p(!1)},()=>{e.onload=null,e.onerror=null}}),[s]),e("div",Object.assign({style:{position:"relative",width:d,height:n,borderRadius:m}},{children:[g&&r(o,{boxes:[{height:`${n}px`,width:`${d}px`,marginTop:"0px"}]}),r("img",b?{src:c,alt:null!=h?h:"Image",style:{borderRadius:null!=m?m:0,display:"block",width:"100%",height:"100%"}}:{src:s,alt:null!=h?h:"Image",style:{borderRadius:null!=m?m:0,display:g?"none":"block",width:"100%",height:"100%"}})]}))};export{l as ShimmerImage};
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useState as t,useEffect as i}from"react";import{BikShimmer as o}from"../shimmer/ShimmerComponent/BikShimmer.js";const a="https://firebasestorage.googleapis.com/v0/b/bikayi-chat.appspot.com/o/images-uid%2F9034204a-cbf9-4b93-8b28-ccf880d273f9?alt=media&token=318529b5-8df0-4644-85b0-40fff1dc1d5c",l=l=>{let{imageUrl:s,width:d,height:n,borderRadius:m,alt:h,defaultImageUrl:c=a}=l;const[g,p]=t(!0),[b,u]=t(!1);return i((()=>{const e=new Image;return e.src=s,e.onload=()=>{u(!1),p(!1)},e.onerror=()=>{u(!0),p(!1)},()=>{e.onload=null,e.onerror=null}}),[s]),e("div",Object.assign({style:{position:"relative",width:d,height:n,borderRadius:m}},{children:[g&&r(o,{boxes:[{height:`${n}px`,width:`${d}px`,marginTop:"0px"}]}),r("img",b?{src:c,alt:null!=h?h:"Image",style:{borderRadius:null!=m?m:0,display:"block",width:"100%",height:"100%"}}:{src:s,alt:null!=h?h:"Image",style:{borderRadius:null!=m?m:0,display:g?"none":"block",width:"100%",height:"100%"}})]}))};export{a as DEFAULT_IMAGE,l as ShimmerImage};
|
|
@@ -7,9 +7,11 @@ export interface SideModalProps {
|
|
|
7
7
|
footerDirection?: 'row' | 'row-reverse';
|
|
8
8
|
hideCrossButton?: boolean;
|
|
9
9
|
width?: string;
|
|
10
|
-
saveButtonProps
|
|
11
|
-
cancelButtonProps
|
|
10
|
+
saveButtonProps?: ButtonProps;
|
|
11
|
+
cancelButtonProps?: ButtonProps;
|
|
12
12
|
onClose: () => void;
|
|
13
13
|
zIndex?: number;
|
|
14
|
+
hideFooter?: boolean;
|
|
15
|
+
bodyStyle?: React.CSSProperties;
|
|
14
16
|
}
|
|
15
17
|
export declare const SideModal: React.FC<SideModalProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,jsxs as t,Fragment as e}from"react/jsx-runtime";import r from"react-dom";import i from"../../assets/icons/cross.svg.js";import{Button as n}from"../button/Button.js";import{TitleMedium as s}from"../TypographyStyle.js";import{SideModalStyle as c,SideModalContainer as d,SideModalHeader as
|
|
1
|
+
import{jsx as o,jsxs as t,Fragment as e}from"react/jsx-runtime";import r from"react-dom";import i from"../../assets/icons/cross.svg.js";import{Button as n}from"../button/Button.js";import{TitleMedium as s}from"../TypographyStyle.js";import{SideModalStyle as c,SideModalContainer as d,SideModalHeader as h,SideModalBody as l,SideModalFooter as m,FooterButtonWrapper as a}from"./SideModal.style.js";const j=j=>r.createPortal(o(c,Object.assign({zIndex:j.zIndex},{children:t(d,Object.assign({width:j.width},{children:[t(h,{children:[o(s,{children:j.header}),!j.hideCrossButton&&o(i,{width:24,height:24,onClick:j.onClose})]}),o(l,Object.assign({hideFooter:j.hideFooter,bodyStyle:Object.assign({},j.bodyStyle)},{children:j.children})),!0===j.hideFooter?null:t(m,Object.assign({footerDirection:j.footerDirection},{children:[t(a,Object.assign({footerDirection:j.footerDirection},{children:[o(n,Object.assign({},j.saveButtonProps)),o(n,Object.assign({},j.cancelButtonProps))]})),j.footerCustomComponent?j.footerCustomComponent:o(e,{})]}))]}))})),document.body);export{j as SideModal};
|
|
@@ -5,7 +5,10 @@ export declare const SideModalContainer: import("styled-components").StyledCompo
|
|
|
5
5
|
width?: string | undefined;
|
|
6
6
|
}, never>;
|
|
7
7
|
export declare const SideModalHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
-
export declare const SideModalBody: import("styled-components").StyledComponent<"div", any, {
|
|
8
|
+
export declare const SideModalBody: import("styled-components").StyledComponent<"div", any, {
|
|
9
|
+
hideFooter?: boolean | undefined;
|
|
10
|
+
bodyStyle: React.CSSProperties;
|
|
11
|
+
}, never>;
|
|
9
12
|
export declare const SideModalFooter: import("styled-components").StyledComponent<"div", any, {
|
|
10
13
|
footerDirection?: "row" | "row-reverse" | undefined;
|
|
11
14
|
}, never>;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import t
|
|
1
|
+
import e,{css as t}from"styled-components";import{COLORS as i}from"../../constants/Theme.js";import{ComponentZindex as o}from"../../constants/zindex.js";const r=e.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|
|
5
|
-
z-index: ${
|
|
5
|
+
z-index: ${e=>e.zIndex||o.SIDE_MODAL};
|
|
6
6
|
height: 100%;
|
|
7
7
|
width: 100%;
|
|
8
8
|
background-color: rgba(0, 0, 0, 0.4);
|
|
9
9
|
display: flex;
|
|
10
10
|
align-items: center;
|
|
11
11
|
justify-content: flex-end;
|
|
12
|
-
`,
|
|
12
|
+
`,n=e.div`
|
|
13
13
|
height: 100%;
|
|
14
|
-
width: ${
|
|
14
|
+
width: ${e=>e.width||"566px"};
|
|
15
15
|
background: ${i.surface.standard};
|
|
16
16
|
position: relative;
|
|
17
17
|
display: flex;
|
|
18
18
|
flex-direction: column;
|
|
19
|
-
`,
|
|
19
|
+
`,d=e.div`
|
|
20
20
|
width: 100%;
|
|
21
21
|
height: 60px;
|
|
22
22
|
position: sticky;
|
|
@@ -31,24 +31,27 @@ import t from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
31
31
|
svg:hover {
|
|
32
32
|
cursor: pointer;
|
|
33
33
|
}
|
|
34
|
-
`,
|
|
34
|
+
`,s=e.div`
|
|
35
35
|
overflow-y: auto;
|
|
36
36
|
padding: 24px;
|
|
37
|
-
height: calc(100% - 120px);
|
|
38
|
-
|
|
37
|
+
height: ${e=>e.hideFooter?"calc(100% - 60px)":"calc(100% - 120px)"};
|
|
38
|
+
${e=>{let{bodyStyle:i}=e;return t`
|
|
39
|
+
${Object.keys(i).map((e=>`${e}: ${i[e]};`)).join("\n")}
|
|
40
|
+
`}}
|
|
41
|
+
`,p=e.div`
|
|
39
42
|
height: 60px;
|
|
40
43
|
width: 100%;
|
|
41
44
|
position: sticky;
|
|
42
45
|
bottom: 0;
|
|
43
46
|
display: flex;
|
|
44
|
-
flex-direction: ${
|
|
47
|
+
flex-direction: ${e=>e.footerDirection||"row"};
|
|
45
48
|
justify-content: space-between;
|
|
46
49
|
align-items: center;
|
|
47
50
|
background: ${i.surface.standard};
|
|
48
51
|
border-top: 1px solid ${i.stroke.primary};
|
|
49
52
|
padding: 0px 24px;
|
|
50
|
-
`,
|
|
53
|
+
`,a=e.div`
|
|
51
54
|
display: flex;
|
|
52
|
-
flex-direction: ${
|
|
55
|
+
flex-direction: ${e=>e.footerDirection||"row"};
|
|
53
56
|
gap: 8px;
|
|
54
|
-
`;export{
|
|
57
|
+
`;export{a as FooterButtonWrapper,s as SideModalBody,n as SideModalContainer,p as SideModalFooter,d as SideModalHeader,r as SideModalStyle};
|
|
@@ -3,7 +3,7 @@ import { CHANNEL_TYPE } from '../template-preview/models/Channels';
|
|
|
3
3
|
import { EmailTemplateType } from '../template-preview/models/EmailTemplate';
|
|
4
4
|
import { SMSTemplateType } from '../template-preview/models/SmsTemplate';
|
|
5
5
|
import { CUSTOM_VARIABLE, GlobalPlaceholderType } from '../template-preview/models/TemplateMeta';
|
|
6
|
-
import { WhatsAppPickerMeta, WhatsAppTemplate, WhatsAppTemplateVariables } from '../template-preview/models/WhatsAppTemplate';
|
|
6
|
+
import { Extras, POD, WhatsAppPickerMeta, WhatsAppTemplate, WhatsAppTemplateVariables } from '../template-preview/models/WhatsAppTemplate';
|
|
7
7
|
export interface TemplateContextMapperProps {
|
|
8
8
|
selectedTemplate: WhatsAppTemplate | EmailTemplateType | SMSTemplateType;
|
|
9
9
|
closeDialog?: () => void;
|
|
@@ -11,7 +11,7 @@ export interface TemplateContextMapperProps {
|
|
|
11
11
|
channel: CHANNEL_TYPE;
|
|
12
12
|
globalPlaceholders: GlobalPlaceholderType;
|
|
13
13
|
/** List of variables being used in this template */
|
|
14
|
-
templateVariables: CUSTOM_VARIABLE[];
|
|
14
|
+
templateVariables: CUSTOM_VARIABLE[] | WhatsAppTemplateVariables;
|
|
15
15
|
/** Only for initial-UI-purpose for the modal */
|
|
16
16
|
htmlContent: string;
|
|
17
17
|
showOnlyContent?: boolean;
|
|
@@ -20,10 +20,14 @@ export interface TemplateContextMapperProps {
|
|
|
20
20
|
zIndex?: number;
|
|
21
21
|
showVariableModal?: boolean;
|
|
22
22
|
variableList?: VariableListInterfaceV2[];
|
|
23
|
+
variableListForImage?: VariableListInterfaceV2[];
|
|
23
24
|
onBackPress?: () => void;
|
|
24
25
|
discountCode?: string;
|
|
25
26
|
setDiscountCode?: (code: string) => void;
|
|
26
27
|
enabledCustomText?: boolean;
|
|
28
|
+
showSampleValues?: boolean;
|
|
27
29
|
disableEditVariable?: boolean;
|
|
30
|
+
pod?: POD;
|
|
31
|
+
extras?: Extras;
|
|
28
32
|
}
|
|
29
|
-
export declare const TemplateContextMapper: ({ selectedTemplate, closeDialog, showVariableMapping, channel, htmlContent, templateVariables, onTemplateSelect, globalPlaceholders, showOnlyContent, whatsappSpecificPickerMeta, zIndex, showVariableModal, variableList, discountCode, setDiscountCode, onBackPress, enabledCustomText, disableEditVariable, }: TemplateContextMapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare const TemplateContextMapper: ({ selectedTemplate, closeDialog, showVariableMapping, channel, htmlContent, templateVariables, onTemplateSelect, globalPlaceholders, showOnlyContent, whatsappSpecificPickerMeta, zIndex, showVariableModal, variableList, discountCode, setDiscountCode, onBackPress, enabledCustomText, variableListForImage, showSampleValues, disableEditVariable, pod, extras, }: TemplateContextMapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as l}from"react/jsx-runtime";import{useEffect as o,useState as a,useMemo as i}from"react";import
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as l}from"react/jsx-runtime";import{useEffect as o,useState as a,useMemo as i}from"react";import r from"../../utils/StringUtils.js";import{StyledModal as s}from"../modals/styledModal.js";import{CHANNEL_TYPE as n}from"../template-preview/models/Channels.js";import{TemplateModalContext as d}from"./context/templateModalContext.js";import c from"./modalElements/Footer.js";import m from"./modalElements/TemplateSelectModalContent.js";import{convertPlaceholdersToBikDropdown as p}from"./utils/convertPlaceholdersToBikDropdown.js";const u=u=>{let{selectedTemplate:h,closeDialog:b,showVariableMapping:g,channel:v,htmlContent:C,templateVariables:S,onTemplateSelect:f,globalPlaceholders:w,showOnlyContent:M,whatsappSpecificPickerMeta:T,zIndex:V,showVariableModal:j,variableList:x,discountCode:L,setDiscountCode:P,onBackPress:E,enabledCustomText:I,variableListForImage:y,showSampleValues:k,disableEditVariable:D,pod:A,extras:O}=u;var F,z;o((()=>{N(C)}),[C]);const[B,H]=a(v===n.EMAIL?"desktop":"mobile"),[$,N]=a(C),[U,W]=a(!1),[_,q]=a(h),[G,J]=a(null!=S?S:[]),[K,Q]=a(!1);const R=i((()=>p(w)),[w]);return e(d.Provider,Object.assign({value:{template:_,setTemplate:q,device:B,setDevice:H,display_content:$,setDisplayContent:N,originalVariableList:G,setOriginalVariableList:J,isError:U,setIsError:W,channel:v,globalNormalizedPlaceholders:R,templateSelectionTriggered:K,setTemplateSelectionTriggered:Q,enabledCustomText:I,disableEditVariable:D,pod:A,extras:O}},{children:M?e(m,{channel:n.EMAIL,hideHeader:!0}):t(s,Object.assign({zIndex:V,centralContainerStyles:{width:v===n.EMAIL&&g?1e3:700},open:!0,onClose:()=>{null==b||b()},headingTitle:null==_?void 0:_.label,headingSubtitle:v===n.WHATSAPP?`${r.capitaliseFirstLetterOfString(null!==(F=null==_?void 0:_.category)&&void 0!==F?F:"")} • ${null!==(z=null==_?void 0:_.templateCategory)&&void 0!==z?z:""}`:"",onBackPress:()=>{null==E||E()}},{children:[e(m,{showSampleValues:k,showVariableMapping:g,channel:v,whatsappSpecificPickerMeta:T,showVariableModal:j,variableList:x,discountCode:L,setDiscountCode:P,variableListForImage:y&&(null==y?void 0:y.length)>0?y:x}),f?e(c,{onSelect:function(){const e=null==f?void 0:f(_,G,null!=$?$:"");e?W(!!e):Q(!0)}}):e(l,{})]}))}))};export{u as TemplateContextMapper};
|
|
@@ -3,7 +3,7 @@ import { CHANNEL_TYPE } from "../../template-preview/models/Channels";
|
|
|
3
3
|
import { EmailTemplateType } from "../../template-preview/models/EmailTemplate";
|
|
4
4
|
import { SMSTemplateType } from "../../template-preview/models/SmsTemplate";
|
|
5
5
|
import { CUSTOM_VARIABLE, globalNormalizedPlaceholdersType } from "../../template-preview/models/TemplateMeta";
|
|
6
|
-
import { WhatsAppTemplate, WhatsAppTemplateVariables } from "../../template-preview/models/WhatsAppTemplate";
|
|
6
|
+
import { Extras, WhatsAppTemplate, WhatsAppTemplateVariables } from "../../template-preview/models/WhatsAppTemplate";
|
|
7
7
|
export type DEVICE_TYPES = 'desktop' | 'mobile';
|
|
8
8
|
export declare const TemplateModalContext: React.Context<{
|
|
9
9
|
device: DEVICE_TYPES;
|
|
@@ -23,6 +23,8 @@ export declare const TemplateModalContext: React.Context<{
|
|
|
23
23
|
setTemplateSelectionTriggered?: React.Dispatch<React.SetStateAction<boolean>> | undefined;
|
|
24
24
|
enabledCustomText?: boolean | undefined;
|
|
25
25
|
disableEditVariable?: boolean | undefined;
|
|
26
|
+
pod?: string | undefined;
|
|
27
|
+
extras?: Extras | undefined;
|
|
26
28
|
}>;
|
|
27
29
|
export declare const useTemplateModalContext: () => {
|
|
28
30
|
device: DEVICE_TYPES;
|
|
@@ -42,4 +44,6 @@ export declare const useTemplateModalContext: () => {
|
|
|
42
44
|
setTemplateSelectionTriggered?: React.Dispatch<React.SetStateAction<boolean>> | undefined;
|
|
43
45
|
enabledCustomText?: boolean | undefined;
|
|
44
46
|
disableEditVariable?: boolean | undefined;
|
|
47
|
+
pod?: string | undefined;
|
|
48
|
+
extras?: Extras | undefined;
|
|
45
49
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import{useState as i}from"react";import{CheckBox as a}from"../../checkBox/CheckBox.js";import{TitleSmall as n}from"../../TypographyStyle.js";import{Input as s}from"../../input/Input.js";const c=c=>{const{backTrackMessage:o,setBackTrackMessage:l}=c,[m,g]=i(!!o);return e(r,{children:[e("div",Object.assign({style:{display:"flex",flexDirection:"row",marginLeft:10,marginTop:8,width:"300px"}},{children:[t(a,{isChecked:m,onValueChange:()=>{m&&l&&l(""),g(!m)}}),t(n,Object.assign({style:{marginLeft:8}},{children:"Prevent BackTracking"}))]})),m&&t("div",Object.assign({style:{margin:10}},{children:t(s,{type:"multiline",placeholder:"Enter your text here",labelText:"Message if user tries backtracking",onChangeText:e=>{l&&l(e)},height:"120px",maxCharLimit:1024,value:o,noErrorHint:!0,validate:e=>[!0,""]})}))]})};export{c as BackTrackComponent};
|
|
@@ -6,8 +6,10 @@ export interface BodyProps {
|
|
|
6
6
|
whatsappSpecificPickerMeta?: WhatsAppPickerMeta;
|
|
7
7
|
showVariableModal?: boolean;
|
|
8
8
|
variableList?: VariableListInterfaceV2[];
|
|
9
|
+
variableListForImage?: VariableListInterfaceV2[];
|
|
9
10
|
discountCode?: string;
|
|
10
11
|
setDiscountCode?: (code: string) => void;
|
|
12
|
+
showSampleValues?: boolean;
|
|
11
13
|
}
|
|
12
14
|
declare const Body: (props: BodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
export default Body;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import{useRef as
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import{useRef as l}from"react";import n from"styled-components";import{CHANNEL_TYPE as i}from"../../template-preview/models/Channels.js";import{COLORS as a}from"../../../constants/Theme.js";import{useTemplateModalContext as r}from"../context/templateModalContext.js";import{getVariableNameForEmailByIndex as s}from"../utils/getVariableNameEmail.js";import{highlightFor as p}from"../utils/highlightFor.js";import d from"./DesktopPreview.js";import m from"./EditWhatsAppTemplateV2.js";import c from"./MobilePreview.js";import u from"./VariableConnectorsPanel.js";const h=n.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
// height: 100%;
|
|
4
|
-
`,f=
|
|
4
|
+
`,f=n.div`
|
|
5
5
|
padding: 16px 14px;
|
|
6
6
|
max-width: 350px;
|
|
7
7
|
|
|
@@ -9,9 +9,9 @@ import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import{useRef as
|
|
|
9
9
|
overflow-y: 'auto';
|
|
10
10
|
padding-bottom: 24px;
|
|
11
11
|
border-left: ${a.stroke.primary} 1px solid;
|
|
12
|
-
`,v=
|
|
12
|
+
`,v=n.div`
|
|
13
13
|
padding: ${e=>e.showOnlyContent?"16px 14px":"16px 32px"};
|
|
14
14
|
flex: 1;
|
|
15
15
|
height: 475px;
|
|
16
16
|
overflow-y: auto;
|
|
17
|
-
`,g=
|
|
17
|
+
`,g=n=>{const{showVariableMapping:g,showOnlyContent:w,whatsappSpecificPickerMeta:b,showVariableModal:x,variableList:y,discountCode:C,setDiscountCode:j,variableListForImage:M,showSampleValues:V}=n,P=l(),E=l(),{device:S,display_content:T,channel:k,template:A,setTemplate:L}=r();const I=e=>{let t=0;for(;e;)t+=e.offsetTop,e=e.offsetParent;return t};return e(h,{children:[t(v,Object.assign({showOnlyContent:w,showVariableMapping:g},{children:"mobile"===S?t(c,{ref:E,display_content:null!=T?T:"",channel:k,template:A,showSampleValues:V}):k!==i.MESSAGE?t(d,{ref:P,channel:k,display_content:null!=T?T:"",showSampleValues:V}):t(o,{})})),g&&t(f,Object.assign({channel:k},{children:k!==i.WHATSAPP?t(u,{onFocus:k===i.EMAIL?function(e){var t,o,l;const n=null===document||void 0===document?void 0:document.getElementById("mobile"===S?"template_html_mobile":"template_html_desktop"),r=s(e+1),d=k===i.EMAIL?null===(t=null==n?void 0:n.contentWindow)||void 0===t?void 0:t.document.getElementById(r):document.getElementById(r),m=I(d),c=null==d?void 0:d.offsetLeft;"desktop"===S?m&&P.current&&(null===(o=null==n?void 0:n.contentWindow)||void 0===o||o.scrollTo(null!=c?c:0,m),p(r,a.background.warning.light,2,k,S)):m&&E.current&&(null===(l=null==n?void 0:n.contentWindow)||void 0===l||l.scrollTo(null!=c?c:0,m),p(r,a.background.warning.light,2,k,S))}:void 0,showVariableModal:x,variableList:y,discountCode:C,setDiscountCode:j}):t(m,{whatsappSpecificPickerMeta:b,template:A,onTemplateChange:e=>{null==L||L(e)},showVariableModal:x,variableList:y,variableListForImage:M,discountCode:C,setDiscountCode:j})}))]})};export{g as default};
|
|
@@ -3,5 +3,6 @@ import { CHANNEL_TYPE } from "../../template-preview/models/Channels";
|
|
|
3
3
|
declare const DesktopPreview: React.ForwardRefExoticComponent<{
|
|
4
4
|
display_content: string;
|
|
5
5
|
channel: CHANNEL_TYPE;
|
|
6
|
+
showSampleValues?: boolean | undefined;
|
|
6
7
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
7
8
|
export default DesktopPreview;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import r from"react";import i from"styled-components";import{Spinner as p}from"../../spinner/Spinner.js";import{TemplatePreview as o}from"../../template-preview/TemplatePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import{COLORS as a}from"../../../constants/Theme.js";import"../../template-preview/models/TemplateMeta.js";import{CHANNEL_TYPE as
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import r from"react";import i from"styled-components";import{Spinner as p}from"../../spinner/Spinner.js";import{TemplatePreview as o}from"../../template-preview/TemplatePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import{COLORS as a}from"../../../constants/Theme.js";import"../../template-preview/models/TemplateMeta.js";import{CHANNEL_TYPE as s}from"../../template-preview/models/Channels.js";const m=i.div`
|
|
2
2
|
background: ${a.surface.standard};
|
|
3
3
|
border: 1px solid ${a.stroke.primary};
|
|
4
4
|
border-radius: 8px;
|
|
@@ -6,15 +6,15 @@ import{jsxs as e,jsx as t}from"react/jsx-runtime";import r from"react";import i
|
|
|
6
6
|
/* max-height: 420px; */
|
|
7
7
|
scroll-behavior: smooth;
|
|
8
8
|
height: 100%;
|
|
9
|
-
`,
|
|
9
|
+
`,l=i.div`
|
|
10
10
|
padding: 18px 24px 12px;
|
|
11
11
|
display: flex;
|
|
12
12
|
gap: 4px;
|
|
13
13
|
border-bottom-width: 1px;
|
|
14
14
|
border-bottom-color: ${a.stroke.primary};
|
|
15
|
-
`,
|
|
15
|
+
`,d=i.div`
|
|
16
16
|
width: 6px;
|
|
17
17
|
height: 6px;
|
|
18
18
|
background: #d9d9d9;
|
|
19
19
|
border-radius: 3px;
|
|
20
|
-
`,n=r.forwardRef(((r,i)=>{let{display_content:a}=r;return e(
|
|
20
|
+
`,n=r.forwardRef(((r,i)=>{let{display_content:a,showSampleValues:n}=r;return e(m,Object.assign({ref:i},{children:[e(l,{children:[t(d,{}),t(d,{}),t(d,{})]}),t("div",{children:a?t(o,{showSampleValues:n,channel:s.EMAIL,hideHeader:!0,emailSpecificMeta:{emailDisplayContent:a,hideViewButtonForEmail:!0,emailHtmlContainerId:"template_html_desktop",containerStyle:{width:584,height:441},templateContainerStyles:{height:"100%"}}}):t("div",Object.assign({style:{padding:20}},{children:t(p,{size:"small"})}))})]}))}));n.displayName="DesktopPreview";export{n as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { VariableListInterfaceV2 } from "../../add-variableV2";
|
|
2
|
+
export declare const DiscountCodeComponent: (props: {
|
|
3
|
+
discountCode?: string | undefined;
|
|
4
|
+
setDiscountCode?: ((code: string) => void) | undefined;
|
|
5
|
+
variableList?: VariableListInterfaceV2[] | undefined;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import i from"../../../assets/icons/PlusIcon.js";import{useState as o,useRef as a,useEffect as s}from"react";import{AddVariableV2SideModal as l}from"../../add-variableV2/AddVariableV2SideModal.js";import"../../../_virtual/_tslib.js";import"../../add-variableV2/AddVariableV2.styled.js";import"../../button/Button.js";import"../../icon-button/IconButton.js";import{Input as n}from"../../input/Input.js";import"@tippyjs/react";import"../../tooltips/TooltipInternal.js";import"../../../constants/Theme.js";import"../../modals/modal.styled.js";import"../../switch/Switch.js";import{TitleSmall as d}from"../../TypographyStyle.js";import{CheckBox as c}from"../../checkBox/CheckBox.js";import{AddVariableStyled as m}from"./VariableConnectorsPanel.js";const p=p=>{const{discountCode:u,setDiscountCode:h,variableList:b}=p,[j,g]=o(""),[v,V]=o(!!u),[f,y]=o(!1),[x,C]=o(!1),w=a(),T=a();return s((()=>{h&&j&&h(u+j)}),[j]),e(t,{children:[e("div",Object.assign({style:{display:"flex",flexDirection:"row",marginLeft:10,marginTop:8}},{children:[r(c,{isChecked:v,onValueChange:()=>{v&&h&&(h(""),g("")),V(!v)}}),r(d,Object.assign({style:{marginLeft:8}},{children:"Add discount code"}))]})),v&&e("div",Object.assign({ref:w,style:{margin:10}},{children:[r(n,{placeholder:"Enter your discount code",onChangeText:e=>{h&&h(e)},value:u,onFocus:()=>{y(!0)},onBlur:e=>{var t;"addVar"===(null===(t=e.relatedTarget)||void 0===t?void 0:t.id)?(w.current&&w.current.focus(),y(!0)):(y(!1),C(!1))},noErrorHint:!0,validate:e=>[!0,""]}),f&&r(m,Object.assign({ref:T,id:"addVar",onClick:e=>{e.stopPropagation(),C(!0)}},{children:e("div",Object.assign({className:"add"},{children:[r(i,{width:14,height:14,color:"white"}),r("div",Object.assign({className:"variable"},{children:"Add variable"}))]}))}))]})),x&&r(l,{zIndex:2e3,data:null!=b?b:[],showVariable:x,setShowVariable:C,variableValue:j,setVariableValue:g,placeholder:"Add a variable",customTrigger:e=>{g(e.actualValue),y(!1)}})]})};export{p as DiscountCodeComponent};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { VariableListInterfaceV2 } from "../../add-variableV2";
|
|
3
|
+
import { HEADER_TYPES } from "../../template-preview";
|
|
4
|
+
declare const EditMediaModal: React.FC<{
|
|
5
|
+
setOpenEditMedia: React.Dispatch<React.SetStateAction<boolean>>;
|
|
6
|
+
openEditMedia: boolean;
|
|
7
|
+
mediaComponentFormat: HEADER_TYPES;
|
|
8
|
+
variableListForImage: VariableListInterfaceV2[];
|
|
9
|
+
uploadMedia: (urlOrVariable?: string) => void;
|
|
10
|
+
}>;
|
|
11
|
+
export default EditMediaModal;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Button as i}from"../../button/Button.js";import{InputWithVariables as a}from"../../input-with-vars/InputWithVariables.js";import{StyledModal as o}from"../../modals/styledModal.js";import"../../template-preview/TemplatePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import{DEFAULT_THEME as s}from"../../../constants/Theme.js";import{HEADER_TYPES as r}from"../../template-preview/models/TemplateMeta.js";import{TitleMedium as l,BodySecondary as d,BodyRegular as n,BodyCaption as p}from"../../TypographyStyle.js";import c from"../../../assets/icons/file.svg.js";import m from"../../../assets/icons/filePdf.svg.js";import h from"../../../assets/icons/image.svg.js";import g from"../../../assets/icons/upload.svg.js";const u=u=>{let{setOpenEditMedia:b,mediaComponentFormat:f,variableListForImage:j,openEditMedia:v,uploadMedia:y}=u;return e(o,Object.assign({open:v,zIndex:2e3,onClose:()=>b(!1),width:"440px"},{children:t("div",Object.assign({style:{padding:24,borderRadius:4}},{children:[e(l,Object.assign({style:{marginBottom:16}},{children:"Update media"})),t("div",Object.assign({style:{padding:24,border:`1px dashed ${s.colorsV2.stroke.primary}`,backgroundColor:s.colorsV2.surface.subdued}},{children:[t("div",Object.assign({style:{marginBottom:24,display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center",gap:16}},{children:[e("div",Object.assign({style:{height:80,width:80,borderRadius:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:s.colorsV2.background.base}},{children:f===r.IMAGE?e(h,{width:40,height:40}):f===r.VIDEO?e(c,{width:40,height:40}):e(m,{width:40,height:40})})),e(l,{children:f===r.IMAGE?"Upload an image":f===r.VIDEO?"Upload a video":"Upload a document"}),e(d,{children:f===r.IMAGE?"JPEG/ PNG format • Max 5MB":f===r.VIDEO?"MP4 format video • Max 16MB":"PDF format a document • Max 100MB"})]})),t("div",Object.assign({style:{marginBottom:16}},{children:[e(n,{children:"Media"}),e(a,{addVarBoxRight:"46px",allowMix:!1,onChange:e=>{},prevVariable:{actualValue:"",variableType:"string"},variablesList:j,showSideVariablePanel:!0,placeHolder:"Enter URL or add variable...",onBlur:(e,t)=>{t&&t.actualValue&&y(t.actualValue)},showAddButton:[r.IMAGE,r.VIDEO,r.DOCUMENT].includes(f)})]})),t("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:4}},{children:[e("hr",{style:{height:"2px",flex:.5,backgroundColor:"black"}}),e(p,Object.assign({style:{flex:1}},{children:"Or upload media from device"})),e("hr",{style:{height:"2px",flex:.5,backgroundColor:"black"}})]})),e("div",Object.assign({style:{display:"flex",width:"100%"}},{children:e(i,{matchParentWidth:!0,buttonText:"Upload",buttonType:"secondary",LeadingIcon:g,onClick:()=>y()})}))]}))]}))}))};export{u as default};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { HEADER_TYPES } from "../../template-preview/models/TemplateMeta";
|
|
2
3
|
export interface EditMediaV2Props {
|
|
3
4
|
imageName: string[];
|
|
5
|
+
selectedVariable?: string;
|
|
4
6
|
errorSecondaryText?: string;
|
|
5
7
|
error?: string;
|
|
6
8
|
isLoading?: boolean;
|
|
7
9
|
mediaType?: HEADER_TYPES;
|
|
8
10
|
handleImageChange?: () => void;
|
|
9
11
|
disableEditVariable?: boolean;
|
|
12
|
+
setOpenEditMedia?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
10
13
|
}
|
|
11
14
|
declare const EditMediaV2: (props: EditMediaV2Props) => import("react/jsx-runtime").JSX.Element;
|
|
12
15
|
export default EditMediaV2;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import o from"../../../assets/icons/document_pdf.svg.js";import r from"../../../assets/icons/edit.svg.js";import s from"../../../assets/icons/refresh.svg.js";import n from"../../../assets/icons/video_camcorder.svg.js";import l from"styled-components";import{Spinner as d}from"../../spinner/Spinner.js";import{HEADER_TYPES as a}from"../../template-preview/models/TemplateMeta.js";import{BodyCaption as c,BodySecondary as m,Caption as p}from"../../TypographyStyle.js";import h from"../../../utils/StringUtils.js";import{COLORS as g}from"../../../constants/Theme.js";import{Container as f,ImageContainer as j,RightComponent as
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import o from"../../../assets/icons/document_pdf.svg.js";import r from"../../../assets/icons/edit.svg.js";import s from"../../../assets/icons/refresh.svg.js";import n from"../../../assets/icons/video_camcorder.svg.js";import l from"styled-components";import{Spinner as d}from"../../spinner/Spinner.js";import{HEADER_TYPES as a}from"../../template-preview/models/TemplateMeta.js";import{BodyCaption as c,BodySecondary as m,Caption as p}from"../../TypographyStyle.js";import h from"../../../utils/StringUtils.js";import{COLORS as g}from"../../../constants/Theme.js";import{Container as f,ImageContainer as j,RightComponent as v}from"./EditMediaV2.style.js";const y=l.div`
|
|
2
2
|
padding-left: 14px;
|
|
3
3
|
padding-right: 6px;
|
|
4
4
|
width: 44px;
|
|
5
5
|
height: 24px;
|
|
6
6
|
border-left: 1px solid ${g.stroke.primary};
|
|
7
7
|
cursor: pointer;
|
|
8
|
-
`,
|
|
8
|
+
`,u=l=>{const{imageName:u,error:b,isLoading:x,mediaType:w,handleImageChange:O,disableEditVariable:C,selectedVariable:E,setOpenEditMedia:L}=l,M=null==u?void 0:u[0].split("/"),T=null==M?void 0:M[M.length-1];return e(f,{children:[t(j,Object.assign({error:!!b,onClick:b?O:void 0},{children:b?t(s,{color:g.content.brand,width:32,height:32}):x?t(d,{size:"small"}):w===a.IMAGE?t("img",{alt:"",src:null==u?void 0:u[0],style:{width:"100%",height:"56px",borderRadius:8,objectFit:"cover"}}):w===a.VIDEO?t(n,{width:18,height:22,color:g.content.placeholder}):t(o,{width:18,height:22,color:g.content.placeholder})})),e(v,{children:[t("div",Object.assign({style:{flex:1}},{children:u&&b?t(i,{}):x?t(c,Object.assign({style:{marginLeft:8}},{children:"Your media is getting loaded..."})):t(m,Object.assign({style:{color:g.content.primary,marginLeft:8}},{children:E||h.toCapitilize(null==w?void 0:w.toLowerCase())||T}))})),!!b&&e("div",Object.assign({style:{display:"flex",flexDirection:"column",marginLeft:8}},{children:[e(m,Object.assign({style:{color:g.content.negative}},{children:["Error loading this ",null==w?void 0:w.toLowerCase(),". Retry"]})),t(p,Object.assign({style:{color:g.content.secondary}},{children:b}))]})),!C&&!b&&!x&&t(y,Object.assign({onClick:()=>null==L?void 0:L(!0),onKeyDown:()=>null==L?void 0:L(!0),role:"presentation"},{children:t(r,{width:24,height:24,color:g.content.placeholder})}))]})]})};export{u as default};
|
package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateMediaV2.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { VariableListInterfaceV2 } from "../../add-variableV2";
|
|
2
3
|
import { WhatsAppPickerMeta, WhatsAppTemplate } from "../../template-preview/models/WhatsAppTemplate";
|
|
3
4
|
declare const EditMediaTemplateMediaV2: React.FC<{
|
|
4
5
|
mediaComponent: WhatsAppTemplate['components'][0];
|
|
5
6
|
template: WhatsAppTemplate;
|
|
6
7
|
whatsappSpecificPickerMeta: WhatsAppPickerMeta;
|
|
7
8
|
updateTemplateImageUrl(url: string, format: WhatsAppTemplate['components'][0]['format']): void;
|
|
9
|
+
variableListForImage?: VariableListInterfaceV2[];
|
|
8
10
|
}>;
|
|
9
11
|
export default EditMediaTemplateMediaV2;
|
package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateMediaV2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e}from"../../../_virtual/_tslib.js";import{jsxs as
|
|
1
|
+
import{__awaiter as e}from"../../../_virtual/_tslib.js";import{jsxs as t,Fragment as i,jsx as o}from"react/jsx-runtime";import n,{useState as a}from"react";import{FileUploaderHelper as r}from"../../helpers/FileUploaderHelper.js";import{BikImageCropper as l}from"../../image-cropper/BikImageCropper.js";import"../../image-compress/ImageCompress.js";import"../../states/StateComponent.js";import"../../../constants/zindex.js";import"../../modals/styledModal.js";import"../../spinner/Spinner.js";import{DEFAULT_IMAGE as s}from"../../shimmer-image/ShimmerImage.js";import{HEADER_TYPES as m}from"../../template-preview/models/TemplateMeta.js";import{useTemplateModalContext as d}from"../context/templateModalContext.js";import p from"./EditMediaModal.js";import c from"./EditMediaV2.js";const f=f=>{let{mediaComponent:u,template:v,updateTemplateImageUrl:g,whatsappSpecificPickerMeta:h,variableListForImage:j}=f;var b,E,M;const{disableEditVariable:I}=d(),[y,C]=a(void 0),[O,A]=a(),[x,k]=a(),[w,T]=a(!1),F=n.createRef(),[R,U]=a(!1),[L,N]=a(""),{template:V,setTemplate:D}=d();let G;function S(){var e;(null===(e=null==F?void 0:F.current)||void 0===e?void 0:e.click)&&F.current.click()}function _(t){var i;return e(this,void 0,void 0,(function*(){const e=new r;if(t instanceof Blob){const o=e.validate(t);if(o)N(o),U(!1);else{const e=u.format===m.IMAGE,o=yield h.uploadMediaFiles({file:t,fileName:y,isImage:e});if(o.success){const[e]=t.type.split("/");g(null!==(i=o.url)&&void 0!==i?i:"","application"===e?m.DOCUMENT:m[e.toUpperCase()])}else N("An unknown technical error occured");U(!1)}}else N("An unknown technical error occured"),U(!1)}))}return G=u.format===m.IMAGE?"image/png, image/jpeg":u.format===m.VIDEO?"video/mp4":"application/pdf",t(i,{children:[o(p,{mediaComponentFormat:null!==(b=u.format)&&void 0!==b?b:m.IMAGE,uploadMedia:function(t){var i;return e(this,void 0,void 0,(function*(){if(N(""),k(""),T(!1),t)if(t.startsWith("https"))try{U(!0);const e=yield fetch(t),i=yield e.blob();yield _(i)}catch(e){N("An unknown technical error occurred")}else if(/^{{.*}}$/.test(t)){k(t);const e=Object.assign({},V);if(e.components){const t=null===(i=null==e?void 0:e.components)||void 0===i?void 0:i.findIndex((e=>{if("HEADER"===e.type&&"NONE"!==e.format&&"TEXT"!==e.format)return!0}));if(void 0!==t&&t>-1&&(null==e?void 0:e.components[t])){const i=Object.assign(Object.assign({},e.components[t]),{format:u.format,example:{header_handle:[s]}}),o=[...e.components];o[t]=i,e.components=o}}e.mapping&&(e.mapping=Object.assign(Object.assign({},e.mapping),{header:[t]})),U(!1),null==D||D(Object.assign({},e))}else U(!1),N("Invalid URL or variable");else S()}))},variableListForImage:j||[],setOpenEditMedia:T,openEditMedia:w}),!!O&&o(l,{aspectRatio:15/8,src:O,onCropComplete:function(t){return e(this,void 0,void 0,(function*(){U(!1),N("");const e=yield fetch(t);_(yield e.blob()).then((()=>{A(void 0)}))}))},onCancel:()=>{U(!1),A("")}}),o("input",{ref:F,style:{display:"none"},type:"file",onChange:function(e){var t;N(""),U(!0);const i=null===(t=e.target.files)||void 0===t?void 0:t[0];if(u.format===m.IMAGE){const e=new FileReader;A(""),C(""),e.onload=()=>{A(e.result),C(null==i?void 0:i.name)},i&&e.readAsDataURL(i)}else _(i)},accept:G}),o(c,{imageName:null!==(M=null===(E=null==u?void 0:u.example)||void 0===E?void 0:E.header_handle)&&void 0!==M?M:[],handleImageChange:S,mediaType:null==u?void 0:u.format,error:L,isLoading:R,setOpenEditMedia:T,selectedVariable:x,disableEditVariable:I})]})};export{f as default};
|
package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.d.ts
CHANGED
|
@@ -8,6 +8,9 @@ export interface EditWhatsAppTemplateV2Props {
|
|
|
8
8
|
onTemplateChange?: (template: WhatsAppTemplate | EmailTemplateType | SMSTemplateType) => void;
|
|
9
9
|
showVariableModal?: boolean;
|
|
10
10
|
variableList?: VariableListInterfaceV2[];
|
|
11
|
+
variableListForImage?: VariableListInterfaceV2[];
|
|
12
|
+
discountCode?: string;
|
|
13
|
+
setDiscountCode?: (code: string) => void;
|
|
11
14
|
}
|
|
12
|
-
declare const EditWhatsAppTemplateV2: ({ template, onTemplateChange, whatsappSpecificPickerMeta, showVariableModal, variableList, }: EditWhatsAppTemplateV2Props) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare const EditWhatsAppTemplateV2: ({ template, onTemplateChange, whatsappSpecificPickerMeta, showVariableModal, variableList, variableListForImage, discountCode, setDiscountCode, }: EditWhatsAppTemplateV2Props) => import("react/jsx-runtime").JSX.Element;
|
|
13
16
|
export default EditWhatsAppTemplateV2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as t,jsx as o}from"react/jsx-runtime";import{
|
|
1
|
+
import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useState as e,useEffect as n}from"react";import{POD as i}from"../../template-preview/models/WhatsAppTemplate.js";import{useTemplateModalContext as l}from"../context/templateModalContext.js";import{getAllDataFromTemplateComponent as a}from"../utils/getDataFromTemplateComponent.js";import{BackTrackComponent as s}from"./BackTrackComponent.js";import{DiscountCodeComponent as d}from"./DiscountCodeComponent.js";import{EditTemplateMediaContainer as r}from"./EditMediaV2.style.js";import p from"./EditWhatsAppTemplateMediaV2.js";import{Container as c}from"./VariableConnectorsPanel.js";import u from"./VariableConnectorWhatsApp.js";import m from"./VariableEditorHeader.js";import v from"./WhatsAppTemplateCardButtonV2.js";const b=b=>{let{template:g,onTemplateChange:h,whatsappSpecificPickerMeta:f,showVariableModal:T,variableList:j,variableListForImage:C,discountCode:O,setDiscountCode:x}=b;var E,k,y,V,w,B,L,I,A,M,R,U,H,D,S,N;const{originalVariableList:P,pod:Q,extras:W}=l(),{descriptionComponents:F,urlBtns:_,qrbBtns:K,imageComponent:Y,bodyVariables:$,headerVariables:q}=a(g),[X,z]=e(!1);function G(t,o){var e,n,i,l,a;const s=Object.assign({},g),d=null==s?void 0:s.components.findIndex((t=>"BUTTONS"===t.type));if(void 0!==d&&d>-1){const a=null===(e=null==s?void 0:s.components[d].buttons)||void 0===e?void 0:e.findIndex((t=>"URL"===t.type));if(void 0!==a&&a>-1){const e="custom"===o&&"string"==typeof t,r=[...null!==(l=null===(i=null===(n=s.components)||void 0===n?void 0:n[d])||void 0===i?void 0:i.buttons)&&void 0!==l?l:[]];r[a]=Object.assign(Object.assign({},r[a]),{url:"https://d.bik.ai/{{1}}",example:[e?t:"string"!=typeof t?t.defaultValue:""]});const p=Object.assign(Object.assign({},s.components[d]),{buttons:r}),c=Object.assign(Object.assign({},s.mapping),{buttons:e?["((customBtnPlaceholder))"]:"string"!=typeof t?[t.placeHolder]:void 0});s.mapping=c;const u=[...s.components];u[d]=p,s.components=u}}if("string"!=typeof t){"checkout.checkoutUrl"===(null===(a=t.placeHolder)||void 0===a?void 0:a.slice(2,-2))?z(!0):(z(!1),null==x||x(""))}null==h||h(s)}function J(t,o,e){var n;const i=Object.assign({},g),l=null==i?void 0:i.components.findIndex((t=>"BUTTONS"===t.type));if(void 0!==l&&l>-1){const o=null===(n=null==i?void 0:i.components[l].buttons)||void 0===n?void 0:n.filter((t=>"QUICK_REPLY"===t.type));o&&(o[e]=Object.assign(Object.assign({},o[e]),{flowId:t.flowId,flowName:t.flowName}));const a=Object.assign(Object.assign({},i.components[l]),{buttons:o}),s=[...i.components];s[l]=a,i.components=s}null==h||h(i)}return n((()=>{var t;const o=null===(t=g.mapping.buttons)||void 0===t?void 0:t[0];"checkout.checkoutUrl"===(null==o?void 0:o.slice(2,-2))?z(!0):(z(!1),null==x||x(""))}),[g]),t(c,Object.assign({style:{flexDirection:"column",maxHeight:460}},{children:[!!Y&&o(r,{children:o(p,{whatsappSpecificPickerMeta:f,mediaComponent:Y,updateTemplateImageUrl:function(t,o){var e;let n=Object.assign({},g);const i=null===(e=null==n?void 0:n.components)||void 0===e?void 0:e.findIndex((t=>{if("HEADER"===t.type&&"NONE"!==t.format&&"TEXT"!==t.format)return!0}));if(void 0!==i&&i>-1&&(null==n?void 0:n.components[i])){const e=Object.assign(Object.assign({},n.components[i]),{format:o,example:{header_handle:[t]}}),l=[...n.components];l[i]=e,n=Object.assign(Object.assign({},n),{components:l})}n.mapping&&(n.mapping=Object.assign(Object.assign({},n.mapping),{header:void 0})),null==h||h(Object.assign({},n))},template:g,variableListForImage:C})}),($.length>0||q.length>0)&&o(m,{containerStyle:{paddingTop:Y?24:8},headerText:"Edit variable values",subText:"Edit values for the variables used in template",toolTipInfo:"Variables are placeholder texts which can either be filled through data or custom texts. These can be edited through the dropdowns below"}),null==F?void 0:F.map(((t,e)=>o(u,{originalVariableList:P,type:t.type,descriptionComponent:t.component,variableMapping:"HEADER"===t.type?g.mapping.header:g.mapping.body,showVariableModal:T,variableList:j},e))),(null===(k=null===(E=_[0])||void 0===E?void 0:E.component)||void 0===k?void 0:k.buttons)&&(null===(w=null===(V=null===(y=_[0])||void 0===y?void 0:y.component)||void 0===V?void 0:V.buttons)||void 0===w?void 0:w.length)>0&&o(m,{headerText:"Edit buttons",subText:"Edit the link connected to the CTA button"}),null===(B=null==P?void 0:P.buttons)||void 0===B?void 0:B.map(((t,e)=>{if("URL"===t.type)return o(v,{CTAoptions:null==f?void 0:f.CTAoptions,button:t,originalVariableList:P,updateSelectedURLTemplateBtn:G},`${e}`)})),(null===(I=null===(L=K[0])||void 0===L?void 0:L.component)||void 0===I?void 0:I.buttons)&&(null===(R=null===(M=null===(A=K[0])||void 0===A?void 0:A.component)||void 0===M?void 0:M.buttons)||void 0===R?void 0:R.length)>0&&(Q!==i.CHATBOT?o(m,{headerText:"Edit buttons",subText:"Edit the chatflows triggered on clicking the buttons",toolTipInfo:"There is an option to trigger chatflows through the buttons which can keep the user engaged"}):o(s,{backTrackMessage:null===(U=null==W?void 0:W.backTrackExtra)||void 0===U?void 0:U[0],setBackTrackMessage:null===(H=null==W?void 0:W.backTrackExtra)||void 0===H?void 0:H[1]})),null===(D=null==P?void 0:P.buttons)||void 0===D?void 0:D.map(((t,e)=>{if("QUICK_REPLY"===t.type)return o(v,{QRBoptions:null==f?void 0:f.QRBoptions,button:t,originalVariableList:P,updateSelectedQRBTemplateBtn:J},`${e}`)})),Q===i.CHATBOT&&X&&o(d,{discountCode:null===(S=null==W?void 0:W.discountCodeExtra)||void 0===S?void 0:S[0],setDiscountCode:null===(N=null==W?void 0:W.discountCodeExtra)||void 0===N?void 0:N[1],variableList:j})]}))};export{b as default};
|
|
@@ -7,5 +7,6 @@ declare const MobilePreview: React.ForwardRefExoticComponent<{
|
|
|
7
7
|
display_content: string;
|
|
8
8
|
channel: CHANNEL_TYPE;
|
|
9
9
|
template: WhatsAppTemplate | EmailTemplateType | SMSTemplateType | null;
|
|
10
|
+
showSampleValues?: boolean | undefined;
|
|
10
11
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
11
12
|
export default MobilePreview;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import i from"react";import a from"styled-components";import{TemplatePreview as o}from"../../template-preview/TemplatePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import"../../../constants/Theme.js";import"../../template-preview/models/TemplateMeta.js";import{CHANNEL_TYPE as
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import i from"react";import a from"styled-components";import{TemplatePreview as o}from"../../template-preview/TemplatePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import"../../../constants/Theme.js";import"../../template-preview/models/TemplateMeta.js";import{CHANNEL_TYPE as p}from"../../template-preview/models/Channels.js";import{POD as r}from"../../template-preview/models/WhatsAppTemplate.js";import{useTemplateModalContext as l}from"../context/templateModalContext.js";const s=a.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
height: 100%;
|
|
4
4
|
border-radius: 31px;
|
|
5
|
-
width: ${e=>e.channel===
|
|
5
|
+
width: ${e=>e.channel===p.WHATSAPP?"236px":"300px"};
|
|
6
6
|
background-color: white;
|
|
7
7
|
margin: auto;
|
|
8
8
|
overflow-y: auto;
|
|
9
|
-
`,
|
|
9
|
+
`,m=a.div`
|
|
10
10
|
position: absolute;
|
|
11
11
|
flex: 1;
|
|
12
12
|
background-color: white;
|
|
@@ -17,4 +17,4 @@ import{jsx as e,jsxs as t}from"react/jsx-runtime";import i from"react";import a
|
|
|
17
17
|
height: calc(100% - 17px);
|
|
18
18
|
border-radius: 16px;
|
|
19
19
|
overflow-y: auto;
|
|
20
|
-
`,
|
|
20
|
+
`,n=i.forwardRef(((i,a)=>{let{display_content:n,channel:h,template:c,showSampleValues:d}=i;const{pod:w}=l();return e("div",{children:t(s,Object.assign({channel:h},{children:[e("img",{alt:"",src:"https://firebasestorage.googleapis.com/v0/b/staging-bikayi.appspot.com/o/bik%2FkNwEVoGlLpVjOsXoO1M8WgvWicP2%2F6f07b850-8b4b-4d58-96cc-8ba6df7b4e4a-Device___Frame.jpg?alt=media&token=253f1bfe-8481-4f54-bdef-3c0a73697d6a",style:{width:h===p.WHATSAPP?236:300,height:443}}),e(m,Object.assign({ref:a},{children:e(o,{showSampleValues:d,template:c,channel:h,smsSpecificMeta:{smsDisplayContent:n},whatsAppSpecificMeta:{showWhatsAppHeader:!0,whatsAppExtras:w!==r.CHATBOT,containerStyle:{border:"none",borderBottomRightRadius:0,borderBottomLeftRadius:0,minHeight:426,width:236}},size:"small",hideHeader:!0,emailSpecificMeta:{emailDisplayContent:n,hideViewButtonForEmail:!0,emailHtmlContainerId:"template_html_mobile",containerStyle:{height:"100%",width:"100%"},templateContainerStyles:{height:"100%"}}})}))]}))})}));n.displayName="MobilePreview";export{n as default};
|
package/dist/esm/components/template-context-mapper/modalElements/TemplateSelectModalContent.d.ts
CHANGED
|
@@ -9,8 +9,10 @@ export interface TemplateSelectModalContentProps {
|
|
|
9
9
|
whatsappSpecificPickerMeta?: WhatsAppPickerMeta;
|
|
10
10
|
showVariableModal?: boolean;
|
|
11
11
|
variableList?: VariableListInterfaceV2[];
|
|
12
|
+
variableListForImage?: VariableListInterfaceV2[];
|
|
12
13
|
discountCode?: string;
|
|
13
14
|
setDiscountCode?: (code: string) => void;
|
|
15
|
+
showSampleValues?: boolean;
|
|
14
16
|
}
|
|
15
|
-
declare const TemplateSelectModalContent: ({ channel, showVariableMapping, showOnlyContent, whatsappSpecificPickerMeta, showVariableModal, variableList, discountCode, setDiscountCode, }: TemplateSelectModalContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare const TemplateSelectModalContent: ({ channel, showVariableMapping, showOnlyContent, whatsappSpecificPickerMeta, showVariableModal, variableList, discountCode, setDiscountCode, variableListForImage, showSampleValues, }: TemplateSelectModalContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
18
|
export default TemplateSelectModalContent;
|
package/dist/esm/components/template-context-mapper/modalElements/TemplateSelectModalContent.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
1
|
+
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{CHANNEL_TYPE as o}from"../../template-preview/models/Channels.js";import t from"./Body.js";import i from"./Header.js";const s=s=>{let{channel:r,showVariableMapping:l,showOnlyContent:n,whatsappSpecificPickerMeta:p,showVariableModal:d,variableList:c,discountCode:m,setDiscountCode:h,variableListForImage:w,showSampleValues:b}=s;return e("div",Object.assign({style:{paddingBottom:0}},{children:a("div",{children:[r===o.EMAIL&&e(i,{showOnlyContent:n}),e(t,{whatsappSpecificPickerMeta:p,showVariableMapping:!!l,showOnlyContent:n,showVariableModal:d,variableList:c,discountCode:m,setDiscountCode:h,variableListForImage:w,showSampleValues:b})]})}))};export{s as default};
|