@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,116 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useGetFacetedFilter = void 0;
|
|
4
|
-
const date_fns_1 = require("date-fns");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const useGetFacetedFilter = ({ columns, }) => {
|
|
7
|
-
const includesSome = (row, columnId, filterValue) => {
|
|
8
|
-
if (!filterValue ||
|
|
9
|
-
(Array.isArray(filterValue) && filterValue.length === 0)) {
|
|
10
|
-
return true;
|
|
11
|
-
}
|
|
12
|
-
const cellValue = row.getValue(columnId);
|
|
13
|
-
const cellValueStr = cellValue != null ? String(cellValue) : "";
|
|
14
|
-
if (Array.isArray(filterValue)) {
|
|
15
|
-
return filterValue.some((filterVal) => String(filterVal) === cellValueStr);
|
|
16
|
-
}
|
|
17
|
-
return String(filterValue) === cellValueStr;
|
|
18
|
-
};
|
|
19
|
-
const combinedFilter = (row, columnId, filterValue) => {
|
|
20
|
-
if (!filterValue) {
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
const cellValue = row.getValue(columnId);
|
|
24
|
-
const cellValueStr = cellValue != null ? String(cellValue) : "";
|
|
25
|
-
// Handle combined filter object
|
|
26
|
-
if (typeof filterValue === "object" && !Array.isArray(filterValue)) {
|
|
27
|
-
const combinedFilterValue = filterValue;
|
|
28
|
-
const { facets, search } = combinedFilterValue;
|
|
29
|
-
let matches = true;
|
|
30
|
-
// Check search filter
|
|
31
|
-
if (search && search.trim() !== "") {
|
|
32
|
-
matches =
|
|
33
|
-
matches && cellValueStr.toLowerCase().includes(search.toLowerCase());
|
|
34
|
-
}
|
|
35
|
-
// Check facets filter
|
|
36
|
-
if (facets && facets.length > 0) {
|
|
37
|
-
matches =
|
|
38
|
-
matches &&
|
|
39
|
-
facets.some((filterVal) => String(filterVal) === cellValueStr);
|
|
40
|
-
}
|
|
41
|
-
return matches;
|
|
42
|
-
}
|
|
43
|
-
// Fallback to original logic for backward compatibility
|
|
44
|
-
if (Array.isArray(filterValue)) {
|
|
45
|
-
return filterValue.some((filterVal) => String(filterVal) === cellValueStr);
|
|
46
|
-
}
|
|
47
|
-
return String(filterValue) === cellValueStr;
|
|
48
|
-
};
|
|
49
|
-
const parseToDate = (value) => {
|
|
50
|
-
if (value instanceof Date) {
|
|
51
|
-
return value;
|
|
52
|
-
}
|
|
53
|
-
if (typeof value === "string") {
|
|
54
|
-
const parsed = (0, date_fns_1.parseISO)(value);
|
|
55
|
-
if ((0, date_fns_1.isValid)(parsed)) {
|
|
56
|
-
return parsed;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return null;
|
|
60
|
-
};
|
|
61
|
-
const dateRangeFilter = (row, columnId, filterValue) => {
|
|
62
|
-
if (!Array.isArray(filterValue) || filterValue.length === 0) {
|
|
63
|
-
return true;
|
|
64
|
-
}
|
|
65
|
-
const [startValue, endValue] = filterValue;
|
|
66
|
-
const startDate = parseToDate(startValue);
|
|
67
|
-
const endDate = parseToDate(endValue ?? startValue);
|
|
68
|
-
if (!startDate || !endDate) {
|
|
69
|
-
return true;
|
|
70
|
-
}
|
|
71
|
-
const normalizedStart = new Date(startDate);
|
|
72
|
-
normalizedStart.setHours(0, 0, 0, 0);
|
|
73
|
-
const normalizedEnd = new Date(endDate);
|
|
74
|
-
normalizedEnd.setHours(23, 59, 59, 999);
|
|
75
|
-
const cellValue = row.getValue(columnId);
|
|
76
|
-
const cellDate = parseToDate(cellValue);
|
|
77
|
-
if (!cellDate) {
|
|
78
|
-
const cellString = cellValue != null ? String(cellValue) : "";
|
|
79
|
-
const startString = String(startValue ?? "");
|
|
80
|
-
const endString = typeof endValue === "string" && endValue ? endValue : startString;
|
|
81
|
-
return cellString >= startString && cellString <= endString;
|
|
82
|
-
}
|
|
83
|
-
const cellTime = new Date(cellDate).getTime();
|
|
84
|
-
return (cellTime >= normalizedStart.getTime() &&
|
|
85
|
-
cellTime <= normalizedEnd.getTime());
|
|
86
|
-
};
|
|
87
|
-
const processedColumns = (0, react_1.useMemo)(() => {
|
|
88
|
-
return columns.map((col) => {
|
|
89
|
-
const appCol = col;
|
|
90
|
-
const { facetedFilter, filterVariant } = appCol;
|
|
91
|
-
// If column has both facetedFilter and filterVariant, use combined filter
|
|
92
|
-
if (facetedFilter && filterVariant) {
|
|
93
|
-
return {
|
|
94
|
-
...col,
|
|
95
|
-
filterFn: "combinedFilter",
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
if (filterVariant === "smartDateFilter") {
|
|
99
|
-
return {
|
|
100
|
-
...col,
|
|
101
|
-
filterFn: "dateRangeFilter",
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
// If only faceted filter, use includesSome
|
|
105
|
-
if (facetedFilter) {
|
|
106
|
-
return {
|
|
107
|
-
...col,
|
|
108
|
-
filterFn: "includesSome",
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
return col;
|
|
112
|
-
});
|
|
113
|
-
}, [columns]);
|
|
114
|
-
return { combinedFilter, dateRangeFilter, includesSome, processedColumns };
|
|
115
|
-
};
|
|
116
|
-
exports.useGetFacetedFilter = useGetFacetedFilter;
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useGetGroupedColumn = void 0;
|
|
4
|
-
const core_1 = require("@dnd-kit/core");
|
|
5
|
-
const sortable_1 = require("@dnd-kit/sortable");
|
|
6
|
-
const react_1 = require("react");
|
|
7
|
-
const useGetGroupedColumn = ({ table, swipeableColumns, setActiveDragId, currentGrouping, handleColumnReorder, filterHeaders, isHeaderReorderable, propsColumns, defaultGrouping, }) => {
|
|
8
|
-
const { getColumn, getHeaderGroups, setGrouping } = table;
|
|
9
|
-
const headerGroups = getHeaderGroups();
|
|
10
|
-
// Handler to remove column from grouping
|
|
11
|
-
const handleRemoveGroup = (0, react_1.useCallback)((columnId) => {
|
|
12
|
-
const currentGroupingArray = currentGrouping;
|
|
13
|
-
const newGrouping = currentGroupingArray.filter((id) => id !== columnId);
|
|
14
|
-
setGrouping(newGrouping);
|
|
15
|
-
}, [currentGrouping, table]);
|
|
16
|
-
// Helper: Reorder chips within grouping panel
|
|
17
|
-
const handleChipReorder = (0, react_1.useCallback)((activeId, overId, groupingArray) => {
|
|
18
|
-
const oldIndex = groupingArray.indexOf(activeId);
|
|
19
|
-
const newIndex = groupingArray.indexOf(overId);
|
|
20
|
-
const newGrouping = (0, sortable_1.arrayMove)(groupingArray, oldIndex, newIndex);
|
|
21
|
-
setGrouping(newGrouping);
|
|
22
|
-
}, [table]);
|
|
23
|
-
// Helper: Add column to grouping
|
|
24
|
-
const handleAddToGrouping = (0, react_1.useCallback)((activeId, groupingArray) => {
|
|
25
|
-
const column = getColumn(activeId);
|
|
26
|
-
if (!column) {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
const columnDef = column.columnDef;
|
|
30
|
-
// If defaultGrouping exists and enableGrouping is true, prohibit adding to grouping
|
|
31
|
-
if (defaultGrouping.length > 0 && columnDef.enableGrouping === true) {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
if (columnDef.enableGrouping !== true) {
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
const accessorKey = columnDef.accessorKey;
|
|
38
|
-
const isAlreadyGrouped = groupingArray.includes(activeId) ||
|
|
39
|
-
(accessorKey && groupingArray.includes(accessorKey));
|
|
40
|
-
if (isAlreadyGrouped) {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
const MAX_GROUPING_COLUMNS = 4;
|
|
44
|
-
if (groupingArray.length >= MAX_GROUPING_COLUMNS) {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
const groupingId = accessorKey ?? activeId;
|
|
48
|
-
setGrouping([...groupingArray, groupingId]);
|
|
49
|
-
return true;
|
|
50
|
-
}, [table, defaultGrouping]);
|
|
51
|
-
// Handle drag start
|
|
52
|
-
const handleDragStart = (0, react_1.useCallback)((event) => {
|
|
53
|
-
setActiveDragId(String(event.active.id));
|
|
54
|
-
}, []);
|
|
55
|
-
// Main drag end handler
|
|
56
|
-
const handleDragEnd = (0, react_1.useCallback)((event) => {
|
|
57
|
-
setActiveDragId(null);
|
|
58
|
-
const { active, over } = event;
|
|
59
|
-
if (!over) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
const activeId = String(active.id);
|
|
63
|
-
const overId = String(over.id);
|
|
64
|
-
const groupingArray = currentGrouping;
|
|
65
|
-
const isActiveGrouped = groupingArray.includes(activeId);
|
|
66
|
-
// Case 1: Reordering chips within grouping panel
|
|
67
|
-
if (isActiveGrouped && groupingArray.includes(overId)) {
|
|
68
|
-
handleChipReorder(activeId, overId, groupingArray);
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
// Case 2: Dragging grouped chip over panel (no-op)
|
|
72
|
-
if (isActiveGrouped && overId === "grouping-panel") {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
// Case 3: Dragging header to grouping panel
|
|
76
|
-
if (overId === "grouping-panel") {
|
|
77
|
-
handleAddToGrouping(activeId, groupingArray);
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
// Case 4: Column reordering (when swipeableColumns is enabled)
|
|
81
|
-
if (swipeableColumns) {
|
|
82
|
-
handleColumnReorder(event);
|
|
83
|
-
}
|
|
84
|
-
}, [
|
|
85
|
-
currentGrouping,
|
|
86
|
-
swipeableColumns,
|
|
87
|
-
handleColumnReorder,
|
|
88
|
-
handleChipReorder,
|
|
89
|
-
handleAddToGrouping,
|
|
90
|
-
]);
|
|
91
|
-
// Get ALL draggable column IDs for unified SortableContext
|
|
92
|
-
// This includes: groupable headers, reorderable headers, and grouped chips
|
|
93
|
-
const allDraggableIds = (0, react_1.useMemo)(() => {
|
|
94
|
-
const ids = new Set();
|
|
95
|
-
// Add all visible center headers that are either groupable or reorderable
|
|
96
|
-
headerGroups.forEach((headerGroup) => {
|
|
97
|
-
const filteredHeaders = filterHeaders(headerGroup.headers, currentGrouping);
|
|
98
|
-
filteredHeaders.forEach((header) => {
|
|
99
|
-
// Skip pinned columns and group column
|
|
100
|
-
if (header.column.getIsPinned() || header.column.id === "grouped_by") {
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
const columnDef = header.column.columnDef;
|
|
104
|
-
const isGroupable = columnDef.enableGrouping === true;
|
|
105
|
-
const isReorderable = swipeableColumns && isHeaderReorderable(header, true);
|
|
106
|
-
if (isGroupable || isReorderable) {
|
|
107
|
-
ids.add(header.column.id);
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
// Add already grouped columns (for reordering chips in the panel)
|
|
112
|
-
currentGrouping.forEach((groupId) => {
|
|
113
|
-
ids.add(groupId);
|
|
114
|
-
});
|
|
115
|
-
return Array.from(ids);
|
|
116
|
-
}, [
|
|
117
|
-
headerGroups,
|
|
118
|
-
currentGrouping,
|
|
119
|
-
filterHeaders,
|
|
120
|
-
swipeableColumns,
|
|
121
|
-
isHeaderReorderable,
|
|
122
|
-
]);
|
|
123
|
-
const customCollisionDetection = (0, react_1.useCallback)((args) => {
|
|
124
|
-
const { active } = args;
|
|
125
|
-
const activeId = String(active.id);
|
|
126
|
-
const groupingArray = currentGrouping;
|
|
127
|
-
const isDraggingChip = groupingArray.includes(activeId);
|
|
128
|
-
// Get all collisions using rectIntersection
|
|
129
|
-
const rectCollisions = (0, core_1.rectIntersection)(args);
|
|
130
|
-
// If dragging a chip (reordering within panel)
|
|
131
|
-
if (isDraggingChip) {
|
|
132
|
-
// Find collisions with other chips (not the panel itself)
|
|
133
|
-
const chipCollisions = rectCollisions.filter((collision) => groupingArray.includes(String(collision.id)) &&
|
|
134
|
-
String(collision.id) !== activeId);
|
|
135
|
-
// If hovering over another chip, prioritize chip-to-chip collision
|
|
136
|
-
if (chipCollisions.length > 0) {
|
|
137
|
-
return chipCollisions;
|
|
138
|
-
}
|
|
139
|
-
// Otherwise return panel collision if over panel
|
|
140
|
-
const panelCollision = rectCollisions.find((collision) => collision.id === "grouping-panel");
|
|
141
|
-
return panelCollision ? [panelCollision] : rectCollisions;
|
|
142
|
-
}
|
|
143
|
-
// If dragging a header (adding to grouping)
|
|
144
|
-
// Check if pointer is within the grouping panel
|
|
145
|
-
const pointerCollisions = (0, core_1.pointerWithin)(args);
|
|
146
|
-
const groupingPanelCollision = pointerCollisions.find((collision) => collision.id === "grouping-panel");
|
|
147
|
-
// If pointer is over the grouping panel, prioritize it
|
|
148
|
-
if (groupingPanelCollision) {
|
|
149
|
-
return [groupingPanelCollision];
|
|
150
|
-
}
|
|
151
|
-
// Otherwise use rectIntersection for column swapping
|
|
152
|
-
return rectCollisions;
|
|
153
|
-
}, [currentGrouping]);
|
|
154
|
-
const hasGroupableColumns = (0, react_1.useMemo)(() => {
|
|
155
|
-
return propsColumns.some((column) => {
|
|
156
|
-
const columnDef = column;
|
|
157
|
-
return columnDef.enableGrouping === true || !!defaultGrouping.length;
|
|
158
|
-
});
|
|
159
|
-
}, [propsColumns, defaultGrouping]);
|
|
160
|
-
return {
|
|
161
|
-
handleDragEnd,
|
|
162
|
-
handleDragStart,
|
|
163
|
-
handleRemoveGroup,
|
|
164
|
-
allDraggableIds,
|
|
165
|
-
hasGroupableColumns,
|
|
166
|
-
customCollisionDetection,
|
|
167
|
-
};
|
|
168
|
-
};
|
|
169
|
-
exports.useGetGroupedColumn = useGetGroupedColumn;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useGetPinStyle = void 0;
|
|
4
|
-
const material_1 = require("@mui/material");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const useGetPinStyle = () => {
|
|
7
|
-
const theme = (0, material_1.useTheme)();
|
|
8
|
-
const { iron } = theme.palette.app.color;
|
|
9
|
-
const getPinStyle = (0, react_1.useCallback)((cell, cellIndex, allCells) => {
|
|
10
|
-
const isPinned = cell.column.getIsPinned();
|
|
11
|
-
if (isPinned === "left") {
|
|
12
|
-
const nextCell = allCells[cellIndex + 1];
|
|
13
|
-
const isLastLeft = !nextCell || nextCell.column.getIsPinned() !== "left";
|
|
14
|
-
return {
|
|
15
|
-
left: cell.column.getStart("left"),
|
|
16
|
-
position: "sticky",
|
|
17
|
-
zIndex: 2,
|
|
18
|
-
...(isLastLeft ? { borderRight: `1px solid ${iron[700]}` } : {}),
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
if (isPinned === "right") {
|
|
22
|
-
const prevCell = allCells[cellIndex - 1];
|
|
23
|
-
const isFirstRight = !prevCell || prevCell.column.getIsPinned() !== "right";
|
|
24
|
-
return {
|
|
25
|
-
position: "sticky",
|
|
26
|
-
right: cell.column.getAfter("right"),
|
|
27
|
-
zIndex: 2,
|
|
28
|
-
...(isFirstRight ? { borderLeft: `1px solid ${iron[700]}` } : {}),
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
// no pin style
|
|
32
|
-
return {};
|
|
33
|
-
}, [iron]);
|
|
34
|
-
return getPinStyle;
|
|
35
|
-
};
|
|
36
|
-
exports.useGetPinStyle = useGetPinStyle;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useGetPinningColumns = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const useGetPinningColumns = ({ columns, }) => {
|
|
6
|
-
const initialPinning = (0, react_1.useMemo)(() => {
|
|
7
|
-
const left = [];
|
|
8
|
-
const right = [];
|
|
9
|
-
columns.forEach(({ accessorKey, id, pinned }) => {
|
|
10
|
-
if (pinned === "left") {
|
|
11
|
-
left.push(id ?? accessorKey);
|
|
12
|
-
}
|
|
13
|
-
if (pinned === "right") {
|
|
14
|
-
right.push(id ?? accessorKey);
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
return { left, right };
|
|
18
|
-
}, [columns]);
|
|
19
|
-
const hasPinnedColumns = (0, react_1.useMemo)(() => {
|
|
20
|
-
return columns.some(({ pinned }) => pinned === "left" || pinned === "right");
|
|
21
|
-
}, [columns]);
|
|
22
|
-
return { hasPinnedColumns, initialPinning };
|
|
23
|
-
};
|
|
24
|
-
exports.useGetPinningColumns = useGetPinningColumns;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useGetRowSelection = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const IndeterminateCheckbox_1 = require("../Components/IndeterminateCheckbox");
|
|
7
|
-
const useGetRowSelection = ({ defaultColumn, dynamicRowSelection, rowSelection, }) => {
|
|
8
|
-
// Stable cell renderer
|
|
9
|
-
const renderSelectionCell = (0, react_1.useCallback)((info) => {
|
|
10
|
-
// Check if row is selectable
|
|
11
|
-
const isSelectable = dynamicRowSelection
|
|
12
|
-
? dynamicRowSelection(info.row.original)
|
|
13
|
-
: true;
|
|
14
|
-
if (!isSelectable) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
return ((0, jsx_runtime_1.jsx)(IndeterminateCheckbox_1.IndeterminateCheckbox, { checked: info.row.getIsSelected(), disabled: !info.row.getCanSelect(), indeterminate: info.row.getIsSomeSelected(), onChange: info.row.getToggleSelectedHandler() }));
|
|
18
|
-
}, []);
|
|
19
|
-
// Stable header renderer
|
|
20
|
-
const renderSelectionHeader = (0, react_1.useCallback)((info) => {
|
|
21
|
-
if (!dynamicRowSelection) {
|
|
22
|
-
// Fast path: no dynamic selection
|
|
23
|
-
return ((0, jsx_runtime_1.jsx)(IndeterminateCheckbox_1.IndeterminateCheckbox, { checked: info.table.getIsAllRowsSelected(), indeterminate: info.table.getIsSomeRowsSelected(), onChange: info.table.getToggleAllRowsSelectedHandler() }));
|
|
24
|
-
}
|
|
25
|
-
// Use a simple event handler that doesn't rely on state
|
|
26
|
-
const handleToggleAll = (e) => {
|
|
27
|
-
const { checked } = e.target;
|
|
28
|
-
const rows = info.table.getRowModel().rows;
|
|
29
|
-
// Use table's batch selection for better performance
|
|
30
|
-
info.table.setRowSelection((old) => {
|
|
31
|
-
const newSelection = { ...old };
|
|
32
|
-
// eslint-disable-next-line sonarjs/no-nested-functions
|
|
33
|
-
rows.forEach((row) => {
|
|
34
|
-
if (dynamicRowSelection(row.original)) {
|
|
35
|
-
if (checked) {
|
|
36
|
-
newSelection[row.id] = true;
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
delete newSelection[row.id];
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
return newSelection;
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
// Calculate state only when rendering, not in event handler
|
|
47
|
-
const rows = info.table.getRowModel().rows;
|
|
48
|
-
const rowSelection = info.table.getState().rowSelection;
|
|
49
|
-
let selectableCount = 0;
|
|
50
|
-
let selectedCount = 0;
|
|
51
|
-
for (const row of rows) {
|
|
52
|
-
if (dynamicRowSelection(row.original)) {
|
|
53
|
-
selectableCount++;
|
|
54
|
-
if (rowSelection[row.id]) {
|
|
55
|
-
selectedCount++;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
const allSelected = selectableCount > 0 && selectedCount === selectableCount;
|
|
60
|
-
const someSelected = selectedCount > 0 && selectedCount < selectableCount;
|
|
61
|
-
return ((0, jsx_runtime_1.jsx)(IndeterminateCheckbox_1.IndeterminateCheckbox, { checked: allSelected, indeterminate: someSelected, disabled: selectableCount === 0, onChange: handleToggleAll }));
|
|
62
|
-
}, []);
|
|
63
|
-
const dynamicColumns = (0, react_1.useMemo)(() => {
|
|
64
|
-
return defaultColumn.map((col) => {
|
|
65
|
-
if (col.filterVariant === "smartNumberFilter" && !col.filterFn) {
|
|
66
|
-
return { ...col, filterFn: "includesString" };
|
|
67
|
-
}
|
|
68
|
-
return col;
|
|
69
|
-
});
|
|
70
|
-
}, [defaultColumn]);
|
|
71
|
-
const columns = (0, react_1.useMemo)(() => {
|
|
72
|
-
if (!rowSelection) {
|
|
73
|
-
return dynamicColumns;
|
|
74
|
-
}
|
|
75
|
-
const selectionColumn = {
|
|
76
|
-
cell: renderSelectionCell,
|
|
77
|
-
enableSorting: false,
|
|
78
|
-
header: renderSelectionHeader,
|
|
79
|
-
id: "select",
|
|
80
|
-
maxSize: 30,
|
|
81
|
-
minSize: 30,
|
|
82
|
-
};
|
|
83
|
-
return [selectionColumn, ...dynamicColumns];
|
|
84
|
-
}, [
|
|
85
|
-
dynamicColumns,
|
|
86
|
-
rowSelection,
|
|
87
|
-
renderSelectionCell,
|
|
88
|
-
renderSelectionHeader,
|
|
89
|
-
]);
|
|
90
|
-
return { columns };
|
|
91
|
-
};
|
|
92
|
-
exports.useGetRowSelection = useGetRowSelection;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useGetSortedColumn = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const icons_material_1 = require("@mui/icons-material");
|
|
6
|
-
const react_1 = require("react");
|
|
7
|
-
const sortIcons = {
|
|
8
|
-
asc: (0, jsx_runtime_1.jsx)(icons_material_1.ArrowUpward, { sx: { fontSize: 16 } }),
|
|
9
|
-
desc: (0, jsx_runtime_1.jsx)(icons_material_1.ArrowDownward, { sx: { fontSize: 16 } }),
|
|
10
|
-
};
|
|
11
|
-
const useGetSortedColumn = ({ header, }) => {
|
|
12
|
-
const { getCanSort, getIsSorted, getSortIndex } = header.column;
|
|
13
|
-
const isSortable = getCanSort();
|
|
14
|
-
const sortableIcon = (0, react_1.useMemo)(() => {
|
|
15
|
-
const sortDirection = getIsSorted();
|
|
16
|
-
return sortDirection && sortDirection in sortIcons
|
|
17
|
-
? sortIcons[sortDirection]
|
|
18
|
-
: null;
|
|
19
|
-
}, [getIsSorted()]);
|
|
20
|
-
const mutipleSortCounts = getSortIndex();
|
|
21
|
-
return { isSortable, mutipleSortCounts, sortableIcon };
|
|
22
|
-
};
|
|
23
|
-
exports.useGetSortedColumn = useGetSortedColumn;
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useTableState = void 0;
|
|
4
|
-
const react_table_1 = require("@tanstack/react-table");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const useGetFacetedFilter_1 = require("./useGetFacetedFilter");
|
|
7
|
-
const useGetPinningColumns_1 = require("./useGetPinningColumns");
|
|
8
|
-
const useTableState = (props) => {
|
|
9
|
-
const { columns, data } = props;
|
|
10
|
-
const [sorting, setSorting] = (0, react_1.useState)([]);
|
|
11
|
-
const [grouping, setGrouping] = (0, react_1.useState)(props.defaultGrouping ?? []);
|
|
12
|
-
const { combinedFilter, dateRangeFilter, includesSome, processedColumns } = (0, useGetFacetedFilter_1.useGetFacetedFilter)({
|
|
13
|
-
columns,
|
|
14
|
-
});
|
|
15
|
-
const [expanded, setExpanded] = (0, react_1.useState)(true);
|
|
16
|
-
const [rowSelection, setRowSelection] = (0, react_1.useState)({});
|
|
17
|
-
const { hasPinnedColumns, initialPinning } = (0, useGetPinningColumns_1.useGetPinningColumns)({
|
|
18
|
-
columns,
|
|
19
|
-
});
|
|
20
|
-
const [columnPinning, setColumnPinning] = (0, react_1.useState)(initialPinning);
|
|
21
|
-
const [columnFilters, setColumnFilters] = (0, react_1.useState)([]);
|
|
22
|
-
const [columnOrder, setColumnOrder] = (0, react_1.useState)([]);
|
|
23
|
-
// Wrap setColumnOrder to ensure group column is always first when grouping is active
|
|
24
|
-
const handleColumnOrderChange = (updater) => {
|
|
25
|
-
setColumnOrder((oldOrder) => {
|
|
26
|
-
const newOrder = typeof updater === "function" ? updater(oldOrder) : updater;
|
|
27
|
-
const hasGrouping = grouping.length > 0;
|
|
28
|
-
const groupColumnId = "grouped_by";
|
|
29
|
-
if (hasGrouping && newOrder.includes(groupColumnId)) {
|
|
30
|
-
// Ensure group column is always first
|
|
31
|
-
const orderWithoutGroup = newOrder.filter((id) => id !== groupColumnId);
|
|
32
|
-
return [groupColumnId, ...orderWithoutGroup];
|
|
33
|
-
}
|
|
34
|
-
return newOrder;
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
const { enableExpanding = true, enableGrouping = true, enablePinning = hasPinnedColumns, enableRowSelection = true, enableSorting = true, } = props;
|
|
38
|
-
const table = (0, react_table_1.useReactTable)({
|
|
39
|
-
autoResetExpanded: false,
|
|
40
|
-
columnResizeDirection: "ltr",
|
|
41
|
-
columnResizeMode: "onChange",
|
|
42
|
-
columns: processedColumns,
|
|
43
|
-
data,
|
|
44
|
-
defaultColumn: { maxSize: 500, minSize: 100, size: 150 },
|
|
45
|
-
enableExpanding,
|
|
46
|
-
enableGrouping,
|
|
47
|
-
enablePinning,
|
|
48
|
-
enableRowSelection,
|
|
49
|
-
enableSorting,
|
|
50
|
-
filterFns: {
|
|
51
|
-
combinedFilter,
|
|
52
|
-
dateRangeFilter,
|
|
53
|
-
includesSome,
|
|
54
|
-
},
|
|
55
|
-
getCoreRowModel: (0, react_table_1.getCoreRowModel)(),
|
|
56
|
-
getExpandedRowModel: (0, react_table_1.getExpandedRowModel)(),
|
|
57
|
-
getFacetedMinMaxValues: (0, react_table_1.getFacetedMinMaxValues)(),
|
|
58
|
-
getFacetedRowModel: (0, react_table_1.getFacetedRowModel)(),
|
|
59
|
-
getFacetedUniqueValues: (0, react_table_1.getFacetedUniqueValues)(),
|
|
60
|
-
getFilteredRowModel: (0, react_table_1.getFilteredRowModel)(),
|
|
61
|
-
getGroupedRowModel: (0, react_table_1.getGroupedRowModel)(),
|
|
62
|
-
getSortedRowModel: (0, react_table_1.getSortedRowModel)(),
|
|
63
|
-
onColumnFiltersChange: setColumnFilters,
|
|
64
|
-
onColumnOrderChange: handleColumnOrderChange,
|
|
65
|
-
onColumnPinningChange: setColumnPinning,
|
|
66
|
-
onExpandedChange: setExpanded,
|
|
67
|
-
onGroupingChange: setGrouping,
|
|
68
|
-
onRowSelectionChange: setRowSelection,
|
|
69
|
-
onSortingChange: setSorting,
|
|
70
|
-
state: {
|
|
71
|
-
columnFilters,
|
|
72
|
-
columnOrder,
|
|
73
|
-
columnPinning,
|
|
74
|
-
expanded,
|
|
75
|
-
grouping,
|
|
76
|
-
rowSelection,
|
|
77
|
-
sorting,
|
|
78
|
-
},
|
|
79
|
-
});
|
|
80
|
-
(0, react_1.useEffect)(() => {
|
|
81
|
-
setExpanded(true);
|
|
82
|
-
}, [grouping, data.length]);
|
|
83
|
-
// Fix column order when grouping changes (in case columnOrder was set before grouping)
|
|
84
|
-
(0, react_1.useEffect)(() => {
|
|
85
|
-
const hasGrouping = grouping.length > 0;
|
|
86
|
-
const groupColumnId = "grouped_by";
|
|
87
|
-
if (hasGrouping) {
|
|
88
|
-
const currentOrder = table.getState().columnOrder;
|
|
89
|
-
const allColumns = table.getAllLeafColumns().map((col) => col.id);
|
|
90
|
-
const hasGroupColumn = allColumns.includes(groupColumnId);
|
|
91
|
-
if (hasGroupColumn) {
|
|
92
|
-
// If columnOrder is empty, use natural order but ensure group column is first
|
|
93
|
-
if (!currentOrder.length) {
|
|
94
|
-
const orderWithoutGroup = allColumns.filter((id) => id !== groupColumnId);
|
|
95
|
-
setColumnOrder([groupColumnId, ...orderWithoutGroup]);
|
|
96
|
-
}
|
|
97
|
-
else if (currentOrder.includes(groupColumnId) &&
|
|
98
|
-
currentOrder[0] !== groupColumnId) {
|
|
99
|
-
// If group column exists but not first, move it to first
|
|
100
|
-
const orderWithoutGroup = currentOrder.filter((id) => id !== groupColumnId);
|
|
101
|
-
setColumnOrder([groupColumnId, ...orderWithoutGroup]);
|
|
102
|
-
}
|
|
103
|
-
else if (!currentOrder.includes(groupColumnId)) {
|
|
104
|
-
// If group column doesn't exist in order, add it at first
|
|
105
|
-
setColumnOrder([groupColumnId, ...currentOrder]);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}, [grouping, table]);
|
|
110
|
-
return { table };
|
|
111
|
-
};
|
|
112
|
-
exports.useTableState = useTableState;
|
|
@@ -1,20 +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("./SmartGrid"), exports);
|
|
18
|
-
__exportStar(require("./types/index"), exports);
|
|
19
|
-
__exportStar(require("./hooks/useExportToExcel"), exports);
|
|
20
|
-
__exportStar(require("./Components"), exports);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isFullISODate = exports.formatDateValue = void 0;
|
|
4
|
-
const luxon_1 = require("luxon");
|
|
5
|
-
const formatDateValue = (value) => {
|
|
6
|
-
const date = luxon_1.DateTime.fromISO(value);
|
|
7
|
-
// Check if the string is a valid ISO date
|
|
8
|
-
if (date.isValid) {
|
|
9
|
-
return date.toFormat("dd-MM-yyyy"); // Example: "15-11-2025"
|
|
10
|
-
}
|
|
11
|
-
return value; // Return original value if not a valid date
|
|
12
|
-
};
|
|
13
|
-
exports.formatDateValue = formatDateValue;
|
|
14
|
-
const isFullISODate = (value) => /^\d{4}-\d{2}-\d{2}/.test(value);
|
|
15
|
-
exports.isFullISODate = isFullISODate;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.calculationHelpers = void 0;
|
|
4
|
-
exports.calculateDynamicSummary = calculateDynamicSummary;
|
|
5
|
-
function calculateDynamicSummary(rows, configs) {
|
|
6
|
-
const result = {};
|
|
7
|
-
const leafRows = rows.flatMap((row) => {
|
|
8
|
-
const { getIsGrouped, subRows } = row;
|
|
9
|
-
if (getIsGrouped()) {
|
|
10
|
-
return subRows.flatMap((subRow) => {
|
|
11
|
-
if (subRow.getIsGrouped()) {
|
|
12
|
-
return subRow.subRows;
|
|
13
|
-
}
|
|
14
|
-
return [subRow];
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
return [row];
|
|
18
|
-
});
|
|
19
|
-
const data = leafRows.map((row) => row.original);
|
|
20
|
-
configs.forEach((config) => {
|
|
21
|
-
const calculatedValue = config.calculation(data);
|
|
22
|
-
const formattedValue = typeof calculatedValue === "number" && config.formatter
|
|
23
|
-
? config.formatter(calculatedValue)
|
|
24
|
-
: calculatedValue;
|
|
25
|
-
// Type assertion: ensure field key matches Path<T> for typed access
|
|
26
|
-
result[config.field] = {
|
|
27
|
-
value: formattedValue,
|
|
28
|
-
};
|
|
29
|
-
});
|
|
30
|
-
return result;
|
|
31
|
-
}
|
|
32
|
-
exports.calculationHelpers = {
|
|
33
|
-
average: (field) => (data) => {
|
|
34
|
-
if (data.length === 0) {
|
|
35
|
-
return 0;
|
|
36
|
-
}
|
|
37
|
-
const sum = data.reduce((sum, item) => {
|
|
38
|
-
const value = item[field];
|
|
39
|
-
return sum + (typeof value === "number" ? value : 0);
|
|
40
|
-
}, 0);
|
|
41
|
-
return sum / data.length;
|
|
42
|
-
},
|
|
43
|
-
count: () => (data) => {
|
|
44
|
-
return data.length;
|
|
45
|
-
},
|
|
46
|
-
multiplyAndSum: (field, multiplier) => (data) => {
|
|
47
|
-
return data.reduce((sum, item) => {
|
|
48
|
-
const value = item[field];
|
|
49
|
-
return sum + (typeof value === "number" ? value * multiplier : 0);
|
|
50
|
-
}, 0);
|
|
51
|
-
},
|
|
52
|
-
sum: (field) => (data) => {
|
|
53
|
-
return data.reduce((sum, item) => {
|
|
54
|
-
const value = item[field];
|
|
55
|
-
return sum + (typeof value === "number" ? value : 0);
|
|
56
|
-
}, 0);
|
|
57
|
-
},
|
|
58
|
-
};
|