@bikdotai/bik-component-library 0.0.308 → 0.0.310
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/PlusIcon.d.ts +9 -0
- package/dist/cjs/assets/icons/PlusIcon.js +1 -0
- package/dist/cjs/components/add-variableV2/AddVariableBox.styled.d.ts +3 -0
- package/dist/cjs/components/add-variableV2/AddVariableBox.styled.js +25 -0
- package/dist/cjs/components/add-variableV2/AddVariableV2.d.ts +4 -0
- package/dist/cjs/components/add-variableV2/AddVariableV2.js +1 -1
- package/dist/cjs/components/add-variableV2/AddVariableV2SideModal.d.ts +3 -0
- package/dist/cjs/components/add-variableV2/AddVariableV2SideModal.js +1 -1
- package/dist/cjs/components/add-variableV2/types.d.ts +6 -0
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/cjs/components/bik-layout/BikLayout.d.ts +1 -0
- package/dist/cjs/components/bik-layout/BikLayout.js +1 -1
- package/dist/cjs/components/bik-layout/CommonStyles.d.ts +2 -0
- package/dist/cjs/components/bik-layout/CommonStyles.js +1 -1
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/cjs/components/input/Input.d.ts +3 -5
- package/dist/cjs/components/input/Input.js +1 -1
- package/dist/cjs/components/input-with-vars/InputWithVariables.d.ts +10 -0
- package/dist/cjs/components/input-with-vars/InputWithVariables.js +6 -0
- package/dist/cjs/components/input-with-vars/index.d.ts +1 -0
- package/dist/cjs/components/plans/SubscriptionPlan.d.ts +1 -0
- package/dist/cjs/components/plans/SubscriptionPlan.js +1 -1
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/esm/assets/icons/PlusIcon.d.ts +9 -0
- package/dist/esm/assets/icons/PlusIcon.js +1 -0
- package/dist/esm/components/add-variableV2/AddVariableBox.styled.d.ts +3 -0
- package/dist/esm/components/add-variableV2/AddVariableBox.styled.js +25 -0
- package/dist/esm/components/add-variableV2/AddVariableV2.d.ts +4 -0
- package/dist/esm/components/add-variableV2/AddVariableV2.js +1 -1
- package/dist/esm/components/add-variableV2/AddVariableV2SideModal.d.ts +3 -0
- package/dist/esm/components/add-variableV2/AddVariableV2SideModal.js +1 -1
- package/dist/esm/components/add-variableV2/types.d.ts +6 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/esm/components/bik-layout/BikLayout.d.ts +1 -0
- package/dist/esm/components/bik-layout/BikLayout.js +1 -1
- package/dist/esm/components/bik-layout/CommonStyles.d.ts +2 -0
- package/dist/esm/components/bik-layout/CommonStyles.js +1 -1
- package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/esm/components/input/Input.d.ts +3 -5
- package/dist/esm/components/input/Input.js +1 -1
- package/dist/esm/components/input-with-vars/InputWithVariables.d.ts +10 -0
- package/dist/esm/components/input-with-vars/InputWithVariables.js +6 -0
- package/dist/esm/components/input-with-vars/index.d.ts +1 -0
- package/dist/esm/components/plans/SubscriptionPlan.d.ts +1 -0
- package/dist/esm/components/plans/SubscriptionPlan.js +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -1
- package/package.json +4 -2
|
@@ -37,7 +37,7 @@ export interface InputProps {
|
|
|
37
37
|
value?: string;
|
|
38
38
|
reset?: boolean;
|
|
39
39
|
onBlur?: (e: any) => void;
|
|
40
|
-
onFocus?: () => void;
|
|
40
|
+
onFocus?: (e: any) => void;
|
|
41
41
|
isActive?: boolean;
|
|
42
42
|
id?: string;
|
|
43
43
|
onReferenceInit?: (element: HTMLInputElement | HTMLTextAreaElement) => void;
|
|
@@ -48,8 +48,6 @@ export interface InputProps {
|
|
|
48
48
|
noKeyDownChange?: boolean;
|
|
49
49
|
skipFocus?: boolean;
|
|
50
50
|
version?: '1.0' | '2.0';
|
|
51
|
+
textControl?: boolean;
|
|
51
52
|
}
|
|
52
|
-
export declare const Input:
|
|
53
|
-
(props: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
-
displayName: string;
|
|
55
|
-
};
|
|
53
|
+
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement | null>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("../button/Button.js"),i=require("./Input-helper.js"),r=require("../TypographyStyle.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("../button/Button.js"),i=require("./Input-helper.js"),r=require("../TypographyStyle.js"),l=require("../../assets/icons/errorInfo.svg.js"),s=require("./context/InputStyleProvider.js"),o=require("./Input.styled.js");const a=t.forwardRef(((a,u)=>{var c,d,v,h,x;const{placeholder:p,leftIcon:f,rightIcon:j,labelText:g,maxCharLimit:y,isRequired:I,hintText:b,type:C,state:m,validate:S,variant:w,button:E,suffixText:O,prefixText:q,onChangeText:F,value:k,noErrorHint:H,reset:T,rangeValidation:B,noKeyDownChange:M,version:R}=Object.assign({maxCharLimit:0,type:"text",variant:"default"},a),A=null==f?void 0:f.icon,L=null==j?void 0:j.icon,[z,D]=t.useState(!1),[K,P]=t.useState(!1),[W,_]=t.useState(),N="small"===w?"18px":"22px",V=t.useContext(s.InputStyleContext),[G,J]=t.useState(),Q=t.useRef(null),U=null!=u?u:Q;t.useEffect((()=>{J(k)}),[k]),t.useEffect((()=>{var e;U.current&&(null===(e=a.onReferenceInit)||void 0===e||e.call(a,U.current))}),[U]),t.useEffect((()=>{T&&J("")}),[T]),t.useEffect((()=>{var e;P(!!a.isActive),a.isActive&&(null===(e=U.current)||void 0===e||e.focus())}),[a.isActive]),t.useEffect((()=>{_(a.errorMessage)}),[a.errorMessage]),t.useEffect((()=>{var e;D(!1),("invalid"===a.state||W)&&D(!0),"active"===a.state&&(null===(e=U.current)||void 0===e||e.focus())}),[a.state,W]),t.useEffect((()=>{D(!!W)}),[W]);const X=function(e){if(i.isFunction(e)){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];e(...n)}},Y=e=>{const t=y||("zip"===C?6:60);M||F(k||"",e),![8].includes(e.which)&&t>0&&e.target.value.length===t&&e.preventDefault()},Z=e=>{const t=e.target.value;F(t,e),a.textControl||J(t);const n=S||i.validateInput;if(!n||!i.isFunction(n))return;const[r,l]=n(t,C,B);D(!r),_(a.errorMessage?a.errorMessage:l)},$=e=>{var t;a.skipFocus||P(!0),X(null===(t=a.onFocus)||void 0===t?void 0:t.call(a,e))},ee=e=>{var t;a.skipFocus||P(!1),X(null===(t=a.onBlur)||void 0===t?void 0:t.call(a,e))},te=()=>{var t;return e.jsxs(e.Fragment,{children:["multiline"!==C&&e.jsx("input",{id:a.id,style:null!==(t=null==V?void 0:V.input)&&void 0!==t?t:{},ref:U,type:["phonenumber","zip","number"].includes(C)?"number":C,value:G,onFocus:e=>$(e),onBlur:e=>ee(e),placeholder:p||"Enter here",onChange:Z,onKeyDown:e=>Y(e)}),"multiline"===C&&e.jsx("textarea",{value:G,ref:U,onFocus:e=>$(e),onBlur:e=>ee(e),placeholder:p||"Enter here",onChange:Z,onKeyDown:e=>Y(e),maxLength:y>0?y:void 0})]})};return e.jsxs(o.RootContainer,Object.assign({width:a.width,height:a.height,state:m,type:C,style:null!==(c=null==V?void 0:V.RootContainer)&&void 0!==c?c:{}},{children:[!H&&(!!b||!!W)&&e.jsxs(o.InputFooter,Object.assign({invalid:!!W},{children:[!!W&&e.jsx(l.default,{width:16,height:16}),W||b]})),e.jsxs(o.InputWrapper,Object.assign({variant:w,state:m,width:a.width,isActive:"active"===m||K,isInvalid:z,style:null!==(d=null==V?void 0:V.InputWrapper)&&void 0!==d?d:{},version:R},{children:[!!A&&e.jsx(o.IconHolder,Object.assign({variant:w,iconSize:N,onClick:()=>X(null==f?void 0:f.callback),isLeft:!0,style:null!==(v=null==V?void 0:V.IconHolder)&&void 0!==v?v:{}},{children:e.jsx(A,{})})),!!q&&e.jsx(o.PrefixHolder,Object.assign({variant:w},{children:q})),"default"===w&&e.jsx(o.InputContainer,{children:te()}),"small"===w&&e.jsx(o.InputContainerSmall,{children:te()}),!!L&&e.jsx(o.IconHolder,Object.assign({variant:w,iconSize:N,onClick:()=>X(null==j?void 0:j.callback),isLeft:!1},{children:e.jsx(L,{})})),!!O&&e.jsx(o.SuffixHolder,Object.assign({variant:w},{children:O})),E&&E.text&&e.jsx(n.Button,{buttonText:E.text,onClick:()=>X(null==E?void 0:E.onClick)})]})),(!!g||!!y)&&e.jsxs(o.InputHeader,Object.assign({invalid:z},{children:[e.jsxs(r.BodySecondary,{children:[g,I?e.jsx("span",{children:"*"}):""]}),y>0&&e.jsxs(o.MaxCharStyle,{children:[null!==(x=null===(h=a.value)||void 0===h?void 0:h.length)&&void 0!==x?x:0,"/",y]})]}))]}))}));a.displayName="Input",exports.Input=a;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SelectedVariable } from "../add-variableV2/types";
|
|
2
|
+
export declare const InputWithVariables: (props: {
|
|
3
|
+
variablesList: any;
|
|
4
|
+
onChange: (val: SelectedVariable) => void;
|
|
5
|
+
addVarBoxRight: string;
|
|
6
|
+
allowMix: boolean;
|
|
7
|
+
prevVariable: SelectedVariable;
|
|
8
|
+
showHelp?: boolean | undefined;
|
|
9
|
+
onlyVariables?: boolean | undefined;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=require("react"),l=require("uuid"),r=require("styled-components"),i=require("../input/Input.js"),t=require("../TypographyStyle.js"),s=require("../../constants/Theme.js"),d=require("../../assets/icons/PlusIcon.js"),u=require("../add-variableV2/AddVariableBox.styled.js"),n=require("../add-variableV2/AddVariableV2.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const c=o(r).default.div`
|
|
2
|
+
margin-bottom: 32px;
|
|
3
|
+
input {
|
|
4
|
+
color: ${e=>e.isVar?s.COLORS.stroke.brand:"black"}
|
|
5
|
+
}
|
|
6
|
+
`;exports.InputWithVariables=r=>{const s=a.useRef(null),[o,v]=a.useState(!1),[b]=a.useState(l.v4()),[p,V]=a.useState(),[g,h]=a.useState(r.prevVariable),[j,x]=a.useState(!1),[T,y]=a.useState(!1);return a.useEffect((()=>{p&&p.actualValue&&(r.allowMix?h((e=>({actualValue:e.actualValue+p.actualValue,variableType:"string"}))):h((e=>({actualValue:p.actualValue,variableType:p.variableType,needsFetching:p.needsFetching}))))}),[p]),a.useEffect((()=>{r.onChange(g)}),[g]),e.jsxs(c,Object.assign({isVar:/^{{.*}}$/.test(g.actualValue)},{children:[e.jsx(i.Input,{id:b,ref:s,skipFocus:!0,textControl:!0,isActive:o,value:g.actualValue,validate:e=>[!0,""],errorMessage:"",placeholder:"Add a value",onChangeText:function(e,a){r.onlyVariables||(r.allowMix?h({actualValue:e,variableType:"string"}):h({actualValue:e.replace(/{{.*}}/,""),variableType:"string"}))},onReferenceInit:()=>{},onFocus:e=>{var a;v(!0),y(!0),"Search..."!==(null===(a=e.relatedTarget)||void 0===a?void 0:a.placeholder)||j||x(!0)},onBlur:e=>{var a,l,r,i,t,d,u;"addVar"===(null===(a=e.relatedTarget)||void 0===a?void 0:a.id)||"varList"===(null===(l=e.relatedTarget)||void 0===l?void 0:l.id)||(null===(i=null===(r=e.relatedTarget)||void 0===r?void 0:r.className)||void 0===i?void 0:i.includes("exlualr0"))||(null===(d=null===(t=e.relatedTarget)||void 0===t?void 0:t.className)||void 0===d?void 0:d.includes("sc-dZoequ "))?(s.current&&s.current.focus(),v(!0)):"Search..."===(null===(u=e.relatedTarget)||void 0===u?void 0:u.placeholder)?v(!0):(v(!1),x(!1),y(!1))}}),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"space-between"}},{children:[g.actualValue&&r.showHelp?e.jsx("div",Object.assign({style:{marginTop:4}},{children:e.jsx(t.BodyCaption,{children:`This value is of type ${g.variableType}`})})):e.jsx("div",{}),T&&e.jsx(u.AddVariableStyled,Object.assign({right:r.addVarBoxRight,id:"addVar",onClick:()=>{x(!j)}},{children:e.jsxs("div",Object.assign({className:"add"},{children:[e.jsx(d.default,{color:"white"}),e.jsx("div",Object.assign({className:"variable"},{children:"Add variable"}))]}))}))]})),j&&e.jsx(n.AddVariableV2,{data:r.variablesList,showVariable:!0,setShowVariable:()=>{x(!1)},variableValue:p,setVariableValue:V,placeholder:"",pickerSize:"large",enableVariable:!0,selectWithTypes:!0,onSearchBlur:e=>{var a,l,r,i,t,d;"varList"===(null===(a=e.relatedTarget)||void 0===a?void 0:a.id)||(null===(r=null===(l=e.relatedTarget)||void 0===l?void 0:l.className)||void 0===r?void 0:r.includes("exlualr0"))||(null===(t=null===(i=e.relatedTarget)||void 0===i?void 0:i.className)||void 0===t?void 0:t.includes("sc-dZoequ "))?s.current.focus():"Enter here"===(null===(d=e.relatedTarget)||void 0===d?void 0:d.placeholder)?e.relatedTarget.id!==b&&(x(!1),y(!1),v(!1)):(x(!1),y(!1),v(!1))}})]}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './InputWithVariables';
|
|
@@ -27,6 +27,7 @@ export interface SubscriptionPlanProps {
|
|
|
27
27
|
showMonthlyOptions?: boolean;
|
|
28
28
|
oldPrice?: number;
|
|
29
29
|
currency?: string;
|
|
30
|
+
annualFeatures?: PlanFeature[];
|
|
30
31
|
}
|
|
31
32
|
type Props = SubscriptionPlanProps;
|
|
32
33
|
export declare const SubscriptionPlan: FunctionComponent<Props>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../assets/icons/check.svg.js"),t=require("../button/Button.js"),i=require("./SubscriptionPlanStyled.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../assets/icons/check.svg.js"),t=require("../button/Button.js"),i=require("./SubscriptionPlanStyled.js"),n=require("../TypographyStyle.js"),a=require("../../hooks/useCurreny.js"),r=require("../../constants/Theme.js");exports.SubscriptionPlan=c=>{const{formatCurrency:l}=a.useCurrency(),o=c.showMonthlyOptions?c.features:c.annualFeatures||[],d=c.showMonthlyOptions?c.monthlyPlan:c.yearlyPlan,j=!c.isDisabled&&c.isMostPopular,u=e=>0==e?"$0":l(e,"USD");return e.jsxs(i.SubscriptionPlanStyled,Object.assign({isManifestPlan:!0,isSelected:c.isSelected||!1,style:{marginTop:j?0:24}},{children:[j&&e.jsx("div",Object.assign({className:"most-popular"},{children:e.jsx(n.Caption,Object.assign({className:"text"},{children:"Most popular ⭐️"}))})),e.jsxs("div",Object.assign({className:`box ${c.isSelected?"selected":""} ${c.isDisabled?"disabled":""} ${j?"":"rounded-corners"}\n\t\t\t\t`},{children:[e.jsxs("div",{children:[e.jsx(n.TitleRegular,Object.assign({style:{color:r.COLORS.content.secondary,marginBottom:4}},{children:c.planName})),e.jsxs("div",Object.assign({className:"price-block"},{children:[c.oldPrice?e.jsx(n.BodyCaption,Object.assign({className:"old--price"},{children:u(d.price)})):e.jsx(e.Fragment,{}),e.jsx(n.TitleMedium,Object.assign({style:{color:r.COLORS.content.primary}},{children:c.oldPrice?u(c.oldPrice):u(d.price)})),e.jsxs(n.BodyPrimary,Object.assign({style:{color:r.COLORS.content.secondary,marginLeft:4}},{children:["/ ",c.showMonthlyOptions?"month":"year"]}))]})),e.jsxs("div",Object.assign({className:"per-message-price"},{children:[e.jsx(n.BodyCaption,Object.assign({style:{color:r.COLORS.content.secondary}},{children:c.planDescription})),e.jsx(n.BodyCaption,Object.assign({style:{color:r.COLORS.background.positive.vibrant,marginLeft:4}},{children:c.planDescriptionDiscount}))]})),c.showTrialOptions&&e.jsxs(n.Caption,Object.assign({className:"trial "+(c.isSelected?"selected":"")},{children:["7 day free trial with ",c.freeTrialMessages," messages"]})),c.extraBlockMessage&&e.jsx(n.Caption,Object.assign({className:"trial "+(c.isSelected?"selected":"")},{children:c.extraBlockMessage})),e.jsx("div",Object.assign({className:"features"},{children:o.map(((t,i)=>e.jsxs("div",Object.assign({className:"feature"},{children:[e.jsx("div",{children:e.jsx(s.default,{height:12,width:12,color:r.COLORS.content.primary})}),e.jsx(n.BodyCaption,Object.assign({className:"feature-text"},{children:t.detail}),i)]}),t.detail)))}))]}),e.jsx("div",Object.assign({className:"button-box"},{children:c.isLoading?e.jsx(t.Button,{isLoading:!0,buttonType:"primary",buttonText:"Selected Plan",size:"medium",matchParentWidth:!0}):e.jsxs(e.Fragment,{children:[c.isSelected&&e.jsx(t.Button,{LeadingIcon:s.default,buttonType:"tertiary",size:"medium",matchParentWidth:!0,buttonText:"Selected Plan",disabled:!1}),c.isDisabled&&e.jsx(t.Button,{disabled:!0,buttonType:"primary",size:"medium",matchParentWidth:!0,buttonText:"Choose plan"}),!c.isSelected&&!c.isDisabled&&e.jsx(t.Button,{buttonType:"primary",size:"medium",onClick:()=>c.onPlanSelect(c.code),matchParentWidth:!0,buttonText:"Choose plan"})]})}))]})),c.bottomDescription&&e.jsx("div",Object.assign({className:`plan-bottom-information\n\t\t\t\t\t${c.isDisabled?"disabled":""}\n\t\t\t\t\t${c.isSelected?"selected":""}\n\t\t\t\t`},{children:e.jsx(n.Caption,Object.assign({className:"text",style:{color:r.COLORS.background.inverse}},{children:c.bottomDescription}))}))]}))};
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -69,5 +69,6 @@ export * from './components/keywords-input';
|
|
|
69
69
|
export * from './components/add-variableV2';
|
|
70
70
|
export * from './components/navigation-hyperlink';
|
|
71
71
|
export * from './components/SearchFilter';
|
|
72
|
+
export * from './components/input-with-vars';
|
|
72
73
|
export * from './components/dashboard-review-popup';
|
|
73
74
|
export * from './components/star-rating';
|
package/dist/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./components/template-preview/constants/regexPatterns.js"),r=require("./utils/StringUtils.js"),t=require("./constants/Theme.js"),o=require("./constants/zindex.js"),n=require("./components/checkBox/CheckBox.js"),i=require("./components/list-item/ListItem.js"),p=require("./components/pagination/Pagination.js"),a=require("./components/radioButton/RadioButton.js"),s=require("./components/toaster/Toaster.js"),u=require("./components/tooltips/Tooltip.js"),c=require("./components/spinner/Spinner.js"),d=require("./components/stepper/Stepper.js"),l=require("./components/tag/Tag.js"),m=require("./components/icon-button/IconButton.js"),T=require("./components/template-preview/TemplatePreview.js"),x=require("./components/template-preview/WhatsApp/WhatsAppLikePreview.js"),S=require("./components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),P=require("./components/template-preview/helpers/SmsTemplateHelper.js"),A=require("./components/template-preview/helpers/WhatsAppFormatToHTML.js"),y=require("./components/template-preview/helpers/VariableEditorHelper.js"),C=require("./components/template-preview/models/TemplateMeta.js"),O=require("./components/template-context-mapper/TemplateContextMapper.js"),E=require("./components/template-context-mapper/utils/getDataFromTemplateComponent.js"),b=require("./components/template-context-mapper/utils/validateIsUrl.js"),R=require("./components/fab-menu/FABMenu.js"),j=require("./components/floating-action-button/FloatingActionButton.js"),h=require("./components/floating-action-button/FloatingActionButton.styles.js"),B=require("./components/image-compress/ImageCompress.js"),_=require("./components/TypographyStyle.js"),g=require("./components/button/Button.js"),I=require("./components/progress-bar/ProgressBarComponent.js"),q=require("./components/QueryBuilder/QueryBuilder.js"),f=require("./components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),D=require("./components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js"),k=require("./components/QueryBuilder/redux/queryBuilder.reducer.js"),N=require("./components/QueryBuilder/redux/queryBuilderCache.reducer.js"),L=require("./components/QueryBuilder/types/QueryBuilderOperator.type.js"),M=require("./components/modals/styledModal.js"),w=require("./components/dropdown/DropdownPopover/index.js"),G=require("./components/dropdown/Dropdown.js"),U=require("./components/dropdown/ChipDropdown.js"),V=require("./components/dropdown/OpenedDropdown/components/OpennedDropdown.js"),v=require("./components/dropdown/MenuItem/MenuItem.js"),H=require("./components/analytics-card/AnalyticsCard.js"),F=require("./components/analytics-card/AnalyticsCard.styled.js"),W=require("./components/input/Input.js"),Y=require("./components/analytics-chips-and-dropdowns/AnalyticsChip.js"),Q=require("./components/analytics-chips-and-dropdowns/AnalyticsDropdown.js"),K=require("./components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js"),Z=require("./components/analytics-chips-and-dropdowns/AnalyticsMetric.js"),z=require("./components/analytics-chips-and-dropdowns/AnalyticsTrend.js"),X=require("./components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js"),J=require("./components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js"),$=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js"),ee=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js"),re=require("./components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js"),te=require("./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js"),oe=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js"),ne=require("./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js"),ie=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js"),pe=require("./components/avatar/Avatar.js"),ae=require("./components/avatar/AvatarHelper.js"),se=require("./components/alerts/Alert.js"),ue=require("./components/alerts/AlertHelper.js"),ce=require("./components/thumbnail/Thumbnail.js"),de=require("./components/curtain/Curtain.js"),le=require("./components/datePicker/DatePicker.js"),me=require("./components/switch/Switch.js"),Te=require("./components/plans/SubscriptionPlan.js"),xe=require("./components/plans/SubscriptionPlanSelector.js"),Se=require("./components/tabs/Tabs.js"),Pe=require("./components/dynamic-tabs/DynamicTabs.js"),Ae=require("./components/shimmer/ShimmerComponent/BikShimmer.js"),ye=require("./components/TablePagination/TablePagination.js"),Ce=require("./components/TablePagination/TablePaginationCard.js"),Oe=require("./components/states-modal/StateModalComponent.js"),Ee=require("./components/states-modal/DeleteConfirmationModal.js"),be=require("./components/states/StateComponent.js"),Re=require("./components/states/ShopifyScopeWrapper.js"),je=require("./components/WhatsAppTextEditor/WhatsAppTextEditor.js"),he=require("./components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js"),Be=require("./helpers/BaseWhatsappContentLang.helper.js"),_e=require("./components/card-selection-modal/CardSelectionModal.js"),ge=require("./components/image-cropper/BikImageCropper.js"),Ie=require("./components/image-cropper/BikImagePipeline/BikImagePipeline.js"),qe=require("./components/buttonGroup/ButtonGroup.js"),fe=require("./components/accordion/Accordion.js"),De=require("./components/file-uploader/FileUploader.js"),ke=require("./components/colourInput/ColourInput.js"),Ne=require("./components/bik-layout/BikHeader.js"),Le=require("./components/bik-layout/BikLayout.js"),Me=require("./components/bik-layout/BikProfile.js"),we=require("./components/bik-layout/SimpleSidebar.js"),Ge=require("./components/bik-layout/BikSidebar.js"),Ue=require("./components/bik-layout/FeatureModal.js"),Ve=require("./components/bik-layout/SidebarSkeleton.js"),ve=require("./components/searchBar/searchBar.js"),He=require("./components/custom-date-time/CustomDateTime.js"),Fe=require("./components/product-picker/ProductPickerModal.js"),We=require("./components/discount-modal/DiscountModal.js"),Ye=require("./components/discount-modal/CouponExpiration/CouponExpiration.js"),Qe=require("./components/discount-modal/type.js"),Ke=require("./components/country-code-picker/CountryCodePicker.js"),Ze=require("./components/country-code-picker/CountryCodePicker.modal.js"),ze=require("./components/shimmer-image/ShimmerImage.js"),Xe=require("./components/product-picker-v2/modal.js"),Je=require("./components/carousel/carousel.js"),$e=require("./components/carousel-secondary/CarouselSecondary.js"),er=require("./components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js"),rr=require("./components/radioList/RadioList.js"),tr=require("./components/checkList/CheckList.js"),or=require("./components/postPicker/postPicker.js"),nr=require("./components/dropdown-button/DropdownButton.js"),ir=require("./components/side-modal/SideModal.js"),pr=require("./components/keywords-input/KeywordsInput.js"),ar=require("./components/add-variableV2/AddVariableV2SideModal.js"),sr=require("./components/add-variableV2/AddVariableV2.js"),ur=require("./components/navigation-hyperlink/NavigationHyperlink.js"),cr=require("./components/SearchFilter/index.js"),dr=require("./components/dashboard-review-popup/DashboardReviewPopUp.js"),lr=require("./components/star-rating/StarRating.js");exports.regexPatterns=e,exports.StringUtils=r.default,exports.BASE_COLORS=t.BASE_COLORS,exports.COLORS=t.COLORS,exports.DEFAULT_THEME=t.DEFAULT_THEME,exports.FONTS=t.FONTS,exports.ComponentZindex=o.ComponentZindex,exports.CheckBox=n.CheckBox,exports.ListItem=i.ListItem,exports.Pagination=p.Pagination,exports.RadioButton=a.RadioButton,exports.Toaster=s.Toaster,exports.Tooltip=u.Tooltip,exports.Spinner=c.Spinner,exports.Stepper=d.Stepper,exports.Tag=l.Tag,exports.IconButton=m.IconButton,exports.TemplatePreview=T.TemplatePreview,exports.WhatsappLikePreview=x.WhatsappLikePreview,exports.WhatsappLikePreviewV2=S.WhatsappLikePreviewV2,exports.renderVariableUIForPreview=P.renderVariableUIForPreview,exports.WhatsAppFormatToHTML=A.WhatsAppFormatToHTML,exports.VariableEditorHelper=y.VariableEditorHelper,Object.defineProperty(exports,"ACTIONS_TYPES",{enumerable:!0,get:function(){return C.ACTIONS_TYPES}}),exports.CUSTOM_URL_NAME=C.CUSTOM_URL_NAME,Object.defineProperty(exports,"HEADER_TYPES",{enumerable:!0,get:function(){return C.HEADER_TYPES}}),Object.defineProperty(exports,"TEMPLATE_EDITOR",{enumerable:!0,get:function(){return C.TEMPLATE_EDITOR}}),Object.defineProperty(exports,"TEMPLATE_STATUS",{enumerable:!0,get:function(){return C.TEMPLATE_STATUS}}),exports.TemplateContextMapper=O.TemplateContextMapper,exports.getAllDataFromTemplateComponent=E.getAllDataFromTemplateComponent,exports.validateIsUrl=b.validateIsUrl,exports.FABMenu=R.FABMenu,exports.FloatingActionButton=j.FloatingActionButton,Object.defineProperty(exports,"DROP_POSITION",{enumerable:!0,get:function(){return h.DROP_POSITION}}),exports.DropdownToggleContainer=h.DropdownToggleContainer,Object.defineProperty(exports,"FAB_POSITION",{enumerable:!0,get:function(){return h.FAB_POSITION}}),exports.FloatingActionButtonContainer=h.FloatingActionButtonContainer,exports.FloatingActionButtonOuterContainer=h.FloatingActionButtonOuterContainer,Object.defineProperty(exports,"MENU_ALIGNMENT",{enumerable:!0,get:function(){return h.MENU_ALIGNMENT}}),exports.StyledDropdown=h.StyledDropdown,exports.TooltipStyled=h.TooltipStyled,exports.ImageService=B.ImageService,exports.BodyCaption=_.BodyCaption,exports.BodyLarge=_.BodyLarge,exports.BodyPrimary=_.BodyPrimary,exports.BodyPrimaryLink=_.BodyPrimaryLink,exports.BodyRegular=_.BodyRegular,exports.BodySecondary=_.BodySecondary,exports.BodySecondaryLink=_.BodySecondaryLink,exports.BodyTiny=_.BodyTiny,exports.ButtonLarge=_.ButtonLarge,exports.ButtonRegular=_.ButtonRegular,exports.Caption=_.Caption,exports.Display=_.Display,exports.SmallRegular=_.SmallRegular,exports.SubHeading=_.SubHeading,exports.TitleLarge=_.TitleLarge,exports.TitleMedium=_.TitleMedium,exports.TitleRegular=_.TitleRegular,exports.TitleSmall=_.TitleSmall,exports.Button=g.Button,exports.ProgressBarComponent=I.ProgressBarComponent,exports.ProgressCompletedBar=I.ProgressCompletedBar,exports.QueryBuilder=q.QueryBuilder,exports.BaseQueryBuilderNode=f.BaseQueryBuilderNode,exports.PropertyNode=D.PropertyNode,exports.PropertyNodeHeadless=D.PropertyNodeHeadless,exports.queryBuilderSlice=k.queryBuilderSlice,exports.queryBuilderCacheSlice=N.queryBuilderCacheSlice,Object.defineProperty(exports,"AD_STRING_OPERATORS",{enumerable:!0,get:function(){return L.AD_STRING_OPERATORS}}),Object.defineProperty(exports,"ANY_AD_OPERATORS",{enumerable:!0,get:function(){return L.ANY_AD_OPERATORS}}),Object.defineProperty(exports,"ANY_IG_OPERATORS",{enumerable:!0,get:function(){return L.ANY_IG_OPERATORS}}),Object.defineProperty(exports,"BOOLEAN_OPERATORS",{enumerable:!0,get:function(){return L.BOOLEAN_OPERATORS}}),Object.defineProperty(exports,"DATE_OPERATORS",{enumerable:!0,get:function(){return L.DATE_OPERATORS}}),Object.defineProperty(exports,"EVENT_VALUES",{enumerable:!0,get:function(){return L.EVENT_VALUES}}),Object.defineProperty(exports,"FREQUENCY_OPERATORS",{enumerable:!0,get:function(){return L.FREQUENCY_OPERATORS}}),Object.defineProperty(exports,"ICE_BREAKER_OPERATORS",{enumerable:!0,get:function(){return L.ICE_BREAKER_OPERATORS}}),Object.defineProperty(exports,"IG_STRING_OPERATORS",{enumerable:!0,get:function(){return L.IG_STRING_OPERATORS}}),Object.defineProperty(exports,"INTEGER_OPERATORS",{enumerable:!0,get:function(){return L.INTEGER_OPERATORS}}),Object.defineProperty(exports,"MAIL_SUBJECT_OPERATORS",{enumerable:!0,get:function(){return L.MAIL_SUBJECT_OPERATORS}}),Object.defineProperty(exports,"REACTION_OPERATORS",{enumerable:!0,get:function(){return L.REACTION_OPERATORS}}),Object.defineProperty(exports,"SPECIFIC_IG_OPERATORS",{enumerable:!0,get:function(){return L.SPECIFIC_IG_OPERATORS}}),Object.defineProperty(exports,"STRING_OPERATORS",{enumerable:!0,get:function(){return L.STRING_OPERATORS}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS",{enumerable:!0,get:function(){return L.STRING_RESTRICTED_OPERATORS}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS_2",{enumerable:!0,get:function(){return L.STRING_RESTRICTED_OPERATORS_2}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS_3",{enumerable:!0,get:function(){return L.STRING_RESTRICTED_OPERATORS_3}}),exports.StyledModal=M.StyledModal,exports.DropdownPopover=w.DropdownPopover,exports.Dropdown=G.Dropdown,exports.ChipDropdown=U.ChipDropdown,exports.OpenedDropdown=V.OpenedDropdown,exports.MenuItemDropdown=v.MenuItemDropdown,exports.AnalyticsCard=H.AnalyticsCard,exports.AnalyticsContainer=F.AnalyticsContainer,exports.CardDataContainer=F.CardDataContainer,exports.Input=W.Input,exports.AnalyticsChip=Y.AnalyticsChip,exports.AnalyticsDropdown=Q.AnalyticsDropdown,exports.EachItem=Q.EachItem,exports.formatDate=Q.formatDate,exports.AnalyticsMultiChip=K.AnalyticsMultiChip,exports.AnalyticsMetric=Z.AnalyticsMetric,exports.AnalyticsTrend=z.AnalyticsTrend,exports.LineChart=X.LineChart,exports.LinearChipGroupedChart=J.LinearChipGroupedChart,exports.Card=$.Card,exports.PieChartAnalytics=$.PieChartAnalytics,exports.PieChart=ee.PieChart,exports.HorizontalGraph=re.HorizontalGraph,exports.StackedBarChart=te.StackedBarChart,exports.VerticalGraph=oe.VerticalGraph,Object.defineProperty(exports,"HEAT",{enumerable:!0,get:function(){return ne.HEAT}}),exports.HEAT_COLORS=ne.HEAT_COLORS,Object.defineProperty(exports,"HEAT_GRADING_TYPE",{enumerable:!0,get:function(){return ne.HEAT_GRADING_TYPE}}),exports.HeatMap=ne.HeatMap,exports.VerticalBarAndLinearGraph=ie.VerticalBarAndLinearGraph,exports.AVATAR_SIZE_VS_ICON_SIZE_MAP=pe.AVATAR_SIZE_VS_ICON_SIZE_MAP,exports.Avatar=pe.Avatar,exports.BACKGROUND_VS_TEXT_COLOR_MAP=pe.BACKGROUND_VS_TEXT_COLOR_MAP,Object.defineProperty(exports,"AVATAR_BACKGROUND",{enumerable:!0,get:function(){return ae.AVATAR_BACKGROUND}}),exports.AVATAR_SIZE_MAP=ae.AVATAR_SIZE_MAP,Object.defineProperty(exports,"AVATAR_TYPES",{enumerable:!0,get:function(){return ae.AVATAR_TYPES}}),Object.defineProperty(exports,"SIZE",{enumerable:!0,get:function(){return ae.SIZE}}),exports.Alert=se.Alert,Object.defineProperty(exports,"ALERT_TYPES",{enumerable:!0,get:function(){return ue.ALERT_TYPES}}),exports.COLOR_CONFIG_MAP=ue.COLOR_CONFIG_MAP,Object.defineProperty(exports,"RATIO",{enumerable:!0,get:function(){return ce.RATIO}}),exports.Thumbnail=ce.Thumbnail,exports.Curtain=de.Curtain,exports.DatePicker=le.DatePicker,exports.Loader=me.Loader,exports.Switch=me.Switch,exports.SwitchContainer=me.SwitchContainer,exports.Thumb=me.Thumb,exports.SubscriptionPlan=Te.SubscriptionPlan,exports.BottomWrapper=xe.BottomWrapper,exports.HeaderWrapper=xe.HeaderWrapper,exports.SubscriptionPlanSelector=xe.SubscriptionPlanSelector,exports.defaultTabs=xe.defaultTabs,exports.TabItemComponent=Se.TabItemComponent,exports.Tabs=Se.Tabs,exports.DynamicTabs=Pe.DynamicTabs,exports.BikShimmer=Ae.BikShimmer,exports.TablePagination=ye.TablePagination,exports.TablePaginationCard=Ce.TablePaginationCard,exports.TablePaginationCardStyled=Ce.TablePaginationCardStyled,exports.StateModalComponent=Oe.StateModalComponent,exports.DeleteConfirmationModal=Ee.DeleteConfirmationModal,Object.defineProperty(exports,"ButtonActions",{enumerable:!0,get:function(){return be.ButtonActions}}),Object.defineProperty(exports,"ButtonTypes",{enumerable:!0,get:function(){return be.ButtonTypes}}),exports.StateComponent=be.StateComponent,Object.defineProperty(exports,"StateInterface",{enumerable:!0,get:function(){return be.StateInterface}}),exports.ShopifyScopeWrapper=Re.ShopifyScopeWrapper,exports.WhatsAppTextEditor=je.WhatsAppTextEditor,Object.defineProperty(exports,"EditorActionTypes",{enumerable:!0,get:function(){return he.EditorActionTypes}}),exports.WhatsAppTextEditorHeader=he.WhatsAppTextEditorHeader,exports.BaseWhatsappContentLangHelper=Be.BaseWhatsappContentLangHelper,exports.CardSelectionModal=_e.CardSelectionModal,exports.BikImageCropper=ge.BikImageCropper,exports.BikImagePipeline=Ie.BikImagePipeline,exports.ButtonGroup=qe.ButtonGroup,exports.BikAccordion=fe.BikAccordion,exports.FileUploader=De.FileUploader,exports.ColourInput=ke.ColourInput,exports.BikHeader=Ne.BikHeader,exports.BikLayout=Le.BikLayout,exports.BikProfile=Me.BikProfile,exports.SimpleSidebar=we.SimpleSidebar,exports.BikSidebar=Ge.BikSidebar,exports.FeatureModal=Ue.FeatureModal,exports.SidebarSkeleton=Ve.SidebarSkeleton,exports.SearchBar=ve.SearchBar,exports.CustomDateTime=He.CustomDateTime,exports.PricePleaseProductPicker=Fe.PricePleaseProductPicker,exports.ProductPickerContent=Fe.ProductPickerContent,exports.DiscountModal=We.DiscountModal,Object.defineProperty(exports,"COUPON_EXPIRATION",{enumerable:!0,get:function(){return Ye.COUPON_EXPIRATION}}),exports.CouponExpiration=Ye.CouponExpiration,Object.defineProperty(exports,"DISCOUNT_TARGET_SELECTION",{enumerable:!0,get:function(){return Qe.DISCOUNT_TARGET_SELECTION}}),Object.defineProperty(exports,"DISCOUNT_TARGET_TYPES",{enumerable:!0,get:function(){return Qe.DISCOUNT_TARGET_TYPES}}),Object.defineProperty(exports,"DISCOUNT_TYPES",{enumerable:!0,get:function(){return Qe.DISCOUNT_TYPES}}),Object.defineProperty(exports,"DISCOUNT_VALUE_TYPES",{enumerable:!0,get:function(){return Qe.DISCOUNT_VALUE_TYPES}}),Object.defineProperty(exports,"MIN_PURCHASE_REQUIREMENT",{enumerable:!0,get:function(){return Qe.MIN_PURCHASE_REQUIREMENT}}),exports.CountryCodePicker=Ke.CountryCodePicker,exports.CountriesData=Ze.CountriesData,exports.ShimmerImage=ze.ShimmerImage,exports.ProductPickerModal=Xe.ProductPickerModal,exports.Carousel=Je.Carousel,exports.CarouselSecondary=$e.CarouselSecondary,exports.AccessTokenTroubleshootDialog=er.AccessTokenTroubleshootDialog,exports.RadioList=rr.RadioList,exports.CheckList=tr.CheckList,Object.defineProperty(exports,"DateKeys",{enumerable:!0,get:function(){return or.DateKeys}}),Object.defineProperty(exports,"MEDIA_TYPES",{enumerable:!0,get:function(){return or.MEDIA_TYPES}}),exports.PostPicker=or.PostPicker,exports.dateOptions=or.dateOptions,exports.DropdownButton=nr.DropdownButton,exports.SideModal=ir.SideModal,exports.KeywordsInput=pr.KeywordsInput,exports.AddVariableV2SideModal=ar.AddVariableV2SideModal,exports.AddVariableV2=sr.AddVariableV2,exports.NaLinkWrapper=ur.NaLinkWrapper,exports.NavigationHyperlink=ur.NavigationHyperlink,exports.SearchFilter=cr.SearchFilter,exports.DashboardReviewPopUp=dr.DashboardReviewPopUp,exports.StarRating=lr.StarRating;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./components/template-preview/constants/regexPatterns.js"),r=require("./utils/StringUtils.js"),t=require("./constants/Theme.js"),o=require("./constants/zindex.js"),n=require("./components/checkBox/CheckBox.js"),i=require("./components/list-item/ListItem.js"),p=require("./components/pagination/Pagination.js"),a=require("./components/radioButton/RadioButton.js"),s=require("./components/toaster/Toaster.js"),u=require("./components/tooltips/Tooltip.js"),c=require("./components/spinner/Spinner.js"),d=require("./components/stepper/Stepper.js"),l=require("./components/tag/Tag.js"),m=require("./components/icon-button/IconButton.js"),T=require("./components/template-preview/TemplatePreview.js"),x=require("./components/template-preview/WhatsApp/WhatsAppLikePreview.js"),S=require("./components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),P=require("./components/template-preview/helpers/SmsTemplateHelper.js"),A=require("./components/template-preview/helpers/WhatsAppFormatToHTML.js"),y=require("./components/template-preview/helpers/VariableEditorHelper.js"),C=require("./components/template-preview/models/TemplateMeta.js"),O=require("./components/template-context-mapper/TemplateContextMapper.js"),E=require("./components/template-context-mapper/utils/getDataFromTemplateComponent.js"),b=require("./components/template-context-mapper/utils/validateIsUrl.js"),j=require("./components/fab-menu/FABMenu.js"),R=require("./components/floating-action-button/FloatingActionButton.js"),h=require("./components/floating-action-button/FloatingActionButton.styles.js"),B=require("./components/image-compress/ImageCompress.js"),_=require("./components/TypographyStyle.js"),g=require("./components/button/Button.js"),I=require("./components/progress-bar/ProgressBarComponent.js"),q=require("./components/QueryBuilder/QueryBuilder.js"),f=require("./components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),D=require("./components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js"),k=require("./components/QueryBuilder/redux/queryBuilder.reducer.js"),N=require("./components/QueryBuilder/redux/queryBuilderCache.reducer.js"),L=require("./components/QueryBuilder/types/QueryBuilderOperator.type.js"),M=require("./components/modals/styledModal.js"),w=require("./components/dropdown/DropdownPopover/index.js"),G=require("./components/dropdown/Dropdown.js"),V=require("./components/dropdown/ChipDropdown.js"),U=require("./components/dropdown/OpenedDropdown/components/OpennedDropdown.js"),v=require("./components/dropdown/MenuItem/MenuItem.js"),H=require("./components/analytics-card/AnalyticsCard.js"),F=require("./components/analytics-card/AnalyticsCard.styled.js"),W=require("./components/input/Input.js"),Y=require("./components/analytics-chips-and-dropdowns/AnalyticsChip.js"),Q=require("./components/analytics-chips-and-dropdowns/AnalyticsDropdown.js"),K=require("./components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js"),Z=require("./components/analytics-chips-and-dropdowns/AnalyticsMetric.js"),z=require("./components/analytics-chips-and-dropdowns/AnalyticsTrend.js"),X=require("./components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js"),J=require("./components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js"),$=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js"),ee=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js"),re=require("./components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js"),te=require("./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js"),oe=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js"),ne=require("./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js"),ie=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js"),pe=require("./components/avatar/Avatar.js"),ae=require("./components/avatar/AvatarHelper.js"),se=require("./components/alerts/Alert.js"),ue=require("./components/alerts/AlertHelper.js"),ce=require("./components/thumbnail/Thumbnail.js"),de=require("./components/curtain/Curtain.js"),le=require("./components/datePicker/DatePicker.js"),me=require("./components/switch/Switch.js"),Te=require("./components/plans/SubscriptionPlan.js"),xe=require("./components/plans/SubscriptionPlanSelector.js"),Se=require("./components/tabs/Tabs.js"),Pe=require("./components/dynamic-tabs/DynamicTabs.js"),Ae=require("./components/shimmer/ShimmerComponent/BikShimmer.js"),ye=require("./components/TablePagination/TablePagination.js"),Ce=require("./components/TablePagination/TablePaginationCard.js"),Oe=require("./components/states-modal/StateModalComponent.js"),Ee=require("./components/states-modal/DeleteConfirmationModal.js"),be=require("./components/states/StateComponent.js"),je=require("./components/states/ShopifyScopeWrapper.js"),Re=require("./components/WhatsAppTextEditor/WhatsAppTextEditor.js"),he=require("./components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js"),Be=require("./helpers/BaseWhatsappContentLang.helper.js"),_e=require("./components/card-selection-modal/CardSelectionModal.js"),ge=require("./components/image-cropper/BikImageCropper.js"),Ie=require("./components/image-cropper/BikImagePipeline/BikImagePipeline.js"),qe=require("./components/buttonGroup/ButtonGroup.js"),fe=require("./components/accordion/Accordion.js"),De=require("./components/file-uploader/FileUploader.js"),ke=require("./components/colourInput/ColourInput.js"),Ne=require("./components/bik-layout/BikHeader.js"),Le=require("./components/bik-layout/BikLayout.js"),Me=require("./components/bik-layout/BikProfile.js"),we=require("./components/bik-layout/SimpleSidebar.js"),Ge=require("./components/bik-layout/BikSidebar.js"),Ve=require("./components/bik-layout/FeatureModal.js"),Ue=require("./components/bik-layout/SidebarSkeleton.js"),ve=require("./components/searchBar/searchBar.js"),He=require("./components/custom-date-time/CustomDateTime.js"),Fe=require("./components/product-picker/ProductPickerModal.js"),We=require("./components/discount-modal/DiscountModal.js"),Ye=require("./components/discount-modal/CouponExpiration/CouponExpiration.js"),Qe=require("./components/discount-modal/type.js"),Ke=require("./components/country-code-picker/CountryCodePicker.js"),Ze=require("./components/country-code-picker/CountryCodePicker.modal.js"),ze=require("./components/shimmer-image/ShimmerImage.js"),Xe=require("./components/product-picker-v2/modal.js"),Je=require("./components/carousel/carousel.js"),$e=require("./components/carousel-secondary/CarouselSecondary.js"),er=require("./components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js"),rr=require("./components/radioList/RadioList.js"),tr=require("./components/checkList/CheckList.js"),or=require("./components/postPicker/postPicker.js"),nr=require("./components/dropdown-button/DropdownButton.js"),ir=require("./components/side-modal/SideModal.js"),pr=require("./components/keywords-input/KeywordsInput.js"),ar=require("./components/add-variableV2/AddVariableV2SideModal.js"),sr=require("./components/add-variableV2/AddVariableV2.js"),ur=require("./components/navigation-hyperlink/NavigationHyperlink.js"),cr=require("./components/SearchFilter/index.js"),dr=require("./components/input-with-vars/InputWithVariables.js"),lr=require("./components/dashboard-review-popup/DashboardReviewPopUp.js"),mr=require("./components/star-rating/StarRating.js");exports.regexPatterns=e,exports.StringUtils=r.default,exports.BASE_COLORS=t.BASE_COLORS,exports.COLORS=t.COLORS,exports.DEFAULT_THEME=t.DEFAULT_THEME,exports.FONTS=t.FONTS,exports.ComponentZindex=o.ComponentZindex,exports.CheckBox=n.CheckBox,exports.ListItem=i.ListItem,exports.Pagination=p.Pagination,exports.RadioButton=a.RadioButton,exports.Toaster=s.Toaster,exports.Tooltip=u.Tooltip,exports.Spinner=c.Spinner,exports.Stepper=d.Stepper,exports.Tag=l.Tag,exports.IconButton=m.IconButton,exports.TemplatePreview=T.TemplatePreview,exports.WhatsappLikePreview=x.WhatsappLikePreview,exports.WhatsappLikePreviewV2=S.WhatsappLikePreviewV2,exports.renderVariableUIForPreview=P.renderVariableUIForPreview,exports.WhatsAppFormatToHTML=A.WhatsAppFormatToHTML,exports.VariableEditorHelper=y.VariableEditorHelper,Object.defineProperty(exports,"ACTIONS_TYPES",{enumerable:!0,get:function(){return C.ACTIONS_TYPES}}),exports.CUSTOM_URL_NAME=C.CUSTOM_URL_NAME,Object.defineProperty(exports,"HEADER_TYPES",{enumerable:!0,get:function(){return C.HEADER_TYPES}}),Object.defineProperty(exports,"TEMPLATE_EDITOR",{enumerable:!0,get:function(){return C.TEMPLATE_EDITOR}}),Object.defineProperty(exports,"TEMPLATE_STATUS",{enumerable:!0,get:function(){return C.TEMPLATE_STATUS}}),exports.TemplateContextMapper=O.TemplateContextMapper,exports.getAllDataFromTemplateComponent=E.getAllDataFromTemplateComponent,exports.validateIsUrl=b.validateIsUrl,exports.FABMenu=j.FABMenu,exports.FloatingActionButton=R.FloatingActionButton,Object.defineProperty(exports,"DROP_POSITION",{enumerable:!0,get:function(){return h.DROP_POSITION}}),exports.DropdownToggleContainer=h.DropdownToggleContainer,Object.defineProperty(exports,"FAB_POSITION",{enumerable:!0,get:function(){return h.FAB_POSITION}}),exports.FloatingActionButtonContainer=h.FloatingActionButtonContainer,exports.FloatingActionButtonOuterContainer=h.FloatingActionButtonOuterContainer,Object.defineProperty(exports,"MENU_ALIGNMENT",{enumerable:!0,get:function(){return h.MENU_ALIGNMENT}}),exports.StyledDropdown=h.StyledDropdown,exports.TooltipStyled=h.TooltipStyled,exports.ImageService=B.ImageService,exports.BodyCaption=_.BodyCaption,exports.BodyLarge=_.BodyLarge,exports.BodyPrimary=_.BodyPrimary,exports.BodyPrimaryLink=_.BodyPrimaryLink,exports.BodyRegular=_.BodyRegular,exports.BodySecondary=_.BodySecondary,exports.BodySecondaryLink=_.BodySecondaryLink,exports.BodyTiny=_.BodyTiny,exports.ButtonLarge=_.ButtonLarge,exports.ButtonRegular=_.ButtonRegular,exports.Caption=_.Caption,exports.Display=_.Display,exports.SmallRegular=_.SmallRegular,exports.SubHeading=_.SubHeading,exports.TitleLarge=_.TitleLarge,exports.TitleMedium=_.TitleMedium,exports.TitleRegular=_.TitleRegular,exports.TitleSmall=_.TitleSmall,exports.Button=g.Button,exports.ProgressBarComponent=I.ProgressBarComponent,exports.ProgressCompletedBar=I.ProgressCompletedBar,exports.QueryBuilder=q.QueryBuilder,exports.BaseQueryBuilderNode=f.BaseQueryBuilderNode,exports.PropertyNode=D.PropertyNode,exports.PropertyNodeHeadless=D.PropertyNodeHeadless,exports.queryBuilderSlice=k.queryBuilderSlice,exports.queryBuilderCacheSlice=N.queryBuilderCacheSlice,Object.defineProperty(exports,"AD_STRING_OPERATORS",{enumerable:!0,get:function(){return L.AD_STRING_OPERATORS}}),Object.defineProperty(exports,"ANY_AD_OPERATORS",{enumerable:!0,get:function(){return L.ANY_AD_OPERATORS}}),Object.defineProperty(exports,"ANY_IG_OPERATORS",{enumerable:!0,get:function(){return L.ANY_IG_OPERATORS}}),Object.defineProperty(exports,"BOOLEAN_OPERATORS",{enumerable:!0,get:function(){return L.BOOLEAN_OPERATORS}}),Object.defineProperty(exports,"DATE_OPERATORS",{enumerable:!0,get:function(){return L.DATE_OPERATORS}}),Object.defineProperty(exports,"EVENT_VALUES",{enumerable:!0,get:function(){return L.EVENT_VALUES}}),Object.defineProperty(exports,"FREQUENCY_OPERATORS",{enumerable:!0,get:function(){return L.FREQUENCY_OPERATORS}}),Object.defineProperty(exports,"ICE_BREAKER_OPERATORS",{enumerable:!0,get:function(){return L.ICE_BREAKER_OPERATORS}}),Object.defineProperty(exports,"IG_STRING_OPERATORS",{enumerable:!0,get:function(){return L.IG_STRING_OPERATORS}}),Object.defineProperty(exports,"INTEGER_OPERATORS",{enumerable:!0,get:function(){return L.INTEGER_OPERATORS}}),Object.defineProperty(exports,"MAIL_SUBJECT_OPERATORS",{enumerable:!0,get:function(){return L.MAIL_SUBJECT_OPERATORS}}),Object.defineProperty(exports,"REACTION_OPERATORS",{enumerable:!0,get:function(){return L.REACTION_OPERATORS}}),Object.defineProperty(exports,"SPECIFIC_IG_OPERATORS",{enumerable:!0,get:function(){return L.SPECIFIC_IG_OPERATORS}}),Object.defineProperty(exports,"STRING_OPERATORS",{enumerable:!0,get:function(){return L.STRING_OPERATORS}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS",{enumerable:!0,get:function(){return L.STRING_RESTRICTED_OPERATORS}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS_2",{enumerable:!0,get:function(){return L.STRING_RESTRICTED_OPERATORS_2}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS_3",{enumerable:!0,get:function(){return L.STRING_RESTRICTED_OPERATORS_3}}),exports.StyledModal=M.StyledModal,exports.DropdownPopover=w.DropdownPopover,exports.Dropdown=G.Dropdown,exports.ChipDropdown=V.ChipDropdown,exports.OpenedDropdown=U.OpenedDropdown,exports.MenuItemDropdown=v.MenuItemDropdown,exports.AnalyticsCard=H.AnalyticsCard,exports.AnalyticsContainer=F.AnalyticsContainer,exports.CardDataContainer=F.CardDataContainer,exports.Input=W.Input,exports.AnalyticsChip=Y.AnalyticsChip,exports.AnalyticsDropdown=Q.AnalyticsDropdown,exports.EachItem=Q.EachItem,exports.formatDate=Q.formatDate,exports.AnalyticsMultiChip=K.AnalyticsMultiChip,exports.AnalyticsMetric=Z.AnalyticsMetric,exports.AnalyticsTrend=z.AnalyticsTrend,exports.LineChart=X.LineChart,exports.LinearChipGroupedChart=J.LinearChipGroupedChart,exports.Card=$.Card,exports.PieChartAnalytics=$.PieChartAnalytics,exports.PieChart=ee.PieChart,exports.HorizontalGraph=re.HorizontalGraph,exports.StackedBarChart=te.StackedBarChart,exports.VerticalGraph=oe.VerticalGraph,Object.defineProperty(exports,"HEAT",{enumerable:!0,get:function(){return ne.HEAT}}),exports.HEAT_COLORS=ne.HEAT_COLORS,Object.defineProperty(exports,"HEAT_GRADING_TYPE",{enumerable:!0,get:function(){return ne.HEAT_GRADING_TYPE}}),exports.HeatMap=ne.HeatMap,exports.VerticalBarAndLinearGraph=ie.VerticalBarAndLinearGraph,exports.AVATAR_SIZE_VS_ICON_SIZE_MAP=pe.AVATAR_SIZE_VS_ICON_SIZE_MAP,exports.Avatar=pe.Avatar,exports.BACKGROUND_VS_TEXT_COLOR_MAP=pe.BACKGROUND_VS_TEXT_COLOR_MAP,Object.defineProperty(exports,"AVATAR_BACKGROUND",{enumerable:!0,get:function(){return ae.AVATAR_BACKGROUND}}),exports.AVATAR_SIZE_MAP=ae.AVATAR_SIZE_MAP,Object.defineProperty(exports,"AVATAR_TYPES",{enumerable:!0,get:function(){return ae.AVATAR_TYPES}}),Object.defineProperty(exports,"SIZE",{enumerable:!0,get:function(){return ae.SIZE}}),exports.Alert=se.Alert,Object.defineProperty(exports,"ALERT_TYPES",{enumerable:!0,get:function(){return ue.ALERT_TYPES}}),exports.COLOR_CONFIG_MAP=ue.COLOR_CONFIG_MAP,Object.defineProperty(exports,"RATIO",{enumerable:!0,get:function(){return ce.RATIO}}),exports.Thumbnail=ce.Thumbnail,exports.Curtain=de.Curtain,exports.DatePicker=le.DatePicker,exports.Loader=me.Loader,exports.Switch=me.Switch,exports.SwitchContainer=me.SwitchContainer,exports.Thumb=me.Thumb,exports.SubscriptionPlan=Te.SubscriptionPlan,exports.BottomWrapper=xe.BottomWrapper,exports.HeaderWrapper=xe.HeaderWrapper,exports.SubscriptionPlanSelector=xe.SubscriptionPlanSelector,exports.defaultTabs=xe.defaultTabs,exports.TabItemComponent=Se.TabItemComponent,exports.Tabs=Se.Tabs,exports.DynamicTabs=Pe.DynamicTabs,exports.BikShimmer=Ae.BikShimmer,exports.TablePagination=ye.TablePagination,exports.TablePaginationCard=Ce.TablePaginationCard,exports.TablePaginationCardStyled=Ce.TablePaginationCardStyled,exports.StateModalComponent=Oe.StateModalComponent,exports.DeleteConfirmationModal=Ee.DeleteConfirmationModal,Object.defineProperty(exports,"ButtonActions",{enumerable:!0,get:function(){return be.ButtonActions}}),Object.defineProperty(exports,"ButtonTypes",{enumerable:!0,get:function(){return be.ButtonTypes}}),exports.StateComponent=be.StateComponent,Object.defineProperty(exports,"StateInterface",{enumerable:!0,get:function(){return be.StateInterface}}),exports.ShopifyScopeWrapper=je.ShopifyScopeWrapper,exports.WhatsAppTextEditor=Re.WhatsAppTextEditor,Object.defineProperty(exports,"EditorActionTypes",{enumerable:!0,get:function(){return he.EditorActionTypes}}),exports.WhatsAppTextEditorHeader=he.WhatsAppTextEditorHeader,exports.BaseWhatsappContentLangHelper=Be.BaseWhatsappContentLangHelper,exports.CardSelectionModal=_e.CardSelectionModal,exports.BikImageCropper=ge.BikImageCropper,exports.BikImagePipeline=Ie.BikImagePipeline,exports.ButtonGroup=qe.ButtonGroup,exports.BikAccordion=fe.BikAccordion,exports.FileUploader=De.FileUploader,exports.ColourInput=ke.ColourInput,exports.BikHeader=Ne.BikHeader,exports.BikLayout=Le.BikLayout,exports.BikProfile=Me.BikProfile,exports.SimpleSidebar=we.SimpleSidebar,exports.BikSidebar=Ge.BikSidebar,exports.FeatureModal=Ve.FeatureModal,exports.SidebarSkeleton=Ue.SidebarSkeleton,exports.SearchBar=ve.SearchBar,exports.CustomDateTime=He.CustomDateTime,exports.PricePleaseProductPicker=Fe.PricePleaseProductPicker,exports.ProductPickerContent=Fe.ProductPickerContent,exports.DiscountModal=We.DiscountModal,Object.defineProperty(exports,"COUPON_EXPIRATION",{enumerable:!0,get:function(){return Ye.COUPON_EXPIRATION}}),exports.CouponExpiration=Ye.CouponExpiration,Object.defineProperty(exports,"DISCOUNT_TARGET_SELECTION",{enumerable:!0,get:function(){return Qe.DISCOUNT_TARGET_SELECTION}}),Object.defineProperty(exports,"DISCOUNT_TARGET_TYPES",{enumerable:!0,get:function(){return Qe.DISCOUNT_TARGET_TYPES}}),Object.defineProperty(exports,"DISCOUNT_TYPES",{enumerable:!0,get:function(){return Qe.DISCOUNT_TYPES}}),Object.defineProperty(exports,"DISCOUNT_VALUE_TYPES",{enumerable:!0,get:function(){return Qe.DISCOUNT_VALUE_TYPES}}),Object.defineProperty(exports,"MIN_PURCHASE_REQUIREMENT",{enumerable:!0,get:function(){return Qe.MIN_PURCHASE_REQUIREMENT}}),exports.CountryCodePicker=Ke.CountryCodePicker,exports.CountriesData=Ze.CountriesData,exports.ShimmerImage=ze.ShimmerImage,exports.ProductPickerModal=Xe.ProductPickerModal,exports.Carousel=Je.Carousel,exports.CarouselSecondary=$e.CarouselSecondary,exports.AccessTokenTroubleshootDialog=er.AccessTokenTroubleshootDialog,exports.RadioList=rr.RadioList,exports.CheckList=tr.CheckList,Object.defineProperty(exports,"DateKeys",{enumerable:!0,get:function(){return or.DateKeys}}),Object.defineProperty(exports,"MEDIA_TYPES",{enumerable:!0,get:function(){return or.MEDIA_TYPES}}),exports.PostPicker=or.PostPicker,exports.dateOptions=or.dateOptions,exports.DropdownButton=nr.DropdownButton,exports.SideModal=ir.SideModal,exports.KeywordsInput=pr.KeywordsInput,exports.AddVariableV2SideModal=ar.AddVariableV2SideModal,exports.AddVariableV2=sr.AddVariableV2,exports.NaLinkWrapper=ur.NaLinkWrapper,exports.NavigationHyperlink=ur.NavigationHyperlink,exports.SearchFilter=cr.SearchFilter,exports.InputWithVariables=dr.InputWithVariables,exports.DashboardReviewPopUp=lr.DashboardReviewPopUp,exports.StarRating=mr.StarRating;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";const e=e=>{const{width:i,height:o,color:r}=e;return t("svg",Object.assign({width:i||"14",height:o||"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:t("path",{d:"M7.83337 1.16667C7.83337 0.70643 7.46028 0.333334 7.00004 0.333334C6.5398 0.333334 6.16671 0.70643 6.16671 1.16667V6.16667H1.16671C0.70647 6.16667 0.333374 6.53976 0.333374 7C0.333374 7.46024 0.70647 7.83333 1.16671 7.83333H6.16671V12.8333C6.16671 13.2936 6.5398 13.6667 7.00004 13.6667C7.46028 13.6667 7.83337 13.2936 7.83337 12.8333V7.83333H12.8334C13.2936 7.83333 13.6667 7.46024 13.6667 7C13.6667 6.53976 13.2936 6.16667 12.8334 6.16667H7.83337V1.16667Z",fill:r||"#731DCF"})}))};export{e as default};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import t from"styled-components";const o=t.button`
|
|
2
|
+
padding: 2px 8px;
|
|
3
|
+
position: absolute;
|
|
4
|
+
right: ${t=>t.right};
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
color: white;
|
|
7
|
+
background-color: black;
|
|
8
|
+
width: fit-content;
|
|
9
|
+
float: right;
|
|
10
|
+
margin-top: 0px;
|
|
11
|
+
font-family: Inter;
|
|
12
|
+
font-style: normal;
|
|
13
|
+
font-weight: 600;
|
|
14
|
+
font-size: 14px;
|
|
15
|
+
line-height: 20px;
|
|
16
|
+
border-radius: 4px;
|
|
17
|
+
border: 1px solid #ccc;
|
|
18
|
+
margin-right: 1px;
|
|
19
|
+
z-index: 100;
|
|
20
|
+
|
|
21
|
+
.add {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
}
|
|
25
|
+
`;export{o as AddVariableStyled};
|
|
@@ -16,6 +16,7 @@ export interface Variable {
|
|
|
16
16
|
variables?: {
|
|
17
17
|
[key: string]: Variable;
|
|
18
18
|
};
|
|
19
|
+
needsFetching?: boolean;
|
|
19
20
|
}
|
|
20
21
|
export interface AddVariableProps {
|
|
21
22
|
data: VariableListInterfaceV2[];
|
|
@@ -31,6 +32,9 @@ export interface AddVariableProps {
|
|
|
31
32
|
pickerSize?: string;
|
|
32
33
|
enableVariable?: boolean;
|
|
33
34
|
isEvaluationList?: boolean;
|
|
35
|
+
onSearchBlur?: (e: any) => void;
|
|
36
|
+
id?: string;
|
|
37
|
+
selectWithTypes?: boolean;
|
|
34
38
|
}
|
|
35
39
|
type Props = AddVariableProps;
|
|
36
40
|
export interface VariableBoxProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as a,Fragment as i}from"react/jsx-runtime";import s from"../../assets/icons/back_icon.svg.js";import
|
|
1
|
+
import{jsx as e,jsxs as a,Fragment as i}from"react/jsx-runtime";import s from"../../assets/icons/back_icon.svg.js";import l from"../../assets/icons/chevronRightAlt.svg.js";import t from"../../assets/icons/cross.svg.js";import r from"../../assets/icons/plus.svg.js";import n from"../../assets/icons/undo.svg.js";import{memo as c,useState as o,useEffect as d}from"react";import{AddVariableStyled as b}from"./AddVariableV2.styled.js";import{Button as m}from"../button/Button.js";import{IconButton as v}from"../icon-button/IconButton.js";import{SearchBar as p}from"../searchBar/searchBar.js";import{Tooltip as g}from"../tooltips/Tooltip.js";import{COLORS as h}from"../../constants/Theme.js";import{TitleSmall as u,BodyCaption as y}from"../TypographyStyle.js";const j=c((c=>{const{data:j}=c,[f,O]=o({}),[N,V]=o(),[T,_]=o(""),[k,C]=o(""),[S,w]=o(!0),L=/^[^.]*\.[^.]*$/;d((()=>{const e={};j.forEach((a=>{e[a.displayName]=[]})),V(e)}),[j]),d((()=>{if(k){c.data.filter((e=>Object.keys(e.variables).filter((a=>{var i;return(null===(i=e.variables[a].displayName)||void 0===i?void 0:i.toLowerCase().includes(k.toLowerCase()))||B(e.variables[a])})).length>0)).length>0?w(!0):w(!1)}else w(!0)}),[k]);const x=(e,a)=>{const i=j.find((e=>e.displayName===a));if(i){let s=i;e.forEach(((e,a)=>{s=s.variables[e]})),O((e=>Object.assign(Object.assign({},e),{[a]:s})))}},B=e=>{let a=!1;if(e.isSubHeader&&e.variables){const i=Object.keys(e.variables);for(let s=0;s<i.length;s++){const l=i[s];if(e.variables&&e.variables[l].displayName.toLowerCase().includes(k.toLowerCase())){a=!0;break}}}return a},I=a=>{const s=a.item.description;return e(i,{children:e(g,Object.assign({body:"",tooltipContent:e(y,Object.assign({color:h.content.primaryInverse,style:{whiteSpace:"pre-line",padding:8}},{children:a.item.isAvailable?s?`• ${s}\n• Recommended here`:"Recommended here":"Not recommended here"})),width:300,delay:300,placement:"bottom"},{children:e(F,{item:a.item})}))})},F=a=>e(m,{darkMode:c.enableVariable?c.enableVariable:a.item.isAvailable,size:"chip",LeadingIcon:a.item.isSubHeader?void 0:r,TrailingIcon:()=>a.item.isSubHeader?e("div",Object.assign({className:"icon-trailing",style:{display:"flex"}},{children:e(l,{})})):e(i,{}),buttonText:a.item.displayName}),E=(a,i)=>e("div",Object.assign({onClick:a.isSubHeader?()=>{const e=[...N[T],i];x(e,T),V((a=>Object.assign(Object.assign({},a),{[T]:e})))}:()=>{c.customTrigger?(c.customTrigger(a),c.setShowVariable(!1)):c.isEvaluationList?A(a):c.setVariableValue(c.selectWithTypes?{actualValue:a.actualValue,variableType:a.variableType,needsFetching:a.needsFetching}:a.actualValue)}},{children:e(I,{item:a})})),H=(e,a)=>{const i=[...N[e.displayName],a];x(i,e.displayName),V((a=>Object.assign(Object.assign({},a),{[e.displayName]:i}))),_(e.displayName)},A=e=>{if(e.actualValue.match(L)){const a=e.actualValue.replace("{{","").replace("}}","").split("."),i=a[0]+`['${a[1]}']`;c.setVariableValue(c.selectWithTypes?{actualValue:i,variableType:e.variableType,needsFetching:e.needsFetching}:i)}else{const a=e.actualValueEval?e.actualValueEval:e.actualValue;c.setVariableValue(c.selectWithTypes?{actualValue:a,variableType:e.variableType,needsFetching:e.needsFetching}:a)}},P=(e,a)=>{if(c.customTrigger)c.customTrigger(e.variables[a]),c.setShowVariable(!1);else if(c.isEvaluationList){const i=e.variables[a];A(i)}else c.setVariableValue(c.selectWithTypes?{actualValue:e.variables[a].actualValue,variableType:e.variables[a].variableType,needsFetching:e.variables[a].needsFetching}:e.variables[a].actualValue)},$=c.isModalState?void 0:{top:"small"===c.pickerSize?"300px":"60px",left:`${c.leftPosition?c.leftPosition+24:430}px`};return e("div",Object.assign({id:"varList",tabIndex:-1},{children:e(b,Object.assign({style:$,onClick:e=>{e.stopPropagation()},pickerSize:c.pickerSize||"large",isModalState:c.isModalState},{children:c.showVariable&&a("div",Object.assign({className:"popup"},{children:[a("div",Object.assign({className:"sticky__bar"},{children:[a("div",Object.assign({className:"header__bar"},{children:[e("div",Object.assign({className:"add__variable"},{children:"Add a new variable"})),e("div",Object.assign({onClick:()=>{c.setShowVariable(!1)},style:{display:"flex",alignItems:"center",justifyContent:"center"}},{children:e(v,{iconButtonType:"default",Icon:t})}))]})),e("div",Object.assign({className:"search__bar",onBlur:e=>{c.onSearchBlur&&c.onSearchBlur(e)}},{children:e(p,{width:"100%",isEnabled:!0,onChange:e=>{C(e)},onEnter:()=>{},placeholder:"Search...",variant:"default"})})),!S&&a("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",marginTop:16}},{children:[e(u,{children:"No results found!"}),e(y,{children:`Sorry we could not find any results for "${k}"`})]})),T&&N[T].length>0&&a("div",Object.assign({className:"nav__bar",style:{marginTop:8}},{children:[a("div",Object.assign({className:"left__nav"},{children:[e(v,{Icon:s,style:{color:"#919191",display:"flex"},onClick:()=>{const e=N[T].slice(0,-1);x(e,T),V((a=>Object.assign(Object.assign({},a),{[T]:e}))),e.length||_("")}}),a("div",Object.assign({className:"block"},{children:[e(u,{children:f[T].displayName}),f[T].description&&e(y,{children:f[T].description})]}))]})),a("div",Object.assign({className:"right__nav"},{children:[e(v,{Icon:n,style:{display:"flex"},onClick:()=>{x([],T),V((e=>Object.assign(Object.assign({},e),{[T]:[]}))),_("")}}),e("div",{children:"First page"})]}))]}))]})),e("div",Object.assign({className:"wrapper"},{children:e("div",Object.assign({className:"list__map"},{children:a("div",Object.assign({className:"items"},{children:[!T&&c.data.map((s=>{let l=[];return k&&(l=Object.keys(s.variables).filter((e=>{var a;return(null===(a=s.variables[e].displayName)||void 0===a?void 0:a.toLowerCase().includes(k.toLowerCase()))||B(s.variables[e])}))),a(i,{children:[k?l.length>0?a("div",Object.assign({className:"block"},{children:[e("div",Object.assign({className:"heading__font"},{children:null==s?void 0:s.displayName})),e(y,Object.assign({style:{marginBottom:8,color:"#616161"}},{children:null==s?void 0:s.description}))]})):e(i,{}):a("div",Object.assign({className:"block"},{children:[e("div",Object.assign({className:"heading__font"},{children:null==s?void 0:s.displayName})),e(y,Object.assign({style:{marginBottom:8,color:"#616161"}},{children:null==s?void 0:s.description}))]})),Object.keys(s.variables).map((a=>{var l;return k?(null===(l=s.variables[a].displayName)||void 0===l?void 0:l.toLowerCase().includes(k.toLowerCase()))||B(s.variables[a])?e("div",Object.assign({onClick:s.variables[a].isSubHeader?()=>H(s,a):()=>P(s,a)},{children:e(I,{item:s.variables[a]})})):e(i,{}):e("div",Object.assign({onClick:s.variables[a].isSubHeader?()=>H(s,a):()=>P(s,a)},{children:e(I,{item:s.variables[a]})}))}))]})})),T&&e("div",Object.assign({className:"list__map"},{children:e("div",Object.assign({className:"items",style:{marginTop:16}},{children:Object.keys(f[T].variables).map(((a,s)=>{var l;return k?(null===(l=f[T].variables[a].displayName)||void 0===l?void 0:l.toLowerCase().includes(k.toLowerCase()))||B(f[T].variables[a])?E(f[T].variables[a],a):e(i,{}):E(f[T].variables[a],a)}))}))}))]}))}))})),e("div",{className:"bottom__padding"})]}))}))}))}),((e,a)=>e.enableVariable===a.enableVariable&&e.leftPosition===a.leftPosition));export{j as AddVariableV2};
|
|
@@ -12,5 +12,8 @@ export interface VariableV2SideModalProps {
|
|
|
12
12
|
leftPosition?: number;
|
|
13
13
|
pickerSize?: string;
|
|
14
14
|
zIndex?: number;
|
|
15
|
+
onSearchBlur?: (e: any) => void;
|
|
16
|
+
id?: string;
|
|
17
|
+
selectWithTypes?: boolean;
|
|
15
18
|
}
|
|
16
19
|
export declare const AddVariableV2SideModal: React.FC<VariableV2SideModalProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import r from"react-dom";import{AddVariableV2 as a}from"./AddVariableV2.js";import{SideModalStyle as o,SideModalContainer as t}from"../side-modal/SideModal.style.js";const i=i=>r.createPortal(e(o,Object.assign({zIndex:i.zIndex},{children:e(t,{children:e(a,{data:i.data,showVariable:i.showVariable,setShowVariable:i.setShowVariable,placeholder:"Add a variable",customTrigger:i.customTrigger,isModalState:!0,onSearchBlur:i.onSearchBlur,selectWithTypes:i.selectWithTypes})})})),document.body);export{i as AddVariableV2SideModal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@emotion/styled/base";import{jsx as o,Fragment as e,jsxs as i}from"react/jsx-runtime";import r from"../../../../utils/StringUtils.js";import{COLORS as g}from"../../../../constants/Theme.js";import"../../../../constants/zindex.js";import{useState as I,useEffect as C}from"react";import"../../../checkBox/CheckBox.styled.js";import{TitleMedium as s}from"../../../TypographyStyle.js";import"../../../list-item/ListItem.js";import"../../../pagination/Pagination.js";import"../../../radioButton/RadioButton.styled.js";import"react-dom";import"react-toastify";import"../../../toaster/Toaster.styled.js";import"@tippyjs/react";import"../../../tooltips/TooltipInternal.js";import"../../../spinner/Spinner.js";import"../../../stepper/Stepper.styled.js";import"../../../tag/Tag.js";import"../../../icon-button/IconButton.js";import"../../../template-preview/TemplatePreview.js";import"../../../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import"../../../template-preview/models/TemplateMeta.js";import"../../../modals/styledModal.js";import"../../../template-preview/models/Channels.js";import"../../../template-context-mapper/context/templateModalContext.js";import"../../../template-context-mapper/modalElements/Footer.js";import"../../../template-context-mapper/modalElements/Body.js";import"../../../template-context-mapper/modalElements/Header.js";import"../../../zeroState/ZeroState.js";import"../../../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../../../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../../../button/Button.js";import"../../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../../../input/Input.js";import"react-bootstrap";import"../../../floating-action-button/FloatingActionButton.styles.js";import"../../../image-compress/ImageCompress.js";import"../../../progress-bar/ProgressBarComponent.js";import"../../../QueryBuilder/QueryBuilder.js";import"../../../QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js";import"../../../QueryBuilder/constants/connectorPosition.js";import"../../../QueryBuilder/constants/connector.js";import"../../../QueryBuilder/types/QueryBuilder.type.js";import"../../../dropdown/Dropdown.js";import"../../../QueryBuilder/components/InputLoader.js";import"../../../QueryBuilder/components/Connectors/Components/EmojiPicker.js";import"react-chips";import"../../../input/ChipInput.styled.js";import"../../../QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js";import"../../../QueryBuilder/components/Connectors/Components/IgPicker.js";import"../../../QueryBuilder/components/Connectors/Components/InTheLast.js";import"../../../QueryBuilder/components/Connectors/Components/InTwoLast.js";import"react-calendar";import"../../../../utils/DateUtils.js";import"../../../datePicker/DatePickerWrapper.styled.js";import"../../../QueryBuilder/components/Connectors/Connector.styled.js";import"../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.styled.js";import"../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.styled.js";import"../../../QueryBuilder/redux/queryBuilder.reducer.js";import"../../../QueryBuilder/redux/queryBuilderCache.reducer.js";import"../../../QueryBuilder/types/QueryBuilderOperator.type.js";import"../../../dropdown/DropdownPopover/index.js";import"../../../dropdown/ChipDropdown.js";import"../../../dropdown/MenuItem/MenuItem.js";import"../../../shimmer/ShimmerComponent/ShimmerStyled.js";import"../../../analytics-card/AnalyticsCard.styled.js";import"../../CommonStyles.js";import"../../../datePicker/DatePicker.styled.js";import"../../AnalyticsMetric.js";import"../LineChart/LineChart.js";import"../linearChipGroupedChart/LinearChipGroupedChart.styled.js";import{PieChart as p}from"./PieChart.js";import"../HorizontalBarGraph/HorizontalGraph.js";import"../StackedBarChart/StackedBarChart.js";import"../VerticalBarGraph/VerticalGraph.js";import"../heatmap/HeatMap.js";import"../VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js";import"../../../avatar/Avatar.js";import"../../../avatar/AvatarHelper.js";import"../../../alerts/Alert.styled.js";import"../../../alerts/AlertHelper.js";import"../../../thumbnail/Thumbnail.js";import"../../../curtain/Curtain.styled.js";import"../../../curtain/CurtainHelper.js";import"../../../switch/Switch.js";import"../../../plans/SubscriptionPlanStyled.js";import"../../../plans/SubscriptionPlanSelector.js";import"../../../tabs/Tabs.js";import"../../../TablePagination/TablePagination.styled.js";import"../../../TablePagination/TablePaginationCard.js";import"../../../states/StateComponent.js";import"../../../../_virtual/_tslib.js";import"../../../WhatsAppTextEditor/WhatsAppTextEditor.js";import"../../../WhatsAppTextEditor/WhatsAppTextEditorHeader.js";import"../../../card-selection-modal/CardSelectionModal.styled.js";import"react-image-crop";import"../../../buttonGroup/ButtonGroupStyle.js";import"../../../accordion/Accordion.style.js";import"../../../accordion/AccordionArrow.js";import"../../../file-uploader/FileUploaderStyle.js";import"../../../colourInput/ColourInput.styled.js";import"../../../bik-layout/CommonStyles.js";import"../../../navigation-hyperlink/NavigationHyperlink.js";import"../../../bik-layout/SidebarStyles.js";import"date-fns";import"react-popper";import"../../../dropdown/Common.styled.js";import"../../../custom-date-time/CustomDateTime.styled.js";import"../../../../node_modules/lodash.debounce/index.js";import"../../../product-picker/ProductPicker.styled.js";import"../../../discount-modal/type.js";import"../../../discount-modal/DiscountModal.styled.js";import"../../../discount-modal/DynamicCoupon/DynamicCoupon.js";import"../../../discount-modal/CouponExpiration/CouponExpiration.js";import"../../../country-code-picker/CountryCodePicker.styled.js";import"../../../product-picker-v2/emptyState.js";import"../../../product-picker-v2/style.js";import"lodash";import"../../../carousel/carousel.js";import"../../../carousel-secondary/CarouselSecondary.style.js";import"../../../access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.styles.js";import"../../../radioList/RadioList.styled.js";import"../../../checkList/CheckList.styled.js";import"../../../postPicker/postPicker.js";import"../../../dropdown-button/DropdownButton.style.js";import"../../../side-modal/SideModal.style.js";import"../../../add-variableV2/AddVariableV2.styled.js";import"../../../SearchFilter/types/SearchFilter.type.js";import"../../../SearchFilter/components/DatePickerButton.js";import"../../../star-rating/StarRating.js";import"../../../dashboard-review-popup/components/FiveStar.styled.js";import"../../../dashboard-review-popup/components/Form.styled.js";import"../../../dashboard-review-popup/components/ZeroState.js";import"../../../dashboard-review-popup/DashboardReviewPopUp.styled.js";import{Chart as c,ArcElement as A,Legend as a}from"chart.js";import{Doughnut as l}from"react-chartjs-2";c.register(A,a);const d={plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:t=>{if(!t.label)return" 0%";const o=t.dataset.data.reduce(((t,o)=>t+o),0),e=parseFloat((t.raw/o*100).toFixed(1));return` ${t.label}: ${e}%`}}}}},n=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],m=t("div","production"===process.env.NODE_ENV?{target:"elaov7f0"}:{target:"elaov7f0",label:"CartStyled"})("background:",(t=>g.surface.standard),";border:1px solid ",(t=>g.stroke.primary),";border-radius:4px;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQzhCIiwiZmlsZSI6IlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGpzeCBhcyBfanN4LCBGcmFnbWVudCBhcyBfRnJhZ21lbnQsIGpzeHMgYXMgX2pzeHMgfSBmcm9tIFwicmVhY3QvanN4LXJ1bnRpbWVcIjtcclxuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgeyBTdHJpbmdVdGlscyB9IGZyb20gXCIuLi8uLi8uLi8uLi9pbmRleFwiO1xyXG5pbXBvcnQgeyBBcmNFbGVtZW50LCBDaGFydCBhcyBDaGFydEpTLCBMZWdlbmQgfSBmcm9tICdjaGFydC5qcyc7XHJcbmltcG9ydCB7IHVzZUVmZmVjdCwgdXNlU3RhdGUgfSBmcm9tICdyZWFjdCc7XHJcbmltcG9ydCB7IERvdWdobnV0IH0gZnJvbSAncmVhY3QtY2hhcnRqcy0yJztcclxuaW1wb3J0IHsgVGl0bGVNZWRpdW0gfSBmcm9tIFwiLi4vLi4vLi4vVHlwb2dyYXBoeVN0eWxlXCI7XHJcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gXCIuLi8uLi8uLi8uLi9jb25zdGFudHMvVGhlbWVcIjtcclxuaW1wb3J0IHsgUGllQ2hhcnQgfSBmcm9tICcuL1BpZUNoYXJ0JztcclxuQ2hhcnRKUy5yZWdpc3RlcihBcmNFbGVtZW50LCBMZWdlbmQpO1xyXG5jb25zdCBvcHRpb25zID0ge1xyXG4gICAgcGx1Z2luczoge1xyXG4gICAgICAgIGxlZ2VuZDoge1xyXG4gICAgICAgICAgICBkaXNwbGF5OiBmYWxzZSxcclxuICAgICAgICB9LFxyXG4gICAgICAgIHRvb2x0aXA6IHtcclxuICAgICAgICAgICAgZW5hYmxlZDogdHJ1ZSxcclxuICAgICAgICAgICAgY2FsbGJhY2tzOiB7XHJcbiAgICAgICAgICAgICAgICBsYWJlbDogKHRvb2x0aXBJdGVtKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0b29sdGlwSXRlbS5sYWJlbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYCAwJWA7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRvdGFsID0gdG9vbHRpcEl0ZW0uZGF0YXNldC5kYXRhLnJlZHVjZSgoYWNjLCBjdXIpID0+IGFjYyArIGN1ciwgMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGVyY2VudGFnZSA9IHBhcnNlRmxvYXQoKCh0b29sdGlwSXRlbS5yYXcgLyB0b3RhbCkgKiAxMDApLnRvRml4ZWQoMSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBgICR7dG9vbHRpcEl0ZW0ubGFiZWx9OiAke3BlcmNlbnRhZ2V9JWA7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0sXHJcbiAgICB9LFxyXG59O1xyXG5jb25zdCBHUkFQSF9DT0xPUlMgPSBbXHJcbiAgICAnIzVFMDdCQicsXHJcbiAgICAnIzlFNzdFRCcsXHJcbiAgICAnI0QyQUVGRicsXHJcbiAgICAnI0NERTFGRicsXHJcbiAgICAnIzkyQUZGQScsXHJcbiAgICAnIzM5MzVFMScsXHJcbl07XHJcbmNvbnN0IENhcnRTdHlsZWQgPSBzdHlsZWQuZGl2IGBcblx0YmFja2dyb3VuZDogJHsocHJvcHMpID0+IENPTE9SUy5zdXJmYWNlLnN0YW5kYXJkfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsocHJvcHMpID0+IENPTE9SUy5zdHJva2UucHJpbWFyeX07XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcbmA7XHJcbmV4cG9ydCBjb25zdCBDYXJkID0gKHByb3BzKSA9PiB7XHJcbiAgICByZXR1cm4gX2pzeChDYXJ0U3R5bGVkLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHsgcGFkZGluZzogMjQgfSB9LCB7IGNoaWxkcmVuOiBwcm9wcy5jaGlsZHJlbiB9KSk7XHJcbn07XHJcbmV4cG9ydCBjb25zdCBQaWVDaGFydEFuYWx5dGljcyA9ICh7IHRpdGxlLCBzbGljZXMsIHNpemUsIH0pID0+IHtcclxuICAgIGNvbnN0IFtzbGljZXNXaXRoQ29sb3IsIHNldFNsaWNlc1dpdGhDb2xvcl0gPSB1c2VTdGF0ZShbXSk7XHJcbiAgICBjb25zdCBbZGF0YSwgc2V0RGF0YV0gPSB1c2VTdGF0ZSgpO1xyXG4gICAgdXNlRWZmZWN0KCgpID0+IHtcclxuICAgICAgICBjb25zdCB0b3RhbFN1bSA9IHNsaWNlcy5yZWR1Y2UoKHN1bSwgc2xpY2UpID0+IHN1bSArIHNsaWNlLmNvdW50LCAwKTtcclxuICAgICAgICBsZXQgdXBkYXRlZFNsaWNlc1dpdGhDb2xvciA9IFtdO1xyXG4gICAgICAgIHVwZGF0ZWRTbGljZXNXaXRoQ29sb3IgPSBPYmplY3Qua2V5cyhzbGljZXMpLm1hcCgoa2V5LCBpbmRleCkgPT4gKE9iamVjdC5hc3NpZ24oeyBjb2xvcjogR1JBUEhfQ09MT1JTW2luZGV4ICUgR1JBUEhfQ09MT1JTLmxlbmd0aF0gfSwgc2xpY2VzW2tleV0pKSk7XHJcbiAgICAgICAgc2V0U2xpY2VzV2l0aENvbG9yKFsuLi51cGRhdGVkU2xpY2VzV2l0aENvbG9yXSk7XHJcbiAgICAgICAgaWYgKHRvdGFsU3VtID09PSAwKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGRhdGFTZXQgPSB7XHJcbiAgICAgICAgICAgICAgICBkYXRhc2V0czogW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogWzEwMF0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogWycjRjBGMEYwJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiAwLFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgY29uc3QgZGF0YVNldCA9IHtcclxuICAgICAgICAgICAgICAgIGxhYmVsczogc2xpY2VzLm1hcCgoc2xpY2UpID0+IFN0cmluZ1V0aWxzLmNhcGl0YWxpemUoc2xpY2UubmFtZSkpLFxyXG4gICAgICAgICAgICAgICAgZGF0YXNldHM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IHNsaWNlcy5tYXAoKHNsaWNlKSA9PiBzbGljZS5jb3VudCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogc2xpY2VzLm1hcCgoc2xpY2UsIGluZGV4KSA9PiB7IHZhciBfYTsgcmV0dXJuIChfYSA9IHNsaWNlLmNvbG9yKSAhPT0gbnVsbCAmJiBfYSAhPT0gdm9pZCAwID8gX2EgOiBHUkFQSF9DT0xPUlNbaW5kZXggJSBHUkFQSF9DT0xPUlMubGVuZ3RoXTsgfSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlckNvbG9yOiBbJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiA0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJSYWRpdXM6IDgsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIHNldERhdGEoZGF0YVNldCk7XHJcbiAgICAgICAgfVxyXG4gICAgfSwgW3NsaWNlc10pO1xyXG4gICAgaWYgKCFkYXRhKSB7XHJcbiAgICAgICAgcmV0dXJuIF9qc3goX0ZyYWdtZW50LCB7fSk7XHJcbiAgICB9XHJcbiAgICByZXR1cm4gKF9qc3hzKF9GcmFnbWVudCwgeyBjaGlsZHJlbjogW3RpdGxlICYmIChfanN4KFRpdGxlTWVkaXVtLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICBtYXJnaW5Cb3R0b206IDE2LFxyXG4gICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiB0aXRsZSB9KSkpLCBfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAncm93JyB9LCB7IGNoaWxkcmVuOiBbX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAnY29sLTYnIH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IHNpemUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBzaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KERvdWdobnV0LCB7IGRhdGE6IGRhdGEsIG9wdGlvbnM6IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgb3B0aW9ucyksIHsgbWFpbnRhaW5Bc3BlY3RSYXRpbzogc2l6ZSA/IGZhbHNlIDogdHJ1ZSB9KSB9KSB9KSkgfSkpLCBfanN4KFwiZGl2XCIsIE9iamVjdC5hc3NpZ24oeyBjbGFzc05hbWU6ICdjb2wtNicsIHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nTGVmdDogNDgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGV4RGlyZWN0aW9uOiAnY29sdW1uJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnY2VudGVyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KFBpZUNoYXJ0LCB7IHNsaWNlczogc2xpY2VzV2l0aENvbG9yIH0pIH0pKV0gfSkpXSB9KSk7XHJcbn07XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPVBpZUNoYXJ0QW5hbHl0aWNzLmpzLm1hcCJdfQ== */")),b=t=>o(m,Object.assign({style:{padding:24}},{children:t.children})),u=t=>{let{title:g,slices:c,size:A}=t;const[a,m]=I([]),[b,u]=I();return C((()=>{const t=c.reduce(((t,o)=>t+o.count),0);let o=[];if(o=Object.keys(c).map(((t,o)=>Object.assign({color:n[o%n.length]},c[t]))),m([...o]),0===t){u({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}]})}else{const t={labels:c.map((t=>r.capitalize(t.name))),datasets:[{data:c.map((t=>t.count)),backgroundColor:c.map(((t,o)=>{var e;return null!==(e=t.color)&&void 0!==e?e:n[o%n.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};u(t)}}),[c]),b?i(e,{children:[g&&o(s,Object.assign({style:{marginBottom:16}},{children:g})),i("div",Object.assign({className:"row"},{children:[o("div",Object.assign({className:"col-6"},{children:o("div",Object.assign({style:{width:A,height:A}},{children:o(l,{data:b,options:Object.assign(Object.assign({},d),{maintainAspectRatio:!A})})}))})),o("div",Object.assign({className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"center"}},{children:o(p,{slices:a})}))]}))]}):o(e,{})};export{b as Card,u as PieChartAnalytics};
|
|
1
|
+
import t from"@emotion/styled/base";import{jsx as o,Fragment as e,jsxs as i}from"react/jsx-runtime";import r from"../../../../utils/StringUtils.js";import{COLORS as g}from"../../../../constants/Theme.js";import"../../../../constants/zindex.js";import{useState as I,useEffect as C}from"react";import"../../../checkBox/CheckBox.styled.js";import{TitleMedium as s}from"../../../TypographyStyle.js";import"../../../list-item/ListItem.js";import"../../../pagination/Pagination.js";import"../../../radioButton/RadioButton.styled.js";import"react-dom";import"react-toastify";import"../../../toaster/Toaster.styled.js";import"@tippyjs/react";import"../../../tooltips/TooltipInternal.js";import"../../../spinner/Spinner.js";import"../../../stepper/Stepper.styled.js";import"../../../tag/Tag.js";import"../../../icon-button/IconButton.js";import"../../../template-preview/TemplatePreview.js";import"../../../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import"../../../template-preview/models/TemplateMeta.js";import"../../../modals/styledModal.js";import"../../../template-preview/models/Channels.js";import"../../../template-context-mapper/context/templateModalContext.js";import"../../../template-context-mapper/modalElements/Footer.js";import"../../../template-context-mapper/modalElements/Body.js";import"../../../template-context-mapper/modalElements/Header.js";import"../../../zeroState/ZeroState.js";import"../../../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../../../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../../../button/Button.js";import"../../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../../../input/Input.js";import"react-bootstrap";import"../../../floating-action-button/FloatingActionButton.styles.js";import"../../../image-compress/ImageCompress.js";import"../../../progress-bar/ProgressBarComponent.js";import"../../../QueryBuilder/QueryBuilder.js";import"../../../QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js";import"../../../QueryBuilder/constants/connectorPosition.js";import"../../../QueryBuilder/constants/connector.js";import"../../../QueryBuilder/types/QueryBuilder.type.js";import"../../../dropdown/Dropdown.js";import"../../../QueryBuilder/components/InputLoader.js";import"../../../QueryBuilder/components/Connectors/Components/EmojiPicker.js";import"react-chips";import"../../../input/ChipInput.styled.js";import"../../../QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js";import"../../../QueryBuilder/components/Connectors/Components/IgPicker.js";import"../../../QueryBuilder/components/Connectors/Components/InTheLast.js";import"../../../QueryBuilder/components/Connectors/Components/InTwoLast.js";import"react-calendar";import"../../../../utils/DateUtils.js";import"../../../datePicker/DatePickerWrapper.styled.js";import"../../../QueryBuilder/components/Connectors/Connector.styled.js";import"../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.styled.js";import"../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.styled.js";import"../../../QueryBuilder/redux/queryBuilder.reducer.js";import"../../../QueryBuilder/redux/queryBuilderCache.reducer.js";import"../../../QueryBuilder/types/QueryBuilderOperator.type.js";import"../../../dropdown/DropdownPopover/index.js";import"../../../dropdown/ChipDropdown.js";import"../../../dropdown/MenuItem/MenuItem.js";import"../../../shimmer/ShimmerComponent/ShimmerStyled.js";import"../../../analytics-card/AnalyticsCard.styled.js";import"../../CommonStyles.js";import"../../../datePicker/DatePicker.styled.js";import"../../AnalyticsMetric.js";import"../LineChart/LineChart.js";import"../linearChipGroupedChart/LinearChipGroupedChart.styled.js";import{PieChart as p}from"./PieChart.js";import"../HorizontalBarGraph/HorizontalGraph.js";import"../StackedBarChart/StackedBarChart.js";import"../VerticalBarGraph/VerticalGraph.js";import"../heatmap/HeatMap.js";import"../VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js";import"../../../avatar/Avatar.js";import"../../../avatar/AvatarHelper.js";import"../../../alerts/Alert.styled.js";import"../../../alerts/AlertHelper.js";import"../../../thumbnail/Thumbnail.js";import"../../../curtain/Curtain.styled.js";import"../../../curtain/CurtainHelper.js";import"../../../switch/Switch.js";import"../../../plans/SubscriptionPlanStyled.js";import"../../../plans/SubscriptionPlanSelector.js";import"../../../tabs/Tabs.js";import"../../../TablePagination/TablePagination.styled.js";import"../../../TablePagination/TablePaginationCard.js";import"../../../states/StateComponent.js";import"../../../../_virtual/_tslib.js";import"../../../WhatsAppTextEditor/WhatsAppTextEditor.js";import"../../../WhatsAppTextEditor/WhatsAppTextEditorHeader.js";import"../../../card-selection-modal/CardSelectionModal.styled.js";import"react-image-crop";import"../../../buttonGroup/ButtonGroupStyle.js";import"../../../accordion/Accordion.style.js";import"../../../accordion/AccordionArrow.js";import"../../../file-uploader/FileUploaderStyle.js";import"../../../colourInput/ColourInput.styled.js";import"../../../bik-layout/CommonStyles.js";import"../../../navigation-hyperlink/NavigationHyperlink.js";import"../../../bik-layout/SidebarStyles.js";import"date-fns";import"react-popper";import"../../../dropdown/Common.styled.js";import"../../../custom-date-time/CustomDateTime.styled.js";import"../../../../node_modules/lodash.debounce/index.js";import"../../../product-picker/ProductPicker.styled.js";import"../../../discount-modal/type.js";import"../../../discount-modal/DiscountModal.styled.js";import"../../../discount-modal/DynamicCoupon/DynamicCoupon.js";import"../../../discount-modal/CouponExpiration/CouponExpiration.js";import"../../../country-code-picker/CountryCodePicker.styled.js";import"../../../product-picker-v2/emptyState.js";import"../../../product-picker-v2/style.js";import"lodash";import"../../../carousel/carousel.js";import"../../../carousel-secondary/CarouselSecondary.style.js";import"../../../access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.styles.js";import"../../../radioList/RadioList.styled.js";import"../../../checkList/CheckList.styled.js";import"../../../postPicker/postPicker.js";import"../../../dropdown-button/DropdownButton.style.js";import"../../../side-modal/SideModal.style.js";import"../../../add-variableV2/AddVariableV2.styled.js";import"../../../SearchFilter/types/SearchFilter.type.js";import"../../../SearchFilter/components/DatePickerButton.js";import"../../../input-with-vars/InputWithVariables.js";import"../../../star-rating/StarRating.js";import"../../../dashboard-review-popup/components/FiveStar.styled.js";import"../../../dashboard-review-popup/components/Form.styled.js";import"../../../dashboard-review-popup/components/ZeroState.js";import"../../../dashboard-review-popup/DashboardReviewPopUp.styled.js";import{Chart as c,ArcElement as a,Legend as A}from"chart.js";import{Doughnut as l}from"react-chartjs-2";c.register(a,A);const d={plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:t=>{if(!t.label)return" 0%";const o=t.dataset.data.reduce(((t,o)=>t+o),0),e=parseFloat((t.raw/o*100).toFixed(1));return` ${t.label}: ${e}%`}}}}},n=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],m=t("div","production"===process.env.NODE_ENV?{target:"elaov7f0"}:{target:"elaov7f0",label:"CartStyled"})("background:",(t=>g.surface.standard),";border:1px solid ",(t=>g.stroke.primary),";border-radius:4px;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQzhCIiwiZmlsZSI6IlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGpzeCBhcyBfanN4LCBGcmFnbWVudCBhcyBfRnJhZ21lbnQsIGpzeHMgYXMgX2pzeHMgfSBmcm9tIFwicmVhY3QvanN4LXJ1bnRpbWVcIjtcclxuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgeyBTdHJpbmdVdGlscyB9IGZyb20gXCIuLi8uLi8uLi8uLi9pbmRleFwiO1xyXG5pbXBvcnQgeyBBcmNFbGVtZW50LCBDaGFydCBhcyBDaGFydEpTLCBMZWdlbmQgfSBmcm9tICdjaGFydC5qcyc7XHJcbmltcG9ydCB7IHVzZUVmZmVjdCwgdXNlU3RhdGUgfSBmcm9tICdyZWFjdCc7XHJcbmltcG9ydCB7IERvdWdobnV0IH0gZnJvbSAncmVhY3QtY2hhcnRqcy0yJztcclxuaW1wb3J0IHsgVGl0bGVNZWRpdW0gfSBmcm9tIFwiLi4vLi4vLi4vVHlwb2dyYXBoeVN0eWxlXCI7XHJcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gXCIuLi8uLi8uLi8uLi9jb25zdGFudHMvVGhlbWVcIjtcclxuaW1wb3J0IHsgUGllQ2hhcnQgfSBmcm9tICcuL1BpZUNoYXJ0JztcclxuQ2hhcnRKUy5yZWdpc3RlcihBcmNFbGVtZW50LCBMZWdlbmQpO1xyXG5jb25zdCBvcHRpb25zID0ge1xyXG4gICAgcGx1Z2luczoge1xyXG4gICAgICAgIGxlZ2VuZDoge1xyXG4gICAgICAgICAgICBkaXNwbGF5OiBmYWxzZSxcclxuICAgICAgICB9LFxyXG4gICAgICAgIHRvb2x0aXA6IHtcclxuICAgICAgICAgICAgZW5hYmxlZDogdHJ1ZSxcclxuICAgICAgICAgICAgY2FsbGJhY2tzOiB7XHJcbiAgICAgICAgICAgICAgICBsYWJlbDogKHRvb2x0aXBJdGVtKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0b29sdGlwSXRlbS5sYWJlbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYCAwJWA7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRvdGFsID0gdG9vbHRpcEl0ZW0uZGF0YXNldC5kYXRhLnJlZHVjZSgoYWNjLCBjdXIpID0+IGFjYyArIGN1ciwgMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGVyY2VudGFnZSA9IHBhcnNlRmxvYXQoKCh0b29sdGlwSXRlbS5yYXcgLyB0b3RhbCkgKiAxMDApLnRvRml4ZWQoMSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBgICR7dG9vbHRpcEl0ZW0ubGFiZWx9OiAke3BlcmNlbnRhZ2V9JWA7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0sXHJcbiAgICB9LFxyXG59O1xyXG5jb25zdCBHUkFQSF9DT0xPUlMgPSBbXHJcbiAgICAnIzVFMDdCQicsXHJcbiAgICAnIzlFNzdFRCcsXHJcbiAgICAnI0QyQUVGRicsXHJcbiAgICAnI0NERTFGRicsXHJcbiAgICAnIzkyQUZGQScsXHJcbiAgICAnIzM5MzVFMScsXHJcbl07XHJcbmNvbnN0IENhcnRTdHlsZWQgPSBzdHlsZWQuZGl2IGBcblx0YmFja2dyb3VuZDogJHsocHJvcHMpID0+IENPTE9SUy5zdXJmYWNlLnN0YW5kYXJkfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsocHJvcHMpID0+IENPTE9SUy5zdHJva2UucHJpbWFyeX07XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcbmA7XHJcbmV4cG9ydCBjb25zdCBDYXJkID0gKHByb3BzKSA9PiB7XHJcbiAgICByZXR1cm4gX2pzeChDYXJ0U3R5bGVkLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHsgcGFkZGluZzogMjQgfSB9LCB7IGNoaWxkcmVuOiBwcm9wcy5jaGlsZHJlbiB9KSk7XHJcbn07XHJcbmV4cG9ydCBjb25zdCBQaWVDaGFydEFuYWx5dGljcyA9ICh7IHRpdGxlLCBzbGljZXMsIHNpemUsIH0pID0+IHtcclxuICAgIGNvbnN0IFtzbGljZXNXaXRoQ29sb3IsIHNldFNsaWNlc1dpdGhDb2xvcl0gPSB1c2VTdGF0ZShbXSk7XHJcbiAgICBjb25zdCBbZGF0YSwgc2V0RGF0YV0gPSB1c2VTdGF0ZSgpO1xyXG4gICAgdXNlRWZmZWN0KCgpID0+IHtcclxuICAgICAgICBjb25zdCB0b3RhbFN1bSA9IHNsaWNlcy5yZWR1Y2UoKHN1bSwgc2xpY2UpID0+IHN1bSArIHNsaWNlLmNvdW50LCAwKTtcclxuICAgICAgICBsZXQgdXBkYXRlZFNsaWNlc1dpdGhDb2xvciA9IFtdO1xyXG4gICAgICAgIHVwZGF0ZWRTbGljZXNXaXRoQ29sb3IgPSBPYmplY3Qua2V5cyhzbGljZXMpLm1hcCgoa2V5LCBpbmRleCkgPT4gKE9iamVjdC5hc3NpZ24oeyBjb2xvcjogR1JBUEhfQ09MT1JTW2luZGV4ICUgR1JBUEhfQ09MT1JTLmxlbmd0aF0gfSwgc2xpY2VzW2tleV0pKSk7XHJcbiAgICAgICAgc2V0U2xpY2VzV2l0aENvbG9yKFsuLi51cGRhdGVkU2xpY2VzV2l0aENvbG9yXSk7XHJcbiAgICAgICAgaWYgKHRvdGFsU3VtID09PSAwKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGRhdGFTZXQgPSB7XHJcbiAgICAgICAgICAgICAgICBkYXRhc2V0czogW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogWzEwMF0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogWycjRjBGMEYwJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiAwLFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgY29uc3QgZGF0YVNldCA9IHtcclxuICAgICAgICAgICAgICAgIGxhYmVsczogc2xpY2VzLm1hcCgoc2xpY2UpID0+IFN0cmluZ1V0aWxzLmNhcGl0YWxpemUoc2xpY2UubmFtZSkpLFxyXG4gICAgICAgICAgICAgICAgZGF0YXNldHM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IHNsaWNlcy5tYXAoKHNsaWNlKSA9PiBzbGljZS5jb3VudCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogc2xpY2VzLm1hcCgoc2xpY2UsIGluZGV4KSA9PiB7IHZhciBfYTsgcmV0dXJuIChfYSA9IHNsaWNlLmNvbG9yKSAhPT0gbnVsbCAmJiBfYSAhPT0gdm9pZCAwID8gX2EgOiBHUkFQSF9DT0xPUlNbaW5kZXggJSBHUkFQSF9DT0xPUlMubGVuZ3RoXTsgfSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlckNvbG9yOiBbJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiA0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJSYWRpdXM6IDgsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIHNldERhdGEoZGF0YVNldCk7XHJcbiAgICAgICAgfVxyXG4gICAgfSwgW3NsaWNlc10pO1xyXG4gICAgaWYgKCFkYXRhKSB7XHJcbiAgICAgICAgcmV0dXJuIF9qc3goX0ZyYWdtZW50LCB7fSk7XHJcbiAgICB9XHJcbiAgICByZXR1cm4gKF9qc3hzKF9GcmFnbWVudCwgeyBjaGlsZHJlbjogW3RpdGxlICYmIChfanN4KFRpdGxlTWVkaXVtLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICBtYXJnaW5Cb3R0b206IDE2LFxyXG4gICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiB0aXRsZSB9KSkpLCBfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAncm93JyB9LCB7IGNoaWxkcmVuOiBbX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAnY29sLTYnIH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IHNpemUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBzaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KERvdWdobnV0LCB7IGRhdGE6IGRhdGEsIG9wdGlvbnM6IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgb3B0aW9ucyksIHsgbWFpbnRhaW5Bc3BlY3RSYXRpbzogc2l6ZSA/IGZhbHNlIDogdHJ1ZSB9KSB9KSB9KSkgfSkpLCBfanN4KFwiZGl2XCIsIE9iamVjdC5hc3NpZ24oeyBjbGFzc05hbWU6ICdjb2wtNicsIHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nTGVmdDogNDgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGV4RGlyZWN0aW9uOiAnY29sdW1uJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnY2VudGVyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KFBpZUNoYXJ0LCB7IHNsaWNlczogc2xpY2VzV2l0aENvbG9yIH0pIH0pKV0gfSkpXSB9KSk7XHJcbn07XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPVBpZUNoYXJ0QW5hbHl0aWNzLmpzLm1hcCJdfQ== */")),b=t=>o(m,Object.assign({style:{padding:24}},{children:t.children})),u=t=>{let{title:g,slices:c,size:a}=t;const[A,m]=I([]),[b,u]=I();return C((()=>{const t=c.reduce(((t,o)=>t+o.count),0);let o=[];if(o=Object.keys(c).map(((t,o)=>Object.assign({color:n[o%n.length]},c[t]))),m([...o]),0===t){u({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}]})}else{const t={labels:c.map((t=>r.capitalize(t.name))),datasets:[{data:c.map((t=>t.count)),backgroundColor:c.map(((t,o)=>{var e;return null!==(e=t.color)&&void 0!==e?e:n[o%n.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};u(t)}}),[c]),b?i(e,{children:[g&&o(s,Object.assign({style:{marginBottom:16}},{children:g})),i("div",Object.assign({className:"row"},{children:[o("div",Object.assign({className:"col-6"},{children:o("div",Object.assign({style:{width:a,height:a}},{children:o(l,{data:b,options:Object.assign(Object.assign({},d),{maintainAspectRatio:!a})})}))})),o("div",Object.assign({className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"center"}},{children:o(p,{slices:A})}))]}))]}):o(e,{})};export{b as Card,u as PieChartAnalytics};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as r,jsxs as
|
|
1
|
+
import{jsx as e,Fragment as r,jsxs as n}from"react/jsx-runtime";import{BikLayoutContainer as o}from"./CommonStyles.js";import{FeatureModal as i}from"./FeatureModal.js";import{PageLoader as a}from"./PageLoader.js";const t=t=>{const{isLoading:s,isFeatureModalEnabled:d=!1,isDisabled:l=!1,loadingAnimation:c,hidePadding:p=!1,height:m,children:g,containerStyles:h,onClickingCrossOnFeatureModal:j,onUpgrade:b,extraContentForModal:u,featureModalProps:C,type:f}=t;return s?e(o,{children:c||e(a,{})}):e(r,{children:n(o,Object.assign({type:f},{children:[e("div",{className:""+(l?"disabled--wrapper":"")}),e("div",Object.assign({className:""+(p?"inner-wrapper":"inner-wrapper pd-24"),style:Object.assign({height:`${m||""}`},null!=h?h:{})},{children:g})),d&&e(i,Object.assign({showBookADemo:!0,onClickingCross:()=>j?j():"",onUpgrade:b},C,{otherContent:u}))]}))})};export{t as BikLayout};
|
|
@@ -14,6 +14,8 @@ export declare const LoadingMessageWrapper: import("@emotion/styled").StyledComp
|
|
|
14
14
|
export declare const BikLayoutContainer: import("@emotion/styled").StyledComponent<{
|
|
15
15
|
theme?: import("@emotion/react").Theme | undefined;
|
|
16
16
|
as?: import("react").ElementType<any> | undefined;
|
|
17
|
+
} & {
|
|
18
|
+
type?: "overflow-within" | "overflow-body" | undefined;
|
|
17
19
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
18
20
|
export declare const BikHeaderWrapper: import("@emotion/styled").StyledComponent<{
|
|
19
21
|
theme?: import("@emotion/react").Theme | undefined;
|