@bikdotai/bik-component-library 0.0.499 → 0.0.500-beta-0

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.
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
2
+ import { QueryBuilderNodeProps } from "../../../Types/QueryBuilderNodeProps.type";
3
3
  declare const EventsTrigger: React.FC<QueryBuilderNodeProps>;
4
4
  export default EventsTrigger;
@@ -1,2 +1,2 @@
1
- import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
1
+ import { QueryBuilderAPIData } from "../../../Types/QueryBuilderAPI.type";
2
2
  export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
2
+ import { QueryBuilderNodeProps } from "../../../Types/QueryBuilderNodeProps.type";
3
3
  declare const IGTrigger: React.FC<QueryBuilderNodeProps>;
4
4
  export default IGTrigger;
@@ -1,2 +1,2 @@
1
- import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
1
+ import { QueryBuilderAPIData } from "../../../Types/QueryBuilderAPI.type";
2
2
  export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { DropdownOption } from "../../../dropdown/type";
3
- import { QueryBuilderProperty } from "../../types/QueryBuilder.type";
4
- import { QueryBuilderNodeProps } from "../../types/QueryBuilderNodeProps.type";
3
+ import { QueryBuilderProperty } from "../../Types/QueryBuilder.type";
4
+ import { QueryBuilderNodeProps } from "../../Types/QueryBuilderNodeProps.type";
5
5
  declare const BaseTriggerQueryBuilderNode: React.FC<QueryBuilderNodeProps & {
6
6
  cacheKey: string;
7
7
  propertyAddBtnText: string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("react"),t=require("react-bootstrap"),n=require("../../constants/Theme.js"),s=require("../datePicker/DatePicker.js"),i=require("../TypographyStyle.js"),l=require("./CommonStyles.js");const a=o=>{let{eachOption:t,selectedOption:s,selectedDate:a,onClickingEachItem:c,rangeSelection:r}=o;return e.jsxs(l.ItemMenuContainer,Object.assign({onClick:()=>c(t),isSelected:t.isCustom?t.key==(null==s?void 0:s.key)&&!!a:t.key==(null==s?void 0:s.key)},{children:[e.jsx(i.BodySecondary,Object.assign({color:t.key==(null==s?void 0:s.key)?n.BASE_COLORS.positive[900]:n.BASE_COLORS.grayscale[900]},{children:t.label})),a&&(null==s?void 0:s.isCustom)&&t.key==(null==s?void 0:s.key)&&e.jsx(i.BodyCaption,{children:r?`${d(a[0])} to ${d(a[1])}`:`${d(a[0])}`})]}),t.key)},d=e=>e.toLocaleString("default",{day:"numeric",month:"short",year:"numeric"});exports.AnalyticsDropdown=c=>{let{options:r,placeholder:u="Select an option",selected:p,onOptionSelected:g,resetDropdown:v,maxHeight:m,backgroundColor:O,calendarPopperConfig:j,variant:D="default",datePickerPlacement:y,closeDropdown:S}=c;var b,h,x;const[f,k]=o.useState(!1),[w,C]=o.useState(p),[R,E]=o.useState(),[T,A]=o.useState(!1),M=()=>{!f&&A(!T)},[q,P]=o.useState(p),$="small"===D?i.Caption:i.BodySecondary;return o.useEffect((()=>{v&&C(void 0)}),[v]),o.useEffect((()=>{var e;(null==p?void 0:p.isCustom)&&(null===(e=p.dateRangeSelectionOptions)||void 0===e?void 0:e.selectedDates)?E(p.dateRangeSelectionOptions.selectedDates):E(void 0),C(p)}),[p]),o.useEffect((()=>{A(!1),k(!1)}),[S]),e.jsx(e.Fragment,{children:e.jsxs(l.MainDropdown,Object.assign({drop:"down",show:T,onToggle:M,backgroundColor:O,id:"analytic-dropdown"},{children:[e.jsx(t.Dropdown.Toggle,Object.assign({id:"dropdown-autoclose-outside",className:"main--dropdown",style:"small"===D?{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",backgroundColor:"#FAFAFA",borderRadius:4,border:`1px solid ${n.DEFAULT_THEME.colorsV2.stroke.primary}`}:void 0},{children:e.jsx($,Object.assign({style:"small"===D?{color:n.DEFAULT_THEME.colorsV2.content.secondary}:void 0},{children:(null==w?void 0:w.isCustom)?R?d(R[0])===d(R[1])?`${d(R[0])}`:`${d(R[0])} to ${d(R[1])}`:null==q?void 0:q.label:w?null==w?void 0:w.label:u}))})),e.jsx(t.Dropdown.Menu,Object.assign({className:"main--dropdown"},{children:e.jsxs(l.MainDropdown,Object.assign({drop:null!=y?y:"end",id:"sub--dropdown",show:f,onToggle:e=>{!e&&A(!1),k(!f)}},{children:[e.jsx("div",Object.assign({style:{maxHeight:m||"auto",overflowY:"scroll"}},{children:r.map((o=>{var n;return e.jsx("div",{children:(null==o?void 0:o.isCustom)?e.jsx(t.Dropdown.Toggle,Object.assign({className:"sub--dropdown"},{children:e.jsx(a,{eachOption:o,selectedOption:w,selectedDate:R,onClickingEachItem:e=>{C(e),k(!0)},rangeSelection:!!(null===(n=null==o?void 0:o.dateRangeSelectionOptions)||void 0===n?void 0:n.selectRange)})})):e.jsx(a,{eachOption:o,selectedOption:w,selectedDate:R,onClickingEachItem:e=>{if(E(void 0),C(e),P(e),M(),!e.noOfDays)return void g(e);const o=new Date,t=new Date;t.setDate(o.getDate()-e.noOfDays),g(Object.assign(Object.assign({},e),{selectedRange:[t,o]}))}})},null==o?void 0:o.key)}))})),e.jsx(t.Dropdown.Menu,Object.assign({className:"sub--dropdown",popperConfig:{modifiers:[{name:"offset",options:{offset:[(null==j?void 0:j.offsetSkid)||0,(null==j?void 0:j.offsetDistance)||0]}}]}},{children:e.jsx(s.DatePicker,{selectRange:(null===(b=null==w?void 0:w.dateRangeSelectionOptions)||void 0===b?void 0:b.selectRange)||!1,maxDate:null===(h=null==w?void 0:w.dateRangeSelectionOptions)||void 0===h?void 0:h.maxDate,minDate:null===(x=null==w?void 0:w.dateRangeSelectionOptions)||void 0===x?void 0:x.minDate,selectedDates:R,onSelectRange:(e,o)=>{const t=[e,o];(null==w?void 0:w.dateRangeSelectionOptions)&&(w.dateRangeSelectionOptions.selectedDates=t,g(Object.assign(Object.assign({},w),{selectedRange:[e,o]}))),P(w),k(!1),E(t),A(!T)},onSelectDate:e=>{(null==w?void 0:w.dateRangeSelectionOptions)&&(w.dateRangeSelectionOptions.selectedDates=[e,e],g(Object.assign(Object.assign({},w),{selectedRange:[e,e]}))),P(w),k(!1),E([e,e]),A(!T)}})}))]}))}))]}))})},exports.EachItem=a,exports.formatDate=d;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("react"),t=require("react-bootstrap"),n=require("../../constants/Theme.js"),s=require("../datePicker/DatePicker.js"),i=require("../TypographyStyle.js"),l=require("./CommonStyles.js");const a=o=>{let{eachOption:t,selectedOption:s,selectedDate:a,onClickingEachItem:c,rangeSelection:r}=o;return e.jsxs(l.ItemMenuContainer,Object.assign({onClick:()=>c(t),isSelected:t.isCustom?t.key==(null==s?void 0:s.key)&&!!a:t.key==(null==s?void 0:s.key)},{children:[e.jsx(i.BodySecondary,Object.assign({color:t.key==(null==s?void 0:s.key)?n.BASE_COLORS.positive[900]:n.BASE_COLORS.grayscale[900]},{children:t.label})),a&&(null==s?void 0:s.isCustom)&&t.key==(null==s?void 0:s.key)&&e.jsx(i.BodyCaption,{children:r?`${d(a[0])} to ${d(a[1])}`:`${d(a[0])}`})]}),t.key)},d=e=>e.toLocaleString("default",{day:"numeric",month:"short",year:"numeric"});exports.AnalyticsDropdown=c=>{let{options:r,placeholder:u="Select an option",selected:p,onOptionSelected:g,resetDropdown:v,maxHeight:m,backgroundColor:O,calendarPopperConfig:j,variant:D="default",datePickerPlacement:y,closeDropdown:S}=c;var b,h,x;const[f,k]=o.useState(!1),[w,C]=o.useState(p),[R,E]=o.useState(),[T,A]=o.useState(!1),M=()=>{!f&&A(!T)},[q,P]=o.useState(p),$="small"===D?i.Caption:i.BodySecondary;return o.useEffect((()=>{v&&C(void 0)}),[v]),o.useEffect((()=>{var e;(null==p?void 0:p.isCustom)&&(null===(e=p.dateRangeSelectionOptions)||void 0===e?void 0:e.selectedDates)?E(p.dateRangeSelectionOptions.selectedDates):E(void 0),C(p)}),[p]),o.useEffect((()=>{A(!1),k(!1)}),[S]),e.jsx(e.Fragment,{children:e.jsxs(l.MainDropdown,Object.assign({drop:"down",show:T,onToggle:M,backgroundColor:O,id:"analytic-dropdown"},{children:[e.jsx(t.Dropdown.Toggle,Object.assign({id:"dropdown-autoclose-outside",className:"main--dropdown",style:"small"===D?{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",backgroundColor:"#FAFAFA",borderRadius:4,border:`1px solid ${n.DEFAULT_THEME.colorsV2.stroke.primary}`}:void 0},{children:e.jsx($,Object.assign({style:"small"===D?{color:n.DEFAULT_THEME.colorsV2.content.secondary}:void 0},{children:(null==w?void 0:w.isCustom)?R?d(R[0])===d(R[1])?`${d(R[0])}`:`${d(R[0])} to ${d(R[1])}`:(null==q?void 0:q.label)?null==q?void 0:q.label:u:w?null==w?void 0:w.label:u}))})),e.jsx(t.Dropdown.Menu,Object.assign({className:"main--dropdown"},{children:e.jsxs(l.MainDropdown,Object.assign({drop:null!=y?y:"end",id:"sub--dropdown",show:f,onToggle:e=>{!e&&A(!1),k(!f)}},{children:[e.jsx("div",Object.assign({style:{maxHeight:m||"auto",overflowY:"scroll"}},{children:r.map((o=>{var n;return e.jsx("div",{children:(null==o?void 0:o.isCustom)?e.jsx(t.Dropdown.Toggle,Object.assign({className:"sub--dropdown"},{children:e.jsx(a,{eachOption:o,selectedOption:w,selectedDate:R,onClickingEachItem:e=>{C(e),k(!0)},rangeSelection:!!(null===(n=null==o?void 0:o.dateRangeSelectionOptions)||void 0===n?void 0:n.selectRange)})})):e.jsx(a,{eachOption:o,selectedOption:w,selectedDate:R,onClickingEachItem:e=>{if(E(void 0),C(e),P(e),M(),!e.noOfDays)return void g(e);const o=new Date,t=new Date;t.setDate(o.getDate()-e.noOfDays),g(Object.assign(Object.assign({},e),{selectedRange:[t,o]}))}})},null==o?void 0:o.key)}))})),e.jsx(t.Dropdown.Menu,Object.assign({className:"sub--dropdown",popperConfig:{modifiers:[{name:"offset",options:{offset:[(null==j?void 0:j.offsetSkid)||0,(null==j?void 0:j.offsetDistance)||0]}}]}},{children:e.jsx(s.DatePicker,{selectRange:(null===(b=null==w?void 0:w.dateRangeSelectionOptions)||void 0===b?void 0:b.selectRange)||!1,maxDate:null===(h=null==w?void 0:w.dateRangeSelectionOptions)||void 0===h?void 0:h.maxDate,minDate:null===(x=null==w?void 0:w.dateRangeSelectionOptions)||void 0===x?void 0:x.minDate,selectedDates:R,onSelectRange:(e,o)=>{const t=[e,o];(null==w?void 0:w.dateRangeSelectionOptions)&&(w.dateRangeSelectionOptions.selectedDates=t,g(Object.assign(Object.assign({},w),{selectedRange:[e,o]}))),P(w),k(!1),E(t),A(!T)},onSelectDate:e=>{(null==w?void 0:w.dateRangeSelectionOptions)&&(w.dateRangeSelectionOptions.selectedDates=[e,e],g(Object.assign(Object.assign({},w),{selectedRange:[e,e]}))),P(w),k(!1),E([e,e]),A(!T)}})}))]}))}))]}))})},exports.EachItem=a,exports.formatDate=d;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("../../assets/icons/Bik_logo.svg.js"),n=require("react"),t=require("../../constants/Theme.js"),o=require("../navigation-hyperlink/NavigationHyperlink.js"),s=require("./SidebarPopup.js"),l=require("./SidebarStyles.js"),d=require("./SimpleSidebar.js");const r=i=>{const{icon:n,isActive:o,activeStateIcon:s,hoverStateIcon:l,isHovered:d}=i,r=n,a=s,u=l;return e.jsx(e.Fragment,{children:o?e.jsx(a,{width:20,height:20}):d?e.jsx(u,{width:20,height:20,color:t.COLORS.surface.standard}):e.jsx(r,{width:20,height:20,color:t.COLORS.surface.standard})})};exports.BikSidebar=t=>{const{logoSvg:a,allMenuList:u,activeMainMenu:c,activeSubMenu:v,router:h,onClickingMainMenu:g,onClickingSubMenu:m,onClickingAccessUpgradePanel:p,onClickingPopupMenuItem:j,popupMinHeight:y,isNewSidebar:S}=t,[k,b]=n.useState(c),[x,w]=n.useState(),[M,N]=n.useState(v),[f,O]=n.useState(!1),[C,L]=n.useState(),[I,B]=n.useState(),[E,q]=n.useState();n.useEffect((()=>{b(c)}),[c]),n.useEffect((()=>{N(v)}),[v]);const H=e=>{var i,n;if(w(void 0),L(void 0),"popup"==(null==e?void 0:e.layout)){const i=A();i&&B(i),L(e)}else{const t=document.getElementById((null===(n=null===(i=e.displayName)||void 0===i?void 0:i.split(" "))||void 0===n?void 0:n.join(""))||e.key.toString());if(t){const e=t.getBoundingClientRect().top;q(e)}w(e)}},P=(i,n)=>{var t,o,s,l,d,a;return e.jsxs("div",Object.assign({id:(null===(o=null===(t=i.displayName)||void 0===t?void 0:t.split(" "))||void 0===o?void 0:o.join(""))||i.key.toString(),className:"main--sidebar",onClick:()=>(e=>{var i;"popup"!==(null==e?void 0:e.layout)&&(L(void 0),w(void 0),O(!0),b(e),!e.path&&g(e),(null===(i=null==e?void 0:e.children)||void 0===i?void 0:i.length)?N(null==e?void 0:e.children[0]):N({}),w(void 0),setTimeout((()=>{O(!1)}),1e3))})(i),onMouseEnter:()=>{!f&&H(i)},onMouseOver:()=>{!f&&H(i)},onMouseLeave:()=>{var e;(null===(e=null==i?void 0:i.children)||void 0===e?void 0:e.length)||(w(void 0),L(void 0))},onFocus:()=>{console.log(";")},"aria-hidden":"true"},{children:[i.isNew&&e.jsx("div",Object.assign({className:"new-tag"},{children:" NEW"})),e.jsxs("div",Object.assign({id:(null===(l=null===(s=i.displayName)||void 0===s?void 0:s.split(" "))||void 0===l?void 0:l.join(""))+"_sub"||i.key.toString()+"_sub",className:`sidebar-menu-item ${(null==k?void 0:k.key)==i.key?" main-menu-active-class":""} ${i.isLastSticky?"sticky-menu-int":""} ${i.is2ndLastSticky?"sticky-menu":""}\n\t\t\t\t\t${i.key==(null==x?void 0:x.key)?"sidebar-menu-item-hover":""}\`}\n\t\t\t\t\t${i.isNew?"new-menu-item":""}`},{children:[e.jsx(r,{icon:i.icon,isActive:i.key==(null==k?void 0:k.key),activeStateIcon:null!==(d=i.activeIcon)&&void 0!==d?d:{},hoverStateIcon:null!==(a=i.hoverIcon)&&void 0!==a?a:{},isHovered:i.key==(null==x?void 0:x.key)}),e.jsx("div",Object.assign({className:"menu-item-container"},{children:e.jsx("p",Object.assign({className:"menu-item-text "+((null==i?void 0:i.key)===(null==k?void 0:k.key)?"active-menu-item-text":"")},{children:i.displayName}))}))]}),n)]}),n)};n.useEffect((()=>{const e=()=>{const e=A();e&&B(e),_()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const _=()=>{const e=document.getElementById("_sub-menu"),i=null==e?void 0:e.getBoundingClientRect().height;i&&q(window.innerHeight-i)},A=()=>{var e,i;if(C){const n=(null===(i=null===(e=C.displayName)||void 0===e?void 0:e.split(" "))||void 0===i?void 0:i.join(""))+"_sub"||C.key.toString()+"_sub",t=document.getElementById(n);if(t){const e=t.getBoundingClientRect();let i=e.top;const n=null!=y?y:320;return e.bottom+n>window.innerHeight&&(i-=e.bottom+n-window.innerHeight),i}return null}};return e.jsxs(l.SideBarContainer,{children:[e.jsx("div",Object.assign({className:"bik-header-logo",onClick:()=>{},onKeyDown:()=>{},"aria-hidden":"true"},{children:a||e.jsx(i.default,{})})),e.jsx(l.SibeBarMenuItem,{children:null==u?void 0:u.map(((i,t)=>{var l,r;return e.jsxs(n.Fragment,{children:[i.path?e.jsx(o.NavigationHyperlink,Object.assign({href:i.path,router:h},{children:P(i,t)})):P(i,t),e.jsxs(e.Fragment,{children:["popup"===i.layout&&(null===(l=null==C?void 0:C.children)||void 0===l?void 0:l.length)&&e.jsx(s.SidebarPopup,{top:null!=I?I:void 0,menuList:null==C?void 0:C.children,onClickingPopupMenu:e=>{j&&j(e),L(void 0)},onMouseLeaveOnMenu:()=>L(void 0)}),(null===(r=null==x?void 0:x.children)||void 0===r?void 0:r.length)&&e.jsx(d.SimpleSidebar,{menuList:null==x?void 0:x.children,activeMenu:M,onMouseLeaveOnMenu:()=>w(void 0),left:S?92:88,postion:"fixed",header:x.displayName,theme:"brand",router:h,showAccessUpgradePanel:x.showAccessUpgradePanel,onMenuClick:(e,i)=>{N(e),b(x),w(void 0),L(void 0),i&&m(e)},onUpgrade:p,top:S&&E||0,isNewSidebar:S})]})]},t)}))})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("../../assets/icons/Bik_logo.svg.js"),n=require("react"),t=require("../../constants/Theme.js"),o=require("../navigation-hyperlink/NavigationHyperlink.js"),s=require("./SidebarPopup.js"),l=require("./SidebarStyles.js"),d=require("./SimpleSidebar.js");const r=i=>{const{icon:n,isActive:o,activeStateIcon:s,hoverStateIcon:l,isHovered:d}=i,r=n,a=s,u=l;return e.jsx(e.Fragment,{children:o?e.jsx(a,{width:20,height:20}):d?e.jsx(u,{width:20,height:20,color:t.COLORS.surface.standard}):e.jsx(r,{width:20,height:20,color:t.COLORS.surface.standard})})};exports.BikSidebar=t=>{const{logoSvg:a,allMenuList:u,activeMainMenu:c,activeSubMenu:v,router:h,onClickingMainMenu:g,onClickingSubMenu:m,onClickingAccessUpgradePanel:p,onClickingPopupMenuItem:j,popupMinHeight:y,isNewSidebar:S}=t,[k,b]=n.useState(c),[x,w]=n.useState(),[M,N]=n.useState(v),[f,O]=n.useState(!1),[C,L]=n.useState(),[I,B]=n.useState(),[E,q]=n.useState();n.useEffect((()=>{b(c)}),[c]),n.useEffect((()=>{N(v)}),[v]);const H=e=>{var i,n;if(w(void 0),L(void 0),"popup"==(null==e?void 0:e.layout)){const i=A();i&&B(i),L(e)}else{const t=document.getElementById((null===(n=null===(i=e.displayName)||void 0===i?void 0:i.split(" "))||void 0===n?void 0:n.join(""))||e.key.toString());if(t){const e=t.getBoundingClientRect().top;q(e)}w(e)}},P=(i,n)=>{var t,o,s,l,d,a;return e.jsxs("div",Object.assign({id:(null===(o=null===(t=i.displayName)||void 0===t?void 0:t.split(" "))||void 0===o?void 0:o.join(""))||i.key.toString(),className:"main--sidebar",onClick:()=>(e=>{var i;"popup"!==(null==e?void 0:e.layout)&&(L(void 0),w(void 0),O(!0),b(e),!e.path&&g(e),(null===(i=null==e?void 0:e.children)||void 0===i?void 0:i.length)?N(null==e?void 0:e.children[0]):N({}),w(void 0),setTimeout((()=>{O(!1)}),1e3))})(i),onMouseEnter:()=>{!f&&H(i)},onMouseOver:()=>{!f&&H(i)},onMouseLeave:()=>{var e;(null===(e=null==i?void 0:i.children)||void 0===e?void 0:e.length)||(w(void 0),L(void 0))},onFocus:()=>{console.log(";")},"aria-hidden":"true"},{children:[i.isNew&&e.jsx("div",Object.assign({className:"new-tag"},{children:" NEW"})),e.jsxs("div",Object.assign({id:(null===(l=null===(s=i.displayName)||void 0===s?void 0:s.split(" "))||void 0===l?void 0:l.join(""))+"_sub"||i.key.toString()+"_sub",className:`sidebar-menu-item ${(null==k?void 0:k.key)==i.key?" main-menu-active-class":""} ${i.isLastSticky?"sticky-menu-int":""} ${i.is2ndLastSticky?"sticky-menu":""}\n\t\t\t\t\t${i.key==(null==x?void 0:x.key)?"sidebar-menu-item-hover":""}\`}\n\t\t\t\t\t${i.isNew?"new-menu-item":""}`},{children:[e.jsx(r,{icon:i.icon,isActive:i.key==(null==k?void 0:k.key),activeStateIcon:null!==(d=i.activeIcon)&&void 0!==d?d:{},hoverStateIcon:null!==(a=i.hoverIcon)&&void 0!==a?a:{},isHovered:i.key==(null==x?void 0:x.key)||i.key==(null==C?void 0:C.key)}),e.jsx("div",Object.assign({className:"menu-item-container"},{children:e.jsx("p",Object.assign({className:"menu-item-text "+((null==i?void 0:i.key)===(null==k?void 0:k.key)?"active-menu-item-text":"")},{children:i.displayName}))}))]}),n)]}),n)};n.useEffect((()=>{const e=()=>{const e=A();e&&B(e),_()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const _=()=>{const e=document.getElementById("_sub-menu"),i=null==e?void 0:e.getBoundingClientRect().height;i&&q(window.innerHeight-i)},A=()=>{var e,i;if(C){const n=(null===(i=null===(e=C.displayName)||void 0===e?void 0:e.split(" "))||void 0===i?void 0:i.join(""))+"_sub"||C.key.toString()+"_sub",t=document.getElementById(n);if(t){const e=t.getBoundingClientRect();let i=e.top;const n=null!=y?y:320;return e.bottom+n>window.innerHeight&&(i-=e.bottom+n-window.innerHeight),i}return null}};return e.jsxs(l.SideBarContainer,{children:[e.jsx("div",Object.assign({className:"bik-header-logo",onClick:()=>{},onKeyDown:()=>{},"aria-hidden":"true"},{children:a||e.jsx(i.default,{})})),e.jsx(l.SibeBarMenuItem,{children:null==u?void 0:u.map(((i,t)=>{var l,r;return e.jsxs(n.Fragment,{children:[i.path?e.jsx(o.NavigationHyperlink,Object.assign({href:i.path,router:h},{children:P(i,t)})):P(i,t),e.jsxs(e.Fragment,{children:["popup"===i.layout&&(null===(l=null==C?void 0:C.children)||void 0===l?void 0:l.length)&&e.jsx(s.SidebarPopup,{top:null!=I?I:void 0,menuList:null==C?void 0:C.children,onClickingPopupMenu:e=>{j&&j(e),L(void 0)},onMouseLeaveOnMenu:()=>L(void 0)}),(null===(r=null==x?void 0:x.children)||void 0===r?void 0:r.length)&&e.jsx(d.SimpleSidebar,{menuList:null==x?void 0:x.children,activeMenu:M,onMouseLeaveOnMenu:()=>w(void 0),left:S?92:88,postion:"fixed",header:x.displayName,theme:"brand",router:h,showAccessUpgradePanel:x.showAccessUpgradePanel,onMenuClick:(e,i)=>{N(e),b(x),w(void 0),L(void 0),i&&m(e)},onUpgrade:p,top:S&&E||0,isNewSidebar:S})]})]},t)}))})]})};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const Menus: ({
2
3
  displayName: string;
3
4
  key: number;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
2
+ import { QueryBuilderNodeProps } from "../../../Types/QueryBuilderNodeProps.type";
3
3
  declare const EventsTrigger: React.FC<QueryBuilderNodeProps>;
4
4
  export default EventsTrigger;
@@ -1,2 +1,2 @@
1
- import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
1
+ import { QueryBuilderAPIData } from "../../../Types/QueryBuilderAPI.type";
2
2
  export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
2
+ import { QueryBuilderNodeProps } from "../../../Types/QueryBuilderNodeProps.type";
3
3
  declare const IGTrigger: React.FC<QueryBuilderNodeProps>;
4
4
  export default IGTrigger;
@@ -1,2 +1,2 @@
1
- import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
1
+ import { QueryBuilderAPIData } from "../../../Types/QueryBuilderAPI.type";
2
2
  export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { DropdownOption } from "../../../dropdown/type";
3
- import { QueryBuilderProperty } from "../../types/QueryBuilder.type";
4
- import { QueryBuilderNodeProps } from "../../types/QueryBuilderNodeProps.type";
3
+ import { QueryBuilderProperty } from "../../Types/QueryBuilder.type";
4
+ import { QueryBuilderNodeProps } from "../../Types/QueryBuilderNodeProps.type";
5
5
  declare const BaseTriggerQueryBuilderNode: React.FC<QueryBuilderNodeProps & {
6
6
  cacheKey: string;
7
7
  propertyAddBtnText: string;
@@ -1 +1 @@
1
- import{jsx as e,Fragment as o,jsxs as n}from"react/jsx-runtime";import{useState as t,useEffect as l}from"react";import{Dropdown as i}from"react-bootstrap";import{DEFAULT_THEME as s,BASE_COLORS as a}from"../../constants/Theme.js";import{DatePicker as d}from"../datePicker/DatePicker.js";import{BodySecondary as c,BodyCaption as r,Caption as g}from"../TypographyStyle.js";import{MainDropdown as p,ItemMenuContainer as u}from"./CommonStyles.js";const m=a=>{let{options:r,placeholder:u="Select an option",selected:m,onOptionSelected:b,resetDropdown:h,maxHeight:y,backgroundColor:f,calendarPopperConfig:D,variant:k="default",datePickerPlacement:j,closeDropdown:S}=a;var R,w,C;const[x,$]=t(!1),[T,P]=t(m),[I,N]=t(),[A,E]=t(!1),F=()=>{!x&&E(!A)},[H,M]=t(m),V="small"===k?g:c;return l((()=>{h&&P(void 0)}),[h]),l((()=>{var e;(null==m?void 0:m.isCustom)&&(null===(e=m.dateRangeSelectionOptions)||void 0===e?void 0:e.selectedDates)?N(m.dateRangeSelectionOptions.selectedDates):N(void 0),P(m)}),[m]),l((()=>{E(!1),$(!1)}),[S]),e(o,{children:n(p,Object.assign({drop:"down",show:A,onToggle:F,backgroundColor:f,id:"analytic-dropdown"},{children:[e(i.Toggle,Object.assign({id:"dropdown-autoclose-outside",className:"main--dropdown",style:"small"===k?{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",backgroundColor:"#FAFAFA",borderRadius:4,border:`1px solid ${s.colorsV2.stroke.primary}`}:void 0},{children:e(V,Object.assign({style:"small"===k?{color:s.colorsV2.content.secondary}:void 0},{children:(null==T?void 0:T.isCustom)?I?O(I[0])===O(I[1])?`${O(I[0])}`:`${O(I[0])} to ${O(I[1])}`:null==H?void 0:H.label:T?null==T?void 0:T.label:u}))})),e(i.Menu,Object.assign({className:"main--dropdown"},{children:n(p,Object.assign({drop:null!=j?j:"end",id:"sub--dropdown",show:x,onToggle:e=>{!e&&E(!1),$(!x)}},{children:[e("div",Object.assign({style:{maxHeight:y||"auto",overflowY:"scroll"}},{children:r.map((o=>{var n;return e("div",{children:(null==o?void 0:o.isCustom)?e(i.Toggle,Object.assign({className:"sub--dropdown"},{children:e(v,{eachOption:o,selectedOption:T,selectedDate:I,onClickingEachItem:e=>{P(e),$(!0)},rangeSelection:!!(null===(n=null==o?void 0:o.dateRangeSelectionOptions)||void 0===n?void 0:n.selectRange)})})):e(v,{eachOption:o,selectedOption:T,selectedDate:I,onClickingEachItem:e=>{if(N(void 0),P(e),M(e),F(),!e.noOfDays)return void b(e);const o=new Date,n=new Date;n.setDate(o.getDate()-e.noOfDays),b(Object.assign(Object.assign({},e),{selectedRange:[n,o]}))}})},null==o?void 0:o.key)}))})),e(i.Menu,Object.assign({className:"sub--dropdown",popperConfig:{modifiers:[{name:"offset",options:{offset:[(null==D?void 0:D.offsetSkid)||0,(null==D?void 0:D.offsetDistance)||0]}}]}},{children:e(d,{selectRange:(null===(R=null==T?void 0:T.dateRangeSelectionOptions)||void 0===R?void 0:R.selectRange)||!1,maxDate:null===(w=null==T?void 0:T.dateRangeSelectionOptions)||void 0===w?void 0:w.maxDate,minDate:null===(C=null==T?void 0:T.dateRangeSelectionOptions)||void 0===C?void 0:C.minDate,selectedDates:I,onSelectRange:(e,o)=>{const n=[e,o];(null==T?void 0:T.dateRangeSelectionOptions)&&(T.dateRangeSelectionOptions.selectedDates=n,b(Object.assign(Object.assign({},T),{selectedRange:[e,o]}))),M(T),$(!1),N(n),E(!A)},onSelectDate:e=>{(null==T?void 0:T.dateRangeSelectionOptions)&&(T.dateRangeSelectionOptions.selectedDates=[e,e],b(Object.assign(Object.assign({},T),{selectedRange:[e,e]}))),M(T),$(!1),N([e,e]),E(!A)}})}))]}))}))]}))})},v=o=>{let{eachOption:t,selectedOption:l,selectedDate:i,onClickingEachItem:s,rangeSelection:d}=o;return n(u,Object.assign({onClick:()=>s(t),isSelected:t.isCustom?t.key==(null==l?void 0:l.key)&&!!i:t.key==(null==l?void 0:l.key)},{children:[e(c,Object.assign({color:t.key==(null==l?void 0:l.key)?a.positive[900]:a.grayscale[900]},{children:t.label})),i&&(null==l?void 0:l.isCustom)&&t.key==(null==l?void 0:l.key)&&e(r,{children:d?`${O(i[0])} to ${O(i[1])}`:`${O(i[0])}`})]}),t.key)},O=e=>e.toLocaleString("default",{day:"numeric",month:"short",year:"numeric"});export{m as AnalyticsDropdown,v as EachItem,O as formatDate};
1
+ import{jsx as e,Fragment as o,jsxs as n}from"react/jsx-runtime";import{useState as t,useEffect as l}from"react";import{Dropdown as i}from"react-bootstrap";import{DEFAULT_THEME as s,BASE_COLORS as a}from"../../constants/Theme.js";import{DatePicker as d}from"../datePicker/DatePicker.js";import{BodySecondary as c,BodyCaption as r,Caption as g}from"../TypographyStyle.js";import{MainDropdown as p,ItemMenuContainer as u}from"./CommonStyles.js";const m=a=>{let{options:r,placeholder:u="Select an option",selected:m,onOptionSelected:b,resetDropdown:h,maxHeight:y,backgroundColor:f,calendarPopperConfig:D,variant:k="default",datePickerPlacement:j,closeDropdown:S}=a;var R,w,C;const[x,$]=t(!1),[T,P]=t(m),[I,N]=t(),[A,E]=t(!1),F=()=>{!x&&E(!A)},[H,M]=t(m),V="small"===k?g:c;return l((()=>{h&&P(void 0)}),[h]),l((()=>{var e;(null==m?void 0:m.isCustom)&&(null===(e=m.dateRangeSelectionOptions)||void 0===e?void 0:e.selectedDates)?N(m.dateRangeSelectionOptions.selectedDates):N(void 0),P(m)}),[m]),l((()=>{E(!1),$(!1)}),[S]),e(o,{children:n(p,Object.assign({drop:"down",show:A,onToggle:F,backgroundColor:f,id:"analytic-dropdown"},{children:[e(i.Toggle,Object.assign({id:"dropdown-autoclose-outside",className:"main--dropdown",style:"small"===k?{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",backgroundColor:"#FAFAFA",borderRadius:4,border:`1px solid ${s.colorsV2.stroke.primary}`}:void 0},{children:e(V,Object.assign({style:"small"===k?{color:s.colorsV2.content.secondary}:void 0},{children:(null==T?void 0:T.isCustom)?I?O(I[0])===O(I[1])?`${O(I[0])}`:`${O(I[0])} to ${O(I[1])}`:(null==H?void 0:H.label)?null==H?void 0:H.label:u:T?null==T?void 0:T.label:u}))})),e(i.Menu,Object.assign({className:"main--dropdown"},{children:n(p,Object.assign({drop:null!=j?j:"end",id:"sub--dropdown",show:x,onToggle:e=>{!e&&E(!1),$(!x)}},{children:[e("div",Object.assign({style:{maxHeight:y||"auto",overflowY:"scroll"}},{children:r.map((o=>{var n;return e("div",{children:(null==o?void 0:o.isCustom)?e(i.Toggle,Object.assign({className:"sub--dropdown"},{children:e(v,{eachOption:o,selectedOption:T,selectedDate:I,onClickingEachItem:e=>{P(e),$(!0)},rangeSelection:!!(null===(n=null==o?void 0:o.dateRangeSelectionOptions)||void 0===n?void 0:n.selectRange)})})):e(v,{eachOption:o,selectedOption:T,selectedDate:I,onClickingEachItem:e=>{if(N(void 0),P(e),M(e),F(),!e.noOfDays)return void b(e);const o=new Date,n=new Date;n.setDate(o.getDate()-e.noOfDays),b(Object.assign(Object.assign({},e),{selectedRange:[n,o]}))}})},null==o?void 0:o.key)}))})),e(i.Menu,Object.assign({className:"sub--dropdown",popperConfig:{modifiers:[{name:"offset",options:{offset:[(null==D?void 0:D.offsetSkid)||0,(null==D?void 0:D.offsetDistance)||0]}}]}},{children:e(d,{selectRange:(null===(R=null==T?void 0:T.dateRangeSelectionOptions)||void 0===R?void 0:R.selectRange)||!1,maxDate:null===(w=null==T?void 0:T.dateRangeSelectionOptions)||void 0===w?void 0:w.maxDate,minDate:null===(C=null==T?void 0:T.dateRangeSelectionOptions)||void 0===C?void 0:C.minDate,selectedDates:I,onSelectRange:(e,o)=>{const n=[e,o];(null==T?void 0:T.dateRangeSelectionOptions)&&(T.dateRangeSelectionOptions.selectedDates=n,b(Object.assign(Object.assign({},T),{selectedRange:[e,o]}))),M(T),$(!1),N(n),E(!A)},onSelectDate:e=>{(null==T?void 0:T.dateRangeSelectionOptions)&&(T.dateRangeSelectionOptions.selectedDates=[e,e],b(Object.assign(Object.assign({},T),{selectedRange:[e,e]}))),M(T),$(!1),N([e,e]),E(!A)}})}))]}))}))]}))})},v=o=>{let{eachOption:t,selectedOption:l,selectedDate:i,onClickingEachItem:s,rangeSelection:d}=o;return n(u,Object.assign({onClick:()=>s(t),isSelected:t.isCustom?t.key==(null==l?void 0:l.key)&&!!i:t.key==(null==l?void 0:l.key)},{children:[e(c,Object.assign({color:t.key==(null==l?void 0:l.key)?a.positive[900]:a.grayscale[900]},{children:t.label})),i&&(null==l?void 0:l.isCustom)&&t.key==(null==l?void 0:l.key)&&e(r,{children:d?`${O(i[0])} to ${O(i[1])}`:`${O(i[0])}`})]}),t.key)},O=e=>e.toLocaleString("default",{day:"numeric",month:"short",year:"numeric"});export{m as AnalyticsDropdown,v as EachItem,O as formatDate};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as i,Fragment as n}from"react/jsx-runtime";import o from"../../assets/icons/Bik_logo.svg.js";import{useState as t,useEffect as l,Fragment as d}from"react";import{COLORS as s}from"../../constants/Theme.js";import{NavigationHyperlink as r}from"../navigation-hyperlink/NavigationHyperlink.js";import{SidebarPopup as a}from"./SidebarPopup.js";import{SideBarContainer as u,SibeBarMenuItem as c}from"./SidebarStyles.js";import{SimpleSidebar as v}from"./SimpleSidebar.js";const m=s=>{const{logoSvg:m,allMenuList:h,activeMainMenu:g,activeSubMenu:y,router:k,onClickingMainMenu:b,onClickingSubMenu:w,onClickingAccessUpgradePanel:S,onClickingPopupMenuItem:M,popupMinHeight:j,isNewSidebar:N}=s,[f,C]=t(g),[I,L]=t(),[O,B]=t(y),[E,H]=t(!1),[P,_]=t(),[x,A]=t(),[$,U]=t();l((()=>{C(g)}),[g]),l((()=>{B(y)}),[y]);const R=e=>{var i,n;if(L(void 0),_(void 0),"popup"==(null==e?void 0:e.layout)){const i=T();i&&A(i),_(e)}else{const o=document.getElementById((null===(n=null===(i=e.displayName)||void 0===i?void 0:i.split(" "))||void 0===n?void 0:n.join(""))||e.key.toString());if(o){const e=o.getBoundingClientRect().top;U(e)}L(e)}},z=(n,o)=>{var t,l,d,s,r,a;return e("div",Object.assign({id:(null===(l=null===(t=n.displayName)||void 0===t?void 0:t.split(" "))||void 0===l?void 0:l.join(""))||n.key.toString(),className:"main--sidebar",onClick:()=>(e=>{var i;"popup"!==(null==e?void 0:e.layout)&&(_(void 0),L(void 0),H(!0),C(e),!e.path&&b(e),(null===(i=null==e?void 0:e.children)||void 0===i?void 0:i.length)?B(null==e?void 0:e.children[0]):B({}),L(void 0),setTimeout((()=>{H(!1)}),1e3))})(n),onMouseEnter:()=>{!E&&R(n)},onMouseOver:()=>{!E&&R(n)},onMouseLeave:()=>{var e;(null===(e=null==n?void 0:n.children)||void 0===e?void 0:e.length)||(L(void 0),_(void 0))},onFocus:()=>{console.log(";")},"aria-hidden":"true"},{children:[n.isNew&&i("div",Object.assign({className:"new-tag"},{children:" NEW"})),e("div",Object.assign({id:(null===(s=null===(d=n.displayName)||void 0===d?void 0:d.split(" "))||void 0===s?void 0:s.join(""))+"_sub"||n.key.toString()+"_sub",className:`sidebar-menu-item ${(null==f?void 0:f.key)==n.key?" main-menu-active-class":""} ${n.isLastSticky?"sticky-menu-int":""} ${n.is2ndLastSticky?"sticky-menu":""}\n\t\t\t\t\t${n.key==(null==I?void 0:I.key)?"sidebar-menu-item-hover":""}\`}\n\t\t\t\t\t${n.isNew?"new-menu-item":""}`},{children:[i(p,{icon:n.icon,isActive:n.key==(null==f?void 0:f.key),activeStateIcon:null!==(r=n.activeIcon)&&void 0!==r?r:{},hoverStateIcon:null!==(a=n.hoverIcon)&&void 0!==a?a:{},isHovered:n.key==(null==I?void 0:I.key)}),i("div",Object.assign({className:"menu-item-container"},{children:i("p",Object.assign({className:"menu-item-text "+((null==n?void 0:n.key)===(null==f?void 0:f.key)?"active-menu-item-text":"")},{children:n.displayName}))}))]}),o)]}),o)};l((()=>{const e=()=>{const e=T();e&&A(e),F()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const F=()=>{const e=document.getElementById("_sub-menu"),i=null==e?void 0:e.getBoundingClientRect().height;i&&U(window.innerHeight-i)},T=()=>{var e,i;if(P){const n=(null===(i=null===(e=P.displayName)||void 0===e?void 0:e.split(" "))||void 0===i?void 0:i.join(""))+"_sub"||P.key.toString()+"_sub",o=document.getElementById(n);if(o){const e=o.getBoundingClientRect();let i=e.top;const n=null!=j?j:320;return e.bottom+n>window.innerHeight&&(i-=e.bottom+n-window.innerHeight),i}return null}};return e(u,{children:[i("div",Object.assign({className:"bik-header-logo",onClick:()=>{},onKeyDown:()=>{},"aria-hidden":"true"},{children:m||i(o,{})})),i(c,{children:null==h?void 0:h.map(((o,t)=>{var l,s;return e(d,{children:[o.path?i(r,Object.assign({href:o.path,router:k},{children:z(o,t)})):z(o,t),e(n,{children:["popup"===o.layout&&(null===(l=null==P?void 0:P.children)||void 0===l?void 0:l.length)&&i(a,{top:null!=x?x:void 0,menuList:null==P?void 0:P.children,onClickingPopupMenu:e=>{M&&M(e),_(void 0)},onMouseLeaveOnMenu:()=>_(void 0)}),(null===(s=null==I?void 0:I.children)||void 0===s?void 0:s.length)&&i(v,{menuList:null==I?void 0:I.children,activeMenu:O,onMouseLeaveOnMenu:()=>L(void 0),left:N?92:88,postion:"fixed",header:I.displayName,theme:"brand",router:k,showAccessUpgradePanel:I.showAccessUpgradePanel,onMenuClick:(e,i)=>{B(e),C(I),L(void 0),_(void 0),i&&w(e)},onUpgrade:S,top:N&&$||0,isNewSidebar:N})]})]},t)}))})]})},p=e=>{const{icon:o,isActive:t,activeStateIcon:l,hoverStateIcon:d,isHovered:r}=e,a=o,u=d;return i(n,{children:t?i(l,{width:20,height:20}):i(r?u:a,{width:20,height:20,color:s.surface.standard})})};export{m as BikSidebar};
1
+ import{jsxs as e,jsx as i,Fragment as n}from"react/jsx-runtime";import o from"../../assets/icons/Bik_logo.svg.js";import{useState as t,useEffect as l,Fragment as d}from"react";import{COLORS as s}from"../../constants/Theme.js";import{NavigationHyperlink as r}from"../navigation-hyperlink/NavigationHyperlink.js";import{SidebarPopup as a}from"./SidebarPopup.js";import{SideBarContainer as u,SibeBarMenuItem as c}from"./SidebarStyles.js";import{SimpleSidebar as v}from"./SimpleSidebar.js";const m=s=>{const{logoSvg:m,allMenuList:h,activeMainMenu:g,activeSubMenu:y,router:k,onClickingMainMenu:b,onClickingSubMenu:w,onClickingAccessUpgradePanel:S,onClickingPopupMenuItem:M,popupMinHeight:j,isNewSidebar:N}=s,[f,C]=t(g),[I,L]=t(),[O,B]=t(y),[E,H]=t(!1),[P,_]=t(),[x,A]=t(),[$,U]=t();l((()=>{C(g)}),[g]),l((()=>{B(y)}),[y]);const R=e=>{var i,n;if(L(void 0),_(void 0),"popup"==(null==e?void 0:e.layout)){const i=T();i&&A(i),_(e)}else{const o=document.getElementById((null===(n=null===(i=e.displayName)||void 0===i?void 0:i.split(" "))||void 0===n?void 0:n.join(""))||e.key.toString());if(o){const e=o.getBoundingClientRect().top;U(e)}L(e)}},z=(n,o)=>{var t,l,d,s,r,a;return e("div",Object.assign({id:(null===(l=null===(t=n.displayName)||void 0===t?void 0:t.split(" "))||void 0===l?void 0:l.join(""))||n.key.toString(),className:"main--sidebar",onClick:()=>(e=>{var i;"popup"!==(null==e?void 0:e.layout)&&(_(void 0),L(void 0),H(!0),C(e),!e.path&&b(e),(null===(i=null==e?void 0:e.children)||void 0===i?void 0:i.length)?B(null==e?void 0:e.children[0]):B({}),L(void 0),setTimeout((()=>{H(!1)}),1e3))})(n),onMouseEnter:()=>{!E&&R(n)},onMouseOver:()=>{!E&&R(n)},onMouseLeave:()=>{var e;(null===(e=null==n?void 0:n.children)||void 0===e?void 0:e.length)||(L(void 0),_(void 0))},onFocus:()=>{console.log(";")},"aria-hidden":"true"},{children:[n.isNew&&i("div",Object.assign({className:"new-tag"},{children:" NEW"})),e("div",Object.assign({id:(null===(s=null===(d=n.displayName)||void 0===d?void 0:d.split(" "))||void 0===s?void 0:s.join(""))+"_sub"||n.key.toString()+"_sub",className:`sidebar-menu-item ${(null==f?void 0:f.key)==n.key?" main-menu-active-class":""} ${n.isLastSticky?"sticky-menu-int":""} ${n.is2ndLastSticky?"sticky-menu":""}\n\t\t\t\t\t${n.key==(null==I?void 0:I.key)?"sidebar-menu-item-hover":""}\`}\n\t\t\t\t\t${n.isNew?"new-menu-item":""}`},{children:[i(p,{icon:n.icon,isActive:n.key==(null==f?void 0:f.key),activeStateIcon:null!==(r=n.activeIcon)&&void 0!==r?r:{},hoverStateIcon:null!==(a=n.hoverIcon)&&void 0!==a?a:{},isHovered:n.key==(null==I?void 0:I.key)||n.key==(null==P?void 0:P.key)}),i("div",Object.assign({className:"menu-item-container"},{children:i("p",Object.assign({className:"menu-item-text "+((null==n?void 0:n.key)===(null==f?void 0:f.key)?"active-menu-item-text":"")},{children:n.displayName}))}))]}),o)]}),o)};l((()=>{const e=()=>{const e=T();e&&A(e),F()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const F=()=>{const e=document.getElementById("_sub-menu"),i=null==e?void 0:e.getBoundingClientRect().height;i&&U(window.innerHeight-i)},T=()=>{var e,i;if(P){const n=(null===(i=null===(e=P.displayName)||void 0===e?void 0:e.split(" "))||void 0===i?void 0:i.join(""))+"_sub"||P.key.toString()+"_sub",o=document.getElementById(n);if(o){const e=o.getBoundingClientRect();let i=e.top;const n=null!=j?j:320;return e.bottom+n>window.innerHeight&&(i-=e.bottom+n-window.innerHeight),i}return null}};return e(u,{children:[i("div",Object.assign({className:"bik-header-logo",onClick:()=>{},onKeyDown:()=>{},"aria-hidden":"true"},{children:m||i(o,{})})),i(c,{children:null==h?void 0:h.map(((o,t)=>{var l,s;return e(d,{children:[o.path?i(r,Object.assign({href:o.path,router:k},{children:z(o,t)})):z(o,t),e(n,{children:["popup"===o.layout&&(null===(l=null==P?void 0:P.children)||void 0===l?void 0:l.length)&&i(a,{top:null!=x?x:void 0,menuList:null==P?void 0:P.children,onClickingPopupMenu:e=>{M&&M(e),_(void 0)},onMouseLeaveOnMenu:()=>_(void 0)}),(null===(s=null==I?void 0:I.children)||void 0===s?void 0:s.length)&&i(v,{menuList:null==I?void 0:I.children,activeMenu:O,onMouseLeaveOnMenu:()=>L(void 0),left:N?92:88,postion:"fixed",header:I.displayName,theme:"brand",router:k,showAccessUpgradePanel:I.showAccessUpgradePanel,onMenuClick:(e,i)=>{B(e),C(I),L(void 0),_(void 0),i&&w(e)},onUpgrade:S,top:N&&$||0,isNewSidebar:N})]})]},t)}))})]})},p=e=>{const{icon:o,isActive:t,activeStateIcon:l,hoverStateIcon:d,isHovered:r}=e,a=o,u=d;return i(n,{children:t?i(l,{width:20,height:20}):i(r?u:a,{width:20,height:20,color:s.surface.standard})})};export{m as BikSidebar};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const Menus: ({
2
3
  displayName: string;
3
4
  key: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.499",
3
+ "version": "0.0.500-beta-0",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",