@codezee/sixtify-brahma 0.2.207 → 0.2.209
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +16 -2
- package/packages/shared-components/dist/ActionButtons/ActionButtons.d.ts +1 -1
- package/packages/shared-components/dist/ActionButtons/ActionButtons.d.ts.map +1 -1
- package/packages/shared-components/dist/Button/SplitButton.d.ts +1 -1
- package/packages/shared-components/dist/Button/SplitButton.d.ts.map +1 -1
- package/packages/shared-components/dist/Card/CardItem/CardItem.d.ts +1 -1
- package/packages/shared-components/dist/Card/CardItem/CardItem.d.ts.map +1 -1
- package/packages/shared-components/dist/Card/ProfileCard/ProfileCard.d.ts.map +1 -1
- package/packages/shared-components/dist/Card/ProfileCard/ProfileCardItem/ProfileCardBody.d.ts.map +1 -1
- package/packages/shared-components/dist/Card/ProfileCard/ProfileCardItem/ProfileCardHeader.d.ts +1 -1
- package/packages/shared-components/dist/Card/ProfileCard/ProfileCardItem/ProfileCardHeader.d.ts.map +1 -1
- package/packages/shared-components/dist/CellSelectionTable/utils/types.d.ts +1 -1
- package/packages/shared-components/dist/CellSelectionTable/utils/types.d.ts.map +1 -1
- package/packages/shared-components/dist/FilterList/FilterPopup.d.ts +1 -1
- package/packages/shared-components/dist/FilterList/FilterPopup.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/CheckBox/CheckBox.styled.d.ts +1 -1
- package/packages/shared-components/dist/FormFields/CheckBox/CheckBox.styled.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/FileUpload/FileUpload.styled.d.ts +1 -1
- package/packages/shared-components/dist/FormFields/FileUpload/FileUpload.styled.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/Rating/Ratting.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/Rating/types.d.ts +1 -1
- package/packages/shared-components/dist/FormFields/Rating/types.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/TextField/TextField.d.ts.map +1 -1
- package/packages/shared-components/dist/Layouts/FormRow/FormRow.styled.d.ts +1 -1
- package/packages/shared-components/dist/Layouts/FormRow/FormRow.styled.d.ts.map +1 -1
- package/packages/shared-components/dist/TabBar/Tab.d.ts.map +1 -1
- package/packages/shared-components/dist/Toast/Toaster.styled.d.ts.map +1 -1
- package/packages/shared-components/dist/UserProfileMenu/UserProfileMenu.d.ts +1 -1
- package/packages/shared-components/dist/UserProfileMenu/UserProfileMenu.d.ts.map +1 -1
- package/packages/shared-components/dist/index.cjs.js +2 -0
- package/packages/shared-components/dist/index.cjs.js.map +1 -0
- package/packages/shared-components/dist/index.esm.js +2 -0
- package/packages/shared-components/dist/index.esm.js.map +1 -0
- package/packages/shared-components/dist/ActionButtons/ActionButtons.js +0 -102
- package/packages/shared-components/dist/ActionButtons/FormActionButton.js +0 -49
- package/packages/shared-components/dist/ActionButtons/index.js +0 -19
- package/packages/shared-components/dist/ActionButtons/types.js +0 -2
- package/packages/shared-components/dist/Actions/AddIconAction.js +0 -14
- package/packages/shared-components/dist/Actions/CalendarIconAction.js +0 -14
- package/packages/shared-components/dist/Actions/ColumnIconAction.js +0 -14
- package/packages/shared-components/dist/Actions/ConfigureIconAction.js +0 -14
- package/packages/shared-components/dist/Actions/CurrentLocationAction.js +0 -14
- package/packages/shared-components/dist/Actions/DeleteIconAction.js +0 -14
- package/packages/shared-components/dist/Actions/DownloadIconAction.js +0 -14
- package/packages/shared-components/dist/Actions/DownloadPrintAction.js +0 -14
- package/packages/shared-components/dist/Actions/EditIconAction.js +0 -14
- package/packages/shared-components/dist/Actions/ExportIconAction.js +0 -14
- package/packages/shared-components/dist/Actions/FilterIconAction.js +0 -15
- package/packages/shared-components/dist/Actions/HistoryIconAction.js +0 -14
- package/packages/shared-components/dist/Actions/ImportIconAction.js +0 -14
- package/packages/shared-components/dist/Actions/InboxIconAction.js +0 -14
- package/packages/shared-components/dist/Actions/KeyBoardIconAction.js +0 -14
- package/packages/shared-components/dist/Actions/ProcessIconAction.js +0 -14
- package/packages/shared-components/dist/Actions/ViewDetailsIconAction.js +0 -14
- package/packages/shared-components/dist/Actions/ViewIconAction.js +0 -14
- package/packages/shared-components/dist/Actions/index.js +0 -34
- package/packages/shared-components/dist/AgGrid/ActionCell/ActionButtonsWrapper.js +0 -134
- package/packages/shared-components/dist/AgGrid/ActionCell/ActionCell.js +0 -39
- package/packages/shared-components/dist/AgGrid/ActionCell/Popover.js +0 -22
- package/packages/shared-components/dist/AgGrid/ActionCell/index.js +0 -18
- package/packages/shared-components/dist/AgGrid/AgGrid.js +0 -179
- package/packages/shared-components/dist/AgGrid/AgGridStyleProvider.js +0 -69
- package/packages/shared-components/dist/AgGrid/LoadingCell.js +0 -12
- package/packages/shared-components/dist/AgGrid/LoadingOverlay.js +0 -15
- package/packages/shared-components/dist/AgGrid/NoDataOverlay.js +0 -14
- package/packages/shared-components/dist/AgGrid/RedirectionCell/RedirectionCell.js +0 -123
- package/packages/shared-components/dist/AgGrid/RedirectionCell/index.js +0 -17
- package/packages/shared-components/dist/AgGrid/hooks/index.js +0 -23
- package/packages/shared-components/dist/AgGrid/hooks/useAgGridCheckBoxSelection.js +0 -161
- package/packages/shared-components/dist/AgGrid/hooks/useAgGridFilteredData.js +0 -22
- package/packages/shared-components/dist/AgGrid/hooks/useAgGridKeyboardShortcuts.js +0 -173
- package/packages/shared-components/dist/AgGrid/hooks/useAgGridRowSelectionConfig.js +0 -63
- package/packages/shared-components/dist/AgGrid/hooks/useAgGridSelection.js +0 -326
- package/packages/shared-components/dist/AgGrid/hooks/useAgGridSummaryRow.js +0 -159
- package/packages/shared-components/dist/AgGrid/hooks/useAgGridSummaryRowUpdate.js +0 -33
- package/packages/shared-components/dist/AgGrid/hooks/useCellEnterClick.js +0 -71
- package/packages/shared-components/dist/AgGrid/index.js +0 -25
- package/packages/shared-components/dist/AgGrid/registerAgGridModules.js +0 -4
- package/packages/shared-components/dist/AgGrid/types/agGrid.js +0 -2
- package/packages/shared-components/dist/AgGrid/types/agSummaryTypes.js +0 -2
- package/packages/shared-components/dist/AgGrid/types/index.js +0 -18
- package/packages/shared-components/dist/AgGrid/utils/ag-grid-custom-filter.js +0 -108
- package/packages/shared-components/dist/AgGrid/utils/extractPrefixedValue.js +0 -15
- package/packages/shared-components/dist/AgGrid/utils/index.js +0 -18
- package/packages/shared-components/dist/AppBar/AppBar.js +0 -17
- package/packages/shared-components/dist/AppBar/AppBar.styled.js +0 -46
- package/packages/shared-components/dist/AppBar/index.js +0 -5
- package/packages/shared-components/dist/Badge/Badge.js +0 -19
- package/packages/shared-components/dist/Badge/index.js +0 -17
- package/packages/shared-components/dist/Breadcrumbs/Breadcrumb.styled.js +0 -95
- package/packages/shared-components/dist/Breadcrumbs/Breadcrumbs.js +0 -30
- package/packages/shared-components/dist/Breadcrumbs/index.js +0 -17
- package/packages/shared-components/dist/Button/ActionButton.js +0 -22
- package/packages/shared-components/dist/Button/Button.js +0 -32
- package/packages/shared-components/dist/Button/ButtonGroup.js +0 -18
- package/packages/shared-components/dist/Button/SplitButton.js +0 -117
- package/packages/shared-components/dist/Button/index.js +0 -20
- package/packages/shared-components/dist/Card/AttendanceCard.js +0 -27
- package/packages/shared-components/dist/Card/Card.js +0 -17
- package/packages/shared-components/dist/Card/CardItem/CardItem.js +0 -12
- package/packages/shared-components/dist/Card/CardItem/CardItemValue.js +0 -27
- package/packages/shared-components/dist/Card/CardItem/index.js +0 -18
- package/packages/shared-components/dist/Card/ProfileCard/ProfileCard.js +0 -15
- package/packages/shared-components/dist/Card/ProfileCard/ProfileCardItem/ProfileCardBody.js +0 -18
- package/packages/shared-components/dist/Card/ProfileCard/ProfileCardItem/ProfileCardHeader.js +0 -21
- package/packages/shared-components/dist/Card/index.js +0 -22
- package/packages/shared-components/dist/CellSelectionTable/CellSelectionTable.js +0 -478
- package/packages/shared-components/dist/CellSelectionTable/SubComponents/EmployeeCell.js +0 -34
- package/packages/shared-components/dist/CellSelectionTable/SubComponents/TableBodyLoader.js +0 -16
- package/packages/shared-components/dist/CellSelectionTable/hook/useOutsideClick.js +0 -48
- package/packages/shared-components/dist/CellSelectionTable/hook/useSorting.js +0 -68
- package/packages/shared-components/dist/CellSelectionTable/hook/useStickyColumns.js +0 -29
- package/packages/shared-components/dist/CellSelectionTable/index.js +0 -20
- package/packages/shared-components/dist/CellSelectionTable/utils/employeeSelectionUtils.js +0 -97
- package/packages/shared-components/dist/CellSelectionTable/utils/helper.js +0 -159
- package/packages/shared-components/dist/CellSelectionTable/utils/index.js +0 -17
- package/packages/shared-components/dist/CellSelectionTable/utils/sortUtils.js +0 -84
- package/packages/shared-components/dist/CellSelectionTable/utils/types.js +0 -2
- package/packages/shared-components/dist/Charts/BarChart.js +0 -32
- package/packages/shared-components/dist/Charts/LineChart.js +0 -51
- package/packages/shared-components/dist/Charts/PieChart.js +0 -49
- package/packages/shared-components/dist/Charts/Skeleton.js +0 -28
- package/packages/shared-components/dist/Charts/index.js +0 -19
- package/packages/shared-components/dist/Chips/Chip.js +0 -13
- package/packages/shared-components/dist/Chips/ChipWithBorder.js +0 -28
- package/packages/shared-components/dist/Chips/FilterPill.js +0 -42
- package/packages/shared-components/dist/Chips/index.js +0 -19
- package/packages/shared-components/dist/ColumnArranger/ColumnArranger.js +0 -18
- package/packages/shared-components/dist/ColumnArranger/ColumnArrangerDialog.js +0 -28
- package/packages/shared-components/dist/ColumnArranger/ColumnArrangerForm.js +0 -44
- package/packages/shared-components/dist/ColumnArranger/ColumnItem.js +0 -17
- package/packages/shared-components/dist/ColumnArranger/LockedColumnItem.js +0 -17
- package/packages/shared-components/dist/ColumnArranger/hooks/useRefinedColumns.js +0 -18
- package/packages/shared-components/dist/ColumnArranger/index.js +0 -9
- package/packages/shared-components/dist/ContentBox/ContentBox.js +0 -21
- package/packages/shared-components/dist/ContentBox/index.js +0 -17
- package/packages/shared-components/dist/Dialog/BottomDialog.js +0 -13
- package/packages/shared-components/dist/Dialog/BottomDialog.styled.js +0 -26
- package/packages/shared-components/dist/Dialog/DeleteDialog.js +0 -25
- package/packages/shared-components/dist/Dialog/Dialog.js +0 -35
- package/packages/shared-components/dist/Dialog/SaveDialog.js +0 -20
- package/packages/shared-components/dist/Dialog/index.js +0 -20
- package/packages/shared-components/dist/Drawer/Bullet.js +0 -15
- package/packages/shared-components/dist/Drawer/CloseDrawer/CloseDrawerMenuItem.js +0 -30
- package/packages/shared-components/dist/Drawer/CloseDrawer/CloseDrawerMenuItemList.js +0 -57
- package/packages/shared-components/dist/Drawer/CloseDrawer/CloseDrawerSubMenuItemList.js +0 -49
- package/packages/shared-components/dist/Drawer/CloseDrawer/Popover.js +0 -26
- package/packages/shared-components/dist/Drawer/CloseDrawer/Popper.js +0 -33
- package/packages/shared-components/dist/Drawer/Drawer.js +0 -29
- package/packages/shared-components/dist/Drawer/Drawer.styled.js +0 -58
- package/packages/shared-components/dist/Drawer/MenuItem.js +0 -32
- package/packages/shared-components/dist/Drawer/OpenDrawer/OpenDrawerCollapse.js +0 -12
- package/packages/shared-components/dist/Drawer/OpenDrawer/OpenDrawerMenuItem.js +0 -21
- package/packages/shared-components/dist/Drawer/OpenDrawer/OpenDrawerMenuItemList.js +0 -129
- package/packages/shared-components/dist/Drawer/index.js +0 -17
- package/packages/shared-components/dist/FilterList/DateRangePickerPopUp.js +0 -42
- package/packages/shared-components/dist/FilterList/FilterList.js +0 -97
- package/packages/shared-components/dist/FilterList/FilterListV2.js +0 -440
- package/packages/shared-components/dist/FilterList/FilterPopup.js +0 -72
- package/packages/shared-components/dist/FilterList/FilterPopupWrapper.js +0 -30
- package/packages/shared-components/dist/FilterList/FilterTypeWrapper.js +0 -18
- package/packages/shared-components/dist/FilterList/GetFilterPopupComponent.js +0 -40
- package/packages/shared-components/dist/FilterList/getFormData.js +0 -27
- package/packages/shared-components/dist/FilterList/index.js +0 -23
- package/packages/shared-components/dist/FormFields/Autocomplete/Autocomplete.js +0 -508
- package/packages/shared-components/dist/FormFields/Autocomplete/AvatarCell.js +0 -16
- package/packages/shared-components/dist/FormFields/Autocomplete/Chip.styled.js +0 -34
- package/packages/shared-components/dist/FormFields/Autocomplete/ChipV2.styled.js +0 -23
- package/packages/shared-components/dist/FormFields/Autocomplete/Skeleton.js +0 -17
- package/packages/shared-components/dist/FormFields/Autocomplete/Tags.js +0 -18
- package/packages/shared-components/dist/FormFields/Autocomplete/index.js +0 -17
- package/packages/shared-components/dist/FormFields/CheckBox/CheckBox.js +0 -43
- package/packages/shared-components/dist/FormFields/CheckBox/CheckBox.styled.js +0 -59
- package/packages/shared-components/dist/FormFields/CheckBox/Skeleton.js +0 -12
- package/packages/shared-components/dist/FormFields/CheckBox/index.js +0 -17
- package/packages/shared-components/dist/FormFields/DatePicker/DatePicker.js +0 -245
- package/packages/shared-components/dist/FormFields/DatePicker/Skeleton.js +0 -17
- package/packages/shared-components/dist/FormFields/DatePicker/index.js +0 -17
- package/packages/shared-components/dist/FormFields/DateRangePicker/DateRangePicker.js +0 -45
- package/packages/shared-components/dist/FormFields/DateRangePicker/Skeleton.js +0 -21
- package/packages/shared-components/dist/FormFields/DateRangePicker/index.js +0 -17
- package/packages/shared-components/dist/FormFields/DateRangeSelector/DateRangeSelector.js +0 -59
- package/packages/shared-components/dist/FormFields/DateRangeSelector/index.js +0 -17
- package/packages/shared-components/dist/FormFields/DateTimePicker/DateTimePicker.js +0 -211
- package/packages/shared-components/dist/FormFields/DateTimePicker/Skeleton.js +0 -17
- package/packages/shared-components/dist/FormFields/DateTimePicker/index.js +0 -17
- package/packages/shared-components/dist/FormFields/DecimalTextField/DecimalTextField.js +0 -186
- package/packages/shared-components/dist/FormFields/DecimalTextField/index.js +0 -17
- package/packages/shared-components/dist/FormFields/FileUpload/Dialogs/FilePreview.js +0 -202
- package/packages/shared-components/dist/FormFields/FileUpload/Dialogs/ViewFilePreviewDialog.js +0 -34
- package/packages/shared-components/dist/FormFields/FileUpload/Dialogs/index.js +0 -18
- package/packages/shared-components/dist/FormFields/FileUpload/DownloadAction.js +0 -17
- package/packages/shared-components/dist/FormFields/FileUpload/FileNames.js +0 -44
- package/packages/shared-components/dist/FormFields/FileUpload/FileUpload.js +0 -190
- package/packages/shared-components/dist/FormFields/FileUpload/FileUpload.styled.js +0 -23
- package/packages/shared-components/dist/FormFields/FileUpload/Skeleton.js +0 -17
- package/packages/shared-components/dist/FormFields/FileUpload/index.js +0 -20
- package/packages/shared-components/dist/FormFields/ImageUpload/ImageUpload.js +0 -132
- package/packages/shared-components/dist/FormFields/ImageUpload/ImageUpload.styled.js +0 -23
- package/packages/shared-components/dist/FormFields/ImageUpload/ImageUploadView.js +0 -73
- package/packages/shared-components/dist/FormFields/ImageUpload/PhotoCaptureDialog.js +0 -36
- package/packages/shared-components/dist/FormFields/ImageUpload/Skeleton.js +0 -19
- package/packages/shared-components/dist/FormFields/ImageUpload/index.js +0 -18
- package/packages/shared-components/dist/FormFields/ListItemButton/ListItemButton.js +0 -37
- package/packages/shared-components/dist/FormFields/ListItemButton/ListItemButton.styled.js +0 -24
- package/packages/shared-components/dist/FormFields/ListItemButton/index.js +0 -17
- package/packages/shared-components/dist/FormFields/PasswordField/PasswordField.js +0 -24
- package/packages/shared-components/dist/FormFields/PasswordField/index.js +0 -17
- package/packages/shared-components/dist/FormFields/PhoneInputField/PhoneInputField.js +0 -134
- package/packages/shared-components/dist/FormFields/PhoneInputField/PhoneInputField.styled.js +0 -219
- package/packages/shared-components/dist/FormFields/PhoneInputField/Skeleton.js +0 -18
- package/packages/shared-components/dist/FormFields/PhoneInputField/index.js +0 -17
- package/packages/shared-components/dist/FormFields/RadioGroupField/RadioGroupField.js +0 -89
- package/packages/shared-components/dist/FormFields/RadioGroupField/Skeleton.js +0 -13
- package/packages/shared-components/dist/FormFields/RadioGroupField/index.js +0 -17
- package/packages/shared-components/dist/FormFields/Rating/Ratting.js +0 -27
- package/packages/shared-components/dist/FormFields/Rating/Skeleton.js +0 -18
- package/packages/shared-components/dist/FormFields/Rating/index.js +0 -17
- package/packages/shared-components/dist/FormFields/Rating/types.js +0 -2
- package/packages/shared-components/dist/FormFields/SearchField/SearchField.js +0 -29
- package/packages/shared-components/dist/FormFields/SearchField/StickySearchField.js +0 -20
- package/packages/shared-components/dist/FormFields/SearchField/index.js +0 -18
- package/packages/shared-components/dist/FormFields/Select/Select.js +0 -264
- package/packages/shared-components/dist/FormFields/Select/Select.styled.js +0 -49
- package/packages/shared-components/dist/FormFields/Select/index.js +0 -17
- package/packages/shared-components/dist/FormFields/SwitchField/Skeleton.js +0 -12
- package/packages/shared-components/dist/FormFields/SwitchField/SwitchField.js +0 -103
- package/packages/shared-components/dist/FormFields/SwitchField/index.js +0 -17
- package/packages/shared-components/dist/FormFields/TextField/Skeleton.js +0 -18
- package/packages/shared-components/dist/FormFields/TextField/TextField.js +0 -133
- package/packages/shared-components/dist/FormFields/TextField/index.js +0 -17
- package/packages/shared-components/dist/FormFields/TimeField/Skeleton.js +0 -17
- package/packages/shared-components/dist/FormFields/TimeField/TimeField.js +0 -81
- package/packages/shared-components/dist/FormFields/TimeField/index.js +0 -17
- package/packages/shared-components/dist/FormFields/TimePicker/Skeleton.js +0 -17
- package/packages/shared-components/dist/FormFields/TimePicker/TimePicker.js +0 -164
- package/packages/shared-components/dist/FormFields/TimePicker/index.js +0 -17
- package/packages/shared-components/dist/FormFields/commonStyles.js +0 -70
- package/packages/shared-components/dist/FormFields/index.js +0 -36
- package/packages/shared-components/dist/HighlightedText/HighlightedText.js +0 -29
- package/packages/shared-components/dist/HighlightedText/index.js +0 -17
- package/packages/shared-components/dist/Indicator/Indicator.js +0 -13
- package/packages/shared-components/dist/Indicator/SeverityIndicator.js +0 -21
- package/packages/shared-components/dist/Indicator/index.js +0 -18
- package/packages/shared-components/dist/Layouts/ButtonContainer.js +0 -15
- package/packages/shared-components/dist/Layouts/FilePreviewContainer.js +0 -11
- package/packages/shared-components/dist/Layouts/FormContainer.js +0 -12
- package/packages/shared-components/dist/Layouts/FormGridLayout.js +0 -21
- package/packages/shared-components/dist/Layouts/FormRow/FormRow.js +0 -9
- package/packages/shared-components/dist/Layouts/FormRow/FormRow.styled.js +0 -31
- package/packages/shared-components/dist/Layouts/FormRow/index.js +0 -5
- package/packages/shared-components/dist/Layouts/FormSection.js +0 -16
- package/packages/shared-components/dist/Layouts/GridProvider.js +0 -17
- package/packages/shared-components/dist/Layouts/MasterPageLayout.js +0 -30
- package/packages/shared-components/dist/Layouts/index.js +0 -24
- package/packages/shared-components/dist/Loader/FacebookCircularProgress.js +0 -23
- package/packages/shared-components/dist/Loader/index.js +0 -17
- package/packages/shared-components/dist/PadBox/PadBox.js +0 -17
- package/packages/shared-components/dist/PadBox/index.js +0 -17
- package/packages/shared-components/dist/Pagination/Pagination.js +0 -36
- package/packages/shared-components/dist/Pagination/index.js +0 -17
- package/packages/shared-components/dist/PrintDownloadAction/PrintDownloadActions.js +0 -30
- package/packages/shared-components/dist/PrintDownloadAction/index.js +0 -17
- package/packages/shared-components/dist/SmartGrid/Components/CellRenderer.js +0 -55
- package/packages/shared-components/dist/SmartGrid/Components/CircularLoader.js +0 -19
- package/packages/shared-components/dist/SmartGrid/Components/ColumnChooser/ColumnArranger.js +0 -49
- package/packages/shared-components/dist/SmartGrid/Components/ColumnChooser/ColumnArrangerDialog.js +0 -117
- package/packages/shared-components/dist/SmartGrid/Components/ColumnChooser/ColumnArrangerForm.js +0 -47
- package/packages/shared-components/dist/SmartGrid/Components/ColumnChooser/ColumnItem.js +0 -122
- package/packages/shared-components/dist/SmartGrid/Components/ColumnChooser/LockedColumnItem.js +0 -17
- package/packages/shared-components/dist/SmartGrid/Components/ColumnChooser/hooks/useRefinedColumns.js +0 -24
- package/packages/shared-components/dist/SmartGrid/Components/DataNotFound.js +0 -16
- package/packages/shared-components/dist/SmartGrid/Components/EditableFields/SmartSelectField.js +0 -58
- package/packages/shared-components/dist/SmartGrid/Components/EditableFields/SmartTextField.js +0 -59
- package/packages/shared-components/dist/SmartGrid/Components/EditableFields/SmartTooltip.js +0 -113
- package/packages/shared-components/dist/SmartGrid/Components/EditableFields/index.js +0 -19
- package/packages/shared-components/dist/SmartGrid/Components/FacetedFilter/FacetedFilter.js +0 -195
- package/packages/shared-components/dist/SmartGrid/Components/FacetedFilter/VirtualCheckboxList.js +0 -117
- package/packages/shared-components/dist/SmartGrid/Components/FacetedFilter/hooks/useGetDynamicOptionData.js +0 -39
- package/packages/shared-components/dist/SmartGrid/Components/FilterStatusPanel.js +0 -89
- package/packages/shared-components/dist/SmartGrid/Components/Grouped/GroupAreaOverlay.js +0 -101
- package/packages/shared-components/dist/SmartGrid/Components/Grouped/GroupChip.js +0 -73
- package/packages/shared-components/dist/SmartGrid/Components/Grouped/GroupedColumn.js +0 -64
- package/packages/shared-components/dist/SmartGrid/Components/Grouped/GroupedPanel.js +0 -62
- package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderCell.js +0 -15
- package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderGroupRows.js +0 -28
- package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/HeaderCell.js +0 -114
- package/packages/shared-components/dist/SmartGrid/Components/IndeterminateCheckbox.js +0 -25
- package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/DateRangeInput/DateRangeInput.js +0 -127
- package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/DateRangeInput/StyleDateRangeWrapper.js +0 -120
- package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/DebouncedInput.js +0 -38
- package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/GetRenderInputs.js +0 -76
- package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/SearchFilterRow.js +0 -34
- package/packages/shared-components/dist/SmartGrid/Components/SmartAlignments.js +0 -63
- package/packages/shared-components/dist/SmartGrid/Components/SmartButton.js +0 -21
- package/packages/shared-components/dist/SmartGrid/Components/SmartDialog.js +0 -42
- package/packages/shared-components/dist/SmartGrid/Components/SmartSwitch.js +0 -53
- package/packages/shared-components/dist/SmartGrid/Components/Svgs/HideIcon.js +0 -6
- package/packages/shared-components/dist/SmartGrid/Components/TableFooterComponent/TableFooterComponent.js +0 -30
- package/packages/shared-components/dist/SmartGrid/Components/TableFooterComponent/components/FooterCell.js +0 -42
- package/packages/shared-components/dist/SmartGrid/Components/TableRowComponent.js +0 -224
- package/packages/shared-components/dist/SmartGrid/Components/index.js +0 -17
- package/packages/shared-components/dist/SmartGrid/SmartGrid.js +0 -415
- package/packages/shared-components/dist/SmartGrid/context/CellSelectionContext.js +0 -18
- package/packages/shared-components/dist/SmartGrid/exportUtils/helper.js +0 -90
- package/packages/shared-components/dist/SmartGrid/exportUtils/index.js +0 -18
- package/packages/shared-components/dist/SmartGrid/exportUtils/types.js +0 -2
- package/packages/shared-components/dist/SmartGrid/hooks/index.js +0 -17
- package/packages/shared-components/dist/SmartGrid/hooks/useCellSelection.js +0 -207
- package/packages/shared-components/dist/SmartGrid/hooks/useCopyToClipboard.js +0 -80
- package/packages/shared-components/dist/SmartGrid/hooks/useExportToExcel.js +0 -241
- package/packages/shared-components/dist/SmartGrid/hooks/useGetColumnWidth.js +0 -65
- package/packages/shared-components/dist/SmartGrid/hooks/useGetDragMethods.js +0 -101
- package/packages/shared-components/dist/SmartGrid/hooks/useGetFacetedFilter.js +0 -116
- package/packages/shared-components/dist/SmartGrid/hooks/useGetGroupedColumn.js +0 -169
- package/packages/shared-components/dist/SmartGrid/hooks/useGetPinStyle.js +0 -36
- package/packages/shared-components/dist/SmartGrid/hooks/useGetPinningColumns.js +0 -24
- package/packages/shared-components/dist/SmartGrid/hooks/useGetRowSelection.js +0 -92
- package/packages/shared-components/dist/SmartGrid/hooks/useGetSortedColumn.js +0 -23
- package/packages/shared-components/dist/SmartGrid/hooks/useTableState.js +0 -112
- package/packages/shared-components/dist/SmartGrid/index.js +0 -20
- package/packages/shared-components/dist/SmartGrid/types/index.js +0 -2
- package/packages/shared-components/dist/SmartGrid/utils/helper.js +0 -15
- package/packages/shared-components/dist/SmartGrid/utils/summaryCalculations.js +0 -58
- package/packages/shared-components/dist/Stepper/Stepper.js +0 -51
- package/packages/shared-components/dist/Stepper/StepperV2.js +0 -108
- package/packages/shared-components/dist/Stepper/StepperV3.js +0 -33
- package/packages/shared-components/dist/Stepper/index.js +0 -19
- package/packages/shared-components/dist/Svgs/AppLogo/AppLogoMedium.js +0 -8
- package/packages/shared-components/dist/Svgs/AppLogo/AppLogoSmall.js +0 -6
- package/packages/shared-components/dist/Svgs/AppLogo/index.js +0 -18
- package/packages/shared-components/dist/Svgs/ArrowUp.js +0 -6
- package/packages/shared-components/dist/Svgs/ArrowUpRight.js +0 -8
- package/packages/shared-components/dist/Svgs/AttendanceDashboard/SvgArrival.js +0 -8
- package/packages/shared-components/dist/Svgs/AttendanceDashboard/SvgDeparture.js +0 -8
- package/packages/shared-components/dist/Svgs/AttendanceDashboard/SvgHoliday.js +0 -8
- package/packages/shared-components/dist/Svgs/AttendanceDashboard/SvgLeaveCalendar.js +0 -8
- package/packages/shared-components/dist/Svgs/AttendanceDashboard/SvgUnverifieduser.js +0 -8
- package/packages/shared-components/dist/Svgs/AttendanceDashboard/SvgUser.js +0 -8
- package/packages/shared-components/dist/Svgs/AttendanceDashboard/SvgVerifiedUser.js +0 -8
- package/packages/shared-components/dist/Svgs/AttendanceDashboard/SvgWeekoffCalendar.js +0 -8
- package/packages/shared-components/dist/Svgs/AttendanceDashboard/index.js +0 -24
- package/packages/shared-components/dist/Svgs/BookMarkSvg.js +0 -6
- package/packages/shared-components/dist/Svgs/Company/CompanyBanner.js +0 -8
- package/packages/shared-components/dist/Svgs/Company/index.js +0 -17
- package/packages/shared-components/dist/Svgs/DownloadSvg.js +0 -8
- package/packages/shared-components/dist/Svgs/Drawer/MasterIcon.js +0 -6
- package/packages/shared-components/dist/Svgs/Drawer/SettingIcon.js +0 -8
- package/packages/shared-components/dist/Svgs/Drawer/SvgBankConfig.js +0 -6
- package/packages/shared-components/dist/Svgs/Drawer/SvgConfiguration.js +0 -6
- package/packages/shared-components/dist/Svgs/Drawer/SvgEmployees.js +0 -6
- package/packages/shared-components/dist/Svgs/Drawer/SvgLetteremplate.js +0 -6
- package/packages/shared-components/dist/Svgs/Drawer/SvgOrganization.js +0 -6
- package/packages/shared-components/dist/Svgs/Drawer/SvgPayroll.js +0 -6
- package/packages/shared-components/dist/Svgs/Drawer/SvgTransaction.js +0 -6
- package/packages/shared-components/dist/Svgs/Drawer/index.js +0 -25
- package/packages/shared-components/dist/Svgs/FormAction.js +0 -9
- package/packages/shared-components/dist/Svgs/HomePage/AttendanceManagementDarkSvg.js +0 -8
- package/packages/shared-components/dist/Svgs/HomePage/AttendanceReportDarkSvg.js +0 -8
- package/packages/shared-components/dist/Svgs/HomePage/BriefcaseSvg.js +0 -8
- package/packages/shared-components/dist/Svgs/HomePage/BulkOperationsDarkSvg.js +0 -8
- package/packages/shared-components/dist/Svgs/HomePage/CalendarSvg.js +0 -8
- package/packages/shared-components/dist/Svgs/HomePage/ChartIconSvg.js +0 -8
- package/packages/shared-components/dist/Svgs/HomePage/ClockSvg.js +0 -8
- package/packages/shared-components/dist/Svgs/HomePage/DashboardIconSvg.js +0 -8
- package/packages/shared-components/dist/Svgs/HomePage/EmployeeManagementDarkSvg.js +0 -8
- package/packages/shared-components/dist/Svgs/HomePage/EmployeeReportsDarkSvg.js +0 -8
- package/packages/shared-components/dist/Svgs/HomePage/HolidayCalendarSvg.js +0 -8
- package/packages/shared-components/dist/Svgs/HomePage/HomePageBanner.js +0 -8
- package/packages/shared-components/dist/Svgs/HomePage/MiscellaneousManagementDarkSvg.js +0 -8
- package/packages/shared-components/dist/Svgs/HomePage/PayrollManagementDarkSvg.js +0 -8
- package/packages/shared-components/dist/Svgs/HomePage/PayrollReportDarkSvg.js +0 -8
- package/packages/shared-components/dist/Svgs/HomePage/index.js +0 -31
- package/packages/shared-components/dist/Svgs/ImportExcelSuccessIcon.js +0 -6
- package/packages/shared-components/dist/Svgs/Inbox/ExitIcon.js +0 -8
- package/packages/shared-components/dist/Svgs/Inbox/LeaveIcon.js +0 -8
- package/packages/shared-components/dist/Svgs/Inbox/LoanIcon.js +0 -8
- package/packages/shared-components/dist/Svgs/Inbox/OvertimeIcon.js +0 -8
- package/packages/shared-components/dist/Svgs/Inbox/SalaryIcon.js +0 -8
- package/packages/shared-components/dist/Svgs/Inbox/index.js +0 -21
- package/packages/shared-components/dist/Svgs/InboxIcon.js +0 -9
- package/packages/shared-components/dist/Svgs/LogoIcon.js +0 -6
- package/packages/shared-components/dist/Svgs/NoDataFoundSvg.js +0 -8
- package/packages/shared-components/dist/Svgs/SvgAccessDenied.js +0 -6
- package/packages/shared-components/dist/Svgs/SvgAdd.js +0 -9
- package/packages/shared-components/dist/Svgs/SvgAddRounded.js +0 -9
- package/packages/shared-components/dist/Svgs/SvgBranches.js +0 -23
- package/packages/shared-components/dist/Svgs/SvgCalendar.js +0 -8
- package/packages/shared-components/dist/Svgs/SvgColumn.js +0 -8
- package/packages/shared-components/dist/Svgs/SvgConfigure.js +0 -9
- package/packages/shared-components/dist/Svgs/SvgCurrentLocation.js +0 -6
- package/packages/shared-components/dist/Svgs/SvgDelete.js +0 -8
- package/packages/shared-components/dist/Svgs/SvgDownload.js +0 -9
- package/packages/shared-components/dist/Svgs/SvgDrop.js +0 -13
- package/packages/shared-components/dist/Svgs/SvgEdit.js +0 -9
- package/packages/shared-components/dist/Svgs/SvgEmail.js +0 -6
- package/packages/shared-components/dist/Svgs/SvgExport.js +0 -8
- package/packages/shared-components/dist/Svgs/SvgFilterList.js +0 -9
- package/packages/shared-components/dist/Svgs/SvgFilteredList.js +0 -6
- package/packages/shared-components/dist/Svgs/SvgHistory.js +0 -9
- package/packages/shared-components/dist/Svgs/SvgHome.js +0 -6
- package/packages/shared-components/dist/Svgs/SvgImport.js +0 -8
- package/packages/shared-components/dist/Svgs/SvgIndicator.js +0 -10
- package/packages/shared-components/dist/Svgs/SvgKeyBoard.js +0 -6
- package/packages/shared-components/dist/Svgs/SvgNoLogo.js +0 -8
- package/packages/shared-components/dist/Svgs/SvgNoSign.js +0 -8
- package/packages/shared-components/dist/Svgs/SvgPageNotFound.js +0 -6
- package/packages/shared-components/dist/Svgs/SvgPhone.js +0 -6
- package/packages/shared-components/dist/Svgs/SvgProfile.js +0 -9
- package/packages/shared-components/dist/Svgs/SvgReGenerate.js +0 -6
- package/packages/shared-components/dist/Svgs/SvgView.js +0 -6
- package/packages/shared-components/dist/Svgs/index.js +0 -60
- package/packages/shared-components/dist/Tab/Skeleton.js +0 -16
- package/packages/shared-components/dist/Tab/Tabs.js +0 -26
- package/packages/shared-components/dist/Tab/index.js +0 -17
- package/packages/shared-components/dist/TabBar/Tab.js +0 -60
- package/packages/shared-components/dist/TabBar/TabBar.js +0 -58
- package/packages/shared-components/dist/TabBar/TabsMenus.js +0 -19
- package/packages/shared-components/dist/TabBar/index.js +0 -9
- package/packages/shared-components/dist/Timeline/AttendanceStatus.js +0 -43
- package/packages/shared-components/dist/Timeline/Timeline.js +0 -89
- package/packages/shared-components/dist/Timeline/TimelineTrackSegments.js +0 -95
- package/packages/shared-components/dist/Timeline/index.js +0 -18
- package/packages/shared-components/dist/Toast/Toast.js +0 -27
- package/packages/shared-components/dist/Toast/ToastBody.js +0 -14
- package/packages/shared-components/dist/Toast/ToastFooterLink.js +0 -13
- package/packages/shared-components/dist/Toast/Toaster.js +0 -10
- package/packages/shared-components/dist/Toast/Toaster.styled.js +0 -73
- package/packages/shared-components/dist/Toast/index.js +0 -7
- package/packages/shared-components/dist/Toast/toasts.js +0 -20
- package/packages/shared-components/dist/Toast/types.js +0 -2
- package/packages/shared-components/dist/Tooltip/Tooltip.js +0 -29
- package/packages/shared-components/dist/Tooltip/index.js +0 -17
- package/packages/shared-components/dist/Tree/DesktopTreeNode.js +0 -22
- package/packages/shared-components/dist/Tree/MobileTreeNode.js +0 -17
- package/packages/shared-components/dist/Tree/Node.js +0 -23
- package/packages/shared-components/dist/Tree/Node.styled.js +0 -31
- package/packages/shared-components/dist/Tree/Tree.js +0 -149
- package/packages/shared-components/dist/Tree/index.js +0 -18
- package/packages/shared-components/dist/UserProfileMenu/UserProfileMenu.js +0 -79
- package/packages/shared-components/dist/UserProfileMenu/UserProfileMenu.styled.js +0 -38
- package/packages/shared-components/dist/UserProfileMenu/index.js +0 -17
- package/packages/shared-components/dist/codeSnippetBox/CodeSnippetBox.js +0 -51
- package/packages/shared-components/dist/codeSnippetBox/CodeSnippetBox.styled.js +0 -27
- package/packages/shared-components/dist/codeSnippetBox/index.js +0 -17
- package/packages/shared-components/dist/index.js +0 -52
- package/packages/shared-components/dist/utils/CheckboxInput.js +0 -36
- package/packages/shared-components/dist/utils/colorVariant.js +0 -137
- package/packages/shared-components/dist/utils/context/NavigationKeyContext.js +0 -15
- package/packages/shared-components/dist/utils/context/index.js +0 -6
- package/packages/shared-components/dist/utils/date.js +0 -56
- package/packages/shared-components/dist/utils/download.js +0 -13
- package/packages/shared-components/dist/utils/downloadPrintHtml.js +0 -68
- package/packages/shared-components/dist/utils/file.js +0 -24
- package/packages/shared-components/dist/utils/helper.js +0 -50
- package/packages/shared-components/dist/utils/hooks/index.js +0 -20
- package/packages/shared-components/dist/utils/hooks/useAutocompleteScrollToSelected.js +0 -39
- package/packages/shared-components/dist/utils/hooks/useDialogActions.js +0 -14
- package/packages/shared-components/dist/utils/hooks/useFormFieldFocus.js +0 -228
- package/packages/shared-components/dist/utils/hooks/useGetDeviceType.js +0 -24
- package/packages/shared-components/dist/utils/hooks/useGlobalKeyboardShortcut.js +0 -95
- package/packages/shared-components/dist/utils/index.js +0 -30
- package/packages/shared-components/dist/utils/regex.js +0 -20
- package/packages/shared-components/dist/utils/theme/colorPalette.js +0 -309
- package/packages/shared-components/dist/utils/theme/colorPaletteUI.js +0 -29
- package/packages/shared-components/dist/utils/theme/paletteDark.js +0 -11
- package/packages/shared-components/dist/utils/theme/paletteLight.js +0 -31
- package/packages/shared-components/dist/utils/theme/theme.js +0 -377
- package/packages/shared-components/dist/utils/theme/types.js +0 -2
- package/packages/shared-components/dist/utils/theme/typography.js +0 -65
- package/packages/shared-components/dist/utils/types.js +0 -2
- package/packages/shared-components/dist/utils/urlToNestedObject.js +0 -13
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./Autocomplete"), exports);
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.CheckBox = CheckBox;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const Checkbox_1 = __importDefault(require("@mui/material/Checkbox/Checkbox"));
|
|
9
|
-
const react_hook_form_1 = require("react-hook-form");
|
|
10
|
-
const utils_1 = require("../../utils");
|
|
11
|
-
const useFormFieldFocus_1 = require("../../utils/hooks/useFormFieldFocus");
|
|
12
|
-
const CheckBox_styled_1 = require("./CheckBox.styled");
|
|
13
|
-
const Skeleton_1 = require("./Skeleton");
|
|
14
|
-
function CheckBox({ name, rules, control, defaultValue, size, loading = false, navigationKey, ...restCheckBoxProps }) {
|
|
15
|
-
const { field: { value = false, onChange, ref, ...restField }, } = (0, react_hook_form_1.useController)({ name, control, defaultValue, rules });
|
|
16
|
-
const { navigationKey: navigationKeyFromContext } = (0, utils_1.useNavigationKeyContext)();
|
|
17
|
-
const resolvedNavigationKey = navigationKey ?? navigationKeyFromContext;
|
|
18
|
-
const { inputRef, maintainFocus, handleKeyDown: handleNavigationKeyDown, } = (0, useFormFieldFocus_1.useFormFieldFocus)({ navigationKey: resolvedNavigationKey });
|
|
19
|
-
const handleKeyDown = (event) => {
|
|
20
|
-
handleNavigationKeyDown(event, undefined, false);
|
|
21
|
-
if (restCheckBoxProps.onKeyDown) {
|
|
22
|
-
restCheckBoxProps.onKeyDown(event);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
const handleInputRef = (el) => {
|
|
26
|
-
inputRef.current = el;
|
|
27
|
-
if (ref) {
|
|
28
|
-
if (typeof ref === "function") {
|
|
29
|
-
ref(el);
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
ref.current = el;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
if (loading) {
|
|
37
|
-
return (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, {});
|
|
38
|
-
}
|
|
39
|
-
return ((0, jsx_runtime_1.jsx)(Checkbox_1.default, { icon: (0, jsx_runtime_1.jsx)(CheckBox_styled_1.BoxStyled, { size: size }), checkedIcon: (0, jsx_runtime_1.jsx)(CheckBox_styled_1.CheckStyled, { size: size }), checked: value, inputRef: handleInputRef, onChange: (event) => {
|
|
40
|
-
onChange(event.target.checked);
|
|
41
|
-
maintainFocus();
|
|
42
|
-
}, onKeyDown: handleKeyDown, ...restField, ...restCheckBoxProps }));
|
|
43
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.CheckStyled = exports.BoxStyled = void 0;
|
|
7
|
-
const Check_1 = __importDefault(require("@mui/icons-material/Check"));
|
|
8
|
-
const Box_1 = __importDefault(require("@mui/material/Box"));
|
|
9
|
-
const styles_1 = require("@mui/material/styles");
|
|
10
|
-
exports.BoxStyled = (0, styles_1.styled)(Box_1.default)(({ theme, size }) => {
|
|
11
|
-
const { color } = theme.palette.app;
|
|
12
|
-
const checkBoxSize = size === "small"
|
|
13
|
-
? {
|
|
14
|
-
width: "14px",
|
|
15
|
-
height: "14px",
|
|
16
|
-
}
|
|
17
|
-
: {
|
|
18
|
-
width: "20px",
|
|
19
|
-
height: "20px",
|
|
20
|
-
};
|
|
21
|
-
const style = {
|
|
22
|
-
...checkBoxSize,
|
|
23
|
-
borderRadius: "4px",
|
|
24
|
-
border: `2px solid ${color.iron[900]}`,
|
|
25
|
-
"input:hover ~ &": {
|
|
26
|
-
borderColor: color.butterflyBlue[900],
|
|
27
|
-
},
|
|
28
|
-
"input:disabled ~ &": {
|
|
29
|
-
borderColor: color.iron[800],
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
return style;
|
|
33
|
-
});
|
|
34
|
-
exports.CheckStyled = (0, styles_1.styled)(
|
|
35
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
36
|
-
Check_1.default)(({ theme, size }) => {
|
|
37
|
-
const { color } = theme.palette.app;
|
|
38
|
-
const checkBoxSize = size === "small"
|
|
39
|
-
? {
|
|
40
|
-
width: "14px",
|
|
41
|
-
height: "14px",
|
|
42
|
-
}
|
|
43
|
-
: {
|
|
44
|
-
width: "20px",
|
|
45
|
-
height: "20px",
|
|
46
|
-
};
|
|
47
|
-
const style = {
|
|
48
|
-
...checkBoxSize,
|
|
49
|
-
border: `2px solid ${color.butterflyBlue[900]}`,
|
|
50
|
-
borderRadius: "4px",
|
|
51
|
-
color: color.iron[600],
|
|
52
|
-
backgroundColor: color.butterflyBlue[900],
|
|
53
|
-
"input:disabled ~ &": {
|
|
54
|
-
borderColor: color.iron[800],
|
|
55
|
-
backgroundColor: color.iron[800],
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
return style;
|
|
59
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Skeleton = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const Skeleton_1 = __importDefault(require("@mui/material/Skeleton"));
|
|
9
|
-
const Skeleton = () => {
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)(Skeleton_1.default, { width: 30, height: 30, sx: { borderRadius: "4px" }, variant: "rectangular" }));
|
|
11
|
-
};
|
|
12
|
-
exports.Skeleton = Skeleton;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./CheckBox"), exports);
|
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.RightArrowIcon = exports.LeftArrowIcon = exports.dateFormats = void 0;
|
|
7
|
-
exports.DatePicker = DatePicker;
|
|
8
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
-
const ChevronLeft_1 = __importDefault(require("@mui/icons-material/ChevronLeft"));
|
|
10
|
-
const ChevronRight_1 = __importDefault(require("@mui/icons-material/ChevronRight"));
|
|
11
|
-
const InputLabel_1 = __importDefault(require("@mui/material/InputLabel"));
|
|
12
|
-
const Stack_1 = __importDefault(require("@mui/material/Stack"));
|
|
13
|
-
const styles_1 = require("@mui/material/styles");
|
|
14
|
-
const DatePicker_1 = require("@mui/x-date-pickers/DatePicker");
|
|
15
|
-
const isFunction_1 = __importDefault(require("lodash/isFunction"));
|
|
16
|
-
const luxon_1 = require("luxon");
|
|
17
|
-
const react_1 = require("react");
|
|
18
|
-
const react_hook_form_1 = require("react-hook-form");
|
|
19
|
-
const Actions_1 = require("../../Actions");
|
|
20
|
-
const NavigationKeyContext_1 = require("../../utils/context/NavigationKeyContext");
|
|
21
|
-
const useFormFieldFocus_1 = require("../../utils/hooks/useFormFieldFocus");
|
|
22
|
-
const commonStyles_1 = require("../commonStyles");
|
|
23
|
-
const Skeleton_1 = require("./Skeleton");
|
|
24
|
-
exports.dateFormats = {
|
|
25
|
-
dateWithISO8601: "yyyy-MM-dd",
|
|
26
|
-
dateWithEuropean: "dd-MM-yyyy",
|
|
27
|
-
};
|
|
28
|
-
const LeftArrowIcon = () => {
|
|
29
|
-
const theme = (0, styles_1.useTheme)();
|
|
30
|
-
const { iron } = theme.palette.app.color;
|
|
31
|
-
return ((0, jsx_runtime_1.jsx)(ChevronLeft_1.default, { sx: {
|
|
32
|
-
border: `1px solid ${iron[800]}`,
|
|
33
|
-
borderRadius: "5px",
|
|
34
|
-
p: "4px",
|
|
35
|
-
} }));
|
|
36
|
-
};
|
|
37
|
-
exports.LeftArrowIcon = LeftArrowIcon;
|
|
38
|
-
const RightArrowIcon = () => {
|
|
39
|
-
const theme = (0, styles_1.useTheme)();
|
|
40
|
-
const { iron } = theme.palette.app.color;
|
|
41
|
-
return ((0, jsx_runtime_1.jsx)(ChevronRight_1.default, { sx: {
|
|
42
|
-
border: `1px solid ${iron[800]}`,
|
|
43
|
-
borderRadius: "5px",
|
|
44
|
-
p: "4px",
|
|
45
|
-
} }));
|
|
46
|
-
};
|
|
47
|
-
exports.RightArrowIcon = RightArrowIcon;
|
|
48
|
-
function DatePicker({ setError, control, defaultValue, disabled = false, label, readOnly = false, name, error = false, helperText, loading = false, required = false, clearable = required ? false : true, rules, disableKeyboardInput = false, setOnFinalChange = false, views = ["year", "month", "day"], format = exports.dateFormats.dateWithEuropean, containerProps, styling = "custom", navigationKey, ...restProps }) {
|
|
49
|
-
const [localError, setLocalError] = (0, react_1.useState)();
|
|
50
|
-
const { navigationKey: navigationKeyFromContext } = (0, NavigationKeyContext_1.useNavigationKeyContext)();
|
|
51
|
-
const resolvedNavigationKey = navigationKey ?? navigationKeyFromContext;
|
|
52
|
-
const { field: { value, onChange, ...restField }, } = (0, react_hook_form_1.useController)({ name, control, defaultValue, rules });
|
|
53
|
-
const [open, setOpen] = (0, react_1.useState)(false);
|
|
54
|
-
const { setInputRef, maintainFocus, maintainFocusAfterClose, handleKeyDown, handleEnterNavigation, } = (0, useFormFieldFocus_1.useFormFieldFocus)({ isOpen: open, navigationKey: resolvedNavigationKey });
|
|
55
|
-
const theme = (0, styles_1.useTheme)();
|
|
56
|
-
const { iron, butterflyBlue, mirage } = theme.palette.app.color;
|
|
57
|
-
const finalValue = (0, react_1.useMemo)(() => {
|
|
58
|
-
if ((disableKeyboardInput || setOnFinalChange) && open) {
|
|
59
|
-
return value ? luxon_1.DateTime.fromISO(value) : undefined;
|
|
60
|
-
}
|
|
61
|
-
return luxon_1.DateTime.fromISO(value);
|
|
62
|
-
}, [value, disableKeyboardInput, setOnFinalChange, open]);
|
|
63
|
-
// eslint-disable-next-line sonarjs/rules-of-hooks
|
|
64
|
-
(0, react_1.useMemo)(() => {
|
|
65
|
-
if (!error && localError) {
|
|
66
|
-
const timer = setTimeout(() => {
|
|
67
|
-
setLocalError(undefined);
|
|
68
|
-
}, 100);
|
|
69
|
-
return () => clearTimeout(timer);
|
|
70
|
-
}
|
|
71
|
-
}, [error]);
|
|
72
|
-
if (loading) {
|
|
73
|
-
return (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { label: label, styling: styling });
|
|
74
|
-
}
|
|
75
|
-
return ((0, jsx_runtime_1.jsxs)(Stack_1.default, { gap: "5px", ...containerProps, children: [label && styling === "custom" && ((0, jsx_runtime_1.jsx)(InputLabel_1.default, { required: required, disabled: disabled, children: label })), (0, jsx_runtime_1.jsx)(DatePicker_1.DatePicker, { ...restField, ...restProps, disabled: disabled, views: views, format: format, value: finalValue, readOnly: readOnly, open: open && !readOnly, onOpen: () => setOpen(true), onClose: () => {
|
|
76
|
-
setOpen(false);
|
|
77
|
-
maintainFocusAfterClose();
|
|
78
|
-
}, slotProps: {
|
|
79
|
-
field: {
|
|
80
|
-
clearable,
|
|
81
|
-
onClear: () => onChange(null),
|
|
82
|
-
readOnly: disableKeyboardInput,
|
|
83
|
-
onKeyDown: (event) => {
|
|
84
|
-
if (resolvedNavigationKey === "enter" && event.key === "Enter") {
|
|
85
|
-
event.preventDefault();
|
|
86
|
-
}
|
|
87
|
-
if (resolvedNavigationKey === "enter" &&
|
|
88
|
-
event.key === " " &&
|
|
89
|
-
!open &&
|
|
90
|
-
!readOnly &&
|
|
91
|
-
!disabled) {
|
|
92
|
-
event.preventDefault();
|
|
93
|
-
event.stopPropagation();
|
|
94
|
-
setOpen(true);
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
clearButton: {
|
|
99
|
-
tabIndex: clearable ? 0 : -1,
|
|
100
|
-
onKeyDown: (event) => {
|
|
101
|
-
if (resolvedNavigationKey === "enter" && event.key === "Enter") {
|
|
102
|
-
handleEnterNavigation(event);
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
textField: {
|
|
107
|
-
disabled,
|
|
108
|
-
error: !!localError || error,
|
|
109
|
-
helperText: localError ?? helperText,
|
|
110
|
-
label: styling === "default" ? label : undefined,
|
|
111
|
-
required: styling === "default" ? required : undefined,
|
|
112
|
-
sx: (0, commonStyles_1.getDefaultTextFieldSx)(styling),
|
|
113
|
-
InputLabelProps: (0, commonStyles_1.getDefaultInputLabelProps)(styling),
|
|
114
|
-
inputRef: setInputRef,
|
|
115
|
-
InputProps: {
|
|
116
|
-
endAdornment: ((0, jsx_runtime_1.jsx)(Actions_1.CalendarIconAction, { disabled: disabled, onClick: () => setOpen(true), showTooltip: false, onKeyDown: (event) => {
|
|
117
|
-
if (resolvedNavigationKey === "enter" &&
|
|
118
|
-
event.key === "Enter") {
|
|
119
|
-
handleEnterNavigation(event);
|
|
120
|
-
}
|
|
121
|
-
} })),
|
|
122
|
-
sx: {
|
|
123
|
-
"& .MuiInputAdornment-root": {
|
|
124
|
-
width: "30px",
|
|
125
|
-
},
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
onKeyDown: (event) => {
|
|
129
|
-
if (resolvedNavigationKey === "enter") {
|
|
130
|
-
if (event.key === " " && !open && !readOnly && !disabled) {
|
|
131
|
-
event.preventDefault();
|
|
132
|
-
event.stopPropagation();
|
|
133
|
-
setOpen(true);
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
if (event.key === "Enter") {
|
|
137
|
-
if (open) {
|
|
138
|
-
setOpen(false);
|
|
139
|
-
}
|
|
140
|
-
handleEnterNavigation(event, true);
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
handleKeyDown(event, () => setOpen(false), open);
|
|
145
|
-
if (event.key === "Backspace" && clearable) {
|
|
146
|
-
onChange(null);
|
|
147
|
-
setLocalError(undefined);
|
|
148
|
-
}
|
|
149
|
-
else if (event.key === "Backspace" && !clearable) {
|
|
150
|
-
event.preventDefault();
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
},
|
|
154
|
-
day: {
|
|
155
|
-
sx: {
|
|
156
|
-
"&.MuiPickersDay-root": {
|
|
157
|
-
borderRadius: "5px",
|
|
158
|
-
borderColor: butterflyBlue[900],
|
|
159
|
-
fontWeight: 500,
|
|
160
|
-
color: mirage[900],
|
|
161
|
-
},
|
|
162
|
-
"&.MuiPickersDay-root.Mui-selected": {
|
|
163
|
-
backgroundColor: butterflyBlue[900],
|
|
164
|
-
color: iron[600],
|
|
165
|
-
},
|
|
166
|
-
"&.MuiPickersDay-today": {
|
|
167
|
-
color: butterflyBlue[900],
|
|
168
|
-
backgroundColor: iron[600],
|
|
169
|
-
},
|
|
170
|
-
"&.MuiPickersDay-root:not(.Mui-selected):hover": {
|
|
171
|
-
color: butterflyBlue[900],
|
|
172
|
-
},
|
|
173
|
-
},
|
|
174
|
-
},
|
|
175
|
-
calendarHeader: {
|
|
176
|
-
sx: {
|
|
177
|
-
"& .MuiPickersCalendarHeader-label": {
|
|
178
|
-
fontWeight: "500",
|
|
179
|
-
"&:hover": {
|
|
180
|
-
color: butterflyBlue[900],
|
|
181
|
-
},
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
},
|
|
185
|
-
yearButton: {
|
|
186
|
-
sx: {
|
|
187
|
-
"&.MuiPickersYear-yearButton.Mui-selected": {
|
|
188
|
-
backgroundColor: butterflyBlue[900],
|
|
189
|
-
color: iron[600],
|
|
190
|
-
},
|
|
191
|
-
"&.MuiPickersYear-yearButton:not(.Mui-selected):hover": {
|
|
192
|
-
color: butterflyBlue[900],
|
|
193
|
-
},
|
|
194
|
-
},
|
|
195
|
-
},
|
|
196
|
-
monthButton: {
|
|
197
|
-
sx: {
|
|
198
|
-
"&.MuiPickersMonth-monthButton.Mui-selected": {
|
|
199
|
-
backgroundColor: butterflyBlue[900],
|
|
200
|
-
color: iron[600],
|
|
201
|
-
},
|
|
202
|
-
"&.MuiPickersMonth-monthButton:not(.Mui-selected):hover": {
|
|
203
|
-
color: butterflyBlue[900],
|
|
204
|
-
},
|
|
205
|
-
},
|
|
206
|
-
},
|
|
207
|
-
}, slots: {
|
|
208
|
-
leftArrowIcon: exports.LeftArrowIcon,
|
|
209
|
-
rightArrowIcon: exports.RightArrowIcon,
|
|
210
|
-
}, dayOfWeekFormatter: (weekday) => `${weekday.toFormat("ccc")}`, onAccept: (value, details) => {
|
|
211
|
-
if (setOnFinalChange && value?.isValid) {
|
|
212
|
-
onChange(value.toISODate());
|
|
213
|
-
setLocalError(undefined);
|
|
214
|
-
maintainFocus();
|
|
215
|
-
}
|
|
216
|
-
restProps?.onAccept?.(value, details);
|
|
217
|
-
}, onChange: (value, details) => {
|
|
218
|
-
if ((disableKeyboardInput || setOnFinalChange) && open) {
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
if (!value) {
|
|
222
|
-
onChange(null);
|
|
223
|
-
setLocalError(undefined);
|
|
224
|
-
maintainFocus();
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
const isValid = value?.isValid === true;
|
|
228
|
-
const hasError = Boolean(details.validationError ?? !isValid);
|
|
229
|
-
onChange(isValid ? value.toISODate() : null);
|
|
230
|
-
const errorMessage = hasError
|
|
231
|
-
? "Please enter a valid date"
|
|
232
|
-
: undefined;
|
|
233
|
-
setLocalError(errorMessage);
|
|
234
|
-
requestAnimationFrame(() => {
|
|
235
|
-
if ((0, isFunction_1.default)(setError) && hasError) {
|
|
236
|
-
setError(name, {
|
|
237
|
-
type: "manual",
|
|
238
|
-
message: errorMessage,
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
maintainFocus();
|
|
242
|
-
});
|
|
243
|
-
restProps?.onChange?.(value, details);
|
|
244
|
-
} })] }));
|
|
245
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Skeleton = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const Skeleton_1 = __importDefault(require("@mui/material/Skeleton"));
|
|
9
|
-
const Stack_1 = __importDefault(require("@mui/material/Stack"));
|
|
10
|
-
const Skeleton = ({ label, styling }) => {
|
|
11
|
-
return ((0, jsx_runtime_1.jsxs)(Stack_1.default, { gap: "10px", children: [label && styling === "custom" && ((0, jsx_runtime_1.jsx)(Skeleton_1.default, { width: 120, height: "18.69px", sx: {
|
|
12
|
-
transform: "scale(1)",
|
|
13
|
-
} })), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { height: "35.69px", sx: {
|
|
14
|
-
transform: "scale(1)",
|
|
15
|
-
} })] }));
|
|
16
|
-
};
|
|
17
|
-
exports.Skeleton = Skeleton;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./DatePicker"), exports);
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.DateRangePicker = DateRangePicker;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const InputLabel_1 = __importDefault(require("@mui/material/InputLabel"));
|
|
9
|
-
const Stack_1 = __importDefault(require("@mui/material/Stack"));
|
|
10
|
-
const Typography_1 = __importDefault(require("@mui/material/Typography"));
|
|
11
|
-
const luxon_1 = require("luxon");
|
|
12
|
-
const react_1 = require("react");
|
|
13
|
-
const react_date_range_1 = require("react-date-range");
|
|
14
|
-
const react_hook_form_1 = require("react-hook-form");
|
|
15
|
-
const Skeleton_1 = require("./Skeleton");
|
|
16
|
-
function DateRangePicker({ control, defaultValue, disabled = false, label, name, error = false, helperText, loading = false, required = false, months = 1, rules, minDate, maxDate, }) {
|
|
17
|
-
const { field: { onChange }, } = (0, react_hook_form_1.useController)({ name, control, defaultValue, rules });
|
|
18
|
-
const [range, setRange] = (0, react_1.useState)([
|
|
19
|
-
{
|
|
20
|
-
startDate: defaultValue?.[0] ? new Date(defaultValue[0]) : new Date(),
|
|
21
|
-
endDate: defaultValue?.[1] ? new Date(defaultValue[1]) : new Date(),
|
|
22
|
-
key: "selection",
|
|
23
|
-
},
|
|
24
|
-
]);
|
|
25
|
-
if (loading) {
|
|
26
|
-
return (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, {});
|
|
27
|
-
}
|
|
28
|
-
return ((0, jsx_runtime_1.jsxs)(Stack_1.default, { gap: "5px", children: [label && ((0, jsx_runtime_1.jsx)(InputLabel_1.default, { required: required, disabled: disabled, children: label })), (0, jsx_runtime_1.jsx)(react_date_range_1.DateRangePicker, { ranges: range, onChange: (ranges) => {
|
|
29
|
-
const selectedRange = ranges.selection;
|
|
30
|
-
if (selectedRange?.endDate &&
|
|
31
|
-
selectedRange?.startDate &&
|
|
32
|
-
selectedRange?.key) {
|
|
33
|
-
setRange([
|
|
34
|
-
{
|
|
35
|
-
startDate: selectedRange.startDate,
|
|
36
|
-
endDate: selectedRange.endDate,
|
|
37
|
-
key: selectedRange.key,
|
|
38
|
-
},
|
|
39
|
-
]);
|
|
40
|
-
const startDate = luxon_1.DateTime.fromJSDate(selectedRange.startDate).toISODate();
|
|
41
|
-
const endDate = luxon_1.DateTime.fromJSDate(selectedRange.endDate).toISODate();
|
|
42
|
-
onChange([startDate, endDate]);
|
|
43
|
-
}
|
|
44
|
-
}, months: months, direction: "horizontal", calendarFocus: "backwards", staticRanges: [], inputRanges: [], moveRangeOnFirstSelection: false, preventSnapRefocus: true, minDate: minDate, maxDate: maxDate }), error && (0, jsx_runtime_1.jsx)(Typography_1.default, { color: "red", children: helperText })] }));
|
|
45
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Skeleton = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const Skeleton_1 = __importDefault(require("@mui/material/Skeleton"));
|
|
9
|
-
const Stack_1 = __importDefault(require("@mui/material/Stack"));
|
|
10
|
-
const Skeleton = () => {
|
|
11
|
-
return ((0, jsx_runtime_1.jsxs)(Stack_1.default, { direction: "row", gap: "10px", children: [(0, jsx_runtime_1.jsxs)(Stack_1.default, { gap: "10px", children: [(0, jsx_runtime_1.jsx)(Skeleton_1.default, { width: 120, height: "18.69px", sx: {
|
|
12
|
-
transform: "scale(1)",
|
|
13
|
-
} }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { height: "35.69px", sx: {
|
|
14
|
-
transform: "scale(1)",
|
|
15
|
-
} })] }), (0, jsx_runtime_1.jsxs)(Stack_1.default, { gap: "10px", children: [(0, jsx_runtime_1.jsx)(Skeleton_1.default, { width: 120, height: "18.69px", sx: {
|
|
16
|
-
transform: "scale(1)",
|
|
17
|
-
} }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { height: "35.69px", sx: {
|
|
18
|
-
transform: "scale(1)",
|
|
19
|
-
} })] })] }));
|
|
20
|
-
};
|
|
21
|
-
exports.Skeleton = Skeleton;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./DateRangePicker"), exports);
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.DateRangeSelector = DateRangeSelector;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const MoreVert_1 = __importDefault(require("@mui/icons-material/MoreVert"));
|
|
9
|
-
const IconButton_1 = __importDefault(require("@mui/material/IconButton"));
|
|
10
|
-
const ListItemButton_1 = __importDefault(require("@mui/material/ListItemButton"));
|
|
11
|
-
const Popover_1 = __importDefault(require("@mui/material/Popover"));
|
|
12
|
-
const Stack_1 = __importDefault(require("@mui/material/Stack"));
|
|
13
|
-
const Typography_1 = __importDefault(require("@mui/material/Typography"));
|
|
14
|
-
const luxon_1 = require("luxon");
|
|
15
|
-
const react_1 = require("react");
|
|
16
|
-
const PadBox_1 = require("../../PadBox");
|
|
17
|
-
const utils_1 = require("../../utils");
|
|
18
|
-
const DateRangePicker_1 = require("../DateRangePicker");
|
|
19
|
-
function DateRangeSelector({ name, watch, control, setValue, }) {
|
|
20
|
-
const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
|
|
21
|
-
const [showCustom, setShowCustom] = (0, react_1.useState)(false);
|
|
22
|
-
const dateField = watch(name);
|
|
23
|
-
function castDateRangeToPathValue(dateField) {
|
|
24
|
-
return dateField;
|
|
25
|
-
}
|
|
26
|
-
function setRange(days) {
|
|
27
|
-
if (!showCustom) {
|
|
28
|
-
const fromDate = luxon_1.DateTime.now()
|
|
29
|
-
.minus({ days: 1 + days })
|
|
30
|
-
.toISODate();
|
|
31
|
-
const toDate = luxon_1.DateTime.now().minus({ days: 1 }).toISODate();
|
|
32
|
-
setValue(name, castDateRangeToPathValue([fromDate, toDate]));
|
|
33
|
-
setAnchorEl(null);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
const defaultRanges = [
|
|
37
|
-
{ title: "Last 7 days", onClick: () => setRange(7) },
|
|
38
|
-
{ title: "Last 14 days", onClick: () => setRange(14) },
|
|
39
|
-
{ title: "Last 30 days", onClick: () => setRange(30) },
|
|
40
|
-
{ title: "Custom", onClick: () => setShowCustom(true) },
|
|
41
|
-
];
|
|
42
|
-
(0, react_1.useMemo)(() => {
|
|
43
|
-
if (showCustom && Array.isArray(dateField)) {
|
|
44
|
-
setValue(name, castDateRangeToPathValue(dateField));
|
|
45
|
-
}
|
|
46
|
-
}, [showCustom, name]);
|
|
47
|
-
function handleClick(event) {
|
|
48
|
-
setAnchorEl(event.currentTarget);
|
|
49
|
-
}
|
|
50
|
-
function handleClose() {
|
|
51
|
-
setAnchorEl(null);
|
|
52
|
-
setShowCustom(false);
|
|
53
|
-
}
|
|
54
|
-
return ((0, jsx_runtime_1.jsxs)(Stack_1.default, { direction: "row", alignItems: "center", children: [(0, jsx_runtime_1.jsxs)(Typography_1.default, { variant: "body2", children: [(0, utils_1.formatDate)(dateField[0] ?? "", "dd MMM yyyy"), " -", (0, utils_1.formatDate)(dateField[1] ?? "", "dd MMM yyyy")] }), (0, jsx_runtime_1.jsx)(IconButton_1.default, { component: "div", onClick: handleClick, children: (0, jsx_runtime_1.jsx)(MoreVert_1.default, { fontSize: "small" }) }), !!anchorEl && ((0, jsx_runtime_1.jsx)(Popover_1.default, { open: true, anchorEl: anchorEl, onClose: handleClose, anchorOrigin: { vertical: "bottom", horizontal: "left" }, children: (0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: { padding: "2px" }, children: showCustom ? ((0, jsx_runtime_1.jsx)(DateRangePicker_1.DateRangePicker, { name: name, control: control })) : (defaultRanges.map((item) => ((0, jsx_runtime_1.jsx)(ListItemButton_1.default, { sx: {
|
|
55
|
-
width: "100%",
|
|
56
|
-
textAlign: "start",
|
|
57
|
-
padding: "5px 16px 5px 10px",
|
|
58
|
-
}, onClick: item.onClick, children: (0, jsx_runtime_1.jsx)(Typography_1.default, { variant: "body1", children: item.title }) }, item.title)))) }) }))] }));
|
|
59
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./DateRangeSelector"), exports);
|