@bikdotai/bik-component-library 0.0.225 → 0.0.227
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/cjs/components/checkBox/CheckBox.js +1 -1
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/esm/components/checkBox/CheckBox.js +1 -1
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -2
- package/dist/cjs/assets/icons/paperclip.svg.js +0 -1
- package/dist/cjs/assets/icons/smile_emoji.svg.js +0 -1
- package/dist/cjs/components/editor/index.d.ts +0 -1
- package/dist/cjs/components/editor/mail/MailRTE.stories.d.ts +0 -5
- package/dist/cjs/components/editor/mail/MailRTE.styled.d.ts +0 -31
- package/dist/cjs/components/editor/mail/MailRTE.styled.js +0 -117
- package/dist/cjs/components/editor/mail/index.d.ts +0 -1
- package/dist/cjs/components/editor/mail/mailRTE.d.ts +0 -18
- package/dist/cjs/components/editor/mail/mailRTE.js +0 -1
- package/dist/esm/assets/icons/paperclip.svg.js +0 -1
- package/dist/esm/assets/icons/smile_emoji.svg.js +0 -1
- package/dist/esm/components/editor/index.d.ts +0 -1
- package/dist/esm/components/editor/mail/MailRTE.stories.d.ts +0 -5
- package/dist/esm/components/editor/mail/MailRTE.styled.d.ts +0 -31
- package/dist/esm/components/editor/mail/MailRTE.styled.js +0 -117
- package/dist/esm/components/editor/mail/index.d.ts +0 -1
- package/dist/esm/components/editor/mail/mailRTE.d.ts +0 -18
- package/dist/esm/components/editor/mail/mailRTE.js +0 -1
|
@@ -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-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("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/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("../../../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("../../../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("emoji-picker-react"),require("react-quill"),require("../../../editor/mail/MailRTE.styled.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),g=parseFloat((e.raw/r*100).toFixed(1));return` ${e.label}: ${g}%`}}}}},a=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],u=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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQzhCIiwiZmlsZSI6IlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGpzeCBhcyBfanN4LCBGcmFnbWVudCBhcyBfRnJhZ21lbnQsIGpzeHMgYXMgX2pzeHMgfSBmcm9tIFwicmVhY3QvanN4LXJ1bnRpbWVcIjtcclxuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgeyBTdHJpbmdVdGlscyB9IGZyb20gXCIuLi8uLi8uLi8uLi9pbmRleFwiO1xyXG5pbXBvcnQgeyBBcmNFbGVtZW50LCBDaGFydCBhcyBDaGFydEpTLCBMZWdlbmQgfSBmcm9tICdjaGFydC5qcyc7XHJcbmltcG9ydCB7IHVzZUVmZmVjdCwgdXNlU3RhdGUgfSBmcm9tICdyZWFjdCc7XHJcbmltcG9ydCB7IERvdWdobnV0IH0gZnJvbSAncmVhY3QtY2hhcnRqcy0yJztcclxuaW1wb3J0IHsgVGl0bGVNZWRpdW0gfSBmcm9tIFwiLi4vLi4vLi4vVHlwb2dyYXBoeVN0eWxlXCI7XHJcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gXCIuLi8uLi8uLi8uLi9jb25zdGFudHMvVGhlbWVcIjtcclxuaW1wb3J0IHsgUGllQ2hhcnQgfSBmcm9tICcuL1BpZUNoYXJ0JztcclxuQ2hhcnRKUy5yZWdpc3RlcihBcmNFbGVtZW50LCBMZWdlbmQpO1xyXG5jb25zdCBvcHRpb25zID0ge1xyXG4gICAgcGx1Z2luczoge1xyXG4gICAgICAgIGxlZ2VuZDoge1xyXG4gICAgICAgICAgICBkaXNwbGF5OiBmYWxzZSxcclxuICAgICAgICB9LFxyXG4gICAgICAgIHRvb2x0aXA6IHtcclxuICAgICAgICAgICAgZW5hYmxlZDogdHJ1ZSxcclxuICAgICAgICAgICAgY2FsbGJhY2tzOiB7XHJcbiAgICAgICAgICAgICAgICBsYWJlbDogKHRvb2x0aXBJdGVtKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0b29sdGlwSXRlbS5sYWJlbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYCAwJWA7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRvdGFsID0gdG9vbHRpcEl0ZW0uZGF0YXNldC5kYXRhLnJlZHVjZSgoYWNjLCBjdXIpID0+IGFjYyArIGN1ciwgMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGVyY2VudGFnZSA9IHBhcnNlRmxvYXQoKCh0b29sdGlwSXRlbS5yYXcgLyB0b3RhbCkgKiAxMDApLnRvRml4ZWQoMSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBgICR7dG9vbHRpcEl0ZW0ubGFiZWx9OiAke3BlcmNlbnRhZ2V9JWA7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0sXHJcbiAgICB9LFxyXG59O1xyXG5jb25zdCBHUkFQSF9DT0xPUlMgPSBbXHJcbiAgICAnIzVFMDdCQicsXHJcbiAgICAnIzlFNzdFRCcsXHJcbiAgICAnI0QyQUVGRicsXHJcbiAgICAnI0NERTFGRicsXHJcbiAgICAnIzkyQUZGQScsXHJcbiAgICAnIzM5MzVFMScsXHJcbl07XHJcbmNvbnN0IENhcnRTdHlsZWQgPSBzdHlsZWQuZGl2IGBcblx0YmFja2dyb3VuZDogJHsocHJvcHMpID0+IENPTE9SUy5zdXJmYWNlLnN0YW5kYXJkfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsocHJvcHMpID0+IENPTE9SUy5zdHJva2UucHJpbWFyeX07XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcbmA7XHJcbmV4cG9ydCBjb25zdCBDYXJkID0gKHByb3BzKSA9PiB7XHJcbiAgICByZXR1cm4gX2pzeChDYXJ0U3R5bGVkLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHsgcGFkZGluZzogMjQgfSB9LCB7IGNoaWxkcmVuOiBwcm9wcy5jaGlsZHJlbiB9KSk7XHJcbn07XHJcbmV4cG9ydCBjb25zdCBQaWVDaGFydEFuYWx5dGljcyA9ICh7IHRpdGxlLCBzbGljZXMsIHNpemUsIH0pID0+IHtcclxuICAgIGNvbnN0IFtzbGljZXNXaXRoQ29sb3IsIHNldFNsaWNlc1dpdGhDb2xvcl0gPSB1c2VTdGF0ZShbXSk7XHJcbiAgICBjb25zdCBbZGF0YSwgc2V0RGF0YV0gPSB1c2VTdGF0ZSgpO1xyXG4gICAgdXNlRWZmZWN0KCgpID0+IHtcclxuICAgICAgICBjb25zdCB0b3RhbFN1bSA9IHNsaWNlcy5yZWR1Y2UoKHN1bSwgc2xpY2UpID0+IHN1bSArIHNsaWNlLmNvdW50LCAwKTtcclxuICAgICAgICBsZXQgdXBkYXRlZFNsaWNlc1dpdGhDb2xvciA9IFtdO1xyXG4gICAgICAgIHVwZGF0ZWRTbGljZXNXaXRoQ29sb3IgPSBPYmplY3Qua2V5cyhzbGljZXMpLm1hcCgoa2V5LCBpbmRleCkgPT4gKE9iamVjdC5hc3NpZ24oeyBjb2xvcjogR1JBUEhfQ09MT1JTW2luZGV4ICUgR1JBUEhfQ09MT1JTLmxlbmd0aF0gfSwgc2xpY2VzW2tleV0pKSk7XHJcbiAgICAgICAgc2V0U2xpY2VzV2l0aENvbG9yKFsuLi51cGRhdGVkU2xpY2VzV2l0aENvbG9yXSk7XHJcbiAgICAgICAgaWYgKHRvdGFsU3VtID09PSAwKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGRhdGFTZXQgPSB7XHJcbiAgICAgICAgICAgICAgICBkYXRhc2V0czogW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogWzEwMF0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogWycjRjBGMEYwJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiAwLFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgY29uc3QgZGF0YVNldCA9IHtcclxuICAgICAgICAgICAgICAgIGxhYmVsczogc2xpY2VzLm1hcCgoc2xpY2UpID0+IFN0cmluZ1V0aWxzLmNhcGl0YWxpemUoc2xpY2UubmFtZSkpLFxyXG4gICAgICAgICAgICAgICAgZGF0YXNldHM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IHNsaWNlcy5tYXAoKHNsaWNlKSA9PiBzbGljZS5jb3VudCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogc2xpY2VzLm1hcCgoc2xpY2UsIGluZGV4KSA9PiB7IHZhciBfYTsgcmV0dXJuIChfYSA9IHNsaWNlLmNvbG9yKSAhPT0gbnVsbCAmJiBfYSAhPT0gdm9pZCAwID8gX2EgOiBHUkFQSF9DT0xPUlNbaW5kZXggJSBHUkFQSF9DT0xPUlMubGVuZ3RoXTsgfSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlckNvbG9yOiBbJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiA0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJSYWRpdXM6IDgsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIHNldERhdGEoZGF0YVNldCk7XHJcbiAgICAgICAgfVxyXG4gICAgfSwgW3NsaWNlc10pO1xyXG4gICAgaWYgKCFkYXRhKSB7XHJcbiAgICAgICAgcmV0dXJuIF9qc3goX0ZyYWdtZW50LCB7fSk7XHJcbiAgICB9XHJcbiAgICByZXR1cm4gKF9qc3hzKF9GcmFnbWVudCwgeyBjaGlsZHJlbjogW3RpdGxlICYmIChfanN4KFRpdGxlTWVkaXVtLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICBtYXJnaW5Cb3R0b206IDE2LFxyXG4gICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiB0aXRsZSB9KSkpLCBfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAncm93JyB9LCB7IGNoaWxkcmVuOiBbX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAnY29sLTYnIH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IHNpemUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBzaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KERvdWdobnV0LCB7IGRhdGE6IGRhdGEsIG9wdGlvbnM6IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgb3B0aW9ucyksIHsgbWFpbnRhaW5Bc3BlY3RSYXRpbzogc2l6ZSA/IGZhbHNlIDogdHJ1ZSB9KSB9KSB9KSkgfSkpLCBfanN4KFwiZGl2XCIsIE9iamVjdC5hc3NpZ24oeyBjbGFzc05hbWU6ICdjb2wtNicsIHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nTGVmdDogNDgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGV4RGlyZWN0aW9uOiAnY29sdW1uJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnY2VudGVyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KFBpZUNoYXJ0LCB7IHNsaWNlczogc2xpY2VzV2l0aENvbG9yIH0pIH0pKV0gfSkpXSB9KSk7XHJcbn07XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPVBpZUNoYXJ0QW5hbHl0aWNzLmpzLm1hcCJdfQ== */"));exports.Card=e=>r.jsx(u,Object.assign({style:{padding:24}},{children:e.children})),exports.PieChartAnalytics=e=>{let{title:i,slices:s,size:o}=e;const[A,u]=t.useState([]),[d,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]))),u([...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:a[r%a.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};n(e)}}),[s]),d?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:d,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,{})};
|
|
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-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("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/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("../../../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("../../../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");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),g=parseFloat((e.raw/r*100).toFixed(1));return` ${e.label}: ${g}%`}}}}},a=["#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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQzhCIiwiZmlsZSI6IlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGpzeCBhcyBfanN4LCBGcmFnbWVudCBhcyBfRnJhZ21lbnQsIGpzeHMgYXMgX2pzeHMgfSBmcm9tIFwicmVhY3QvanN4LXJ1bnRpbWVcIjtcclxuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgeyBTdHJpbmdVdGlscyB9IGZyb20gXCIuLi8uLi8uLi8uLi9pbmRleFwiO1xyXG5pbXBvcnQgeyBBcmNFbGVtZW50LCBDaGFydCBhcyBDaGFydEpTLCBMZWdlbmQgfSBmcm9tICdjaGFydC5qcyc7XHJcbmltcG9ydCB7IHVzZUVmZmVjdCwgdXNlU3RhdGUgfSBmcm9tICdyZWFjdCc7XHJcbmltcG9ydCB7IERvdWdobnV0IH0gZnJvbSAncmVhY3QtY2hhcnRqcy0yJztcclxuaW1wb3J0IHsgVGl0bGVNZWRpdW0gfSBmcm9tIFwiLi4vLi4vLi4vVHlwb2dyYXBoeVN0eWxlXCI7XHJcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gXCIuLi8uLi8uLi8uLi9jb25zdGFudHMvVGhlbWVcIjtcclxuaW1wb3J0IHsgUGllQ2hhcnQgfSBmcm9tICcuL1BpZUNoYXJ0JztcclxuQ2hhcnRKUy5yZWdpc3RlcihBcmNFbGVtZW50LCBMZWdlbmQpO1xyXG5jb25zdCBvcHRpb25zID0ge1xyXG4gICAgcGx1Z2luczoge1xyXG4gICAgICAgIGxlZ2VuZDoge1xyXG4gICAgICAgICAgICBkaXNwbGF5OiBmYWxzZSxcclxuICAgICAgICB9LFxyXG4gICAgICAgIHRvb2x0aXA6IHtcclxuICAgICAgICAgICAgZW5hYmxlZDogdHJ1ZSxcclxuICAgICAgICAgICAgY2FsbGJhY2tzOiB7XHJcbiAgICAgICAgICAgICAgICBsYWJlbDogKHRvb2x0aXBJdGVtKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0b29sdGlwSXRlbS5sYWJlbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYCAwJWA7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRvdGFsID0gdG9vbHRpcEl0ZW0uZGF0YXNldC5kYXRhLnJlZHVjZSgoYWNjLCBjdXIpID0+IGFjYyArIGN1ciwgMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGVyY2VudGFnZSA9IHBhcnNlRmxvYXQoKCh0b29sdGlwSXRlbS5yYXcgLyB0b3RhbCkgKiAxMDApLnRvRml4ZWQoMSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBgICR7dG9vbHRpcEl0ZW0ubGFiZWx9OiAke3BlcmNlbnRhZ2V9JWA7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0sXHJcbiAgICB9LFxyXG59O1xyXG5jb25zdCBHUkFQSF9DT0xPUlMgPSBbXHJcbiAgICAnIzVFMDdCQicsXHJcbiAgICAnIzlFNzdFRCcsXHJcbiAgICAnI0QyQUVGRicsXHJcbiAgICAnI0NERTFGRicsXHJcbiAgICAnIzkyQUZGQScsXHJcbiAgICAnIzM5MzVFMScsXHJcbl07XHJcbmNvbnN0IENhcnRTdHlsZWQgPSBzdHlsZWQuZGl2IGBcblx0YmFja2dyb3VuZDogJHsocHJvcHMpID0+IENPTE9SUy5zdXJmYWNlLnN0YW5kYXJkfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsocHJvcHMpID0+IENPTE9SUy5zdHJva2UucHJpbWFyeX07XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcbmA7XHJcbmV4cG9ydCBjb25zdCBDYXJkID0gKHByb3BzKSA9PiB7XHJcbiAgICByZXR1cm4gX2pzeChDYXJ0U3R5bGVkLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHsgcGFkZGluZzogMjQgfSB9LCB7IGNoaWxkcmVuOiBwcm9wcy5jaGlsZHJlbiB9KSk7XHJcbn07XHJcbmV4cG9ydCBjb25zdCBQaWVDaGFydEFuYWx5dGljcyA9ICh7IHRpdGxlLCBzbGljZXMsIHNpemUsIH0pID0+IHtcclxuICAgIGNvbnN0IFtzbGljZXNXaXRoQ29sb3IsIHNldFNsaWNlc1dpdGhDb2xvcl0gPSB1c2VTdGF0ZShbXSk7XHJcbiAgICBjb25zdCBbZGF0YSwgc2V0RGF0YV0gPSB1c2VTdGF0ZSgpO1xyXG4gICAgdXNlRWZmZWN0KCgpID0+IHtcclxuICAgICAgICBjb25zdCB0b3RhbFN1bSA9IHNsaWNlcy5yZWR1Y2UoKHN1bSwgc2xpY2UpID0+IHN1bSArIHNsaWNlLmNvdW50LCAwKTtcclxuICAgICAgICBsZXQgdXBkYXRlZFNsaWNlc1dpdGhDb2xvciA9IFtdO1xyXG4gICAgICAgIHVwZGF0ZWRTbGljZXNXaXRoQ29sb3IgPSBPYmplY3Qua2V5cyhzbGljZXMpLm1hcCgoa2V5LCBpbmRleCkgPT4gKE9iamVjdC5hc3NpZ24oeyBjb2xvcjogR1JBUEhfQ09MT1JTW2luZGV4ICUgR1JBUEhfQ09MT1JTLmxlbmd0aF0gfSwgc2xpY2VzW2tleV0pKSk7XHJcbiAgICAgICAgc2V0U2xpY2VzV2l0aENvbG9yKFsuLi51cGRhdGVkU2xpY2VzV2l0aENvbG9yXSk7XHJcbiAgICAgICAgaWYgKHRvdGFsU3VtID09PSAwKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGRhdGFTZXQgPSB7XHJcbiAgICAgICAgICAgICAgICBkYXRhc2V0czogW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogWzEwMF0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogWycjRjBGMEYwJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiAwLFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgY29uc3QgZGF0YVNldCA9IHtcclxuICAgICAgICAgICAgICAgIGxhYmVsczogc2xpY2VzLm1hcCgoc2xpY2UpID0+IFN0cmluZ1V0aWxzLmNhcGl0YWxpemUoc2xpY2UubmFtZSkpLFxyXG4gICAgICAgICAgICAgICAgZGF0YXNldHM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IHNsaWNlcy5tYXAoKHNsaWNlKSA9PiBzbGljZS5jb3VudCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogc2xpY2VzLm1hcCgoc2xpY2UsIGluZGV4KSA9PiB7IHZhciBfYTsgcmV0dXJuIChfYSA9IHNsaWNlLmNvbG9yKSAhPT0gbnVsbCAmJiBfYSAhPT0gdm9pZCAwID8gX2EgOiBHUkFQSF9DT0xPUlNbaW5kZXggJSBHUkFQSF9DT0xPUlMubGVuZ3RoXTsgfSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlckNvbG9yOiBbJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiA0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJSYWRpdXM6IDgsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIHNldERhdGEoZGF0YVNldCk7XHJcbiAgICAgICAgfVxyXG4gICAgfSwgW3NsaWNlc10pO1xyXG4gICAgaWYgKCFkYXRhKSB7XHJcbiAgICAgICAgcmV0dXJuIF9qc3goX0ZyYWdtZW50LCB7fSk7XHJcbiAgICB9XHJcbiAgICByZXR1cm4gKF9qc3hzKF9GcmFnbWVudCwgeyBjaGlsZHJlbjogW3RpdGxlICYmIChfanN4KFRpdGxlTWVkaXVtLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICBtYXJnaW5Cb3R0b206IDE2LFxyXG4gICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiB0aXRsZSB9KSkpLCBfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAncm93JyB9LCB7IGNoaWxkcmVuOiBbX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAnY29sLTYnIH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IHNpemUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBzaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KERvdWdobnV0LCB7IGRhdGE6IGRhdGEsIG9wdGlvbnM6IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgb3B0aW9ucyksIHsgbWFpbnRhaW5Bc3BlY3RSYXRpbzogc2l6ZSA/IGZhbHNlIDogdHJ1ZSB9KSB9KSB9KSkgfSkpLCBfanN4KFwiZGl2XCIsIE9iamVjdC5hc3NpZ24oeyBjbGFzc05hbWU6ICdjb2wtNicsIHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nTGVmdDogNDgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGV4RGlyZWN0aW9uOiAnY29sdW1uJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnY2VudGVyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KFBpZUNoYXJ0LCB7IHNsaWNlczogc2xpY2VzV2l0aENvbG9yIH0pIH0pKV0gfSkpXSB9KSk7XHJcbn07XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPVBpZUNoYXJ0QW5hbHl0aWNzLmpzLm1hcCJdfQ== */"));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: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=>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:a[r%a.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({},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,{})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),i=require("./CheckBox.styled.js"),l=require("../TypographyStyle.js"),t=require("../../constants/Theme.js");const a=s=>e.jsxs("svg",Object.assign({width:s.isSmall?"16":"18",height:s.isSmall?"16":"18",viewBox:s.isSmall?"0 0 16 16":"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("rect",{x:"0",y:"0",width:s.isSmall?"16":"18",height:s.isSmall?"16":"18",rx:"4",fill:s.isDisabled?t.COLORS.content.inactive:t.COLORS.background.positive.vibrant}),!s.isPartial&&e.jsx("svg",Object.assign({width:s.isSmall?"8":"10",height:s.isSmall?"7":"9",x:"4",y:"4",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.68189 1.06043C10.0724 1.45096 10.0724 2.08412 9.68189 2.47464L4.02501 8.13152C3.63449 8.52205 3.00132 8.52205 2.6108 8.13152L0.489684 6.01041C0.0991601 5.61988 0.0991598 4.98672 0.489684 4.59619C0.880209 4.20567 1.51337 4.20567 1.9039 4.59619L3.31791 6.0102L8.26768 1.06043C8.6582 0.669907 9.29137 0.669907 9.68189 1.06043Z",fill:"white"})})),s.isPartial&&e.jsx("rect",{x:"5",y:s.isSmall?"7":"8",width:s.isSmall?"6":"8",height:"2",rx:"1",fill:t.COLORS.surface.standard})]}));exports.CheckBox=r=>{const[c,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),i=require("./CheckBox.styled.js"),l=require("../TypographyStyle.js"),t=require("../../constants/Theme.js");const a=s=>e.jsxs("svg",Object.assign({width:s.isSmall?"16":"18",height:s.isSmall?"16":"18",viewBox:s.isSmall?"0 0 16 16":"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("rect",{x:"0",y:"0",width:s.isSmall?"16":"18",height:s.isSmall?"16":"18",rx:"4",fill:s.isDisabled?t.COLORS.content.inactive:t.COLORS.background.positive.vibrant}),!s.isPartial&&e.jsx("svg",Object.assign({width:s.isSmall?"8":"10",height:s.isSmall?"7":"9",x:"4",y:"4",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.68189 1.06043C10.0724 1.45096 10.0724 2.08412 9.68189 2.47464L4.02501 8.13152C3.63449 8.52205 3.00132 8.52205 2.6108 8.13152L0.489684 6.01041C0.0991601 5.61988 0.0991598 4.98672 0.489684 4.59619C0.880209 4.20567 1.51337 4.20567 1.9039 4.59619L3.31791 6.0102L8.26768 1.06043C8.6582 0.669907 9.29137 0.669907 9.68189 1.06043Z",fill:"white"})})),s.isPartial&&e.jsx("rect",{x:"5",y:s.isSmall?"7":"8",width:s.isSmall?"6":"8",height:"2",rx:"1",fill:t.COLORS.surface.standard})]}));exports.CheckBox=r=>{const[c,d]=s.useState(r.isChecked||!1),[n,o]=s.useState(r.isPartiallyChecked||!1),[h,x]=s.useState(r.isDisabled||!1),[u,S]=s.useState(!1),[b,C]=s.useState(!1);return s.useEffect((()=>{d(r.isChecked)}),[r.isChecked]),s.useEffect((()=>{x(r.isDisabled||!1)}),[r.isDisabled]),s.useEffect((()=>{o(r.isPartiallyChecked||!1),d(r.isPartiallyChecked||!1)}),[r.isPartiallyChecked]),e.jsxs(i.CheckboxContainer,Object.assign({onClick:()=>{var e;if(!r.isDisabled){const s=!c;d(s),null===(e=r.onValueChange)||void 0===e||e.call(r,s,r.value)}},onMouseEnter:()=>S(!r.skipHoverState),onMouseLeave:()=>S(!1),onMouseDown:()=>C(!r.skipHoverState),onMouseUp:()=>C(!1)},{children:[e.jsx(i.CheckboxIcon,Object.assign({checked:c,hovered:u,clicked:b,isDisabled:h,size:r.size},{children:c&&e.jsx(a,{isPartial:n||!1,isDisabled:h,isSmall:"SMALL"===r.size})})),r.label&&"SMALL"!==r.size&&e.jsx(l.BodyPrimary,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label})),r.label&&"SMALL"===r.size&&e.jsx(l.BodySecondary,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label}))]}))};
|
package/dist/cjs/index.d.ts
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./components/template-preview/constants/regexPatterns.js"),r=require("./utils/StringUtils.js"),t=require("./constants/Theme.js"),o=require("./components/checkBox/CheckBox.js"),n=require("./components/list-item/ListItem.js"),i=require("./components/pagination/Pagination.js"),s=require("./components/radioButton/RadioButton.js"),p=require("./components/toaster/Toaster.js"),a=require("./components/tooltips/Tooltip.js"),u=require("./components/spinner/Spinner.js"),c=require("./components/stepper/Stepper.js"),l=require("./components/tag/Tag.js"),d=require("./components/icon-button/IconButton.js"),m=require("./components/template-preview/TemplatePreview.js"),T=require("./components/template-preview/WhatsApp/WhatsAppLikePreview.js"),x=require("./components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),P=require("./components/template-preview/helpers/SmsTemplateHelper.js"),A=require("./components/template-preview/helpers/WhatsAppFormatToHTML.js"),S=require("./components/template-preview/helpers/VariableEditorHelper.js"),y=require("./components/template-preview/models/TemplateMeta.js"),C=require("./components/template-context-mapper/TemplateContextMapper.js"),O=require("./components/template-context-mapper/utils/getDataFromTemplateComponent.js"),E=require("./components/template-context-mapper/utils/validateIsUrl.js"),j=require("./components/fab-menu/FABMenu.js"),b=require("./components/floating-action-button/FloatingActionButton.js"),B=require("./components/floating-action-button/FloatingActionButton.styles.js"),h=require("./components/image-compress/ImageCompress.js"),R=require("./components/TypographyStyle.js"),g=require("./components/button/Button.js"),_=require("./components/progress-bar/ProgressBarComponent.js"),q=require("./components/QueryBuilder/QueryBuilder.js"),I=require("./components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),f=require("./components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js"),k=require("./components/QueryBuilder/redux/queryBuilder.reducer.js"),D=require("./components/QueryBuilder/redux/queryBuilderCache.reducer.js"),L=require("./components/QueryBuilder/types/QueryBuilderOperator.type.js"),M=require("./components/modals/styledModal.js"),N=require("./components/dropdown/DropdownPopover/index.js"),w=require("./components/dropdown/Dropdown.js"),G=require("./components/dropdown/OpenedDropdown/components/OpennedDropdown.js"),U=require("./components/dropdown/MenuItem/MenuItem.js"),H=require("./components/analytics-card/AnalyticsCard.js"),F=require("./components/analytics-card/AnalyticsCard.styled.js"),v=require("./components/input/Input.js"),V=require("./components/analytics-chips-and-dropdowns/AnalyticsChip.js"),Y=require("./components/analytics-chips-and-dropdowns/AnalyticsDropdown.js"),W=require("./components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js"),Q=require("./components/analytics-chips-and-dropdowns/AnalyticsMetric.js"),K=require("./components/analytics-chips-and-dropdowns/AnalyticsTrend.js"),Z=require("./components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js"),z=require("./components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js"),X=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js"),J=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js"),$=require("./components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js"),ee=require("./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js"),re=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js"),te=require("./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js"),oe=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js"),ne=require("./components/avatar/Avatar.js"),ie=require("./components/avatar/AvatarHelper.js"),se=require("./components/alerts/Alert.js"),pe=require("./components/alerts/AlertHelper.js"),ae=require("./components/thumbnail/Thumbnail.js"),ue=require("./components/curtain/Curtain.js"),ce=require("./components/datePicker/DatePicker.js"),le=require("./components/switch/Switch.js"),de=require("./components/plans/SubscriptionPlan.js"),me=require("./components/plans/SubscriptionPlanSelector.js"),Te=require("./components/tabs/Tabs.js"),xe=require("./components/shimmer/ShimmerComponent/BikShimmer.js"),Pe=require("./components/TablePagination/TablePagination.js"),Ae=require("./components/TablePagination/TablePaginationCard.js"),Se=require("./components/states-modal/StateModalComponent.js"),ye=require("./components/states-modal/DeleteConfirmationModal.js"),Ce=require("./components/states/StateComponent.js"),Oe=require("./components/WhatsAppTextEditor/WhatsAppTextEditor.js"),Ee=require("./components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js"),je=require("./helpers/BaseWhatsappContentLang.helper.js"),be=require("./components/card-selection-modal/CardSelectionModal.js"),Be=require("./components/image-cropper/BikImageCropper.js"),he=require("./components/image-cropper/BikImagePipeline/BikImagePipeline.js"),Re=require("./components/buttonGroup/ButtonGroup.js"),ge=require("./components/accordion/Accordion.js"),_e=require("./components/file-uploader/FileUploader.js"),qe=require("./components/colourInput/ColourInput.js"),Ie=require("./components/bik-layout/BikHeader.js"),fe=require("./components/bik-layout/BikLayout.js"),ke=require("./components/bik-layout/BikProfile.js"),De=require("./components/bik-layout/SimpleSidebar.js"),Le=require("./components/bik-layout/BikSidebar.js"),Me=require("./components/bik-layout/FeatureModal.js"),Ne=require("./components/bik-layout/SidebarSkeleton.js"),we=require("./components/searchBar/searchBar.js"),Ge=require("./components/custom-date-time/CustomDateTime.js"),Ue=require("./components/product-picker/ProductPickerModal.js"),He=require("./components/discount-modal/DiscountModal.js"),Fe=require("./components/discount-modal/CouponExpiration/CouponExpiration.js"),ve=require("./components/discount-modal/type.js"),Ve=require("./components/country-code-picker/CountryCodePicker.js"),Ye=require("./components/country-code-picker/CountryCodePicker.modal.js"),We=require("./components/shimmer-image/ShimmerImage.js"),Qe=require("./components/product-picker-v2/modal.js"),Ke=require("./components/carousel/carousel.js"),Ze=require("./components/carousel-secondary/CarouselSecondary.js"),ze=require("./components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js"),Xe=require("./components/radioList/RadioList.js"),Je=require("./components/checkList/CheckList.js"),$e=require("./components/postPicker/postPicker.js"),er=require("./components/dropdown-button/DropdownButton.js"),rr=require("./components/editor/mail/mailRTE.js");exports.regexPatterns=e,exports.StringUtils=r.default,exports.BASE_COLORS=t.BASE_COLORS,exports.COLORS=t.COLORS,exports.DEFAULT_THEME=t.DEFAULT_THEME,exports.FONTS=t.FONTS,exports.CheckBox=o.CheckBox,exports.ListItem=n.ListItem,exports.Pagination=i.Pagination,exports.RadioButton=s.RadioButton,exports.Toaster=p.Toaster,exports.Tooltip=a.Tooltip,exports.Spinner=u.Spinner,exports.Stepper=c.Stepper,exports.Tag=l.Tag,exports.IconButton=d.IconButton,exports.TemplatePreview=m.TemplatePreview,exports.WhatsappLikePreview=T.WhatsappLikePreview,exports.WhatsappLikePreviewV2=x.WhatsappLikePreviewV2,exports.renderVariableUIForPreview=P.renderVariableUIForPreview,exports.WhatsAppFormatToHTML=A.WhatsAppFormatToHTML,exports.VariableEditorHelper=S.VariableEditorHelper,Object.defineProperty(exports,"ACTIONS_TYPES",{enumerable:!0,get:function(){return y.ACTIONS_TYPES}}),exports.CUSTOM_URL_NAME=y.CUSTOM_URL_NAME,Object.defineProperty(exports,"HEADER_TYPES",{enumerable:!0,get:function(){return y.HEADER_TYPES}}),Object.defineProperty(exports,"TEMPLATE_EDITOR",{enumerable:!0,get:function(){return y.TEMPLATE_EDITOR}}),Object.defineProperty(exports,"TEMPLATE_STATUS",{enumerable:!0,get:function(){return y.TEMPLATE_STATUS}}),exports.TemplateContextMapper=C.TemplateContextMapper,exports.getAllDataFromTemplateComponent=O.getAllDataFromTemplateComponent,exports.validateIsUrl=E.validateIsUrl,exports.FABMenu=j.FABMenu,exports.FloatingActionButton=b.FloatingActionButton,Object.defineProperty(exports,"DROP_POSITION",{enumerable:!0,get:function(){return B.DROP_POSITION}}),exports.DropdownToggleContainer=B.DropdownToggleContainer,Object.defineProperty(exports,"FAB_POSITION",{enumerable:!0,get:function(){return B.FAB_POSITION}}),exports.FloatingActionButtonContainer=B.FloatingActionButtonContainer,exports.FloatingActionButtonOuterContainer=B.FloatingActionButtonOuterContainer,Object.defineProperty(exports,"MENU_ALIGNMENT",{enumerable:!0,get:function(){return B.MENU_ALIGNMENT}}),exports.StyledDropdown=B.StyledDropdown,exports.TooltipStyled=B.TooltipStyled,exports.ImageService=h.ImageService,exports.BodyCaption=R.BodyCaption,exports.BodyLarge=R.BodyLarge,exports.BodyPrimary=R.BodyPrimary,exports.BodyPrimaryLink=R.BodyPrimaryLink,exports.BodyRegular=R.BodyRegular,exports.BodySecondary=R.BodySecondary,exports.BodySecondaryLink=R.BodySecondaryLink,exports.BodyTiny=R.BodyTiny,exports.ButtonLarge=R.ButtonLarge,exports.ButtonRegular=R.ButtonRegular,exports.Caption=R.Caption,exports.Display=R.Display,exports.SmallRegular=R.SmallRegular,exports.SubHeading=R.SubHeading,exports.TitleLarge=R.TitleLarge,exports.TitleMedium=R.TitleMedium,exports.TitleRegular=R.TitleRegular,exports.TitleSmall=R.TitleSmall,exports.Button=g.Button,exports.ProgressBarComponent=_.ProgressBarComponent,exports.ProgressCompletedBar=_.ProgressCompletedBar,exports.QueryBuilder=q.QueryBuilder,exports.BaseQueryBuilderNode=I.BaseQueryBuilderNode,exports.PropertyNode=f.PropertyNode,exports.PropertyNodeHeadless=f.PropertyNodeHeadless,exports.queryBuilderSlice=k.queryBuilderSlice,exports.queryBuilderCacheSlice=D.queryBuilderCacheSlice,Object.defineProperty(exports,"AD_STRING_OPERATORS",{enumerable:!0,get:function(){return L.AD_STRING_OPERATORS}}),Object.defineProperty(exports,"ANY_AD_OPERATORS",{enumerable:!0,get:function(){return L.ANY_AD_OPERATORS}}),Object.defineProperty(exports,"ANY_IG_OPERATORS",{enumerable:!0,get:function(){return L.ANY_IG_OPERATORS}}),Object.defineProperty(exports,"BOOLEAN_OPERATORS",{enumerable:!0,get:function(){return L.BOOLEAN_OPERATORS}}),Object.defineProperty(exports,"DATE_OPERATORS",{enumerable:!0,get:function(){return L.DATE_OPERATORS}}),Object.defineProperty(exports,"EVENT_VALUES",{enumerable:!0,get:function(){return L.EVENT_VALUES}}),Object.defineProperty(exports,"FREQUENCY_OPERATORS",{enumerable:!0,get:function(){return L.FREQUENCY_OPERATORS}}),Object.defineProperty(exports,"ICE_BREAKER_OPERATORS",{enumerable:!0,get:function(){return L.ICE_BREAKER_OPERATORS}}),Object.defineProperty(exports,"IG_STRING_OPERATORS",{enumerable:!0,get:function(){return L.IG_STRING_OPERATORS}}),Object.defineProperty(exports,"INTEGER_OPERATORS",{enumerable:!0,get:function(){return L.INTEGER_OPERATORS}}),Object.defineProperty(exports,"REACTION_OPERATORS",{enumerable:!0,get:function(){return L.REACTION_OPERATORS}}),Object.defineProperty(exports,"SPECIFIC_IG_OPERATORS",{enumerable:!0,get:function(){return L.SPECIFIC_IG_OPERATORS}}),Object.defineProperty(exports,"STRING_OPERATORS",{enumerable:!0,get:function(){return L.STRING_OPERATORS}}),exports.StyledModal=M.StyledModal,exports.DropdownPopover=N.DropdownPopover,exports.Dropdown=w.Dropdown,exports.OpenedDropdown=G.OpenedDropdown,exports.MenuItemDropdown=U.MenuItemDropdown,exports.AnalyticsCard=H.AnalyticsCard,exports.AnalyticsContainer=F.AnalyticsContainer,exports.CardDataContainer=F.CardDataContainer,exports.Input=v.Input,exports.AnalyticsChip=V.AnalyticsChip,exports.AnalyticsDropdown=Y.AnalyticsDropdown,exports.EachItem=Y.EachItem,exports.formatDate=Y.formatDate,exports.AnalyticsMultiChip=W.AnalyticsMultiChip,exports.AnalyticsMetric=Q.AnalyticsMetric,exports.AnalyticsTrend=K.AnalyticsTrend,exports.LineChart=Z.LineChart,exports.LinearChipGroupedChart=z.LinearChipGroupedChart,exports.Card=X.Card,exports.PieChartAnalytics=X.PieChartAnalytics,exports.PieChart=J.PieChart,exports.HorizontalGraph=$.HorizontalGraph,exports.StackedBarChart=ee.StackedBarChart,exports.VerticalGraph=re.VerticalGraph,Object.defineProperty(exports,"HEAT",{enumerable:!0,get:function(){return te.HEAT}}),exports.HEAT_COLORS=te.HEAT_COLORS,Object.defineProperty(exports,"HEAT_GRADING_TYPE",{enumerable:!0,get:function(){return te.HEAT_GRADING_TYPE}}),exports.HeatMap=te.HeatMap,exports.VerticalBarAndLinearGraph=oe.VerticalBarAndLinearGraph,exports.AVATAR_SIZE_VS_ICON_SIZE_MAP=ne.AVATAR_SIZE_VS_ICON_SIZE_MAP,exports.Avatar=ne.Avatar,exports.BACKGROUND_VS_TEXT_COLOR_MAP=ne.BACKGROUND_VS_TEXT_COLOR_MAP,Object.defineProperty(exports,"AVATAR_BACKGROUND",{enumerable:!0,get:function(){return ie.AVATAR_BACKGROUND}}),exports.AVATAR_SIZE_MAP=ie.AVATAR_SIZE_MAP,Object.defineProperty(exports,"AVATAR_TYPES",{enumerable:!0,get:function(){return ie.AVATAR_TYPES}}),Object.defineProperty(exports,"SIZE",{enumerable:!0,get:function(){return ie.SIZE}}),exports.Alert=se.Alert,Object.defineProperty(exports,"ALERT_TYPES",{enumerable:!0,get:function(){return pe.ALERT_TYPES}}),exports.COLOR_CONFIG_MAP=pe.COLOR_CONFIG_MAP,Object.defineProperty(exports,"RATIO",{enumerable:!0,get:function(){return ae.RATIO}}),exports.Thumbnail=ae.Thumbnail,exports.Curtain=ue.Curtain,exports.DatePicker=ce.DatePicker,exports.Loader=le.Loader,exports.Switch=le.Switch,exports.SwitchContainer=le.SwitchContainer,exports.Thumb=le.Thumb,exports.SubscriptionPlan=de.SubscriptionPlan,exports.SubscriptionPlanSelector=me.SubscriptionPlanSelector,exports.TabItemComponent=Te.TabItemComponent,exports.Tabs=Te.Tabs,exports.BikShimmer=xe.BikShimmer,exports.TablePagination=Pe.TablePagination,exports.TablePaginationCard=Ae.TablePaginationCard,exports.TablePaginationCardStyled=Ae.TablePaginationCardStyled,exports.StateModalComponent=Se.StateModalComponent,exports.DeleteConfirmationModal=ye.DeleteConfirmationModal,Object.defineProperty(exports,"ButtonActions",{enumerable:!0,get:function(){return Ce.ButtonActions}}),Object.defineProperty(exports,"ButtonTypes",{enumerable:!0,get:function(){return Ce.ButtonTypes}}),exports.StateComponent=Ce.StateComponent,Object.defineProperty(exports,"StateInterface",{enumerable:!0,get:function(){return Ce.StateInterface}}),exports.WhatsAppTextEditor=Oe.WhatsAppTextEditor,Object.defineProperty(exports,"EditorActionTypes",{enumerable:!0,get:function(){return Ee.EditorActionTypes}}),exports.WhatsAppTextEditorHeader=Ee.WhatsAppTextEditorHeader,exports.BaseWhatsappContentLangHelper=je.BaseWhatsappContentLangHelper,exports.CardSelectionModal=be.CardSelectionModal,exports.BikImageCropper=Be.BikImageCropper,exports.BikImagePipeline=he.BikImagePipeline,exports.ButtonGroup=Re.ButtonGroup,exports.BikAccordion=ge.BikAccordion,exports.FileUploader=_e.FileUploader,exports.ColourInput=qe.ColourInput,exports.BikHeader=Ie.BikHeader,exports.BikLayout=fe.BikLayout,exports.BikProfile=ke.BikProfile,exports.SimpleSidebar=De.SimpleSidebar,exports.BikSidebar=Le.BikSidebar,exports.FeatureModal=Me.FeatureModal,exports.SidebarSkeleton=Ne.SidebarSkeleton,exports.SearchBar=we.SearchBar,exports.CustomDateTime=Ge.CustomDateTime,exports.PricePleaseProductPicker=Ue.PricePleaseProductPicker,exports.ProductPickerContent=Ue.ProductPickerContent,exports.DiscountModal=He.DiscountModal,Object.defineProperty(exports,"COUPON_EXPIRATION",{enumerable:!0,get:function(){return Fe.COUPON_EXPIRATION}}),exports.CouponExpiration=Fe.CouponExpiration,Object.defineProperty(exports,"DISCOUNT_TARGET_SELECTION",{enumerable:!0,get:function(){return ve.DISCOUNT_TARGET_SELECTION}}),Object.defineProperty(exports,"DISCOUNT_TARGET_TYPES",{enumerable:!0,get:function(){return ve.DISCOUNT_TARGET_TYPES}}),Object.defineProperty(exports,"DISCOUNT_TYPES",{enumerable:!0,get:function(){return ve.DISCOUNT_TYPES}}),Object.defineProperty(exports,"DISCOUNT_VALUE_TYPES",{enumerable:!0,get:function(){return ve.DISCOUNT_VALUE_TYPES}}),Object.defineProperty(exports,"MIN_PURCHASE_REQUIREMENT",{enumerable:!0,get:function(){return ve.MIN_PURCHASE_REQUIREMENT}}),exports.CountryCodePicker=Ve.CountryCodePicker,exports.CountriesData=Ye.CountriesData,exports.ShimmerImage=We.ShimmerImage,exports.ProductPickerModal=Qe.ProductPickerModal,exports.Carousel=Ke.Carousel,exports.CarouselSecondary=Ze.CarouselSecondary,exports.AccessTokenTroubleshootDialog=ze.AccessTokenTroubleshootDialog,exports.RadioList=Xe.RadioList,exports.CheckList=Je.CheckList,Object.defineProperty(exports,"DateKeys",{enumerable:!0,get:function(){return $e.DateKeys}}),Object.defineProperty(exports,"MEDIA_TYPES",{enumerable:!0,get:function(){return $e.MEDIA_TYPES}}),exports.PostPicker=$e.PostPicker,exports.dateOptions=$e.dateOptions,exports.DropdownButton=er.DropdownButton,exports.GmailRTE=rr.GmailRTE;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./components/template-preview/constants/regexPatterns.js"),r=require("./utils/StringUtils.js"),t=require("./constants/Theme.js"),o=require("./components/checkBox/CheckBox.js"),n=require("./components/list-item/ListItem.js"),i=require("./components/pagination/Pagination.js"),p=require("./components/radioButton/RadioButton.js"),s=require("./components/toaster/Toaster.js"),a=require("./components/tooltips/Tooltip.js"),u=require("./components/spinner/Spinner.js"),c=require("./components/stepper/Stepper.js"),l=require("./components/tag/Tag.js"),d=require("./components/icon-button/IconButton.js"),m=require("./components/template-preview/TemplatePreview.js"),T=require("./components/template-preview/WhatsApp/WhatsAppLikePreview.js"),x=require("./components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),P=require("./components/template-preview/helpers/SmsTemplateHelper.js"),A=require("./components/template-preview/helpers/WhatsAppFormatToHTML.js"),S=require("./components/template-preview/helpers/VariableEditorHelper.js"),y=require("./components/template-preview/models/TemplateMeta.js"),C=require("./components/template-context-mapper/TemplateContextMapper.js"),O=require("./components/template-context-mapper/utils/getDataFromTemplateComponent.js"),E=require("./components/template-context-mapper/utils/validateIsUrl.js"),j=require("./components/fab-menu/FABMenu.js"),b=require("./components/floating-action-button/FloatingActionButton.js"),B=require("./components/floating-action-button/FloatingActionButton.styles.js"),h=require("./components/image-compress/ImageCompress.js"),R=require("./components/TypographyStyle.js"),g=require("./components/button/Button.js"),_=require("./components/progress-bar/ProgressBarComponent.js"),q=require("./components/QueryBuilder/QueryBuilder.js"),I=require("./components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),f=require("./components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js"),k=require("./components/QueryBuilder/redux/queryBuilder.reducer.js"),D=require("./components/QueryBuilder/redux/queryBuilderCache.reducer.js"),L=require("./components/QueryBuilder/types/QueryBuilderOperator.type.js"),M=require("./components/modals/styledModal.js"),N=require("./components/dropdown/DropdownPopover/index.js"),w=require("./components/dropdown/Dropdown.js"),G=require("./components/dropdown/OpenedDropdown/components/OpennedDropdown.js"),U=require("./components/dropdown/MenuItem/MenuItem.js"),H=require("./components/analytics-card/AnalyticsCard.js"),F=require("./components/analytics-card/AnalyticsCard.styled.js"),v=require("./components/input/Input.js"),V=require("./components/analytics-chips-and-dropdowns/AnalyticsChip.js"),Y=require("./components/analytics-chips-and-dropdowns/AnalyticsDropdown.js"),W=require("./components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js"),Q=require("./components/analytics-chips-and-dropdowns/AnalyticsMetric.js"),K=require("./components/analytics-chips-and-dropdowns/AnalyticsTrend.js"),Z=require("./components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js"),z=require("./components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js"),X=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js"),J=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js"),$=require("./components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js"),ee=require("./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js"),re=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js"),te=require("./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js"),oe=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js"),ne=require("./components/avatar/Avatar.js"),ie=require("./components/avatar/AvatarHelper.js"),pe=require("./components/alerts/Alert.js"),se=require("./components/alerts/AlertHelper.js"),ae=require("./components/thumbnail/Thumbnail.js"),ue=require("./components/curtain/Curtain.js"),ce=require("./components/datePicker/DatePicker.js"),le=require("./components/switch/Switch.js"),de=require("./components/plans/SubscriptionPlan.js"),me=require("./components/plans/SubscriptionPlanSelector.js"),Te=require("./components/tabs/Tabs.js"),xe=require("./components/shimmer/ShimmerComponent/BikShimmer.js"),Pe=require("./components/TablePagination/TablePagination.js"),Ae=require("./components/TablePagination/TablePaginationCard.js"),Se=require("./components/states-modal/StateModalComponent.js"),ye=require("./components/states-modal/DeleteConfirmationModal.js"),Ce=require("./components/states/StateComponent.js"),Oe=require("./components/WhatsAppTextEditor/WhatsAppTextEditor.js"),Ee=require("./components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js"),je=require("./helpers/BaseWhatsappContentLang.helper.js"),be=require("./components/card-selection-modal/CardSelectionModal.js"),Be=require("./components/image-cropper/BikImageCropper.js"),he=require("./components/image-cropper/BikImagePipeline/BikImagePipeline.js"),Re=require("./components/buttonGroup/ButtonGroup.js"),ge=require("./components/accordion/Accordion.js"),_e=require("./components/file-uploader/FileUploader.js"),qe=require("./components/colourInput/ColourInput.js"),Ie=require("./components/bik-layout/BikHeader.js"),fe=require("./components/bik-layout/BikLayout.js"),ke=require("./components/bik-layout/BikProfile.js"),De=require("./components/bik-layout/SimpleSidebar.js"),Le=require("./components/bik-layout/BikSidebar.js"),Me=require("./components/bik-layout/FeatureModal.js"),Ne=require("./components/bik-layout/SidebarSkeleton.js"),we=require("./components/searchBar/searchBar.js"),Ge=require("./components/custom-date-time/CustomDateTime.js"),Ue=require("./components/product-picker/ProductPickerModal.js"),He=require("./components/discount-modal/DiscountModal.js"),Fe=require("./components/discount-modal/CouponExpiration/CouponExpiration.js"),ve=require("./components/discount-modal/type.js"),Ve=require("./components/country-code-picker/CountryCodePicker.js"),Ye=require("./components/country-code-picker/CountryCodePicker.modal.js"),We=require("./components/shimmer-image/ShimmerImage.js"),Qe=require("./components/product-picker-v2/modal.js"),Ke=require("./components/carousel/carousel.js"),Ze=require("./components/carousel-secondary/CarouselSecondary.js"),ze=require("./components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js"),Xe=require("./components/radioList/RadioList.js"),Je=require("./components/checkList/CheckList.js"),$e=require("./components/postPicker/postPicker.js"),er=require("./components/dropdown-button/DropdownButton.js");exports.regexPatterns=e,exports.StringUtils=r.default,exports.BASE_COLORS=t.BASE_COLORS,exports.COLORS=t.COLORS,exports.DEFAULT_THEME=t.DEFAULT_THEME,exports.FONTS=t.FONTS,exports.CheckBox=o.CheckBox,exports.ListItem=n.ListItem,exports.Pagination=i.Pagination,exports.RadioButton=p.RadioButton,exports.Toaster=s.Toaster,exports.Tooltip=a.Tooltip,exports.Spinner=u.Spinner,exports.Stepper=c.Stepper,exports.Tag=l.Tag,exports.IconButton=d.IconButton,exports.TemplatePreview=m.TemplatePreview,exports.WhatsappLikePreview=T.WhatsappLikePreview,exports.WhatsappLikePreviewV2=x.WhatsappLikePreviewV2,exports.renderVariableUIForPreview=P.renderVariableUIForPreview,exports.WhatsAppFormatToHTML=A.WhatsAppFormatToHTML,exports.VariableEditorHelper=S.VariableEditorHelper,Object.defineProperty(exports,"ACTIONS_TYPES",{enumerable:!0,get:function(){return y.ACTIONS_TYPES}}),exports.CUSTOM_URL_NAME=y.CUSTOM_URL_NAME,Object.defineProperty(exports,"HEADER_TYPES",{enumerable:!0,get:function(){return y.HEADER_TYPES}}),Object.defineProperty(exports,"TEMPLATE_EDITOR",{enumerable:!0,get:function(){return y.TEMPLATE_EDITOR}}),Object.defineProperty(exports,"TEMPLATE_STATUS",{enumerable:!0,get:function(){return y.TEMPLATE_STATUS}}),exports.TemplateContextMapper=C.TemplateContextMapper,exports.getAllDataFromTemplateComponent=O.getAllDataFromTemplateComponent,exports.validateIsUrl=E.validateIsUrl,exports.FABMenu=j.FABMenu,exports.FloatingActionButton=b.FloatingActionButton,Object.defineProperty(exports,"DROP_POSITION",{enumerable:!0,get:function(){return B.DROP_POSITION}}),exports.DropdownToggleContainer=B.DropdownToggleContainer,Object.defineProperty(exports,"FAB_POSITION",{enumerable:!0,get:function(){return B.FAB_POSITION}}),exports.FloatingActionButtonContainer=B.FloatingActionButtonContainer,exports.FloatingActionButtonOuterContainer=B.FloatingActionButtonOuterContainer,Object.defineProperty(exports,"MENU_ALIGNMENT",{enumerable:!0,get:function(){return B.MENU_ALIGNMENT}}),exports.StyledDropdown=B.StyledDropdown,exports.TooltipStyled=B.TooltipStyled,exports.ImageService=h.ImageService,exports.BodyCaption=R.BodyCaption,exports.BodyLarge=R.BodyLarge,exports.BodyPrimary=R.BodyPrimary,exports.BodyPrimaryLink=R.BodyPrimaryLink,exports.BodyRegular=R.BodyRegular,exports.BodySecondary=R.BodySecondary,exports.BodySecondaryLink=R.BodySecondaryLink,exports.BodyTiny=R.BodyTiny,exports.ButtonLarge=R.ButtonLarge,exports.ButtonRegular=R.ButtonRegular,exports.Caption=R.Caption,exports.Display=R.Display,exports.SmallRegular=R.SmallRegular,exports.SubHeading=R.SubHeading,exports.TitleLarge=R.TitleLarge,exports.TitleMedium=R.TitleMedium,exports.TitleRegular=R.TitleRegular,exports.TitleSmall=R.TitleSmall,exports.Button=g.Button,exports.ProgressBarComponent=_.ProgressBarComponent,exports.ProgressCompletedBar=_.ProgressCompletedBar,exports.QueryBuilder=q.QueryBuilder,exports.BaseQueryBuilderNode=I.BaseQueryBuilderNode,exports.PropertyNode=f.PropertyNode,exports.PropertyNodeHeadless=f.PropertyNodeHeadless,exports.queryBuilderSlice=k.queryBuilderSlice,exports.queryBuilderCacheSlice=D.queryBuilderCacheSlice,Object.defineProperty(exports,"AD_STRING_OPERATORS",{enumerable:!0,get:function(){return L.AD_STRING_OPERATORS}}),Object.defineProperty(exports,"ANY_AD_OPERATORS",{enumerable:!0,get:function(){return L.ANY_AD_OPERATORS}}),Object.defineProperty(exports,"ANY_IG_OPERATORS",{enumerable:!0,get:function(){return L.ANY_IG_OPERATORS}}),Object.defineProperty(exports,"BOOLEAN_OPERATORS",{enumerable:!0,get:function(){return L.BOOLEAN_OPERATORS}}),Object.defineProperty(exports,"DATE_OPERATORS",{enumerable:!0,get:function(){return L.DATE_OPERATORS}}),Object.defineProperty(exports,"EVENT_VALUES",{enumerable:!0,get:function(){return L.EVENT_VALUES}}),Object.defineProperty(exports,"FREQUENCY_OPERATORS",{enumerable:!0,get:function(){return L.FREQUENCY_OPERATORS}}),Object.defineProperty(exports,"ICE_BREAKER_OPERATORS",{enumerable:!0,get:function(){return L.ICE_BREAKER_OPERATORS}}),Object.defineProperty(exports,"IG_STRING_OPERATORS",{enumerable:!0,get:function(){return L.IG_STRING_OPERATORS}}),Object.defineProperty(exports,"INTEGER_OPERATORS",{enumerable:!0,get:function(){return L.INTEGER_OPERATORS}}),Object.defineProperty(exports,"REACTION_OPERATORS",{enumerable:!0,get:function(){return L.REACTION_OPERATORS}}),Object.defineProperty(exports,"SPECIFIC_IG_OPERATORS",{enumerable:!0,get:function(){return L.SPECIFIC_IG_OPERATORS}}),Object.defineProperty(exports,"STRING_OPERATORS",{enumerable:!0,get:function(){return L.STRING_OPERATORS}}),exports.StyledModal=M.StyledModal,exports.DropdownPopover=N.DropdownPopover,exports.Dropdown=w.Dropdown,exports.OpenedDropdown=G.OpenedDropdown,exports.MenuItemDropdown=U.MenuItemDropdown,exports.AnalyticsCard=H.AnalyticsCard,exports.AnalyticsContainer=F.AnalyticsContainer,exports.CardDataContainer=F.CardDataContainer,exports.Input=v.Input,exports.AnalyticsChip=V.AnalyticsChip,exports.AnalyticsDropdown=Y.AnalyticsDropdown,exports.EachItem=Y.EachItem,exports.formatDate=Y.formatDate,exports.AnalyticsMultiChip=W.AnalyticsMultiChip,exports.AnalyticsMetric=Q.AnalyticsMetric,exports.AnalyticsTrend=K.AnalyticsTrend,exports.LineChart=Z.LineChart,exports.LinearChipGroupedChart=z.LinearChipGroupedChart,exports.Card=X.Card,exports.PieChartAnalytics=X.PieChartAnalytics,exports.PieChart=J.PieChart,exports.HorizontalGraph=$.HorizontalGraph,exports.StackedBarChart=ee.StackedBarChart,exports.VerticalGraph=re.VerticalGraph,Object.defineProperty(exports,"HEAT",{enumerable:!0,get:function(){return te.HEAT}}),exports.HEAT_COLORS=te.HEAT_COLORS,Object.defineProperty(exports,"HEAT_GRADING_TYPE",{enumerable:!0,get:function(){return te.HEAT_GRADING_TYPE}}),exports.HeatMap=te.HeatMap,exports.VerticalBarAndLinearGraph=oe.VerticalBarAndLinearGraph,exports.AVATAR_SIZE_VS_ICON_SIZE_MAP=ne.AVATAR_SIZE_VS_ICON_SIZE_MAP,exports.Avatar=ne.Avatar,exports.BACKGROUND_VS_TEXT_COLOR_MAP=ne.BACKGROUND_VS_TEXT_COLOR_MAP,Object.defineProperty(exports,"AVATAR_BACKGROUND",{enumerable:!0,get:function(){return ie.AVATAR_BACKGROUND}}),exports.AVATAR_SIZE_MAP=ie.AVATAR_SIZE_MAP,Object.defineProperty(exports,"AVATAR_TYPES",{enumerable:!0,get:function(){return ie.AVATAR_TYPES}}),Object.defineProperty(exports,"SIZE",{enumerable:!0,get:function(){return ie.SIZE}}),exports.Alert=pe.Alert,Object.defineProperty(exports,"ALERT_TYPES",{enumerable:!0,get:function(){return se.ALERT_TYPES}}),exports.COLOR_CONFIG_MAP=se.COLOR_CONFIG_MAP,Object.defineProperty(exports,"RATIO",{enumerable:!0,get:function(){return ae.RATIO}}),exports.Thumbnail=ae.Thumbnail,exports.Curtain=ue.Curtain,exports.DatePicker=ce.DatePicker,exports.Loader=le.Loader,exports.Switch=le.Switch,exports.SwitchContainer=le.SwitchContainer,exports.Thumb=le.Thumb,exports.SubscriptionPlan=de.SubscriptionPlan,exports.SubscriptionPlanSelector=me.SubscriptionPlanSelector,exports.TabItemComponent=Te.TabItemComponent,exports.Tabs=Te.Tabs,exports.BikShimmer=xe.BikShimmer,exports.TablePagination=Pe.TablePagination,exports.TablePaginationCard=Ae.TablePaginationCard,exports.TablePaginationCardStyled=Ae.TablePaginationCardStyled,exports.StateModalComponent=Se.StateModalComponent,exports.DeleteConfirmationModal=ye.DeleteConfirmationModal,Object.defineProperty(exports,"ButtonActions",{enumerable:!0,get:function(){return Ce.ButtonActions}}),Object.defineProperty(exports,"ButtonTypes",{enumerable:!0,get:function(){return Ce.ButtonTypes}}),exports.StateComponent=Ce.StateComponent,Object.defineProperty(exports,"StateInterface",{enumerable:!0,get:function(){return Ce.StateInterface}}),exports.WhatsAppTextEditor=Oe.WhatsAppTextEditor,Object.defineProperty(exports,"EditorActionTypes",{enumerable:!0,get:function(){return Ee.EditorActionTypes}}),exports.WhatsAppTextEditorHeader=Ee.WhatsAppTextEditorHeader,exports.BaseWhatsappContentLangHelper=je.BaseWhatsappContentLangHelper,exports.CardSelectionModal=be.CardSelectionModal,exports.BikImageCropper=Be.BikImageCropper,exports.BikImagePipeline=he.BikImagePipeline,exports.ButtonGroup=Re.ButtonGroup,exports.BikAccordion=ge.BikAccordion,exports.FileUploader=_e.FileUploader,exports.ColourInput=qe.ColourInput,exports.BikHeader=Ie.BikHeader,exports.BikLayout=fe.BikLayout,exports.BikProfile=ke.BikProfile,exports.SimpleSidebar=De.SimpleSidebar,exports.BikSidebar=Le.BikSidebar,exports.FeatureModal=Me.FeatureModal,exports.SidebarSkeleton=Ne.SidebarSkeleton,exports.SearchBar=we.SearchBar,exports.CustomDateTime=Ge.CustomDateTime,exports.PricePleaseProductPicker=Ue.PricePleaseProductPicker,exports.ProductPickerContent=Ue.ProductPickerContent,exports.DiscountModal=He.DiscountModal,Object.defineProperty(exports,"COUPON_EXPIRATION",{enumerable:!0,get:function(){return Fe.COUPON_EXPIRATION}}),exports.CouponExpiration=Fe.CouponExpiration,Object.defineProperty(exports,"DISCOUNT_TARGET_SELECTION",{enumerable:!0,get:function(){return ve.DISCOUNT_TARGET_SELECTION}}),Object.defineProperty(exports,"DISCOUNT_TARGET_TYPES",{enumerable:!0,get:function(){return ve.DISCOUNT_TARGET_TYPES}}),Object.defineProperty(exports,"DISCOUNT_TYPES",{enumerable:!0,get:function(){return ve.DISCOUNT_TYPES}}),Object.defineProperty(exports,"DISCOUNT_VALUE_TYPES",{enumerable:!0,get:function(){return ve.DISCOUNT_VALUE_TYPES}}),Object.defineProperty(exports,"MIN_PURCHASE_REQUIREMENT",{enumerable:!0,get:function(){return ve.MIN_PURCHASE_REQUIREMENT}}),exports.CountryCodePicker=Ve.CountryCodePicker,exports.CountriesData=Ye.CountriesData,exports.ShimmerImage=We.ShimmerImage,exports.ProductPickerModal=Qe.ProductPickerModal,exports.Carousel=Ke.Carousel,exports.CarouselSecondary=Ze.CarouselSecondary,exports.AccessTokenTroubleshootDialog=ze.AccessTokenTroubleshootDialog,exports.RadioList=Xe.RadioList,exports.CheckList=Je.CheckList,Object.defineProperty(exports,"DateKeys",{enumerable:!0,get:function(){return $e.DateKeys}}),Object.defineProperty(exports,"MEDIA_TYPES",{enumerable:!0,get:function(){return $e.MEDIA_TYPES}}),exports.PostPicker=$e.PostPicker,exports.dateOptions=$e.dateOptions,exports.DropdownButton=er.DropdownButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@emotion/styled/base";import{jsx as o,Fragment as e,jsxs as g}from"react/jsx-runtime";import I from"../../../../utils/StringUtils.js";import{COLORS as i}from"../../../../constants/Theme.js";import{useState as r,useEffect as C}from"react";import"../../../checkBox/CheckBox.styled.js";import{TitleMedium as c}from"../../../TypographyStyle.js";import"../../../list-item/ListItem.js";import"../../../pagination/Pagination.js";import"../../../radioButton/RadioButton.styled.js";import"react-toastify";import"../../../toaster/Toaster.styled.js";import"@tippyjs/react";import"../../../tooltips/TooltipInternal.js";import"../../../spinner/Spinner.js";import"../../../stepper/Stepper.styled.js";import"../../../tag/Tag.js";import"../../../icon-button/IconButton.js";import"../../../template-preview/TemplatePreview.js";import"../../../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import"../../../template-preview/models/TemplateMeta.js";import"../../../modals/styledModal.js";import"../../../template-preview/models/Channels.js";import"../../../template-context-mapper/context/templateModalContext.js";import"../../../template-context-mapper/modalElements/Footer.js";import"../../../template-context-mapper/modalElements/Body.js";import"../../../template-context-mapper/modalElements/Header.js";import"../../../zeroState/ZeroState.js";import"../../../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../../../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../../../button/Button.js";import"../../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../../../input/Input.js";import"react-bootstrap";import"../../../floating-action-button/FloatingActionButton.styles.js";import"../../../image-compress/ImageCompress.js";import"../../../progress-bar/ProgressBarComponent.js";import"../../../QueryBuilder/QueryBuilder.js";import"../../../QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js";import"../../../QueryBuilder/constants/connectorPosition.js";import"../../../QueryBuilder/constants/connector.js";import"../../../QueryBuilder/types/QueryBuilder.type.js";import"../../../dropdown/Dropdown.js";import"../../../QueryBuilder/components/InputLoader.js";import"../../../QueryBuilder/components/Connectors/Components/EmojiPicker.js";import"react-chips";import"../../../input/ChipInput.styled.js";import"../../../QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js";import"../../../QueryBuilder/components/Connectors/Components/IgPicker.js";import"../../../QueryBuilder/components/Connectors/Components/InTheLast.js";import"react-calendar";import"../../../../utils/DateUtils.js";import"../../../datePicker/DatePickerWrapper.styled.js";import"../../../QueryBuilder/components/Connectors/Connector.styled.js";import"../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.styled.js";import"../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.styled.js";import"../../../QueryBuilder/redux/queryBuilder.reducer.js";import"../../../QueryBuilder/redux/queryBuilderCache.reducer.js";import"../../../QueryBuilder/types/QueryBuilderOperator.type.js";import"../../../dropdown/DropdownPopover/index.js";import"../../../dropdown/MenuItem/MenuItem.js";import"../../../shimmer/ShimmerComponent/ShimmerStyled.js";import"../../../analytics-card/AnalyticsCard.styled.js";import"../../CommonStyles.js";import"../../../datePicker/DatePicker.styled.js";import"../../AnalyticsMetric.js";import"../LineChart/LineChart.js";import"../linearChipGroupedChart/LinearChipGroupedChart.styled.js";import{PieChart as s}from"./PieChart.js";import"../HorizontalBarGraph/HorizontalGraph.js";import"../StackedBarChart/StackedBarChart.js";import"../VerticalBarGraph/VerticalGraph.js";import"../heatmap/HeatMap.js";import"../VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js";import"../../../avatar/Avatar.js";import"../../../avatar/AvatarHelper.js";import"../../../alerts/Alert.styled.js";import"../../../alerts/AlertHelper.js";import"../../../thumbnail/Thumbnail.js";import"../../../curtain/Curtain.styled.js";import"../../../curtain/CurtainHelper.js";import"../../../switch/Switch.js";import"../../../plans/SubscriptionPlanStyled.js";import"../../../plans/SubscriptionPlanSelector.js";import"../../../tabs/Tabs.js";import"../../../TablePagination/TablePagination.styled.js";import"../../../TablePagination/TablePaginationCard.js";import"../../../states/StateComponent.js";import"../../../WhatsAppTextEditor/WhatsAppTextEditor.js";import"../../../WhatsAppTextEditor/WhatsAppTextEditorHeader.js";import"../../../card-selection-modal/CardSelectionModal.styled.js";import"react-image-crop";import"../../../buttonGroup/ButtonGroupStyle.js";import"../../../accordion/Accordion.style.js";import"../../../accordion/AccordionArrow.js";import"../../../file-uploader/FileUploaderStyle.js";import"../../../colourInput/ColourInput.styled.js";import"../../../bik-layout/CommonStyles.js";import"../../../bik-layout/SidebarStyles.js";import"date-fns";import"react-popper";import"../../../dropdown/Common.styled.js";import"../../../custom-date-time/CustomDateTime.styled.js";import"../../../../node_modules/lodash.debounce/index.js";import"../../../product-picker/ProductPicker.styled.js";import"../../../discount-modal/type.js";import"../../../discount-modal/DiscountModal.styled.js";import"../../../discount-modal/DynamicCoupon/DynamicCoupon.js";import"../../../discount-modal/CouponExpiration/CouponExpiration.js";import"../../../country-code-picker/CountryCodePicker.styled.js";import"../../../product-picker-v2/emptyState.js";import"../../../product-picker-v2/style.js";import"lodash";import"../../../carousel/carousel.js";import"../../../carousel-secondary/CarouselSecondary.style.js";import"../../../access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.styles.js";import"../../../radioList/RadioList.styled.js";import"../../../checkList/CheckList.styled.js";import"../../../postPicker/postPicker.js";import"../../../dropdown-button/DropdownButton.style.js";import"emoji-picker-react";import"react-quill";import"../../../editor/mail/MailRTE.styled.js";import{Chart as p,ArcElement as A,Legend as l}from"chart.js";import{Doughnut as a}from"react-chartjs-2";p.register(A,l);const d={plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:t=>{if(!t.label)return" 0%";const o=t.dataset.data.reduce(((t,o)=>t+o),0),e=parseFloat((t.raw/o*100).toFixed(1));return` ${t.label}: ${e}%`}}}}},m=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],n=t("div","production"===process.env.NODE_ENV?{target:"elaov7f0"}:{target:"elaov7f0",label:"CartStyled"})("background:",(t=>i.surface.standard),";border:1px solid ",(t=>i.stroke.primary),";border-radius:4px;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQzhCIiwiZmlsZSI6IlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGpzeCBhcyBfanN4LCBGcmFnbWVudCBhcyBfRnJhZ21lbnQsIGpzeHMgYXMgX2pzeHMgfSBmcm9tIFwicmVhY3QvanN4LXJ1bnRpbWVcIjtcclxuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgeyBTdHJpbmdVdGlscyB9IGZyb20gXCIuLi8uLi8uLi8uLi9pbmRleFwiO1xyXG5pbXBvcnQgeyBBcmNFbGVtZW50LCBDaGFydCBhcyBDaGFydEpTLCBMZWdlbmQgfSBmcm9tICdjaGFydC5qcyc7XHJcbmltcG9ydCB7IHVzZUVmZmVjdCwgdXNlU3RhdGUgfSBmcm9tICdyZWFjdCc7XHJcbmltcG9ydCB7IERvdWdobnV0IH0gZnJvbSAncmVhY3QtY2hhcnRqcy0yJztcclxuaW1wb3J0IHsgVGl0bGVNZWRpdW0gfSBmcm9tIFwiLi4vLi4vLi4vVHlwb2dyYXBoeVN0eWxlXCI7XHJcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gXCIuLi8uLi8uLi8uLi9jb25zdGFudHMvVGhlbWVcIjtcclxuaW1wb3J0IHsgUGllQ2hhcnQgfSBmcm9tICcuL1BpZUNoYXJ0JztcclxuQ2hhcnRKUy5yZWdpc3RlcihBcmNFbGVtZW50LCBMZWdlbmQpO1xyXG5jb25zdCBvcHRpb25zID0ge1xyXG4gICAgcGx1Z2luczoge1xyXG4gICAgICAgIGxlZ2VuZDoge1xyXG4gICAgICAgICAgICBkaXNwbGF5OiBmYWxzZSxcclxuICAgICAgICB9LFxyXG4gICAgICAgIHRvb2x0aXA6IHtcclxuICAgICAgICAgICAgZW5hYmxlZDogdHJ1ZSxcclxuICAgICAgICAgICAgY2FsbGJhY2tzOiB7XHJcbiAgICAgICAgICAgICAgICBsYWJlbDogKHRvb2x0aXBJdGVtKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0b29sdGlwSXRlbS5sYWJlbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYCAwJWA7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRvdGFsID0gdG9vbHRpcEl0ZW0uZGF0YXNldC5kYXRhLnJlZHVjZSgoYWNjLCBjdXIpID0+IGFjYyArIGN1ciwgMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGVyY2VudGFnZSA9IHBhcnNlRmxvYXQoKCh0b29sdGlwSXRlbS5yYXcgLyB0b3RhbCkgKiAxMDApLnRvRml4ZWQoMSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBgICR7dG9vbHRpcEl0ZW0ubGFiZWx9OiAke3BlcmNlbnRhZ2V9JWA7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0sXHJcbiAgICB9LFxyXG59O1xyXG5jb25zdCBHUkFQSF9DT0xPUlMgPSBbXHJcbiAgICAnIzVFMDdCQicsXHJcbiAgICAnIzlFNzdFRCcsXHJcbiAgICAnI0QyQUVGRicsXHJcbiAgICAnI0NERTFGRicsXHJcbiAgICAnIzkyQUZGQScsXHJcbiAgICAnIzM5MzVFMScsXHJcbl07XHJcbmNvbnN0IENhcnRTdHlsZWQgPSBzdHlsZWQuZGl2IGBcblx0YmFja2dyb3VuZDogJHsocHJvcHMpID0+IENPTE9SUy5zdXJmYWNlLnN0YW5kYXJkfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsocHJvcHMpID0+IENPTE9SUy5zdHJva2UucHJpbWFyeX07XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcbmA7XHJcbmV4cG9ydCBjb25zdCBDYXJkID0gKHByb3BzKSA9PiB7XHJcbiAgICByZXR1cm4gX2pzeChDYXJ0U3R5bGVkLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHsgcGFkZGluZzogMjQgfSB9LCB7IGNoaWxkcmVuOiBwcm9wcy5jaGlsZHJlbiB9KSk7XHJcbn07XHJcbmV4cG9ydCBjb25zdCBQaWVDaGFydEFuYWx5dGljcyA9ICh7IHRpdGxlLCBzbGljZXMsIHNpemUsIH0pID0+IHtcclxuICAgIGNvbnN0IFtzbGljZXNXaXRoQ29sb3IsIHNldFNsaWNlc1dpdGhDb2xvcl0gPSB1c2VTdGF0ZShbXSk7XHJcbiAgICBjb25zdCBbZGF0YSwgc2V0RGF0YV0gPSB1c2VTdGF0ZSgpO1xyXG4gICAgdXNlRWZmZWN0KCgpID0+IHtcclxuICAgICAgICBjb25zdCB0b3RhbFN1bSA9IHNsaWNlcy5yZWR1Y2UoKHN1bSwgc2xpY2UpID0+IHN1bSArIHNsaWNlLmNvdW50LCAwKTtcclxuICAgICAgICBsZXQgdXBkYXRlZFNsaWNlc1dpdGhDb2xvciA9IFtdO1xyXG4gICAgICAgIHVwZGF0ZWRTbGljZXNXaXRoQ29sb3IgPSBPYmplY3Qua2V5cyhzbGljZXMpLm1hcCgoa2V5LCBpbmRleCkgPT4gKE9iamVjdC5hc3NpZ24oeyBjb2xvcjogR1JBUEhfQ09MT1JTW2luZGV4ICUgR1JBUEhfQ09MT1JTLmxlbmd0aF0gfSwgc2xpY2VzW2tleV0pKSk7XHJcbiAgICAgICAgc2V0U2xpY2VzV2l0aENvbG9yKFsuLi51cGRhdGVkU2xpY2VzV2l0aENvbG9yXSk7XHJcbiAgICAgICAgaWYgKHRvdGFsU3VtID09PSAwKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGRhdGFTZXQgPSB7XHJcbiAgICAgICAgICAgICAgICBkYXRhc2V0czogW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogWzEwMF0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogWycjRjBGMEYwJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiAwLFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgY29uc3QgZGF0YVNldCA9IHtcclxuICAgICAgICAgICAgICAgIGxhYmVsczogc2xpY2VzLm1hcCgoc2xpY2UpID0+IFN0cmluZ1V0aWxzLmNhcGl0YWxpemUoc2xpY2UubmFtZSkpLFxyXG4gICAgICAgICAgICAgICAgZGF0YXNldHM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IHNsaWNlcy5tYXAoKHNsaWNlKSA9PiBzbGljZS5jb3VudCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogc2xpY2VzLm1hcCgoc2xpY2UsIGluZGV4KSA9PiB7IHZhciBfYTsgcmV0dXJuIChfYSA9IHNsaWNlLmNvbG9yKSAhPT0gbnVsbCAmJiBfYSAhPT0gdm9pZCAwID8gX2EgOiBHUkFQSF9DT0xPUlNbaW5kZXggJSBHUkFQSF9DT0xPUlMubGVuZ3RoXTsgfSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlckNvbG9yOiBbJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiA0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJSYWRpdXM6IDgsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIHNldERhdGEoZGF0YVNldCk7XHJcbiAgICAgICAgfVxyXG4gICAgfSwgW3NsaWNlc10pO1xyXG4gICAgaWYgKCFkYXRhKSB7XHJcbiAgICAgICAgcmV0dXJuIF9qc3goX0ZyYWdtZW50LCB7fSk7XHJcbiAgICB9XHJcbiAgICByZXR1cm4gKF9qc3hzKF9GcmFnbWVudCwgeyBjaGlsZHJlbjogW3RpdGxlICYmIChfanN4KFRpdGxlTWVkaXVtLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICBtYXJnaW5Cb3R0b206IDE2LFxyXG4gICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiB0aXRsZSB9KSkpLCBfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAncm93JyB9LCB7IGNoaWxkcmVuOiBbX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAnY29sLTYnIH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IHNpemUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBzaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KERvdWdobnV0LCB7IGRhdGE6IGRhdGEsIG9wdGlvbnM6IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgb3B0aW9ucyksIHsgbWFpbnRhaW5Bc3BlY3RSYXRpbzogc2l6ZSA/IGZhbHNlIDogdHJ1ZSB9KSB9KSB9KSkgfSkpLCBfanN4KFwiZGl2XCIsIE9iamVjdC5hc3NpZ24oeyBjbGFzc05hbWU6ICdjb2wtNicsIHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nTGVmdDogNDgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGV4RGlyZWN0aW9uOiAnY29sdW1uJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnY2VudGVyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KFBpZUNoYXJ0LCB7IHNsaWNlczogc2xpY2VzV2l0aENvbG9yIH0pIH0pKV0gfSkpXSB9KSk7XHJcbn07XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPVBpZUNoYXJ0QW5hbHl0aWNzLmpzLm1hcCJdfQ== */")),b=t=>o(n,Object.assign({style:{padding:24}},{children:t.children})),u=t=>{let{title:i,slices:p,size:A}=t;const[l,n]=r([]),[b,u]=r();return C((()=>{const t=p.reduce(((t,o)=>t+o.count),0);let o=[];if(o=Object.keys(p).map(((t,o)=>Object.assign({color:m[o%m.length]},p[t]))),n([...o]),0===t){u({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}]})}else{const t={labels:p.map((t=>I.capitalize(t.name))),datasets:[{data:p.map((t=>t.count)),backgroundColor:p.map(((t,o)=>{var e;return null!==(e=t.color)&&void 0!==e?e:m[o%m.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};u(t)}}),[p]),b?g(e,{children:[i&&o(c,Object.assign({style:{marginBottom:16}},{children:i})),g("div",Object.assign({className:"row"},{children:[o("div",Object.assign({className:"col-6"},{children:o("div",Object.assign({style:{width:A,height:A}},{children:o(a,{data:b,options:Object.assign(Object.assign({},d),{maintainAspectRatio:!A})})}))})),o("div",Object.assign({className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"center"}},{children:o(s,{slices:l})}))]}))]}):o(e,{})};export{b as Card,u as PieChartAnalytics};
|
|
1
|
+
import t from"@emotion/styled/base";import{jsx as o,Fragment as e,jsxs as g}from"react/jsx-runtime";import I from"../../../../utils/StringUtils.js";import{COLORS as i}from"../../../../constants/Theme.js";import{useState as r,useEffect as C}from"react";import"../../../checkBox/CheckBox.styled.js";import{TitleMedium as c}from"../../../TypographyStyle.js";import"../../../list-item/ListItem.js";import"../../../pagination/Pagination.js";import"../../../radioButton/RadioButton.styled.js";import"react-toastify";import"../../../toaster/Toaster.styled.js";import"@tippyjs/react";import"../../../tooltips/TooltipInternal.js";import"../../../spinner/Spinner.js";import"../../../stepper/Stepper.styled.js";import"../../../tag/Tag.js";import"../../../icon-button/IconButton.js";import"../../../template-preview/TemplatePreview.js";import"../../../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import"../../../template-preview/models/TemplateMeta.js";import"../../../modals/styledModal.js";import"../../../template-preview/models/Channels.js";import"../../../template-context-mapper/context/templateModalContext.js";import"../../../template-context-mapper/modalElements/Footer.js";import"../../../template-context-mapper/modalElements/Body.js";import"../../../template-context-mapper/modalElements/Header.js";import"../../../zeroState/ZeroState.js";import"../../../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../../../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../../../button/Button.js";import"../../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../../../input/Input.js";import"react-bootstrap";import"../../../floating-action-button/FloatingActionButton.styles.js";import"../../../image-compress/ImageCompress.js";import"../../../progress-bar/ProgressBarComponent.js";import"../../../QueryBuilder/QueryBuilder.js";import"../../../QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js";import"../../../QueryBuilder/constants/connectorPosition.js";import"../../../QueryBuilder/constants/connector.js";import"../../../QueryBuilder/types/QueryBuilder.type.js";import"../../../dropdown/Dropdown.js";import"../../../QueryBuilder/components/InputLoader.js";import"../../../QueryBuilder/components/Connectors/Components/EmojiPicker.js";import"react-chips";import"../../../input/ChipInput.styled.js";import"../../../QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js";import"../../../QueryBuilder/components/Connectors/Components/IgPicker.js";import"../../../QueryBuilder/components/Connectors/Components/InTheLast.js";import"react-calendar";import"../../../../utils/DateUtils.js";import"../../../datePicker/DatePickerWrapper.styled.js";import"../../../QueryBuilder/components/Connectors/Connector.styled.js";import"../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.styled.js";import"../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.styled.js";import"../../../QueryBuilder/redux/queryBuilder.reducer.js";import"../../../QueryBuilder/redux/queryBuilderCache.reducer.js";import"../../../QueryBuilder/types/QueryBuilderOperator.type.js";import"../../../dropdown/DropdownPopover/index.js";import"../../../dropdown/MenuItem/MenuItem.js";import"../../../shimmer/ShimmerComponent/ShimmerStyled.js";import"../../../analytics-card/AnalyticsCard.styled.js";import"../../CommonStyles.js";import"../../../datePicker/DatePicker.styled.js";import"../../AnalyticsMetric.js";import"../LineChart/LineChart.js";import"../linearChipGroupedChart/LinearChipGroupedChart.styled.js";import{PieChart as s}from"./PieChart.js";import"../HorizontalBarGraph/HorizontalGraph.js";import"../StackedBarChart/StackedBarChart.js";import"../VerticalBarGraph/VerticalGraph.js";import"../heatmap/HeatMap.js";import"../VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js";import"../../../avatar/Avatar.js";import"../../../avatar/AvatarHelper.js";import"../../../alerts/Alert.styled.js";import"../../../alerts/AlertHelper.js";import"../../../thumbnail/Thumbnail.js";import"../../../curtain/Curtain.styled.js";import"../../../curtain/CurtainHelper.js";import"../../../switch/Switch.js";import"../../../plans/SubscriptionPlanStyled.js";import"../../../plans/SubscriptionPlanSelector.js";import"../../../tabs/Tabs.js";import"../../../TablePagination/TablePagination.styled.js";import"../../../TablePagination/TablePaginationCard.js";import"../../../states/StateComponent.js";import"../../../WhatsAppTextEditor/WhatsAppTextEditor.js";import"../../../WhatsAppTextEditor/WhatsAppTextEditorHeader.js";import"../../../card-selection-modal/CardSelectionModal.styled.js";import"react-image-crop";import"../../../buttonGroup/ButtonGroupStyle.js";import"../../../accordion/Accordion.style.js";import"../../../accordion/AccordionArrow.js";import"../../../file-uploader/FileUploaderStyle.js";import"../../../colourInput/ColourInput.styled.js";import"../../../bik-layout/CommonStyles.js";import"../../../bik-layout/SidebarStyles.js";import"date-fns";import"react-popper";import"../../../dropdown/Common.styled.js";import"../../../custom-date-time/CustomDateTime.styled.js";import"../../../../node_modules/lodash.debounce/index.js";import"../../../product-picker/ProductPicker.styled.js";import"../../../discount-modal/type.js";import"../../../discount-modal/DiscountModal.styled.js";import"../../../discount-modal/DynamicCoupon/DynamicCoupon.js";import"../../../discount-modal/CouponExpiration/CouponExpiration.js";import"../../../country-code-picker/CountryCodePicker.styled.js";import"../../../product-picker-v2/emptyState.js";import"../../../product-picker-v2/style.js";import"lodash";import"../../../carousel/carousel.js";import"../../../carousel-secondary/CarouselSecondary.style.js";import"../../../access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.styles.js";import"../../../radioList/RadioList.styled.js";import"../../../checkList/CheckList.styled.js";import"../../../postPicker/postPicker.js";import"../../../dropdown-button/DropdownButton.style.js";import{Chart as p,ArcElement as A,Legend as l}from"chart.js";import{Doughnut as a}from"react-chartjs-2";p.register(A,l);const d={plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:t=>{if(!t.label)return" 0%";const o=t.dataset.data.reduce(((t,o)=>t+o),0),e=parseFloat((t.raw/o*100).toFixed(1));return` ${t.label}: ${e}%`}}}}},n=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],m=t("div","production"===process.env.NODE_ENV?{target:"elaov7f0"}:{target:"elaov7f0",label:"CartStyled"})("background:",(t=>i.surface.standard),";border:1px solid ",(t=>i.stroke.primary),";border-radius:4px;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQzhCIiwiZmlsZSI6IlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGpzeCBhcyBfanN4LCBGcmFnbWVudCBhcyBfRnJhZ21lbnQsIGpzeHMgYXMgX2pzeHMgfSBmcm9tIFwicmVhY3QvanN4LXJ1bnRpbWVcIjtcclxuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgeyBTdHJpbmdVdGlscyB9IGZyb20gXCIuLi8uLi8uLi8uLi9pbmRleFwiO1xyXG5pbXBvcnQgeyBBcmNFbGVtZW50LCBDaGFydCBhcyBDaGFydEpTLCBMZWdlbmQgfSBmcm9tICdjaGFydC5qcyc7XHJcbmltcG9ydCB7IHVzZUVmZmVjdCwgdXNlU3RhdGUgfSBmcm9tICdyZWFjdCc7XHJcbmltcG9ydCB7IERvdWdobnV0IH0gZnJvbSAncmVhY3QtY2hhcnRqcy0yJztcclxuaW1wb3J0IHsgVGl0bGVNZWRpdW0gfSBmcm9tIFwiLi4vLi4vLi4vVHlwb2dyYXBoeVN0eWxlXCI7XHJcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gXCIuLi8uLi8uLi8uLi9jb25zdGFudHMvVGhlbWVcIjtcclxuaW1wb3J0IHsgUGllQ2hhcnQgfSBmcm9tICcuL1BpZUNoYXJ0JztcclxuQ2hhcnRKUy5yZWdpc3RlcihBcmNFbGVtZW50LCBMZWdlbmQpO1xyXG5jb25zdCBvcHRpb25zID0ge1xyXG4gICAgcGx1Z2luczoge1xyXG4gICAgICAgIGxlZ2VuZDoge1xyXG4gICAgICAgICAgICBkaXNwbGF5OiBmYWxzZSxcclxuICAgICAgICB9LFxyXG4gICAgICAgIHRvb2x0aXA6IHtcclxuICAgICAgICAgICAgZW5hYmxlZDogdHJ1ZSxcclxuICAgICAgICAgICAgY2FsbGJhY2tzOiB7XHJcbiAgICAgICAgICAgICAgICBsYWJlbDogKHRvb2x0aXBJdGVtKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0b29sdGlwSXRlbS5sYWJlbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYCAwJWA7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRvdGFsID0gdG9vbHRpcEl0ZW0uZGF0YXNldC5kYXRhLnJlZHVjZSgoYWNjLCBjdXIpID0+IGFjYyArIGN1ciwgMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGVyY2VudGFnZSA9IHBhcnNlRmxvYXQoKCh0b29sdGlwSXRlbS5yYXcgLyB0b3RhbCkgKiAxMDApLnRvRml4ZWQoMSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBgICR7dG9vbHRpcEl0ZW0ubGFiZWx9OiAke3BlcmNlbnRhZ2V9JWA7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0sXHJcbiAgICB9LFxyXG59O1xyXG5jb25zdCBHUkFQSF9DT0xPUlMgPSBbXHJcbiAgICAnIzVFMDdCQicsXHJcbiAgICAnIzlFNzdFRCcsXHJcbiAgICAnI0QyQUVGRicsXHJcbiAgICAnI0NERTFGRicsXHJcbiAgICAnIzkyQUZGQScsXHJcbiAgICAnIzM5MzVFMScsXHJcbl07XHJcbmNvbnN0IENhcnRTdHlsZWQgPSBzdHlsZWQuZGl2IGBcblx0YmFja2dyb3VuZDogJHsocHJvcHMpID0+IENPTE9SUy5zdXJmYWNlLnN0YW5kYXJkfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsocHJvcHMpID0+IENPTE9SUy5zdHJva2UucHJpbWFyeX07XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcbmA7XHJcbmV4cG9ydCBjb25zdCBDYXJkID0gKHByb3BzKSA9PiB7XHJcbiAgICByZXR1cm4gX2pzeChDYXJ0U3R5bGVkLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHsgcGFkZGluZzogMjQgfSB9LCB7IGNoaWxkcmVuOiBwcm9wcy5jaGlsZHJlbiB9KSk7XHJcbn07XHJcbmV4cG9ydCBjb25zdCBQaWVDaGFydEFuYWx5dGljcyA9ICh7IHRpdGxlLCBzbGljZXMsIHNpemUsIH0pID0+IHtcclxuICAgIGNvbnN0IFtzbGljZXNXaXRoQ29sb3IsIHNldFNsaWNlc1dpdGhDb2xvcl0gPSB1c2VTdGF0ZShbXSk7XHJcbiAgICBjb25zdCBbZGF0YSwgc2V0RGF0YV0gPSB1c2VTdGF0ZSgpO1xyXG4gICAgdXNlRWZmZWN0KCgpID0+IHtcclxuICAgICAgICBjb25zdCB0b3RhbFN1bSA9IHNsaWNlcy5yZWR1Y2UoKHN1bSwgc2xpY2UpID0+IHN1bSArIHNsaWNlLmNvdW50LCAwKTtcclxuICAgICAgICBsZXQgdXBkYXRlZFNsaWNlc1dpdGhDb2xvciA9IFtdO1xyXG4gICAgICAgIHVwZGF0ZWRTbGljZXNXaXRoQ29sb3IgPSBPYmplY3Qua2V5cyhzbGljZXMpLm1hcCgoa2V5LCBpbmRleCkgPT4gKE9iamVjdC5hc3NpZ24oeyBjb2xvcjogR1JBUEhfQ09MT1JTW2luZGV4ICUgR1JBUEhfQ09MT1JTLmxlbmd0aF0gfSwgc2xpY2VzW2tleV0pKSk7XHJcbiAgICAgICAgc2V0U2xpY2VzV2l0aENvbG9yKFsuLi51cGRhdGVkU2xpY2VzV2l0aENvbG9yXSk7XHJcbiAgICAgICAgaWYgKHRvdGFsU3VtID09PSAwKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGRhdGFTZXQgPSB7XHJcbiAgICAgICAgICAgICAgICBkYXRhc2V0czogW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogWzEwMF0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogWycjRjBGMEYwJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiAwLFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgY29uc3QgZGF0YVNldCA9IHtcclxuICAgICAgICAgICAgICAgIGxhYmVsczogc2xpY2VzLm1hcCgoc2xpY2UpID0+IFN0cmluZ1V0aWxzLmNhcGl0YWxpemUoc2xpY2UubmFtZSkpLFxyXG4gICAgICAgICAgICAgICAgZGF0YXNldHM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IHNsaWNlcy5tYXAoKHNsaWNlKSA9PiBzbGljZS5jb3VudCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogc2xpY2VzLm1hcCgoc2xpY2UsIGluZGV4KSA9PiB7IHZhciBfYTsgcmV0dXJuIChfYSA9IHNsaWNlLmNvbG9yKSAhPT0gbnVsbCAmJiBfYSAhPT0gdm9pZCAwID8gX2EgOiBHUkFQSF9DT0xPUlNbaW5kZXggJSBHUkFQSF9DT0xPUlMubGVuZ3RoXTsgfSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlckNvbG9yOiBbJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiA0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJSYWRpdXM6IDgsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIHNldERhdGEoZGF0YVNldCk7XHJcbiAgICAgICAgfVxyXG4gICAgfSwgW3NsaWNlc10pO1xyXG4gICAgaWYgKCFkYXRhKSB7XHJcbiAgICAgICAgcmV0dXJuIF9qc3goX0ZyYWdtZW50LCB7fSk7XHJcbiAgICB9XHJcbiAgICByZXR1cm4gKF9qc3hzKF9GcmFnbWVudCwgeyBjaGlsZHJlbjogW3RpdGxlICYmIChfanN4KFRpdGxlTWVkaXVtLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICBtYXJnaW5Cb3R0b206IDE2LFxyXG4gICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiB0aXRsZSB9KSkpLCBfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAncm93JyB9LCB7IGNoaWxkcmVuOiBbX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAnY29sLTYnIH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IHNpemUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBzaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KERvdWdobnV0LCB7IGRhdGE6IGRhdGEsIG9wdGlvbnM6IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgb3B0aW9ucyksIHsgbWFpbnRhaW5Bc3BlY3RSYXRpbzogc2l6ZSA/IGZhbHNlIDogdHJ1ZSB9KSB9KSB9KSkgfSkpLCBfanN4KFwiZGl2XCIsIE9iamVjdC5hc3NpZ24oeyBjbGFzc05hbWU6ICdjb2wtNicsIHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nTGVmdDogNDgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGV4RGlyZWN0aW9uOiAnY29sdW1uJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnY2VudGVyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KFBpZUNoYXJ0LCB7IHNsaWNlczogc2xpY2VzV2l0aENvbG9yIH0pIH0pKV0gfSkpXSB9KSk7XHJcbn07XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPVBpZUNoYXJ0QW5hbHl0aWNzLmpzLm1hcCJdfQ== */")),b=t=>o(m,Object.assign({style:{padding:24}},{children:t.children})),u=t=>{let{title:i,slices:p,size:A}=t;const[l,m]=r([]),[b,u]=r();return C((()=>{const t=p.reduce(((t,o)=>t+o.count),0);let o=[];if(o=Object.keys(p).map(((t,o)=>Object.assign({color:n[o%n.length]},p[t]))),m([...o]),0===t){u({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}]})}else{const t={labels:p.map((t=>I.capitalize(t.name))),datasets:[{data:p.map((t=>t.count)),backgroundColor:p.map(((t,o)=>{var e;return null!==(e=t.color)&&void 0!==e?e:n[o%n.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};u(t)}}),[p]),b?g(e,{children:[i&&o(c,Object.assign({style:{marginBottom:16}},{children:i})),g("div",Object.assign({className:"row"},{children:[o("div",Object.assign({className:"col-6"},{children:o("div",Object.assign({style:{width:A,height:A}},{children:o(a,{data:b,options:Object.assign(Object.assign({},d),{maintainAspectRatio:!A})})}))})),o("div",Object.assign({className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"center"}},{children:o(s,{slices:l})}))]}))]}):o(e,{})};export{b as Card,u as PieChartAnalytics};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as i,jsx as e}from"react/jsx-runtime";import{useState as l,useEffect as s}from"react";import{CheckboxContainer as a,CheckboxIcon as t}from"./CheckBox.styled.js";import{BodyPrimary as r,BodySecondary as o}from"../TypographyStyle.js";import{COLORS as
|
|
1
|
+
import{jsxs as i,jsx as e}from"react/jsx-runtime";import{useState as l,useEffect as s}from"react";import{CheckboxContainer as a,CheckboxIcon as t}from"./CheckBox.styled.js";import{BodyPrimary as r,BodySecondary as o}from"../TypographyStyle.js";import{COLORS as d}from"../../constants/Theme.js";const n=l=>i("svg",Object.assign({width:l.isSmall?"16":"18",height:l.isSmall?"16":"18",viewBox:l.isSmall?"0 0 16 16":"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e("rect",{x:"0",y:"0",width:l.isSmall?"16":"18",height:l.isSmall?"16":"18",rx:"4",fill:l.isDisabled?d.content.inactive:d.background.positive.vibrant}),!l.isPartial&&e("svg",Object.assign({width:l.isSmall?"8":"10",height:l.isSmall?"7":"9",x:"4",y:"4",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.68189 1.06043C10.0724 1.45096 10.0724 2.08412 9.68189 2.47464L4.02501 8.13152C3.63449 8.52205 3.00132 8.52205 2.6108 8.13152L0.489684 6.01041C0.0991601 5.61988 0.0991598 4.98672 0.489684 4.59619C0.880209 4.20567 1.51337 4.20567 1.9039 4.59619L3.31791 6.0102L8.26768 1.06043C8.6582 0.669907 9.29137 0.669907 9.68189 1.06043Z",fill:"white"})})),l.isPartial&&e("rect",{x:"5",y:l.isSmall?"7":"8",width:l.isSmall?"6":"8",height:"2",rx:"1",fill:d.surface.standard})]})),c=c=>{const[h,m]=l(c.isChecked||!1),[b,g]=l(c.isPartiallyChecked||!1),[p,v]=l(c.isDisabled||!1),[w,x]=l(!1),[S,C]=l(!1);return s((()=>{m(c.isChecked)}),[c.isChecked]),s((()=>{v(c.isDisabled||!1)}),[c.isDisabled]),s((()=>{g(c.isPartiallyChecked||!1),m(c.isPartiallyChecked||!1)}),[c.isPartiallyChecked]),i(a,Object.assign({onClick:()=>{var i;if(!c.isDisabled){const e=!h;m(e),null===(i=c.onValueChange)||void 0===i||i.call(c,e,c.value)}},onMouseEnter:()=>x(!c.skipHoverState),onMouseLeave:()=>x(!1),onMouseDown:()=>C(!c.skipHoverState),onMouseUp:()=>C(!1)},{children:[e(t,Object.assign({checked:h,hovered:w,clicked:S,isDisabled:p,size:c.size},{children:h&&e(n,{isPartial:b||!1,isDisabled:p,isSmall:"SMALL"===c.size})})),c.label&&"SMALL"!==c.size&&e(r,Object.assign({color:c.isDisabled?d.text.disabled:d.text.primary},{children:c.label})),c.label&&"SMALL"===c.size&&e(o,Object.assign({color:c.isDisabled?d.text.disabled:d.text.primary},{children:c.label}))]}))};export{c as CheckBox};
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as o from"./components/template-preview/constants/regexPatterns.js";export{o as regexPatterns};export{default as StringUtils}from"./utils/StringUtils.js";export{BASE_COLORS,COLORS,DEFAULT_THEME,FONTS}from"./constants/Theme.js";export{CheckBox}from"./components/checkBox/CheckBox.js";export{ListItem}from"./components/list-item/ListItem.js";export{Pagination}from"./components/pagination/Pagination.js";export{RadioButton}from"./components/radioButton/RadioButton.js";export{Toaster}from"./components/toaster/Toaster.js";export{Tooltip}from"./components/tooltips/Tooltip.js";export{Spinner}from"./components/spinner/Spinner.js";export{Stepper}from"./components/stepper/Stepper.js";export{Tag}from"./components/tag/Tag.js";export{IconButton}from"./components/icon-button/IconButton.js";export{TemplatePreview}from"./components/template-preview/TemplatePreview.js";export{WhatsappLikePreview}from"./components/template-preview/WhatsApp/WhatsAppLikePreview.js";export{WhatsappLikePreviewV2}from"./components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js";export{renderVariableUIForPreview}from"./components/template-preview/helpers/SmsTemplateHelper.js";export{WhatsAppFormatToHTML}from"./components/template-preview/helpers/WhatsAppFormatToHTML.js";export{VariableEditorHelper}from"./components/template-preview/helpers/VariableEditorHelper.js";export{ACTIONS_TYPES,CUSTOM_URL_NAME,HEADER_TYPES,TEMPLATE_EDITOR,TEMPLATE_STATUS}from"./components/template-preview/models/TemplateMeta.js";export{TemplateContextMapper}from"./components/template-context-mapper/TemplateContextMapper.js";export{getAllDataFromTemplateComponent}from"./components/template-context-mapper/utils/getDataFromTemplateComponent.js";export{validateIsUrl}from"./components/template-context-mapper/utils/validateIsUrl.js";export{FABMenu}from"./components/fab-menu/FABMenu.js";export{FloatingActionButton}from"./components/floating-action-button/FloatingActionButton.js";export{DROP_POSITION,DropdownToggleContainer,FAB_POSITION,FloatingActionButtonContainer,FloatingActionButtonOuterContainer,MENU_ALIGNMENT,StyledDropdown,TooltipStyled}from"./components/floating-action-button/FloatingActionButton.styles.js";export{ImageService}from"./components/image-compress/ImageCompress.js";export{BodyCaption,BodyLarge,BodyPrimary,BodyPrimaryLink,BodyRegular,BodySecondary,BodySecondaryLink,BodyTiny,ButtonLarge,ButtonRegular,Caption,Display,SmallRegular,SubHeading,TitleLarge,TitleMedium,TitleRegular,TitleSmall}from"./components/TypographyStyle.js";export{Button}from"./components/button/Button.js";export{ProgressBarComponent,ProgressCompletedBar}from"./components/progress-bar/ProgressBarComponent.js";export{QueryBuilder}from"./components/QueryBuilder/QueryBuilder.js";export{BaseQueryBuilderNode}from"./components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js";export{PropertyNode,PropertyNodeHeadless}from"./components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js";export{queryBuilderSlice}from"./components/QueryBuilder/redux/queryBuilder.reducer.js";export{queryBuilderCacheSlice}from"./components/QueryBuilder/redux/queryBuilderCache.reducer.js";export{AD_STRING_OPERATORS,ANY_AD_OPERATORS,ANY_IG_OPERATORS,BOOLEAN_OPERATORS,DATE_OPERATORS,EVENT_VALUES,FREQUENCY_OPERATORS,ICE_BREAKER_OPERATORS,IG_STRING_OPERATORS,INTEGER_OPERATORS,REACTION_OPERATORS,SPECIFIC_IG_OPERATORS,STRING_OPERATORS}from"./components/QueryBuilder/types/QueryBuilderOperator.type.js";export{StyledModal}from"./components/modals/styledModal.js";export{DropdownPopover}from"./components/dropdown/DropdownPopover/index.js";export{Dropdown}from"./components/dropdown/Dropdown.js";export{OpenedDropdown}from"./components/dropdown/OpenedDropdown/components/OpennedDropdown.js";export{MenuItemDropdown}from"./components/dropdown/MenuItem/MenuItem.js";export{AnalyticsCard}from"./components/analytics-card/AnalyticsCard.js";export{AnalyticsContainer,CardDataContainer}from"./components/analytics-card/AnalyticsCard.styled.js";export{Input}from"./components/input/Input.js";export{AnalyticsChip}from"./components/analytics-chips-and-dropdowns/AnalyticsChip.js";export{AnalyticsDropdown,EachItem,formatDate}from"./components/analytics-chips-and-dropdowns/AnalyticsDropdown.js";export{AnalyticsMultiChip}from"./components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js";export{AnalyticsMetric}from"./components/analytics-chips-and-dropdowns/AnalyticsMetric.js";export{AnalyticsTrend}from"./components/analytics-chips-and-dropdowns/AnalyticsTrend.js";export{LineChart}from"./components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js";export{LinearChipGroupedChart}from"./components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js";export{Card,PieChartAnalytics}from"./components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js";export{PieChart}from"./components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js";export{HorizontalGraph}from"./components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js";export{StackedBarChart}from"./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js";export{VerticalGraph}from"./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js";export{HEAT,HEAT_COLORS,HEAT_GRADING_TYPE,HeatMap}from"./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js";export{VerticalBarAndLinearGraph}from"./components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js";export{AVATAR_SIZE_VS_ICON_SIZE_MAP,Avatar,BACKGROUND_VS_TEXT_COLOR_MAP}from"./components/avatar/Avatar.js";export{AVATAR_BACKGROUND,AVATAR_SIZE_MAP,AVATAR_TYPES,SIZE}from"./components/avatar/AvatarHelper.js";export{Alert}from"./components/alerts/Alert.js";export{ALERT_TYPES,COLOR_CONFIG_MAP}from"./components/alerts/AlertHelper.js";export{RATIO,Thumbnail}from"./components/thumbnail/Thumbnail.js";export{Curtain}from"./components/curtain/Curtain.js";export{DatePicker}from"./components/datePicker/DatePicker.js";export{Loader,Switch,SwitchContainer,Thumb}from"./components/switch/Switch.js";export{SubscriptionPlan}from"./components/plans/SubscriptionPlan.js";export{SubscriptionPlanSelector}from"./components/plans/SubscriptionPlanSelector.js";export{TabItemComponent,Tabs}from"./components/tabs/Tabs.js";export{BikShimmer}from"./components/shimmer/ShimmerComponent/BikShimmer.js";export{TablePagination}from"./components/TablePagination/TablePagination.js";export{TablePaginationCard,TablePaginationCardStyled}from"./components/TablePagination/TablePaginationCard.js";export{StateModalComponent}from"./components/states-modal/StateModalComponent.js";export{DeleteConfirmationModal}from"./components/states-modal/DeleteConfirmationModal.js";export{ButtonActions,ButtonTypes,StateComponent,StateInterface}from"./components/states/StateComponent.js";export{WhatsAppTextEditor}from"./components/WhatsAppTextEditor/WhatsAppTextEditor.js";export{EditorActionTypes,WhatsAppTextEditorHeader}from"./components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js";export{BaseWhatsappContentLangHelper}from"./helpers/BaseWhatsappContentLang.helper.js";export{CardSelectionModal}from"./components/card-selection-modal/CardSelectionModal.js";export{BikImageCropper}from"./components/image-cropper/BikImageCropper.js";export{BikImagePipeline}from"./components/image-cropper/BikImagePipeline/BikImagePipeline.js";export{ButtonGroup}from"./components/buttonGroup/ButtonGroup.js";export{BikAccordion}from"./components/accordion/Accordion.js";export{FileUploader}from"./components/file-uploader/FileUploader.js";export{ColourInput}from"./components/colourInput/ColourInput.js";export{BikHeader}from"./components/bik-layout/BikHeader.js";export{BikLayout}from"./components/bik-layout/BikLayout.js";export{BikProfile}from"./components/bik-layout/BikProfile.js";export{SimpleSidebar}from"./components/bik-layout/SimpleSidebar.js";export{BikSidebar}from"./components/bik-layout/BikSidebar.js";export{FeatureModal}from"./components/bik-layout/FeatureModal.js";export{SidebarSkeleton}from"./components/bik-layout/SidebarSkeleton.js";export{SearchBar}from"./components/searchBar/searchBar.js";export{CustomDateTime}from"./components/custom-date-time/CustomDateTime.js";export{PricePleaseProductPicker,ProductPickerContent}from"./components/product-picker/ProductPickerModal.js";export{DiscountModal}from"./components/discount-modal/DiscountModal.js";export{COUPON_EXPIRATION,CouponExpiration}from"./components/discount-modal/CouponExpiration/CouponExpiration.js";export{DISCOUNT_TARGET_SELECTION,DISCOUNT_TARGET_TYPES,DISCOUNT_TYPES,DISCOUNT_VALUE_TYPES,MIN_PURCHASE_REQUIREMENT}from"./components/discount-modal/type.js";export{CountryCodePicker}from"./components/country-code-picker/CountryCodePicker.js";export{CountriesData}from"./components/country-code-picker/CountryCodePicker.modal.js";export{ShimmerImage}from"./components/shimmer-image/ShimmerImage.js";export{ProductPickerModal}from"./components/product-picker-v2/modal.js";export{Carousel}from"./components/carousel/carousel.js";export{CarouselSecondary}from"./components/carousel-secondary/CarouselSecondary.js";export{AccessTokenTroubleshootDialog}from"./components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js";export{RadioList}from"./components/radioList/RadioList.js";export{CheckList}from"./components/checkList/CheckList.js";export{DateKeys,MEDIA_TYPES,PostPicker,dateOptions}from"./components/postPicker/postPicker.js";export{DropdownButton}from"./components/dropdown-button/DropdownButton.js";
|
|
1
|
+
import*as o from"./components/template-preview/constants/regexPatterns.js";export{o as regexPatterns};export{default as StringUtils}from"./utils/StringUtils.js";export{BASE_COLORS,COLORS,DEFAULT_THEME,FONTS}from"./constants/Theme.js";export{CheckBox}from"./components/checkBox/CheckBox.js";export{ListItem}from"./components/list-item/ListItem.js";export{Pagination}from"./components/pagination/Pagination.js";export{RadioButton}from"./components/radioButton/RadioButton.js";export{Toaster}from"./components/toaster/Toaster.js";export{Tooltip}from"./components/tooltips/Tooltip.js";export{Spinner}from"./components/spinner/Spinner.js";export{Stepper}from"./components/stepper/Stepper.js";export{Tag}from"./components/tag/Tag.js";export{IconButton}from"./components/icon-button/IconButton.js";export{TemplatePreview}from"./components/template-preview/TemplatePreview.js";export{WhatsappLikePreview}from"./components/template-preview/WhatsApp/WhatsAppLikePreview.js";export{WhatsappLikePreviewV2}from"./components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js";export{renderVariableUIForPreview}from"./components/template-preview/helpers/SmsTemplateHelper.js";export{WhatsAppFormatToHTML}from"./components/template-preview/helpers/WhatsAppFormatToHTML.js";export{VariableEditorHelper}from"./components/template-preview/helpers/VariableEditorHelper.js";export{ACTIONS_TYPES,CUSTOM_URL_NAME,HEADER_TYPES,TEMPLATE_EDITOR,TEMPLATE_STATUS}from"./components/template-preview/models/TemplateMeta.js";export{TemplateContextMapper}from"./components/template-context-mapper/TemplateContextMapper.js";export{getAllDataFromTemplateComponent}from"./components/template-context-mapper/utils/getDataFromTemplateComponent.js";export{validateIsUrl}from"./components/template-context-mapper/utils/validateIsUrl.js";export{FABMenu}from"./components/fab-menu/FABMenu.js";export{FloatingActionButton}from"./components/floating-action-button/FloatingActionButton.js";export{DROP_POSITION,DropdownToggleContainer,FAB_POSITION,FloatingActionButtonContainer,FloatingActionButtonOuterContainer,MENU_ALIGNMENT,StyledDropdown,TooltipStyled}from"./components/floating-action-button/FloatingActionButton.styles.js";export{ImageService}from"./components/image-compress/ImageCompress.js";export{BodyCaption,BodyLarge,BodyPrimary,BodyPrimaryLink,BodyRegular,BodySecondary,BodySecondaryLink,BodyTiny,ButtonLarge,ButtonRegular,Caption,Display,SmallRegular,SubHeading,TitleLarge,TitleMedium,TitleRegular,TitleSmall}from"./components/TypographyStyle.js";export{Button}from"./components/button/Button.js";export{ProgressBarComponent,ProgressCompletedBar}from"./components/progress-bar/ProgressBarComponent.js";export{QueryBuilder}from"./components/QueryBuilder/QueryBuilder.js";export{BaseQueryBuilderNode}from"./components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js";export{PropertyNode,PropertyNodeHeadless}from"./components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js";export{queryBuilderSlice}from"./components/QueryBuilder/redux/queryBuilder.reducer.js";export{queryBuilderCacheSlice}from"./components/QueryBuilder/redux/queryBuilderCache.reducer.js";export{AD_STRING_OPERATORS,ANY_AD_OPERATORS,ANY_IG_OPERATORS,BOOLEAN_OPERATORS,DATE_OPERATORS,EVENT_VALUES,FREQUENCY_OPERATORS,ICE_BREAKER_OPERATORS,IG_STRING_OPERATORS,INTEGER_OPERATORS,REACTION_OPERATORS,SPECIFIC_IG_OPERATORS,STRING_OPERATORS}from"./components/QueryBuilder/types/QueryBuilderOperator.type.js";export{StyledModal}from"./components/modals/styledModal.js";export{DropdownPopover}from"./components/dropdown/DropdownPopover/index.js";export{Dropdown}from"./components/dropdown/Dropdown.js";export{OpenedDropdown}from"./components/dropdown/OpenedDropdown/components/OpennedDropdown.js";export{MenuItemDropdown}from"./components/dropdown/MenuItem/MenuItem.js";export{AnalyticsCard}from"./components/analytics-card/AnalyticsCard.js";export{AnalyticsContainer,CardDataContainer}from"./components/analytics-card/AnalyticsCard.styled.js";export{Input}from"./components/input/Input.js";export{AnalyticsChip}from"./components/analytics-chips-and-dropdowns/AnalyticsChip.js";export{AnalyticsDropdown,EachItem,formatDate}from"./components/analytics-chips-and-dropdowns/AnalyticsDropdown.js";export{AnalyticsMultiChip}from"./components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js";export{AnalyticsMetric}from"./components/analytics-chips-and-dropdowns/AnalyticsMetric.js";export{AnalyticsTrend}from"./components/analytics-chips-and-dropdowns/AnalyticsTrend.js";export{LineChart}from"./components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js";export{LinearChipGroupedChart}from"./components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js";export{Card,PieChartAnalytics}from"./components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js";export{PieChart}from"./components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js";export{HorizontalGraph}from"./components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js";export{StackedBarChart}from"./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js";export{VerticalGraph}from"./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js";export{HEAT,HEAT_COLORS,HEAT_GRADING_TYPE,HeatMap}from"./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js";export{VerticalBarAndLinearGraph}from"./components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js";export{AVATAR_SIZE_VS_ICON_SIZE_MAP,Avatar,BACKGROUND_VS_TEXT_COLOR_MAP}from"./components/avatar/Avatar.js";export{AVATAR_BACKGROUND,AVATAR_SIZE_MAP,AVATAR_TYPES,SIZE}from"./components/avatar/AvatarHelper.js";export{Alert}from"./components/alerts/Alert.js";export{ALERT_TYPES,COLOR_CONFIG_MAP}from"./components/alerts/AlertHelper.js";export{RATIO,Thumbnail}from"./components/thumbnail/Thumbnail.js";export{Curtain}from"./components/curtain/Curtain.js";export{DatePicker}from"./components/datePicker/DatePicker.js";export{Loader,Switch,SwitchContainer,Thumb}from"./components/switch/Switch.js";export{SubscriptionPlan}from"./components/plans/SubscriptionPlan.js";export{SubscriptionPlanSelector}from"./components/plans/SubscriptionPlanSelector.js";export{TabItemComponent,Tabs}from"./components/tabs/Tabs.js";export{BikShimmer}from"./components/shimmer/ShimmerComponent/BikShimmer.js";export{TablePagination}from"./components/TablePagination/TablePagination.js";export{TablePaginationCard,TablePaginationCardStyled}from"./components/TablePagination/TablePaginationCard.js";export{StateModalComponent}from"./components/states-modal/StateModalComponent.js";export{DeleteConfirmationModal}from"./components/states-modal/DeleteConfirmationModal.js";export{ButtonActions,ButtonTypes,StateComponent,StateInterface}from"./components/states/StateComponent.js";export{WhatsAppTextEditor}from"./components/WhatsAppTextEditor/WhatsAppTextEditor.js";export{EditorActionTypes,WhatsAppTextEditorHeader}from"./components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js";export{BaseWhatsappContentLangHelper}from"./helpers/BaseWhatsappContentLang.helper.js";export{CardSelectionModal}from"./components/card-selection-modal/CardSelectionModal.js";export{BikImageCropper}from"./components/image-cropper/BikImageCropper.js";export{BikImagePipeline}from"./components/image-cropper/BikImagePipeline/BikImagePipeline.js";export{ButtonGroup}from"./components/buttonGroup/ButtonGroup.js";export{BikAccordion}from"./components/accordion/Accordion.js";export{FileUploader}from"./components/file-uploader/FileUploader.js";export{ColourInput}from"./components/colourInput/ColourInput.js";export{BikHeader}from"./components/bik-layout/BikHeader.js";export{BikLayout}from"./components/bik-layout/BikLayout.js";export{BikProfile}from"./components/bik-layout/BikProfile.js";export{SimpleSidebar}from"./components/bik-layout/SimpleSidebar.js";export{BikSidebar}from"./components/bik-layout/BikSidebar.js";export{FeatureModal}from"./components/bik-layout/FeatureModal.js";export{SidebarSkeleton}from"./components/bik-layout/SidebarSkeleton.js";export{SearchBar}from"./components/searchBar/searchBar.js";export{CustomDateTime}from"./components/custom-date-time/CustomDateTime.js";export{PricePleaseProductPicker,ProductPickerContent}from"./components/product-picker/ProductPickerModal.js";export{DiscountModal}from"./components/discount-modal/DiscountModal.js";export{COUPON_EXPIRATION,CouponExpiration}from"./components/discount-modal/CouponExpiration/CouponExpiration.js";export{DISCOUNT_TARGET_SELECTION,DISCOUNT_TARGET_TYPES,DISCOUNT_TYPES,DISCOUNT_VALUE_TYPES,MIN_PURCHASE_REQUIREMENT}from"./components/discount-modal/type.js";export{CountryCodePicker}from"./components/country-code-picker/CountryCodePicker.js";export{CountriesData}from"./components/country-code-picker/CountryCodePicker.modal.js";export{ShimmerImage}from"./components/shimmer-image/ShimmerImage.js";export{ProductPickerModal}from"./components/product-picker-v2/modal.js";export{Carousel}from"./components/carousel/carousel.js";export{CarouselSecondary}from"./components/carousel-secondary/CarouselSecondary.js";export{AccessTokenTroubleshootDialog}from"./components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js";export{RadioList}from"./components/radioList/RadioList.js";export{CheckList}from"./components/checkList/CheckList.js";export{DateKeys,MEDIA_TYPES,PostPicker,dateOptions}from"./components/postPicker/postPicker.js";export{DropdownButton}from"./components/dropdown-button/DropdownButton.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bikdotai/bik-component-library",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.227",
|
|
4
4
|
"description": "Bik Component Library",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -64,7 +64,6 @@
|
|
|
64
64
|
"react-image-crop": "^10.0.9",
|
|
65
65
|
"react-lottie": "^1.2.3",
|
|
66
66
|
"react-popper": "^2.3.0",
|
|
67
|
-
"react-quill": "^2.0.0",
|
|
68
67
|
"react-toastify": "^9.1.2"
|
|
69
68
|
},
|
|
70
69
|
"devDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t,r=e(require("react"));function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(this,arguments)}var l=e=>r.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 12 12"},e),t||(t=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.89 1.194c-.398 0-.78.158-1.062.44L2.233 6.229a2.502 2.502 0 0 0 3.538 3.537l4.595-4.595a.5.5 0 0 1 .707.708l-4.595 4.595A3.502 3.502 0 1 1 1.526 5.52L6.121.926a2.501 2.501 0 1 1 3.537 3.538l-4.6 4.595a1.5 1.5 0 1 1-2.122-2.123l4.246-4.24a.5.5 0 1 1 .706.708l-4.245 4.24a.501.501 0 0 0 .708.707l4.6-4.595A1.502 1.502 0 0 0 7.89 1.194Z",clipRule:"evenodd"})));exports.default=l;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t,r,a=e(require("react"));function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},n.apply(this,arguments)}var l=e=>a.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 22 22"},e),t||(t=a.createElement("path",{d:"M6.4 13.2a1 1 0 0 1 1.397.196l.005.006.033.041a4.945 4.945 0 0 0 .815.748c.578.42 1.376.81 2.35.81.975 0 1.772-.39 2.35-.81a4.945 4.945 0 0 0 .815-.748l.034-.041.004-.006A1 1 0 0 1 15.8 14.6l-.001.001-.001.002-.003.004-.007.009-.021.027-.07.086c-.059.07-.142.164-.248.276a6.951 6.951 0 0 1-.923.804c-.798.58-2 1.191-3.526 1.191-1.525 0-2.728-.61-3.526-1.191a6.949 6.949 0 0 1-1.17-1.08 3.884 3.884 0 0 1-.07-.086l-.022-.027-.007-.01-.003-.003V14.6H6.2a1 1 0 0 1 .2-1.4ZM13 9a2 2 0 1 1 4 0 2 2 0 0 1-4 0ZM7 7a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z"})),r||(r=a.createElement("path",{fillRule:"evenodd",d:"M11 0C4.925 0 0 4.925 0 11s4.925 11 11 11 11-4.925 11-11S17.075 0 11 0ZM2 11a9 9 0 1 1 18 0 9 9 0 0 1-18 0Z",clipRule:"evenodd"})));exports.default=l;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './mail';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
3
|
-
declare const _default: ComponentMeta<import("react").FC<import("./mailRTE").GmailRTEProps>>;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const Basic: ComponentStory<import("react").FC<import("./mailRTE").GmailRTEProps>>;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import ReactQuill from 'react-quill';
|
|
2
|
-
export declare const AttachmentContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export declare const ProgressIndicatorContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
-
export declare const OuterProgressBarContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
-
export declare const InnerProgressBarContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
-
export declare const AttachmentName: import("styled-components").StyledComponent<"div", any, {
|
|
7
|
-
numberOfLines?: number | undefined;
|
|
8
|
-
color?: string | undefined;
|
|
9
|
-
}, never>;
|
|
10
|
-
export declare const ForwardMessageContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
11
|
-
export declare const StyledBodySecondary: import("styled-components").StyledComponent<"div", any, {
|
|
12
|
-
numberOfLines?: number | undefined;
|
|
13
|
-
color?: string | undefined;
|
|
14
|
-
}, never>;
|
|
15
|
-
export declare const LeftItemsContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
16
|
-
export declare const InboxIconContainer: import("styled-components").StyledComponent<"div", any, {
|
|
17
|
-
isSelected?: boolean | undefined;
|
|
18
|
-
selectedBgColor?: string | undefined;
|
|
19
|
-
}, never>;
|
|
20
|
-
export declare const SendConatiner: import("styled-components").StyledComponent<"div", any, {
|
|
21
|
-
isModalView: boolean;
|
|
22
|
-
}, never>;
|
|
23
|
-
export declare const ReactQuilStyleContainer: import("styled-components").StyledComponent<typeof ReactQuill, any, {
|
|
24
|
-
isModalView: boolean;
|
|
25
|
-
}, never>;
|
|
26
|
-
export declare const EditorContainer: import("styled-components").StyledComponent<"div", any, {
|
|
27
|
-
isModalView: boolean;
|
|
28
|
-
}, never>;
|
|
29
|
-
export declare const EditorInnerContainer: import("styled-components").StyledComponent<"div", any, {
|
|
30
|
-
isModalView: boolean;
|
|
31
|
-
}, never>;
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react-quill"),r=require("styled-components"),t=require("../../TypographyStyle.js"),o=require("../../../constants/Theme.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=i(e),a=i(r);const n=a.default.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: row;
|
|
4
|
-
background-color: ${e=>e.theme.COLORS.surface.subdued}
|
|
5
|
-
margin-bottom: 4px;
|
|
6
|
-
margin-top: 4px;
|
|
7
|
-
padding: 7px;
|
|
8
|
-
width: 200px;
|
|
9
|
-
align-items: center;
|
|
10
|
-
border-radius: 8px;
|
|
11
|
-
`,l=a.default.div`
|
|
12
|
-
flex: 1;
|
|
13
|
-
flex-direction: row;
|
|
14
|
-
align-items: center;
|
|
15
|
-
`,p=a.default.div`
|
|
16
|
-
height: 8px;
|
|
17
|
-
border-radius: 8px;
|
|
18
|
-
background-color: ${e=>e.theme.COLORS.background.inactive};
|
|
19
|
-
flex: 1;
|
|
20
|
-
`,s=a.default.div`
|
|
21
|
-
height: 100%;
|
|
22
|
-
border-radius: 4px;
|
|
23
|
-
`,x=a.default(t.BodyCaption)`
|
|
24
|
-
color: ${o.COLORS.content.brand};
|
|
25
|
-
width: 50%;
|
|
26
|
-
`,c=a.default.div`
|
|
27
|
-
padding: 8px;
|
|
28
|
-
border-radius: 4px;
|
|
29
|
-
margin: 0 8px 6px 8px;
|
|
30
|
-
background-color: ${o.COLORS.background.warning.light};
|
|
31
|
-
`,u=a.default(t.BodySecondary)`
|
|
32
|
-
color: ${e=>e.theme.COLORS.content.warning};
|
|
33
|
-
font-style: italic;
|
|
34
|
-
`,g=a.default.div`
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-direction: row;
|
|
37
|
-
align-items: center;
|
|
38
|
-
`,b=a.default.div`
|
|
39
|
-
cursor: pointer;
|
|
40
|
-
display: flex;
|
|
41
|
-
width: 32px;
|
|
42
|
-
height: 32px;
|
|
43
|
-
justify-content: center;
|
|
44
|
-
align-items: center;
|
|
45
|
-
border-radius: 4px;
|
|
46
|
-
background-color: ${e=>{var r;return e.isSelected?null!==(r=e.selectedBgColor)&&void 0!==r?r:o.COLORS.background.positive.light:o.COLORS.surface.standard}};
|
|
47
|
-
&:hover {
|
|
48
|
-
background-color: ${e=>{var r;return e.isSelected?null!==(r=e.selectedBgColor)&&void 0!==r?r:o.COLORS.background.positive.light:o.COLORS.surface.hovered}};
|
|
49
|
-
}
|
|
50
|
-
`,h=a.default.div`
|
|
51
|
-
display: flex;
|
|
52
|
-
flex-direction: row;
|
|
53
|
-
padding: ${e=>e.isModalView?"6px 12px":"12px 8px 8px 8px "};
|
|
54
|
-
border-width: 0px;
|
|
55
|
-
border-top-width: 0.5px;
|
|
56
|
-
border-style: solid;
|
|
57
|
-
border-color: ${o.COLORS.background.inactive};
|
|
58
|
-
border-bottom-left-radius: 4px;
|
|
59
|
-
border-bottom-right-radius: 4px;
|
|
60
|
-
width: 100%;
|
|
61
|
-
height: 44px;
|
|
62
|
-
align-items: center;
|
|
63
|
-
|
|
64
|
-
justify-content: space-between;
|
|
65
|
-
`,f=a.default(d.default)`
|
|
66
|
-
width: 100%;
|
|
67
|
-
height: ${e=>e.isModalView?"260":"130"}px;
|
|
68
|
-
.ql-container.ql-snow {
|
|
69
|
-
width: 100%;
|
|
70
|
-
border: 0px;
|
|
71
|
-
}
|
|
72
|
-
.ql-editor {
|
|
73
|
-
padding: 0px;
|
|
74
|
-
|
|
75
|
-
/* Handle */
|
|
76
|
-
::-webkit-scrollbar-thumb {
|
|
77
|
-
background: #888;
|
|
78
|
-
border-radius: 20px;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
.ql-editor::-webkit-scrollbar {
|
|
82
|
-
width: 8px;
|
|
83
|
-
display: block;
|
|
84
|
-
border-radius: 20px;
|
|
85
|
-
}
|
|
86
|
-
.ql-editor.ql-blank::before {
|
|
87
|
-
font-style: normal;
|
|
88
|
-
color: ${o.COLORS.content.placeholder};
|
|
89
|
-
}
|
|
90
|
-
`,w=a.default.div`
|
|
91
|
-
width: 100%;
|
|
92
|
-
max-height: ${e=>e.isModalView?"320px":"30vh"};
|
|
93
|
-
min-height: ${e=>e.isModalView?"320px":"20vh"};
|
|
94
|
-
padding: ${e=>e.isModalView?"24px 12px":"0px"};
|
|
95
|
-
display: flex;
|
|
96
|
-
flex-direction: column;
|
|
97
|
-
|
|
98
|
-
.attachment__container {
|
|
99
|
-
display: flex;
|
|
100
|
-
gap: 6px;
|
|
101
|
-
margin: 0 6px;
|
|
102
|
-
overflow-x: scroll;
|
|
103
|
-
max-width: 100%;
|
|
104
|
-
&::-webkit-scrollbar-thumb {
|
|
105
|
-
background: #888;
|
|
106
|
-
border-radius: 10px;
|
|
107
|
-
}
|
|
108
|
-
&::-webkit-scrollbar {
|
|
109
|
-
height: 6px;
|
|
110
|
-
display: block;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
`,m=a.default.div`
|
|
114
|
-
min-height: 40px;
|
|
115
|
-
flex-grow: 1;
|
|
116
|
-
padding: ${e=>e.isModalView?"0px":"8px"};
|
|
117
|
-
`;exports.AttachmentContainer=n,exports.AttachmentName=x,exports.EditorContainer=w,exports.EditorInnerContainer=m,exports.ForwardMessageContainer=c,exports.InboxIconContainer=b,exports.InnerProgressBarContainer=s,exports.LeftItemsContainer=g,exports.OuterProgressBarContainer=p,exports.ProgressIndicatorContainer=l,exports.ReactQuilStyleContainer=f,exports.SendConatiner=h,exports.StyledBodySecondary=u;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './mailRTE';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface GmailRTEProps {
|
|
3
|
-
isForwardMail?: boolean;
|
|
4
|
-
isSendDisabled: boolean;
|
|
5
|
-
buttonAction: (input: string, inputText: string, attachments: {
|
|
6
|
-
filename: string;
|
|
7
|
-
path: string;
|
|
8
|
-
}[]) => Promise<boolean | void>;
|
|
9
|
-
defaultInputText?: string;
|
|
10
|
-
isModalView: boolean;
|
|
11
|
-
setErrorToast: (msg: string) => void;
|
|
12
|
-
isLoading: boolean;
|
|
13
|
-
uploadFile?: (file: File, fileName: string) => Promise<any>;
|
|
14
|
-
buttonText?: string;
|
|
15
|
-
skipAttachments?: boolean;
|
|
16
|
-
initialHtml?: string;
|
|
17
|
-
}
|
|
18
|
-
export declare const GmailRTE: React.FC<GmailRTEProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),s=require("emoji-picker-react"),i=require("react"),n=require("react-quill"),l=require("../../button/Button.js"),a=require("../../tooltips/Tooltip.js"),r=require("../../TypographyStyle.js"),o=require("../../../constants/Theme.js"),c=require("../../../assets/icons/cross.svg.js"),d=require("../../../assets/icons/paperclip.svg.js"),u=require("../../../assets/icons/smile_emoji.svg.js"),j=require("./MailRTE.styled.js");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=m(s),b=m(i);const h=e=>{const{fileName:s,uploadState:i,removeAttachment:n}=e;return t.jsx(t.Fragment,{children:t.jsxs(j.AttachmentContainer,{children:[t.jsx(j.AttachmentName,Object.assign({numberOfLines:1,style:{flex:1}},{children:s})),"loading"!==i.status&&t.jsx(r.BodyCaption,Object.assign({style:{flex:1}},{children:v(i.size)})),"loading"===i.status&&t.jsx(j.ProgressIndicatorContainer,{children:t.jsx(j.OuterProgressBarContainer,{children:t.jsx(j.InnerProgressBarContainer,{style:{backgroundColor:o.COLORS.background.brand,width:"60%"}})})}),t.jsx("div",Object.assign({style:{cursor:"pointer"},onClick:()=>n(s)},{children:t.jsx(c.default,{width:16,height:16})}))]})})},v=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(!+e)return"0 Bytes";const s=t<0?0:t,i=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,i)).toFixed(s))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}`};exports.GmailRTE=s=>{let{isForwardMail:r,isSendDisabled:c,buttonAction:m,defaultInputText:v,isModalView:x,setErrorToast:f,uploadFile:p,isLoading:y,buttonText:O="Send",skipAttachments:q,initialHtml:C}=s;var N,k,S;const w=i.useRef(null),[B,T]=i.useState(!1),M=b.default.useRef(null),E=i.useRef(),[I,R]=i.useState({}),[_,z]=i.useState(""),[F,L]=i.useState(v||"");i.useEffect((()=>{var e,t;L(null===(t=null===(e=w.current)||void 0===e?void 0:e.unprivilegedEditor)||void 0===t?void 0:t.getText())}),[_]);const A=()=>{T(!B)},P=(null===(S=null===(k=null===(N=null==w?void 0:w.current)||void 0===N?void 0:N.editor)||void 0===k?void 0:k.container)||void 0===S?void 0:S.querySelector(".ql-editor"))||{};E.current=P;const Q=n.Quill.import("formats/font");Q.whitelist=["arial","comic-sans","courier-new","georgia","helvetica","lucida"],n.Quill.register(Q,!0);const V=n.Quill.import("formats/size");V.whitelist=["extra-small","small","medium","large"],n.Quill.register(V,!0),i.useEffect((()=>{C&&E.current&&(E.current.innerHTML=C)}),[E.current]);const G=e=>{const t=I;delete t[e],R(Object.assign({},t))};return t.jsxs(t.Fragment,{children:[t.jsxs(j.EditorContainer,Object.assign({isModalView:x},{children:[t.jsx(j.EditorInnerContainer,Object.assign({isModalView:x},{children:t.jsx(j.ReactQuilStyleContainer,{isModalView:x,ref:w,modules:{toolbar:{container:"#gmail-toolbar"}},onChange:e=>{z(e)},formats:["header","font","size","bold","italic","underline","align","strike","script","blockquote","background","list","bullet","indent","link","image","color","code-block"]})})),!q&&t.jsx("div",Object.assign({className:"attachment__container"},{children:Object.keys(I).map((e=>t.jsx(h,{fileName:e,uploadState:I[e],removeAttachment:G},e)))})),r&&t.jsx(j.ForwardMessageContainer,{children:t.jsx(j.StyledBodySecondary,Object.assign({style:{fontSize:12}},{children:"We cannot currently display the forwarded message thread. It will be visible after sending the message."}))})]})),t.jsxs("div",Object.assign({id:"gmail-toolbar",style:{border:0,display:"flex",zIndex:0,backgroundColor:o.COLORS.surface.subdued}},{children:[t.jsxs("span",Object.assign({className:"ql-formats"},{children:[t.jsx("button",{className:"ql-bold"}),t.jsx("button",{className:"ql-italic"}),t.jsx("button",{className:"ql-underline"}),t.jsx("button",{className:"ql-strike"})]})),t.jsxs("span",Object.assign({className:"ql-formats"},{children:[t.jsx("button",{className:"ql-list",value:"ordered"}),t.jsx("button",{className:"ql-list",value:"bullet"}),t.jsx("button",{className:"ql-indent",value:"-1"}),t.jsx("button",{className:"ql-indent",value:"+1"})]})),t.jsxs("span",Object.assign({className:"ql-formats"},{children:[t.jsx("button",{className:"ql-script",value:"super"}),t.jsx("button",{className:"ql-script",value:"sub"}),t.jsx("button",{className:"ql-blockquote"})]})),t.jsxs("span",Object.assign({className:"ql-formats"},{children:[t.jsx("select",{className:"ql-align"}),t.jsx("select",{className:"ql-color"}),t.jsx("select",{className:"ql-background"})]}))]})),t.jsx(j.SendConatiner,Object.assign({isModalView:!0},{children:t.jsxs(j.LeftItemsContainer,{children:[t.jsx(l.Button,{style:{marginRight:10},buttonText:O,onClick:()=>{e.__awaiter(void 0,void 0,void 0,(function*(){var e,t;const s=[];Object.keys(I).map((e=>{"finished"===I[e].status&&s.push({filename:e,path:I[e].url})})),(yield m(_,F,s))&&x&&(z(""),L(""),null===(t=null===(e=w.current)||void 0===e?void 0:e.editor)||void 0===t||t.setContents([{insert:"\n"}]),R({}))})).then()},size:"small",disabled:(null==F?void 0:F.length)<=0||c,isLoading:y}),!q&&t.jsxs(t.Fragment,{children:[t.jsx("input",{ref:M,type:"file",name:"file",multiple:!0,style:{display:"none"},onChange:t=>{const s=t.target.files;if(s){const t=[],i=[];Object.values(s).forEach((e=>{e.size<=5242880?i.push(e):t.push(e)})),t.length>0&&f("Files greater than 5mb size are ignored."),i.forEach((t=>(t=>e.__awaiter(void 0,void 0,void 0,(function*(){var e,s;const i=I;i[t.name]={status:"loading"},R(Object.assign({},i));const n=p&&(yield p(t,t.name));return(null===(e=null==n?void 0:n.data)||void 0===e?void 0:e.imageUrl)?(i[t.name]={status:"finished",url:null===(s=n.data)||void 0===s?void 0:s.imageUrl,size:null==t?void 0:t.size},R(Object.assign({},i)),n.data.imageUrl):(i[t.name]={status:"error"},R(Object.assign({},i)),null)})))(t)))}}}),p&&t.jsx(a.Tooltip,Object.assign({body:"Attach files",placement:"top"},{children:t.jsx(j.InboxIconContainer,Object.assign({onClick:()=>{(()=>{var e;null===(e=M.current)||void 0===e||e.click()})()}},{children:t.jsx(d.default,{style:{cursor:"pointer"},width:16,height:16,color:o.COLORS.content.secondary})}))}))]}),t.jsx("div",Object.assign({style:{display:"flex",flexDirection:"row",columnGap:16,alignItems:"center"}},{children:t.jsxs("div",Object.assign({style:{position:"relative"}},{children:[t.jsx(a.Tooltip,Object.assign({body:"Emoji",placement:"top"},{children:t.jsx(j.InboxIconContainer,Object.assign({isSelected:!1,onClick:()=>{A()}},{children:t.jsx(u.default,{width:16,height:16,color:o.COLORS.content.secondary})}))})),B&&t.jsx("div",Object.assign({style:{position:"absolute",bottom:40,left:0}},{children:t.jsx(g.default,{onEmojiClick:e=>{var t,s,i,n,l;null===(t=null==w?void 0:w.current)||void 0===t||t.focus();const a=null===(i=null===(s=w.current)||void 0===s?void 0:s.editor)||void 0===i?void 0:i.getSelection();a&&(null===(l=null===(n=w.current)||void 0===n?void 0:n.editor)||void 0===l||l.insertText(null==a?void 0:a.index,e.emoji)),A(),z(P.innerText)}})}))]}))}))]})}))]})};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as e from"react";var l;function r(){return r=Object.assign?Object.assign.bind():function(e){for(var l=1;l<arguments.length;l++){var r=arguments[l];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},r.apply(this,arguments)}var t=t=>e.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 12 12"},t),l||(l=e.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.89 1.194c-.398 0-.78.158-1.062.44L2.233 6.229a2.502 2.502 0 0 0 3.538 3.537l4.595-4.595a.5.5 0 0 1 .707.708l-4.595 4.595A3.502 3.502 0 1 1 1.526 5.52L6.121.926a2.501 2.501 0 1 1 3.537 3.538l-4.6 4.595a1.5 1.5 0 1 1-2.122-2.123l4.246-4.24a.5.5 0 1 1 .706.708l-4.245 4.24a.501.501 0 0 0 .708.707l4.6-4.595A1.502 1.502 0 0 0 7.89 1.194Z",clipRule:"evenodd"})));export{t as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as e from"react";var a,t;function r(){return r=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},r.apply(this,arguments)}var l=l=>e.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 22 22"},l),a||(a=e.createElement("path",{d:"M6.4 13.2a1 1 0 0 1 1.397.196l.005.006.033.041a4.945 4.945 0 0 0 .815.748c.578.42 1.376.81 2.35.81.975 0 1.772-.39 2.35-.81a4.945 4.945 0 0 0 .815-.748l.034-.041.004-.006A1 1 0 0 1 15.8 14.6l-.001.001-.001.002-.003.004-.007.009-.021.027-.07.086c-.059.07-.142.164-.248.276a6.951 6.951 0 0 1-.923.804c-.798.58-2 1.191-3.526 1.191-1.525 0-2.728-.61-3.526-1.191a6.949 6.949 0 0 1-1.17-1.08 3.884 3.884 0 0 1-.07-.086l-.022-.027-.007-.01-.003-.003V14.6H6.2a1 1 0 0 1 .2-1.4ZM13 9a2 2 0 1 1 4 0 2 2 0 0 1-4 0ZM7 7a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z"})),t||(t=e.createElement("path",{fillRule:"evenodd",d:"M11 0C4.925 0 0 4.925 0 11s4.925 11 11 11 11-4.925 11-11S17.075 0 11 0ZM2 11a9 9 0 1 1 18 0 9 9 0 0 1-18 0Z",clipRule:"evenodd"})));export{l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './mail';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
3
|
-
declare const _default: ComponentMeta<import("react").FC<import("./mailRTE").GmailRTEProps>>;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const Basic: ComponentStory<import("react").FC<import("./mailRTE").GmailRTEProps>>;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import ReactQuill from 'react-quill';
|
|
2
|
-
export declare const AttachmentContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export declare const ProgressIndicatorContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
-
export declare const OuterProgressBarContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
-
export declare const InnerProgressBarContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
-
export declare const AttachmentName: import("styled-components").StyledComponent<"div", any, {
|
|
7
|
-
numberOfLines?: number | undefined;
|
|
8
|
-
color?: string | undefined;
|
|
9
|
-
}, never>;
|
|
10
|
-
export declare const ForwardMessageContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
11
|
-
export declare const StyledBodySecondary: import("styled-components").StyledComponent<"div", any, {
|
|
12
|
-
numberOfLines?: number | undefined;
|
|
13
|
-
color?: string | undefined;
|
|
14
|
-
}, never>;
|
|
15
|
-
export declare const LeftItemsContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
16
|
-
export declare const InboxIconContainer: import("styled-components").StyledComponent<"div", any, {
|
|
17
|
-
isSelected?: boolean | undefined;
|
|
18
|
-
selectedBgColor?: string | undefined;
|
|
19
|
-
}, never>;
|
|
20
|
-
export declare const SendConatiner: import("styled-components").StyledComponent<"div", any, {
|
|
21
|
-
isModalView: boolean;
|
|
22
|
-
}, never>;
|
|
23
|
-
export declare const ReactQuilStyleContainer: import("styled-components").StyledComponent<typeof ReactQuill, any, {
|
|
24
|
-
isModalView: boolean;
|
|
25
|
-
}, never>;
|
|
26
|
-
export declare const EditorContainer: import("styled-components").StyledComponent<"div", any, {
|
|
27
|
-
isModalView: boolean;
|
|
28
|
-
}, never>;
|
|
29
|
-
export declare const EditorInnerContainer: import("styled-components").StyledComponent<"div", any, {
|
|
30
|
-
isModalView: boolean;
|
|
31
|
-
}, never>;
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import e from"react-quill";import r from"styled-components";import{BodyCaption as i,BodySecondary as o}from"../../TypographyStyle.js";import{COLORS as t}from"../../../constants/Theme.js";const d=r.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: row;
|
|
4
|
-
background-color: ${e=>e.theme.COLORS.surface.subdued}
|
|
5
|
-
margin-bottom: 4px;
|
|
6
|
-
margin-top: 4px;
|
|
7
|
-
padding: 7px;
|
|
8
|
-
width: 200px;
|
|
9
|
-
align-items: center;
|
|
10
|
-
border-radius: 8px;
|
|
11
|
-
`,l=r.div`
|
|
12
|
-
flex: 1;
|
|
13
|
-
flex-direction: row;
|
|
14
|
-
align-items: center;
|
|
15
|
-
`,a=r.div`
|
|
16
|
-
height: 8px;
|
|
17
|
-
border-radius: 8px;
|
|
18
|
-
background-color: ${e=>e.theme.COLORS.background.inactive};
|
|
19
|
-
flex: 1;
|
|
20
|
-
`,n=r.div`
|
|
21
|
-
height: 100%;
|
|
22
|
-
border-radius: 4px;
|
|
23
|
-
`,p=r(i)`
|
|
24
|
-
color: ${t.content.brand};
|
|
25
|
-
width: 50%;
|
|
26
|
-
`,c=r.div`
|
|
27
|
-
padding: 8px;
|
|
28
|
-
border-radius: 4px;
|
|
29
|
-
margin: 0 8px 6px 8px;
|
|
30
|
-
background-color: ${t.background.warning.light};
|
|
31
|
-
`,x=r(o)`
|
|
32
|
-
color: ${e=>e.theme.COLORS.content.warning};
|
|
33
|
-
font-style: italic;
|
|
34
|
-
`,s=r.div`
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-direction: row;
|
|
37
|
-
align-items: center;
|
|
38
|
-
`,b=r.div`
|
|
39
|
-
cursor: pointer;
|
|
40
|
-
display: flex;
|
|
41
|
-
width: 32px;
|
|
42
|
-
height: 32px;
|
|
43
|
-
justify-content: center;
|
|
44
|
-
align-items: center;
|
|
45
|
-
border-radius: 4px;
|
|
46
|
-
background-color: ${e=>{var r;return e.isSelected?null!==(r=e.selectedBgColor)&&void 0!==r?r:t.background.positive.light:t.surface.standard}};
|
|
47
|
-
&:hover {
|
|
48
|
-
background-color: ${e=>{var r;return e.isSelected?null!==(r=e.selectedBgColor)&&void 0!==r?r:t.background.positive.light:t.surface.hovered}};
|
|
49
|
-
}
|
|
50
|
-
`,g=r.div`
|
|
51
|
-
display: flex;
|
|
52
|
-
flex-direction: row;
|
|
53
|
-
padding: ${e=>e.isModalView?"6px 12px":"12px 8px 8px 8px "};
|
|
54
|
-
border-width: 0px;
|
|
55
|
-
border-top-width: 0.5px;
|
|
56
|
-
border-style: solid;
|
|
57
|
-
border-color: ${t.background.inactive};
|
|
58
|
-
border-bottom-left-radius: 4px;
|
|
59
|
-
border-bottom-right-radius: 4px;
|
|
60
|
-
width: 100%;
|
|
61
|
-
height: 44px;
|
|
62
|
-
align-items: center;
|
|
63
|
-
|
|
64
|
-
justify-content: space-between;
|
|
65
|
-
`,h=r(e)`
|
|
66
|
-
width: 100%;
|
|
67
|
-
height: ${e=>e.isModalView?"260":"130"}px;
|
|
68
|
-
.ql-container.ql-snow {
|
|
69
|
-
width: 100%;
|
|
70
|
-
border: 0px;
|
|
71
|
-
}
|
|
72
|
-
.ql-editor {
|
|
73
|
-
padding: 0px;
|
|
74
|
-
|
|
75
|
-
/* Handle */
|
|
76
|
-
::-webkit-scrollbar-thumb {
|
|
77
|
-
background: #888;
|
|
78
|
-
border-radius: 20px;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
.ql-editor::-webkit-scrollbar {
|
|
82
|
-
width: 8px;
|
|
83
|
-
display: block;
|
|
84
|
-
border-radius: 20px;
|
|
85
|
-
}
|
|
86
|
-
.ql-editor.ql-blank::before {
|
|
87
|
-
font-style: normal;
|
|
88
|
-
color: ${t.content.placeholder};
|
|
89
|
-
}
|
|
90
|
-
`,u=r.div`
|
|
91
|
-
width: 100%;
|
|
92
|
-
max-height: ${e=>e.isModalView?"320px":"30vh"};
|
|
93
|
-
min-height: ${e=>e.isModalView?"320px":"20vh"};
|
|
94
|
-
padding: ${e=>e.isModalView?"24px 12px":"0px"};
|
|
95
|
-
display: flex;
|
|
96
|
-
flex-direction: column;
|
|
97
|
-
|
|
98
|
-
.attachment__container {
|
|
99
|
-
display: flex;
|
|
100
|
-
gap: 6px;
|
|
101
|
-
margin: 0 6px;
|
|
102
|
-
overflow-x: scroll;
|
|
103
|
-
max-width: 100%;
|
|
104
|
-
&::-webkit-scrollbar-thumb {
|
|
105
|
-
background: #888;
|
|
106
|
-
border-radius: 10px;
|
|
107
|
-
}
|
|
108
|
-
&::-webkit-scrollbar {
|
|
109
|
-
height: 6px;
|
|
110
|
-
display: block;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
`,m=r.div`
|
|
114
|
-
min-height: 40px;
|
|
115
|
-
flex-grow: 1;
|
|
116
|
-
padding: ${e=>e.isModalView?"0px":"8px"};
|
|
117
|
-
`;export{d as AttachmentContainer,p as AttachmentName,u as EditorContainer,m as EditorInnerContainer,c as ForwardMessageContainer,b as InboxIconContainer,n as InnerProgressBarContainer,s as LeftItemsContainer,a as OuterProgressBarContainer,l as ProgressIndicatorContainer,h as ReactQuilStyleContainer,g as SendConatiner,x as StyledBodySecondary};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './mailRTE';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface GmailRTEProps {
|
|
3
|
-
isForwardMail?: boolean;
|
|
4
|
-
isSendDisabled: boolean;
|
|
5
|
-
buttonAction: (input: string, inputText: string, attachments: {
|
|
6
|
-
filename: string;
|
|
7
|
-
path: string;
|
|
8
|
-
}[]) => Promise<boolean | void>;
|
|
9
|
-
defaultInputText?: string;
|
|
10
|
-
isModalView: boolean;
|
|
11
|
-
setErrorToast: (msg: string) => void;
|
|
12
|
-
isLoading: boolean;
|
|
13
|
-
uploadFile?: (file: File, fileName: string) => Promise<any>;
|
|
14
|
-
buttonText?: string;
|
|
15
|
-
skipAttachments?: boolean;
|
|
16
|
-
initialHtml?: string;
|
|
17
|
-
}
|
|
18
|
-
export declare const GmailRTE: React.FC<GmailRTEProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as e}from"../../../_virtual/_tslib.js";import{jsxs as t,Fragment as i,jsx as l}from"react/jsx-runtime";import s from"emoji-picker-react";import n,{useRef as o,useState as a,useEffect as r}from"react";import{Quill as c}from"react-quill";import{Button as d}from"../../button/Button.js";import{Tooltip as u}from"../../tooltips/Tooltip.js";import{BodyCaption as m}from"../../TypographyStyle.js";import{COLORS as g}from"../../../constants/Theme.js";import b from"../../../assets/icons/cross.svg.js";import h from"../../../assets/icons/paperclip.svg.js";import v from"../../../assets/icons/smile_emoji.svg.js";import{EditorContainer as p,EditorInnerContainer as f,ReactQuilStyleContainer as j,ForwardMessageContainer as y,StyledBodySecondary as O,SendConatiner as q,LeftItemsContainer as k,InboxIconContainer as N,AttachmentContainer as w,AttachmentName as x,ProgressIndicatorContainer as M,OuterProgressBarContainer as T,InnerProgressBarContainer as B}from"./MailRTE.styled.js";const z=m=>{let{isForwardMail:b,isSendDisabled:w,buttonAction:x,defaultInputText:M,isModalView:T,setErrorToast:B,uploadFile:z,isLoading:S,buttonText:E="Send",skipAttachments:A,initialHtml:F}=m;var V,_,I;const L=o(null),[R,U]=a(!1),D=n.useRef(null),G=o(),[H,$]=a({}),[K,P]=a(""),[W,Y]=a(M||"");r((()=>{var e,t;Y(null===(t=null===(e=L.current)||void 0===e?void 0:e.unprivilegedEditor)||void 0===t?void 0:t.getText())}),[K]);const Z=()=>{U(!R)},J=(null===(I=null===(_=null===(V=null==L?void 0:L.current)||void 0===V?void 0:V.editor)||void 0===_?void 0:_.container)||void 0===I?void 0:I.querySelector(".ql-editor"))||{};G.current=J;const Q=c.import("formats/font");Q.whitelist=["arial","comic-sans","courier-new","georgia","helvetica","lucida"],c.register(Q,!0);const X=c.import("formats/size");X.whitelist=["extra-small","small","medium","large"],c.register(X,!0),r((()=>{F&&G.current&&(G.current.innerHTML=F)}),[G.current]);const ee=e=>{const t=H;delete t[e],$(Object.assign({},t))};return t(i,{children:[t(p,Object.assign({isModalView:T},{children:[l(f,Object.assign({isModalView:T},{children:l(j,{isModalView:T,ref:L,modules:{toolbar:{container:"#gmail-toolbar"}},onChange:e=>{P(e)},formats:["header","font","size","bold","italic","underline","align","strike","script","blockquote","background","list","bullet","indent","link","image","color","code-block"]})})),!A&&l("div",Object.assign({className:"attachment__container"},{children:Object.keys(H).map((e=>l(C,{fileName:e,uploadState:H[e],removeAttachment:ee},e)))})),b&&l(y,{children:l(O,Object.assign({style:{fontSize:12}},{children:"We cannot currently display the forwarded message thread. It will be visible after sending the message."}))})]})),t("div",Object.assign({id:"gmail-toolbar",style:{border:0,display:"flex",zIndex:0,backgroundColor:g.surface.subdued}},{children:[t("span",Object.assign({className:"ql-formats"},{children:[l("button",{className:"ql-bold"}),l("button",{className:"ql-italic"}),l("button",{className:"ql-underline"}),l("button",{className:"ql-strike"})]})),t("span",Object.assign({className:"ql-formats"},{children:[l("button",{className:"ql-list",value:"ordered"}),l("button",{className:"ql-list",value:"bullet"}),l("button",{className:"ql-indent",value:"-1"}),l("button",{className:"ql-indent",value:"+1"})]})),t("span",Object.assign({className:"ql-formats"},{children:[l("button",{className:"ql-script",value:"super"}),l("button",{className:"ql-script",value:"sub"}),l("button",{className:"ql-blockquote"})]})),t("span",Object.assign({className:"ql-formats"},{children:[l("select",{className:"ql-align"}),l("select",{className:"ql-color"}),l("select",{className:"ql-background"})]}))]})),l(q,Object.assign({isModalView:!0},{children:t(k,{children:[l(d,{style:{marginRight:10},buttonText:E,onClick:()=>{e(void 0,void 0,void 0,(function*(){var e,t;const i=[];Object.keys(H).map((e=>{"finished"===H[e].status&&i.push({filename:e,path:H[e].url})})),(yield x(K,W,i))&&T&&(P(""),Y(""),null===(t=null===(e=L.current)||void 0===e?void 0:e.editor)||void 0===t||t.setContents([{insert:"\n"}]),$({}))})).then()},size:"small",disabled:(null==W?void 0:W.length)<=0||w,isLoading:S}),!A&&t(i,{children:[l("input",{ref:D,type:"file",name:"file",multiple:!0,style:{display:"none"},onChange:t=>{const i=t.target.files;if(i){const t=[],l=[];Object.values(i).forEach((e=>{e.size<=5242880?l.push(e):t.push(e)})),t.length>0&&B("Files greater than 5mb size are ignored."),l.forEach((t=>(t=>e(void 0,void 0,void 0,(function*(){var e,i;const l=H;l[t.name]={status:"loading"},$(Object.assign({},l));const s=z&&(yield z(t,t.name));return(null===(e=null==s?void 0:s.data)||void 0===e?void 0:e.imageUrl)?(l[t.name]={status:"finished",url:null===(i=s.data)||void 0===i?void 0:i.imageUrl,size:null==t?void 0:t.size},$(Object.assign({},l)),s.data.imageUrl):(l[t.name]={status:"error"},$(Object.assign({},l)),null)})))(t)))}}}),z&&l(u,Object.assign({body:"Attach files",placement:"top"},{children:l(N,Object.assign({onClick:()=>{(()=>{var e;null===(e=D.current)||void 0===e||e.click()})()}},{children:l(h,{style:{cursor:"pointer"},width:16,height:16,color:g.content.secondary})}))}))]}),l("div",Object.assign({style:{display:"flex",flexDirection:"row",columnGap:16,alignItems:"center"}},{children:t("div",Object.assign({style:{position:"relative"}},{children:[l(u,Object.assign({body:"Emoji",placement:"top"},{children:l(N,Object.assign({isSelected:!1,onClick:()=>{Z()}},{children:l(v,{width:16,height:16,color:g.content.secondary})}))})),R&&l("div",Object.assign({style:{position:"absolute",bottom:40,left:0}},{children:l(s,{onEmojiClick:e=>{var t,i,l,s,n;null===(t=null==L?void 0:L.current)||void 0===t||t.focus();const o=null===(l=null===(i=L.current)||void 0===i?void 0:i.editor)||void 0===l?void 0:l.getSelection();o&&(null===(n=null===(s=L.current)||void 0===s?void 0:s.editor)||void 0===n||n.insertText(null==o?void 0:o.index,e.emoji)),Z(),P(J.innerText)}})}))]}))}))]})}))]})},C=e=>{const{fileName:s,uploadState:n,removeAttachment:o}=e;return l(i,{children:t(w,{children:[l(x,Object.assign({numberOfLines:1,style:{flex:1}},{children:s})),"loading"!==n.status&&l(m,Object.assign({style:{flex:1}},{children:S(n.size)})),"loading"===n.status&&l(M,{children:l(T,{children:l(B,{style:{backgroundColor:g.background.brand,width:"60%"}})})}),l("div",Object.assign({style:{cursor:"pointer"},onClick:()=>o(s)},{children:l(b,{width:16,height:16})}))]})})},S=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(!+e)return"0 Bytes";const i=t<0?0:t,l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(i))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][l]}`};export{z as GmailRTE};
|