@tap-payments/os-micro-frontend-shared 0.3.245 → 0.3.246

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 (95) hide show
  1. package/build/_chunks/chunk-2K4GOQNK.js +2 -0
  2. package/build/_chunks/{chunk-C76GGOHP.js → chunk-366SHD2Z.js} +1 -1
  3. package/build/_chunks/{chunk-MQN2MT2R.js → chunk-3NUBEJJA.js} +1 -1
  4. package/build/_chunks/{chunk-3DFGUAHQ.js → chunk-4VGIPNYZ.js} +1 -1
  5. package/build/_chunks/{chunk-RTBDYNH2.js → chunk-A2EIPJEB.js} +1 -1
  6. package/build/_chunks/chunk-OGUTYP7U.js +1 -0
  7. package/build/_chunks/{chunk-GFHD4JQA.js → chunk-P3DNTJ2A.js} +1 -1
  8. package/build/_chunks/chunk-TXE2HSXL.js +1 -0
  9. package/build/components/AppServices/index.js +1 -1
  10. package/build/components/AppServicesBar/index.js +1 -1
  11. package/build/components/AppWindowWrapper/index.js +1 -1
  12. package/build/components/Calender/Calender.d.ts +2 -0
  13. package/build/components/ColumnViews/index.js +1 -1
  14. package/build/components/DateFilter/DateFilter.d.ts +4 -0
  15. package/build/components/DateFilter/index.js +1 -1
  16. package/build/components/FilterDropdown/index.js +1 -1
  17. package/build/components/JSONViewer/index.js +1 -1
  18. package/build/components/ListColumnFilter/index.js +1 -1
  19. package/build/components/ListHeader/index.js +1 -1
  20. package/build/components/ListHeader/types.d.ts +16 -0
  21. package/build/components/PaymentSourceFilter/index.js +1 -1
  22. package/build/components/PhoneFilter/index.js +1 -1
  23. package/build/components/RangeCalender/RangeCalender.d.ts +4 -0
  24. package/build/components/RangeCalender/components/Timezone/Timezone.d.ts +1 -0
  25. package/build/components/RangeCalender/components/Timezone/components/EntitiesTimezone.d.ts +1 -0
  26. package/build/components/RangeCalender/components/Timezone/components/UserTimezone.d.ts +1 -0
  27. package/build/components/RangeCalender/index.js +1 -1
  28. package/build/components/RangeCalender/type.d.ts +1 -0
  29. package/build/components/ReferenceTypeFilter/index.js +1 -1
  30. package/build/components/StatusFilter/index.js +1 -1
  31. package/build/components/StatusIcons/index.js +1 -1
  32. package/build/components/TableCells/CustomCells/DateCell/DateCell.d.ts +2 -0
  33. package/build/components/TableCells/CustomCells/DateCell/DateViewer.d.ts +4 -0
  34. package/build/components/TableCells/CustomCells/DueDateCell/DueDateCell.d.ts +1 -0
  35. package/build/components/TableCells/CustomCells/DueDateCell/type.d.ts +1 -0
  36. package/build/components/TableCells/CustomCells/InvoiceStatusCell/InvoiceStatusCell.d.ts +1 -0
  37. package/build/components/TableCells/CustomCells/PayoutDateCell/PayoutDateCell.d.ts +4 -0
  38. package/build/components/TableCells/CustomCells/RefundStatusCell/RefundStatusCell.d.ts +1 -0
  39. package/build/components/TableCells/CustomCells/RefundStatusCell/type.d.ts +2 -0
  40. package/build/components/TableCells/CustomCells/type.d.ts +1 -0
  41. package/build/components/TableCells/index.js +1 -1
  42. package/build/components/TableReports/index.js +1 -1
  43. package/build/components/Timepicker/Timepicker.d.ts +2 -0
  44. package/build/components/TreeDropdown/index.js +1 -1
  45. package/build/components/VerificationIcon/index.js +1 -1
  46. package/build/components/ViewColumnRadioFilter/index.js +1 -1
  47. package/build/components/VirtualTables/index.js +1 -1
  48. package/build/components/Widget/index.js +1 -1
  49. package/build/components/index.js +1 -1
  50. package/build/constants/timezones.d.ts +12 -0
  51. package/build/datetime/calendar.d.ts +4 -0
  52. package/build/datetime/components/DateRangeCalendar/CalendarModeToggle.d.ts +8 -0
  53. package/build/datetime/components/DateRangeCalendar/DateRangeCalendar.d.ts +8 -0
  54. package/build/datetime/components/DateRangeCalendar/GroupByMenu.d.ts +3 -0
  55. package/build/datetime/components/DateRangeCalendar/RangeDatePicker.d.ts +6 -0
  56. package/build/datetime/components/DateRangeCalendar/RangePresets.d.ts +5 -0
  57. package/build/datetime/components/DateRangeCalendar/RangeTimePicker.d.ts +4 -0
  58. package/build/datetime/components/DateRangeCalendar/TimePicker/TimePicker.d.ts +16 -0
  59. package/build/datetime/components/DateRangeCalendar/TimePicker/clock.d.ts +5 -0
  60. package/build/datetime/components/DateRangeCalendar/TimePicker/index.d.ts +3 -0
  61. package/build/datetime/components/DateRangeCalendar/TimePicker/style.d.ts +30 -0
  62. package/build/datetime/components/DateRangeCalendar/context.d.ts +35 -0
  63. package/build/datetime/components/DateRangeCalendar/index.d.ts +4 -0
  64. package/build/datetime/components/DateRangeCalendar/style.d.ts +73 -0
  65. package/build/datetime/components/DateRangeCalendar/types.d.ts +24 -0
  66. package/build/datetime/components/DateRangeCalendar/utils.d.ts +18 -0
  67. package/build/datetime/components/ZonePicker/EntityZonesGroup.d.ts +11 -0
  68. package/build/datetime/components/ZonePicker/LocalZoneOption.d.ts +9 -0
  69. package/build/datetime/components/ZonePicker/ZonePicker.d.ts +15 -0
  70. package/build/datetime/components/ZonePicker/style.d.ts +21 -0
  71. package/build/datetime/components/ZonedDateCell/ZonedDateCell.d.ts +17 -0
  72. package/build/datetime/components/ZonedDateViewer/ZonedDateViewer.d.ts +18 -0
  73. package/build/datetime/components/ZonedDateViewer/style.d.ts +4 -0
  74. package/build/datetime/components/index.d.ts +6 -0
  75. package/build/datetime/components/index.js +1 -0
  76. package/build/datetime/components/types.d.ts +13 -0
  77. package/build/datetime/dayjsSetup.d.ts +3 -0
  78. package/build/datetime/format.d.ts +8 -0
  79. package/build/datetime/index.d.ts +10 -0
  80. package/build/datetime/index.js +1 -0
  81. package/build/datetime/instant.d.ts +4 -0
  82. package/build/datetime/range.d.ts +18 -0
  83. package/build/datetime/types.d.ts +12 -0
  84. package/build/datetime/wallClock.d.ts +46 -0
  85. package/build/datetime/wireEpoch.d.ts +12 -0
  86. package/build/datetime/zone.d.ts +59 -0
  87. package/build/datetime/zoneOffset.d.ts +15 -0
  88. package/build/index.js +1 -1
  89. package/build/types/appConfig.d.ts +4 -0
  90. package/build/utils/date.d.ts +32 -13
  91. package/build/utils/localStorage.d.ts +2 -0
  92. package/build/utils/payout.d.ts +9 -0
  93. package/build/utils/timezone.d.ts +7 -0
  94. package/package.json +9 -1
  95. package/build/_chunks/chunk-SG4DATMS.js +0 -2
@@ -0,0 +1,30 @@
1
+ /// <reference types="react" />
2
+ export declare const TimePickerWrapper: 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
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
5
+ export declare const TimePickerDigit: import("@emotion/styled").StyledComponent<Omit<Omit<import("../../../../components/primitives").TypographyProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref"> & {
6
+ ref?: import("react").RefObject<HTMLElement> | ((instance: HTMLElement | null) => void) | null | undefined;
7
+ } & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
8
+ open: boolean;
9
+ size: 'large' | 'small';
10
+ }, {}, {}>;
11
+ export declare const TimePickerArrow: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
12
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
13
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
14
+ export declare const TimePickerPeriod: import("@emotion/styled").StyledComponent<Omit<Omit<import("../../../../components/primitives").TypographyProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref"> & {
15
+ ref?: import("react").RefObject<HTMLElement> | ((instance: HTMLElement | null) => void) | null | undefined;
16
+ } & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
17
+ selected: boolean;
18
+ }, {}, {}>;
19
+ export declare const TimePickerPeriods: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
20
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
21
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
22
+ export declare const TimePickerColumns: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
23
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
24
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
25
+ export declare const TimePickerColumn: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
26
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
27
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
28
+ export declare const TimePickerInput: import("@emotion/styled").StyledComponent<Omit<Omit<import("../../../../components/primitives").InputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & {
29
+ ref?: ((instance: HTMLInputElement | null) => void) | import("react").RefObject<HTMLInputElement> | null | undefined;
30
+ } & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -0,0 +1,35 @@
1
+ import { MutableRefObject, MouseEvent } from 'react';
2
+ import { CalendarRef, DateObject } from 'react-multi-date-picker';
3
+ import type { ZoneRef } from '../../zone';
4
+ import type { GroupByOption } from '../types';
5
+ import type { DateRangeCalendarProps } from './types';
6
+ export interface DateRangeCalendarContextValue {
7
+ /** The pair being edited. Not yet the caller's: it only becomes a range on apply. */
8
+ draft: [DateObject, DateObject];
9
+ /** The user's all-day choice, or what an incoming `range` seeded. Never re-derived from the bounds. */
10
+ isAllDay: boolean;
11
+ isSameDay: boolean;
12
+ isError: boolean;
13
+ maxRangeDays: number;
14
+ open: boolean;
15
+ anchorEl: HTMLElement | null;
16
+ pickedZone: ZoneRef;
17
+ selectedGroupBy: GroupByOption;
18
+ calendarRef: MutableRefObject<CalendarRef | null>;
19
+ maxDate: Date | undefined;
20
+ /** The applied pair as the trigger spells it. */
21
+ rangeLabel: string | undefined;
22
+ pickRange: (next: DateObject[]) => void;
23
+ pickPreset: (next: [DateObject, DateObject]) => void;
24
+ setTimes: (next: [DateObject, DateObject]) => void;
25
+ setAllDay: (checked: boolean) => void;
26
+ pickZone: (next: ZoneRef) => void;
27
+ setGroupBy: (next: GroupByOption) => void;
28
+ openPicker: (event: MouseEvent<HTMLElement>) => void;
29
+ closePicker: () => void;
30
+ apply: () => void;
31
+ }
32
+ export declare const DateRangeCalendarContext: import("react").Context<DateRangeCalendarContextValue | null>;
33
+ export declare function useDateRangeCalendar(): DateRangeCalendarContextValue;
34
+ /** The picker's own draft in one place: the pair, the all-day flag, the zone, the open state and the ops. */
35
+ export declare function useDateRangeCalendarState({ zone, range, onApply, calendarMode, maxRangeDays: maxRangeDaysProp, groupBy, onGroupByChange, }: Readonly<DateRangeCalendarProps>): DateRangeCalendarContextValue;
@@ -0,0 +1,4 @@
1
+ export { default as DateRangeCalendar } from './DateRangeCalendar';
2
+ export { useDateRangeCalendar } from './context';
3
+ export type { DateRangeCalendarContextValue } from './context';
4
+ export type { DateRangeCalendarProps } from './types';
@@ -0,0 +1,73 @@
1
+ /// <reference types="react" />
2
+ export declare const CalenderWrapper: 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
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
5
+ export declare const CancelButton: import("@emotion/styled").StyledComponent<import("@mui/material/Button").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
6
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
7
+ }, "color" | "disabled" | "classes" | "className" | "style" | "tabIndex" | "children" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "variant" | "size" | "startIcon" | "endIcon" | "fullWidth" | "href" | "disableFocusRipple" | "disableElevation"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
8
+ export declare const OkayButton: import("@emotion/styled").StyledComponent<import("@mui/material/Button").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
9
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
10
+ }, "color" | "disabled" | "classes" | "className" | "style" | "tabIndex" | "children" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "variant" | "size" | "startIcon" | "endIcon" | "fullWidth" | "href" | "disableFocusRipple" | "disableElevation"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
11
+ export declare const ButtonsWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
12
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
13
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
14
+ export declare const SelectedDate: import("@emotion/styled").StyledComponent<import("@mui/material/Button").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
15
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
16
+ }, "color" | "disabled" | "classes" | "className" | "style" | "tabIndex" | "children" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "variant" | "size" | "startIcon" | "endIcon" | "fullWidth" | "href" | "disableFocusRipple" | "disableElevation"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
17
+ open: boolean;
18
+ }, {}, {}>;
19
+ export declare const Footer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
20
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
21
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
22
+ export declare const FiltersArea: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
23
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
24
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
25
+ export declare const TimeZone: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
26
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
27
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
28
+ export declare const Main: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
29
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
30
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
31
+ export declare const Settings: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
32
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
33
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
34
+ export declare const GroupByLabel: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
35
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
36
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
37
+ export declare const GroupByDropdownButton: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
38
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
39
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
40
+ open: boolean;
41
+ }, {}, {}>;
42
+ export declare const GroupByDropdown: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
43
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
44
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
45
+ export declare const GroupByOptionButton: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
46
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
47
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
48
+ export declare const CalendarModeToggleWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
49
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
50
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
51
+ export declare const ArrowButton: import("@emotion/styled").StyledComponent<import("@mui/material/Button").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
52
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
53
+ }, "color" | "disabled" | "classes" | "className" | "style" | "tabIndex" | "children" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "variant" | "size" | "startIcon" | "endIcon" | "fullWidth" | "href" | "disableFocusRipple" | "disableElevation"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
54
+ export declare const PresetButton: import("@emotion/styled").StyledComponent<import("@mui/material/Button").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
55
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
56
+ }, "color" | "disabled" | "classes" | "className" | "style" | "tabIndex" | "children" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "variant" | "size" | "startIcon" | "endIcon" | "fullWidth" | "href" | "disableFocusRipple" | "disableElevation"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
57
+ export declare const PresetsWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
58
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
59
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
60
+ export declare const AllDayToggle: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
61
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
62
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
63
+ isAllDay?: boolean | undefined;
64
+ }, {}, {}>;
65
+ export declare const RangeTimeArea: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
66
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
67
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
68
+ export declare const RangeTimePickers: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
69
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
70
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
71
+ export declare const RangeTimeAreaInner: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
72
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
73
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -0,0 +1,24 @@
1
+ import type { CalendarMode } from '../../calendar';
2
+ import type { ZoneRef } from '../../zone';
3
+ import type { DateRangeSelection, GroupByOption } from '../types';
4
+ export interface DateRangeCalendarProps {
5
+ /** The pick zone, with the country it was picked as. Applied once on apply, to the bounds — and emitted for the caller to keep for display. */
6
+ zone: ZoneRef;
7
+ /** The range to show: a pair of moments, each read on `zone`'s clock to get the day it displays. */
8
+ range: [Date, Date];
9
+ /**
10
+ * Fires on apply with the picked dates and the picked zone, kept apart. Return `false` to reject:
11
+ * the draft is kept and the picker stays open, i.e. the caller applies, not the calendar.
12
+ */
13
+ onApply: (selection: DateRangeSelection) => boolean | void;
14
+ calendarMode?: CalendarMode;
15
+ onCalendarModeChange?: (mode: CalendarMode) => void;
16
+ /** Day cap for a pick: `undefined` = 31, `0` = unlimited. */
17
+ maxRangeDays?: number;
18
+ groupBy?: GroupByOption;
19
+ onGroupByChange?: (value: GroupByOption) => void;
20
+ /** Offered as the zone picker's default entity entry. */
21
+ defaultCountryZone?: ZoneRef;
22
+ /** Segment ISO country codes → the zone picker's entity-zones group. */
23
+ countryCodes?: string[];
24
+ }
@@ -0,0 +1,18 @@
1
+ import DateObject from 'react-date-object';
2
+ import type { CalendarMode } from '../../calendar';
3
+ import type { ZoneId } from '../../zone';
4
+ export declare const calendarLocaleOf: (mode: CalendarMode) => import("react-date-object").Locale;
5
+ export declare const calendarSystemOf: (mode: CalendarMode) => import("react-date-object").Calendar;
6
+ /** A calendar day → the calendar's `DateObject`. A hijri calendar renders the day's fields as hijri. */
7
+ export declare const toDateObject: (date: Date | undefined, mode: CalendarMode) => DateObject | undefined;
8
+ /** The committed prop range as `DateObject`s: each bound read on `zone`'s clock, the way it was placed. */
9
+ export declare const rangeToDateObjects: (range: [Date, Date], mode: CalendarMode, zone: ZoneId) => [DateObject, DateObject];
10
+ /**
11
+ * Whole days between two dates, read off their calendar fields — not an instant difference: the
12
+ * pair spans 23 or 25 hours across a DST change, and the limit counts days, not elapsed time.
13
+ */
14
+ export declare const daysBetween: (from: Date, to: Date) => number;
15
+ export declare const setStartOfDay: (date: DateObject) => DateObject;
16
+ export declare const setEndOfDay: (date: DateObject) => DateObject;
17
+ /** Whether both bounds sit on the same displayed day — the gate for the time editors. */
18
+ export declare const isSameDay: (values: [DateObject, DateObject]) => boolean;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import type { ZoneRef } from '../../zone';
3
+ interface EntityZonesGroupProps {
4
+ zone: ZoneRef;
5
+ onChange: (zone: ZoneRef) => void;
6
+ defaultCountryZone: ZoneRef;
7
+ countryCodes: string[];
8
+ }
9
+ /** The segment's zones: one row that expands on hover to pick among the countries' zones. */
10
+ export default function EntityZonesGroup({ zone, onChange, defaultCountryZone, countryCodes }: EntityZonesGroupProps): import("react").JSX.Element;
11
+ export {};
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { ZoneRef } from '../../zone';
3
+ interface LocalZoneOptionProps {
4
+ zone: ZoneRef;
5
+ onChange: (zone: ZoneRef) => void;
6
+ }
7
+ /** The browser's own zone as a pick; hidden where `Intl` cannot name one. */
8
+ export default function LocalZoneOption({ zone, onChange }: LocalZoneOptionProps): import("react").JSX.Element | null;
9
+ export {};
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import type { ZoneRef } from '../../zone';
3
+ interface ZonePickerProps {
4
+ /** The currently picked pair (the calendar's draft). */
5
+ zone: ZoneRef;
6
+ onChange: (zone: ZoneRef) => void;
7
+ /** Offered as the entity group's default entry. */
8
+ defaultCountryZone: ZoneRef;
9
+ /** Segment ISO country codes → the entity-zones group. */
10
+ countryCodes: string[];
11
+ }
12
+ /** Two-group zone menu: the segment's entity zones plus the user's own zone. */
13
+ declare function ZonePicker({ zone, onChange, defaultCountryZone, countryCodes }: ZonePickerProps): import("react").JSX.Element;
14
+ declare const _default: import("react").MemoExoticComponent<typeof ZonePicker>;
15
+ export default _default;
@@ -0,0 +1,21 @@
1
+ /// <reference types="react" />
2
+ export declare const TimezoneWrapper: 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
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
5
+ export declare const TimezoneDropdown: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
6
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
7
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
8
+ export declare const SelectedTimezone: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
9
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
10
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
11
+ open: boolean;
12
+ }, {}, {}>;
13
+ export declare const TimezoneElement: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").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/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
16
+ export declare const Space: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
17
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
18
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
19
+ export declare const Label: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
20
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
21
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import type { TableCellProps } from '@mui/material/TableCell';
3
+ import type { CalendarFormats } from '../../calendar';
4
+ import type { DateInput } from '../../types';
5
+ import type { ZoneId } from '../../zone';
6
+ interface ZonedDateCellProps extends TableCellProps {
7
+ /** The instant to display, formatted in `zone`. */
8
+ value?: DateInput;
9
+ zone: ZoneId;
10
+ format: CalendarFormats;
11
+ }
12
+ /**
13
+ * The bare zone-aware date cell: text straight into the cell, no container. This is the shape
14
+ * `PayoutDateCell` had, kept for callers whose column had no flag slot to wrap.
15
+ */
16
+ declare function ZonedDateCell({ value, zone, format, ...props }: ZonedDateCellProps): import("react").JSX.Element;
17
+ export default ZonedDateCell;
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from 'react';
2
+ import type { TableCellProps } from '@mui/material/TableCell';
3
+ import type { TableMode } from '../../../types/table';
4
+ import type { CalendarFormats } from '../../calendar';
5
+ import type { DateInput } from '../../types';
6
+ import type { ZoneId } from '../../zone';
7
+ interface ZonedDateViewerProps extends TableCellProps {
8
+ /** The instant to display, formatted in `zone`. Ignored when `rendered` is given. */
9
+ value?: DateInput;
10
+ zone: ZoneId;
11
+ format?: CalendarFormats;
12
+ /** Pre-formatted content, for callers that already built their label. */
13
+ rendered?: ReactNode;
14
+ tableMode?: TableMode;
15
+ }
16
+ /** The plain zone-aware date cell — no flag, no tooltip. */
17
+ declare function ZonedDateViewer({ value, zone, format, rendered, tableMode, ...props }: ZonedDateViewerProps): import("react").JSX.Element;
18
+ export default ZonedDateViewer;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const ViewerContainer: 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
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -0,0 +1,6 @@
1
+ export { DateRangeCalendar } from './DateRangeCalendar';
2
+ export type { DateRangeCalendarProps } from './DateRangeCalendar';
3
+ export { default as ZonePicker } from './ZonePicker/ZonePicker';
4
+ export { default as ZonedDateCell } from './ZonedDateCell/ZonedDateCell';
5
+ export { default as ZonedDateViewer } from './ZonedDateViewer/ZonedDateViewer';
6
+ export type { DateRangeSelection, GroupByOption } from './types';
@@ -0,0 +1 @@
1
+ import {a as a$1}from'../../_chunks/chunk-OGUTYP7U.js';import {a}from'../../_chunks/chunk-26JDD265.js';import {b}from'../../_chunks/chunk-GDTR32HP.js';import {j,L,B,x,R as R$1,h as h$1}from'../../_chunks/chunk-AJJSWLJL.js';import {t,r,v as v$1,w,u,h,j as j$1,b as b$1,k,i}from'../../_chunks/chunk-TXE2HSXL.js';import {Bc,Wa,Ka}from'../../_chunks/chunk-BYJ7JVY3.js';import {Vj,Wj,Xj,Yj,Wc,dc,fc,ec,dl,el}from'../../_chunks/chunk-4FJ26UVI.js';import'../../_chunks/chunk-ZDBICST5.js';import {memo,createContext,useState,useMemo,useId,useRef,useEffect,useContext}from'react';import y from'@mui/material/Box';import lt from'@mui/material/Popper';import {useTranslation}from'react-i18next';import mt from'@mui/material/ClickAwayListener';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';import U from'@mui/material/Button';import {Calendar,DateObject}from'react-multi-date-picker';import Ee from'react-date-object';import xt from'react-date-object/calendars/arabic';import yt from'react-date-object/calendars/gregorian';import bt from'react-date-object/locales/arabic_en';import Ct from'react-date-object/locales/gregorian_en';var ao=styled(y)(()=>({'[class$="-IndicatorsContainer2"]':{display:"none"},"#react-select-2-listbox":{width:300}})),fe=styled(y)(({theme:e})=>({borderRadius:e.spacing(.5),border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,boxShadow:e.shadows[10],minWidth:200,width:"max-content",overflow:"auto"})),io=styled(y,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:o})=>({width:156,fontSize:"11px",color:e.palette.text.primary,border:"1px solid",borderColor:e.palette.divider,minHeight:32,borderRadius:"4px",padding:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",cursor:"pointer",display:"flex",alignItems:"center",gap:e.spacing(1),fontWeight:500,...o&&{borderRadius:"4px",boxShadow:e.shadows[7],border:"1px solid",borderColor:e.palette.info.dark,background:e.palette.common.white},span:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}})),V=styled(y)(({theme:e})=>({padding:e.spacing(1),color:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",gap:e.spacing(1),height:33,cursor:"pointer","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"},"&+&":{borderTop:"1px solid",borderColor:e.palette.divider},"&.active span":{fontWeight:500},span:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}})),$=styled(y)(()=>({width:12,height:12})),_=styled(y)(({theme:e})=>({fontSize:"11px",color:e.palette.text.secondary,lineHeight:"15.03px","&.selected":{color:e.palette.info.dark}}));function Re({zone:e,onChange:o,defaultCountryZone:r,countryCodes:n}){let[p,l]=useState(null),a$1=m=>{p||l(m.currentTarget);},i=()=>{p&&l(null);},t=(m,k)=>{m.stopPropagation(),o(k);},g=useMemo(()=>n.map(u).filter(m=>!!m),[n]),c=g.some(m=>v$1(m,e)),x=c?e:r;return jsxs(V,{onMouseEnter:a$1,onMouseLeave:i,onClick:()=>{o(x);},children:[c?jsx("img",{src:Yj,alt:"icon"}):jsx($,{}),jsx("img",{src:Wj,alt:"entity-timezone"}),jsx(a,{countryCode:x.countryCode}),jsx(_,{className:c?"selected":"",children:w(x)}),jsx(lt,{open:!!p,anchorEl:p,placement:"right-start",sx:{zIndex:3},disablePortal:true,children:jsx(fe,{sx:{maxHeight:300},children:g.map(m=>{let k=v$1(m,e);return jsxs(V,{onClick:G=>{t(G,m);},sx:{gap:"4px"},children:[k?jsx("img",{src:Yj,alt:"icon"}):jsx($,{}),jsx(a,{countryCode:m.countryCode}),jsx(_,{className:k?"selected":"",children:w(m)})]},m.countryCode)})})})]})}function ve({zone:e,onChange:o}){let r$1=t(r());if(!r$1)return null;let n=v$1(r$1,e);return jsxs(V,{onClick:()=>o(r$1),children:[n?jsx("img",{src:Yj,alt:"icon"}):jsx($,{}),jsx("img",{src:Vj,alt:"user-timezone"}),jsx(a,{countryCode:r$1.countryCode}),jsx(_,{className:n?"selected":"",children:w(r$1)})]})}function ft({zone:e,onChange:o,defaultCountryZone:r$1,countryCodes:n}){let[p,l]=useState(null),a$1=!!p,i=t(r()),t$1=()=>{l(null);},g=m=>{o(m),t$1();},c=m=>{l(m.currentTarget);},x=v$1(e,i)?Vj:v$1(e,r$1)?Wj:Xj;return jsx(mt,{onClickAway:t$1,children:jsxs(ao,{"data-testid":"ZonePicker",children:[jsxs(io,{open:a$1,onClick:c,children:[jsx("img",{src:x,alt:"zone-icon"}),jsx(a,{countryCode:e.countryCode}),jsx("span",{children:w(e)})]}),jsx(lt,{open:a$1,anchorEl:p,placement:"top-start",sx:{zIndex:1400},children:jsxs(fe,{"data-testid":"ZonePicker_dropdown",children:[jsx(Re,{zone:e,onChange:g,defaultCountryZone:r$1,countryCodes:n}),jsx(ve,{zone:e,onChange:g})]})})]})})}var Be=memo(ft);var lo=styled(y)(({theme:e})=>({display:"flex",marginTop:"8px",background:e.palette.common.white,boxShadow:e.shadows[9],borderRadius:e.spacing(1),color:e.palette.text.primary,fontSize:"11px",".rmdp-calendar":{padding:"8px 16px 16px"},".rmdp-rtl *":{fontFamily:"Tajawal"},".rmdp-rtl .sd":{paddingTop:"4px"},".rmdp-wrapper":{position:"relative",borderRadius:"8px",boxShadow:"none"},".rmdp-day span":{fontSize:"11px",fontWeight:500},".rmdp-day, .rmdp-week-day":{width:40,height:40,marginBottom:"2px",padding:"4px",fontSize:"11px",color:e.palette.grey[900]},".rmdp-day-picker":{padding:0},".rmdp-day.rmdp-today span":{backgroundColor:"transparent !important",color:e.palette.info.dark},".rmdp-day.rmdp-today.end span, .rmdp-day.rmdp-today.end span":{color:e.palette.common.white},".rmdp-range, .rmdp-day:not(.rmdp-disabled):not(.rmdp-day-hidden) span:hover":{background:e.palette.info.light,boxShadow:"none",color:e.palette.grey[900]},".rmdp-range-hover.start, .rmdp-range.start, .rmdp-range-hover.end, .rmdp-range.end, .rmdp-rtl .rmdp-range-hover.start, .rmdp-rtl .rmdp-range.start, .rmdp-rtl .rmdp-range-hover.end, .rmdp-rtl .rmdp-range.end":{borderRadius:"50%",background:e.palette.background.gradient.darkShadedBlue,color:e.palette.common.white},".rmdp-range.start:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",right:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.start:after":{right:"unset",left:0},".rmdp-range.end:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",left:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.end:after":{left:"unset",right:0},".rmdp-week-day":{color:e.palette.grey[700],marginBottom:"4px",fontSize:"11px",padding:"4px"},".rmdp-header-values":{color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px"},".rmdp-header-values span:nth-of-type(2)":{display:"none"},".rmdp-header":{padding:"4px 0",margin:0,fontSize:"12px"},".rmdp-top-class":{display:"block !important"},".rmdp-day.rmdp-selected span:not(.highlight)":{background:e.palette.info.dark},".rmdp-day.start.end":{overflow:"hidden"},".rmdp-day.rmdp-disabled":{color:"#ccc",cursor:"not-allowed"}})),so=styled(U)(({theme:e})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",background:"transparent",color:e.palette.text.primary,border:"1px solid",borderColor:e.palette.divider,fontWeight:500,borderRadius:"4px","&:hover":{background:"transparent",color:e.palette.text.primary}})),co=styled(U)(({theme:e})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",borderRadius:"4px",fontWeight:700,background:e.palette.info.dark,"&:hover":{background:e.palette.info.dark}})),mo=styled(y)(()=>({display:"flex",gap:8,marginLeft:"auto",flexShrink:0})),uo=styled(U,{shouldForwardProp:e=>e!=="open"})(({open:e,theme:o})=>({color:o.palette.text.primary,fontSize:"11px",fontWeight:500,padding:o.spacing(1),borderRadius:"4px",border:"1px solid",borderColor:o.palette.divider,background:o.palette.common.white,textTransform:"none",height:32,...e&&{border:"1px solid",borderColor:o.palette.info.dark,boxShadow:o.shadows[7]}})),fo=styled(y)(({theme:e})=>({background:e.palette.common.white,display:"flex",justifyContent:"space-between",alignItems:"center",gap:10,padding:"16px",borderTop:"1px solid",borderColor:e.palette.divider,borderBottomRightRadius:"8px"})),go=styled(y)(({theme:e})=>({padding:16,paddingInlineEnd:"23px",borderRight:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,width:"max-content",borderTopLeftRadius:"8px",borderBottomLeftRadius:"8px",display:"flex",flexDirection:"column",gap:10,justifyContent:"space-between"})),xo=styled(y)(()=>({display:"flex",alignItems:"center",gap:"10px"})),yo=styled(y)(()=>({position:"relative"})),bo=styled(y)(()=>({display:"flex",flexDirection:"column",gap:"24px"})),Co=styled(y)(({theme:e})=>({color:e.palette.grey[700],fontSize:"9px",fontWeight:500,marginBottom:"6px"})),Do=styled(y,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:o})=>({borderRadius:"4px",border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,height:32,padding:"8px",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",...o&&{border:`1px solid ${e.palette.info.dark}`,background:e.palette.common.white,boxShadow:e.shadows[7]}})),ho=styled(y)(({theme:e})=>({borderRadius:"8px",background:e.palette.common.white,boxShadow:"0px 8px 36px 0px rgba(0, 0, 0, 0.15)",textAlign:"center",color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px",padding:"16px",display:"flex",alignItems:"center",justifyContent:"center",gap:"12px",flexDirection:"column"})),ko=styled(y)(({theme:e})=>({width:71,padding:"4px 0",cursor:"pointer","&:hover, &.active":{borderRadius:"100px",background:e.palette.info.light}})),To=styled(y)(({theme:e})=>({border:"1px solid",borderColor:e.palette.divider,borderRadius:"50px",paddingInline:"6px 12px",color:e.palette.text.primary,fontSize:"11px",display:"flex",gap:"8px",alignItems:"center",justifyContent:"space-between",height:32,marginTop:"8px",img:{width:16,height:16},"& > div":{display:"flex",alignItems:"center",gap:"2px"}})),wo=styled(U)(()=>({minWidth:"auto",padding:0,"& > img":{cursor:"pointer"}})),Mo=styled(U)(({theme:e})=>({cursor:"pointer",borderRadius:"50px",border:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,color:e.palette.text.primary,fontSize:"11px",fontWeight:e.typography.fontWeightRegular,paddingInline:"12px",height:32,width:"max-content",textTransform:"unset","&:hover":{boxShadow:e.shadows[7],border:"1px solid",borderColor:e.palette.info.dark}})),Po=styled(y)(()=>({display:"flex",flexDirection:"column",gap:"8px"})),Ro=styled(y,{shouldForwardProp:e=>e!=="isAllDay"})(({theme:e,isAllDay:o})=>({display:"flex",alignItems:"center",gap:e.spacing(1),position:"relative",paddingInline:"5px",".label":{width:"max-content"},...!o&&{paddingRight:e.spacing(1),"&:after":{content:'""',position:"absolute",width:"1px",background:e.palette.divider,right:0,height:17}}})),vo=styled(y)(()=>({width:235})),So=styled(y)(()=>({display:"flex",gap:"4px"})),Bo=styled(y)(({theme:e})=>({display:"flex",gap:"8px",alignItems:"center",borderRadius:"50px",border:"1px solid",borderColor:e.palette.divider,paddingInline:"5px",width:"fit-content",height:32}));function Oe({calendarMode:e,onCalendarModeChange:o}){let{t:r}=useTranslation();return jsx(y,{children:jsxs(To,{children:[jsxs(y,{children:[jsx("img",{src:dc,alt:"hijri"}),jsx("span",{children:r("hijri")})]}),jsx(h$1,{checked:e==="hijri",onChange:()=>o?.(e==="hijri"?"gregorian":"hijri")})]})})}var P=e=>e==="hijri"?bt:Ct,R=e=>e==="hijri"?xt:yt,Ao=(e,o)=>!e||Number.isNaN(e.getTime())?void 0:new Ee({date:e,calendar:R(o),locale:P(o)}),Ae=(e,o,r)=>{let n=Ao(b$1(e?.[0],r),o),p=Ao(b$1(e?.[1],r),o);if(n&&p)return [n,p];let l=R(o),a=P(o),i=b$1(Date.now(),r)??new Date;return [new Ee({date:new Date(i.getFullYear(),i.getMonth(),i.getDate()-6),calendar:l,locale:a}),new Ee({date:i,calendar:l,locale:a})]},Zo=(e,o)=>Math.round((Date.UTC(o.getFullYear(),o.getMonth(),o.getDate())-Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))/864e5),xe=e=>e.setHour(0).setMinute(0).setSecond(0).setMillisecond(0),ye=e=>e.setHour(23).setMinute(59).setSecond(59).setMillisecond(999),Ze=e=>!!e[1]&&e[0].format("YYYYMMDD")===e[1].format("YYYYMMDD");var wt=31,ze=createContext(null);function v(){let e=useContext(ze);if(!e)throw new Error("useDateRangeCalendar must be used inside a DateRangeCalendar");return e}function Io({zone:e,range:o,onApply:r,calendarMode:n="gregorian",maxRangeDays:p,groupBy:l,onGroupByChange:a}){let[i$1,t]=useState(()=>Ae(o,n,e.zone)),[g,c]=useState(i$1),[x,m]=useState(e),[k$1,G]=useState(l??"day"),[oe,D]=useState(()=>j$1(o,e.zone)),[te,F]=useState(null),[re,ne]=useState(false),B=useRef(null),L=!!te,s=p===void 0?wt:p;useEffect(()=>{if(L)return;let d=Ae(o,n,e.zone);t(d),c(d),D(j$1(o,e.zone)),B.current&&B.current.set("date",d[0]);},[o,e.zone,e.countryCode,n,L]),useEffect(()=>{let d=u=>new DateObject({date:u.toDate(),calendar:R(n),locale:P(n)});t(u=>[d(u[0]),d(u[1])]),c(u=>[d(u[0]),d(u[1])]);},[n]),useEffect(()=>{m(d=>d.zone===e.zone&&d.countryCode===e.countryCode?d:e);},[e.zone,e.countryCode,L]);let T=d=>{let u=d;if(d.length<2||s===0)return u;let j=Zo(xe(d[0]).toDate(),ye(d[1]).toDate());return j<=s?u:(ne(true),setTimeout(()=>{ne(false);},3e3),[d[0],d[1].subtract(j-s,"d")])},Xo=d=>{let u=T(d);t(u),D(!Ze(u));},Jo=d=>{let u=T(d);t([xe(u[0]),ye(u[1])]),D(true),B.current&&B.current.set("date",u[0]);},et=d=>t(d),ot=d=>{D(d),d&&i$1[1]&&t([xe(i$1[0]),ye(i$1[1])]);},Ve=()=>F(null),tt=d=>F(d.currentTarget),rt=()=>{let d=[i$1[0].toDate(),i$1[1].toDate()];return {range:(oe?k(d,x.zone):i(d,x.zone))??d,zone:x}},nt=()=>{r(rt())!==false&&(c(i$1),a?.(k$1),Ve());},at=d=>{let u=d[0]?.format("MMM D"),j=d[1]?.format("MMM D")??u;return u?u===j?u:`${u} - ${j}`:j};return {draft:i$1,isAllDay:oe,isSameDay:Ze(i$1),isError:re,maxRangeDays:s,open:L,anchorEl:te,pickedZone:x,selectedGroupBy:k$1,calendarRef:B,maxDate:b$1(Date.now(),x.zone),rangeLabel:at(g),pickRange:Xo,pickPreset:Jo,setTimes:et,setAllDay:ot,pickZone:m,setGroupBy:G,openPicker:tt,closePicker:Ve,apply:nt}}var Lo={day:"Day",month:"Month",quarter:"Quarter",year:"Year"};function vt(){let{selectedGroupBy:e,setGroupBy:o,open:r}=v(),[n,p]=useState(null),l=!!n&&r,{t:a}=useTranslation();return jsx(mt,{onClickAway:()=>p(null),children:jsxs(y,{children:[jsx(Co,{children:a("groupedBy")}),jsxs(Do,{onClick:i=>p(i.currentTarget),open:l,children:[jsx("span",{children:Lo[e]}),jsx(y,{component:"img",src:Wc,alt:"arrow",sx:{...l&&{transform:"rotate(180deg)"}}})]}),jsx(R$1,{open:l,anchorEl:n,children:jsx(ho,{sx:{width:n?.clientWidth},children:Object.entries(Lo).map(([i,t])=>jsx(ko,{onClick:()=>{o(i),p(null);},className:e===i?"active":"",children:t},i))})})]})})}var Ho=vt;var Bt=["Su","Mo","Tu","We","Th","Fr","Sa"];function Ot({calendarMode:e}){let{draft:o,maxDate:r,calendarRef:n,pickRange:p}=v();return jsx(Calendar,{ref:n,numberOfMonths:2,value:o,onChange:p,calendar:R(e),locale:P(e),range:true,format:"MMM DD",monthYearSeparator:" ",renderButton:(l,a)=>jsx(wo,{onClick:a,children:jsx("img",{src:l==="right"?fc:ec,alt:"arrow"})}),weekDays:Bt,maxDate:r})}var Wo=Ot;function He({calendarMode:e}){let{t:o}=useTranslation(),{pickedZone:r,pickPreset:n}=v(),p=useMemo(()=>{let l=b$1(Date.now(),r.zone)??new Date,a=()=>new DateObject({date:l,calendar:R(e),locale:P(e)}),i=t=>a().subtract(t,"month");return [{id:"today",value:[a(),a()]},{id:"lastWeek",value:[a().subtract(6,"day"),a()]},{id:"lastMonth",value:[a().subtract(30,"day"),a()]},...[1,2,3].map(t=>({id:i(t).toFirstOfMonth().format("MMMM YYYY"),value:[i(t).toFirstOfMonth(),i(t).toLastOfMonth()]}))]},[e,r.zone]);return jsx(y,{"data-testid":"RangePresets",children:jsx(Po,{children:p.map(l=>jsx(Mo,{onClick:a=>{a.preventDefault(),n(l.value);},children:o(l.id)},l.id))})})}var q=e=>e===0?12:e<=12?e:e-12,be=e=>e>=12?"PM":"AM",Ce=(e,o)=>o==="AM"&&e===12?0:o==="PM"&&e!==12?e+12:e,Go=()=>new Date().getMinutes(),Fo=()=>q(new Date().getHours());var Yo=styled(y)(()=>({width:157,padding:"16px",display:"flex",alignItems:"center",justifyContent:"center",gap:"16px"})),No=styled(j,{shouldForwardProp:e=>e!=="open"&&e!=="size"})(({theme:e,open:o,size:r})=>{let{base:n,grey:p,brand:l}=e.v2.palette;return {fontSize:"11px",fontWeight:500,background:n.white,border:`1px solid ${p[100]}`,borderRadius:"19px",height:r==="large"?32:24,width:r==="large"?74:58,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",...o&&{boxShadow:"0px 0px 4px 0px #1F88D080",borderColor:l[500]}}}),X=styled(y)(()=>({textAlign:"center",cursor:"pointer",userSelect:"none"})),Vo=styled(j,{shouldForwardProp:e=>e!=="selected"})(({theme:e,selected:o})=>{let{base:r,grey:n,brand:p}=e.v2.palette;return {fontSize:"11px",fontWeight:500,background:r.white,border:`1px solid ${n[100]}`,borderRadius:"4px",height:24,width:33,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",...o&&{borderColor:"transparent",color:p[500],backgroundColor:alpha(p[500],.1)}}}),$o=styled(y)(()=>({display:"flex",flexDirection:"column",gap:"4px"})),_o=styled(y)(()=>({display:"flex",alignItems:"center",justifyContent:"center",gap:"4px"})),We=styled(y)(()=>({display:"flex",flexDirection:"column",justifyContent:"center",gap:"6px"})),Ge=styled(L)(()=>({flexGrow:1,maxWidth:"100%",".MuiInput-input":{fontWeight:"500",fontSize:"11px",textAlign:"center"},".MuiInput-root":{paddingInline:"8px"},height:32,width:32}));var Gt=["AM","PM"],he=12,Fe=59;function ke({onChange:e,defaultTime:o,enableRealTimeChange:r,size:n="large"}){let p=Bc(useId(),"time-picker"),[l,a]=useState(null),[i,t]=useState(o?.period??(new Date().getHours()>=he?"PM":"AM")),[g,c]=useState(o?.hour??Fo()),[x,m]=useState(o?.minute??Go()),k=!!l;useEffect(()=>{r&&e?.({hour:g,minute:x,period:i});},[g,x,i,r]);let G=s=>{a(s.currentTarget);},oe=()=>{a(null),e?.({hour:g,minute:x,period:i});},D=s=>s<10?`0${s}`:s.toString(),te=s=>{let T=Ka(D(Number(s.target.value)));if(T>he){s.preventDefault();return}c(T);},F=()=>{c(s=>s===he?1:s+1);},re=()=>{c(s=>s===1?he:s-1);},ne=s=>{let T=Ka(D(Number(s.target.value)));if(T>Fe){s.preventDefault();return}m(T);},B=()=>{m(s=>s===Fe?(F(),0):s+1);},L=()=>{m(s=>s===0?(re(),Fe):s-1);};return jsx(mt,{onClickAway:oe,children:jsxs(y,{id:p,"data-testid":"TimePicker",children:[jsx(No,{size:n,open:k,onClick:G,children:`${D(g)}:${D(x)}${i.toLowerCase()}`}),jsx(R$1,{open:k,anchorEl:l,placement:"top-start",sx:{marginTop:"8px",marginBottom:"8px"},children:jsxs(Yo,{children:[jsxs(_o,{children:[jsxs(We,{children:[jsx(X,{onClick:F,children:jsx("img",{src:dl,alt:"arrow"})}),jsx(Ge,{type:"number",hideArrows:true,disableFocusRing:true,value:D(g),onChange:te}),jsx(X,{onClick:re,children:jsx("img",{src:el,alt:"arrow"})})]}),jsx(j,{children:":"}),jsxs(We,{children:[jsx(X,{onClick:B,children:jsx("img",{src:dl,alt:"arrow"})}),jsx(Ge,{type:"number",hideArrows:true,disableFocusRing:true,value:D(x),onChange:ne}),jsx(X,{onClick:L,children:jsx("img",{src:el,alt:"arrow"})})]})]}),jsx($o,{children:Gt.map(s=>jsx(Vo,{onClick:()=>t(s),selected:i===s,children:s},s))})]})})]})})}function Yt(){let{t:e}=useTranslation(),{draft:o,isAllDay:r,setTimes:n,setAllDay:p}=v(),l=new DateObject(o[0]),a=new DateObject(o[1]),i=({hour:g,minute:c,period:x})=>{n([l.setHour(Ce(g,x??"AM")).setMinute(c).setSecond(0),a]);},t=({hour:g,minute:c,period:x})=>{n([l,a.setHour(Ce(g,x??"AM")).setMinute(c).setSecond(59)]);};return jsx(vo,{children:jsxs(Bo,{children:[jsxs(Ro,{isAllDay:r,children:[jsx("span",{className:"label",children:e("allDay")}),jsx(h$1,{checked:r,onChange:g=>p(g.target.checked)})]}),!r&&jsxs(So,{children:[jsx(ke,{defaultTime:{hour:q(l.hour),minute:l.minute,period:be(l.hour)},size:"small",onChange:i,enableRealTimeChange:true},`${o[0]?.toString()}-start`),jsx(ke,{defaultTime:{hour:q(a.hour),minute:a.minute,period:be(a.hour)},size:"small",onChange:t,enableRealTimeChange:true},`${o[1]?.toString()}-end`)]})]})})}var Uo=Yt;function Kt(e){let{calendarMode:o="gregorian",onCalendarModeChange:r,defaultCountryZone:n,countryCodes:p,groupBy:l}=e,{t:a}=useTranslation(),i=Bc(useId(),"date-range-calendar"),t=Io(e),g=c=>{c.key==="Enter"&&t.draft[1]&&!t.isError?(c.stopPropagation(),t.apply()):c.key==="Escape"&&(c.stopPropagation(),t.closePicker());};return jsx(ze.Provider,{value:t,children:jsxs(yo,{id:i,"data-testid":"DateRangeCalendar",children:[jsx(uo,{onClick:t.openPicker,open:t.open,children:t.rangeLabel}),t.open&&jsx(B,{onClick:c=>{c.stopPropagation(),t.closePicker();}}),jsx(lt,{open:t.open,anchorEl:t.anchorEl,placement:"bottom-end",children:jsxs(lo,{onKeyDown:g,children:[jsxs(go,{children:[jsx(He,{calendarMode:o}),jsxs(bo,{children:[l&&jsx(Ho,{}),jsx(Oe,{calendarMode:o,onCalendarModeChange:r})]})]}),jsxs(y,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[jsx(Wo,{calendarMode:o}),jsx(x,{in:t.isError&&t.maxRangeDays>0,children:jsx(b,{severity:"error",message:a("dateRangeError",{number:t.maxRangeDays}),sx:{marginInline:"16px",marginBottom:"16px"}})}),jsxs(fo,{sx:{borderBottomLeftRadius:"8px"},children:[n&&p&&jsx(xo,{children:jsx(Be,{zone:t.pickedZone,onChange:t.pickZone,defaultCountryZone:n,countryCodes:p},String(t.open))}),t.isSameDay&&jsx(Uo,{}),jsxs(mo,{children:[jsx(so,{variant:"contained",onClick:t.closePicker,children:a("cancel")}),jsx(co,{variant:"contained",onClick:t.apply,disabled:!t.draft[1],children:a("okay")})]})]})]})]})})]})})}var qo=Kt;function qt({value:e,zone:o,format:r,...n}){let p=useMemo(()=>h(e,o,r),[e,o,r]);return jsx(a$1,{...n,children:p})}var Qt=qt;var Qo=styled(y)({display:"flex",alignItems:"center",gap:"12px"});function rr({value:e,zone:o,format:r,rendered:n,tableMode:p,...l}){let a=useMemo(()=>n??h(e,o,r),[n,e,o,r]);return jsx(a$1,{...l,children:jsx(Qo,{children:jsx(y,{sx:{...Wa(p)&&{fontSize:"11px"}},children:a})})})}var nr=rr;export{qo as DateRangeCalendar,Be as ZonePicker,Qt as ZonedDateCell,nr as ZonedDateViewer};
@@ -0,0 +1,13 @@
1
+ import type { ZoneRef } from '../zone';
2
+ /** The aggregation buckets a `DateRangeCalendar` footer offers. */
3
+ export type GroupByOption = 'day' | 'month' | 'quarter' | 'year';
4
+ /**
5
+ * What `DateRangeCalendar` emits on apply: the picked range and the zone it was picked in. The range
6
+ * is already placed on the pair's zone — a pair of real moments — so the pair travels for display and
7
+ * for the host's write-back, never to be placed again.
8
+ */
9
+ export type DateRangeSelection = {
10
+ /** The picked pair, placed on the pair's zone: whole days bounded to its days, a same-day pick keeping its times. */
11
+ range: [Date, Date];
12
+ zone: ZoneRef;
13
+ };
@@ -0,0 +1,3 @@
1
+ import dayjs from 'dayjs';
2
+ /** The one configured dayjs instance; every other module in here imports this, never the package. */
3
+ export default dayjs;
@@ -0,0 +1,8 @@
1
+ import type { CalendarFormats } from './calendar';
2
+ import type { DateInput } from './types';
3
+ import type { ZoneId } from './zone';
4
+ /**
5
+ * An instant as it reads in a zone — "Today, 3:00pm", "Mar 05, 2:00pm". The value *and* the
6
+ * "now" behind Today/Yesterday are read on the zone's clock, so the answer is host-independent.
7
+ */
8
+ export declare const formatInZone: (value: DateInput, zone: ZoneId, format?: CalendarFormats) => string;
@@ -0,0 +1,10 @@
1
+ export { parseWallClock, toWallClock } from './wallClock';
2
+ export { toInstant } from './instant';
3
+ export { epochToInstant, instantToEpoch } from './wireEpoch';
4
+ export { offsetLabelAt, offsetMinutesAt } from './zoneOffset';
5
+ export { formatInZone } from './format';
6
+ export { isWholeDayRange, lastNDays, toInstantRange, toWholeDayRange, toWireRange } from './range';
7
+ export { UTC, asHostTimezone, asZoneRef, isSameZone, isZoneId, localZone, zoneByCountry, zoneById, zoneLabelAt, zoneRef, zoneRefByCountry, } from './zone';
8
+ export type { Zone, ZoneId, ZoneRef } from './zone';
9
+ export type { CalendarFormats, CalendarMode } from './calendar';
10
+ export type { DateInput, Instant, WireRange } from './types';
@@ -0,0 +1 @@
1
+ export{n as UTC,x as asHostTimezone,t as asZoneRef,f as epochToInstant,h as formatInZone,g as instantToEpoch,v as isSameZone,j as isWholeDayRange,o as isZoneId,l as lastNDays,r as localZone,e as offsetLabelAt,d as offsetMinutesAt,a as parseWallClock,c as toInstant,i as toInstantRange,b as toWallClock,k as toWholeDayRange,m as toWireRange,q as zoneByCountry,p as zoneById,w as zoneLabelAt,s as zoneRef,u as zoneRefByCountry}from'../_chunks/chunk-TXE2HSXL.js';
@@ -0,0 +1,4 @@
1
+ import type { DateInput } from './types';
2
+ import type { ZoneId } from './zone';
3
+ /** A wall clock read in `zone`; an epoch or an offset-bearing string is absolute and passes through. */
4
+ export declare const toInstant: (value: DateInput, zone: ZoneId) => Date | undefined;
@@ -0,0 +1,18 @@
1
+ import type { DateInput, WireRange } from './types';
2
+ import type { ZoneId } from './zone';
3
+ /** Two picked bounds → the moments they name on `zone`, literally. The range form of `toInstant`. */
4
+ export declare const toInstantRange: (range: readonly DateInput[] | undefined, zone: ZoneId) => [Date, Date] | undefined;
5
+ /**
6
+ * Whether a range placed elsewhere means whole days: two different days on `zone`'s calendar, or one
7
+ * day whose closing bound carries no clock. The calendar's own answer is its flag, not this.
8
+ */
9
+ export declare const isWholeDayRange: (range: readonly DateInput[] | undefined, zone: ZoneId) => boolean;
10
+ /** The whole days a picked pair spans on `zone`: first day's start → last day's end, built in `zone`. */
11
+ export declare const toWholeDayRange: (range: readonly DateInput[] | undefined, zone: ZoneId) => [Date, Date] | undefined;
12
+ /**
13
+ * The last `days` days in a zone, today included, as instants placed on that zone. `undefined` for
14
+ * an unknown zone, so nothing silently falls back to the host's today.
15
+ */
16
+ export declare const lastNDays: (days: number, zone: ZoneId) => [Date, Date] | undefined;
17
+ /** A placed pair → the wire's `{ from, to }`: both bounds re-encoded for the zone the backend stores. */
18
+ export declare const toWireRange: (range: readonly [Date, Date], wireZone: ZoneId) => WireRange;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * An absolute moment: epoch ms, a `Date`, or a string with an explicit offset.
3
+ * A zone-less string like `'2026-07-04 15:00'` is a wall clock, not an `Instant`.
4
+ */
5
+ export type Instant = Date | number | string;
6
+ /** Everything the conversion helpers accept, including the "no value" cases. */
7
+ export type DateInput = Instant | null | undefined;
8
+ /** A request's date filter: the pair of epochs `toWireRange` produces. Either end may be absent, never `NaN`. */
9
+ export interface WireRange {
10
+ from?: number;
11
+ to?: number;
12
+ }
@@ -0,0 +1,46 @@
1
+ import dayjs from './dayjsSetup';
2
+ import type { DateInput } from './types';
3
+ import type { ZoneId } from './zone';
4
+ export declare const MINUTE_MS = 60000;
5
+ /** The one thing that makes a string an instant rather than a wall clock. */
6
+ export declare const ABSOLUTE_SUFFIX: RegExp;
7
+ /** The module's single wall-clock grammar, canonical for both parsing and emitting. */
8
+ export declare const WALL_CLOCK_FORMAT = "YYYY-MM-DD HH:mm:ss.SSS";
9
+ /** The wall-clock fields a zone renders an instant as — or a picker hands over. */
10
+ export interface WallClockFields {
11
+ year: number;
12
+ month: number;
13
+ day: number;
14
+ hour: number;
15
+ minute: number;
16
+ second: number;
17
+ ms: number;
18
+ }
19
+ type Zoned = ReturnType<typeof dayjs>;
20
+ /** The canonical padded text of a wall clock — the module's one wire spelling. */
21
+ export declare const wallClockText: (fields: WallClockFields) => string;
22
+ export declare const fieldsOfZoned: (zoned: Zoned) => WallClockFields;
23
+ export declare const fieldsOf: (date: Date) => WallClockFields | undefined;
24
+ /**
25
+ * Wall-clock text → its fields, in either spelling, `undefined` when the text is neither one or names
26
+ * no such day. The separator is the grammar: `-` is the canonical form, `/` the backends' short one.
27
+ */
28
+ export declare const parseWallClockFields: (value: string) => WallClockFields | undefined;
29
+ /** Wall-clock text → the carrier `Date` that `toInstant` places in a zone; `undefined` when the text names no such day. */
30
+ export declare const parseWallClock: (value: string) => Date | undefined;
31
+ /**
32
+ * Wall-clock fields → a `Date` whose **local** fields are those values, on any host. The one
33
+ * thing it cannot represent is a clock inside the *host's* own DST gap, so it rolls forward past it.
34
+ */
35
+ export declare const wallClockOf: (fields: WallClockFields) => Date;
36
+ /** Coerces any accepted input to a valid `Date`, or `undefined` — never an invalid one. */
37
+ export declare const toAbsolute: (value: DateInput) => Date | undefined;
38
+ /**
39
+ * An absolute moment read on a zone's clock, in the zone's own terms; `undefined` for an unknown
40
+ * zone. Preferred over a carrier wherever a value only has to be formatted or compared — a carrier
41
+ * is a host `Date` and so cannot hold a wall clock inside the *host's* own DST gap.
42
+ */
43
+ export declare const toZoned: (value: DateInput, zone: ZoneId) => Zoned | undefined;
44
+ /** An absolute moment as a wall-clock carrier: a `Date` whose local fields read the zone's clock. */
45
+ export declare const toWallClock: (value: DateInput, zone: ZoneId) => Date | undefined;
46
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { Instant } from './types';
2
+ import type { ZoneId } from './zone';
3
+ /**
4
+ * Reads a **wire epoch** — an epoch whose UTC rendering *is* the wall clock in `zone`, the
5
+ * shape a backend sends when it encodes a wall clock as an epoch (the wallet's Kuwait contract).
6
+ */
7
+ export declare const epochToInstant: (epoch: number | null | undefined, zone: ZoneId) => Date | undefined;
8
+ /**
9
+ * Writes a **wire epoch** — the inverse of `epochToInstant` for a fixed-offset zone. Built from
10
+ * the instant plus the offset: a wall-clock `Date`'s `getTime()` would re-read its fields on the host's clock.
11
+ */
12
+ export declare const instantToEpoch: (instant: Instant, zone: ZoneId) => number | undefined;