@povio/ui 3.0.0-rc.3 → 3.1.0
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/README.md +39 -0
- package/dist/assets/icons/AlignCenter.js +11 -26
- package/dist/assets/icons/AlignLeft.js +11 -26
- package/dist/assets/icons/AlignLeftRight.js +11 -26
- package/dist/assets/icons/AlignRight.js +11 -26
- package/dist/assets/icons/ArrowDropDown.js +11 -26
- package/dist/assets/icons/ArrowDropUp.js +11 -26
- package/dist/assets/icons/ArrowLeft.js +11 -26
- package/dist/assets/icons/ArrowRight.js +11 -26
- package/dist/assets/icons/Bold.js +11 -26
- package/dist/assets/icons/BulletedList.js +11 -26
- package/dist/assets/icons/Calendar.js +13 -28
- package/dist/assets/icons/Check.js +13 -28
- package/dist/assets/icons/CheckCircle.js +11 -26
- package/dist/assets/icons/CheckboxCheckmark.js +14 -29
- package/dist/assets/icons/CheckboxIndeterminate.js +14 -29
- package/dist/assets/icons/ChevronDown.js +13 -28
- package/dist/assets/icons/ChevronLeft.js +13 -28
- package/dist/assets/icons/ChevronRight.js +13 -28
- package/dist/assets/icons/ChevronUp.js +13 -28
- package/dist/assets/icons/ChevronsLeft.js +13 -28
- package/dist/assets/icons/ChevronsRight.js +13 -28
- package/dist/assets/icons/Clock.js +11 -26
- package/dist/assets/icons/Close.js +11 -26
- package/dist/assets/icons/DateTime.js +14 -35
- package/dist/assets/icons/DragIndicator.js +11 -26
- package/dist/assets/icons/File.js +13 -28
- package/dist/assets/icons/Highlight.js +11 -26
- package/dist/assets/icons/HighlightOn.js +15 -49
- package/dist/assets/icons/Home.js +11 -26
- package/dist/assets/icons/Info.js +16 -37
- package/dist/assets/icons/Italic.js +11 -26
- package/dist/assets/icons/Link.js +11 -26
- package/dist/assets/icons/Menu.js +11 -26
- package/dist/assets/icons/NumberedList.js +11 -26
- package/dist/assets/icons/PointerHorizontal.js +11 -26
- package/dist/assets/icons/PointerVertical.js +11 -26
- package/dist/assets/icons/Search.js +11 -26
- package/dist/assets/icons/Send.js +13 -28
- package/dist/assets/icons/Strikethrough.js +11 -26
- package/dist/assets/icons/TextColor.js +14 -48
- package/dist/assets/icons/Today.js +11 -26
- package/dist/assets/icons/Underlined.js +13 -28
- package/dist/assets/icons/Upload.js +14 -35
- package/dist/assets/icons/Visibility.js +11 -26
- package/dist/assets/icons/VisibilityOff.js +11 -26
- package/dist/assets/icons/WarningFilled.js +13 -28
- package/dist/components/Breadcrumbs/Breadcrumbs.js +56 -207
- package/dist/components/Menu/Menu.d.ts +4 -0
- package/dist/components/Menu/Menu.js +2 -18
- package/dist/components/Menu/MenuDesktop.js +7 -41
- package/dist/components/Menu/MenuItem.js +9 -32
- package/dist/components/Menu/MenuMobile.d.ts +1 -1
- package/dist/components/Menu/MenuMobile.js +39 -97
- package/dist/components/Menu/MenuPopover.js +29 -105
- package/dist/components/buttons/IconButton/IconButton.js +8 -40
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +1 -2
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
- package/dist/components/buttons/PillButton/PillButton.js +17 -55
- package/dist/components/buttons/SplitButton/SplitButton.js +18 -103
- package/dist/components/buttons/TextButton/TextButton.js +8 -30
- package/dist/components/buttons/ToggleButton/ToggleButton.js +8 -28
- package/dist/components/buttons/shared/ButtonContent.js +22 -80
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +0 -1
- package/dist/components/inputs/Checkbox/Checkbox.js +35 -201
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +0 -3
- package/dist/components/inputs/Checkbox/checkbox.cva.js +1 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +5 -12
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +75 -373
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +5 -12
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +186 -492
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +5 -14
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +47 -273
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -7
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +121 -611
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +3 -5
- package/dist/components/inputs/DateTime/shared/Calendar.js +120 -338
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +2 -4
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +103 -310
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +2 -4
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +33 -150
- package/dist/components/inputs/DateTime/shared/CalendarHeader.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +98 -249
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +137 -318
- package/dist/components/inputs/DateTime/shared/DateField.js +112 -286
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +3 -14
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +129 -356
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +11 -96
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.d.ts +4 -1
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +28 -81
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +58 -103
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +82 -193
- package/dist/components/inputs/DateTime/shared/TimeField.js +8 -27
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +110 -279
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +1 -4
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +65 -210
- package/dist/components/inputs/DateTime/shared/YearPicker.js +68 -119
- package/dist/components/inputs/File/FileUpload.js +45 -88
- package/dist/components/inputs/File/FileUploadContainer.js +7 -15
- package/dist/components/inputs/File/InputUpload.js +79 -317
- package/dist/components/inputs/File/shared/FileCard.js +41 -104
- package/dist/components/inputs/File/shared/FileCardList.js +12 -47
- package/dist/components/inputs/File/shared/FileUploadContent.js +44 -175
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +46 -149
- package/dist/components/inputs/File/shared/FileUploadContentError.js +93 -234
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +97 -230
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +55 -199
- package/dist/components/inputs/File/shared/InputUploadContent.js +34 -148
- package/dist/components/inputs/File/shared/InputUploadFilled.js +8 -49
- package/dist/components/inputs/File/shared/ProgressBar.d.ts +2 -2
- package/dist/components/inputs/File/shared/ProgressBar.js +20 -53
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +1 -1
- package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -1
- package/dist/components/inputs/File/shared/progressBar.cva.d.ts +38 -0
- package/dist/components/inputs/File/shared/progressBar.cva.js +28 -0
- package/dist/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormField.js +37 -119
- package/dist/components/inputs/FormField/FormFieldError.js +5 -25
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +22 -81
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +7 -31
- package/dist/components/inputs/FormField/FormFieldHelper.js +6 -26
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +9 -40
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +2 -5
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +97 -447
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +9 -48
- package/dist/components/inputs/Input/TextArea/TextArea.js +90 -305
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +1 -3
- package/dist/components/inputs/Input/TextInput/TextInput.js +90 -419
- package/dist/components/inputs/Input/shared/InputContent.js +59 -192
- package/dist/components/inputs/Inputs/Form.js +11 -40
- package/dist/components/inputs/Inputs/InputItem.d.ts +21 -15
- package/dist/components/inputs/Inputs/InputItem.js +14 -69
- package/dist/components/inputs/Inputs/Inputs.js +11 -37
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -3
- package/dist/components/inputs/RadioGroup/RadioGroup.js +61 -353
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +0 -45
- package/dist/components/inputs/RadioGroup/radio.cva.js +1 -48
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +2 -6
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +22 -217
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +18 -3
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +8 -107
- package/dist/components/inputs/Selection/Select/Select.d.ts +3 -7
- package/dist/components/inputs/Selection/Select/Select.js +18 -227
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +3 -8
- package/dist/components/inputs/Selection/shared/SelectBase.js +18 -69
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +138 -393
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +116 -397
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +25 -99
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBox.js +52 -164
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +35 -85
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +16 -69
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +21 -70
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +9 -58
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +6 -11
- package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -3
- package/dist/components/inputs/Selection/shared/select.context.js +36 -67
- package/dist/components/inputs/Selection/shared/select.types.d.ts +2 -3
- package/dist/components/inputs/Selection/shared/useSelectItems.js +49 -109
- package/dist/components/inputs/Slider/Slider.d.ts +1 -2
- package/dist/components/inputs/Slider/Slider.js +76 -265
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +0 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +98 -447
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +11 -37
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +30 -102
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +45 -194
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +28 -88
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +14 -48
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +19 -66
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +15 -49
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +32 -92
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +54 -126
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +38 -141
- package/dist/components/inputs/Toggle/Toggle.d.ts +0 -1
- package/dist/components/inputs/Toggle/Toggle.js +37 -214
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +0 -3
- package/dist/components/inputs/Toggle/toggle.cva.js +1 -2
- package/dist/components/inputs/shared/CheckContent.d.ts +1 -2
- package/dist/components/inputs/shared/CheckContent.js +11 -21
- package/dist/components/inputs/shared/InputClear.d.ts +1 -2
- package/dist/components/inputs/shared/InputClear.js +12 -88
- package/dist/components/inputs/shared/TooltipWrapper.js +11 -50
- package/dist/components/inputs/shared/input.cva.d.ts +0 -28
- package/dist/components/inputs/shared/input.cva.js +4 -38
- package/dist/components/navigation/Accordion/Accordion.js +22 -69
- package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
- package/dist/components/navigation/Stepper/Stepper.js +22 -67
- package/dist/components/navigation/Stepper/StepperItem.js +31 -104
- package/dist/components/navigation/Stepper/StepperSeparator.js +5 -23
- package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
- package/dist/components/overlays/BottomSheet/BottomSheet.js +25 -98
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +8 -48
- package/dist/components/overlays/Drawer/Drawer.js +22 -64
- package/dist/components/overlays/Modal/modal.cva.js +1 -1
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +5 -1
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +28 -83
- package/dist/components/overlays/Tooltip/Tooltip.js +28 -137
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +12 -37
- package/dist/components/segment/Segment.js +57 -218
- package/dist/components/segment/SegmentItem.js +10 -67
- package/dist/components/shared/pagination/Pagination.js +22 -108
- package/dist/components/shared/pagination/PaginationList.js +64 -167
- package/dist/components/status/Alert/Alert.js +30 -97
- package/dist/components/status/Loader/Loader.js +22 -77
- package/dist/components/status/Toast/Toast.js +17 -22
- package/dist/components/status/Toast/toast.cva.d.ts +14 -3
- package/dist/components/status/Toast/toast.cva.js +12 -10
- package/dist/components/status/Toast/useToast.js +57 -62
- package/dist/components/table/ColumnConfig.js +54 -158
- package/dist/components/table/InfiniteTable.js +16 -67
- package/dist/components/table/PaginatedTable.js +18 -84
- package/dist/components/table/Table.js +30 -30
- package/dist/components/table/table.cva.d.ts +7 -0
- package/dist/components/table/table.cva.js +2 -1
- package/dist/components/text/Link/Link.js +7 -19
- package/dist/components/text/Pill/Pill.d.ts +15 -0
- package/dist/components/text/Pill/Pill.js +44 -0
- package/dist/components/text/Typography/Typography.js +8 -23
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +9 -23
- package/dist/config/router.context.js +16 -42
- package/dist/config/theme.context.js +45 -98
- package/dist/config/uiConfig.context.d.ts +10 -21
- package/dist/config/uiConfig.context.js +18 -69
- package/dist/config/uiOverrides.context.d.ts +10 -20
- package/dist/config/uiOverrides.context.js +14 -54
- package/dist/helpers/dynamicInputs.d.ts +5 -5
- package/dist/helpers/dynamicInputs.js +0 -3
- package/dist/hooks/useAutosave.d.ts +1 -2
- package/dist/hooks/useAutosave.js +4 -12
- package/dist/hooks/useBreakpoint.js +3 -16
- package/dist/hooks/useDebounceCallback.js +17 -51
- package/dist/hooks/useFilters.js +64 -125
- package/dist/hooks/useForm.js +8 -42
- package/dist/hooks/useFormAutosave.d.ts +1 -3
- package/dist/hooks/useFormAutosave.js +30 -122
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +24 -91
- package/dist/hooks/useLocalStorage.js +10 -43
- package/dist/hooks/useLongPressRepeat.js +20 -55
- package/dist/hooks/usePagination.js +19 -49
- package/dist/hooks/useScrollableListBox.js +16 -37
- package/dist/hooks/useSorting.js +28 -69
- package/dist/hooks/useStateAndRef.js +7 -21
- package/dist/hooks/useTableColumnConfig.js +31 -124
- package/dist/hooks/useTranslationMemo.js +5 -25
- package/dist/index.d.ts +7 -16
- package/dist/index.js +6 -13
- package/dist/tw-ui-plugin.js +0 -6
- package/dist/utils/date-time.utils.d.ts +10 -38
- package/dist/utils/date-time.utils.js +22 -136
- package/package.json +1 -1
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +0 -5
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +0 -16
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +0 -16
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +0 -32
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +0 -2
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +0 -40
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +0 -85
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +0 -1
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +0 -13
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +0 -14
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +0 -45
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +0 -571
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +0 -35
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +0 -575
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +0 -8
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +0 -5
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +0 -1
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +0 -7
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +0 -37
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -14
- package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -178
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +0 -47
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +0 -14
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +0 -43
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +0 -6
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +0 -5
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +0 -12
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +0 -8
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +0 -54
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +0 -1
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -82
- package/dist/components/inputs/Skeleton/InputFrame.js +0 -548
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +0 -8
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +0 -5
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +0 -14
- package/dist/components/inputs/shared/useStaticInputHandoff.js +0 -100
- package/dist/hooks/useAutosave.spec.d.ts +0 -1
- package/dist/hooks/useFormAutosave.spec.d.ts +0 -1
- package/dist/hooks/useKeyInteractions.d.ts +0 -20
- package/dist/hooks/useKeyInteractions.js +0 -54
- package/dist/hooks/useKeyInteractions.spec.d.ts +0 -1
- package/dist/hooks/useQueryAutocomplete.d.ts +0 -14
- package/dist/hooks/useQueryAutocomplete.js +0 -72
- package/dist/utils/query.utils.d.ts +0 -4
- package/dist/utils/query.utils.js +0 -8
|
@@ -1,70 +1,65 @@
|
|
|
1
1
|
import { Toast } from "./Toast.js";
|
|
2
|
-
import { c } from "react/compiler-runtime";
|
|
3
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useMemo } from "react";
|
|
4
4
|
import { toast } from "react-toastify";
|
|
5
5
|
//#region src/components/status/Toast/useToast.tsx
|
|
6
6
|
var useToast = () => {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
7
|
+
const successToast = useCallback((params, options) => {
|
|
8
|
+
return toast.success(/* @__PURE__ */ jsx(Toast, {
|
|
9
|
+
color: "success",
|
|
10
|
+
...params
|
|
11
|
+
}), {
|
|
12
|
+
...options,
|
|
13
|
+
position: params.position,
|
|
14
|
+
data: { variant: params.variant }
|
|
15
|
+
});
|
|
16
|
+
}, []);
|
|
17
|
+
const errorToast = useCallback((params, options) => {
|
|
18
|
+
return toast.error(/* @__PURE__ */ jsx(Toast, {
|
|
19
|
+
color: "error",
|
|
20
|
+
...params
|
|
21
|
+
}), {
|
|
22
|
+
...options,
|
|
23
|
+
position: params.position,
|
|
24
|
+
data: { variant: params.variant }
|
|
25
|
+
});
|
|
26
|
+
}, []);
|
|
27
|
+
const warningToast = useCallback((params, options) => {
|
|
28
|
+
return toast.warning(/* @__PURE__ */ jsx(Toast, {
|
|
29
|
+
color: "warning",
|
|
30
|
+
...params
|
|
31
|
+
}), {
|
|
32
|
+
...options,
|
|
33
|
+
position: params.position,
|
|
34
|
+
data: { variant: params.variant }
|
|
35
|
+
});
|
|
36
|
+
}, []);
|
|
37
|
+
const neutralToast = useCallback((params, options) => {
|
|
38
|
+
return toast.info(/* @__PURE__ */ jsx(Toast, {
|
|
39
|
+
color: "neutral",
|
|
40
|
+
...params
|
|
41
|
+
}), {
|
|
42
|
+
...options,
|
|
43
|
+
position: params.position,
|
|
44
|
+
data: { variant: params.variant }
|
|
45
|
+
});
|
|
46
|
+
}, []);
|
|
47
|
+
const closeToast = useCallback((id) => {
|
|
48
|
+
toast.dismiss(id);
|
|
49
|
+
}, []);
|
|
50
|
+
return useMemo(() => ({
|
|
51
|
+
successToast,
|
|
52
|
+
errorToast,
|
|
53
|
+
warningToast,
|
|
54
|
+
neutralToast,
|
|
55
|
+
closeToast
|
|
56
|
+
}), [
|
|
57
|
+
successToast,
|
|
58
|
+
errorToast,
|
|
59
|
+
warningToast,
|
|
60
|
+
neutralToast,
|
|
61
|
+
closeToast
|
|
62
|
+
]);
|
|
25
63
|
};
|
|
26
|
-
function _temp(params, options) {
|
|
27
|
-
return toast.success(/* @__PURE__ */ jsx(Toast, {
|
|
28
|
-
color: "success",
|
|
29
|
-
...params
|
|
30
|
-
}), {
|
|
31
|
-
...options,
|
|
32
|
-
position: params.position,
|
|
33
|
-
data: { variant: params.variant }
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
function _temp2(params_0, options_0) {
|
|
37
|
-
return toast.error(/* @__PURE__ */ jsx(Toast, {
|
|
38
|
-
color: "error",
|
|
39
|
-
...params_0
|
|
40
|
-
}), {
|
|
41
|
-
...options_0,
|
|
42
|
-
position: params_0.position,
|
|
43
|
-
data: { variant: params_0.variant }
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
function _temp3(params_1, options_1) {
|
|
47
|
-
return toast.warning(/* @__PURE__ */ jsx(Toast, {
|
|
48
|
-
color: "warning",
|
|
49
|
-
...params_1
|
|
50
|
-
}), {
|
|
51
|
-
...options_1,
|
|
52
|
-
position: params_1.position,
|
|
53
|
-
data: { variant: params_1.variant }
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
function _temp4(params_2, options_2) {
|
|
57
|
-
return toast.info(/* @__PURE__ */ jsx(Toast, {
|
|
58
|
-
color: "neutral",
|
|
59
|
-
...params_2
|
|
60
|
-
}), {
|
|
61
|
-
...options_2,
|
|
62
|
-
position: params_2.position,
|
|
63
|
-
data: { variant: params_2.variant }
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
function _temp5(id) {
|
|
67
|
-
toast.dismiss(id);
|
|
68
|
-
}
|
|
69
64
|
//#endregion
|
|
70
65
|
export { useToast };
|
|
@@ -4,37 +4,16 @@ import { Checkbox } from "../inputs/Checkbox/Checkbox.js";
|
|
|
4
4
|
import { Modal } from "../overlays/Modal/Modal.js";
|
|
5
5
|
import { Table } from "./Table.js";
|
|
6
6
|
import { useTranslationMemo } from "../../hooks/useTranslationMemo.js";
|
|
7
|
-
import { c } from "react/compiler-runtime";
|
|
8
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { useEffect, useState } from "react";
|
|
8
|
+
import { useCallback, useEffect, useState } from "react";
|
|
10
9
|
import { useTranslation } from "react-i18next";
|
|
11
10
|
//#region src/components/table/ColumnConfig.tsx
|
|
12
|
-
var VisibilityCell = (
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
$[0] = onToggle;
|
|
19
|
-
$[1] = original.id;
|
|
20
|
-
$[2] = t1;
|
|
21
|
-
} else t1 = $[2];
|
|
22
|
-
const t2 = original.label;
|
|
23
|
-
let t3;
|
|
24
|
-
if ($[3] !== original.visible || $[4] !== t1 || $[5] !== t2) {
|
|
25
|
-
t3 = /* @__PURE__ */ jsx(Checkbox, {
|
|
26
|
-
isSelected: original.visible,
|
|
27
|
-
onChange: t1,
|
|
28
|
-
hideLabel: true,
|
|
29
|
-
children: t2
|
|
30
|
-
});
|
|
31
|
-
$[3] = original.visible;
|
|
32
|
-
$[4] = t1;
|
|
33
|
-
$[5] = t2;
|
|
34
|
-
$[6] = t3;
|
|
35
|
-
} else t3 = $[6];
|
|
36
|
-
return t3;
|
|
37
|
-
};
|
|
11
|
+
var VisibilityCell = ({ original, onToggle }) => /* @__PURE__ */ jsx(Checkbox, {
|
|
12
|
+
isSelected: original.visible,
|
|
13
|
+
onChange: () => onToggle(original.id),
|
|
14
|
+
hideLabel: true,
|
|
15
|
+
children: original.label
|
|
16
|
+
});
|
|
38
17
|
var getColumns = (t, handleToggleVisibility) => [{
|
|
39
18
|
id: "name",
|
|
40
19
|
header: t(($) => $.ui.table.column, { ns: "ui" }),
|
|
@@ -49,139 +28,56 @@ var getColumns = (t, handleToggleVisibility) => [{
|
|
|
49
28
|
onToggle: handleToggleVisibility
|
|
50
29
|
})
|
|
51
30
|
}];
|
|
52
|
-
function ColumnConfigModal(
|
|
53
|
-
const $ = c(27);
|
|
54
|
-
const { isOpen, onClose, configColumns, visibleColumns, onVisibilityChange, onOrderChange } = t0;
|
|
31
|
+
function ColumnConfigModal({ isOpen, onClose, configColumns, visibleColumns, onVisibilityChange, onOrderChange }) {
|
|
55
32
|
const { t } = useTranslation("ui");
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
visible: visibleColumns?.[columnId] ?? true
|
|
72
|
-
};
|
|
73
|
-
}));
|
|
74
|
-
};
|
|
75
|
-
t3 = [configColumns, visibleColumns];
|
|
76
|
-
$[1] = configColumns;
|
|
77
|
-
$[2] = visibleColumns;
|
|
78
|
-
$[3] = t2;
|
|
79
|
-
$[4] = t3;
|
|
80
|
-
} else {
|
|
81
|
-
t2 = $[3];
|
|
82
|
-
t3 = $[4];
|
|
83
|
-
}
|
|
84
|
-
useEffect(t2, t3);
|
|
85
|
-
let t4;
|
|
86
|
-
if ($[5] !== onVisibilityChange || $[6] !== visibleColumns) {
|
|
87
|
-
t4 = (columnId_0) => {
|
|
88
|
-
onVisibilityChange({
|
|
89
|
-
...visibleColumns,
|
|
90
|
-
[columnId_0]: !visibleColumns[columnId_0]
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
|
-
$[5] = onVisibilityChange;
|
|
94
|
-
$[6] = visibleColumns;
|
|
95
|
-
$[7] = t4;
|
|
96
|
-
} else t4 = $[7];
|
|
97
|
-
const handleToggleVisibility = t4;
|
|
98
|
-
let t5;
|
|
99
|
-
if ($[8] !== handleToggleVisibility) {
|
|
100
|
-
t5 = (translateFn) => getColumns(translateFn, handleToggleVisibility);
|
|
101
|
-
$[8] = handleToggleVisibility;
|
|
102
|
-
$[9] = t5;
|
|
103
|
-
} else t5 = $[9];
|
|
104
|
-
const columns = useTranslationMemo(t5);
|
|
105
|
-
let t6;
|
|
106
|
-
if ($[10] !== onOrderChange) {
|
|
107
|
-
t6 = (reorderedItems) => {
|
|
108
|
-
setData(reorderedItems);
|
|
109
|
-
onOrderChange(reorderedItems.map(_temp));
|
|
110
|
-
};
|
|
111
|
-
$[10] = onOrderChange;
|
|
112
|
-
$[11] = t6;
|
|
113
|
-
} else t6 = $[11];
|
|
114
|
-
const handleReorder = t6;
|
|
115
|
-
if (!isOpen) return null;
|
|
116
|
-
let t7;
|
|
117
|
-
if ($[12] !== t) {
|
|
118
|
-
t7 = t(_temp2);
|
|
119
|
-
$[12] = t;
|
|
120
|
-
$[13] = t7;
|
|
121
|
-
} else t7 = $[13];
|
|
122
|
-
let t8;
|
|
123
|
-
if ($[14] !== t7) {
|
|
124
|
-
t8 = /* @__PURE__ */ jsx(Typography, {
|
|
125
|
-
as: "h2",
|
|
126
|
-
variant: "prominent-1",
|
|
127
|
-
size: "title-5",
|
|
128
|
-
children: t7
|
|
129
|
-
});
|
|
130
|
-
$[14] = t7;
|
|
131
|
-
$[15] = t8;
|
|
132
|
-
} else t8 = $[15];
|
|
133
|
-
let t9;
|
|
134
|
-
if ($[16] !== columns || $[17] !== data || $[18] !== handleReorder) {
|
|
135
|
-
t9 = /* @__PURE__ */ jsx("div", {
|
|
136
|
-
className: "max-h-96 overflow-y-auto",
|
|
137
|
-
children: /* @__PURE__ */ jsx(Table, {
|
|
138
|
-
items: data,
|
|
139
|
-
columns,
|
|
140
|
-
showCellBorder: true,
|
|
141
|
-
className: "w-full",
|
|
142
|
-
enableDragDrop: true,
|
|
143
|
-
getRowId: _temp3,
|
|
144
|
-
onReorder: handleReorder
|
|
145
|
-
})
|
|
33
|
+
const [data, setData] = useState([]);
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
setData(configColumns.map((column) => {
|
|
36
|
+
const columnId = column.id ?? column.accessorKey;
|
|
37
|
+
return {
|
|
38
|
+
id: columnId,
|
|
39
|
+
label: column.header,
|
|
40
|
+
visible: visibleColumns?.[columnId] ?? true
|
|
41
|
+
};
|
|
42
|
+
}));
|
|
43
|
+
}, [configColumns, visibleColumns]);
|
|
44
|
+
const handleToggleVisibility = useCallback((columnId) => {
|
|
45
|
+
onVisibilityChange({
|
|
46
|
+
...visibleColumns,
|
|
47
|
+
[columnId]: !visibleColumns[columnId]
|
|
146
48
|
});
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
if (
|
|
154
|
-
|
|
49
|
+
}, [visibleColumns, onVisibilityChange]);
|
|
50
|
+
const columns = useTranslationMemo(useCallback((translateFn) => getColumns(translateFn, handleToggleVisibility), [handleToggleVisibility]));
|
|
51
|
+
const handleReorder = useCallback((reorderedItems) => {
|
|
52
|
+
setData(reorderedItems);
|
|
53
|
+
onOrderChange(reorderedItems.map((item) => item.id));
|
|
54
|
+
}, [onOrderChange]);
|
|
55
|
+
if (!isOpen) return null;
|
|
56
|
+
return /* @__PURE__ */ jsx(Modal, {
|
|
57
|
+
isOpen,
|
|
58
|
+
onClose,
|
|
59
|
+
showCloseIcon: true,
|
|
60
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
155
61
|
className: "flex flex-col gap-2 p-4",
|
|
156
|
-
children: [
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
return t11;
|
|
176
|
-
}
|
|
177
|
-
function _temp3(row) {
|
|
178
|
-
return row.id;
|
|
179
|
-
}
|
|
180
|
-
function _temp2($) {
|
|
181
|
-
return $.ui.table.configureColumns;
|
|
182
|
-
}
|
|
183
|
-
function _temp(item) {
|
|
184
|
-
return item.id;
|
|
62
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
63
|
+
as: "h2",
|
|
64
|
+
variant: "prominent-1",
|
|
65
|
+
size: "title-5",
|
|
66
|
+
children: t(($) => $.ui.table.configureColumns)
|
|
67
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
68
|
+
className: "max-h-96 overflow-y-auto",
|
|
69
|
+
children: /* @__PURE__ */ jsx(Table, {
|
|
70
|
+
items: data,
|
|
71
|
+
columns,
|
|
72
|
+
showCellBorder: true,
|
|
73
|
+
className: "w-full",
|
|
74
|
+
enableDragDrop: true,
|
|
75
|
+
getRowId: (row) => row.id,
|
|
76
|
+
onReorder: handleReorder
|
|
77
|
+
})
|
|
78
|
+
})]
|
|
79
|
+
})
|
|
80
|
+
});
|
|
185
81
|
}
|
|
186
82
|
//#endregion
|
|
187
83
|
export { ColumnConfigModal };
|
|
@@ -1,79 +1,28 @@
|
|
|
1
1
|
import { Loader } from "../status/Loader/Loader.js";
|
|
2
2
|
import { useIntersectionObserver } from "../../hooks/useIntersectionObserver.js";
|
|
3
3
|
import { Table } from "./Table.js";
|
|
4
|
-
import { c } from "react/compiler-runtime";
|
|
5
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { useCallback } from "react";
|
|
6
6
|
//#region src/components/table/InfiniteTable.tsx
|
|
7
|
-
var InfiniteTable = (
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
let hasNextPage;
|
|
11
|
-
let rest;
|
|
12
|
-
let t1;
|
|
13
|
-
if ($[0] !== t0) {
|
|
14
|
-
({hasNextPage, isFetchingNextPage: t1, fetchNextPage, ...rest} = t0);
|
|
15
|
-
$[0] = t0;
|
|
16
|
-
$[1] = fetchNextPage;
|
|
17
|
-
$[2] = hasNextPage;
|
|
18
|
-
$[3] = rest;
|
|
19
|
-
$[4] = t1;
|
|
20
|
-
} else {
|
|
21
|
-
fetchNextPage = $[1];
|
|
22
|
-
hasNextPage = $[2];
|
|
23
|
-
rest = $[3];
|
|
24
|
-
t1 = $[4];
|
|
25
|
-
}
|
|
26
|
-
const isFetchingNextPage = t1 === void 0 ? false : t1;
|
|
27
|
-
let t2;
|
|
28
|
-
if ($[5] !== fetchNextPage || $[6] !== hasNextPage || $[7] !== isFetchingNextPage) {
|
|
29
|
-
t2 = () => {
|
|
7
|
+
var InfiniteTable = ({ hasNextPage, isFetchingNextPage = false, fetchNextPage, ...rest }) => {
|
|
8
|
+
const { ref } = useIntersectionObserver({
|
|
9
|
+
onIntersection: useCallback(() => {
|
|
30
10
|
if (!isFetchingNextPage && hasNextPage) fetchNextPage();
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
onIntersection: handleLoadMore,
|
|
42
|
-
rootMargin: "100px"
|
|
43
|
-
};
|
|
44
|
-
$[9] = handleLoadMore;
|
|
45
|
-
$[10] = t3;
|
|
46
|
-
} else t3 = $[10];
|
|
47
|
-
const { ref } = useIntersectionObserver(t3);
|
|
48
|
-
let t4;
|
|
49
|
-
if ($[11] !== rest) {
|
|
50
|
-
t4 = /* @__PURE__ */ jsx(Table, { ...rest });
|
|
51
|
-
$[11] = rest;
|
|
52
|
-
$[12] = t4;
|
|
53
|
-
} else t4 = $[12];
|
|
54
|
-
let t5;
|
|
55
|
-
if ($[13] !== hasNextPage || $[14] !== isFetchingNextPage || $[15] !== ref) {
|
|
56
|
-
t5 = (hasNextPage || isFetchingNextPage) && /* @__PURE__ */ jsx("div", {
|
|
11
|
+
}, [
|
|
12
|
+
isFetchingNextPage,
|
|
13
|
+
hasNextPage,
|
|
14
|
+
fetchNextPage
|
|
15
|
+
]),
|
|
16
|
+
rootMargin: "100px"
|
|
17
|
+
});
|
|
18
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
19
|
+
className: "flex flex-col",
|
|
20
|
+
children: [/* @__PURE__ */ jsx(Table, { ...rest }), (hasNextPage || isFetchingNextPage) && /* @__PURE__ */ jsx("div", {
|
|
57
21
|
ref,
|
|
58
22
|
className: "flex justify-center py-4",
|
|
59
23
|
children: /* @__PURE__ */ jsx(Loader, {})
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
$[14] = isFetchingNextPage;
|
|
63
|
-
$[15] = ref;
|
|
64
|
-
$[16] = t5;
|
|
65
|
-
} else t5 = $[16];
|
|
66
|
-
let t6;
|
|
67
|
-
if ($[17] !== t4 || $[18] !== t5) {
|
|
68
|
-
t6 = /* @__PURE__ */ jsxs("div", {
|
|
69
|
-
className: "flex flex-col",
|
|
70
|
-
children: [t4, t5]
|
|
71
|
-
});
|
|
72
|
-
$[17] = t4;
|
|
73
|
-
$[18] = t5;
|
|
74
|
-
$[19] = t6;
|
|
75
|
-
} else t6 = $[19];
|
|
76
|
-
return t6;
|
|
24
|
+
})]
|
|
25
|
+
});
|
|
77
26
|
};
|
|
78
27
|
//#endregion
|
|
79
28
|
export { InfiniteTable };
|
|
@@ -1,94 +1,28 @@
|
|
|
1
1
|
import { Pagination } from "../shared/pagination/Pagination.js";
|
|
2
2
|
import { Table } from "./Table.js";
|
|
3
|
-
import { c } from "react/compiler-runtime";
|
|
4
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
//#region src/components/table/PaginatedTable.tsx
|
|
6
|
-
var PaginatedTable = (
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
let rest;
|
|
11
|
-
let setPagination;
|
|
12
|
-
let totalItems;
|
|
13
|
-
if ($[0] !== t0) {
|
|
14
|
-
({pagination, setPagination, items, totalItems, ...rest} = t0);
|
|
15
|
-
$[0] = t0;
|
|
16
|
-
$[1] = items;
|
|
17
|
-
$[2] = pagination;
|
|
18
|
-
$[3] = rest;
|
|
19
|
-
$[4] = setPagination;
|
|
20
|
-
$[5] = totalItems;
|
|
21
|
-
} else {
|
|
22
|
-
items = $[1];
|
|
23
|
-
pagination = $[2];
|
|
24
|
-
rest = $[3];
|
|
25
|
-
setPagination = $[4];
|
|
26
|
-
totalItems = $[5];
|
|
27
|
-
}
|
|
28
|
-
let t1;
|
|
29
|
-
if ($[6] !== items) {
|
|
30
|
-
t1 = items ?? [];
|
|
31
|
-
$[6] = items;
|
|
32
|
-
$[7] = t1;
|
|
33
|
-
} else t1 = $[7];
|
|
34
|
-
let t2;
|
|
35
|
-
if ($[8] !== rest || $[9] !== t1) {
|
|
36
|
-
t2 = /* @__PURE__ */ jsx(Table, {
|
|
5
|
+
var PaginatedTable = ({ pagination, setPagination, items, totalItems, ...rest }) => {
|
|
6
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
7
|
+
className: "flex flex-col gap-4",
|
|
8
|
+
children: [/* @__PURE__ */ jsx(Table, {
|
|
37
9
|
...rest,
|
|
38
|
-
items:
|
|
39
|
-
})
|
|
40
|
-
$[8] = rest;
|
|
41
|
-
$[9] = t1;
|
|
42
|
-
$[10] = t2;
|
|
43
|
-
} else t2 = $[10];
|
|
44
|
-
const t3 = totalItems ?? 0;
|
|
45
|
-
let t4;
|
|
46
|
-
let t5;
|
|
47
|
-
if ($[11] !== pagination || $[12] !== setPagination) {
|
|
48
|
-
t4 = (page) => setPagination({
|
|
49
|
-
...pagination,
|
|
50
|
-
pageIndex: page
|
|
51
|
-
});
|
|
52
|
-
t5 = (pageSize) => setPagination({
|
|
53
|
-
...pagination,
|
|
54
|
-
pageSize,
|
|
55
|
-
pageIndex: 1
|
|
56
|
-
});
|
|
57
|
-
$[11] = pagination;
|
|
58
|
-
$[12] = setPagination;
|
|
59
|
-
$[13] = t4;
|
|
60
|
-
$[14] = t5;
|
|
61
|
-
} else {
|
|
62
|
-
t4 = $[13];
|
|
63
|
-
t5 = $[14];
|
|
64
|
-
}
|
|
65
|
-
let t6;
|
|
66
|
-
if ($[15] !== pagination.pageIndex || $[16] !== pagination.pageSize || $[17] !== t3 || $[18] !== t4 || $[19] !== t5) {
|
|
67
|
-
t6 = /* @__PURE__ */ jsx(Pagination, {
|
|
10
|
+
items: items ?? []
|
|
11
|
+
}), /* @__PURE__ */ jsx(Pagination, {
|
|
68
12
|
page: pagination.pageIndex,
|
|
69
13
|
pageSize: pagination.pageSize,
|
|
70
|
-
totalItems:
|
|
71
|
-
onPageChange:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if ($[21] !== t2 || $[22] !== t6) {
|
|
83
|
-
t7 = /* @__PURE__ */ jsxs("div", {
|
|
84
|
-
className: "flex flex-col gap-4",
|
|
85
|
-
children: [t2, t6]
|
|
86
|
-
});
|
|
87
|
-
$[21] = t2;
|
|
88
|
-
$[22] = t6;
|
|
89
|
-
$[23] = t7;
|
|
90
|
-
} else t7 = $[23];
|
|
91
|
-
return t7;
|
|
14
|
+
totalItems: totalItems ?? 0,
|
|
15
|
+
onPageChange: (page) => setPagination({
|
|
16
|
+
...pagination,
|
|
17
|
+
pageIndex: page
|
|
18
|
+
}),
|
|
19
|
+
onPageSizeChange: (pageSize) => setPagination({
|
|
20
|
+
...pagination,
|
|
21
|
+
pageSize,
|
|
22
|
+
pageIndex: 1
|
|
23
|
+
})
|
|
24
|
+
})]
|
|
25
|
+
});
|
|
92
26
|
};
|
|
93
27
|
//#endregion
|
|
94
28
|
export { PaginatedTable };
|