@bikdotai/bik-component-library 0.0.530-beta0.rt7 → 0.0.530-beta0.rt9
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/template-preview/helpers/SmsTemplateHelper.d.ts +1 -1
- package/dist/cjs/components/template-preview/helpers/SmsTemplateHelper.js +1 -1
- package/dist/esm/components/template-preview/helpers/SmsTemplateHelper.d.ts +1 -1
- package/dist/esm/components/template-preview/helpers/SmsTemplateHelper.js +1 -1
- package/package.json +1 -1
|
@@ -2,4 +2,4 @@ import { CUSTOM_VARIABLE } from '../models/TemplateMeta';
|
|
|
2
2
|
import { WhatsAppCarouselTemplateVariables } from '../models/WhatsappCarouselTemplate';
|
|
3
3
|
import { WhatsAppTemplateVariables } from '../models/WhatsAppTemplate';
|
|
4
4
|
export declare const variablePatternGlobal: RegExp;
|
|
5
|
-
export declare const renderVariableUIForPreview: (content: string, variableStore?: CUSTOM_VARIABLE[], originalVariables?: CUSTOM_VARIABLE[] | WhatsAppTemplateVariables
|
|
5
|
+
export declare const renderVariableUIForPreview: (content: string, variableStore?: CUSTOM_VARIABLE[], originalVariables?: CUSTOM_VARIABLE[] | WhatsAppTemplateVariables | WhatsAppCarouselTemplateVariables, brandColor?: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../constants/Theme.js");const r=/\{\{[A-Za-z0-9 ._]+\}\}/g;exports.renderVariableUIForPreview=function(t,n,a){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.COLORS.content.brand;const o=(null==n?void 0:n.length)?n.map((e=>e.updatedValue)):t.match(r);let
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../constants/Theme.js");const r=/\{\{[A-Za-z0-9 ._]+\}\}/g;exports.renderVariableUIForPreview=function(t,n,a){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.COLORS.content.brand;const o=(null==n?void 0:n.length)?n.map((e=>e.updatedValue)):t.match(r);let i="",s=0;return t.replace(r,((e,r)=>{var n,d;const u=null!==(n=null==o?void 0:o[r])&&void 0!==n?n:"";let c=u;if(console.log("originalVariables",a),a&&Array.isArray(a)&&a.length){const e=a[r];"variableName"in e&&(c=null!==(d=e.updatedValue)&&void 0!==d?d:u)}const b=`connectors_variable_${r+1}`;return i+=t.substring(s,r),i+=`${e}<span id="${b}" style="color: ${l}; text-decoration: underline; word-break: break-word;">${c}</span>`,s=r+e.length,e})),i+=t.substring(s),i},exports.variablePatternGlobal=r;
|
|
@@ -2,4 +2,4 @@ import { CUSTOM_VARIABLE } from '../models/TemplateMeta';
|
|
|
2
2
|
import { WhatsAppCarouselTemplateVariables } from '../models/WhatsappCarouselTemplate';
|
|
3
3
|
import { WhatsAppTemplateVariables } from '../models/WhatsAppTemplate';
|
|
4
4
|
export declare const variablePatternGlobal: RegExp;
|
|
5
|
-
export declare const renderVariableUIForPreview: (content: string, variableStore?: CUSTOM_VARIABLE[], originalVariables?: CUSTOM_VARIABLE[] | WhatsAppTemplateVariables
|
|
5
|
+
export declare const renderVariableUIForPreview: (content: string, variableStore?: CUSTOM_VARIABLE[], originalVariables?: CUSTOM_VARIABLE[] | WhatsAppTemplateVariables | WhatsAppCarouselTemplateVariables, brandColor?: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{COLORS as n}from"../../../constants/Theme.js";const
|
|
1
|
+
import{COLORS as n}from"../../../constants/Theme.js";const e=/\{\{[A-Za-z0-9 ._]+\}\}/g,t=function(t,o,r){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.content.brand;const a=(null==o?void 0:o.length)?o.map((n=>n.updatedValue)):t.match(e);let i="",s=0;return t.replace(e,((n,e)=>{var o,c;const d=null!==(o=null==a?void 0:a[e])&&void 0!==o?o:"";let u=d;if(console.log("originalVariables",r),r&&Array.isArray(r)&&r.length){const n=r[e];"variableName"in n&&(u=null!==(c=n.updatedValue)&&void 0!==c?c:d)}const g=`connectors_variable_${e+1}`;return i+=t.substring(s,e),i+=`${n}<span id="${g}" style="color: ${l}; text-decoration: underline; word-break: break-word;">${u}</span>`,s=e+n.length,n})),i+=t.substring(s),i};export{t as renderVariableUIForPreview,e as variablePatternGlobal};
|