@bikdotai/bik-component-library 0.0.517-beta.drop.9 → 0.0.517
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/cjs/components/card-selector/CardSelector.js +1 -1
- package/dist/cjs/components/card-selector/CardSelectorGroup.js +1 -1
- package/dist/cjs/components/dropdown/Dropdown.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.d.ts +2 -5
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.d.ts +2 -6
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/utils/iterationOnOptions.d.ts +0 -3
- package/dist/cjs/components/dropdown/OpenedDropdown/utils/iterationOnOptions.js +1 -1
- package/dist/cjs/components/dropdown/type.d.ts +0 -4
- package/dist/esm/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
- package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/esm/components/card-selector/CardSelector.js +1 -1
- package/dist/esm/components/card-selector/CardSelectorGroup.js +1 -1
- package/dist/esm/components/dropdown/Dropdown.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.d.ts +2 -5
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.d.ts +2 -6
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/utils/iterationOnOptions.d.ts +0 -3
- package/dist/esm/components/dropdown/OpenedDropdown/utils/iterationOnOptions.js +1 -1
- package/dist/esm/components/dropdown/type.d.ts +0 -4
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryBuilderNodeProps } from "../../../
|
|
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 "../../../
|
|
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 "../../../
|
|
2
|
+
import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
|
|
3
3
|
declare const IGTrigger: React.FC<QueryBuilderNodeProps>;
|
|
4
4
|
export default IGTrigger;
|
package/dist/cjs/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { QueryBuilderAPIData } from "../../../
|
|
1
|
+
import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
|
|
2
2
|
export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
|
package/dist/cjs/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DropdownOption } from "../../../dropdown/type";
|
|
3
|
-
import { QueryBuilderProperty } from "../../
|
|
4
|
-
import { QueryBuilderNodeProps } from "../../
|
|
3
|
+
import { QueryBuilderProperty } from "../../types/QueryBuilder.type";
|
|
4
|
+
import { QueryBuilderNodeProps } from "../../types/QueryBuilderNodeProps.type";
|
|
5
5
|
declare const BaseTriggerQueryBuilderNode: React.FC<QueryBuilderNodeProps & {
|
|
6
6
|
cacheKey: string;
|
|
7
7
|
propertyAddBtnText: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../constants/Theme.js"),n=require("../spinner/Spinner.js"),i=require("../TypographyStyle.js"),l=require("./CardSelector.styled.js");exports.CardSelector=s=>{var d,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../constants/Theme.js"),n=require("../spinner/Spinner.js"),i=require("../TypographyStyle.js"),l=require("./CardSelector.styled.js");exports.CardSelector=s=>{var r,d,c;return e.jsx(e.Fragment,{children:e.jsx(l.Container,Object.assign({style:{alignItems:s.title&&s.subtitle?"flex-start":"center"},selected:s.selected,disabled:null!==(r=s.disabled)&&void 0!==r&&r,loading:null!==(d=s.loading)&&void 0!==d&&d,onClick:()=>{s.disabled||s.loading||s.onCardClick(s.id)}},{children:s.loading?e.jsx(l.Loader,{children:e.jsx(n.Spinner,{size:"large"})}):e.jsxs(e.Fragment,{children:[(null==s?void 0:s.icon)&&e.jsx("div",Object.assign({style:{width:24,height:24}},{children:e.jsx(s.icon,{width:24,color:s.selected?t.COLORS.content.brand:s.disabled?t.COLORS.content.inactive:t.COLORS.content.placeholder})})),e.jsxs("div",Object.assign({"data-test":null!==(c=s.dataTestId)&&void 0!==c?c:"card-selector"},{children:[s.title&&e.jsx(i.TitleSmall,Object.assign({style:{color:s.selected?t.COLORS.content.brand:s.disabled?t.COLORS.content.inactive:t.COLORS.content.secondary}},{children:s.title})),s.subtitle&&e.jsx(i.BodyCaption,Object.assign({style:{marginTop:s.title?4:0,color:s.selected?t.COLORS.content.brand:s.disabled?t.COLORS.content.inactive:t.COLORS.content.secondary}},{children:s.subtitle}))]}))]})}))})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("./CardSelector.js");exports.CardSelectorGroup=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("./CardSelector.js");exports.CardSelectorGroup=l=>e.jsx("div",Object.assign({style:{display:"flex",flexDirection:"vertical"===l.align?"column":"row",gap:l.gap||16}},{children:l.cards.map((t=>e.jsx("div",Object.assign({style:{display:"flex",flex:1}},{children:e.jsx(i.CardSelector,{id:t.id,icon:t.icon,title:t.title,subtitle:t.subtitle,selected:t.selected,onCardClick:l.onClick,loading:t.loading,disabled:t.disabled})}),t.id)))}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("react"),n=require("../../constants/Theme.js"),o=require("../../assets/icons/chevronDown.svg.js"),i=require("../input/Input.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("react"),n=require("../../constants/Theme.js"),o=require("../../assets/icons/chevronDown.svg.js"),i=require("../input/Input.js"),l=require("../input/context/InputStyleProvider.js"),s=require("./DropdownPopover/index.js");function a(){}const u=u=>{var d,c,p,{placeHolder:h,size:v,onSelect:g,defaultOptions:j,disabled:f,noErrorHint:b,placeHolderHeight:x}=u,w=e.__rest(u,["placeHolder","size","onSelect","defaultOptions","disabled","noErrorHint","placeHolderHeight"]);const[m,H]=r.useState(!1),y=null!=v?v:"default",O=r.useRef(),[S,q]=r.useState(null!=j?j:[]);r.useEffect((()=>{var e;const t=[];null===(e=null==w?void 0:w.options)||void 0===e||e.forEach((e=>{e.options?e.options.forEach((e=>{e.selected&&t.push(Object.assign(Object.assign({},e),{label:e.label}))})):e.selected&&t.push(e)})),q([...t])}),[w.options]),r.useEffect((()=>{j&&q([...j])}),[j]);const E=S.length?S.map((e=>e.label)).join(", "):void 0;return t.jsx(l.InputStyleContext.Provider,Object.assign({value:{InputWrapper:{height:x||("small"===y?32:48),width:null!==(c=null!==(d=w.buttonWidth)&&void 0!==d?d:w.width)&&void 0!==c?c:"100%",zIndex:1,cursor:"pointer",padding:"6px 8px"},input:{minHeight:"100%"}}},{children:t.jsx(s.DropdownPopover,Object.assign({ref:O,onSelect:function(e){Array.isArray(e)?q([...e]):q([e]),null==g||g(e)},disabled:f,onDropdownVisbilityChange:e=>H(e)},w,{children:t.jsx(i.Input,{version:w.version,noErrorHint:b,state:f?"disabled":"none",value:null!=E?E:"",errorMessage:w.error,variant:y,placeholder:null!=h?h:"Select an option",width:null!==(p=w.width)&&void 0!==p?p:"100%",onChangeText:a,rightIcon:{icon:()=>t.jsx(o.default,{style:{transform:m?"rotate(180deg)":"rotate(0deg)"},onClick:a,width:"small"===y?20:24,height:"small"===y?20:24,color:n.COLORS.content.primary})},truncateText:!0})}))}))};u.displayName="Dropdown",exports.Dropdown=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),
|
|
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"),d=require("./searchbox/SearchBox.js"),p=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,headerRef:C,hideSelectAll:D,primaryButtonText:L}=j;const{dropdownOptions:F,search:A,searchedString:k,searchedOptions:B,onApplyHandler:H,selectAllHandler:Z,onMultiSelectClear:R,onFreeFormSelect:T,onMultiSelectApply:P,latestDropdownOptionsRef:_,getSelectedOptions:z}=n.useDropdown(q,x,m,M,g,O),[E,I]=t.useState(null!=v?v:S),[K,N]=t.useState(null),W=t.useRef(null);s.useOutside(W,(()=>{if(N(null),g&&"2.0"===q){const e=z(_.current);null==y||y(e)}else null==y||y(F)}),[C]);const G=null!=b?b:h,J="number"==typeof G?f&&g?G-96:f&&!g||!f&&g?G-48:G:G;t.useEffect((()=>{const e=null!=v?v:S;if(null===K)I(e);else if("number"==typeof e)I(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));I(t)}}),[K]);const Q=[],U=(k&&O?B:F).map((e=>{var t,r;if(k&&!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(k.toLowerCase()))&&(Q.push(!k||e.label===k),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(k.toLowerCase()))||(null===(r=e.searchKey)||void 0===r?void 0:r.toLowerCase().includes(k.toLowerCase()))?(Q.push(!k||e.label===k),e):null}return e})).filter((e=>null!==e)),V=!!f&&k&&0===U.length;return e.jsxs(a.OpennedDropdownContainer,Object.assign({version:q,ref:W,style:{width:E}},{children:[e.jsxs("div",Object.assign({style:{width:K?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!f&&e.jsx(d.SearchBox,{onSearch:A,version:q}),U.length||k?e.jsxs(a.MenuListContainer,Object.assign({minHeight:G,maxHeight:J},{children:[!!g&&!V&&!D&&e.jsx(u.SelectAllMenu,{version:q,options:k&&O?B:F,onSelect:Z}),!w&&V&&e.jsx(p.SearchZeroState,{height:J,searchedString:k}),w&&(V||!!Q.length&&Q.every((e=>!1===e)))&&e.jsx(i.FreeFormMenu,{version:q,isMultiSelect:g,onSelect:T,searchedString:k}),e.jsx(l.MenuList,{version:q,onSelect:H,showDescription:function(e,t){N(e&&t?{title:e,description:t}:null)},isMultiSelect:g,options:U})]})):e.jsx("div",Object.assign({style:{height:G,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&&!(!U.length&&!k)&&"2.0"!==q&&e.jsx(c.default,{onClear:R,onApply:P,list:k&&O?B:F,buttonText:L})]})),!!K&&e.jsx(o.Description,{title:K.title,description:K.description,version:q})]}))};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MultiSelectOption, SingleOption } from '../../../type';
|
|
3
|
-
|
|
3
|
+
export declare const MenuItem: React.FC<{
|
|
4
4
|
option: SingleOption | MultiSelectOption;
|
|
5
5
|
isMultiSelect?: boolean;
|
|
6
6
|
showDescription: (title?: string, description?: string) => void;
|
|
7
7
|
onSelect: (option: SingleOption) => void;
|
|
8
|
-
onDropdownItemClick?: (option: SingleOption) => void;
|
|
9
8
|
last?: boolean;
|
|
10
9
|
version?: '1.0' | '2.0';
|
|
11
|
-
}
|
|
12
|
-
export declare const MenuItem: React.FC<MenuItemProps>;
|
|
13
|
-
export {};
|
|
10
|
+
}>;
|
|
@@ -2,4 +2,4 @@
|
|
|
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
|
-
`;exports.MenuItem=t=>{let{option:i,isMultiSelect:l,showDescription:a,onSelect:d,last:u,version:p
|
|
5
|
+
`;exports.MenuItem=t=>{let{option:i,isMultiSelect:l,showDescription:a,onSelect:d,last:u,version:p}=t;var x;function g(e){i.disabled||d(Object.assign(Object.assign({},i),{selected:e}))}return e.jsx(c,{version:p,style:u?{borderBottom:0}:{},onClick:e=>{e.preventDefault(),g(!i.selected)},onMouseOver:function(){i.description?a(i.label,i.description):a()},listItem:{value:i.value,label:i.label},subText:i.subText,leadingIcon:l?e.jsxs("div",Object.assign({style:{display:"flex",alignContent:"center",justifyContent:"center",gap:8}},{children:[e.jsx(n.CheckBox,{size:"2.0"===p?"SMALL":"DEFAULT",isDisabled:null!==(x=i.disabled)&&void 0!==x&&x,isChecked:!!i.selected,onValueChange:g}),e.jsx("div",Object.assign({style:{marginRight:"-4px"}},{children:i.leadingIcon}))]})):i.leadingIcon?e.jsx(e.Fragment,{children:i.leadingIcon}):e.jsx(e.Fragment,{}),customComponent:i.customComponent,trailingIcon:i.isFreeForm?e.jsx(o.FreeFormContainer,{children:e.jsx(s.BodyCaption,Object.assign({style:{color:r.COLORS.content.secondary}},{children:"Freeform"}))}):i.trailingIcon?e.jsx(e.Fragment,{children:i.trailingIcon}):e.jsx(e.Fragment,{}),variant:i.disabled?"inactive":i.selected?"selected":"default"})};
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DropdownOption, SingleOption } from '../../../type';
|
|
3
|
-
|
|
3
|
+
export declare const MenuList: React.FC<{
|
|
4
4
|
options: DropdownOption[];
|
|
5
5
|
isMultiSelect?: boolean;
|
|
6
6
|
showDescription: (title?: string, description?: string) => void;
|
|
7
7
|
onSelect: (optionSelect: SingleOption) => void;
|
|
8
8
|
version?: '1.0' | '2.0';
|
|
9
|
-
|
|
10
|
-
onDropdownItemClick?: (option: DropdownOption) => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const MenuList: React.FC<MenuListProps>;
|
|
13
|
-
export {};
|
|
9
|
+
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("./MenuItem.js"),s=require("./MenuList.styled.js");exports.MenuList=n=>{let{options:i,isMultiSelect:r,showDescription:o,onSelect:l,version:c}=n;return e.jsx(e.Fragment,{children:i.map(((n,a)=>{const u=a===i.length-1;if(n.options){const i=n;return e.jsxs("div",Object.assign({style:{marginTop:"2.0"===c?2:0}},{children:[e.jsxs(s.StyledGroupedLabel,Object.assign({version:c},{children:[i.leadingIcon?e.jsx("span",Object.assign({style:{marginRight:8}},{children:i.leadingIcon})):e.jsx(e.Fragment,{}),i.label]})),i.options.map(((s,n)=>e.jsx(t.MenuItem,{version:c,last:n===i.options.length-1,onSelect:l,showDescription:o,isMultiSelect:r,option:s},`${a}-${n}`)))]}),a)}return e.jsx(t.MenuItem,{version:c,last:u,onSelect:l,showDescription:o,isMultiSelect:r,option:n},a)}))})};
|
|
@@ -12,7 +12,6 @@ export declare function iterateOnOptions(options: DropdownOption[], newVal: Part
|
|
|
12
12
|
leadingIcon?: JSX.Element | undefined;
|
|
13
13
|
customComponent?: JSX.Element | undefined;
|
|
14
14
|
searchKey?: string | undefined;
|
|
15
|
-
selectedLabel?: string | undefined;
|
|
16
15
|
} | {
|
|
17
16
|
label?: string | undefined;
|
|
18
17
|
value?: string | undefined;
|
|
@@ -25,8 +24,6 @@ export declare function iterateOnOptions(options: DropdownOption[], newVal: Part
|
|
|
25
24
|
leadingIcon?: JSX.Element | undefined;
|
|
26
25
|
customComponent?: JSX.Element | undefined;
|
|
27
26
|
searchKey?: string | undefined;
|
|
28
|
-
selectedLabel?: string | undefined;
|
|
29
27
|
options: SingleOption[];
|
|
30
28
|
})[];
|
|
31
29
|
export declare function iterateOnOptionsRaw(options: DropdownOption[], cb: (option: SingleOption) => void): void;
|
|
32
|
-
export declare function getSelectedOptionsAsText(selectedOption: DropdownOption[]): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.iterateOnOptions=function(t,s,e){return t.map((t=>{if(t.options){const n=t.options.map((t=>!e||e(t)?Object.assign(Object.assign({},t),s):Object.assign({},t)));return Object.assign(Object.assign({},t),{options:[...n]})}return!e||e(t)?Object.assign(Object.assign({},t),s):Object.assign({},t)}))},exports.iterateOnOptionsRaw=function(t,s){t.forEach((t=>{t.options?t.options.forEach(s):s(t)}))};
|
|
@@ -19,9 +19,6 @@ export interface OpenDropdownProps {
|
|
|
19
19
|
headerRef?: any;
|
|
20
20
|
hideSelectAll?: boolean;
|
|
21
21
|
primaryButtonText?: string;
|
|
22
|
-
onInfiniteScroll?: () => void;
|
|
23
|
-
onMultiSelectClear?: () => void;
|
|
24
|
-
onDropdownItemClick?: (option: DropdownOption) => void;
|
|
25
22
|
}
|
|
26
23
|
export type GroupedOption = {
|
|
27
24
|
label?: string;
|
|
@@ -40,7 +37,6 @@ export type SingleOption = {
|
|
|
40
37
|
leadingIcon?: JSX.Element;
|
|
41
38
|
customComponent?: JSX.Element;
|
|
42
39
|
searchKey?: string;
|
|
43
|
-
selectedLabel?: string;
|
|
44
40
|
};
|
|
45
41
|
export type MultiSelectOption = SingleOption;
|
|
46
42
|
export type DropdownOption = MultiSelectOption | SingleOption | GroupedOption;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryBuilderNodeProps } from "../../../
|
|
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 "../../../
|
|
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 "../../../
|
|
2
|
+
import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
|
|
3
3
|
declare const IGTrigger: React.FC<QueryBuilderNodeProps>;
|
|
4
4
|
export default IGTrigger;
|
package/dist/esm/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { QueryBuilderAPIData } from "../../../
|
|
1
|
+
import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
|
|
2
2
|
export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
|
package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DropdownOption } from "../../../dropdown/type";
|
|
3
|
-
import { QueryBuilderProperty } from "../../
|
|
4
|
-
import { QueryBuilderNodeProps } from "../../
|
|
3
|
+
import { QueryBuilderProperty } from "../../types/QueryBuilder.type";
|
|
4
|
+
import { QueryBuilderNodeProps } from "../../types/QueryBuilderNodeProps.type";
|
|
5
5
|
declare const BaseTriggerQueryBuilderNode: React.FC<QueryBuilderNodeProps & {
|
|
6
6
|
cacheKey: string;
|
|
7
7
|
propertyAddBtnText: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as n}from"react/jsx-runtime";import{COLORS as i}from"../../constants/Theme.js";import{Spinner as l}from"../spinner/Spinner.js";import{TitleSmall as d,BodyCaption as
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as n}from"react/jsx-runtime";import{COLORS as i}from"../../constants/Theme.js";import{Spinner as l}from"../spinner/Spinner.js";import{TitleSmall as d,BodyCaption as c}from"../TypographyStyle.js";import{Container as o,Loader as s}from"./CardSelector.styled.js";const r=r=>{var a,b,h;return e(t,{children:e(o,Object.assign({style:{alignItems:r.title&&r.subtitle?"flex-start":"center"},selected:r.selected,disabled:null!==(a=r.disabled)&&void 0!==a&&a,loading:null!==(b=r.loading)&&void 0!==b&&b,onClick:()=>{r.disabled||r.loading||r.onCardClick(r.id)}},{children:r.loading?e(s,{children:e(l,{size:"large"})}):n(t,{children:[(null==r?void 0:r.icon)&&e("div",Object.assign({style:{width:24,height:24}},{children:e(r.icon,{width:24,color:r.selected?i.content.brand:r.disabled?i.content.inactive:i.content.placeholder})})),n("div",Object.assign({"data-test":null!==(h=r.dataTestId)&&void 0!==h?h:"card-selector"},{children:[r.title&&e(d,Object.assign({style:{color:r.selected?i.content.brand:r.disabled?i.content.inactive:i.content.secondary}},{children:r.title})),r.subtitle&&e(c,Object.assign({style:{marginTop:r.title?4:0,color:r.selected?i.content.brand:r.disabled?i.content.inactive:i.content.secondary}},{children:r.subtitle}))]}))]})}))})};export{r as CardSelector};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{CardSelector as e}from"./CardSelector.js";const l=l=>i("div",Object.assign({style:{display:"flex",flexDirection:"vertical"===l.align?"column":"row",gap:l.gap||16}},{children:l.cards.map((t=>i("div",Object.assign({style:{display:"flex",flex:1}},{children:i(e,{id:t.id,icon:t.icon,title:t.title,subtitle:t.subtitle,selected:t.selected,onCardClick:l.onClick,loading:t.loading,disabled:t.disabled})}),t.id)))}));export{l as CardSelectorGroup};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as o}from"../../_virtual/_tslib.js";import{jsx as
|
|
1
|
+
import{__rest as o}from"../../_virtual/_tslib.js";import{jsx as e}from"react/jsx-runtime";import{useState as t,useRef as n,useEffect as r}from"react";import{COLORS as i}from"../../constants/Theme.js";import l from"../../assets/icons/chevronDown.svg.js";import{Input as s}from"../input/Input.js";import{InputStyleContext as a}from"../input/context/InputStyleProvider.js";import{DropdownPopover as d}from"./DropdownPopover/index.js";function p(){}const c=c=>{var u,h,m,{placeHolder:v,size:g,onSelect:f,defaultOptions:b,disabled:j,noErrorHint:H,placeHolderHeight:w}=c,x=o(c,["placeHolder","size","onSelect","defaultOptions","disabled","noErrorHint","placeHolderHeight"]);const[y,O]=t(!1),E=null!=g?g:"default",I=n(),[S,D]=t(null!=b?b:[]);r((()=>{var o;const e=[];null===(o=null==x?void 0:x.options)||void 0===o||o.forEach((o=>{o.options?o.options.forEach((o=>{o.selected&&e.push(Object.assign(Object.assign({},o),{label:o.label}))})):o.selected&&e.push(o)})),D([...e])}),[x.options]),r((()=>{b&&D([...b])}),[b]);const z=S.length?S.map((o=>o.label)).join(", "):void 0;return e(a.Provider,Object.assign({value:{InputWrapper:{height:w||("small"===E?32:48),width:null!==(h=null!==(u=x.buttonWidth)&&void 0!==u?u:x.width)&&void 0!==h?h:"100%",zIndex:1,cursor:"pointer",padding:"6px 8px"},input:{minHeight:"100%"}}},{children:e(d,Object.assign({ref:I,onSelect:function(o){Array.isArray(o)?D([...o]):D([o]),null==f||f(o)},disabled:j,onDropdownVisbilityChange:o=>O(o)},x,{children:e(s,{version:x.version,noErrorHint:H,state:j?"disabled":"none",value:null!=z?z:"",errorMessage:x.error,variant:E,placeholder:null!=v?v:"Select an option",width:null!==(m=x.width)&&void 0!==m?m:"100%",onChangeText:p,rightIcon:{icon:()=>e(l,{style:{transform:y?"rotate(180deg)":"rotate(0deg)"},onClick:p,width:"small"===E?20:24,height:"small"===E?20:24,color:i.content.primary})},truncateText:!0})}))}))};c.displayName="Dropdown";export{c as Dropdown};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as o,useRef as
|
|
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,headerRef:k,hideSelectAll:B,primaryButtonText:H}=v;const{dropdownOptions:T,search:R,searchedString:Z,searchedOptions:q,onApplyHandler:z,selectAllHandler:I,onMultiSelectClear:K,onFreeFormSelect:N,onMultiSelectApply:P,latestDropdownOptionsRef:W,getSelectedOptions:E}=s(A,j,D,F,y,L),[G,J]=o(null!=x?x:b),[Q,U]=o(null),V=r(null);l(V,(()=>{if(U(null),y&&"2.0"===A){const e=E(W.current);null==M||M(e)}else null==M||M(T)}),[k]);const X=null!=C?C:g,Y="number"==typeof X?w&&y?X-96:w&&!y||!w&&y?X-48:X:X;i((()=>{const e=null!=x?x:b;if(null===Q)J(e);else if("number"==typeof e)J(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));J(t)}}),[Q]);const $=[],_=(Z&&L?q:T).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()))&&($.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()))?($.push(!Z||e.label===Z),e):null}return e})).filter((e=>null!==e)),ee=!!w&&Z&&0===_.length;return e(h,Object.assign({version:A,ref:V,style:{width:G}},{children:[e("div",Object.assign({style:{width:Q?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!w&&t(f,{onSearch:R,version:A}),_.length||Z?e(m,Object.assign({minHeight:X,maxHeight:Y},{children:[!!y&&!ee&&!B&&t(u,{version:A,options:Z&&L?q:T,onSelect:I}),!O&&ee&&t(S,{height:Y,searchedString:Z}),O&&(ee||!!$.length&&$.every((e=>!1===e)))&&t(a,{version:A,isMultiSelect:y,onSelect:N,searchedString:Z}),t(p,{version:A,onSelect:z,showDescription:function(e,t){U(e&&t?{title:e,description:t}:null)},isMultiSelect:y,options:_})]})):t("div",Object.assign({style:{height:X,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:T,buttonText:H})]})),!!Q&&t(c,{title:Q.title,description:Q.description,version:A})]}))};export{v as OpenedDropdown};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MultiSelectOption, SingleOption } from '../../../type';
|
|
3
|
-
|
|
3
|
+
export declare const MenuItem: React.FC<{
|
|
4
4
|
option: SingleOption | MultiSelectOption;
|
|
5
5
|
isMultiSelect?: boolean;
|
|
6
6
|
showDescription: (title?: string, description?: string) => void;
|
|
7
7
|
onSelect: (option: SingleOption) => void;
|
|
8
|
-
onDropdownItemClick?: (option: SingleOption) => void;
|
|
9
8
|
last?: boolean;
|
|
10
9
|
version?: '1.0' | '2.0';
|
|
11
|
-
}
|
|
12
|
-
export declare const MenuItem: React.FC<MenuItemProps>;
|
|
13
|
-
export {};
|
|
10
|
+
}>;
|
|
@@ -2,4 +2,4 @@ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import i from"st
|
|
|
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
|
-
`,d=i=>{let{option:s,isMultiSelect:d,showDescription:m,onSelect:p,last:g,version:u
|
|
5
|
+
`,d=i=>{let{option:s,isMultiSelect:d,showDescription:m,onSelect:p,last:g,version:u}=i;var b;function f(e){s.disabled||p(Object.assign(Object.assign({},s),{selected:e}))}return e(a,{version:u,style:g?{borderBottom:0}:{},onClick:e=>{e.preventDefault(),f(!s.selected)},onMouseOver:function(){s.description?m(s.label,s.description):m()},listItem:{value:s.value,label:s.label},subText:s.subText,leadingIcon:d?t("div",Object.assign({style:{display:"flex",alignContent:"center",justifyContent:"center",gap:8}},{children:[e(o,{size:"2.0"===u?"SMALL":"DEFAULT",isDisabled:null!==(b=s.disabled)&&void 0!==b&&b,isChecked:!!s.selected,onValueChange:f}),e("div",Object.assign({style:{marginRight:"-4px"}},{children:s.leadingIcon}))]})):s.leadingIcon?e(n,{children:s.leadingIcon}):e(n,{}),customComponent:s.customComponent,trailingIcon:s.isFreeForm?e(c,{children:e(r,Object.assign({style:{color:l.content.secondary}},{children:"Freeform"}))}):s.trailingIcon?e(n,{children:s.trailingIcon}):e(n,{}),variant:s.disabled?"inactive":s.selected?"selected":"default"})};export{d as MenuItem};
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DropdownOption, SingleOption } from '../../../type';
|
|
3
|
-
|
|
3
|
+
export declare const MenuList: React.FC<{
|
|
4
4
|
options: DropdownOption[];
|
|
5
5
|
isMultiSelect?: boolean;
|
|
6
6
|
showDescription: (title?: string, description?: string) => void;
|
|
7
7
|
onSelect: (optionSelect: SingleOption) => void;
|
|
8
8
|
version?: '1.0' | '2.0';
|
|
9
|
-
|
|
10
|
-
onDropdownItemClick?: (option: DropdownOption) => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const MenuList: React.FC<MenuListProps>;
|
|
13
|
-
export {};
|
|
9
|
+
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as i}from"react/jsx-runtime";import{MenuItem as n}from"./MenuItem.js";import{StyledGroupedLabel as o}from"./MenuList.styled.js";const s=s=>{let{options:r,isMultiSelect:l,showDescription:c,onSelect:p,version:a}=s;return e(t,{children:r.map(((s,m)=>{const g=m===r.length-1;if(s.options){const r=s;return i("div",Object.assign({style:{marginTop:"2.0"===a?2:0}},{children:[i(o,Object.assign({version:a},{children:[r.leadingIcon?e("span",Object.assign({style:{marginRight:8}},{children:r.leadingIcon})):e(t,{}),r.label]})),r.options.map(((t,i)=>e(n,{version:a,last:i===r.options.length-1,onSelect:p,showDescription:c,isMultiSelect:l,option:t},`${m}-${i}`)))]}),m)}return e(n,{version:a,last:g,onSelect:p,showDescription:c,isMultiSelect:l,option:s},m)}))})};export{s as MenuList};
|
|
@@ -12,7 +12,6 @@ export declare function iterateOnOptions(options: DropdownOption[], newVal: Part
|
|
|
12
12
|
leadingIcon?: JSX.Element | undefined;
|
|
13
13
|
customComponent?: JSX.Element | undefined;
|
|
14
14
|
searchKey?: string | undefined;
|
|
15
|
-
selectedLabel?: string | undefined;
|
|
16
15
|
} | {
|
|
17
16
|
label?: string | undefined;
|
|
18
17
|
value?: string | undefined;
|
|
@@ -25,8 +24,6 @@ export declare function iterateOnOptions(options: DropdownOption[], newVal: Part
|
|
|
25
24
|
leadingIcon?: JSX.Element | undefined;
|
|
26
25
|
customComponent?: JSX.Element | undefined;
|
|
27
26
|
searchKey?: string | undefined;
|
|
28
|
-
selectedLabel?: string | undefined;
|
|
29
27
|
options: SingleOption[];
|
|
30
28
|
})[];
|
|
31
29
|
export declare function iterateOnOptionsRaw(options: DropdownOption[], cb: (option: SingleOption) => void): void;
|
|
32
|
-
export declare function getSelectedOptionsAsText(selectedOption: DropdownOption[]): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function s(s,n,t){return s.map((s=>{if(s.options){const i=s.options.map((s=>!t||t(s)?Object.assign(Object.assign({},s),n):Object.assign({},s)));return Object.assign(Object.assign({},s),{options:[...i]})}return!t||t(s)?Object.assign(Object.assign({},s),n):Object.assign({},s)}))}function n(s,n){s.forEach((s=>{s.options?s.options.forEach(n):n(s)}))}export{s as iterateOnOptions,n as iterateOnOptionsRaw};
|
|
@@ -19,9 +19,6 @@ export interface OpenDropdownProps {
|
|
|
19
19
|
headerRef?: any;
|
|
20
20
|
hideSelectAll?: boolean;
|
|
21
21
|
primaryButtonText?: string;
|
|
22
|
-
onInfiniteScroll?: () => void;
|
|
23
|
-
onMultiSelectClear?: () => void;
|
|
24
|
-
onDropdownItemClick?: (option: DropdownOption) => void;
|
|
25
22
|
}
|
|
26
23
|
export type GroupedOption = {
|
|
27
24
|
label?: string;
|
|
@@ -40,7 +37,6 @@ export type SingleOption = {
|
|
|
40
37
|
leadingIcon?: JSX.Element;
|
|
41
38
|
customComponent?: JSX.Element;
|
|
42
39
|
searchKey?: string;
|
|
43
|
-
selectedLabel?: string;
|
|
44
40
|
};
|
|
45
41
|
export type MultiSelectOption = SingleOption;
|
|
46
42
|
export type DropdownOption = MultiSelectOption | SingleOption | GroupedOption;
|