@povio/ui 0.0.7 → 0.0.8
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/index.js +62585 -0
- package/package.json +5 -57
- package/povio-ui-0.0.8.tgz +0 -0
- package/{dist → src}/components/Menu/MenuDesktop.d.ts +1 -1
- package/{dist → src}/components/Menu/MenuItem.d.ts +1 -1
- package/{dist → src}/components/Menu/MenuMobile.d.ts +1 -1
- package/{dist → src}/components/Menu/MenuPopover.d.ts +1 -1
- package/{dist → src}/components/buttons/Button/Button.d.ts +1 -1
- package/{dist → src}/components/buttons/Button/button.cva.d.ts +1 -1
- package/{dist → src}/components/buttons/IconButton/IconButton.d.ts +1 -1
- package/{dist → src}/components/buttons/InlineIconButton/InlineIconButton.d.ts +1 -1
- package/{dist → src}/components/buttons/PillButton/PillButton.d.ts +2 -2
- package/{dist → src}/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
- package/{dist → src}/components/buttons/SplitButton/SplitButton.d.ts +2 -2
- package/{dist → src}/components/buttons/TextButton/TextButton.d.ts +3 -3
- package/{dist → src}/components/buttons/ToggleButton/ToggleButton.d.ts +3 -3
- package/{dist → src}/components/buttons/shared/ButtonContent.d.ts +3 -3
- package/{dist → src}/components/inputs/Checkbox/Checkbox.d.ts +3 -3
- package/{dist → src}/components/inputs/Checkbox/CheckboxCheckmark.d.ts +1 -1
- package/{dist → src}/components/inputs/Checkbox/checkbox.cva.d.ts +1 -1
- package/{dist → src}/components/inputs/DateTime/DatePicker/DatePicker.d.ts +3 -3
- package/{dist → src}/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +3 -3
- package/{dist → src}/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +3 -3
- package/{dist → src}/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -3
- package/{dist → src}/components/inputs/DateTime/shared/CalendarHeader.d.ts +1 -1
- package/{dist → src}/components/inputs/DateTime/shared/DatePickerInput.d.ts +2 -2
- package/{dist → src}/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -2
- package/{dist → src}/components/inputs/File/fileUpload.types.d.ts +3 -3
- package/{dist → src}/components/inputs/File/inputUpload.types.d.ts +2 -2
- package/{dist → src}/components/inputs/File/shared/FileCard.d.ts +1 -1
- package/{dist → src}/components/inputs/File/shared/FileCardList.d.ts +1 -1
- package/{dist → src}/components/inputs/File/shared/FileUploadContent.d.ts +1 -1
- package/{dist → src}/components/inputs/File/shared/FileUploadContentEmpty.d.ts +1 -1
- package/{dist → src}/components/inputs/File/shared/FileUploadContentError.d.ts +1 -1
- package/{dist → src}/components/inputs/File/shared/FileUploadContentFilled.d.ts +1 -1
- package/{dist → src}/components/inputs/File/shared/FileUploadContentLoading.d.ts +1 -1
- package/{dist → src}/components/inputs/File/shared/InputUploadContent.d.ts +1 -1
- package/{dist → src}/components/inputs/FormField/FormField.d.ts +3 -3
- package/src/components/inputs/FormField/FormFieldLabel.d.ts +12 -0
- package/{dist → src}/components/inputs/Input/NumberInput/NumberInput.d.ts +4 -4
- package/{dist → src}/components/inputs/Input/PasswordInput/PasswordInput.d.ts +2 -2
- package/{dist → src}/components/inputs/Input/TextArea/TextArea.d.ts +3 -3
- package/{dist → src}/components/inputs/Input/TextInput/TextInput.d.ts +5 -4
- package/{dist → src}/components/inputs/Input/shared/InputContent.d.ts +3 -3
- package/{dist → src}/components/inputs/Inputs/Form.d.ts +2 -2
- package/{dist → src}/components/inputs/Inputs/InputItem.d.ts +16 -16
- package/{dist → src}/components/inputs/RadioGroup/RadioGroup.d.ts +3 -3
- package/{dist → src}/components/inputs/RadioGroup/radio.cva.d.ts +1 -1
- package/{dist → src}/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +3 -3
- package/{dist → src}/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -3
- package/{dist → src}/components/inputs/Selection/Select/Select.d.ts +3 -3
- package/{dist → src}/components/inputs/Selection/shared/SelectBase.d.ts +5 -4
- package/{dist → src}/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/{dist → src}/components/inputs/Selection/shared/SelectInput.d.ts +6 -6
- package/src/components/inputs/Selection/shared/SelectInputTags.d.ts +11 -0
- package/src/components/inputs/Selection/shared/SelectListBox.d.ts +9 -0
- package/{dist → src}/components/inputs/Selection/shared/SelectListBoxItem.d.ts +2 -2
- package/{dist → src}/components/inputs/Selection/shared/SelectListBoxItemSelectAll.d.ts +1 -1
- package/{dist → src}/components/inputs/Selection/shared/SelectListBoxLoadingItem.d.ts +1 -1
- package/{dist → src}/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/{dist → src}/components/inputs/Selection/shared/select.context.d.ts +2 -2
- package/{dist → src}/components/inputs/Selection/shared/select.types.d.ts +9 -1
- package/{dist → src}/components/inputs/Selection/shared/useSelectItems.d.ts +2 -2
- package/{dist → src}/components/inputs/Slider/Slider.d.ts +2 -2
- package/{dist → src}/components/inputs/TextEditor/TextEditor.d.ts +2 -2
- package/{dist → src}/components/inputs/TextEditor/Toolbar/HyperlinkAction.d.ts +1 -1
- package/{dist → src}/components/inputs/TextEditor/Toolbar/TextAlignSelect.d.ts +1 -1
- package/{dist → src}/components/inputs/TextEditor/Toolbar/TextColorSelect.d.ts +1 -1
- package/{dist → src}/components/inputs/TextEditor/Toolbar/TextHighlightSelect.d.ts +1 -1
- package/{dist → src}/components/inputs/TextEditor/Toolbar/TextListActions.d.ts +1 -1
- package/{dist → src}/components/inputs/TextEditor/Toolbar/TextMarksActions.d.ts +1 -1
- package/{dist → src}/components/inputs/TextEditor/Toolbar/TextStyleSelect.d.ts +1 -1
- package/{dist → src}/components/inputs/Toggle/Toggle.d.ts +3 -3
- package/{dist → src}/components/inputs/Toggle/toggle.cva.d.ts +1 -1
- package/{dist → src}/components/inputs/shared/CheckContent.d.ts +1 -1
- package/src/components/inputs/shared/InputClear.d.ts +8 -0
- package/{dist → src}/components/inputs/shared/label.cva.d.ts +1 -1
- package/{dist → src}/components/overlays/ActionModal/ActionModal.d.ts +2 -2
- package/{dist → src}/components/overlays/Modal/Modal.d.ts +1 -1
- package/{dist → src}/components/overlays/Tooltip/Tooltip.d.ts +4 -2
- package/src/components/overlays/Tooltip/tooltip.cva.d.ts +21 -0
- package/{dist → src}/components/segment/segment.types.d.ts +1 -1
- package/{dist → src}/components/shared/pagination/PaginationList.d.ts +1 -1
- package/{dist → src}/components/status/Alert/Alert.d.ts +1 -1
- package/{dist → src}/components/status/Loader/Loader.d.ts +1 -1
- package/{dist → src}/components/status/Toast/Toast.d.ts +1 -1
- package/{dist → src}/components/status/Toast/toast.cva.d.ts +1 -1
- package/{dist → src}/components/table/table.cva.d.ts +7 -3
- package/{dist → src}/components/text/Link/Link.d.ts +1 -1
- package/{dist → src}/components/text/Tag/Tag.d.ts +1 -1
- package/{dist → src}/components/text/Typography/Typography.d.ts +1 -1
- package/{dist → src}/config/confirmation.context.d.ts +1 -1
- package/{dist → src}/config/uiConfig.context.d.ts +10 -8
- package/{dist → src}/config/uiStyle.context.d.ts +15 -14
- package/{dist → src}/helpers/dynamicInputs.d.ts +4 -2
- package/{dist → src}/hooks/useFormAutosave.d.ts +2 -2
- package/{dist → src}/index.d.ts +12 -6
- package/{dist → src}/types/react-query.d.ts +1 -1
- package/src/utils/vendor/acl/AclGuard.d.ts +8 -0
- package/src/utils/vendor/acl/Can.d.ts +9 -0
- package/src/utils/vendor/acl/ability.context.d.ts +15 -0
- package/src/utils/vendor/acl/appAbility.types.d.ts +3 -0
- package/src/utils/vendor/auth/AuthGuard.d.ts +6 -0
- package/src/utils/vendor/auth/auth.context.d.ts +21 -0
- package/src/utils/vendor/auth/withPrivateAuthGuard.d.ts +6 -0
- package/{dist/utils/rest/rest-client.d.ts → src/utils/vendor/rest-client.types.d.ts} +8 -14
- package/{dist → src}/utils/zod.utils.d.ts +2 -1
- package/vite.config.d.ts +2 -0
- package/dist/assets/icons/AlignCenter.js +0 -21
- package/dist/assets/icons/AlignLeft.js +0 -21
- package/dist/assets/icons/AlignLeftRight.js +0 -21
- package/dist/assets/icons/AlignRight.js +0 -21
- package/dist/assets/icons/ArrowDropDown.js +0 -21
- package/dist/assets/icons/ArrowDropUp.js +0 -21
- package/dist/assets/icons/ArrowLeft.js +0 -21
- package/dist/assets/icons/ArrowRight.js +0 -21
- package/dist/assets/icons/Bold.js +0 -21
- package/dist/assets/icons/BulletedList.js +0 -21
- package/dist/assets/icons/Calendar.js +0 -23
- package/dist/assets/icons/Check.js +0 -23
- package/dist/assets/icons/CheckCircle.js +0 -21
- package/dist/assets/icons/CheckboxCheckmark.js +0 -24
- package/dist/assets/icons/CheckboxIndeterminate.js +0 -24
- package/dist/assets/icons/ChevronDown.js +0 -23
- package/dist/assets/icons/ChevronLeft.js +0 -23
- package/dist/assets/icons/ChevronRight.js +0 -23
- package/dist/assets/icons/ChevronUp.js +0 -23
- package/dist/assets/icons/ChevronsLeft.js +0 -34
- package/dist/assets/icons/ChevronsRight.js +0 -34
- package/dist/assets/icons/Clock.js +0 -21
- package/dist/assets/icons/Close.js +0 -21
- package/dist/assets/icons/DateTime.js +0 -25
- package/dist/assets/icons/Drag.js +0 -21
- package/dist/assets/icons/File.js +0 -23
- package/dist/assets/icons/Highlight.js +0 -21
- package/dist/assets/icons/HighlightOn.js +0 -30
- package/dist/assets/icons/Info.js +0 -34
- package/dist/assets/icons/Italic.js +0 -21
- package/dist/assets/icons/Link.js +0 -21
- package/dist/assets/icons/Menu.js +0 -23
- package/dist/assets/icons/NumberedList.js +0 -21
- package/dist/assets/icons/PointerHorizontal.js +0 -21
- package/dist/assets/icons/PointerVertical.js +0 -21
- package/dist/assets/icons/Send.js +0 -23
- package/dist/assets/icons/Strikethrough.js +0 -21
- package/dist/assets/icons/TextColor.js +0 -30
- package/dist/assets/icons/Today.js +0 -21
- package/dist/assets/icons/Underlined.js +0 -23
- package/dist/assets/icons/Upload.js +0 -30
- package/dist/assets/icons/View.js +0 -18
- package/dist/assets/icons/ViewOff.js +0 -18
- package/dist/assets/icons/Warningfilled.js +0 -23
- package/dist/assets/locales/en/translation.json.js +0 -14
- package/dist/assets/locales/sl/translation.json.js +0 -14
- package/dist/components/Menu/Menu.js +0 -14
- package/dist/components/Menu/MenuDesktop.js +0 -68
- package/dist/components/Menu/MenuItem.js +0 -33
- package/dist/components/Menu/MenuMobile.js +0 -78
- package/dist/components/Menu/MenuPopover.js +0 -38
- package/dist/components/buttons/Button/Button.js +0 -68
- package/dist/components/buttons/Button/button.cva.js +0 -672
- package/dist/components/buttons/IconButton/IconButton.js +0 -17
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +0 -18
- package/dist/components/buttons/PillButton/PillButton.js +0 -44
- package/dist/components/buttons/PillButton/pillButton.cva.js +0 -86
- package/dist/components/buttons/SplitButton/SplitButton.js +0 -62
- package/dist/components/buttons/TextButton/TextButton.js +0 -18
- package/dist/components/buttons/ToggleButton/ToggleButton.js +0 -21
- package/dist/components/buttons/shared/ButtonContent.js +0 -53
- package/dist/components/buttons/shared/buttonContent.cva.js +0 -16
- package/dist/components/inputs/Checkbox/Checkbox.js +0 -81
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +0 -49
- package/dist/components/inputs/Checkbox/checkbox.cva.js +0 -47
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +0 -234
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +0 -668
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +0 -248
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +0 -224
- package/dist/components/inputs/DateTime/shared/Calendar.js +0 -85
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +0 -160
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +0 -67
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +0 -89
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +0 -203
- package/dist/components/inputs/DateTime/shared/DateField.js +0 -62
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +0 -163
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +0 -54
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +0 -76
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +0 -41
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +0 -82
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +0 -131
- package/dist/components/inputs/DateTime/shared/TimeField.js +0 -26
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +0 -186
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +0 -107
- package/dist/components/inputs/DateTime/shared/YearPicker.js +0 -89
- package/dist/components/inputs/File/FileUpload.js +0 -254
- package/dist/components/inputs/File/FileUploadContainer.js +0 -17
- package/dist/components/inputs/File/InputUpload.js +0 -176
- package/dist/components/inputs/File/shared/FileCard.js +0 -67
- package/dist/components/inputs/File/shared/FileCardList.js +0 -20
- package/dist/components/inputs/File/shared/FileProgressBar.js +0 -32
- package/dist/components/inputs/File/shared/FileUploadContent.js +0 -92
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +0 -92
- package/dist/components/inputs/File/shared/FileUploadContentError.js +0 -167
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +0 -176
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +0 -128
- package/dist/components/inputs/File/shared/InputUploadContent.js +0 -68
- package/dist/components/inputs/File/shared/InputUploadFilled.js +0 -31
- package/dist/components/inputs/File/shared/fileUpload.cva.js +0 -57
- package/dist/components/inputs/File/shared/inputUploadButton.cva.js +0 -48
- package/dist/components/inputs/FormField/FormField.js +0 -54
- package/dist/components/inputs/FormField/FormFieldError.js +0 -16
- package/dist/components/inputs/FormField/FormFieldHeader.js +0 -57
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +0 -20
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +0 -11
- package/dist/components/inputs/FormField/FormFieldLabel.js +0 -31
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +0 -157
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +0 -26
- package/dist/components/inputs/Input/TextArea/TextArea.js +0 -149
- package/dist/components/inputs/Input/TextInput/TextInput.js +0 -147
- package/dist/components/inputs/Input/shared/InputContent.js +0 -106
- package/dist/components/inputs/Inputs/Form.js +0 -68
- package/dist/components/inputs/Inputs/InputItem.js +0 -63
- package/dist/components/inputs/Inputs/Inputs.js +0 -32
- package/dist/components/inputs/RadioGroup/RadioGroup.js +0 -113
- package/dist/components/inputs/RadioGroup/radio.cva.js +0 -47
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +0 -39
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +0 -25
- package/dist/components/inputs/Selection/Select/Select.js +0 -32
- package/dist/components/inputs/Selection/shared/SelectBase.js +0 -24
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +0 -211
- package/dist/components/inputs/Selection/shared/SelectInput.js +0 -237
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/SelectListBox.js +0 -97
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +0 -78
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +0 -45
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +0 -47
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +0 -42
- package/dist/components/inputs/Selection/shared/SelectMobile.js +0 -161
- package/dist/components/inputs/Selection/shared/select.context.js +0 -243
- package/dist/components/inputs/Selection/shared/useSelectItems.js +0 -94
- package/dist/components/inputs/Slider/Slider.js +0 -137
- package/dist/components/inputs/TextEditor/TextEditor.js +0 -223
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +0 -34
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +0 -80
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +0 -92
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +0 -56
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +0 -33
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +0 -31
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +0 -37
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +0 -51
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +0 -73
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +0 -61
- package/dist/components/inputs/TextEditor/textEditor.types.js +0 -40
- package/dist/components/inputs/Toggle/Toggle.js +0 -65
- package/dist/components/inputs/Toggle/toggle.cva.js +0 -44
- package/dist/components/inputs/shared/CheckContent.js +0 -22
- package/dist/components/inputs/shared/InputClear.d.ts +0 -6
- package/dist/components/inputs/shared/InputClear.js +0 -26
- package/dist/components/inputs/shared/input.cva.js +0 -167
- package/dist/components/inputs/shared/label.cva.js +0 -133
- package/dist/components/outline.clsx.js +0 -11
- package/dist/components/overlays/ActionModal/ActionModal.js +0 -80
- package/dist/components/overlays/BottomSheet/BottomSheet.js +0 -256
- package/dist/components/overlays/Drawer/Drawer.js +0 -84
- package/dist/components/overlays/Modal/Modal.js +0 -53
- package/dist/components/overlays/Modal/modal.cva.js +0 -53
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +0 -71
- package/dist/components/overlays/Tooltip/Tooltip.js +0 -44
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +0 -27
- package/dist/components/segment/Segment.js +0 -113
- package/dist/components/segment/SegmentItem.js +0 -41
- package/dist/components/shared/pagination/Pagination.js +0 -75
- package/dist/components/shared/pagination/PaginationList.js +0 -145
- package/dist/components/shared/pagination/minWidth.cva.js +0 -15
- package/dist/components/status/Alert/Alert.js +0 -41
- package/dist/components/status/Alert/alert.cva.js +0 -64
- package/dist/components/status/Loader/Loader.js +0 -37
- package/dist/components/status/Loader/loader.cva.js +0 -27
- package/dist/components/status/Toast/Toast.js +0 -64
- package/dist/components/status/Toast/toast.cva.js +0 -150
- package/dist/components/status/Toast/useToast.js +0 -83
- package/dist/components/status/shared/status.cva.js +0 -62
- package/dist/components/table/CellText.js +0 -18
- package/dist/components/table/ColumnConfig.js +0 -124
- package/dist/components/table/HeaderText.js +0 -15
- package/dist/components/table/InfiniteTable.js +0 -40
- package/dist/components/table/PaginatedTable.js +0 -33
- package/dist/components/table/Table.js +0 -352
- package/dist/components/table/table.cva.js +0 -37
- package/dist/components/text/Link/Link.js +0 -18
- package/dist/components/text/Link/link.cva.js +0 -18
- package/dist/components/text/Tag/Tag.js +0 -49
- package/dist/components/text/Tag/tag.cva.js +0 -59
- package/dist/components/text/Typography/Typography.js +0 -22
- package/dist/components/text/Typography/typography.cva.js +0 -100
- package/dist/config/confirmation.context.js +0 -107
- package/dist/config/i18n.js +0 -15
- package/dist/config/router.context.js +0 -43
- package/dist/config/uiConfig.context.js +0 -62
- package/dist/config/uiStyle.context.js +0 -16
- package/dist/helpers/dynamicColumns.js +0 -359
- package/dist/helpers/dynamicInputs.js +0 -214
- package/dist/hooks/useAutosave.js +0 -80
- package/dist/hooks/useBreakpoint.js +0 -20
- package/dist/hooks/useDebounceCallback.js +0 -29
- package/dist/hooks/useDeepCompare.js +0 -25
- package/dist/hooks/useFilters.js +0 -120
- package/dist/hooks/useForm.js +0 -22
- package/dist/hooks/useFormAutosave.js +0 -67
- package/dist/hooks/useIntersectionObserver.js +0 -27
- package/dist/hooks/useLocalStorage.js +0 -63
- package/dist/hooks/useLongPressRepeat.js +0 -33
- package/dist/hooks/usePagination.js +0 -35
- package/dist/hooks/useScrollableListBox.js +0 -30
- package/dist/hooks/useSingletonMutation.d.ts +0 -4
- package/dist/hooks/useSingletonMutation.js +0 -27
- package/dist/hooks/useSorting.js +0 -30
- package/dist/hooks/useStateAndRef.js +0 -17
- package/dist/hooks/useTableColumnConfig.js +0 -59
- package/dist/hooks/useTableNav.js +0 -409
- package/dist/hooks/useTranslationMemo.js +0 -14
- package/dist/index.js +0 -280
- package/dist/utils/array.utils.js +0 -12
- package/dist/utils/compoundMapper.js +0 -14
- package/dist/utils/date-time.utils.js +0 -77
- package/dist/utils/date.utils.js +0 -12
- package/dist/utils/dom.utils.js +0 -13
- package/dist/utils/file.utils.js +0 -63
- package/dist/utils/isEqual.js +0 -94
- package/dist/utils/logger.js +0 -19
- package/dist/utils/object.utils.js +0 -53
- package/dist/utils/queries.utils.js +0 -9
- package/dist/utils/rest/interceptors/logging.interceptor.d.ts +0 -2
- package/dist/utils/rest/interceptors/logging.interceptor.js +0 -17
- package/dist/utils/rest/interceptors/response.interceptor.d.ts +0 -2
- package/dist/utils/rest/interceptors/response.interceptor.js +0 -25
- package/dist/utils/rest/interceptors/rest-interceptor.js +0 -21
- package/dist/utils/rest/rest-client.js +0 -62
- package/dist/utils/rest/rest.utils.js +0 -51
- package/dist/utils/routing.utils.js +0 -15
- package/dist/utils/string.utils.js +0 -12
- package/dist/utils/vendor/error-handling.js +0 -119
- package/dist/utils/zod.utils.js +0 -25
- /package/{dist → src}/assets/icons/AlignCenter.d.ts +0 -0
- /package/{dist → src}/assets/icons/AlignLeft.d.ts +0 -0
- /package/{dist → src}/assets/icons/AlignLeftRight.d.ts +0 -0
- /package/{dist → src}/assets/icons/AlignRight.d.ts +0 -0
- /package/{dist → src}/assets/icons/ArrowDropDown.d.ts +0 -0
- /package/{dist → src}/assets/icons/ArrowDropUp.d.ts +0 -0
- /package/{dist → src}/assets/icons/ArrowLeft.d.ts +0 -0
- /package/{dist → src}/assets/icons/ArrowRight.d.ts +0 -0
- /package/{dist → src}/assets/icons/Bold.d.ts +0 -0
- /package/{dist → src}/assets/icons/BulletedList.d.ts +0 -0
- /package/{dist → src}/assets/icons/Calendar.d.ts +0 -0
- /package/{dist → src}/assets/icons/Check.d.ts +0 -0
- /package/{dist → src}/assets/icons/CheckCircle.d.ts +0 -0
- /package/{dist → src}/assets/icons/CheckboxCheckmark.d.ts +0 -0
- /package/{dist → src}/assets/icons/CheckboxIndeterminate.d.ts +0 -0
- /package/{dist → src}/assets/icons/ChevronDown.d.ts +0 -0
- /package/{dist → src}/assets/icons/ChevronLeft.d.ts +0 -0
- /package/{dist → src}/assets/icons/ChevronRight.d.ts +0 -0
- /package/{dist → src}/assets/icons/ChevronUp.d.ts +0 -0
- /package/{dist → src}/assets/icons/ChevronsLeft.d.ts +0 -0
- /package/{dist → src}/assets/icons/ChevronsRight.d.ts +0 -0
- /package/{dist → src}/assets/icons/Clock.d.ts +0 -0
- /package/{dist → src}/assets/icons/Close.d.ts +0 -0
- /package/{dist → src}/assets/icons/DateTime.d.ts +0 -0
- /package/{dist → src}/assets/icons/Drag.d.ts +0 -0
- /package/{dist → src}/assets/icons/File.d.ts +0 -0
- /package/{dist → src}/assets/icons/Highlight.d.ts +0 -0
- /package/{dist → src}/assets/icons/HighlightOn.d.ts +0 -0
- /package/{dist → src}/assets/icons/Info.d.ts +0 -0
- /package/{dist → src}/assets/icons/Italic.d.ts +0 -0
- /package/{dist → src}/assets/icons/Link.d.ts +0 -0
- /package/{dist → src}/assets/icons/Menu.d.ts +0 -0
- /package/{dist → src}/assets/icons/NumberedList.d.ts +0 -0
- /package/{dist → src}/assets/icons/PointerHorizontal.d.ts +0 -0
- /package/{dist → src}/assets/icons/PointerVertical.d.ts +0 -0
- /package/{dist → src}/assets/icons/Send.d.ts +0 -0
- /package/{dist → src}/assets/icons/Strikethrough.d.ts +0 -0
- /package/{dist → src}/assets/icons/TextColor.d.ts +0 -0
- /package/{dist → src}/assets/icons/Today.d.ts +0 -0
- /package/{dist → src}/assets/icons/Underlined.d.ts +0 -0
- /package/{dist → src}/assets/icons/Upload.d.ts +0 -0
- /package/{dist → src}/assets/icons/View.d.ts +0 -0
- /package/{dist → src}/assets/icons/ViewOff.d.ts +0 -0
- /package/{dist/assets/icons/Warningfilled.d.ts → src/assets/icons/WarningFilled.d.ts} +0 -0
- /package/{dist → src}/components/Menu/Menu.d.ts +0 -0
- /package/{dist → src}/components/buttons/shared/buttonContent.cva.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/Calendar.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/CalendarCell.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/CalendarGrid.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/CalendarSelectHeader.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/DateField.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/DateTimeDialog.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/DateTimeDialogFooter.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/MonthPicker.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/RangeCalendar.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/TimeField.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/TimePickerForm.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/YearPicker.d.ts +0 -0
- /package/{dist → src}/components/inputs/File/FileUpload.d.ts +0 -0
- /package/{dist → src}/components/inputs/File/FileUploadContainer.d.ts +0 -0
- /package/{dist → src}/components/inputs/File/InputUpload.d.ts +0 -0
- /package/{dist → src}/components/inputs/File/index.d.ts +0 -0
- /package/{dist → src}/components/inputs/File/shared/FileProgressBar.d.ts +0 -0
- /package/{dist → src}/components/inputs/File/shared/InputUploadFilled.d.ts +0 -0
- /package/{dist → src}/components/inputs/File/shared/fileUpload.cva.d.ts +0 -0
- /package/{dist → src}/components/inputs/File/shared/inputUploadButton.cva.d.ts +0 -0
- /package/{dist → src}/components/inputs/FormField/FormFieldError.d.ts +0 -0
- /package/{dist → src}/components/inputs/FormField/FormFieldHeader.d.ts +0 -0
- /package/{dist → src}/components/inputs/FormField/FormFieldHeaderClose.d.ts +0 -0
- /package/{dist → src}/components/inputs/Inputs/Inputs.d.ts +0 -0
- /package/{dist → src}/components/inputs/Selection/shared/SelectListBoxSelectionBar.d.ts +0 -0
- /package/{dist → src}/components/inputs/TextEditor/Toolbar/ColorPicker.d.ts +0 -0
- /package/{dist → src}/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.d.ts +0 -0
- /package/{dist → src}/components/inputs/TextEditor/Toolbar/TextEditorToolbar.d.ts +0 -0
- /package/{dist → src}/components/inputs/TextEditor/textEditor.types.d.ts +0 -0
- /package/{dist → src}/components/inputs/shared/form.types.d.ts +0 -0
- /package/{dist → src}/components/inputs/shared/input.cva.d.ts +0 -0
- /package/{dist → src}/components/outline.clsx.d.ts +0 -0
- /package/{dist → src}/components/overlays/BottomSheet/BottomSheet.d.ts +0 -0
- /package/{dist → src}/components/overlays/Drawer/Drawer.d.ts +0 -0
- /package/{dist → src}/components/overlays/Modal/modal.cva.d.ts +0 -0
- /package/{dist → src}/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +0 -0
- /package/{dist → src}/components/overlays/Tooltip/TooltipEllipsis.d.ts +0 -0
- /package/{dist → src}/components/segment/Segment.d.ts +0 -0
- /package/{dist → src}/components/segment/SegmentItem.d.ts +0 -0
- /package/{dist → src}/components/shared/pagination/Pagination.d.ts +0 -0
- /package/{dist → src}/components/shared/pagination/minWidth.cva.d.ts +0 -0
- /package/{dist → src}/components/status/Alert/alert.cva.d.ts +0 -0
- /package/{dist → src}/components/status/Loader/loader.cva.d.ts +0 -0
- /package/{dist → src}/components/status/Toast/useToast.d.ts +0 -0
- /package/{dist → src}/components/status/shared/status.cva.d.ts +0 -0
- /package/{dist → src}/components/table/CellText.d.ts +0 -0
- /package/{dist → src}/components/table/ColumnConfig.d.ts +0 -0
- /package/{dist → src}/components/table/HeaderText.d.ts +0 -0
- /package/{dist → src}/components/table/InfiniteTable.d.ts +0 -0
- /package/{dist → src}/components/table/PaginatedTable.d.ts +0 -0
- /package/{dist → src}/components/table/Table.d.ts +0 -0
- /package/{dist → src}/components/text/Link/link.cva.d.ts +0 -0
- /package/{dist → src}/components/text/Tag/tag.cva.d.ts +0 -0
- /package/{dist → src}/components/text/Typography/typography.cva.d.ts +0 -0
- /package/{dist → src}/config/i18n.d.ts +0 -0
- /package/{dist → src}/config/router.context.d.ts +0 -0
- /package/{dist → src}/helpers/dynamicColumns.d.ts +0 -0
- /package/{dist → src}/hooks/useAutosave.d.ts +0 -0
- /package/{dist → src}/hooks/useBreakpoint.d.ts +0 -0
- /package/{dist → src}/hooks/useDebounceCallback.d.ts +0 -0
- /package/{dist → src}/hooks/useDeepCompare.d.ts +0 -0
- /package/{dist → src}/hooks/useFilters.d.ts +0 -0
- /package/{dist → src}/hooks/useForm.d.ts +0 -0
- /package/{dist → src}/hooks/useIntersectionObserver.d.ts +0 -0
- /package/{dist → src}/hooks/useLocalStorage.d.ts +0 -0
- /package/{dist → src}/hooks/useLongPressRepeat.d.ts +0 -0
- /package/{dist → src}/hooks/usePagination.d.ts +0 -0
- /package/{dist → src}/hooks/useScrollableListBox.d.ts +0 -0
- /package/{dist → src}/hooks/useSorting.d.ts +0 -0
- /package/{dist → src}/hooks/useStateAndRef.d.ts +0 -0
- /package/{dist → src}/hooks/useTableColumnConfig.d.ts +0 -0
- /package/{dist → src}/hooks/useTableNav.d.ts +0 -0
- /package/{dist → src}/hooks/useTranslationMemo.d.ts +0 -0
- /package/{dist → src}/types/common.d.ts +0 -0
- /package/{dist → src}/utils/array.utils.d.ts +0 -0
- /package/{dist → src}/utils/array.utils.spec.d.ts +0 -0
- /package/{dist → src}/utils/compoundMapper.d.ts +0 -0
- /package/{dist → src}/utils/compoundMapper.spec.d.ts +0 -0
- /package/{dist → src}/utils/date-time.utils.d.ts +0 -0
- /package/{dist → src}/utils/date-time.utils.spec.d.ts +0 -0
- /package/{dist → src}/utils/date.utils.d.ts +0 -0
- /package/{dist → src}/utils/date.utils.spec.d.ts +0 -0
- /package/{dist → src}/utils/dom.utils.d.ts +0 -0
- /package/{dist → src}/utils/file.utils.d.ts +0 -0
- /package/{dist → src}/utils/isEqual.d.ts +0 -0
- /package/{dist → src}/utils/logger.d.ts +0 -0
- /package/{dist → src}/utils/object.utils.d.ts +0 -0
- /package/{dist → src}/utils/queries.utils.d.ts +0 -0
- /package/{dist/utils/rest → src/utils}/rest.utils.d.ts +0 -0
- /package/{dist → src}/utils/routing.utils.d.ts +0 -0
- /package/{dist → src}/utils/string.utils.d.ts +0 -0
- /package/{dist → src}/utils/vendor/error-handling.d.ts +0 -0
- /package/{dist/utils/rest/interceptors → src/utils/vendor}/rest-interceptor.d.ts +0 -0
- /package/{dist/styles → styles}/editor.css +0 -0
- /package/{dist/styles → styles}/index.css +0 -0
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { useRef, useEffect } from "react";
|
|
2
|
-
const useLongPressRepeat = ({
|
|
3
|
-
onPress,
|
|
4
|
-
enabled = true,
|
|
5
|
-
interval = 85,
|
|
6
|
-
timeout = 500
|
|
7
|
-
}) => {
|
|
8
|
-
const intervalRef = useRef(void 0);
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
return () => {
|
|
11
|
-
clearInterval(intervalRef.current);
|
|
12
|
-
};
|
|
13
|
-
}, []);
|
|
14
|
-
const onPressStart = () => {
|
|
15
|
-
onPress(false);
|
|
16
|
-
if (!enabled) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
intervalRef.current = setTimeout(() => {
|
|
20
|
-
onPress(true);
|
|
21
|
-
intervalRef.current = setInterval(() => {
|
|
22
|
-
onPress(true);
|
|
23
|
-
}, interval);
|
|
24
|
-
}, timeout);
|
|
25
|
-
};
|
|
26
|
-
const onPressEnd = () => {
|
|
27
|
-
clearInterval(intervalRef.current);
|
|
28
|
-
};
|
|
29
|
-
return { onPressStart, onPressEnd };
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
useLongPressRepeat
|
|
33
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect } from "react";
|
|
2
|
-
import { UIRouter } from "../config/router.context.js";
|
|
3
|
-
const DEFAULT_STATE = {
|
|
4
|
-
pageIndex: 1,
|
|
5
|
-
pageSize: 20
|
|
6
|
-
};
|
|
7
|
-
function usePagination(defaultPagination) {
|
|
8
|
-
const { pathname, query, replace, searchParams } = UIRouter.useUIRouter();
|
|
9
|
-
const [pagination, setPagination] = useState(
|
|
10
|
-
defaultPagination ?? {
|
|
11
|
-
pageIndex: searchParams.has("page") ? Number.parseInt(searchParams.get("page") ?? "", 10) : DEFAULT_STATE.pageIndex,
|
|
12
|
-
pageSize: searchParams.has("size") ? Number.parseInt(searchParams.get("size") ?? "", 10) : DEFAULT_STATE.pageSize
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
useEffect(() => {
|
|
16
|
-
const { page: _page, size: _size, ...queryParms } = query;
|
|
17
|
-
replace({
|
|
18
|
-
pathname,
|
|
19
|
-
query: {
|
|
20
|
-
...queryParms,
|
|
21
|
-
...pagination.pageSize !== DEFAULT_STATE.pageSize ? { size: pagination.pageSize } : {},
|
|
22
|
-
...pagination.pageIndex !== DEFAULT_STATE.pageIndex ? { page: pagination.pageIndex } : {}
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
}, [pagination]);
|
|
26
|
-
return {
|
|
27
|
-
pagination,
|
|
28
|
-
setPagination,
|
|
29
|
-
pageIndex: pagination.pageIndex,
|
|
30
|
-
pageSize: pagination.pageSize
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
export {
|
|
34
|
-
usePagination
|
|
35
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { useRef, useEffect } from "react";
|
|
2
|
-
import { useBreakpoint } from "./useBreakpoint.js";
|
|
3
|
-
function useScrollableListBox() {
|
|
4
|
-
const ref = useRef(null);
|
|
5
|
-
const isDesktop = useBreakpoint("md");
|
|
6
|
-
useEffect(() => {
|
|
7
|
-
const node = ref.current;
|
|
8
|
-
if (!node || isDesktop) {
|
|
9
|
-
return void 0;
|
|
10
|
-
}
|
|
11
|
-
const onPointerDownCapture = (e) => {
|
|
12
|
-
e.stopPropagation();
|
|
13
|
-
};
|
|
14
|
-
const onClickCapture = (e) => {
|
|
15
|
-
if (e.currentTarget?.contains(e.target) && e.target !== e.currentTarget) {
|
|
16
|
-
e.target.click();
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
node.addEventListener("pointerdown", onPointerDownCapture);
|
|
20
|
-
node.addEventListener("click", onClickCapture);
|
|
21
|
-
return () => {
|
|
22
|
-
node.removeEventListener("pointerdown", onPointerDownCapture);
|
|
23
|
-
node.removeEventListener("click", onClickCapture);
|
|
24
|
-
};
|
|
25
|
-
}, [ref, isDesktop]);
|
|
26
|
-
return { ref };
|
|
27
|
-
}
|
|
28
|
-
export {
|
|
29
|
-
useScrollableListBox
|
|
30
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { UseMutationOptions, useMutation as iUseMutation } from '@tanstack/react-query';
|
|
2
|
-
export declare function useSingletonMutation<TData, TError, TVariables>({ mutationFn, useMutation, ...options }: UseMutationOptions<TData, TError, TVariables> & {
|
|
3
|
-
useMutation: typeof iUseMutation;
|
|
4
|
-
} & Required<Pick<UseMutationOptions<TData, TError, TVariables>, "mutationFn">>): import('@tanstack/react-query').UseMutationResult<TData, TError, TVariables, unknown>;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { useRef } from "react";
|
|
2
|
-
function useSingletonMutation({
|
|
3
|
-
mutationFn,
|
|
4
|
-
useMutation,
|
|
5
|
-
...options
|
|
6
|
-
}) {
|
|
7
|
-
const mutationFnPromiseRef = useRef(null);
|
|
8
|
-
return useMutation({
|
|
9
|
-
...options,
|
|
10
|
-
mutationFn: async (variables) => {
|
|
11
|
-
if (mutationFnPromiseRef.current) {
|
|
12
|
-
return mutationFnPromiseRef.current;
|
|
13
|
-
}
|
|
14
|
-
const promise = mutationFn(variables);
|
|
15
|
-
mutationFnPromiseRef.current = promise;
|
|
16
|
-
try {
|
|
17
|
-
const result = await promise;
|
|
18
|
-
return result;
|
|
19
|
-
} finally {
|
|
20
|
-
mutationFnPromiseRef.current = null;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
export {
|
|
26
|
-
useSingletonMutation
|
|
27
|
-
};
|
package/dist/hooks/useSorting.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { useState, useMemo, useEffect } from "react";
|
|
2
|
-
import { UIRouter } from "../config/router.context.js";
|
|
3
|
-
function useSorting(defaultSorting, prefix = "") {
|
|
4
|
-
const { pathname, replace, searchParams, query } = UIRouter.useUIRouter();
|
|
5
|
-
const [sorting, setSorting] = useState(
|
|
6
|
-
defaultSorting ?? searchParams.get(`order${prefix && `-${prefix}`}`)?.split(",").map((item) => {
|
|
7
|
-
if (item.startsWith("-")) {
|
|
8
|
-
return { id: item.slice(1), desc: true };
|
|
9
|
-
}
|
|
10
|
-
if (item.startsWith("+")) {
|
|
11
|
-
return { id: item.slice(1), desc: false };
|
|
12
|
-
}
|
|
13
|
-
return { id: item, desc: false };
|
|
14
|
-
}) ?? []
|
|
15
|
-
);
|
|
16
|
-
const order = useMemo(() => {
|
|
17
|
-
return sorting.map((field) => `${field.desc ? "-" : "+"}${field.id}`).join(",");
|
|
18
|
-
}, [sorting]);
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
const { sort: _sort, ...queryParms } = query;
|
|
21
|
-
replace({
|
|
22
|
-
pathname,
|
|
23
|
-
query: { ...queryParms, ...order ? { [`order${prefix && `-${prefix}`}`]: order } : {} }
|
|
24
|
-
});
|
|
25
|
-
}, [order]);
|
|
26
|
-
return { sorting, setSorting, order };
|
|
27
|
-
}
|
|
28
|
-
export {
|
|
29
|
-
useSorting
|
|
30
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { useState, useRef, useCallback } from "react";
|
|
2
|
-
import { ObjectUtils } from "../utils/object.utils.js";
|
|
3
|
-
const useStateAndRef = (initialState) => {
|
|
4
|
-
const [state, setState] = useState(initialState);
|
|
5
|
-
const ref = useRef(state);
|
|
6
|
-
const updateValue = useCallback(
|
|
7
|
-
(value) => {
|
|
8
|
-
ref.current = ObjectUtils.isFunction(value) ? value(ref.current) : value;
|
|
9
|
-
setState(ref.current);
|
|
10
|
-
},
|
|
11
|
-
[setState]
|
|
12
|
-
);
|
|
13
|
-
return [state, ref, updateValue];
|
|
14
|
-
};
|
|
15
|
-
export {
|
|
16
|
-
useStateAndRef
|
|
17
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect, useCallback, useMemo } from "react";
|
|
2
|
-
function sortByKeyOrder(data, orderedKeys = []) {
|
|
3
|
-
return [...data].sort((a, b) => {
|
|
4
|
-
return orderedKeys.findIndex((key) => key === (a.id ?? a.accessorKey)) - orderedKeys.findIndex((key) => key === (b.id ?? b.accessorKey));
|
|
5
|
-
});
|
|
6
|
-
}
|
|
7
|
-
function useTableColumnConfig(defaultColumns, options = {}) {
|
|
8
|
-
const [internalVisibleColumns, setInternalVisibleColumns] = useState(
|
|
9
|
-
() => defaultColumns.map((col) => ({ [col.id ?? col.accessorKey]: true })).reduce((acc, cur) => ({ ...cur, ...acc }), {})
|
|
10
|
-
);
|
|
11
|
-
const [internalColumnOrder, setInternalColumnOrder] = useState(
|
|
12
|
-
() => defaultColumns.map((col) => col.id ?? col.accessorKey)
|
|
13
|
-
);
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
if (options.visibleColumns) {
|
|
16
|
-
setInternalVisibleColumns(options.visibleColumns);
|
|
17
|
-
}
|
|
18
|
-
}, [options.visibleColumns]);
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
if (options.columnOrder) {
|
|
21
|
-
setInternalColumnOrder(options.columnOrder);
|
|
22
|
-
}
|
|
23
|
-
}, [options.columnOrder]);
|
|
24
|
-
const handleVisibilityChange = useCallback(
|
|
25
|
-
(value) => {
|
|
26
|
-
setInternalVisibleColumns(value);
|
|
27
|
-
options?.onVisibilityChange?.(value);
|
|
28
|
-
},
|
|
29
|
-
[options]
|
|
30
|
-
);
|
|
31
|
-
const handleOrderChange = useCallback(
|
|
32
|
-
(value) => {
|
|
33
|
-
setInternalColumnOrder(value);
|
|
34
|
-
options?.onOrderChange?.(value);
|
|
35
|
-
},
|
|
36
|
-
[options]
|
|
37
|
-
);
|
|
38
|
-
const configColumns = useMemo(
|
|
39
|
-
() => sortByKeyOrder(defaultColumns, internalColumnOrder),
|
|
40
|
-
[defaultColumns, internalColumnOrder]
|
|
41
|
-
);
|
|
42
|
-
const columns = useMemo(
|
|
43
|
-
() => configColumns.filter(
|
|
44
|
-
(col) => internalVisibleColumns?.[col.id ?? col.accessorKey] ?? true
|
|
45
|
-
),
|
|
46
|
-
[configColumns, internalVisibleColumns]
|
|
47
|
-
);
|
|
48
|
-
return {
|
|
49
|
-
configColumns,
|
|
50
|
-
columns,
|
|
51
|
-
visibleColumns: internalVisibleColumns,
|
|
52
|
-
columnOrder: internalColumnOrder,
|
|
53
|
-
onVisibilityChange: handleVisibilityChange,
|
|
54
|
-
onOrderChange: handleOrderChange
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
export {
|
|
58
|
-
useTableColumnConfig
|
|
59
|
-
};
|
|
@@ -1,409 +0,0 @@
|
|
|
1
|
-
import { logger } from "../utils/logger.js";
|
|
2
|
-
const Selectors = {
|
|
3
|
-
Cell: '[role="cell"],[role="gridcell"],[role="columnheader"],[role="rowheader"],td,th',
|
|
4
|
-
Row: '[role="row"],tr',
|
|
5
|
-
RowGroup: '[role="rowgroup"],thead,tbody,tfoot',
|
|
6
|
-
/** Selector from here: https://github.com/Shopify/polaris/blob/main/polaris-react/src/utilities/focus.ts#L10 */
|
|
7
|
-
Focusable: 'a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not([aria-disabled="true"]):not([tabindex="-1"]):not(:disabled),*[tabindex]'
|
|
8
|
-
};
|
|
9
|
-
class DataGridNav {
|
|
10
|
-
constructor(config = {}) {
|
|
11
|
-
this.keys = [];
|
|
12
|
-
this.activeCell = null;
|
|
13
|
-
this.debugLog = (functionName, message) => {
|
|
14
|
-
if (this.debug) {
|
|
15
|
-
logger.info(`[${functionName}]: ${message}`);
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
const { selectors = {}, pageUpDown, debug = false } = config;
|
|
19
|
-
this.selectors = { ...Selectors, ...selectors };
|
|
20
|
-
this.pageUpDown = pageUpDown;
|
|
21
|
-
this.keys = [];
|
|
22
|
-
this.debug = debug;
|
|
23
|
-
this.disabled = false;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Disables the keyboard listener in cases
|
|
27
|
-
* that elements inside the grid need to use
|
|
28
|
-
* arrows keys etc., like select dropdowns
|
|
29
|
-
*/
|
|
30
|
-
disable() {
|
|
31
|
-
this.disabled = true;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Enables the keyboard listeners
|
|
35
|
-
*/
|
|
36
|
-
enable() {
|
|
37
|
-
this.disabled = false;
|
|
38
|
-
}
|
|
39
|
-
// oxlint-disable-next-line class-methods-use-this
|
|
40
|
-
isFocusable(el) {
|
|
41
|
-
return el instanceof HTMLElement || el instanceof SVGElement;
|
|
42
|
-
}
|
|
43
|
-
getActiveCell() {
|
|
44
|
-
return this.activeCell;
|
|
45
|
-
}
|
|
46
|
-
/** Used as a keyboard listener for key up */
|
|
47
|
-
tableKeyUp() {
|
|
48
|
-
this.keys = [];
|
|
49
|
-
}
|
|
50
|
-
/** Used as a keyboard listener for key down */
|
|
51
|
-
tableKeyDown(e) {
|
|
52
|
-
this.debugLog("tableKeyDown", `Key pressed: ${e.key}`);
|
|
53
|
-
if (this.disabled) {
|
|
54
|
-
this.debugLog("tableKeyDown", "interaction is disabled");
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
if ("ArrowDown" === e.key || "ArrowUp" === e.key || "ArrowLeft" === e.key || "ArrowRight" === e.key) {
|
|
58
|
-
e.preventDefault();
|
|
59
|
-
}
|
|
60
|
-
if (this.keys.length === 0 || this.keys[this.keys.length - 1] !== e.key) {
|
|
61
|
-
this.keys.push(e.key);
|
|
62
|
-
}
|
|
63
|
-
if (!(e.target instanceof Element)) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
const cell = e.target.parentElement?.closest(`${this.selectors.Cell},${this.selectors.Row}`);
|
|
67
|
-
if (!cell) {
|
|
68
|
-
this.debugLog("tableKeyDown", "cell not found");
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
if (cell.matches(this.selectors.Cell)) {
|
|
72
|
-
this.debugLog("tableKeyDown", "event captured in cell");
|
|
73
|
-
this.cellNavigation(e);
|
|
74
|
-
} else {
|
|
75
|
-
this.debugLog("tableKeyDown", "event captured in cell");
|
|
76
|
-
this.gridNavigation(e);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Handles the navigation inside a cell
|
|
81
|
-
*/
|
|
82
|
-
cellNavigation(e) {
|
|
83
|
-
if (!(e.target instanceof Element)) {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
if (e.key === "Escape") {
|
|
87
|
-
const cell = e.target.closest(this.selectors.Cell);
|
|
88
|
-
if (cell && this.isFocusable(cell)) {
|
|
89
|
-
cell.focus();
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
if (e.key === "ArrowRight" || e.key === "ArrowDown") {
|
|
94
|
-
const cell = e.target.closest(this.selectors.Cell);
|
|
95
|
-
if (!cell) {
|
|
96
|
-
this.debugLog("cellNavigation", "cell not found");
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
const focusableWidgets = [...cell.querySelectorAll(this.selectors.Focusable)];
|
|
100
|
-
const widgetIdx = focusableWidgets.findIndex((el) => el === e.target);
|
|
101
|
-
const nextFocusable = widgetIdx === focusableWidgets.length - 1 ? 0 : widgetIdx + 1;
|
|
102
|
-
const widgetToFocus = focusableWidgets[nextFocusable];
|
|
103
|
-
if (this.isFocusable(widgetToFocus)) {
|
|
104
|
-
widgetToFocus.focus();
|
|
105
|
-
}
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
if (e.key === "ArrowLeft" || e.key === "ArrowUp") {
|
|
109
|
-
const cell = e.target.closest(this.selectors.Cell);
|
|
110
|
-
if (!cell) {
|
|
111
|
-
this.debugLog("cellNavigation", "cell not found");
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
const focusableWidgets = [...cell.querySelectorAll(this.selectors.Focusable)];
|
|
115
|
-
const widgetIdx = focusableWidgets.findIndex((el) => el === e.target);
|
|
116
|
-
const previousFocusable = widgetIdx === 0 ? focusableWidgets.length - 1 : widgetIdx - 1;
|
|
117
|
-
const widgetToFocus = focusableWidgets[previousFocusable];
|
|
118
|
-
if (this.isFocusable(widgetToFocus)) {
|
|
119
|
-
widgetToFocus.focus();
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Handles the navigation outside a cell
|
|
125
|
-
* on the grid level
|
|
126
|
-
*/
|
|
127
|
-
gridNavigation(e) {
|
|
128
|
-
const { target } = e;
|
|
129
|
-
if (!(e.target instanceof Element)) {
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
if (!(target instanceof Element)) {
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
if (this.keys.length === 1) {
|
|
136
|
-
if (/^[a-zA-Z0-9]$/.test(e.key)) {
|
|
137
|
-
const cell = e.target.querySelector(this.selectors.Focusable);
|
|
138
|
-
if (cell && this.isFocusable(cell) && cell instanceof HTMLInputElement) {
|
|
139
|
-
cell.focus();
|
|
140
|
-
cell.value = `${cell.value}${e.key}`;
|
|
141
|
-
e.preventDefault();
|
|
142
|
-
}
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
if (e.key === "Backspace") {
|
|
146
|
-
const cell = e.target.querySelector(this.selectors.Focusable);
|
|
147
|
-
if (cell && this.isFocusable(cell) && cell instanceof HTMLInputElement) {
|
|
148
|
-
const nativeInputValueSetter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set;
|
|
149
|
-
if (nativeInputValueSetter) {
|
|
150
|
-
nativeInputValueSetter.call(cell, "");
|
|
151
|
-
const ev = new Event("input", { bubbles: true });
|
|
152
|
-
cell.dispatchEvent(ev);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
if (e.key === "Enter") {
|
|
158
|
-
const cell = e.target.querySelector(this.selectors.Focusable);
|
|
159
|
-
if (cell && this.isFocusable(cell)) {
|
|
160
|
-
if (cell.getAttribute("data-type") === "select-trigger") {
|
|
161
|
-
cell.click();
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
cell.focus();
|
|
165
|
-
e.preventDefault();
|
|
166
|
-
}
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
|
170
|
-
const direction = e.key === "ArrowLeft" ? "prev" : "next";
|
|
171
|
-
const cell = e.target.closest(this.selectors.Cell);
|
|
172
|
-
let nextCell = null;
|
|
173
|
-
if (direction === "next" && cell?.nextElementSibling instanceof HTMLElement) {
|
|
174
|
-
nextCell = cell.nextElementSibling;
|
|
175
|
-
}
|
|
176
|
-
if (direction === "prev" && cell?.previousElementSibling instanceof HTMLElement) {
|
|
177
|
-
nextCell = cell.previousElementSibling;
|
|
178
|
-
}
|
|
179
|
-
if (nextCell && this.isFocusable(nextCell)) {
|
|
180
|
-
nextCell.focus();
|
|
181
|
-
e.preventDefault();
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
185
|
-
this.verticalCellNavigation(e);
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
if (e.key === "PageUp" || e.key === "PageDown") {
|
|
189
|
-
this.pageCellNavigation(e);
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
if (e.key === "Home" || e.key === "End") {
|
|
193
|
-
const row = e.target.closest(this.selectors.Row);
|
|
194
|
-
const rowChildren = [...row?.children || []];
|
|
195
|
-
if (e.key === "End") {
|
|
196
|
-
rowChildren.reverse();
|
|
197
|
-
}
|
|
198
|
-
this.focusOnFirstCell(rowChildren);
|
|
199
|
-
}
|
|
200
|
-
} else {
|
|
201
|
-
const [firstKey, secondKey] = this.keys;
|
|
202
|
-
if (firstKey === "Control" && // oxlint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
203
|
-
(secondKey === "Home" || secondKey === "End")) {
|
|
204
|
-
const row = e.target.closest(this.selectors.Row);
|
|
205
|
-
const siblings = row.parentElement?.children;
|
|
206
|
-
if (!siblings) {
|
|
207
|
-
this.debugLog("cellNavigation", "siblings not found");
|
|
208
|
-
return;
|
|
209
|
-
}
|
|
210
|
-
const rowToFocus = secondKey === "Home" ? siblings[0] : siblings[siblings.length - 1];
|
|
211
|
-
const rowChildren = [...rowToFocus?.children || []];
|
|
212
|
-
if (secondKey === "End") {
|
|
213
|
-
rowChildren.reverse();
|
|
214
|
-
}
|
|
215
|
-
this.focusOnFirstCell(rowChildren);
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
pageCellNavigation(e) {
|
|
220
|
-
if (!(e.target instanceof Element)) {
|
|
221
|
-
return;
|
|
222
|
-
}
|
|
223
|
-
const row = e.target.closest(this.selectors.Row);
|
|
224
|
-
const cell = e.target.closest(this.selectors.Cell);
|
|
225
|
-
if (row && cell) {
|
|
226
|
-
const position = this.getColumnIndex(cell);
|
|
227
|
-
if (position === void 0) {
|
|
228
|
-
this.debugLog("cellNavigation", "position not found");
|
|
229
|
-
return;
|
|
230
|
-
}
|
|
231
|
-
const direction = e.key === "PageUp" ? "prev" : "next";
|
|
232
|
-
const siblings = row.parentElement?.children;
|
|
233
|
-
if (!siblings) {
|
|
234
|
-
this.debugLog("cellNavigation", "siblings not found");
|
|
235
|
-
return;
|
|
236
|
-
}
|
|
237
|
-
let destinationRow;
|
|
238
|
-
if (this.pageUpDown) {
|
|
239
|
-
const methodClbk = direction === "prev" ? "previousSibling" : "nextSibling";
|
|
240
|
-
let sibling = row[methodClbk];
|
|
241
|
-
if (sibling === null) {
|
|
242
|
-
return;
|
|
243
|
-
}
|
|
244
|
-
let lastVisitedSibling = sibling;
|
|
245
|
-
for (let i = 0; i < this.pageUpDown - 1 && sibling; i++) {
|
|
246
|
-
sibling = sibling[methodClbk];
|
|
247
|
-
if (sibling) {
|
|
248
|
-
lastVisitedSibling = sibling;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
destinationRow = sibling || lastVisitedSibling;
|
|
252
|
-
} else {
|
|
253
|
-
destinationRow = direction === "prev" ? siblings[0] : siblings[siblings.length - 1];
|
|
254
|
-
}
|
|
255
|
-
if (!destinationRow || !(destinationRow instanceof Element)) {
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
258
|
-
const child = destinationRow.children[position];
|
|
259
|
-
if (child && this.isFocusable(child)) {
|
|
260
|
-
child.focus();
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
verticalCellNavigation(e) {
|
|
265
|
-
if (!(e.target instanceof Element)) {
|
|
266
|
-
return;
|
|
267
|
-
}
|
|
268
|
-
const row = e.target.closest(this.selectors.Row);
|
|
269
|
-
const cell = e.target.closest(this.selectors.Cell);
|
|
270
|
-
if (row && cell) {
|
|
271
|
-
const cellPosition = this.getColumnIndex(cell);
|
|
272
|
-
const rowPosition = this.getRowIndex(row);
|
|
273
|
-
this.debugLog("gridNavigation", `Initial row position: ${rowPosition}`);
|
|
274
|
-
this.debugLog("gridNavigation", `Initial cell position: ${cellPosition}`);
|
|
275
|
-
if (cellPosition === void 0 || rowPosition === void 0) {
|
|
276
|
-
this.debugLog("verticalCellNavigation", "row or cell position not found");
|
|
277
|
-
return;
|
|
278
|
-
}
|
|
279
|
-
const direction = e.key === "ArrowUp" ? "prev" : "next";
|
|
280
|
-
if (rowPosition === 0 && direction === "prev") {
|
|
281
|
-
const currentRowGroup = row.parentElement?.closest(this.selectors.RowGroup);
|
|
282
|
-
const siblingRowGroups = [...currentRowGroup?.parentElement?.children || []];
|
|
283
|
-
const currentRowGroupIdx = siblingRowGroups.findIndex((el) => el === currentRowGroup);
|
|
284
|
-
if (currentRowGroupIdx !== 0) {
|
|
285
|
-
const previousRowGroup = siblingRowGroups[currentRowGroupIdx - 1];
|
|
286
|
-
const rows = [...previousRowGroup.querySelectorAll(this.selectors.Row)];
|
|
287
|
-
const child2 = rows[rows.length - 1].children[cellPosition];
|
|
288
|
-
if (child2 && this.isFocusable(child2)) {
|
|
289
|
-
child2.focus();
|
|
290
|
-
}
|
|
291
|
-
return;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
const siblingRows = [...row.parentElement?.querySelectorAll(this.selectors.Row) || []];
|
|
295
|
-
if (rowPosition === siblingRows.length - 1 && direction === "next") {
|
|
296
|
-
const currentRowGroup = row.parentElement?.closest(this.selectors.RowGroup);
|
|
297
|
-
const siblingRowGroups = [...currentRowGroup?.parentElement?.children || []];
|
|
298
|
-
const currentRowGroupIdx = siblingRowGroups.findIndex((el) => el === currentRowGroup);
|
|
299
|
-
if (currentRowGroupIdx !== siblingRowGroups.length - 1) {
|
|
300
|
-
const nextRowGroup = siblingRowGroups[currentRowGroupIdx + 1];
|
|
301
|
-
const rows = [...nextRowGroup.querySelectorAll(this.selectors.Row)];
|
|
302
|
-
const child2 = rows[0].children[cellPosition];
|
|
303
|
-
if (child2 && this.isFocusable(child2)) {
|
|
304
|
-
child2.focus();
|
|
305
|
-
}
|
|
306
|
-
return;
|
|
307
|
-
}
|
|
308
|
-
return;
|
|
309
|
-
}
|
|
310
|
-
const destinationRow = this.findUntil(direction, row, this.selectors.Row);
|
|
311
|
-
if (!destinationRow) {
|
|
312
|
-
return;
|
|
313
|
-
}
|
|
314
|
-
const child = destinationRow.children[cellPosition];
|
|
315
|
-
if (child && this.isFocusable(child)) {
|
|
316
|
-
child.focus();
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
/**
|
|
321
|
-
* Sending a row `Element` and then the first cell will be focused.
|
|
322
|
-
*
|
|
323
|
-
* If you want to focus the last cell then the row children can be passed in
|
|
324
|
-
* reversed order
|
|
325
|
-
*/
|
|
326
|
-
focusOnFirstCell(el) {
|
|
327
|
-
for (let i = 0; i < el.length; i++) {
|
|
328
|
-
const child = el[i];
|
|
329
|
-
if (this.isFocusable(child)) {
|
|
330
|
-
child.focus();
|
|
331
|
-
return;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* Get the column index of a `cell` based on the first `row` parent.
|
|
337
|
-
* `cellIndex` could be used, but it's not supported in HTML tables.
|
|
338
|
-
*/
|
|
339
|
-
getColumnIndex(cell) {
|
|
340
|
-
let position = 0;
|
|
341
|
-
const siblings = cell?.parentNode?.children;
|
|
342
|
-
if (!siblings) {
|
|
343
|
-
return void 0;
|
|
344
|
-
}
|
|
345
|
-
while (cell !== siblings[position] && siblings[position] !== void 0) {
|
|
346
|
-
position++;
|
|
347
|
-
}
|
|
348
|
-
if (siblings[position] === void 0) {
|
|
349
|
-
this.debugLog("getColumnIndex", "position finding was not successful");
|
|
350
|
-
return void 0;
|
|
351
|
-
}
|
|
352
|
-
return position;
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* Get the row index of a `row` based
|
|
356
|
-
* on its sibling rows
|
|
357
|
-
*/
|
|
358
|
-
getRowIndex(row) {
|
|
359
|
-
let position = 0;
|
|
360
|
-
const siblings = row?.parentNode?.children;
|
|
361
|
-
if (!siblings) {
|
|
362
|
-
return void 0;
|
|
363
|
-
}
|
|
364
|
-
while (row !== siblings[position] && siblings[position] !== void 0) {
|
|
365
|
-
position++;
|
|
366
|
-
}
|
|
367
|
-
if (siblings[position] === void 0) {
|
|
368
|
-
this.debugLog("getRowIndex", "position finding was not successful");
|
|
369
|
-
return void 0;
|
|
370
|
-
}
|
|
371
|
-
return position;
|
|
372
|
-
}
|
|
373
|
-
/**
|
|
374
|
-
* Equivalent to prevUntil/nextUntil in jQuery
|
|
375
|
-
* https://api.jquery.com/prevUntil/
|
|
376
|
-
*/
|
|
377
|
-
// oxlint-disable-next-line class-methods-use-this
|
|
378
|
-
findUntil(direction, el, matchSelector, exitSelector) {
|
|
379
|
-
let element = el;
|
|
380
|
-
const method = direction === "next" ? "nextSibling" : "previousSibling";
|
|
381
|
-
while (element[method]) {
|
|
382
|
-
const sibling = element[method];
|
|
383
|
-
if (!sibling) {
|
|
384
|
-
return null;
|
|
385
|
-
}
|
|
386
|
-
if (exitSelector && sibling instanceof Element && sibling.matches(exitSelector)) {
|
|
387
|
-
return null;
|
|
388
|
-
}
|
|
389
|
-
if (sibling instanceof Element && sibling.matches(matchSelector)) {
|
|
390
|
-
return sibling;
|
|
391
|
-
}
|
|
392
|
-
element = sibling;
|
|
393
|
-
}
|
|
394
|
-
return null;
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
function useTableNav(options) {
|
|
398
|
-
const nav = new DataGridNav(options);
|
|
399
|
-
return {
|
|
400
|
-
listeners: {
|
|
401
|
-
onKeyDown: (e) => nav.tableKeyDown(e),
|
|
402
|
-
onKeyUp: () => nav.tableKeyUp()
|
|
403
|
-
},
|
|
404
|
-
tableNav: nav
|
|
405
|
-
};
|
|
406
|
-
}
|
|
407
|
-
export {
|
|
408
|
-
useTableNav
|
|
409
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { useMemo } from "react";
|
|
2
|
-
import { useTranslation } from "react-i18next";
|
|
3
|
-
function useTranslationMemo(func) {
|
|
4
|
-
const { t } = useTranslation();
|
|
5
|
-
return useMemo(() => {
|
|
6
|
-
if (func.length === 1) {
|
|
7
|
-
return func(t);
|
|
8
|
-
}
|
|
9
|
-
return func();
|
|
10
|
-
}, [func, t]);
|
|
11
|
-
}
|
|
12
|
-
export {
|
|
13
|
-
useTranslationMemo
|
|
14
|
-
};
|