@bikdotai/bik-component-library 0.0.530-beta0.rt12 → 0.0.530-beta0.rt13
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/bik-layout/MockMenus.d.ts +0 -1
- package/dist/cjs/components/template-preview/RenderVariableUIForPreview.d.ts +8 -0
- package/dist/cjs/components/template-preview/RenderVariableUIForPreview.js +1 -0
- package/dist/cjs/components/template-preview/SMS/SMSBubble.d.ts +2 -1
- package/dist/cjs/components/template-preview/SMS/SMSBubble.js +3 -3
- package/dist/cjs/components/template-preview/SmsTemplatePreview.js +1 -1
- package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/esm/components/template-preview/RenderVariableUIForPreview.d.ts +8 -0
- package/dist/esm/components/template-preview/RenderVariableUIForPreview.js +1 -0
- package/dist/esm/components/template-preview/SMS/SMSBubble.d.ts +2 -1
- package/dist/esm/components/template-preview/SMS/SMSBubble.js +3 -3
- package/dist/esm/components/template-preview/SmsTemplatePreview.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CUSTOM_VARIABLE } from './models/TemplateMeta';
|
|
3
|
+
declare const RenderVariableUIForPreview: React.FC<{
|
|
4
|
+
content: string;
|
|
5
|
+
variablStore?: CUSTOM_VARIABLE[];
|
|
6
|
+
brandColor?: string;
|
|
7
|
+
}>;
|
|
8
|
+
export default RenderVariableUIForPreview;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("../../constants/Theme.js"),t=require("./constants/regexPatterns.js");exports.default=a=>{let{content:n,variablStore:s,brandColor:l=r.COLORS.content.brand}=a;const o=(null==s?void 0:s.length)?s.map((e=>e.updatedValue)):n.match(t.variablePatternGlobal)||[];return t.variablePatternGlobal.lastIndex=0,e.jsx(e.Fragment,{children:n.split(t.variablePattern).map(((r,t)=>o[t]?e.jsxs("span",{children:[r,e.jsx("span",Object.assign({id:`connectors_variable_${t+1}`,style:{color:l,textDecoration:"underline",wordBreak:"break-word"}},{children:o[t]})),e.jsx("span",{children:" "})]},t):e.jsx("span",{children:r},t)))})};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
export declare const SideCaret: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
3
|
export declare const SMSContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
4
|
export type SMSBubbleProps = {
|
|
4
|
-
content: string;
|
|
5
|
+
content: ReactNode | string;
|
|
5
6
|
size?: 'small' | 'large';
|
|
6
7
|
};
|
|
7
8
|
declare const SMSBubble: (props: SMSBubbleProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/union.svg.js"),r=require("styled-components"),s=require("../../../constants/Theme.js");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/union.svg.js"),r=require("styled-components"),s=require("../../../constants/Theme.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=i(r);const o=n.default.div`
|
|
2
2
|
position: absolute;
|
|
3
3
|
width: 30px;
|
|
4
4
|
height: 30px;
|
|
5
5
|
left: -10px;
|
|
6
6
|
bottom: -1px;
|
|
7
|
-
`,
|
|
7
|
+
`,d=n.default.div`
|
|
8
8
|
padding: 12px;
|
|
9
9
|
background: ${s.COLORS.background.base};
|
|
10
10
|
border-radius: 16px;
|
|
11
11
|
position: relative;
|
|
12
|
-
`;exports.SMSContainer=
|
|
12
|
+
`;exports.SMSContainer=d,exports.SideCaret=o,exports.default=r=>{const{content:i,size:n}=r;return e.jsxs(d,{children:[e.jsx(o,{children:e.jsx(t.default,{color:s.COLORS.background.base,height:27,width:27})}),e.jsx("div",Object.assign({style:{fontSize:"small"===n?12:14},dangerouslySetInnerHTML:"string"==typeof i?{__html:i}:void 0},{children:"string"!=typeof i&&i}))]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/arrow_left.svg.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/arrow_left.svg.js"),l=require("../../assets/icons/more_vertical.svg.js"),r=require("../../assets/icons/search.svg.js"),s=require("../../constants/Theme.js"),n=require("../template-context-mapper/context/templateModalContext.js"),i=require("../TypographyStyle.js"),a=require("./RenderVariableUIForPreview.js"),o=require("./SMS/SMSBubble.js"),d=require("./SmsTemplatePreview.styled.js");exports.default=c=>{let{template:u,variableStore:j,hideHeader:x,display_content:h,onlyTemplateContent:v,size:g}=c;var p,S,m;const b=null==u?void 0:u.content,{hideDeviceContainerInPreview:y,originalVariableList:f}=n.useTemplateModalContext();return console.log("templateContent in smsTemplatePreview",f),y?e.jsx(d.SMSBubbleContainer,Object.assign({size:g},{children:e.jsx(o.default,{size:null!=g?g:"large",content:null!==(p=null!=h?h:a.default({content:b,variablStore:null!=j?j:[]}))&&void 0!==p?p:""})})):e.jsxs(e.Fragment,{children:[!x&&!v&&e.jsx(d.SMSCardHeader,{children:e.jsx(i.TitleRegular,Object.assign({style:{maxWidth:"100%"}},{children:u.name}))}),!v&&e.jsx(d.SMSHeader,{children:e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:8}},{children:[e.jsx(t.default,{width:16,height:16,color:s.COLORS.content.secondary}),e.jsx(i.Caption,{children:null===(S=null==u?void 0:u.headers)||void 0===S?void 0:S[0]})]})),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:8}},{children:[e.jsx(r.default,{width:16,height:16,color:s.COLORS.content.secondary}),e.jsx(l.default,{width:16,height:16,color:s.COLORS.content.secondary})]}))]})}),e.jsx(d.SMSBubbleContainer,Object.assign({size:g},{children:e.jsx(o.default,{size:null!=g?g:"large",content:null!==(m=null!=h?h:a.default({content:b,variablStore:null!=j?j:[]}))&&void 0!==m?m:""})}))]})};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CUSTOM_VARIABLE } from './models/TemplateMeta';
|
|
3
|
+
declare const RenderVariableUIForPreview: React.FC<{
|
|
4
|
+
content: string;
|
|
5
|
+
variablStore?: CUSTOM_VARIABLE[];
|
|
6
|
+
brandColor?: string;
|
|
7
|
+
}>;
|
|
8
|
+
export default RenderVariableUIForPreview;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,Fragment as n,jsxs as t}from"react/jsx-runtime";import{COLORS as r}from"../../constants/Theme.js";import{variablePatternGlobal as a,variablePattern as o}from"./constants/regexPatterns.js";const s=s=>{let{content:l,variablStore:c,brandColor:i=r.content.brand}=s;const d=(null==c?void 0:c.length)?c.map((e=>e.updatedValue)):l.match(a)||[];return a.lastIndex=0,e(n,{children:l.split(o).map(((n,r)=>d[r]?t("span",{children:[n,e("span",Object.assign({id:`connectors_variable_${r+1}`,style:{color:i,textDecoration:"underline",wordBreak:"break-word"}},{children:d[r]})),e("span",{children:" "})]},r):e("span",{children:n},r)))})};export{s as default};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
export declare const SideCaret: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
3
|
export declare const SMSContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
4
|
export type SMSBubbleProps = {
|
|
4
|
-
content: string;
|
|
5
|
+
content: ReactNode | string;
|
|
5
6
|
size?: 'small' | 'large';
|
|
6
7
|
};
|
|
7
8
|
declare const SMSBubble: (props: SMSBubbleProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{jsxs as t,jsx as o}from"react/jsx-runtime";import e from"../../../assets/icons/union.svg.js";import i from"styled-components";import{COLORS as n}from"../../../constants/Theme.js";const
|
|
1
|
+
import{jsxs as t,jsx as o}from"react/jsx-runtime";import e from"../../../assets/icons/union.svg.js";import i from"styled-components";import{COLORS as n}from"../../../constants/Theme.js";const s=i.div`
|
|
2
2
|
position: absolute;
|
|
3
3
|
width: 30px;
|
|
4
4
|
height: 30px;
|
|
5
5
|
left: -10px;
|
|
6
6
|
bottom: -1px;
|
|
7
|
-
`,
|
|
7
|
+
`,r=i.div`
|
|
8
8
|
padding: 12px;
|
|
9
9
|
background: ${n.background.base};
|
|
10
10
|
border-radius: 16px;
|
|
11
11
|
position: relative;
|
|
12
|
-
`,d=i=>{const{content:d,size:a}=i;return t(
|
|
12
|
+
`,d=i=>{const{content:d,size:a}=i;return t(r,{children:[o(s,{children:o(e,{color:n.background.base,height:27,width:27})}),o("div",Object.assign({style:{fontSize:"small"===a?12:14},dangerouslySetInnerHTML:"string"==typeof d?{__html:d}:void 0},{children:"string"!=typeof d&&d}))]})};export{r as SMSContainer,s as SideCaret,d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import n from"../../assets/icons/arrow_left.svg.js";import o from"../../assets/icons/more_vertical.svg.js";import r from"../../assets/icons/search.svg.js";import{COLORS as l}from"../../constants/Theme.js";import{useTemplateModalContext as s}from"../template-context-mapper/context/templateModalContext.js";import{TitleRegular as a,Caption as c}from"../TypographyStyle.js";import d from"./RenderVariableUIForPreview.js";import m from"./SMS/SMSBubble.js";import{SMSBubbleContainer as p,SMSCardHeader as h,SMSHeader as v}from"./SmsTemplatePreview.styled.js";const g=g=>{let{template:f,variableStore:j,hideHeader:u,display_content:y,onlyTemplateContent:b,size:w}=g;var x,S,z;const O=null==f?void 0:f.content,{hideDeviceContainerInPreview:T,originalVariableList:C}=s();return console.log("templateContent in smsTemplatePreview",C),T?e(p,Object.assign({size:w},{children:e(m,{size:null!=w?w:"large",content:null!==(x=null!=y?y:d({content:O,variablStore:null!=j?j:[]}))&&void 0!==x?x:""})})):t(i,{children:[!u&&!b&&e(h,{children:e(a,Object.assign({style:{maxWidth:"100%"}},{children:f.name}))}),!b&&e(v,{children:t(i,{children:[t("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:8}},{children:[e(n,{width:16,height:16,color:l.content.secondary}),e(c,{children:null===(S=null==f?void 0:f.headers)||void 0===S?void 0:S[0]})]})),t("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:8}},{children:[e(r,{width:16,height:16,color:l.content.secondary}),e(o,{width:16,height:16,color:l.content.secondary})]}))]})}),e(p,Object.assign({size:w},{children:e(m,{size:null!=w?w:"large",content:null!==(z=null!=y?y:d({content:O,variablStore:null!=j?j:[]}))&&void 0!==z?z:""})}))]})};export{g as default};
|