@bikdotai/bik-component-library 0.0.133 → 0.0.135-beta.1
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 +4 -0
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/InTheLast.js +1 -0
- package/dist/cjs/components/QueryBuilder/components/Connectors/Connector.js +1 -1
- package/dist/cjs/components/QueryBuilder/constants/connector.d.ts +2 -1
- package/dist/cjs/components/QueryBuilder/constants/connector.js +1 -1
- package/dist/cjs/components/TablePagination/TablePagination.js +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +1 -1
- package/dist/cjs/components/bik-layout/BikSidebar.d.ts +1 -0
- package/dist/cjs/components/bik-layout/BikSidebar.js +1 -1
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/cjs/components/stepper/WorkingStepper.d.ts +1 -0
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTheLast.d.ts +4 -0
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTheLast.js +1 -0
- package/dist/esm/components/QueryBuilder/components/Connectors/Connector.js +1 -1
- package/dist/esm/components/QueryBuilder/constants/connector.d.ts +2 -1
- package/dist/esm/components/QueryBuilder/constants/connector.js +1 -1
- package/dist/esm/components/TablePagination/TablePagination.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +1 -1
- package/dist/esm/components/bik-layout/BikSidebar.d.ts +1 -0
- package/dist/esm/components/bik-layout/BikSidebar.js +1 -1
- package/dist/esm/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/esm/components/stepper/WorkingStepper.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/styled/base"),d=require("react/jsx-runtime"),I=require("react"),l=require("../../../../dropdown/Dropdown.js");require("../../../../dropdown/DropdownPopover/index.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("../../../../dropdown/OpenedDropdown/components/menu/SelectAllMenu.js"),require("../../../../button/Button.js"),require("../../../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js"),require("../../../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js");var g=require("../../../../input/Input.js"),n=require("../../../../input/context/InputStyleProvider.js");require("../../../../dropdown/MenuItem/MenuItem.js");var c=require("../../InputLoader.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const t=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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkluVGhlTGFzdC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBTzZCIiwiZmlsZSI6IkluVGhlTGFzdC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBqc3ggYXMgX2pzeCwganN4cyBhcyBfanN4cyB9IGZyb20gXCJyZWFjdC9qc3gtcnVudGltZVwiO1xyXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XHJcbmltcG9ydCB7IHVzZUVmZmVjdCwgdXNlU3RhdGUgfSBmcm9tICdyZW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lclwiLCB2YXJpYW50OiBcInNtYWxsXCIsIHN0YXRlOiBkaXNhYmxlZCA/ICdkaXNhYmxlZCcgOiAnbm9uZScsIGVycm9yTWVzc2FnZTogZXJyb3JzID09PSBudWxsIHx8IGVycm9ycyA9PT0gdm9pZCAwID8gdm9pZCAwIDogZXJyb3JzLnZhbCwgdmFsdWU6IG51bSwgb25DaGFuZ2VUZXh0OiAodGV4dCkgPT4gb25DaGFuZ2UgPT09IG51bGwgfHwgb25DaGFuZ2UgPT09IHZvaWQgMCA/IHZvaWQgMCA6IG9uQ2hhbmdlKFt0ZXh0LCB0aW1lXSkgfSksIF9qc3goRHJvcGRvd24sIHsgcGxhY2VIb2xkZXI6IFwiVGltZVwiLCB3aWR0aDogXCIxMDRweFwiLCBzaXplOiBcInNtYWxsXCIsIG9wdGlvbnM6IG9wdGlvbnMsIG9uU2VsZWN0OiAob3B0aW9uKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlID09PSBudWxsIHx8IG9uQ2hhbmdlID09PSB2b2lkIDAgPyB2b2lkIDAgOiBvbkNoYW5nZShbbnVtLCBvcHRpb24udmFsdWVdKTtcclxuICAgICAgICAgICAgICAgICAgICB9IH0pXSB9KSB9KSkpO1xyXG59O1xyXG4vLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgcmVhY3QvZGlzcGxheS1uYW1lXHJcbmV4cG9ydCBkZWZhdWx0IChwcm9wcykgPT4gX2pzeChJblRoZUxhc3QsIE9iamVjdC5hc3NpZ24oe30sIHByb3BzKSk7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPUluVGhlTGFzdC5qcy5tYXAiXX0= */",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"}],s=e=>{let{val:o,onChange:s,errors:i,isLoading:C,disabled:r}=e;var b,a;const[p,B]=I.useState(u),y=null!==(b=null==o?void 0:o[1])&&void 0!==b?b:"days",m=null!==(a=null==o?void 0:o[0])&&void 0!==a?a:"1";return I.useEffect((()=>{var e;const d=null!==(e=null==o?void 0:o[1])&&void 0!==e?e:"days";B((e=>e.map((e=>Object.assign(Object.assign({},e),{selected:d===e.value})))))}),[o]),C?d.jsx("div",Object.assign({style:{width:200}},{children:d.jsx(c.default,{containerStyle:{padding:"5px 8px"}})})):d.jsx(n.InputStyleContext.Provider,Object.assign({value:{InputWrapper:{width:104}}},{children:d.jsxs(t,{children:[d.jsx(g.Input,{type:"number",variant:"small",state:r?"disabled":"none",errorMessage:null==i?void 0:i.val,value:m,onChangeText:e=>null==s?void 0:s([e,y])}),d.jsx(l.Dropdown,{placeHolder:"Time",width:"104px",size:"small",options:p,onSelect:e=>{null==s||s([m,e.value])}})]})}))};exports.default=e=>d.jsx(s,Object.assign({},e));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("../../../../utils/unCamelCase.js"),n=require("../../constants/connectorPosition.js"),o=require("../../helpers/Connector.helper.js"),i=require("../../types/QueryBuilder.type.js"),l=require("../DropdownWrapper.js"),s=require("./Components/EmojiPicker.js"),u=require("./Components/FreeText.js"),a=require("./Components/FrequencyIntegerPositiveSingle.js"),d=require("./Components/IgPicker.js"),p=require("./Components/IntegerPositiveSingle.js"),c=require("./Components/IntegerSingleValue.js"),g=require("./Components/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("../../../../utils/unCamelCase.js"),n=require("../../constants/connectorPosition.js"),o=require("../../helpers/Connector.helper.js"),i=require("../../types/QueryBuilder.type.js"),l=require("../DropdownWrapper.js"),s=require("./Components/EmojiPicker.js"),u=require("./Components/FreeText.js"),a=require("./Components/FrequencyIntegerPositiveSingle.js"),d=require("./Components/IgPicker.js"),p=require("./Components/IntegerPositiveSingle.js"),c=require("./Components/IntegerSingleValue.js"),g=require("./Components/InTheLast.js"),C=require("./Components/MultiselectDropdownFreeText.js"),m=require("./Components/NoInput.js"),j=require("./Components/NumberTime.js"),q=require("./Components/SingleDate.js"),v=require("./Components/SingleselectDropdownFreeText.js"),f=require("./Components/StringSingleValue.js"),S=require("./Components/TwoDate.js"),I=require("./Components/TwoNumberInputsSeperatedByAnd.js"),P=require("./Connector.styled.js");const T={FreeText:u.default,IntegerPositiveSingle:p.default,IntegerSingleValue:c.default,StringSingleValue:f.default,MultiselectDropdownFreeText:C.default,SingleselectDropdownFreeText:v.default,NoInput:m.default,SingleDate:q.default,TwoNumberInputsSeperatedByAnd:I.default,FrequencyIntegerPositiveSingle:a.default,TwoDate:S.default,NumberTime:j.default,PostIgPicker:d.PostIgPicker,ReelIgPicker:d.ReelIgPicker,StoryIgPicker:d.StoryIgPicker,EmojiPicker:s.default,InTheLast:g.default};exports.default=s=>{let{isLoading:u,noDefault:a,connectorType:d,defaultConnector:p,onOperatorChange:c,onValueChange:g,connectorVal:C,extra:m,errors:j,disabled:q}=s;var v,f,S;const[I,y]=r.useState(null),[x,b]=r.useState(!1),w=o.ConnectorHelper.getConnectorType(d).map((e=>({selected:e===p,value:e,label:t.unCamelCaseWithFirstUppercase(e)})));function D(e){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];b(!0);const t=o.ConnectorHelper.getConnectorComponent(d,e.value);void 0!==t?d===i.QueryBuilderConnectorType.frequency&&"IntegerPositiveSingle"===t?y("FrequencyIntegerPositiveSingle"):y(t):y(null),r||c(e.value),setTimeout((()=>{b(!1)}),5)}return r.useEffect((()=>{a||(p?D({value:p,label:p},!0):(null==w?void 0:w[0])&&D(w[0]))}),[p]),e.jsxs(P.Container,{children:[e.jsx("div",{children:!(null===(v=null===n.disableOperatorDropdown||void 0===n.disableOperatorDropdown?void 0:n.disableOperatorDropdown[d])||void 0===v?void 0:v[p])&&e.jsx(l.default,{disabled:q,width:"200px",isLoading:x,options:w,defaultOption:null===(f=w.filter((e=>e.selected)))||void 0===f?void 0:f[0],onSelect:D})}),null!==I&&!x&&(null===(S=T[I])||void 0===S?void 0:S.call(T,{disabled:q,val:C,onChange:g,extra:m,errors:j,isLoading:u}))]})};
|
|
@@ -19,7 +19,8 @@ export declare enum CONNECTOR_VALUE_COMPONENT_TYPES {
|
|
|
19
19
|
PostIgPicker = "PostIgPicker",
|
|
20
20
|
ReelIgPicker = "ReelIgPicker",
|
|
21
21
|
StoryIgPicker = "StoryIgPicker",
|
|
22
|
-
EmojiPicker = "EmojiPicker"
|
|
22
|
+
EmojiPicker = "EmojiPicker",
|
|
23
|
+
InTheLast = "InTheLast"
|
|
23
24
|
}
|
|
24
25
|
export declare const INTEGER_OPERATORS_COMPONENT: {
|
|
25
26
|
is: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../types/QueryBuilder.type.js"),O=require("../types/QueryBuilderOperator.type.js");const E={[e.QueryBuilderConnectorType.boolean]:O.BOOLEAN_OPERATORS,[e.QueryBuilderConnectorType.string]:O.STRING_OPERATORS,[e.QueryBuilderConnectorType.integer]:O.INTEGER_OPERATORS,[e.QueryBuilderConnectorType.frequency]:O.FREQUENCY_OPERATORS,[e.QueryBuilderConnectorType.date]:O.DATE_OPERATORS,[e.QueryBuilderConnectorType.specificPost]:O.SPECIFIC_IG_OPERATORS,[e.QueryBuilderConnectorType.specificReel]:O.SPECIFIC_IG_OPERATORS,[e.QueryBuilderConnectorType.specificStory]:O.SPECIFIC_IG_OPERATORS,[e.QueryBuilderConnectorType.anyIg]:O.ANY_IG_OPERATORS,[e.QueryBuilderConnectorType.reaction]:O.REACTION_OPERATORS,[e.QueryBuilderConnectorType.activityString]:O.IG_STRING_OPERATORS,[e.QueryBuilderConnectorType.anyAd]:O.ANY_AD_OPERATORS,[e.QueryBuilderConnectorType.specificAd]:O.AD_STRING_OPERATORS,[e.QueryBuilderConnectorType.iceBreaker]:O.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";const N={[O.INTEGER_OPERATORS.is]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[O.INTEGER_OPERATORS.isNot]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[O.INTEGER_OPERATORS.exists]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.INTEGER_OPERATORS.doesntExist]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.INTEGER_OPERATORS.lessThan]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.IntegerSingleValue,[O.INTEGER_OPERATORS.lessThanOrEqualTo]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.IntegerSingleValue,[O.INTEGER_OPERATORS.greaterThan]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.IntegerSingleValue,[O.INTEGER_OPERATORS.greaterThanOrEqualTo]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.IntegerSingleValue},_={[O.STRING_OPERATORS.is]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.MultiselectDropdownFreeText,[O.STRING_OPERATORS.isNot]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.MultiselectDropdownFreeText,[O.STRING_OPERATORS.contains]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[O.STRING_OPERATORS.doesntContain]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[O.STRING_OPERATORS.startsWith]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[O.STRING_OPERATORS.endsWith]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[O.STRING_OPERATORS.exists]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.STRING_OPERATORS.doesntExist]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput},
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../types/QueryBuilder.type.js"),O=require("../types/QueryBuilderOperator.type.js");const E={[e.QueryBuilderConnectorType.boolean]:O.BOOLEAN_OPERATORS,[e.QueryBuilderConnectorType.string]:O.STRING_OPERATORS,[e.QueryBuilderConnectorType.integer]:O.INTEGER_OPERATORS,[e.QueryBuilderConnectorType.frequency]:O.FREQUENCY_OPERATORS,[e.QueryBuilderConnectorType.date]:O.DATE_OPERATORS,[e.QueryBuilderConnectorType.specificPost]:O.SPECIFIC_IG_OPERATORS,[e.QueryBuilderConnectorType.specificReel]:O.SPECIFIC_IG_OPERATORS,[e.QueryBuilderConnectorType.specificStory]:O.SPECIFIC_IG_OPERATORS,[e.QueryBuilderConnectorType.anyIg]:O.ANY_IG_OPERATORS,[e.QueryBuilderConnectorType.reaction]:O.REACTION_OPERATORS,[e.QueryBuilderConnectorType.activityString]:O.IG_STRING_OPERATORS,[e.QueryBuilderConnectorType.anyAd]:O.ANY_AD_OPERATORS,[e.QueryBuilderConnectorType.specificAd]:O.AD_STRING_OPERATORS,[e.QueryBuilderConnectorType.iceBreaker]:O.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";const N={[O.INTEGER_OPERATORS.is]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[O.INTEGER_OPERATORS.isNot]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[O.INTEGER_OPERATORS.exists]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.INTEGER_OPERATORS.doesntExist]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.INTEGER_OPERATORS.lessThan]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.IntegerSingleValue,[O.INTEGER_OPERATORS.lessThanOrEqualTo]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.IntegerSingleValue,[O.INTEGER_OPERATORS.greaterThan]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.IntegerSingleValue,[O.INTEGER_OPERATORS.greaterThanOrEqualTo]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.IntegerSingleValue},_={[O.STRING_OPERATORS.is]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.MultiselectDropdownFreeText,[O.STRING_OPERATORS.isNot]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.MultiselectDropdownFreeText,[O.STRING_OPERATORS.contains]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[O.STRING_OPERATORS.doesntContain]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[O.STRING_OPERATORS.startsWith]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[O.STRING_OPERATORS.endsWith]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[O.STRING_OPERATORS.exists]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.STRING_OPERATORS.doesntExist]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput},t={[O.IG_STRING_OPERATORS.any]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.IG_STRING_OPERATORS.is]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.MultiselectDropdownFreeText,[O.IG_STRING_OPERATORS.contains]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[O.IG_STRING_OPERATORS.startsWith]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[O.IG_STRING_OPERATORS.endsWith]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText},r={[O.AD_STRING_OPERATORS.is]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.SingleselectDropdownFreeText},R={[O.ICE_BREAKER_OPERATORS.is]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.MultiselectDropdownFreeText},C={[O.REACTION_OPERATORS.contains]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.EmojiPicker},P={[O.DATE_OPERATORS.on]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.SingleDate,[O.DATE_OPERATORS.notOn]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.SingleDate,[O.DATE_OPERATORS.inBetween]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.TwoDate,[O.DATE_OPERATORS.notInBetween]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.TwoDate,[O.DATE_OPERATORS.before]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.SingleDate,[O.DATE_OPERATORS.after]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.SingleDate,[O.DATE_OPERATORS.today]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.DATE_OPERATORS.yesterday]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.DATE_OPERATORS["last week"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.DATE_OPERATORS["last month"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.DATE_OPERATORS["last quarter"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.DATE_OPERATORS["in the last"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.InTheLast},o={[O.SPECIFIC_IG_OPERATORS.in]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.PostIgPicker},S={[O.SPECIFIC_IG_OPERATORS.in]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.ReelIgPicker},n={[O.SPECIFIC_IG_OPERATORS.in]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.StoryIgPicker},A={[O.ANY_IG_OPERATORS.in]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput},s={[O.ANY_AD_OPERATORS.in]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput},i={[O.BOOLEAN_OPERATORS.isTrue]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.BOOLEAN_OPERATORS.isFalse]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.BOOLEAN_OPERATORS.exists]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.BOOLEAN_OPERATORS.doesntExist]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput},p={[O.FREQUENCY_OPERATORS.exactly]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.IntegerPositiveSingle,[O.FREQUENCY_OPERATORS.atleast]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.IntegerPositiveSingle,[O.FREQUENCY_OPERATORS.atMost]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.IntegerPositiveSingle},I={[e.QueryBuilderConnectorType.boolean]:i,[e.QueryBuilderConnectorType.string]:_,[e.QueryBuilderConnectorType.integer]:N,[e.QueryBuilderConnectorType.frequency]:p,[e.QueryBuilderConnectorType.date]:P,[e.QueryBuilderConnectorType.specificPost]:o,[e.QueryBuilderConnectorType.specificReel]:S,[e.QueryBuilderConnectorType.specificStory]:n,[e.QueryBuilderConnectorType.anyIg]:A,[e.QueryBuilderConnectorType.reaction]:C,[e.QueryBuilderConnectorType.activityString]:t,[e.QueryBuilderConnectorType.anyAd]:s,[e.QueryBuilderConnectorType.specificAd]:r,[e.QueryBuilderConnectorType.iceBreaker]:R};exports.AD_STRING_OPERATORS_COMPONENT=r,exports.ANY_AD_OPERATORS_COMPONENT=s,exports.ANY_IG_OPERATORS_COMPONENT=A,exports.BOOLEAN_OPERATORS_COMPONENT=i,exports.CONNECTOR_TYPE_TO_COMPONENT_MAP=I,exports.CONNECTOR_TYPE_TO_OPERATORS=E,exports.DATE_OPERATORS_COMPONENT=P,exports.FREQUENCY_OPERATORS_COMPONENT=p,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=n,exports.STRING_OPERATORS_COMPONENT=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../assets/icons/chevronLeft.svg.js"),t=require("../../assets/icons/chevronRight.svg.js"),n=require("./TablePagination.styled.js"),a=require("../../constants/Theme.js"),i=require("../
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../assets/icons/chevronLeft.svg.js"),t=require("../../assets/icons/chevronRight.svg.js"),n=require("./TablePagination.styled.js"),a=require("../../constants/Theme.js"),i=require("../TypographyStyle.js"),r=require("../dropdown/Dropdown.js");exports.TablePagination=o=>{let{pageNumber:l,pageSize:c,totalRows:d,updatePageNumber:g,updatePageSize:h,hidePageSizeOptions:j}=o;const p=a.DEFAULT_THEME.colorsV2,u=(l-1)*c+1,y=(l-1)*c+c,b=Math.ceil(d/c),x=1==b;let v=[];v=b>=5?l===b?[l-4,l-3,l-2,l-1,l]:1===l?[l,l+1,l+2,l+3,l+4]:2===l?[l-1,l,l+1,l+2,l+3]:l===b-1?[l-3,l-2,l-1,l,l+1]:[l-2,l-1,l,l+1,l+2]:Array.from({length:b},((e,s)=>s+1));const m=[{label:"5 rows per page",value:"5",selected:5===c},{label:"10 rows per page",value:"10",selected:10===c},{label:"20 rows per page",value:"20",selected:20===c}];return e.jsxs(n.StyledTablePaginationContainer,{children:[!j&&e.jsx("div",{children:e.jsx(r.Dropdown,{size:"small",options:m,onSelect:h,width:"162px"})}),e.jsxs("div",Object.assign({className:"paging__container"},{children:[!j&&d&&e.jsxs(i.BodySecondary,Object.assign({style:{color:p.content.placeholder,marginRight:8}},{children:["Showing ",u,"-",y>d?d:y," of"," ",d," results"]})),e.jsxs("div",Object.assign({className:"pages__buttons-container"},{children:[!x&&e.jsx(n.StyledPagingContainer,Object.assign({active:!1,onClick:()=>{1!==l&&g(Math.max(l-1,1))},disabled:1===l},{children:e.jsx(s.default,{color:p.content.secondary,height:14,width:14})})),v.map((s=>e.jsx(n.StyledPagingContainer,Object.assign({active:s==l,onClick:()=>g(s),style:{display:1==s&&d<=c?"none":"flex"}},{children:e.jsx(i.BodySecondary,Object.assign({style:{color:s==l?p.content.primaryInverse:p.content.secondary}},{children:s}))}),s))),!x&&e.jsx(n.StyledPagingContainer,Object.assign({isLast:!0,active:!1,onClick:()=>{l!==b&&g(Math.min(l+1,b))},disabled:l===b},{children:e.jsx(t.default,{color:p.content.secondary,height:14,width:14})}))]}))]}))]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../constants/Theme.js"),i=require("../../assets/icons/arrow_down.svg.js"),s=require("../../assets/icons/arrow_up.svg.js"),r=require("../../assets/icons/info.svg.js"),n=require("../tag/Tag.js"),a=require("../template-context-mapper/utils/getFormattedMonthDate.js"),o=require("../tooltips/Tooltip.js"),l=require("../TypographyStyle.js"),c=require("./CommonStyles.js");const d=r=>{let{percent:n,direction:o,timeline:c,customRange:d}=r;const g="negative"===o?i.default:s.default,y="negative"===o?t.COLORS.background.negative.vibrant:"positive"===o?t.COLORS.background.positive.vibrant:t.COLORS.content.placeholder,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../constants/Theme.js"),i=require("../../assets/icons/arrow_down.svg.js"),s=require("../../assets/icons/arrow_up.svg.js"),r=require("../../assets/icons/info.svg.js"),n=require("../tag/Tag.js"),a=require("../template-context-mapper/utils/getFormattedMonthDate.js"),o=require("../tooltips/Tooltip.js"),l=require("../TypographyStyle.js"),c=require("./CommonStyles.js");const d=r=>{let{percent:n,direction:o,timeline:c,customRange:d}=r;const g="negative"===o?i.default:s.default,y="negative"===o?t.COLORS.background.negative.vibrant:"positive"===o?t.COLORS.background.positive.vibrant:t.COLORS.content.placeholder,p="today"===c?"vs yesterday":"yesterday"===c?"vs 1 day before":"7 days"===c?"vs last 7 days":"30 days"===c?"vs last 30 days":"custom"===c&&d?`vs ${a.getFormattedMonthDate(d[0])} - ${a.getFormattedMonthDate(d[1])}`:"";return e.jsxs("div",Object.assign({style:{display:"flex",alignItems:"center",flexDirection:"row"}},{children:["number"==typeof n&&e.jsx(g,{color:y,height:20,width:20,style:{marginRight:2}}),"number"==typeof n&&o&&e.jsxs(l.TitleSmall,Object.assign({style:{color:y}},{children:["neutral"===o?0:n,"%"]})),c&&e.jsx(l.Caption,Object.assign({style:{marginLeft:4,color:t.COLORS.content.placeholder}},{children:p}))]}))};exports.AnalyticsTrend=i=>{let{title:s,value:a,trendPercent:g,type:y="horizontal",timeline:p,customRange:h,tooltip:u,card:j=!0,rightSeparator:m=!1,size:v="big",share:b=!1,formatVal:x,prefixSymbol:O}=i;const f="big"===v?l.TitleLarge:l.TitleMedium,R=void 0!==g?g<0?"negative":0===g?"neutral":"positive":void 0,S=void 0!==g?b?Math.round(g):Math.abs(Math.round(g)):void 0;return e.jsx(c.AnalyticsTrendContainer,Object.assign({card:j},{children:e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:4,borderRightWidth:m?1:0,borderRightColor:t.COLORS.stroke.primary,borderRightStyle:"solid",paddingLeft:j?0:24,paddingRight:j?0:24,height:"100%"}},{children:[e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:4,alignItems:"center"}},{children:[e.jsx(l.BodySecondary,Object.assign({style:{color:t.COLORS.content.secondary}},{children:s})),u&&e.jsx(o.Tooltip,Object.assign({body:u,placement:"right",width:300},{children:e.jsx("div",Object.assign({style:{display:"flex",alignItems:"center",cursor:"pointer"}},{children:e.jsx(r.default,{color:t.COLORS.content.inactive,height:16,width:16})}))}))]})),e.jsxs("div",Object.assign({style:Object.assign({display:"flex",flexDirection:"row",gap:12,alignItems:"center"},b?{justifyContent:"space-between"}:{})},{children:[e.jsx(f,Object.assign({style:{color:t.COLORS.content.primary}},{children:void 0===a?"--":"number"==typeof a&&x?`${null!=O?O:""}${new Intl.NumberFormat("en-IN",{}).format(a)}`:`${null!=O?O:""}${a}`})),"horizontal"===y&&!b&&e.jsx(d,{timeline:p,customRange:h,percent:S,direction:R}),b&&void 0!==S&&e.jsx(n.Tag,{tagText:`${S} %`,theme:"light",type:"neutral"})]})),"vertical"===y&&!b&&e.jsx("div",Object.assign({style:{marginTop:12}},{children:e.jsx(d,{timeline:p,customRange:h,percent:S,direction:R})}))]}))}))};
|
|
@@ -18,5 +18,6 @@ export interface BikSidebarProps {
|
|
|
18
18
|
activeSubMenu: Menu;
|
|
19
19
|
onClickingMainMenu: (menu: MenuItem) => void;
|
|
20
20
|
onClickingSubMenu: (subMenu: Menu) => void;
|
|
21
|
+
onClickingAccessUpgradePanel?: () => void;
|
|
21
22
|
}
|
|
22
23
|
export declare const BikSidebar: React.FC<BikSidebarProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("../../assets/icons/Bik_logo.svg.js"),n=require("react"),s=require("../../constants/Theme.js"),t=require("./SidebarStyles.js"),a=require("./SimpleSidebar.js");const o=i=>{const{icon:n,isActive:t,activeStateIcon:a,hoverStateIcon:o,isHovered:l}=i,r=n,c=a,d=o;return e.jsx(e.Fragment,{children:t?e.jsx(c,{width:20,height:20}):l?e.jsx(d,{width:20,height:20,color:s.COLORS.surface.standard}):e.jsx(r,{width:20,height:20,color:s.COLORS.surface.standard})})};exports.BikSidebar=s=>{const{logoSvg:l,allMenuList:r,activeMainMenu:c,activeSubMenu:d,onClickingMainMenu:u,onClickingSubMenu:v}=s,[
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("../../assets/icons/Bik_logo.svg.js"),n=require("react"),s=require("../../constants/Theme.js"),t=require("./SidebarStyles.js"),a=require("./SimpleSidebar.js");const o=i=>{const{icon:n,isActive:t,activeStateIcon:a,hoverStateIcon:o,isHovered:l}=i,r=n,c=a,d=o;return e.jsx(e.Fragment,{children:t?e.jsx(c,{width:20,height:20}):l?e.jsx(d,{width:20,height:20,color:s.COLORS.surface.standard}):e.jsx(r,{width:20,height:20,color:s.COLORS.surface.standard})})};exports.BikSidebar=s=>{const{logoSvg:l,allMenuList:r,activeMainMenu:c,activeSubMenu:d,onClickingMainMenu:u,onClickingSubMenu:v,onClickingAccessUpgradePanel:h}=s,[m,g]=n.useState(c),[j,k]=n.useState(),[S,x]=n.useState(d);return n.useEffect((()=>{g(c)}),[c]),n.useEffect((()=>{x(d)}),[d]),e.jsxs(t.SideBarContainer,{children:[e.jsx("div",Object.assign({className:"bik-header-logo",onClick:()=>{},onKeyDown:()=>{},"aria-hidden":"true"},{children:l||e.jsx(i.default,{})})),e.jsx(t.SibeBarMenuItem,{children:null==r?void 0:r.map(((i,s)=>{var t,l,r;return e.jsxs(n.Fragment,{children:[e.jsx("div",Object.assign({className:"main--sidebar",onClick:()=>{var e;k(void 0),g(i),u(i),(null===(e=null==i?void 0:i.children)||void 0===e?void 0:e.length)?x(null==i?void 0:i.children[0]):x({})},onMouseOver:()=>{k(i)},onMouseEnter:()=>{k(i)},onMouseLeave:()=>{var e;!(null===(e=null==i?void 0:i.children)||void 0===e?void 0:e.length)&&k(void 0)},onFocus:()=>{console.log(";")},"aria-hidden":"true"},{children:e.jsxs("div",Object.assign({className:`sidebar-menu-item ${(null==m?void 0:m.key)==i.key?" main-menu-active-class":""} ${i.isLastSticky?"sticky-menu-int":""} ${i.is2ndLastSticky?"sticky-menu":""}\n ${i.key==(null==j?void 0:j.key)?"sidebar-menu-item-hover":""}`},{children:[e.jsx(o,{icon:i.icon,isActive:i.key==(null==m?void 0:m.key),activeStateIcon:null!==(t=i.activeIcon)&&void 0!==t?t:{},hoverStateIcon:null!==(l=i.hoverIcon)&&void 0!==l?l:{},isHovered:i.key==(null==j?void 0:j.key)}),e.jsx("div",Object.assign({className:"menu-item-container"},{children:e.jsx("p",Object.assign({className:"menu-item-text "+((null==i?void 0:i.key)===(null==m?void 0:m.key)?"active-menu-item-text":"")},{children:i.displayName}))}))]}),s)}),s),e.jsx(e.Fragment,{children:(null===(r=null==j?void 0:j.children)||void 0===r?void 0:r.length)&&e.jsx(a.SimpleSidebar,{menuList:null==j?void 0:j.children,activeMenu:S,onMouseLeaveOnMenu:()=>k(void 0),left:88,postion:"fixed",header:j.displayName,theme:"brand",showAccessUpgradePanel:j.showAccessUpgradePanel,onMenuClick:e=>{x(e),g(j),k(void 0),v(e)},onUpgrade:h})})]},s)}))})]})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"@emotion/styled/base";import{jsx as e,jsxs as d}from"react/jsx-runtime";import{useState as I,useEffect as g}from"react";import{Dropdown as l}from"../../../../dropdown/Dropdown.js";import"../../../../dropdown/DropdownPopover/index.js";import"../../../../zeroState/ZeroState.js";import"../../../../TypographyStyle.js";import"../../../../../constants/Theme.js";import"../../../../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../../../../checkBox/CheckBox.styled.js";import"../../../../list-item/ListItem.js";import"../../../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../../../../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../../../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../../../../dropdown/OpenedDropdown/components/menu/SelectAllMenu.js";import"../../../../button/Button.js";import"../../../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../../../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import{Input as c}from"../../../../input/Input.js";import{InputStyleContext as n}from"../../../../input/context/InputStyleProvider.js";import"../../../../dropdown/MenuItem/MenuItem.js";import t from"../../InputLoader.js";const i=o("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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkluVGhlTGFzdC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBTzZCIiwiZmlsZSI6IkluVGhlTGFzdC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBqc3ggYXMgX2pzeCwganN4cyBhcyBfanN4cyB9IGZ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3aWR0aDogMTA0LFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0gfSwgeyBjaGlsZHJlbjogX2pzeHMoQ29udGFpbmVyLCB7IGNoaWxkcmVuOiBbX2pzeChJbnB1dCwgeyB0eXBlOiBcIm51bWJlclwiLCB2YXJpYW50OiBcInNtYWxsXCIsIHN0YXRlOiBkaXNhYmxlZCA/ICdkaXNhYmxlZCcgOiAnbm9uZScsIGVycm9yTWVzc2FnZTogZXJyb3JzID09PSBudWxsIHx8IGVycm9ycyA9PT0gdm9pZCAwID8gdm9pZCAwIDogZXJyb3JzLnZhbCwgdmFsdWU6IG51bSwgb25DaGFuZ2VUZXh0OiAodGV4dCkgPT4gb25DaGFuZ2UgPT09IG51bGwgfHwgb25DaGFuZ2UgPT09IHZvaWQgMCA/IHZvaWQgMCA6IG9uQ2hhbmdlKFt0ZXh0LCB0aW1lXSkgfSksIF9qc3goRHJvcGRvd24sIHsgcGxhY2VIb2xkZXI6IFwiVGltZVwiLCB3aWR0aDogXCIxMDRweFwiLCBzaXplOiBcInNtYWxsXCIsIG9wdGlvbnM6IG9wdGlvbnMsIG9uU2VsZWN0OiAob3B0aW9uKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlID09PSBudWxsIHx8IG9uQ2hhbmdlID09PSB2b2lkIDAgPyB2b2lkIDAgOiBvbkNoYW5nZShbbnVtLCBvcHRpb24udmFsdWVdKTtcclxuICAgICAgICAgICAgICAgICAgICB9IH0pXSB9KSB9KSkpO1xyXG59O1xyXG4vLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgcmVhY3QvZGlzcGxheS1uYW1lXHJcbmV4cG9ydCBkZWZhdWx0IChwcm9wcykgPT4gX2pzeChJblRoZUxhc3QsIE9iamVjdC5hc3NpZ24oe30sIHByb3BzKSk7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPUluVGhlTGFzdC5qcy5tYXAiXX0= */",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)."}}),s=[{label:"day(s)",value:"days"},{label:"minute(s)",value:"minutes"},{label:"hour(s)",value:"hours"}],C=o=>{let{val:C,onChange:p,errors:b,isLoading:u,disabled:m}=o;var a,B;const[r,y]=I(s),A=null!==(a=null==C?void 0:C[1])&&void 0!==a?a:"days",X=null!==(B=null==C?void 0:C[0])&&void 0!==B?B:"1";return g((()=>{var o;const e=null!==(o=null==C?void 0:C[1])&&void 0!==o?o:"days";y((o=>o.map((o=>Object.assign(Object.assign({},o),{selected:e===o.value})))))}),[C]),u?e("div",Object.assign({style:{width:200}},{children:e(t,{containerStyle:{padding:"5px 8px"}})})):e(n.Provider,Object.assign({value:{InputWrapper:{width:104}}},{children:d(i,{children:[e(c,{type:"number",variant:"small",state:m?"disabled":"none",errorMessage:null==b?void 0:b.val,value:X,onChangeText:o=>null==p?void 0:p([o,A])}),e(l,{placeHolder:"Time",width:"104px",size:"small",options:r,onSelect:o=>{null==p||p([X,o.value])}})]})}))};var p=o=>e(C,Object.assign({},o));export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useState as t,useEffect as n}from"react";import{unCamelCaseWithFirstUppercase as r}from"../../../../utils/unCamelCase.js";import{disableOperatorDropdown as i}from"../../constants/connectorPosition.js";import{ConnectorHelper as l}from"../../helpers/Connector.helper.js";import{QueryBuilderConnectorType as s}from"../../types/QueryBuilder.type.js";import m from"../DropdownWrapper.js";import p from"./Components/EmojiPicker.js";import a from"./Components/FreeText.js";import u from"./Components/FrequencyIntegerPositiveSingle.js";import{PostIgPicker as d,ReelIgPicker as c,StoryIgPicker as g}from"./Components/IgPicker.js";import f from"./Components/IntegerPositiveSingle.js";import C from"./Components/IntegerSingleValue.js";import j from"./Components/
|
|
1
|
+
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useState as t,useEffect as n}from"react";import{unCamelCaseWithFirstUppercase as r}from"../../../../utils/unCamelCase.js";import{disableOperatorDropdown as i}from"../../constants/connectorPosition.js";import{ConnectorHelper as l}from"../../helpers/Connector.helper.js";import{QueryBuilderConnectorType as s}from"../../types/QueryBuilder.type.js";import m from"../DropdownWrapper.js";import p from"./Components/EmojiPicker.js";import a from"./Components/FreeText.js";import u from"./Components/FrequencyIntegerPositiveSingle.js";import{PostIgPicker as d,ReelIgPicker as c,StoryIgPicker as g}from"./Components/IgPicker.js";import f from"./Components/IntegerPositiveSingle.js";import C from"./Components/IntegerSingleValue.js";import j from"./Components/InTheLast.js";import v from"./Components/MultiselectDropdownFreeText.js";import S from"./Components/NoInput.js";import I from"./Components/NumberTime.js";import T from"./Components/SingleDate.js";import P from"./Components/SingleselectDropdownFreeText.js";import y from"./Components/StringSingleValue.js";import h from"./Components/TwoDate.js";import x from"./Components/TwoNumberInputsSeperatedByAnd.js";import{Container as w}from"./Connector.styled.js";const D={FreeText:a,IntegerPositiveSingle:f,IntegerSingleValue:C,StringSingleValue:y,MultiselectDropdownFreeText:v,SingleselectDropdownFreeText:P,NoInput:S,SingleDate:T,TwoNumberInputsSeperatedByAnd:x,FrequencyIntegerPositiveSingle:u,TwoDate:h,NumberTime:I,PostIgPicker:d,ReelIgPicker:c,StoryIgPicker:g,EmojiPicker:p,InTheLast:j},b=p=>{let{isLoading:a,noDefault:u,connectorType:d,defaultConnector:c,onOperatorChange:g,onValueChange:f,connectorVal:C,extra:j,errors:v,disabled:S}=p;var I,T,P;const[y,h]=t(null),[x,b]=t(!1),F=l.getConnectorType(d).map((e=>({selected:e===c,value:e,label:r(e)})));function k(e){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];b(!0);const t=l.getConnectorComponent(d,e.value);void 0!==t?d===s.frequency&&"IntegerPositiveSingle"===t?h("FrequencyIntegerPositiveSingle"):h(t):h(null),o||g(e.value),setTimeout((()=>{b(!1)}),5)}return n((()=>{u||(c?k({value:c,label:c},!0):(null==F?void 0:F[0])&&k(F[0]))}),[c]),e(w,{children:[o("div",{children:!(null===(I=null==i?void 0:i[d])||void 0===I?void 0:I[c])&&o(m,{disabled:S,width:"200px",isLoading:x,options:F,defaultOption:null===(T=F.filter((e=>e.selected)))||void 0===T?void 0:T[0],onSelect:k})}),null!==y&&!x&&(null===(P=D[y])||void 0===P?void 0:P.call(D,{disabled:S,val:C,onChange:f,extra:j,errors:v,isLoading:a}))]})};export{b as default};
|
|
@@ -19,7 +19,8 @@ export declare enum CONNECTOR_VALUE_COMPONENT_TYPES {
|
|
|
19
19
|
PostIgPicker = "PostIgPicker",
|
|
20
20
|
ReelIgPicker = "ReelIgPicker",
|
|
21
21
|
StoryIgPicker = "StoryIgPicker",
|
|
22
|
-
EmojiPicker = "EmojiPicker"
|
|
22
|
+
EmojiPicker = "EmojiPicker",
|
|
23
|
+
InTheLast = "InTheLast"
|
|
23
24
|
}
|
|
24
25
|
export declare const INTEGER_OPERATORS_COMPONENT: {
|
|
25
26
|
is: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{QueryBuilderConnectorType as e}from"../types/QueryBuilder.type.js";import{BOOLEAN_OPERATORS as t,STRING_OPERATORS as
|
|
1
|
+
import{QueryBuilderConnectorType as e}from"../types/QueryBuilder.type.js";import{BOOLEAN_OPERATORS as t,STRING_OPERATORS as n,INTEGER_OPERATORS as i,FREQUENCY_OPERATORS as r,DATE_OPERATORS as o,SPECIFIC_IG_OPERATORS as s,ANY_IG_OPERATORS as a,REACTION_OPERATORS as l,IG_STRING_OPERATORS as g,ANY_AD_OPERATORS as c,AD_STRING_OPERATORS as u,ICE_BREAKER_OPERATORS as p}from"../types/QueryBuilderOperator.type.js";const I={[e.boolean]:t,[e.string]:n,[e.integer]:i,[e.frequency]:r,[e.date]:o,[e.specificPost]:s,[e.specificReel]:s,[e.specificStory]:s,[e.anyIg]:a,[e.reaction]:l,[e.activityString]:g,[e.anyAd]:c,[e.specificAd]:u,[e.iceBreaker]:p};var T;!function(e){e.FreeText="FreeText",e.NoInput="NoInput",e.IntegerSingleValue="IntegerSingleValue",e.StringSingleValue="StringSingleValue",e.TwoNumberInputsSeperatedByAnd="TwoNumberInputsSeperatedByAnd",e.MultiselectDropdownFreeText="MultiselectDropdownFreeText",e.SingleselectDropdownFreeText="SingleselectDropdownFreeText",e.SingleDate="SingleDate",e.TwoDate="TwoDate",e.IntegerPositiveSingle="IntegerPositiveSingle",e.NumberTime="NumberTime",e.PostIgPicker="PostIgPicker",e.ReelIgPicker="ReelIgPicker",e.StoryIgPicker="StoryIgPicker",e.EmojiPicker="EmojiPicker",e.InTheLast="InTheLast"}(T||(T={}));const S={[i.is]:T.FreeText,[i.isNot]:T.FreeText,[i.exists]:T.NoInput,[i.doesntExist]:T.NoInput,[i.lessThan]:T.IntegerSingleValue,[i.lessThanOrEqualTo]:T.IntegerSingleValue,[i.greaterThan]:T.IntegerSingleValue,[i.greaterThanOrEqualTo]:T.IntegerSingleValue},d={[n.is]:T.MultiselectDropdownFreeText,[n.isNot]:T.MultiselectDropdownFreeText,[n.contains]:T.FreeText,[n.doesntContain]:T.FreeText,[n.startsWith]:T.FreeText,[n.endsWith]:T.FreeText,[n.exists]:T.NoInput,[n.doesntExist]:T.NoInput},x={[g.any]:T.NoInput,[g.is]:T.MultiselectDropdownFreeText,[g.contains]:T.FreeText,[g.startsWith]:T.FreeText,[g.endsWith]:T.FreeText},y={[u.is]:T.SingleselectDropdownFreeText},N={[p.is]:T.MultiselectDropdownFreeText},P={[l.contains]:T.EmojiPicker},F={[o.on]:T.SingleDate,[o.notOn]:T.SingleDate,[o.inBetween]:T.TwoDate,[o.notInBetween]:T.TwoDate,[o.before]:T.SingleDate,[o.after]:T.SingleDate,[o.today]:T.NoInput,[o.yesterday]:T.NoInput,[o["last week"]]:T.NoInput,[o["last month"]]:T.NoInput,[o["last quarter"]]:T.NoInput,[o["in the last"]]:T.InTheLast},D={[s.in]:T.PostIgPicker},w={[s.in]:T.ReelIgPicker},f={[s.in]:T.StoryIgPicker},k={[a.in]:T.NoInput},m={[c.in]:T.NoInput},h={[t.isTrue]:T.NoInput,[t.isFalse]:T.NoInput,[t.exists]:T.NoInput,[t.doesntExist]:T.NoInput},v={[r.exactly]:T.IntegerPositiveSingle,[r.atleast]:T.IntegerPositiveSingle,[r.atMost]:T.IntegerPositiveSingle},B={[e.boolean]:h,[e.string]:d,[e.integer]:S,[e.frequency]:v,[e.date]:F,[e.specificPost]:D,[e.specificReel]:w,[e.specificStory]:f,[e.anyIg]:k,[e.reaction]:P,[e.activityString]:x,[e.anyAd]:m,[e.specificAd]:y,[e.iceBreaker]:N};export{y as AD_STRING_OPERATORS_COMPONENT,m as ANY_AD_OPERATORS_COMPONENT,k as ANY_IG_OPERATORS_COMPONENT,h as BOOLEAN_OPERATORS_COMPONENT,B as CONNECTOR_TYPE_TO_COMPONENT_MAP,I as CONNECTOR_TYPE_TO_OPERATORS,T as CONNECTOR_VALUE_COMPONENT_TYPES,F as DATE_OPERATORS_COMPONENT,v as FREQUENCY_OPERATORS_COMPONENT,N as ICE_BREAKER_OPERATORS_COMPONENT,x as IG_STRING_OPERATORS_COMPONENT,S as INTEGER_OPERATORS_COMPONENT,P as REACTION_OPERATORS_COMPONENT,D as SPECIFIC_IG_POST_OPERATORS_COMPONENT,w as SPECIFIC_IG_REEL_OPERATORS_COMPONENT,f as SPECIFIC_IG_STORY_OPERATORS_COMPONENT,d as STRING_OPERATORS_COMPONENT};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import s from"../../assets/icons/chevronLeft.svg.js";import o from"../../assets/icons/chevronRight.svg.js";import{StyledTablePaginationContainer as i,StyledPagingContainer as n}from"./TablePagination.styled.js";import{DEFAULT_THEME as a}from"../../constants/Theme.js";import{
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import s from"../../assets/icons/chevronLeft.svg.js";import o from"../../assets/icons/chevronRight.svg.js";import{StyledTablePaginationContainer as i,StyledPagingContainer as n}from"./TablePagination.styled.js";import{DEFAULT_THEME as a}from"../../constants/Theme.js";import{BodySecondary as r}from"../TypographyStyle.js";import{Dropdown as c}from"../dropdown/Dropdown.js";const l=l=>{let{pageNumber:d,pageSize:p,totalRows:g,updatePageNumber:h,updatePageSize:m,hidePageSizeOptions:b}=l;const j=a.colorsV2,v=(d-1)*p+1,y=(d-1)*p+p,f=Math.ceil(g/p),u=1==f;let w=[];w=f>=5?d===f?[d-4,d-3,d-2,d-1,d]:1===d?[d,d+1,d+2,d+3,d+4]:2===d?[d-1,d,d+1,d+2,d+3]:d===f-1?[d-3,d-2,d-1,d,d+1]:[d-2,d-1,d,d+1,d+2]:Array.from({length:f},((e,t)=>t+1));return e(i,{children:[!b&&t("div",{children:t(c,{size:"small",options:[{label:"5 rows per page",value:"5",selected:5===p},{label:"10 rows per page",value:"10",selected:10===p},{label:"20 rows per page",value:"20",selected:20===p}],onSelect:m,width:"162px"})}),e("div",Object.assign({className:"paging__container"},{children:[!b&&g&&e(r,Object.assign({style:{color:j.content.placeholder,marginRight:8}},{children:["Showing ",v,"-",y>g?g:y," of"," ",g," results"]})),e("div",Object.assign({className:"pages__buttons-container"},{children:[!u&&t(n,Object.assign({active:!1,onClick:()=>{1!==d&&h(Math.max(d-1,1))},disabled:1===d},{children:t(s,{color:j.content.secondary,height:14,width:14})})),w.map((e=>t(n,Object.assign({active:e==d,onClick:()=>h(e),style:{display:1==e&&g<=p?"none":"flex"}},{children:t(r,Object.assign({style:{color:e==d?j.content.primaryInverse:j.content.secondary}},{children:e}))}),e))),!u&&t(n,Object.assign({isLast:!0,active:!1,onClick:()=>{d!==f&&h(Math.min(d+1,f))},disabled:d===f},{children:t(o,{color:j.content.secondary,height:14,width:14})}))]}))]}))]})};export{l as TablePagination};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{COLORS as i}from"../../constants/Theme.js";import r from"../../assets/icons/arrow_down.svg.js";import o from"../../assets/icons/arrow_up.svg.js";import n from"../../assets/icons/info.svg.js";import{Tag as s}from"../tag/Tag.js";import{getFormattedMonthDate as a}from"../template-context-mapper/utils/getFormattedMonthDate.js";import{Tooltip as l}from"../tooltips/Tooltip.js";import{BodySecondary as c,TitleSmall as d,Caption as g,TitleLarge as m,TitleMedium as p}from"../TypographyStyle.js";import{AnalyticsTrendContainer as h}from"./CommonStyles.js";const y=r=>{let{title:o,value:a,trendPercent:d,type:g="horizontal",timeline:y,customRange:b,tooltip:f,card:u=!0,rightSeparator:j=!1,size:x="big",share:O=!1,formatVal:w,prefixSymbol:R}=r;const $="big"===x?m:p,I=void 0!==d?d<0?"negative":0===d?"neutral":"positive":void 0,T=void 0!==d?O?Math.round(d):Math.abs(Math.round(d)):void 0;return e(h,Object.assign({card:u},{children:t("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:4,borderRightWidth:j?1:0,borderRightColor:i.stroke.primary,borderRightStyle:"solid",paddingLeft:u?0:24,paddingRight:u?0:24,height:"100%"}},{children:[t("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:4,alignItems:"center"}},{children:[e(c,Object.assign({style:{color:i.content.secondary}},{children:o})),f&&e(l,Object.assign({body:f,placement:"right",width:300},{children:e("div",Object.assign({style:{display:"flex",alignItems:"center"}},{children:e(n,{color:i.content.inactive,height:16,width:16})}))}))]})),t("div",Object.assign({style:Object.assign({display:"flex",flexDirection:"row",gap:12,alignItems:"center"},O?{justifyContent:"space-between"}:{})},{children:[e($,Object.assign({style:{color:i.content.primary}},{children:void 0===a?"--":"number"==typeof a&&w?`${null!=R?R:""}${new Intl.NumberFormat("en-IN",{}).format(a)}`:`${null!=R?R:""}${a}`})),"horizontal"===g&&!O&&e(v,{timeline:y,customRange:b,percent:T,direction:I}),O&&void 0!==T&&e(s,{tagText:`${T} %`,theme:"light",type:"neutral"})]})),"vertical"===g&&!O&&e("div",Object.assign({style:{marginTop:12}},{children:e(v,{timeline:y,customRange:b,percent:T,direction:I})}))]}))}))},v=n=>{let{percent:s,direction:l,timeline:c,customRange:m}=n;const p="negative"===l?r:o,h="negative"===l?i.background.negative.vibrant:"positive"===l?i.background.positive.vibrant:i.content.placeholder,y="today"===c?"vs yesterday":"yesterday"===c?"vs 1 day before":"7 days"===c?"vs last 7 days":"30 days"===c?"vs last 30 days":"custom"===c&&m?`vs ${a(m[0])} - ${a(m[1])}`:"";return t("div",Object.assign({style:{display:"flex",alignItems:"center",flexDirection:"row"}},{children:["number"==typeof s&&e(p,{color:h,height:20,width:20,style:{marginRight:2}}),"number"==typeof s&&l&&t(d,Object.assign({style:{color:h}},{children:["neutral"===l?0:s,"%"]})),c&&e(g,Object.assign({style:{marginLeft:4,color:i.content.placeholder}},{children:y}))]}))};export{y as AnalyticsTrend};
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{COLORS as i}from"../../constants/Theme.js";import r from"../../assets/icons/arrow_down.svg.js";import o from"../../assets/icons/arrow_up.svg.js";import n from"../../assets/icons/info.svg.js";import{Tag as s}from"../tag/Tag.js";import{getFormattedMonthDate as a}from"../template-context-mapper/utils/getFormattedMonthDate.js";import{Tooltip as l}from"../tooltips/Tooltip.js";import{BodySecondary as c,TitleSmall as d,Caption as g,TitleLarge as m,TitleMedium as p}from"../TypographyStyle.js";import{AnalyticsTrendContainer as h}from"./CommonStyles.js";const y=r=>{let{title:o,value:a,trendPercent:d,type:g="horizontal",timeline:y,customRange:b,tooltip:f,card:u=!0,rightSeparator:j=!1,size:x="big",share:O=!1,formatVal:w,prefixSymbol:R}=r;const $="big"===x?m:p,I=void 0!==d?d<0?"negative":0===d?"neutral":"positive":void 0,T=void 0!==d?O?Math.round(d):Math.abs(Math.round(d)):void 0;return e(h,Object.assign({card:u},{children:t("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:4,borderRightWidth:j?1:0,borderRightColor:i.stroke.primary,borderRightStyle:"solid",paddingLeft:u?0:24,paddingRight:u?0:24,height:"100%"}},{children:[t("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:4,alignItems:"center"}},{children:[e(c,Object.assign({style:{color:i.content.secondary}},{children:o})),f&&e(l,Object.assign({body:f,placement:"right",width:300},{children:e("div",Object.assign({style:{display:"flex",alignItems:"center",cursor:"pointer"}},{children:e(n,{color:i.content.inactive,height:16,width:16})}))}))]})),t("div",Object.assign({style:Object.assign({display:"flex",flexDirection:"row",gap:12,alignItems:"center"},O?{justifyContent:"space-between"}:{})},{children:[e($,Object.assign({style:{color:i.content.primary}},{children:void 0===a?"--":"number"==typeof a&&w?`${null!=R?R:""}${new Intl.NumberFormat("en-IN",{}).format(a)}`:`${null!=R?R:""}${a}`})),"horizontal"===g&&!O&&e(v,{timeline:y,customRange:b,percent:T,direction:I}),O&&void 0!==T&&e(s,{tagText:`${T} %`,theme:"light",type:"neutral"})]})),"vertical"===g&&!O&&e("div",Object.assign({style:{marginTop:12}},{children:e(v,{timeline:y,customRange:b,percent:T,direction:I})}))]}))}))},v=n=>{let{percent:s,direction:l,timeline:c,customRange:m}=n;const p="negative"===l?r:o,h="negative"===l?i.background.negative.vibrant:"positive"===l?i.background.positive.vibrant:i.content.placeholder,y="today"===c?"vs yesterday":"yesterday"===c?"vs 1 day before":"7 days"===c?"vs last 7 days":"30 days"===c?"vs last 30 days":"custom"===c&&m?`vs ${a(m[0])} - ${a(m[1])}`:"";return t("div",Object.assign({style:{display:"flex",alignItems:"center",flexDirection:"row"}},{children:["number"==typeof s&&e(p,{color:h,height:20,width:20,style:{marginRight:2}}),"number"==typeof s&&l&&t(d,Object.assign({style:{color:h}},{children:["neutral"===l?0:s,"%"]})),c&&e(g,Object.assign({style:{marginLeft:4,color:i.content.placeholder}},{children:y}))]}))};export{y as AnalyticsTrend};
|
|
@@ -18,5 +18,6 @@ export interface BikSidebarProps {
|
|
|
18
18
|
activeSubMenu: Menu;
|
|
19
19
|
onClickingMainMenu: (menu: MenuItem) => void;
|
|
20
20
|
onClickingSubMenu: (subMenu: Menu) => void;
|
|
21
|
+
onClickingAccessUpgradePanel?: () => void;
|
|
21
22
|
}
|
|
22
23
|
export declare const BikSidebar: React.FC<BikSidebarProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as i,Fragment as n}from"react/jsx-runtime";import o from"../../assets/icons/Bik_logo.svg.js";import{useState as l,useEffect as t,Fragment as a}from"react";import{COLORS as
|
|
1
|
+
import{jsxs as e,jsx as i,Fragment as n}from"react/jsx-runtime";import o from"../../assets/icons/Bik_logo.svg.js";import{useState as l,useEffect as t,Fragment as a}from"react";import{COLORS as c}from"../../constants/Theme.js";import{SideBarContainer as s,SibeBarMenuItem as d}from"./SidebarStyles.js";import{SimpleSidebar as r}from"./SimpleSidebar.js";const v=c=>{const{logoSvg:v,allMenuList:m,activeMainMenu:h,activeSubMenu:g,onClickingMainMenu:k,onClickingSubMenu:y,onClickingAccessUpgradePanel:p}=c,[b,M]=l(h),[S,j]=l(),[f,N]=l(g);return t((()=>{M(h)}),[h]),t((()=>{N(g)}),[g]),e(s,{children:[i("div",Object.assign({className:"bik-header-logo",onClick:()=>{},onKeyDown:()=>{},"aria-hidden":"true"},{children:v||i(o,{})})),i(d,{children:null==m?void 0:m.map(((o,l)=>{var t,c,s;return e(a,{children:[i("div",Object.assign({className:"main--sidebar",onClick:()=>{var e;j(void 0),M(o),k(o),(null===(e=null==o?void 0:o.children)||void 0===e?void 0:e.length)?N(null==o?void 0:o.children[0]):N({})},onMouseOver:()=>{j(o)},onMouseEnter:()=>{j(o)},onMouseLeave:()=>{var e;!(null===(e=null==o?void 0:o.children)||void 0===e?void 0:e.length)&&j(void 0)},onFocus:()=>{console.log(";")},"aria-hidden":"true"},{children:e("div",Object.assign({className:`sidebar-menu-item ${(null==b?void 0:b.key)==o.key?" main-menu-active-class":""} ${o.isLastSticky?"sticky-menu-int":""} ${o.is2ndLastSticky?"sticky-menu":""}\n ${o.key==(null==S?void 0:S.key)?"sidebar-menu-item-hover":""}`},{children:[i(u,{icon:o.icon,isActive:o.key==(null==b?void 0:b.key),activeStateIcon:null!==(t=o.activeIcon)&&void 0!==t?t:{},hoverStateIcon:null!==(c=o.hoverIcon)&&void 0!==c?c:{},isHovered:o.key==(null==S?void 0:S.key)}),i("div",Object.assign({className:"menu-item-container"},{children:i("p",Object.assign({className:"menu-item-text "+((null==o?void 0:o.key)===(null==b?void 0:b.key)?"active-menu-item-text":"")},{children:o.displayName}))}))]}),l)}),l),i(n,{children:(null===(s=null==S?void 0:S.children)||void 0===s?void 0:s.length)&&i(r,{menuList:null==S?void 0:S.children,activeMenu:f,onMouseLeaveOnMenu:()=>j(void 0),left:88,postion:"fixed",header:S.displayName,theme:"brand",showAccessUpgradePanel:S.showAccessUpgradePanel,onMenuClick:e=>{N(e),M(S),j(void 0),y(e)},onUpgrade:p})})]},l)}))})]})},u=e=>{const{icon:o,isActive:l,activeStateIcon:t,hoverStateIcon:a,isHovered:s}=e,d=o,r=a;return i(n,{children:l?i(t,{width:20,height:20}):i(s?r:d,{width:20,height:20,color:c.surface.standard})})};export{v as BikSidebar};
|