iguazio.dashboard-react-controls 3.2.20 → 3.2.22
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/dist/components/ActionsMenu/ActionsMenu.d.ts +17 -10
- package/dist/components/ActionsMenu/ActionsMenu.d.ts.map +1 -1
- package/dist/components/Backdrop/Backdrop.d.ts +8 -7
- package/dist/components/Backdrop/Backdrop.d.ts.map +1 -1
- package/dist/components/BlockerSpy/BlockerSpy.d.ts +4 -3
- package/dist/components/BlockerSpy/BlockerSpy.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts +16 -15
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.stories.d.ts +69 -7
- package/dist/components/Button/Button.stories.d.ts.map +1 -1
- package/dist/components/ChipForm/ChipForm.d.ts +20 -12
- package/dist/components/ChipForm/ChipForm.d.ts.map +1 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts +21 -20
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.stories.d.ts +22 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.stories.d.ts.map +1 -1
- package/dist/components/CopyToClipboard/CopyToClipboard.d.ts +11 -10
- package/dist/components/CopyToClipboard/CopyToClipboard.d.ts.map +1 -1
- package/dist/components/ErrorMessage/ErrorMessage.d.ts +5 -4
- package/dist/components/ErrorMessage/ErrorMessage.d.ts.map +1 -1
- package/dist/components/FormCheckBox/FormCheckBox.d.ts +13 -12
- package/dist/components/FormCheckBox/FormCheckBox.d.ts.map +1 -1
- package/dist/components/FormCheckBox/FormCheckbox.stories.d.ts +8 -1
- package/dist/components/FormCheckBox/FormCheckbox.stories.d.ts.map +1 -1
- package/dist/components/FormChipCell/FormChip/FormChip.d.ts +24 -23
- package/dist/components/FormChipCell/FormChip/FormChip.d.ts.map +1 -1
- package/dist/components/FormChipCell/FormChipCell.d.ts +30 -29
- package/dist/components/FormChipCell/FormChipCell.d.ts.map +1 -1
- package/dist/components/FormChipCell/FormChipCellView.d.ts +29 -28
- package/dist/components/FormChipCell/FormChipCellView.d.ts.map +1 -1
- package/dist/components/FormChipCell/HiddenChipsBlock/HiddenChipsBlock.d.ts +16 -7
- package/dist/components/FormChipCell/HiddenChipsBlock/HiddenChipsBlock.d.ts.map +1 -1
- package/dist/components/FormChipCell/NewChipForm/NewChipForm.d.ts +26 -18
- package/dist/components/FormChipCell/NewChipForm/NewChipForm.d.ts.map +1 -1
- package/dist/components/FormChipCell/NewChipInput/NewChipInput.d.ts +5 -4
- package/dist/components/FormChipCell/NewChipInput/NewChipInput.d.ts.map +1 -1
- package/dist/components/FormCombobox/FormCombobox.d.ts +44 -39
- package/dist/components/FormCombobox/FormCombobox.d.ts.map +1 -1
- package/dist/components/FormCombobox/FormCombobox.stories.d.ts +58 -6
- package/dist/components/FormCombobox/FormCombobox.stories.d.ts.map +1 -1
- package/dist/components/FormInput/FormInput.d.ts +77 -1
- package/dist/components/FormInput/FormInput.d.ts.map +1 -1
- package/dist/components/FormInput/FormInput.stories.d.ts +86 -8
- package/dist/components/FormInput/FormInput.stories.d.ts.map +1 -1
- package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.d.ts +12 -11
- package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.d.ts.map +1 -1
- package/dist/components/FormKeyValueTable/FormKeyValueTable.d.ts +41 -37
- package/dist/components/FormKeyValueTable/FormKeyValueTable.d.ts.map +1 -1
- package/dist/components/FormOnChange/FormOnChange.d.ts +4 -3
- package/dist/components/FormOnChange/FormOnChange.d.ts.map +1 -1
- package/dist/components/FormRadio/FormRadio.d.ts +10 -9
- package/dist/components/FormRadio/FormRadio.d.ts.map +1 -1
- package/dist/components/FormRadio/FormRadio.stories.d.ts +8 -1
- package/dist/components/FormRadio/FormRadio.stories.d.ts.map +1 -1
- package/dist/components/FormSelect/FormSelect.d.ts +44 -34
- package/dist/components/FormSelect/FormSelect.d.ts.map +1 -1
- package/dist/components/FormSelect/FormSelect.stories.d.ts +36 -4
- package/dist/components/FormSelect/FormSelect.stories.d.ts.map +1 -1
- package/dist/components/FormTextarea/FormTextarea.d.ts +31 -30
- package/dist/components/FormTextarea/FormTextarea.d.ts.map +1 -1
- package/dist/components/FormTextarea/FormTextarea.stories.d.ts +26 -3
- package/dist/components/FormTextarea/FormTextarea.stories.d.ts.map +1 -1
- package/dist/components/FormToggle/FormToggle.d.ts +14 -13
- package/dist/components/FormToggle/FormToggle.d.ts.map +1 -1
- package/dist/components/LoadButton/LoadButton.d.ts +8 -7
- package/dist/components/LoadButton/LoadButton.d.ts.map +1 -1
- package/dist/components/LoadButton/LoadButton.stories.d.ts +29 -3
- package/dist/components/LoadButton/LoadButton.stories.d.ts.map +1 -1
- package/dist/components/Loader/Loader.d.ts +14 -1
- package/dist/components/Loader/Loader.d.ts.map +1 -1
- package/dist/components/Loader/LoaderForSuspenseFallback.d.ts +2 -1
- package/dist/components/Loader/LoaderForSuspenseFallback.d.ts.map +1 -1
- package/dist/components/Modal/Modal.d.ts +19 -18
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/PopUpDialog/PopUpDialog.d.ts +22 -20
- package/dist/components/PopUpDialog/PopUpDialog.d.ts.map +1 -1
- package/dist/components/ReadOnlyChips/ReadOnlyChips.d.ts +5 -4
- package/dist/components/ReadOnlyChips/ReadOnlyChips.d.ts.map +1 -1
- package/dist/components/RoundedIcon/RoundedIcon.d.ts +15 -14
- package/dist/components/RoundedIcon/RoundedIcon.d.ts.map +1 -1
- package/dist/components/RoundedIcon/RoundedIcon.stories.d.ts +13 -2
- package/dist/components/RoundedIcon/RoundedIcon.stories.d.ts.map +1 -1
- package/dist/components/TableCell/TableCell.d.ts +20 -19
- package/dist/components/TableCell/TableCell.d.ts.map +1 -1
- package/dist/components/TabsSlider/TabsSlider.d.ts +18 -12
- package/dist/components/TabsSlider/TabsSlider.d.ts.map +1 -1
- package/dist/components/Tip/Tip.d.ts +7 -6
- package/dist/components/Tip/Tip.d.ts.map +1 -1
- package/dist/components/Tip/Tip.stories.d.ts +6 -1
- package/dist/components/Tip/Tip.stories.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +17 -16
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.stories.d.ts +16 -2
- package/dist/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/dist/components/TooltipTemplate/ProducerTooltipTemplate.d.ts +6 -5
- package/dist/components/TooltipTemplate/ProducerTooltipTemplate.d.ts.map +1 -1
- package/dist/components/TooltipTemplate/TextTooltipTemplate.d.ts +6 -5
- package/dist/components/TooltipTemplate/TextTooltipTemplate.d.ts.map +1 -1
- package/dist/components/Wizard/Wizard.d.ts +16 -15
- package/dist/components/Wizard/Wizard.d.ts.map +1 -1
- package/dist/components/Wizard/WizardSteps/WizardSteps.d.ts +13 -6
- package/dist/components/Wizard/WizardSteps/WizardSteps.d.ts.map +1 -1
- package/dist/elements/ActionsMenuItem/ActionsMenuItem.d.ts +7 -6
- package/dist/elements/ActionsMenuItem/ActionsMenuItem.d.ts.map +1 -1
- package/dist/elements/FormActionButton/FormActionButton.d.ts +13 -12
- package/dist/elements/FormActionButton/FormActionButton.d.ts.map +1 -1
- package/dist/elements/FormRowActions/FormRowActions.d.ts +14 -13
- package/dist/elements/FormRowActions/FormRowActions.d.ts.map +1 -1
- package/dist/elements/OptionsMenu/OptionsMenu.d.ts +7 -6
- package/dist/elements/OptionsMenu/OptionsMenu.d.ts.map +1 -1
- package/dist/elements/SelectOption/SelectOption.d.ts +20 -10
- package/dist/elements/SelectOption/SelectOption.d.ts.map +1 -1
- package/dist/elements/TableHead/TableHead.d.ts +8 -7
- package/dist/elements/TableHead/TableHead.d.ts.map +1 -1
- package/dist/elements/TableLinkCell/TableLinkCell.d.ts +15 -14
- package/dist/elements/TableLinkCell/TableLinkCell.d.ts.map +1 -1
- package/dist/elements/TableTypeCell/TableTypeCell.d.ts +5 -4
- package/dist/elements/TableTypeCell/TableTypeCell.d.ts.map +1 -1
- package/dist/elements/ValidationTemplate/ValidationTemplate.d.ts +4 -3
- package/dist/elements/ValidationTemplate/ValidationTemplate.d.ts.map +1 -1
- package/dist/hooks/useDetails.hook.d.ts +35 -29
- package/dist/hooks/useDetails.hook.d.ts.map +1 -1
- package/dist/hooks/useDetailsHeader.hook.d.ts +59 -44
- package/dist/hooks/useDetailsHeader.hook.d.ts.map +1 -1
- package/dist/hooks/useFormTable.hook.d.ts +5 -5
- package/dist/hooks/useTable.hook.d.ts +42 -32
- package/dist/hooks/useTable.hook.d.ts.map +1 -1
- package/dist/images/activeFilter.svg +6 -0
- package/dist/images/activeFilter.svg.mjs +6 -0
- package/dist/images/activeFilter.svg.mjs.map +1 -0
- package/dist/images/calendar-chevron.svg +3 -0
- package/dist/images/calendar-chevron.svg.mjs +6 -0
- package/dist/images/calendar-chevron.svg.mjs.map +1 -0
- package/dist/images/check.svg +3 -0
- package/dist/images/check.svg.mjs +6 -0
- package/dist/images/check.svg.mjs.map +1 -0
- package/dist/images/clock.svg.mjs +6 -0
- package/dist/images/clock.svg.mjs.map +1 -0
- package/dist/images/double-check.svg +3 -0
- package/dist/images/filter-2.svg +5 -0
- package/dist/images/filter-2.svg.mjs +6 -0
- package/dist/images/filter-2.svg.mjs.map +1 -0
- package/dist/images/refresh-2.svg +3 -0
- package/dist/images/refresh-2.svg.mjs +6 -0
- package/dist/images/refresh-2.svg.mjs.map +1 -0
- package/dist/images/search2-icon.svg +3 -0
- package/dist/images/select.svg +3 -0
- package/dist/images/select.svg.mjs +6 -0
- package/dist/images/select.svg.mjs.map +1 -0
- package/dist/images/sort-arrow.svg +3 -0
- package/dist/images/sort-arrow.svg.mjs +6 -0
- package/dist/images/sort-arrow.svg.mjs.map +1 -0
- package/dist/nextGenComponents/components/CustomRangePicker/CustomRangePicker.d.ts +10 -0
- package/dist/nextGenComponents/components/CustomRangePicker/CustomRangePicker.d.ts.map +1 -0
- package/dist/nextGenComponents/components/CustomRangePicker/CustomRangePicker.mjs +103 -0
- package/dist/nextGenComponents/components/CustomRangePicker/CustomRangePicker.mjs.map +1 -0
- package/dist/nextGenComponents/components/CustomRangePicker/DateTimePickerPanel.d.ts +14 -0
- package/dist/nextGenComponents/components/CustomRangePicker/DateTimePickerPanel.d.ts.map +1 -0
- package/dist/nextGenComponents/components/CustomRangePicker/DateTimePickerPanel.mjs +115 -0
- package/dist/nextGenComponents/components/CustomRangePicker/DateTimePickerPanel.mjs.map +1 -0
- package/dist/nextGenComponents/components/CustomRangePicker/MaskedInput.d.ts +14 -0
- package/dist/nextGenComponents/components/CustomRangePicker/MaskedInput.d.ts.map +1 -0
- package/dist/nextGenComponents/components/CustomRangePicker/MaskedInput.mjs +109 -0
- package/dist/nextGenComponents/components/CustomRangePicker/MaskedInput.mjs.map +1 -0
- package/dist/nextGenComponents/components/CustomRangePicker/TimePickerInput.d.ts +8 -0
- package/dist/nextGenComponents/components/CustomRangePicker/TimePickerInput.d.ts.map +1 -0
- package/dist/nextGenComponents/components/CustomRangePicker/TimePickerInput.mjs +109 -0
- package/dist/nextGenComponents/components/CustomRangePicker/TimePickerInput.mjs.map +1 -0
- package/dist/nextGenComponents/components/CustomRangePicker/index.d.ts +2 -0
- package/dist/nextGenComponents/components/CustomRangePicker/index.d.ts.map +1 -0
- package/dist/nextGenComponents/components/CustomRangePicker/index.mjs +5 -0
- package/dist/nextGenComponents/components/CustomRangePicker/index.mjs.map +1 -0
- package/dist/nextGenComponents/components/DataTable/DataTable.d.ts +29 -0
- package/dist/nextGenComponents/components/DataTable/DataTable.d.ts.map +1 -0
- package/dist/nextGenComponents/components/DataTable/DataTable.mjs +223 -0
- package/dist/nextGenComponents/components/DataTable/DataTable.mjs.map +1 -0
- package/dist/nextGenComponents/components/DataTable/DataTable.utils.d.ts +11 -0
- package/dist/nextGenComponents/components/DataTable/DataTable.utils.d.ts.map +1 -0
- package/dist/nextGenComponents/components/DataTable/DataTable.utils.mjs +17 -0
- package/dist/nextGenComponents/components/DataTable/DataTable.utils.mjs.map +1 -0
- package/dist/nextGenComponents/components/DataTable/checkboxColumn.d.ts +4 -0
- package/dist/nextGenComponents/components/DataTable/checkboxColumn.d.ts.map +1 -0
- package/dist/nextGenComponents/components/DataTable/checkboxColumn.mjs +30 -0
- package/dist/nextGenComponents/components/DataTable/checkboxColumn.mjs.map +1 -0
- package/dist/nextGenComponents/components/DataTable/index.d.ts +2 -0
- package/dist/nextGenComponents/components/DataTable/index.d.ts.map +1 -0
- package/dist/nextGenComponents/components/DataTable/index.mjs +5 -0
- package/dist/nextGenComponents/components/DataTable/index.mjs.map +1 -0
- package/dist/nextGenComponents/components/DetailsPanel/DetailsPanel.d.ts +11 -0
- package/dist/nextGenComponents/components/DetailsPanel/DetailsPanel.d.ts.map +1 -0
- package/dist/nextGenComponents/components/DetailsPanel/DetailsPanel.mjs +53 -0
- package/dist/nextGenComponents/components/DetailsPanel/DetailsPanel.mjs.map +1 -0
- package/dist/nextGenComponents/components/DetailsPanel/index.d.ts +2 -0
- package/dist/nextGenComponents/components/DetailsPanel/index.d.ts.map +1 -0
- package/dist/nextGenComponents/components/DetailsPanel/index.mjs +5 -0
- package/dist/nextGenComponents/components/DetailsPanel/index.mjs.map +1 -0
- package/dist/nextGenComponents/components/EllipsisTooltip/EllipsisTooltip.d.ts +8 -0
- package/dist/nextGenComponents/components/EllipsisTooltip/EllipsisTooltip.d.ts.map +1 -0
- package/dist/nextGenComponents/components/EllipsisTooltip/EllipsisTooltip.mjs +20 -0
- package/dist/nextGenComponents/components/EllipsisTooltip/EllipsisTooltip.mjs.map +1 -0
- package/dist/nextGenComponents/components/EllipsisTooltip/index.d.ts +2 -0
- package/dist/nextGenComponents/components/EllipsisTooltip/index.d.ts.map +1 -0
- package/dist/nextGenComponents/components/EllipsisTooltip/index.mjs +5 -0
- package/dist/nextGenComponents/components/EllipsisTooltip/index.mjs.map +1 -0
- package/dist/nextGenComponents/components/FilterPopover/FilterPopover.d.ts +10 -0
- package/dist/nextGenComponents/components/FilterPopover/FilterPopover.d.ts.map +1 -0
- package/dist/nextGenComponents/components/FilterPopover/FilterPopover.mjs +157 -0
- package/dist/nextGenComponents/components/FilterPopover/FilterPopover.mjs.map +1 -0
- package/dist/nextGenComponents/components/FilterPopover/index.d.ts +2 -0
- package/dist/nextGenComponents/components/FilterPopover/index.d.ts.map +1 -0
- package/dist/nextGenComponents/components/FilterPopover/index.mjs +5 -0
- package/dist/nextGenComponents/components/FilterPopover/index.mjs.map +1 -0
- package/dist/nextGenComponents/components/Loader/Loader.d.ts +16 -0
- package/dist/nextGenComponents/components/Loader/Loader.d.ts.map +1 -0
- package/dist/nextGenComponents/components/Loader/Loader.mjs +62 -0
- package/dist/nextGenComponents/components/Loader/Loader.mjs.map +1 -0
- package/dist/nextGenComponents/components/Loader/index.d.ts +3 -0
- package/dist/nextGenComponents/components/Loader/index.d.ts.map +1 -0
- package/dist/nextGenComponents/components/Loader/index.mjs +5 -0
- package/dist/nextGenComponents/components/Loader/index.mjs.map +1 -0
- package/dist/nextGenComponents/components/MultiSelectField/MultiSelectField.d.ts +15 -0
- package/dist/nextGenComponents/components/MultiSelectField/MultiSelectField.d.ts.map +1 -0
- package/dist/nextGenComponents/components/MultiSelectField/MultiSelectField.mjs +113 -0
- package/dist/nextGenComponents/components/MultiSelectField/MultiSelectField.mjs.map +1 -0
- package/dist/nextGenComponents/components/MultiSelectField/index.d.ts +3 -0
- package/dist/nextGenComponents/components/MultiSelectField/index.d.ts.map +1 -0
- package/dist/nextGenComponents/components/MultiSelectField/index.mjs +6 -0
- package/dist/nextGenComponents/components/MultiSelectField/index.mjs.map +1 -0
- package/dist/nextGenComponents/components/PaginationControls/PaginationControls.d.ts +17 -0
- package/dist/nextGenComponents/components/PaginationControls/PaginationControls.d.ts.map +1 -0
- package/dist/nextGenComponents/components/PaginationControls/PaginationControls.mjs +106 -0
- package/dist/nextGenComponents/components/PaginationControls/PaginationControls.mjs.map +1 -0
- package/dist/nextGenComponents/components/PaginationControls/index.d.ts +3 -0
- package/dist/nextGenComponents/components/PaginationControls/index.d.ts.map +1 -0
- package/dist/nextGenComponents/components/PaginationControls/index.mjs +5 -0
- package/dist/nextGenComponents/components/PaginationControls/index.mjs.map +1 -0
- package/dist/nextGenComponents/components/RefreshButton/RefreshButton.d.ts +5 -0
- package/dist/nextGenComponents/components/RefreshButton/RefreshButton.d.ts.map +1 -0
- package/dist/nextGenComponents/components/RefreshButton/RefreshButton.mjs +20 -0
- package/dist/nextGenComponents/components/RefreshButton/RefreshButton.mjs.map +1 -0
- package/dist/nextGenComponents/components/RefreshButton/index.d.ts +2 -0
- package/dist/nextGenComponents/components/RefreshButton/index.d.ts.map +1 -0
- package/dist/nextGenComponents/components/RefreshButton/index.mjs +5 -0
- package/dist/nextGenComponents/components/RefreshButton/index.mjs.map +1 -0
- package/dist/nextGenComponents/components/RowActions/ActionMenu/ActionMenu.d.ts +8 -0
- package/dist/nextGenComponents/components/RowActions/ActionMenu/ActionMenu.d.ts.map +1 -0
- package/dist/nextGenComponents/components/RowActions/ActionMenu/ActionMenu.mjs +58 -0
- package/dist/nextGenComponents/components/RowActions/ActionMenu/ActionMenu.mjs.map +1 -0
- package/dist/nextGenComponents/components/RowActions/RowActions.d.ts +8 -0
- package/dist/nextGenComponents/components/RowActions/RowActions.d.ts.map +1 -0
- package/dist/nextGenComponents/components/RowActions/RowActions.mjs +19 -0
- package/dist/nextGenComponents/components/RowActions/RowActions.mjs.map +1 -0
- package/dist/nextGenComponents/components/RowActions/SingleActionButton/SingleActionButton.d.ts +9 -0
- package/dist/nextGenComponents/components/RowActions/SingleActionButton/SingleActionButton.d.ts.map +1 -0
- package/dist/nextGenComponents/components/RowActions/SingleActionButton/SingleActionButton.mjs +27 -0
- package/dist/nextGenComponents/components/RowActions/SingleActionButton/SingleActionButton.mjs.map +1 -0
- package/dist/nextGenComponents/components/RowActions/index.d.ts +5 -0
- package/dist/nextGenComponents/components/RowActions/index.d.ts.map +1 -0
- package/dist/nextGenComponents/components/RowActions/index.mjs +9 -0
- package/dist/nextGenComponents/components/RowActions/index.mjs.map +1 -0
- package/dist/nextGenComponents/components/StatsCard/StatsCard.d.ts +47 -0
- package/dist/nextGenComponents/components/StatsCard/StatsCard.d.ts.map +1 -0
- package/dist/nextGenComponents/components/StatsCard/StatsCard.mjs +75 -0
- package/dist/nextGenComponents/components/StatsCard/StatsCard.mjs.map +1 -0
- package/dist/nextGenComponents/components/StatsCard/index.d.ts +2 -0
- package/dist/nextGenComponents/components/StatsCard/index.d.ts.map +1 -0
- package/dist/nextGenComponents/components/StatsCard/index.mjs +5 -0
- package/dist/nextGenComponents/components/StatsCard/index.mjs.map +1 -0
- package/dist/nextGenComponents/components/TimeFilterDropdown/TimeFilterDropdown.d.ts +4 -0
- package/dist/nextGenComponents/components/TimeFilterDropdown/TimeFilterDropdown.d.ts.map +1 -0
- package/dist/nextGenComponents/components/TimeFilterDropdown/TimeFilterDropdown.mjs +106 -0
- package/dist/nextGenComponents/components/TimeFilterDropdown/TimeFilterDropdown.mjs.map +1 -0
- package/dist/nextGenComponents/components/TimeFilterDropdown/index.d.ts +2 -0
- package/dist/nextGenComponents/components/TimeFilterDropdown/index.d.ts.map +1 -0
- package/dist/nextGenComponents/components/TimeFilterDropdown/index.mjs +5 -0
- package/dist/nextGenComponents/components/TimeFilterDropdown/index.mjs.map +1 -0
- package/dist/nextGenComponents/components/index.d.ts +32 -0
- package/dist/nextGenComponents/components/index.d.ts.map +1 -0
- package/dist/nextGenComponents/components/index.mjs +83 -0
- package/dist/nextGenComponents/components/index.mjs.map +1 -0
- package/dist/nextGenComponents/components/ui/button.d.ts +14 -0
- package/dist/nextGenComponents/components/ui/button.d.ts.map +1 -0
- package/dist/nextGenComponents/components/ui/button.mjs +56 -0
- package/dist/nextGenComponents/components/ui/button.mjs.map +1 -0
- package/dist/nextGenComponents/components/ui/calendar.d.ts +29 -0
- package/dist/nextGenComponents/components/ui/calendar.d.ts.map +1 -0
- package/dist/nextGenComponents/components/ui/calendar.mjs +157 -0
- package/dist/nextGenComponents/components/ui/calendar.mjs.map +1 -0
- package/dist/nextGenComponents/components/ui/card.d.ts +9 -0
- package/dist/nextGenComponents/components/ui/card.d.ts.map +1 -0
- package/dist/nextGenComponents/components/ui/card.mjs +50 -0
- package/dist/nextGenComponents/components/ui/card.mjs.map +1 -0
- package/dist/nextGenComponents/components/ui/checkbox.d.ts +8 -0
- package/dist/nextGenComponents/components/ui/checkbox.d.ts.map +1 -0
- package/dist/nextGenComponents/components/ui/checkbox.mjs +33 -0
- package/dist/nextGenComponents/components/ui/checkbox.mjs.map +1 -0
- package/dist/nextGenComponents/components/ui/dropdown-menu.d.ts +28 -0
- package/dist/nextGenComponents/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/nextGenComponents/components/ui/dropdown-menu.mjs +131 -0
- package/dist/nextGenComponents/components/ui/dropdown-menu.mjs.map +1 -0
- package/dist/nextGenComponents/components/ui/input.d.ts +4 -0
- package/dist/nextGenComponents/components/ui/input.d.ts.map +1 -0
- package/dist/nextGenComponents/components/ui/input.mjs +33 -0
- package/dist/nextGenComponents/components/ui/input.mjs.map +1 -0
- package/dist/nextGenComponents/components/ui/pagination.d.ts +25 -0
- package/dist/nextGenComponents/components/ui/pagination.d.ts.map +1 -0
- package/dist/nextGenComponents/components/ui/pagination.mjs +93 -0
- package/dist/nextGenComponents/components/ui/pagination.mjs.map +1 -0
- package/dist/nextGenComponents/components/ui/popover.d.ts +7 -0
- package/dist/nextGenComponents/components/ui/popover.d.ts.map +1 -0
- package/dist/nextGenComponents/components/ui/popover.mjs +24 -0
- package/dist/nextGenComponents/components/ui/popover.mjs.map +1 -0
- package/dist/nextGenComponents/components/ui/scroll-area.d.ts +6 -0
- package/dist/nextGenComponents/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/nextGenComponents/components/ui/scroll-area.mjs +39 -0
- package/dist/nextGenComponents/components/ui/scroll-area.mjs.map +1 -0
- package/dist/nextGenComponents/components/ui/select.d.ts +14 -0
- package/dist/nextGenComponents/components/ui/select.d.ts.map +1 -0
- package/dist/nextGenComponents/components/ui/select.mjs +117 -0
- package/dist/nextGenComponents/components/ui/select.mjs.map +1 -0
- package/dist/nextGenComponents/components/ui/separator.d.ts +5 -0
- package/dist/nextGenComponents/components/ui/separator.d.ts.map +1 -0
- package/dist/nextGenComponents/components/ui/separator.mjs +25 -0
- package/dist/nextGenComponents/components/ui/separator.mjs.map +1 -0
- package/dist/nextGenComponents/components/ui/tabs.d.ts +8 -0
- package/dist/nextGenComponents/components/ui/tabs.d.ts.map +1 -0
- package/dist/nextGenComponents/components/ui/tabs.mjs +56 -0
- package/dist/nextGenComponents/components/ui/tabs.mjs.map +1 -0
- package/dist/nextGenComponents/components/ui/tooltip.d.ts +8 -0
- package/dist/nextGenComponents/components/ui/tooltip.d.ts.map +1 -0
- package/dist/nextGenComponents/components/ui/tooltip.mjs +24 -0
- package/dist/nextGenComponents/components/ui/tooltip.mjs.map +1 -0
- package/dist/nextGenComponents/constants/index.d.ts +41 -0
- package/dist/nextGenComponents/constants/index.d.ts.map +1 -0
- package/dist/nextGenComponents/constants/index.mjs +49 -0
- package/dist/nextGenComponents/constants/index.mjs.map +1 -0
- package/dist/nextGenComponents/hooks/useClickOutside.d.ts +3 -0
- package/dist/nextGenComponents/hooks/useClickOutside.d.ts.map +1 -0
- package/dist/nextGenComponents/hooks/useClickOutside.mjs +22 -0
- package/dist/nextGenComponents/hooks/useClickOutside.mjs.map +1 -0
- package/dist/nextGenComponents/index.d.ts +4 -0
- package/dist/nextGenComponents/index.d.ts.map +1 -0
- package/dist/nextGenComponents/index.mjs +103 -0
- package/dist/nextGenComponents/index.mjs.map +1 -0
- package/dist/nextGenComponents/lib/utils.d.ts +3 -0
- package/dist/nextGenComponents/lib/utils.d.ts.map +1 -0
- package/dist/nextGenComponents/lib/utils.mjs +7 -0
- package/dist/nextGenComponents/lib/utils.mjs.map +1 -0
- package/dist/nextGenComponents/stores/tableStore.d.ts +22 -0
- package/dist/nextGenComponents/stores/tableStore.d.ts.map +1 -0
- package/dist/nextGenComponents/stores/tableStore.mjs +36 -0
- package/dist/nextGenComponents/stores/tableStore.mjs.map +1 -0
- package/dist/nextGenComponents/types/table/filter.d.ts +21 -0
- package/dist/nextGenComponents/types/table/filter.d.ts.map +1 -0
- package/dist/nextGenComponents/types/table/rowAction.d.ts +13 -0
- package/dist/nextGenComponents/types/table/rowAction.d.ts.map +1 -0
- package/dist/nextGenComponents/types/table/timeFilter.d.ts +23 -0
- package/dist/nextGenComponents/types/table/timeFilter.d.ts.map +1 -0
- package/dist/nextGenComponents/utils/date.utils.d.ts +24 -0
- package/dist/nextGenComponents/utils/date.utils.d.ts.map +1 -0
- package/dist/nextGenComponents/utils/date.utils.mjs +79 -0
- package/dist/nextGenComponents/utils/date.utils.mjs.map +1 -0
- package/dist/nextGenComponents/utils/tableFilters.utils.d.ts +7 -0
- package/dist/nextGenComponents/utils/tableFilters.utils.d.ts.map +1 -0
- package/dist/nextGenComponents/utils/tableFilters.utils.mjs +7 -0
- package/dist/nextGenComponents/utils/tableFilters.utils.mjs.map +1 -0
- package/dist/reducers/notificationReducer.d.ts +1 -1
- package/dist/scss/common.scss +3 -0
- package/dist/scss/details.scss +4 -0
- package/dist/types.d.ts +148 -31
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/chips.util.d.ts +2 -2
- package/dist/utils/chips.util.d.ts.map +1 -1
- package/dist/utils/chips.util.mjs +27 -9
- package/dist/utils/chips.util.mjs.map +1 -1
- package/dist/utils/common.util.d.ts +1 -1
- package/dist/utils/common.util.d.ts.map +1 -1
- package/dist/utils/datetime.util.d.ts +3 -3
- package/dist/utils/datetime.util.d.ts.map +1 -1
- package/dist/utils/generateChipsList.util.d.ts +1 -1
- package/dist/utils/notification.util.d.ts +1 -1
- package/dist/utils/notification.util.d.ts.map +1 -1
- package/dist/utils/proxyServerConfig.util.d.ts +4 -4
- package/package.json +40 -11
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as N } from "react";
|
|
3
|
+
import k from "../../../images/activeFilter.svg.mjs";
|
|
4
|
+
import C from "../../../images/filter-2.svg.mjs";
|
|
5
|
+
import { Button as p } from "../ui/button.mjs";
|
|
6
|
+
import { Input as T } from "../ui/input.mjs";
|
|
7
|
+
import { Popover as w, PopoverTrigger as P, PopoverContent as S } from "../ui/popover.mjs";
|
|
8
|
+
import { ScrollArea as y } from "../ui/scroll-area.mjs";
|
|
9
|
+
import { Select as O, SelectTrigger as E, SelectValue as I, SelectContent as L, SelectItem as _ } from "../ui/select.mjs";
|
|
10
|
+
import { FILTER_POPOVER_DEFAULT_TITLE as $, FILTER_BUTTON_CLEAR as R, FILTER_BUTTON_APPLY as j } from "../../constants/index.mjs";
|
|
11
|
+
import { useTableStore as D } from "../../stores/tableStore.mjs";
|
|
12
|
+
import { hasActiveFilters as V, buildInitialFromSchema as z, objectValues as A } from "../../utils/tableFilters.utils.mjs";
|
|
13
|
+
import "../MultiSelectField/index.mjs";
|
|
14
|
+
import B from "../MultiSelectField/MultiSelectField.mjs";
|
|
15
|
+
const te = ({
|
|
16
|
+
schema: l,
|
|
17
|
+
title: m = $,
|
|
18
|
+
onApply: s,
|
|
19
|
+
onClear: i
|
|
20
|
+
}) => {
|
|
21
|
+
const { filterPopoverOpen: u, setFilterPopoverOpen: d, filterDraft: h, setFilterDraft: c, resetFilterDraft: v } = D(), x = N(() => V(l), [l]), f = (e) => {
|
|
22
|
+
if (e) {
|
|
23
|
+
const o = z(l);
|
|
24
|
+
v(o);
|
|
25
|
+
}
|
|
26
|
+
d(e);
|
|
27
|
+
}, b = () => {
|
|
28
|
+
v({}), i == null || i(), d(!1);
|
|
29
|
+
}, g = () => {
|
|
30
|
+
s == null || s(h), d(!1);
|
|
31
|
+
};
|
|
32
|
+
return /* @__PURE__ */ r(w, { open: u, onOpenChange: f, modal: !0, children: [
|
|
33
|
+
/* @__PURE__ */ t(P, { asChild: !0, children: /* @__PURE__ */ t(
|
|
34
|
+
p,
|
|
35
|
+
{
|
|
36
|
+
variant: "rounded",
|
|
37
|
+
size: "icon",
|
|
38
|
+
"aria-label": m,
|
|
39
|
+
"data-testid": "filter-popover-button",
|
|
40
|
+
children: x ? /* @__PURE__ */ t(k, { className: "h-4 w-4" }) : /* @__PURE__ */ t(C, { className: "h-4 w-4" })
|
|
41
|
+
}
|
|
42
|
+
) }),
|
|
43
|
+
/* @__PURE__ */ r(
|
|
44
|
+
S,
|
|
45
|
+
{
|
|
46
|
+
side: "bottom",
|
|
47
|
+
align: "end",
|
|
48
|
+
sideOffset: 6,
|
|
49
|
+
avoidCollisions: !0,
|
|
50
|
+
collisionPadding: 8,
|
|
51
|
+
className: "flex flex-col w-[300px] max-h-[400px] rounded-md border bg-background p-0 shadow-md z-40",
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ t("div", { className: "p-4", children: /* @__PURE__ */ t("h3", { className: "font-medium m-0 text-xl", "data-testid": "filter-popover-title", children: m }) }),
|
|
54
|
+
/* @__PURE__ */ t(y, { className: "px-4 overflow-y-auto", children: /* @__PURE__ */ t("div", { className: "space-y-4 pb-2", children: A(l).map((e) => {
|
|
55
|
+
const o = h[e.key];
|
|
56
|
+
return /* @__PURE__ */ r(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
className: "min-w-0",
|
|
60
|
+
"data-testid": `filter-popover-field-${e.key}`,
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ t(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
className: "mb-1 text-[#7F7989] text-xs font-normal leading-none",
|
|
66
|
+
"data-testid": `filter-popover-field-label-${e.key}`,
|
|
67
|
+
children: e.label
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
e.kind === "text" && /* @__PURE__ */ t(
|
|
71
|
+
T,
|
|
72
|
+
{
|
|
73
|
+
placeholder: e.placeholder,
|
|
74
|
+
value: o ?? "",
|
|
75
|
+
disabled: e.disabled,
|
|
76
|
+
className: "h-10 w-full px-4 text-[15px] font-normal placeholder-[#C4C2C8]",
|
|
77
|
+
onChange: (a) => c((n) => ({
|
|
78
|
+
...n,
|
|
79
|
+
[e.key]: a.target.value
|
|
80
|
+
})),
|
|
81
|
+
"data-testid": `filter-popover-input-${e.label}`
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
e.kind === "select" && /* @__PURE__ */ r(
|
|
85
|
+
O,
|
|
86
|
+
{
|
|
87
|
+
value: o ?? "",
|
|
88
|
+
onValueChange: (a) => c((n) => ({
|
|
89
|
+
...n,
|
|
90
|
+
[e.key]: a
|
|
91
|
+
})),
|
|
92
|
+
disabled: e.disabled,
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ t(
|
|
95
|
+
E,
|
|
96
|
+
{
|
|
97
|
+
className: "h-10 w-full min-w-0 px-4 data-[placeholder]:text-[#C4C2C8] rounded-md border border-black/20 text-[15px]",
|
|
98
|
+
"data-testid": `filter-popover-select-${e.key}`,
|
|
99
|
+
children: /* @__PURE__ */ t(I, { placeholder: e.placeholder })
|
|
100
|
+
}
|
|
101
|
+
),
|
|
102
|
+
/* @__PURE__ */ t(L, { className: "text-sm", children: (e.options ?? []).map((a) => /* @__PURE__ */ t(
|
|
103
|
+
_,
|
|
104
|
+
{
|
|
105
|
+
value: a.value,
|
|
106
|
+
className: "text-sm data-[highlighted]:bg-igz-accent-hover",
|
|
107
|
+
"data-testid": `filter-popover-select-option-${e.key}-${a.value}`,
|
|
108
|
+
children: a.label
|
|
109
|
+
},
|
|
110
|
+
a.value
|
|
111
|
+
)) })
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
),
|
|
115
|
+
e.kind === "multi-select" && /* @__PURE__ */ t(
|
|
116
|
+
B,
|
|
117
|
+
{
|
|
118
|
+
filterField: e,
|
|
119
|
+
value: o,
|
|
120
|
+
setFilterDraft: c
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
e.key
|
|
126
|
+
);
|
|
127
|
+
}) }) }),
|
|
128
|
+
/* @__PURE__ */ r("div", { className: "flex items-center justify-end gap-2 p-3", children: [
|
|
129
|
+
/* @__PURE__ */ t(
|
|
130
|
+
p,
|
|
131
|
+
{
|
|
132
|
+
variant: "secondary",
|
|
133
|
+
className: "h-9 w-[100px] px-3 text-[14px]",
|
|
134
|
+
onClick: b,
|
|
135
|
+
"data-testid": "filter-popover-clear-button",
|
|
136
|
+
children: R
|
|
137
|
+
}
|
|
138
|
+
),
|
|
139
|
+
/* @__PURE__ */ t(
|
|
140
|
+
p,
|
|
141
|
+
{
|
|
142
|
+
className: "h-9 w-[100px] px-3 text-[14px]",
|
|
143
|
+
onClick: g,
|
|
144
|
+
"data-testid": "filter-popover-apply-button",
|
|
145
|
+
children: j
|
|
146
|
+
}
|
|
147
|
+
)
|
|
148
|
+
] })
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
)
|
|
152
|
+
] });
|
|
153
|
+
};
|
|
154
|
+
export {
|
|
155
|
+
te as default
|
|
156
|
+
};
|
|
157
|
+
//# sourceMappingURL=FilterPopover.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterPopover.mjs","sources":["../../../../src/lib/nextGenComponents/components/FilterPopover/FilterPopover.tsx"],"sourcesContent":["import { useMemo } from 'react'\n\nimport ActiveFilter from '../../../images/activeFilter.svg?react'\nimport Filter from '../../../images/filter-2.svg?react'\nimport { Button } from '@/components/ui/button'\nimport { Input } from '@/components/ui/input'\nimport { Popover, PopoverTrigger, PopoverContent } from '@/components/ui/popover'\nimport { ScrollArea } from '@/components/ui/scroll-area'\nimport {\n Select,\n SelectTrigger,\n SelectValue,\n SelectContent,\n SelectItem\n} from '@/components/ui/select'\nimport { FILTER_POPOVER_DEFAULT_TITLE, FILTER_BUTTON_CLEAR, FILTER_BUTTON_APPLY } from '@/constants'\nimport { useTableStore } from '@/stores/tableStore'\nimport type { FilterFieldDef, FilterSchema, FilterValues } from '@/types/table/filter'\nimport { buildInitialFromSchema, hasActiveFilters, objectValues } from '@/utils/tableFilters.utils'\nimport MultiSelectField from '@/components/MultiSelectField'\n\ntype Props<K extends string> = {\n schema: FilterSchema<K>\n title?: string\n onApply?: (vals?: FilterValues<K>) => void\n onClear?: () => void\n}\n\nconst FilterPopover = <K extends string>({\n schema,\n title = FILTER_POPOVER_DEFAULT_TITLE,\n onApply,\n onClear\n}: Readonly<Props<K>>) => {\n const { filterPopoverOpen, setFilterPopoverOpen, filterDraft, setFilterDraft, resetFilterDraft } =\n useTableStore()\n const isFilterActive = useMemo(() => hasActiveFilters(schema), [schema])\n\n const handleOpenChange = (next: boolean) => {\n if (next) {\n const initial = buildInitialFromSchema(schema)\n resetFilterDraft(initial)\n }\n setFilterPopoverOpen(next)\n }\n\n const reset = () => {\n resetFilterDraft({})\n onClear?.()\n setFilterPopoverOpen(false)\n }\n\n const apply = () => {\n onApply?.(filterDraft as FilterValues<K>)\n setFilterPopoverOpen(false)\n }\n\n return (\n <Popover open={filterPopoverOpen} onOpenChange={handleOpenChange} modal>\n <PopoverTrigger asChild>\n <Button\n variant=\"rounded\"\n size=\"icon\"\n aria-label={title}\n data-testid=\"filter-popover-button\"\n >\n {isFilterActive ? <ActiveFilter className=\"h-4 w-4\" /> : <Filter className=\"h-4 w-4\" />}\n </Button>\n </PopoverTrigger>\n\n <PopoverContent\n side=\"bottom\"\n align=\"end\"\n sideOffset={6}\n avoidCollisions={true}\n collisionPadding={8}\n className=\"flex flex-col w-[300px] max-h-[400px] rounded-md border bg-background p-0 shadow-md z-40\"\n >\n <div className=\"p-4\">\n <h3 className=\"font-medium m-0 text-xl\" data-testid=\"filter-popover-title\">\n {title}\n </h3>\n </div>\n\n <ScrollArea className=\"px-4 overflow-y-auto\">\n <div className=\"space-y-4 pb-2\">\n {objectValues(schema as Record<string, FilterFieldDef<K>>).map(filterField => {\n const value = filterDraft[filterField.key]\n\n return (\n <div\n key={filterField.key}\n className=\"min-w-0\"\n data-testid={`filter-popover-field-${filterField.key}`}\n >\n <div\n className=\"mb-1 text-[#7F7989] text-xs font-normal leading-none\"\n data-testid={`filter-popover-field-label-${filterField.key}`}\n >\n {filterField.label}\n </div>\n\n {filterField.kind === 'text' && (\n <Input\n placeholder={filterField.placeholder}\n value={(value as string | undefined) ?? ''}\n disabled={filterField.disabled}\n className=\"h-10 w-full px-4 text-[15px] font-normal placeholder-[#C4C2C8]\"\n onChange={e =>\n setFilterDraft(prev => ({\n ...prev,\n [filterField.key]: e.target.value\n }))\n }\n data-testid={`filter-popover-input-${filterField.label}`}\n />\n )}\n\n {filterField.kind === 'select' && (\n <Select\n value={(value as string | undefined) ?? ''}\n onValueChange={value =>\n setFilterDraft(prev => ({\n ...prev,\n [filterField.key]: value\n }))\n }\n disabled={filterField.disabled}\n >\n <SelectTrigger\n className=\"h-10 w-full min-w-0 px-4 data-[placeholder]:text-[#C4C2C8] rounded-md border border-black/20 text-[15px]\"\n data-testid={`filter-popover-select-${filterField.key}`}\n >\n <SelectValue placeholder={filterField.placeholder} />\n </SelectTrigger>\n <SelectContent className=\"text-sm\">\n {(filterField.options ?? []).map(option => (\n <SelectItem\n key={option.value}\n value={option.value}\n className=\"text-sm data-[highlighted]:bg-igz-accent-hover\"\n data-testid={`filter-popover-select-option-${filterField.key}-${option.value}`}\n >\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n )}\n\n {filterField.kind === 'multi-select' && (\n <MultiSelectField\n filterField={filterField}\n value={value}\n setFilterDraft={setFilterDraft}\n />\n )}\n </div>\n )\n })}\n </div>\n </ScrollArea>\n\n <div className=\"flex items-center justify-end gap-2 p-3\">\n <Button\n variant=\"secondary\"\n className=\"h-9 w-[100px] px-3 text-[14px]\"\n onClick={reset}\n data-testid=\"filter-popover-clear-button\"\n >\n {FILTER_BUTTON_CLEAR}\n </Button>\n <Button\n className=\"h-9 w-[100px] px-3 text-[14px]\"\n onClick={apply}\n data-testid=\"filter-popover-apply-button\"\n >\n {FILTER_BUTTON_APPLY}\n </Button>\n </div>\n </PopoverContent>\n </Popover>\n )\n}\n\nexport default FilterPopover\n"],"names":["FilterPopover","schema","title","FILTER_POPOVER_DEFAULT_TITLE","onApply","onClear","filterPopoverOpen","setFilterPopoverOpen","filterDraft","setFilterDraft","resetFilterDraft","useTableStore","isFilterActive","useMemo","hasActiveFilters","handleOpenChange","next","initial","buildInitialFromSchema","reset","apply","Popover","jsx","PopoverTrigger","Button","ActiveFilter","Filter","jsxs","PopoverContent","ScrollArea","objectValues","filterField","value","Input","e","prev","Select","SelectTrigger","SelectValue","SelectContent","option","SelectItem","MultiSelectField","FILTER_BUTTON_CLEAR","FILTER_BUTTON_APPLY"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/nextGenComponents/components/FilterPopover/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type LoaderProps = {
|
|
2
|
+
/** Controls overall placement and sizing strategy.
|
|
3
|
+
* - `fullscreen` — fixed full-viewport overlay (z-50)
|
|
4
|
+
* - `section` — absolute overlay that covers the nearest `relative` ancestor (z-10)
|
|
5
|
+
* - `inline` — a small border-based spinner with no wrapper; position via `className`
|
|
6
|
+
*/
|
|
7
|
+
mode?: 'fullscreen' | 'section' | 'inline';
|
|
8
|
+
variant?: 'primary' | 'secondary';
|
|
9
|
+
size?: 'sm' | 'md' | 'lg';
|
|
10
|
+
/** Adds a semi-transparent dark background. Only applies to `fullscreen` mode. */
|
|
11
|
+
overlay?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
declare const Loader: ({ mode, variant, size, overlay, className }: LoaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default Loader;
|
|
16
|
+
//# sourceMappingURL=Loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Loader.d.ts","sourceRoot":"","sources":["../../../../src/lib/nextGenComponents/components/Loader/Loader.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,WAAW,GAAG;IACxB;;;;OAIG;IACH,IAAI,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,QAAQ,CAAA;IAC1C,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;IACjC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACzB,kFAAkF;IAClF,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAcD,QAAA,MAAM,MAAM,GAAI,6CAMb,WAAW,4CA2Cb,CAAA;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Loader2 as s } from "lucide-react";
|
|
3
|
+
import { cn as r } from "../../lib/utils.mjs";
|
|
4
|
+
const l = {
|
|
5
|
+
sm: 20,
|
|
6
|
+
md: 40,
|
|
7
|
+
lg: 64
|
|
8
|
+
}, m = {
|
|
9
|
+
sm: "w-3.5 h-3.5",
|
|
10
|
+
md: "w-5 h-5",
|
|
11
|
+
lg: "w-7 h-7"
|
|
12
|
+
}, p = ({
|
|
13
|
+
mode: t = "section",
|
|
14
|
+
variant: a = "primary",
|
|
15
|
+
size: o = "md",
|
|
16
|
+
overlay: n = !0,
|
|
17
|
+
className: d
|
|
18
|
+
}) => {
|
|
19
|
+
if (t === "inline")
|
|
20
|
+
return /* @__PURE__ */ e(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
"data-testid": "loader",
|
|
24
|
+
"aria-label": "Loading",
|
|
25
|
+
role: "status",
|
|
26
|
+
className: r(
|
|
27
|
+
"rounded-full border-2 animate-spin",
|
|
28
|
+
m[o],
|
|
29
|
+
a === "secondary" ? "border-muted-foreground/20 border-t-muted-foreground/70" : "border-primary/20 border-t-primary/70",
|
|
30
|
+
d
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
const i = t === "fullscreen";
|
|
35
|
+
return /* @__PURE__ */ e(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
"data-testid": "loader",
|
|
39
|
+
role: "status",
|
|
40
|
+
className: r(
|
|
41
|
+
"flex items-center justify-center",
|
|
42
|
+
i ? "fixed inset-0 z-50" : "absolute inset-0 z-10",
|
|
43
|
+
i && n && "bg-black/20",
|
|
44
|
+
d
|
|
45
|
+
),
|
|
46
|
+
children: /* @__PURE__ */ e("output", { "aria-label": "Loading", children: /* @__PURE__ */ e(
|
|
47
|
+
s,
|
|
48
|
+
{
|
|
49
|
+
className: r(
|
|
50
|
+
"animate-spin",
|
|
51
|
+
a === "secondary" ? "text-muted-foreground" : "text-[#6279e7]"
|
|
52
|
+
),
|
|
53
|
+
size: l[o]
|
|
54
|
+
}
|
|
55
|
+
) })
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
p as default
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=Loader.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Loader.mjs","sources":["../../../../src/lib/nextGenComponents/components/Loader/Loader.tsx"],"sourcesContent":["import { Loader2 } from 'lucide-react'\n\nimport { cn } from '@/lib/utils'\n\nexport type LoaderProps = {\n /** Controls overall placement and sizing strategy.\n * - `fullscreen` — fixed full-viewport overlay (z-50)\n * - `section` — absolute overlay that covers the nearest `relative` ancestor (z-10)\n * - `inline` — a small border-based spinner with no wrapper; position via `className`\n */\n mode?: 'fullscreen' | 'section' | 'inline'\n variant?: 'primary' | 'secondary'\n size?: 'sm' | 'md' | 'lg'\n /** Adds a semi-transparent dark background. Only applies to `fullscreen` mode. */\n overlay?: boolean\n className?: string\n}\n\nconst arcSizeMap: Record<NonNullable<LoaderProps['size']>, number> = {\n sm: 20,\n md: 40,\n lg: 64\n}\n\nconst inlineSizeMap: Record<NonNullable<LoaderProps['size']>, string> = {\n sm: 'w-3.5 h-3.5',\n md: 'w-5 h-5',\n lg: 'w-7 h-7'\n}\n\nconst Loader = ({\n mode = 'section',\n variant = 'primary',\n size = 'md',\n overlay = true,\n className\n}: LoaderProps) => {\n if (mode === 'inline') {\n return (\n <div\n data-testid=\"loader\"\n aria-label=\"Loading\"\n role=\"status\"\n className={cn(\n 'rounded-full border-2 animate-spin',\n inlineSizeMap[size],\n variant === 'secondary'\n ? 'border-muted-foreground/20 border-t-muted-foreground/70'\n : 'border-primary/20 border-t-primary/70',\n className\n )}\n />\n )\n }\n\n const isFullscreen = mode === 'fullscreen'\n\n return (\n <div\n data-testid=\"loader\"\n role=\"status\"\n className={cn(\n 'flex items-center justify-center',\n isFullscreen ? 'fixed inset-0 z-50' : 'absolute inset-0 z-10',\n isFullscreen && overlay && 'bg-black/20',\n className\n )}\n >\n <output aria-label=\"Loading\">\n <Loader2\n className={cn(\n 'animate-spin',\n variant === 'secondary' ? 'text-muted-foreground' : 'text-[#6279e7]'\n )}\n size={arcSizeMap[size]}\n />\n </output>\n </div>\n )\n}\n\nexport default Loader\n"],"names":["arcSizeMap","inlineSizeMap","Loader","mode","variant","size","overlay","className","jsx","cn","isFullscreen","Loader2"],"mappings":";;;AAkBA,MAAMA,IAA+D;AAAA,EACnE,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEMC,IAAkE;AAAA,EACtE,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEMC,IAAS,CAAC;AAAA,EACd,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,WAAAC;AACF,MAAmB;AACjB,MAAIJ,MAAS;AACX,WACE,gBAAAK;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,eAAY;AAAA,QACZ,cAAW;AAAA,QACX,MAAK;AAAA,QACL,WAAWC;AAAA,UACT;AAAA,UACAR,EAAcI,CAAI;AAAA,UAClBD,MAAY,cACR,4DACA;AAAA,UACJG;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAKN,QAAMG,IAAeP,MAAS;AAE9B,SACE,gBAAAK;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAY;AAAA,MACZ,MAAK;AAAA,MACL,WAAWC;AAAA,QACT;AAAA,QACAC,IAAe,uBAAuB;AAAA,QACtCA,KAAgBJ,KAAW;AAAA,QAC3BC;AAAA,MAAA;AAAA,MAGF,UAAA,gBAAAC,EAAC,UAAA,EAAO,cAAW,WACjB,UAAA,gBAAAA;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,WAAWF;AAAA,YACT;AAAA,YACAL,MAAY,cAAc,0BAA0B;AAAA,UAAA;AAAA,UAEtD,MAAMJ,EAAWK,CAAI;AAAA,QAAA;AAAA,MAAA,EACvB,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/nextGenComponents/components/Loader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA;AAC5C,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DraftValues } from '@/stores/tableStore';
|
|
2
|
+
import type { FilterFieldDef } from '@/types/table/filter';
|
|
3
|
+
/**
|
|
4
|
+
* Downward-pointing triangle that matches the icon used by TimeFilterDropdown
|
|
5
|
+
* (mirrors select.svg from assets).
|
|
6
|
+
*/
|
|
7
|
+
export declare const SelectArrow: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export type MultiSelectFieldProps = {
|
|
9
|
+
filterField: FilterFieldDef;
|
|
10
|
+
value: DraftValues[string];
|
|
11
|
+
setFilterDraft: (draft: DraftValues | ((prev: DraftValues) => DraftValues)) => void;
|
|
12
|
+
};
|
|
13
|
+
declare const MultiSelectField: ({ filterField, value, setFilterDraft }: MultiSelectFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default MultiSelectField;
|
|
15
|
+
//# sourceMappingURL=MultiSelectField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiSelectField.d.ts","sourceRoot":"","sources":["../../../../src/lib/nextGenComponents/components/MultiSelectField/MultiSelectField.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAQ1D;;;GAGG;AACH,eAAO,MAAM,WAAW,+CAcvB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,WAAW,EAAE,cAAc,CAAA;IAC3B,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAC1B,cAAc,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG,CAAC,CAAC,IAAI,EAAE,WAAW,KAAK,WAAW,CAAC,KAAK,IAAI,CAAA;CACpF,CAAA;AACD,QAAA,MAAM,gBAAgB,GAAI,wCAAwC,qBAAqB,4CA6GtF,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { jsx as n, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as b } from "react";
|
|
3
|
+
import { Checkbox as k } from "../ui/checkbox.mjs";
|
|
4
|
+
import { DropdownMenu as C, DropdownMenuTrigger as f, DropdownMenuContent as L, DropdownMenuItem as S } from "../ui/dropdown-menu.mjs";
|
|
5
|
+
const z = 2, A = () => /* @__PURE__ */ n(
|
|
6
|
+
"svg",
|
|
7
|
+
{
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
+
width: "13",
|
|
10
|
+
height: "6",
|
|
11
|
+
viewBox: "0 0 13 6",
|
|
12
|
+
fill: "none",
|
|
13
|
+
"aria-hidden": "true",
|
|
14
|
+
children: /* @__PURE__ */ n(
|
|
15
|
+
"path",
|
|
16
|
+
{
|
|
17
|
+
d: "M6.0625 6L0.000322908 -1.05734e-06L12.1247 -7.59139e-08L6.0625 6Z",
|
|
18
|
+
fill: "var(--igz-secondary, #7F7989)"
|
|
19
|
+
}
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
), I = ({ filterField: t, value: g, setFilterDraft: v }) => {
|
|
23
|
+
const [y, w] = b(!1), r = Array.isArray(g) ? g : [], h = t.options ?? [], d = h.filter((e) => r.includes(e.value)).map((e) => e.label), x = r.length === 0 ? t.placeholder ?? "Select..." : d.length <= z ? d.join(", ") : `${d.length} items selected`, u = (e) => {
|
|
24
|
+
v((o) => {
|
|
25
|
+
const a = Array.isArray(o[t.key]) ? o[t.key] : [], s = a.includes(e) ? a.filter((c) => c !== e) : [...a, e], l = t.resolveValue ? t.resolveValue(s, a) : s;
|
|
26
|
+
return { ...o, [t.key]: l };
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
return /* @__PURE__ */ i(C, { open: y, onOpenChange: w, children: [
|
|
30
|
+
/* @__PURE__ */ i(
|
|
31
|
+
f,
|
|
32
|
+
{
|
|
33
|
+
style: {
|
|
34
|
+
height: 40,
|
|
35
|
+
width: "100%",
|
|
36
|
+
display: "flex",
|
|
37
|
+
alignItems: "center",
|
|
38
|
+
justifyContent: "space-between",
|
|
39
|
+
gap: 8,
|
|
40
|
+
paddingLeft: 12,
|
|
41
|
+
paddingRight: 12,
|
|
42
|
+
borderRadius: 6,
|
|
43
|
+
border: "1px solid var(--igz-gray, #C4C2C8)",
|
|
44
|
+
background: "white",
|
|
45
|
+
fontSize: 15,
|
|
46
|
+
color: r.length === 0 ? "var(--igz-gray, #C4C2C8)" : "var(--igz-primary, #4B4760)",
|
|
47
|
+
cursor: "pointer",
|
|
48
|
+
outline: "none"
|
|
49
|
+
},
|
|
50
|
+
"data-testid": `filter-popover-multiselect-${t.key}`,
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ n("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: x }),
|
|
53
|
+
/* @__PURE__ */ n(A, {})
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
/* @__PURE__ */ n(
|
|
58
|
+
L,
|
|
59
|
+
{
|
|
60
|
+
align: "start",
|
|
61
|
+
sideOffset: 4,
|
|
62
|
+
style: {
|
|
63
|
+
width: "var(--radix-dropdown-menu-trigger-width)",
|
|
64
|
+
color: "var(--igz-primary, #4B4760)"
|
|
65
|
+
},
|
|
66
|
+
"data-testid": `filter-popover-multiselect-content-${t.key}`,
|
|
67
|
+
children: h.map((e) => {
|
|
68
|
+
var l, c, m;
|
|
69
|
+
const o = r.includes(e.value), a = (l = e.meta) == null ? void 0 : l.color, s = !!((c = e.meta) != null && c.disabled) || !!((m = t.computeDisabled) != null && m.call(t, e.value, r));
|
|
70
|
+
return /* @__PURE__ */ i(
|
|
71
|
+
S,
|
|
72
|
+
{
|
|
73
|
+
disabled: s,
|
|
74
|
+
className: "flex items-center gap-3 text-[15px] h-[42px] px-4 data-[highlighted]:bg-igz-accent-hover cursor-pointer data-[disabled]:pointer-events-none data-[disabled]:opacity-40",
|
|
75
|
+
onSelect: (p) => {
|
|
76
|
+
p.preventDefault(), s || u(e.value);
|
|
77
|
+
},
|
|
78
|
+
"data-testid": `filter-popover-multiselect-${t.key}-${e.value}`,
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ n(
|
|
81
|
+
k,
|
|
82
|
+
{
|
|
83
|
+
checked: o,
|
|
84
|
+
disabled: s,
|
|
85
|
+
className: "shrink-0",
|
|
86
|
+
onClick: (p) => p.stopPropagation(),
|
|
87
|
+
onCheckedChange: () => !s && u(e.value)
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ i("span", { className: "flex items-center gap-1.5", children: [
|
|
91
|
+
/* @__PURE__ */ n("span", { children: e.label }),
|
|
92
|
+
a && /* @__PURE__ */ n(
|
|
93
|
+
"span",
|
|
94
|
+
{
|
|
95
|
+
className: "w-2 h-2 rounded-full shrink-0",
|
|
96
|
+
style: { backgroundColor: a }
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
] })
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
e.value || "empty"
|
|
103
|
+
);
|
|
104
|
+
})
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
] });
|
|
108
|
+
};
|
|
109
|
+
export {
|
|
110
|
+
A as SelectArrow,
|
|
111
|
+
I as default
|
|
112
|
+
};
|
|
113
|
+
//# sourceMappingURL=MultiSelectField.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiSelectField.mjs","sources":["../../../../src/lib/nextGenComponents/components/MultiSelectField/MultiSelectField.tsx"],"sourcesContent":["import { useState } from 'react'\n\nimport { Checkbox } from '@/components/ui/checkbox'\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger\n} from '@/components/ui/dropdown-menu'\nimport type { DraftValues } from '@/stores/tableStore'\nimport type { FilterFieldDef } from '@/types/table/filter'\n\n// ── Constants ─────────────────────────────────────────────────────────────────\n\nconst MAX_INLINE_LABELS = 2\n\n// ── SelectArrow ───────────────────────────────────────────────────────────────\n\n/**\n * Downward-pointing triangle that matches the icon used by TimeFilterDropdown\n * (mirrors select.svg from assets).\n */\nexport const SelectArrow = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"13\"\n height=\"6\"\n viewBox=\"0 0 13 6\"\n fill=\"none\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M6.0625 6L0.000322908 -1.05734e-06L12.1247 -7.59139e-08L6.0625 6Z\"\n fill=\"var(--igz-secondary, #7F7989)\"\n />\n </svg>\n)\n\nexport type MultiSelectFieldProps = {\n filterField: FilterFieldDef\n value: DraftValues[string]\n setFilterDraft: (draft: DraftValues | ((prev: DraftValues) => DraftValues)) => void\n}\nconst MultiSelectField = ({ filterField, value, setFilterDraft }: MultiSelectFieldProps) => {\n const [isOpen, setIsOpen] = useState(false)\n\n const currentValues: string[] = Array.isArray(value) ? value : []\n const options = filterField.options ?? []\n\n const selectedLabels = options.filter(o => currentValues.includes(o.value)).map(o => o.label)\n\n const triggerText =\n currentValues.length === 0\n ? (filterField.placeholder ?? 'Select...')\n : selectedLabels.length <= MAX_INLINE_LABELS\n ? selectedLabels.join(', ')\n : `${selectedLabels.length} items selected`\n\n const handleToggle = (optValue: string) => {\n setFilterDraft(prev => {\n const prevValues = Array.isArray(prev[filterField.key])\n ? (prev[filterField.key] as string[])\n : []\n const toggled = prevValues.includes(optValue)\n ? prevValues.filter(v => v !== optValue)\n : [...prevValues, optValue]\n const next = filterField.resolveValue\n ? filterField.resolveValue(toggled, prevValues)\n : toggled\n return { ...prev, [filterField.key]: next }\n })\n }\n\n return (\n <DropdownMenu open={isOpen} onOpenChange={setIsOpen}>\n <DropdownMenuTrigger\n style={{\n height: 40,\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 8,\n paddingLeft: 12,\n paddingRight: 12,\n borderRadius: 6,\n border: '1px solid var(--igz-gray, #C4C2C8)',\n background: 'white',\n fontSize: 15,\n color:\n currentValues.length === 0 ? 'var(--igz-gray, #C4C2C8)' : 'var(--igz-primary, #4B4760)',\n cursor: 'pointer',\n outline: 'none'\n }}\n data-testid={`filter-popover-multiselect-${filterField.key}`}\n >\n <span style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>\n {triggerText}\n </span>\n <SelectArrow />\n </DropdownMenuTrigger>\n\n <DropdownMenuContent\n align=\"start\"\n sideOffset={4}\n style={{\n width: 'var(--radix-dropdown-menu-trigger-width)',\n color: 'var(--igz-primary, #4B4760)'\n }}\n data-testid={`filter-popover-multiselect-content-${filterField.key}`}\n >\n {options.map(option => {\n const isChecked = currentValues.includes(option.value)\n const color = option.meta?.color as string | undefined\n const isDisabled =\n Boolean((option.meta as Record<string, unknown>)?.disabled) ||\n Boolean(filterField.computeDisabled?.(option.value, currentValues))\n\n return (\n <DropdownMenuItem\n key={option.value || 'empty'}\n disabled={isDisabled}\n className=\"flex items-center gap-3 text-[15px] h-[42px] px-4 data-[highlighted]:bg-igz-accent-hover cursor-pointer data-[disabled]:pointer-events-none data-[disabled]:opacity-40\"\n onSelect={e => {\n e.preventDefault()\n if (!isDisabled) handleToggle(option.value)\n }}\n data-testid={`filter-popover-multiselect-${filterField.key}-${option.value}`}\n >\n <Checkbox\n checked={isChecked}\n disabled={isDisabled}\n className=\"shrink-0\"\n onClick={e => e.stopPropagation()}\n onCheckedChange={() => !isDisabled && handleToggle(option.value)}\n />\n {/* Label + dot grouped together so the dot sits right after the text */}\n <span className=\"flex items-center gap-1.5\">\n <span>{option.label}</span>\n {color && (\n <span\n className=\"w-2 h-2 rounded-full shrink-0\"\n style={{ backgroundColor: color }}\n />\n )}\n </span>\n </DropdownMenuItem>\n )\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n\nexport default MultiSelectField\n"],"names":["MAX_INLINE_LABELS","SelectArrow","jsx","MultiSelectField","filterField","value","setFilterDraft","isOpen","setIsOpen","useState","currentValues","options","selectedLabels","o","triggerText","handleToggle","optValue","prev","prevValues","toggled","v","next","jsxs","DropdownMenu","DropdownMenuTrigger","DropdownMenuContent","option","isChecked","color","_a","isDisabled","_b","_c","DropdownMenuItem","e","Checkbox"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/nextGenComponents/components/MultiSelectField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACzD,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type PaginationConfig = {
|
|
2
|
+
currentPage: number;
|
|
3
|
+
totalPages: number;
|
|
4
|
+
currentBatch: number;
|
|
5
|
+
hasPrevBatch: boolean;
|
|
6
|
+
hasNextBatch: boolean;
|
|
7
|
+
batchSize: number;
|
|
8
|
+
onPageChange: (page: number) => void;
|
|
9
|
+
onPrevBatch: () => void;
|
|
10
|
+
onNextBatch: () => void;
|
|
11
|
+
};
|
|
12
|
+
export type PaginationControlsProps = PaginationConfig & {
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
declare const PaginationControls: ({ currentPage, totalPages, currentBatch, hasPrevBatch, hasNextBatch, batchSize, onPageChange, onPrevBatch, onNextBatch, className }: PaginationControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default PaginationControls;
|
|
17
|
+
//# sourceMappingURL=PaginationControls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaginationControls.d.ts","sourceRoot":"","sources":["../../../../src/lib/nextGenComponents/components/PaginationControls/PaginationControls.tsx"],"names":[],"mappings":"AAaA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,OAAO,CAAA;IACrB,YAAY,EAAE,OAAO,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,WAAW,EAAE,MAAM,IAAI,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,GAAG;IACvD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,QAAA,MAAM,kBAAkB,GAAI,qIAWzB,uBAAuB,4CA6HzB,CAAA;AAED,eAAe,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { jsx as i, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronsLeft as w, ChevronsRight as A } from "lucide-react";
|
|
3
|
+
import { Pagination as E, PaginationContent as L, PaginationItem as r, PaginationLink as N, PaginationPrevious as I, PaginationNext as O } from "../ui/pagination.mjs";
|
|
4
|
+
import { TooltipProvider as R, Tooltip as p, TooltipTrigger as f, TooltipContent as h } from "../ui/tooltip.mjs";
|
|
5
|
+
import { cn as l } from "../../lib/utils.mjs";
|
|
6
|
+
const J = ({
|
|
7
|
+
currentPage: n,
|
|
8
|
+
totalPages: u,
|
|
9
|
+
currentBatch: t,
|
|
10
|
+
hasPrevBatch: d,
|
|
11
|
+
hasNextBatch: s,
|
|
12
|
+
batchSize: a,
|
|
13
|
+
onPageChange: m,
|
|
14
|
+
onPrevBatch: k,
|
|
15
|
+
onNextBatch: D,
|
|
16
|
+
className: T
|
|
17
|
+
}) => {
|
|
18
|
+
const g = n > 1, v = n < u, $ = Array.from({ length: u }, (e, C) => C + 1), x = (t - 1) * a, c = "pointer-events-none opacity-30", b = (t - 2) * a + 1, P = (t - 1) * a, j = t * a + 1, y = (t + 1) * a;
|
|
19
|
+
return /* @__PURE__ */ i(R, { children: /* @__PURE__ */ i(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
className: l("flex items-center justify-center gap-4 pt-2", T),
|
|
23
|
+
"data-testid": "pagination-controls",
|
|
24
|
+
children: /* @__PURE__ */ i(E, { children: /* @__PURE__ */ o(L, { children: [
|
|
25
|
+
/* @__PURE__ */ i(r, { children: /* @__PURE__ */ o(p, { children: [
|
|
26
|
+
/* @__PURE__ */ i(f, { asChild: !0, children: /* @__PURE__ */ i(
|
|
27
|
+
N,
|
|
28
|
+
{
|
|
29
|
+
href: "#",
|
|
30
|
+
"aria-disabled": !d,
|
|
31
|
+
className: l(!d && c),
|
|
32
|
+
onClick: (e) => {
|
|
33
|
+
e.preventDefault(), d && k();
|
|
34
|
+
},
|
|
35
|
+
"data-testid": "pagination-prev-batch",
|
|
36
|
+
children: /* @__PURE__ */ i(w, { className: "h-4 w-4" })
|
|
37
|
+
}
|
|
38
|
+
) }),
|
|
39
|
+
/* @__PURE__ */ i(h, { children: d ? `Previous pages ${b}-${P}` : "No previous pages" })
|
|
40
|
+
] }) }),
|
|
41
|
+
/* @__PURE__ */ i(r, { children: /* @__PURE__ */ o(p, { children: [
|
|
42
|
+
/* @__PURE__ */ i(f, { asChild: !0, children: /* @__PURE__ */ i(
|
|
43
|
+
I,
|
|
44
|
+
{
|
|
45
|
+
href: "#",
|
|
46
|
+
"aria-disabled": !g,
|
|
47
|
+
className: l(!g && c),
|
|
48
|
+
onClick: (e) => {
|
|
49
|
+
e.preventDefault(), g && m(n - 1);
|
|
50
|
+
},
|
|
51
|
+
"data-testid": "pagination-prev-page"
|
|
52
|
+
}
|
|
53
|
+
) }),
|
|
54
|
+
/* @__PURE__ */ i(h, { children: "Previous page" })
|
|
55
|
+
] }) }),
|
|
56
|
+
$.map((e) => /* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(
|
|
57
|
+
N,
|
|
58
|
+
{
|
|
59
|
+
href: "#",
|
|
60
|
+
isActive: e === n,
|
|
61
|
+
onClick: (C) => {
|
|
62
|
+
C.preventDefault(), m(e);
|
|
63
|
+
},
|
|
64
|
+
"data-testid": `pagination-page-${e + x}`,
|
|
65
|
+
children: e + x
|
|
66
|
+
}
|
|
67
|
+
) }, e)),
|
|
68
|
+
/* @__PURE__ */ i(r, { children: /* @__PURE__ */ o(p, { children: [
|
|
69
|
+
/* @__PURE__ */ i(f, { asChild: !0, children: /* @__PURE__ */ i(
|
|
70
|
+
O,
|
|
71
|
+
{
|
|
72
|
+
href: "#",
|
|
73
|
+
"aria-disabled": !v,
|
|
74
|
+
className: l(!v && c),
|
|
75
|
+
onClick: (e) => {
|
|
76
|
+
e.preventDefault(), v && m(n + 1);
|
|
77
|
+
},
|
|
78
|
+
"data-testid": "pagination-next-page"
|
|
79
|
+
}
|
|
80
|
+
) }),
|
|
81
|
+
/* @__PURE__ */ i(h, { children: "Next page" })
|
|
82
|
+
] }) }),
|
|
83
|
+
/* @__PURE__ */ i(r, { children: /* @__PURE__ */ o(p, { children: [
|
|
84
|
+
/* @__PURE__ */ i(f, { asChild: !0, children: /* @__PURE__ */ i(
|
|
85
|
+
N,
|
|
86
|
+
{
|
|
87
|
+
href: "#",
|
|
88
|
+
"aria-disabled": !s,
|
|
89
|
+
className: l(!s && c),
|
|
90
|
+
onClick: (e) => {
|
|
91
|
+
e.preventDefault(), s && D();
|
|
92
|
+
},
|
|
93
|
+
"data-testid": "pagination-next-batch",
|
|
94
|
+
children: /* @__PURE__ */ i(A, { className: "h-4 w-4" })
|
|
95
|
+
}
|
|
96
|
+
) }),
|
|
97
|
+
/* @__PURE__ */ i(h, { children: s ? `Next pages ${j}-${y}` : "No more pages" })
|
|
98
|
+
] }) })
|
|
99
|
+
] }) })
|
|
100
|
+
}
|
|
101
|
+
) });
|
|
102
|
+
};
|
|
103
|
+
export {
|
|
104
|
+
J as default
|
|
105
|
+
};
|
|
106
|
+
//# sourceMappingURL=PaginationControls.mjs.map
|