@bikdotai/bik-component-library 0.0.283-2 → 0.0.285
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/_virtual/_commonjsHelpers.js +1 -1
- package/dist/cjs/_virtual/_tslib.js +1 -1
- package/dist/cjs/assets/bundle-421aeced.css +8 -0
- package/dist/cjs/components/QueryBuilder/Filters/Event/components/EventFilter.js +1 -1
- package/dist/cjs/components/QueryBuilder/Filters/UserProperty/components/UserPropertyFilter.js +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.js +1 -1
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/EmojiPicker.d.ts +1 -2
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/FreeText.d.ts +1 -2
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.d.ts +1 -2
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/IgPicker.d.ts +3 -4
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/InTheLast.d.ts +1 -2
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/InTheLastAgo.d.ts +1 -2
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/InTwoLast.d.ts +1 -2
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/IntegerPositiveSingle.d.ts +1 -2
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/IntegerSingleValue.d.ts +1 -2
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/MultiselectDropdownFreeText.d.ts +1 -2
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/NoInput.d.ts +1 -2
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/NumberTime.d.ts +1 -2
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/SingleDate.d.ts +1 -2
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/SingleselectDropdownFreeText.d.ts +1 -2
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/StringSingleValue.d.ts +1 -2
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/TwoDate.d.ts +1 -2
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/TwoNumberInputsSeperatedByAnd.d.ts +1 -2
- package/dist/cjs/components/QueryBuilder/constants/connector.d.ts +13 -3
- package/dist/cjs/components/QueryBuilder/constants/connector.js +1 -1
- package/dist/cjs/components/QueryBuilder/types/QueryBuilder.type.d.ts +4 -1
- package/dist/cjs/components/QueryBuilder/types/QueryBuilder.type.js +1 -1
- package/dist/cjs/components/QueryBuilder/types/QueryBuilderOperator.type.d.ts +10 -0
- package/dist/cjs/components/QueryBuilder/types/QueryBuilderOperator.type.js +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.d.ts +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.d.ts +1 -2
- package/dist/cjs/components/button/Button.styled.d.ts +1 -1
- package/dist/cjs/components/carousel/carousel.d.ts +1 -2
- package/dist/cjs/components/discount-modal/DiscountModal.d.ts +0 -1
- package/dist/cjs/components/discount-modal/DiscountModal.js +1 -1
- package/dist/cjs/components/dropdown/DropdownPopover/index.d.ts +1 -0
- package/dist/cjs/components/dropdown/DropdownPopover/index.js +1 -1
- package/dist/cjs/components/dynamic-tabs/DynamicTabs.d.ts +1 -2
- package/dist/cjs/components/image-cropper/BikImageCropper.d.ts +1 -2
- package/dist/cjs/components/image-cropper/BikImagePipeline/BikImagePipeline.d.ts +1 -2
- package/dist/cjs/components/image-cropper/BikImagePipeline/BikImagePipeline.js +1 -1
- package/dist/cjs/components/input/Input.d.ts +1 -1
- package/dist/cjs/components/keywords-input/KeywordsInput.d.ts +1 -2
- package/dist/cjs/components/postPicker/postPicker.js +1 -1
- package/dist/cjs/components/product-picker-v2/collectionScreen.d.ts +1 -1
- package/dist/cjs/components/product-picker-v2/emptyState.d.ts +1 -2
- package/dist/cjs/components/product-picker-v2/modal.d.ts +1 -2
- package/dist/cjs/components/product-picker-v2/productScreen.d.ts +3 -3
- package/dist/cjs/components/product-picker-v2/searchScreen.d.ts +1 -1
- package/dist/cjs/components/product-picker-v2/selectedScreen.d.ts +1 -1
- package/dist/cjs/components/progress-bar/ProgressBarComponent.d.ts +1 -1
- package/dist/cjs/components/searchBar/searchBar.d.ts +1 -2
- package/dist/cjs/components/spinner/Spinner.d.ts +1 -2
- package/dist/cjs/components/stepper/Stepper.d.ts +1 -2
- package/dist/cjs/components/stepper/WorkingStepper.d.ts +1 -2
- package/dist/cjs/components/tag/Tag.d.ts +1 -2
- package/dist/cjs/components/template-context-mapper/Badge/index.d.ts +1 -2
- package/dist/cjs/components/template-context-mapper/TemplateContextMapper.d.ts +1 -2
- package/dist/cjs/components/template-context-mapper/modalElements/Body.d.ts +1 -2
- package/dist/cjs/components/template-context-mapper/modalElements/EditMediaV2.d.ts +1 -2
- package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.d.ts +1 -2
- package/dist/cjs/components/template-context-mapper/modalElements/Footer.d.ts +1 -2
- package/dist/cjs/components/template-context-mapper/modalElements/Header.d.ts +1 -2
- package/dist/cjs/components/template-context-mapper/modalElements/TemplateSelectModalContent.d.ts +1 -2
- package/dist/cjs/components/template-context-mapper/modalElements/VariableConnector.d.ts +1 -2
- package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.d.ts +1 -2
- package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorsPanel.d.ts +1 -2
- package/dist/cjs/components/template-context-mapper/modalElements/VariableEditorHeader.d.ts +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.d.ts +1 -2
- package/dist/cjs/components/template-preview/SMS/SMSBubble.d.ts +1 -2
- package/dist/cjs/components/template-preview/TemplatePreview.d.ts +1 -1
- package/dist/cjs/components/template-preview/WhatsApp/ChatHeader.d.ts +1 -2
- package/dist/cjs/components/template-preview/WhatsApp/ChatUI.d.ts +1 -2
- package/dist/cjs/components/template-preview/WhatsApp/ChatUiV2.d.ts +1 -2
- package/dist/cjs/components/template-preview/WhatsApp/RenderTemplateWithVariable.d.ts +1 -2
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js +1 -1
- package/dist/cjs/node_modules/lodash.debounce/index.js +1 -1
- package/dist/esm/_virtual/_commonjsHelpers.js +1 -1
- package/dist/esm/_virtual/_tslib.js +1 -1
- package/dist/esm/assets/bundle-421aeced.css +8 -0
- package/dist/esm/components/QueryBuilder/Filters/Event/components/EventFilter.js +1 -1
- package/dist/esm/components/QueryBuilder/Filters/UserProperty/components/UserPropertyFilter.js +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/EmojiPicker.d.ts +1 -2
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/FreeText.d.ts +1 -2
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.d.ts +1 -2
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/IgPicker.d.ts +3 -4
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTheLast.d.ts +1 -2
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTheLastAgo.d.ts +1 -2
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTwoLast.d.ts +1 -2
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/IntegerPositiveSingle.d.ts +1 -2
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/IntegerSingleValue.d.ts +1 -2
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/MultiselectDropdownFreeText.d.ts +1 -2
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/NoInput.d.ts +1 -2
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/NumberTime.d.ts +1 -2
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/SingleDate.d.ts +1 -2
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/SingleselectDropdownFreeText.d.ts +1 -2
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/StringSingleValue.d.ts +1 -2
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/TwoDate.d.ts +1 -2
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/TwoNumberInputsSeperatedByAnd.d.ts +1 -2
- package/dist/esm/components/QueryBuilder/constants/connector.d.ts +13 -3
- package/dist/esm/components/QueryBuilder/constants/connector.js +1 -1
- package/dist/esm/components/QueryBuilder/types/QueryBuilder.type.d.ts +4 -1
- package/dist/esm/components/QueryBuilder/types/QueryBuilder.type.js +1 -1
- package/dist/esm/components/QueryBuilder/types/QueryBuilderOperator.type.d.ts +10 -0
- package/dist/esm/components/QueryBuilder/types/QueryBuilderOperator.type.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.d.ts +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.d.ts +1 -2
- package/dist/esm/components/button/Button.styled.d.ts +1 -1
- package/dist/esm/components/carousel/carousel.d.ts +1 -2
- package/dist/esm/components/discount-modal/DiscountModal.d.ts +0 -1
- package/dist/esm/components/discount-modal/DiscountModal.js +1 -1
- package/dist/esm/components/dropdown/DropdownPopover/index.d.ts +1 -0
- package/dist/esm/components/dropdown/DropdownPopover/index.js +1 -1
- package/dist/esm/components/dynamic-tabs/DynamicTabs.d.ts +1 -2
- package/dist/esm/components/image-cropper/BikImageCropper.d.ts +1 -2
- package/dist/esm/components/image-cropper/BikImagePipeline/BikImagePipeline.d.ts +1 -2
- package/dist/esm/components/image-cropper/BikImagePipeline/BikImagePipeline.js +1 -1
- package/dist/esm/components/input/Input.d.ts +1 -1
- package/dist/esm/components/keywords-input/KeywordsInput.d.ts +1 -2
- package/dist/esm/components/postPicker/postPicker.js +1 -1
- package/dist/esm/components/product-picker-v2/collectionScreen.d.ts +1 -1
- package/dist/esm/components/product-picker-v2/emptyState.d.ts +1 -2
- package/dist/esm/components/product-picker-v2/modal.d.ts +1 -2
- package/dist/esm/components/product-picker-v2/productScreen.d.ts +3 -3
- package/dist/esm/components/product-picker-v2/searchScreen.d.ts +1 -1
- package/dist/esm/components/product-picker-v2/selectedScreen.d.ts +1 -1
- package/dist/esm/components/progress-bar/ProgressBarComponent.d.ts +1 -1
- package/dist/esm/components/searchBar/searchBar.d.ts +1 -2
- package/dist/esm/components/spinner/Spinner.d.ts +1 -2
- package/dist/esm/components/stepper/Stepper.d.ts +1 -2
- package/dist/esm/components/stepper/WorkingStepper.d.ts +1 -2
- package/dist/esm/components/tag/Tag.d.ts +1 -2
- package/dist/esm/components/template-context-mapper/Badge/index.d.ts +1 -2
- package/dist/esm/components/template-context-mapper/TemplateContextMapper.d.ts +1 -2
- package/dist/esm/components/template-context-mapper/modalElements/Body.d.ts +1 -2
- package/dist/esm/components/template-context-mapper/modalElements/EditMediaV2.d.ts +1 -2
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.d.ts +1 -2
- package/dist/esm/components/template-context-mapper/modalElements/Footer.d.ts +1 -2
- package/dist/esm/components/template-context-mapper/modalElements/Header.d.ts +1 -2
- package/dist/esm/components/template-context-mapper/modalElements/TemplateSelectModalContent.d.ts +1 -2
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnector.d.ts +1 -2
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.d.ts +1 -2
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorsPanel.d.ts +1 -2
- package/dist/esm/components/template-context-mapper/modalElements/VariableEditorHeader.d.ts +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.d.ts +1 -2
- package/dist/esm/components/template-preview/SMS/SMSBubble.d.ts +1 -2
- package/dist/esm/components/template-preview/TemplatePreview.d.ts +1 -1
- package/dist/esm/components/template-preview/WhatsApp/ChatHeader.d.ts +1 -2
- package/dist/esm/components/template-preview/WhatsApp/ChatUI.d.ts +1 -2
- package/dist/esm/components/template-preview/WhatsApp/ChatUiV2.d.ts +1 -2
- package/dist/esm/components/template-preview/WhatsApp/RenderTemplateWithVariable.d.ts +1 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js +1 -1
- package/dist/esm/node_modules/lodash.debounce/index.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/bundle.css +0 -9
- package/dist/esm/bundle.css +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),o=require("react"),t=require("../../../../dropdown/OpenedDropdown/utils/iterationOnOptions.js"),a=require("../../../components/AllowedListDropdown.js"),l=require("../../../components/Connectors/Connector.js"),i=require("../../../helpers/ApiResponse.helper.js"),n=require("../../../hooks/useQueryBuilder.js"),u=require("../../../hooks/useQueryBuilderCache.js"),d=require("../../../types/QueryBuilder.type.js"),v=require("../../../types/QueryBuilderOperator.type.js"),s=require("../../../components/DropdownWrapper.js"),p=require("../../../components/QueryBuilderNode/Base/BaseQueryBuilderNode.js");const y=new i.ApiResponseHelper;exports.default=i=>{let{node:c,allowedNodes:f,apiHandler:T,mode:_,selectorKey:m}=i;var O,j,h,q,C,B,N,S,E,k,w,x,P,Q,b,g,A,R;const[V,D]=o.useState([]),[M,L]=o.useState(!1),{deleteProperty:$,createProperty:F,selectType:H,createMeta:J,updateMeta:K,updateProperty:U,selectPropertyJoinOperator:W,clearProperty:Y}=n.useQueryBuilder(m),{cacheWrap:G}=u.useQueryBuilderCache(),[z,I]=o.useState(!0),X=null===(O=null==c?void 0:c.metas)||void 0===O?void 0:O.find((e=>"date"===e.key)),Z=null===(j=null==c?void 0:c.metas)||void 0===j?void 0:j.find((e=>"frequency"===e.key)),ee=null===(h=null==c?void 0:c.metas)||void 0===h?void 0:h.find((e=>"eventName"===e.key)),[re,oe]=o.useState(!1),[te,ae]=o.useState(!1),[le,ie]=o.useState(!1)
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),o=require("react"),t=require("../../../../dropdown/OpenedDropdown/utils/iterationOnOptions.js"),a=require("../../../components/AllowedListDropdown.js"),l=require("../../../components/Connectors/Connector.js"),i=require("../../../helpers/ApiResponse.helper.js"),n=require("../../../hooks/useQueryBuilder.js"),u=require("../../../hooks/useQueryBuilderCache.js"),d=require("../../../types/QueryBuilder.type.js"),v=require("../../../types/QueryBuilderOperator.type.js"),s=require("../../../components/DropdownWrapper.js"),p=require("../../../components/QueryBuilderNode/Base/BaseQueryBuilderNode.js");const y=new i.ApiResponseHelper;exports.default=i=>{let{node:c,allowedNodes:f,apiHandler:T,mode:_,selectorKey:m}=i;var O,j,h,q,C,B,N,S,E,k,w,x,P,Q,b,g,A,R;const[V,D]=o.useState([]),[M,L]=o.useState(!1),{deleteProperty:$,createProperty:F,selectType:H,createMeta:J,updateMeta:K,updateProperty:U,selectPropertyJoinOperator:W,clearProperty:Y}=n.useQueryBuilder(m),{cacheWrap:G}=u.useQueryBuilderCache(),[z,I]=o.useState(!0),X=null===(O=null==c?void 0:c.metas)||void 0===O?void 0:O.find((e=>"date"===e.key)),Z=null===(j=null==c?void 0:c.metas)||void 0===j?void 0:j.find((e=>"frequency"===e.key)),ee=null===(h=null==c?void 0:c.metas)||void 0===h?void 0:h.find((e=>"eventName"===e.key)),[re,oe]=o.useState(!1),[te,ae]=o.useState(!1),[le,ie]=o.useState(!1);return o.useEffect((()=>{G((()=>T({})),"EVENT_NAMES").then((e=>{I(!1);const r=y.convertToGroupOptions(e,(null==ee?void 0:ee.value)?[ee.value]:void 0);if("create"!==_&&ee)return D([...r]),void L(!0);D([...r]),L(!0)}))}),[]),r.jsx(p.BaseQueryBuilderNode,Object.assign({selectPropertyJoinOperator:W,node:c,addPropertyBtnText:(null==ee?void 0:ee.value)&&"Add event property",deleteProperty:$,createProperty:F,propertySelectorText:"Select property",fetchPropertyData:function(){return e.__awaiter(this,void 0,void 0,(function*(){var e;return yield(e=null==ee?void 0:ee.value,G((()=>T({query:{eventName:e}})),`EVENT_NAMES_${e}`))}))},onPropertyNameSelect:function(r,o){return e.__awaiter(this,void 0,void 0,(function*(){if(U(Object.assign(Object.assign({},o),{name:r.id,dataType:r.type,operator:void 0,value:void 0,error:{}}),c._id),!r.needValuesRetrieval)return[];const e=yield((e,r)=>G((()=>T({query:{eventName:e,propertyName:r}})),`EVENT_NAMES_${e}_${r}`))(null==ee?void 0:ee.value,r.id);return null!=e?e:[]}))},onPropertyOperatorChange:function(e,r){U(Object.assign(Object.assign({},r),{operator:e,value:void 0,error:{}}),c._id)},onPropertyValueChange:function(e,r){U(Object.assign(Object.assign({},r),{value:e,error:{}}),c._id)},mode:_,onPropertyValueSearch:function(r,o){var t,a;return e.__awaiter(this,void 0,void 0,(function*(){const l=yield((r,o,t)=>e.__awaiter(void 0,void 0,void 0,(function*(){return yield T({query:{eventName:r,propertyName:o,searchKey:t}})})))(null==ee?void 0:ee.value,o.name,r);return null!==(a=null===(t=null==l?void 0:l.data)||void 0===t?void 0:t.map((e=>({label:e.name,value:e.id,selected:!1}))))&&void 0!==a?a:[]}))}},{children:r.jsxs("div",Object.assign({style:{flexDirection:"column",display:"flex",gap:12}},{children:[r.jsxs("div",Object.assign({style:{flexDirection:"row",display:"flex",gap:12}},{children:[r.jsx(a.default,{disabled:"view"===_,selectedType:c.type,allowedList:f,onSelect:function(e){oe(!0),D((e=>[...t.iterateOnOptions(e,{selected:!1})])),setTimeout((()=>{H(e.value,c._id),oe(!1)}),1)}}),!re&&r.jsx(s.default,{isSearchable:!0,isLoading:z,disabled:"view"===_,width:"200px",dropdownLabel:"Select event name",options:V,selectedValues:(null==ee?void 0:ee.value)?[ee.value]:void 0,onSelect:function(e){Array.isArray(e)||(Y(c._id),ee?K({key:"eventName",value:e.value,error:{}},c._id):J({key:"eventName",value:e.value},c._id),Z?(ae(!0),setTimeout((()=>{K({key:"frequency",value:{dataType:d.QueryBuilderConnectorType.frequency,operator:v.FREQUENCY_OPERATORS.atleast,value:1},error:{}},c._id),ae(!1)}),1)):J({key:"frequency",value:{dataType:d.QueryBuilderConnectorType.frequency,operator:v.FREQUENCY_OPERATORS.atleast,value:1}},c._id),X?(ie(!0),setTimeout((()=>{K({key:"date",value:{dataType:d.QueryBuilderConnectorType.date,operator:v.DATE_OPERATORS["last month"]},error:{}},c._id),ie(!1)}),1)):J({key:"date",value:{dataType:d.QueryBuilderConnectorType.date,operator:v.DATE_OPERATORS["last month"]}},c._id))},error:null!==(E=null!==(N=null===(B=null===(C=null===(q=c.metas)||void 0===q?void 0:q[0])||void 0===C?void 0:C.error)||void 0===B?void 0:B.key)&&void 0!==N?N:null===(S=null==ee?void 0:ee.error)||void 0===S?void 0:S.key)&&void 0!==E?E:null===(k=null==ee?void 0:ee.error)||void 0===k?void 0:k.value})]})),(null==Z?void 0:Z.key)&&!te&&r.jsx(l.default,{disabled:"view"===_,extra:{},errors:{val:null===(x=null===(w=Z.error)||void 0===w?void 0:w.value)||void 0===x?void 0:x.value,operator:null===(Q=null===(P=Z.error)||void 0===P?void 0:P.value)||void 0===Q?void 0:Q.operator},connectorVal:Z.value.value,connectorType:Z.value.dataType,defaultConnector:Z.value.operator,onOperatorChange:function(e){K({key:"frequency",value:{dataType:d.QueryBuilderConnectorType.frequency,operator:e,value:1},error:{}},c._id)},onValueChange:function(e){var r;M&&K({key:"frequency",value:{dataType:d.QueryBuilderConnectorType.frequency,operator:null===(r=null==Z?void 0:Z.value)||void 0===r?void 0:r.operator,value:e},error:{}},c._id)}}),(null==X?void 0:X.key)&&!le&&r.jsx(l.default,{disabled:"view"===_,extra:{},errors:{val:null===(g=null===(b=X.error)||void 0===b?void 0:b.value)||void 0===g?void 0:g.value,operator:null===(R=null===(A=X.error)||void 0===A?void 0:A.value)||void 0===R?void 0:R.operator},connectorVal:X.value.value,connectorType:X.value.dataType,defaultConnector:X.value.operator,onOperatorChange:function(e){K({key:"date",value:{dataType:d.QueryBuilderConnectorType.date,operator:e,value:void 0},error:{}},c._id)},onValueChange:function(e){var r;M&&K({key:"date",value:{dataType:d.QueryBuilderConnectorType.date,operator:null===(r=null==X?void 0:X.value)||void 0===r?void 0:r.operator,value:e},error:{}},c._id)}})]}))}))};
|
package/dist/cjs/components/QueryBuilder/Filters/UserProperty/components/UserPropertyFilter.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),o=require("../../../components/AllowedListDropdown.js"),i=require("../../../components/QueryBuilderNode/Property/PropertyNode.js"),t=require("../../../hooks/useQueryBuilder.js"),d=require("../../../hooks/useQueryBuilderCache.js"),a=require("../../../components/QueryBuilderNode/Base/BaseQueryBuilderNode.js");exports.default=s=>{let{node:l,allowedNodes:n,apiHandler:u,mode:p,selectorKey:c}=s;var y;const{selectType:v,createProperty:j,updateProperty:_}=t.useQueryBuilder(c),{cacheWrap:m}=d.useQueryBuilderCache()
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),o=require("../../../components/AllowedListDropdown.js"),i=require("../../../components/QueryBuilderNode/Property/PropertyNode.js"),t=require("../../../hooks/useQueryBuilder.js"),d=require("../../../hooks/useQueryBuilderCache.js"),a=require("../../../components/QueryBuilderNode/Base/BaseQueryBuilderNode.js");exports.default=s=>{let{node:l,allowedNodes:n,apiHandler:u,mode:p,selectorKey:c}=s;var y;const{selectType:v,createProperty:j,updateProperty:_}=t.useQueryBuilder(c),{cacheWrap:m}=d.useQueryBuilderCache();return r.jsx(a.BaseQueryBuilderNode,Object.assign({node:l,mode:p},{children:r.jsxs("div",Object.assign({style:{flexDirection:"row",display:"flex",gap:12,alignItems:"flex-start"}},{children:[r.jsx(o.default,{disabled:"view"===p,selectedType:l.type,allowedList:n,onSelect:e=>v(e.value,l._id)}),r.jsx(i.PropertyNodeHeadless,{mode:p,property:null===(y=null==l?void 0:l.properties)||void 0===y?void 0:y[0],fetchPropertyData:()=>m((()=>u({})),"USER_PROPERTIES"),onPropertyNameSelect:function(r){var o,i;return e.__awaiter(this,void 0,void 0,(function*(){if((null===(o=l.properties)||void 0===o?void 0:o[0])?_(Object.assign(Object.assign({},null===(i=l.properties)||void 0===i?void 0:i[0]),{name:r.id,dataType:r.type,operator:void 0,value:void 0,error:{}}),l._id):j({name:r.id,dataType:r.type},l._id),r.needValuesRetrieval){const e=yield(e=>m((()=>u({query:{propertyName:e}})),`USER_PROPERTIES-${e}`))(r.id);return null!=e?e:[]}return[]}))},onPropertyOperatorChange:function(e){_(Object.assign(Object.assign({},l.properties[0]),{operator:e,value:void 0,error:{}}),l._id)},onPropertyValueChange:function(e){_(Object.assign(Object.assign({},l.properties[0]),{value:e,error:{}}),l._id)},onPropertyValueSearch:function(r,o){var i,t;return e.__awaiter(this,void 0,void 0,(function*(){const d=yield((r,o)=>e.__awaiter(void 0,void 0,void 0,(function*(){return yield u({query:{propertyName:r,searchKey:o}})})))(o.name,r);return null!==(t=null===(i=null==d?void 0:d.data)||void 0===i?void 0:i.map((e=>({label:e.name,value:e.id,selected:!1}))))&&void 0!==t?t:[]}))}})]}))}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),t=require("react"),i=require("../../helpers/ApiResponse.helper.js"),a=require("../../hooks/useQueryBuilder.js"),o=require("../../hooks/useQueryBuilderCache.js"),s=require("../../components/DropdownWrapper.js"),n=require("../../components/QueryBuilderNode/Base/BaseQueryBuilderNode.js");const l=new i.ApiResponseHelper,u="triggerName";exports.default=i=>{let{node:d,apiHandler:c,cacheKey:p,propertyAddBtnText:v,mode:y,selectorKey:g}=i;var j;const[O,b]=t.useState([]),{updateMeta:f,createMeta:h,createProperty:m,deleteProperty:_,updateProperty:P,selectPropertyJoinOperator:x,clearProperty:B}=a.useQueryBuilder(g),{cacheWrap:q}=o.useQueryBuilderCache(),[A,N]=t.useState(!0),Q=d.metas.find((e=>e.key===u))
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),t=require("react"),i=require("../../helpers/ApiResponse.helper.js"),a=require("../../hooks/useQueryBuilder.js"),o=require("../../hooks/useQueryBuilderCache.js"),s=require("../../components/DropdownWrapper.js"),n=require("../../components/QueryBuilderNode/Base/BaseQueryBuilderNode.js");const l=new i.ApiResponseHelper,u="triggerName";exports.default=i=>{let{node:d,apiHandler:c,cacheKey:p,propertyAddBtnText:v,mode:y,selectorKey:g}=i;var j;const[O,b]=t.useState([]),{updateMeta:f,createMeta:h,createProperty:m,deleteProperty:_,updateProperty:P,selectPropertyJoinOperator:x,clearProperty:B}=a.useQueryBuilder(g),{cacheWrap:q}=o.useQueryBuilderCache(),[A,N]=t.useState(!0),Q=d.metas.find((e=>e.key===u));return t.useEffect((()=>{q((()=>c({})),p).then((e=>{var r;if(e)if(Array.isArray(e)){const t=null!==(r=null==e?void 0:e.map((e=>({label:e.name,value:e.id,description:e.description,selected:"create"!==y&&(!!(null==Q?void 0:Q.value)&&Q.value===e.id)}))))&&void 0!==r?r:[];b([...t])}else{const r=l.convertToGroupOptions(e,(null==Q?void 0:Q.value)?[Q.value]:void 0);b([...r])}N(!1)}))}),[]),r.jsx(n.BaseQueryBuilderNode,Object.assign({node:d,addPropertyBtnText:(null==Q?void 0:Q.value)&&v,deleteProperty:_,createProperty:m,propertySelectorText:"Select condition",fetchPropertyData:function(){return e.__awaiter(this,void 0,void 0,(function*(){if(null==Q?void 0:Q.value){return yield(e=null==Q?void 0:Q.value,q((()=>c({query:{triggerName:e}})),`${p}_${e}`))}var e;return null}))},onPropertyNameSelect:function(r,t){return e.__awaiter(this,void 0,void 0,(function*(){P(Object.assign(Object.assign({},t),{name:r.id,dataType:r.type,operator:void 0,value:void 0,error:{}}),d._id);const e=yield((e,r)=>q((()=>c({query:{triggerName:e,propertyName:r}})),`${p}_${e}_${r}`))(null==Q?void 0:Q.value,r.id);return e?{normalized:e,originalData:e}:[]}))},onPropertyOperatorChange:function(e,r){P(Object.assign(Object.assign({},r),{operator:e,value:void 0,error:{}}),d._id)},onPropertyValueChange:function(e,r){P(Object.assign(Object.assign({},r),{value:e}),d._id)},selectPropertyJoinOperator:x,mode:y},{children:r.jsx("div",Object.assign({style:{flexDirection:"row",display:"flex",gap:8}},{children:r.jsx(s.default,{isLoading:A,error:null===(j=null==Q?void 0:Q.error)||void 0===j?void 0:j.key,width:"200px",options:O,onSelect:function(e){Array.isArray(e)||(B(d._id),Array.isArray(O)&&b([...O.map((r=>{if(r.options){const t=r.options.map((r=>r.value===e.value?Object.assign(Object.assign({},r),{selected:!0}):Object.assign(Object.assign({},r),{selected:!1})));return Object.assign(Object.assign({},r),{options:t})}return r.value===e.value?Object.assign(Object.assign({},r),{selected:!0}):Object.assign(Object.assign({},r),{selected:!1})}))]),(null==Q?void 0:Q.key)===u?f(Object.assign(Object.assign({},Q),{value:e.value,error:{}}),d._id):h({key:u,value:e.value},d._id))}})}))}))};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ConnectorComponentProps } from "../../../types/QueryBuilderConnector.type";
|
|
3
|
-
declare const _default: (props: ConnectorComponentProps) => JSX.Element;
|
|
2
|
+
declare const _default: (props: ConnectorComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default _default;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ConnectorComponentProps } from "../../../types/QueryBuilderConnector.type";
|
|
3
|
-
declare const _default: (props: ConnectorComponentProps) => JSX.Element;
|
|
2
|
+
declare const _default: (props: ConnectorComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default _default;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ConnectorComponentProps } from "../../../types/QueryBuilderConnector.type";
|
|
3
|
-
declare const _default: (props: ConnectorComponentProps) => JSX.Element;
|
|
2
|
+
declare const _default: (props: ConnectorComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default _default;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ConnectorComponentProps } from "../../../types";
|
|
3
|
-
declare const PostIgPicker: (props: ConnectorComponentProps) => JSX.Element;
|
|
4
|
-
declare const ReelIgPicker: (props: ConnectorComponentProps) => JSX.Element;
|
|
5
|
-
declare const StoryIgPicker: (props: ConnectorComponentProps) => JSX.Element;
|
|
2
|
+
declare const PostIgPicker: (props: ConnectorComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const ReelIgPicker: (props: ConnectorComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const StoryIgPicker: (props: ConnectorComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export { PostIgPicker, ReelIgPicker, StoryIgPicker };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ConnectorComponentProps } from "../../../types/QueryBuilderConnector.type";
|
|
3
|
-
declare const InTheLastWrapper: (props: ConnectorComponentProps) => JSX.Element;
|
|
2
|
+
declare const InTheLastWrapper: (props: ConnectorComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default InTheLastWrapper;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ConnectorComponentProps } from "../../../types/QueryBuilderConnector.type";
|
|
3
|
-
declare const InTheLastAgoWrapper: (props: ConnectorComponentProps) => JSX.Element;
|
|
2
|
+
declare const InTheLastAgoWrapper: (props: ConnectorComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default InTheLastAgoWrapper;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ConnectorComponentProps } from "../../../types/QueryBuilderConnector.type";
|
|
3
|
-
declare const _default: (props: ConnectorComponentProps) => JSX.Element;
|
|
2
|
+
declare const _default: (props: ConnectorComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default _default;
|
package/dist/cjs/components/QueryBuilder/components/Connectors/Components/IntegerPositiveSingle.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ConnectorComponentProps } from "../../../types/QueryBuilderConnector.type";
|
|
3
|
-
declare const _default: (props: ConnectorComponentProps) => JSX.Element;
|
|
2
|
+
declare const _default: (props: ConnectorComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default _default;
|
package/dist/cjs/components/QueryBuilder/components/Connectors/Components/IntegerSingleValue.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ConnectorComponentProps } from "../../../types/QueryBuilderConnector.type";
|
|
3
|
-
declare const _default: (props: ConnectorComponentProps) => JSX.Element;
|
|
2
|
+
declare const _default: (props: ConnectorComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default _default;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ConnectorComponentProps } from "../../../types/QueryBuilderConnector.type";
|
|
3
|
-
declare const _default: (props: ConnectorComponentProps) => JSX.Element;
|
|
2
|
+
declare const _default: (props: ConnectorComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default _default;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ConnectorComponentProps } from "../../../types/QueryBuilderConnector.type";
|
|
3
|
-
declare const _default: (props: ConnectorComponentProps) => JSX.Element;
|
|
2
|
+
declare const _default: (props: ConnectorComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default _default;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ConnectorComponentProps } from "../../../types/QueryBuilderConnector.type";
|
|
3
|
-
declare const _default: (props: ConnectorComponentProps) => JSX.Element;
|
|
2
|
+
declare const _default: (props: ConnectorComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default _default;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ConnectorComponentProps } from "../../../types/QueryBuilderConnector.type";
|
|
3
|
-
declare const _default: (props: ConnectorComponentProps) => JSX.Element;
|
|
2
|
+
declare const _default: (props: ConnectorComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default _default;
|
package/dist/cjs/components/QueryBuilder/components/Connectors/Components/StringSingleValue.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ConnectorComponentProps } from "../../../types/QueryBuilderConnector.type";
|
|
3
|
-
declare const _default: (props: ConnectorComponentProps) => JSX.Element;
|
|
2
|
+
declare const _default: (props: ConnectorComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default _default;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ConnectorComponentProps } from "../../../types/QueryBuilderConnector.type";
|
|
3
|
-
declare const _default: (props: ConnectorComponentProps) => JSX.Element;
|
|
2
|
+
declare const _default: (props: ConnectorComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default _default;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ConnectorComponentProps } from "../../../types/QueryBuilderConnector.type";
|
|
3
|
-
declare const _default: (props: ConnectorComponentProps) => JSX.Element;
|
|
2
|
+
declare const _default: (props: ConnectorComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { QueryBuilderConnectorType } from '../types/QueryBuilder.type';
|
|
2
|
-
import { AD_STRING_OPERATORS, ANY_AD_OPERATORS, ANY_IG_OPERATORS, BOOLEAN_OPERATORS, DATE_OPERATORS, FREQUENCY_OPERATORS, ICE_BREAKER_OPERATORS, IG_STRING_OPERATORS, INTEGER_OPERATORS, REACTION_OPERATORS, SPECIFIC_IG_OPERATORS, STRING_OPERATORS, STRING_RESTRICTED_OPERATORS } from '../types/QueryBuilderOperator.type';
|
|
3
|
-
type CONNECTOR_OPERATORS_TYPE = typeof BOOLEAN_OPERATORS | typeof STRING_OPERATORS | typeof STRING_RESTRICTED_OPERATORS | typeof INTEGER_OPERATORS | typeof FREQUENCY_OPERATORS | typeof DATE_OPERATORS | typeof SPECIFIC_IG_OPERATORS | typeof ANY_IG_OPERATORS | typeof REACTION_OPERATORS | typeof IG_STRING_OPERATORS | typeof ANY_AD_OPERATORS | typeof AD_STRING_OPERATORS | typeof ICE_BREAKER_OPERATORS;
|
|
2
|
+
import { AD_STRING_OPERATORS, ANY_AD_OPERATORS, ANY_IG_OPERATORS, BOOLEAN_OPERATORS, DATE_OPERATORS, FREQUENCY_OPERATORS, ICE_BREAKER_OPERATORS, IG_STRING_OPERATORS, INTEGER_OPERATORS, MAIL_SUBJECT_OPERATORS, REACTION_OPERATORS, SPECIFIC_IG_OPERATORS, STRING_OPERATORS, STRING_RESTRICTED_OPERATORS, STRING_RESTRICTED_OPERATORS_2, STRING_RESTRICTED_OPERATORS_3 } from '../types/QueryBuilderOperator.type';
|
|
3
|
+
type CONNECTOR_OPERATORS_TYPE = typeof BOOLEAN_OPERATORS | typeof STRING_OPERATORS | typeof STRING_RESTRICTED_OPERATORS | typeof STRING_RESTRICTED_OPERATORS_2 | typeof STRING_RESTRICTED_OPERATORS_3 | typeof INTEGER_OPERATORS | typeof FREQUENCY_OPERATORS | typeof DATE_OPERATORS | typeof SPECIFIC_IG_OPERATORS | typeof ANY_IG_OPERATORS | typeof REACTION_OPERATORS | typeof IG_STRING_OPERATORS | typeof ANY_AD_OPERATORS | typeof AD_STRING_OPERATORS | typeof ICE_BREAKER_OPERATORS | typeof MAIL_SUBJECT_OPERATORS;
|
|
4
4
|
export declare const CONNECTOR_TYPE_TO_OPERATORS: {
|
|
5
5
|
[key in QueryBuilderConnectorType]: CONNECTOR_OPERATORS_TYPE;
|
|
6
6
|
};
|
|
@@ -50,6 +50,16 @@ export declare const STRING_RESTRICTED_OPERATORS_COMPONENT: {
|
|
|
50
50
|
exists: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
51
51
|
doesntExist: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
52
52
|
};
|
|
53
|
+
export declare const STRING_RESTRICTED_OPERATORS_2_COMPONENT: {
|
|
54
|
+
is: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
55
|
+
isNot: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
56
|
+
};
|
|
57
|
+
export declare const STRING_RESTRICTED_OPERATORS_3_COMPONENT: {
|
|
58
|
+
is: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
59
|
+
};
|
|
60
|
+
export declare const MAIL_SUBJECT_OPERATORS_COMPONENT: {
|
|
61
|
+
contains: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
62
|
+
};
|
|
53
63
|
export declare const IG_STRING_OPERATORS_COMPONENT: {
|
|
54
64
|
any: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
55
65
|
is: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
@@ -113,6 +123,6 @@ export declare const FREQUENCY_OPERATORS_COMPONENT: {
|
|
|
113
123
|
atMost: CONNECTOR_VALUE_COMPONENT_TYPES;
|
|
114
124
|
};
|
|
115
125
|
export declare const CONNECTOR_TYPE_TO_COMPONENT_MAP: {
|
|
116
|
-
[x in QueryBuilderConnectorType]: typeof BOOLEAN_OPERATORS_COMPONENT | typeof STRING_OPERATORS_COMPONENT | typeof STRING_RESTRICTED_OPERATORS | typeof INTEGER_OPERATORS_COMPONENT | typeof FREQUENCY_OPERATORS_COMPONENT | typeof DATE_OPERATORS_COMPONENT | typeof SPECIFIC_IG_POST_OPERATORS_COMPONENT | typeof SPECIFIC_IG_REEL_OPERATORS_COMPONENT | typeof SPECIFIC_IG_STORY_OPERATORS_COMPONENT | typeof ANY_IG_OPERATORS_COMPONENT | typeof REACTION_OPERATORS_COMPONENT | typeof IG_STRING_OPERATORS_COMPONENT | typeof ANY_AD_OPERATORS_COMPONENT | typeof AD_STRING_OPERATORS_COMPONENT | typeof ICE_BREAKER_OPERATORS_COMPONENT;
|
|
126
|
+
[x in QueryBuilderConnectorType]: typeof BOOLEAN_OPERATORS_COMPONENT | typeof STRING_OPERATORS_COMPONENT | typeof STRING_RESTRICTED_OPERATORS | typeof STRING_RESTRICTED_OPERATORS_2_COMPONENT | typeof STRING_RESTRICTED_OPERATORS_3_COMPONENT | typeof MAIL_SUBJECT_OPERATORS_COMPONENT | typeof INTEGER_OPERATORS_COMPONENT | typeof FREQUENCY_OPERATORS_COMPONENT | typeof DATE_OPERATORS_COMPONENT | typeof SPECIFIC_IG_POST_OPERATORS_COMPONENT | typeof SPECIFIC_IG_REEL_OPERATORS_COMPONENT | typeof SPECIFIC_IG_STORY_OPERATORS_COMPONENT | typeof ANY_IG_OPERATORS_COMPONENT | typeof REACTION_OPERATORS_COMPONENT | typeof IG_STRING_OPERATORS_COMPONENT | typeof ANY_AD_OPERATORS_COMPONENT | typeof AD_STRING_OPERATORS_COMPONENT | typeof ICE_BREAKER_OPERATORS_COMPONENT;
|
|
117
127
|
};
|
|
118
128
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
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.string_restricted]:O.STRING_RESTRICTED_OPERATORS,[e.QueryBuilderConnectorType.string_restricted_2]:O.STRING_RESTRICTED_OPERATORS_2,[e.QueryBuilderConnectorType.string_restricted_3]:O.STRING_RESTRICTED_OPERATORS_3,[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,[e.QueryBuilderConnectorType.mailSubject]:O.MAIL_SUBJECT_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={[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.STRING_OPERATORS.is]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.MultiselectDropdownFreeText,[O.STRING_OPERATORS.isNot]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.MultiselectDropdownFreeText,[O.STRING_OPERATORS.exists]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.STRING_OPERATORS.doesntExist]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput},R={[O.STRING_OPERATORS.is]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText,[O.STRING_OPERATORS.isNot]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText},r={[O.STRING_OPERATORS.is]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.SingleselectDropdownFreeText},C={[O.STRING_OPERATORS.contains]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.FreeText},P={[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},o={[O.AD_STRING_OPERATORS.is]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.SingleselectDropdownFreeText},S={[O.ICE_BREAKER_OPERATORS.is]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.MultiselectDropdownFreeText},A={[O.REACTION_OPERATORS.contains]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.EmojiPicker},n={[O.DATE_OPERATORS.today]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.DATE_OPERATORS.yesterday]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.DATE_OPERATORS["last 30 days"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.DATE_OPERATORS["last 7 days"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.DATE_OPERATORS["this month"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.DATE_OPERATORS["this week"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.DATE_OPERATORS["last month"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.DATE_OPERATORS["last week"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput,[O.DATE_OPERATORS.exactly]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.InTheLastAgo,[O.DATE_OPERATORS["in the last"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.InTheLast,[O.DATE_OPERATORS["in between last"]]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.InTwoLast,[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},s={[O.SPECIFIC_IG_OPERATORS.in]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.PostIgPicker},i={[O.SPECIFIC_IG_OPERATORS.in]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.ReelIgPicker},p={[O.SPECIFIC_IG_OPERATORS.in]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.StoryIgPicker},I={[O.ANY_IG_OPERATORS.in]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput},u={[O.ANY_AD_OPERATORS.in]:exports.CONNECTOR_VALUE_COMPONENT_TYPES.NoInput},x={[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},l={[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},y={[e.QueryBuilderConnectorType.boolean]:x,[e.QueryBuilderConnectorType.string]:_,[e.QueryBuilderConnectorType.integer]:N,[e.QueryBuilderConnectorType.frequency]:l,[e.QueryBuilderConnectorType.date]:n,[e.QueryBuilderConnectorType.specificPost]:s,[e.QueryBuilderConnectorType.specificReel]:i,[e.QueryBuilderConnectorType.specificStory]:p,[e.QueryBuilderConnectorType.anyIg]:I,[e.QueryBuilderConnectorType.reaction]:A,[e.QueryBuilderConnectorType.activityString]:P,[e.QueryBuilderConnectorType.anyAd]:u,[e.QueryBuilderConnectorType.specificAd]:o,[e.QueryBuilderConnectorType.iceBreaker]:S,[e.QueryBuilderConnectorType.string_restricted]:t,[e.QueryBuilderConnectorType.string_restricted_2]:R,[e.QueryBuilderConnectorType.string_restricted_3]:r,[e.QueryBuilderConnectorType.mailSubject]:C};exports.AD_STRING_OPERATORS_COMPONENT=o,exports.ANY_AD_OPERATORS_COMPONENT=u,exports.ANY_IG_OPERATORS_COMPONENT=I,exports.BOOLEAN_OPERATORS_COMPONENT=x,exports.CONNECTOR_TYPE_TO_COMPONENT_MAP=y,exports.CONNECTOR_TYPE_TO_OPERATORS=E,exports.DATE_OPERATORS_COMPONENT=n,exports.FREQUENCY_OPERATORS_COMPONENT=l,exports.ICE_BREAKER_OPERATORS_COMPONENT=S,exports.IG_STRING_OPERATORS_COMPONENT=P,exports.INTEGER_OPERATORS_COMPONENT=N,exports.MAIL_SUBJECT_OPERATORS_COMPONENT=C,exports.REACTION_OPERATORS_COMPONENT=A,exports.SPECIFIC_IG_POST_OPERATORS_COMPONENT=s,exports.SPECIFIC_IG_REEL_OPERATORS_COMPONENT=i,exports.SPECIFIC_IG_STORY_OPERATORS_COMPONENT=p,exports.STRING_OPERATORS_COMPONENT=_,exports.STRING_RESTRICTED_OPERATORS_2_COMPONENT=R,exports.STRING_RESTRICTED_OPERATORS_3_COMPONENT=r,exports.STRING_RESTRICTED_OPERATORS_COMPONENT=t;
|
|
@@ -16,6 +16,8 @@ export declare enum QueryBuilderJoinOperators {
|
|
|
16
16
|
export declare enum QueryBuilderConnectorType {
|
|
17
17
|
'string' = "string",
|
|
18
18
|
'string_restricted' = "string_restricted",
|
|
19
|
+
'string_restricted_2' = "string_restricted_2",
|
|
20
|
+
'string_restricted_3' = "string_restricted_3",
|
|
19
21
|
'integer' = "integer",
|
|
20
22
|
'boolean' = "boolean",
|
|
21
23
|
'date' = "date",
|
|
@@ -28,7 +30,8 @@ export declare enum QueryBuilderConnectorType {
|
|
|
28
30
|
'reaction' = "reaction",
|
|
29
31
|
'activityString' = "activityString",
|
|
30
32
|
'specificAd' = "specificAd",
|
|
31
|
-
'iceBreaker' = "iceBreaker"
|
|
33
|
+
'iceBreaker' = "iceBreaker",
|
|
34
|
+
'mailSubject' = "mailSubject"
|
|
32
35
|
}
|
|
33
36
|
export interface QueryBuilderConnector {
|
|
34
37
|
dataType: QueryBuilderConnectorType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,r,i;Object.defineProperty(exports,"__esModule",{value:!0}),exports.QueryBuilderType=void 0,(e=exports.QueryBuilderType||(exports.QueryBuilderType={})).SEGMENT_FILTER="SEGMENT_FILTER",e.EVENT_FILTER="EVENT_FILTER",e.NO_EVENT_FILTER="NO_EVENT_FILTER",e.USER_PROPERTY_FILTER="USER_PROPERTY_FILTER",e.IG_TRIGGER="IG_TRIGGER",e.CTWA_TRIGGER="CTWA_TRIGGER",e.EVENTS_TRIGGER="EVENTS_TRIGGER",exports.QueryBuilderJoinOperators=void 0,(r=exports.QueryBuilderJoinOperators||(exports.QueryBuilderJoinOperators={})).AND="AND",r.OR="OR",exports.QueryBuilderConnectorType=void 0,(i=exports.QueryBuilderConnectorType||(exports.QueryBuilderConnectorType={})).string="string",i.string_restricted="string_restricted",i.integer="integer",i.boolean="boolean",i.date="date",i.frequency="frequency",i.anyIg="anyIg",i.anyAd="anyAd",i.specificPost="specificPost",i.specificReel="specificReel",i.specificStory="specificStory",i.reaction="reaction",i.activityString="activityString",i.specificAd="specificAd",i.iceBreaker="iceBreaker";
|
|
1
|
+
"use strict";var e,r,i;Object.defineProperty(exports,"__esModule",{value:!0}),exports.QueryBuilderType=void 0,(e=exports.QueryBuilderType||(exports.QueryBuilderType={})).SEGMENT_FILTER="SEGMENT_FILTER",e.EVENT_FILTER="EVENT_FILTER",e.NO_EVENT_FILTER="NO_EVENT_FILTER",e.USER_PROPERTY_FILTER="USER_PROPERTY_FILTER",e.IG_TRIGGER="IG_TRIGGER",e.CTWA_TRIGGER="CTWA_TRIGGER",e.EVENTS_TRIGGER="EVENTS_TRIGGER",exports.QueryBuilderJoinOperators=void 0,(r=exports.QueryBuilderJoinOperators||(exports.QueryBuilderJoinOperators={})).AND="AND",r.OR="OR",exports.QueryBuilderConnectorType=void 0,(i=exports.QueryBuilderConnectorType||(exports.QueryBuilderConnectorType={})).string="string",i.string_restricted="string_restricted",i.string_restricted_2="string_restricted_2",i.string_restricted_3="string_restricted_3",i.integer="integer",i.boolean="boolean",i.date="date",i.frequency="frequency",i.anyIg="anyIg",i.anyAd="anyAd",i.specificPost="specificPost",i.specificReel="specificReel",i.specificStory="specificStory",i.reaction="reaction",i.activityString="activityString",i.specificAd="specificAd",i.iceBreaker="iceBreaker",i.mailSubject="mailSubject";
|
|
@@ -28,6 +28,13 @@ export declare enum STRING_RESTRICTED_OPERATORS {
|
|
|
28
28
|
exists = "exists",
|
|
29
29
|
doesntExist = "doesntExist"
|
|
30
30
|
}
|
|
31
|
+
export declare enum STRING_RESTRICTED_OPERATORS_2 {
|
|
32
|
+
is = "is",
|
|
33
|
+
isNot = "isNot"
|
|
34
|
+
}
|
|
35
|
+
export declare enum STRING_RESTRICTED_OPERATORS_3 {
|
|
36
|
+
is = "is"
|
|
37
|
+
}
|
|
31
38
|
export declare enum IG_STRING_OPERATORS {
|
|
32
39
|
any = "any",
|
|
33
40
|
is = "is",
|
|
@@ -53,6 +60,9 @@ export declare enum ANY_AD_OPERATORS {
|
|
|
53
60
|
export declare enum REACTION_OPERATORS {
|
|
54
61
|
contains = "contains"
|
|
55
62
|
}
|
|
63
|
+
export declare enum MAIL_SUBJECT_OPERATORS {
|
|
64
|
+
contains = "contains"
|
|
65
|
+
}
|
|
56
66
|
export declare enum DATE_OPERATORS {
|
|
57
67
|
today = "today",
|
|
58
68
|
yesterday = "yesterday",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t,s,o,
|
|
1
|
+
"use strict";var e,t,s,R,o,T,E,i,n;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.STRING_RESTRICTED_OPERATORS=void 0,(s=exports.STRING_RESTRICTED_OPERATORS||(exports.STRING_RESTRICTED_OPERATORS={})).is="is",s.isNot="isNot",s.exists="exists",s.doesntExist="doesntExist",exports.STRING_RESTRICTED_OPERATORS_2=void 0,(R=exports.STRING_RESTRICTED_OPERATORS_2||(exports.STRING_RESTRICTED_OPERATORS_2={})).is="is",R.isNot="isNot",exports.STRING_RESTRICTED_OPERATORS_3=void 0,(exports.STRING_RESTRICTED_OPERATORS_3||(exports.STRING_RESTRICTED_OPERATORS_3={})).is="is",exports.IG_STRING_OPERATORS=void 0,(o=exports.IG_STRING_OPERATORS||(exports.IG_STRING_OPERATORS={})).any="any",o.is="is",o.contains="contains",o.startsWith="startsWith",o.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.MAIL_SUBJECT_OPERATORS=void 0,(exports.MAIL_SUBJECT_OPERATORS||(exports.MAIL_SUBJECT_OPERATORS={})).contains="contains",exports.DATE_OPERATORS=void 0,(T=exports.DATE_OPERATORS||(exports.DATE_OPERATORS={})).today="today",T.yesterday="yesterday",T["last 7 days"]="last 7 days",T["last 30 days"]="last 30 days",T["this week"]="this week",T["last week"]="last week",T["this month"]="this month",T["last month"]="last month",T.exactly="exactly",T["not exactly"]="not exactly",T["in the last"]="in the last",T["not in the last"]="not in the last",T["in between last"]="in between last",T["not in between last"]="not in between last",T.on="on",T.notOn="notOn",T.inBetween="inBetween",T.notInBetween="notInBetween",T.before="before",T.after="after",T["last quarter"]="last quarter",exports.BOOLEAN_OPERATORS=void 0,(E=exports.BOOLEAN_OPERATORS||(exports.BOOLEAN_OPERATORS={})).isTrue="isTrue",E.isFalse="isFalse",E.exists="exists",E.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,(n=exports.EVENT_VALUES||(exports.EVENT_VALUES={})).FreeText="FreeText",n.NoInput="NoInput",n.IntegerSingleValue="IntegerSingleValue",n.StringSingleValue="StringSingleValue",n.TwoNumberInputsSeperatedByAnd="TwoNumberInputsSeperatedByAnd",n.MultiselectDropdownFreeText="MultiselectDropdownFreeText",n.SingleselectDropdownFreeText="SingleselectDropdownFreeText",n.SingleDate="SingleDate",n.TwoDate="TwoDate",n.IntegerPositiveSingle="IntegerPositiveSingle",n.NumberTime="NumberTime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PieChartInputData } from "./PieChartInputData";
|
|
3
|
-
export declare const Card: (props: any) => JSX.Element;
|
|
3
|
+
export declare const Card: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export declare const PieChartAnalytics: React.FC<PieChartInputData>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/styled/base"),r=require("react/jsx-runtime"),g=require("../../../../utils/StringUtils.js"),i=require("../../../../constants/Theme.js"),t=require("react");require("../../../checkBox/CheckBox.styled.js");var I=require("../../../TypographyStyle.js");require("../../../list-item/ListItem.js"),require("../../../pagination/Pagination.js"),require("../../../radioButton/RadioButton.styled.js"),require("react-dom"),require("react-toastify"),require("../../../toaster/Toaster.styled.js"),require("@tippyjs/react"),require("../../../tooltips/TooltipInternal.js"),require("../../../spinner/Spinner.js"),require("../../../stepper/Stepper.styled.js"),require("../../../tag/Tag.js"),require("../../../icon-button/IconButton.js"),require("../../../template-preview/TemplatePreview.js"),require("../../../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),require("../../../template-preview/models/TemplateMeta.js"),require("../../../modals/styledModal.js"),require("../../../template-preview/models/Channels.js"),require("../../../template-context-mapper/context/templateModalContext.js"),require("../../../template-context-mapper/modalElements/Footer.js"),require("../../../template-context-mapper/modalElements/Body.js"),require("../../../template-context-mapper/modalElements/Header.js"),require("../../../zeroState/ZeroState.js"),require("../../../dropdown/OpenedDropdown/components/description/Description.styled.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"),require("../../../input/Input.js"),require("react-bootstrap"),require("../../../floating-action-button/FloatingActionButton.styles.js"),require("../../../image-compress/ImageCompress.js"),require("../../../progress-bar/ProgressBarComponent.js"),require("../../../QueryBuilder/QueryBuilder.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),require("../../../QueryBuilder/constants/connectorPosition.js"),require("../../../QueryBuilder/constants/connector.js"),require("../../../QueryBuilder/types/QueryBuilder.type.js"),require("../../../dropdown/Dropdown.js"),require("../../../QueryBuilder/components/InputLoader.js"),require("../../../QueryBuilder/components/Connectors/Components/EmojiPicker.js"),require("react-chips"),require("../../../input/ChipInput.styled.js"),require("../../../QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js"),require("../../../QueryBuilder/components/Connectors/Components/IgPicker.js"),require("../../../QueryBuilder/components/Connectors/Components/InTheLast.js"),require("../../../QueryBuilder/components/Connectors/Components/InTwoLast.js"),require("react-calendar"),require("../../../../utils/DateUtils.js"),require("../../../datePicker/DatePickerWrapper.styled.js"),require("../../../QueryBuilder/components/Connectors/Connector.styled.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.styled.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.styled.js"),require("../../../QueryBuilder/redux/queryBuilder.reducer.js"),require("../../../QueryBuilder/redux/queryBuilderCache.reducer.js"),require("../../../QueryBuilder/types/QueryBuilderOperator.type.js"),require("../../../dropdown/DropdownPopover/index.js"),require("../../../dropdown/ChipDropdown.js"),require("../../../dropdown/MenuItem/MenuItem.js"),require("../../../shimmer/ShimmerComponent/ShimmerStyled.js"),require("../../../analytics-card/AnalyticsCard.styled.js"),require("../../CommonStyles.js"),require("../../../datePicker/DatePicker.styled.js"),require("../../AnalyticsMetric.js"),require("../LineChart/LineChart.js"),require("../linearChipGroupedChart/LinearChipGroupedChart.styled.js");var C=require("./PieChart.js");require("../HorizontalBarGraph/HorizontalGraph.js"),require("../StackedBarChart/StackedBarChart.js"),require("../VerticalBarGraph/VerticalGraph.js"),require("../heatmap/HeatMap.js"),require("../VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js"),require("../../../avatar/Avatar.js"),require("../../../avatar/AvatarHelper.js"),require("../../../alerts/Alert.styled.js"),require("../../../alerts/AlertHelper.js"),require("../../../thumbnail/Thumbnail.js"),require("../../../curtain/Curtain.styled.js"),require("../../../curtain/CurtainHelper.js"),require("../../../switch/Switch.js"),require("../../../plans/SubscriptionPlanStyled.js"),require("../../../plans/SubscriptionPlanSelector.js"),require("../../../tabs/Tabs.js"),require("../../../TablePagination/TablePagination.styled.js"),require("../../../TablePagination/TablePaginationCard.js"),require("../../../../constants/zindex.js"),require("../../../states/StateComponent.js"),require("../../../WhatsAppTextEditor/WhatsAppTextEditor.js"),require("../../../WhatsAppTextEditor/WhatsAppTextEditorHeader.js"),require("../../../card-selection-modal/CardSelectionModal.styled.js"),require("react-image-crop"),require("../../../buttonGroup/ButtonGroupStyle.js"),require("../../../accordion/Accordion.style.js"),require("../../../accordion/AccordionArrow.js"),require("../../../file-uploader/FileUploaderStyle.js"),require("../../../colourInput/ColourInput.styled.js"),require("../../../bik-layout/CommonStyles.js"),require("../../../navigation-hyperlink/NavigationHyperlink.js"),require("../../../bik-layout/SidebarStyles.js"),require("date-fns"),require("react-popper"),require("../../../dropdown/Common.styled.js"),require("../../../custom-date-time/CustomDateTime.styled.js"),require("../../../../node_modules/lodash.debounce/index.js"),require("../../../product-picker/ProductPicker.styled.js"),require("../../../discount-modal/type.js"),require("../../../discount-modal/DiscountModal.styled.js"),require("../../../discount-modal/DynamicCoupon/DynamicCoupon.js"),require("../../../discount-modal/CouponExpiration/CouponExpiration.js"),require("../../../country-code-picker/CountryCodePicker.styled.js"),require("../../../product-picker-v2/emptyState.js"),require("../../../product-picker-v2/style.js"),require("lodash"),require("../../../carousel/carousel.js"),require("../../../carousel-secondary/CarouselSecondary.style.js"),require("../../../access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.styles.js"),require("../../../radioList/RadioList.styled.js"),require("../../../checkList/CheckList.styled.js"),require("../../../postPicker/postPicker.js"),require("../../../dropdown-button/DropdownButton.style.js"),require("../../../side-modal/SideModal.style.js"),require("../../../add-variableV2/AddVariableV2.styled.js"),require("../../../SearchFilter/types/SearchFilter.type.js"),require("../../../SearchFilter/components/DatePickerButton.js");var s=require("chart.js"),c=require("react-chartjs-2");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var A=o(e);s.Chart.register(s.ArcElement,s.Legend);const a={plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:e=>{if(!e.label)return" 0%";const r=e.dataset.data.reduce(((e,r)=>e+r),0),g=parseFloat((e.raw/r*100).toFixed(1));return` ${e.label}: ${g}%`}}}}},l=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],d=A.default("div","production"===process.env.NODE_ENV?{target:"elaov7f0"}:{target:"elaov7f0",label:"CartStyled"})("background:",(e=>i.COLORS.surface.standard),";border:1px solid ",(e=>i.COLORS.stroke.primary),";border-radius:4px;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQzhCIiwiZmlsZSI6IlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltc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HRoOiAwLFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgY29uc3QgZGF0YVNldCA9IHtcclxuICAgICAgICAgICAgICAgIGxhYmVsczogc2xpY2VzLm1hcCgoc2xpY2UpID0+IFN0cmluZ1V0aWxzLmNhcGl0YWxpemUoc2xpY2UubmFtZSkpLFxyXG4gICAgICAgICAgICAgICAgZGF0YXNldHM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IHNsaWNlcy5tYXAoKHNsaWNlKSA9PiBzbGljZS5jb3VudCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogc2xpY2VzLm1hcCgoc2xpY2UsIGluZGV4KSA9PiB7IHZhciBfYTsgcmV0dXJuIChfYSA9IHNsaWNlLmNvbG9yKSAhPT0gbnVsbCAmJiBfYSAhPT0gdm9pZCAwID8gX2EgOiBHUkFQSF9DT0xPUlNbaW5kZXggJSBHUkFQSF9DT0xPUlMubGVuZ3RoXTsgfSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlckNvbG9yOiBbJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiA0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJSYWRpdXM6IDgsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIHNldERhdGEoZGF0YVNldCk7XHJcbiAgICAgICAgfVxyXG4gICAg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AgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGV4RGlyZWN0aW9uOiAnY29sdW1uJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnY2VudGVyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KFBpZUNoYXJ0LCB7IHNsaWNlczogc2xpY2VzV2l0aENvbG9yIH0pIH0pKV0gfSkpXSB9KSk7XHJcbn07XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPVBpZUNoYXJ0QW5hbHl0aWNzLmpzLm1hcCJdfQ== */"));exports.Card=e=>r.jsx(d,Object.assign({style:{padding:24}},{children:e.children})),exports.PieChartAnalytics=e=>{let{title:i,slices:s,size:o}=e;const[A,d]=t.useState([]),[u,n]=t.useState();return t.useEffect((()=>{const e=s.reduce(((e,r)=>e+r.count),0);let r=[];if(r=Object.keys(s).map(((e,r)=>Object.assign({color:l[r%l.length]},s[e]))),d([...r]),0===e){n({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}]})}else{const e={labels:s.map((e=>g.default.capitalize(e.name))),datasets:[{data:s.map((e=>e.count)),backgroundColor:s.map(((e,r)=>{var g;return null!==(g=e.color)&&void 0!==g?g:l[r%l.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};n(e)}}),[s]),u?r.jsxs(r.Fragment,{children:[i&&r.jsx(I.TitleMedium,Object.assign({style:{marginBottom:16}},{children:i})),r.jsxs("div",Object.assign({className:"row"},{children:[r.jsx("div",Object.assign({className:"col-6"},{children:r.jsx("div",Object.assign({style:{width:o,height:o}},{children:r.jsx(c.Doughnut,{data:u,options:Object.assign(Object.assign({},a),{maintainAspectRatio:!o})})}))})),r.jsx("div",Object.assign({className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"center"}},{children:r.jsx(C.PieChart,{slices:A})}))]}))]}):r.jsx(r.Fragment,{})};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/styled/base"),r=require("react/jsx-runtime"),i=require("../../../../utils/StringUtils.js"),g=require("../../../../constants/Theme.js"),t=require("react");require("../../../checkBox/CheckBox.styled.js");var I=require("../../../TypographyStyle.js");require("../../../list-item/ListItem.js"),require("../../../pagination/Pagination.js"),require("../../../radioButton/RadioButton.styled.js"),require("react-dom"),require("react-toastify"),require("../../../toaster/Toaster.styled.js"),require("@tippyjs/react"),require("../../../tooltips/TooltipInternal.js"),require("../../../spinner/Spinner.js"),require("../../../stepper/Stepper.styled.js"),require("../../../tag/Tag.js"),require("../../../icon-button/IconButton.js"),require("../../../template-preview/TemplatePreview.js"),require("../../../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),require("../../../template-preview/models/TemplateMeta.js"),require("../../../modals/styledModal.js"),require("../../../template-preview/models/Channels.js"),require("../../../template-context-mapper/context/templateModalContext.js"),require("../../../template-context-mapper/modalElements/Footer.js"),require("../../../template-context-mapper/modalElements/Body.js"),require("../../../template-context-mapper/modalElements/Header.js"),require("../../../zeroState/ZeroState.js"),require("../../../dropdown/OpenedDropdown/components/description/Description.styled.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"),require("../../../input/Input.js"),require("react-bootstrap"),require("../../../floating-action-button/FloatingActionButton.styles.js"),require("../../../image-compress/ImageCompress.js"),require("../../../progress-bar/ProgressBarComponent.js"),require("../../../QueryBuilder/QueryBuilder.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),require("../../../QueryBuilder/constants/connectorPosition.js"),require("../../../QueryBuilder/constants/connector.js"),require("../../../QueryBuilder/types/QueryBuilder.type.js"),require("../../../dropdown/Dropdown.js"),require("../../../QueryBuilder/components/InputLoader.js"),require("../../../QueryBuilder/components/Connectors/Components/EmojiPicker.js"),require("react-chips"),require("../../../input/ChipInput.styled.js"),require("../../../QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js"),require("../../../QueryBuilder/components/Connectors/Components/IgPicker.js"),require("../../../QueryBuilder/components/Connectors/Components/InTheLast.js"),require("../../../QueryBuilder/components/Connectors/Components/InTwoLast.js"),require("react-calendar"),require("../../../../utils/DateUtils.js"),require("../../../datePicker/DatePickerWrapper.styled.js"),require("../../../QueryBuilder/components/Connectors/Connector.styled.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.styled.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.styled.js"),require("../../../QueryBuilder/redux/queryBuilder.reducer.js"),require("../../../QueryBuilder/redux/queryBuilderCache.reducer.js"),require("../../../QueryBuilder/types/QueryBuilderOperator.type.js"),require("../../../dropdown/DropdownPopover/index.js"),require("../../../dropdown/ChipDropdown.js"),require("../../../dropdown/MenuItem/MenuItem.js"),require("../../../shimmer/ShimmerComponent/ShimmerStyled.js"),require("../../../analytics-card/AnalyticsCard.styled.js"),require("../../CommonStyles.js"),require("../../../datePicker/DatePicker.styled.js"),require("../../AnalyticsMetric.js"),require("../LineChart/LineChart.js"),require("../linearChipGroupedChart/LinearChipGroupedChart.styled.js");var C=require("./PieChart.js");require("../HorizontalBarGraph/HorizontalGraph.js"),require("../StackedBarChart/StackedBarChart.js"),require("../VerticalBarGraph/VerticalGraph.js"),require("../heatmap/HeatMap.js"),require("../VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js"),require("../../../avatar/Avatar.js"),require("../../../avatar/AvatarHelper.js"),require("../../../alerts/Alert.styled.js"),require("../../../alerts/AlertHelper.js"),require("../../../thumbnail/Thumbnail.js"),require("../../../curtain/Curtain.styled.js"),require("../../../curtain/CurtainHelper.js"),require("../../../switch/Switch.js"),require("../../../plans/SubscriptionPlanStyled.js"),require("../../../plans/SubscriptionPlanSelector.js"),require("../../../tabs/Tabs.js"),require("../../../TablePagination/TablePagination.styled.js"),require("../../../TablePagination/TablePaginationCard.js"),require("../../../../constants/zindex.js"),require("../../../states/StateComponent.js"),require("../../../../_virtual/_tslib.js"),require("../../../WhatsAppTextEditor/WhatsAppTextEditor.js"),require("../../../WhatsAppTextEditor/WhatsAppTextEditorHeader.js"),require("../../../card-selection-modal/CardSelectionModal.styled.js"),require("react-image-crop"),require("../../../buttonGroup/ButtonGroupStyle.js"),require("../../../accordion/Accordion.style.js"),require("../../../accordion/AccordionArrow.js"),require("../../../file-uploader/FileUploaderStyle.js"),require("../../../colourInput/ColourInput.styled.js"),require("../../../bik-layout/CommonStyles.js"),require("../../../navigation-hyperlink/NavigationHyperlink.js"),require("../../../bik-layout/SidebarStyles.js"),require("date-fns"),require("react-popper"),require("../../../dropdown/Common.styled.js"),require("../../../custom-date-time/CustomDateTime.styled.js"),require("../../../../node_modules/lodash.debounce/index.js"),require("../../../product-picker/ProductPicker.styled.js"),require("../../../discount-modal/type.js"),require("../../../discount-modal/DiscountModal.styled.js"),require("../../../discount-modal/DynamicCoupon/DynamicCoupon.js"),require("../../../discount-modal/CouponExpiration/CouponExpiration.js"),require("../../../country-code-picker/CountryCodePicker.styled.js"),require("../../../product-picker-v2/emptyState.js"),require("../../../product-picker-v2/style.js"),require("lodash"),require("../../../carousel/carousel.js"),require("../../../carousel-secondary/CarouselSecondary.style.js"),require("../../../access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.styles.js"),require("../../../radioList/RadioList.styled.js"),require("../../../checkList/CheckList.styled.js"),require("../../../postPicker/postPicker.js"),require("../../../dropdown-button/DropdownButton.style.js"),require("../../../side-modal/SideModal.style.js"),require("../../../add-variableV2/AddVariableV2.styled.js"),require("../../../SearchFilter/types/SearchFilter.type.js"),require("../../../SearchFilter/components/DatePickerButton.js");var s=require("chart.js"),c=require("react-chartjs-2");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var A=o(e);s.Chart.register(s.ArcElement,s.Legend);const l={plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:e=>{if(!e.label)return" 0%";const r=e.dataset.data.reduce(((e,r)=>e+r),0),i=parseFloat((e.raw/r*100).toFixed(1));return` ${e.label}: ${i}%`}}}}},a=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],d=A.default("div","production"===process.env.NODE_ENV?{target:"elaov7f0"}:{target:"elaov7f0",label:"CartStyled"})("background:",(e=>g.COLORS.surface.standard),";border:1px solid ",(e=>g.COLORS.stroke.primary),";border-radius:4px;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQzhCIiwiZmlsZSI6IlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGpzeCBhcyBfanN4LCBGcmFnbWVudCBhcyBfRnJhZ21lbnQsIGpzeHMgYXMgX2pzeHMgfSBmcm9tIFwicmVhY3QvanN4LXJ1bnRpbWVcIjtcclxuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgeyBTdHJpbmdVdGlscyB9IGZyb20gXCIuLi8uLi8uLi8uLi9pbmRleFwiO1xyXG5pbXBvcnQgeyBBcmNFbGVtZW50LCBDaGFydCBhcyBDaGFydEpTLCBMZWdlbmQgfSBmcm9tICdjaGFydC5qcyc7XHJcbmltcG9ydCB7IHVzZUVmZmVjdCwgdX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HN1bSwgc2xpY2UpID0+IHN1bSArIHNsaWNlLmNvdW50LCAwKTtcclxuICAgICAgICBsZXQgdXBkYXRlZFNsaWNlc1dpdGhDb2xvciA9IFtdO1xyXG4gICAgICAgIHVwZGF0ZWRTbGljZXNXaXRoQ29sb3IgPSBPYmplY3Qua2V5cyhzbGljZXMpLm1hcCgoa2V5LCBpbmRleCkgPT4gKE9iamVjdC5hc3NpZ24oeyBjb2xvcjogR1JBUEhfQ09MT1JTW2luZGV4ICUgR1JBUEhfQ09MT1JTLmxlbmd0aF0gfSwgc2xpY2VzW2tleV0pKSk7XHJcbiAgICAgICAgc2V0U2xpY2VzV2l0aENvbG9yKFsuLi51cGRhdGVkU2xpY2VzV2l0aENvbG9yXSk7XHJcbiAgICAgICAgaWYgKHRvdGFsU3VtID09PSAwKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGRhdGFTZXQgPSB7XHJcbiAgICAgICAgICAgICAgICBkYXRhc2V0czogW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogWzEwMF0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogWycjRjBGMEYwJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiAwLFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgY29uc3QgZGF0YVNldCA9IHtcclxuICAgICAgICAgICAgICAgIGxhYmVsczogc2xpY2VzLm1hcCgoc2xpY2UpID0+IFN0cmluZ1V0aWxzLmNhcGl0YWxpemUoc2xpY2UubmFtZSkpLFxyXG4gICAgICAgICAgICAgICAgZGF0YXNldHM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IHNsaWNlcy5tYXAoKHNsaWNlKSA9PiBzbGljZS5jb3VudCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogc2xpY2VzLm1hcCgoc2xpY2UsIGluZGV4KSA9PiB7IHZhciBfYTsgcmV0dXJuIChfYSA9IHNsaWNlLmNvbG9yKSAhPT0gbnVsbCAmJiBfYSAhPT0gdm9pZCAwID8gX2EgOiBHUkFQSF9DT0xPUlNbaW5kZXggJSBHUkFQSF9DT0xPUlMubGVuZ3RoXTsgfSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlckNvbG9yOiBbJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiA0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJSYWRpdXM6IDgsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIHNldERhdGEoZGF0YVNldCk7XHJcbiAgICAgICAgfVxyXG4gICAgfSwgW3NsaWNlc10pO1xyXG4gICAgaWYgKCFkYXRhKSB7XHJcbiAgICAgICAgcmV0dXJuIF9qc3goX0ZyYWdtZW50LCB7fSk7XHJcbiAgICB9XHJcbiAgICByZXR1cm4gKF9qc3hzKF9GcmFnbWVudCwgeyBjaGlsZHJlbjogW3RpdGxlICYmIChfanN4KFRpdGxlTWVkaXVtLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICBtYXJnaW5Cb3R0b206IDE2LFxyXG4gICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiB0aXRsZSB9KSkpLCBfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAncm93JyB9LCB7IGNoaWxkcmVuOiBbX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAnY29sLTYnIH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IHNpemUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBzaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KERvdWdobnV0LCB7IGRhdGE6IGRhdGEsIG9wdGlvbnM6IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgb3B0aW9ucyksIHsgbWFpbnRhaW5Bc3BlY3RSYXRpbzogc2l6ZSA/IGZhbHNlIDogdHJ1ZSB9KSB9KSB9KSkgfSkpLCBfanN4KFwiZGl2XCIsIE9iamVjdC5hc3NpZ24oeyBjbGFzc05hbWU6ICdjb2wtNicsIHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nTGVmdDogNDgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGV4RGlyZWN0aW9uOiAnY29sdW1uJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnY2VudGVyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KFBpZUNoYXJ0LCB7IHNsaWNlczogc2xpY2VzV2l0aENvbG9yIH0pIH0pKV0gfSkpXSB9KSk7XHJcbn07XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPVBpZUNoYXJ0QW5hbHl0aWNzLmpzLm1hcCJdfQ== */"));exports.Card=e=>r.jsx(d,Object.assign({style:{padding:24}},{children:e.children})),exports.PieChartAnalytics=e=>{let{title:g,slices:s,size:o}=e;const[A,d]=t.useState([]),[u,n]=t.useState();return t.useEffect((()=>{const e=s.reduce(((e,r)=>e+r.count),0);let r=[];if(r=Object.keys(s).map(((e,r)=>Object.assign({color:a[r%a.length]},s[e]))),d([...r]),0===e){n({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}]})}else{const e={labels:s.map((e=>i.default.capitalize(e.name))),datasets:[{data:s.map((e=>e.count)),backgroundColor:s.map(((e,r)=>{var i;return null!==(i=e.color)&&void 0!==i?i:a[r%a.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};n(e)}}),[s]),u?r.jsxs(r.Fragment,{children:[g&&r.jsx(I.TitleMedium,Object.assign({style:{marginBottom:16}},{children:g})),r.jsxs("div",Object.assign({className:"row"},{children:[r.jsx("div",Object.assign({className:"col-6"},{children:r.jsx("div",Object.assign({style:{width:o,height:o}},{children:r.jsx(c.Doughnut,{data:u,options:Object.assign(Object.assign({},l),{maintainAspectRatio:!o})})}))})),r.jsx("div",Object.assign({className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"center"}},{children:r.jsx(C.PieChart,{slices:A})}))]}))]}):r.jsx(r.Fragment,{})};
|
package/dist/cjs/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { StackedBarGraphI } from './StackedBarChart.d';
|
|
3
|
-
export declare const StackedBarChart: (props: StackedBarGraphI) => JSX.Element;
|
|
2
|
+
export declare const StackedBarChart: (props: StackedBarGraphI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -12,4 +12,4 @@ export declare const Button: import("@emotion/styled").StyledComponent<{
|
|
|
12
12
|
matchParentWidth?: boolean | undefined;
|
|
13
13
|
version?: "1.0" | "2.0" | undefined;
|
|
14
14
|
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
15
|
-
export declare const ButtonCustomDashedBorder: () => JSX.Element;
|
|
15
|
+
export declare const ButtonCustomDashedBorder: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CarouselProps } from '@trendyol-js/react-carousel/dist/types/components/carousel';
|
|
3
|
-
export declare const Carousel: (props: CarouselProps) => JSX.Element;
|
|
2
|
+
export declare const Carousel: (props: CarouselProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),o=require("./type.js");require("../dropdown/DropdownPopover/index.js");var i=require("../dropdown/Dropdown.js");require("../dropdown/ChipDropdown.js"),require("../zeroState/ZeroState.js");var n=require("../TypographyStyle.js"),r=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"),require("../input/Input.js"),require("../dropdown/MenuItem/MenuItem.js");var s=require("../modals/styledModal.js"),d=require("../product-picker/ProductPickerModal.js"),a=require("../tag/Tag.js"),u=require("../tooltips/Tooltip.js"),c=require("../../assets/icons/triangle_error.svg.js"),l=require("./DiscountModal.styled.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),o=require("./type.js");require("../dropdown/DropdownPopover/index.js");var i=require("../dropdown/Dropdown.js");require("../dropdown/ChipDropdown.js"),require("../zeroState/ZeroState.js");var n=require("../TypographyStyle.js"),r=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"),require("../input/Input.js"),require("../dropdown/MenuItem/MenuItem.js");var s=require("../modals/styledModal.js"),d=require("../product-picker/ProductPickerModal.js"),a=require("../tag/Tag.js"),u=require("../tooltips/Tooltip.js"),c=require("../../assets/icons/triangle_error.svg.js"),l=require("./DiscountModal.styled.js"),T=require("./DiscountUtils.js"),p=require("./DynamicCoupon/DynamicCoupon.js"),E=require("./StaticCoupon/StaticCoupon.js");exports.DiscountModal=S=>{var C,I,P,_;const[y,O]=t.useState(),[b,D]=t.useState(null!==(C=S.data)&&void 0!==C?C:{isStaticCoupon:!1}),[N,j]=t.useState(!0),[v,U]=t.useState(),[g,m]=t.useState((null===(I=S.data)||void 0===I?void 0:I.minAmount)?o.MIN_PURCHASE_REQUIREMENT.AMOUNT:(null===(P=S.data)||void 0===P?void 0:P.minQuantity)?o.MIN_PURCHASE_REQUIREMENT.QUANTITY:o.MIN_PURCHASE_REQUIREMENT.NA),[q,A]=t.useState([]),[h,x]=t.useState([]),[R,Y]=t.useState(0);t.useEffect((()=>{let e;S.hideProbability||(e=M()),j(T.validateDiscountData(b,g,v,S.hideProbability||!1,e,!!b.isStaticCoupon)),S.hideProbability||M()}),[]),t.useEffect((()=>{let e;S.hideProbability||(e=M()),j(T.validateDiscountData(b,g,v,S.hideProbability||!1,e,!!b.isStaticCoupon))}),[b,R,v,g]),t.useEffect((()=>{var e,t;if(S.products){if(null===(e=S.data)||void 0===e?void 0:e.entitledProductIds){const e=S.products.filter((e=>{var t,o;return null===(o=null===(t=S.data)||void 0===t?void 0:t.entitledProductIds)||void 0===o?void 0:o.includes(parseInt(e.id))}));x(e)}if(null===(t=S.data)||void 0===t?void 0:t.prerequisiteProductIds){const e=S.products.filter((e=>{var t,o;return null===(o=null===(t=S.data)||void 0===t?void 0:t.prerequisiteProductIds)||void 0===o?void 0:o.includes(parseInt(e.id))}));A(e)}}}),[]),t.useEffect((()=>{const e=h.map((e=>parseInt(e.id)));D(Object.assign(Object.assign({},b),{entitledProductIds:e}))}),[h]),t.useEffect((()=>{const e=q.map((e=>parseInt(e.id)));D(Object.assign(Object.assign({},b),{prerequisiteProductIds:e}))}),[q]),t.useEffect((()=>{b.targetType===o.DISCOUNT_TARGET_TYPES.SHIPPING_LINE?U(o.DISCOUNT_TYPES.FREE_SHIPPING):b.targetSelection===o.DISCOUNT_TARGET_SELECTION.ENTITLED?U(o.DISCOUNT_TYPES.BUY_X_GET_Y):b.valueType===o.DISCOUNT_VALUE_TYPES.FIXED_AMOUNT?U(o.DISCOUNT_TYPES.FIXED_AMOUNT):b.valueType===o.DISCOUNT_VALUE_TYPES.PERCENTAGE&&U(o.DISCOUNT_TYPES.PERCENTAGE)}),[]);const L=[{value:o.DISCOUNT_TYPES.FIXED_AMOUNT,label:"Fixed Amount",selected:v===o.DISCOUNT_TYPES.FIXED_AMOUNT},{value:o.DISCOUNT_TYPES.PERCENTAGE,label:"Percentage",selected:v===o.DISCOUNT_TYPES.PERCENTAGE},{value:o.DISCOUNT_TYPES.BUY_X_GET_Y,label:"Buy X Get Y FREE",selected:v===o.DISCOUNT_TYPES.BUY_X_GET_Y},{value:o.DISCOUNT_TYPES.FREE_SHIPPING,label:"Free shipping",selected:v===o.DISCOUNT_TYPES.FREE_SHIPPING}],M=()=>{if(!S.quadrant||!S.probability)return;const e=[...S.probability];let t=[];e.length>=S.quadrant&&e.splice(S.quadrant-1,1),t=e;const o=t.reduce(((e,t)=>e+t),0)+(b.probability||0);return Y(parseFloat(o.toFixed(4))),parseFloat(o.toFixed(4))},w=e=>{const t=e.value;U(t),t===o.DISCOUNT_TYPES.FREE_SHIPPING?(A([]),x([]),D(Object.assign(Object.assign({},b),{value:100,targetSelection:o.DISCOUNT_TARGET_SELECTION.ALL,targetType:o.DISCOUNT_TARGET_TYPES.SHIPPING_LINE,valueType:o.DISCOUNT_VALUE_TYPES.PERCENTAGE,entitledQuantity:void 0,prerequisiteQuantity:void 0,entitledProductIds:void 0,prerequisiteProductIds:void 0}))):t===o.DISCOUNT_TYPES.BUY_X_GET_Y?D(Object.assign(Object.assign({},b),{targetSelection:o.DISCOUNT_TARGET_SELECTION.ENTITLED,targetType:o.DISCOUNT_TARGET_TYPES.LINE_ITEM,valueType:o.DISCOUNT_VALUE_TYPES.PERCENTAGE})):t===o.DISCOUNT_TYPES.PERCENTAGE?(A([]),x([]),D(Object.assign(Object.assign({},b),{targetSelection:o.DISCOUNT_TARGET_SELECTION.ALL,targetType:o.DISCOUNT_TARGET_TYPES.LINE_ITEM,valueType:o.DISCOUNT_VALUE_TYPES.PERCENTAGE,entitledQuantity:void 0,prerequisiteQuantity:void 0,entitledProductIds:void 0,prerequisiteProductIds:void 0}))):t===o.DISCOUNT_TYPES.FIXED_AMOUNT&&(A([]),x([]),D(Object.assign(Object.assign({},b),{targetSelection:o.DISCOUNT_TARGET_SELECTION.ALL,targetType:o.DISCOUNT_TARGET_TYPES.LINE_ITEM,valueType:o.DISCOUNT_VALUE_TYPES.FIXED_AMOUNT,entitledQuantity:void 0,prerequisiteQuantity:void 0,entitledProductIds:void 0,prerequisiteProductIds:void 0})))};return e.jsxs(s.StyledModal,Object.assign({open:S.isOpen,headingTitle:y?"Select Products":S.title,headingSubtitle:y?void 0:S.subTitle,footerLeftCustomElement:!S.quadrant||S.hideProbability?e.jsx(e.Fragment,{}):R<=1?e.jsx(a.Tag,{theme:"light",tagText:`Current probability sum: ${R}`,type:"white"}):e.jsx(u.Tooltip,Object.assign({body:"Probability sum should not exceed 1",placement:"top"},{children:e.jsx("div",{children:e.jsx(a.Tag,{style:{cursor:"pointer"},theme:"light",tagText:`Current probability sum: ${R}`,type:"negative",LeadingIcon:c.default})})})),headerRightCustomElement:S.allowStaticCoupon||y?void 0:e.jsx(i.Dropdown,{options:L,width:"200px",placement:"bottom-start",size:"small",onSelect:e=>{w(e)}}),onClose:S.onClose,footerShadow:!0,primaryButton:y?{buttonType:"primary",onClick:()=>{O(void 0)},buttonText:"Add"}:{buttonType:"primary",buttonText:"Add code",disabled:N,onClick:()=>{b.isStaticCoupon?S.onSaveClicked({quadrant:b.quadrant,couponCode:b.couponCode,description:b.description,isStaticCoupon:b.isStaticCoupon,probability:b.probability,title:b.title}):S.onSaveClicked(b),D({})}},secondaryButton:y?{buttonType:"tertiaryGray",onClick:()=>{O(void 0)},buttonText:"Back"}:{buttonType:"tertiaryGray",onClick:S.onClose,buttonText:"Close"}},{children:[!y&&e.jsxs(l.StyledDiscountDialogueContainer,{children:[S.allowStaticCoupon&&!y&&e.jsxs(l.CouponTypeContainerStyled,Object.assign({selectedDiv:b.isStaticCoupon?1:2},{children:[e.jsxs("div",Object.assign({className:"coupon-type__container",onClick:()=>{D({isStaticCoupon:!0,couponCode:b.couponCode,description:b.description,quadrant:b.quadrant})}},{children:[e.jsx(n.TitleSmall,Object.assign({style:b.isStaticCoupon?{color:r.DEFAULT_THEME.colorsV2.content.brand}:{}},{children:"Static code"})),e.jsx(n.BodyCaption,Object.assign({style:b.isStaticCoupon?{color:r.DEFAULT_THEME.colorsV2.content.brand}:{}},{children:"One static code for all customers"}))]})),e.jsxs("div",Object.assign({className:"coupon-type__container",onClick:()=>{D(Object.assign(Object.assign({},b),{isStaticCoupon:!1}))}},{children:[e.jsx(n.TitleSmall,Object.assign({style:b.isStaticCoupon?{}:{color:r.DEFAULT_THEME.colorsV2.content.brand}},{children:"Dynamic code"})),e.jsx(n.BodyCaption,Object.assign({style:b.isStaticCoupon?{}:{color:r.DEFAULT_THEME.colorsV2.content.brand}},{children:"New code generated for everyone"}))]}))]})),b.isStaticCoupon&&!y&&e.jsx(E.default,{discountData:b,setDiscountData:D,hideProbability:S.hideProbability||!1,discountAdminUrl:S.discountAdminUrl}),!b.isStaticCoupon&&!y&&e.jsx(p.default,{currency:S.currency,entitledProducts:h,prerequisiteProducts:q,setEntitledProducts:x,setPrerequisiteProducts:A,discountData:b,productPickerOpen:y,setIsProductPickerOpen:O,setDiscountData:D,selectedCouponType:v,setSelectedCouponType:U,selectedMinimumRequirement:g,setSelectedMinimumRequirement:m,hideProbability:S.hideProbability||!1,hideExpiration:S.hideExpiration||!1,allowStaticCoupon:S.allowStaticCoupon,onChangeCouponType:w})]}),!!y&&e.jsx("div",Object.assign({style:{padding:"12px 0"}},{children:e.jsx(d.ProductPickerContent,{show:!0,onSave:()=>{},products:null!==(_=S.products)&&void 0!==_?_:[],title:"Select Products",onClose:()=>{O(void 0)},selectedProducts:y===p.DISCOUNT_PRODUCTS.ENTITLED?h:q,setSelectedProducts:y===p.DISCOUNT_PRODUCTS.ENTITLED?x:A,onSearchKeyChange:S.onProductSearch})}))]}))};
|
|
@@ -4,6 +4,7 @@ export declare const DropdownPopover: React.ForwardRefExoticComponent<OpenDropdo
|
|
|
4
4
|
isLoading?: boolean | undefined;
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
disabled?: boolean | undefined;
|
|
7
|
+
onDropdownOpen?: (() => void) | undefined;
|
|
7
8
|
onDropdownVisbilityChange?: ((isOpen: boolean) => void) | undefined;
|
|
8
9
|
} & React.RefAttributes<{
|
|
9
10
|
openDropdown: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),n=require("react"),o=require("react-popper"),t=require("../../dropShadow/DropShadow.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),n=require("react"),o=require("react-popper"),t=require("../../dropShadow/DropShadow.js"),l=require("../Common.styled.js"),s=require("../OpenedDropdown/components/OpennedDropdown.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const a=i(n).default.forwardRef(((i,a)=>{var{children:d,onDropdownVisbilityChange:p,version:u="1.0"}=i,c=e.__rest(i,["children","onDropdownVisbilityChange","version"]);const v=a,[j,b]=n.useState(!1),[f,w]=n.useState(null),[D,O]=n.useState(null),{styles:y,attributes:g}=o.usePopper(f,D,{placement:c.placement,strategy:c.strategy});return n.useImperativeHandle(v,(()=>({openDropdown:j})),[]),n.useEffect((()=>{(null==v?void 0:v.current)&&(v.current.openDropdown=j)}),[j]),n.useEffect((()=>{null==p||p(j)}),[j]),r.jsxs(r.Fragment,{children:[r.jsxs("div",Object.assign({style:{position:"relative"},ref:w},{children:[r.jsx(l.OverLapAbs,{disabled:c.disabled,onClick:e=>{var r;null===(r=c.onDropdownOpen)||void 0===r||r.call(c),j?e.preventDefault():c.disabled||b(!0)}}),d]})),j&&r.jsx(l.OpenDropdownContainer,Object.assign({ref:O,style:Object.assign(Object.assign({},y.popper),{zIndex:3})},g.popper,{children:r.jsx(t.default,Object.assign({level:"z2",position:"down",style:{borderRadius:8}},{children:r.jsx(s.OpenedDropdown,Object.assign({},c,{onSelect:e=>{var r;"2.0"===u&&c.isMultiSelect||(null===(r=c.onSelect)||void 0===r||r.call(c,e),b(!1))},onClose:e=>{var r,n;"2.0"===u&&c.isMultiSelect&&e&&(null===(r=c.onSelect)||void 0===r||r.call(c,[...e])),b(!1),null===(n=null==c?void 0:c.onClose)||void 0===n||n.call(c)},version:u}))}))}))]})}));a.displayName="DropdownPopover",exports.DropdownPopover=a;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface DynamicTabsDetails {
|
|
3
2
|
id: number;
|
|
4
3
|
text: string;
|
|
@@ -16,4 +15,4 @@ export interface DynamicTabsProps {
|
|
|
16
15
|
tabStyleInfo: DynamicTabsStyleDetails;
|
|
17
16
|
selectedTabId?: number;
|
|
18
17
|
}
|
|
19
|
-
export declare const DynamicTabs: (props: DynamicTabsProps) => JSX.Element;
|
|
18
|
+
export declare const DynamicTabs: (props: DynamicTabsProps) => import("react/jsx-runtime").JSX.Element;
|