@bikdotai/bik-component-library 0.0.506 → 0.0.507-beta.filter-2

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.
Files changed (45) hide show
  1. package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
  2. package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  3. package/dist/cjs/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
  4. package/dist/cjs/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  5. package/dist/cjs/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
  6. package/dist/cjs/components/checkBox/CheckBox.d.ts +3 -0
  7. package/dist/cjs/components/checkBox/CheckBox.js +1 -1
  8. package/dist/cjs/components/checkBox/CheckBox.styled.d.ts +1 -0
  9. package/dist/cjs/components/checkBox/CheckBox.styled.js +4 -3
  10. package/dist/cjs/components/checkList/CheckList.d.ts +1 -0
  11. package/dist/cjs/components/checkList/CheckList.js +1 -1
  12. package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
  13. package/dist/cjs/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.d.ts +1 -0
  14. package/dist/cjs/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.js +1 -1
  15. package/dist/cjs/components/dropdown/type.d.ts +2 -0
  16. package/dist/cjs/components/postPicker/postPicker.js +1 -1
  17. package/dist/cjs/components/radioButton/RadioButton.d.ts +1 -0
  18. package/dist/cjs/components/radioButton/RadioButton.js +1 -1
  19. package/dist/cjs/components/radioList/RadioList.d.ts +1 -0
  20. package/dist/cjs/components/radioList/RadioList.js +1 -1
  21. package/dist/cjs/components/tabs/Tabs.js +1 -1
  22. package/dist/cjs/components/tabs/Tabs.model.d.ts +1 -0
  23. package/dist/esm/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
  24. package/dist/esm/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  25. package/dist/esm/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
  26. package/dist/esm/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  27. package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
  28. package/dist/esm/components/checkBox/CheckBox.d.ts +3 -0
  29. package/dist/esm/components/checkBox/CheckBox.js +1 -1
  30. package/dist/esm/components/checkBox/CheckBox.styled.d.ts +1 -0
  31. package/dist/esm/components/checkBox/CheckBox.styled.js +6 -5
  32. package/dist/esm/components/checkList/CheckList.d.ts +1 -0
  33. package/dist/esm/components/checkList/CheckList.js +1 -1
  34. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
  35. package/dist/esm/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.d.ts +1 -0
  36. package/dist/esm/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.js +1 -1
  37. package/dist/esm/components/dropdown/type.d.ts +2 -0
  38. package/dist/esm/components/postPicker/postPicker.js +1 -1
  39. package/dist/esm/components/radioButton/RadioButton.d.ts +1 -0
  40. package/dist/esm/components/radioButton/RadioButton.js +1 -1
  41. package/dist/esm/components/radioList/RadioList.d.ts +1 -0
  42. package/dist/esm/components/radioList/RadioList.js +1 -1
  43. package/dist/esm/components/tabs/Tabs.js +1 -1
  44. package/dist/esm/components/tabs/Tabs.model.d.ts +1 -0
  45. package/package.json +1 -1
@@ -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;
@@ -8,5 +8,8 @@ export type CheckBoxProps = {
8
8
  label?: string;
9
9
  size?: 'DEFAULT' | 'SMALL';
10
10
  skipHoverState?: boolean;
11
+ labelSize?: 'DEFAULT' | 'SMALL';
12
+ rightComponent?: JSX.Element;
13
+ checkboxBorderColor?: string;
11
14
  };
12
15
  export declare const CheckBox: React.FC<CheckBoxProps>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),i=require("./CheckBox.styled.js"),l=require("../TypographyStyle.js"),t=require("../../constants/Theme.js");const a=s=>e.jsxs("svg",Object.assign({width:s.isSmall?"16":"18",height:s.isSmall?"16":"18",viewBox:s.isSmall?"0 0 16 16":"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("rect",{x:"0",y:"0",width:s.isSmall?"16":"18",height:s.isSmall?"16":"18",rx:"4",fill:s.isDisabled?t.COLORS.content.inactive:t.COLORS.background.positive.vibrant}),!s.isPartial&&e.jsx("svg",Object.assign({width:s.isSmall?"8":"10",height:s.isSmall?"7":"9",x:"4",y:"4",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.68189 1.06043C10.0724 1.45096 10.0724 2.08412 9.68189 2.47464L4.02501 8.13152C3.63449 8.52205 3.00132 8.52205 2.6108 8.13152L0.489684 6.01041C0.0991601 5.61988 0.0991598 4.98672 0.489684 4.59619C0.880209 4.20567 1.51337 4.20567 1.9039 4.59619L3.31791 6.0102L8.26768 1.06043C8.6582 0.669907 9.29137 0.669907 9.68189 1.06043Z",fill:"white"})})),s.isPartial&&e.jsx("rect",{x:"5",y:s.isSmall?"7":"8",width:s.isSmall?"6":"8",height:"2",rx:"1",fill:t.COLORS.surface.standard})]}));exports.CheckBox=r=>{const[c,n]=s.useState(r.isChecked||!1),[o,d]=s.useState(r.isPartiallyChecked||!1),[h,x]=s.useState(r.isDisabled||!1),[u,S]=s.useState(!1),[b,C]=s.useState(!1);return s.useEffect((()=>{n(r.isChecked)}),[r.isChecked]),s.useEffect((()=>{x(r.isDisabled||!1)}),[r.isDisabled]),s.useEffect((()=>{d(r.isPartiallyChecked||!1)}),[r.isPartiallyChecked]),e.jsxs(i.CheckboxContainer,Object.assign({onClick:e=>{var s;if(!r.isDisabled){const i=!c;o?d(!o):n(i),null===(s=r.onValueChange)||void 0===s||s.call(r,i,r.value,e)}},onMouseEnter:()=>S(!r.skipHoverState),onMouseLeave:()=>S(!1),onMouseDown:()=>C(!r.skipHoverState),onMouseUp:()=>C(!1)},{children:[e.jsx(i.CheckboxIcon,Object.assign({checked:c,hovered:u,clicked:b,isDisabled:h,size:r.size},{children:c&&e.jsx(a,{isPartial:o||!1,isDisabled:h,isSmall:"SMALL"===r.size})})),r.label&&"SMALL"!==r.size&&e.jsx(l.BodyPrimary,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label})),r.label&&"SMALL"===r.size&&e.jsx(l.BodySecondary,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),s=require("./CheckBox.styled.js"),l=require("../TypographyStyle.js"),t=require("../../constants/Theme.js");const a=i=>e.jsxs("svg",Object.assign({width:i.isSmall?"16":"18",height:i.isSmall?"16":"18",viewBox:i.isSmall?"0 0 16 16":"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("rect",{x:"0",y:"0",width:i.isSmall?"16":"18",height:i.isSmall?"16":"18",rx:"4",fill:i.isDisabled?t.COLORS.content.inactive:t.COLORS.background.positive.vibrant}),!i.isPartial&&e.jsx("svg",Object.assign({width:i.isSmall?"8":"10",height:i.isSmall?"7":"9",x:"4",y:"4",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.68189 1.06043C10.0724 1.45096 10.0724 2.08412 9.68189 2.47464L4.02501 8.13152C3.63449 8.52205 3.00132 8.52205 2.6108 8.13152L0.489684 6.01041C0.0991601 5.61988 0.0991598 4.98672 0.489684 4.59619C0.880209 4.20567 1.51337 4.20567 1.9039 4.59619L3.31791 6.0102L8.26768 1.06043C8.6582 0.669907 9.29137 0.669907 9.68189 1.06043Z",fill:"white"})})),i.isPartial&&e.jsx("rect",{x:"5",y:i.isSmall?"7":"8",width:i.isSmall?"6":"8",height:"2",rx:"1",fill:t.COLORS.surface.standard})]}));exports.CheckBox=r=>{const[o,c]=i.useState(r.isChecked||!1),[n,d]=i.useState(r.isPartiallyChecked||!1),[h,S]=i.useState(r.isDisabled||!1),[x,b]=i.useState(!1),[u,C]=i.useState(!1);return i.useEffect((()=>{c(r.isChecked)}),[r.isChecked]),i.useEffect((()=>{S(r.isDisabled||!1)}),[r.isDisabled]),i.useEffect((()=>{d(r.isPartiallyChecked||!1)}),[r.isPartiallyChecked]),e.jsxs(s.CheckboxContainer,Object.assign({onClick:e=>{var i;if(!r.isDisabled){const s=!o;n?d(!n):c(s),null===(i=r.onValueChange)||void 0===i||i.call(r,s,r.value,e)}},onMouseEnter:()=>b(!r.skipHoverState),onMouseLeave:()=>b(!1),onMouseDown:()=>C(!r.skipHoverState),onMouseUp:()=>C(!1)},{children:[e.jsx(s.CheckboxIcon,Object.assign({checked:o,hovered:x,clicked:u,isDisabled:h,size:r.size,borderColor:r.checkboxBorderColor},{children:o&&e.jsx(a,{isPartial:n||!1,isDisabled:h,isSmall:"SMALL"===r.size})})),r.label&&"SMALL"!==r.size&&"SMALL"!==r.labelSize&&e.jsx(l.BodyPrimary,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label})),r.label&&("SMALL"===r.size||"SMALL"===r.labelSize)&&e.jsx(l.BodySecondary,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label})),r.rightComponent]}))};
@@ -5,4 +5,5 @@ export declare const CheckboxIcon: import("styled-components").StyledComponent<"
5
5
  clicked: boolean;
6
6
  isDisabled: boolean;
7
7
  size?: "SMALL" | "DEFAULT" | undefined;
8
+ borderColor?: string | undefined;
8
9
  }, never>;
@@ -12,12 +12,13 @@
12
12
  justify-content: center;
13
13
  align-items: center;
14
14
  box-sizing: content-box;
15
- ${s=>s.isDisabled?e.css`
15
+ ${s=>{var t;return s.isDisabled?e.css`
16
16
  border: ${"SMALL"===s.size?1.5:2}px solid
17
17
  ${i.COLORS.content.inactive};
18
18
  `:e.css`
19
- border: ${"SMALL"===s.size?1.5:2}px solid black;
20
- `}
19
+ border: ${"SMALL"===s.size?1.5:2}px solid
20
+ ${null!==(t=s.borderColor)&&void 0!==t?t:"black"};
21
+ `}}
21
22
  ${i=>i.checked&&e.css`
22
23
  border: 0px;
23
24
  width: 18px;
@@ -8,6 +8,7 @@ export type CheckListProps = {
8
8
  subTitle?: string;
9
9
  listItems: CheckListItem[];
10
10
  onChange: (options: CheckListItem[]) => void;
11
+ listContainerStyles?: React.CSSProperties;
11
12
  };
12
13
  export declare const CheckList: React.FC<CheckListProps>;
13
14
  export {};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),t=require("../checkBox/CheckBox.js"),i=require("./CheckList.styled.js"),r=require("../TypographyStyle.js"),c=require("../../constants/Theme.js");exports.CheckList=l=>{const[n,a]=s.useState(l.listItems);s.useEffect((()=>{a(l.listItems)}),[l.listItems]);const o=(e,s)=>{const t=[...n],i=n.find((e=>e.value===s));i&&(i.isChecked=e),a(t);const r=t.filter((e=>e.isChecked));l.onChange(r)};return e.jsxs(i.CheckListStyled,{children:[(l.title||l.subTitle)&&e.jsxs("div",Object.assign({className:"title__container"},{children:[l.title&&e.jsx(r.TitleRegular,{children:l.title}),l.subTitle&&e.jsx(r.BodySecondary,Object.assign({color:c.COLORS.text.secondary},{children:l.subTitle}))]})),e.jsx("div",Object.assign({className:"list__container"},{children:n.map((s=>e.jsx(t.CheckBox,Object.assign({},s,{onValueChange:o}),s.value)))}))]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),t=require("../checkBox/CheckBox.js"),i=require("./CheckList.styled.js"),r=require("../TypographyStyle.js"),c=require("../../constants/Theme.js");exports.CheckList=l=>{var n;const[a,o]=s.useState(l.listItems);s.useEffect((()=>{o(l.listItems)}),[l.listItems]);const u=(e,s)=>{const t=[...a],i=a.find((e=>e.value===s));i&&(i.isChecked=e),o(t);const r=t.filter((e=>e.isChecked));l.onChange(r)};return e.jsxs(i.CheckListStyled,{children:[(l.title||l.subTitle)&&e.jsxs("div",Object.assign({className:"title__container"},{children:[l.title&&e.jsx(r.TitleRegular,{children:l.title}),l.subTitle&&e.jsx(r.BodySecondary,Object.assign({color:c.COLORS.text.secondary},{children:l.subTitle}))]})),e.jsx("div",Object.assign({style:null!==(n=l.listContainerStyles)&&void 0!==n?n:{},className:"list__container"},{children:a.map((s=>e.jsx(t.CheckBox,Object.assign({},s,{onValueChange:u}),s.value)))}))]})};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("../../../zeroState/ZeroState.js"),s=require("../../../../hooks/useOutside.js"),n=require("../../hooks/useDropdown.js"),o=require("./description/Description.js"),i=require("./menu/FreeFormMenu.js"),l=require("./menu/MenuList.js"),u=require("./menu/SelectAllMenu.js"),c=require("./multiSelect/MultiSelectDropdownBottomBar.js"),a=require("./OpennedDropdown.styled.js"),p=require("./searchbox/SearchBox.js"),d=require("./searchbox/SearchZeroState.js");const h=304,S=290;exports.OpenedDropdown=j=>{let{options:f,isSearchable:x,isMultiSelect:g,width:v,allowFreeForm:w,height:b,onClose:y,onSelect:m,onSearch:O,version:q,skipSorting:M}=j;const{dropdownOptions:C,search:D,searchedString:L,searchedOptions:F,onApplyHandler:A,selectAllHandler:k,onMultiSelectClear:B,onFreeFormSelect:H,onMultiSelectApply:Z,latestDropdownOptionsRef:P,getSelectedOptions:R}=n.useDropdown(q,f,m,M,g,O),[_,z]=t.useState(null!=v?v:S),[E,I]=t.useState(null),K=t.useRef(null);s.useOutside(K,(()=>{if(I(null),g&&"2.0"===q){const e=R(P.current);null==y||y(e)}else null==y||y(C)}));const N=null!=b?b:h,T="number"==typeof N?x&&g?N-96:x&&!g||!x&&g?N-48:N:N;t.useEffect((()=>{const e=null!=v?v:S;if(null===E)z(e);else if("number"==typeof e)z(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));z(t)}}),[E]);const W=[],G=(L&&O?F:C).map((e=>{var t,r;if(L&&!O){if(e.options){const t=Object.assign({},e);return t.options=t.options.filter((e=>{var t;return!!(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(L.toLowerCase()))&&(W.push(!L||e.label===L),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(L.toLowerCase()))||(null===(r=e.searchKey)||void 0===r?void 0:r.toLowerCase().includes(L.toLowerCase()))?(W.push(!L||e.label===L),e):null}return e})).filter((e=>null!==e)),J=!!x&&L&&0===G.length;return e.jsxs(a.OpennedDropdownContainer,Object.assign({version:q,ref:K,style:{width:_}},{children:[e.jsxs("div",Object.assign({style:{width:E?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!x&&e.jsx(p.SearchBox,{onSearch:D,version:q}),G.length||L?e.jsxs(a.MenuListContainer,Object.assign({minHeight:N,maxHeight:T},{children:[!!g&&!J&&e.jsx(u.SelectAllMenu,{version:q,options:L&&O?F:C,onSelect:k}),!w&&J&&e.jsx(d.SearchZeroState,{height:T,searchedString:L}),w&&(J||!!W.length&&W.every((e=>!1===e)))&&e.jsx(i.FreeFormMenu,{version:q,isMultiSelect:g,onSelect:H,searchedString:L}),e.jsx(l.MenuList,{version:q,onSelect:A,showDescription:function(e,t){I(e&&t?{title:e,description:t}:null)},isMultiSelect:g,options:G})]})):e.jsx("div",Object.assign({style:{height:N,display:"flex"}},{children:e.jsx(r.ZeroState,{title:"No results found",subTitle:"Please try again later or contact us at support@bik.ai if you require further assistance."})})),!!g&&!(!G.length&&!L)&&"2.0"!==q&&e.jsx(c.default,{onClear:B,onApply:Z,list:L&&O?F:C})]})),!!E&&e.jsx(o.Description,{title:E.title,description:E.description,version:q})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("../../../zeroState/ZeroState.js"),s=require("../../../../hooks/useOutside.js"),n=require("../../hooks/useDropdown.js"),o=require("./description/Description.js"),i=require("./menu/FreeFormMenu.js"),l=require("./menu/MenuList.js"),u=require("./menu/SelectAllMenu.js"),c=require("./multiSelect/MultiSelectDropdownBottomBar.js"),a=require("./OpennedDropdown.styled.js"),p=require("./searchbox/SearchBox.js"),d=require("./searchbox/SearchZeroState.js");const h=304,S=290;exports.OpenedDropdown=j=>{let{options:x,isSearchable:f,isMultiSelect:g,width:v,allowFreeForm:w,height:b,onClose:y,onSelect:m,onSearch:O,version:q,skipSorting:M,hideSelectAll:C,primaryButtonText:D}=j;const{dropdownOptions:L,search:F,searchedString:A,searchedOptions:k,onApplyHandler:B,selectAllHandler:H,onMultiSelectClear:Z,onFreeFormSelect:T,onMultiSelectApply:P,latestDropdownOptionsRef:R,getSelectedOptions:_}=n.useDropdown(q,x,m,M,g,O),[z,E]=t.useState(null!=v?v:S),[I,K]=t.useState(null),N=t.useRef(null);s.useOutside(N,(()=>{if(K(null),g&&"2.0"===q){const e=_(R.current);null==y||y(e)}else null==y||y(L)}));const W=null!=b?b:h,G="number"==typeof W?f&&g?W-96:f&&!g||!f&&g?W-48:W:W;t.useEffect((()=>{const e=null!=v?v:S;if(null===I)E(e);else if("number"==typeof e)E(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));E(t)}}),[I]);const J=[],Q=(A&&O?k:L).map((e=>{var t,r;if(A&&!O){if(e.options){const t=Object.assign({},e);return t.options=t.options.filter((e=>{var t;return!!(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(A.toLowerCase()))&&(J.push(!A||e.label===A),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(A.toLowerCase()))||(null===(r=e.searchKey)||void 0===r?void 0:r.toLowerCase().includes(A.toLowerCase()))?(J.push(!A||e.label===A),e):null}return e})).filter((e=>null!==e)),U=!!f&&A&&0===Q.length;return e.jsxs(a.OpennedDropdownContainer,Object.assign({version:q,ref:N,style:{width:z}},{children:[e.jsxs("div",Object.assign({style:{width:I?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!f&&e.jsx(p.SearchBox,{onSearch:F,version:q}),Q.length||A?e.jsxs(a.MenuListContainer,Object.assign({minHeight:W,maxHeight:G},{children:[!!g&&!U&&C&&e.jsx(u.SelectAllMenu,{version:q,options:A&&O?k:L,onSelect:H}),!w&&U&&e.jsx(d.SearchZeroState,{height:G,searchedString:A}),w&&(U||!!J.length&&J.every((e=>!1===e)))&&e.jsx(i.FreeFormMenu,{version:q,isMultiSelect:g,onSelect:T,searchedString:A}),e.jsx(l.MenuList,{version:q,onSelect:B,showDescription:function(e,t){K(e&&t?{title:e,description:t}:null)},isMultiSelect:g,options:Q})]})):e.jsx("div",Object.assign({style:{height:W,display:"flex"}},{children:e.jsx(r.ZeroState,{title:"No results found",subTitle:"Please try again later or contact us at support@bik.ai if you require further assistance."})})),!!g&&!(!Q.length&&!A)&&"2.0"!==q&&e.jsx(c.default,{onClear:Z,onApply:P,list:A&&O?k:L,buttonText:D})]})),!!I&&e.jsx(o.Description,{title:I.title,description:I.description,version:q})]}))};
@@ -4,5 +4,6 @@ declare const MultiSelectDropdownBottomBar: React.FC<{
4
4
  onClear?: () => void;
5
5
  onApply: () => void;
6
6
  list: DropdownOption[];
7
+ buttonText?: string;
7
8
  }>;
8
9
  export default MultiSelectDropdownBottomBar;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../../button/Button.js"),r=require("../../../../TypographyStyle.js"),s=require("../../../../../constants/Theme.js"),n=require("./MultiSelectDropdownBottomBar.styled.js");exports.default=o=>{let{onApply:l,onClear:i,list:a}=o;const c=a.reduce(((e,t)=>{if(t.options){return e+t.options.filter((e=>!0===e.selected)).length}return t.selected?e+1:e}),0);return e.jsxs(n.BottomBarContainer,Object.assign({style:{justifyContent:"space-between"}},{children:[e.jsx(r.BodySecondary,Object.assign({style:{flex:1,color:s.COLORS.content.primary}},{children:c?`${c} selected`:""})),e.jsxs("div",Object.assign({style:{flexDirection:"row",display:"flex",gap:12}},{children:[e.jsx(t.Button,{size:"small",buttonType:"tertiaryGray",buttonText:"Clear",onClick:i}),e.jsx(t.Button,{size:"small",buttonText:"Apply",onClick:()=>{l()}})]}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../../button/Button.js"),r=require("../../../../TypographyStyle.js"),s=require("../../../../../constants/Theme.js"),n=require("./MultiSelectDropdownBottomBar.styled.js");exports.default=o=>{let{onApply:l,onClear:i,list:u,buttonText:a}=o;const c=u.reduce(((e,t)=>{if(t.options){return e+t.options.filter((e=>!0===e.selected)).length}return t.selected?e+1:e}),0);return e.jsxs(n.BottomBarContainer,Object.assign({style:{justifyContent:"space-between"}},{children:[e.jsx(r.BodySecondary,Object.assign({style:{flex:1,color:s.COLORS.content.primary}},{children:c?`${c} selected`:""})),e.jsxs("div",Object.assign({style:{flexDirection:"row",display:"flex",gap:12}},{children:[e.jsx(t.Button,{size:"small",buttonType:"tertiaryGray",buttonText:"Clear",onClick:i}),e.jsx(t.Button,{size:"small",buttonText:null!=a?a:"Apply",onClick:()=>{l()}})]}))]}))};
@@ -16,6 +16,8 @@ export interface OpenDropdownProps {
16
16
  onSearch?: (key: string) => Promise<DropdownOption[]>;
17
17
  version?: '1.0' | '2.0';
18
18
  skipSorting?: boolean;
19
+ hideSelectAll?: boolean;
20
+ primaryButtonText?: string;
19
21
  }
20
22
  export type GroupedOption = {
21
23
  label?: string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/searchIcon.js"),a=require("react"),s=require("./PostPicker.styled.js"),r=require("../tag/Tag.js"),i=require("../TypographyStyle.js"),n=require("../../utils/unCamelCase.js"),o=require("../../constants/colors.js"),l=require("../../constants/Theme.js"),d=require("../../assets/icons/instagram.svg.js"),c=require("../../assets/icons/warning.svg.js");require("../tooltips/Tooltip.js"),require("../analytics-chips-and-dropdowns/CommonStyles.js");var p=require("../analytics-chips-and-dropdowns/AnalyticsDropdown.js");require("../analytics-chips-and-dropdowns/AnalyticsMetric.js"),require("../shimmer/ShimmerComponent/ShimmerStyled.js"),require("../../utils/DateUtils.js"),require("../analytics-chips-and-dropdowns/chart/LineChart/LineChart.js"),require("react-bootstrap"),require("../analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.styled.js"),require("../analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js"),require("../analytics-chips-and-dropdowns/chart/Pie/PieChart.js"),require("../analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js"),require("../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js"),require("../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.js"),require("../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.model.js"),require("../analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js"),require("../analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js"),require("../analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js"),require("../analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js");var u,h,y=require("../modals/styledModal.js"),m=require("../shimmer/ShimmerComponent/BikShimmer.js"),g=require("../shimmer-image/ShimmerImage.js"),j=require("../states/StateComponent.js");require("../../_virtual/_tslib.js"),exports.MEDIA_TYPES=void 0,(u=exports.MEDIA_TYPES||(exports.MEDIA_TYPES={})).STORY="story",u.POST="post",u.REEL="reel",exports.DateKeys=void 0,(h=exports.DateKeys||(exports.DateKeys={})).Today="Today",h["7_Days"]="7",h["30_Days"]="30",h.custom="custom",h.Yesterday="Yesterday";const x=[{label:"Today",value:"today",key:exports.DateKeys.Today,typeValue:[new Date,new Date]},{label:"Last 7 days",value:"7 days",key:exports.DateKeys["7_Days"],typeValue:[new Date((new Date).setDate((new Date).getDate()-6)),new Date]},{label:"Last 30 days",value:"30 days",key:exports.DateKeys["30_Days"],typeValue:[new Date((new Date).setDate((new Date).getDate()-29)),new Date]},{label:"Custom range",value:"calender",key:exports.DateKeys.custom,isCustom:!0,dateRangeSelectionOptions:{selectRange:!0,maxDate:new Date((new Date).setMonth((new Date).getMonth()+3))}}];exports.PostPicker=u=>{var h,S;const[D,v]=a.useState(null!==(h=u.previouslySelected)&&void 0!==h?h:[]),[w,C]=a.useState(""),[T,b]=a.useState(!1),[f,O]=a.useState(u.media),[q,k]=a.useState(!1),[E,P]=a.useState(!1),[B,I]=a.useState(!1),_=a.useRef(null);a.useEffect((()=>{u.media.length||(b(!0),setTimeout((()=>{b(!1)}),2e3)),v(u.selected||[])}),[]),a.useEffect((()=>{u.media.length>0&&(O(u.media),b(!1))}),[null===(S=null==u?void 0:u.media)||void 0===S?void 0:S.length]),a.useEffect((()=>{D.length>0&&C("")}),[D.length]),a.useEffect((()=>{q&&(O(u.media),P(!1))}),[q]),a.useEffect((()=>{const e=e=>{document.getElementById("analytic-dropdown").contains(e.target)||I(!B)},t=document.getElementById("post-picker");return t&&t.addEventListener("click",e),()=>{t&&t.removeEventListener("click",e)}}));return e.jsx("div",Object.assign({ref:_},{children:e.jsxs(y.StyledModal,Object.assign({zIndex:201,open:u.showModal,headingTitle:u.title,onClose:u.onClose,centralContainerStyles:{width:1071,height:u.showFilter?650:564},primaryButton:{disabled:!f.length,buttonType:"primary",buttonText:`Select ${n.unCamelCase(u.mediaType)}`,onClick:()=>{D.length?u.onSelect(D):C(`Please select a ${u.mediaType} to proceed`)}},secondaryButton:{buttonType:"secondary",buttonText:"Back",onClick:()=>u.onClose()},footerLeftCustomElement:w?e.jsx(r.Tag,{tagText:w,type:"negative",LeadingIcon:c.default}):D.length?e.jsxs(i.BodySecondary,{children:[D.length," selected"]}):null,id:"post-picker"},{children:[u.showFilter&&e.jsxs("div",Object.assign({style:{marginTop:24,marginBottom:24,padding:"0 24px",display:"flex",flexDirection:"row",gap:8,alignItems:"center"}},{children:[e.jsx(p.AnalyticsDropdown,{options:x,placeholder:"posted on",resetDropdown:q,onOptionSelected:e=>{var t,a;let s=null,r=null;"Custom range"===e.label?(s=(null===(t=null==e?void 0:e.selectedRange)||void 0===t?void 0:t[0])||new Date,r=(null===(a=null==e?void 0:e.selectedRange)||void 0===a?void 0:a[1])||new Date):(s=e.typeValue[0],r=e.typeValue[1]);const i=u.media.filter((e=>function(e,t,a){const s=new Date(e),r=new Date(t),i=new Date(a);return s>=r&&s<=i}(e.timestamp,s,r)));O(i),P(!0),k(!1)},closeDropdown:B}),E&&e.jsx(i.ButtonRegular,Object.assign({color:l.COLORS.content.secondary,onClick:()=>k(!0)},{children:"Clear"}))]})),T?e.jsx("div",Object.assign({style:{padding:"0 24px"}},{children:e.jsx(m.BikShimmer,{boxes:[{width:(u.mediaType==exports.MEDIA_TYPES.POST?148:104)+"px",height:(u.mediaType==exports.MEDIA_TYPES.POST?148:172)+"px"}]})})):e.jsx(e.Fragment,{children:f&&f.length?e.jsx(s.StyledProductGrid,Object.assign({mediaType:u.mediaType},{children:f.map((t=>{return e.jsxs(s.StyledProduct,Object.assign({mediaType:u.mediaType,className:""+(a=t,r=D,r.some((e=>e.id===a.id))?"selected":""),onClick:()=>{return e=t,void v((()=>D.find((t=>t.id===e.id))?D.filter((t=>t.id!==e.id)):!u.limit||D.length<u.limit?[...D,e]:(C(`Only ${u.limit} ${u.mediaType}s can be selected`),D)));var e}},{children:[e.jsx(g.ShimmerImage,{imageUrl:t.imageUrl,width:u.mediaType==exports.MEDIA_TYPES.POST?148:104,height:u.mediaType==exports.MEDIA_TYPES.POST?148:172,alt:t.overlayCaption}),e.jsxs("div",Object.assign({className:"overlay"},{children:[e.jsx("a",Object.assign({target:"_blank",rel:"noreferrer",href:t.redirectionUrl},{children:e.jsxs("div",Object.assign({className:"overlay__redirection"},{children:[e.jsx(d.default,{height:22,width:22}),e.jsx(i.BodyPrimary,Object.assign({color:o.PRIMARY,style:{fontWeight:500}},{children:"View"}))]}))})),e.jsx("div",Object.assign({className:"overlay__caption"},{children:e.jsx(i.BodyCaption,Object.assign({color:l.COLORS.content.placeholder},{children:t.overlayCaption}))}))]}))]}),t.id);var a,r}))})):e.jsx("div",Object.assign({style:{justifyContent:"center",alignItems:"center",display:"flex",height:422}},{children:u.media.length?f.length?e.jsx(e.Fragment,{}):e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"}},{children:[e.jsx("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"48px",height:"48px",backgroundColor:`${l.COLORS.background.inverse}`,borderRadius:"50%"}},{children:e.jsx(t.SearchIcon,{color:l.COLORS.content.primaryInverse})})),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"8px"}},{children:[e.jsx(i.TitleMedium,{children:"No results found"}),e.jsx(i.BodyPrimary,{children:"Sorry we could not find any results for the selected filter"})]})),e.jsx("div",Object.assign({onClick:()=>{k(!0)}},{children:e.jsx(i.ButtonLarge,Object.assign({color:`${l.COLORS.content.brand}`},{children:"Clear Filter"}))}))]})):e.jsx(j.StateComponent,{states:j.StateInterface.WARNING,heading:`No ${u.mediaType}s on your account`,subline:`There seems to be no ${u.mediaType}s on your account`,isButtonEnabled:!1,width:400})}))})]}))}))},exports.dateOptions=x;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/searchIcon.js"),a=require("react"),s=require("./PostPicker.styled.js"),r=require("../tag/Tag.js"),i=require("../TypographyStyle.js"),n=require("../../utils/unCamelCase.js"),o=require("../../constants/colors.js"),l=require("../../constants/Theme.js"),d=require("../../assets/icons/instagram.svg.js"),c=require("../../assets/icons/warning.svg.js");require("../tooltips/Tooltip.js"),require("../analytics-chips-and-dropdowns/CommonStyles.js");var p=require("../analytics-chips-and-dropdowns/AnalyticsDropdown.js");require("../analytics-chips-and-dropdowns/AnalyticsMetric.js"),require("../shimmer/ShimmerComponent/ShimmerStyled.js"),require("../../utils/DateUtils.js"),require("../analytics-chips-and-dropdowns/chart/LineChart/LineChart.js"),require("react-bootstrap"),require("../analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.styled.js"),require("../analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js"),require("../analytics-chips-and-dropdowns/chart/Pie/PieChart.js"),require("../analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js"),require("../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js"),require("../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.js"),require("../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.model.js"),require("../analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js"),require("../analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js"),require("../analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js"),require("../analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js");var u,h,y=require("../modals/styledModal.js"),m=require("../shimmer/ShimmerComponent/BikShimmer.js"),g=require("../shimmer-image/ShimmerImage.js"),j=require("../states/StateComponent.js");require("../../_virtual/_tslib.js"),exports.MEDIA_TYPES=void 0,(u=exports.MEDIA_TYPES||(exports.MEDIA_TYPES={})).STORY="story",u.POST="post",u.REEL="reel",exports.DateKeys=void 0,(h=exports.DateKeys||(exports.DateKeys={})).Today="Today",h["7_Days"]="7",h["30_Days"]="30",h.custom="custom",h.Yesterday="Yesterday";const x=[{label:"Today",value:"today",key:exports.DateKeys.Today,typeValue:[new Date,new Date]},{label:"Last 7 days",value:"7 days",key:exports.DateKeys["7_Days"],typeValue:[new Date((new Date).setDate((new Date).getDate()-6)),new Date]},{label:"Last 30 days",value:"30 days",key:exports.DateKeys["30_Days"],typeValue:[new Date((new Date).setDate((new Date).getDate()-29)),new Date]},{label:"Custom range",value:"calender",key:exports.DateKeys.custom,isCustom:!0,dateRangeSelectionOptions:{selectRange:!0,maxDate:new Date((new Date).setMonth((new Date).getMonth()+3))}}];exports.PostPicker=u=>{var h,S;const[D,v]=a.useState(null!==(h=u.previouslySelected)&&void 0!==h?h:[]),[w,C]=a.useState(""),[T,b]=a.useState(!1),[f,O]=a.useState(u.media),[q,k]=a.useState(!1),[E,P]=a.useState(!1),[B,I]=a.useState(!1),_=a.useRef(null);a.useEffect((()=>{u.media.length||(b(!0),setTimeout((()=>{b(!1)}),2e3)),v(u.selected||[])}),[]),a.useEffect((()=>{u.media.length>0&&(O(u.media),b(!1))}),[null===(S=null==u?void 0:u.media)||void 0===S?void 0:S.length]),a.useEffect((()=>{D.length>0&&C("")}),[D.length]),a.useEffect((()=>{q&&(O(u.media),P(!1))}),[q]),a.useEffect((()=>{const e=e=>{document.getElementById("analytic-dropdown").contains(e.target)||I(!B)},t=document.getElementById("post-picker");return t&&t.addEventListener("click",e),()=>{t&&t.removeEventListener("click",e)}}));return e.jsx("div",Object.assign({ref:_},{children:e.jsxs(y.StyledModal,Object.assign({zIndex:201,open:u.showModal,headingTitle:u.title,onClose:u.onClose,centralContainerStyles:{width:1071,height:u.showFilter?650:564},primaryButton:{disabled:!f.length,buttonType:"primary",buttonText:`Select ${n.unCamelCase(u.mediaType)}`,onClick:()=>{D.length?u.onSelect(D):C(`Please select a ${u.mediaType} to proceed`)}},secondaryButton:{buttonType:"secondary",buttonText:"Back",onClick:()=>u.onClose()},footerLeftCustomElement:w?e.jsx(r.Tag,{tagText:w,type:"negative",LeadingIcon:c.default}):D.length?e.jsxs(i.BodySecondary,{children:[D.length," selected"]}):null,id:"post-picker"},{children:[u.showFilter&&e.jsxs("div",Object.assign({style:{marginTop:24,marginBottom:24,padding:"0 24px",display:"flex",flexDirection:"row",gap:8,alignItems:"center"}},{children:[e.jsx(p.AnalyticsDropdown,{options:x,placeholder:"posted on",resetDropdown:q,onOptionSelected:e=>{var t,a;let s=null,r=null;"Custom range"===e.label?(s=(null===(t=null==e?void 0:e.selectedRange)||void 0===t?void 0:t[0])||new Date,r=(null===(a=null==e?void 0:e.selectedRange)||void 0===a?void 0:a[1])||new Date):(s=e.typeValue[0],r=e.typeValue[1]);const i=u.media.filter((e=>function(e,t,a){const s=new Date(e),r=new Date(t),i=new Date(a);return s>=r&&s<=i}(e.timestamp,s,r)));O(i),P(!0),k(!1)},closeDropdown:B}),E&&e.jsx(i.ButtonRegular,Object.assign({color:l.COLORS.content.secondary,onClick:()=>k(!0),style:{cursor:"pointer"}},{children:"Clear"}))]})),T?e.jsx("div",Object.assign({style:{padding:"0 24px"}},{children:e.jsx(m.BikShimmer,{boxes:[{width:(u.mediaType==exports.MEDIA_TYPES.POST?148:104)+"px",height:(u.mediaType==exports.MEDIA_TYPES.POST?148:172)+"px"}]})})):e.jsx(e.Fragment,{children:f&&f.length?e.jsx(s.StyledProductGrid,Object.assign({mediaType:u.mediaType},{children:f.map((t=>{return e.jsxs(s.StyledProduct,Object.assign({mediaType:u.mediaType,className:""+(a=t,r=D,r.some((e=>e.id===a.id))?"selected":""),onClick:()=>{return e=t,void v((()=>D.find((t=>t.id===e.id))?D.filter((t=>t.id!==e.id)):!u.limit||D.length<u.limit?[...D,e]:(C(`Only ${u.limit} ${u.mediaType}s can be selected`),D)));var e}},{children:[e.jsx(g.ShimmerImage,{imageUrl:t.imageUrl,width:u.mediaType==exports.MEDIA_TYPES.POST?148:104,height:u.mediaType==exports.MEDIA_TYPES.POST?148:172,alt:t.overlayCaption}),e.jsxs("div",Object.assign({className:"overlay"},{children:[e.jsx("a",Object.assign({target:"_blank",rel:"noreferrer",href:t.redirectionUrl},{children:e.jsxs("div",Object.assign({className:"overlay__redirection"},{children:[e.jsx(d.default,{height:22,width:22}),e.jsx(i.BodyPrimary,Object.assign({color:o.PRIMARY,style:{fontWeight:500}},{children:"View"}))]}))})),e.jsx("div",Object.assign({className:"overlay__caption"},{children:e.jsx(i.BodyCaption,Object.assign({color:l.COLORS.content.placeholder},{children:t.overlayCaption}))}))]}))]}),t.id);var a,r}))})):e.jsx("div",Object.assign({style:{justifyContent:"center",alignItems:"center",display:"flex",height:422}},{children:u.media.length?f.length?e.jsx(e.Fragment,{}):e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"}},{children:[e.jsx("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"48px",height:"48px",backgroundColor:`${l.COLORS.background.inverse}`,borderRadius:"50%"}},{children:e.jsx(t.SearchIcon,{color:l.COLORS.content.primaryInverse})})),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"8px"}},{children:[e.jsx(i.TitleMedium,{children:"No results found"}),e.jsx(i.BodyPrimary,{children:"Sorry we could not find any results for the selected filter"})]})),e.jsx("div",Object.assign({onClick:()=>{k(!0)},style:{cursor:"pointer"}},{children:e.jsx(i.ButtonLarge,Object.assign({color:`${l.COLORS.content.brand}`},{children:"Clear Filter"}))}))]})):e.jsx(j.StateComponent,{states:j.StateInterface.WARNING,heading:`No ${u.mediaType}s on your account`,subline:`There seems to be no ${u.mediaType}s on your account`,isButtonEnabled:!1,width:400})}))})]}))}))},exports.dateOptions=x;
@@ -7,5 +7,6 @@ export type RadioButtonProps = {
7
7
  onValueChange: (checked: boolean, value?: string) => void;
8
8
  skipHoverState?: boolean;
9
9
  size?: 'DEFAULT' | 'SMALL';
10
+ labelSize?: 'DEFAULT' | 'MEDIUM';
10
11
  };
11
12
  export declare const RadioButton: React.FC<RadioButtonProps>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),s=require("./RadioButton.styled.js"),t=require("../TypographyStyle.js"),l=require("../../constants/Theme.js");const a=i=>{const s=i.isDisabled?l.COLORS.content.inactive:i.isActive?l.COLORS.background.positive.vibrant:l.COLORS.content.primary;return e.jsxs("svg",Object.assign({width:i.isSmall?"16":"20",height:i.isSmall?"16":"20",viewBox:i.isSmall?"0 0 16 16":"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("circle",{cx:i.isSmall?"8":"10",cy:i.isSmall?"8":"10",r:i.isSmall?6:9,stroke:s,strokeWidth:i.isSmall?1.5:2}),i.isActive&&e.jsx("circle",{cx:i.isSmall?"8":"10",cy:i.isSmall?"8":"10",r:i.isSmall?3:5,fill:i.isDisabled?l.COLORS.content.inactive:l.COLORS.background.positive.vibrant})]}))};exports.RadioButton=r=>{const[o,n]=i.useState(r.isActive||!1),[c,d]=i.useState(!1),[S,u]=i.useState(!1);return i.useEffect((()=>{n(r.isActive)}),[r.isActive]),e.jsxs(s.RadioButtonContainer,Object.assign({onClick:()=>{var e;if(!r.isDisabled){const i=!o;n(i),null===(e=r.onValueChange)||void 0===e||e.call(r,i,r.value)}},onMouseEnter:()=>d(!r.skipHoverState),onMouseLeave:()=>d(!1),onMouseDown:()=>u(!r.skipHoverState),onMouseUp:()=>u(!1)},{children:[e.jsx(s.RadioButtonIcon,Object.assign({checked:o,hovered:c,clicked:S,isDisabled:r.isDisabled||!1,size:r.size},{children:e.jsx(a,{isSmall:"SMALL"===r.size,isActive:o,isDisabled:r.isDisabled||!1})})),r.label&&"SMALL"!==r.size&&e.jsx(t.BodyPrimary,Object.assign({color:r.isDisabled?l.COLORS.text.disabled:l.COLORS.text.primary},{children:r.label})),r.label&&"SMALL"===r.size&&e.jsx(t.BodyCaption,Object.assign({color:r.isDisabled?l.COLORS.text.disabled:l.COLORS.text.primary},{children:r.label}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),s=require("./RadioButton.styled.js"),t=require("../TypographyStyle.js"),l=require("../../constants/Theme.js");const a=i=>{const s=i.isDisabled?l.COLORS.content.inactive:i.isActive?l.COLORS.background.positive.vibrant:l.COLORS.content.primary;return e.jsxs("svg",Object.assign({width:i.isSmall?"16":"20",height:i.isSmall?"16":"20",viewBox:i.isSmall?"0 0 16 16":"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("circle",{cx:i.isSmall?"8":"10",cy:i.isSmall?"8":"10",r:i.isSmall?6:9,stroke:s,strokeWidth:i.isSmall?1.5:2}),i.isActive&&e.jsx("circle",{cx:i.isSmall?"8":"10",cy:i.isSmall?"8":"10",r:i.isSmall?3:5,fill:i.isDisabled?l.COLORS.content.inactive:l.COLORS.background.positive.vibrant})]}))};exports.RadioButton=r=>{const[o,n]=i.useState(r.isActive||!1),[c,d]=i.useState(!1),[S,b]=i.useState(!1);i.useEffect((()=>{n(r.isActive)}),[r.isActive]);return e.jsxs(s.RadioButtonContainer,Object.assign({onClick:()=>{var e;if(!r.isDisabled){const i=!o;n(i),null===(e=r.onValueChange)||void 0===e||e.call(r,i,r.value)}},onMouseEnter:()=>d(!r.skipHoverState),onMouseLeave:()=>d(!1),onMouseDown:()=>b(!r.skipHoverState),onMouseUp:()=>b(!1)},{children:[e.jsx(s.RadioButtonIcon,Object.assign({checked:o,hovered:c,clicked:S,isDisabled:r.isDisabled||!1,size:r.size},{children:e.jsx(a,{isSmall:"SMALL"===r.size,isActive:o,isDisabled:r.isDisabled||!1})})),r.label?"SMALL"===r.size?e.jsx(t.BodyCaption,Object.assign({color:r.isDisabled?l.COLORS.text.disabled:l.COLORS.text.primary},{children:r.label})):"MEDIUM"===r.labelSize?e.jsx(t.BodySecondary,Object.assign({color:r.isDisabled?l.COLORS.text.disabled:l.COLORS.text.primary},{children:r.label})):e.jsx(t.BodyPrimary,Object.assign({color:r.isDisabled?l.COLORS.text.disabled:l.COLORS.text.primary},{children:r.label})):e.jsx(e.Fragment,{})]}))};
@@ -8,6 +8,7 @@ export type RadioListProps = {
8
8
  subTitle?: string;
9
9
  listItems: RadioListItem[];
10
10
  onChange: (option: RadioListItem) => void;
11
+ listContainerStyles?: React.CSSProperties;
11
12
  };
12
13
  export declare const RadioList: React.FC<RadioListProps>;
13
14
  export {};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),s=require("../radioButton/RadioButton.js"),i=require("./RadioList.styled.js"),r=require("../TypographyStyle.js"),a=require("../../constants/Theme.js");exports.RadioList=l=>{const[n,c]=t.useState(l.listItems);t.useEffect((()=>{c(l.listItems)}),[l.listItems]);const o=(e,t)=>{let s;const i=[...n];i.forEach((i=>{i.value===t?(s=i,i.isActive=e):i.isActive=!e})),c(i),l.onChange(s)};return e.jsxs(i.RadioListStyled,{children:[(l.title||l.subTitle)&&e.jsxs("div",Object.assign({className:"title__container"},{children:[l.title&&e.jsx(r.TitleRegular,{children:l.title}),l.subTitle&&e.jsx(r.BodySecondary,Object.assign({color:a.COLORS.text.secondary},{children:l.subTitle}))]})),e.jsx("div",Object.assign({className:"list__container"},{children:n.map((t=>e.jsx(s.RadioButton,Object.assign({},t,{onValueChange:o}),t.value)))}))]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),s=require("../radioButton/RadioButton.js"),i=require("./RadioList.styled.js"),r=require("../TypographyStyle.js"),a=require("../../constants/Theme.js");exports.RadioList=l=>{var n;const[o,c]=t.useState(l.listItems);t.useEffect((()=>{c(l.listItems)}),[l.listItems]);const u=(e,t)=>{let s;const i=[...o];i.forEach((i=>{i.value===t?(s=i,i.isActive=e):i.isActive=!e})),c(i),l.onChange(s)};return e.jsxs(i.RadioListStyled,{children:[(l.title||l.subTitle)&&e.jsxs("div",Object.assign({className:"title__container"},{children:[l.title&&e.jsx(r.TitleRegular,{children:l.title}),l.subTitle&&e.jsx(r.BodySecondary,Object.assign({color:a.COLORS.text.secondary},{children:l.subTitle}))]})),e.jsx("div",Object.assign({style:null!==(n=l.listContainerStyles)&&void 0!==n?n:{},className:"list__container"},{children:o.map((t=>e.jsx(s.RadioButton,Object.assign({},t,{onValueChange:u}),t.value)))}))]})};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),s=require("../../constants/Theme.js"),r=require("../TypographyStyle.js"),a=require("./Tabs.styles.js");const n=r=>{var n,l;const{tabs:i,initialTab:c,onTabSelected:d,TabItemStyledProps:b,selectedTab:u,extendedBorder:p,rightComponent:x,size:T="default",isSquared:m=!1}=r,[g,C]=t.useState(c||i[0].key),{colorsV2:y}=s.DEFAULT_THEME;t.useEffect((()=>{u&&C(u)}),[u]);const j=r.backgroundColor,S=null!==(n=r.selectedTextColor)&&void 0!==n?n:y.background.brand,h=null!==(l=r.textColor)&&void 0!==l?l:y.content.secondary;return e.jsxs(a.TabHeader,Object.assign({bgColor:j},{children:[i.map(((t,s)=>e.jsx(o,{hasEqualSpacing:r.hasEqualSpacing,selectedTextColor:S,textColor:h,tab:t,currentTab:g,TabItemStyledProps:b,IconComponent:t.icon,size:T,setCurrentTab:e=>{d(e),C(e)},isSquared:m,isFirstlement:0==s,isLastElement:s==i.length-1},t.key))),p&&e.jsx(a.EmptyTab,{}),e.jsx(a.RightComponent,{children:x})]}))},o=n=>{const{tab:o,currentTab:l,setCurrentTab:i,TabItemStyledProps:c,IconComponent:d,size:b="default",isSquared:u=!1,isFirstlement:p,isLastElement:x}=n,T=o.key===l,{colorsV2:m}=s.DEFAULT_THEME,g=t.useCallback((()=>Object.assign(Object.assign({},c),{borderRadius:n.isSquared?p?"4px 0px 0px 4px":x?"0px 4px 4px 0px":"":""})),[]);return e.jsxs(a.TabItem,Object.assign({style:g(),selected:T,hasEqualSpacing:n.hasEqualSpacing,onClick:()=>i(n.tab.key),selectedTextColor:n.selectedTextColor,isSquared:u},{children:[d&&e.jsx(d,{selected:T?m.background.brand:m.content.secondary}),e.jsx(a.TabItemText,Object.assign({style:"small"===b?{fontSize:14,fontStyle:"normal",fontWeight:600}:void 0,textColor:n.textColor,selectedTextColor:n.selectedTextColor,selected:T},{children:o.title})),void 0!==o.trailingNumber&&null!==o.trailingNumber&&e.jsx(a.TrailingNumberContainer,Object.assign({selected:T},{children:e.jsx(r.BodyCaption,Object.assign({color:m.content.primaryInverse},{children:o.trailingNumber}))}))]}))};n.displayName="Tabs",o.displayName="TabItemComponent",exports.TabItemComponent=o,exports.Tabs=n;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),s=require("../../constants/Theme.js"),r=require("../TypographyStyle.js"),a=require("./Tabs.styles.js");const n=r=>{var n,l;const{tabs:i,initialTab:c,onTabSelected:d,TabItemStyledProps:b,selectedTab:u,extendedBorder:p,rightComponent:x,size:T="default",isSquared:m=!1,containerStyles:g}=r,[y,C]=t.useState(c||i[0].key),{colorsV2:j}=s.DEFAULT_THEME;t.useEffect((()=>{u&&C(u)}),[u]);const S=r.backgroundColor,h=null!==(n=r.selectedTextColor)&&void 0!==n?n:j.background.brand,q=null!==(l=r.textColor)&&void 0!==l?l:j.content.secondary;return e.jsxs(a.TabHeader,Object.assign({style:null!=g?g:{},bgColor:S},{children:[i.map(((t,s)=>e.jsx(o,{hasEqualSpacing:r.hasEqualSpacing,selectedTextColor:h,textColor:q,tab:t,currentTab:y,TabItemStyledProps:b,IconComponent:t.icon,size:T,setCurrentTab:e=>{d(e),C(e)},isSquared:m,isFirstlement:0==s,isLastElement:s==i.length-1},t.key))),p&&e.jsx(a.EmptyTab,{}),e.jsx(a.RightComponent,{children:x})]}))},o=n=>{const{tab:o,currentTab:l,setCurrentTab:i,TabItemStyledProps:c,IconComponent:d,size:b="default",isSquared:u=!1,isFirstlement:p,isLastElement:x}=n,T=o.key===l,{colorsV2:m}=s.DEFAULT_THEME,g=t.useCallback((()=>Object.assign(Object.assign({},c),{borderRadius:n.isSquared?p?"4px 0px 0px 4px":x?"0px 4px 4px 0px":"":""})),[]);return e.jsxs(a.TabItem,Object.assign({style:g(),selected:T,hasEqualSpacing:n.hasEqualSpacing,onClick:()=>i(n.tab.key),selectedTextColor:n.selectedTextColor,isSquared:u},{children:[d&&e.jsx(d,{selected:T?m.background.brand:m.content.secondary}),e.jsx(a.TabItemText,Object.assign({style:"small"===b?{fontSize:14,fontStyle:"normal",fontWeight:600}:void 0,textColor:n.textColor,selectedTextColor:n.selectedTextColor,selected:T},{children:o.title})),void 0!==o.trailingNumber&&null!==o.trailingNumber&&e.jsx(a.TrailingNumberContainer,Object.assign({selected:T},{children:e.jsx(r.BodyCaption,Object.assign({color:m.content.primaryInverse},{children:o.trailingNumber}))}))]}))};n.displayName="Tabs",o.displayName="TabItemComponent",exports.TabItemComponent=o,exports.Tabs=n;
@@ -36,6 +36,7 @@ export interface TabViewHeaderProps {
36
36
  rightComponent?: JSX.Element;
37
37
  size?: 'small' | 'default';
38
38
  isSquared?: boolean;
39
+ containerStyles?: React.CSSProperties;
39
40
  }
40
41
  export interface TabItemComponentProps {
41
42
  hasEqualSpacing?: boolean;
@@ -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;
@@ -8,5 +8,8 @@ export type CheckBoxProps = {
8
8
  label?: string;
9
9
  size?: 'DEFAULT' | 'SMALL';
10
10
  skipHoverState?: boolean;
11
+ labelSize?: 'DEFAULT' | 'SMALL';
12
+ rightComponent?: JSX.Element;
13
+ checkboxBorderColor?: string;
11
14
  };
12
15
  export declare const CheckBox: React.FC<CheckBoxProps>;
@@ -1 +1 @@
1
- import{jsxs as i,jsx as e}from"react/jsx-runtime";import{useState as l,useEffect as s}from"react";import{CheckboxContainer as a,CheckboxIcon as t}from"./CheckBox.styled.js";import{BodyPrimary as r,BodySecondary as o}from"../TypographyStyle.js";import{COLORS as n}from"../../constants/Theme.js";const d=l=>i("svg",Object.assign({width:l.isSmall?"16":"18",height:l.isSmall?"16":"18",viewBox:l.isSmall?"0 0 16 16":"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e("rect",{x:"0",y:"0",width:l.isSmall?"16":"18",height:l.isSmall?"16":"18",rx:"4",fill:l.isDisabled?n.content.inactive:n.background.positive.vibrant}),!l.isPartial&&e("svg",Object.assign({width:l.isSmall?"8":"10",height:l.isSmall?"7":"9",x:"4",y:"4",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.68189 1.06043C10.0724 1.45096 10.0724 2.08412 9.68189 2.47464L4.02501 8.13152C3.63449 8.52205 3.00132 8.52205 2.6108 8.13152L0.489684 6.01041C0.0991601 5.61988 0.0991598 4.98672 0.489684 4.59619C0.880209 4.20567 1.51337 4.20567 1.9039 4.59619L3.31791 6.0102L8.26768 1.06043C8.6582 0.669907 9.29137 0.669907 9.68189 1.06043Z",fill:"white"})})),l.isPartial&&e("rect",{x:"5",y:l.isSmall?"7":"8",width:l.isSmall?"6":"8",height:"2",rx:"1",fill:n.surface.standard})]})),c=c=>{const[h,m]=l(c.isChecked||!1),[b,g]=l(c.isPartiallyChecked||!1),[p,v]=l(c.isDisabled||!1),[w,x]=l(!1),[S,C]=l(!1);return s((()=>{m(c.isChecked)}),[c.isChecked]),s((()=>{v(c.isDisabled||!1)}),[c.isDisabled]),s((()=>{g(c.isPartiallyChecked||!1)}),[c.isPartiallyChecked]),i(a,Object.assign({onClick:i=>{var e;if(!c.isDisabled){const l=!h;b?g(!b):m(l),null===(e=c.onValueChange)||void 0===e||e.call(c,l,c.value,i)}},onMouseEnter:()=>x(!c.skipHoverState),onMouseLeave:()=>x(!1),onMouseDown:()=>C(!c.skipHoverState),onMouseUp:()=>C(!1)},{children:[e(t,Object.assign({checked:h,hovered:w,clicked:S,isDisabled:p,size:c.size},{children:h&&e(d,{isPartial:b||!1,isDisabled:p,isSmall:"SMALL"===c.size})})),c.label&&"SMALL"!==c.size&&e(r,Object.assign({color:c.isDisabled?n.text.disabled:n.text.primary},{children:c.label})),c.label&&"SMALL"===c.size&&e(o,Object.assign({color:c.isDisabled?n.text.disabled:n.text.primary},{children:c.label}))]}))};export{c as CheckBox};
1
+ import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useState as l,useEffect as s}from"react";import{CheckboxContainer as a,CheckboxIcon as t}from"./CheckBox.styled.js";import{BodyPrimary as r,BodySecondary as o}from"../TypographyStyle.js";import{COLORS as n}from"../../constants/Theme.js";const d=l=>e("svg",Object.assign({width:l.isSmall?"16":"18",height:l.isSmall?"16":"18",viewBox:l.isSmall?"0 0 16 16":"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[i("rect",{x:"0",y:"0",width:l.isSmall?"16":"18",height:l.isSmall?"16":"18",rx:"4",fill:l.isDisabled?n.content.inactive:n.background.positive.vibrant}),!l.isPartial&&i("svg",Object.assign({width:l.isSmall?"8":"10",height:l.isSmall?"7":"9",x:"4",y:"4",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:i("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.68189 1.06043C10.0724 1.45096 10.0724 2.08412 9.68189 2.47464L4.02501 8.13152C3.63449 8.52205 3.00132 8.52205 2.6108 8.13152L0.489684 6.01041C0.0991601 5.61988 0.0991598 4.98672 0.489684 4.59619C0.880209 4.20567 1.51337 4.20567 1.9039 4.59619L3.31791 6.0102L8.26768 1.06043C8.6582 0.669907 9.29137 0.669907 9.68189 1.06043Z",fill:"white"})})),l.isPartial&&i("rect",{x:"5",y:l.isSmall?"7":"8",width:l.isSmall?"6":"8",height:"2",rx:"1",fill:n.surface.standard})]})),c=c=>{const[h,b]=l(c.isChecked||!1),[m,g]=l(c.isPartiallyChecked||!1),[S,p]=l(c.isDisabled||!1),[v,x]=l(!1),[C,w]=l(!1);return s((()=>{b(c.isChecked)}),[c.isChecked]),s((()=>{p(c.isDisabled||!1)}),[c.isDisabled]),s((()=>{g(c.isPartiallyChecked||!1)}),[c.isPartiallyChecked]),e(a,Object.assign({onClick:e=>{var i;if(!c.isDisabled){const l=!h;m?g(!m):b(l),null===(i=c.onValueChange)||void 0===i||i.call(c,l,c.value,e)}},onMouseEnter:()=>x(!c.skipHoverState),onMouseLeave:()=>x(!1),onMouseDown:()=>w(!c.skipHoverState),onMouseUp:()=>w(!1)},{children:[i(t,Object.assign({checked:h,hovered:v,clicked:C,isDisabled:S,size:c.size,borderColor:c.checkboxBorderColor},{children:h&&i(d,{isPartial:m||!1,isDisabled:S,isSmall:"SMALL"===c.size})})),c.label&&"SMALL"!==c.size&&"SMALL"!==c.labelSize&&i(r,Object.assign({color:c.isDisabled?n.text.disabled:n.text.primary},{children:c.label})),c.label&&("SMALL"===c.size||"SMALL"===c.labelSize)&&i(o,Object.assign({color:c.isDisabled?n.text.disabled:n.text.primary},{children:c.label})),c.rightComponent]}))};export{c as CheckBox};
@@ -5,4 +5,5 @@ export declare const CheckboxIcon: import("styled-components").StyledComponent<"
5
5
  clicked: boolean;
6
6
  isDisabled: boolean;
7
7
  size?: "SMALL" | "DEFAULT" | undefined;
8
+ borderColor?: string | undefined;
8
9
  }, never>;
@@ -3,7 +3,7 @@ import e,{css as i}from"styled-components";import{COLORS as o}from"../../constan
3
3
  gap: 8px;
4
4
  align-items: center;
5
5
  cursor: pointer;
6
- `,s=e.div`
6
+ `,r=e.div`
7
7
  width: ${e=>"SMALL"===e.size?12:14}px;
8
8
  height: ${e=>"SMALL"===e.size?12:14}px;
9
9
  border-radius: 4px;
@@ -12,12 +12,13 @@ import e,{css as i}from"styled-components";import{COLORS as o}from"../../constan
12
12
  justify-content: center;
13
13
  align-items: center;
14
14
  box-sizing: content-box;
15
- ${e=>e.isDisabled?i`
15
+ ${e=>{var t;return e.isDisabled?i`
16
16
  border: ${"SMALL"===e.size?1.5:2}px solid
17
17
  ${o.content.inactive};
18
18
  `:i`
19
- border: ${"SMALL"===e.size?1.5:2}px solid black;
20
- `}
19
+ border: ${"SMALL"===e.size?1.5:2}px solid
20
+ ${null!==(t=e.borderColor)&&void 0!==t?t:"black"};
21
+ `}}
21
22
  ${e=>e.checked&&i`
22
23
  border: 0px;
23
24
  width: 18px;
@@ -31,4 +32,4 @@ import e,{css as i}from"styled-components";import{COLORS as o}from"../../constan
31
32
  ${e.checked?o.stroke.positive.lightAlt:o.surface.hovered};
32
33
  outline-offset: 2px;
33
34
  `}
34
- `;export{t as CheckboxContainer,s as CheckboxIcon};
35
+ `;export{t as CheckboxContainer,r as CheckboxIcon};
@@ -8,6 +8,7 @@ export type CheckListProps = {
8
8
  subTitle?: string;
9
9
  listItems: CheckListItem[];
10
10
  onChange: (options: CheckListItem[]) => void;
11
+ listContainerStyles?: React.CSSProperties;
11
12
  };
12
13
  export declare const CheckList: React.FC<CheckListProps>;
13
14
  export {};
@@ -1 +1 @@
1
- import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useState as s,useEffect as i}from"react";import{CheckBox as c}from"../checkBox/CheckBox.js";import{CheckListStyled as o}from"./CheckList.styled.js";import{TitleRegular as r,BodySecondary as n}from"../TypographyStyle.js";import{COLORS as l}from"../../constants/Theme.js";const a=a=>{const[m,h]=s(a.listItems);i((()=>{h(a.listItems)}),[a.listItems]);const d=(t,e)=>{const s=[...m],i=m.find((t=>t.value===e));i&&(i.isChecked=t),h(s);const c=s.filter((t=>t.isChecked));a.onChange(c)};return t(o,{children:[(a.title||a.subTitle)&&t("div",Object.assign({className:"title__container"},{children:[a.title&&e(r,{children:a.title}),a.subTitle&&e(n,Object.assign({color:l.text.secondary},{children:a.subTitle}))]})),e("div",Object.assign({className:"list__container"},{children:m.map((t=>e(c,Object.assign({},t,{onValueChange:d}),t.value)))}))]})};export{a as CheckList};
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useState as s,useEffect as i}from"react";import{CheckBox as n}from"../checkBox/CheckBox.js";import{CheckListStyled as o}from"./CheckList.styled.js";import{TitleRegular as r,BodySecondary as l}from"../TypographyStyle.js";import{COLORS as c}from"../../constants/Theme.js";const a=a=>{var m;const[h,d]=s(a.listItems);i((()=>{d(a.listItems)}),[a.listItems]);const p=(t,e)=>{const s=[...h],i=h.find((t=>t.value===e));i&&(i.isChecked=t),d(s);const n=s.filter((t=>t.isChecked));a.onChange(n)};return t(o,{children:[(a.title||a.subTitle)&&t("div",Object.assign({className:"title__container"},{children:[a.title&&e(r,{children:a.title}),a.subTitle&&e(l,Object.assign({color:c.text.secondary},{children:a.subTitle}))]})),e("div",Object.assign({style:null!==(m=a.listContainerStyles)&&void 0!==m?m:{},className:"list__container"},{children:h.map((t=>e(n,Object.assign({},t,{onValueChange:p}),t.value)))}))]})};export{a as CheckList};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as o,useRef as r,useEffect as i}from"react";import{ZeroState as n}from"../../../zeroState/ZeroState.js";import{useOutside as l}from"../../../../hooks/useOutside.js";import{useDropdown as s}from"../../hooks/useDropdown.js";import{Description as c}from"./description/Description.js";import{FreeFormMenu as a}from"./menu/FreeFormMenu.js";import{MenuList as p}from"./menu/MenuList.js";import{SelectAllMenu as u}from"./menu/SelectAllMenu.js";import d from"./multiSelect/MultiSelectDropdownBottomBar.js";import{OpennedDropdownContainer as h,MenuListContainer as m}from"./OpennedDropdown.styled.js";import{SearchBox as f}from"./searchbox/SearchBox.js";import{SearchZeroState as S}from"./searchbox/SearchZeroState.js";const g=304,v=290,b=b=>{let{options:j,isSearchable:w,isMultiSelect:y,width:x,allowFreeForm:O,height:C,onClose:M,onSelect:D,onSearch:L,version:F,skipSorting:k}=b;const{dropdownOptions:A,search:H,searchedString:B,searchedOptions:Z,onApplyHandler:q,selectAllHandler:z,onMultiSelectClear:I,onFreeFormSelect:K,onMultiSelectApply:N,latestDropdownOptionsRef:P,getSelectedOptions:R}=s(F,j,D,k,y,L),[T,W]=o(null!=x?x:v),[E,G]=o(null),J=r(null);l(J,(()=>{if(G(null),y&&"2.0"===F){const e=R(P.current);null==M||M(e)}else null==M||M(A)}));const Q=null!=C?C:g,U="number"==typeof Q?w&&y?Q-96:w&&!y||!w&&y?Q-48:Q:Q;i((()=>{const e=null!=x?x:v;if(null===E)W(e);else if("number"==typeof e)W(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));W(t)}}),[E]);const V=[],X=(B&&L?Z:A).map((e=>{var t,o;if(B&&!L){if(e.options){const t=Object.assign({},e);return t.options=t.options.filter((e=>{var t;return!!(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(B.toLowerCase()))&&(V.push(!B||e.label===B),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(B.toLowerCase()))||(null===(o=e.searchKey)||void 0===o?void 0:o.toLowerCase().includes(B.toLowerCase()))?(V.push(!B||e.label===B),e):null}return e})).filter((e=>null!==e)),Y=!!w&&B&&0===X.length;return e(h,Object.assign({version:F,ref:J,style:{width:T}},{children:[e("div",Object.assign({style:{width:E?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!w&&t(f,{onSearch:H,version:F}),X.length||B?e(m,Object.assign({minHeight:Q,maxHeight:U},{children:[!!y&&!Y&&t(u,{version:F,options:B&&L?Z:A,onSelect:z}),!O&&Y&&t(S,{height:U,searchedString:B}),O&&(Y||!!V.length&&V.every((e=>!1===e)))&&t(a,{version:F,isMultiSelect:y,onSelect:K,searchedString:B}),t(p,{version:F,onSelect:q,showDescription:function(e,t){G(e&&t?{title:e,description:t}:null)},isMultiSelect:y,options:X})]})):t("div",Object.assign({style:{height:Q,display:"flex"}},{children:t(n,{title:"No results found",subTitle:"Please try again later or contact us at support@bik.ai if you require further assistance."})})),!!y&&!(!X.length&&!B)&&"2.0"!==F&&t(d,{onClear:I,onApply:N,list:B&&L?Z:A})]})),!!E&&t(c,{title:E.title,description:E.description,version:F})]}))};export{b as OpenedDropdown};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as o,useRef as r,useEffect as i}from"react";import{ZeroState as n}from"../../../zeroState/ZeroState.js";import{useOutside as l}from"../../../../hooks/useOutside.js";import{useDropdown as s}from"../../hooks/useDropdown.js";import{Description as c}from"./description/Description.js";import{FreeFormMenu as a}from"./menu/FreeFormMenu.js";import{MenuList as p}from"./menu/MenuList.js";import{SelectAllMenu as u}from"./menu/SelectAllMenu.js";import d from"./multiSelect/MultiSelectDropdownBottomBar.js";import{OpennedDropdownContainer as h,MenuListContainer as m}from"./OpennedDropdown.styled.js";import{SearchBox as f}from"./searchbox/SearchBox.js";import{SearchZeroState as S}from"./searchbox/SearchZeroState.js";const g=304,b=290,v=v=>{let{options:j,isSearchable:w,isMultiSelect:y,width:x,allowFreeForm:O,height:C,onClose:M,onSelect:D,onSearch:L,version:A,skipSorting:F,hideSelectAll:k,primaryButtonText:B}=v;const{dropdownOptions:H,search:T,searchedString:Z,searchedOptions:q,onApplyHandler:z,selectAllHandler:I,onMultiSelectClear:K,onFreeFormSelect:N,onMultiSelectApply:P,latestDropdownOptionsRef:R,getSelectedOptions:W}=s(A,j,D,F,y,L),[E,G]=o(null!=x?x:b),[J,Q]=o(null),U=r(null);l(U,(()=>{if(Q(null),y&&"2.0"===A){const e=W(R.current);null==M||M(e)}else null==M||M(H)}));const V=null!=C?C:g,X="number"==typeof V?w&&y?V-96:w&&!y||!w&&y?V-48:V:V;i((()=>{const e=null!=x?x:b;if(null===J)G(e);else if("number"==typeof e)G(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));G(t)}}),[J]);const Y=[],$=(Z&&L?q:H).map((e=>{var t,o;if(Z&&!L){if(e.options){const t=Object.assign({},e);return t.options=t.options.filter((e=>{var t;return!!(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(Z.toLowerCase()))&&(Y.push(!Z||e.label===Z),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(Z.toLowerCase()))||(null===(o=e.searchKey)||void 0===o?void 0:o.toLowerCase().includes(Z.toLowerCase()))?(Y.push(!Z||e.label===Z),e):null}return e})).filter((e=>null!==e)),_=!!w&&Z&&0===$.length;return e(h,Object.assign({version:A,ref:U,style:{width:E}},{children:[e("div",Object.assign({style:{width:J?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!w&&t(f,{onSearch:T,version:A}),$.length||Z?e(m,Object.assign({minHeight:V,maxHeight:X},{children:[!!y&&!_&&k&&t(u,{version:A,options:Z&&L?q:H,onSelect:I}),!O&&_&&t(S,{height:X,searchedString:Z}),O&&(_||!!Y.length&&Y.every((e=>!1===e)))&&t(a,{version:A,isMultiSelect:y,onSelect:N,searchedString:Z}),t(p,{version:A,onSelect:z,showDescription:function(e,t){Q(e&&t?{title:e,description:t}:null)},isMultiSelect:y,options:$})]})):t("div",Object.assign({style:{height:V,display:"flex"}},{children:t(n,{title:"No results found",subTitle:"Please try again later or contact us at support@bik.ai if you require further assistance."})})),!!y&&!(!$.length&&!Z)&&"2.0"!==A&&t(d,{onClear:K,onApply:P,list:Z&&L?q:H,buttonText:B})]})),!!J&&t(c,{title:J.title,description:J.description,version:A})]}))};export{v as OpenedDropdown};
@@ -4,5 +4,6 @@ declare const MultiSelectDropdownBottomBar: React.FC<{
4
4
  onClear?: () => void;
5
5
  onApply: () => void;
6
6
  list: DropdownOption[];
7
+ buttonText?: string;
7
8
  }>;
8
9
  export default MultiSelectDropdownBottomBar;
@@ -1 +1 @@
1
- import{jsxs as t,jsx as e}from"react/jsx-runtime";import{Button as o}from"../../../../button/Button.js";import{BodySecondary as r}from"../../../../TypographyStyle.js";import{COLORS as l}from"../../../../../constants/Theme.js";import{BottomBarContainer as n}from"./MultiSelectDropdownBottomBar.styled.js";const s=s=>{let{onApply:i,onClear:c,list:p}=s;const a=p.reduce(((t,e)=>{if(e.options){return t+e.options.filter((t=>!0===t.selected)).length}return e.selected?t+1:t}),0);return t(n,Object.assign({style:{justifyContent:"space-between"}},{children:[e(r,Object.assign({style:{flex:1,color:l.content.primary}},{children:a?`${a} selected`:""})),t("div",Object.assign({style:{flexDirection:"row",display:"flex",gap:12}},{children:[e(o,{size:"small",buttonType:"tertiaryGray",buttonText:"Clear",onClick:c}),e(o,{size:"small",buttonText:"Apply",onClick:()=>{i()}})]}))]}))};export{s as default};
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import{Button as o}from"../../../../button/Button.js";import{BodySecondary as r}from"../../../../TypographyStyle.js";import{COLORS as l}from"../../../../../constants/Theme.js";import{BottomBarContainer as n}from"./MultiSelectDropdownBottomBar.styled.js";const s=s=>{let{onApply:i,onClear:c,list:p,buttonText:a}=s;const m=p.reduce(((t,e)=>{if(e.options){return t+e.options.filter((t=>!0===t.selected)).length}return e.selected?t+1:t}),0);return t(n,Object.assign({style:{justifyContent:"space-between"}},{children:[e(r,Object.assign({style:{flex:1,color:l.content.primary}},{children:m?`${m} selected`:""})),t("div",Object.assign({style:{flexDirection:"row",display:"flex",gap:12}},{children:[e(o,{size:"small",buttonType:"tertiaryGray",buttonText:"Clear",onClick:c}),e(o,{size:"small",buttonText:null!=a?a:"Apply",onClick:()=>{i()}})]}))]}))};export{s as default};
@@ -16,6 +16,8 @@ export interface OpenDropdownProps {
16
16
  onSearch?: (key: string) => Promise<DropdownOption[]>;
17
17
  version?: '1.0' | '2.0';
18
18
  skipSorting?: boolean;
19
+ hideSelectAll?: boolean;
20
+ primaryButtonText?: string;
19
21
  }
20
22
  export type GroupedOption = {
21
23
  label?: string;
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import{SearchIcon as i}from"../../assets/icons/searchIcon.js";import{useState as n,useRef as r,useEffect as o}from"react";import{StyledProductGrid as s,StyledProduct as l}from"./PostPicker.styled.js";import{Tag as d}from"../tag/Tag.js";import{ButtonRegular as c,BodyPrimary as p,BodyCaption as m,TitleMedium as h,ButtonLarge as y,BodySecondary as g}from"../TypographyStyle.js";import{unCamelCase as u}from"../../utils/unCamelCase.js";import{PRIMARY as j}from"../../constants/colors.js";import{COLORS as w}from"../../constants/Theme.js";import v from"../../assets/icons/instagram.svg.js";import f from"../../assets/icons/warning.svg.js";import"../tooltips/Tooltip.js";import"../analytics-chips-and-dropdowns/CommonStyles.js";import{AnalyticsDropdown as b}from"../analytics-chips-and-dropdowns/AnalyticsDropdown.js";import"../analytics-chips-and-dropdowns/AnalyticsMetric.js";import"../shimmer/ShimmerComponent/ShimmerStyled.js";import"../../utils/DateUtils.js";import"../analytics-chips-and-dropdowns/chart/LineChart/LineChart.js";import"react-bootstrap";import"../analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.styled.js";import"../analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js";import"../analytics-chips-and-dropdowns/chart/Pie/PieChart.js";import"../analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js";import"../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js";import"../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.js";import"../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.model.js";import"../analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js";import"../analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js";import"../analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js";import"../analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js";import{StyledModal as C}from"../modals/styledModal.js";import{BikShimmer as D}from"../shimmer/ShimmerComponent/BikShimmer.js";import{ShimmerImage as T}from"../shimmer-image/ShimmerImage.js";import{StateComponent as O,StateInterface as S}from"../states/StateComponent.js";import"../../_virtual/_tslib.js";var k,x;!function(e){e.STORY="story",e.POST="post",e.REEL="reel"}(k||(k={})),function(e){e.Today="Today",e["7_Days"]="7",e["30_Days"]="30",e.custom="custom",e.Yesterday="Yesterday"}(x||(x={}));const B=[{label:"Today",value:"today",key:x.Today,typeValue:[new Date,new Date]},{label:"Last 7 days",value:"7 days",key:x["7_Days"],typeValue:[new Date((new Date).setDate((new Date).getDate()-6)),new Date]},{label:"Last 30 days",value:"30 days",key:x["30_Days"],typeValue:[new Date((new Date).setDate((new Date).getDate()-29)),new Date]},{label:"Custom range",value:"calender",key:x.custom,isCustom:!0,dateRangeSelectionOptions:{selectRange:!0,maxDate:new Date((new Date).setMonth((new Date).getMonth()+3))}}],I=x=>{var I,L;const[P,V]=n(null!==(I=x.previouslySelected)&&void 0!==I?I:[]),[_,G]=n(""),[E,N]=n(!1),[R,$]=n(x.media),[M,A]=n(!1),[H,U]=n(!1),[z,F]=n(!1),Y=r(null);o((()=>{x.media.length||(N(!0),setTimeout((()=>{N(!1)}),2e3)),V(x.selected||[])}),[]),o((()=>{x.media.length>0&&($(x.media),N(!1))}),[null===(L=null==x?void 0:x.media)||void 0===L?void 0:L.length]),o((()=>{P.length>0&&G("")}),[P.length]),o((()=>{M&&($(x.media),U(!1))}),[M]),o((()=>{const e=e=>{document.getElementById("analytic-dropdown").contains(e.target)||F(!z)},t=document.getElementById("post-picker");return t&&t.addEventListener("click",e),()=>{t&&t.removeEventListener("click",e)}}));return e("div",Object.assign({ref:Y},{children:t(C,Object.assign({zIndex:201,open:x.showModal,headingTitle:x.title,onClose:x.onClose,centralContainerStyles:{width:1071,height:x.showFilter?650:564},primaryButton:{disabled:!R.length,buttonType:"primary",buttonText:`Select ${u(x.mediaType)}`,onClick:()=>{P.length?x.onSelect(P):G(`Please select a ${x.mediaType} to proceed`)}},secondaryButton:{buttonType:"secondary",buttonText:"Back",onClick:()=>x.onClose()},footerLeftCustomElement:_?e(d,{tagText:_,type:"negative",LeadingIcon:f}):P.length?t(g,{children:[P.length," selected"]}):null,id:"post-picker"},{children:[x.showFilter&&t("div",Object.assign({style:{marginTop:24,marginBottom:24,padding:"0 24px",display:"flex",flexDirection:"row",gap:8,alignItems:"center"}},{children:[e(b,{options:B,placeholder:"posted on",resetDropdown:M,onOptionSelected:e=>{var t,a;let i=null,n=null;"Custom range"===e.label?(i=(null===(t=null==e?void 0:e.selectedRange)||void 0===t?void 0:t[0])||new Date,n=(null===(a=null==e?void 0:e.selectedRange)||void 0===a?void 0:a[1])||new Date):(i=e.typeValue[0],n=e.typeValue[1]);const r=x.media.filter((e=>function(e,t,a){const i=new Date(e),n=new Date(t),r=new Date(a);return i>=n&&i<=r}(e.timestamp,i,n)));$(r),U(!0),A(!1)},closeDropdown:z}),H&&e(c,Object.assign({color:w.content.secondary,onClick:()=>A(!0)},{children:"Clear"}))]})),E?e("div",Object.assign({style:{padding:"0 24px"}},{children:e(D,{boxes:[{width:(x.mediaType==k.POST?148:104)+"px",height:(x.mediaType==k.POST?148:172)+"px"}]})})):e(a,{children:R&&R.length?e(s,Object.assign({mediaType:x.mediaType},{children:R.map((a=>{return t(l,Object.assign({mediaType:x.mediaType,className:""+(i=a,n=P,n.some((e=>e.id===i.id))?"selected":""),onClick:()=>{return e=a,void V((()=>P.find((t=>t.id===e.id))?P.filter((t=>t.id!==e.id)):!x.limit||P.length<x.limit?[...P,e]:(G(`Only ${x.limit} ${x.mediaType}s can be selected`),P)));var e}},{children:[e(T,{imageUrl:a.imageUrl,width:x.mediaType==k.POST?148:104,height:x.mediaType==k.POST?148:172,alt:a.overlayCaption}),t("div",Object.assign({className:"overlay"},{children:[e("a",Object.assign({target:"_blank",rel:"noreferrer",href:a.redirectionUrl},{children:t("div",Object.assign({className:"overlay__redirection"},{children:[e(v,{height:22,width:22}),e(p,Object.assign({color:j,style:{fontWeight:500}},{children:"View"}))]}))})),e("div",Object.assign({className:"overlay__caption"},{children:e(m,Object.assign({color:w.content.placeholder},{children:a.overlayCaption}))}))]}))]}),a.id);var i,n}))})):e("div",Object.assign({style:{justifyContent:"center",alignItems:"center",display:"flex",height:422}},{children:x.media.length?R.length?e(a,{}):t("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"}},{children:[e("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"48px",height:"48px",backgroundColor:`${w.background.inverse}`,borderRadius:"50%"}},{children:e(i,{color:w.content.primaryInverse})})),t("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"8px"}},{children:[e(h,{children:"No results found"}),e(p,{children:"Sorry we could not find any results for the selected filter"})]})),e("div",Object.assign({onClick:()=>{A(!0)}},{children:e(y,Object.assign({color:`${w.content.brand}`},{children:"Clear Filter"}))}))]})):e(O,{states:S.WARNING,heading:`No ${x.mediaType}s on your account`,subline:`There seems to be no ${x.mediaType}s on your account`,isButtonEnabled:!1,width:400})}))})]}))}))};export{x as DateKeys,k as MEDIA_TYPES,I as PostPicker,B as dateOptions};
1
+ import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import{SearchIcon as i}from"../../assets/icons/searchIcon.js";import{useState as n,useRef as r,useEffect as o}from"react";import{StyledProductGrid as s,StyledProduct as l}from"./PostPicker.styled.js";import{Tag as d}from"../tag/Tag.js";import{ButtonRegular as c,BodyPrimary as p,BodyCaption as m,TitleMedium as h,ButtonLarge as y,BodySecondary as g}from"../TypographyStyle.js";import{unCamelCase as u}from"../../utils/unCamelCase.js";import{PRIMARY as j}from"../../constants/colors.js";import{COLORS as w}from"../../constants/Theme.js";import v from"../../assets/icons/instagram.svg.js";import f from"../../assets/icons/warning.svg.js";import"../tooltips/Tooltip.js";import"../analytics-chips-and-dropdowns/CommonStyles.js";import{AnalyticsDropdown as b}from"../analytics-chips-and-dropdowns/AnalyticsDropdown.js";import"../analytics-chips-and-dropdowns/AnalyticsMetric.js";import"../shimmer/ShimmerComponent/ShimmerStyled.js";import"../../utils/DateUtils.js";import"../analytics-chips-and-dropdowns/chart/LineChart/LineChart.js";import"react-bootstrap";import"../analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.styled.js";import"../analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js";import"../analytics-chips-and-dropdowns/chart/Pie/PieChart.js";import"../analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js";import"../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js";import"../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.js";import"../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.model.js";import"../analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js";import"../analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js";import"../analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js";import"../analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js";import{StyledModal as C}from"../modals/styledModal.js";import{BikShimmer as D}from"../shimmer/ShimmerComponent/BikShimmer.js";import{ShimmerImage as T}from"../shimmer-image/ShimmerImage.js";import{StateComponent as O,StateInterface as S}from"../states/StateComponent.js";import"../../_virtual/_tslib.js";var k,x;!function(e){e.STORY="story",e.POST="post",e.REEL="reel"}(k||(k={})),function(e){e.Today="Today",e["7_Days"]="7",e["30_Days"]="30",e.custom="custom",e.Yesterday="Yesterday"}(x||(x={}));const B=[{label:"Today",value:"today",key:x.Today,typeValue:[new Date,new Date]},{label:"Last 7 days",value:"7 days",key:x["7_Days"],typeValue:[new Date((new Date).setDate((new Date).getDate()-6)),new Date]},{label:"Last 30 days",value:"30 days",key:x["30_Days"],typeValue:[new Date((new Date).setDate((new Date).getDate()-29)),new Date]},{label:"Custom range",value:"calender",key:x.custom,isCustom:!0,dateRangeSelectionOptions:{selectRange:!0,maxDate:new Date((new Date).setMonth((new Date).getMonth()+3))}}],I=x=>{var I,L;const[P,V]=n(null!==(I=x.previouslySelected)&&void 0!==I?I:[]),[_,G]=n(""),[E,N]=n(!1),[R,$]=n(x.media),[M,A]=n(!1),[H,U]=n(!1),[z,F]=n(!1),Y=r(null);o((()=>{x.media.length||(N(!0),setTimeout((()=>{N(!1)}),2e3)),V(x.selected||[])}),[]),o((()=>{x.media.length>0&&($(x.media),N(!1))}),[null===(L=null==x?void 0:x.media)||void 0===L?void 0:L.length]),o((()=>{P.length>0&&G("")}),[P.length]),o((()=>{M&&($(x.media),U(!1))}),[M]),o((()=>{const e=e=>{document.getElementById("analytic-dropdown").contains(e.target)||F(!z)},t=document.getElementById("post-picker");return t&&t.addEventListener("click",e),()=>{t&&t.removeEventListener("click",e)}}));return e("div",Object.assign({ref:Y},{children:t(C,Object.assign({zIndex:201,open:x.showModal,headingTitle:x.title,onClose:x.onClose,centralContainerStyles:{width:1071,height:x.showFilter?650:564},primaryButton:{disabled:!R.length,buttonType:"primary",buttonText:`Select ${u(x.mediaType)}`,onClick:()=>{P.length?x.onSelect(P):G(`Please select a ${x.mediaType} to proceed`)}},secondaryButton:{buttonType:"secondary",buttonText:"Back",onClick:()=>x.onClose()},footerLeftCustomElement:_?e(d,{tagText:_,type:"negative",LeadingIcon:f}):P.length?t(g,{children:[P.length," selected"]}):null,id:"post-picker"},{children:[x.showFilter&&t("div",Object.assign({style:{marginTop:24,marginBottom:24,padding:"0 24px",display:"flex",flexDirection:"row",gap:8,alignItems:"center"}},{children:[e(b,{options:B,placeholder:"posted on",resetDropdown:M,onOptionSelected:e=>{var t,a;let i=null,n=null;"Custom range"===e.label?(i=(null===(t=null==e?void 0:e.selectedRange)||void 0===t?void 0:t[0])||new Date,n=(null===(a=null==e?void 0:e.selectedRange)||void 0===a?void 0:a[1])||new Date):(i=e.typeValue[0],n=e.typeValue[1]);const r=x.media.filter((e=>function(e,t,a){const i=new Date(e),n=new Date(t),r=new Date(a);return i>=n&&i<=r}(e.timestamp,i,n)));$(r),U(!0),A(!1)},closeDropdown:z}),H&&e(c,Object.assign({color:w.content.secondary,onClick:()=>A(!0),style:{cursor:"pointer"}},{children:"Clear"}))]})),E?e("div",Object.assign({style:{padding:"0 24px"}},{children:e(D,{boxes:[{width:(x.mediaType==k.POST?148:104)+"px",height:(x.mediaType==k.POST?148:172)+"px"}]})})):e(a,{children:R&&R.length?e(s,Object.assign({mediaType:x.mediaType},{children:R.map((a=>{return t(l,Object.assign({mediaType:x.mediaType,className:""+(i=a,n=P,n.some((e=>e.id===i.id))?"selected":""),onClick:()=>{return e=a,void V((()=>P.find((t=>t.id===e.id))?P.filter((t=>t.id!==e.id)):!x.limit||P.length<x.limit?[...P,e]:(G(`Only ${x.limit} ${x.mediaType}s can be selected`),P)));var e}},{children:[e(T,{imageUrl:a.imageUrl,width:x.mediaType==k.POST?148:104,height:x.mediaType==k.POST?148:172,alt:a.overlayCaption}),t("div",Object.assign({className:"overlay"},{children:[e("a",Object.assign({target:"_blank",rel:"noreferrer",href:a.redirectionUrl},{children:t("div",Object.assign({className:"overlay__redirection"},{children:[e(v,{height:22,width:22}),e(p,Object.assign({color:j,style:{fontWeight:500}},{children:"View"}))]}))})),e("div",Object.assign({className:"overlay__caption"},{children:e(m,Object.assign({color:w.content.placeholder},{children:a.overlayCaption}))}))]}))]}),a.id);var i,n}))})):e("div",Object.assign({style:{justifyContent:"center",alignItems:"center",display:"flex",height:422}},{children:x.media.length?R.length?e(a,{}):t("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"}},{children:[e("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"48px",height:"48px",backgroundColor:`${w.background.inverse}`,borderRadius:"50%"}},{children:e(i,{color:w.content.primaryInverse})})),t("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"8px"}},{children:[e(h,{children:"No results found"}),e(p,{children:"Sorry we could not find any results for the selected filter"})]})),e("div",Object.assign({onClick:()=>{A(!0)},style:{cursor:"pointer"}},{children:e(y,Object.assign({color:`${w.content.brand}`},{children:"Clear Filter"}))}))]})):e(O,{states:S.WARNING,heading:`No ${x.mediaType}s on your account`,subline:`There seems to be no ${x.mediaType}s on your account`,isButtonEnabled:!1,width:400})}))})]}))}))};export{x as DateKeys,k as MEDIA_TYPES,I as PostPicker,B as dateOptions};
@@ -7,5 +7,6 @@ export type RadioButtonProps = {
7
7
  onValueChange: (checked: boolean, value?: string) => void;
8
8
  skipHoverState?: boolean;
9
9
  size?: 'DEFAULT' | 'SMALL';
10
+ labelSize?: 'DEFAULT' | 'MEDIUM';
10
11
  };
11
12
  export declare const RadioButton: React.FC<RadioButtonProps>;
@@ -1 +1 @@
1
- import{jsxs as i,jsx as e}from"react/jsx-runtime";import{useState as s,useEffect as l}from"react";import{RadioButtonContainer as t,RadioButtonIcon as a}from"./RadioButton.styled.js";import{BodyPrimary as o,BodyCaption as r}from"../TypographyStyle.js";import{COLORS as c}from"../../constants/Theme.js";const n=s=>{const l=s.isDisabled?c.content.inactive:s.isActive?c.background.positive.vibrant:c.content.primary;return i("svg",Object.assign({width:s.isSmall?"16":"20",height:s.isSmall?"16":"20",viewBox:s.isSmall?"0 0 16 16":"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e("circle",{cx:s.isSmall?"8":"10",cy:s.isSmall?"8":"10",r:s.isSmall?6:9,stroke:l,strokeWidth:s.isSmall?1.5:2}),s.isActive&&e("circle",{cx:s.isSmall?"8":"10",cy:s.isSmall?"8":"10",r:s.isSmall?3:5,fill:s.isDisabled?c.content.inactive:c.background.positive.vibrant})]}))},d=d=>{const[m,b]=s(d.isActive||!1),[v,p]=s(!1),[S,h]=s(!1);return l((()=>{b(d.isActive)}),[d.isActive]),i(t,Object.assign({onClick:()=>{var i;if(!d.isDisabled){const e=!m;b(e),null===(i=d.onValueChange)||void 0===i||i.call(d,e,d.value)}},onMouseEnter:()=>p(!d.skipHoverState),onMouseLeave:()=>p(!1),onMouseDown:()=>h(!d.skipHoverState),onMouseUp:()=>h(!1)},{children:[e(a,Object.assign({checked:m,hovered:v,clicked:S,isDisabled:d.isDisabled||!1,size:d.size},{children:e(n,{isSmall:"SMALL"===d.size,isActive:m,isDisabled:d.isDisabled||!1})})),d.label&&"SMALL"!==d.size&&e(o,Object.assign({color:d.isDisabled?c.text.disabled:c.text.primary},{children:d.label})),d.label&&"SMALL"===d.size&&e(r,Object.assign({color:d.isDisabled?c.text.disabled:c.text.primary},{children:d.label}))]}))};export{d as RadioButton};
1
+ import{jsxs as i,jsx as e,Fragment as s}from"react/jsx-runtime";import{useState as l,useEffect as t}from"react";import{RadioButtonContainer as a,RadioButtonIcon as o}from"./RadioButton.styled.js";import{BodyCaption as r,BodySecondary as c,BodyPrimary as n}from"../TypographyStyle.js";import{COLORS as d}from"../../constants/Theme.js";const b=s=>{const l=s.isDisabled?d.content.inactive:s.isActive?d.background.positive.vibrant:d.content.primary;return i("svg",Object.assign({width:s.isSmall?"16":"20",height:s.isSmall?"16":"20",viewBox:s.isSmall?"0 0 16 16":"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e("circle",{cx:s.isSmall?"8":"10",cy:s.isSmall?"8":"10",r:s.isSmall?6:9,stroke:l,strokeWidth:s.isSmall?1.5:2}),s.isActive&&e("circle",{cx:s.isSmall?"8":"10",cy:s.isSmall?"8":"10",r:s.isSmall?3:5,fill:s.isDisabled?d.content.inactive:d.background.positive.vibrant})]}))},m=m=>{const[v,p]=l(m.isActive||!1),[S,h]=l(!1),[g,u]=l(!1);t((()=>{p(m.isActive)}),[m.isActive]);return i(a,Object.assign({onClick:()=>{var i;if(!m.isDisabled){const e=!v;p(e),null===(i=m.onValueChange)||void 0===i||i.call(m,e,m.value)}},onMouseEnter:()=>h(!m.skipHoverState),onMouseLeave:()=>h(!1),onMouseDown:()=>u(!m.skipHoverState),onMouseUp:()=>u(!1)},{children:[e(o,Object.assign({checked:v,hovered:S,clicked:g,isDisabled:m.isDisabled||!1,size:m.size},{children:e(b,{isSmall:"SMALL"===m.size,isActive:v,isDisabled:m.isDisabled||!1})})),m.label?"SMALL"===m.size?e(r,Object.assign({color:m.isDisabled?d.text.disabled:d.text.primary},{children:m.label})):"MEDIUM"===m.labelSize?e(c,Object.assign({color:m.isDisabled?d.text.disabled:d.text.primary},{children:m.label})):e(n,Object.assign({color:m.isDisabled?d.text.disabled:d.text.primary},{children:m.label})):e(s,{})]}))};export{m as RadioButton};
@@ -8,6 +8,7 @@ export type RadioListProps = {
8
8
  subTitle?: string;
9
9
  listItems: RadioListItem[];
10
10
  onChange: (option: RadioListItem) => void;
11
+ listContainerStyles?: React.CSSProperties;
11
12
  };
12
13
  export declare const RadioList: React.FC<RadioListProps>;
13
14
  export {};
@@ -1 +1 @@
1
- import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useState as i,useEffect as s}from"react";import{RadioButton as o}from"../radioButton/RadioButton.js";import{RadioListStyled as r}from"./RadioList.styled.js";import{TitleRegular as n,BodySecondary as a}from"../TypographyStyle.js";import{COLORS as c}from"../../constants/Theme.js";const l=l=>{const[m,d]=i(l.listItems);s((()=>{d(l.listItems)}),[l.listItems]);const h=(t,e)=>{let i;const s=[...m];s.forEach((s=>{s.value===e?(i=s,s.isActive=t):s.isActive=!t})),d(s),l.onChange(i)};return t(r,{children:[(l.title||l.subTitle)&&t("div",Object.assign({className:"title__container"},{children:[l.title&&e(n,{children:l.title}),l.subTitle&&e(a,Object.assign({color:c.text.secondary},{children:l.subTitle}))]})),e("div",Object.assign({className:"list__container"},{children:m.map((t=>e(o,Object.assign({},t,{onValueChange:h}),t.value)))}))]})};export{l as RadioList};
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useState as i,useEffect as s}from"react";import{RadioButton as o}from"../radioButton/RadioButton.js";import{RadioListStyled as r}from"./RadioList.styled.js";import{TitleRegular as n,BodySecondary as l}from"../TypographyStyle.js";import{COLORS as a}from"../../constants/Theme.js";const c=c=>{var m;const[d,u]=i(c.listItems);s((()=>{u(c.listItems)}),[c.listItems]);const h=(t,e)=>{let i;const s=[...d];s.forEach((s=>{s.value===e?(i=s,s.isActive=t):s.isActive=!t})),u(s),c.onChange(i)};return t(r,{children:[(c.title||c.subTitle)&&t("div",Object.assign({className:"title__container"},{children:[c.title&&e(n,{children:c.title}),c.subTitle&&e(l,Object.assign({color:a.text.secondary},{children:c.subTitle}))]})),e("div",Object.assign({style:null!==(m=c.listContainerStyles)&&void 0!==m?m:{},className:"list__container"},{children:d.map((t=>e(o,Object.assign({},t,{onValueChange:h}),t.value)))}))]})};export{c as RadioList};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as o,useEffect as r,useCallback as s}from"react";import{DEFAULT_THEME as n}from"../../constants/Theme.js";import{BodyCaption as a}from"../TypographyStyle.js";import{TabHeader as l,EmptyTab as i,RightComponent as c,TabItem as d,TabItemText as b,TrailingNumberContainer as m}from"./Tabs.styles.js";const p=s=>{var a,d;const{tabs:b,initialTab:m,onTabSelected:p,TabItemStyledProps:g,selectedTab:x,extendedBorder:T,rightComponent:y,size:C="default",isSquared:S=!1}=s,[h,j]=o(m||b[0].key),{colorsV2:f}=n;r((()=>{x&&j(x)}),[x]);const q=s.backgroundColor,k=null!==(a=s.selectedTextColor)&&void 0!==a?a:f.background.brand,I=null!==(d=s.textColor)&&void 0!==d?d:f.content.secondary;return e(l,Object.assign({bgColor:q},{children:[b.map(((e,o)=>t(u,{hasEqualSpacing:s.hasEqualSpacing,selectedTextColor:k,textColor:I,tab:e,currentTab:h,TabItemStyledProps:g,IconComponent:e.icon,size:C,setCurrentTab:e=>{p(e),j(e)},isSquared:S,isFirstlement:0==o,isLastElement:o==b.length-1},e.key))),T&&t(i,{}),t(c,{children:y})]}))},u=o=>{const{tab:r,currentTab:l,setCurrentTab:i,TabItemStyledProps:c,IconComponent:p,size:u="default",isSquared:g=!1,isFirstlement:x,isLastElement:T}=o,y=r.key===l,{colorsV2:C}=n,S=s((()=>Object.assign(Object.assign({},c),{borderRadius:o.isSquared?x?"4px 0px 0px 4px":T?"0px 4px 4px 0px":"":""})),[]);return e(d,Object.assign({style:S(),selected:y,hasEqualSpacing:o.hasEqualSpacing,onClick:()=>i(o.tab.key),selectedTextColor:o.selectedTextColor,isSquared:g},{children:[p&&t(p,{selected:y?C.background.brand:C.content.secondary}),t(b,Object.assign({style:"small"===u?{fontSize:14,fontStyle:"normal",fontWeight:600}:void 0,textColor:o.textColor,selectedTextColor:o.selectedTextColor,selected:y},{children:r.title})),void 0!==r.trailingNumber&&null!==r.trailingNumber&&t(m,Object.assign({selected:y},{children:t(a,Object.assign({color:C.content.primaryInverse},{children:r.trailingNumber}))}))]}))};p.displayName="Tabs",u.displayName="TabItemComponent";export{u as TabItemComponent,p as Tabs};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as o,useEffect as r,useCallback as s}from"react";import{DEFAULT_THEME as n}from"../../constants/Theme.js";import{BodyCaption as l}from"../TypographyStyle.js";import{TabHeader as a,EmptyTab as i,RightComponent as c,TabItem as d,TabItemText as b,TrailingNumberContainer as m}from"./Tabs.styles.js";const p=s=>{var l,d;const{tabs:b,initialTab:m,onTabSelected:p,TabItemStyledProps:g,selectedTab:x,extendedBorder:y,rightComponent:T,size:C="default",isSquared:S=!1,containerStyles:h}=s,[j,f]=o(m||b[0].key),{colorsV2:q}=n;r((()=>{x&&f(x)}),[x]);const k=s.backgroundColor,I=null!==(l=s.selectedTextColor)&&void 0!==l?l:q.background.brand,O=null!==(d=s.textColor)&&void 0!==d?d:q.content.secondary;return e(a,Object.assign({style:null!=h?h:{},bgColor:k},{children:[b.map(((e,o)=>t(u,{hasEqualSpacing:s.hasEqualSpacing,selectedTextColor:I,textColor:O,tab:e,currentTab:j,TabItemStyledProps:g,IconComponent:e.icon,size:C,setCurrentTab:e=>{p(e),f(e)},isSquared:S,isFirstlement:0==o,isLastElement:o==b.length-1},e.key))),y&&t(i,{}),t(c,{children:T})]}))},u=o=>{const{tab:r,currentTab:a,setCurrentTab:i,TabItemStyledProps:c,IconComponent:p,size:u="default",isSquared:g=!1,isFirstlement:x,isLastElement:y}=o,T=r.key===a,{colorsV2:C}=n,S=s((()=>Object.assign(Object.assign({},c),{borderRadius:o.isSquared?x?"4px 0px 0px 4px":y?"0px 4px 4px 0px":"":""})),[]);return e(d,Object.assign({style:S(),selected:T,hasEqualSpacing:o.hasEqualSpacing,onClick:()=>i(o.tab.key),selectedTextColor:o.selectedTextColor,isSquared:g},{children:[p&&t(p,{selected:T?C.background.brand:C.content.secondary}),t(b,Object.assign({style:"small"===u?{fontSize:14,fontStyle:"normal",fontWeight:600}:void 0,textColor:o.textColor,selectedTextColor:o.selectedTextColor,selected:T},{children:r.title})),void 0!==r.trailingNumber&&null!==r.trailingNumber&&t(m,Object.assign({selected:T},{children:t(l,Object.assign({color:C.content.primaryInverse},{children:r.trailingNumber}))}))]}))};p.displayName="Tabs",u.displayName="TabItemComponent";export{u as TabItemComponent,p as Tabs};
@@ -36,6 +36,7 @@ export interface TabViewHeaderProps {
36
36
  rightComponent?: JSX.Element;
37
37
  size?: 'small' | 'default';
38
38
  isSquared?: boolean;
39
+ containerStyles?: React.CSSProperties;
39
40
  }
40
41
  export interface TabItemComponentProps {
41
42
  hasEqualSpacing?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.506",
3
+ "version": "0.0.507-beta.filter-2",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",