@bikdotai/bik-component-library 0.0.586-mock-beta0.5 → 0.0.587-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/TablePagination/TablePagination.d.ts +1 -0
- package/dist/cjs/components/TablePagination/TablePaginationCard.d.ts +2 -0
- package/dist/cjs/components/TablePagination/TablePaginationCard.js +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/cjs/components/bik-layout/BikSidebar.js +1 -1
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/cjs/components/bik-layout/SimpleSidebar.d.ts +0 -1
- package/dist/cjs/components/bik-layout/SimpleSidebar.js +1 -1
- package/dist/cjs/components/dropdown/Common.styled.d.ts +0 -1
- package/dist/cjs/components/dropdown/Common.styled.js +6 -8
- package/dist/cjs/components/dropdown/DropdownPopover/index.d.ts +0 -1
- package/dist/cjs/components/dropdown/DropdownPopover/index.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.d.ts +2 -2
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +2 -10
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.d.ts +2 -2
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/utils/iterationOnOptions.d.ts +0 -4
- package/dist/cjs/components/dropdown/hooks/useDropdown.d.ts +0 -4
- package/dist/cjs/components/dropdown/type.d.ts +0 -2
- package/dist/cjs/components/floater/floater.d.ts +2 -3
- package/dist/cjs/components/floater/floater.js +1 -1
- package/dist/cjs/components/input/Input.d.ts +0 -2
- package/dist/cjs/components/input/Input.js +1 -1
- package/dist/cjs/components/input/Input.styled.d.ts +0 -1
- package/dist/cjs/components/input/Input.styled.js +1 -1
- package/dist/cjs/hooks/useOutside.js +1 -1
- package/dist/cjs/index.d.ts +0 -2
- package/dist/cjs/index.js +1 -1
- package/dist/esm/components/TablePagination/TablePagination.d.ts +1 -0
- package/dist/esm/components/TablePagination/TablePaginationCard.d.ts +2 -0
- package/dist/esm/components/TablePagination/TablePaginationCard.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/esm/components/bik-layout/BikSidebar.js +1 -1
- package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/esm/components/bik-layout/SimpleSidebar.d.ts +0 -1
- package/dist/esm/components/bik-layout/SimpleSidebar.js +1 -1
- package/dist/esm/components/dropdown/Common.styled.d.ts +0 -1
- package/dist/esm/components/dropdown/Common.styled.js +4 -6
- package/dist/esm/components/dropdown/DropdownPopover/index.d.ts +0 -1
- package/dist/esm/components/dropdown/DropdownPopover/index.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.d.ts +2 -2
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +2 -10
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.d.ts +2 -2
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/utils/iterationOnOptions.d.ts +0 -4
- package/dist/esm/components/dropdown/hooks/useDropdown.d.ts +0 -4
- package/dist/esm/components/dropdown/type.d.ts +0 -2
- package/dist/esm/components/floater/floater.d.ts +2 -3
- package/dist/esm/components/floater/floater.js +1 -1
- package/dist/esm/components/input/Input.d.ts +0 -2
- package/dist/esm/components/input/Input.js +1 -1
- package/dist/esm/components/input/Input.styled.d.ts +0 -1
- package/dist/esm/components/input/Input.styled.js +1 -1
- package/dist/esm/hooks/useOutside.js +1 -1
- package/dist/esm/index.d.ts +0 -2
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/components/dropdown/MultilevelDropdownPopover/index.d.ts +0 -15
- package/dist/cjs/components/dropdown/MultilevelDropdownPopover/index.js +0 -1
- package/dist/cjs/components/floating-input-dropdown/FloatingInputDropdown.d.ts +0 -26
- package/dist/cjs/components/floating-input-dropdown/FloatingInputDropdown.js +0 -5
- package/dist/cjs/components/floating-input-dropdown/index.d.ts +0 -1
- package/dist/esm/components/dropdown/MultilevelDropdownPopover/index.d.ts +0 -15
- package/dist/esm/components/dropdown/MultilevelDropdownPopover/index.js +0 -1
- package/dist/esm/components/floating-input-dropdown/FloatingInputDropdown.d.ts +0 -26
- package/dist/esm/components/floating-input-dropdown/FloatingInputDropdown.js +0 -5
- package/dist/esm/components/floating-input-dropdown/index.d.ts +0 -1
|
@@ -8,5 +8,6 @@ export type TablePaginationProps = {
|
|
|
8
8
|
updatePageNumber: (pageNumber: number) => void;
|
|
9
9
|
updatePageSize: (option: DropdownOption | DropdownOption[]) => void;
|
|
10
10
|
showTotalText?: boolean;
|
|
11
|
+
removeBorder?: boolean;
|
|
11
12
|
};
|
|
12
13
|
export declare const TablePagination: React.FC<TablePaginationProps>;
|
|
@@ -3,5 +3,7 @@ import { TablePaginationProps } from "./TablePagination";
|
|
|
3
3
|
export declare const TablePaginationCardStyled: import("@emotion/styled").StyledComponent<{
|
|
4
4
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
5
|
as?: React.ElementType<any> | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
removeBorder?: boolean | undefined;
|
|
6
8
|
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
9
|
export declare const TablePaginationCard: React.FC<TablePaginationProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/styled/base"),c=require("react/jsx-runtime"),a=require("./TablePagination.js"),b=require("../../constants/Theme.js");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/styled/base"),c=require("react/jsx-runtime"),a=require("./TablePagination.js"),b=require("../../constants/Theme.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const t=n(e).default("div","production"===process.env.NODE_ENV?{target:"exfv5q90"}:{target:"exfv5q90",label:"TablePaginationCardStyled"})("background:",b.COLORS.surface.standard,";border:",(e=>e.removeBorder?0:1),"px solid ",b.COLORS.stroke.primary,";border-radius:4px;display:flex;justify-content:center;margin:auto;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlRhYmxlUGFnaW5hdGlvbkNhcmQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlvRCIsImZpbGUiOiJUYWJsZVBhZ2luYXRpb25DYXJkLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGpzeCBhcyBfanN4IH0gZnJvbSBcInJlYWN0L2pzeC1ydW50aW1lXCI7XHJcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcclxuaW1wb3J0IHsgVGFibGVQYWdpbmF0aW9uLCB9IGZyb20gXCIuL1RhYmxlUGFnaW5hdGlvblwiO1xyXG5pbXBvcnQgeyBDT0xPUlMgfSBmcm9tIFwiLi4vLi4vY29uc3RhbnRzL1RoZW1lXCI7XHJcbmV4cG9ydCBjb25zdCBUYWJsZVBhZ2luYXRpb25DYXJkU3R5bGVkID0gc3R5bGVkLmRpdiBgXG5cdGJhY2tncm91bmQ6ICR7Q09MT1JTLnN1cmZhY2Uuc3RhbmRhcmR9O1xuXHRib3JkZXI6ICR7KHByb3BzKSA9PiAocHJvcHMucmVtb3ZlQm9yZGVyID8gMCA6IDEpfXB4IHNvbGlkXG5cdFx0JHtDT0xPUlMuc3Ryb2tlLnByaW1hcnl9O1xuXHRib3JkZXItcmFkaXVzOiA0cHg7XG5cdGRpc3BsYXk6IGZsZXg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRtYXJnaW46IGF1dG87XG5gO1xyXG5leHBvcnQgY29uc3QgVGFibGVQYWdpbmF0aW9uQ2FyZCA9IChwcm9wcykgPT4ge1xyXG4gICAgcmV0dXJuIChfanN4KFRhYmxlUGFnaW5hdGlvbkNhcmRTdHlsZWQsIE9iamVjdC5hc3NpZ24oeyByZW1vdmVCb3JkZXI6IHByb3BzLnJlbW92ZUJvcmRlciB9LCB7IGNoaWxkcmVuOiBfanN4KFRhYmxlUGFnaW5hdGlvbiwgT2JqZWN0LmFzc2lnbih7fSwgcHJvcHMpKSB9KSkpO1xyXG59O1xyXG4vLyMgc291cmNlTWFwcGluZ1VSTD1UYWJsZVBhZ2luYXRpb25DYXJkLmpzLm1hcCJdfQ== */"));exports.TablePaginationCard=e=>c.jsx(t,Object.assign({removeBorder:e.removeBorder},{children:c.jsx(a.TablePagination,Object.assign({},e))})),exports.TablePaginationCardStyled=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),o=require("react-bootstrap"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),o=require("react-bootstrap"),s=require("../../constants/Theme.js"),n=require("../datePicker/DatePicker.js");require("react-calendar"),require("../../utils/DateUtils.js");var i=require("../TypographyStyle.js");require("../datePicker/DatePickerWrapper.styled.js");var l=require("./CommonStyles.js");const a=t=>{let{eachOption:o,selectedOption:n,selectedDate:a,onClickingEachItem:r,rangeSelection:c,isLastItem:u,isFirstItem:p}=t;return e.jsxs(l.ItemMenuContainer,Object.assign({isFirstItem:p,isLastItem:u,onClick:()=>r(o),isSelected:o.isCustom?o.key==(null==n?void 0:n.key)&&!!a:o.key==(null==n?void 0:n.key)},{children:[e.jsx(i.BodySecondary,Object.assign({color:o.key==(null==n?void 0:n.key)?s.BASE_COLORS.positive[900]:s.BASE_COLORS.grayscale[900]},{children:o.label})),o.subLabel?e.jsx(i.BodyCaption,Object.assign({style:{color:s.BASE_COLORS.grayscale[700]}},{children:o.subLabel})):e.jsx(e.Fragment,{}),a&&(null==n?void 0:n.isCustom)&&o.key==(null==n?void 0:n.key)&&e.jsx(i.BodyCaption,{children:c?`${d(a[0])} to ${d(a[1])}`:`${d(a[0])}`})]}),o.key)},d=e=>e.toLocaleString("default",{day:"numeric",month:"short",year:"numeric"});exports.AnalyticsDropdown=r=>{let{options:c,placeholder:u="Select an option",selected:p,onOptionSelected:g,resetDropdown:m,maxHeight:v,backgroundcolor:j,calendarPopperConfig:O,variant:y="default",datePickerPlacement:b,closeDropdown:D,labelColor:S,styleProps:h}=r;var x,f,k;const[w,C]=t.useState(!1),[R,E]=t.useState(p),[I,L]=t.useState(),[F,q]=t.useState(!1),P=()=>{!w&&q(!F)},[T,A]=t.useState(p),M="small"===y?i.Caption:i.BodySecondary;return t.useEffect((()=>{m&&E(void 0)}),[m]),t.useEffect((()=>{var e;(null==p?void 0:p.isCustom)&&(null===(e=p.dateRangeSelectionOptions)||void 0===e?void 0:e.selectedDates)?L(p.dateRangeSelectionOptions.selectedDates):L(void 0),E(p)}),[p]),t.useEffect((()=>{q(!1),C(!1)}),[D]),e.jsx(e.Fragment,{children:e.jsxs(l.MainDropdown,Object.assign({drop:"down",show:F,onToggle:P,bgColor:j,id:"analytic-dropdown"},{children:[e.jsx(o.Dropdown.Toggle,Object.assign({id:"dropdown-autoclose-outside",className:"main--dropdown",style:"small"===y?{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",backgroundColor:"#FAFAFA",borderRadius:4,border:`1px solid ${s.DEFAULT_THEME.colorsV2.stroke.primary}`}:h||void 0},{children:e.jsx(M,Object.assign({style:"small"===y||S?{color:S||s.DEFAULT_THEME.colorsV2.content.secondary}:void 0},{children:(null==R?void 0:R.isCustom)?I?d(I[0])===d(I[1])?`${d(I[0])}`:`${d(I[0])} to ${d(I[1])}`:(null==T?void 0:T.label)?null==T?void 0:T.label:u:R?null==R?void 0:R.label:u}))})),e.jsx(o.Dropdown.Menu,Object.assign({className:"main--dropdown"},{children:e.jsxs(l.MainDropdown,Object.assign({drop:null!=b?b:"end",id:"sub--dropdown",show:w,onToggle:e=>{!e&&q(!1),C(!w)}},{children:[e.jsx("div",Object.assign({style:{maxHeight:v||"auto",overflowY:"scroll"}},{children:c.map(((t,s)=>{var n;return e.jsx("div",{children:(null==t?void 0:t.isCustom)?e.jsx(o.Dropdown.Toggle,Object.assign({className:"sub--dropdown"},{children:e.jsx(a,{isFirstItem:0===s,isLastItem:s===c.length-1,eachOption:t,selectedOption:R,selectedDate:I,onClickingEachItem:e=>{E(e),C(!0)},rangeSelection:!!(null===(n=null==t?void 0:t.dateRangeSelectionOptions)||void 0===n?void 0:n.selectRange)})})):e.jsx(a,{isFirstItem:0===s,isLastItem:s===c.length-1,eachOption:t,selectedOption:R,selectedDate:I,onClickingEachItem:e=>{if(L(void 0),E(e),A(e),P(),!e.noOfDays)return void g(e);const t=new Date,o=new Date;o.setDate(t.getDate()-e.noOfDays),g(Object.assign(Object.assign({},e),{selectedRange:[o,t]}))}})},null==t?void 0:t.key)}))})),e.jsx(o.Dropdown.Menu,Object.assign({className:"sub--dropdown",popperConfig:{modifiers:[{name:"offset",options:{offset:[(null==O?void 0:O.offsetSkid)||0,(null==O?void 0:O.offsetDistance)||0]}}]}},{children:e.jsx(n.DatePicker,{selectRange:(null===(x=null==R?void 0:R.dateRangeSelectionOptions)||void 0===x?void 0:x.selectRange)||!1,maxDate:null===(f=null==R?void 0:R.dateRangeSelectionOptions)||void 0===f?void 0:f.maxDate,minDate:null===(k=null==R?void 0:R.dateRangeSelectionOptions)||void 0===k?void 0:k.minDate,selectedDates:I,onSelectRange:(e,t)=>{const o=[e,t];(null==R?void 0:R.dateRangeSelectionOptions)&&(R.dateRangeSelectionOptions.selectedDates=o,g(Object.assign(Object.assign({},R),{selectedRange:[e,t]}))),A(R),C(!1),L(o),q(!F)},onSelectDate:e=>{(null==R?void 0:R.dateRangeSelectionOptions)&&(R.dateRangeSelectionOptions.selectedDates=[e,e],g(Object.assign(Object.assign({},R),{selectedRange:[e,e]}))),A(R),C(!1),L([e,e]),q(!F)}})}))]}))}))]}))})},exports.EachItem=a,exports.formatDate=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/styled/base"),r=require("react/jsx-runtime");require("@amplitude/analytics-browser"),require("../../../../amplitude/model.js");var i=require("../../../../utils/StringUtils.js"),t=require("../../../../constants/Theme.js");require("../../../../constants/zindex.js");var s=require("react");require("../../../checkBox/CheckBox.styled.js");var g=require("../../../TypographyStyle.js");require("../../../list-item/ListItem.js"),require("../../../pagination/Pagination.js"),require("../../../radioButton/RadioButton.styled.js"),require("react-dom"),require("react-toastify"),require("../../../button/Button.js"),require("../../../toaster/Toaster.styled.js"),require("../../../tooltips/Tooltip.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("../../../curtain/CurtainHelper.js"),require("../../../variable-picker-v3/model.js"),require("../../../template-preview/models/TemplateMeta.js"),require("../../../template-preview/models/WhatsAppTemplate.js"),require("../../../template-preview/models/Channels.js"),require("lodash"),require("../../../modals/styledModal.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("../../../../_virtual/_tslib.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("../../../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("../../../progress-bar-v2/ProgressBarV2.js"),require("../../../QueryBuilder/QueryBuilder.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),require("../../../QueryBuilder/constants/connectorPosition.js"),require("../../../QueryBuilder/constants/connector.js"),require("../../../QueryBuilder/types/QueryBuilder.type.js"),require("../../../dropdown/Dropdown.js"),require("../../../QueryBuilder/components/InputLoader.js"),require("../../../QueryBuilder/components/Connectors/Components/EmojiPicker.js"),require("react-chips"),require("../../../input/ChipInput.styled.js"),require("../../../QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js"),require("../../../QueryBuilder/components/Connectors/Components/IgPicker.js"),require("../../../QueryBuilder/components/Connectors/Components/InTheLast.js"),require("../../../QueryBuilder/components/Connectors/Components/InTwoLast.js"),require("react-calendar"),require("../../../../utils/DateUtils.js"),require("../../../datePicker/DatePickerWrapper.styled.js"),require("../../../QueryBuilder/components/Connectors/Connector.styled.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.styled.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.styled.js"),require("../../../QueryBuilder/redux/queryBuilder.reducer.js"),require("../../../QueryBuilder/redux/queryBuilderCache.reducer.js"),require("../../../QueryBuilder/types/QueryBuilderOperator.type.js"),require("../../../dropdown/DropdownPopover/index.js"),require("../../../dropdown/ChipDropdown.js"),require("../../../dropdown/MenuItem/MenuItem.js"),require("../../../shimmer/ShimmerComponent/ShimmerStyled.js"),require("../../../analytics-card/AnalyticsCard.styled.js"),require("../../CommonStyles.js"),require("../../../datePicker/DatePicker.styled.js"),require("../../AnalyticsMetric.js"),require("../LineChart/LineChart.js"),require("../linearChipGroupedChart/LinearChipGroupedChart.styled.js");var I=require("./PieChart.js");require("../HorizontalBarGraph/HorizontalGraph.js"),require("../StackedBarChart/StackedBarChart.js"),require("../StackedBarChart/StackedBarDistributionChart.js"),require("../StackedBarChart/StackedBarDistributionChart.model.js"),require("../VerticalBarGraph/VerticalGraph.js"),require("../VerticalBarGraph/FunnelVerticalBarGraph.js"),require("../heatmap/HeatMap.js"),require("../heatmap/HeatMapVertical.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("../../../switch/Switch.js"),require("../../../plans/SubscriptionPlanStyled.js"),require("../../../plans/SubscriptionPlanSelector.js"),require("../../../plans/SubscriptionPlansCollected.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("../../../navigation-hyperlink/NavigationHyperlink.js"),require("../../../bik-layout/SidebarStyles.js"),require("date-fns"),require("react-popper"),require("../../../dropdown/Common.styled.js"),require("../../../custom-date-time/CustomDateTime.styled.js"),require("../../../../node_modules/lodash.debounce/index.js"),require("../../../product-picker/ProductPicker.styled.js"),require("../../../discount-modal/type.js"),require("../../../product-picker-v2/modal.js"),require("../../../modals/modal.styled.js"),require("../../../variable-picker-v3/NoResult.js"),require("../../../variable-picker-v3/styles.js"),require("../../../discount-modal/DiscountModal.styled.js"),require("../../../discount-modal/DynamicCoupon/DynamicCoupon.js"),require("../../../country-code-picker/CountryCodePicker.styled.js"),require("../../../carousel/carousel.js"),require("../../../carousel-secondary/CarouselSecondary.style.js"),require("../../../access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.styles.js"),require("../../../radioList/RadioList.styled.js"),require("../../../checkList/CheckList.styled.js"),require("../../../postPicker/postPicker.js"),require("../../../dropdown-button/DropdownButton.style.js"),require("../../../side-modal/SideModal.style.js"),require("../../../add-variableV2/AddVariableV2.styled.js"),require("../../../SearchFilter/types/SearchFilter.type.js"),require("../../../SearchFilter/components/DatePickerButton.js"),require("../../../SearchFilter/components/DateRangeOnlyButton.js"),require("../../../input-with-vars/InputWithVariables.js"),require("../../../star-rating/StarRating.js"),require("../../../dashboard-review-popup/components/FiveStar.styled.js"),require("../../../dashboard-review-popup/components/Form.styled.js"),require("../../../dashboard-review-popup/components/ZeroState.js"),require("../../../dashboard-review-popup/DashboardReviewPopUp.styled.js"),require("../../../testimonial-card/TestimonialCard.style.js"),require("../../../slider/slider.js"),require("react-slick"),require("../../../carousel-preview/CarouselPreview.style.js"),require("../../../card-selector/CardSelector.styled.js"),require("../../../action-button/ActionButton.styled.js"),require("../../../floating-input-dropdown/FloatingInputDropdown.js"),require("../../../dropdown/MultilevelDropdownPopover/index.js");var o=require("chart.js"),C=require("react-chartjs-2");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(e);o.Chart.register(o.ArcElement,o.Legend);const l={plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:e=>{if(!e.label)return" 0%";const r=e.dataset.data.reduce(((e,r)=>e+r),0),i=parseFloat((e.raw/r*100).toFixed(1));return` ${e.label}: ${i}%`}}}}},u=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],d=c.default("div","production"===process.env.NODE_ENV?{target:"elaov7f0"}:{target:"elaov7f0",label:"CartStyled"})("background:",(e=>t.COLORS.surface.standard),";border:1px solid ",(e=>t.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:t,slices:o,size:a}=e;const[c,d]=s.useState([]),[n,A]=s.useState();return s.useEffect((()=>{const e=o.reduce(((e,r)=>e+r.count),0);let r=[];if(r=Object.keys(o).map(((e,r)=>Object.assign({color:u[r%u.length]},o[e]))),d([...r]),0===e){A({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}]})}else{const e={labels:o.map((e=>i.default.capitalize(e.name))),datasets:[{data:o.map((e=>e.count)),backgroundColor:o.map(((e,r)=>{var i;return null!==(i=e.color)&&void 0!==i?i:u[r%u.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};A(e)}}),[o]),n?r.jsxs(r.Fragment,{children:[t&&r.jsx(g.TitleMedium,Object.assign({style:{marginBottom:16}},{children:t})),r.jsxs("div",Object.assign({className:"row"},{children:[r.jsx("div",Object.assign({className:"col-6"},{children:r.jsx("div",Object.assign({style:{width:a,height:a}},{children:r.jsx(C.Doughnut,{data:n,options:Object.assign(Object.assign({},l),{maintainAspectRatio:!a})})}))})),r.jsx("div",Object.assign({className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"center"}},{children:r.jsx(I.PieChart,{slices:c})}))]}))]}):r.jsx(r.Fragment,{})};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/styled/base"),r=require("react/jsx-runtime");require("@amplitude/analytics-browser"),require("../../../../amplitude/model.js");var i=require("../../../../utils/StringUtils.js"),t=require("../../../../constants/Theme.js");require("../../../../constants/zindex.js");var s=require("react");require("../../../checkBox/CheckBox.styled.js");var g=require("../../../TypographyStyle.js");require("../../../list-item/ListItem.js"),require("../../../pagination/Pagination.js"),require("../../../radioButton/RadioButton.styled.js"),require("react-dom"),require("react-toastify"),require("../../../button/Button.js"),require("../../../toaster/Toaster.styled.js"),require("../../../tooltips/Tooltip.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("../../../curtain/CurtainHelper.js"),require("../../../variable-picker-v3/model.js"),require("../../../template-preview/models/TemplateMeta.js"),require("../../../template-preview/models/WhatsAppTemplate.js"),require("../../../template-preview/models/Channels.js"),require("lodash"),require("../../../modals/styledModal.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("../../../../_virtual/_tslib.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("../../../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("../../../progress-bar-v2/ProgressBarV2.js"),require("../../../QueryBuilder/QueryBuilder.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),require("../../../QueryBuilder/constants/connectorPosition.js"),require("../../../QueryBuilder/constants/connector.js"),require("../../../QueryBuilder/types/QueryBuilder.type.js"),require("../../../dropdown/Dropdown.js"),require("../../../QueryBuilder/components/InputLoader.js"),require("../../../QueryBuilder/components/Connectors/Components/EmojiPicker.js"),require("react-chips"),require("../../../input/ChipInput.styled.js"),require("../../../QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js"),require("../../../QueryBuilder/components/Connectors/Components/IgPicker.js"),require("../../../QueryBuilder/components/Connectors/Components/InTheLast.js"),require("../../../QueryBuilder/components/Connectors/Components/InTwoLast.js"),require("react-calendar"),require("../../../../utils/DateUtils.js"),require("../../../datePicker/DatePickerWrapper.styled.js"),require("../../../QueryBuilder/components/Connectors/Connector.styled.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.styled.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.styled.js"),require("../../../QueryBuilder/redux/queryBuilder.reducer.js"),require("../../../QueryBuilder/redux/queryBuilderCache.reducer.js"),require("../../../QueryBuilder/types/QueryBuilderOperator.type.js"),require("../../../dropdown/DropdownPopover/index.js"),require("../../../dropdown/ChipDropdown.js"),require("../../../dropdown/MenuItem/MenuItem.js"),require("../../../shimmer/ShimmerComponent/ShimmerStyled.js"),require("../../../analytics-card/AnalyticsCard.styled.js"),require("../../CommonStyles.js"),require("../../../datePicker/DatePicker.styled.js"),require("../../AnalyticsMetric.js"),require("../LineChart/LineChart.js"),require("../linearChipGroupedChart/LinearChipGroupedChart.styled.js");var I=require("./PieChart.js");require("../HorizontalBarGraph/HorizontalGraph.js"),require("../StackedBarChart/StackedBarChart.js"),require("../StackedBarChart/StackedBarDistributionChart.js"),require("../StackedBarChart/StackedBarDistributionChart.model.js"),require("../VerticalBarGraph/VerticalGraph.js"),require("../VerticalBarGraph/FunnelVerticalBarGraph.js"),require("../heatmap/HeatMap.js"),require("../heatmap/HeatMapVertical.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("../../../switch/Switch.js"),require("../../../plans/SubscriptionPlanStyled.js"),require("../../../plans/SubscriptionPlanSelector.js"),require("../../../plans/SubscriptionPlansCollected.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("../../../navigation-hyperlink/NavigationHyperlink.js"),require("../../../bik-layout/SidebarStyles.js"),require("date-fns"),require("react-popper"),require("../../../dropdown/Common.styled.js"),require("../../../custom-date-time/CustomDateTime.styled.js"),require("../../../../node_modules/lodash.debounce/index.js"),require("../../../product-picker/ProductPicker.styled.js"),require("../../../discount-modal/type.js"),require("../../../product-picker-v2/modal.js"),require("../../../modals/modal.styled.js"),require("../../../variable-picker-v3/NoResult.js"),require("../../../variable-picker-v3/styles.js"),require("../../../discount-modal/DiscountModal.styled.js"),require("../../../discount-modal/DynamicCoupon/DynamicCoupon.js"),require("../../../country-code-picker/CountryCodePicker.styled.js"),require("../../../carousel/carousel.js"),require("../../../carousel-secondary/CarouselSecondary.style.js"),require("../../../access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.styles.js"),require("../../../radioList/RadioList.styled.js"),require("../../../checkList/CheckList.styled.js"),require("../../../postPicker/postPicker.js"),require("../../../dropdown-button/DropdownButton.style.js"),require("../../../side-modal/SideModal.style.js"),require("../../../add-variableV2/AddVariableV2.styled.js"),require("../../../SearchFilter/types/SearchFilter.type.js"),require("../../../SearchFilter/components/DatePickerButton.js"),require("../../../SearchFilter/components/DateRangeOnlyButton.js"),require("../../../input-with-vars/InputWithVariables.js"),require("../../../star-rating/StarRating.js"),require("../../../dashboard-review-popup/components/FiveStar.styled.js"),require("../../../dashboard-review-popup/components/Form.styled.js"),require("../../../dashboard-review-popup/components/ZeroState.js"),require("../../../dashboard-review-popup/DashboardReviewPopUp.styled.js"),require("../../../testimonial-card/TestimonialCard.style.js"),require("../../../slider/slider.js"),require("react-slick"),require("../../../carousel-preview/CarouselPreview.style.js"),require("../../../card-selector/CardSelector.styled.js"),require("../../../action-button/ActionButton.styled.js");var C=require("chart.js"),o=require("react-chartjs-2");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(e);C.Chart.register(C.ArcElement,C.Legend);const l={plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:e=>{if(!e.label)return" 0%";const r=e.dataset.data.reduce(((e,r)=>e+r),0),i=parseFloat((e.raw/r*100).toFixed(1));return` ${e.label}: ${i}%`}}}}},u=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],d=c.default("div","production"===process.env.NODE_ENV?{target:"elaov7f0"}:{target:"elaov7f0",label:"CartStyled"})("background:",(e=>t.COLORS.surface.standard),";border:1px solid ",(e=>t.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:t,slices:C,size:a}=e;const[c,d]=s.useState([]),[A,n]=s.useState();return s.useEffect((()=>{const e=C.reduce(((e,r)=>e+r.count),0);let r=[];if(r=Object.keys(C).map(((e,r)=>Object.assign({color:u[r%u.length]},C[e]))),d([...r]),0===e){n({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}]})}else{const e={labels:C.map((e=>i.default.capitalize(e.name))),datasets:[{data:C.map((e=>e.count)),backgroundColor:C.map(((e,r)=>{var i;return null!==(i=e.color)&&void 0!==i?i:u[r%u.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};n(e)}}),[C]),A?r.jsxs(r.Fragment,{children:[t&&r.jsx(g.TitleMedium,Object.assign({style:{marginBottom:16}},{children:t})),r.jsxs("div",Object.assign({className:"row"},{children:[r.jsx("div",Object.assign({className:"col-6"},{children:r.jsx("div",Object.assign({style:{width:a,height:a}},{children:r.jsx(o.Doughnut,{data:A,options:Object.assign(Object.assign({},l),{maintainAspectRatio:!a})})}))})),r.jsx("div",Object.assign({className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"center"}},{children:r.jsx(I.PieChart,{slices:c})}))]}))]}):r.jsx(r.Fragment,{})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("../../assets/icons/Bik_logo.svg.js"),n=require("react"),t=require("../progress-bar/CircularProgressBar.js"),o=require("../../constants/Theme.js"),s=require("../navigation-hyperlink/NavigationHyperlink.js"),l=require("./SidebarPopup.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("../../assets/icons/Bik_logo.svg.js"),n=require("react"),t=require("../progress-bar/CircularProgressBar.js"),o=require("../../constants/Theme.js"),s=require("../navigation-hyperlink/NavigationHyperlink.js"),l=require("./SidebarPopup.js"),d=require("./SidebarStyles.js"),r=require("./SimpleSidebar.js");const a=i=>{const{icon:n,isActive:t,activeStateIcon:s,hoverStateIcon:l,isHovered:d}=i,r=n,a=s,u=l;return e.jsx(e.Fragment,{children:t?e.jsx(a,{width:20,height:20}):d?e.jsx(u,{width:20,height:20,color:o.COLORS.surface.standard}):e.jsx(r,{width:20,height:20,color:o.COLORS.surface.standard})})};exports.BikSidebar=o=>{const{logoSvg:u,allMenuList:c,activeMainMenu:v,activeSubMenu:g,router:m,onClickingMainMenu:h,onClickingSubMenu:p,onClickingAccessUpgradePanel:y,onClickingPopupMenuItem:j,popupMinHeight:k,isNewSidebar:b}=o,[S,x]=n.useState(v),[w,f]=n.useState(),[N,M]=n.useState(g),[O,C]=n.useState(!1),[L,B]=n.useState(),[E,I]=n.useState(),[P,q]=n.useState(),_=c.filter((e=>e.is2ndLastSticky||e.isLastSticky)).length;n.useEffect((()=>{x(v)}),[v]),n.useEffect((()=>{M(g)}),[g]);const H=e=>{var i,n;if(f(void 0),B(void 0),"popup"==(null==e?void 0:e.layout)){const i=F();i&&I(i),B(e)}else{const t=document.getElementById((null===(n=null===(i=e.displayName)||void 0===i?void 0:i.split(" "))||void 0===n?void 0:n.join(""))||e.key.toString());if(t){const e=A(t);q(e)}f(e)}},A=e=>{const i=e.getBoundingClientRect();let n=i.top;const t=e.querySelectorAll("div");let o=null;if(t.forEach((e=>{e.className.includes("sticky")&&(o=e)})),o){const e=window.innerHeight-i.bottom;n=i.top+e-140}return n},R=(i,n)=>{var t,o,s,l,d,r;return e.jsxs("div",Object.assign({id:(null===(o=null===(t=i.displayName)||void 0===t?void 0:t.split(" "))||void 0===o?void 0:o.join(""))||i.key.toString(),className:"main--sidebar",onClick:()=>(e=>{var i;"popup"!==(null==e?void 0:e.layout)&&(B(void 0),f(void 0),C(!0),x(e),!e.path&&h(e),(null===(i=null==e?void 0:e.children)||void 0===i?void 0:i.length)?M(null==e?void 0:e.children[0]):M({}),f(void 0),setTimeout((()=>{C(!1)}),1e3))})(i),onMouseEnter:()=>{!O&&H(i)},onMouseOver:()=>{!O&&H(i)},onMouseLeave:()=>{var e;(null===(e=null==i?void 0:i.children)||void 0===e?void 0:e.length)||(f(void 0),B(void 0))},onFocus:()=>{console.log(";")},"aria-hidden":"true"},{children:[i.isNew&&e.jsx("div",Object.assign({className:"new-tag "+(i.isLastSticky?"tag-sticky":"")},{children:"NEW"})),e.jsxs("div",Object.assign({id:(null===(l=null===(s=i.displayName)||void 0===s?void 0:s.split(" "))||void 0===l?void 0:l.join(""))+"_sub"||i.key.toString()+"_sub",className:`sidebar-menu-item \n\t\t\t\t\t${(null==S?void 0:S.key)===i.key?"main-menu-active-class":""} \n\t\t\t\t\t${i.isLastSticky?"sticky-menu-int":""} \n\t\t\t\t\t${i.is2ndLastSticky?"sticky-menu":""} \n\t\t\t\t\t${i.key===(null==w?void 0:w.key)?"sidebar-menu-item-hover":""} \n\t\t\t\t\t${i.isNew?"new-menu-item":""}`},{children:[e.jsx(a,{icon:i.icon,isActive:i.key==(null==S?void 0:S.key),activeStateIcon:null!==(d=i.activeIcon)&&void 0!==d?d:{},hoverStateIcon:null!==(r=i.hoverIcon)&&void 0!==r?r:{},isHovered:i.key==(null==w?void 0:w.key)||i.key==(null==L?void 0:L.key)}),e.jsx("div",Object.assign({className:"menu-item-container"},{children:e.jsx("p",Object.assign({className:"menu-item-text "+((null==i?void 0:i.key)===(null==S?void 0:S.key)?"active-menu-item-text":"")},{children:i.displayName}))}))]}),n)]}),n)};n.useEffect((()=>{const e=()=>{const e=F();e&&I(e),$()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const $=()=>{const e=document.getElementById("_sub-menu"),i=null==e?void 0:e.getBoundingClientRect().height;i&&q(window.innerHeight-i)},F=()=>{var e,i;if(L){const n=(null===(i=null===(e=L.displayName)||void 0===e?void 0:e.split(" "))||void 0===i?void 0:i.join(""))+"_sub"||L.key.toString()+"_sub",t=document.getElementById(n);if(t){const e=t.getBoundingClientRect();let i=e.top;const n=null!=k?k:320;return e.bottom+n>window.innerHeight&&(i-=e.bottom+n-window.innerHeight),i}return null}};return e.jsxs(d.SideBarContainer,{children:[e.jsx("div",Object.assign({className:"bik-header-logo",onClick:()=>{},onKeyDown:()=>{},"aria-hidden":"true"},{children:u||e.jsx(i.default,{})})),e.jsxs(d.SibeBarMenuItem,{children:[null==c?void 0:c.map(((i,t)=>{var o,d;return e.jsxs(n.Fragment,{children:[i.path?e.jsx(s.NavigationHyperlink,Object.assign({href:i.path,router:m},{children:R(i,t)})):R(i,t),e.jsxs(e.Fragment,{children:["popup"===i.layout&&(null===(o=null==L?void 0:L.children)||void 0===o?void 0:o.length)&&e.jsx(l.SidebarPopup,{top:null!=E?E:void 0,menuList:null==L?void 0:L.children,onClickingPopupMenu:e=>{j&&j(e),B(void 0)},onMouseLeaveOnMenu:()=>B(void 0)}),(null===(d=null==w?void 0:w.children)||void 0===d?void 0:d.length)&&e.jsx(r.SimpleSidebar,{menuList:null==w?void 0:w.children,activeMenu:N,onMouseLeaveOnMenu:()=>f(void 0),left:b?92:88,postion:"fixed",header:w.displayName,theme:"brand",router:m,showAccessUpgradePanel:w.showAccessUpgradePanel,onMenuClick:(e,i)=>{M(e),x(w),f(void 0),B(void 0),i&&p(e)},onUpgrade:y,top:b&&P||0,isNewSidebar:b})]})]},t)})),"number"==typeof o.onboardingPercentage&&e.jsx("div",Object.assign({className:"main--sidebar"},{children:e.jsx("div",Object.assign({id:"bik-onboarding__checklist",className:"sidebar-menu-item "+(0===_?"sticky-menu":1===_?"sticky-menu-int":"sticky-menu-three")},{children:e.jsx(t.default,{percentage:o.onboardingPercentage,width:48})}))}))]})]})};
|
|
@@ -21,7 +21,6 @@ export interface SimpleSidebarProps {
|
|
|
21
21
|
top?: number;
|
|
22
22
|
router: any;
|
|
23
23
|
onMouseLeaveOnMenu?: () => void;
|
|
24
|
-
onMouseEnterOnMenu?: () => void;
|
|
25
24
|
onMenuClick: (menuSelected: Menu, reDirect?: boolean) => void;
|
|
26
25
|
onUpgrade?: () => void;
|
|
27
26
|
isNewSidebar?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),i=require("../../constants/Theme.js"),a=require("../button/Button.js"),n=require("../navigation-hyperlink/NavigationHyperlink.js"),t=require("../TypographyStyle.js"),r=require("./SidebarStyles.js");exports.SimpleSidebar=l=>{const{menuList:d,activeMenu:c,theme:o,showAccessUpgradePanel:u=!1,header:h,width:p,zIndex:b,left:j,postion:m,top:v,router:g,onMouseLeaveOnMenu:y,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),i=require("../../constants/Theme.js"),a=require("../button/Button.js"),n=require("../navigation-hyperlink/NavigationHyperlink.js"),t=require("../TypographyStyle.js"),r=require("./SidebarStyles.js");exports.SimpleSidebar=l=>{const{menuList:d,activeMenu:c,theme:o,showAccessUpgradePanel:u=!1,header:h,width:p,zIndex:b,left:j,postion:m,top:v,router:g,onMouseLeaveOnMenu:y,onMenuClick:x,onUpgrade:N,isNewSidebar:S}=l,[k,O]=s.useState(c),w=(s,i)=>e.jsxs("div",Object.assign({className:"sub-child-menu "+((null==k?void 0:k.key)==(null==s?void 0:s.key)?"sub-child-active-menu":""),onClick:()=>{O(s),x(s,!s.page)},"aria-hidden":"true"},{children:[e.jsx("span",{className:(null==k?void 0:k.key)==(null==s?void 0:s.key)&&"brand"==o?"sub-child-active-text":""}),e.jsx(t.BodySecondary,Object.assign({className:"sub-child-text "+((null==k?void 0:k.key)==(null==s?void 0:s.key)&&"white"==o?"active-bold-weight":"")},{children:null==s?void 0:s.displayName})),s.isNew&&e.jsx("div",Object.assign({className:"sub-child-new-tag"},{children:"NEW"}))]}),i);return e.jsx(r.SimpleSidebarContainer,Object.assign({width:p,zIndex:b,left:j,theme:o,postion:m,top:v,isNewSidebar:S},{children:e.jsxs("div",Object.assign({id:"_sub-menu",className:"sidebar-right-menu transform-class",onMouseLeave:y},{children:[e.jsxs("div",{children:[!S&&e.jsx(t.BodySecondary,Object.assign({className:"sub-child-display-name"},{children:h})),null==d?void 0:d.map(((s,i)=>s.page?e.jsx(n.NavigationHyperlink,Object.assign({href:s.page,router:g},{children:w(s,i)})):w(s,i)))]}),u&&e.jsxs("div",Object.assign({className:"lower-sticky-panel"},{children:[e.jsx(t.TitleSmall,Object.assign({className:"title-text",style:{color:i.COLORS.surface.standard}},{children:"Upgrade plan to access this feature."})),e.jsx(a.Button,{className:"upgrade-button",buttonText:"Upgrade plan",buttonType:"primary",size:"small",inverse:!0,onClick:()=>N?N():""})]}))]}),"_sub-menu")}))};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export declare const OverLapAbs: import("styled-components").StyledComponent<"div", any, {
|
|
2
2
|
disabled?: boolean | undefined;
|
|
3
|
-
allowEvents?: boolean | undefined;
|
|
4
3
|
}, never>;
|
|
5
4
|
export declare const OpenDropdownContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
5
|
export declare const LoadingContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../../constants/Theme.js");function
|
|
2
|
-
position:
|
|
3
|
-
// if allowEvents is true, then position is relative, else position is absolute
|
|
4
|
-
${e=>(null==e?void 0:e.allowEvents)?"relative":"absolute"};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../../constants/Theme.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=r(e);const o=i.default.div`
|
|
2
|
+
position: absolute;
|
|
5
3
|
left: 0px;
|
|
6
4
|
top: 0px;
|
|
7
5
|
width: 100%;
|
|
8
6
|
height: 100%;
|
|
9
7
|
z-index: 2;
|
|
10
8
|
cursor: ${e=>(null==e?void 0:e.disabled)?"not-allowed":"pointer"};
|
|
11
|
-
`,p=
|
|
9
|
+
`,p=i.default.div`
|
|
12
10
|
margin-top: 8px;
|
|
13
11
|
margin-bottom: 8px;
|
|
14
|
-
`;
|
|
12
|
+
`;i.default.div`
|
|
15
13
|
display: flex;
|
|
16
14
|
flex-direction: row;
|
|
17
15
|
align-items: center;
|
|
@@ -19,7 +17,7 @@
|
|
|
19
17
|
background: ${t.COLORS.surface.hovered};
|
|
20
18
|
border: 1px solid ${t.COLORS.stroke.primary};
|
|
21
19
|
border-radius: 4px;
|
|
22
|
-
`;const
|
|
20
|
+
`;const d=i.default.div`
|
|
23
21
|
width: 360px;
|
|
24
22
|
height: 100%;
|
|
25
23
|
padding: 8px;
|
|
@@ -34,4 +32,4 @@
|
|
|
34
32
|
flex-wrap: wrap;
|
|
35
33
|
align-items: center;
|
|
36
34
|
}
|
|
37
|
-
`;exports.ChipInputWrapper=
|
|
35
|
+
`;exports.ChipInputWrapper=d,exports.OpenDropdownContainer=p,exports.OverLapAbs=o;
|
|
@@ -10,7 +10,6 @@ export declare const DropdownPopover: React.ForwardRefExoticComponent<OpenDropdo
|
|
|
10
10
|
tooltipContent?: string | undefined;
|
|
11
11
|
tooltipDirection?: Placement | undefined;
|
|
12
12
|
showTooltipArrow?: boolean | undefined;
|
|
13
|
-
allowEvents?: boolean | undefined;
|
|
14
13
|
} & React.RefAttributes<{
|
|
15
14
|
openDropdown: boolean;
|
|
16
15
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),o=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),o=require("react/jsx-runtime"),r=require("react"),t=require("react-popper"),n=require("../../dropShadow/DropShadow.js"),l=require("../../tooltips/Tooltip.js"),i=require("../Common.styled.js"),s=require("../OpenedDropdown/components/OpennedDropdown.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const p=d(r).default.forwardRef(((d,p)=>{var{children:a,onDropdownVisbilityChange:c,version:u="1.0",tooltipContent:v,tooltipDirection:j,showTooltipArrow:w}=d,b=e.__rest(d,["children","onDropdownVisbilityChange","version","tooltipContent","tooltipDirection","showTooltipArrow"]);const f=p,[h,D]=r.useState(!1),[O,g]=r.useState(null),[x,y]=r.useState(null),m=r.useRef(null),{styles:S,attributes:C}=t.usePopper(O,x,{placement:b.placement,strategy:b.strategy}),q=e=>{var o,r;"2.0"===u&&b.isMultiSelect&&e&&(null===(o=b.onSelect)||void 0===o||o.call(b,[...e])),D(!1),null===(r=null==b?void 0:b.onClose)||void 0===r||r.call(b)};r.useImperativeHandle(f,(()=>({openDropdown:h})),[]),r.useEffect((()=>{(null==f?void 0:f.current)&&(f.current.openDropdown=h)}),[h]),r.useEffect((()=>{null==c||c(h)}),[h]);const _=()=>o.jsxs(o.Fragment,{children:[o.jsxs("div",Object.assign({style:{position:"relative"},ref:g},{children:[o.jsx(i.OverLapAbs,{ref:m,disabled:b.disabled,onClick:e=>{var o;null===(o=b.onDropdownOpen)||void 0===o||o.call(b),h?(D(!1),e.preventDefault()):b.disabled||D(!0)}}),a]})),h&&o.jsx(i.OpenDropdownContainer,Object.assign({ref:y,style:Object.assign(Object.assign({},S.popper),{zIndex:3})},C.popper,{children:o.jsx(n.default,Object.assign({level:"z2",position:"down",style:{borderRadius:8}},{children:o.jsx(s.OpenedDropdown,Object.assign({},b,{onSelect:e=>{var o;"2.0"===u&&b.isMultiSelect||(null===(o=b.onSelect)||void 0===o||o.call(b,e),D(!1))},onClose:q,version:u,headerRef:m}))}))}))]});return o.jsx(o.Fragment,{children:h||void 0===v?_():o.jsx(l.Tooltip,Object.assign({body:v,placement:j,hideArrow:!w},{children:o.jsx("div",{children:_()})}))})}));p.displayName="DropdownPopover",exports.DropdownPopover=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("../../../zeroState/ZeroState.js"),r=require("../../../../hooks/useOutside.js"),o=require("../../hooks/useDropdown.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("../../../zeroState/ZeroState.js"),r=require("../../../../hooks/useOutside.js"),o=require("../../hooks/useDropdown.js"),i=require("./description/Description.js"),s=require("./menu/FreeFormMenu.js"),l=require("./menu/MenuList.js"),u=require("./menu/SelectAllMenu.js"),c=require("./multiSelect/MultiSelectDropdownBottomBar.js"),a=require("./OpennedDropdown.styled.js"),d=require("./searchbox/SearchBox.js"),p=require("./searchbox/SearchZeroState.js");const h=304,S=290;exports.OpenedDropdown=j=>{let{options:f,isSearchable:x,isMultiSelect:g,width:b,allowFreeForm:w,height:v,onClose:m,onSelect:O,onSearch:y,version:M,skipSorting:q,headerRef:C,hideSelectAll:D,primaryButtonText:L,onInfiniteScroll:F,onMultiSelectClear:k,onDropdownItemClick:A,buttonOptions:B,isSearchLoading:I,disableSearchOptions:H,disableSearchedOptionExcept:Z}=j;const{dropdownOptions:R,search:T,searchedString:E,searchedOptions:P,onApplyHandler:_,selectAllHandler:z,onMultiSelectClear:K,onFreeFormSelect:N,onMultiSelectApply:W,latestDropdownOptionsRef:G,getSelectedOptions:J}=o.useDropdown(M,f,O,q,g,y,H,Z),[Q,U]=t.useState(null!=b?b:S),[V,X]=t.useState(null),Y=t.useRef(null);r.useOutside(Y,(()=>{if(X(null),g&&"2.0"===M){const e=J(G.current);null==m||m(e)}else null==m||m(R)}),[C]);const $=null!=v?v:h,ee="number"==typeof $?x&&g?$-96:x&&!g||!x&&g?$-48:$:$;t.useEffect((()=>{const e=null!=b?b:S;if(null===V)U(e);else if("number"==typeof e)U(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));U(t)}}),[V]);const te=[],ne=(E&&y?P:R).map((e=>{var t,n;if(E&&!y){if(e.options){const t=Object.assign({},e);return t.options=t.options.filter((e=>{var t;return!!(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(E.toLowerCase()))&&(te.push(!E||e.label===E),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(E.toLowerCase()))||(null===(n=e.searchKey)||void 0===n?void 0:n.toLowerCase().includes(E.toLowerCase()))?(te.push(!E||e.label===E),e):null}return e})).filter((e=>null!==e)),re=!!x&&E&&0===ne.length;return e.jsxs(a.OpennedDropdownContainer,Object.assign({version:M,ref:Y,style:{width:Q}},{children:[e.jsxs("div",Object.assign({style:{width:V?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!x&&e.jsx(d.SearchBox,{onSearch:T,version:M}),ne.length||E?e.jsxs(a.MenuListContainer,Object.assign({minHeight:$,maxHeight:ee},{children:[!!g&&!re&&!D&&e.jsx(u.SelectAllMenu,{version:M,options:E&&y?P:R,onSelect:z}),!w&&re&&e.jsx(p.SearchZeroState,{isLoading:I,height:ee,searchedString:E}),w&&(re||!!te.length&&te.every((e=>!1===e)))&&e.jsx(s.FreeFormMenu,{version:M,isMultiSelect:g,onSelect:N,searchedString:E}),e.jsx(l.MenuList,{onInfiniteScroll:F,onDropdownItemClick:A,version:M,onSelect:_,showDescription:function(e,t){X(e&&t?{title:e,description:t}:null)},isMultiSelect:g,options:ne})]})):e.jsx("div",Object.assign({style:{height:$,display:"flex"}},{children:e.jsx(n.ZeroState,{title:"No results found",subTitle:"Please try again later or contact us at support@bik.ai if you require further assistance."})})),!!g&&!(!ne.length&&!E)&&"2.0"!==M&&e.jsx(c.default,{onClear:()=>{K(),null==k||k()},onApply:W,list:E&&y?P:R,buttonText:L,buttonOptions:B})]})),!!V&&e.jsx(i.Description,{title:V.title,description:V.description,version:M})]}))};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { MultiSelectOption, SingleOption } from '../../../type';
|
|
3
3
|
interface MenuItemProps {
|
|
4
4
|
option: SingleOption | MultiSelectOption;
|
|
@@ -9,5 +9,5 @@ interface MenuItemProps {
|
|
|
9
9
|
last?: boolean;
|
|
10
10
|
version?: '1.0' | '2.0';
|
|
11
11
|
}
|
|
12
|
-
export declare const MenuItem:
|
|
12
|
+
export declare const MenuItem: React.FC<MenuItemProps>;
|
|
13
13
|
export {};
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("styled-components"),n=require("../../../../checkBox/CheckBox.js"),i=require("../../../../list-item/ListItem.js"),s=require("../../../../TypographyStyle.js"),r=require("../../../../../constants/Theme.js"),o=require("./FreeFormMenu.styled.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const c=l(t).default(i.ListItem)`
|
|
2
2
|
padding: ${e=>"2.0"===e.version?"8px 12px":"14px 16px"} !important;
|
|
3
3
|
cursor: pointer;
|
|
4
4
|
margin-top: ${e=>"2.0"===e.version?"2px":"0"};
|
|
5
|
-
|
|
6
|
-
box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.12);
|
|
7
|
-
border-radius: ${e=>{let{version:t}=e;return"1.0"===t?"0":"8px"}};
|
|
8
|
-
padding: ${e=>{let{version:t}=e;return"1.0"===t?"0":"4px"}};
|
|
9
|
-
min-width: 148px;
|
|
10
|
-
border: ${e=>{let{version:t}=e;return"1.0"===t?`1px solid ${a.DEFAULT_THEME.colorsV2.stroke.primary}`:"none"}};
|
|
11
|
-
max-height: 248px;
|
|
12
|
-
overflow-y: auto;
|
|
13
|
-
`,g=n.forwardRef(((i,s)=>{let{option:d,isMultiSelect:u,showDescription:g,onSelect:v,last:h,version:j,onDropdownItemClick:m}=i;var b;const[f,y]=n.useState(d.selected),C=(e,t)=>{if(!e.children){I(!e.selected);const n=t?Object.assign(Object.assign({},e),{parent:t}):e;null==m||m(n)}},I=e=>{d.disabled||v(Object.assign(Object.assign({},d),{selected:e}))};return e.jsx(e.Fragment,{children:e.jsx(o.Tooltip,Object.assign({body:"",tooltipContent:d.children?e.jsx("div",Object.assign({style:{backgroundColor:a.DEFAULT_THEME.colorsV2.surface.standard},ref:s,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1)},{children:e.jsx(x,Object.assign({version:null!=j?j:"2.0"},{children:d.children.map((t=>{var n;return e.jsx(p,{version:j,style:(null!==(n=null==d?void 0:d.children)&&void 0!==n?n:[]).length-1?{borderBottom:0}:{},onClick:e=>{e.preventDefault(),C(t,d)},listItem:{value:t.value,label:t.label},subText:t.subText,leadingIcon:t.leadingIcon||void 0,customComponent:t.customComponent,trailingIcon:t.trailingIcon||void 0,variant:d.disabled?"inactive":t.selected?"selected":"default"},t.value)}))}))})):e.jsx(e.Fragment,{}),placement:"right-start",hideArrow:!0},{children:e.jsx(p,{version:j,style:h?{borderBottom:0}:{},onClick:e=>{e.preventDefault(),C(d)},onMouseOver:()=>{d.description?g(d.label,d.description):g()},listItem:{value:d.value,label:d.label},subText:d.subText,leadingIcon:u?e.jsxs("div",Object.assign({style:{display:"flex",alignContent:"center",justifyContent:"center",gap:8}},{children:[e.jsx(r.CheckBox,{size:"2.0"===j?"SMALL":"DEFAULT",isDisabled:null!==(b=d.disabled)&&void 0!==b&&b,isChecked:!!d.selected,onValueChange:I}),e.jsx("div",Object.assign({style:{marginRight:"-4px"}},{children:d.leadingIcon}))]})):d.leadingIcon?e.jsx(e.Fragment,{children:d.leadingIcon}):void 0,customComponent:d.customComponent,trailingIcon:d.isFreeForm?e.jsx(c.FreeFormContainer,{children:e.jsx(l.BodyCaption,Object.assign({style:{color:a.COLORS.content.secondary}},{children:"Freeform"}))}):d.children?e.jsx(t.default,{width:12,height:12}):d.trailingIcon?e.jsx(e.Fragment,{children:d.trailingIcon}):void 0,variant:d.disabled?"inactive":d.selected||!u&&f?"selected":"default"})}))})}));exports.MenuItem=g;
|
|
5
|
+
`;exports.MenuItem=t=>{let{option:i,isMultiSelect:l,showDescription:a,onSelect:d,last:u,version:p,onDropdownItemClick:m}=t;var x;function g(e){i.disabled||d(Object.assign(Object.assign({},i),{selected:e}))}return e.jsx(c,{version:p,style:u?{borderBottom:0}:{},onClick:e=>{e.preventDefault(),g(!i.selected),null==m||m(i)},onMouseOver:function(){i.description?a(i.label,i.description):a()},listItem:{value:i.value,label:i.label},subText:i.subText,leadingIcon:l?e.jsxs("div",Object.assign({style:{display:"flex",alignContent:"center",justifyContent:"center",gap:8}},{children:[e.jsx(n.CheckBox,{size:"2.0"===p?"SMALL":"DEFAULT",isDisabled:null!==(x=i.disabled)&&void 0!==x&&x,isChecked:!!i.selected,onValueChange:g}),e.jsx("div",Object.assign({style:{marginRight:"-4px"}},{children:i.leadingIcon}))]})):i.leadingIcon?e.jsx(e.Fragment,{children:i.leadingIcon}):e.jsx(e.Fragment,{}),customComponent:i.customComponent,trailingIcon:i.isFreeForm?e.jsx(o.FreeFormContainer,{children:e.jsx(s.BodyCaption,Object.assign({style:{color:r.COLORS.content.secondary}},{children:"Freeform"}))}):i.trailingIcon?e.jsx(e.Fragment,{children:i.trailingIcon}):e.jsx(e.Fragment,{}),variant:i.disabled?"inactive":i.selected?"selected":"default"})};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { DropdownOption, SingleOption } from '../../../type';
|
|
3
3
|
interface MenuListProps {
|
|
4
4
|
options: DropdownOption[];
|
|
@@ -9,5 +9,5 @@ interface MenuListProps {
|
|
|
9
9
|
onInfiniteScroll?: () => void;
|
|
10
10
|
onDropdownItemClick?: (option: DropdownOption) => void;
|
|
11
11
|
}
|
|
12
|
-
export declare const MenuList:
|
|
12
|
+
export declare const MenuList: React.FC<MenuListProps>;
|
|
13
13
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=require("./MenuItem.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=require("./MenuItem.js"),s=require("./MenuList.styled.js");exports.MenuList=r=>{let{options:i,isMultiSelect:o,showDescription:l,onSelect:c,version:u,onInfiniteScroll:a,onDropdownItemClick:p}=r;const d=n.useRef(null),j=n.useRef(null),g=n.useCallback((()=>{d.current&&d.current.disconnect(),d.current=new IntersectionObserver((e=>{e[0].isIntersecting&&(null==a||a())})),j.current&&d.current.observe(j.current)}),[a]);return n.useEffect((()=>(g(),()=>{d.current&&d.current.disconnect()})),[g,i]),e.jsx(e.Fragment,{children:i.map(((n,r)=>{const a=r===i.length-1;if(n.options){const i=n;return e.jsxs("div",Object.assign({style:{marginTop:"2.0"===u?2:0}},{children:[e.jsxs(s.StyledGroupedLabel,Object.assign({version:u},{children:[i.leadingIcon?e.jsx("span",Object.assign({style:{marginRight:8}},{children:i.leadingIcon})):e.jsx(e.Fragment,{}),i.label]})),i.options.map(((n,s)=>e.jsx(t.MenuItem,{version:u,last:s===i.options.length-1,onSelect:c,showDescription:l,onDropdownItemClick:p,isMultiSelect:o,option:n},`${r}-${s}`))),a?e.jsx("span",{ref:j}):null]}),r)}return e.jsxs("div",{children:[e.jsx(t.MenuItem,{version:u,last:a,onSelect:c,showDescription:l,onDropdownItemClick:p,isMultiSelect:o,option:n},r),a?e.jsx("span",{ref:j}):null]},r)}))})};
|
|
@@ -13,8 +13,6 @@ export declare function iterateOnOptions(options: DropdownOption[], newVal: Part
|
|
|
13
13
|
customComponent?: JSX.Element | undefined;
|
|
14
14
|
searchKey?: string | undefined;
|
|
15
15
|
selectedLabel?: string | undefined;
|
|
16
|
-
children?: SingleOption[] | undefined;
|
|
17
|
-
parent?: SingleOption | undefined;
|
|
18
16
|
} | {
|
|
19
17
|
label?: string | undefined;
|
|
20
18
|
value?: string | undefined;
|
|
@@ -28,8 +26,6 @@ export declare function iterateOnOptions(options: DropdownOption[], newVal: Part
|
|
|
28
26
|
customComponent?: JSX.Element | undefined;
|
|
29
27
|
searchKey?: string | undefined;
|
|
30
28
|
selectedLabel?: string | undefined;
|
|
31
|
-
children?: SingleOption[] | undefined;
|
|
32
|
-
parent?: SingleOption | undefined;
|
|
33
29
|
options: SingleOption[];
|
|
34
30
|
})[];
|
|
35
31
|
export declare function iterateOnOptionsRaw(options: DropdownOption[], cb: (option: SingleOption) => void): void;
|
|
@@ -20,8 +20,6 @@ export declare const useDropdown: (version: string | undefined, options: Dropdow
|
|
|
20
20
|
customComponent?: JSX.Element | undefined;
|
|
21
21
|
searchKey?: string | undefined;
|
|
22
22
|
selectedLabel?: string | undefined;
|
|
23
|
-
children?: SingleOption[] | undefined;
|
|
24
|
-
parent?: SingleOption | undefined;
|
|
25
23
|
} | {
|
|
26
24
|
label?: string | undefined;
|
|
27
25
|
value?: string | undefined;
|
|
@@ -35,8 +33,6 @@ export declare const useDropdown: (version: string | undefined, options: Dropdow
|
|
|
35
33
|
customComponent?: JSX.Element | undefined;
|
|
36
34
|
searchKey?: string | undefined;
|
|
37
35
|
selectedLabel?: string | undefined;
|
|
38
|
-
children?: SingleOption[] | undefined;
|
|
39
|
-
parent?: SingleOption | undefined;
|
|
40
36
|
options: SingleOption[];
|
|
41
37
|
})[] | undefined;
|
|
42
38
|
selectAllHandler: (newState: SelectAllCheckboxState) => void;
|
|
@@ -46,8 +46,6 @@ export type SingleOption = {
|
|
|
46
46
|
customComponent?: JSX.Element;
|
|
47
47
|
searchKey?: string;
|
|
48
48
|
selectedLabel?: string;
|
|
49
|
-
children?: SingleOption[];
|
|
50
|
-
parent?: SingleOption;
|
|
51
49
|
};
|
|
52
50
|
export type MultiSelectOption = SingleOption;
|
|
53
51
|
export type DropdownOption = MultiSelectOption | SingleOption | GroupedOption;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
type FloaterProps = {
|
|
3
3
|
children?: React.ReactNode;
|
|
4
4
|
refElement: React.MutableRefObject<any>;
|
|
5
5
|
leftOffset?: number;
|
|
6
|
-
topOffset?: number;
|
|
7
|
-
useDefaultOffsets?: boolean;
|
|
8
6
|
};
|
|
9
7
|
export declare const Floater: (props: FloaterProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react");exports.Floater=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react");exports.Floater=n=>{const i=t.useRef(null),[r,s]=t.useState(0),[o,f]=t.useState(0),[l,u]=t.useState(!1);return t.useEffect((()=>{if(n.refElement.current){const e=n.refElement.current.getBoundingClientRect();(e=>{let t=0;t=n.leftOffset?e.left+n.leftOffset:e.left+e.width+30;const r=null==i?void 0:i.current;r?(t>window.innerWidth-r.offsetWidth&&(t=window.innerWidth-r.offsetWidth-50),f(t)):f(t)})(e),(e=>{let t=e.top;const n=null==i?void 0:i.current;if(!n)return void s(t);const r=window.innerHeight;e.top+n.offsetHeight>r&&(t=e.top-(e.top+n.offsetHeight-r)-10),s(t)})(e),u(!0)}})),l?e.jsx("div",Object.assign({style:{top:r,left:o,position:"fixed"}},{children:e.jsx("div",Object.assign({ref:i},{children:n.children}))})):null};
|
|
@@ -62,7 +62,5 @@ export interface InputProps {
|
|
|
62
62
|
labelTextBold?: boolean;
|
|
63
63
|
truncateText?: boolean;
|
|
64
64
|
maxCharLimitPosition?: 'TOP' | 'BOTTOM';
|
|
65
|
-
hightlightInputColor?: string;
|
|
66
|
-
onKeyDownEvent?: (e: Event) => void;
|
|
67
65
|
}
|
|
68
66
|
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement | null>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/info.svg.js"),n=require("react"),i=require("../button/Button.js"),s=require("./Input-helper.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/info.svg.js"),n=require("react"),i=require("../button/Button.js"),s=require("./Input-helper.js"),r=require("../tooltips/Tooltip.js"),l=require("../TypographyStyle.js"),a=require("../../constants/Theme.js"),o=require("../../assets/icons/errorInfo.svg.js"),c=require("./context/InputStyleProvider.js"),u=require("./Input.styled.js");const d=n.forwardRef(((d,h)=>{var v,x,p,g,j,f,b;const{placeholder:m,leftIcon:y,rightIcon:C,labelText:O,maxCharLimit:T,isRequired:I,hintText:S,type:w,state:E,validate:k,variant:q,button:H,suffixText:L,prefixText:B,onChangeText:M,value:F,noErrorHint:P,reset:R,rangeValidation:z,noKeyDownChange:A,version:D,noMaxCharCheck:N,labelElement:_,autoGrow:K,minHeight:G,maxHeight:W,labelTextBold:V,truncateText:$,maxCharLimitPosition:J}=Object.assign({maxCharLimit:0,type:"text",variant:"default",maxCharLimitPosition:"TOP"},d),Q=null==y?void 0:y.icon,U=null==C?void 0:C.icon,[X,Y]=n.useState(!1),[Z,ee]=n.useState(!1),[te,ne]=n.useState(),ie="small"===q?"18px":"22px",se=n.useContext(c.InputStyleContext),[re,le]=n.useState(),ae=n.useRef(null),oe=null!=h?h:ae;n.useEffect((()=>{le(F),!F&&K&&(oe.current.style.height=G||"48px")}),[F]),n.useEffect((()=>{var e;oe.current&&(null===(e=d.onReferenceInit)||void 0===e||e.call(d,oe.current))}),[oe]),n.useEffect((()=>{const e=oe.current;if(e&&["phonenumber","zip","number"].includes(w))return e.addEventListener("wheel",he,{passive:!1}),()=>{e.removeEventListener("wheel",he)}}),[]),n.useEffect((()=>{R&&le("")}),[R]),n.useEffect((()=>{var e;ee(!!d.isActive),d.isActive&&(null===(e=oe.current)||void 0===e||e.focus())}),[d.isActive]),n.useEffect((()=>{ne(d.errorMessage)}),[d.errorMessage]),n.useEffect((()=>{var e;Y(!1),("invalid"===d.state||te||"disabled-invalid"===d.state)&&Y(!0),"active"===d.state&&(null===(e=oe.current)||void 0===e||e.focus())}),[d.state,te]),n.useEffect((()=>{Y(!!te||"invalid"===d.state)}),[te,d.state]);const ce=function(e){if(s.isFunction(e)){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];e(...n)}},ue=()=>"zip"===w?6:2e3,de=e=>{const t=0!==T?T:ue();if(A||M(F||"",e),N)return;const n=e.target.value;![8].includes(e.which)&&t>0&&n.length>=t&&e.preventDefault()},he=e=>{e.preventDefault()},ve=e=>{let t=e.target.value;const n=0!==T?T+1:ue();!N&&n>0&&t.length>=n&&(t=t.substring(0,n-1)),M(t,e),d.textControl||le(t),K&&(oe.current.style.height=`${oe.current.scrollHeight}px`,t||(oe.current.style.height=G||"48px"));const i=k||s.validateInput;if(!i||!s.isFunction(i))return;const[r,l]=i(t,w,z);Y(!r),ne(d.errorMessage?d.errorMessage:l)},xe=e=>{var t;d.skipFocus||ee(!0),ce(null===(t=d.onFocus)||void 0===t?void 0:t.call(d,e))},pe=e=>{var t;d.skipFocus||ee(!1),ce(null===(t=d.onBlur)||void 0===t?void 0:t.call(d,e))},ge=()=>{var t;return e.jsxs(e.Fragment,{children:["multiline"!==w&&e.jsx("input",{className:$?"truncate-class":"","data-test":d["data-test"],id:d.id,style:null!==(t=null==se?void 0:se.input)&&void 0!==t?t:{},ref:oe,type:["phonenumber","zip","number"].includes(w)?"number":w,value:re,onFocus:e=>xe(e),onBlur:e=>pe(e),placeholder:m||"Enter here",onChange:ve,onClick:e=>ce(d.onClick),onKeyDown:e=>de(e)}),"multiline"===w&&e.jsx("textarea",{"data-test":d["data-test"],value:re,ref:oe,onFocus:e=>xe(e),onBlur:e=>pe(e),onClick:e=>ce(d.onClick),placeholder:m||"Enter here",onChange:ve,onKeyDown:e=>de(e),maxLength:T>0?T:void 0})]})};return e.jsxs(u.RootContainer,Object.assign({width:d.width,height:d.height,state:E,type:w,style:null!==(v=null==se?void 0:se.RootContainer)&&void 0!==v?v:{}},{children:[e.jsxs("div",Object.assign({className:"flex-align-center"},{children:[!P&&(!!S||!!te)&&e.jsxs(u.InputFooter,Object.assign({invalid:!!te},{children:[!!te&&e.jsx(o.default,{width:16,height:16}),te||S]})),T>0&&"BOTTOM"===J&&e.jsxs(u.MaxCharStyle,Object.assign({position:"BOTTOM"},{children:[null!==(p=null===(x=(null!=F?F:"").toString())||void 0===x?void 0:x.length)&&void 0!==p?p:0,"/",T]}))]})),e.jsxs(u.InputWrapper,Object.assign({variant:q,state:E,width:d.width,isActive:"active"===E||Z,isInvalid:X,style:null!==(g=null==se?void 0:se.InputWrapper)&&void 0!==g?g:{},version:D,height:d.height},{children:[!!Q&&e.jsx(u.IconHolder,Object.assign({variant:q,iconSize:ie,onClick:()=>ce(null==y?void 0:y.callback),isLeft:!0,style:null!==(j=null==se?void 0:se.IconHolder)&&void 0!==j?j:{}},{children:e.jsx(Q,{})})),!!B&&e.jsx(u.PrefixHolder,Object.assign({variant:q},{children:B})),"default"===q&&e.jsx(u.InputContainer,Object.assign({height:d.height,type:d.type,minHeight:G,maxHeight:W,autoGrow:K},{children:ge()})),"small"===q&&e.jsx(u.InputContainerSmall,Object.assign({height:d.height,type:d.type},{children:ge()})),!!U&&e.jsx(u.IconHolder,Object.assign({variant:q,iconSize:ie,onClick:()=>ce(null==C?void 0:C.callback),isLeft:!1},{children:e.jsx(U,{})})),!!L&&e.jsx(u.SuffixHolder,Object.assign({variant:q},{children:L})),H&&H.text&&e.jsx(i.Button,{buttonText:H.text,onClick:()=>ce(null==H?void 0:H.onClick)}),H&&H.buttonProps&&e.jsx(i.Button,Object.assign({},H.buttonProps))]})),(!!O||!!T)&&e.jsxs(u.InputHeader,Object.assign({invalid:X},{children:[_&&_,e.jsxs("div",Object.assign({className:"label__container"},{children:[V?e.jsxs(l.TitleSmall,{children:[O,I?e.jsx("span",{children:"*"}):""]}):e.jsxs(l.BodySecondary,{children:[O,I?e.jsx("span",{children:"*"}):""]}),d.tooltipText&&e.jsx(r.Tooltip,Object.assign({body:d.tooltipText,placement:"top"},{children:e.jsx("span",{children:e.jsx(t.default,{style:{marginTop:-3},width:18,height:18,color:X?a.COLORS.content.negative:a.COLORS.content.primary})})}))]})),T>0&&"TOP"===J&&e.jsxs(u.MaxCharStyle,{children:[null!==(b=null===(f=(null!=F?F:"").toString())||void 0===f?void 0:f.length)&&void 0!==b?b:0,"/",T]})]}))]}))}));d.displayName="Input",exports.Input=d;
|
|
@@ -11,7 +11,6 @@ export declare const InputWrapper: import("@emotion/styled").StyledComponent<{
|
|
|
11
11
|
state?: InputStateI | undefined;
|
|
12
12
|
variant?: InputVariant | undefined;
|
|
13
13
|
version?: "1.0" | "2.0" | undefined;
|
|
14
|
-
hightlightInputColor?: string | undefined;
|
|
15
14
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
16
15
|
export declare const IconHolder: import("@emotion/styled").StyledComponent<{
|
|
17
16
|
theme?: import("@emotion/react").Theme | undefined;
|