@bikdotai/bik-component-library 0.0.279-beta.11 → 0.0.279-beta.12

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.
@@ -36,7 +36,7 @@ export declare class MetaCustomProcessor {
36
36
  value: {
37
37
  operator: string;
38
38
  dataType: import("../types").QueryBuilderConnectorType;
39
- value?: string | number | Date | Date[] | string[] | number[] | undefined;
39
+ value?: string | number | string[] | number[] | Date | Date[] | undefined;
40
40
  };
41
41
  key: string;
42
42
  refresh?: boolean | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const Menus: ({
2
3
  displayName: string;
3
4
  key: number;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const WorkingStepper: () => JSX.Element;
2
3
  export declare enum STEPENUM {
3
4
  STEP1 = "STEP1",
@@ -21,5 +21,6 @@ export interface TemplateContextMapperProps {
21
21
  zIndex?: number;
22
22
  showVariableModal?: boolean;
23
23
  variableList?: VariableListInterfaceV2[];
24
+ onBackPress?: () => void;
24
25
  }
25
- export declare const TemplateContextMapper: ({ selectedTemplate, closeDialog, showVariableMapping, channel, htmlContent, templateVariables, onTemplateSelect, globalPlaceholders, showOnlyContent, whatsappSpecificPickerMeta, zIndex, showVariableModal, variableList, }: TemplateContextMapperProps) => JSX.Element;
26
+ export declare const TemplateContextMapper: ({ selectedTemplate, closeDialog, showVariableMapping, channel, htmlContent, templateVariables, onTemplateSelect, globalPlaceholders, showOnlyContent, whatsappSpecificPickerMeta, zIndex, showVariableModal, variableList, onBackPress, }: TemplateContextMapperProps) => JSX.Element;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),l=require("../../utils/StringUtils.js"),a=require("../modals/styledModal.js"),i=require("../template-preview/models/Channels.js"),r=require("./context/templateModalContext.js"),s=require("./modalElements/Footer.js"),o=require("./modalElements/TemplateSelectModalContent.js"),n=require("./utils/convertPlaceholdersToBikDropdown.js");exports.TemplateContextMapper=d=>{let{selectedTemplate:c,closeDialog:u,showVariableMapping:p,channel:m,htmlContent:h,templateVariables:g,onTemplateSelect:S,globalPlaceholders:v,showOnlyContent:b,whatsappSpecificPickerMeta:j,zIndex:M,showVariableModal:T,variableList:E}=d;var x,C;t.useEffect((()=>{w(h)}),[h]);const[P,L]=t.useState(m===i.CHANNEL_TYPE.EMAIL?"desktop":"mobile"),[f,w]=t.useState(h),[q,y]=t.useState(!1),[A,N]=t.useState(c),[V,_]=t.useState(null!=g?g:[]),[H,I]=t.useState(!1);const O=t.useMemo((()=>n.convertPlaceholdersToBikDropdown(v)),[v]);return e.jsx(r.TemplateModalContext.Provider,Object.assign({value:{template:A,setTemplate:N,device:P,setDevice:L,display_content:f,setDisplayContent:w,originalVariableList:V,setOriginalVariableList:_,isError:q,setIsError:y,channel:m,globalNormalizedPlaceholders:O,templateSelectionTriggered:H,setTemplateSelectionTriggered:I}},{children:b?e.jsx(o.default,{channel:i.CHANNEL_TYPE.EMAIL,hideHeader:!0}):e.jsxs(a.StyledModal,Object.assign({zIndex:M,centralContainerStyles:{width:m===i.CHANNEL_TYPE.EMAIL&&p?1e3:650},open:!0,onClose:()=>{null==u||u()},headingTitle:null==A?void 0:A.label,headingSubtitle:m===i.CHANNEL_TYPE.WHATSAPP?`${l.default.capitaliseFirstLetterOfString(null!==(x=null==A?void 0:A.category)&&void 0!==x?x:"")} • ${null!==(C=null==A?void 0:A.templateCategory)&&void 0!==C?C:""}`:""},{children:[e.jsx(o.default,{showVariableMapping:p,channel:m,whatsappSpecificPickerMeta:j,showVariableModal:T,variableList:E}),S?e.jsx(s.default,{onSelect:function(){const e=null==S?void 0:S(A,V,null!=f?f:"");e?y(!!e):I(!0)}}):e.jsx(e.Fragment,{})]}))}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),l=require("../../utils/StringUtils.js"),a=require("../modals/styledModal.js"),r=require("../template-preview/models/Channels.js"),s=require("./context/templateModalContext.js"),i=require("./modalElements/Footer.js"),o=require("./modalElements/TemplateSelectModalContent.js"),n=require("./utils/convertPlaceholdersToBikDropdown.js");exports.TemplateContextMapper=d=>{let{selectedTemplate:c,closeDialog:u,showVariableMapping:p,channel:m,htmlContent:h,templateVariables:g,onTemplateSelect:S,globalPlaceholders:v,showOnlyContent:b,whatsappSpecificPickerMeta:j,zIndex:M,showVariableModal:T,variableList:E,onBackPress:P}=d;var x,C;t.useEffect((()=>{q(h)}),[h]);const[L,f]=t.useState(m===r.CHANNEL_TYPE.EMAIL?"desktop":"mobile"),[w,q]=t.useState(h),[y,A]=t.useState(!1),[N,k]=t.useState(c),[V,_]=t.useState(null!=g?g:[]),[H,I]=t.useState(!1);const O=t.useMemo((()=>n.convertPlaceholdersToBikDropdown(v)),[v]);return e.jsx(s.TemplateModalContext.Provider,Object.assign({value:{template:N,setTemplate:k,device:L,setDevice:f,display_content:w,setDisplayContent:q,originalVariableList:V,setOriginalVariableList:_,isError:y,setIsError:A,channel:m,globalNormalizedPlaceholders:O,templateSelectionTriggered:H,setTemplateSelectionTriggered:I}},{children:b?e.jsx(o.default,{channel:r.CHANNEL_TYPE.EMAIL,hideHeader:!0}):e.jsxs(a.StyledModal,Object.assign({zIndex:M,centralContainerStyles:{width:m===r.CHANNEL_TYPE.EMAIL&&p?1e3:650},open:!0,onClose:()=>{null==u||u()},headingTitle:null==N?void 0:N.label,headingSubtitle:m===r.CHANNEL_TYPE.WHATSAPP?`${l.default.capitaliseFirstLetterOfString(null!==(x=null==N?void 0:N.category)&&void 0!==x?x:"")} • ${null!==(C=null==N?void 0:N.templateCategory)&&void 0!==C?C:""}`:"",onBackPress:()=>{null==P||P()}},{children:[e.jsx(o.default,{showVariableMapping:p,channel:m,whatsappSpecificPickerMeta:j,showVariableModal:T,variableList:E}),S?e.jsx(i.default,{onSelect:function(){const e=null==S?void 0:S(N,V,null!=w?w:"");e?A(!!e):I(!0)}}):e.jsx(e.Fragment,{})]}))}))};
@@ -36,7 +36,7 @@ export declare class MetaCustomProcessor {
36
36
  value: {
37
37
  operator: string;
38
38
  dataType: import("../types").QueryBuilderConnectorType;
39
- value?: string | number | Date | Date[] | string[] | number[] | undefined;
39
+ value?: string | number | string[] | number[] | Date | Date[] | undefined;
40
40
  };
41
41
  key: string;
42
42
  refresh?: boolean | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const Menus: ({
2
3
  displayName: string;
3
4
  key: number;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const WorkingStepper: () => JSX.Element;
2
3
  export declare enum STEPENUM {
3
4
  STEP1 = "STEP1",
@@ -21,5 +21,6 @@ export interface TemplateContextMapperProps {
21
21
  zIndex?: number;
22
22
  showVariableModal?: boolean;
23
23
  variableList?: VariableListInterfaceV2[];
24
+ onBackPress?: () => void;
24
25
  }
25
- export declare const TemplateContextMapper: ({ selectedTemplate, closeDialog, showVariableMapping, channel, htmlContent, templateVariables, onTemplateSelect, globalPlaceholders, showOnlyContent, whatsappSpecificPickerMeta, zIndex, showVariableModal, variableList, }: TemplateContextMapperProps) => JSX.Element;
26
+ export declare const TemplateContextMapper: ({ selectedTemplate, closeDialog, showVariableMapping, channel, htmlContent, templateVariables, onTemplateSelect, globalPlaceholders, showOnlyContent, whatsappSpecificPickerMeta, zIndex, showVariableModal, variableList, onBackPress, }: TemplateContextMapperProps) => 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 r from"../../utils/StringUtils.js";import{StyledModal as n}from"../modals/styledModal.js";import{CHANNEL_TYPE as s}from"../template-preview/models/Channels.js";import{TemplateModalContext as c}from"./context/templateModalContext.js";import m from"./modalElements/Footer.js";import p from"./modalElements/TemplateSelectModalContent.js";import{convertPlaceholdersToBikDropdown as d}from"./utils/convertPlaceholdersToBikDropdown.js";const h=h=>{let{selectedTemplate:g,closeDialog:b,showVariableMapping:u,channel:v,htmlContent:f,templateVariables:M,onTemplateSelect:S,globalPlaceholders:j,showOnlyContent:w,whatsappSpecificPickerMeta:T,zIndex:C,showVariableModal:L,variableList:P}=h;var y,E;o((()=>{A(f)}),[f]);const[V,x]=a(v===s.EMAIL?"desktop":"mobile"),[I,A]=a(f),[O,k]=a(!1),[D,z]=a(g),[F,H]=a(null!=M?M:[]),[$,B]=a(!1);const N=i((()=>d(j)),[j]);return e(c.Provider,Object.assign({value:{template:D,setTemplate:z,device:V,setDevice:x,display_content:I,setDisplayContent:A,originalVariableList:F,setOriginalVariableList:H,isError:O,setIsError:k,channel:v,globalNormalizedPlaceholders:N,templateSelectionTriggered:$,setTemplateSelectionTriggered:B}},{children:w?e(p,{channel:s.EMAIL,hideHeader:!0}):t(n,Object.assign({zIndex:C,centralContainerStyles:{width:v===s.EMAIL&&u?1e3:650},open:!0,onClose:()=>{null==b||b()},headingTitle:null==D?void 0:D.label,headingSubtitle:v===s.WHATSAPP?`${r.capitaliseFirstLetterOfString(null!==(y=null==D?void 0:D.category)&&void 0!==y?y:"")} • ${null!==(E=null==D?void 0:D.templateCategory)&&void 0!==E?E:""}`:""},{children:[e(p,{showVariableMapping:u,channel:v,whatsappSpecificPickerMeta:T,showVariableModal:L,variableList:P}),S?e(m,{onSelect:function(){const e=null==S?void 0:S(D,F,null!=I?I:"");e?k(!!e):B(!0)}}):e(l,{})]}))}))};export{h as TemplateContextMapper};
1
+ import{jsx as e,jsxs as l,Fragment as t}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 n}from"../modals/styledModal.js";import{CHANNEL_TYPE as s}from"../template-preview/models/Channels.js";import{TemplateModalContext as c}from"./context/templateModalContext.js";import m from"./modalElements/Footer.js";import p from"./modalElements/TemplateSelectModalContent.js";import{convertPlaceholdersToBikDropdown as d}from"./utils/convertPlaceholdersToBikDropdown.js";const h=h=>{let{selectedTemplate:g,closeDialog:u,showVariableMapping:b,channel:v,htmlContent:f,templateVariables:M,onTemplateSelect:S,globalPlaceholders:j,showOnlyContent:w,whatsappSpecificPickerMeta:P,zIndex:T,showVariableModal:C,variableList:L,onBackPress:y}=h;var E,V;o((()=>{A(f)}),[f]);const[k,x]=a(v===s.EMAIL?"desktop":"mobile"),[I,A]=a(f),[O,D]=a(!1),[z,B]=a(g),[F,H]=a(null!=M?M:[]),[$,N]=a(!1);const U=i((()=>d(j)),[j]);return e(c.Provider,Object.assign({value:{template:z,setTemplate:B,device:k,setDevice:x,display_content:I,setDisplayContent:A,originalVariableList:F,setOriginalVariableList:H,isError:O,setIsError:D,channel:v,globalNormalizedPlaceholders:U,templateSelectionTriggered:$,setTemplateSelectionTriggered:N}},{children:w?e(p,{channel:s.EMAIL,hideHeader:!0}):l(n,Object.assign({zIndex:T,centralContainerStyles:{width:v===s.EMAIL&&b?1e3:650},open:!0,onClose:()=>{null==u||u()},headingTitle:null==z?void 0:z.label,headingSubtitle:v===s.WHATSAPP?`${r.capitaliseFirstLetterOfString(null!==(E=null==z?void 0:z.category)&&void 0!==E?E:"")} • ${null!==(V=null==z?void 0:z.templateCategory)&&void 0!==V?V:""}`:"",onBackPress:()=>{null==y||y()}},{children:[e(p,{showVariableMapping:b,channel:v,whatsappSpecificPickerMeta:P,showVariableModal:C,variableList:L}),S?e(m,{onSelect:function(){const e=null==S?void 0:S(z,F,null!=I?I:"");e?D(!!e):N(!0)}}):e(t,{})]}))}))};export{h as TemplateContextMapper};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.279-beta.11",
3
+ "version": "0.0.279-beta.12",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",