@bikdotai/bik-component-library 0.0.607 → 0.0.608-beta-ddp-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) 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/bik-layout/MockMenus.d.ts +1 -0
  7. package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
  8. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.d.ts +1 -0
  9. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +2 -2
  10. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.d.ts +1 -0
  11. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
  12. package/dist/cjs/components/dropdown/type.d.ts +1 -0
  13. package/dist/esm/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
  14. package/dist/esm/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  15. package/dist/esm/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
  16. package/dist/esm/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  17. package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
  18. package/dist/esm/components/bik-layout/MockMenus.d.ts +1 -0
  19. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
  20. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.d.ts +1 -0
  21. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +1 -1
  22. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.d.ts +1 -0
  23. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
  24. package/dist/esm/components/dropdown/type.d.ts +1 -0
  25. 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;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const Menus: ({
2
3
  displayName: string;
3
4
  key: number;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("../../../zeroState/ZeroState.js"),r=require("../../../../hooks/useOutside.js"),o=require("../../hooks/useDropdown.js"),s=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"),d=require("./searchbox/SearchBox.js"),p=require("./searchbox/SearchZeroState.js");const h=304,S=290;exports.OpenedDropdown=f=>{let{options:j,isSearchable:x,isMultiSelect:g,width:b,allowFreeForm:w,height:v,onClose:m,onSelect:O,onSearch:y,version:M,skipSorting:q,headerRef:C,hideSelectAll:D,primaryButtonText:L,onInfiniteScroll:F,onMultiSelectClear:k,onDropdownItemClick:A,buttonOptions:B,isSearchLoading:I,disableSearchOptions:H,disableSearchedOptionExcept:R}=f;const{dropdownOptions:Z,search:T,searchedString:E,searchedOptions:P,onApplyHandler:_,selectAllHandler:z,onMultiSelectClear:K,onFreeFormSelect:N,onMultiSelectApply:W,latestDropdownOptionsRef:G,getSelectedOptions:J}=o.useDropdown(M,j,O,q,g,y,H,R),[Q,U]=t.useState(null!=b?b:S),[V,X]=t.useState(null),Y=t.useRef(null),$=t.useRef([]);r.useOutside(Y,(()=>{if(X(null),g&&"2.0"===M){const e=J(G.current);null==m||m(e)}else null==m||m(Z)}),[C,$]);const ee=null!=v?v:h,te="number"==typeof ee?x&&g?ee-96:x&&!g||!x&&g?ee-48:ee:ee;t.useEffect((()=>{const e=null!=b?b:S;if(null===V)U(e);else if("number"==typeof e)U(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));U(t)}}),[V]);const ne=[],re=(E&&y?P:Z).map((e=>{var t,n;if(E&&!y){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(E.toLowerCase()))&&(ne.push(!E||e.label===E),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(E.toLowerCase()))||(null===(n=e.searchKey)||void 0===n?void 0:n.toLowerCase().includes(E.toLowerCase()))?(ne.push(!E||e.label===E),e):null}return e})).filter((e=>null!==e)),oe=!!x&&E&&0===re.length;return e.jsxs(a.OpennedDropdownContainer,Object.assign({version:M,ref:Y,style:{width:Q}},{children:[e.jsxs("div",Object.assign({style:{width:V?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!x&&e.jsx(d.SearchBox,{onSearch:T,version:M}),re.length||E?e.jsxs(a.MenuListContainer,Object.assign({minHeight:ee,maxHeight:te},{children:[!!g&&!oe&&!D&&e.jsx(u.SelectAllMenu,{version:M,options:E&&y?P:Z,onSelect:z}),!w&&oe&&e.jsx(p.SearchZeroState,{isLoading:I,height:te,searchedString:E}),w&&(oe||!!ne.length&&ne.every((e=>!1===e)))&&e.jsx(i.FreeFormMenu,{version:M,isMultiSelect:g,onSelect:N,searchedString:E}),e.jsx(l.MenuList,{onInfiniteScroll:F,onDropdownItemClick:A,version:M,onSelect:_,showDescription:function(e,t){X(e&&t?{title:e,description:t}:null)},isMultiSelect:g,options:re,ref:$})]})):e.jsx("div",Object.assign({style:{height:ee,display:"flex"}},{children:e.jsx(n.ZeroState,{title:"No results found",subTitle:"Please try again later or contact us at support@bik.ai if you require further assistance."})})),!!g&&!(!re.length&&!E)&&"2.0"!==M&&e.jsx(c.default,{onClear:()=>{K(),null==k||k()},onApply:W,list:E&&y?P:Z,buttonText:L,buttonOptions:B})]})),!!V&&e.jsx(s.Description,{title:V.title,description:V.description,version:M})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("../../../zeroState/ZeroState.js"),r=require("../../../../hooks/useOutside.js"),o=require("../../hooks/useDropdown.js"),s=require("./description/Description.js"),i=require("./menu/FreeFormMenu.js"),l=require("./menu/MenuList.js"),u=require("./menu/SelectAllMenu.js"),a=require("./multiSelect/MultiSelectDropdownBottomBar.js"),c=require("./OpennedDropdown.styled.js"),d=require("./searchbox/SearchBox.js"),p=require("./searchbox/SearchZeroState.js");const h=304,S=290;exports.OpenedDropdown=f=>{let{options:j,isSearchable:x,isMultiSelect:g,width:b,allowFreeForm:w,height:v,onClose:m,onSelect:O,onSearch:y,version:C,skipSorting:D,headerRef:M,hideSelectAll:q,primaryButtonText:L,onInfiniteScroll:F,onMultiSelectClear:k,onDropdownItemClick:A,buttonOptions:B,isSearchLoading:I,disableSearchOptions:H,disableSearchedOptionExcept:R,useDefaultCursor:Z}=f;const{dropdownOptions:T,search:E,searchedString:P,searchedOptions:_,onApplyHandler:z,selectAllHandler:K,onMultiSelectClear:N,onFreeFormSelect:W,onMultiSelectApply:G,latestDropdownOptionsRef:J,getSelectedOptions:Q}=o.useDropdown(C,j,O,D,g,y,H,R),[U,V]=t.useState(null!=b?b:S),[X,Y]=t.useState(null),$=t.useRef(null),ee=t.useRef([]);r.useOutside($,(()=>{if(Y(null),g&&"2.0"===C){const e=Q(J.current);null==m||m(e)}else null==m||m(T)}),[M,ee]);const te=null!=v?v:h,ne="number"==typeof te?x&&g?te-96:x&&!g||!x&&g?te-48:te:te;t.useEffect((()=>{const e=null!=b?b:S;if(null===X)V(e);else if("number"==typeof e)V(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));V(t)}}),[X]);const re=[],oe=(P&&y?_:T).map((e=>{var t,n;if(P&&!y){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(P.toLowerCase()))&&(re.push(!P||e.label===P),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(P.toLowerCase()))||(null===(n=e.searchKey)||void 0===n?void 0:n.toLowerCase().includes(P.toLowerCase()))?(re.push(!P||e.label===P),e):null}return e})).filter((e=>null!==e)),se=!!x&&P&&0===oe.length;return e.jsxs(c.OpennedDropdownContainer,Object.assign({version:C,ref:$,style:{width:U}},{children:[e.jsxs("div",Object.assign({style:{width:X?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!x&&e.jsx(d.SearchBox,{onSearch:E,version:C}),oe.length||P?e.jsxs(c.MenuListContainer,Object.assign({minHeight:te,maxHeight:ne},{children:[!!g&&!se&&!q&&e.jsx(u.SelectAllMenu,{version:C,options:P&&y?_:T,onSelect:K}),!w&&se&&e.jsx(p.SearchZeroState,{isLoading:I,height:ne,searchedString:P}),w&&(se||!!re.length&&re.every((e=>!1===e)))&&e.jsx(i.FreeFormMenu,{version:C,isMultiSelect:g,onSelect:W,searchedString:P}),e.jsx(l.MenuList,{onInfiniteScroll:F,onDropdownItemClick:A,version:C,onSelect:z,showDescription:function(e,t){Y(e&&t?{title:e,description:t}:null)},isMultiSelect:g,options:oe,useDefaultCursor:Z,ref:ee})]})):e.jsx("div",Object.assign({style:{height:te,display:"flex"}},{children:e.jsx(n.ZeroState,{title:"No results found",subTitle:"Please try again later or contact us at support@bik.ai if you require further assistance."})})),!!g&&!(!oe.length&&!P)&&"2.0"!==C&&e.jsx(a.default,{onClear:()=>{N(),null==k||k()},onApply:G,list:P&&y?_:T,buttonText:L,buttonOptions:B})]})),!!X&&e.jsx(s.Description,{title:X.title,description:X.description,version:C})]}))};
@@ -8,6 +8,7 @@ interface MenuItemProps {
8
8
  onDropdownItemClick?: (option: SingleOption) => void;
9
9
  last?: boolean;
10
10
  version?: '1.0' | '2.0';
11
+ useDefaultCursor?: boolean;
11
12
  }
12
13
  export declare const MenuItem: import("react").ForwardRefExoticComponent<MenuItemProps & import("react").RefAttributes<HTMLDivElement>>;
13
14
  export {};
@@ -2,7 +2,7 @@
2
2
  padding: ${e=>"2.0"===e.version?"8px 12px":"14px 16px"} !important;
3
3
  cursor: pointer;
4
4
  margin-top: ${e=>"2.0"===e.version?"2px":"0"};
5
- `,x=u.default.div`
5
+ `,g=u.default.div`
6
6
  box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.12);
7
7
  border-radius: ${e=>{let{version:t}=e;return"1.0"===t?"0":"8px"}};
8
8
  padding: ${e=>{let{version:t}=e;return"1.0"===t?"0":"4px"}};
@@ -10,4 +10,4 @@
10
10
  border: ${e=>{let{version:t}=e;return"1.0"===t?`1px solid ${a.DEFAULT_THEME.colorsV2.stroke.primary}`:"none"}};
11
11
  max-height: 248px;
12
12
  overflow-y: auto;
13
- `,g=n.forwardRef(((i,s)=>{let{option:d,isMultiSelect:u,showDescription:g,onSelect:v,last:h,version:j,onDropdownItemClick:m}=i;var b;const[f,y]=n.useState(d.selected),C=(e,t)=>{if(!e.children){I(!e.selected);const n=t?Object.assign(Object.assign({},e),{parent:t}):e;null==m||m(n)}},I=e=>{d.disabled||v(Object.assign(Object.assign({},d),{selected:e}))};return e.jsx(e.Fragment,{children:e.jsx(o.Tooltip,Object.assign({body:"",tooltipContent:d.children?e.jsx("div",Object.assign({style:{backgroundColor:a.DEFAULT_THEME.colorsV2.surface.standard},ref:s,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1)},{children:e.jsx(x,Object.assign({version:null!=j?j:"2.0"},{children:d.children.map((t=>{var n;return e.jsx(p,{version:j,style:(null!==(n=null==d?void 0:d.children)&&void 0!==n?n:[]).length-1?{borderBottom:0}:{},onClick:e=>{e.preventDefault(),C(t,d)},listItem:{value:t.value,label:t.label},subText:t.subText,leadingIcon:t.leadingIcon||void 0,customComponent:t.customComponent,trailingIcon:t.trailingIcon||void 0,variant:d.disabled?"inactive":t.selected?"selected":"default"},t.value)}))}))})):e.jsx(e.Fragment,{}),placement:"right-start",hideArrow:!0},{children:e.jsx(p,{version:j,style:h?{borderBottom:0}:{},onClick:e=>{e.preventDefault(),C(d)},onMouseOver:()=>{d.description?g(d.label,d.description):g()},listItem:{value:d.value,label:d.label},subText:d.subText,leadingIcon:u?e.jsxs("div",Object.assign({style:{display:"flex",alignContent:"center",justifyContent:"center",gap:8}},{children:[e.jsx(r.CheckBox,{size:"2.0"===j?"SMALL":"DEFAULT",isDisabled:null!==(b=d.disabled)&&void 0!==b&&b,isChecked:!!d.selected,onValueChange:I}),e.jsx("div",Object.assign({style:{marginRight:"-4px"}},{children:d.leadingIcon}))]})):d.leadingIcon?e.jsx(e.Fragment,{children:d.leadingIcon}):void 0,customComponent:d.customComponent,trailingIcon:d.isFreeForm?e.jsx(c.FreeFormContainer,{children:e.jsx(l.BodyCaption,Object.assign({style:{color:a.COLORS.content.secondary}},{children:"Freeform"}))}):d.children?e.jsx(t.default,{width:12,height:12}):d.trailingIcon?e.jsx(e.Fragment,{children:d.trailingIcon}):void 0,variant:d.disabled?"inactive":d.selected||!u&&f?"selected":"default"})}))})}));exports.MenuItem=g;
13
+ `,x=n.forwardRef(((i,s)=>{let{option:d,isMultiSelect:u,showDescription:x,onSelect:v,last:j,version:b,onDropdownItemClick:h,useDefaultCursor:m}=i;var f;const[y,C]=n.useState(d.selected),I=(e,t)=>{if(!e.children){O(!e.selected);const n=t?Object.assign(Object.assign({},e),{parent:t}):e;null==h||h(n)}},O=e=>{d.disabled||v(Object.assign(Object.assign({},d),{selected:e}))},F=m?{cursor:"default"}:{};return e.jsx(e.Fragment,{children:e.jsx(o.Tooltip,Object.assign({body:"",tooltipContent:d.children?e.jsx("div",Object.assign({style:{backgroundColor:a.DEFAULT_THEME.colorsV2.surface.standard},ref:s,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1)},{children:e.jsx(g,Object.assign({version:null!=b?b:"2.0"},{children:d.children.map((t=>{var n;return e.jsx(p,{version:b,style:(null!==(n=null==d?void 0:d.children)&&void 0!==n?n:[]).length-1?{borderBottom:0}:{},onClick:e=>{e.preventDefault(),I(t,d)},listItem:{value:t.value,label:t.label},subText:t.subText,leadingIcon:t.leadingIcon||void 0,customComponent:t.customComponent,trailingIcon:t.trailingIcon||void 0,variant:d.disabled?"inactive":t.selected?"selected":"default"},t.value)}))}))})):e.jsx(e.Fragment,{}),placement:"right-start",hideArrow:!0},{children:e.jsx(p,{version:b,style:j?Object.assign({borderBottom:0},F):Object.assign({},F),onClick:e=>{e.preventDefault(),I(d)},onMouseOver:()=>{d.description?x(d.label,d.description):x()},listItem:{value:d.value,label:d.label},subText:d.subText,leadingIcon:u?e.jsxs("div",Object.assign({style:{display:"flex",alignContent:"center",justifyContent:"center",gap:8}},{children:[e.jsx(r.CheckBox,{size:"2.0"===b?"SMALL":"DEFAULT",isDisabled:null!==(f=d.disabled)&&void 0!==f&&f,isChecked:!!d.selected,onValueChange:O}),e.jsx("div",Object.assign({style:{marginRight:"-4px"}},{children:d.leadingIcon}))]})):d.leadingIcon?e.jsx(e.Fragment,{children:d.leadingIcon}):void 0,customComponent:d.customComponent,trailingIcon:d.isFreeForm?e.jsx(c.FreeFormContainer,{children:e.jsx(l.BodyCaption,Object.assign({style:{color:a.COLORS.content.secondary}},{children:"Freeform"}))}):d.children?e.jsx(t.default,{width:12,height:12}):d.trailingIcon?e.jsx(e.Fragment,{children:d.trailingIcon}):void 0,variant:d.disabled?"inactive":d.selected||!u&&y?"selected":"default"})}))})}));exports.MenuItem=x;
@@ -8,6 +8,7 @@ interface MenuListProps {
8
8
  version?: '1.0' | '2.0';
9
9
  onInfiniteScroll?: () => void;
10
10
  onDropdownItemClick?: (option: DropdownOption) => void;
11
+ useDefaultCursor?: boolean;
11
12
  }
12
13
  export declare const MenuList: import("react").ForwardRefExoticComponent<MenuListProps & import("react").RefAttributes<HTMLDivElement[]>>;
13
14
  export {};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=require("./MenuItem.js"),r=require("./MenuList.styled.js");const s=n.forwardRef(((s,i)=>{let{options:o,isMultiSelect:c,showDescription:l,onSelect:u,version:a,onInfiniteScroll:p,onDropdownItemClick:d}=s;const j=n.useRef(null),f=n.useRef(null),g=n.useCallback((()=>{j.current&&j.current.disconnect(),j.current=new IntersectionObserver((e=>{e[0].isIntersecting&&(null==p||p())})),f.current&&j.current.observe(f.current)}),[p]);return n.useEffect((()=>(g(),()=>{j.current&&j.current.disconnect()})),[g,o]),e.jsx(e.Fragment,{children:o.map(((n,s)=>{const p=s===o.length-1;if(n.options){const o=n;return e.jsxs("div",Object.assign({style:{marginTop:"2.0"===a?2:0}},{children:[e.jsxs(r.StyledGroupedLabel,Object.assign({version:a},{children:[o.leadingIcon?e.jsx("span",Object.assign({style:{marginRight:8}},{children:o.leadingIcon})):null,o.label]})),o.options.map(((n,r)=>e.jsx(t.MenuItem,{version:a,last:r===o.options.length-1,onSelect:u,showDescription:l,onDropdownItemClick:d,isMultiSelect:c,option:n,ref:e=>{i&&"object"==typeof i&&i.current&&e&&e&&e&&e&&(i.current[s]=e)}},`${s}-${r}`))),p?e.jsx("span",{ref:f}):null]}),s)}return e.jsxs("div",{children:[e.jsx(t.MenuItem,{version:a,last:p,onSelect:u,showDescription:l,onDropdownItemClick:d,isMultiSelect:c,option:n,ref:e=>{i&&"object"==typeof i&&i.current&&e&&(i.current[s]=e)}},s),p?e.jsx("span",{ref:f}):null]},s)}))})}));exports.MenuList=s;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),r=require("./MenuItem.js"),t=require("./MenuList.styled.js");const s=n.forwardRef(((s,o)=>{let{options:i,isMultiSelect:c,showDescription:l,onSelect:u,version:a,onInfiniteScroll:p,onDropdownItemClick:d,useDefaultCursor:f}=s;const j=n.useRef(null),g=n.useRef(null),m=n.useCallback((()=>{j.current&&j.current.disconnect(),j.current=new IntersectionObserver((e=>{e[0].isIntersecting&&(null==p||p())})),g.current&&j.current.observe(g.current)}),[p]);return n.useEffect((()=>(m(),()=>{j.current&&j.current.disconnect()})),[m,i]),e.jsx(e.Fragment,{children:i.map(((n,s)=>{const p=s===i.length-1;if(n.options){const i=n;return e.jsxs("div",Object.assign({style:{marginTop:"2.0"===a?2:0}},{children:[e.jsxs(t.StyledGroupedLabel,Object.assign({version:a},{children:[i.leadingIcon?e.jsx("span",Object.assign({style:{marginRight:8}},{children:i.leadingIcon})):null,i.label]})),i.options.map(((n,t)=>e.jsx(r.MenuItem,{version:a,last:t===i.options.length-1,onSelect:u,showDescription:l,onDropdownItemClick:d,isMultiSelect:c,option:n,useDefaultCursor:f,ref:e=>{o&&"object"==typeof o&&o.current&&e&&e&&e&&e&&(o.current[s]=e)}},`${s}-${t}`))),p?e.jsx("span",{ref:g}):null]}),s)}return e.jsxs("div",{children:[e.jsx(r.MenuItem,{version:a,last:p,onSelect:u,showDescription:l,onDropdownItemClick:d,isMultiSelect:c,option:n,useDefaultCursor:f,ref:e=>{o&&"object"==typeof o&&o.current&&e&&(o.current[s]=e)}},s),p?e.jsx("span",{ref:g}):null]},s)}))})}));exports.MenuList=s;
@@ -27,6 +27,7 @@ export interface OpenDropdownProps {
27
27
  isSearchLoading?: boolean;
28
28
  disableSearchOptions?: boolean;
29
29
  disableSearchedOptionExcept?: string[];
30
+ useDefaultCursor?: boolean;
30
31
  }
31
32
  export type GroupedOption = {
32
33
  label?: string;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
2
+ import { QueryBuilderNodeProps } from "../../../Types/QueryBuilderNodeProps.type";
3
3
  declare const EventsTrigger: React.FC<QueryBuilderNodeProps>;
4
4
  export default EventsTrigger;
@@ -1,2 +1,2 @@
1
- import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
1
+ import { QueryBuilderAPIData } from "../../../Types/QueryBuilderAPI.type";
2
2
  export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
2
+ import { QueryBuilderNodeProps } from "../../../Types/QueryBuilderNodeProps.type";
3
3
  declare const IGTrigger: React.FC<QueryBuilderNodeProps>;
4
4
  export default IGTrigger;
@@ -1,2 +1,2 @@
1
- import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
1
+ import { QueryBuilderAPIData } from "../../../Types/QueryBuilderAPI.type";
2
2
  export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { DropdownOption } from "../../../dropdown/type";
3
- import { QueryBuilderProperty } from "../../types/QueryBuilder.type";
4
- import { QueryBuilderNodeProps } from "../../types/QueryBuilderNodeProps.type";
3
+ import { QueryBuilderProperty } from "../../Types/QueryBuilder.type";
4
+ import { QueryBuilderNodeProps } from "../../Types/QueryBuilderNodeProps.type";
5
5
  declare const BaseTriggerQueryBuilderNode: React.FC<QueryBuilderNodeProps & {
6
6
  cacheKey: string;
7
7
  propertyAddBtnText: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const Menus: ({
2
3
  displayName: string;
3
4
  key: number;
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as o,useRef as n,useEffect as i}from"react";import{ZeroState as r}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,w=w=>{let{options:v,isSearchable:j,isMultiSelect:y,width:O,allowFreeForm:x,height:C,onClose:M,onSelect:D,onSearch:L,version:k,skipSorting:A,headerRef:F,hideSelectAll:I,primaryButtonText:B,onInfiniteScroll:H,onMultiSelectClear:T,onDropdownItemClick:R,buttonOptions:Z,isSearchLoading:q,disableSearchOptions:z,disableSearchedOptionExcept:E}=w;const{dropdownOptions:K,search:N,searchedString:P,searchedOptions:W,onApplyHandler:G,selectAllHandler:J,onMultiSelectClear:Q,onFreeFormSelect:U,onMultiSelectApply:V,latestDropdownOptionsRef:X,getSelectedOptions:Y}=s(k,v,D,A,y,L,z,E),[$,_]=o(null!=O?O:b),[ee,te]=o(null),oe=n(null),ne=n([]);l(oe,(()=>{if(te(null),y&&"2.0"===k){const e=Y(X.current);null==M||M(e)}else null==M||M(K)}),[F,ne]);const ie=null!=C?C:g,re="number"==typeof ie?j&&y?ie-96:j&&!y||!j&&y?ie-48:ie:ie;i((()=>{const e=null!=O?O:b;if(null===ee)_(e);else if("number"==typeof e)_(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));_(t)}}),[ee]);const le=[],se=(P&&L?W:K).map((e=>{var t,o;if(P&&!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(P.toLowerCase()))&&(le.push(!P||e.label===P),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(P.toLowerCase()))||(null===(o=e.searchKey)||void 0===o?void 0:o.toLowerCase().includes(P.toLowerCase()))?(le.push(!P||e.label===P),e):null}return e})).filter((e=>null!==e)),ce=!!j&&P&&0===se.length;return e(h,Object.assign({version:k,ref:oe,style:{width:$}},{children:[e("div",Object.assign({style:{width:ee?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!j&&t(f,{onSearch:N,version:k}),se.length||P?e(m,Object.assign({minHeight:ie,maxHeight:re},{children:[!!y&&!ce&&!I&&t(u,{version:k,options:P&&L?W:K,onSelect:J}),!x&&ce&&t(S,{isLoading:q,height:re,searchedString:P}),x&&(ce||!!le.length&&le.every((e=>!1===e)))&&t(a,{version:k,isMultiSelect:y,onSelect:U,searchedString:P}),t(p,{onInfiniteScroll:H,onDropdownItemClick:R,version:k,onSelect:G,showDescription:function(e,t){te(e&&t?{title:e,description:t}:null)},isMultiSelect:y,options:se,ref:ne})]})):t("div",Object.assign({style:{height:ie,display:"flex"}},{children:t(r,{title:"No results found",subTitle:"Please try again later or contact us at support@bik.ai if you require further assistance."})})),!!y&&!(!se.length&&!P)&&"2.0"!==k&&t(d,{onClear:()=>{Q(),null==T||T()},onApply:V,list:P&&L?W:K,buttonText:B,buttonOptions:Z})]})),!!ee&&t(c,{title:ee.title,description:ee.description,version:k})]}))};export{w as OpenedDropdown};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as o,useRef as n,useEffect as r}from"react";import{ZeroState as i}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 u}from"./menu/MenuList.js";import{SelectAllMenu as p}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,w=w=>{let{options:v,isSearchable:j,isMultiSelect:y,width:O,allowFreeForm:x,height:C,onClose:D,onSelect:M,onSearch:L,version:k,skipSorting:A,headerRef:F,hideSelectAll:I,primaryButtonText:B,onInfiniteScroll:H,onMultiSelectClear:T,onDropdownItemClick:R,buttonOptions:Z,isSearchLoading:q,disableSearchOptions:z,disableSearchedOptionExcept:E,useDefaultCursor:K}=w;const{dropdownOptions:N,search:P,searchedString:W,searchedOptions:G,onApplyHandler:J,selectAllHandler:Q,onMultiSelectClear:U,onFreeFormSelect:V,onMultiSelectApply:X,latestDropdownOptionsRef:Y,getSelectedOptions:$}=s(k,v,M,A,y,L,z,E),[_,ee]=o(null!=O?O:b),[te,oe]=o(null),ne=n(null),re=n([]);l(ne,(()=>{if(oe(null),y&&"2.0"===k){const e=$(Y.current);null==D||D(e)}else null==D||D(N)}),[F,re]);const ie=null!=C?C:g,le="number"==typeof ie?j&&y?ie-96:j&&!y||!j&&y?ie-48:ie:ie;r((()=>{const e=null!=O?O:b;if(null===te)ee(e);else if("number"==typeof e)ee(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));ee(t)}}),[te]);const se=[],ce=(W&&L?G:N).map((e=>{var t,o;if(W&&!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(W.toLowerCase()))&&(se.push(!W||e.label===W),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(W.toLowerCase()))||(null===(o=e.searchKey)||void 0===o?void 0:o.toLowerCase().includes(W.toLowerCase()))?(se.push(!W||e.label===W),e):null}return e})).filter((e=>null!==e)),ae=!!j&&W&&0===ce.length;return e(h,Object.assign({version:k,ref:ne,style:{width:_}},{children:[e("div",Object.assign({style:{width:te?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!j&&t(f,{onSearch:P,version:k}),ce.length||W?e(m,Object.assign({minHeight:ie,maxHeight:le},{children:[!!y&&!ae&&!I&&t(p,{version:k,options:W&&L?G:N,onSelect:Q}),!x&&ae&&t(S,{isLoading:q,height:le,searchedString:W}),x&&(ae||!!se.length&&se.every((e=>!1===e)))&&t(a,{version:k,isMultiSelect:y,onSelect:V,searchedString:W}),t(u,{onInfiniteScroll:H,onDropdownItemClick:R,version:k,onSelect:J,showDescription:function(e,t){oe(e&&t?{title:e,description:t}:null)},isMultiSelect:y,options:ce,useDefaultCursor:K,ref:re})]})):t("div",Object.assign({style:{height:ie,display:"flex"}},{children:t(i,{title:"No results found",subTitle:"Please try again later or contact us at support@bik.ai if you require further assistance."})})),!!y&&!(!ce.length&&!W)&&"2.0"!==k&&t(d,{onClear:()=>{U(),null==T||T()},onApply:X,list:W&&L?G:N,buttonText:B,buttonOptions:Z})]})),!!te&&t(c,{title:te.title,description:te.description,version:k})]}))};export{w as OpenedDropdown};
@@ -8,6 +8,7 @@ interface MenuItemProps {
8
8
  onDropdownItemClick?: (option: SingleOption) => void;
9
9
  last?: boolean;
10
10
  version?: '1.0' | '2.0';
11
+ useDefaultCursor?: boolean;
11
12
  }
12
13
  export declare const MenuItem: import("react").ForwardRefExoticComponent<MenuItemProps & import("react").RefAttributes<HTMLDivElement>>;
13
14
  export {};
@@ -10,4 +10,4 @@ import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import n from"..
10
10
  border: ${e=>{let{version:t}=e;return"1.0"===t?`1px solid ${p.colorsV2.stroke.primary}`:"none"}};
11
11
  max-height: 248px;
12
12
  overflow-y: auto;
13
- `,h=i(((i,s)=>{let{option:c,isMultiSelect:h,showDescription:b,onSelect:x,last:f,version:j,onDropdownItemClick:y}=i;var I;const[C,O]=r(c.selected),k=(e,t)=>{if(!e.children){T(!e.selected);const o=t?Object.assign(Object.assign({},e),{parent:t}):e;null==y||y(o)}},T=e=>{c.disabled||x(Object.assign(Object.assign({},c),{selected:e}))};return e(t,{children:e(a,Object.assign({body:"",tooltipContent:c.children?e("div",Object.assign({style:{backgroundColor:p.colorsV2.surface.standard},ref:s,onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1)},{children:e(v,Object.assign({version:null!=j?j:"2.0"},{children:c.children.map((t=>{var o;return e(g,{version:j,style:(null!==(o=null==c?void 0:c.children)&&void 0!==o?o:[]).length-1?{borderBottom:0}:{},onClick:e=>{e.preventDefault(),k(t,c)},listItem:{value:t.value,label:t.label},subText:t.subText,leadingIcon:t.leadingIcon||void 0,customComponent:t.customComponent,trailingIcon:t.trailingIcon||void 0,variant:c.disabled?"inactive":t.selected?"selected":"default"},t.value)}))}))})):e(t,{}),placement:"right-start",hideArrow:!0},{children:e(g,{version:j,style:f?{borderBottom:0}:{},onClick:e=>{e.preventDefault(),k(c)},onMouseOver:()=>{c.description?b(c.label,c.description):b()},listItem:{value:c.value,label:c.label},subText:c.subText,leadingIcon:h?o("div",Object.assign({style:{display:"flex",alignContent:"center",justifyContent:"center",gap:8}},{children:[e(l,{size:"2.0"===j?"SMALL":"DEFAULT",isDisabled:null!==(I=c.disabled)&&void 0!==I&&I,isChecked:!!c.selected,onValueChange:T}),e("div",Object.assign({style:{marginRight:"-4px"}},{children:c.leadingIcon}))]})):c.leadingIcon?e(t,{children:c.leadingIcon}):void 0,customComponent:c.customComponent,trailingIcon:c.isFreeForm?e(u,{children:e(d,Object.assign({style:{color:m.content.secondary}},{children:"Freeform"}))}):c.children?e(n,{width:12,height:12}):c.trailingIcon?e(t,{children:c.trailingIcon}):void 0,variant:c.disabled?"inactive":c.selected||!h&&C?"selected":"default"})}))})}));export{h as MenuItem};
13
+ `,h=i(((i,s)=>{let{option:c,isMultiSelect:h,showDescription:b,onSelect:x,last:f,version:j,onDropdownItemClick:y,useDefaultCursor:C}=i;var I;const[O,k]=r(c.selected),T=(e,t)=>{if(!e.children){w(!e.selected);const o=t?Object.assign(Object.assign({},e),{parent:t}):e;null==y||y(o)}},w=e=>{c.disabled||x(Object.assign(Object.assign({},c),{selected:e}))},D=C?{cursor:"default"}:{};return e(t,{children:e(a,Object.assign({body:"",tooltipContent:c.children?e("div",Object.assign({style:{backgroundColor:p.colorsV2.surface.standard},ref:s,onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1)},{children:e(v,Object.assign({version:null!=j?j:"2.0"},{children:c.children.map((t=>{var o;return e(g,{version:j,style:(null!==(o=null==c?void 0:c.children)&&void 0!==o?o:[]).length-1?{borderBottom:0}:{},onClick:e=>{e.preventDefault(),T(t,c)},listItem:{value:t.value,label:t.label},subText:t.subText,leadingIcon:t.leadingIcon||void 0,customComponent:t.customComponent,trailingIcon:t.trailingIcon||void 0,variant:c.disabled?"inactive":t.selected?"selected":"default"},t.value)}))}))})):e(t,{}),placement:"right-start",hideArrow:!0},{children:e(g,{version:j,style:f?Object.assign({borderBottom:0},D):Object.assign({},D),onClick:e=>{e.preventDefault(),T(c)},onMouseOver:()=>{c.description?b(c.label,c.description):b()},listItem:{value:c.value,label:c.label},subText:c.subText,leadingIcon:h?o("div",Object.assign({style:{display:"flex",alignContent:"center",justifyContent:"center",gap:8}},{children:[e(l,{size:"2.0"===j?"SMALL":"DEFAULT",isDisabled:null!==(I=c.disabled)&&void 0!==I&&I,isChecked:!!c.selected,onValueChange:w}),e("div",Object.assign({style:{marginRight:"-4px"}},{children:c.leadingIcon}))]})):c.leadingIcon?e(t,{children:c.leadingIcon}):void 0,customComponent:c.customComponent,trailingIcon:c.isFreeForm?e(u,{children:e(d,Object.assign({style:{color:m.content.secondary}},{children:"Freeform"}))}):c.children?e(n,{width:12,height:12}):c.trailingIcon?e(t,{children:c.trailingIcon}):void 0,variant:c.disabled?"inactive":c.selected||!h&&O?"selected":"default"})}))})}));export{h as MenuItem};
@@ -8,6 +8,7 @@ interface MenuListProps {
8
8
  version?: '1.0' | '2.0';
9
9
  onInfiniteScroll?: () => void;
10
10
  onDropdownItemClick?: (option: DropdownOption) => void;
11
+ useDefaultCursor?: boolean;
11
12
  }
12
13
  export declare const MenuList: import("react").ForwardRefExoticComponent<MenuListProps & import("react").RefAttributes<HTMLDivElement[]>>;
13
14
  export {};
@@ -1 +1 @@
1
- import{jsx as e,Fragment as n,jsxs as t}from"react/jsx-runtime";import{forwardRef as r,useRef as o,useCallback as i,useEffect as c}from"react";import{MenuItem as s}from"./MenuItem.js";import{StyledGroupedLabel as l}from"./MenuList.styled.js";const u=r(((r,u)=>{let{options:p,isMultiSelect:a,showDescription:m,onSelect:d,version:f,onInfiniteScroll:g,onDropdownItemClick:h}=r;const I=o(null),b=o(null),j=i((()=>{I.current&&I.current.disconnect(),I.current=new IntersectionObserver((e=>{e[0].isIntersecting&&(null==g||g())})),b.current&&I.current.observe(b.current)}),[g]);return c((()=>(j(),()=>{I.current&&I.current.disconnect()})),[j,p]),e(n,{children:p.map(((n,r)=>{const o=r===p.length-1;if(n.options){const i=n;return t("div",Object.assign({style:{marginTop:"2.0"===f?2:0}},{children:[t(l,Object.assign({version:f},{children:[i.leadingIcon?e("span",Object.assign({style:{marginRight:8}},{children:i.leadingIcon})):null,i.label]})),i.options.map(((n,t)=>e(s,{version:f,last:t===i.options.length-1,onSelect:d,showDescription:m,onDropdownItemClick:h,isMultiSelect:a,option:n,ref:e=>{u&&"object"==typeof u&&u.current&&e&&e&&e&&e&&(u.current[r]=e)}},`${r}-${t}`))),o?e("span",{ref:b}):null]}),r)}return t("div",{children:[e(s,{version:f,last:o,onSelect:d,showDescription:m,onDropdownItemClick:h,isMultiSelect:a,option:n,ref:e=>{u&&"object"==typeof u&&u.current&&e&&(u.current[r]=e)}},r),o?e("span",{ref:b}):null]},r)}))})}));export{u as MenuList};
1
+ import{jsx as e,Fragment as n,jsxs as t}from"react/jsx-runtime";import{forwardRef as r,useRef as o,useCallback as i,useEffect as s}from"react";import{MenuItem as c}from"./MenuItem.js";import{StyledGroupedLabel as l}from"./MenuList.styled.js";const u=r(((r,u)=>{let{options:p,isMultiSelect:a,showDescription:m,onSelect:d,version:f,onInfiniteScroll:g,onDropdownItemClick:h,useDefaultCursor:D}=r;const I=o(null),b=o(null),j=i((()=>{I.current&&I.current.disconnect(),I.current=new IntersectionObserver((e=>{e[0].isIntersecting&&(null==g||g())})),b.current&&I.current.observe(b.current)}),[g]);return s((()=>(j(),()=>{I.current&&I.current.disconnect()})),[j,p]),e(n,{children:p.map(((n,r)=>{const o=r===p.length-1;if(n.options){const i=n;return t("div",Object.assign({style:{marginTop:"2.0"===f?2:0}},{children:[t(l,Object.assign({version:f},{children:[i.leadingIcon?e("span",Object.assign({style:{marginRight:8}},{children:i.leadingIcon})):null,i.label]})),i.options.map(((n,t)=>e(c,{version:f,last:t===i.options.length-1,onSelect:d,showDescription:m,onDropdownItemClick:h,isMultiSelect:a,option:n,useDefaultCursor:D,ref:e=>{u&&"object"==typeof u&&u.current&&e&&e&&e&&e&&(u.current[r]=e)}},`${r}-${t}`))),o?e("span",{ref:b}):null]}),r)}return t("div",{children:[e(c,{version:f,last:o,onSelect:d,showDescription:m,onDropdownItemClick:h,isMultiSelect:a,option:n,useDefaultCursor:D,ref:e=>{u&&"object"==typeof u&&u.current&&e&&(u.current[r]=e)}},r),o?e("span",{ref:b}):null]},r)}))})}));export{u as MenuList};
@@ -27,6 +27,7 @@ export interface OpenDropdownProps {
27
27
  isSearchLoading?: boolean;
28
28
  disableSearchOptions?: boolean;
29
29
  disableSearchedOptionExcept?: string[];
30
+ useDefaultCursor?: boolean;
30
31
  }
31
32
  export type GroupedOption = {
32
33
  label?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.607",
3
+ "version": "0.0.608-beta-ddp-0",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",