@tap-payments/os-micro-frontend-shared 0.1.183 → 0.1.185-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 (60) 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/RangeCalender/RangeCalender.d.ts +2 -2
  9. package/build/components/RangeCalender/RangeCalender.js +17 -8
  10. package/build/components/RangeCalender/components/CustomTimepicker/CustomTimepicker.d.ts +2 -6
  11. package/build/components/RangeCalender/components/CustomTimepicker/CustomTimepicker.js +33 -27
  12. package/build/components/RangeCalender/components/CustomTimepicker/style.d.ts +1 -1
  13. package/build/components/RangeCalender/components/RangeDatepicker/RangeDatepicker.d.ts +1 -9
  14. package/build/components/RangeCalender/components/RangeDatepicker/index.d.ts +1 -0
  15. package/build/components/RangeCalender/components/RangeDatepicker/index.js +1 -0
  16. package/build/components/RangeCalender/components/RangeDatepicker/type.d.ts +9 -0
  17. package/build/components/RangeCalender/components/RangeDatepicker/type.js +1 -0
  18. package/build/components/RangeCalender/utils.d.ts +5 -1
  19. package/build/components/RangeCalender/utils.js +11 -0
  20. package/build/components/RightLeftExpandingCenterChip/style.d.ts +0 -1
  21. package/build/components/SearchButton/styles.d.ts +0 -1
  22. package/build/components/StatusChip/style.js +1 -1
  23. package/build/components/StatusIcons/AuthIcons/style.d.ts +0 -1
  24. package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -1
  25. package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
  26. package/build/components/StatusIcons/SourceIcons/style.d.ts +0 -1
  27. package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +0 -1
  28. package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +0 -1
  29. package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -1
  30. package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +0 -1
  31. package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +0 -1
  32. package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +0 -1
  33. package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -1
  34. package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +0 -1
  35. package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +0 -1
  36. package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +0 -1
  37. package/build/components/TableCells/CustomCells/IDButton/style.d.ts +0 -1
  38. package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +0 -1
  39. package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -1
  40. package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1
  41. package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -1
  42. package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -1
  43. package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -1
  44. package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -1
  45. package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +0 -1
  46. package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +0 -1
  47. package/build/components/TableCells/CustomCells/SourceCell/style.d.ts +0 -1
  48. package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
  49. package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
  50. package/build/components/TableCells/CustomCells/style.d.ts +0 -1
  51. package/build/components/Timepicker/Timepicker.d.ts +2 -1
  52. package/build/components/Timepicker/Timepicker.js +8 -7
  53. package/build/components/Timepicker/index.d.ts +1 -0
  54. package/build/components/Timepicker/index.js +1 -0
  55. package/build/components/Timepicker/style.d.ts +1 -0
  56. package/build/components/Timepicker/style.js +1 -1
  57. package/build/components/VirtualTables/components/style.d.ts +0 -1
  58. package/build/constants/table/cell/merchantsTableCellWidth.d.ts +75 -5
  59. package/build/constants/table/cell/merchantsTableCellWidth.js +75 -5
  60. 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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;
@@ -1,8 +1,8 @@
1
1
  import { MouseEvent } from 'react';
2
2
  import { PopperProps } from '@mui/material/Popper';
3
- import type { CalenderMode, Timezone } from '../../types/index.js';
4
3
  import { SxProps } from '@mui/system';
5
- import { RangeDatepickerProps } from './components/RangeDatepicker/RangeDatepicker';
4
+ import type { CalenderMode, Timezone } from '../../types/index.js';
5
+ import { RangeDatepickerProps } from './components/RangeDatepicker';
6
6
  interface RangeCalendarProps {
7
7
  defaultDate: [Date, Date];
8
8
  onDateChange: (date: [Date, Date], timezoneOffset?: number) => void;
@@ -13,8 +13,10 @@ import QuickFilters from './components/QuickFilters';
13
13
  import RangeDatePicker from './components/RangeDatepicker';
14
14
  import CustomTimezone from './components/Timezone';
15
15
  import { ButtonsWrapper, CalenderWrapper, CancelButton, FiltersArea, Footer, Main, OkayButton, SelectedDate, TimeZone, Settings } from './style';
16
+ import CustomTimePicker from './components/CustomTimepicker';
17
+ import { getDateRange, getEndOfDate, getStartOfDate } from './utils';
16
18
  function RangeCalender({ defaultDate, onDateChange, mode = 'gregorian', onCalendarModeSwitch, numberOfMonths, noTimezone, noQuickFilter, maxDateRange, onCalendarGroupChange, groupBy, timezone, onChangeTimezoneHistory, onChangeTimezone, defaultTimezone, browserTimezone, renderCalendarButton, mainSx, popperProps, rangeDatePickerProps, }) {
17
- const [dates, setDates] = useState([new DateObject(defaultDate[0]), new DateObject(defaultDate[1])]);
19
+ const [dates, setDates] = useState(getDateRange(defaultDate));
18
20
  const [values, setValues] = useState(dates);
19
21
  const [selectedTimezone, setSelectedTimezone] = useState(timezone);
20
22
  const [selectedGroupBy, setSelectedGroupBy] = useState(groupBy || 'day');
@@ -35,7 +37,7 @@ function RangeCalender({ defaultDate, onDateChange, mode = 'gregorian', onCalend
35
37
  if (!open) {
36
38
  if (numberOfMonths === 1)
37
39
  return;
38
- setValues([new DateObject(defaultDate[0]), new DateObject(defaultDate[1])]);
40
+ setValues(getDateRange(defaultDate));
39
41
  }
40
42
  }, [open]);
41
43
  useEffect(() => {
@@ -45,13 +47,20 @@ function RangeCalender({ defaultDate, onDateChange, mode = 'gregorian', onCalend
45
47
  onChangeTimezone === null || onChangeTimezone === void 0 ? void 0 : onChangeTimezone(newTimezone);
46
48
  onChangeTimezoneHistory === null || onChangeTimezoneHistory === void 0 ? void 0 : onChangeTimezoneHistory(newTimezone);
47
49
  };
48
- const formatDate = (date) => new Date(date.setHour(new Date().getHours()).setMinute(new Date().getMinutes()).setSecond(new Date().getSeconds()).toDate().toLocaleString('en-us', {
50
+ const formatDate = (date) => new Date(date.toDate().toLocaleString('en-us', {
49
51
  timeZone: selectedTimezone === null || selectedTimezone === void 0 ? void 0 : selectedTimezone.timezone,
50
52
  }));
51
53
  const submitDate = () => {
52
54
  setDates(values);
53
55
  onCloseCalender();
54
- onDateChange([formatDate(values[0]), formatDate(values[1] || values[0])], timezone === null || timezone === void 0 ? void 0 : timezone.offset);
56
+ let newDates;
57
+ if (values[0].dayOfYear === values[1].dayOfYear) {
58
+ newDates = [formatDate(values[0]), formatDate(values[1])];
59
+ }
60
+ else {
61
+ newDates = [formatDate(getStartOfDate(values[0])), formatDate(getEndOfDate(values[1]))];
62
+ }
63
+ onDateChange([newDates[0], newDates[1]], timezone === null || timezone === void 0 ? void 0 : timezone.offset);
55
64
  onCalendarGroupChange === null || onCalendarGroupChange === void 0 ? void 0 : onCalendarGroupChange(selectedGroupBy || 'day');
56
65
  updateTimezone(selectedTimezone);
57
66
  };
@@ -65,8 +74,8 @@ function RangeCalender({ defaultDate, onDateChange, mode = 'gregorian', onCalend
65
74
  setValues(newDate);
66
75
  return;
67
76
  }
68
- const startDate = newDate[0].toDate();
69
- const endDate = newDate[1].toDate();
77
+ const startDate = getStartOfDate(newDate[0]).toDate();
78
+ const endDate = getEndOfDate(newDate[1]).toDate();
70
79
  const numberOfDays = dayjs(endDate).diff(startDate, 'day');
71
80
  if (numberOfDays <= maxDateRange) {
72
81
  setValues(newDate);
@@ -79,7 +88,7 @@ function RangeCalender({ defaultDate, onDateChange, mode = 'gregorian', onCalend
79
88
  }, 3000);
80
89
  };
81
90
  const onChangeQuickFilter = (newValues) => {
82
- setValues(newValues);
91
+ setValues([getStartOfDate(newValues[0]), getEndOfDate(newValues[1])]);
83
92
  if (calendarRef.current)
84
93
  calendarRef.current.set({ date: newValues[0] });
85
94
  };
@@ -88,6 +97,6 @@ function RangeCalender({ defaultDate, onDateChange, mode = 'gregorian', onCalend
88
97
  onCloseCalender();
89
98
  } })), _jsx(Popper, Object.assign({ open: open, anchorEl: anchorEl, placement: "bottom-end" }, popperProps, { children: _jsxs(CalenderWrapper, { children: [!noQuickFilter && (_jsxs(FiltersArea, { children: [_jsx(QuickFilters, { onChange: onChangeQuickFilter, isHijri: isHijri }), _jsxs(Settings, { children: [groupBy && (_jsx(GroupBy, { groupBy: selectedGroupBy, isCalenderOpen: open, onUpdate: (group) => {
90
99
  setSelectedGroupBy(group);
91
- } })), _jsx(Hijri, { isHijri: isHijri, onCalendarModeSwitch: onCalendarModeSwitch })] })] })), _jsxs(Box, Object.assign({ sx: { display: 'flex', flexDirection: 'column', justifyContent: 'space-between' } }, { children: [_jsx(RangeDatePicker, Object.assign({ values: values, onChange: onChange, isHijri: isHijri, ref: calendarRef, numberOfMonths: numberOfMonths }, rangeDatePickerProps)), _jsx(Collapse, Object.assign({ in: isError && Boolean(maxDateRange) }, { children: _jsx(Error, { error: t('dateRangeError', { number: maxDateRange }), sx: { marginInline: '16px', marginBottom: '16px' } }) })), _jsxs(Footer, Object.assign({ sx: { borderBottomLeftRadius: '8px' } }, { children: [!noTimezone ? (_jsx(TimeZone, { children: _jsx(CustomTimezone, { onChange: setSelectedTimezone, selectedTimezone: selectedTimezone, defaultTimezone: defaultTimezone, browserTimezone: browserTimezone }, String(open)) })) : (_jsx("div", {})), _jsxs(ButtonsWrapper, { children: [_jsx(CancelButton, Object.assign({ variant: "contained", onClick: onCloseCalender }, { children: t('cancel') })), _jsx(OkayButton, Object.assign({ variant: "contained", onClick: submitDate }, { children: t('okay') }))] })] }))] }))] }) }))] })));
100
+ } })), _jsx(Hijri, { isHijri: isHijri, onCalendarModeSwitch: onCalendarModeSwitch })] })] })), _jsxs(Box, Object.assign({ sx: { display: 'flex', flexDirection: 'column', justifyContent: 'space-between' } }, { children: [_jsx(RangeDatePicker, Object.assign({ values: values, onChange: onChange, isHijri: isHijri, ref: calendarRef, numberOfMonths: numberOfMonths }, rangeDatePickerProps)), _jsx(Collapse, Object.assign({ in: isError && Boolean(maxDateRange) }, { children: _jsx(Error, { error: t('dateRangeError', { number: maxDateRange }), sx: { marginInline: '16px', marginBottom: '16px' } }) })), _jsxs(Footer, Object.assign({ sx: { borderBottomLeftRadius: '8px' } }, { children: [!noTimezone ? (_jsx(TimeZone, { children: _jsx(CustomTimezone, { onChange: setSelectedTimezone, selectedTimezone: selectedTimezone, defaultTimezone: defaultTimezone, browserTimezone: browserTimezone }, String(open)) })) : (_jsx("div", {})), new DateObject(values[0]).dayOfYear === new DateObject(values[1]).dayOfYear && (_jsx(CustomTimePicker, { values: values, setValues: setValues })), _jsxs(ButtonsWrapper, { children: [_jsx(CancelButton, Object.assign({ variant: "contained", onClick: onCloseCalender }, { children: t('cancel') })), _jsx(OkayButton, Object.assign({ variant: "contained", onClick: submitDate }, { children: t('okay') }))] })] }))] }))] }) }))] })));
92
101
  }
93
102
  export default RangeCalender;
@@ -1,11 +1,7 @@
1
- import { DateObject } from 'react-multi-date-picker';
2
1
  import { Dates } from '../../type';
3
2
  interface CustomTimePickerProps {
4
3
  values: Dates;
5
- startTime: DateObject;
6
- endTime: DateObject;
7
- onChangeStartTime: (value: DateObject) => void;
8
- onChangeEndTime: (value: DateObject) => void;
4
+ setValues: (values: Dates) => void;
9
5
  }
10
- declare function CustomTimePicker({ values, onChangeStartTime, onChangeEndTime, startTime, endTime }: CustomTimePickerProps): import("react/jsx-runtime").JSX.Element;
6
+ declare function CustomTimePicker({ values, setValues }: CustomTimePickerProps): import("react/jsx-runtime").JSX.Element;
11
7
  export default CustomTimePicker;
@@ -1,33 +1,39 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useState, useEffect } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
- import DatePicker, { DateObject } from 'react-multi-date-picker';
5
- import TimePicker from 'react-multi-date-picker/plugins/time_picker';
4
+ import { DateObject } from 'react-multi-date-picker';
6
5
  import { IOSSwitch } from '../../../index.js';
6
+ import TimePicker, { convertTo12Hour, maxHour } from '../../../Timepicker';
7
7
  import { AllDayStyled, TimeArea, TimePickerWrapper, TimeAreaInner } from './style';
8
- function CustomTimePicker({ values, onChangeStartTime, onChangeEndTime, startTime, endTime }) {
9
- const [isAllDay, setIsAllDay] = useState(false);
10
- const [lastTime, setLastTime] = useState([startTime, endTime]);
8
+ import { getEndOfDate, getStartOfDate } from '../../utils';
9
+ function CustomTimePicker({ values, setValues }) {
11
10
  const { t } = useTranslation();
12
- useEffect(() => {
13
- if (isAllDay)
14
- setIsAllDay(new DateObject(values[0]).dayOfYear === new DateObject(values[1]).dayOfYear);
15
- }, [values]);
16
- return (_jsx(_Fragment, { children: new DateObject(values[0]).dayOfYear === new DateObject(values[1]).dayOfYear && (_jsx(TimeArea, { children: _jsxs(TimeAreaInner, { children: [_jsxs(AllDayStyled, Object.assign({ isAllDay: isAllDay }, { children: [_jsx("span", Object.assign({ className: "label" }, { children: t('allDay') })), _jsx(IOSSwitch, { checked: isAllDay, onChange: (e) => {
17
- setIsAllDay(!isAllDay);
18
- if (e.target.checked) {
19
- setLastTime([startTime, endTime]);
20
- onChangeStartTime(new DateObject().setHour(0).setMinute(0));
21
- onChangeEndTime(new DateObject().setHour(23).setMinute(59));
22
- }
23
- else {
24
- onChangeStartTime(lastTime[0]);
25
- onChangeEndTime(lastTime[1]);
26
- }
27
- } })] })), !isAllDay && (_jsxs(TimePickerWrapper, { children: [_jsx(DatePicker, { arrow: false, disableDayPicker: true, hideOnScroll: true, format: "hh:mma", value: startTime, onChange: (time) => {
28
- onChangeStartTime(time);
29
- }, type: "button", plugins: [_jsx(TimePicker, { position: "top", hideSeconds: true })] }), _jsx(DatePicker, { arrow: false, disableDayPicker: true, hideOnScroll: true, format: "hh:mma", value: endTime, onChange: (time) => {
30
- onChangeEndTime(time);
31
- }, type: "button", plugins: [_jsx(TimePicker, { position: "top", hideSeconds: true })] })] }))] }) })) }));
11
+ const startDate = new DateObject(values[0]);
12
+ const endDate = new DateObject(values[1]);
13
+ const [isAllDay, setIsAllDay] = useState(startDate.dayOfYear === endDate.dayOfYear && startDate.hour === 0 && startDate.minute === 0 && endDate.hour === 23 && endDate.minute === 59);
14
+ const formatHour = ({ period, hour }) => period === 'PM' && hour !== 12 ? hour + 12 : period === 'AM' && hour === 12 ? 0 : hour;
15
+ const onChangeStartTime = ({ hour, minute, period }) => {
16
+ setValues([startDate.setHour(formatHour({ hour, period })).setMinute(minute).setSecond(0), endDate]);
17
+ };
18
+ const onChangeEndTime = ({ hour, minute, period }) => {
19
+ setValues([startDate, endDate.setHour(formatHour({ hour, period })).setMinute(minute).setSecond(0)]);
20
+ };
21
+ return (_jsx(TimeArea, { children: _jsxs(TimeAreaInner, { children: [_jsxs(AllDayStyled, Object.assign({ isAllDay: isAllDay }, { children: [_jsx("span", Object.assign({ className: "label" }, { children: t('allDay') })), _jsx(IOSSwitch, { checked: isAllDay, onChange: (e) => {
22
+ setIsAllDay(!isAllDay);
23
+ if (e.target.checked) {
24
+ setValues([getStartOfDate(values[0]), getEndOfDate(values[1])]);
25
+ }
26
+ else {
27
+ setValues(values);
28
+ }
29
+ } })] })), !isAllDay && (_jsxs(TimePickerWrapper, { children: [_jsx(TimePicker, { defaultTime: {
30
+ hour: convertTo12Hour(startDate.hour),
31
+ minute: startDate.minute,
32
+ period: startDate.hour >= maxHour ? 'PM' : 'AM',
33
+ }, size: "small", onChange: onChangeStartTime, enableRealTimeChange: true }, `${values[0].toString()}-start`), _jsx(TimePicker, { defaultTime: {
34
+ hour: convertTo12Hour(endDate.hour),
35
+ minute: endDate.minute,
36
+ period: endDate.hour >= maxHour ? 'PM' : 'AM',
37
+ }, size: "small", onChange: onChangeEndTime, enableRealTimeChange: true }, `${values[1].toString()}-end`)] }))] }) }));
32
38
  }
33
39
  export default CustomTimePicker;
@@ -2,7 +2,7 @@
2
2
  export declare const AllDayStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
3
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
4
  }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
5
- isAllDay: boolean;
5
+ isAllDay?: boolean | undefined;
6
6
  }, {}, {}>;
7
7
  export declare const TimeArea: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
8
8
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
@@ -1,12 +1,4 @@
1
1
  import React from 'react';
2
- import { CalendarProps } from 'react-multi-date-picker';
3
- import { Dates } from '../../type';
4
- export interface RangeDatepickerProps extends Omit<CalendarProps, 'onChange'> {
5
- isAr?: boolean;
6
- isHijri: boolean;
7
- values: Dates;
8
- onChange: (v: Dates) => void;
9
- numberOfMonths?: number;
10
- }
2
+ import { RangeDatepickerProps } from './type';
11
3
  declare const _default: React.ForwardRefExoticComponent<Omit<RangeDatepickerProps, "ref"> & React.RefAttributes<unknown>>;
12
4
  export default _default;
@@ -1,2 +1,3 @@
1
1
  import RangeDatepicker from './RangeDatepicker';
2
+ export * from './type';
2
3
  export default RangeDatepicker;
@@ -1,2 +1,3 @@
1
1
  import RangeDatepicker from './RangeDatepicker';
2
+ export * from './type';
2
3
  export default RangeDatepicker;
@@ -0,0 +1,9 @@
1
+ import { CalendarProps } from 'react-multi-date-picker';
2
+ import { Dates } from '../../type';
3
+ export interface RangeDatepickerProps extends Omit<CalendarProps, 'onChange'> {
4
+ isAr?: boolean;
5
+ isHijri: boolean;
6
+ values: Dates;
7
+ onChange: (v: Dates) => void;
8
+ numberOfMonths?: number;
9
+ }
@@ -1,6 +1,10 @@
1
- /// <reference types="react-date-object" />
1
+ import DateObject from 'react-date-object';
2
+ import { Dates } from './type';
2
3
  export declare const getLocale: ({ isHijri, isAr }: {
3
4
  isHijri: boolean;
4
5
  isAr?: boolean | undefined;
5
6
  }) => import("react-date-object").Locale;
6
7
  export declare const getCalender: (isHijri: boolean) => import("react-date-object").Calendar;
8
+ export declare const getStartOfDate: (date: DateObject) => DateObject;
9
+ export declare const getEndOfDate: (date: DateObject) => DateObject;
10
+ export declare const getDateRange: (dates: [Date, Date]) => Dates;
@@ -1,9 +1,11 @@
1
+ import DateObject from 'react-date-object';
1
2
  import arabic from 'react-date-object/calendars/arabic';
2
3
  import gregorian from 'react-date-object/calendars/gregorian';
3
4
  import arabicAr from 'react-date-object/locales/arabic_ar';
4
5
  import arabicEn from 'react-date-object/locales/arabic_en';
5
6
  import gregorianAr from 'react-date-object/locales/gregorian_ar';
6
7
  import gregorianEn from 'react-date-object/locales/gregorian_en';
8
+ import { getDefaultDateRange } from '../../utils/index.js';
7
9
  export const getLocale = ({ isHijri, isAr = false }) => {
8
10
  if (isHijri) {
9
11
  return isAr ? arabicAr : arabicEn;
@@ -13,3 +15,12 @@ export const getLocale = ({ isHijri, isAr = false }) => {
13
15
  export const getCalender = (isHijri) => {
14
16
  return isHijri ? arabic : gregorian;
15
17
  };
18
+ export const getStartOfDate = (date) => date.setHour(0).setMinute(0).setSecond(0);
19
+ export const getEndOfDate = (date) => date.setHour(23).setMinute(59).setSecond(59);
20
+ export const getDateRange = (dates) => {
21
+ if (!((dates === null || dates === void 0 ? void 0 : dates[0]) instanceof Date) || !((dates === null || dates === void 0 ? void 0 : dates[1]) instanceof Date)) {
22
+ const [startDate, endDate] = getDefaultDateRange();
23
+ return [new DateObject(startDate), new DateObject(endDate)];
24
+ }
25
+ return [new DateObject(dates === null || dates === void 0 ? void 0 : dates[0]), new DateObject(dates === null || dates === void 0 ? void 0 : dates[1])];
26
+ };
@@ -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<{
@@ -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;
@@ -3,7 +3,7 @@ import { styled } from '@mui/material/styles';
3
3
  export const ChipStyled = styled(Box, {
4
4
  shouldForwardProp: (prop) => !['textColor', 'bgColor', 'borderColor', 'disabled', 'minWidth', 'padding', 'maxWidth', 'isSelected', 'disableAnimation'].includes(prop),
5
5
  })(({ theme, isSelected, textColor = theme.palette.text.primary, bgColor = '#EFF1F2', borderColor = '#EFF1F2', disabled = false, padding, minWidth, maxWidth, disableAnimation, }) => {
6
- return Object.assign(Object.assign({ display: 'flex', justifyContent: 'center', alignItems: 'center', gap: '4px', height: '18px', padding: padding || '0px 9.5px', borderRadius: '30px', border: `1px solid ${borderColor}`, backgroundColor: bgColor, color: textColor, cursor: disabled ? 'not-allowed' : 'pointer', opacity: disabled ? 0.5 : 1, whiteSpace: 'nowrap', fontSize: '11px', minWidth: minWidth || '67px', maxWidth: maxWidth || 'none', width: 'fit-content', overflow: 'hidden', textOverflow: maxWidth ? 'ellipsis' : 'unset', boxSizing: 'border-box' }, (isSelected && {
6
+ return Object.assign(Object.assign({ display: 'flex', justifyContent: 'center', alignItems: 'center', gap: '4px', height: '18px', padding: padding || '0px 8px', borderRadius: '30px', border: `1px solid ${borderColor}`, backgroundColor: bgColor, color: textColor, cursor: disabled ? 'not-allowed' : 'pointer', opacity: disabled ? 0.5 : 1, whiteSpace: 'nowrap', fontSize: '11px', minWidth: minWidth || '67px', maxWidth: maxWidth || 'none', width: 'fit-content', overflow: 'hidden', textOverflow: maxWidth ? 'ellipsis' : 'unset', boxSizing: 'border-box' }, (isSelected && {
7
7
  boxShadow: 'white 7px 0px 8px 2px',
8
8
  })), (disableAnimation && {
9
9
  transition: 'none !important',
@@ -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
  id?: 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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>, {}>;
@@ -7,6 +7,7 @@ interface TimePickerProps {
7
7
  defaultTime?: Time;
8
8
  onChange?: (time: Time) => void;
9
9
  enableRealTimeChange?: boolean;
10
+ size?: 'large' | 'small';
10
11
  }
11
- export declare function TimePicker({ onChange, defaultTime, enableRealTimeChange }: TimePickerProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function TimePicker({ onChange, defaultTime, enableRealTimeChange, size }: TimePickerProps): import("react/jsx-runtime").JSX.Element;
12
13
  export {};
@@ -1,14 +1,15 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState, useCallback, useEffect } from 'react';
2
+ import { useState, useEffect } from 'react';
3
3
  import ClickAwayListener from '@mui/material/ClickAwayListener';
4
4
  import Box from '@mui/material/Box';
5
5
  import Menu from '../Menu';
6
6
  import Text from '../Text';
7
7
  import { greyUpArrowIcon, greyDownArrowIcon } from '../../constants/index.js';
8
+ import { convertToNumber } from '../../utils/index.js';
8
9
  import { Arrow, Button, Period, PeriodWrapper, Wrapper, Time, TimeWrapper, Input } from './style';
9
10
  import { getDefaultHour, getDefaultMinute } from './utils';
10
11
  import { maxHour, maxMinute, periodList } from './constant';
11
- export function TimePicker({ onChange, defaultTime, enableRealTimeChange }) {
12
+ export function TimePicker({ onChange, defaultTime, enableRealTimeChange, size = 'large' }) {
12
13
  var _a, _b, _c;
13
14
  const [anchorEl, setAnchorEl] = useState(null);
14
15
  const [period, setPeriod] = useState((_a = defaultTime === null || defaultTime === void 0 ? void 0 : defaultTime.period) !== null && _a !== void 0 ? _a : (new Date().getHours() >= maxHour ? 'PM' : 'AM'));
@@ -31,13 +32,14 @@ export function TimePicker({ onChange, defaultTime, enableRealTimeChange }) {
31
32
  const onClickPeriod = (selectedPeriod) => {
32
33
  setPeriod(selectedPeriod);
33
34
  };
35
+ const formatTime = (time) => (time < 10 ? `0${time}` : time.toString());
34
36
  const onChangeHours = (e) => {
35
- const value = Number(e.target.value);
37
+ const value = convertToNumber(formatTime(Number(e.target.value)));
36
38
  if (value > maxHour) {
37
39
  e.preventDefault();
38
40
  return;
39
41
  }
40
- setHours(Number(e.target.value));
42
+ setHours(value);
41
43
  };
42
44
  const onIncreaseHours = () => {
43
45
  setHours((prev) => {
@@ -54,7 +56,7 @@ export function TimePicker({ onChange, defaultTime, enableRealTimeChange }) {
54
56
  });
55
57
  };
56
58
  const onChangeMinutes = (e) => {
57
- const value = Number(e.target.value);
59
+ const value = convertToNumber(formatTime(Number(e.target.value)));
58
60
  if (value > maxMinute) {
59
61
  e.preventDefault();
60
62
  return;
@@ -79,8 +81,7 @@ export function TimePicker({ onChange, defaultTime, enableRealTimeChange }) {
79
81
  return prev - 1;
80
82
  });
81
83
  };
82
- const formatTime = useCallback((time) => (time < 10 ? `0${time}` : time), []);
83
- return (_jsx(ClickAwayListener, Object.assign({ onClickAway: onClose }, { children: _jsxs(Box, { children: [_jsx(Button, Object.assign({ open: open, onClick: onOpen }, { children: `${formatTime(hours)}:${formatTime(minutes)}${period.toLowerCase()}` })), _jsx(Menu, Object.assign({ open: open, anchorEl: anchorEl, placement: "top-start", sx: { marginTop: '8px', marginBottom: '8px' } }, { children: _jsxs(Wrapper, { children: [_jsxs(TimeWrapper, { children: [_jsxs(Time, { children: [_jsx(Arrow, Object.assign({ onClick: onIncreaseHours }, { children: _jsx("img", { src: greyUpArrowIcon, alt: "arrow" }) })), _jsx(Input, { value: formatTime(hours), onChange: onChangeHours }), _jsx(Arrow, Object.assign({ onClick: onDecreaseHours }, { children: _jsx("img", { src: greyDownArrowIcon, alt: "arrow" }) }))] }), _jsx(Text, { children: ":" }), _jsxs(Time, { children: [_jsx(Arrow, Object.assign({ onClick: onIncreaseMinutes }, { children: _jsx("img", { src: greyUpArrowIcon, alt: "arrow" }) })), _jsx(Input, { value: formatTime(minutes), onChange: onChangeMinutes }), _jsx(Arrow, Object.assign({ onClick: onDecreaseMinutes }, { children: _jsx("img", { src: greyDownArrowIcon, alt: "arrow" }) }))] })] }), _jsx(PeriodWrapper, { children: periodList.map((item) => (_jsx(Period, Object.assign({ onClick: () => {
84
+ return (_jsx(ClickAwayListener, Object.assign({ onClickAway: onClose }, { children: _jsxs(Box, { children: [_jsx(Button, Object.assign({ size: size, open: open, onClick: onOpen }, { children: `${formatTime(hours)}:${formatTime(minutes)}${period.toLowerCase()}` })), _jsx(Menu, Object.assign({ open: open, anchorEl: anchorEl, placement: "top-start", sx: { marginTop: '8px', marginBottom: '8px' } }, { children: _jsxs(Wrapper, { children: [_jsxs(TimeWrapper, { children: [_jsxs(Time, { children: [_jsx(Arrow, Object.assign({ onClick: onIncreaseHours }, { children: _jsx("img", { src: greyUpArrowIcon, alt: "arrow" }) })), _jsx(Input, { value: formatTime(hours), onChange: onChangeHours }), _jsx(Arrow, Object.assign({ onClick: onDecreaseHours }, { children: _jsx("img", { src: greyDownArrowIcon, alt: "arrow" }) }))] }), _jsx(Text, { children: ":" }), _jsxs(Time, { children: [_jsx(Arrow, Object.assign({ onClick: onIncreaseMinutes }, { children: _jsx("img", { src: greyUpArrowIcon, alt: "arrow" }) })), _jsx(Input, { value: formatTime(minutes), onChange: onChangeMinutes }), _jsx(Arrow, Object.assign({ onClick: onDecreaseMinutes }, { children: _jsx("img", { src: greyDownArrowIcon, alt: "arrow" }) }))] })] }), _jsx(PeriodWrapper, { children: periodList.map((item) => (_jsx(Period, Object.assign({ onClick: () => {
84
85
  onClickPeriod(item);
85
86
  }, selected: period === item }, { children: item }), item))) })] }) }))] }) })));
86
87
  }
@@ -1,4 +1,5 @@
1
1
  import { TimePicker } from './Timepicker';
2
2
  export * from './utils';
3
3
  export * from './Timepicker';
4
+ export * from './constant';
4
5
  export default TimePicker;
@@ -1,4 +1,5 @@
1
1
  import { TimePicker } from './Timepicker';
2
2
  export * from './utils';
3
3
  export * from './Timepicker';
4
+ export * from './constant';
4
5
  export default TimePicker;
@@ -8,6 +8,7 @@ export declare const Button: import("@emotion/styled").StyledComponent<import("@
8
8
  component?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
9
9
  } & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
10
10
  open: boolean;
11
+ size: 'large' | 'small';
11
12
  }, {}, {}>;
12
13
  export declare const Arrow: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
13
14
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
@@ -10,7 +10,7 @@ export const Wrapper = styled(Box)(() => ({
10
10
  justifyContent: 'center',
11
11
  gap: '16px',
12
12
  }));
13
- export const Button = styled(Text, { shouldForwardProp: (props) => props !== 'open' })(({ theme, open }) => (Object.assign({ fontSize: '11px', fontWeight: 500, background: theme.palette.common.white, border: `1px solid ${theme.palette.divider}`, borderRadius: '19px', height: 32, width: 74, display: 'flex', alignItems: 'center', justifyContent: 'center', cursor: 'pointer' }, (open && { boxShadow: '0px 0px 4px 0px #1F88D080', borderColor: theme.palette.info.dark }))));
13
+ export const Button = styled(Text, { shouldForwardProp: (props) => props !== 'open' && props !== 'size' })(({ theme, open, size }) => (Object.assign({ fontSize: '11px', fontWeight: 500, background: theme.palette.common.white, border: `1px solid ${theme.palette.divider}`, borderRadius: '19px', height: size === 'large' ? 32 : 24, width: size === 'large' ? 74 : 58, display: 'flex', alignItems: 'center', justifyContent: 'center', cursor: 'pointer' }, (open && { boxShadow: '0px 0px 4px 0px #1F88D080', borderColor: theme.palette.info.dark }))));
14
14
  export const Arrow = styled(Box)(() => ({
15
15
  textAlign: 'center',
16
16
  cursor: 'pointer',
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  interface TableWrapperProps {
4
3
  showNoDataView?: boolean;
5
4
  }
@@ -4,10 +4,80 @@ export declare const merchantsTableCellWidth: {
4
4
  readonly text: "225px";
5
5
  readonly sheet: "225px";
6
6
  };
7
+ readonly lead_id: {
8
+ readonly default: "180px";
9
+ readonly text: "180px";
10
+ readonly sheet: "225px";
11
+ };
12
+ readonly merchant_id: {
13
+ readonly default: "180px";
14
+ readonly text: "180px";
15
+ readonly sheet: "260px";
16
+ };
17
+ readonly brand_id: {
18
+ readonly default: "180px";
19
+ readonly text: "180px";
20
+ readonly sheet: "225px";
21
+ };
22
+ readonly individual_email: {
23
+ readonly default: "180px";
24
+ readonly text: "180px";
25
+ readonly sheet: "151px";
26
+ };
27
+ readonly personal_id_type: {
28
+ readonly default: "180px";
29
+ readonly text: "180px";
30
+ readonly sheet: "126px";
31
+ };
32
+ readonly wallet_currency: {
33
+ readonly default: "180px";
34
+ readonly text: "180px";
35
+ readonly sheet: "140px";
36
+ };
37
+ readonly wallet_id: {
38
+ readonly default: "180px";
39
+ readonly text: "180px";
40
+ readonly sheet: "235px";
41
+ };
42
+ readonly business_id: {
43
+ readonly default: "180px";
44
+ readonly text: "180px";
45
+ readonly sheet: "210px";
46
+ };
47
+ readonly board_id: {
48
+ readonly default: "180px";
49
+ readonly text: "180px";
50
+ readonly sheet: "230px";
51
+ };
52
+ readonly history: {
53
+ readonly default: "180px";
54
+ readonly text: "180px";
55
+ readonly sheet: "130px";
56
+ };
57
+ readonly bank_account: {
58
+ readonly default: "180px";
59
+ readonly text: "180px";
60
+ readonly sheet: "110px";
61
+ };
62
+ readonly individual_phone_number: {
63
+ readonly default: "180px";
64
+ readonly text: "180px";
65
+ readonly sheet: "175px";
66
+ };
67
+ readonly entity_legal_name: {
68
+ readonly default: "180px";
69
+ readonly text: "180px";
70
+ readonly sheet: "192px";
71
+ };
72
+ readonly entity_id: {
73
+ readonly default: "180px";
74
+ readonly text: "180px";
75
+ readonly sheet: "225px";
76
+ };
7
77
  readonly entity: {
8
78
  readonly default: "137px";
9
79
  readonly text: "180px";
10
- readonly sheet: "235px";
80
+ readonly sheet: "234px";
11
81
  };
12
82
  readonly created: {
13
83
  readonly default: "144px";
@@ -17,7 +87,7 @@ export declare const merchantsTableCellWidth: {
17
87
  readonly brands: {
18
88
  readonly default: "131px";
19
89
  readonly text: "140px";
20
- readonly sheet: "170px";
90
+ readonly sheet: "185px";
21
91
  };
22
92
  readonly marketplace: {
23
93
  readonly default: "110px";
@@ -27,7 +97,7 @@ export declare const merchantsTableCellWidth: {
27
97
  readonly individuals: {
28
98
  readonly default: "147px";
29
99
  readonly text: "185px";
30
- readonly sheet: "200px";
100
+ readonly sheet: "203px";
31
101
  };
32
102
  readonly segments: {
33
103
  readonly default: "70px";
@@ -67,11 +137,11 @@ export declare const merchantsTableCellWidth: {
67
137
  readonly channels: {
68
138
  readonly default: "94px";
69
139
  readonly text: "120px";
70
- readonly sheet: "510px";
140
+ readonly sheet: "1200px";
71
141
  };
72
142
  readonly merchant: {
73
143
  readonly default: "175px";
74
144
  readonly text: "180px";
75
- readonly sheet: "235px";
145
+ readonly sheet: "153px";
76
146
  };
77
147
  };
@@ -4,10 +4,80 @@ export const merchantsTableCellWidth = {
4
4
  text: '225px',
5
5
  sheet: '225px',
6
6
  },
7
+ lead_id: {
8
+ default: '180px',
9
+ text: '180px',
10
+ sheet: '225px',
11
+ },
12
+ merchant_id: {
13
+ default: '180px',
14
+ text: '180px',
15
+ sheet: '260px',
16
+ },
17
+ brand_id: {
18
+ default: '180px',
19
+ text: '180px',
20
+ sheet: '225px',
21
+ },
22
+ individual_email: {
23
+ default: '180px',
24
+ text: '180px',
25
+ sheet: '151px',
26
+ },
27
+ personal_id_type: {
28
+ default: '180px',
29
+ text: '180px',
30
+ sheet: '126px',
31
+ },
32
+ wallet_currency: {
33
+ default: '180px',
34
+ text: '180px',
35
+ sheet: '140px',
36
+ },
37
+ wallet_id: {
38
+ default: '180px',
39
+ text: '180px',
40
+ sheet: '235px',
41
+ },
42
+ business_id: {
43
+ default: '180px',
44
+ text: '180px',
45
+ sheet: '210px',
46
+ },
47
+ board_id: {
48
+ default: '180px',
49
+ text: '180px',
50
+ sheet: '230px',
51
+ },
52
+ history: {
53
+ default: '180px',
54
+ text: '180px',
55
+ sheet: '130px',
56
+ },
57
+ bank_account: {
58
+ default: '180px',
59
+ text: '180px',
60
+ sheet: '110px',
61
+ },
62
+ individual_phone_number: {
63
+ default: '180px',
64
+ text: '180px',
65
+ sheet: '175px',
66
+ },
67
+ entity_legal_name: {
68
+ default: '180px',
69
+ text: '180px',
70
+ sheet: '192px',
71
+ },
72
+ entity_id: {
73
+ default: '180px',
74
+ text: '180px',
75
+ sheet: '225px',
76
+ },
7
77
  entity: {
8
78
  default: '137px',
9
79
  text: '180px',
10
- sheet: '235px',
80
+ sheet: '234px',
11
81
  },
12
82
  created: {
13
83
  default: '144px',
@@ -17,7 +87,7 @@ export const merchantsTableCellWidth = {
17
87
  brands: {
18
88
  default: '131px',
19
89
  text: '140px',
20
- sheet: '170px',
90
+ sheet: '185px',
21
91
  },
22
92
  marketplace: {
23
93
  default: '110px',
@@ -27,7 +97,7 @@ export const merchantsTableCellWidth = {
27
97
  individuals: {
28
98
  default: '147px',
29
99
  text: '185px',
30
- sheet: '200px',
100
+ sheet: '203px',
31
101
  },
32
102
  segments: {
33
103
  default: '70px',
@@ -67,11 +137,11 @@ export const merchantsTableCellWidth = {
67
137
  channels: {
68
138
  default: '94px',
69
139
  text: '120px',
70
- sheet: '510px',
140
+ sheet: '1200px',
71
141
  },
72
142
  merchant: {
73
143
  default: '175px',
74
144
  text: '180px',
75
- sheet: '235px',
145
+ sheet: '153px',
76
146
  },
77
147
  };
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.183",
5
- "testVersion": 0,
4
+ "version": "0.1.185-test.1",
5
+ "testVersion": 1,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",
@@ -163,4 +163,4 @@
163
163
  "publishConfig": {
164
164
  "registry": "https://registry.npmjs.org/"
165
165
  }
166
- }
166
+ }