@povio/ui 2.1.22 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{rolldown_runtime.js → _virtual/rolldown:runtime.js} +17 -2
- package/dist/assets/icons/{ViewOff.d.ts → Account.d.ts} +1 -1
- package/dist/{ArrowDropDown.js → assets/icons/ArrowDropDown.js} +1 -1
- package/dist/{ArrowDropUp.js → assets/icons/ArrowDropUp.js} +1 -1
- package/dist/{ArrowLeft.js → assets/icons/ArrowLeft.js} +1 -1
- package/dist/{ArrowRight.js → assets/icons/ArrowRight.js} +1 -1
- package/dist/assets/icons/Board.d.ts +2 -0
- package/dist/assets/icons/Calendar.js +15 -0
- package/dist/{Check.js → assets/icons/Check.js} +1 -1
- package/dist/assets/icons/CheckCircle.js +13 -0
- package/dist/{ChevronDown.js → assets/icons/ChevronDown.js} +1 -1
- package/dist/{ChevronUp.js → assets/icons/ChevronUp.js} +1 -1
- package/dist/assets/icons/Clock.js +13 -0
- package/dist/assets/icons/DateTime.js +16 -0
- package/dist/assets/icons/DragIndicator.d.ts +2 -0
- package/dist/{Drag.js → assets/icons/DragIndicator.js} +2 -2
- package/dist/assets/icons/{Drag.d.ts → Edit.d.ts} +1 -1
- package/dist/assets/icons/Emoji.d.ts +2 -0
- package/dist/assets/icons/File.js +15 -0
- package/dist/assets/icons/{View.d.ts → Grid.d.ts} +1 -1
- package/dist/{HighlightOn.js → assets/icons/HighlightOn.js} +1 -1
- package/dist/assets/icons/Home.d.ts +2 -0
- package/dist/assets/icons/Home.js +13 -0
- package/dist/assets/icons/Image.d.ts +2 -0
- package/dist/assets/icons/ImageError.d.ts +2 -0
- package/dist/{Info.js → assets/icons/Info.js} +2 -2
- package/dist/assets/icons/Loader.d.ts +2 -0
- package/dist/assets/icons/MapPin.d.ts +2 -0
- package/dist/assets/icons/Menu.js +13 -0
- package/dist/assets/icons/Minus.d.ts +2 -0
- package/dist/assets/icons/MoreHoriz.d.ts +2 -0
- package/dist/assets/icons/Pause.d.ts +2 -0
- package/dist/assets/icons/Plus.d.ts +2 -0
- package/dist/assets/icons/Retry.d.ts +2 -0
- package/dist/assets/icons/Search.d.ts +2 -0
- package/dist/assets/icons/Share.d.ts +2 -0
- package/dist/assets/icons/Slash.d.ts +2 -0
- package/dist/{TextColor.js → assets/icons/TextColor.js} +1 -1
- package/dist/assets/icons/Trash.d.ts +2 -0
- package/dist/assets/icons/User.d.ts +2 -0
- package/dist/assets/icons/Visibility.d.ts +2 -0
- package/dist/assets/icons/Visibility.js +13 -0
- package/dist/assets/icons/VisibilityOff.d.ts +2 -0
- package/dist/assets/icons/VisibilityOff.js +13 -0
- package/dist/assets/icons/WarningOutlined.d.ts +2 -0
- package/dist/{translation.js → assets/locales/en/translation.json.js} +0 -8
- package/dist/{translation2.js → assets/locales/sl/translation.json.js} +0 -7
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +15 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +111 -0
- package/dist/components/Breadcrumbs/breadcrumbs.cva.d.ts +19 -0
- package/dist/components/Breadcrumbs/breadcrumbs.cva.js +22 -0
- package/dist/components/Menu/Menu.d.ts +2 -3
- package/dist/{Menu2.js → components/Menu/Menu.js} +1 -1
- package/dist/components/Menu/MenuDesktop.d.ts +1 -1
- package/dist/components/Menu/MenuDesktop.js +12 -0
- package/dist/{MenuItem.js → components/Menu/MenuItem.js} +3 -3
- package/dist/{MenuMobile.js → components/Menu/MenuMobile.js} +5 -5
- package/dist/{MenuPopover.js → components/Menu/MenuPopover.js} +3 -3
- package/dist/{menu.cva.js → components/Menu/menu.cva.js} +2 -3
- package/dist/components/buttons/Button/Button.d.ts +3 -3
- package/dist/components/buttons/Button/Button.js +48 -0
- package/dist/{button.cva.js → components/buttons/Button/button.cva.js} +3 -12
- package/dist/components/buttons/IconButton/IconButton.d.ts +1 -1
- package/dist/components/buttons/IconButton/IconButton.js +17 -0
- package/dist/{InlineIconButton.js → components/buttons/InlineIconButton/InlineIconButton.js} +2 -2
- package/dist/components/buttons/PillButton/PillButton.d.ts +3 -2
- package/dist/components/buttons/PillButton/PillButton.js +33 -0
- package/dist/{pillButton.cva.js → components/buttons/PillButton/pillButton.cva.js} +5 -5
- package/dist/{SplitButton.js → components/buttons/SplitButton/SplitButton.js} +5 -5
- package/dist/components/buttons/TextButton/TextButton.d.ts +0 -1
- package/dist/{TextButton.js → components/buttons/TextButton/TextButton.js} +2 -3
- package/dist/components/buttons/ToggleButton/ToggleButton.d.ts +0 -1
- package/dist/{ToggleButton.js → components/buttons/ToggleButton/ToggleButton.js} +2 -3
- package/dist/components/buttons/shared/ButtonContent.d.ts +3 -5
- package/dist/components/buttons/shared/ButtonContent.js +35 -0
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +4 -0
- package/dist/components/buttons/shared/buttonContent.cva.js +36 -0
- package/dist/{Checkbox.js → components/inputs/Checkbox/Checkbox.js} +7 -7
- package/dist/{CheckboxCheckmark2.js → components/inputs/Checkbox/CheckboxCheckmark.js} +4 -4
- package/dist/{checkbox.cva.js → components/inputs/Checkbox/checkbox.cva.js} +2 -2
- package/dist/{DatePicker.js → components/inputs/DateTime/DatePicker/DatePicker.js} +11 -11
- package/dist/{DateRangePicker.js → components/inputs/DateTime/DateRangePicker/DateRangePicker.js} +15 -15
- package/dist/{DateTimePicker.js → components/inputs/DateTime/DateTimePicker/DateTimePicker.js} +11 -11
- package/dist/{TimePicker.js → components/inputs/DateTime/TimePicker/TimePicker.js} +10 -10
- package/dist/{Calendar2.js → components/inputs/DateTime/shared/Calendar.js} +1 -1
- package/dist/{CalendarCell.js → components/inputs/DateTime/shared/CalendarCell.js} +2 -2
- package/dist/{CalendarGrid.js → components/inputs/DateTime/shared/CalendarGrid.js} +2 -2
- package/dist/{CalendarHeader.js → components/inputs/DateTime/shared/CalendarHeader.js} +5 -5
- package/dist/{CalendarSelectHeader.js → components/inputs/DateTime/shared/CalendarSelectHeader.js} +9 -9
- package/dist/{DateField.js → components/inputs/DateTime/shared/DateField.js} +1 -1
- package/dist/{DatePickerInput.js → components/inputs/DateTime/shared/DatePickerInput.js} +12 -12
- package/dist/{DateTimeDialog.js → components/inputs/DateTime/shared/DateTimeDialog.js} +4 -4
- package/dist/{DateTimeDialogFooter.js → components/inputs/DateTime/shared/DateTimeDialogFooter.js} +2 -2
- package/dist/{MonthPicker.js → components/inputs/DateTime/shared/MonthPicker.js} +1 -1
- package/dist/{TimePickerForm.js → components/inputs/DateTime/shared/TimePickerForm.js} +6 -6
- package/dist/{TimePickerInput.js → components/inputs/DateTime/shared/TimePickerInput.js} +9 -9
- package/dist/{YearPicker.js → components/inputs/DateTime/shared/YearPicker.js} +3 -3
- package/dist/{FileUpload.js → components/inputs/File/FileUpload.js} +11 -11
- package/dist/{InputUpload.js → components/inputs/File/InputUpload.js} +7 -7
- package/dist/components/inputs/File/fileUpload.types.d.ts +1 -1
- package/dist/{FileUploadContent.js → components/inputs/File/shared/FileUploadContent.js} +1 -1
- package/dist/{FileUploadContentEmpty.js → components/inputs/File/shared/FileUploadContentEmpty.js} +4 -4
- package/dist/{FileUploadContentError.js → components/inputs/File/shared/FileUploadContentError.js} +7 -7
- package/dist/{FileUploadContentFilled.js → components/inputs/File/shared/FileUploadContentFilled.js} +8 -8
- package/dist/{FileUploadContentLoading.js → components/inputs/File/shared/FileUploadContentLoading.js} +7 -7
- package/dist/{InputUploadContent.js → components/inputs/File/shared/InputUploadContent.js} +9 -9
- package/dist/{InputUploadFilled.js → components/inputs/File/shared/InputUploadFilled.js} +5 -5
- package/dist/{ProgressBar.js → components/inputs/File/shared/ProgressBar.js} +1 -1
- package/dist/{fileUpload.cva.js → components/inputs/File/shared/fileUpload.cva.js} +1 -1
- package/dist/{inputUploadButton.cva.js → components/inputs/File/shared/inputUploadButton.cva.js} +1 -1
- package/dist/{FormFieldError.js → components/inputs/FormField/FormFieldError.js} +1 -1
- package/dist/{FormFieldHeader.js → components/inputs/FormField/FormFieldHeader.js} +3 -3
- package/dist/{FormFieldHeaderClose.js → components/inputs/FormField/FormFieldHeaderClose.js} +2 -2
- package/dist/{FormFieldLabel.js → components/inputs/FormField/FormFieldLabel.js} +4 -4
- package/dist/{NumberInput.js → components/inputs/Input/NumberInput/NumberInput.js} +8 -8
- package/dist/{PasswordInput.js → components/inputs/Input/PasswordInput/PasswordInput.js} +5 -5
- package/dist/{TextArea.js → components/inputs/Input/TextArea/TextArea.js} +10 -10
- package/dist/{TextInput.js → components/inputs/Input/TextInput/TextInput.js} +8 -8
- package/dist/{InputContent.js → components/inputs/Input/shared/InputContent.js} +7 -7
- package/dist/{Form.js → components/inputs/Inputs/Form.js} +4 -4
- package/dist/components/inputs/Inputs/InputItem.d.ts +1 -1
- package/dist/{InputItem.js → components/inputs/Inputs/InputItem.js} +15 -15
- package/dist/{RadioGroup.js → components/inputs/RadioGroup/RadioGroup.js} +6 -6
- package/dist/{radio.cva.js → components/inputs/RadioGroup/radio.cva.js} +2 -12
- package/dist/{Autocomplete.js → components/inputs/Selection/Autocomplete/Autocomplete.js} +2 -2
- package/dist/{QueryAutocomplete.js → components/inputs/Selection/Autocomplete/QueryAutocomplete.js} +1 -1
- package/dist/{Select.js → components/inputs/Selection/Select/Select.js} +2 -2
- package/dist/{SelectBase.js → components/inputs/Selection/shared/SelectBase.js} +2 -2
- package/dist/{SelectDesktop.js → components/inputs/Selection/shared/SelectDesktop.js} +4 -4
- package/dist/{SelectInput.js → components/inputs/Selection/shared/SelectInput.js} +9 -9
- package/dist/{SelectInputTags.js → components/inputs/Selection/shared/SelectInputTags.js} +1 -1
- package/dist/{SelectListBox.js → components/inputs/Selection/shared/SelectListBox.js} +1 -1
- package/dist/{SelectListBoxItem.js → components/inputs/Selection/shared/SelectListBoxItem.js} +4 -4
- package/dist/{SelectListBoxItemSelectAll.js → components/inputs/Selection/shared/SelectListBoxItemSelectAll.js} +3 -3
- package/dist/{SelectListBoxLoadingItem.js → components/inputs/Selection/shared/SelectListBoxLoadingItem.js} +4 -4
- package/dist/{SelectListBoxSelectionBar.js → components/inputs/Selection/shared/SelectListBoxSelectionBar.js} +2 -2
- package/dist/{SelectMobile.js → components/inputs/Selection/shared/SelectMobile.js} +7 -7
- package/dist/{select.context.js → components/inputs/Selection/shared/select.context.js} +2 -2
- package/dist/{Slider.js → components/inputs/Slider/Slider.js} +6 -6
- package/dist/{TextEditor.js → components/inputs/TextEditor/TextEditor.js} +6 -6
- package/dist/{ColorPickerDropdown.js → components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js} +4 -4
- package/dist/{HyperlinkAction.js → components/inputs/TextEditor/Toolbar/HyperlinkAction.js} +6 -6
- package/dist/{TextAlignSelect.js → components/inputs/TextEditor/Toolbar/TextAlignSelect.js} +6 -6
- package/dist/{TextColorSelect.js → components/inputs/TextEditor/Toolbar/TextColorSelect.js} +2 -2
- package/dist/{TextHighlightSelect.js → components/inputs/TextEditor/Toolbar/TextHighlightSelect.js} +3 -3
- package/dist/{TextListActions.js → components/inputs/TextEditor/Toolbar/TextListActions.js} +4 -4
- package/dist/{TextMarksActions.js → components/inputs/TextEditor/Toolbar/TextMarksActions.js} +6 -6
- package/dist/{TextStyleSelect.js → components/inputs/TextEditor/Toolbar/TextStyleSelect.js} +3 -3
- package/dist/{Toggle.js → components/inputs/Toggle/Toggle.js} +6 -6
- package/dist/{toggle.cva.js → components/inputs/Toggle/toggle.cva.js} +2 -2
- package/dist/{CheckContent.js → components/inputs/shared/CheckContent.js} +3 -3
- package/dist/{InputClear.js → components/inputs/shared/InputClear.js} +3 -3
- package/dist/{TooltipWrapper.js → components/inputs/shared/TooltipWrapper.js} +1 -1
- package/dist/components/inputs/shared/input.cva.d.ts +4 -4
- package/dist/{input.cva.js → components/inputs/shared/input.cva.js} +33 -33
- package/dist/components/inputs/shared/label.cva.d.ts +2 -2
- package/dist/{label.cva.js → components/inputs/shared/label.cva.js} +2 -2
- package/dist/components/navigation/Accordion/Accordion.d.ts +3 -0
- package/dist/components/navigation/Accordion/Accordion.js +32 -0
- package/dist/components/navigation/Accordion/AccordionItem.d.ts +2 -0
- package/dist/components/navigation/Accordion/AccordionItem.js +62 -0
- package/dist/components/navigation/Accordion/accordion.cva.d.ts +45 -0
- package/dist/components/navigation/Accordion/accordion.cva.js +97 -0
- package/dist/components/navigation/Accordion/accordion.types.d.ts +52 -0
- package/dist/components/navigation/Stepper/Stepper.d.ts +2 -0
- package/dist/components/navigation/Stepper/Stepper.js +32 -0
- package/dist/components/navigation/Stepper/StepperItem.d.ts +2 -0
- package/dist/components/navigation/Stepper/StepperItem.js +52 -0
- package/dist/components/navigation/Stepper/StepperSeparator.d.ts +5 -0
- package/dist/components/navigation/Stepper/StepperSeparator.js +10 -0
- package/dist/components/navigation/Stepper/stepper.cva.d.ts +37 -0
- package/dist/components/navigation/Stepper/stepper.cva.js +93 -0
- package/dist/components/navigation/Stepper/stepper.types.d.ts +41 -0
- package/dist/{ActionModal.js → components/overlays/ActionModal/ActionModal.js} +4 -4
- package/dist/{BottomSheet.js → components/overlays/BottomSheet/BottomSheet.js} +8 -8
- package/dist/{Drawer.js → components/overlays/Drawer/Drawer.js} +1 -1
- package/dist/{Modal.js → components/overlays/Modal/Modal.js} +4 -4
- package/dist/{ResponsivePopover.js → components/overlays/ResponsivePopover/ResponsivePopover.js} +4 -4
- package/dist/{Tooltip.js → components/overlays/Tooltip/Tooltip.js} +8 -7
- package/dist/components/overlays/Tooltip/TooltipEllipsis.d.ts +3 -2
- package/dist/{TooltipEllipsis.js → components/overlays/Tooltip/TooltipEllipsis.js} +2 -1
- package/dist/{tooltip.cva.js → components/overlays/Tooltip/tooltip.cva.js} +1 -1
- package/dist/{Segment.js → components/segment/Segment.js} +5 -5
- package/dist/{SegmentItem.js → components/segment/SegmentItem.js} +3 -3
- package/dist/{Pagination.js → components/shared/pagination/Pagination.js} +3 -3
- package/dist/{PaginationList.js → components/shared/pagination/PaginationList.js} +6 -6
- package/dist/{Alert.js → components/status/Alert/Alert.js} +4 -4
- package/dist/{Loader.js → components/status/Loader/Loader.js} +1 -1
- package/dist/{Toast.js → components/status/Toast/Toast.js} +6 -6
- package/dist/{toast.cva.js → components/status/Toast/toast.cva.js} +1 -1
- package/dist/{CellText.js → components/table/CellText.js} +1 -1
- package/dist/{ColumnConfig.js → components/table/ColumnConfig.js} +5 -5
- package/dist/{HeaderText.js → components/table/HeaderText.js} +1 -1
- package/dist/{InfiniteTable.js → components/table/InfiniteTable.js} +3 -3
- package/dist/{PaginatedTable.js → components/table/PaginatedTable.js} +2 -2
- package/dist/{Table.js → components/table/Table.js} +10 -10
- package/dist/{table.cva.js → components/table/table.cva.js} +1 -1
- package/dist/{Link2.js → components/text/Link/Link.js} +3 -3
- package/dist/{link.cva.js → components/text/Link/link.cva.js} +1 -1
- package/dist/components/text/Tag/Tag.d.ts +3 -1
- package/dist/components/text/Tag/Tag.js +38 -0
- package/dist/{tag.cva.js → components/text/Tag/tag.cva.js} +2 -2
- package/dist/{Typography.js → components/text/Typography/Typography.js} +2 -2
- package/dist/{confirmation.context.js → config/confirmation.context.js} +1 -1
- package/dist/config/i18n.d.ts +0 -15
- package/dist/config/i18n.js +8 -0
- package/dist/{theme.context.js → config/theme.context.js} +1 -1
- package/dist/{uiConfig.context.js → config/uiConfig.context.js} +2 -2
- package/dist/config/uiStyle.context.d.ts +31 -0
- package/dist/{dynamicColumns.js → helpers/dynamicColumns.js} +3 -3
- package/dist/{dynamicInputs.js → helpers/dynamicInputs.js} +2 -2
- package/dist/{useAutosave.js → hooks/useAutosave.js} +2 -2
- package/dist/{useDeepCompare.js → hooks/useDeepCompare.js} +1 -1
- package/dist/{useFilters.js → hooks/useFilters.js} +1 -1
- package/dist/{useForm.js → hooks/useForm.js} +1 -1
- package/dist/{useFormAutosave.js → hooks/useFormAutosave.js} +2 -2
- package/dist/{usePagination.js → hooks/usePagination.js} +1 -1
- package/dist/{useSorting.js → hooks/useSorting.js} +1 -1
- package/dist/{useStateAndRef.js → hooks/useStateAndRef.js} +1 -1
- package/dist/{useTableNav.js → hooks/useTableNav.js} +1 -1
- package/dist/index.d.ts +13 -7
- package/dist/index.js +138 -136
- package/dist/node_modules/.pnpm/motion@12.23.28_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/motion/dist/es/react.js +10 -0
- package/dist/text-editor.js +1 -1
- package/dist/types/error-handling.d.ts +6 -0
- package/dist/types/react-query.d.ts +1 -1
- package/package.json +2 -3
- package/dist/AclGuard.js +0 -12
- package/dist/AuthGuard.js +0 -22
- package/dist/Button.js +0 -54
- package/dist/ButtonContent.js +0 -28
- package/dist/Calendar.js +0 -15
- package/dist/Can.js +0 -13
- package/dist/CheckCircle.js +0 -13
- package/dist/Clock.js +0 -13
- package/dist/DateTime.js +0 -18
- package/dist/File.js +0 -15
- package/dist/IconButton.js +0 -12
- package/dist/Menu.js +0 -13
- package/dist/MenuDesktop.js +0 -54
- package/dist/PillButton.js +0 -37
- package/dist/Tag.js +0 -42
- package/dist/View.js +0 -13
- package/dist/ViewOff.js +0 -13
- package/dist/ability.context.js +0 -35
- package/dist/auth.context.js +0 -37
- package/dist/auth.d.ts +0 -6
- package/dist/auth.js +0 -6
- package/dist/buttonContent.cva.js +0 -10
- package/dist/error-handling.js +0 -99
- package/dist/i18n.js +0 -8
- package/dist/react.js +0 -6
- package/dist/rest-interceptor.js +0 -22
- package/dist/utils/vendor/acl/AclGuard.d.ts +0 -8
- package/dist/utils/vendor/acl/Can.d.ts +0 -9
- package/dist/utils/vendor/acl/ability.context.d.ts +0 -15
- package/dist/utils/vendor/acl/appAbility.types.d.ts +0 -3
- package/dist/utils/vendor/auth/AuthGuard.d.ts +0 -6
- package/dist/utils/vendor/auth/auth.context.d.ts +0 -22
- package/dist/utils/vendor/error-handling.d.ts +0 -21
- package/dist/utils/vendor/rest-client.types.d.ts +0 -23
- package/dist/utils/vendor/rest-interceptor.d.ts +0 -8
- package/dist/{AlignCenter.js → assets/icons/AlignCenter.js} +0 -0
- package/dist/{AlignLeft.js → assets/icons/AlignLeft.js} +0 -0
- package/dist/{AlignLeftRight.js → assets/icons/AlignLeftRight.js} +0 -0
- package/dist/{AlignRight.js → assets/icons/AlignRight.js} +0 -0
- package/dist/{Bold.js → assets/icons/Bold.js} +0 -0
- package/dist/{BulletedList.js → assets/icons/BulletedList.js} +0 -0
- package/dist/{CheckboxCheckmark.js → assets/icons/CheckboxCheckmark.js} +0 -0
- package/dist/{CheckboxIndeterminate.js → assets/icons/CheckboxIndeterminate.js} +0 -0
- package/dist/{ChevronLeft.js → assets/icons/ChevronLeft.js} +0 -0
- package/dist/{ChevronRight.js → assets/icons/ChevronRight.js} +0 -0
- package/dist/{ChevronsLeft.js → assets/icons/ChevronsLeft.js} +0 -0
- package/dist/{ChevronsRight.js → assets/icons/ChevronsRight.js} +0 -0
- package/dist/{Close.js → assets/icons/Close.js} +0 -0
- package/dist/{Highlight.js → assets/icons/Highlight.js} +0 -0
- package/dist/{Italic.js → assets/icons/Italic.js} +0 -0
- package/dist/{Link.js → assets/icons/Link.js} +0 -0
- package/dist/{NumberedList.js → assets/icons/NumberedList.js} +0 -0
- package/dist/{PointerHorizontal.js → assets/icons/PointerHorizontal.js} +0 -0
- package/dist/{PointerVertical.js → assets/icons/PointerVertical.js} +0 -0
- package/dist/{Send.js → assets/icons/Send.js} +0 -0
- package/dist/{Strikethrough.js → assets/icons/Strikethrough.js} +0 -0
- package/dist/{Today.js → assets/icons/Today.js} +0 -0
- package/dist/{Underlined.js → assets/icons/Underlined.js} +0 -0
- package/dist/{Upload.js → assets/icons/Upload.js} +0 -0
- package/dist/{WarningFilled.js → assets/icons/WarningFilled.js} +0 -0
- package/dist/{DateSegmentItem.js → components/inputs/DateTime/shared/DateSegmentItem.js} +0 -0
- package/dist/{RangeCalendar.js → components/inputs/DateTime/shared/RangeCalendar.js} +0 -0
- package/dist/{TimeField.js → components/inputs/DateTime/shared/TimeField.js} +0 -0
- package/dist/{FileUploadContainer.js → components/inputs/File/FileUploadContainer.js} +0 -0
- package/dist/{FileCard.js → components/inputs/File/shared/FileCard.js} +0 -0
- package/dist/{FileCardList.js → components/inputs/File/shared/FileCardList.js} +0 -0
- package/dist/{FormField.js → components/inputs/FormField/FormField.js} +0 -0
- package/dist/{Inputs.js → components/inputs/Inputs/Inputs.js} +0 -0
- package/dist/{useSelectItems.js → components/inputs/Selection/shared/useSelectItems.js} +1 -1
- /package/dist/{ColorPicker.js → components/inputs/TextEditor/Toolbar/ColorPicker.js} +0 -0
- /package/dist/{TextEditorToolbar.js → components/inputs/TextEditor/Toolbar/TextEditorToolbar.js} +0 -0
- /package/dist/{textEditor.types.js → components/inputs/TextEditor/textEditor.types.js} +0 -0
- /package/dist/{outline.clsx.js → components/outline.clsx.js} +0 -0
- /package/dist/{modal.cva.js → components/overlays/Modal/modal.cva.js} +0 -0
- /package/dist/{segment.cva.js → components/segment/segment.cva.js} +0 -0
- /package/dist/{minWidth.cva.js → components/shared/pagination/minWidth.cva.js} +0 -0
- /package/dist/{alert.cva.js → components/status/Alert/alert.cva.js} +0 -0
- /package/dist/{loader.cva.js → components/status/Loader/loader.cva.js} +0 -0
- /package/dist/{useToast.js → components/status/Toast/useToast.js} +0 -0
- /package/dist/{status.cva.js → components/status/shared/status.cva.js} +0 -0
- /package/dist/{typography.cva.js → components/text/Typography/typography.cva.js} +0 -0
- /package/dist/{link.context.js → config/link.context.js} +0 -0
- /package/dist/{router.context.js → config/router.context.js} +0 -0
- /package/dist/{uiStyle.context.js → config/uiStyle.context.js} +0 -0
- /package/dist/{useBreakpoint.js → hooks/useBreakpoint.js} +0 -0
- /package/dist/{useDebounceCallback.js → hooks/useDebounceCallback.js} +0 -0
- /package/dist/{useIntersectionObserver.js → hooks/useIntersectionObserver.js} +0 -0
- /package/dist/{useLocalStorage.js → hooks/useLocalStorage.js} +0 -0
- /package/dist/{useLongPressRepeat.js → hooks/useLongPressRepeat.js} +0 -0
- /package/dist/{useScrollableListBox.js → hooks/useScrollableListBox.js} +0 -0
- /package/dist/{useTableColumnConfig.js → hooks/useTableColumnConfig.js} +0 -0
- /package/dist/{useTranslationMemo.js → hooks/useTranslationMemo.js} +0 -0
- /package/dist/{array.utils.js → utils/array.utils.js} +0 -0
- /package/dist/{compoundMapper.js → utils/compoundMapper.js} +0 -0
- /package/dist/{date-time.utils.js → utils/date-time.utils.js} +0 -0
- /package/dist/{date.utils.js → utils/date.utils.js} +0 -0
- /package/dist/{dom.utils.js → utils/dom.utils.js} +0 -0
- /package/dist/{file.utils.js → utils/file.utils.js} +0 -0
- /package/dist/{isEqual.js → utils/isEqual.js} +0 -0
- /package/dist/{logger.js → utils/logger.js} +0 -0
- /package/dist/{object.utils.js → utils/object.utils.js} +0 -0
- /package/dist/{queries.utils.js → utils/queries.utils.js} +0 -0
- /package/dist/{rest.utils.js → utils/rest.utils.js} +0 -0
- /package/dist/{routing.utils.js → utils/routing.utils.js} +0 -0
- /package/dist/{string.utils.js → utils/string.utils.js} +0 -0
- /package/dist/{zod.utils.js → utils/zod.utils.js} +0 -0
package/dist/MenuDesktop.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { MenuPopover } from "./MenuPopover.js";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { MenuTrigger } from "react-aria-components";
|
|
4
|
-
import React, { useRef, useState } from "react";
|
|
5
|
-
import { useHover } from "react-aria";
|
|
6
|
-
var CLOSE_DELAY = 100;
|
|
7
|
-
const MenuDesktop = ({ trigger, items, closeDelay = CLOSE_DELAY, triggerOnHover = false, onAction,...props }) => {
|
|
8
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
9
|
-
const timeoutRef = useRef(null);
|
|
10
|
-
const isHoveringTrigger = useRef(false);
|
|
11
|
-
const openMenu = () => {
|
|
12
|
-
if (timeoutRef.current) {
|
|
13
|
-
clearTimeout(timeoutRef.current);
|
|
14
|
-
timeoutRef.current = null;
|
|
15
|
-
}
|
|
16
|
-
setIsOpen(true);
|
|
17
|
-
};
|
|
18
|
-
const closeMenu = () => {
|
|
19
|
-
if (isHoveringTrigger.current) return;
|
|
20
|
-
timeoutRef.current = setTimeout(() => {
|
|
21
|
-
setIsOpen(false);
|
|
22
|
-
timeoutRef.current = null;
|
|
23
|
-
}, closeDelay);
|
|
24
|
-
};
|
|
25
|
-
const { hoverProps } = useHover({
|
|
26
|
-
isDisabled: !triggerOnHover,
|
|
27
|
-
onHoverChange: (isHovering) => {
|
|
28
|
-
if (isHovering) {
|
|
29
|
-
isHoveringTrigger.current = true;
|
|
30
|
-
openMenu();
|
|
31
|
-
} else {
|
|
32
|
-
isHoveringTrigger.current = false;
|
|
33
|
-
closeMenu();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
let triggerComponent = trigger;
|
|
38
|
-
if (triggerOnHover) triggerComponent = React.cloneElement(trigger, hoverProps);
|
|
39
|
-
return /* @__PURE__ */ jsxs(MenuTrigger, {
|
|
40
|
-
isOpen: triggerOnHover ? isOpen : void 0,
|
|
41
|
-
onOpenChange: setIsOpen,
|
|
42
|
-
children: [triggerComponent, /* @__PURE__ */ jsx(MenuPopover, {
|
|
43
|
-
...props,
|
|
44
|
-
offset: 0,
|
|
45
|
-
items,
|
|
46
|
-
onAction,
|
|
47
|
-
isOpen: triggerOnHover ? isOpen : void 0,
|
|
48
|
-
isNonModal: triggerOnHover,
|
|
49
|
-
onMouseEnter: triggerOnHover ? openMenu : void 0,
|
|
50
|
-
onMouseLeave: triggerOnHover ? closeMenu : void 0
|
|
51
|
-
})]
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
export { MenuDesktop };
|
package/dist/PillButton.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { CloseIcon } from "./Close.js";
|
|
2
|
-
import { UIStyle } from "./uiStyle.context.js";
|
|
3
|
-
import { ButtonContent } from "./ButtonContent.js";
|
|
4
|
-
import { TooltipEllipsis } from "./TooltipEllipsis.js";
|
|
5
|
-
import { pillButton, pillButtonContent, pillButtonIconSize, pillButtonTypography } from "./pillButton.cva.js";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
import { Button, ToggleButton } from "react-aria-components";
|
|
8
|
-
const PillButton = ({ children, dismissable, toggle, icon, iconPosition,...props }) => {
|
|
9
|
-
const uiStyle = UIStyle.useConfig();
|
|
10
|
-
const pillButtonCva = uiStyle?.pillButton?.cva ?? pillButton;
|
|
11
|
-
const pillButtonTypographyMap = uiStyle?.pillButton?.typography ?? pillButtonTypography;
|
|
12
|
-
const Component = toggle ? ToggleButton : Button;
|
|
13
|
-
const getIconPosition = () => {
|
|
14
|
-
if (dismissable) return "right";
|
|
15
|
-
return icon ? iconPosition : "none";
|
|
16
|
-
};
|
|
17
|
-
return /* @__PURE__ */ jsx(TooltipEllipsis, {
|
|
18
|
-
text: children,
|
|
19
|
-
children: (onContentRef) => /* @__PURE__ */ jsx(Component, {
|
|
20
|
-
...props,
|
|
21
|
-
className: pillButtonCva({
|
|
22
|
-
...props,
|
|
23
|
-
className: props.className
|
|
24
|
-
}),
|
|
25
|
-
children: /* @__PURE__ */ jsx(ButtonContent, {
|
|
26
|
-
text: children,
|
|
27
|
-
ref: onContentRef,
|
|
28
|
-
icon: dismissable ? CloseIcon : icon,
|
|
29
|
-
iconPosition: dismissable ? "right" : iconPosition,
|
|
30
|
-
className: pillButtonContent({ iconPosition: getIconPosition() }),
|
|
31
|
-
iconClassName: pillButtonIconSize,
|
|
32
|
-
typography: pillButtonTypographyMap({ ...props })
|
|
33
|
-
})
|
|
34
|
-
})
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
export { PillButton };
|
package/dist/Tag.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { CloseIcon } from "./Close.js";
|
|
2
|
-
import { UIStyle } from "./uiStyle.context.js";
|
|
3
|
-
import { Typography } from "./Typography.js";
|
|
4
|
-
import { TooltipEllipsis } from "./TooltipEllipsis.js";
|
|
5
|
-
import { ns } from "./i18n.js";
|
|
6
|
-
import { tag } from "./tag.cva.js";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { clsx } from "clsx";
|
|
9
|
-
import { Button } from "react-aria-components";
|
|
10
|
-
import { useTranslation } from "react-i18next";
|
|
11
|
-
const Tag = ({ className, children, dismissable, isDisabled, onDismiss,...props }) => {
|
|
12
|
-
const tagCva = UIStyle.useConfig()?.tag?.cva ?? tag;
|
|
13
|
-
const { t } = useTranslation("ui");
|
|
14
|
-
const buttonProps = {
|
|
15
|
-
isDisabled,
|
|
16
|
-
onPress: onDismiss,
|
|
17
|
-
label: t(($) => $.ui.tag.dismiss),
|
|
18
|
-
...props
|
|
19
|
-
};
|
|
20
|
-
return /* @__PURE__ */ jsx(TooltipEllipsis, {
|
|
21
|
-
text: children,
|
|
22
|
-
children: (onContentRef) => /* @__PURE__ */ jsxs("div", {
|
|
23
|
-
className: tagCva({
|
|
24
|
-
...props,
|
|
25
|
-
className: clsx("pointer-events-none", className)
|
|
26
|
-
}),
|
|
27
|
-
children: [/* @__PURE__ */ jsx(Typography, {
|
|
28
|
-
ref: onContentRef,
|
|
29
|
-
variant: "default",
|
|
30
|
-
size: "label-2",
|
|
31
|
-
as: "span",
|
|
32
|
-
className: "truncate",
|
|
33
|
-
children
|
|
34
|
-
}), dismissable && /* @__PURE__ */ jsx(Button, {
|
|
35
|
-
...buttonProps,
|
|
36
|
-
className: "pointer-events-auto shrink-0",
|
|
37
|
-
children: /* @__PURE__ */ jsx(CloseIcon, { className: "size-4" })
|
|
38
|
-
})]
|
|
39
|
-
})
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
export { Tag };
|
package/dist/View.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
const ViewIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
3
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
-
fill: "none",
|
|
5
|
-
viewBox: "0 0 24 24",
|
|
6
|
-
className: "fill-current",
|
|
7
|
-
...props,
|
|
8
|
-
children: /* @__PURE__ */ jsxs("g", {
|
|
9
|
-
fill: "currentColor",
|
|
10
|
-
children: [/* @__PURE__ */ jsx("path", { d: "M21.338 11.788A10.43 10.43 0 0 0 12 5.124a10.43 10.43 0 0 0-9.337 6.663.63.63 0 0 0 0 .425A10.43 10.43 0 0 0 12 18.875a10.43 10.43 0 0 0 9.337-6.662.62.62 0 0 0 0-.425M12 17.624c-3.312 0-6.812-2.456-8.081-5.625C5.188 8.831 8.688 6.375 12 6.375c3.313 0 6.813 2.456 8.081 5.625-1.268 3.169-4.768 5.625-8.081 5.625" }), /* @__PURE__ */ jsx("path", { d: "M12 8.25a3.75 3.75 0 1 0 0 7.5 3.75 3.75 0 0 0 0-7.5m0 6.25a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5" })]
|
|
11
|
-
})
|
|
12
|
-
});
|
|
13
|
-
export { ViewIcon };
|
package/dist/ViewOff.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
const ViewOffIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
3
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
-
fill: "none",
|
|
5
|
-
viewBox: "0 0 24 24",
|
|
6
|
-
className: "fill-current",
|
|
7
|
-
...props,
|
|
8
|
-
children: /* @__PURE__ */ jsxs("g", {
|
|
9
|
-
fill: "currentColor",
|
|
10
|
-
children: [/* @__PURE__ */ jsx("path", { d: "m5.275 16.069.894-.888A8.8 8.8 0 0 1 3.919 12C5.188 8.831 8.688 6.375 12 6.375a7.7 7.7 0 0 1 2.5.45l.969-.975A9.2 9.2 0 0 0 12 5.125a10.43 10.43 0 0 0-9.337 6.663.63.63 0 0 0 0 .425 10 10 0 0 0 2.612 3.856" }), /* @__PURE__ */ jsx("path", { d: "M9.5 11.831a2.5 2.5 0 0 1 2.313-2.312l1.13-1.138a3.75 3.75 0 0 0-4.58 4.582zM21.338 11.788a10.25 10.25 0 0 0-3.588-4.65l3-3.007-.881-.881L3.25 19.869l.881.881 3.188-3.187A9.56 9.56 0 0 0 12 18.875a10.43 10.43 0 0 0 9.337-6.662.62.62 0 0 0 0-.425M14.5 12a2.5 2.5 0 0 1-3.75 2.15l3.4-3.4A2.5 2.5 0 0 1 14.5 12M12 17.625a8.16 8.16 0 0 1-3.75-.988l1.588-1.587a3.75 3.75 0 0 0 5.218-5.219l1.794-1.793A9.1 9.1 0 0 1 20.081 12c-1.268 3.169-4.768 5.625-8.081 5.625" })]
|
|
11
|
-
})
|
|
12
|
-
});
|
|
13
|
-
export { ViewOffIcon };
|
package/dist/ability.context.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { AuthContext } from "./auth.context.js";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { createContext, useEffect, useState } from "react";
|
|
4
|
-
import { AbilityBuilder, createMongoAbility } from "@casl/ability";
|
|
5
|
-
import { unpackRules } from "@casl/ability/extra";
|
|
6
|
-
import { useAbility } from "@casl/react";
|
|
7
|
-
let AbilityContext;
|
|
8
|
-
(function(_AbilityContext) {
|
|
9
|
-
const createAppAbilityBuilder = () => new AbilityBuilder(createMongoAbility);
|
|
10
|
-
const initialAppAbility = createAppAbilityBuilder().build();
|
|
11
|
-
const Context = createContext({});
|
|
12
|
-
const { Consumer } = Context;
|
|
13
|
-
_AbilityContext.Consumer = Consumer;
|
|
14
|
-
_AbilityContext.Provider = ({ children }) => {
|
|
15
|
-
const [ability, setAbility] = useState(initialAppAbility);
|
|
16
|
-
const { user } = AuthContext.useAuth();
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
if (!user || !("aclRules" in user)) return;
|
|
19
|
-
const { can, build } = createAppAbilityBuilder();
|
|
20
|
-
const packedRules = user.aclRules;
|
|
21
|
-
unpackRules(packedRules).forEach(({ action, subject, conditions }) => {
|
|
22
|
-
can(action, subject, conditions);
|
|
23
|
-
});
|
|
24
|
-
setAbility(build());
|
|
25
|
-
}, [user]);
|
|
26
|
-
return /* @__PURE__ */ jsx(Context.Provider, {
|
|
27
|
-
value: ability,
|
|
28
|
-
children
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
_AbilityContext.useAbility = () => {
|
|
32
|
-
return useAbility(Context);
|
|
33
|
-
};
|
|
34
|
-
})(AbilityContext || (AbilityContext = {}));
|
|
35
|
-
export { AbilityContext };
|
package/dist/auth.context.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, use, useMemo } from "react";
|
|
3
|
-
let AuthContext;
|
|
4
|
-
(function(_AuthContext) {
|
|
5
|
-
const Context = createContext({});
|
|
6
|
-
_AuthContext.Provider = ({ isAuthenticated, isInitializing, logout, updateTokens, accessToken, user, userPromise, routes, loadingState, children }) => {
|
|
7
|
-
const value = useMemo(() => ({
|
|
8
|
-
isAuthenticated,
|
|
9
|
-
isInitializing,
|
|
10
|
-
logout,
|
|
11
|
-
updateTokens,
|
|
12
|
-
accessToken,
|
|
13
|
-
user,
|
|
14
|
-
userPromise,
|
|
15
|
-
routes,
|
|
16
|
-
loadingState
|
|
17
|
-
}), [
|
|
18
|
-
isAuthenticated,
|
|
19
|
-
isInitializing,
|
|
20
|
-
logout,
|
|
21
|
-
updateTokens,
|
|
22
|
-
accessToken,
|
|
23
|
-
user,
|
|
24
|
-
userPromise,
|
|
25
|
-
routes,
|
|
26
|
-
loadingState
|
|
27
|
-
]);
|
|
28
|
-
return /* @__PURE__ */ jsx(Context.Provider, {
|
|
29
|
-
value,
|
|
30
|
-
children
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
_AuthContext.useAuth = () => {
|
|
34
|
-
return use(Context);
|
|
35
|
-
};
|
|
36
|
-
})(AuthContext || (AuthContext = {}));
|
|
37
|
-
export { AuthContext };
|
package/dist/auth.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { createAclGuard } from './utils/vendor/acl/AclGuard';
|
|
2
|
-
export { AbilityContext } from './utils/vendor/acl/ability.context';
|
|
3
|
-
export type { AppAbilities, AppAbility } from './utils/vendor/acl/appAbility.types';
|
|
4
|
-
export { Can } from './utils/vendor/acl/Can';
|
|
5
|
-
export { AuthGuard } from './utils/vendor/auth/AuthGuard';
|
|
6
|
-
export { AuthContext } from './utils/vendor/auth/auth.context';
|
package/dist/auth.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AuthContext } from "./auth.context.js";
|
|
2
|
-
import { AbilityContext } from "./ability.context.js";
|
|
3
|
-
import { createAclGuard } from "./AclGuard.js";
|
|
4
|
-
import { Can } from "./Can.js";
|
|
5
|
-
import { AuthGuard } from "./AuthGuard.js";
|
|
6
|
-
export { AbilityContext, AuthContext, AuthGuard, Can, createAclGuard };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { cva } from "class-variance-authority";
|
|
2
|
-
const buttonContent = cva("flex w-full items-center justify-center", {
|
|
3
|
-
variants: { iconPosition: {
|
|
4
|
-
left: "flex-row",
|
|
5
|
-
right: "flex-row-reverse",
|
|
6
|
-
none: "flex-row"
|
|
7
|
-
} },
|
|
8
|
-
defaultVariants: { iconPosition: "left" }
|
|
9
|
-
});
|
|
10
|
-
export { buttonContent };
|
package/dist/error-handling.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { ns } from "./i18n.js";
|
|
2
|
-
import { RestUtils } from "./rest.utils.js";
|
|
3
|
-
import { logger } from "./logger.js";
|
|
4
|
-
import axios from "axios";
|
|
5
|
-
import { z } from "zod";
|
|
6
|
-
import i18next from "i18next";
|
|
7
|
-
var ApplicationException = class extends Error {
|
|
8
|
-
constructor(message, code, serverMessage) {
|
|
9
|
-
super(message);
|
|
10
|
-
this.serverMessage = null;
|
|
11
|
-
this.code = code;
|
|
12
|
-
this.serverMessage = serverMessage;
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
var ErrorHandler = class {
|
|
16
|
-
constructor(entries) {
|
|
17
|
-
this.entries = [];
|
|
18
|
-
const dataValidationError = {
|
|
19
|
-
code: "DATA_VALIDATION_ERROR",
|
|
20
|
-
condition: (e) => {
|
|
21
|
-
return e instanceof z.ZodError;
|
|
22
|
-
},
|
|
23
|
-
getMessage: () => i18next.t(($) => $.sharedErrors.dataValidation, { ns: "ui" })
|
|
24
|
-
};
|
|
25
|
-
const internalError = {
|
|
26
|
-
code: "INTERNAL_ERROR",
|
|
27
|
-
condition: (e) => {
|
|
28
|
-
if (axios.isAxiosError(e)) return e.response?.status != null && e.response.status >= 500 && e.response.status < 600;
|
|
29
|
-
return false;
|
|
30
|
-
},
|
|
31
|
-
getMessage: () => i18next.t(($) => $.sharedErrors.internalError, { ns: "ui" })
|
|
32
|
-
};
|
|
33
|
-
const networkError = {
|
|
34
|
-
code: "NETWORK_ERROR",
|
|
35
|
-
condition: (e) => {
|
|
36
|
-
if (axios.isAxiosError(e)) return e.code === "ERR_NETWORK";
|
|
37
|
-
return false;
|
|
38
|
-
},
|
|
39
|
-
getMessage: () => i18next.t(($) => $.sharedErrors.networkError, { ns: "ui" })
|
|
40
|
-
};
|
|
41
|
-
const canceledError = {
|
|
42
|
-
code: "CANCELED_ERROR",
|
|
43
|
-
condition: (e) => {
|
|
44
|
-
if (axios.isCancel(e)) return true;
|
|
45
|
-
if (axios.isAxiosError(e) && e.code === "ECONNABORTED") return true;
|
|
46
|
-
return false;
|
|
47
|
-
},
|
|
48
|
-
getMessage: () => i18next.t(($) => $.sharedErrors.canceledError, { ns: "ui" })
|
|
49
|
-
};
|
|
50
|
-
const unknownError = {
|
|
51
|
-
code: "UNKNOWN_ERROR",
|
|
52
|
-
condition: () => true,
|
|
53
|
-
getMessage: (e) => {
|
|
54
|
-
if (axios.isAxiosError(e) && e.response?.data?.code) return i18next.t(($) => $.sharedErrors.unknownErrorWithCode, {
|
|
55
|
-
ns: "ui",
|
|
56
|
-
code: e.response.data.code
|
|
57
|
-
});
|
|
58
|
-
return i18next.t(($) => $.sharedErrors.unknownError, { ns: "ui" });
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
this.entries = [
|
|
62
|
-
...entries,
|
|
63
|
-
dataValidationError,
|
|
64
|
-
internalError,
|
|
65
|
-
networkError,
|
|
66
|
-
canceledError,
|
|
67
|
-
unknownError
|
|
68
|
-
];
|
|
69
|
-
}
|
|
70
|
-
rethrowError(error) {
|
|
71
|
-
logger.error(error);
|
|
72
|
-
const errorEntry = this.entries.find((entry) => entry.condition(error ?? {}));
|
|
73
|
-
const serverMessage = RestUtils.extractServerErrorMessage(error);
|
|
74
|
-
throw new ApplicationException(errorEntry.getMessage(error), errorEntry.code, serverMessage);
|
|
75
|
-
}
|
|
76
|
-
getError(error) {
|
|
77
|
-
if (error instanceof ApplicationException) return error;
|
|
78
|
-
return null;
|
|
79
|
-
}
|
|
80
|
-
getErrorCode(error) {
|
|
81
|
-
if (error instanceof ApplicationException) return error.code;
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
static getErrorMessage(error, fallbackToUnknown = true) {
|
|
85
|
-
if (typeof error === "string") return error;
|
|
86
|
-
if (error instanceof Error) return error.message;
|
|
87
|
-
if (error instanceof ApplicationException) return error.message;
|
|
88
|
-
if (fallbackToUnknown) {
|
|
89
|
-
if (error && typeof error === "object" && "code" in error) return i18next.t(($) => $.sharedErrors.unknownErrorWithCode, {
|
|
90
|
-
ns: "ui",
|
|
91
|
-
code: error.code
|
|
92
|
-
});
|
|
93
|
-
return i18next.t(($) => $.sharedErrors.unknownError, { ns: "ui" });
|
|
94
|
-
}
|
|
95
|
-
return null;
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
const SharedErrorHandler = new ErrorHandler([]);
|
|
99
|
-
export { ApplicationException, ErrorHandler, SharedErrorHandler };
|
package/dist/i18n.js
DELETED
package/dist/react.js
DELETED
package/dist/rest-interceptor.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
var RestInterceptor = class {
|
|
2
|
-
constructor(applyInterceptor) {
|
|
3
|
-
this.applyInterceptor = applyInterceptor;
|
|
4
|
-
this.interceptorIdMap = [];
|
|
5
|
-
}
|
|
6
|
-
addInterceptor(client, ...args) {
|
|
7
|
-
this.removeInterceptor(client);
|
|
8
|
-
const interceptorId = this.applyInterceptor(client, ...args);
|
|
9
|
-
this.interceptorIdMap.push({
|
|
10
|
-
client,
|
|
11
|
-
interceptorId
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
removeInterceptor(client) {
|
|
15
|
-
const interceptorId = this.interceptorIdMap.find((i) => i.client === client)?.interceptorId;
|
|
16
|
-
if (interceptorId != null) {
|
|
17
|
-
client.interceptors.request.eject(interceptorId);
|
|
18
|
-
this.interceptorIdMap = this.interceptorIdMap.filter((i) => i.client !== client);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
export { RestInterceptor };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { AppAbilities } from './appAbility.types';
|
|
3
|
-
interface AclGuardProps<TAppAbilities extends AppAbilities = AppAbilities> {
|
|
4
|
-
canUse: TAppAbilities;
|
|
5
|
-
redirectTo?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const createAclGuard: <TAppAbilities extends AppAbilities = AppAbilities>() => ({ canUse, redirectTo, children }: PropsWithChildren<AclGuardProps<TAppAbilities>>) => import('react').ReactNode;
|
|
8
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AbilityTuple, PureAbility } from '@casl/ability';
|
|
2
|
-
import { BoundCanProps } from '@casl/react';
|
|
3
|
-
import { AppAbilities } from './appAbility.types';
|
|
4
|
-
type CanAbility = PureAbility<AbilityTuple<AppAbilities[0], AppAbilities[1]>>;
|
|
5
|
-
type CanProps<TAppAbilities extends AppAbilities = AppAbilities> = {
|
|
6
|
-
use: TAppAbilities;
|
|
7
|
-
} & Omit<BoundCanProps<CanAbility>, "do" | "I" | "on" | "a" | "an" | "this">;
|
|
8
|
-
export declare const Can: <TAppAbilities extends AppAbilities = AppAbilities>({ use, ...props }: CanProps<TAppAbilities>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { PureAbility, RawRuleOf } from '@casl/ability';
|
|
2
|
-
import { PackRule } from '@casl/ability/extra';
|
|
3
|
-
import { PropsWithChildren } from 'react';
|
|
4
|
-
import { AppAbilities, AppAbility } from './appAbility.types';
|
|
5
|
-
export declare namespace AbilityContext {
|
|
6
|
-
export const Consumer: import("react").Consumer<AppAbility>;
|
|
7
|
-
interface ProviderProps {
|
|
8
|
-
user?: {
|
|
9
|
-
aclRules?: PackRule<RawRuleOf<AppAbility>>[];
|
|
10
|
-
} | null;
|
|
11
|
-
}
|
|
12
|
-
export const Provider: ({ children }: PropsWithChildren<ProviderProps>) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export const useAbility: <TAppAbilities extends AppAbilities = AppAbilities>() => PureAbility<TAppAbilities>;
|
|
14
|
-
export {};
|
|
15
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
export interface AuthGuardProps {
|
|
3
|
-
type: "public-only" | "private";
|
|
4
|
-
redirectTo?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const AuthGuard: ({ type, redirectTo, children }: PropsWithChildren<AuthGuardProps>) => import('react').ReactNode;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
export declare namespace AuthContext {
|
|
3
|
-
export interface Routes {
|
|
4
|
-
authenticated?: string;
|
|
5
|
-
unauthenticated?: string;
|
|
6
|
-
}
|
|
7
|
-
interface Type<TUser = unknown> {
|
|
8
|
-
isAuthenticated: boolean;
|
|
9
|
-
isInitializing: boolean;
|
|
10
|
-
logout: () => void;
|
|
11
|
-
updateTokens?: (accessToken: string | null, refreshToken?: string | null) => void;
|
|
12
|
-
accessToken?: string | null;
|
|
13
|
-
user?: TUser | null;
|
|
14
|
-
userPromise?: () => Promise<TUser | null>;
|
|
15
|
-
routes?: Routes;
|
|
16
|
-
loadingState?: ReactNode;
|
|
17
|
-
}
|
|
18
|
-
type ProviderProps<TUser = unknown> = Type<TUser>;
|
|
19
|
-
export const Provider: <TUser>({ isAuthenticated, isInitializing, logout, updateTokens, accessToken, user, userPromise, routes, loadingState, children, }: PropsWithChildren<ProviderProps<TUser>>) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export const useAuth: <TUser>() => Type<TUser>;
|
|
21
|
-
export {};
|
|
22
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export type GeneralErrorCodes = "DATA_VALIDATION_ERROR" | "NETWORK_ERROR" | "CANCELED_ERROR" | "INTERNAL_ERROR" | "UNKNOWN_ERROR";
|
|
2
|
-
export declare class ApplicationException<CodeT> extends Error {
|
|
3
|
-
code: CodeT;
|
|
4
|
-
serverMessage: string | null;
|
|
5
|
-
constructor(message: string, code: CodeT, serverMessage: string | null);
|
|
6
|
-
}
|
|
7
|
-
interface ErrorEntry<CodeT> {
|
|
8
|
-
code: CodeT;
|
|
9
|
-
condition: (error: unknown) => boolean;
|
|
10
|
-
getMessage: (error: unknown) => string;
|
|
11
|
-
}
|
|
12
|
-
export declare class ErrorHandler<CodeT extends string> {
|
|
13
|
-
entries: ErrorEntry<CodeT | GeneralErrorCodes>[];
|
|
14
|
-
constructor(entries: ErrorEntry<CodeT>[]);
|
|
15
|
-
rethrowError(error: unknown): ApplicationException<CodeT | GeneralErrorCodes>;
|
|
16
|
-
getError(error: unknown): ApplicationException<CodeT | GeneralErrorCodes> | null;
|
|
17
|
-
getErrorCode(error: unknown): CodeT | GeneralErrorCodes | null;
|
|
18
|
-
static getErrorMessage(error: unknown, fallbackToUnknown?: boolean): string | null;
|
|
19
|
-
}
|
|
20
|
-
export declare const SharedErrorHandler: ErrorHandler<never>;
|
|
21
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { ErrorHandler } from './error-handling';
|
|
4
|
-
import { RestInterceptor } from './rest-interceptor';
|
|
5
|
-
export type GeneralErrorCodes = string;
|
|
6
|
-
export interface RequestInfo<ZOutput, ECodes extends string> {
|
|
7
|
-
resSchema: z.ZodType<ZOutput>;
|
|
8
|
-
errorHandler?: ErrorHandler<ECodes>;
|
|
9
|
-
}
|
|
10
|
-
export interface RequestConfig<IsRawRes extends boolean = false> {
|
|
11
|
-
rawResponse?: IsRawRes;
|
|
12
|
-
}
|
|
13
|
-
export type Response<ZOutput, IsRawRes extends boolean = false> = IsRawRes extends true ? AxiosResponse<ZOutput> : ZOutput;
|
|
14
|
-
export interface RestClient {
|
|
15
|
-
attachInterceptors<T extends any[]>(interceptors?: RestInterceptor<T>[], ...args: T): void;
|
|
16
|
-
attachInterceptor<T extends any[]>(interceptor: RestInterceptor<T>, ...args: T): void;
|
|
17
|
-
ejectInterceptor<T extends any[]>(interceptor: RestInterceptor<T>): void;
|
|
18
|
-
get<ZOutput, ECodes extends string = GeneralErrorCodes, IsRawRes extends boolean = false>(requestInfo: RequestInfo<ZOutput, ECodes>, url: string, requestConfig?: AxiosRequestConfig & RequestConfig<IsRawRes>): Promise<Response<ZOutput, IsRawRes>>;
|
|
19
|
-
post<ZOutput, ECodes extends string = GeneralErrorCodes, IsRawRes extends boolean = false>(requestInfo: RequestInfo<ZOutput, ECodes>, url: string, data?: any, requestConfig?: AxiosRequestConfig & RequestConfig<IsRawRes>): Promise<Response<ZOutput, IsRawRes>>;
|
|
20
|
-
patch<ZOutput, ECodes extends string = GeneralErrorCodes, IsRawRes extends boolean = false>(requestInfo: RequestInfo<ZOutput, ECodes>, url: string, data?: any, requestConfig?: AxiosRequestConfig & RequestConfig<IsRawRes>): Promise<Response<ZOutput, IsRawRes>>;
|
|
21
|
-
put<ZOutput, ECodes extends string = GeneralErrorCodes, IsRawRes extends boolean = false>(requestInfo: RequestInfo<ZOutput, ECodes>, url: string, data?: any, requestConfig?: AxiosRequestConfig & RequestConfig<IsRawRes>): Promise<Response<ZOutput, IsRawRes>>;
|
|
22
|
-
delete<ZOutput, ECodes extends string = GeneralErrorCodes, IsRawRes extends boolean = false>(requestInfo: RequestInfo<ZOutput, ECodes>, url: string, data?: any, requestConfig?: AxiosRequestConfig & RequestConfig<IsRawRes>): Promise<Response<ZOutput, IsRawRes>>;
|
|
23
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { AxiosInstance } from 'axios';
|
|
2
|
-
export declare class RestInterceptor<T extends any[]> {
|
|
3
|
-
private applyInterceptor;
|
|
4
|
-
private interceptorIdMap;
|
|
5
|
-
constructor(applyInterceptor: (client: AxiosInstance, ...args: T) => number);
|
|
6
|
-
addInterceptor(client: AxiosInstance, ...args: T): void;
|
|
7
|
-
removeInterceptor(client: AxiosInstance): void;
|
|
8
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{TextEditorToolbar.js → components/inputs/TextEditor/Toolbar/TextEditorToolbar.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|