dxd-style-code 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dxd-style-code.js +11974 -3725
- package/dist/dxd-style-code.umd.cjs +10 -1
- package/dist/style.css +1 -1
- package/package.json +14 -6
- package/src/components/atoms/DXAvatar/DXAvatar.stories.js +319 -0
- package/src/components/atoms/DXAvatar/DXAvatar.vue +167 -0
- package/src/components/atoms/DXAvatar/index.js +2 -0
- package/src/components/atoms/DXBackdrop/DXBackdrop.stories.js +341 -0
- package/src/components/atoms/DXBackdrop/DXBackdrop.vue +102 -0
- package/src/components/atoms/DXBackdrop/index.js +2 -0
- package/src/components/atoms/DXBadge/DXBadge.stories.js +239 -0
- package/src/components/atoms/DXBadge/DXBadge.vue +45 -0
- package/src/components/atoms/DXBadge/index.js +2 -0
- package/src/components/atoms/DXButton/DXButton.stories.js +178 -0
- package/src/components/atoms/DXButton/DXButton.vue +84 -0
- package/src/components/atoms/DXButton/index.js +2 -0
- package/src/components/atoms/DXCard/DXCard.stories.js +133 -0
- package/src/components/atoms/DXCard/DXCard.vue +46 -0
- package/src/components/atoms/DXCard/index.js +2 -0
- package/src/components/atoms/DXCheckbox/DXCheckbox.stories.js +294 -0
- package/src/components/atoms/DXCheckbox/DXCheckbox.vue +191 -0
- package/src/components/atoms/DXCheckbox/index.js +2 -0
- package/src/components/atoms/DXDivider/DXDivider.stories.js +135 -0
- package/src/components/atoms/DXDivider/DXDivider.vue +74 -0
- package/src/components/atoms/DXDivider/index.js +2 -0
- package/src/components/atoms/DXDropdownItem/DXDropdownItem.vue +116 -0
- package/src/components/atoms/DXDropdownItem/index.js +2 -0
- package/src/components/atoms/DXFormLabel/DXFormLabel.stories.js +194 -0
- package/src/components/atoms/DXFormLabel/DXFormLabel.vue +94 -0
- package/src/components/atoms/DXFormLabel/index.js +2 -0
- package/src/components/atoms/DXIcon/DXIcon.stories.js +156 -0
- package/src/components/atoms/DXIcon/DXIcon.vue +102 -0
- package/src/components/atoms/DXIcon/index.js +3 -0
- package/src/components/atoms/DXIconWrapper/DXIconWrapper.stories.js +237 -0
- package/src/components/atoms/DXIconWrapper/DXIconWrapper.vue +79 -0
- package/src/components/atoms/DXIconWrapper/index.js +2 -0
- package/src/components/atoms/DXInputAddon/DXInputAddon.stories.js +230 -0
- package/src/components/atoms/DXInputAddon/DXInputAddon.vue +64 -0
- package/src/components/atoms/DXInputAddon/index.js +2 -0
- package/src/components/atoms/DXLink/DXLink.stories.js +475 -0
- package/src/components/atoms/DXLink/DXLink.vue +229 -0
- package/src/components/atoms/DXLink/index.js +2 -0
- package/src/components/atoms/DXLoader/DXLoader.stories.js +280 -0
- package/src/components/atoms/DXLoader/DXLoader.vue +78 -0
- package/src/components/atoms/DXLoader/index.js +2 -0
- package/src/components/atoms/DXProgress/DXProgress.stories.js +312 -0
- package/src/components/atoms/DXProgress/DXProgress.vue +85 -0
- package/src/components/atoms/DXProgress/index.js +2 -0
- package/src/components/atoms/DXQuote/DXQuote.stories.js +255 -0
- package/src/components/atoms/DXQuote/DXQuote.vue +97 -0
- package/src/components/atoms/DXQuote/index.js +2 -0
- package/src/components/atoms/DXRadio/DXRadio.stories.js +277 -0
- package/src/components/atoms/DXRadio/DXRadio.vue +144 -0
- package/src/components/atoms/DXRadio/index.js +2 -0
- package/src/components/atoms/DXSkeleton/DXSkeleton.stories.js +50 -0
- package/src/components/atoms/DXSkeleton/DXSkeleton.vue +19 -0
- package/src/components/atoms/DXSkeleton/index.js +2 -0
- package/src/components/atoms/DXSlider/DXSlider.stories.js +522 -0
- package/src/components/atoms/DXSlider/DXSlider.vue +338 -0
- package/src/components/atoms/DXSlider/index.js +2 -0
- package/src/components/atoms/DXTags/DXTags.stories.js +206 -0
- package/src/components/atoms/DXTags/DXTags.vue +111 -0
- package/src/components/atoms/DXTags/index.js +2 -0
- package/src/components/atoms/DXToast/DXToast.stories.js +40 -0
- package/src/components/atoms/DXToast/DXToast.vue +32 -0
- package/src/components/atoms/DXToast/index.js +2 -0
- package/src/components/atoms/DXToggle/DXToggle.stories.js +143 -0
- package/src/components/atoms/DXToggle/DXToggle.vue +142 -0
- package/src/components/atoms/DXToggle/index.js +2 -0
- package/src/components/atoms/DXToggleButton/DXToggleButton.stories.js +513 -0
- package/src/components/atoms/DXToggleButton/DXToggleButton.vue +140 -0
- package/src/components/atoms/DXToggleButton/index.js +2 -0
- package/src/components/atoms/DXTooltip/DXTooltip.stories.js +243 -0
- package/src/components/atoms/DXTooltip/DXTooltip.vue +151 -0
- package/src/components/atoms/DXTooltip/index.js +2 -0
- package/src/components/atoms/index.js +24 -0
- package/src/components/index.js +20 -0
- package/src/components/layout/DXBox/DXBox.stories.js +238 -0
- package/src/components/layout/DXBox/DXBox.vue +198 -0
- package/src/components/layout/DXBox/index.js +2 -0
- package/src/components/layout/DXContainer/DXContainer.stories.js +147 -0
- package/src/components/layout/DXContainer/DXContainer.vue +83 -0
- package/src/components/layout/DXContainer/index.js +2 -0
- package/src/components/layout/DXFlex/DXFlex.stories.js +210 -0
- package/src/components/layout/DXFlex/DXFlex.vue +149 -0
- package/src/components/layout/DXFlex/index.js +2 -0
- package/src/components/layout/DXGrid/DXGrid.stories.js +238 -0
- package/src/components/layout/DXGrid/DXGrid.vue +167 -0
- package/src/components/layout/DXGrid/index.js +2 -0
- package/src/components/layout/DXSpacer/DXSpacer.stories.js +187 -0
- package/src/components/layout/DXSpacer/DXSpacer.vue +102 -0
- package/src/components/layout/DXSpacer/index.js +2 -0
- package/src/components/layout/DXStack/DXStack.stories.js +199 -0
- package/src/components/layout/DXStack/DXStack.vue +140 -0
- package/src/components/layout/DXStack/index.js +2 -0
- package/src/components/layout/index.js +8 -0
- package/src/components/molecules/DXActionButtons/DXActionButtons.stories.js +288 -0
- package/src/components/molecules/DXActionButtons/DXActionButtons.vue +106 -0
- package/src/components/molecules/DXActionButtons/index.js +2 -0
- package/src/components/molecules/DXAlert/DXAlert.stories.js +70 -0
- package/src/components/molecules/DXAlert/DXAlert.vue +116 -0
- package/src/components/molecules/DXAlert/index.js +2 -0
- package/src/components/molecules/DXBaseTable/DXBaseTable.stories.js +433 -0
- package/src/components/molecules/DXBaseTable/DXBaseTable.vue +459 -0
- package/src/components/molecules/DXBaseTable/index.js +4 -0
- package/src/components/molecules/DXBreadcrumb/DXBreadcrumb.stories.js +227 -0
- package/src/components/molecules/DXBreadcrumb/DXBreadcrumb.vue +96 -0
- package/src/components/molecules/DXBreadcrumb/index.js +2 -0
- package/src/components/molecules/DXButtonGroup/DXButtonGroup.stories.js +26 -0
- package/src/components/molecules/DXButtonGroup/DXButtonGroup.vue +78 -0
- package/src/components/molecules/DXButtonGroup/index.js +2 -0
- package/src/components/molecules/DXCloseButton/DXCloseButton.stories.js +53 -0
- package/src/components/molecules/DXCloseButton/DXCloseButton.vue +62 -0
- package/src/components/molecules/DXCloseButton/index.js +3 -0
- package/src/components/molecules/DXComboBox/DXComboBox.stories.js +62 -0
- package/src/components/molecules/DXComboBox/DXComboBox.vue +167 -0
- package/src/components/molecules/DXComboBox/index.js +2 -0
- package/src/components/molecules/DXCopyField/DXCopyField.stories.js +231 -0
- package/src/components/molecules/DXCopyField/DXCopyField.vue +75 -0
- package/src/components/molecules/DXCopyField/index.js +2 -0
- package/src/components/molecules/DXDataFilter/DXDataFilter.stories.js +275 -0
- package/src/components/molecules/DXDataFilter/DXDataFilter.vue +385 -0
- package/src/components/molecules/DXDataFilter/index.js +2 -0
- package/src/components/molecules/DXDatePicker/DXDatePicker.stories.js +42 -0
- package/src/components/molecules/DXDatePicker/DXDatePicker.vue +121 -0
- package/src/components/molecules/DXDatePicker/index.js +2 -0
- package/src/components/molecules/DXDropdownDivider/DXDropdownDivider.vue +30 -0
- package/src/components/molecules/DXDropdownDivider/index.js +2 -0
- package/src/components/molecules/DXFileUpload/DXFileUpload.stories.js +53 -0
- package/src/components/molecules/DXFileUpload/DXFileUpload.vue +199 -0
- package/src/components/molecules/DXFileUpload/index.js +2 -0
- package/src/components/molecules/DXFilterGroup/DXFilterGroup.stories.js +43 -0
- package/src/components/molecules/DXFilterGroup/DXFilterGroup.vue +43 -0
- package/src/components/molecules/DXFilterGroup/index.js +2 -0
- package/src/components/molecules/DXFormControl/DXFormControl.stories.js +69 -0
- package/src/components/molecules/DXFormControl/DXFormControl.vue +72 -0
- package/src/components/molecules/DXFormControl/index.js +2 -0
- package/src/components/molecules/DXInput/DXInput.stories.js +291 -0
- package/src/components/molecules/DXInput/DXInput.vue +156 -0
- package/src/components/molecules/DXInput/index.js +3 -0
- package/src/components/molecules/DXInputGroup/DXInputGroup.stories.js +228 -0
- package/src/components/molecules/DXInputGroup/DXInputGroup.vue +64 -0
- package/src/components/molecules/DXInputGroup/index.js +2 -0
- package/src/components/molecules/DXInputMask/DXInputMask.stories.js +53 -0
- package/src/components/molecules/DXInputMask/DXInputMask.vue +89 -0
- package/src/components/molecules/DXInputMask/index.js +2 -0
- package/src/components/molecules/DXMenu/DXMenu.stories.js +379 -0
- package/src/components/molecules/DXMenu/DXMenu.vue +331 -0
- package/src/components/molecules/DXMenu/README.md +479 -0
- package/src/components/molecules/DXMenu/index.js +2 -0
- package/src/components/molecules/DXPagination/DXPagination.stories.js +62 -0
- package/src/components/molecules/DXPagination/DXPagination.vue +123 -0
- package/src/components/molecules/DXPagination/index.js +2 -0
- package/src/components/molecules/DXPasswordInput/DXPasswordInput.stories.js +42 -0
- package/src/components/molecules/DXPasswordInput/DXPasswordInput.vue +74 -0
- package/src/components/molecules/DXPasswordInput/index.js +2 -0
- package/src/components/molecules/DXRadioCard/DXRadioCard.stories.js +60 -0
- package/src/components/molecules/DXRadioCard/DXRadioCard.vue +71 -0
- package/src/components/molecules/DXRadioCard/index.js +2 -0
- package/src/components/molecules/DXRadioGroup/DXRadioGroup.stories.js +297 -0
- package/src/components/molecules/DXRadioGroup/DXRadioGroup.vue +73 -0
- package/src/components/molecules/DXRadioGroup/index.js +2 -0
- package/src/components/molecules/DXRating/DXRating.stories.js +322 -0
- package/src/components/molecules/DXRating/DXRating.vue +402 -0
- package/src/components/molecules/DXRating/index.js +2 -0
- package/src/components/molecules/DXSearchBar/DXSearchBar.stories.js +357 -0
- package/src/components/molecules/DXSearchBar/DXSearchBar.vue +525 -0
- package/src/components/molecules/DXSearchBar/index.js +2 -0
- package/src/components/molecules/DXSearchSelect/DXSearchSelect.stories.js +50 -0
- package/src/components/molecules/DXSearchSelect/DXSearchSelect.vue +207 -0
- package/src/components/molecules/DXSearchSelect/index.js +2 -0
- package/src/components/molecules/DXSegmentedControl/DXSegmentedControl.stories.js +326 -0
- package/src/components/molecules/DXSegmentedControl/DXSegmentedControl.vue +116 -0
- package/src/components/molecules/DXSegmentedControl/index.js +2 -0
- package/src/components/molecules/DXSelect/DXSelect.stories.js +259 -0
- package/src/components/molecules/DXSelect/DXSelect.vue +149 -0
- package/src/components/molecules/DXSelect/index.js +3 -0
- package/src/components/molecules/DXStatCard/DXStatCard.stories.js +335 -0
- package/src/components/molecules/DXStatCard/DXStatCard.vue +309 -0
- package/src/components/molecules/DXStatCard/index.js +2 -0
- package/src/components/molecules/DXTableFiltersPanel/DXTableFiltersPanel.vue +72 -0
- package/src/components/molecules/DXTableFiltersPanel/index.js +7 -0
- package/src/components/molecules/DXTablePagination/DXTablePagination.stories.js +236 -0
- package/src/components/molecules/DXTablePagination/DXTablePagination.vue +93 -0
- package/src/components/molecules/DXTablePagination/index.js +2 -0
- package/src/components/molecules/DXTableToolbar/DXTableToolbar.stories.js +271 -0
- package/src/components/molecules/DXTableToolbar/DXTableToolbar.vue +102 -0
- package/src/components/molecules/DXTableToolbar/index.js +2 -0
- package/src/components/molecules/DXTextarea/DXTextarea.stories.js +239 -0
- package/src/components/molecules/DXTextarea/DXTextarea.vue +158 -0
- package/src/components/molecules/DXTextarea/index.js +3 -0
- package/src/components/molecules/DXTimePicker/DXTimePicker.stories.js +282 -0
- package/src/components/molecules/DXTimePicker/DXTimePicker.vue +640 -0
- package/src/components/molecules/DXTimePicker/index.js +2 -0
- package/src/components/molecules/DXValidationIcon/DXValidationIcon.stories.js +60 -0
- package/src/components/molecules/DXValidationIcon/DXValidationIcon.vue +53 -0
- package/src/components/molecules/DXValidationIcon/index.js +3 -0
- package/src/components/molecules/index.js +34 -0
- package/src/components/organisms/DXAccordion/DXAccordion.stories.js +33 -0
- package/src/components/organisms/DXAccordion/DXAccordion.vue +104 -0
- package/src/components/organisms/DXAccordion/index.js +2 -0
- package/src/components/organisms/DXAppLayout/DXAppLayout.stories.js +689 -0
- package/src/components/organisms/DXAppLayout/DXAppLayout.vue +460 -0
- package/src/components/organisms/DXAppLayout/index.js +2 -0
- package/src/components/organisms/DXAuthenticationForm/DXAuthenticationForm.stories.js +232 -0
- package/src/components/organisms/DXAuthenticationForm/DXAuthenticationForm.vue +458 -0
- package/src/components/organisms/DXAuthenticationForm/index.js +2 -0
- package/src/components/organisms/DXChartContainer/DXChartContainer.stories.js +286 -0
- package/src/components/organisms/DXChartContainer/DXChartContainer.vue +273 -0
- package/src/components/organisms/DXChartContainer/index.js +2 -0
- package/src/components/organisms/DXChatInterface/DXChatInterface.stories.js +164 -0
- package/src/components/organisms/DXChatInterface/DXChatInterface.vue +583 -0
- package/src/components/organisms/DXChatInterface/index.js +2 -0
- package/src/components/organisms/DXCommentSection/DXCommentSection.stories.js +173 -0
- package/src/components/organisms/DXCommentSection/DXCommentSection.vue +487 -0
- package/src/components/organisms/DXCommentSection/index.js +2 -0
- package/src/components/organisms/DXDashboardGrid/DXDashboardGrid.stories.js +331 -0
- package/src/components/organisms/DXDashboardGrid/DXDashboardGrid.vue +309 -0
- package/src/components/organisms/DXDashboardGrid/index.js +2 -0
- package/src/components/organisms/DXDashboardWidget/DXDashboardWidget.stories.js +271 -0
- package/src/components/organisms/DXDashboardWidget/DXDashboardWidget.vue +260 -0
- package/src/components/organisms/DXDashboardWidget/index.js +2 -0
- package/src/components/organisms/DXDataTable/DXDataTable.stories.js +247 -0
- package/src/components/organisms/DXDataTable/DXDataTable.vue +496 -0
- package/src/components/organisms/DXDataTable/index.js +2 -0
- package/src/components/organisms/DXDropdown/DXDropdown.stories.js +795 -0
- package/src/components/organisms/DXDropdown/DXDropdown.vue +238 -0
- package/src/components/organisms/DXDropdown/index.js +2 -0
- package/src/components/organisms/DXEmptyState/DXEmptyState.stories.js +37 -0
- package/src/components/organisms/DXEmptyState/DXEmptyState.vue +41 -0
- package/src/components/organisms/DXEmptyState/index.js +2 -0
- package/src/components/organisms/DXFormWizard/DXFormWizard.stories.js +378 -0
- package/src/components/organisms/DXFormWizard/DXFormWizard.vue +578 -0
- package/src/components/organisms/DXFormWizard/index.js +2 -0
- package/src/components/organisms/DXHeaderBar/DXHeaderBar.stories.js +448 -0
- package/src/components/organisms/DXHeaderBar/DXHeaderBar.vue +190 -0
- package/src/components/organisms/DXHeaderBar/index.js +2 -0
- package/src/components/organisms/DXMediaGallery/DXMediaGallery.stories.js +347 -0
- package/src/components/organisms/DXMediaGallery/DXMediaGallery.vue +422 -0
- package/src/components/organisms/DXMediaGallery/index.js +2 -0
- package/src/components/organisms/DXModal/DXModal.stories.js +138 -0
- package/src/components/organisms/DXModal/DXModal.vue +213 -0
- package/src/components/organisms/DXModal/index.js +2 -0
- package/src/components/organisms/DXNotificationCenter/DXNotificationCenter.stories.js +183 -0
- package/src/components/organisms/DXNotificationCenter/DXNotificationCenter.vue +566 -0
- package/src/components/organisms/DXNotificationCenter/index.js +2 -0
- package/src/components/organisms/DXReportGenerator/DXReportGenerator.stories.js +199 -0
- package/src/components/organisms/DXReportGenerator/DXReportGenerator.vue +344 -0
- package/src/components/organisms/DXReportGenerator/index.js +2 -0
- package/src/components/organisms/DXSettingsPanel/DXSettingsPanel.stories.js +245 -0
- package/src/components/organisms/DXSettingsPanel/DXSettingsPanel.vue +454 -0
- package/src/components/organisms/DXSettingsPanel/index.js +2 -0
- package/src/components/organisms/DXSidebar/DXSidebar.stories.js +316 -0
- package/src/components/organisms/DXSidebar/DXSidebar.vue +212 -0
- package/src/components/organisms/DXSidebar/index.js +2 -0
- package/src/components/organisms/DXSidebarMenu/DATA_STRUCTURE.md +299 -0
- package/src/components/organisms/DXSidebarMenu/DXSidebarMenu.stories.js +729 -0
- package/src/components/organisms/DXSidebarMenu/DXSidebarMenu.vue +257 -0
- package/src/components/organisms/DXSidebarMenu/DXSidebarMenuItem.vue +249 -0
- package/src/components/organisms/DXSidebarMenu/README.md +333 -0
- package/src/components/organisms/DXSidebarMenu/index.js +3 -0
- package/src/components/organisms/DXTable/DXTable.stories.js +550 -0
- package/src/components/organisms/DXTable/DXTable.vue +324 -0
- package/src/components/organisms/DXTable/index.js +2 -0
- package/src/components/organisms/DXTabs/DXTabs.stories.js +407 -0
- package/src/components/organisms/DXTabs/DXTabs.vue +301 -0
- package/src/components/organisms/DXTabs/index.js +2 -0
- package/src/components/organisms/DXUserProfileCard/DXUserProfileCard.stories.js +194 -0
- package/src/components/organisms/DXUserProfileCard/DXUserProfileCard.vue +403 -0
- package/src/components/organisms/DXUserProfileCard/index.js +2 -0
- package/src/components/organisms/DXWizard/DXWizard.stories.js +212 -0
- package/src/components/organisms/DXWizard/DXWizard.vue +615 -0
- package/src/components/organisms/DXWizard/index.js +2 -0
- package/src/components/organisms/index.js +25 -0
- package/src/components/typography/DXBlockquote/DXBlockquote.stories.js +33 -0
- package/src/components/typography/DXBlockquote/DXBlockquote.vue +44 -0
- package/src/components/typography/DXBlockquote/index.js +2 -0
- package/src/components/typography/DXCode/DXCode.stories.js +29 -0
- package/src/components/typography/DXCode/DXCode.vue +46 -0
- package/src/components/typography/DXCode/index.js +2 -0
- package/src/components/typography/DXHeading/DXHeading.stories.js +54 -0
- package/src/components/typography/DXHeading/DXHeading.vue +68 -0
- package/src/components/typography/DXHeading/index.js +2 -0
- package/src/components/typography/DXLabel/DXLabel.stories.js +40 -0
- package/src/components/typography/DXLabel/DXLabel.vue +49 -0
- package/src/components/typography/DXLabel/index.js +2 -0
- package/src/components/typography/DXList/DXList.stories.js +50 -0
- package/src/components/typography/DXList/DXList.vue +55 -0
- package/src/components/typography/DXList/index.js +2 -0
- package/src/components/typography/DXText/DXText.stories.js +47 -0
- package/src/components/typography/DXText/DXText.vue +67 -0
- package/src/components/typography/DXText/index.js +2 -0
- package/src/components/typography/index.js +8 -0
- package/src/components/utilities/DXAnimatePresence/DXAnimatePresence.stories.js +335 -0
- package/src/components/utilities/DXAnimatePresence/DXAnimatePresence.vue +207 -0
- package/src/components/utilities/DXAnimatePresence/index.js +2 -0
- package/src/components/utilities/DXBreakpointProvider/DXBreakpointProvider.stories.js +321 -0
- package/src/components/utilities/DXBreakpointProvider/DXBreakpointProvider.vue +158 -0
- package/src/components/utilities/DXBreakpointProvider/index.js +2 -0
- package/src/components/utilities/DXObserver/DXObserver.stories.js +324 -0
- package/src/components/utilities/DXObserver/DXObserver.vue +182 -0
- package/src/components/utilities/DXObserver/index.js +2 -0
- package/src/components/utilities/DXPortal/DXPortal.stories.js +267 -0
- package/src/components/utilities/DXPortal/DXPortal.vue +69 -0
- package/src/components/utilities/DXPortal/index.js +2 -0
- package/src/components/utilities/DXStaggeredAnimation/DXStaggeredAnimation.stories.js +339 -0
- package/src/components/utilities/DXStaggeredAnimation/DXStaggeredAnimation.vue +155 -0
- package/src/components/utilities/DXStaggeredAnimation/index.js +2 -0
- package/src/components/utilities/DXThemeProvider/DXThemeProvider.stories.js +327 -0
- package/src/components/utilities/DXThemeProvider/DXThemeProvider.vue +227 -0
- package/src/components/utilities/DXThemeProvider/index.js +2 -0
- package/src/components/utilities/DXTransitionGroup/DXTransitionGroup.stories.js +368 -0
- package/src/components/utilities/DXTransitionGroup/DXTransitionGroup.vue +212 -0
- package/src/components/utilities/DXTransitionGroup/index.js +2 -0
- package/src/components/utilities/index.js +9 -0
- package/src/composables/useAnimation.js +264 -0
- package/src/composables/useClassComposition.js +35 -0
- package/src/composables/useDataAttributes.js +83 -0
- package/src/composables/useMenu.js +88 -0
- package/src/composables/useSize.js +135 -0
- package/src/composables/useSpacing.js +37 -0
- package/src/composables/useTableColumns.js +88 -0
- package/src/composables/useTableData.js +82 -0
- package/src/composables/useTableFilter.js +158 -0
- package/src/composables/useTablePagination.js +89 -0
- package/src/composables/useTableSelection.js +77 -0
- package/src/composables/useTableSort.js +75 -0
- package/src/composables/useTabsScroll.js +88 -0
- package/src/composables/useVariant.js +700 -0
- package/src/index.js +86 -0
- package/src/styles/animations.css +171 -0
- package/src/styles/index.css +99 -0
- package/src/styles/tokens.js +123 -0
- package/src/utils/propTypes.js +77 -0
- package/src/utils/toggleButtonPresets.js +115 -0
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="centerClasses"
|
|
4
|
+
data-component="DXNotificationCenter"
|
|
5
|
+
:data-group-by="groupBy"
|
|
6
|
+
>
|
|
7
|
+
<!-- Trigger -->
|
|
8
|
+
<slot name="trigger">
|
|
9
|
+
<DXButton variant="ghost" size="md" @click="toggleDropdown">
|
|
10
|
+
<template #icon>
|
|
11
|
+
<DXIcon :icon="BellIcon" size="md" />
|
|
12
|
+
</template>
|
|
13
|
+
<DXBadge v-if="unreadCount > 0" :count="unreadCount" />
|
|
14
|
+
</DXButton>
|
|
15
|
+
</slot>
|
|
16
|
+
|
|
17
|
+
<!-- Dropdown -->
|
|
18
|
+
<DXDropdown
|
|
19
|
+
v-model:open="isOpen"
|
|
20
|
+
:position="position"
|
|
21
|
+
:width="width"
|
|
22
|
+
:max-height="maxHeight"
|
|
23
|
+
>
|
|
24
|
+
<template #trigger>
|
|
25
|
+
<div></div>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<!-- Header -->
|
|
29
|
+
<div v-if="showHeader || $slots.header" :class="headerClasses">
|
|
30
|
+
<slot name="header">
|
|
31
|
+
<div class="flex items-center justify-between">
|
|
32
|
+
<h3 class="text-lg font-semibold text-slate-900">Уведомления</h3>
|
|
33
|
+
<DXButton
|
|
34
|
+
v-if="unreadCount > 0"
|
|
35
|
+
size="sm"
|
|
36
|
+
variant="ghost"
|
|
37
|
+
@click="handleMarkAllRead"
|
|
38
|
+
>
|
|
39
|
+
Отметить все как прочитанные
|
|
40
|
+
</DXButton>
|
|
41
|
+
</div>
|
|
42
|
+
</slot>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<!-- Filters -->
|
|
46
|
+
<div v-if="filterable && filterOptions.length > 0" :class="filtersClasses">
|
|
47
|
+
<DXButton
|
|
48
|
+
v-for="option in filterOptions"
|
|
49
|
+
:key="option.value"
|
|
50
|
+
size="sm"
|
|
51
|
+
:variant="activeFilter === option.value ? 'primary' : 'ghost'"
|
|
52
|
+
@click="handleFilter(option.value)"
|
|
53
|
+
>
|
|
54
|
+
{{ option.label }}
|
|
55
|
+
</DXButton>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<!-- Notifications List -->
|
|
59
|
+
<div :class="listClasses">
|
|
60
|
+
<div
|
|
61
|
+
v-for="group in groupedNotifications"
|
|
62
|
+
:key="group.key"
|
|
63
|
+
class="mb-4"
|
|
64
|
+
>
|
|
65
|
+
<div v-if="groupBy" :class="groupHeaderClasses">
|
|
66
|
+
{{ group.label }}
|
|
67
|
+
</div>
|
|
68
|
+
<div :class="notificationsClasses">
|
|
69
|
+
<div
|
|
70
|
+
v-for="notification in group.items"
|
|
71
|
+
:key="notification.id"
|
|
72
|
+
:class="notificationClasses(notification)"
|
|
73
|
+
@click="handleNotificationClick(notification)"
|
|
74
|
+
>
|
|
75
|
+
<slot
|
|
76
|
+
name="notification"
|
|
77
|
+
:notification="notification"
|
|
78
|
+
:mark-read="() => handleMarkRead(notification.id)"
|
|
79
|
+
:delete="() => handleDelete(notification.id)"
|
|
80
|
+
>
|
|
81
|
+
<div class="flex gap-3">
|
|
82
|
+
<DXIcon
|
|
83
|
+
:icon="getNotificationIcon(notification.type)"
|
|
84
|
+
:size="'md'"
|
|
85
|
+
:class="iconClasses(notification.type)"
|
|
86
|
+
/>
|
|
87
|
+
<div class="flex-1">
|
|
88
|
+
<div class="flex items-center gap-2 mb-1">
|
|
89
|
+
<span class="font-semibold text-slate-900">
|
|
90
|
+
{{ notification.title }}
|
|
91
|
+
</span>
|
|
92
|
+
<span
|
|
93
|
+
v-if="!notification.read"
|
|
94
|
+
class="w-2 h-2 bg-blue-500 rounded-full"
|
|
95
|
+
></span>
|
|
96
|
+
</div>
|
|
97
|
+
<p class="text-sm text-slate-600 mb-1">
|
|
98
|
+
{{ notification.message }}
|
|
99
|
+
</p>
|
|
100
|
+
<span class="text-xs text-slate-500">
|
|
101
|
+
{{ formatTime(notification.date) }}
|
|
102
|
+
</span>
|
|
103
|
+
</div>
|
|
104
|
+
<div class="flex flex-col gap-1">
|
|
105
|
+
<DXButton
|
|
106
|
+
v-if="!notification.read"
|
|
107
|
+
size="sm"
|
|
108
|
+
variant="ghost"
|
|
109
|
+
@click.stop="handleMarkRead(notification.id)"
|
|
110
|
+
>
|
|
111
|
+
<template #icon>
|
|
112
|
+
<DXIcon :icon="CheckIcon" size="xs" />
|
|
113
|
+
</template>
|
|
114
|
+
</DXButton>
|
|
115
|
+
<DXButton
|
|
116
|
+
size="sm"
|
|
117
|
+
variant="ghost"
|
|
118
|
+
@click.stop="handleDelete(notification.id)"
|
|
119
|
+
>
|
|
120
|
+
<template #icon>
|
|
121
|
+
<DXIcon :icon="XMarkIcon" size="xs" />
|
|
122
|
+
</template>
|
|
123
|
+
</DXButton>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
</slot>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
|
|
132
|
+
<!-- Empty State -->
|
|
133
|
+
<div v-if="filteredNotifications.length === 0" :class="emptyClasses">
|
|
134
|
+
<p class="text-sm text-slate-500">Нет уведомлений</p>
|
|
135
|
+
</div>
|
|
136
|
+
</DXDropdown>
|
|
137
|
+
</div>
|
|
138
|
+
</template>
|
|
139
|
+
|
|
140
|
+
<script setup>
|
|
141
|
+
import { ref, computed } from "vue";
|
|
142
|
+
import { useClassComposition } from "@/composables/useClassComposition";
|
|
143
|
+
import { useSpacing } from "@/composables/useSpacing";
|
|
144
|
+
import DXButton from "../../atoms/DXButton/DXButton.vue";
|
|
145
|
+
import DXIcon from "../../atoms/DXIcon/DXIcon.vue";
|
|
146
|
+
import DXBadge from "../../atoms/DXBadge/DXBadge.vue";
|
|
147
|
+
import DXDropdown from "../DXDropdown/DXDropdown.vue";
|
|
148
|
+
import {
|
|
149
|
+
BellIcon,
|
|
150
|
+
CheckIcon,
|
|
151
|
+
XMarkIcon,
|
|
152
|
+
InformationCircleIcon,
|
|
153
|
+
CheckCircleIcon,
|
|
154
|
+
ExclamationTriangleIcon,
|
|
155
|
+
XCircleIcon,
|
|
156
|
+
} from "@heroicons/vue/24/outline";
|
|
157
|
+
|
|
158
|
+
const props = defineProps({
|
|
159
|
+
/**
|
|
160
|
+
* Уведомления
|
|
161
|
+
* Формат: [{ id, type, title, message, date, read, icon? }]
|
|
162
|
+
*/
|
|
163
|
+
notifications: {
|
|
164
|
+
type: Array,
|
|
165
|
+
required: true,
|
|
166
|
+
default: () => [],
|
|
167
|
+
},
|
|
168
|
+
/**
|
|
169
|
+
* Количество непрочитанных
|
|
170
|
+
*/
|
|
171
|
+
unreadCount: {
|
|
172
|
+
type: Number,
|
|
173
|
+
default: 0,
|
|
174
|
+
},
|
|
175
|
+
/**
|
|
176
|
+
* Группировка: date | type | none
|
|
177
|
+
* @default 'date'
|
|
178
|
+
*/
|
|
179
|
+
groupBy: {
|
|
180
|
+
type: String,
|
|
181
|
+
default: "date",
|
|
182
|
+
validator: (v) => ["date", "type", "none"].includes(v),
|
|
183
|
+
},
|
|
184
|
+
/**
|
|
185
|
+
* Фильтрация по типу
|
|
186
|
+
*/
|
|
187
|
+
filterBy: { type: String, default: "" },
|
|
188
|
+
/**
|
|
189
|
+
* Показывать фильтры
|
|
190
|
+
* @default false
|
|
191
|
+
*/
|
|
192
|
+
filterable: { type: Boolean, default: false },
|
|
193
|
+
/**
|
|
194
|
+
* Опции фильтров
|
|
195
|
+
* Формат: [{ value, label }]
|
|
196
|
+
*/
|
|
197
|
+
filterOptions: {
|
|
198
|
+
type: Array,
|
|
199
|
+
default: () => [
|
|
200
|
+
{ value: "all", label: "Все" },
|
|
201
|
+
{ value: "unread", label: "Непрочитанные" },
|
|
202
|
+
],
|
|
203
|
+
},
|
|
204
|
+
/**
|
|
205
|
+
* Показывать header
|
|
206
|
+
* @default true
|
|
207
|
+
*/
|
|
208
|
+
showHeader: { type: Boolean, default: true },
|
|
209
|
+
/**
|
|
210
|
+
* Позиция dropdown
|
|
211
|
+
* @default 'bottom-right'
|
|
212
|
+
*/
|
|
213
|
+
position: {
|
|
214
|
+
type: String,
|
|
215
|
+
default: "bottom-right",
|
|
216
|
+
},
|
|
217
|
+
/**
|
|
218
|
+
* Ширина dropdown
|
|
219
|
+
* @default '400px'
|
|
220
|
+
*/
|
|
221
|
+
width: { type: String, default: "400px" },
|
|
222
|
+
/**
|
|
223
|
+
* Максимальная высота dropdown
|
|
224
|
+
* @default '500px'
|
|
225
|
+
*/
|
|
226
|
+
maxHeight: { type: String, default: "500px" },
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
const emit = defineEmits([
|
|
230
|
+
"mark-read",
|
|
231
|
+
"mark-all-read",
|
|
232
|
+
"delete",
|
|
233
|
+
"filter",
|
|
234
|
+
"notification-click",
|
|
235
|
+
]);
|
|
236
|
+
|
|
237
|
+
const isOpen = ref(false);
|
|
238
|
+
const activeFilter = ref("all");
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Отфильтрованные уведомления
|
|
242
|
+
*
|
|
243
|
+
* @description
|
|
244
|
+
* Фильтрует уведомления по активному фильтру.
|
|
245
|
+
*
|
|
246
|
+
* @returns {Array} Отфильтрованный массив уведомлений
|
|
247
|
+
*/
|
|
248
|
+
const filteredNotifications = computed(() => {
|
|
249
|
+
let notifications = [...props.notifications];
|
|
250
|
+
|
|
251
|
+
if (activeFilter.value === "unread") {
|
|
252
|
+
notifications = notifications.filter((n) => !n.read);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
if (props.filterBy) {
|
|
256
|
+
notifications = notifications.filter(
|
|
257
|
+
(n) => n.type === props.filterBy
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
return notifications;
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Сгруппированные уведомления
|
|
266
|
+
*
|
|
267
|
+
* @description
|
|
268
|
+
* Группирует уведомления в зависимости от groupBy.
|
|
269
|
+
*
|
|
270
|
+
* @returns {Array} Массив групп уведомлений
|
|
271
|
+
*/
|
|
272
|
+
const groupedNotifications = computed(() => {
|
|
273
|
+
if (props.groupBy === "none") {
|
|
274
|
+
return [{ key: "all", label: "", items: filteredNotifications.value }];
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
const groups = {};
|
|
278
|
+
filteredNotifications.value.forEach((notification) => {
|
|
279
|
+
let key = "";
|
|
280
|
+
let label = "";
|
|
281
|
+
|
|
282
|
+
if (props.groupBy === "date") {
|
|
283
|
+
const date = new Date(notification.date);
|
|
284
|
+
const today = new Date();
|
|
285
|
+
const yesterday = new Date(today);
|
|
286
|
+
yesterday.setDate(yesterday.getDate() - 1);
|
|
287
|
+
|
|
288
|
+
if (date.toDateString() === today.toDateString()) {
|
|
289
|
+
key = "today";
|
|
290
|
+
label = "Сегодня";
|
|
291
|
+
} else if (date.toDateString() === yesterday.toDateString()) {
|
|
292
|
+
key = "yesterday";
|
|
293
|
+
label = "Вчера";
|
|
294
|
+
} else {
|
|
295
|
+
key = date.toLocaleDateString("ru-RU");
|
|
296
|
+
label = date.toLocaleDateString("ru-RU", {
|
|
297
|
+
year: "numeric",
|
|
298
|
+
month: "long",
|
|
299
|
+
day: "numeric",
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
} else if (props.groupBy === "type") {
|
|
303
|
+
key = notification.type || "info";
|
|
304
|
+
label = getTypeLabel(notification.type);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
if (!groups[key]) {
|
|
308
|
+
groups[key] = { key, label, items: [] };
|
|
309
|
+
}
|
|
310
|
+
groups[key].items.push(notification);
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
return Object.values(groups);
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Классы для центра
|
|
318
|
+
*
|
|
319
|
+
* @description
|
|
320
|
+
* Базовые классы для центра уведомлений.
|
|
321
|
+
*
|
|
322
|
+
* @returns {Array} Массив классов
|
|
323
|
+
*/
|
|
324
|
+
const centerClasses = computed(() => useClassComposition("relative"));
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Классы для header
|
|
328
|
+
*
|
|
329
|
+
* @description
|
|
330
|
+
* Классы для секции заголовка.
|
|
331
|
+
*
|
|
332
|
+
* @returns {Array} Массив классов
|
|
333
|
+
*/
|
|
334
|
+
const headerClasses = computed(() =>
|
|
335
|
+
useClassComposition("mb-4 pb-4 border-b border-slate-200", useSpacing("md", "padding"))
|
|
336
|
+
);
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Классы для фильтров
|
|
340
|
+
*
|
|
341
|
+
* @description
|
|
342
|
+
* Классы для секции фильтров.
|
|
343
|
+
*
|
|
344
|
+
* @returns {Array} Массив классов
|
|
345
|
+
*/
|
|
346
|
+
const filtersClasses = computed(() =>
|
|
347
|
+
useClassComposition("flex gap-2 mb-4", useSpacing("md", "padding"))
|
|
348
|
+
);
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Классы для списка
|
|
352
|
+
*
|
|
353
|
+
* @description
|
|
354
|
+
* Классы для списка уведомлений.
|
|
355
|
+
*
|
|
356
|
+
* @returns {Array} Массив классов
|
|
357
|
+
*/
|
|
358
|
+
const listClasses = computed(() =>
|
|
359
|
+
useClassComposition("overflow-y-auto", useSpacing("md", "padding"))
|
|
360
|
+
);
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Классы для заголовка группы
|
|
364
|
+
*
|
|
365
|
+
* @description
|
|
366
|
+
* Классы для заголовка группы уведомлений.
|
|
367
|
+
*
|
|
368
|
+
* @returns {Array} Массив классов
|
|
369
|
+
*/
|
|
370
|
+
const groupHeaderClasses = computed(() =>
|
|
371
|
+
useClassComposition("text-xs font-semibold text-slate-500 uppercase mb-2")
|
|
372
|
+
);
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Классы для уведомлений в группе
|
|
376
|
+
*
|
|
377
|
+
* @description
|
|
378
|
+
* Классы для контейнера уведомлений в группе.
|
|
379
|
+
*
|
|
380
|
+
* @returns {Array} Массив классов
|
|
381
|
+
*/
|
|
382
|
+
const notificationsClasses = computed(() =>
|
|
383
|
+
useClassComposition("space-y-2")
|
|
384
|
+
);
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Классы для уведомления
|
|
388
|
+
*
|
|
389
|
+
* @description
|
|
390
|
+
* Классы для отдельного уведомления.
|
|
391
|
+
*
|
|
392
|
+
* @param {Object} notification - Объект уведомления
|
|
393
|
+
* @returns {Array} Массив классов
|
|
394
|
+
*/
|
|
395
|
+
function notificationClasses(notification) {
|
|
396
|
+
return useClassComposition(
|
|
397
|
+
"p-3 rounded-lg cursor-pointer transition-colors",
|
|
398
|
+
notification.read
|
|
399
|
+
? "bg-white hover:bg-slate-50"
|
|
400
|
+
: "bg-blue-50 hover:bg-blue-100"
|
|
401
|
+
);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Классы для иконки
|
|
406
|
+
*
|
|
407
|
+
* @description
|
|
408
|
+
* Классы для иконки уведомления в зависимости от типа.
|
|
409
|
+
*
|
|
410
|
+
* @param {string} type - Тип уведомления
|
|
411
|
+
* @returns {string} Tailwind CSS классы
|
|
412
|
+
*/
|
|
413
|
+
function iconClasses(type) {
|
|
414
|
+
const classes = {
|
|
415
|
+
info: "text-blue-500",
|
|
416
|
+
success: "text-green-500",
|
|
417
|
+
warning: "text-yellow-500",
|
|
418
|
+
error: "text-red-500",
|
|
419
|
+
};
|
|
420
|
+
return classes[type] || classes.info;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Классы для пустого состояния
|
|
425
|
+
*
|
|
426
|
+
* @description
|
|
427
|
+
* Классы для пустого состояния.
|
|
428
|
+
*
|
|
429
|
+
* @returns {Array} Массив классов
|
|
430
|
+
*/
|
|
431
|
+
const emptyClasses = computed(() =>
|
|
432
|
+
useClassComposition("p-8 text-center", useSpacing("md", "padding"))
|
|
433
|
+
);
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Получение иконки уведомления
|
|
437
|
+
*
|
|
438
|
+
* @description
|
|
439
|
+
* Возвращает иконку в зависимости от типа уведомления.
|
|
440
|
+
*
|
|
441
|
+
* @param {string} type - Тип уведомления
|
|
442
|
+
* @returns {Object} Компонент иконки
|
|
443
|
+
*/
|
|
444
|
+
function getNotificationIcon(type) {
|
|
445
|
+
const icons = {
|
|
446
|
+
info: InformationCircleIcon,
|
|
447
|
+
success: CheckCircleIcon,
|
|
448
|
+
warning: ExclamationTriangleIcon,
|
|
449
|
+
error: XCircleIcon,
|
|
450
|
+
};
|
|
451
|
+
return icons[type] || InformationCircleIcon;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Получение метки типа
|
|
456
|
+
*
|
|
457
|
+
* @description
|
|
458
|
+
* Возвращает метку для типа уведомления.
|
|
459
|
+
*
|
|
460
|
+
* @param {string} type - Тип уведомления
|
|
461
|
+
* @returns {string} Метка типа
|
|
462
|
+
*/
|
|
463
|
+
function getTypeLabel(type) {
|
|
464
|
+
const labels = {
|
|
465
|
+
info: "Информация",
|
|
466
|
+
success: "Успех",
|
|
467
|
+
warning: "Предупреждение",
|
|
468
|
+
error: "Ошибка",
|
|
469
|
+
};
|
|
470
|
+
return labels[type] || "Уведомление";
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Форматирование времени
|
|
475
|
+
*
|
|
476
|
+
* @description
|
|
477
|
+
* Форматирует время для отображения.
|
|
478
|
+
*
|
|
479
|
+
* @param {Date|string} date - Дата
|
|
480
|
+
* @returns {string} Отформатированное время
|
|
481
|
+
*/
|
|
482
|
+
function formatTime(date) {
|
|
483
|
+
if (!date) return "";
|
|
484
|
+
const d = new Date(date);
|
|
485
|
+
const now = new Date();
|
|
486
|
+
const diff = now - d;
|
|
487
|
+
|
|
488
|
+
if (diff < 60000) return "только что";
|
|
489
|
+
if (diff < 3600000) return `${Math.floor(diff / 60000)} мин назад`;
|
|
490
|
+
if (diff < 86400000) return `${Math.floor(diff / 3600000)} ч назад`;
|
|
491
|
+
return d.toLocaleDateString("ru-RU", {
|
|
492
|
+
month: "short",
|
|
493
|
+
day: "numeric",
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* Переключение dropdown
|
|
499
|
+
*
|
|
500
|
+
* @description
|
|
501
|
+
* Переключает состояние dropdown.
|
|
502
|
+
*/
|
|
503
|
+
function toggleDropdown() {
|
|
504
|
+
isOpen.value = !isOpen.value;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Обработчик отметки как прочитанное
|
|
509
|
+
*
|
|
510
|
+
* @description
|
|
511
|
+
* Эмитит событие отметки уведомления как прочитанного.
|
|
512
|
+
*
|
|
513
|
+
* @param {number|string} notificationId - ID уведомления
|
|
514
|
+
*/
|
|
515
|
+
function handleMarkRead(notificationId) {
|
|
516
|
+
emit("mark-read", notificationId);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Обработчик отметки всех как прочитанных
|
|
521
|
+
*
|
|
522
|
+
* @description
|
|
523
|
+
* Эмитит событие отметки всех уведомлений как прочитанных.
|
|
524
|
+
*/
|
|
525
|
+
function handleMarkAllRead() {
|
|
526
|
+
emit("mark-all-read");
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Обработчик удаления
|
|
531
|
+
*
|
|
532
|
+
* @description
|
|
533
|
+
* Эмитит событие удаления уведомления.
|
|
534
|
+
*
|
|
535
|
+
* @param {number|string} notificationId - ID уведомления
|
|
536
|
+
*/
|
|
537
|
+
function handleDelete(notificationId) {
|
|
538
|
+
emit("delete", notificationId);
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Обработчик фильтра
|
|
543
|
+
*
|
|
544
|
+
* @description
|
|
545
|
+
* Обрабатывает изменение фильтра.
|
|
546
|
+
*
|
|
547
|
+
* @param {string} filterValue - Значение фильтра
|
|
548
|
+
*/
|
|
549
|
+
function handleFilter(filterValue) {
|
|
550
|
+
activeFilter.value = filterValue;
|
|
551
|
+
emit("filter", filterValue);
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Обработчик клика по уведомлению
|
|
556
|
+
*
|
|
557
|
+
* @description
|
|
558
|
+
* Обрабатывает клик по уведомлению.
|
|
559
|
+
*
|
|
560
|
+
* @param {Object} notification - Объект уведомления
|
|
561
|
+
*/
|
|
562
|
+
function handleNotificationClick(notification) {
|
|
563
|
+
emit("notification-click", notification);
|
|
564
|
+
}
|
|
565
|
+
</script>
|
|
566
|
+
|