@tap-payments/os-micro-frontend-shared 0.1.282 → 0.1.283-test.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/build/components/Chip/style.d.ts +0 -1
  2. package/build/components/CountBadge/style.d.ts +0 -1
  3. package/build/components/Dialog/style.d.ts +0 -1
  4. package/build/components/FlippingCard/style.d.ts +0 -1
  5. package/build/components/ImageWrapper/ImageWrapper.d.ts +0 -1
  6. package/build/components/JSONViewer/style.d.ts +0 -1
  7. package/build/components/LeftPeekRightExpandingChip/style.d.ts +0 -1
  8. package/build/components/PaymentSourceFilter/PaymentInitiated.d.ts +8 -0
  9. package/build/components/PaymentSourceFilter/PaymentInitiated.js +29 -0
  10. package/build/components/PaymentSourceFilter/PaymentMethod.d.ts +6 -0
  11. package/build/components/PaymentSourceFilter/PaymentMethod.js +54 -0
  12. package/build/components/PaymentSourceFilter/PaymentMethods.d.ts +7 -0
  13. package/build/components/PaymentSourceFilter/PaymentMethods.js +48 -0
  14. package/build/components/PaymentSourceFilter/PaymentSchemes.d.ts +7 -0
  15. package/build/components/PaymentSourceFilter/PaymentSchemes.js +51 -0
  16. package/build/components/PaymentSourceFilter/PaymentSourceFilter.d.ts +15 -0
  17. package/build/components/PaymentSourceFilter/PaymentSourceFilter.js +15 -0
  18. package/build/components/PaymentSourceFilter/index.d.ts +2 -0
  19. package/build/components/PaymentSourceFilter/index.js +1 -0
  20. package/build/components/PaymentSourceFilter/style.d.ts +1 -0
  21. package/build/components/PaymentSourceFilter/style.js +12 -0
  22. package/build/components/PaymentSourceFilter/type.d.ts +10 -0
  23. package/build/components/PaymentSourceFilter/type.js +1 -0
  24. package/build/components/RightLeftExpandingCenterChip/style.d.ts +0 -1
  25. package/build/components/SalesChannelFilter/SalesChannelFilter.d.ts +11 -0
  26. package/build/components/SalesChannelFilter/SalesChannelFilter.js +56 -0
  27. package/build/components/SalesChannelFilter/index.d.ts +1 -0
  28. package/build/components/SalesChannelFilter/index.js +1 -0
  29. package/build/components/SalesChannelFilter/style.d.ts +15 -0
  30. package/build/components/SalesChannelFilter/style.js +29 -0
  31. package/build/components/SearchButton/styles.d.ts +0 -1
  32. package/build/components/StatusIcons/AuthIcons/style.d.ts +0 -1
  33. package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -1
  34. package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
  35. package/build/components/StatusIcons/SourceIcons/style.d.ts +0 -1
  36. package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +0 -1
  37. package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +0 -1
  38. package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -1
  39. package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +0 -1
  40. package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +0 -1
  41. package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +0 -1
  42. package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -1
  43. package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +0 -1
  44. package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +0 -1
  45. package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +0 -1
  46. package/build/components/TableCells/CustomCells/IDButton/style.d.ts +0 -1
  47. package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +0 -1
  48. package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -1
  49. package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1
  50. package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -1
  51. package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -1
  52. package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -1
  53. package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -1
  54. package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +0 -1
  55. package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +0 -1
  56. package/build/components/TableCells/CustomCells/SourceCell/style.d.ts +0 -1
  57. package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
  58. package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
  59. package/build/components/TableCells/CustomCells/style.d.ts +0 -1
  60. package/build/components/TableReports/components/DownloadButton/style.d.ts +0 -1
  61. package/build/components/TableReports/style.d.ts +0 -1
  62. package/build/components/VirtualTables/components/style.d.ts +0 -1
  63. package/build/components/index.d.ts +2 -0
  64. package/build/components/index.js +2 -0
  65. package/build/constants/payment.d.ts +5 -0
  66. package/build/constants/payment.js +4 -0
  67. package/build/utils/index.d.ts +1 -0
  68. package/build/utils/index.js +1 -0
  69. package/build/utils/utilities.d.ts +24 -0
  70. package/build/utils/utilities.js +1 -0
  71. package/package.json +3 -3
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  import { GetSourceAnimationFunction } from './type';
4
3
  export declare const ChipStyled: import("@emotion/styled").StyledComponent<import("react").RefAttributes<unknown> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
5
4
  variant?: import("./type").ChipVariant | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const AgreementImageWrapper: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const DialogWrapper: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const Wrapper: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  declare const ImageWrapper: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const FOOTER_HEIGHT = 37;
4
3
  export declare const TITLE_BAR_HEIGHT = "32px";
5
4
  export declare const VIEWER_HEIGHT = 545;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  import type { SxProps, Theme } from '@mui/material/styles';
4
3
  export declare const CHIP_GAP = 3;
5
4
  export declare const DEFAULT_CHIP_MIN_WIDTH = 24;
@@ -0,0 +1,8 @@
1
+ import { CustomColumnFilterProps } from '../VirtualTables';
2
+ import { PaymentSourceFilters } from './type';
3
+ interface PaymentInitiatedFilterProps extends Partial<CustomColumnFilterProps> {
4
+ filters?: PaymentSourceFilters;
5
+ setFilters?: (filters: PaymentSourceFilters) => void;
6
+ }
7
+ export default function PaymentInitiatedFilter({ filters, setFilters }: Readonly<PaymentInitiatedFilterProps>): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useMemo, useState } from 'react';
3
+ import { useTranslation } from 'react-i18next';
4
+ import { Menu, MenuItem } from '../index.js';
5
+ import { rightArrow, PAYMENT_INITIATED_OPTIONS } from '../../constants/index.js';
6
+ import { MenuItemStyled } from './style';
7
+ export default function PaymentInitiatedFilter({ filters, setFilters }) {
8
+ const [nestedAnchorEl, setNestedAnchorEl] = useState(null);
9
+ const { t } = useTranslation();
10
+ const paymentInitiated = useMemo(() => { var _a; return (_a = filters === null || filters === void 0 ? void 0 : filters.payment_initiated) !== null && _a !== void 0 ? _a : []; }, [filters === null || filters === void 0 ? void 0 : filters.payment_initiated]);
11
+ const onOpen = (e) => {
12
+ setNestedAnchorEl(e.currentTarget);
13
+ };
14
+ const onClose = () => {
15
+ setNestedAnchorEl(null);
16
+ };
17
+ const isPaymentSelected = useCallback((key) => paymentInitiated.includes(key), [paymentInitiated]);
18
+ const isAllPaymentSelected = (paymentInitiated === null || paymentInitiated === void 0 ? void 0 : paymentInitiated.length) === PAYMENT_INITIATED_OPTIONS.length;
19
+ const onClickAll = () => {
20
+ setFilters === null || setFilters === void 0 ? void 0 : setFilters(Object.assign(Object.assign({}, filters), { payment_initiated: isAllPaymentSelected ? [] : PAYMENT_INITIATED_OPTIONS.map(({ key }) => key) }));
21
+ };
22
+ const onPaymentClick = (key) => {
23
+ setFilters === null || setFilters === void 0 ? void 0 : setFilters(Object.assign(Object.assign({}, filters), { payment_initiated: isPaymentSelected(key) ? paymentInitiated === null || paymentInitiated === void 0 ? void 0 : paymentInitiated.filter((payment) => payment !== key) : [...paymentInitiated, key] }));
24
+ };
25
+ return (_jsxs(MenuItemStyled, Object.assign({ onMouseEnter: onOpen, onMouseLeave: onClose, isSelected: isAllPaymentSelected, isIndeterminate: paymentInitiated.length === 1, onClick: onClickAll }, { children: [_jsx("span", Object.assign({ className: "label" }, { children: t('paymentInitiated') })), _jsx("img", { src: rightArrow, alt: "arrow", style: { height: 12 } }), _jsx(Menu, Object.assign({ open: Boolean(nestedAnchorEl), anchorEl: nestedAnchorEl, placement: "right-start" }, { children: PAYMENT_INITIATED_OPTIONS.map(({ label, key }) => (_jsx(MenuItem, Object.assign({ isSelected: isPaymentSelected(key), onClick: (e) => {
26
+ e.stopPropagation();
27
+ onPaymentClick(key);
28
+ } }, { children: label }), key))) }))] })));
29
+ }
@@ -0,0 +1,6 @@
1
+ import { SourceFilter } from '../../types/index.js';
2
+ import { Filters } from './type';
3
+ interface PaymentMethodProps extends SourceFilter, Filters {
4
+ }
5
+ export default function PaymentMethod({ icon, name, options, filters, setFilters }: PaymentMethodProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,54 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { useState, useCallback, useMemo } from 'react';
14
+ import { Menu } from '../index.js';
15
+ import { rightArrow } from '../../constants/index.js';
16
+ import { MenuItemStyled } from './style';
17
+ export default function PaymentMethod({ icon, name, options = [], filters, setFilters }) {
18
+ var _a;
19
+ const [anchorEl, setAnchorEl] = useState(null);
20
+ const paymentMethods = (_a = filters === null || filters === void 0 ? void 0 : filters.payment_methods) !== null && _a !== void 0 ? _a : [];
21
+ const onOpen = (e) => {
22
+ setAnchorEl(e.currentTarget);
23
+ };
24
+ const onClose = () => {
25
+ setAnchorEl(null);
26
+ };
27
+ const isSelectedPaymentMethod = useCallback((selectedPaymentMethod) => { var _a; return (_a = paymentMethods.includes(selectedPaymentMethod)) !== null && _a !== void 0 ? _a : false; }, [paymentMethods.length]);
28
+ const isSelected = useMemo(() => options === null || options === void 0 ? void 0 : options.every((option) => isSelectedPaymentMethod(option.type)), [paymentMethods.length]);
29
+ const isIndeterminate = useMemo(() => !isSelected && (options === null || options === void 0 ? void 0 : options.some((option) => isSelectedPaymentMethod(option.type))), [paymentMethods.length]);
30
+ const onClick = (e) => {
31
+ var _a, _b;
32
+ e.stopPropagation();
33
+ if (isSelected) {
34
+ const newPaymentMethods = (_a = options === null || options === void 0 ? void 0 : options.reduce((acc, option) => acc.filter((method) => method !== option.type), paymentMethods)) !== null && _a !== void 0 ? _a : [];
35
+ const { payment_methods } = filters, resetFilters = __rest(filters, ["payment_methods"]);
36
+ setFilters((newPaymentMethods === null || newPaymentMethods === void 0 ? void 0 : newPaymentMethods.length) > 0
37
+ ? Object.assign(Object.assign({}, filters), { payment_methods: newPaymentMethods }) : resetFilters);
38
+ }
39
+ else {
40
+ setFilters(Object.assign(Object.assign({}, filters), { payment_methods: [...paymentMethods, ...((_b = options === null || options === void 0 ? void 0 : options.map((option) => option.type)) !== null && _b !== void 0 ? _b : [])] }));
41
+ }
42
+ };
43
+ const onClickPaymentMethod = (e, selectedPaymentMethod) => {
44
+ var _a;
45
+ e.stopPropagation();
46
+ if (isSelectedPaymentMethod(selectedPaymentMethod)) {
47
+ setFilters(Object.assign(Object.assign({}, filters), { payment_methods: (_a = paymentMethods === null || paymentMethods === void 0 ? void 0 : paymentMethods.filter((method) => method !== selectedPaymentMethod)) !== null && _a !== void 0 ? _a : [] }));
48
+ }
49
+ else {
50
+ setFilters(Object.assign(Object.assign({}, filters), { payment_methods: [...(paymentMethods !== null && paymentMethods !== void 0 ? paymentMethods : []), selectedPaymentMethod] }));
51
+ }
52
+ };
53
+ return (_jsxs(MenuItemStyled, Object.assign({ isSelected: isSelected, isIndeterminate: isIndeterminate, onMouseEnter: onOpen, onMouseLeave: onClose, onClick: onClick }, { children: [_jsx("img", { src: icon, alt: name }), _jsx("span", Object.assign({ className: "label" }, { children: name })), _jsx("img", { src: rightArrow, alt: "arrow", style: { height: 12 } }), _jsx(Menu, Object.assign({ open: Boolean(anchorEl), anchorEl: anchorEl, placement: "right-end" }, { children: options === null || options === void 0 ? void 0 : options.map((option) => (_jsx(MenuItemStyled, Object.assign({ isSelected: isSelectedPaymentMethod(option.type), onClick: (e) => onClickPaymentMethod(e, option.type) }, { children: _jsx("img", { src: option.icon, alt: option === null || option === void 0 ? void 0 : option.name, style: { height: 24, width: 36, objectFit: 'contain' } }) }), option.type))) }))] })));
54
+ }
@@ -0,0 +1,7 @@
1
+ import { Filters } from './type';
2
+ import { SourceFilter } from '../../types/index.js';
3
+ interface PaymentMethodsProps extends Filters {
4
+ paymentMethodsSource: SourceFilter;
5
+ }
6
+ export default function PaymentMethods({ paymentMethodsSource, filters, setFilters }: Readonly<PaymentMethodsProps>): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,48 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { useMemo, useState } from 'react';
14
+ import { Menu } from '../index.js';
15
+ import { rightArrow } from '../../constants/index.js';
16
+ import PaymentMethod from './PaymentMethod';
17
+ import { MenuItemStyled } from './style';
18
+ export default function PaymentMethods({ paymentMethodsSource, filters, setFilters }) {
19
+ var _a, _b;
20
+ const [paymentMethodsEl, setPaymentMethodsEl] = useState(null);
21
+ const filterPaymentMethods = (_a = filters === null || filters === void 0 ? void 0 : filters.payment_methods) !== null && _a !== void 0 ? _a : [];
22
+ const onOpen = (e) => {
23
+ setPaymentMethodsEl(e.currentTarget);
24
+ };
25
+ const onClose = () => {
26
+ setPaymentMethodsEl(null);
27
+ };
28
+ const paymentMethodsAll = useMemo(() => {
29
+ var _a, _b, _c;
30
+ return (_c = (_b = ((_a = paymentMethodsSource.options) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.reduce((acc, method) => {
31
+ var _a, _b, _c;
32
+ acc.push(...((_c = (_b = ((_a = method.options) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.map((m) => m.type)) !== null && _c !== void 0 ? _c : []));
33
+ return acc;
34
+ }, [])) !== null && _c !== void 0 ? _c : [];
35
+ }, []);
36
+ const isSelected = useMemo(() => (paymentMethodsAll === null || paymentMethodsAll === void 0 ? void 0 : paymentMethodsAll.length) === filterPaymentMethods.length, [filterPaymentMethods.length, paymentMethodsAll === null || paymentMethodsAll === void 0 ? void 0 : paymentMethodsAll.length]);
37
+ const isIndeterminate = useMemo(() => !isSelected && (paymentMethodsAll === null || paymentMethodsAll === void 0 ? void 0 : paymentMethodsAll.length) !== filterPaymentMethods.length && filterPaymentMethods.length > 0, [filterPaymentMethods.length, paymentMethodsAll === null || paymentMethodsAll === void 0 ? void 0 : paymentMethodsAll.length, isSelected]);
38
+ const onClick = () => {
39
+ if (isSelected) {
40
+ const { payment_methods } = filters, resetFilters = __rest(filters, ["payment_methods"]);
41
+ setFilters(resetFilters);
42
+ }
43
+ else {
44
+ setFilters(Object.assign(Object.assign({}, filters), { payment_methods: paymentMethodsAll }));
45
+ }
46
+ };
47
+ return (_jsxs(MenuItemStyled, Object.assign({ isSelected: isSelected, isIndeterminate: isIndeterminate, onMouseEnter: onOpen, onMouseLeave: onClose, onClick: onClick }, { children: [_jsx("span", Object.assign({ className: "label" }, { children: paymentMethodsSource === null || paymentMethodsSource === void 0 ? void 0 : paymentMethodsSource.name })), _jsx("img", { src: rightArrow, alt: "arrow", style: { height: 12 } }), _jsx(Menu, Object.assign({ open: Boolean(paymentMethodsEl), anchorEl: paymentMethodsEl, placement: "right-start" }, { children: (_b = paymentMethodsSource === null || paymentMethodsSource === void 0 ? void 0 : paymentMethodsSource.options) === null || _b === void 0 ? void 0 : _b.map((paymentMethod) => (_jsx(PaymentMethod, Object.assign({}, paymentMethod, { filters: filters, setFilters: setFilters }), paymentMethod.type))) }))] })));
48
+ }
@@ -0,0 +1,7 @@
1
+ import { Filters } from './type';
2
+ import { SourceFilter } from '../../types/index.js';
3
+ interface PaymentSchemesProps extends Filters {
4
+ paymentSchemesSource: SourceFilter;
5
+ }
6
+ export default function PaymentSchemes({ paymentSchemesSource, filters, setFilters }: Readonly<PaymentSchemesProps>): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,51 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { useCallback, useMemo, useState } from 'react';
14
+ import { Menu } from '../index.js';
15
+ import { rightArrow } from '../../constants/index.js';
16
+ import { MenuItemStyled } from './style';
17
+ export default function PaymentSchemes({ paymentSchemesSource, filters, setFilters }) {
18
+ var _a, _b, _c;
19
+ const [anchorEl, setAnchorEl] = useState(null);
20
+ const paymentScheme = (_a = filters === null || filters === void 0 ? void 0 : filters.payment_scheme) !== null && _a !== void 0 ? _a : [];
21
+ const onOpen = (e) => {
22
+ setAnchorEl(e.currentTarget);
23
+ };
24
+ const onClose = () => {
25
+ setAnchorEl(null);
26
+ };
27
+ const isSelected = useMemo(() => { var _a; return paymentScheme.length === ((_a = paymentSchemesSource === null || paymentSchemesSource === void 0 ? void 0 : paymentSchemesSource.options) === null || _a === void 0 ? void 0 : _a.length); }, [paymentScheme.length, (_b = paymentSchemesSource === null || paymentSchemesSource === void 0 ? void 0 : paymentSchemesSource.options) === null || _b === void 0 ? void 0 : _b.length]);
28
+ const isIndeterminate = useMemo(() => !isSelected && paymentScheme.length > 0, [paymentScheme.length, isSelected]);
29
+ const isSelectedPaymentScheme = useCallback((selectedPaymentScheme) => { var _a; return (_a = paymentScheme.includes(selectedPaymentScheme)) !== null && _a !== void 0 ? _a : false; }, [paymentScheme]);
30
+ const onClick = () => {
31
+ var _a, _b;
32
+ if (isSelected) {
33
+ const { payment_scheme } = filters, resetFilters = __rest(filters, ["payment_scheme"]);
34
+ setFilters(resetFilters);
35
+ }
36
+ else {
37
+ setFilters(Object.assign(Object.assign({}, filters), { payment_scheme: (_b = (_a = paymentSchemesSource === null || paymentSchemesSource === void 0 ? void 0 : paymentSchemesSource.options) === null || _a === void 0 ? void 0 : _a.map((paymentSchemeItem) => paymentSchemeItem.type)) !== null && _b !== void 0 ? _b : [] }));
38
+ }
39
+ };
40
+ const onClickPaymentScheme = (e, selectedPaymentScheme) => {
41
+ var _a, _b;
42
+ e.stopPropagation();
43
+ if (isSelectedPaymentScheme(selectedPaymentScheme)) {
44
+ setFilters(Object.assign(Object.assign({}, filters), { payment_scheme: (_a = paymentScheme.filter((scheme) => scheme !== selectedPaymentScheme)) !== null && _a !== void 0 ? _a : [] }));
45
+ }
46
+ else {
47
+ setFilters(Object.assign(Object.assign({}, filters), { payment_scheme: [...((_b = filters === null || filters === void 0 ? void 0 : filters.payment_scheme) !== null && _b !== void 0 ? _b : []), selectedPaymentScheme] }));
48
+ }
49
+ };
50
+ return (_jsxs(MenuItemStyled, Object.assign({ isSelected: isSelected, isIndeterminate: isIndeterminate, onMouseEnter: onOpen, onMouseLeave: onClose, onClick: onClick }, { children: [_jsx("span", Object.assign({ className: "label" }, { children: paymentSchemesSource === null || paymentSchemesSource === void 0 ? void 0 : paymentSchemesSource.name })), _jsx("img", { src: rightArrow, alt: "arrow", style: { height: 12 } }), _jsx(Menu, Object.assign({ open: Boolean(anchorEl), anchorEl: anchorEl, placement: "right-start" }, { children: (_c = paymentSchemesSource === null || paymentSchemesSource === void 0 ? void 0 : paymentSchemesSource.options) === null || _c === void 0 ? void 0 : _c.map((scheme) => (_jsx(MenuItemStyled, Object.assign({ isSelected: isSelectedPaymentScheme(scheme.type), onClick: (e) => onClickPaymentScheme(e, scheme.type) }, { children: _jsx("img", { src: scheme.icon, alt: scheme === null || scheme === void 0 ? void 0 : scheme.name, style: { height: 24 } }) }), scheme.type))) }))] })));
51
+ }
@@ -0,0 +1,15 @@
1
+ import { SourceFilter } from '../../types/index.js';
2
+ import { CustomColumnFilterProps } from '../VirtualTables';
3
+ import { PaymentSourceFilters } from './type';
4
+ interface SourceFilterProps extends CustomColumnFilterProps {
5
+ filters: PaymentSourceFilters;
6
+ setFilters: (filters: PaymentSourceFilters) => void;
7
+ showPaymentSchemes?: boolean;
8
+ showPaymentMethods?: boolean;
9
+ showPaymentInitiated?: boolean;
10
+ paymentMethodsSource: SourceFilter;
11
+ paymentSchemesSource: SourceFilter;
12
+ onConfirm?: () => void;
13
+ }
14
+ export default function PaymentSourceFilter({ filters, setFilters, anchorEl, showPaymentSchemes, showPaymentMethods, showPaymentInitiated, paymentMethodsSource, paymentSchemesSource, onCloseDropdown, onConfirm, }: Readonly<SourceFilterProps>): import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useTranslation } from 'react-i18next';
3
+ import { Menu, FilterTitle, FilterOkayButton, FilterFooter, FilterCancelButton } from '../index.js';
4
+ import PaymentMethods from './PaymentMethods';
5
+ import PaymentSchemes from './PaymentSchemes';
6
+ import PaymentInitiated from './PaymentInitiated';
7
+ export default function PaymentSourceFilter({ filters, setFilters, anchorEl, showPaymentSchemes = true, showPaymentMethods = true, showPaymentInitiated = true, paymentMethodsSource, paymentSchemesSource, onCloseDropdown, onConfirm, }) {
8
+ const { t } = useTranslation();
9
+ const open = Boolean(anchorEl);
10
+ const handleOkButtonClick = (e) => {
11
+ onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm();
12
+ onCloseDropdown(e);
13
+ };
14
+ return (_jsxs(Menu, Object.assign({ open: open, anchorEl: anchorEl, sx: { marginTop: '8px', marginBottom: '8px' } }, { children: [_jsx(FilterTitle, Object.assign({ component: "span" }, { children: t('filterBy') })), showPaymentMethods && _jsx(PaymentMethods, { filters: filters, setFilters: setFilters, paymentMethodsSource: paymentMethodsSource }), showPaymentSchemes && _jsx(PaymentSchemes, { filters: filters, setFilters: setFilters, paymentSchemesSource: paymentSchemesSource }), showPaymentInitiated && _jsx(PaymentInitiated, { filters: filters, setFilters: setFilters }), _jsxs(FilterFooter, { children: [_jsx(FilterCancelButton, Object.assign({ onClick: onCloseDropdown }, { children: t('cancel') })), _jsx(FilterOkayButton, Object.assign({ onClick: handleOkButtonClick }, { children: t('okay') }))] })] })));
15
+ }
@@ -0,0 +1,2 @@
1
+ export { default as PaymentSourceFilter } from './PaymentSourceFilter';
2
+ export { type PaymentSourceFilters } from './type';
@@ -0,0 +1 @@
1
+ export { default as PaymentSourceFilter } from './PaymentSourceFilter';
@@ -0,0 +1 @@
1
+ export declare const MenuItemStyled: import("@emotion/styled").StyledComponent<import("../MenuItem/MenuItem").MenuItemProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -0,0 +1,12 @@
1
+ import { styled } from '@mui/material/styles';
2
+ import { MenuItem } from '../index.js';
3
+ export const MenuItemStyled = styled(MenuItem)(({ theme }) => ({
4
+ height: 40,
5
+ flex: 'unset',
6
+ paddingTop: 0,
7
+ paddingBottom: 0,
8
+ borderBottom: `1px solid ${theme.palette.divider}`,
9
+ '.label': {
10
+ flexGrow: 1,
11
+ },
12
+ }));
@@ -0,0 +1,10 @@
1
+ export interface PaymentSourceFilters {
2
+ payment_methods?: string[];
3
+ payment_scheme?: string[];
4
+ payment_initiated?: string[];
5
+ issuer_countries?: string[];
6
+ }
7
+ export interface Filters {
8
+ filters: PaymentSourceFilters;
9
+ setFilters: (filters: PaymentSourceFilters) => void;
10
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  import type { SxProps, Theme } from '@mui/material/styles';
4
3
  export declare const CHIP_GAP = 3;
5
4
  export declare const CenterIconWrapper: import("@emotion/styled").StyledComponent<{
@@ -0,0 +1,11 @@
1
+ import { OptionsListItem } from '../../utils/index.js';
2
+ interface SalesChannelFilterProps {
3
+ onSalesChannelChange: (salesChannels: OptionsListItem[] | undefined) => void;
4
+ onSearchChange: (searchValue: string) => void;
5
+ filteredOptions: OptionsListItem[];
6
+ isLoading: boolean;
7
+ initialSalesChannels?: OptionsListItem[];
8
+ initialSalesChannelsSearch?: string;
9
+ }
10
+ export default function SalesChannelFilter({ onSalesChannelChange, onSearchChange, filteredOptions, isLoading, initialSalesChannels, initialSalesChannelsSearch, }: Readonly<SalesChannelFilterProps>): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,56 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useMemo, useState } from 'react';
3
+ import Box from '@mui/material/Box';
4
+ import { MenuItem, Skeleton } from '../index.js';
5
+ import { FilterWrapper, ListWrapper, SearchIconWrapper } from './style';
6
+ import { InputStyled } from '../SelectWithSearch';
7
+ import { closeXIcon, searchIcon } from '../../constants/index.js';
8
+ export default function SalesChannelFilter({ onSalesChannelChange, onSearchChange, filteredOptions, isLoading, initialSalesChannels, initialSalesChannelsSearch, }) {
9
+ const salesChannels = useMemo(() => {
10
+ return initialSalesChannels || [];
11
+ }, [initialSalesChannels]);
12
+ const [searchValue, setSearchValue] = useState(initialSalesChannelsSearch || '');
13
+ const checkIsSelected = (salesChannelId) => salesChannels.some((channel) => channel.id === salesChannelId);
14
+ const isAllSelected = useMemo(() => {
15
+ return (salesChannels === null || salesChannels === void 0 ? void 0 : salesChannels.length) === filteredOptions.length && (filteredOptions === null || filteredOptions === void 0 ? void 0 : filteredOptions.length) > 0;
16
+ }, [salesChannels, filteredOptions]);
17
+ const isOnlyBlankSelected = useMemo(() => {
18
+ return (salesChannels === null || salesChannels === void 0 ? void 0 : salesChannels.some((channel) => channel.id === 'blank')) && (salesChannels === null || salesChannels === void 0 ? void 0 : salesChannels.length) === 1;
19
+ }, [salesChannels]);
20
+ const isSearchDisabled = useMemo(() => {
21
+ return (salesChannels === null || salesChannels === void 0 ? void 0 : salesChannels.length) === 0 || isOnlyBlankSelected;
22
+ }, [isOnlyBlankSelected, salesChannels === null || salesChannels === void 0 ? void 0 : salesChannels.length]);
23
+ return (_jsxs(FilterWrapper, { children: [_jsx(InputStyled, { placeholder: 'Search', endAdornment: !isSearchDisabled && (_jsx(SearchIconWrapper, Object.assign({ sx: Object.assign({}, (searchValue && { backgroundColor: '#F2F2F2' })) }, { children: _jsx(Box, { component: "img", src: searchValue ? closeXIcon : searchIcon, alt: "search", onClick: () => {
24
+ setSearchValue('');
25
+ onSearchChange('');
26
+ }, sx: Object.assign({}, (searchValue && {
27
+ backgroundColor: '#F2F2F2',
28
+ borderRadius: '4px',
29
+ width: '8px',
30
+ height: '8px',
31
+ })) }) }))), disabled: isSearchDisabled, onChange: (e) => {
32
+ setSearchValue(e.target.value);
33
+ onSearchChange(e.target.value);
34
+ }, value: searchValue, disableUnderline: true, sx: Object.assign({ cursor: 'default', width: '100%', border: '1px solid #F2F2F2', backgroundColor: isSearchDisabled ? '#F8F8F8' : '#fff' }, (searchValue && { cursor: 'pointer' })) }), _jsx(ListWrapper, { children: isLoading ? (Array.from({ length: 9 }).map((_, index) => _jsx(Skeleton, { variant: "rectangular", width: "100%", height: 24 }, index))) : (_jsxs(_Fragment, { children: [_jsx(MenuItem, Object.assign({ sx: {
35
+ backgroundColor: '#F8F8F8',
36
+ fontWeight: 600,
37
+ padding: '4px 8px',
38
+ color: '#1F88D0',
39
+ gap: '0px',
40
+ }, isSelected: isAllSelected, isIndeterminate: !isAllSelected && ((salesChannels === null || salesChannels === void 0 ? void 0 : salesChannels.length) || 0) > 0, onClick: (e) => {
41
+ e.stopPropagation();
42
+ onSalesChannelChange(isAllSelected ? [] : filteredOptions);
43
+ } }, { children: isAllSelected ? 'Deselect All' : 'Select All' })), filteredOptions.map((channel) => {
44
+ var _a;
45
+ return (_jsx(MenuItem, Object.assign({ isSelected: checkIsSelected(channel.id), onClick: (e) => {
46
+ e.stopPropagation();
47
+ const isSelected = checkIsSelected(channel.id);
48
+ const newSalesChannels = isSelected ? salesChannels === null || salesChannels === void 0 ? void 0 : salesChannels.filter((c) => c.id !== channel.id) : [...(salesChannels !== null && salesChannels !== void 0 ? salesChannels : []), channel];
49
+ onSalesChannelChange(newSalesChannels);
50
+ }, sx: {
51
+ padding: '4px 8px',
52
+ gap: '0px',
53
+ fontWeight: 400,
54
+ } }, { children: (_a = channel === null || channel === void 0 ? void 0 : channel.name) === null || _a === void 0 ? void 0 : _a.en }), channel.id));
55
+ })] })) })] }));
56
+ }
@@ -0,0 +1 @@
1
+ export { default as SalesChannelFilter } from './SalesChannelFilter';
@@ -0,0 +1 @@
1
+ export { default as SalesChannelFilter } from './SalesChannelFilter';
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ export declare const FilterButton: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
5
+ isActive?: boolean | undefined;
6
+ }, {}, {}>;
7
+ export declare const ListWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
8
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
9
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
10
+ export declare const FilterWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
11
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
12
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
13
+ export declare const SearchIconWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
14
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
15
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -0,0 +1,29 @@
1
+ import { Box, styled } from '@mui/material';
2
+ export const FilterButton = styled(Box, { shouldForwardProp: (props) => props !== 'isActive' })(({ theme, isActive }) => (Object.assign({ borderRadius: '4px', border: `1px solid ${theme.palette.divider}`, height: 32, width: 30, display: 'flex', alignItems: 'center', justifyContent: 'center', cursor: 'pointer', backgroundColor: theme.palette.common.white, ':hover': {
3
+ opacity: 0.7
4
+ } }, (isActive && {
5
+ boxShadow: `0px 0px 4px 0px ${theme.palette.info.dark}80`,
6
+ border: `1px solid ${theme.palette.info.dark}`
7
+ }))));
8
+ export const ListWrapper = styled(Box)(({ theme }) => ({
9
+ display: 'flex',
10
+ flexDirection: 'column',
11
+ borderRadius: '8px',
12
+ border: `1px solid ${theme.palette.divider}`,
13
+ backgroundColor: theme.palette.common.white,
14
+ maxHeight: '232px',
15
+ overflow: 'auto'
16
+ }));
17
+ export const FilterWrapper = styled(Box)(() => ({
18
+ display: 'flex',
19
+ flexDirection: 'column',
20
+ gap: '8px'
21
+ }));
22
+ export const SearchIconWrapper = styled(Box)(() => ({
23
+ display: 'flex',
24
+ alignItems: 'center',
25
+ justifyContent: 'center',
26
+ width: '13px',
27
+ height: '13px',
28
+ borderRadius: '50%'
29
+ }));
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledInput: import("@emotion/styled").StyledComponent<{
4
3
  width?: string | number | undefined;
5
4
  height?: string | number | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
4
  export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const BalanceCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const ErrorCodeLabel: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
4
  export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  import { TableMode } from '../../../../types/index.js';
4
3
  export declare const ActionCellContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
5
4
  tableMode?: TableMode | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledAppsCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const AppsStatusContainer: import("@emotion/styled").StyledComponent<{
5
4
  hidden?: boolean | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const AuthIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
4
3
  export declare const AuthCellContainer: import("@emotion/styled").StyledComponent<{
5
4
  hidden?: boolean | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const BalanceCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
4
  export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const DueDateCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const DueDateCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const Button: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const DueDateCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const DueDateCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const ProductCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
4
  export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const RefundChargeCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const RefundCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
4
  export declare const SalesChannelsContainer: import("@emotion/styled").StyledComponent<{
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
5
4
  hidden?: boolean | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
4
  export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const MultiRefundIcon: import("@emotion/styled").StyledComponent<{
4
3
  width?: string | number | undefined;
5
4
  height?: string | number | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const GeographyBox: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
4
3
  variant?: "Global" | "Regional" | "Local" | undefined;
5
4
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const Button: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  type ExportButtonProps = {
4
3
  notificationState?: {
5
4
  success: boolean;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  interface TableWrapperProps {
4
3
  showNoDataView?: boolean;
5
4
  }
@@ -143,3 +143,5 @@ export * from './Filters';
143
143
  export * from './StatusFilter';
144
144
  export { default as TableReports } from './TableReports';
145
145
  export * from './TableReports';
146
+ export * from './PaymentSourceFilter';
147
+ export * from './SalesChannelFilter';
@@ -143,3 +143,5 @@ export * from './Filters';
143
143
  export * from './StatusFilter';
144
144
  export { default as TableReports } from './TableReports';
145
145
  export * from './TableReports';
146
+ export * from './PaymentSourceFilter';
147
+ export * from './SalesChannelFilter';
@@ -3,3 +3,8 @@ export declare const PAYMENT_TYPES: {
3
3
  label: string;
4
4
  icon: string;
5
5
  }[];
6
+ export declare const PAYMENT_INITIATED_OPTIONS: {
7
+ key: string;
8
+ value: string;
9
+ label: string;
10
+ }[];
@@ -36,3 +36,7 @@ export const PAYMENT_TYPES = [
36
36
  icon: `${lightUrl}/cash.svg`,
37
37
  },
38
38
  ];
39
+ export const PAYMENT_INITIATED_OPTIONS = [
40
+ { key: 'customer', value: 'true', label: 'Customer' },
41
+ { key: 'merchant', value: 'false', label: 'Merchant' },
42
+ ];
@@ -44,3 +44,4 @@ export * from './style';
44
44
  export * from './boolean';
45
45
  export * from './columnResizeStorage';
46
46
  export * from './timezone';
47
+ export * from './utilities';
@@ -44,3 +44,4 @@ export * from './style';
44
44
  export * from './boolean';
45
45
  export * from './columnResizeStorage';
46
46
  export * from './timezone';
47
+ export * from './utilities';
@@ -0,0 +1,24 @@
1
+ export type OptionsListItem = {
2
+ id: string;
3
+ logo?: string;
4
+ code?: string;
5
+ name: {
6
+ ar: string;
7
+ en: string;
8
+ };
9
+ currency_code?: string[];
10
+ country_code?: string[];
11
+ range?: {
12
+ from: number;
13
+ to: number;
14
+ };
15
+ sub?: {
16
+ id: string;
17
+ logo: string;
18
+ code: string;
19
+ name: {
20
+ ar: string;
21
+ en: string;
22
+ };
23
+ }[];
24
+ };
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@tap-payments/os-micro-frontend-shared",
3
3
  "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.1.282",
5
- "testVersion": 0,
4
+ "version": "0.1.283-test.1",
5
+ "testVersion": 1,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",
@@ -164,4 +164,4 @@
164
164
  "publishConfig": {
165
165
  "registry": "https://registry.npmjs.org/"
166
166
  }
167
- }
167
+ }