@bikdotai/bik-component-library 0.0.238 → 0.0.239
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/components/Connectors/Components/InTheLast.d.ts +2 -2
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/InTheLast.js +1 -1
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/InTheLastAgo.d.ts +4 -0
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/InTheLastAgo.js +1 -0
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/InTwoLast.d.ts +4 -0
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/InTwoLast.js +1 -0
- package/dist/cjs/components/QueryBuilder/components/Connectors/Connector.js +1 -1
- package/dist/cjs/components/QueryBuilder/constants/DATE_OPERATORS_OPTIONS.d.ts +2 -0
- package/dist/cjs/components/QueryBuilder/constants/DATE_OPERATORS_OPTIONS.js +1 -0
- package/dist/cjs/components/QueryBuilder/constants/connector.d.ts +14 -6
- package/dist/cjs/components/QueryBuilder/constants/connector.js +1 -1
- package/dist/cjs/components/QueryBuilder/helpers/Connector.helper.d.ts +2 -0
- package/dist/cjs/components/QueryBuilder/helpers/Connector.helper.js +1 -1
- package/dist/cjs/components/QueryBuilder/helpers/MetaCustomProcessor.d.ts +79 -0
- package/dist/cjs/components/QueryBuilder/helpers/OperatorHelperV2.d.ts +7 -0
- package/dist/cjs/components/QueryBuilder/helpers/PropertyCustomProcessor.d.ts +28 -0
- package/dist/cjs/components/QueryBuilder/helpers/SegmentHelperV2.d.ts +140 -0
- package/dist/cjs/components/QueryBuilder/helpers/SegmentValidator.d.ts +75 -0
- package/dist/cjs/components/QueryBuilder/types/QueryBuilderConnector.type.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/types/QueryBuilderOperator.type.d.ts +15 -6
- package/dist/cjs/components/QueryBuilder/types/QueryBuilderOperator.type.js +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
- package/dist/cjs/components/stepper/WorkingStepper.d.ts +1 -0
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTheLast.d.ts +2 -2
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTheLast.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTheLastAgo.d.ts +4 -0
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTheLastAgo.js +1 -0
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTwoLast.d.ts +4 -0
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTwoLast.js +1 -0
- package/dist/esm/components/QueryBuilder/components/Connectors/Connector.js +1 -1
- package/dist/esm/components/QueryBuilder/constants/DATE_OPERATORS_OPTIONS.d.ts +2 -0
- package/dist/esm/components/QueryBuilder/constants/DATE_OPERATORS_OPTIONS.js +1 -0
- package/dist/esm/components/QueryBuilder/constants/connector.d.ts +14 -6
- package/dist/esm/components/QueryBuilder/constants/connector.js +1 -1
- package/dist/esm/components/QueryBuilder/helpers/Connector.helper.d.ts +2 -0
- package/dist/esm/components/QueryBuilder/helpers/Connector.helper.js +1 -1
- package/dist/esm/components/QueryBuilder/helpers/MetaCustomProcessor.d.ts +79 -0
- package/dist/esm/components/QueryBuilder/helpers/OperatorHelperV2.d.ts +7 -0
- package/dist/esm/components/QueryBuilder/helpers/PropertyCustomProcessor.d.ts +28 -0
- package/dist/esm/components/QueryBuilder/helpers/SegmentHelperV2.d.ts +140 -0
- package/dist/esm/components/QueryBuilder/helpers/SegmentValidator.d.ts +75 -0
- package/dist/esm/components/QueryBuilder/types/QueryBuilderConnector.type.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/types/QueryBuilderOperator.type.d.ts +15 -6
- package/dist/esm/components/QueryBuilder/types/QueryBuilderOperator.type.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/esm/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
- package/dist/esm/components/stepper/WorkingStepper.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ConnectorComponentProps } from "../../../types/QueryBuilderConnector.type";
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
3
|
+
declare const InTheLastWrapper: (props: ConnectorComponentProps) => JSX.Element;
|
|
4
|
+
export default InTheLastWrapper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/styled/base"),I=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/styled/base"),I=require("react/jsx-runtime"),g=require("react");require("../../../../dropdown/DropdownPopover/index.js");var d=require("../../../../dropdown/Dropdown.js");require("../../../../zeroState/ZeroState.js"),require("../../../../TypographyStyle.js"),require("../../../../../constants/Theme.js"),require("../../../../dropdown/OpenedDropdown/components/description/Description.styled.js"),require("../../../../checkBox/CheckBox.styled.js"),require("../../../../list-item/ListItem.js"),require("../../../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js"),require("../../../../dropdown/OpenedDropdown/components/menu/MenuItem.js"),require("../../../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js"),require("../../../../button/Button.js"),require("../../../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js"),require("../../../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js");var l=require("../../../../input/Input.js"),c=require("../../../../input/context/InputStyleProvider.js");require("../../../../dropdown/MenuItem/MenuItem.js");var n=require("../../InputLoader.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const s=o(e).default("div","production"===process.env.NODE_ENV?{target:"e18hgh550"}:{target:"e18hgh550",label:"Container"})("production"===process.env.NODE_ENV?{name:"180p6fo",styles:"display:flex;flex-direction:row;gap:12px"}:{name:"180p6fo",styles:"display:flex;flex-direction:row;gap:12px",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkluVGhlTGFzdC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBTzZCIiwiZmlsZSI6IkluVGhlTGFzdC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBqc3ggYXMgX2pzeCwganN4cyBhcyBfanN4cyB9IGZyb20gXCJyZWFjdC9qc3gtcnVudGltZVwiO1xyXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XHJcbmltcG9ydCB7IHVzZUVmZmVjdCwgdXNlU3RhdGUgfSBmcm9tICdyZWFjdCc7XHJcbmltcG9ydCB7IERyb3Bkb3duIH0gZnJvbSBcIi4uLy4uLy4uLy4uL2Ryb3Bkb3duXCI7XHJcbmltcG9ydCB7IElucHV0IH0gZnJvbSBcIi4uLy4uLy4uLy4uL2lucHV0XCI7XHJcbmltcG9ydCB7IElucHV0U3R5bGVDb250ZXh0IH0gZnJvbSBcIi4uLy4uLy4uLy4uL2lucHV0L2NvbnRleHQvSW5wdXRTdHlsZVByb3ZpZGVyXCI7XHJcbmltcG9ydCBJbnB1dExvYWRlciBmcm9tICcuLi8uLi9JbnB1dExvYWRlcic7XHJcbmNvbnN0IENvbnRhaW5lciA9IHN0eWxlZC5kaXYgYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRmbGV4LWRpcmVjdGlvbjogcm93O1xuXHRnYXA6IDEycHg7XG5gO1xyXG5jb25zdCB0aW1lT3B0aW9ucyA9IFtcclxuICAgIHtcclxuICAgICAgICBsYWJlbDogJ2RheShzKScsXHJcbiAgICAgICAgdmF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WJsZWQnIDogJ25vbmUnLCBlcnJvck1lc3NhZ2U6IGVycm9ycyA9PT0gbnVsbCB8fCBlcnJvcnMgPT09IHZvaWQgMCA/IHZvaWQgMCA6IGVycm9ycy52YWwsIHZhbHVlOiBudW0sIG9uQ2hhbmdlVGV4dDogKHRleHQpID0+IG9uQ2hhbmdlID09PSBudWxsIHx8IG9uQ2hhbmdlID09PSB2b2lkIDAgPyB2b2lkIDAgOiBvbkNoYW5nZShbdGV4dCwgdGltZV0pIH0pLCBfanN4KERyb3Bkb3duLCB7IGRpc2FibGVkOiBkaXNhYmxlZCwgcGxhY2VIb2xkZXI6IFwiVGltZVwiLCB3aWR0aDogXCIxMDhweFwiLCBzaXplOiBcInNtYWxsXCIsIG9wdGlvbnM6IG9wdGlvbnMsIG9uU2VsZWN0OiAob3B0aW9uKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlID09PSBudWxsIHx8IG9uQ2hhbmdlID09PSB2b2lkIDAgPyB2b2lkIDAgOiBvbkNoYW5nZShbbnVtLCBvcHRpb24udmFsdWVdKTtcclxuICAgICAgICAgICAgICAgICAgICB9IH0pXSB9KSB9KSkpO1xyXG59O1xyXG5jb25zdCBJblRoZUxhc3RXcmFwcGVyID0gKHByb3BzKSA9PiAoX2pzeChJblRoZUxhc3QsIE9iamVjdC5hc3NpZ24oe30sIHByb3BzKSkpO1xyXG5leHBvcnQgZGVmYXVsdCBJblRoZUxhc3RXcmFwcGVyO1xyXG4vLyMgc291cmNlTWFwcGluZ1VSTD1JblRoZUxhc3QuanMubWFwIl19 */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}),u=[{label:"day(s)",value:"days"},{label:"minute(s)",value:"minutes"},{label:"hour(s)",value:"hours"}],i=e=>{let{val:o,onChange:i,errors:t,isLoading:C,disabled:b}=e;var r,A;const[B,p]=g.useState(u),a=null!==(r=null==o?void 0:o[1])&&void 0!==r?r:"days",y=null!==(A=null==o?void 0:o[0])&&void 0!==A?A:"1";return g.useEffect((()=>{var e;const I=null!==(e=null==o?void 0:o[1])&&void 0!==e?e:"days";p((e=>e.map((e=>Object.assign(Object.assign({},e),{selected:I===e.value})))))}),[o]),g.useEffect((()=>{var e;if(void 0===(null==o?void 0:o[0])){const I=null!==(e=null==o?void 0:o[1])&&void 0!==e?e:"days";null==i||i(["1",I])}}),[]),C?I.jsx("div",Object.assign({style:{width:200}},{children:I.jsx(n.default,{containerStyle:{padding:"5px 8px"}})})):I.jsx(c.InputStyleContext.Provider,Object.assign({value:{InputWrapper:{width:104}}},{children:I.jsxs(s,{children:[I.jsx(l.Input,{type:"number",variant:"small",state:b?"disabled":"none",errorMessage:null==t?void 0:t.val,value:y,onChangeText:e=>null==i?void 0:i([e,a])}),I.jsx(d.Dropdown,{disabled:b,placeHolder:"Time",width:"108px",size:"small",options:B,onSelect:e=>{null==i||i([y,e.value])}})]})}))};exports.default=e=>I.jsx(i,Object.assign({},e));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../../../TypographyStyle.js"),r=require("./InTheLast.js");const t=t=>e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:12,alignItems:"center"}},{children:[e.jsx(r.default,Object.assign({},t)),e.jsx(s.BodySecondary,{children:"Ago"})]}));exports.default=s=>e.jsx(t,Object.assign({},s));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var I=require("@emotion/styled/base"),g=require("react/jsx-runtime"),C=require("react");require("../../../../dropdown/DropdownPopover/index.js");var e=require("../../../../dropdown/Dropdown.js");require("../../../../zeroState/ZeroState.js");var d=require("../../../../TypographyStyle.js");require("../../../../../constants/Theme.js"),require("../../../../dropdown/OpenedDropdown/components/description/Description.styled.js"),require("../../../../checkBox/CheckBox.styled.js"),require("../../../../list-item/ListItem.js"),require("../../../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js"),require("../../../../dropdown/OpenedDropdown/components/menu/MenuItem.js"),require("../../../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js"),require("../../../../button/Button.js"),require("../../../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js"),require("../../../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js");var A=require("../../../../input/Input.js"),l=require("../../../../input/context/InputStyleProvider.js");require("../../../../dropdown/MenuItem/MenuItem.js");var c=require("../../InputLoader.js");function n(I){return I&&"object"==typeof I&&"default"in I?I:{default:I}}const i=n(I).default("div","production"===process.env.NODE_ENV?{target:"eqv4pu00"}:{target:"eqv4pu00",label:"Container"})("production"===process.env.NODE_ENV?{name:"1d5jh9x",styles:"display:flex;flex-direction:row;gap:12px;align-items:center"}:{name:"1d5jh9x",styles:"display:flex;flex-direction:row;gap:12px;align-items:center",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkluVHdvTGFzdC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBUTZCIiwiZmlsZSI6IkluVHdvTGFzdC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBqc3ggYXMgX2pzeCwganN4cyBhcyBfanN4cyB9IGZyb20gXCJyZWFjdC9qc3gtcnVudGltZVwiO1xyXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XHJcbmltcG9ydCB7IHVzZUVmZmVjdCwgdXNlU3RhdGUgfSBmcm9tICdyZWFjdCc7XHJcbmltcG9ydCB7IERyb3Bkb3duIH0gZnJvbSBcIi4uLy4uLy4uLy4uL2Ryb3Bkb3duXCI7XHJcbmltcG9ydCB7IElucHV0IH0gZnJvbSBcIi4uLy4uLy4uLy4uL2lucHV0XCI7XHJcbmltcG9ydCB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ICAgICAgICAgICAgICAgICAgb2Zmc2V0LFxyXG4gICAgICAgICAgICAgICAgICAgIH0pIH0pLCBfanN4KERyb3Bkb3duLCB7IGRpc2FibGVkOiBkaXNhYmxlZCwgcGxhY2VIb2xkZXI6IFwiVGltZVwiLCB3aWR0aDogXCIxMDhweFwiLCBzaXplOiBcInNtYWxsXCIsIG9wdGlvbnM6IG9wdGlvbnMsIG9uU2VsZWN0OiAob3B0aW9uKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlID09PSBudWxsIHx8IG9uQ2hhbmdlID09PSB2b2lkIDAgPyB2b2lkIDAgOiBvbkNoYW5nZSh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBvcHRpb24udmFsdWUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGFydCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9mZnNldCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSB9KV0gfSkgfSkpKTtcclxufTtcclxuLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9iYW4tdHMtY29tbWVudFxyXG4vLyBAdHMtaWdub3JlXHJcbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSByZWFjdC9kaXNwbGF5LW5hbWVcclxuZXhwb3J0IGRlZmF1bHQgKHByb3BzKSA9PiBfanN4KEluVHdvTGFzdCwgT2JqZWN0LmFzc2lnbih7fSwgcHJvcHMpKTtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9SW5Ud29MYXN0LmpzLm1hcCJdfQ== */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}),t=[{label:"day(s)",value:"days"},{label:"minute(s)",value:"minutes"},{label:"hour(s)",value:"hours"}],b=I=>{let{val:n,onChange:b,errors:s,isLoading:o,disabled:u}=I;var B,a,r;const[y,X]=C.useState(t),m=null!==(B=null==n?void 0:n.type)&&void 0!==B?B:"days",p=null!==(a=null==n?void 0:n.start)&&void 0!==a?a:"1",Z=null!==(r=null==n?void 0:n.offset)&&void 0!==r?r:"2";return C.useEffect((()=>{var I;const g=null!==(I=null==n?void 0:n.type)&&void 0!==I?I:"days";X((I=>I.map((I=>Object.assign(Object.assign({},I),{selected:g===I.value})))))}),[n]),C.useEffect((()=>{var I,g,C;if(void 0===(null==n?void 0:n.start)){const e=null!==(I=null==n?void 0:n.type)&&void 0!==I?I:"days",d=null!==(g=null==n?void 0:n.start)&&void 0!==g?g:"1",A=null!==(C=null==n?void 0:n.offset)&&void 0!==C?C:"2";null==b||b({type:e,start:d,offset:A})}}),[]),o?g.jsx("div",Object.assign({style:{width:200}},{children:g.jsx(c.default,{containerStyle:{padding:"5px 8px"}})})):g.jsx(l.InputStyleContext.Provider,Object.assign({value:{InputWrapper:{width:104}}},{children:g.jsxs(i,{children:[g.jsx(A.Input,{type:"number",variant:"small",state:u?"disabled":"none",errorMessage:null==s?void 0:s.val,value:Z.toString(),onChangeText:I=>null==b?void 0:b({type:m,start:p,offset:I})}),g.jsx("div",{children:g.jsx(d.BodySecondary,{children:"to"})}),g.jsx(A.Input,{type:"number",variant:"small",state:u?"disabled":"none",errorMessage:null==s?void 0:s.val,value:p.toString(),onChangeText:I=>null==b?void 0:b({type:m,start:I,offset:Z})}),g.jsx(e.Dropdown,{disabled:u,placeHolder:"Time",width:"108px",size:"small",options:y,onSelect:I=>{null==b||b({type:I.value,start:p,offset:Z})}})]})}))};exports.default=I=>g.jsx(b,Object.assign({},I));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),n=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),n=require("../../constants/connectorPosition.js"),t=require("../../helpers/Connector.helper.js"),o=require("../../types/QueryBuilder.type.js"),i=require("../DropdownWrapper.js"),l=require("./Components/EmojiPicker.js"),s=require("./Components/FreeText.js"),u=require("./Components/FrequencyIntegerPositiveSingle.js"),a=require("./Components/IgPicker.js"),d=require("./Components/IntegerPositiveSingle.js"),p=require("./Components/IntegerSingleValue.js"),c=require("./Components/InTheLast.js"),g=require("./Components/InTheLastAgo.js"),j=require("./Components/InTwoLast.js"),m=require("./Components/MultiselectDropdownFreeText.js"),C=require("./Components/NoInput.js"),q=require("./Components/NumberTime.js"),f=require("./Components/SingleDate.js"),S=require("./Components/SingleselectDropdownFreeText.js"),v=require("./Components/StringSingleValue.js"),I=require("./Components/TwoDate.js"),T=require("./Components/TwoNumberInputsSeperatedByAnd.js"),P=require("./Connector.styled.js");const y={FreeText:s.default,IntegerPositiveSingle:d.default,IntegerSingleValue:p.default,StringSingleValue:v.default,MultiselectDropdownFreeText:m.default,SingleselectDropdownFreeText:S.default,NoInput:C.default,SingleDate:f.default,TwoNumberInputsSeperatedByAnd:T.default,FrequencyIntegerPositiveSingle:u.default,TwoDate:I.default,NumberTime:q.default,PostIgPicker:a.PostIgPicker,ReelIgPicker:a.ReelIgPicker,StoryIgPicker:a.StoryIgPicker,EmojiPicker:l.default,InTheLast:c.default,InTwoLast:j.default,InTheLastAgo:g.default};exports.default=l=>{let{isLoading:s,noDefault:u,connectorType:a,defaultConnector:d,onOperatorChange:p,onValueChange:c,connectorVal:g,extra:j,errors:m,disabled:C,onSearch:q}=l;var f,S,v;const[I,T]=r.useState(null),[h,w]=r.useState(!1),x=t.ConnectorHelper.getDropdownOptionFromDataType(a,d);function D(e){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];w(!0);const n=t.ConnectorHelper.getConnectorComponent(a,e.value);void 0!==n?a===o.QueryBuilderConnectorType.frequency&&"IntegerPositiveSingle"===n?T("FrequencyIntegerPositiveSingle"):T(n):T(null),r||p(e.value),setTimeout((()=>{w(!1)}),5)}return r.useEffect((()=>{u||(d?D({value:d,label:d},!0):(null==x?void 0:x[0])&&D(x[0]))}),[d]),e.jsxs(P.Container,{children:[e.jsx("div",{children:!(null===(f=null===n.disableOperatorDropdown||void 0===n.disableOperatorDropdown?void 0:n.disableOperatorDropdown[a])||void 0===f?void 0:f[d])&&e.jsx(i.default,{isSearchable:!0,disabled:C,width:"200px",isLoading:h,options:x,defaultOption:null===(S=x.filter((e=>e.selected)))||void 0===S?void 0:S[0],onSelect:D})}),null!==I&&!h&&(null===(v=y[I])||void 0===v?void 0:v.call(y,{disabled:C,val:g,onChange:c,extra:j,errors:m,isLoading:s,onSearch:q}))]})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.DATE_OPERATORS_OPTIONS=[{label:"Commonly used",options:[{selected:!1,value:"today",label:"Today"},{selected:!1,value:"yesterday",label:"Yesterday"},{selected:!1,value:"last 7 days",label:"Last 7 days"},{selected:!1,value:"last 30 days",label:"Last 30 days"},{selected:!1,value:"this week",label:"This week"},{selected:!1,value:"last week",label:"Last week"},{selected:!1,value:"this month",label:"This month"},{selected:!0,value:"last month",label:"Last month"}]},{label:"Relative",options:[{selected:!1,value:"exactly",label:"Exactly"},{selected:!1,value:"in the last",label:"In the last"},{selected:!1,value:"in between last",label:"In between last"}]},{label:"Absolute",options:[{selected:!1,value:"on",label:"On"},{selected:!1,value:"notOn",label:"Not On"},{selected:!1,value:"inBetween",label:"In Between"},{selected:!1,value:"notInBetween",label:"Not In Between"},{selected:!1,value:"before",label:"Before"},{selected:!1,value:"after",label:"After"}]}];
|
|
@@ -20,7 +20,9 @@ export declare enum CONNECTOR_VALUE_COMPONENT_TYPES {
|
|
|
20
20
|
ReelIgPicker = "ReelIgPicker",
|
|
21
21
|
StoryIgPicker = "StoryIgPicker",
|
|
22
22
|
EmojiPicker = "EmojiPicker",
|
|
23
|
-
InTheLast = "InTheLast"
|
|
23
|
+
InTheLast = "InTheLast",
|
|
24
|
+
InTwoLast = "InTwoLast",
|
|
25
|
+
InTheLastAgo = "InTheLastAgo"
|
|
24
26
|
}
|
|
25
27
|
export declare const INTEGER_OPERATORS_COMPONENT: {
|
|
26
28
|
is: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
@@ -59,18 +61,24 @@ export declare const REACTION_OPERATORS_COMPONENT: {
|
|
|
59
61
|
contains: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
60
62
|
};
|
|
61
63
|
export declare const DATE_OPERATORS_COMPONENT: {
|
|
64
|
+
today: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
65
|
+
yesterday: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
66
|
+
"last 30 days": CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
67
|
+
"last 7 days": CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
68
|
+
"this month": CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
69
|
+
"this week": CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
70
|
+
"last month": CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
71
|
+
"last week": CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
72
|
+
exactly: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
73
|
+
"in the last": CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
74
|
+
"in between last": CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
62
75
|
on: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
63
76
|
notOn: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
64
77
|
inBetween: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
65
78
|
notInBetween: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
66
79
|
before: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
67
80
|
after: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
68
|
-
today: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
69
|
-
yesterday: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
70
|
-
"last week": CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
71
|
-
"last month": CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
72
81
|
"last quarter": CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
73
|
-
"in the last": CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
74
82
|
};
|
|
75
83
|
export declare const SPECIFIC_IG_POST_OPERATORS_COMPONENT: {
|
|
76
84
|
in: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var O=require("../types/QueryBuilder.type.js"),e=require("../types/QueryBuilderOperator.type.js");const E={[O.QueryBuilderConnectorType.boolean]:e.BOOLEAN_OPERATORS,[O.QueryBuilderConnectorType.string]:e.STRING_OPERATORS,[O.QueryBuilderConnectorType.integer]:e.INTEGER_OPERATORS,[O.QueryBuilderConnectorType.frequency]:e.FREQUENCY_OPERATORS,[O.QueryBuilderConnectorType.date]:e.DATE_OPERATORS,[O.QueryBuilderConnectorType.specificPost]:e.SPECIFIC_IG_OPERATORS,[O.QueryBuilderConnectorType.specificReel]:e.SPECIFIC_IG_OPERATORS,[O.QueryBuilderConnectorType.specificStory]:e.SPECIFIC_IG_OPERATORS,[O.QueryBuilderConnectorType.anyIg]:e.ANY_IG_OPERATORS,[O.QueryBuilderConnectorType.reaction]:e.REACTION_OPERATORS,[O.QueryBuilderConnectorType.activityString]:e.IG_STRING_OPERATORS,[O.QueryBuilderConnectorType.anyAd]:e.ANY_AD_OPERATORS,[O.QueryBuilderConnectorType.specificAd]:e.AD_STRING_OPERATORS,[O.QueryBuilderConnectorType.iceBreaker]:e.ICE_BREAKER_OPERATORS};var T;exports.CONNECTOR_VALUE_COMPONENT_TYPES=void 0,(T=exports.CONNECTOR_VALUE_COMPONENT_TYPES||(exports.CONNECTOR_VALUE_COMPONENT_TYPES={})).FreeText="FreeText",T.NoInput="NoInput",T.IntegerSingleValue="IntegerSingleValue",T.StringSingleValue="StringSingleValue",T.TwoNumberInputsSeperatedByAnd="TwoNumberInputsSeperatedByAnd",T.MultiselectDropdownFreeText="MultiselectDropdownFreeText",T.SingleselectDropdownFreeText="SingleselectDropdownFreeText",T.SingleDate="SingleDate",T.TwoDate="TwoDate",T.IntegerPositiveSingle="IntegerPositiveSingle",T.NumberTime="NumberTime",T.PostIgPicker="PostIgPicker",T.ReelIgPicker="ReelIgPicker",T.StoryIgPicker="StoryIgPicker",T.EmojiPicker="EmojiPicker",T.InTheLast="InTheLast",T.InTwoLast="InTwoLast",T.InTheLastAgo="InTheLastAgo";const N={[e.INTEGER_OPERATORS.is]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[e.INTEGER_OPERATORS.isNot]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[e.INTEGER_OPERATORS.exists]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[e.INTEGER_OPERATORS.doesntExist]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[e.INTEGER_OPERATORS.lessThan]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.IntegerSingleValue,[e.INTEGER_OPERATORS.lessThanOrEqualTo]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.IntegerSingleValue,[e.INTEGER_OPERATORS.greaterThan]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.IntegerSingleValue,[e.INTEGER_OPERATORS.greaterThanOrEqualTo]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.IntegerSingleValue},_={[e.STRING_OPERATORS.is]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.MultiselectDropdownFreeText,[e.STRING_OPERATORS.isNot]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.MultiselectDropdownFreeText,[e.STRING_OPERATORS.contains]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[e.STRING_OPERATORS.doesntContain]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[e.STRING_OPERATORS.startsWith]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[e.STRING_OPERATORS.endsWith]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[e.STRING_OPERATORS.exists]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[e.STRING_OPERATORS.doesntExist]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput},t={[e.IG_STRING_OPERATORS.any]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[e.IG_STRING_OPERATORS.is]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.MultiselectDropdownFreeText,[e.IG_STRING_OPERATORS.contains]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[e.IG_STRING_OPERATORS.startsWith]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[e.IG_STRING_OPERATORS.endsWith]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText},R={[e.AD_STRING_OPERATORS.is]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.SingleselectDropdownFreeText},r={[e.ICE_BREAKER_OPERATORS.is]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.MultiselectDropdownFreeText},C={[e.REACTION_OPERATORS.contains]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.EmojiPicker},P={[e.DATE_OPERATORS.today]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[e.DATE_OPERATORS.yesterday]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[e.DATE_OPERATORS["last 30 days"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[e.DATE_OPERATORS["last 7 days"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[e.DATE_OPERATORS["this month"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[e.DATE_OPERATORS["this week"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[e.DATE_OPERATORS["last month"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[e.DATE_OPERATORS["last week"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[e.DATE_OPERATORS.exactly]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.InTheLastAgo,[e.DATE_OPERATORS["in the last"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.InTheLast,[e.DATE_OPERATORS["in between last"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.InTwoLast,[e.DATE_OPERATORS.on]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.SingleDate,[e.DATE_OPERATORS.notOn]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.SingleDate,[e.DATE_OPERATORS.inBetween]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.TwoDate,[e.DATE_OPERATORS.notInBetween]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.TwoDate,[e.DATE_OPERATORS.before]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.SingleDate,[e.DATE_OPERATORS.after]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.SingleDate,[e.DATE_OPERATORS.today]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[e.DATE_OPERATORS.yesterday]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[e.DATE_OPERATORS["last week"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[e.DATE_OPERATORS["last month"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[e.DATE_OPERATORS["last quarter"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[e.DATE_OPERATORS["in the last"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.InTheLast},o={[e.SPECIFIC_IG_OPERATORS.in]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.PostIgPicker},S={[e.SPECIFIC_IG_OPERATORS.in]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.ReelIgPicker},A={[e.SPECIFIC_IG_OPERATORS.in]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.StoryIgPicker},n={[e.ANY_IG_OPERATORS.in]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput},s={[e.ANY_AD_OPERATORS.in]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput},p={[e.BOOLEAN_OPERATORS.isTrue]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[e.BOOLEAN_OPERATORS.isFalse]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[e.BOOLEAN_OPERATORS.exists]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[e.BOOLEAN_OPERATORS.doesntExist]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput},i={[e.FREQUENCY_OPERATORS.exactly]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.IntegerPositiveSingle,[e.FREQUENCY_OPERATORS.atleast]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.IntegerPositiveSingle,[e.FREQUENCY_OPERATORS.atMost]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.IntegerPositiveSingle},I={[O.QueryBuilderConnectorType.boolean]:p,[O.QueryBuilderConnectorType.string]:_,[O.QueryBuilderConnectorType.integer]:N,[O.QueryBuilderConnectorType.frequency]:i,[O.QueryBuilderConnectorType.date]:P,[O.QueryBuilderConnectorType.specificPost]:o,[O.QueryBuilderConnectorType.specificReel]:S,[O.QueryBuilderConnectorType.specificStory]:A,[O.QueryBuilderConnectorType.anyIg]:n,[O.QueryBuilderConnectorType.reaction]:C,[O.QueryBuilderConnectorType.activityString]:t,[O.QueryBuilderConnectorType.anyAd]:s,[O.QueryBuilderConnectorType.specificAd]:R,[O.QueryBuilderConnectorType.iceBreaker]:r};exports.AD_STRING_OPERATORS_COMPONENT=R,exports.ANY_AD_OPERATORS_COMPONENT=s,exports.ANY_IG_OPERATORS_COMPONENT=n,exports.BOOLEAN_OPERATORS_COMPONENT=p,exports.CONNECTOR_TYPE_TO_COMPONENT_MAP=I,exports.CONNECTOR_TYPE_TO_OPERATORS=E,exports.DATE_OPERATORS_COMPONENT=P,exports.FREQUENCY_OPERATORS_COMPONENT=i,exports.ICE_BREAKER_OPERATORS_COMPONENT=r,exports.IG_STRING_OPERATORS_COMPONENT=t,exports.INTEGER_OPERATORS_COMPONENT=N,exports.REACTION_OPERATORS_COMPONENT=C,exports.SPECIFIC_IG_POST_OPERATORS_COMPONENT=o,exports.SPECIFIC_IG_REEL_OPERATORS_COMPONENT=S,exports.SPECIFIC_IG_STORY_OPERATORS_COMPONENT=A,exports.STRING_OPERATORS_COMPONENT=_;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { DropdownOption } from "../../dropdown/type";
|
|
1
2
|
import { QueryBuilderConnectorType } from '../types/QueryBuilder.type';
|
|
2
3
|
import { CONNECTOR_OPERATORS } from '../types/QueryBuilderOperator.type';
|
|
3
4
|
export declare class ConnectorHelper {
|
|
4
5
|
static getConnectorType(datatype: QueryBuilderConnectorType): string[];
|
|
5
6
|
static getConnectorComponent(dataType: QueryBuilderConnectorType, connectorType: CONNECTOR_OPERATORS): "FreeText" | "NoInput" | "IntegerSingleValue" | "StringSingleValue" | "TwoNumberInputsSeperatedByAnd" | "MultiselectDropdownFreeText" | "SingleselectDropdownFreeText" | "SingleDate" | "TwoDate" | "IntegerPositiveSingle" | "NumberTime" | null;
|
|
7
|
+
static getDropdownOptionFromDataType(datatype: QueryBuilderConnectorType, defaultConnector: CONNECTOR_OPERATORS | undefined): DropdownOption[];
|
|
6
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../constants/connector.js");exports.ConnectorHelper=class{static getConnectorType(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../utils/unCamelCase.js"),t=require("../constants/connector.js"),s=require("../constants/DATE_OPERATORS_OPTIONS.js"),r=require("../types/QueryBuilder.type.js");exports.ConnectorHelper=class{static getConnectorType(e){const s=t.CONNECTOR_TYPE_TO_OPERATORS[e];return s?Object.keys(s):[]}static getConnectorComponent(e,s){if(t.CONNECTOR_TYPE_TO_OPERATORS[e]){return t.CONNECTOR_TYPE_TO_COMPONENT_MAP[e][s]}return null}static getDropdownOptionFromDataType(t,n){const o=this.getConnectorType(t);return t===r.QueryBuilderConnectorType.date?s.DATE_OPERATORS_OPTIONS.map((e=>Object.assign(Object.assign({},e),{options:e.options.map((e=>Object.assign(Object.assign({},e),{selected:e.value===n})))}))):o.map((t=>({selected:t===n,value:t,label:e.unCamelCaseWithFirstUppercase(t)})))}};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { DATE_OPERATORS } from '../types';
|
|
2
|
+
import { QueryBuilderMeta } from '../types/QueryBuilder.type';
|
|
3
|
+
export declare const lastDaysRegexPattern: RegExp;
|
|
4
|
+
export declare const notLastDaysRegexPattern: RegExp;
|
|
5
|
+
export declare const inBetweenLast: RegExp;
|
|
6
|
+
export declare const notInBetweenLast: RegExp;
|
|
7
|
+
export declare const exactly: RegExp;
|
|
8
|
+
export declare const notExactly: RegExp;
|
|
9
|
+
export declare class MetaCustomProcessor {
|
|
10
|
+
prepareDateMeta(meta: QueryBuilderMeta): QueryBuilderMeta | {
|
|
11
|
+
value: {
|
|
12
|
+
operator: string;
|
|
13
|
+
value: any[];
|
|
14
|
+
dataType: import("../types").QueryBuilderConnectorType;
|
|
15
|
+
};
|
|
16
|
+
key: string;
|
|
17
|
+
refresh?: boolean | undefined;
|
|
18
|
+
error: {
|
|
19
|
+
key?: string | undefined;
|
|
20
|
+
value?: string | import("../types").ConnectorError | undefined;
|
|
21
|
+
};
|
|
22
|
+
} | {
|
|
23
|
+
value: {
|
|
24
|
+
operator: string;
|
|
25
|
+
value: any[];
|
|
26
|
+
offset: any[];
|
|
27
|
+
dataType: import("../types").QueryBuilderConnectorType;
|
|
28
|
+
};
|
|
29
|
+
key: string;
|
|
30
|
+
refresh?: boolean | undefined;
|
|
31
|
+
error: {
|
|
32
|
+
key?: string | undefined;
|
|
33
|
+
value?: string | import("../types").ConnectorError | undefined;
|
|
34
|
+
};
|
|
35
|
+
} | {
|
|
36
|
+
value: {
|
|
37
|
+
operator: string;
|
|
38
|
+
dataType: import("../types").QueryBuilderConnectorType;
|
|
39
|
+
value?: string | number | string[] | number[] | Date | Date[] | undefined;
|
|
40
|
+
};
|
|
41
|
+
key: string;
|
|
42
|
+
refresh?: boolean | undefined;
|
|
43
|
+
error: {
|
|
44
|
+
key?: string | undefined;
|
|
45
|
+
value?: string | import("../types").ConnectorError | undefined;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
/** @edit */
|
|
49
|
+
normalizeDateMeta(meta: QueryBuilderMeta): QueryBuilderMeta | {
|
|
50
|
+
value: {
|
|
51
|
+
operator: DATE_OPERATORS;
|
|
52
|
+
value: {
|
|
53
|
+
type: string | undefined;
|
|
54
|
+
start: any;
|
|
55
|
+
/** @ts-ignore offset-start is BE only type, happens in type-less way */
|
|
56
|
+
offset: any;
|
|
57
|
+
};
|
|
58
|
+
dataType: import("../types").QueryBuilderConnectorType;
|
|
59
|
+
};
|
|
60
|
+
key: string;
|
|
61
|
+
refresh?: boolean | undefined;
|
|
62
|
+
error: {
|
|
63
|
+
key?: string | undefined;
|
|
64
|
+
value?: string | import("../types").ConnectorError | undefined;
|
|
65
|
+
};
|
|
66
|
+
} | {
|
|
67
|
+
value: {
|
|
68
|
+
value: any[];
|
|
69
|
+
operator: DATE_OPERATORS;
|
|
70
|
+
dataType: import("../types").QueryBuilderConnectorType;
|
|
71
|
+
};
|
|
72
|
+
key: string;
|
|
73
|
+
refresh?: boolean | undefined;
|
|
74
|
+
error: {
|
|
75
|
+
key?: string | undefined;
|
|
76
|
+
value?: string | import("../types").ConnectorError | undefined;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseQueryBuilderNode, QueryBuilderProperty } from '../types/QueryBuilder.type';
|
|
2
|
+
export declare class OperatorHelperV2 {
|
|
3
|
+
convertBetweenOperator(property: QueryBuilderProperty): QueryBuilderProperty | QueryBuilderProperty[];
|
|
4
|
+
convertNotBetweenOperator(property: QueryBuilderProperty): QueryBuilderProperty | QueryBuilderProperty[];
|
|
5
|
+
/** @unused */
|
|
6
|
+
breakUserPropertyNodeBasedOperator(userPropertyNode: BaseQueryBuilderNode): BaseQueryBuilderNode | BaseQueryBuilderNode[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { QueryBuilderProperty } from '../types/QueryBuilder.type';
|
|
2
|
+
export declare class PropertyCustomProcessor {
|
|
3
|
+
/** @unused */
|
|
4
|
+
prepareBetween(property: QueryBuilderProperty): QueryBuilderProperty | QueryBuilderProperty[];
|
|
5
|
+
prepareBoolean(property: QueryBuilderProperty): QueryBuilderProperty;
|
|
6
|
+
prepareDate(property: QueryBuilderProperty): QueryBuilderProperty;
|
|
7
|
+
prepareInteger(property: QueryBuilderProperty): {
|
|
8
|
+
_id: string;
|
|
9
|
+
name?: string | number | undefined;
|
|
10
|
+
dataType?: import("../types/QueryBuilder.type").QueryBuilderConnectorType | undefined;
|
|
11
|
+
operator?: import("..").CONNECTOR_OPERATORS | undefined;
|
|
12
|
+
value?: import("..").CONNECTOR_VALUE_TYPE;
|
|
13
|
+
_refresh?: boolean | undefined;
|
|
14
|
+
error: {
|
|
15
|
+
name?: string | undefined;
|
|
16
|
+
dataType?: string | undefined;
|
|
17
|
+
operator?: string | undefined;
|
|
18
|
+
value?: string | undefined;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
prepareIsAndIsNot(property: QueryBuilderProperty): QueryBuilderProperty;
|
|
22
|
+
/** @edit */
|
|
23
|
+
normalizeIsAndIsNotOperator(property: QueryBuilderProperty): QueryBuilderProperty;
|
|
24
|
+
/** @edit */
|
|
25
|
+
normalizeBoolean(property: QueryBuilderProperty): QueryBuilderProperty;
|
|
26
|
+
/** @edit */
|
|
27
|
+
normalizeInteger(property: QueryBuilderProperty): QueryBuilderProperty;
|
|
28
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { QueryBuilderMeta, QueryBuilderRoot } from '../types';
|
|
2
|
+
import { QueryBuilderType } from '../types/QueryBuilder.type';
|
|
3
|
+
type SegmentBuilder = {
|
|
4
|
+
exclude?: QueryBuilderRoot;
|
|
5
|
+
include: QueryBuilderRoot;
|
|
6
|
+
name?: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* @frontend
|
|
10
|
+
*/
|
|
11
|
+
export declare class SegmentHelperV2 {
|
|
12
|
+
private prepareNode;
|
|
13
|
+
prepare(v2: SegmentBuilder): SegmentBuilder;
|
|
14
|
+
private editNode;
|
|
15
|
+
edit(v2: SegmentBuilder): {
|
|
16
|
+
name: string | undefined;
|
|
17
|
+
include: {
|
|
18
|
+
nodes: {
|
|
19
|
+
metas: (QueryBuilderMeta | {
|
|
20
|
+
value: {
|
|
21
|
+
operator: import("../types").DATE_OPERATORS;
|
|
22
|
+
value: {
|
|
23
|
+
type: string | undefined;
|
|
24
|
+
start: any;
|
|
25
|
+
offset: any;
|
|
26
|
+
};
|
|
27
|
+
dataType: import("../types").QueryBuilderConnectorType;
|
|
28
|
+
};
|
|
29
|
+
key: string;
|
|
30
|
+
refresh?: boolean | undefined;
|
|
31
|
+
error: {
|
|
32
|
+
key?: string | undefined;
|
|
33
|
+
value?: string | import("../types").ConnectorError | undefined;
|
|
34
|
+
};
|
|
35
|
+
} | {
|
|
36
|
+
value: {
|
|
37
|
+
value: any[];
|
|
38
|
+
operator: import("../types").DATE_OPERATORS;
|
|
39
|
+
dataType: import("../types").QueryBuilderConnectorType;
|
|
40
|
+
};
|
|
41
|
+
key: string;
|
|
42
|
+
refresh?: boolean | undefined;
|
|
43
|
+
error: {
|
|
44
|
+
key?: string | undefined;
|
|
45
|
+
value?: string | import("../types").ConnectorError | undefined;
|
|
46
|
+
};
|
|
47
|
+
})[];
|
|
48
|
+
properties: import("../types").QueryBuilderPropertyType[];
|
|
49
|
+
_id: string;
|
|
50
|
+
type: QueryBuilderType;
|
|
51
|
+
isExclude?: boolean | undefined;
|
|
52
|
+
PropertyOperator?: import("../types").QueryBuilderJoinOperators | undefined;
|
|
53
|
+
}[];
|
|
54
|
+
operator: import("../types").QueryBuilderJoinOperators | undefined;
|
|
55
|
+
};
|
|
56
|
+
exclude: {
|
|
57
|
+
nodes: {
|
|
58
|
+
metas: (QueryBuilderMeta | {
|
|
59
|
+
value: {
|
|
60
|
+
operator: import("../types").DATE_OPERATORS;
|
|
61
|
+
value: {
|
|
62
|
+
type: string | undefined;
|
|
63
|
+
start: any;
|
|
64
|
+
offset: any;
|
|
65
|
+
};
|
|
66
|
+
dataType: import("../types").QueryBuilderConnectorType;
|
|
67
|
+
};
|
|
68
|
+
key: string;
|
|
69
|
+
refresh?: boolean | undefined;
|
|
70
|
+
error: {
|
|
71
|
+
key?: string | undefined;
|
|
72
|
+
value?: string | import("../types").ConnectorError | undefined;
|
|
73
|
+
};
|
|
74
|
+
} | {
|
|
75
|
+
value: {
|
|
76
|
+
value: any[];
|
|
77
|
+
operator: import("../types").DATE_OPERATORS;
|
|
78
|
+
dataType: import("../types").QueryBuilderConnectorType;
|
|
79
|
+
};
|
|
80
|
+
key: string;
|
|
81
|
+
refresh?: boolean | undefined;
|
|
82
|
+
error: {
|
|
83
|
+
key?: string | undefined;
|
|
84
|
+
value?: string | import("../types").ConnectorError | undefined;
|
|
85
|
+
};
|
|
86
|
+
})[];
|
|
87
|
+
properties: import("../types").QueryBuilderPropertyType[];
|
|
88
|
+
_id: string;
|
|
89
|
+
type: QueryBuilderType;
|
|
90
|
+
isExclude?: boolean | undefined;
|
|
91
|
+
PropertyOperator?: import("../types").QueryBuilderJoinOperators | undefined;
|
|
92
|
+
}[];
|
|
93
|
+
operator: import("../types").QueryBuilderJoinOperators | undefined;
|
|
94
|
+
};
|
|
95
|
+
} | {
|
|
96
|
+
name: string | undefined;
|
|
97
|
+
include: {
|
|
98
|
+
nodes: {
|
|
99
|
+
metas: (QueryBuilderMeta | {
|
|
100
|
+
value: {
|
|
101
|
+
operator: import("../types").DATE_OPERATORS;
|
|
102
|
+
value: {
|
|
103
|
+
type: string | undefined;
|
|
104
|
+
start: any;
|
|
105
|
+
offset: any;
|
|
106
|
+
};
|
|
107
|
+
dataType: import("../types").QueryBuilderConnectorType;
|
|
108
|
+
};
|
|
109
|
+
key: string;
|
|
110
|
+
refresh?: boolean | undefined;
|
|
111
|
+
error: {
|
|
112
|
+
key?: string | undefined;
|
|
113
|
+
value?: string | import("../types").ConnectorError | undefined;
|
|
114
|
+
};
|
|
115
|
+
} | {
|
|
116
|
+
value: {
|
|
117
|
+
value: any[];
|
|
118
|
+
operator: import("../types").DATE_OPERATORS;
|
|
119
|
+
dataType: import("../types").QueryBuilderConnectorType;
|
|
120
|
+
};
|
|
121
|
+
key: string;
|
|
122
|
+
refresh?: boolean | undefined;
|
|
123
|
+
error: {
|
|
124
|
+
key?: string | undefined;
|
|
125
|
+
value?: string | import("../types").ConnectorError | undefined;
|
|
126
|
+
};
|
|
127
|
+
})[];
|
|
128
|
+
properties: import("../types").QueryBuilderPropertyType[];
|
|
129
|
+
_id: string;
|
|
130
|
+
type: QueryBuilderType;
|
|
131
|
+
isExclude?: boolean | undefined;
|
|
132
|
+
PropertyOperator?: import("../types").QueryBuilderJoinOperators | undefined;
|
|
133
|
+
}[];
|
|
134
|
+
operator: import("../types").QueryBuilderJoinOperators | undefined;
|
|
135
|
+
};
|
|
136
|
+
exclude?: undefined;
|
|
137
|
+
};
|
|
138
|
+
containsError(v2: SegmentBuilder): string | undefined;
|
|
139
|
+
}
|
|
140
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { QueryBuilderRoot } from '../types';
|
|
2
|
+
import { QueryBuilderConnector, QueryBuilderMeta, QueryBuilderProperty } from '../types/QueryBuilder.type';
|
|
3
|
+
type SegmentBuilder = {
|
|
4
|
+
exclude?: QueryBuilderRoot;
|
|
5
|
+
include: QueryBuilderRoot;
|
|
6
|
+
name?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const POSITIVE_VAL_ERROR = "Please enter a positive integer";
|
|
9
|
+
export declare const NON_ZERO_VAL = "Enter a positive value";
|
|
10
|
+
export declare const INTEGER_ERROR = "Please enter an integer";
|
|
11
|
+
export declare const REQUIRED_VALUE = "Required field";
|
|
12
|
+
export declare const NON_DECIMAL_NUMBER = "Please enter a non-decimal number";
|
|
13
|
+
export declare const COMMA_SEPERATED_VALUES = "Please enter values seperated by commas";
|
|
14
|
+
export declare const LESS_THAN_180_DAYS = "Please enter values less than 180 days";
|
|
15
|
+
export declare class SegmentValidator {
|
|
16
|
+
validate(stateArg: SegmentBuilder): (boolean | {
|
|
17
|
+
include: QueryBuilderRoot;
|
|
18
|
+
exclude?: QueryBuilderRoot | undefined;
|
|
19
|
+
name?: string | undefined;
|
|
20
|
+
})[];
|
|
21
|
+
validateMeta(meta: QueryBuilderMeta, onErr?: () => void): {
|
|
22
|
+
error: {
|
|
23
|
+
value: {
|
|
24
|
+
value: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
key: string;
|
|
28
|
+
value: string | QueryBuilderConnector;
|
|
29
|
+
refresh?: boolean | undefined;
|
|
30
|
+
} | {
|
|
31
|
+
error: {
|
|
32
|
+
value: string;
|
|
33
|
+
};
|
|
34
|
+
key: string;
|
|
35
|
+
value: string | QueryBuilderConnector;
|
|
36
|
+
refresh?: boolean | undefined;
|
|
37
|
+
} | {
|
|
38
|
+
error: undefined;
|
|
39
|
+
key: string;
|
|
40
|
+
value: string | QueryBuilderConnector;
|
|
41
|
+
refresh?: boolean | undefined;
|
|
42
|
+
};
|
|
43
|
+
validateProperty(property: QueryBuilderProperty, onErr?: () => void): {
|
|
44
|
+
error: {
|
|
45
|
+
name: string;
|
|
46
|
+
value?: undefined;
|
|
47
|
+
};
|
|
48
|
+
_id: string;
|
|
49
|
+
name?: string | number | undefined;
|
|
50
|
+
dataType?: import("../types").QueryBuilderConnectorType | undefined;
|
|
51
|
+
operator?: import("../types").CONNECTOR_OPERATORS | undefined;
|
|
52
|
+
value?: import("../types").CONNECTOR_VALUE_TYPE;
|
|
53
|
+
_refresh?: boolean | undefined;
|
|
54
|
+
} | {
|
|
55
|
+
error: {
|
|
56
|
+
value: string;
|
|
57
|
+
name?: undefined;
|
|
58
|
+
};
|
|
59
|
+
_id: string;
|
|
60
|
+
name?: string | number | undefined;
|
|
61
|
+
dataType?: import("../types").QueryBuilderConnectorType | undefined;
|
|
62
|
+
operator?: import("../types").CONNECTOR_OPERATORS | undefined;
|
|
63
|
+
value?: import("../types").CONNECTOR_VALUE_TYPE;
|
|
64
|
+
_refresh?: boolean | undefined;
|
|
65
|
+
} | {
|
|
66
|
+
error: undefined;
|
|
67
|
+
_id: string;
|
|
68
|
+
name?: string | number | undefined;
|
|
69
|
+
dataType?: import("../types").QueryBuilderConnectorType | undefined;
|
|
70
|
+
operator?: import("../types").CONNECTOR_OPERATORS | undefined;
|
|
71
|
+
value?: import("../types").CONNECTOR_VALUE_TYPE;
|
|
72
|
+
_refresh?: boolean | undefined;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
export {};
|
|
@@ -41,7 +41,7 @@ export type ConnectorProps = {
|
|
|
41
41
|
disabled?: boolean;
|
|
42
42
|
onSearch?: (searchKey: string) => Promise<DropdownOption[]>;
|
|
43
43
|
};
|
|
44
|
-
export type CONNECTOR_VALUE_TYPE = string[] | number | Date[] | Date | number[] | number | undefined | /** for multiselect */ QueryBuilderAPIData[] | IG_VALUE[];
|
|
44
|
+
export type CONNECTOR_VALUE_TYPE = object | string[] | string | number | Date[] | Date | number[] | number | undefined | /** for multiselect */ QueryBuilderAPIData[] | IG_VALUE[];
|
|
45
45
|
type IG_VALUE = {
|
|
46
46
|
imageUrl: string;
|
|
47
47
|
redirectionUrl: string;
|
|
@@ -48,18 +48,27 @@ export declare enum REACTION_OPERATORS {
|
|
|
48
48
|
contains = "contains"
|
|
49
49
|
}
|
|
50
50
|
export declare enum DATE_OPERATORS {
|
|
51
|
+
today = "today",
|
|
52
|
+
yesterday = "yesterday",
|
|
53
|
+
'last 7 days' = "last 7 days",
|
|
54
|
+
'last 30 days' = "last 30 days",
|
|
55
|
+
'this week' = "this week",
|
|
56
|
+
'last week' = "last week",
|
|
57
|
+
'this month' = "this month",
|
|
58
|
+
'last month' = "last month",
|
|
59
|
+
'exactly' = "exactly",
|
|
60
|
+
'not exactly' = "not exactly",
|
|
61
|
+
'in the last' = "in the last",
|
|
62
|
+
'not in the last' = "not in the last",
|
|
63
|
+
'in between last' = "in between last",
|
|
64
|
+
'not in between last' = "not in between last",
|
|
51
65
|
on = "on",
|
|
52
66
|
notOn = "notOn",
|
|
53
67
|
inBetween = "inBetween",
|
|
54
68
|
notInBetween = "notInBetween",
|
|
55
69
|
before = "before",
|
|
56
70
|
after = "after",
|
|
57
|
-
|
|
58
|
-
yesterday = "yesterday",
|
|
59
|
-
'last week' = "last week",
|
|
60
|
-
'last month' = "last month",
|
|
61
|
-
'last quarter' = "last quarter",
|
|
62
|
-
'in the last' = "in the last"
|
|
71
|
+
'last quarter' = "last quarter"
|
|
63
72
|
}
|
|
64
73
|
export declare enum BOOLEAN_OPERATORS {
|
|
65
74
|
isTrue = "isTrue",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t,s,o,
|
|
1
|
+
"use strict";var e,t,s,o,n,i,R;Object.defineProperty(exports,"__esModule",{value:!0}),exports.INTEGER_OPERATORS=void 0,(e=exports.INTEGER_OPERATORS||(exports.INTEGER_OPERATORS={})).is="is",e.isNot="isNot",e.exists="exists",e.doesntExist="doesntExist",e.lessThan="lessThan",e.lessThanOrEqualTo="lessThanOrEqualTo",e.greaterThan="greaterThan",e.greaterThanOrEqualTo="greaterThanOrEqualTo",exports.STRING_OPERATORS=void 0,(t=exports.STRING_OPERATORS||(exports.STRING_OPERATORS={})).is="is",t.isNot="isNot",t.contains="contains",t.doesntContain="doesntContain",t.startsWith="startsWith",t.endsWith="endsWith",t.exists="exists",t.doesntExist="doesntExist",exports.IG_STRING_OPERATORS=void 0,(s=exports.IG_STRING_OPERATORS||(exports.IG_STRING_OPERATORS={})).any="any",s.is="is",s.contains="contains",s.startsWith="startsWith",s.endsWith="endsWith",exports.AD_STRING_OPERATORS=void 0,(exports.AD_STRING_OPERATORS||(exports.AD_STRING_OPERATORS={})).is="is",exports.SPECIFIC_IG_OPERATORS=void 0,(exports.SPECIFIC_IG_OPERATORS||(exports.SPECIFIC_IG_OPERATORS={})).in="in",exports.ICE_BREAKER_OPERATORS=void 0,(exports.ICE_BREAKER_OPERATORS||(exports.ICE_BREAKER_OPERATORS={})).is="is",exports.ANY_IG_OPERATORS=void 0,(exports.ANY_IG_OPERATORS||(exports.ANY_IG_OPERATORS={})).in="in",exports.ANY_AD_OPERATORS=void 0,(exports.ANY_AD_OPERATORS||(exports.ANY_AD_OPERATORS={})).in="in",exports.REACTION_OPERATORS=void 0,(exports.REACTION_OPERATORS||(exports.REACTION_OPERATORS={})).contains="contains",exports.DATE_OPERATORS=void 0,(o=exports.DATE_OPERATORS||(exports.DATE_OPERATORS={})).today="today",o.yesterday="yesterday",o["last 7 days"]="last 7 days",o["last 30 days"]="last 30 days",o["this week"]="this week",o["last week"]="last week",o["this month"]="this month",o["last month"]="last month",o.exactly="exactly",o["not exactly"]="not exactly",o["in the last"]="in the last",o["not in the last"]="not in the last",o["in between last"]="in between last",o["not in between last"]="not in between last",o.on="on",o.notOn="notOn",o.inBetween="inBetween",o.notInBetween="notInBetween",o.before="before",o.after="after",o["last quarter"]="last quarter",exports.BOOLEAN_OPERATORS=void 0,(n=exports.BOOLEAN_OPERATORS||(exports.BOOLEAN_OPERATORS={})).isTrue="isTrue",n.isFalse="isFalse",n.exists="exists",n.doesntExist="doesntExist",exports.FREQUENCY_OPERATORS=void 0,(i=exports.FREQUENCY_OPERATORS||(exports.FREQUENCY_OPERATORS={})).exactly="exactly",i.atleast="atleast",i.atMost="atMost",exports.EVENT_VALUES=void 0,(R=exports.EVENT_VALUES||(exports.EVENT_VALUES={})).FreeText="FreeText",R.NoInput="NoInput",R.IntegerSingleValue="IntegerSingleValue",R.StringSingleValue="StringSingleValue",R.TwoNumberInputsSeperatedByAnd="TwoNumberInputsSeperatedByAnd",R.MultiselectDropdownFreeText="MultiselectDropdownFreeText",R.SingleselectDropdownFreeText="SingleselectDropdownFreeText",R.SingleDate="SingleDate",R.TwoDate="TwoDate",R.IntegerPositiveSingle="IntegerPositiveSingle",R.NumberTime="NumberTime";
|