@bikdotai/bik-component-library 0.0.773 → 0.0.774-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/alerts/Alert.styled.js +1 -0
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/cjs/components/multi-level-dropdown/GroupedMenuList.d.ts +4 -0
- package/dist/cjs/components/multi-level-dropdown/GroupedMenuList.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/MenuItem.d.ts +3 -0
- package/dist/cjs/components/multi-level-dropdown/MenuItem.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/MenuList.d.ts +4 -0
- package/dist/cjs/components/multi-level-dropdown/MenuList.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/type.d.ts +3 -0
- package/dist/cjs/components/radioButton/RadioButton.d.ts +1 -0
- package/dist/cjs/components/radioButton/RadioButton.js +1 -1
- 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/alerts/Alert.styled.js +9 -8
- package/dist/esm/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/esm/components/multi-level-dropdown/GroupedMenuList.d.ts +4 -0
- package/dist/esm/components/multi-level-dropdown/GroupedMenuList.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MenuItem.d.ts +3 -0
- package/dist/esm/components/multi-level-dropdown/MenuItem.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MenuList.d.ts +4 -0
- package/dist/esm/components/multi-level-dropdown/MenuList.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.js +1 -1
- package/dist/esm/components/multi-level-dropdown/type.d.ts +3 -0
- package/dist/esm/components/radioButton/RadioButton.d.ts +1 -0
- package/dist/esm/components/radioButton/RadioButton.js +1 -1
- 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;
|
|
@@ -5,4 +5,8 @@ export declare const GroupedMenuList: React.FC<{
|
|
|
5
5
|
onDropdownItemClick?: (option: MultiLevelDropdownOption, parents: MultiLevelDropdownOption[]) => void;
|
|
6
6
|
option: GroupedOption;
|
|
7
7
|
parents: MultiLevelDropdownOption[];
|
|
8
|
+
allowParentSelection?: boolean;
|
|
9
|
+
maxLevels?: number;
|
|
10
|
+
hideGroupLabel?: boolean;
|
|
11
|
+
currentLevel: number;
|
|
8
12
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("../../constants/Theme.js"),t=require("../TypographyStyle.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("../../constants/Theme.js"),t=require("../TypographyStyle.js"),n=require("./MenuItem.js"),o=require("./MultiLevelDropdown.styled.js");exports.GroupedMenuList=l=>{let{width:s,onDropdownItemClick:i,option:p,parents:u,allowParentSelection:a,maxLevels:d,hideGroupLabel:c,currentLevel:x}=l;return e.jsxs(o.GroupedMenuListContainer,{children:[!c&&e.jsx(t.BodyTiny,Object.assign({style:{padding:"4px 8px 4px 12px",cursor:"default"},color:r.COLORS.content.placeholder},{children:p.label})),p.options.map(((r,t)=>e.jsx(n.MenuItem,{width:s,onDropdownItemClick:i,option:r,parents:u,allowParentSelection:a,maxLevels:d,currentLevel:x},t)))]})};
|
|
@@ -5,4 +5,7 @@ export declare const MenuItem: React.FC<{
|
|
|
5
5
|
onDropdownItemClick?: (option: MultiLevelDropdownOption, parents: MultiLevelDropdownOption[]) => void;
|
|
6
6
|
option: SingleOption;
|
|
7
7
|
parents: MultiLevelDropdownOption[];
|
|
8
|
+
allowParentSelection?: boolean;
|
|
9
|
+
maxLevels?: number;
|
|
10
|
+
currentLevel: number;
|
|
8
11
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("../../assets/icons/chevronRight2.svg.js"),t=require("react"),i=require("../../constants/Theme.js"),o=require("../TypographyStyle.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("../../assets/icons/chevronRight2.svg.js"),t=require("react"),i=require("../../constants/Theme.js"),o=require("../TypographyStyle.js"),r=require("./MultiLevelDropdown.styled.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=s(t);const a=l.default.lazy((()=>Promise.resolve().then((function(){return require("./MenuList.js")})).then((e=>({default:e.MenuList})))));exports.MenuItem=s=>{let{width:d,onDropdownItemClick:c,option:u,parents:p,allowParentSelection:h,maxLevels:v,currentLevel:j}=s;var g,O,b,C,x,S,m;const[L,f]=l.default.useState(!1),[y,M]=l.default.useState(!1),[I,R]=l.default.useState({top:0,left:0}),w=t.useRef({top:0,left:0}),T=!!u.children&&u.children.length>0,q=T&&(void 0===v||j<v);return e.jsxs(r.MenuItemWrapper,Object.assign({onMouseEnter:e=>{q&&(f(!0),(e=>{const n=e.currentTarget.getBoundingClientRect();R({top:n.top,left:n.right}),w.current={top:n.top,left:n.right}})(e))},onMouseLeave:()=>{f(!1)},onClick:e=>{e.stopPropagation(),(()=>{var e;!c||null!==(e=u.disabled)&&void 0!==e&&e||T&&!h||c(u,p)})()},id:"menuItemWrapper",style:{cursor:null!==(g=u.disabled)&&void 0!==g&&g?"not-allowed":"pointer",backgroundColor:null!==(O=u.disabled)&&void 0!==O&&O?i.COLORS.surface.standard:"transparent"}},{children:[u.customComponent?u.customComponent:e.jsxs(r.MenuItemContainer,Object.assign({isSelected:u.selected,isSubMenuOpen:L,isHovered:y,isDisabled:null!==(b=u.disabled)&&void 0!==b&&b},{children:[e.jsxs(r.ContentContainer,{children:[u.leadingIcon&&e.jsx(r.LeadingIconContainer,{children:u.leadingIcon}),e.jsxs("div",{children:[e.jsx(o.BodyCaption,Object.assign({style:{color:null!==(C=u.disabled)&&void 0!==C&&C?i.COLORS.content.inactive:u.selected||y?i.COLORS.content.positive:i.COLORS.content.primary}},{children:u.label})),u.subText&&e.jsx(o.BodyTiny,Object.assign({style:{color:null!==(x=u.disabled)&&void 0!==x&&x?i.COLORS.content.inactive:u.selected||y?i.COLORS.content.positive:i.COLORS.content.secondary,marginTop:"2px"}},{children:u.subText}))]})]}),T?e.jsx(r.TrailingIconContainer,{children:e.jsx(n.default,{width:16,height:16,color:!q||null!==(S=u.disabled)&&void 0!==S&&S?i.COLORS.content.inactive:u.selected||y?i.COLORS.content.positive:i.COLORS.content.primary})}):u.trailingIcon?e.jsx(r.TrailingIconContainer,{children:u.trailingIcon}):e.jsx(e.Fragment,{})]})),!(null!==(m=u.disabled)&&void 0!==m&&m)&&u.children&&u.children.length>0&&q&&L&&e.jsx(r.SubMenuContainer,Object.assign({width:d,className:"submenu",onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1)},{children:e.jsx(r.StyledSubMenuWrapper,Object.assign({width:d,top:I.top,left:I.left},{children:e.jsx(r.SubMenuListContainer,{children:e.jsx(t.Suspense,Object.assign({fallback:e.jsx("div",{children:"Loading..."})},{children:e.jsx(a,{width:d,onDropdownItemClick:c,options:u.children,parents:[...p,u],allowParentSelection:h,maxLevels:v,currentLevel:j+1})}))})}))}))]}))};
|
|
@@ -5,4 +5,8 @@ export declare const MenuList: React.FC<{
|
|
|
5
5
|
onDropdownItemClick?: (option: MultiLevelDropdownOption, parents: MultiLevelDropdownOption[]) => void;
|
|
6
6
|
options: MultiLevelDropdownOption[];
|
|
7
7
|
parents: MultiLevelDropdownOption[];
|
|
8
|
+
allowParentSelection?: boolean;
|
|
9
|
+
maxLevels?: number;
|
|
10
|
+
hideGroupLabel?: boolean;
|
|
11
|
+
currentLevel: number;
|
|
8
12
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("./GroupedMenuList.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("./GroupedMenuList.js"),r=require("./MenuItem.js"),n=require("./MultiLevelDropdown.styled.js");exports.MenuList=o=>{let{width:i,onDropdownItemClick:l,options:s,parents:u,allowParentSelection:p,maxLevels:a,hideGroupLabel:d,currentLevel:c}=o;return e.jsx(n.StyledMenuList,{children:s.map(((n,o)=>"value"in n?e.jsx(r.MenuItem,{width:i,onDropdownItemClick:l,option:n,parents:u,allowParentSelection:p,maxLevels:a,currentLevel:c},o):"options"in n&&n.options.length>0?e.jsx(t.GroupedMenuList,{width:i,onDropdownItemClick:l,option:n,parents:u,allowParentSelection:p,maxLevels:a,hideGroupLabel:d,currentLevel:c},o):void 0))})};
|
|
@@ -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("../../constants/Theme.js"),s=require("../dropdown/OpenedDropdown/components/searchbox/SearchBox.js"),o=require("../floater/floater.js"),i=require("./MenuList.js"),l=require("./MultiLevelDropdown.styled.js");function
|
|
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("../../constants/Theme.js"),s=require("../dropdown/OpenedDropdown/components/searchbox/SearchBox.js"),o=require("../floater/floater.js"),i=require("./MenuList.js"),l=require("./MultiLevelDropdown.styled.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=a(t);exports.MultiLevelDropdown=a=>{let{options:c,width:d,isSearchable:p,onDropdownItemClick:f,refElement:h,topOffset:j,leftOffset:w,isDropdownOpen:x,onDropdownOutsideClick:b,allowParentSelection:O,maxLevels:g,hideGroupLabel:m}=a;const v=u.default.useRef(null),[L,S]=t.useState(c),y=e=>{const t=Array.isArray(c)?[...c]:[],n=[];for(;t.length>0;){const r=t.shift();r&&r.label.toLowerCase().includes(e.toLowerCase())&&n.push(r),r&&"children"in r&&r.children?t.push(...r.children):r&&"options"in r&&r.options&&t.push(...r.options)}const r=e=>e.map((e=>{if(n.includes(e))return e;if("children"in e&&e.children){const t=r(e.children);if(t.length>0)return Object.assign(Object.assign({},e),{children:t})}if("options"in e&&e.options){const t=r(e.options);if(t.length>0)return Object.assign(Object.assign({},e),{options:t})}return null})).filter((e=>null!==e));S(r(c))},C=e=>{v.current&&!v.current.contains(e.target)?b&&b(!0):b&&b(!1)};return t.useEffect((()=>{x&&y("")}),[x]),t.useEffect((()=>(document.addEventListener("mousedown",C),()=>{document.removeEventListener("mousedown",C)})),[]),t.useEffect((()=>{S(c)}),[c]),e.jsx(o.Floater,Object.assign({refElement:h,topOffset:j,leftOffset:w},{children:x&&e.jsx("div",Object.assign({ref:v,style:{backgroundColor:r.COLORS.surface.standard,zIndex:99999,borderRadius:"8px",whiteSpace:"normal"}},{children:e.jsxs(l.DropdownContainer,Object.assign({width:d},{children:[p&&e.jsx("div",Object.assign({style:{padding:"4px",width:null!=d?d:"200px"}},{children:e.jsx(s.SearchBox,{onSearch:y,version:"2.0"})})),e.jsx(l.OptionsContainer,Object.assign({width:d},{children:(null!=L?L:[]).length>0&&e.jsx(i.MenuList,{width:null!=d?d:"200px",onDropdownItemClick:f,options:L,parents:[],allowParentSelection:O,maxLevels:g,hideGroupLabel:m,currentLevel:1})})),0===(null!=L?L:[]).length&&e.jsx(l.NoResultsContainer,Object.assign({style:{width:null!=d?d:"200px"}},{children:e.jsx(n.ZeroState,{title:"No results found!",subTitle:"Sorry, we are unable to find any results for your search."})}))]}))}))}))};
|
|
@@ -5,6 +5,9 @@ export interface MultiLevelDropdownProps extends FloaterProps {
|
|
|
5
5
|
width?: string;
|
|
6
6
|
isSearchable?: boolean;
|
|
7
7
|
isDropdownOpen?: boolean;
|
|
8
|
+
allowParentSelection?: boolean;
|
|
9
|
+
maxLevels?: number;
|
|
10
|
+
hideGroupLabel?: boolean;
|
|
8
11
|
onDropdownOutsideClick?: (isOutsideClick: any) => void;
|
|
9
12
|
onDropdownItemClick?: (option: MultiLevelDropdownOption, parents: MultiLevelDropdownOption[]) => void;
|
|
10
13
|
}
|
|
@@ -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=s=>{const t=i.useMemo((()=>(null==s?void 0:s.activeColor)||l.COLORS.background.positive.vibrant),[s.activeColor]),a=i.useMemo((()=>s.isDisabled?l.COLORS.content.inactive:s.isActive?t:l.COLORS.content.primary),[s.isDisabled,s.isActive,t]);return e.jsxs("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.jsx("circle",{cx:s.isSmall?"8":"10",cy:s.isSmall?"8":"10",r:s.isSmall?6:9,stroke:a,strokeWidth:s.isSmall?1.5:2}),s.isActive&&e.jsx("circle",{cx:s.isSmall?"8":"10",cy:s.isSmall?"8":"10",r:s.isSmall?3:5,fill:s.isDisabled?l.COLORS.content.inactive:t})]}))};exports.RadioButton=o=>{const[
|
|
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=s=>{const t=i.useMemo((()=>(null==s?void 0:s.activeColor)||l.COLORS.background.positive.vibrant),[s.activeColor]),a=i.useMemo((()=>s.isDisabled?l.COLORS.content.inactive:s.isActive?t:l.COLORS.content.primary),[s.isDisabled,s.isActive,t]);return e.jsxs("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.jsx("circle",{cx:s.isSmall?"8":"10",cy:s.isSmall?"8":"10",r:s.isSmall?6:9,stroke:a,strokeWidth:s.isSmall?1.5:2}),s.isActive&&e.jsx("circle",{cx:s.isSmall?"8":"10",cy:s.isSmall?"8":"10",r:s.isSmall?3:5,fill:s.isDisabled?l.COLORS.content.inactive:t})]}))};exports.RadioButton=o=>{const[n,c]=i.useState(o.isActive||!1),[r,d]=i.useState(!1),[O,b]=i.useState(!1);i.useEffect((()=>{c(o.isActive)}),[o.isActive]);return e.jsxs(s.RadioButtonContainer,Object.assign({onClick:()=>{var e;if(!o.skipSelectingOff&&!o.isDisabled){const i=!n;c(i),null===(e=o.onValueChange)||void 0===e||e.call(o,i,o.value)}},onMouseEnter:()=>d(!o.skipHoverState),onMouseLeave:()=>d(!1),onMouseDown:()=>b(!o.skipHoverState),onMouseUp:()=>b(!1),style:o.caption?{alignItems:"flex-start"}:{}},{children:[e.jsx(s.RadioButtonIcon,Object.assign({checked:n,hovered:r,clicked:O,isDisabled:o.isDisabled||!1,size:o.size,style:o.caption?{margin:"2px 0"}:{}},{children:e.jsx(a,{isSmall:"SMALL"===o.size,isActive:n,isDisabled:o.isDisabled||!1,activeColor:o.activeColor})})),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:o.gapBetweengapBetweenBodyAndCaption||"0px"}},{children:[o.label?o.boldOnChecked&&n||o.alwaysBold?e.jsx(t.TitleSmall,Object.assign({color:o.isDisabled?l.COLORS.text.disabled:l.COLORS.text.primary},{children:o.label})):"SMALL"===o.size?e.jsx(t.BodyCaption,Object.assign({color:o.isDisabled?l.COLORS.text.disabled:l.COLORS.text.primary},{children:o.label})):"MEDIUM"===o.labelSize?e.jsx(t.BodySecondary,Object.assign({color:o.isDisabled?l.COLORS.text.disabled:l.COLORS.text.primary},{children:o.label})):e.jsx(t.BodyPrimary,Object.assign({color:o.isDisabled?l.COLORS.text.disabled:l.COLORS.text.primary},{children:o.label})):e.jsx(e.Fragment,{}),o.caption&&e.jsx(t.BodyCaption,Object.assign({color:o.isDisabled?l.COLORS.text.disabled:l.COLORS.text.secondary},{children:o.caption}))]}))]}))};
|
|
@@ -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,17 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"styled-components";import{CONTENT_POSITION as o,COLOR_CONFIG_MAP as t}from"./AlertHelper.js";const i=e.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
|
-
justify-content: ${
|
|
4
|
+
justify-content: ${e=>e.contentPosition||o.CENTER};
|
|
5
5
|
padding: 8px 16px;
|
|
6
|
-
background-color: ${
|
|
6
|
+
background-color: ${e=>t[e.type].backgroundColor};
|
|
7
7
|
border-radius: 4px;
|
|
8
|
-
border: 1px solid ${
|
|
9
|
-
`,
|
|
8
|
+
border: 1px solid ${e=>t[e.type].borderColor};
|
|
9
|
+
`,n=e.div`
|
|
10
10
|
flex: 1;
|
|
11
11
|
display: flex;
|
|
12
|
-
justify-content: ${
|
|
13
|
-
|
|
12
|
+
justify-content: ${e=>e.contentPosition||o.CENTER};
|
|
13
|
+
align-items: center;
|
|
14
|
+
`,r=e.div`
|
|
14
15
|
margin-left: 16px;
|
|
15
16
|
display: flex;
|
|
16
17
|
align-items: center;
|
|
17
|
-
`;export{
|
|
18
|
+
`;export{n as AlertContentWrapper,i as AlertStyle,r as CloseIconWrapper};
|
|
@@ -5,4 +5,8 @@ export declare const GroupedMenuList: React.FC<{
|
|
|
5
5
|
onDropdownItemClick?: (option: MultiLevelDropdownOption, parents: MultiLevelDropdownOption[]) => void;
|
|
6
6
|
option: GroupedOption;
|
|
7
7
|
parents: MultiLevelDropdownOption[];
|
|
8
|
+
allowParentSelection?: boolean;
|
|
9
|
+
maxLevels?: number;
|
|
10
|
+
hideGroupLabel?: boolean;
|
|
11
|
+
currentLevel: number;
|
|
8
12
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{COLORS as t}from"../../constants/Theme.js";import{BodyTiny as r}from"../TypographyStyle.js";import{MenuItem as n}from"./MenuItem.js";import{GroupedMenuListContainer as l}from"./MultiLevelDropdown.styled.js";const p=p=>{let{width:i,onDropdownItemClick:a,option:m,parents:s,allowParentSelection:c,maxLevels:d,hideGroupLabel:u,currentLevel:h}=p;return e(l,{children:[!u&&o(r,Object.assign({style:{padding:"4px 8px 4px 12px",cursor:"default"},color:t.content.placeholder},{children:m.label})),m.options.map(((e,t)=>o(n,{width:i,onDropdownItemClick:a,option:e,parents:s,allowParentSelection:c,maxLevels:d,currentLevel:h},t)))]})};export{p as GroupedMenuList};
|
|
@@ -5,4 +5,7 @@ export declare const MenuItem: React.FC<{
|
|
|
5
5
|
onDropdownItemClick?: (option: MultiLevelDropdownOption, parents: MultiLevelDropdownOption[]) => void;
|
|
6
6
|
option: SingleOption;
|
|
7
7
|
parents: MultiLevelDropdownOption[];
|
|
8
|
+
allowParentSelection?: boolean;
|
|
9
|
+
maxLevels?: number;
|
|
10
|
+
currentLevel: number;
|
|
8
11
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import o from"../../assets/icons/chevronRight2.svg.js";import i,{useRef as l,Suspense as r}from"react";import{COLORS as s}from"../../constants/Theme.js";import{BodyCaption as c,BodyTiny as d}from"../TypographyStyle.js";import{MenuItemWrapper as a,MenuItemContainer as p,ContentContainer as u,LeadingIconContainer as h,TrailingIconContainer as m,SubMenuContainer as v,StyledSubMenuWrapper as g,SubMenuListContainer as b}from"./MultiLevelDropdown.styled.js";const f=i.lazy((()=>import("./MenuList.js").then((e=>({default:e.MenuList}))))),j=j=>{let{width:w,onDropdownItemClick:y,option:L,parents:M,allowParentSelection:O,maxLevels:S,currentLevel:x}=j;var C,I,T,k,D,P,E;const[R,z]=i.useState(!1),[B,H]=i.useState(!1),[N,W]=i.useState({top:0,left:0}),q=l({top:0,left:0}),A=!!L.children&&L.children.length>0,F=A&&(void 0===S||x<S);return e(a,Object.assign({onMouseEnter:e=>{F&&(z(!0),(e=>{const t=e.currentTarget.getBoundingClientRect();W({top:t.top,left:t.right}),q.current={top:t.top,left:t.right}})(e))},onMouseLeave:()=>{z(!1)},onClick:e=>{e.stopPropagation(),(()=>{var e;!y||null!==(e=L.disabled)&&void 0!==e&&e||A&&!O||y(L,M)})()},id:"menuItemWrapper",style:{cursor:null!==(C=L.disabled)&&void 0!==C&&C?"not-allowed":"pointer",backgroundColor:null!==(I=L.disabled)&&void 0!==I&&I?s.surface.standard:"transparent"}},{children:[L.customComponent?L.customComponent:e(p,Object.assign({isSelected:L.selected,isSubMenuOpen:R,isHovered:B,isDisabled:null!==(T=L.disabled)&&void 0!==T&&T},{children:[e(u,{children:[L.leadingIcon&&t(h,{children:L.leadingIcon}),e("div",{children:[t(c,Object.assign({style:{color:null!==(k=L.disabled)&&void 0!==k&&k?s.content.inactive:L.selected||B?s.content.positive:s.content.primary}},{children:L.label})),L.subText&&t(d,Object.assign({style:{color:null!==(D=L.disabled)&&void 0!==D&&D?s.content.inactive:L.selected||B?s.content.positive:s.content.secondary,marginTop:"2px"}},{children:L.subText}))]})]}),A?t(m,{children:t(o,{width:16,height:16,color:!F||null!==(P=L.disabled)&&void 0!==P&&P?s.content.inactive:L.selected||B?s.content.positive:s.content.primary})}):L.trailingIcon?t(m,{children:L.trailingIcon}):t(n,{})]})),!(null!==(E=L.disabled)&&void 0!==E&&E)&&L.children&&L.children.length>0&&F&&R&&t(v,Object.assign({width:w,className:"submenu",onMouseEnter:()=>H(!0),onMouseLeave:()=>H(!1)},{children:t(g,Object.assign({width:w,top:N.top,left:N.left},{children:t(b,{children:t(r,Object.assign({fallback:t("div",{children:"Loading..."})},{children:t(f,{width:w,onDropdownItemClick:y,options:L.children,parents:[...M,L],allowParentSelection:O,maxLevels:S,currentLevel:x+1})}))})}))}))]}))};export{j as MenuItem};
|
|
@@ -5,4 +5,8 @@ export declare const MenuList: React.FC<{
|
|
|
5
5
|
onDropdownItemClick?: (option: MultiLevelDropdownOption, parents: MultiLevelDropdownOption[]) => void;
|
|
6
6
|
options: MultiLevelDropdownOption[];
|
|
7
7
|
parents: MultiLevelDropdownOption[];
|
|
8
|
+
allowParentSelection?: boolean;
|
|
9
|
+
maxLevels?: number;
|
|
10
|
+
hideGroupLabel?: boolean;
|
|
11
|
+
currentLevel: number;
|
|
8
12
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{GroupedMenuList as o}from"./GroupedMenuList.js";import{MenuItem as t}from"./MenuItem.js";import{StyledMenuList as n}from"./MultiLevelDropdown.styled.js";const r=r=>{let{width:i,onDropdownItemClick:l,options:p,parents:a,allowParentSelection:m,maxLevels:s,hideGroupLabel:d,currentLevel:c}=r;return e(n,{children:p.map(((n,r)=>"value"in n?e(t,{width:i,onDropdownItemClick:l,option:n,parents:a,allowParentSelection:m,maxLevels:s,currentLevel:c},r):"options"in n&&n.options.length>0?e(o,{width:i,onDropdownItemClick:l,option:n,parents:a,allowParentSelection:m,maxLevels:s,hideGroupLabel:d,currentLevel:c},r):void 0))})};export{r as MenuList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as n}from"react/jsx-runtime";import t,{useState as o,useEffect as r}from"react";import{ZeroState as s}from"../zeroState/ZeroState.js";import{COLORS as i}from"../../constants/Theme.js";import{SearchBox as l}from"../dropdown/OpenedDropdown/components/searchbox/SearchBox.js";import{Floater as c}from"../floater/floater.js";import{MenuList as
|
|
1
|
+
import{jsx as e,jsxs as n}from"react/jsx-runtime";import t,{useState as o,useEffect as r}from"react";import{ZeroState as s}from"../zeroState/ZeroState.js";import{COLORS as i}from"../../constants/Theme.js";import{SearchBox as l}from"../dropdown/OpenedDropdown/components/searchbox/SearchBox.js";import{Floater as c}from"../floater/floater.js";import{MenuList as a}from"./MenuList.js";import{DropdownContainer as d,OptionsContainer as p,NoResultsContainer as u}from"./MultiLevelDropdown.styled.js";const h=h=>{let{options:f,width:m,isSearchable:w,onDropdownItemClick:b,refElement:g,topOffset:j,leftOffset:O,isDropdownOpen:x,onDropdownOutsideClick:L,allowParentSelection:v,maxLevels:y,hideGroupLabel:S}=h;const C=t.useRef(null),[D,k]=o(f),E=e=>{const n=Array.isArray(f)?[...f]:[],t=[];for(;n.length>0;){const o=n.shift();o&&o.label.toLowerCase().includes(e.toLowerCase())&&t.push(o),o&&"children"in o&&o.children?n.push(...o.children):o&&"options"in o&&o.options&&n.push(...o.options)}const o=e=>e.map((e=>{if(t.includes(e))return e;if("children"in e&&e.children){const n=o(e.children);if(n.length>0)return Object.assign(Object.assign({},e),{children:n})}if("options"in e&&e.options){const n=o(e.options);if(n.length>0)return Object.assign(Object.assign({},e),{options:n})}return null})).filter((e=>null!==e));k(o(f))},I=e=>{C.current&&!C.current.contains(e.target)?L&&L(!0):L&&L(!1)};return r((()=>{x&&E("")}),[x]),r((()=>(document.addEventListener("mousedown",I),()=>{document.removeEventListener("mousedown",I)})),[]),r((()=>{k(f)}),[f]),e(c,Object.assign({refElement:g,topOffset:j,leftOffset:O},{children:x&&e("div",Object.assign({ref:C,style:{backgroundColor:i.surface.standard,zIndex:99999,borderRadius:"8px",whiteSpace:"normal"}},{children:n(d,Object.assign({width:m},{children:[w&&e("div",Object.assign({style:{padding:"4px",width:null!=m?m:"200px"}},{children:e(l,{onSearch:E,version:"2.0"})})),e(p,Object.assign({width:m},{children:(null!=D?D:[]).length>0&&e(a,{width:null!=m?m:"200px",onDropdownItemClick:b,options:D,parents:[],allowParentSelection:v,maxLevels:y,hideGroupLabel:S,currentLevel:1})})),0===(null!=D?D:[]).length&&e(u,Object.assign({style:{width:null!=m?m:"200px"}},{children:e(s,{title:"No results found!",subTitle:"Sorry, we are unable to find any results for your search."})}))]}))}))}))};export{h as MultiLevelDropdown};
|
|
@@ -5,6 +5,9 @@ export interface MultiLevelDropdownProps extends FloaterProps {
|
|
|
5
5
|
width?: string;
|
|
6
6
|
isSearchable?: boolean;
|
|
7
7
|
isDropdownOpen?: boolean;
|
|
8
|
+
allowParentSelection?: boolean;
|
|
9
|
+
maxLevels?: number;
|
|
10
|
+
hideGroupLabel?: boolean;
|
|
8
11
|
onDropdownOutsideClick?: (isOutsideClick: any) => void;
|
|
9
12
|
onDropdownItemClick?: (option: MultiLevelDropdownOption, parents: MultiLevelDropdownOption[]) => void;
|
|
10
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as i,jsx as e,Fragment as s}from"react/jsx-runtime";import{useState as l,useEffect as t,useMemo as a}from"react";import{RadioButtonContainer as o,RadioButtonIcon as c}from"./RadioButton.styled.js";import{BodyCaption as
|
|
1
|
+
import{jsxs as i,jsx as e,Fragment as s}from"react/jsx-runtime";import{useState as l,useEffect as t,useMemo as a}from"react";import{RadioButtonContainer as o,RadioButtonIcon as c}from"./RadioButton.styled.js";import{BodyCaption as n,TitleSmall as r,BodySecondary as d,BodyPrimary as b}from"../TypographyStyle.js";import{COLORS as m}from"../../constants/Theme.js";const p=s=>{const l=a((()=>(null==s?void 0:s.activeColor)||m.background.positive.vibrant),[s.activeColor]),t=a((()=>s.isDisabled?m.content.inactive:s.isActive?l:m.content.primary),[s.isDisabled,s.isActive,l]);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:t,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?m.content.inactive:l})]}))},v=a=>{const[v,g]=l(a.isActive||!1),[x,h]=l(!1),[y,S]=l(!1);t((()=>{g(a.isActive)}),[a.isActive]);return i(o,Object.assign({onClick:()=>{var i;if(!a.skipSelectingOff&&!a.isDisabled){const e=!v;g(e),null===(i=a.onValueChange)||void 0===i||i.call(a,e,a.value)}},onMouseEnter:()=>h(!a.skipHoverState),onMouseLeave:()=>h(!1),onMouseDown:()=>S(!a.skipHoverState),onMouseUp:()=>S(!1),style:a.caption?{alignItems:"flex-start"}:{}},{children:[e(c,Object.assign({checked:v,hovered:x,clicked:y,isDisabled:a.isDisabled||!1,size:a.size,style:a.caption?{margin:"2px 0"}:{}},{children:e(p,{isSmall:"SMALL"===a.size,isActive:v,isDisabled:a.isDisabled||!1,activeColor:a.activeColor})})),i("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:a.gapBetweengapBetweenBodyAndCaption||"0px"}},{children:[a.label?a.boldOnChecked&&v||a.alwaysBold?e(r,Object.assign({color:a.isDisabled?m.text.disabled:m.text.primary},{children:a.label})):"SMALL"===a.size?e(n,Object.assign({color:a.isDisabled?m.text.disabled:m.text.primary},{children:a.label})):"MEDIUM"===a.labelSize?e(d,Object.assign({color:a.isDisabled?m.text.disabled:m.text.primary},{children:a.label})):e(b,Object.assign({color:a.isDisabled?m.text.disabled:m.text.primary},{children:a.label})):e(s,{}),a.caption&&e(n,Object.assign({color:a.isDisabled?m.text.disabled:m.text.secondary},{children:a.caption}))]}))]}))};export{v as RadioButton};
|