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