@tap-payments/os-micro-frontend-shared 0.3.262 → 0.3.263

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 (157) hide show
  1. package/build/_chunks/chunk-7GTNCNBB.js +1 -0
  2. package/build/_chunks/{chunk-EQVNNGL6.js → chunk-B4T3R7V3.js} +1 -1
  3. package/build/_chunks/{chunk-NCG4PCDH.js → chunk-M6SPV57Z.js} +1 -1
  4. package/build/_chunks/{chunk-BJRQ4GM3.js → chunk-MH3KQO3F.js} +1 -1
  5. package/build/_chunks/{chunk-C5EKTMXI.js → chunk-N7BI2AMJ.js} +1 -1
  6. package/build/_chunks/{chunk-B76NSJAU.js → chunk-TR2D6CJW.js} +1 -1
  7. package/build/components/AppServices/index.js +1 -1
  8. package/build/components/AppServicesBar/index.js +1 -1
  9. package/build/components/AppWindowWrapper/index.js +1 -1
  10. package/build/components/ColumnViews/index.js +1 -1
  11. package/build/components/DateFilter/DateFilter.d.ts +1 -1
  12. package/build/components/DateFilter/index.js +1 -1
  13. package/build/components/FilterDropdown/index.js +1 -1
  14. package/build/components/JSONViewer/index.js +1 -1
  15. package/build/components/ListColumnFilter/index.js +1 -1
  16. package/build/components/ListHeader/index.js +1 -1
  17. package/build/components/PhoneFilter/index.js +1 -1
  18. package/build/components/RangeCalender/index.d.ts +1 -2
  19. package/build/components/RangeCalender/index.js +1 -1
  20. package/build/components/SearchButton/index.js +1 -1
  21. package/build/components/StatusFilter/index.js +1 -1
  22. package/build/components/StatusIcons/index.js +1 -1
  23. package/build/components/TableCells/index.js +1 -1
  24. package/build/components/TableReports/index.js +1 -1
  25. package/build/components/TreeDropdown/index.js +1 -1
  26. package/build/components/VerificationIcon/index.js +1 -1
  27. package/build/components/VirtualTables/index.d.ts +1 -7
  28. package/build/components/VirtualTables/index.js +1 -1
  29. package/build/components/index.d.ts +3 -3
  30. package/build/components/index.js +1 -1
  31. package/build/components/{RangeCalender → modules/RangeCalender}/components/Hijri/Hijri.d.ts +1 -1
  32. package/build/components/{RangeCalender → modules/RangeCalender}/components/Timezone/Timezone.d.ts +1 -1
  33. package/build/components/{RangeCalender → modules/RangeCalender}/components/Timezone/components/EntitiesTimezone.d.ts +1 -1
  34. package/build/components/{RangeCalender → modules/RangeCalender}/components/Timezone/components/UserTimezone.d.ts +1 -1
  35. package/build/components/modules/RangeCalender/index.d.ts +2 -0
  36. package/build/components/modules/RangeCalender/index.js +1 -0
  37. package/build/components/{RangeCalender → modules/RangeCalender}/type.d.ts +1 -1
  38. package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/components/SheetViewTableHeaderCell.d.ts +1 -1
  39. package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/components/SheetViewTableLoading.d.ts +1 -1
  40. package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/components/SheetViewTableNoData.d.ts +1 -1
  41. package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/components/SheetViewTableRowLoading.d.ts +1 -1
  42. package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/components/VirtualTable.d.ts +1 -1
  43. package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/features/resize/hooks/useColumnResizeWithPinned.d.ts +13 -13
  44. package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/features/resize/types/index.d.ts +1 -1
  45. package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/features/resize/utils/columnResizeStorage.d.ts +1 -1
  46. package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/features/resize/utils/resize.d.ts +1 -1
  47. package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/hooks/usePinnedColumns.d.ts +1 -1
  48. package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/hooks/usePinnedColumnsWidths.d.ts +1 -1
  49. package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/hooks/useVirtualTableContainer.d.ts +1 -1
  50. package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/types.d.ts +1 -1
  51. package/build/components/{VirtualTables → modules/VirtualTables}/VirtualTable/VirtualTable.d.ts +1 -1
  52. package/build/components/{VirtualTables → modules/VirtualTables}/VirtualTableWithCard/VirtualTableWithCard.d.ts +1 -1
  53. package/build/components/{VirtualTables → modules/VirtualTables}/components/ColumnFilter/Inputs/Inputs.d.ts +1 -1
  54. package/build/components/{VirtualTables → modules/VirtualTables}/components/ColumnFilter/Inputs/style.d.ts +1 -1
  55. package/build/components/{VirtualTables → modules/VirtualTables}/components/ColumnFilter/List/List.d.ts +1 -1
  56. package/build/components/{VirtualTables → modules/VirtualTables}/components/ColumnFilter/type.d.ts +1 -1
  57. package/build/components/{VirtualTables → modules/VirtualTables}/components/ColumnSort/ColumnSort.d.ts +1 -1
  58. package/build/components/{VirtualTables → modules/VirtualTables}/components/TableFooter/TableFooter.d.ts +1 -1
  59. package/build/components/{VirtualTables → modules/VirtualTables}/components/TableFooter/style.d.ts +2 -2
  60. package/build/components/{VirtualTables → modules/VirtualTables}/components/TableHeader/components/TableCell/TableCell.d.ts +2 -2
  61. package/build/components/{VirtualTables → modules/VirtualTables}/components/TableHeader/type.d.ts +1 -1
  62. package/build/components/{VirtualTables → modules/VirtualTables}/components/TableLoading.d.ts +1 -1
  63. package/build/components/{VirtualTables → modules/VirtualTables}/components/TableNoData.d.ts +1 -1
  64. package/build/components/{VirtualTables → modules/VirtualTables}/components/TableNoDataWithCard.d.ts +1 -1
  65. package/build/components/{VirtualTables → modules/VirtualTables}/components/TableRow.d.ts +1 -1
  66. package/build/components/{VirtualTables → modules/VirtualTables}/components/TableRowLoading.d.ts +1 -1
  67. package/build/components/{VirtualTables → modules/VirtualTables}/components/style.d.ts +1 -1
  68. package/build/components/{VirtualTables → modules/VirtualTables}/components/virtualScroll/ListItemWrapper.d.ts +1 -1
  69. package/build/components/{VirtualTables → modules/VirtualTables}/hooks/useColumnFilter.d.ts +1 -1
  70. package/build/components/modules/VirtualTables/index.d.ts +7 -0
  71. package/build/components/modules/VirtualTables/index.js +1 -0
  72. package/build/datetime/components/index.js +1 -1
  73. package/build/index.js +1 -1
  74. package/package.json +1 -1
  75. package/build/_chunks/chunk-T7FK7EI2.js +0 -1
  76. /package/build/_chunks/{chunk-5VRO5GY3.js → chunk-54TY5SXL.js} +0 -0
  77. /package/build/_chunks/{chunk-CDBXA7HF.js → chunk-HS3LRC2D.js} +0 -0
  78. /package/build/components/{RangeCalender → modules/RangeCalender}/RangeCalender.d.ts +0 -0
  79. /package/build/components/{RangeCalender → modules/RangeCalender}/components/CustomTimepicker/CustomTimepicker.d.ts +0 -0
  80. /package/build/components/{RangeCalender → modules/RangeCalender}/components/CustomTimepicker/index.d.ts +0 -0
  81. /package/build/components/{RangeCalender → modules/RangeCalender}/components/CustomTimepicker/style.d.ts +0 -0
  82. /package/build/components/{RangeCalender → modules/RangeCalender}/components/GroupBy/GroupBy.d.ts +0 -0
  83. /package/build/components/{RangeCalender → modules/RangeCalender}/components/GroupBy/index.d.ts +0 -0
  84. /package/build/components/{RangeCalender → modules/RangeCalender}/components/GroupBy/style.d.ts +0 -0
  85. /package/build/components/{RangeCalender → modules/RangeCalender}/components/Hijri/index.d.ts +0 -0
  86. /package/build/components/{RangeCalender → modules/RangeCalender}/components/Hijri/style.d.ts +0 -0
  87. /package/build/components/{RangeCalender → modules/RangeCalender}/components/QuickFilters/QuickFilters.d.ts +0 -0
  88. /package/build/components/{RangeCalender → modules/RangeCalender}/components/QuickFilters/index.d.ts +0 -0
  89. /package/build/components/{RangeCalender → modules/RangeCalender}/components/QuickFilters/style.d.ts +0 -0
  90. /package/build/components/{RangeCalender → modules/RangeCalender}/components/RangeDatepicker/RangeDatepicker.d.ts +0 -0
  91. /package/build/components/{RangeCalender → modules/RangeCalender}/components/RangeDatepicker/index.d.ts +0 -0
  92. /package/build/components/{RangeCalender → modules/RangeCalender}/components/RangeDatepicker/style.d.ts +0 -0
  93. /package/build/components/{RangeCalender → modules/RangeCalender}/components/RangeDatepicker/type.d.ts +0 -0
  94. /package/build/components/{RangeCalender → modules/RangeCalender}/components/Timezone/index.d.ts +0 -0
  95. /package/build/components/{RangeCalender → modules/RangeCalender}/components/Timezone/style.d.ts +0 -0
  96. /package/build/components/{RangeCalender → modules/RangeCalender}/style.d.ts +0 -0
  97. /package/build/components/{RangeCalender → modules/RangeCalender}/utils.d.ts +0 -0
  98. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/SheetViewVirtualTable.d.ts +0 -0
  99. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/components/LoadingMainTable.d.ts +0 -0
  100. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/components/MainTable.d.ts +0 -0
  101. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/components/NoDataView.d.ts +0 -0
  102. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/components/PinnedColumn.d.ts +0 -0
  103. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/components/SheetViewTableHeader.d.ts +0 -0
  104. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/components/index.d.ts +0 -0
  105. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/features/resize/components/ColumnResize.d.ts +0 -0
  106. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/features/resize/components/ResizeOverlay.d.ts +0 -0
  107. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/features/resize/components/index.d.ts +0 -0
  108. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/features/resize/constants.d.ts +0 -0
  109. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/features/resize/hooks/index.d.ts +0 -0
  110. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/features/resize/hooks/useColumnResize.d.ts +0 -0
  111. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/features/resize/index.d.ts +0 -0
  112. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/features/resize/styles.d.ts +0 -0
  113. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/features/resize/utils/index.d.ts +0 -0
  114. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/hooks/index.d.ts +0 -0
  115. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/hooks/useSynchronizedScroll.d.ts +0 -0
  116. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/hooks/useTableData.d.ts +0 -0
  117. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/hooks/useTableDimensions.d.ts +0 -0
  118. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/hooks/useTableState.d.ts +0 -0
  119. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/index.d.ts +0 -0
  120. /package/build/components/{VirtualTables → modules/VirtualTables}/SheetViewVirtualTable/style.d.ts +0 -0
  121. /package/build/components/{VirtualTables → modules/VirtualTables}/components/ColumnFilter/ColumnFilter.d.ts +0 -0
  122. /package/build/components/{VirtualTables → modules/VirtualTables}/components/ColumnFilter/Inputs/index.d.ts +0 -0
  123. /package/build/components/{VirtualTables → modules/VirtualTables}/components/ColumnFilter/List/index.d.ts +0 -0
  124. /package/build/components/{VirtualTables → modules/VirtualTables}/components/ColumnFilter/consts.d.ts +0 -0
  125. /package/build/components/{VirtualTables → modules/VirtualTables}/components/ColumnFilter/index.d.ts +0 -0
  126. /package/build/components/{VirtualTables → modules/VirtualTables}/components/ColumnFilter/style.d.ts +0 -0
  127. /package/build/components/{VirtualTables → modules/VirtualTables}/components/ColumnSort/index.d.ts +0 -0
  128. /package/build/components/{VirtualTables → modules/VirtualTables}/components/ColumnSort/style.d.ts +0 -0
  129. /package/build/components/{VirtualTables → modules/VirtualTables}/components/EmptyList/EmptyList.d.ts +0 -0
  130. /package/build/components/{VirtualTables → modules/VirtualTables}/components/EmptyList/index.d.ts +0 -0
  131. /package/build/components/{VirtualTables → modules/VirtualTables}/components/EmptyList/styles.d.ts +0 -0
  132. /package/build/components/{VirtualTables → modules/VirtualTables}/components/ErrorList/ErrorList.d.ts +0 -0
  133. /package/build/components/{VirtualTables → modules/VirtualTables}/components/ErrorList/index.d.ts +0 -0
  134. /package/build/components/{VirtualTables → modules/VirtualTables}/components/ErrorList/styles.d.ts +0 -0
  135. /package/build/components/{VirtualTables → modules/VirtualTables}/components/RowErrorState.d.ts +0 -0
  136. /package/build/components/{VirtualTables → modules/VirtualTables}/components/TableError.d.ts +0 -0
  137. /package/build/components/{VirtualTables → modules/VirtualTables}/components/TableFooter/index.d.ts +0 -0
  138. /package/build/components/{VirtualTables → modules/VirtualTables}/components/TableHeader/TableHeader.d.ts +0 -0
  139. /package/build/components/{VirtualTables → modules/VirtualTables}/components/TableHeader/components/TableCell/index.d.ts +0 -0
  140. /package/build/components/{VirtualTables → modules/VirtualTables}/components/TableHeader/components/index.d.ts +0 -0
  141. /package/build/components/{VirtualTables → modules/VirtualTables}/components/TableHeader/index.d.ts +0 -0
  142. /package/build/components/{VirtualTables → modules/VirtualTables}/components/TableHeader/style.d.ts +0 -0
  143. /package/build/components/{VirtualTables → modules/VirtualTables}/components/TableLastItem.d.ts +0 -0
  144. /package/build/components/{VirtualTables → modules/VirtualTables}/components/TableLoadingWithCard.d.ts +0 -0
  145. /package/build/components/{VirtualTables → modules/VirtualTables}/components/TableRowLoadingWithCard.d.ts +0 -0
  146. /package/build/components/{VirtualTables → modules/VirtualTables}/components/TableRowWithCard.d.ts +0 -0
  147. /package/build/components/{VirtualTables → modules/VirtualTables}/components/index.d.ts +0 -0
  148. /package/build/components/{VirtualTables → modules/VirtualTables}/components/virtualScroll/ListItemWrapperWithCard.d.ts +0 -0
  149. /package/build/components/{VirtualTables → modules/VirtualTables}/components/virtualScroll/VirtualScrollInner.d.ts +0 -0
  150. /package/build/components/{VirtualTables → modules/VirtualTables}/components/virtualScroll/VirtualScrollList.d.ts +0 -0
  151. /package/build/components/{VirtualTables → modules/VirtualTables}/components/virtualScroll/VirtualScrollOuter.d.ts +0 -0
  152. /package/build/components/{VirtualTables → modules/VirtualTables}/components/virtualScroll/index.d.ts +0 -0
  153. /package/build/components/{VirtualTables → modules/VirtualTables}/context/Provider.d.ts +0 -0
  154. /package/build/components/{VirtualTables → modules/VirtualTables}/context/context.d.ts +0 -0
  155. /package/build/components/{VirtualTables → modules/VirtualTables}/context/index.d.ts +0 -0
  156. /package/build/components/{VirtualTables → modules/VirtualTables}/hooks/index.d.ts +0 -0
  157. /package/build/components/{VirtualTables → modules/VirtualTables}/hooks/useScrollBackShadow.d.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { IColumnProps } from '../../../../types/index.js';
2
+ import type { IColumnProps } from '../../../../../types/index.js';
3
3
  import { SheetViewTableHeaderProps } from '../types';
4
4
  interface SheetViewTableHeaderCellProps extends Pick<SheetViewTableHeaderProps, 'onColumnSort' | 'columnsSorting' | 'onColumnPin' | 'isPinnable' | 'lastColumnId' | 'onColumnClick' | 'pinnedColumns'> {
5
5
  column: IColumnProps;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { AnimationType, IColumnProps } from '../../../../types/index.js';
2
+ import type { AnimationType, IColumnProps } from '../../../../../types/index.js';
3
3
  interface ISheetViewTableLoadingProps {
4
4
  columns: IColumnProps[];
5
5
  isLoaded?: boolean;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { IColumnProps, IVirtualTable } from '../../../../types/index.js';
2
+ import type { IColumnProps, IVirtualTable } from '../../../../../types/index.js';
3
3
  interface SheetViewTableNoDataProps {
4
4
  tableEmpty: boolean;
5
5
  tableLoading: boolean;
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties } from 'react';
2
- import type { AnimationType, IColumnProps } from '../../../../types/index.js';
2
+ import type { AnimationType, IColumnProps } from '../../../../../types/index.js';
3
3
  interface ISheetViewTableRowLoadingProps {
4
4
  columns: IColumnProps[];
5
5
  index?: number;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { ListOnScrollProps, VariableSizeList } from 'react-window';
3
- import type { IColumnProps } from '../../../../types/index.js';
3
+ import type { IColumnProps } from '../../../../../types/index.js';
4
4
  type VirtualTableItemData = {
5
5
  columns: IColumnProps[];
6
6
  isLoading: boolean;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { IColumnProps } from '../../../../../../types/index.js';
2
+ import type { IColumnProps } from '../../../../../../../types/index.js';
3
3
  interface UseColumnResizeWithPinnedProps {
4
4
  pinnedStartColumnsData: IColumnProps[];
5
5
  pinnedEndColumnsData: IColumnProps[];
@@ -11,11 +11,11 @@ export declare const useColumnResizeWithPinned: ({ pinnedStartColumnsData, pinne
11
11
  pinnedStartColumnsDataWithWidths: {
12
12
  width: string | number | undefined;
13
13
  header?: string | (() => import("react").ReactNode) | undefined;
14
- render?: ((props: import("../../../../../../types/index.js").IRenderAttr<any, IColumnProps<any>>) => import("react").ReactNode) | undefined;
14
+ render?: ((props: import("../../../../../../../types/index.js").IRenderAttr<any, IColumnProps<any>>) => import("react").ReactNode) | undefined;
15
15
  id: string | number | symbol;
16
16
  tableViewId?: string | undefined;
17
- format?: ((props: import("../../../../../../types/index.js").IFormatAttr<any>) => string) | undefined;
18
- selector?: ((props: import("../../../../../../types/index.js").ISelectorAttr<any>) => string | number | Record<string, any>) | undefined;
17
+ format?: ((props: import("../../../../../../../types/index.js").IFormatAttr<any>) => string) | undefined;
18
+ selector?: ((props: import("../../../../../../../types/index.js").ISelectorAttr<any>) => string | number | Record<string, any>) | undefined;
19
19
  align?: import("csstype").Property.TextAlign | undefined;
20
20
  sortable?: boolean | undefined;
21
21
  hidden?: boolean | undefined;
@@ -25,24 +25,24 @@ export declare const useColumnResizeWithPinned: ({ pinnedStartColumnsData, pinne
25
25
  cellStyle?: import("@mui/system").SxProps | undefined;
26
26
  headerStyle?: import("react").CSSProperties | undefined;
27
27
  filter?: ({
28
- onConfirm?: ((filterValues: import("../../../../../../types/index.js").ColumnFilterValues) => void) | undefined;
28
+ onConfirm?: ((filterValues: import("../../../../../../../types/index.js").ColumnFilterValues) => void) | undefined;
29
29
  onClear: (apiKeys: string[]) => void;
30
30
  onClearFilterFields?: (() => void) | undefined;
31
- data?: import("../../../../../../types/index.js").ColumnFilterValues | undefined;
31
+ data?: import("../../../../../../../types/index.js").ColumnFilterValues | undefined;
32
32
  isOnlyOneFilter?: boolean | undefined;
33
33
  wrapperSx?: import("@mui/system").SxProps | undefined;
34
34
  sx?: import("@mui/system").SxProps | undefined;
35
- } & (import("../../../../../../types/index.js").IColumnFilterList | import("../../../../../../types/index.js").IColumnFilterInputs | import("../../../../../../types/index.js").IColumnFilterCustom)) | undefined;
35
+ } & (import("../../../../../../../types/index.js").IColumnFilterList | import("../../../../../../../types/index.js").IColumnFilterInputs | import("../../../../../../../types/index.js").IColumnFilterCustom)) | undefined;
36
36
  isDefaultPinned?: boolean | undefined;
37
37
  }[];
38
38
  pinnedEndColumnsDataWithWidths: {
39
39
  width: string | number | undefined;
40
40
  header?: string | (() => import("react").ReactNode) | undefined;
41
- render?: ((props: import("../../../../../../types/index.js").IRenderAttr<any, IColumnProps<any>>) => import("react").ReactNode) | undefined;
41
+ render?: ((props: import("../../../../../../../types/index.js").IRenderAttr<any, IColumnProps<any>>) => import("react").ReactNode) | undefined;
42
42
  id: string | number | symbol;
43
43
  tableViewId?: string | undefined;
44
- format?: ((props: import("../../../../../../types/index.js").IFormatAttr<any>) => string) | undefined;
45
- selector?: ((props: import("../../../../../../types/index.js").ISelectorAttr<any>) => string | number | Record<string, any>) | undefined;
44
+ format?: ((props: import("../../../../../../../types/index.js").IFormatAttr<any>) => string) | undefined;
45
+ selector?: ((props: import("../../../../../../../types/index.js").ISelectorAttr<any>) => string | number | Record<string, any>) | undefined;
46
46
  align?: import("csstype").Property.TextAlign | undefined;
47
47
  sortable?: boolean | undefined;
48
48
  hidden?: boolean | undefined;
@@ -52,14 +52,14 @@ export declare const useColumnResizeWithPinned: ({ pinnedStartColumnsData, pinne
52
52
  cellStyle?: import("@mui/system").SxProps | undefined;
53
53
  headerStyle?: import("react").CSSProperties | undefined;
54
54
  filter?: ({
55
- onConfirm?: ((filterValues: import("../../../../../../types/index.js").ColumnFilterValues) => void) | undefined;
55
+ onConfirm?: ((filterValues: import("../../../../../../../types/index.js").ColumnFilterValues) => void) | undefined;
56
56
  onClear: (apiKeys: string[]) => void;
57
57
  onClearFilterFields?: (() => void) | undefined;
58
- data?: import("../../../../../../types/index.js").ColumnFilterValues | undefined;
58
+ data?: import("../../../../../../../types/index.js").ColumnFilterValues | undefined;
59
59
  isOnlyOneFilter?: boolean | undefined;
60
60
  wrapperSx?: import("@mui/system").SxProps | undefined;
61
61
  sx?: import("@mui/system").SxProps | undefined;
62
- } & (import("../../../../../../types/index.js").IColumnFilterList | import("../../../../../../types/index.js").IColumnFilterInputs | import("../../../../../../types/index.js").IColumnFilterCustom)) | undefined;
62
+ } & (import("../../../../../../../types/index.js").IColumnFilterList | import("../../../../../../../types/index.js").IColumnFilterInputs | import("../../../../../../../types/index.js").IColumnFilterCustom)) | undefined;
63
63
  isDefaultPinned?: boolean | undefined;
64
64
  }[];
65
65
  };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { IColumnProps } from '../../../../../../types/index.js';
2
+ import type { IColumnProps } from '../../../../../../../types/index.js';
3
3
  export interface ColumnResizeState {
4
4
  columnWidths: Record<string, number>;
5
5
  isResizing: boolean;
@@ -1,4 +1,4 @@
1
- import { SheetViewColumnsData } from '../../../../../../types/index.js';
1
+ import { SheetViewColumnsData } from '../../../../../../../types/index.js';
2
2
  export declare const getSheetViewColumns: () => SheetViewColumnsData;
3
3
  export declare const setSheetViewColumns: (data: SheetViewColumnsData) => boolean;
4
4
  export declare const getColumnWidth: (windowId: string, serviceCode: string, columnId: string, defaultWidth?: number) => number | undefined;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { IColumnProps } from '../../../../../../types/index.js';
2
+ import { IColumnProps } from '../../../../../../../types/index.js';
3
3
  import { ColumnResizeState } from '../types';
4
4
  export declare const parseColumnWidth: (width: React.CSSProperties['width']) => number;
5
5
  export declare const clampWidth: (width: number) => number;
@@ -1,4 +1,4 @@
1
- import type { IColumnProps } from '../../../../types/index.js';
1
+ import type { IColumnProps } from '../../../../../types/index.js';
2
2
  export declare const usePinnedColumns: (columns: readonly IColumnProps[], isPinnable: boolean, onColumnPin?: ((columnId: string, isPinned: boolean) => void) | undefined) => {
3
3
  pinnedStartColumns: string[];
4
4
  pinnedEndColumns: string[];
@@ -1,4 +1,4 @@
1
- import type { IColumnProps } from '../../../../types/index.js';
1
+ import type { IColumnProps } from '../../../../../types/index.js';
2
2
  export declare const usePinnedColumnsWidths: (pinnedStartColumnsData: IColumnProps[], pinnedEndColumnsData: IColumnProps[]) => {
3
3
  pinnedStartColumnsWidth: number;
4
4
  pinnedEndColumnsWidth: number;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { IColumnProps, TableChipProps } from '../../../../types/index.js';
2
+ import type { IColumnProps, TableChipProps } from '../../../../../types/index.js';
3
3
  import type { TableRowProps } from '@mui/material/TableRow';
4
4
  interface UseVirtualTableContainerProps<T = unknown> extends TableChipProps {
5
5
  rowHeight: number;
@@ -1,4 +1,4 @@
1
- import type { IColumnProps, IVirtualTable, TablePosition, SortingOrder, TableFooterProps } from '../../../types/index.js';
1
+ import type { IColumnProps, IVirtualTable, TablePosition, SortingOrder, TableFooterProps } from '../../../../types/index.js';
2
2
  import { type TableHeadProps } from '@mui/material/TableHead';
3
3
  import { type CSSProperties } from 'react';
4
4
  export interface ISheetViewVirtualTable extends Omit<IVirtualTable, 'isSheetView'> {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { IVirtualTable } from '../../../types/index.js';
2
+ import type { IVirtualTable } from '../../../../types/index.js';
3
3
  declare function VirtualTable({ columns, rows, threshold, showHeader, headerProps, rowProps, footerProps, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded, tableBodyStyles, tableMode, tableTitle, onStartDrag, isSheetView, isMinimized, footerComponent, customNoDataComponent, defaultSkeleton, selection, isFilterEnabled, }: Readonly<IVirtualTable>): import("react").JSX.Element;
4
4
  declare const _default: import("react").MemoExoticComponent<typeof VirtualTable>;
5
5
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { ReactNode, ReactElement } from 'react';
2
- import type { IVirtualTable } from '../../../types/index.js';
2
+ import type { IVirtualTable } from '../../../../types/index.js';
3
3
  export interface VirtualTableWithCardProps extends Omit<IVirtualTable, 'showHeader' | 'dimensions' | 'columns'> {
4
4
  tableHeader?: ReactNode;
5
5
  renderCardComponent: (rows: any) => ReactElement | null;
@@ -1,5 +1,5 @@
1
1
  import { MouseEvent } from 'react';
2
- import type { IColumnFilter, IColumnFilterInputs } from '../../../../../types/index.js';
2
+ import type { IColumnFilter, IColumnFilterInputs } from '../../../../../../types/index.js';
3
3
  interface InputsI {
4
4
  onCloseDropdown: (e: MouseEvent<HTMLElement>) => void;
5
5
  filter: IColumnFilter & IColumnFilterInputs;
@@ -11,7 +11,7 @@ export declare const wrapperBaseSx: (theme: Theme) => {
11
11
  export declare const Text: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
12
12
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
13
13
  }, keyof import("@mui/system").BoxOwnProps<Theme>> & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
14
- export declare const InputStyled: import("@emotion/styled").StyledComponent<Omit<Omit<import("../../../../primitives").InputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & {
14
+ export declare const InputStyled: import("@emotion/styled").StyledComponent<Omit<Omit<import("../../../../../primitives").InputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & {
15
15
  ref?: ((instance: HTMLInputElement | null) => void) | import("react").RefObject<HTMLInputElement> | null | undefined;
16
16
  } & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
17
17
  export declare const InputsWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
@@ -1,5 +1,5 @@
1
1
  import React, { MouseEvent, ReactNode } from 'react';
2
- import type { IColumnFilter, IColumnFilterList } from '../../../../../types/index.js';
2
+ import type { IColumnFilter, IColumnFilterList } from '../../../../../../types/index.js';
3
3
  interface ListI {
4
4
  onCloseDropdown: (e: MouseEvent<HTMLElement>) => void;
5
5
  filter: IColumnFilter & IColumnFilterList;
@@ -1,5 +1,5 @@
1
1
  import { MouseEvent } from 'react';
2
- import { IColumnFilter } from '../../../../types/index.js';
2
+ import { IColumnFilter } from '../../../../../types/index.js';
3
3
  export type ColumnFilterProps = IColumnFilter & {
4
4
  anchorEl: HTMLElement | null;
5
5
  setAnchorEl: (el: HTMLElement | null) => void;
@@ -1,5 +1,5 @@
1
1
  import { type MouseEvent } from 'react';
2
- import type { IColumnProps } from '../../../../types/index.js';
2
+ import type { IColumnProps } from '../../../../../types/index.js';
3
3
  import { TableHeaderProps } from '../TableHeader/type';
4
4
  interface ColumnSortProps extends Pick<TableHeaderProps, 'onColumnSort' | 'columnsSorting'> {
5
5
  columnId: IColumnProps['id'];
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { TableFooterProps } from '../../../../types/index.js';
2
+ import { TableFooterProps } from '../../../../../types/index.js';
3
3
  declare function TableFooter({ totalCount, showBackDrop, showSeparator, sandboxMode, maximized, selectedCount, ...other }: Readonly<TableFooterProps>): React.JSX.Element;
4
4
  declare const _default: React.MemoExoticComponent<typeof TableFooter>;
5
5
  export default _default;
@@ -13,10 +13,10 @@ export declare const EngravingLine: import("@emotion/styled").StyledComponent<im
13
13
  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"> & {
14
14
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
15
15
  }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
16
- export declare const Title: import("@emotion/styled").StyledComponent<Omit<Omit<import("../../../primitives").TypographyProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref"> & {
16
+ export declare const Title: import("@emotion/styled").StyledComponent<Omit<Omit<import("../../../../primitives").TypographyProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref"> & {
17
17
  ref?: import("react").RefObject<HTMLElement> | ((instance: HTMLElement | null) => void) | null | undefined;
18
18
  } & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
19
- export declare const ValueWrapper: import("@emotion/styled").StyledComponent<Omit<Omit<import("../../../primitives").TypographyProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref"> & {
19
+ export declare const ValueWrapper: import("@emotion/styled").StyledComponent<Omit<Omit<import("../../../../primitives").TypographyProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref"> & {
20
20
  ref?: import("react").RefObject<HTMLElement> | ((instance: HTMLElement | null) => void) | null | undefined;
21
21
  } & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
22
22
  export declare const Value: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import type { IColumnProps } from '../../../../../../types/index.js';
3
- import { TableHeaderProps } from '../../../../../VirtualTables/components/TableHeader';
2
+ import type { IColumnProps } from '../../../../../../../types/index.js';
3
+ import { TableHeaderProps } from '../../../../../../modules/VirtualTables/components/TableHeader';
4
4
  interface TableCellProps extends Pick<TableHeaderProps, 'onColumnSort' | 'isSheetView' | 'columnsSorting' | 'isFilterEnabled'> {
5
5
  column: IColumnProps;
6
6
  isFirst: boolean;
@@ -1,5 +1,5 @@
1
1
  import { type TableHeadProps } from '@mui/material/TableHead';
2
- import type { IColumnProps, IVirtualTable } from '../../../../types/index.js';
2
+ import type { IColumnProps, IVirtualTable } from '../../../../../types/index.js';
3
3
  export interface TableHeaderProps {
4
4
  columns: IColumnProps[];
5
5
  headerProps?: TableHeadProps;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { AnimationType, IColumnProps } from '../../../types/index.js';
2
+ import type { AnimationType, IColumnProps } from '../../../../types/index.js';
3
3
  interface ITableLoadingProps {
4
4
  columns: IColumnProps[];
5
5
  isLoaded?: boolean;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { IColumnProps, IVirtualTable } from '../../../types/index.js';
2
+ import type { IColumnProps, IVirtualTable } from '../../../../types/index.js';
3
3
  interface TableNoDataProps {
4
4
  tableEmpty: boolean;
5
5
  tableLoading: boolean;
@@ -1,5 +1,5 @@
1
1
  import { ReactElement, ReactNode } from 'react';
2
- import type { IVirtualTable } from '../../../types/index.js';
2
+ import type { IVirtualTable } from '../../../../types/index.js';
3
3
  interface TableNoDataWithCardProps {
4
4
  tableEmpty: boolean;
5
5
  tableLoading: boolean;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type TableRowProps } from '@mui/material';
3
- import type { BulkSelectionProps, IColumnProps } from '../../../types/index.js';
3
+ import type { BulkSelectionProps, IColumnProps } from '../../../../types/index.js';
4
4
  interface ITableRowProps<R = any> {
5
5
  row: R;
6
6
  columns: Array<IColumnProps<R>>;
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties } from 'react';
2
- import type { AnimationType, IColumnProps } from '../../../types/index.js';
2
+ import type { AnimationType, IColumnProps } from '../../../../types/index.js';
3
3
  interface ITableRowLoadingProps {
4
4
  columns: IColumnProps[];
5
5
  index?: number;
@@ -338,7 +338,7 @@ export declare const StyledCardsBox: import("@emotion/styled").StyledComponent<i
338
338
  }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
339
339
  showNoDataView: boolean;
340
340
  }, {}, {}>;
341
- export declare const StyledCheckbox: import("@emotion/styled").StyledComponent<Omit<Omit<import("../../primitives").CheckboxProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & {
341
+ export declare const StyledCheckbox: import("@emotion/styled").StyledComponent<Omit<Omit<import("../../../primitives").CheckboxProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & {
342
342
  ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
343
343
  } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
344
344
  isRow?: boolean | undefined;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { ListChildComponentProps } from 'react-window';
3
- import type { IColumnProps } from '../../../../types/index.js';
3
+ import type { IColumnProps } from '../../../../../types/index.js';
4
4
  export declare const LastRowContent: React.MemoExoticComponent<({ isLoadingRow, isSheetView, columns, currentRowCount, }: {
5
5
  isLoadingRow: boolean;
6
6
  isSheetView?: boolean | undefined;
@@ -1,4 +1,4 @@
1
- import type { IColumnFilter, IVirtualTable } from '../../../types/index.js';
1
+ import type { IColumnFilter, IVirtualTable } from '../../../../types/index.js';
2
2
  type UseColumnFilterParams = {
3
3
  filter?: IColumnFilter;
4
4
  totalCount?: number;
@@ -0,0 +1,7 @@
1
+ import VirtualTable from './VirtualTable/VirtualTable';
2
+ import VirtualTableWithCard from './VirtualTableWithCard/VirtualTableWithCard';
3
+ export * from './components';
4
+ export * from './hooks';
5
+ export * from './SheetViewVirtualTable';
6
+ export { StyledCell } from './components/style';
7
+ export { VirtualTable, VirtualTableWithCard };
@@ -0,0 +1 @@
1
+ export{C as ActionIcon,d as ColumnFilter,D as ColumnIcon,E as HeaderText,b as Inputs,t as LastRowContent,c as List,A as ListItemWrapperWithCard,Z as LoadingMainTable,Y as MainTable,L as MainTableWrapper,_ as NoDataView,F as PinIconContainer,X as PinnedColumn,K as PinnedEndColumnWrapper,J as PinnedStartColumnWrapper,q as RowErrorState,W as SheetViewTableHeader,U as SheetViewTableLoading,V as SheetViewTableNoData,s as SheetViewTableRowLoading,$ as SheetViewVirtualTable,I as SheetViewVirtualTableWrapper,h as StyledCell,G as StyledHeader,n as StyledImage,u as StyledItemWrapper,H as StyledMUITableRow,o as TableError,j as TableHeader,k as TableLastItem,m as TableLoading,x as TableLoadingWithCard,p as TableNoData,y as TableNoDataWithCard,r as TableRow,l as TableRowLoading,w as TableRowLoadingWithCard,z as TableRowWithCard,M as UnpinnedTableHeaderWrapper,e as VirtualScrollInner,g as VirtualScrollList,f as VirtualScrollOuter,v as VirtualTable,B as VirtualTableWithCard,i as useColumnFilter,N as usePinnedColumns,S as usePinnedColumnsWidths,O as useSynchronizedScroll,Q as useTableData,T as useTableDimensions,P as useTableState,R as useVirtualTableContainer}from'../../../_chunks/chunk-MH3KQO3F.js';import'../../../_chunks/chunk-VDOQXEUT.js';export{c as TableFooter}from'../../../_chunks/chunk-54TY5SXL.js';import'../../../_chunks/chunk-DS6S5G66.js';import'../../../_chunks/chunk-K43ZLU4I.js';import'../../../_chunks/chunk-I3LSSBRI.js';import'../../../_chunks/chunk-IQAHULGQ.js';import'../../../_chunks/chunk-ZDBICST5.js';
@@ -1 +1 @@
1
- import {a as a$1}from'../../_chunks/chunk-B76NSJAU.js';import'../../_chunks/chunk-C5EKTMXI.js';import'../../_chunks/chunk-BJRQ4GM3.js';import'../../_chunks/chunk-74TIGJAP.js';import'../../_chunks/chunk-NCG4PCDH.js';import'../../_chunks/chunk-G3QDXDRW.js';import'../../_chunks/chunk-XB7FBOZY.js';import'../../_chunks/chunk-Q6AL55UP.js';import'../../_chunks/chunk-T7FK7EI2.js';import'../../_chunks/chunk-6BFV6NCN.js';import'../../_chunks/chunk-LJY75SQY.js';import'../../_chunks/chunk-PNIR4GUC.js';import'../../_chunks/chunk-MGH52F2U.js';import'../../_chunks/chunk-EB24OXAG.js';import'../../_chunks/chunk-637B2KTR.js';import'../../_chunks/chunk-VDOQXEUT.js';import'../../_chunks/chunk-6IAMZFT6.js';import'../../_chunks/chunk-7SNHZ7VW.js';import'../../_chunks/chunk-FOSRKOWU.js';import'../../_chunks/chunk-TDNUHD3F.js';import'../../_chunks/chunk-CDBXA7HF.js';import'../../_chunks/chunk-ALZSCMJI.js';import'../../_chunks/chunk-44P3BD62.js';import'../../_chunks/chunk-4HUB6MWM.js';import'../../_chunks/chunk-UPSV4H3R.js';import'../../_chunks/chunk-2YNDLGG6.js';import'../../_chunks/chunk-ZZPTXUPF.js';import'../../_chunks/chunk-53C2M4NA.js';import'../../_chunks/chunk-NW7HJXBW.js';import'../../_chunks/chunk-YROLX5D7.js';import'../../_chunks/chunk-5DFEQLOX.js';import'../../_chunks/chunk-MBC5H6W7.js';import'../../_chunks/chunk-SNCNXCPA.js';import'../../_chunks/chunk-Y7SE3WMR.js';import'../../_chunks/chunk-HDCNWBW5.js';import'../../_chunks/chunk-L3QJZAXC.js';import'../../_chunks/chunk-EQVNNGL6.js';import'../../_chunks/chunk-5VRO5GY3.js';import'../../_chunks/chunk-OL6PQPSI.js';import'../../_chunks/chunk-WHPBDYOY.js';import'../../_chunks/chunk-TC4ME6DZ.js';import'../../_chunks/chunk-ESRTU72R.js';import'../../_chunks/chunk-IRBWQZSH.js';import'../../_chunks/chunk-HWDXYAQY.js';import'../../_chunks/chunk-PGRQEN5C.js';import'../../_chunks/chunk-334EPCW5.js';import'../../_chunks/chunk-ZT35MSJQ.js';import'../../_chunks/chunk-IA5IEBOH.js';import'../../_chunks/chunk-JZN7D44A.js';import'../../_chunks/chunk-D43ULOY2.js';import'../../_chunks/chunk-HBR7P4LZ.js';import'../../_chunks/chunk-JWLIHVLP.js';import'../../_chunks/chunk-LEFLUMTS.js';import'../../_chunks/chunk-Y2GYQNCW.js';import'../../_chunks/chunk-ZRRZG4CU.js';import'../../_chunks/chunk-OGVYYV4P.js';import'../../_chunks/chunk-7ZWAT3EG.js';import'../../_chunks/chunk-5BAFTVZQ.js';import'../../_chunks/chunk-YFIYVG7E.js';import'../../_chunks/chunk-BTE72W4R.js';import {a}from'../../_chunks/chunk-XK6PKLJK.js';import'../../_chunks/chunk-TYMPXKFT.js';import {b}from'../../_chunks/chunk-WYJOH2AK.js';import'../../_chunks/chunk-MQT2XWOM.js';import'../../_chunks/chunk-BFVDSVFM.js';import'../../_chunks/chunk-EG32DA46.js';import'../../_chunks/chunk-QNBOZQDY.js';import'../../_chunks/chunk-FQ2VMVUY.js';import'../../_chunks/chunk-4YB6A7BD.js';import'../../_chunks/chunk-MUR4ILTY.js';import'../../_chunks/chunk-3CMVSEFO.js';import {j,L,B as B$1,x as x$1,p,R as R$1,h as h$1}from'../../_chunks/chunk-K43ZLU4I.js';import {z,x,B,C,A,m,h,o,b as b$1,p as p$1,n}from'../../_chunks/chunk-PI3EDHDX.js';import'../../_chunks/chunk-DS6S5G66.js';import {zc,Wa,Ka}from'../../_chunks/chunk-I3LSSBRI.js';import {Vj,Wj,Xj,Yj,H,Xc,ec,gc,fc,dl,el}from'../../_chunks/chunk-IQAHULGQ.js';import'../../_chunks/chunk-ZDBICST5.js';import {memo,createContext,useState,useMemo,useId,useRef,useEffect,useContext}from'react';import y from'@mui/material/Box';import ut from'@mui/material/Popper';import {useTranslation}from'react-i18next';import yt from'@mui/material/ClickAwayListener';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';import q from'@mui/material/Button';import {Calendar,DateObject}from'react-multi-date-picker';import Ee from'react-date-object';import ht from'react-date-object/calendars/arabic';import Tt from'react-date-object/calendars/gregorian';import kt from'react-date-object/locales/arabic_en';import wt from'react-date-object/locales/gregorian_en';var co=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"})),mo=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"}})),$=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})),K=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:t,countryCodes:n}){let[i,p]=useState(null),a$1=m=>{i||p(m.currentTarget);},l=()=>{i&&p(null);},r=(m,T)=>{m.stopPropagation(),o(T);},g=useMemo(()=>n.map(A).filter(m=>!!m),[n]),c=g.some(m=>B(m,e)),x=c?e:t;return jsxs($,{onMouseEnter:a$1,onMouseLeave:l,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(K,{className:c?"selected":"",children:C(x)}),jsx(ut,{open:!!i,anchorEl:i,placement:"right-start",sx:{zIndex:3},disablePortal:true,children:jsx(fe,{sx:{maxHeight:300},children:g.map(m=>{let T=B(m,e);return jsxs($,{onClick:G=>{r(G,m);},sx:{gap:"4px"},children:[T?jsx("img",{src:Yj,alt:"icon"}):jsx(_,{}),jsx(a,{countryCode:m.countryCode}),jsx(K,{className:T?"selected":"",children:C(m)})]},m.countryCode)})})})]})}function ve({zone:e,onChange:o}){let t=z(x());if(!t)return null;let n=B(t,e);return jsxs($,{onClick:()=>o(t),children:[n?jsx("img",{src:Yj,alt:"icon"}):jsx(_,{}),jsx("img",{src:Vj,alt:"user-timezone"}),jsx(a,{countryCode:t.countryCode}),jsx(K,{className:n?"selected":"",children:C(t)})]})}function Ct({zone:e,onChange:o,defaultCountryZone:t,countryCodes:n}){let[i,p]=useState(null),a$1=!!i,l=z(x()),r=()=>{p(null);},g=m=>{o(m),r();},c=m=>{p(m.currentTarget);},x$1=B(e,l)?Vj:B(e,t)?Wj:Xj;return jsx(yt,{onClickAway:r,children:jsxs(co,{"data-testid":"ZonePicker",children:[jsxs(mo,{open:a$1,onClick:c,children:[jsx("img",{src:x$1,alt:"zone-icon"}),jsx(a,{countryCode:e.countryCode}),jsx("span",{children:C(e)})]}),jsx(ut,{open:a$1,anchorEl:i,placement:"top-start",sx:{zIndex:1400},children:jsxs(fe,{"data-testid":"ZonePicker_dropdown",children:[jsx(Re,{zone:e,onChange:g,defaultCountryZone:t,countryCodes:n}),jsx(ve,{zone:e,onChange:g})]})})]})})}var Se=memo(Ct);var fo=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"}})),go=styled(q)(({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}})),xo=styled(q)(({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}})),yo=styled(y)(()=>({display:"flex",gap:8,marginLeft:"auto",flexShrink:0})),bo=styled(q,{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]}})),Co=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"})),Do=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"})),ho=styled(y)(()=>({display:"flex",alignItems:"center",gap:"10px"})),To=styled(y)(()=>({position:"relative"})),ko=styled(y)(()=>({display:"flex",flexDirection:"column",gap:"24px"})),wo=styled(y)(({theme:e})=>({color:e.palette.grey[700],fontSize:"9px",fontWeight:500,marginBottom:"6px"})),Mo=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]}})),Po=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"})),Ro=styled(y)(({theme:e})=>({width:71,padding:"4px 0",cursor:"pointer","&:hover, &.active":{borderRadius:"100px",background:e.palette.info.light}})),vo=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"}})),Bo=styled(q)(()=>({minWidth:"auto",padding:0,"& > img":{cursor:"pointer"}})),So=styled(q)(({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}})),Oo=styled(y)(()=>({display:"flex",flexDirection:"column",gap:"8px"})),Eo=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}}})),Zo=styled(y)(()=>({width:235})),Io=styled(y)(()=>({display:"flex",gap:"4px"})),Ao=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}=useTranslation();return jsx(y,{children:jsxs(vo,{children:[jsxs(y,{children:[jsx("img",{src:ec,alt:"hijri"}),jsx("span",{children:t("hijri")})]}),jsx(h$1,{checked:e==="hijri",onChange:()=>o?.(e==="hijri"?"gregorian":"hijri")})]})})}var P=e=>e==="hijri"?kt:wt,R=e=>e==="hijri"?ht:Tt,jo=(e,o)=>!e||Number.isNaN(e.getTime())?void 0:new Ee({date:e,calendar:R(o),locale:P(o)}),Ze=(e,o,t)=>{let n=jo(b$1(e?.[0],t),o),i=jo(b$1(e?.[1],t),o);if(n&&i)return [n,i];let p=R(o),a=P(o),l=b$1(Date.now(),t)??new Date;return [new Ee({date:new Date(l.getFullYear(),l.getMonth(),l.getDate()-6),calendar:p,locale:a}),new Ee({date:l,calendar:p,locale:a})]},Ho=(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),Ie=e=>!!e[1]&&e[0].format("YYYYMMDD")===e[1].format("YYYYMMDD");var Bt=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 Wo({zone:e,range:o$1,onApply:t,calendarMode:n$1="gregorian",maxRangeDays:i,groupBy:p,onGroupByChange:a}){let[l,r]=useState(()=>Ze(o$1,n$1,e.zone)),[g,c]=useState(l),[x,m]=useState(e),[T,G]=useState(p??"day"),[te,D]=useState(()=>o(o$1,e.zone)),[re,V]=useState(null),[ne,ae]=useState(false),S=useRef(null),L=!!re,s=i===void 0?Bt:i;useEffect(()=>{if(L)return;let d=Ze(o$1,n$1,e.zone);r(d),c(d),D(o(o$1,e.zone)),S.current&&S.current.set("date",d[0]);},[o$1,e.zone,e.countryCode,n$1,L]),useEffect(()=>{let d=u=>new DateObject({date:u.toDate(),calendar:R(n$1),locale:P(n$1)});r(u=>[d(u[0]),d(u[1])]),c(u=>[d(u[0]),d(u[1])]);},[n$1]),useEffect(()=>{m(d=>d.zone===e.zone&&d.countryCode===e.countryCode?d:e);},[e.zone,e.countryCode,L]);let k=d=>{let u=d;if(d.length<2||s===0)return u;let j=Ho(xe(d[0]).toDate(),ye(d[1]).toDate());return j<=s?u:(ae(true),setTimeout(()=>{ae(false);},3e3),[d[0],d[1].subtract(j-s,"d")])},rt=d=>{let u=k(d);r(u),D(!Ie(u));},nt=d=>{let u=k(d);r([xe(u[0]),ye(u[1])]),D(true),S.current&&S.current.set("date",u[0]);},at=d=>r(d),it=d=>{D(d),d&&l[1]&&r([xe(l[0]),ye(l[1])]);},_e=()=>V(null),pt=d=>V(d.currentTarget),lt=()=>{let d=[l[0].toDate(),l[1].toDate()];return {range:(te?p$1(d,x.zone):n(d,x.zone))??d,zone:x}},dt=()=>{t(lt())!==false&&(c(l),a?.(T),_e());},st=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:l,isAllDay:te,isSameDay:Ie(l),isError:ne,maxRangeDays:s,open:L,anchorEl:re,pickedZone:x,selectedGroupBy:T,calendarRef:S,maxDate:b$1(Date.now(),x.zone),rangeLabel:st(g),pickRange:rt,pickPreset:nt,setTimes:at,setAllDay:it,pickZone:m,setGroupBy:G,openPicker:pt,closePicker:_e,apply:dt}}var Go={day:"Day",month:"Month",quarter:"Quarter",year:"Year"};function Zt(){let{selectedGroupBy:e,setGroupBy:o,open:t}=v(),[n,i]=useState(null),p=!!n&&t,{t:a}=useTranslation();return jsx(yt,{onClickAway:()=>i(null),children:jsxs(y,{children:[jsx(wo,{children:a("groupedBy")}),jsxs(Mo,{onClick:l=>i(l.currentTarget),open:p,children:[jsx("span",{children:Go[e]}),jsx(y,{component:"img",src:Xc,alt:"arrow",sx:{...p&&{transform:"rotate(180deg)"}}})]}),jsx(R$1,{open:p,anchorEl:n,children:jsx(Po,{sx:{width:n?.clientWidth},children:Object.entries(Go).map(([l,r])=>jsx(Ro,{onClick:()=>{o(l),i(null);},className:e===l?"active":"",children:r},l))})})]})})}var Yo=Zt;var At=["Su","Mo","Tu","We","Th","Fr","Sa"];function zt({calendarMode:e}){let{draft:o,maxDate:t,calendarRef:n,pickRange:i}=v();return jsx(Calendar,{ref:n,numberOfMonths:2,value:o,onChange:i,calendar:R(e),locale:P(e),range:true,format:"MMM DD",monthYearSeparator:" ",renderButton:(p,a)=>jsx(Bo,{onClick:a,children:jsx("img",{src:p==="right"?gc:fc,alt:"arrow"})}),weekDays:At,maxDate:t})}var No=zt;function He({calendarMode:e}){let{t:o}=useTranslation(),{pickedZone:t,pickPreset:n}=v(),i=useMemo(()=>{let p=b$1(Date.now(),t.zone)??new Date,a=()=>new DateObject({date:p,calendar:R(e),locale:P(e)}),l=r=>a().subtract(r,"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(r=>({id:l(r).toFirstOfMonth().format("MMMM YYYY"),value:[l(r).toFirstOfMonth(),l(r).toLastOfMonth()]}))]},[e,t.zone]);return jsx(y,{"data-testid":"RangePresets",children:jsx(Oo,{children:i.map(p=>jsx(So,{onClick:a=>{a.preventDefault(),n(p.value);},children:o(p.id)},p.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,$o=()=>new Date().getMinutes(),_o=()=>Q(new Date().getHours());var Ko=styled(y)(()=>({width:157,padding:"16px",display:"flex",alignItems:"center",justifyContent:"center",gap:"16px"})),Uo=styled(j,{shouldForwardProp:e=>e!=="open"&&e!=="size"})(({theme:e,open:o,size:t})=>{let{base:n,grey:i,brand:p}=e.v2.palette;return {fontSize:"11px",fontWeight:500,background:n.white,border:`1px solid ${i[100]}`,borderRadius:"19px",height:t==="large"?32:24,width:t==="large"?74:58,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",...o&&{boxShadow:"0px 0px 4px 0px #1F88D080",borderColor:p[500]}}}),J=styled(y)(()=>({textAlign:"center",cursor:"pointer",userSelect:"none"})),qo=styled(j,{shouldForwardProp:e=>e!=="selected"})(({theme:e,selected:o})=>{let{base:t,grey:n,brand:i}=e.v2.palette;return {fontSize:"11px",fontWeight:500,background:t.white,border:`1px solid ${n[100]}`,borderRadius:"4px",height:24,width:33,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",...o&&{borderColor:"transparent",color:i[500],backgroundColor:alpha(i[500],.1)}}}),Qo=styled(y)(()=>({display:"flex",flexDirection:"column",gap:"4px"})),Xo=styled(y)(()=>({display:"flex",alignItems:"center",justifyContent:"center",gap:"4px"})),We=styled(y)(()=>({display:"flex",flexDirection:"column",justifyContent:"center",gap:"6px"})),Fe=styled(L)(()=>({flexGrow:1,maxWidth:"100%",".MuiInput-input":{fontWeight:"500",fontSize:"11px",textAlign:"center"},".MuiInput-root":{paddingInline:"8px"},height:32,width:32}));var $t=["AM","PM"],he=12,Ge=59;function Te({onChange:e,defaultTime:o,enableRealTimeChange:t,size:n="large"}){let i=zc(useId(),"time-picker"),[p,a]=useState(null),[l,r]=useState(o?.period??(new Date().getHours()>=he?"PM":"AM")),[g,c]=useState(o?.hour??_o()),[x,m]=useState(o?.minute??$o()),T=!!p;useEffect(()=>{t&&e?.({hour:g,minute:x,period:l});},[g,x,l,t]);let G=s=>{a(s.currentTarget);},te=()=>{a(null),e?.({hour:g,minute:x,period:l});},D=s=>s<10?`0${s}`:s.toString(),re=s=>{let k=Ka(D(Number(s.target.value)));if(k>he){s.preventDefault();return}c(k);},V=()=>{c(s=>s===he?1:s+1);},ne=()=>{c(s=>s===1?he:s-1);},ae=s=>{let k=Ka(D(Number(s.target.value)));if(k>Ge){s.preventDefault();return}m(k);},S=()=>{m(s=>s===Ge?(V(),0):s+1);},L=()=>{m(s=>s===0?(ne(),Ge):s-1);};return jsx(yt,{onClickAway:te,children:jsxs(y,{id:i,"data-testid":"TimePicker",children:[jsx(Uo,{size:n,open:T,onClick:G,children:`${D(g)}:${D(x)}${l.toLowerCase()}`}),jsx(R$1,{open:T,anchorEl:p,placement:"top-start",sx:{marginTop:"8px",marginBottom:"8px"},children:jsxs(Ko,{children:[jsxs(Xo,{children:[jsxs(We,{children:[jsx(J,{onClick:V,children:jsx("img",{src:dl,alt:"arrow"})}),jsx(Fe,{type:"number",hideArrows:true,disableFocusRing:true,value:D(g),onChange:re}),jsx(J,{onClick:ne,children:jsx("img",{src:el,alt:"arrow"})})]}),jsx(j,{children:":"}),jsxs(We,{children:[jsx(J,{onClick:S,children:jsx("img",{src:dl,alt:"arrow"})}),jsx(Fe,{type:"number",hideArrows:true,disableFocusRing:true,value:D(x),onChange:ae}),jsx(J,{onClick:L,children:jsx("img",{src:el,alt:"arrow"})})]})]}),jsx(Qo,{children:$t.map(s=>jsx(qo,{onClick:()=>r(s),selected:l===s,children:s},s))})]})})]})})}function Kt(){let{t:e}=useTranslation(),{draft:o,isAllDay:t,setTimes:n,setAllDay:i}=v(),p=new DateObject(o[0]),a=new DateObject(o[1]),l=({hour:g,minute:c,period:x})=>{n([p.setHour(Ce(g,x??"AM")).setMinute(c).setSecond(0),a]);},r=({hour:g,minute:c,period:x})=>{n([p,a.setHour(Ce(g,x??"AM")).setMinute(c).setSecond(59)]);};return jsx(Zo,{children:jsxs(Ao,{children:[jsxs(Eo,{isAllDay:t,children:[jsx("span",{className:"label",children:e("allDay")}),jsx(h$1,{checked:t,onChange:g=>i(g.target.checked)})]}),!t&&jsxs(Io,{children:[jsx(Te,{defaultTime:{hour:Q(p.hour),minute:p.minute,period:be(p.hour)},size:"small",onChange:l,enableRealTimeChange:true},`${o[0]?.toString()}-start`),jsx(Te,{defaultTime:{hour:Q(a.hour),minute:a.minute,period:be(a.hour)},size:"small",onChange:r,enableRealTimeChange:true},`${o[1]?.toString()}-end`)]})]})})}var et=Kt;function Jt(e){let{calendarMode:o="gregorian",onCalendarModeChange:t,defaultCountryZone:n,countryCodes:i,groupBy:p}=e,{t:a}=useTranslation(),l=zc(useId(),"date-range-calendar"),r=Wo(e),g=c=>{c.key==="Enter"&&r.draft[1]&&!r.isError?(c.stopPropagation(),r.apply()):c.key==="Escape"&&(c.stopPropagation(),r.closePicker());};return jsx(ze.Provider,{value:r,children:jsxs(To,{id:l,"data-testid":"DateRangeCalendar",children:[jsx(bo,{onClick:r.openPicker,open:r.open,children:r.rangeLabel}),r.open&&jsx(B$1,{onClick:c=>{c.stopPropagation(),r.closePicker();}}),jsx(ut,{open:r.open,anchorEl:r.anchorEl,placement:"bottom-end",children:jsxs(fo,{onKeyDown:g,children:[jsxs(Do,{children:[jsx(He,{calendarMode:o}),jsxs(ko,{children:[p&&jsx(Yo,{}),jsx(Oe,{calendarMode:o,onCalendarModeChange:t})]})]}),jsxs(y,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[jsx(No,{calendarMode:o}),jsx(x$1,{in:r.isError&&r.maxRangeDays>0,children:jsx(b,{severity:"error",message:a("dateRangeError",{number:r.maxRangeDays}),sx:{marginInline:"16px",marginBottom:"16px"}})}),jsxs(Co,{sx:{borderBottomLeftRadius:"8px"},children:[n&&i&&jsx(ho,{children:jsx(Se,{zone:r.pickedZone,onChange:r.pickZone,defaultCountryZone:n,countryCodes:i},String(r.open))}),r.isSameDay&&jsx(et,{}),jsxs(yo,{children:[jsx(go,{variant:"contained",onClick:r.closePicker,children:a("cancel")}),jsx(xo,{variant:"contained",onClick:r.apply,disabled:!r.draft[1],children:a("okay")})]})]})]})]})})]})})}var ot=Jt;function or({value:e,zone:o,format:t,...n}){let i=useMemo(()=>m(e,o,t),[e,o,t]);return jsx(a$1,{...n,children:i})}var tr=or;var tt=styled(y)({display:"flex",alignItems:"center",gap:"12px"});function lr({value:e,zone:o,format:t,rendered:n,tableMode:i,...p}){let a=useMemo(()=>n??m(e,o,t),[n,e,o,t]);return jsx(a$1,{...p,children:jsx(tt,{children:jsx(y,{sx:{...Wa(i)&&{fontSize:"11px"}},children:a})})})}var Ne=lr;function cr({value:e,zone:o,hintZone:t,format:n,tableMode:i,...p$1}){let a=useMemo(()=>{if(!(!t||e==null||e===""))return h(o,t,e)?m(e,t):void 0},[e,o,t]);return jsxs(y,{sx:{display:"flex",gap:"8px"},children:[jsx(Ne,{value:e,zone:o,format:n,tableMode:i,...p$1}),a!==void 0&&jsx(p,{title:a,children:jsx("img",{src:H,width:14,alt:"timezone"})})]})}var mr=cr;export{ot as DateRangeCalendar,Se as ZonePicker,tr as ZonedDateCell,mr as ZonedDateHintViewer,Ne as ZonedDateViewer};
1
+ import {a as a$1}from'../../_chunks/chunk-TR2D6CJW.js';import'../../_chunks/chunk-N7BI2AMJ.js';import'../../_chunks/chunk-MH3KQO3F.js';import'../../_chunks/chunk-74TIGJAP.js';import'../../_chunks/chunk-M6SPV57Z.js';import'../../_chunks/chunk-G3QDXDRW.js';import'../../_chunks/chunk-XB7FBOZY.js';import'../../_chunks/chunk-Q6AL55UP.js';import'../../_chunks/chunk-7GTNCNBB.js';import'../../_chunks/chunk-6BFV6NCN.js';import'../../_chunks/chunk-LJY75SQY.js';import'../../_chunks/chunk-PNIR4GUC.js';import'../../_chunks/chunk-MGH52F2U.js';import'../../_chunks/chunk-EB24OXAG.js';import'../../_chunks/chunk-VDOQXEUT.js';import'../../_chunks/chunk-637B2KTR.js';import'../../_chunks/chunk-7SNHZ7VW.js';import'../../_chunks/chunk-FOSRKOWU.js';import'../../_chunks/chunk-6IAMZFT6.js';import'../../_chunks/chunk-TDNUHD3F.js';import'../../_chunks/chunk-HS3LRC2D.js';import'../../_chunks/chunk-ALZSCMJI.js';import'../../_chunks/chunk-B4T3R7V3.js';import'../../_chunks/chunk-54TY5SXL.js';import'../../_chunks/chunk-44P3BD62.js';import'../../_chunks/chunk-4HUB6MWM.js';import'../../_chunks/chunk-UPSV4H3R.js';import'../../_chunks/chunk-2YNDLGG6.js';import'../../_chunks/chunk-ZZPTXUPF.js';import'../../_chunks/chunk-53C2M4NA.js';import'../../_chunks/chunk-NW7HJXBW.js';import'../../_chunks/chunk-YROLX5D7.js';import'../../_chunks/chunk-5DFEQLOX.js';import'../../_chunks/chunk-MBC5H6W7.js';import'../../_chunks/chunk-SNCNXCPA.js';import'../../_chunks/chunk-Y7SE3WMR.js';import'../../_chunks/chunk-HDCNWBW5.js';import'../../_chunks/chunk-L3QJZAXC.js';import'../../_chunks/chunk-OL6PQPSI.js';import'../../_chunks/chunk-WHPBDYOY.js';import'../../_chunks/chunk-ESRTU72R.js';import'../../_chunks/chunk-TC4ME6DZ.js';import'../../_chunks/chunk-IRBWQZSH.js';import'../../_chunks/chunk-HWDXYAQY.js';import'../../_chunks/chunk-334EPCW5.js';import'../../_chunks/chunk-PGRQEN5C.js';import'../../_chunks/chunk-ZT35MSJQ.js';import'../../_chunks/chunk-IA5IEBOH.js';import'../../_chunks/chunk-JZN7D44A.js';import'../../_chunks/chunk-D43ULOY2.js';import'../../_chunks/chunk-HBR7P4LZ.js';import'../../_chunks/chunk-JWLIHVLP.js';import'../../_chunks/chunk-LEFLUMTS.js';import'../../_chunks/chunk-Y2GYQNCW.js';import'../../_chunks/chunk-ZRRZG4CU.js';import'../../_chunks/chunk-OGVYYV4P.js';import'../../_chunks/chunk-7ZWAT3EG.js';import'../../_chunks/chunk-5BAFTVZQ.js';import'../../_chunks/chunk-BTE72W4R.js';import'../../_chunks/chunk-YFIYVG7E.js';import {a}from'../../_chunks/chunk-XK6PKLJK.js';import {b}from'../../_chunks/chunk-WYJOH2AK.js';import'../../_chunks/chunk-MQT2XWOM.js';import'../../_chunks/chunk-BFVDSVFM.js';import'../../_chunks/chunk-EG32DA46.js';import'../../_chunks/chunk-QNBOZQDY.js';import'../../_chunks/chunk-FQ2VMVUY.js';import'../../_chunks/chunk-4YB6A7BD.js';import'../../_chunks/chunk-MUR4ILTY.js';import'../../_chunks/chunk-3CMVSEFO.js';import {z,x,B,C,A,m,h,o,b as b$1,p as p$1,n}from'../../_chunks/chunk-PI3EDHDX.js';import'../../_chunks/chunk-DS6S5G66.js';import'../../_chunks/chunk-TYMPXKFT.js';import {j,L,B as B$1,x as x$1,p,R as R$1,h as h$1}from'../../_chunks/chunk-K43ZLU4I.js';import {zc,Wa,Ka}from'../../_chunks/chunk-I3LSSBRI.js';import {Vj,Wj,Xj,Yj,H,Xc,ec,gc,fc,dl,el}from'../../_chunks/chunk-IQAHULGQ.js';import'../../_chunks/chunk-ZDBICST5.js';import {memo,createContext,useState,useMemo,useId,useRef,useEffect,useContext}from'react';import y from'@mui/material/Box';import ut from'@mui/material/Popper';import {useTranslation}from'react-i18next';import yt from'@mui/material/ClickAwayListener';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';import q from'@mui/material/Button';import {Calendar,DateObject}from'react-multi-date-picker';import Ee from'react-date-object';import ht from'react-date-object/calendars/arabic';import Tt from'react-date-object/calendars/gregorian';import kt from'react-date-object/locales/arabic_en';import wt from'react-date-object/locales/gregorian_en';var co=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"})),mo=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"}})),$=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})),K=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:t,countryCodes:n}){let[i,p]=useState(null),a$1=m=>{i||p(m.currentTarget);},l=()=>{i&&p(null);},r=(m,T)=>{m.stopPropagation(),o(T);},g=useMemo(()=>n.map(A).filter(m=>!!m),[n]),c=g.some(m=>B(m,e)),x=c?e:t;return jsxs($,{onMouseEnter:a$1,onMouseLeave:l,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(K,{className:c?"selected":"",children:C(x)}),jsx(ut,{open:!!i,anchorEl:i,placement:"right-start",sx:{zIndex:3},disablePortal:true,children:jsx(fe,{sx:{maxHeight:300},children:g.map(m=>{let T=B(m,e);return jsxs($,{onClick:G=>{r(G,m);},sx:{gap:"4px"},children:[T?jsx("img",{src:Yj,alt:"icon"}):jsx(_,{}),jsx(a,{countryCode:m.countryCode}),jsx(K,{className:T?"selected":"",children:C(m)})]},m.countryCode)})})})]})}function ve({zone:e,onChange:o}){let t=z(x());if(!t)return null;let n=B(t,e);return jsxs($,{onClick:()=>o(t),children:[n?jsx("img",{src:Yj,alt:"icon"}):jsx(_,{}),jsx("img",{src:Vj,alt:"user-timezone"}),jsx(a,{countryCode:t.countryCode}),jsx(K,{className:n?"selected":"",children:C(t)})]})}function Ct({zone:e,onChange:o,defaultCountryZone:t,countryCodes:n}){let[i,p]=useState(null),a$1=!!i,l=z(x()),r=()=>{p(null);},g=m=>{o(m),r();},c=m=>{p(m.currentTarget);},x$1=B(e,l)?Vj:B(e,t)?Wj:Xj;return jsx(yt,{onClickAway:r,children:jsxs(co,{"data-testid":"ZonePicker",children:[jsxs(mo,{open:a$1,onClick:c,children:[jsx("img",{src:x$1,alt:"zone-icon"}),jsx(a,{countryCode:e.countryCode}),jsx("span",{children:C(e)})]}),jsx(ut,{open:a$1,anchorEl:i,placement:"top-start",sx:{zIndex:1400},children:jsxs(fe,{"data-testid":"ZonePicker_dropdown",children:[jsx(Re,{zone:e,onChange:g,defaultCountryZone:t,countryCodes:n}),jsx(ve,{zone:e,onChange:g})]})})]})})}var Se=memo(Ct);var fo=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"}})),go=styled(q)(({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}})),xo=styled(q)(({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}})),yo=styled(y)(()=>({display:"flex",gap:8,marginLeft:"auto",flexShrink:0})),bo=styled(q,{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]}})),Co=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"})),Do=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"})),ho=styled(y)(()=>({display:"flex",alignItems:"center",gap:"10px"})),To=styled(y)(()=>({position:"relative"})),ko=styled(y)(()=>({display:"flex",flexDirection:"column",gap:"24px"})),wo=styled(y)(({theme:e})=>({color:e.palette.grey[700],fontSize:"9px",fontWeight:500,marginBottom:"6px"})),Mo=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]}})),Po=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"})),Ro=styled(y)(({theme:e})=>({width:71,padding:"4px 0",cursor:"pointer","&:hover, &.active":{borderRadius:"100px",background:e.palette.info.light}})),vo=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"}})),Bo=styled(q)(()=>({minWidth:"auto",padding:0,"& > img":{cursor:"pointer"}})),So=styled(q)(({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}})),Oo=styled(y)(()=>({display:"flex",flexDirection:"column",gap:"8px"})),Eo=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}}})),Zo=styled(y)(()=>({width:235})),Io=styled(y)(()=>({display:"flex",gap:"4px"})),Ao=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}=useTranslation();return jsx(y,{children:jsxs(vo,{children:[jsxs(y,{children:[jsx("img",{src:ec,alt:"hijri"}),jsx("span",{children:t("hijri")})]}),jsx(h$1,{checked:e==="hijri",onChange:()=>o?.(e==="hijri"?"gregorian":"hijri")})]})})}var P=e=>e==="hijri"?kt:wt,R=e=>e==="hijri"?ht:Tt,jo=(e,o)=>!e||Number.isNaN(e.getTime())?void 0:new Ee({date:e,calendar:R(o),locale:P(o)}),Ze=(e,o,t)=>{let n=jo(b$1(e?.[0],t),o),i=jo(b$1(e?.[1],t),o);if(n&&i)return [n,i];let p=R(o),a=P(o),l=b$1(Date.now(),t)??new Date;return [new Ee({date:new Date(l.getFullYear(),l.getMonth(),l.getDate()-6),calendar:p,locale:a}),new Ee({date:l,calendar:p,locale:a})]},Ho=(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),Ie=e=>!!e[1]&&e[0].format("YYYYMMDD")===e[1].format("YYYYMMDD");var Bt=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 Wo({zone:e,range:o$1,onApply:t,calendarMode:n$1="gregorian",maxRangeDays:i,groupBy:p,onGroupByChange:a}){let[l,r]=useState(()=>Ze(o$1,n$1,e.zone)),[g,c]=useState(l),[x,m]=useState(e),[T,G]=useState(p??"day"),[te,D]=useState(()=>o(o$1,e.zone)),[re,V]=useState(null),[ne,ae]=useState(false),S=useRef(null),L=!!re,s=i===void 0?Bt:i;useEffect(()=>{if(L)return;let d=Ze(o$1,n$1,e.zone);r(d),c(d),D(o(o$1,e.zone)),S.current&&S.current.set("date",d[0]);},[o$1,e.zone,e.countryCode,n$1,L]),useEffect(()=>{let d=u=>new DateObject({date:u.toDate(),calendar:R(n$1),locale:P(n$1)});r(u=>[d(u[0]),d(u[1])]),c(u=>[d(u[0]),d(u[1])]);},[n$1]),useEffect(()=>{m(d=>d.zone===e.zone&&d.countryCode===e.countryCode?d:e);},[e.zone,e.countryCode,L]);let k=d=>{let u=d;if(d.length<2||s===0)return u;let j=Ho(xe(d[0]).toDate(),ye(d[1]).toDate());return j<=s?u:(ae(true),setTimeout(()=>{ae(false);},3e3),[d[0],d[1].subtract(j-s,"d")])},rt=d=>{let u=k(d);r(u),D(!Ie(u));},nt=d=>{let u=k(d);r([xe(u[0]),ye(u[1])]),D(true),S.current&&S.current.set("date",u[0]);},at=d=>r(d),it=d=>{D(d),d&&l[1]&&r([xe(l[0]),ye(l[1])]);},_e=()=>V(null),pt=d=>V(d.currentTarget),lt=()=>{let d=[l[0].toDate(),l[1].toDate()];return {range:(te?p$1(d,x.zone):n(d,x.zone))??d,zone:x}},dt=()=>{t(lt())!==false&&(c(l),a?.(T),_e());},st=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:l,isAllDay:te,isSameDay:Ie(l),isError:ne,maxRangeDays:s,open:L,anchorEl:re,pickedZone:x,selectedGroupBy:T,calendarRef:S,maxDate:b$1(Date.now(),x.zone),rangeLabel:st(g),pickRange:rt,pickPreset:nt,setTimes:at,setAllDay:it,pickZone:m,setGroupBy:G,openPicker:pt,closePicker:_e,apply:dt}}var Go={day:"Day",month:"Month",quarter:"Quarter",year:"Year"};function Zt(){let{selectedGroupBy:e,setGroupBy:o,open:t}=v(),[n,i]=useState(null),p=!!n&&t,{t:a}=useTranslation();return jsx(yt,{onClickAway:()=>i(null),children:jsxs(y,{children:[jsx(wo,{children:a("groupedBy")}),jsxs(Mo,{onClick:l=>i(l.currentTarget),open:p,children:[jsx("span",{children:Go[e]}),jsx(y,{component:"img",src:Xc,alt:"arrow",sx:{...p&&{transform:"rotate(180deg)"}}})]}),jsx(R$1,{open:p,anchorEl:n,children:jsx(Po,{sx:{width:n?.clientWidth},children:Object.entries(Go).map(([l,r])=>jsx(Ro,{onClick:()=>{o(l),i(null);},className:e===l?"active":"",children:r},l))})})]})})}var Yo=Zt;var At=["Su","Mo","Tu","We","Th","Fr","Sa"];function zt({calendarMode:e}){let{draft:o,maxDate:t,calendarRef:n,pickRange:i}=v();return jsx(Calendar,{ref:n,numberOfMonths:2,value:o,onChange:i,calendar:R(e),locale:P(e),range:true,format:"MMM DD",monthYearSeparator:" ",renderButton:(p,a)=>jsx(Bo,{onClick:a,children:jsx("img",{src:p==="right"?gc:fc,alt:"arrow"})}),weekDays:At,maxDate:t})}var No=zt;function He({calendarMode:e}){let{t:o}=useTranslation(),{pickedZone:t,pickPreset:n}=v(),i=useMemo(()=>{let p=b$1(Date.now(),t.zone)??new Date,a=()=>new DateObject({date:p,calendar:R(e),locale:P(e)}),l=r=>a().subtract(r,"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(r=>({id:l(r).toFirstOfMonth().format("MMMM YYYY"),value:[l(r).toFirstOfMonth(),l(r).toLastOfMonth()]}))]},[e,t.zone]);return jsx(y,{"data-testid":"RangePresets",children:jsx(Oo,{children:i.map(p=>jsx(So,{onClick:a=>{a.preventDefault(),n(p.value);},children:o(p.id)},p.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,$o=()=>new Date().getMinutes(),_o=()=>Q(new Date().getHours());var Ko=styled(y)(()=>({width:157,padding:"16px",display:"flex",alignItems:"center",justifyContent:"center",gap:"16px"})),Uo=styled(j,{shouldForwardProp:e=>e!=="open"&&e!=="size"})(({theme:e,open:o,size:t})=>{let{base:n,grey:i,brand:p}=e.v2.palette;return {fontSize:"11px",fontWeight:500,background:n.white,border:`1px solid ${i[100]}`,borderRadius:"19px",height:t==="large"?32:24,width:t==="large"?74:58,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",...o&&{boxShadow:"0px 0px 4px 0px #1F88D080",borderColor:p[500]}}}),J=styled(y)(()=>({textAlign:"center",cursor:"pointer",userSelect:"none"})),qo=styled(j,{shouldForwardProp:e=>e!=="selected"})(({theme:e,selected:o})=>{let{base:t,grey:n,brand:i}=e.v2.palette;return {fontSize:"11px",fontWeight:500,background:t.white,border:`1px solid ${n[100]}`,borderRadius:"4px",height:24,width:33,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",...o&&{borderColor:"transparent",color:i[500],backgroundColor:alpha(i[500],.1)}}}),Qo=styled(y)(()=>({display:"flex",flexDirection:"column",gap:"4px"})),Xo=styled(y)(()=>({display:"flex",alignItems:"center",justifyContent:"center",gap:"4px"})),We=styled(y)(()=>({display:"flex",flexDirection:"column",justifyContent:"center",gap:"6px"})),Fe=styled(L)(()=>({flexGrow:1,maxWidth:"100%",".MuiInput-input":{fontWeight:"500",fontSize:"11px",textAlign:"center"},".MuiInput-root":{paddingInline:"8px"},height:32,width:32}));var $t=["AM","PM"],he=12,Ge=59;function Te({onChange:e,defaultTime:o,enableRealTimeChange:t,size:n="large"}){let i=zc(useId(),"time-picker"),[p,a]=useState(null),[l,r]=useState(o?.period??(new Date().getHours()>=he?"PM":"AM")),[g,c]=useState(o?.hour??_o()),[x,m]=useState(o?.minute??$o()),T=!!p;useEffect(()=>{t&&e?.({hour:g,minute:x,period:l});},[g,x,l,t]);let G=s=>{a(s.currentTarget);},te=()=>{a(null),e?.({hour:g,minute:x,period:l});},D=s=>s<10?`0${s}`:s.toString(),re=s=>{let k=Ka(D(Number(s.target.value)));if(k>he){s.preventDefault();return}c(k);},V=()=>{c(s=>s===he?1:s+1);},ne=()=>{c(s=>s===1?he:s-1);},ae=s=>{let k=Ka(D(Number(s.target.value)));if(k>Ge){s.preventDefault();return}m(k);},S=()=>{m(s=>s===Ge?(V(),0):s+1);},L=()=>{m(s=>s===0?(ne(),Ge):s-1);};return jsx(yt,{onClickAway:te,children:jsxs(y,{id:i,"data-testid":"TimePicker",children:[jsx(Uo,{size:n,open:T,onClick:G,children:`${D(g)}:${D(x)}${l.toLowerCase()}`}),jsx(R$1,{open:T,anchorEl:p,placement:"top-start",sx:{marginTop:"8px",marginBottom:"8px"},children:jsxs(Ko,{children:[jsxs(Xo,{children:[jsxs(We,{children:[jsx(J,{onClick:V,children:jsx("img",{src:dl,alt:"arrow"})}),jsx(Fe,{type:"number",hideArrows:true,disableFocusRing:true,value:D(g),onChange:re}),jsx(J,{onClick:ne,children:jsx("img",{src:el,alt:"arrow"})})]}),jsx(j,{children:":"}),jsxs(We,{children:[jsx(J,{onClick:S,children:jsx("img",{src:dl,alt:"arrow"})}),jsx(Fe,{type:"number",hideArrows:true,disableFocusRing:true,value:D(x),onChange:ae}),jsx(J,{onClick:L,children:jsx("img",{src:el,alt:"arrow"})})]})]}),jsx(Qo,{children:$t.map(s=>jsx(qo,{onClick:()=>r(s),selected:l===s,children:s},s))})]})})]})})}function Kt(){let{t:e}=useTranslation(),{draft:o,isAllDay:t,setTimes:n,setAllDay:i}=v(),p=new DateObject(o[0]),a=new DateObject(o[1]),l=({hour:g,minute:c,period:x})=>{n([p.setHour(Ce(g,x??"AM")).setMinute(c).setSecond(0),a]);},r=({hour:g,minute:c,period:x})=>{n([p,a.setHour(Ce(g,x??"AM")).setMinute(c).setSecond(59)]);};return jsx(Zo,{children:jsxs(Ao,{children:[jsxs(Eo,{isAllDay:t,children:[jsx("span",{className:"label",children:e("allDay")}),jsx(h$1,{checked:t,onChange:g=>i(g.target.checked)})]}),!t&&jsxs(Io,{children:[jsx(Te,{defaultTime:{hour:Q(p.hour),minute:p.minute,period:be(p.hour)},size:"small",onChange:l,enableRealTimeChange:true},`${o[0]?.toString()}-start`),jsx(Te,{defaultTime:{hour:Q(a.hour),minute:a.minute,period:be(a.hour)},size:"small",onChange:r,enableRealTimeChange:true},`${o[1]?.toString()}-end`)]})]})})}var et=Kt;function Jt(e){let{calendarMode:o="gregorian",onCalendarModeChange:t,defaultCountryZone:n,countryCodes:i,groupBy:p}=e,{t:a}=useTranslation(),l=zc(useId(),"date-range-calendar"),r=Wo(e),g=c=>{c.key==="Enter"&&r.draft[1]&&!r.isError?(c.stopPropagation(),r.apply()):c.key==="Escape"&&(c.stopPropagation(),r.closePicker());};return jsx(ze.Provider,{value:r,children:jsxs(To,{id:l,"data-testid":"DateRangeCalendar",children:[jsx(bo,{onClick:r.openPicker,open:r.open,children:r.rangeLabel}),r.open&&jsx(B$1,{onClick:c=>{c.stopPropagation(),r.closePicker();}}),jsx(ut,{open:r.open,anchorEl:r.anchorEl,placement:"bottom-end",children:jsxs(fo,{onKeyDown:g,children:[jsxs(Do,{children:[jsx(He,{calendarMode:o}),jsxs(ko,{children:[p&&jsx(Yo,{}),jsx(Oe,{calendarMode:o,onCalendarModeChange:t})]})]}),jsxs(y,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[jsx(No,{calendarMode:o}),jsx(x$1,{in:r.isError&&r.maxRangeDays>0,children:jsx(b,{severity:"error",message:a("dateRangeError",{number:r.maxRangeDays}),sx:{marginInline:"16px",marginBottom:"16px"}})}),jsxs(Co,{sx:{borderBottomLeftRadius:"8px"},children:[n&&i&&jsx(ho,{children:jsx(Se,{zone:r.pickedZone,onChange:r.pickZone,defaultCountryZone:n,countryCodes:i},String(r.open))}),r.isSameDay&&jsx(et,{}),jsxs(yo,{children:[jsx(go,{variant:"contained",onClick:r.closePicker,children:a("cancel")}),jsx(xo,{variant:"contained",onClick:r.apply,disabled:!r.draft[1],children:a("okay")})]})]})]})]})})]})})}var ot=Jt;function or({value:e,zone:o,format:t,...n}){let i=useMemo(()=>m(e,o,t),[e,o,t]);return jsx(a$1,{...n,children:i})}var tr=or;var tt=styled(y)({display:"flex",alignItems:"center",gap:"12px"});function lr({value:e,zone:o,format:t,rendered:n,tableMode:i,...p}){let a=useMemo(()=>n??m(e,o,t),[n,e,o,t]);return jsx(a$1,{...p,children:jsx(tt,{children:jsx(y,{sx:{...Wa(i)&&{fontSize:"11px"}},children:a})})})}var Ne=lr;function cr({value:e,zone:o,hintZone:t,format:n,tableMode:i,...p$1}){let a=useMemo(()=>{if(!(!t||e==null||e===""))return h(o,t,e)?m(e,t):void 0},[e,o,t]);return jsxs(y,{sx:{display:"flex",gap:"8px"},children:[jsx(Ne,{value:e,zone:o,format:n,tableMode:i,...p$1}),a!==void 0&&jsx(p,{title:a,children:jsx("img",{src:H,width:14,alt:"timezone"})})]})}var mr=cr;export{ot as DateRangeCalendar,Se as ZonePicker,tr as ZonedDateCell,mr as ZonedDateHintViewer,Ne as ZonedDateViewer};