@vokril/ui-solid 0.13.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/README.md +110 -31
- package/dist/{AttributeGrid-Bg88JYZI.cjs → AttributeGrid-7cLOWtPn.cjs} +1 -1
- package/dist/{AttributeGrid-BypjAajJ.js → AttributeGrid-CVyqzT7-.js} +5 -5
- package/dist/{Button-Db6wMY-3.js → Button-BiKPB3cH.js} +2 -2
- package/dist/{Button-d9jJBibg.cjs → Button-Nx7byQZc.cjs} +1 -1
- package/dist/CommandPalette-BFi0_e3t.cjs +2 -0
- package/dist/CommandPalette-CAH08DGN.js +4013 -0
- package/dist/{CopyButton-C93PFyYK.js → CopyButton-BF7L1TCO.js} +1 -1
- package/dist/{CopyButton-CXaZRU7b.cjs → CopyButton-BtgGbiy9.cjs} +1 -1
- package/dist/DateRangePicker-Ce2tTbJ4.cjs +9 -0
- package/dist/{DateRangePicker-D-5rg3h1.js → DateRangePicker-jSQBwB78.js} +181 -166
- package/dist/GuidedTour-CWDtBRHv.js +483 -0
- package/dist/GuidedTour-CYaR5Ozj.cjs +1 -0
- package/dist/HostPortal-B9Tzk_uN.cjs +1 -0
- package/dist/HostPortal-X1iw719T.js +33 -0
- package/dist/HostWindowContext-B2m0bVra.js +32 -0
- package/dist/HostWindowContext-_VZCt7xE.cjs +1 -0
- package/dist/{IconPicker-DPT-QfsC.cjs → IconPicker-4bdAeGxS.cjs} +1 -1
- package/dist/{IconPicker-C3ZwWkB1.js → IconPicker-Df6uIUpJ.js} +4 -4
- package/dist/{Input-Ca8fLm_s.cjs → Input-CZruORyy.cjs} +1 -1
- package/dist/{Input-gq8EcQao.js → Input-DkPhsdfk.js} +2 -2
- package/dist/Modal-CQG8l4x7.cjs +1 -0
- package/dist/{Modal-C4l_yuY9.js → Modal-CUPe98-o.js} +5 -5
- package/dist/PageSkeleton-C3mo6UGh.cjs +30 -0
- package/dist/{PageSkeleton-C95fXUUk.js → PageSkeleton-CUTLh9Ip.js} +630 -628
- package/dist/{Popover-C24npAQ7.js → Popover-Dht1jFEy.js} +1 -1
- package/dist/{Popover-hhGcYQ-a.cjs → Popover-YfzC0Tjh.cjs} +1 -1
- package/dist/{SearchableSelect-BpOD2_A-.js → SearchableSelect-C01brsF0.js} +5 -5
- package/dist/{SearchableSelect-MN5azo9r.cjs → SearchableSelect-pCaUie2M.cjs} +1 -1
- package/dist/StatusBarNotificationBell-BwqVV09r.js +14266 -0
- package/dist/StatusBarNotificationBell-C5Zc2IvW.cjs +50 -0
- package/dist/{Stepper-BgDx1cPX.js → Stepper-38IAEOyT.js} +3 -3
- package/dist/{Stepper-D7rXGxdg.cjs → Stepper-CtaTpnQu.cjs} +1 -1
- package/dist/{Textarea-BueHsjOk.js → Textarea-B5QqqKnI.js} +1 -1
- package/dist/{Textarea-BltpSavs.cjs → Textarea-CeAGf08O.cjs} +1 -1
- package/dist/{TimeSeriesChart-C3o7NZPh.js → TimeSeriesChart-ByKG4E1G.js} +2 -2
- package/dist/{TimeSeriesChart-DhYtrAgX.cjs → TimeSeriesChart-_NOs_Job.cjs} +1 -1
- package/dist/ToggleButton-Bz3zAtec.cjs +1 -0
- package/dist/{ToggleButton-DCP7f6Uo.js → ToggleButton-D-N0C2Fu.js} +54 -53
- package/dist/_internal/app/keybindings/context/keybindingsContext.d.cts +11 -6
- package/dist/_internal/app/keybindings/context/keybindingsContext.d.ts +11 -6
- package/dist/_internal/app/keybindings/context/useFocusClaim.d.cts +4 -3
- package/dist/_internal/app/keybindings/context/useFocusClaim.d.ts +4 -3
- package/dist/_internal/app/keybindings/context/useListCommands.d.cts +6 -5
- package/dist/_internal/app/keybindings/context/useListCommands.d.ts +6 -5
- package/dist/_internal/app/keybindings/index.d.cts +0 -10
- package/dist/_internal/app/keybindings/index.d.ts +0 -10
- package/dist/_internal/app/keybindings/panelCommandsRegistry.d.cts +14 -9
- package/dist/_internal/app/keybindings/panelCommandsRegistry.d.ts +14 -9
- package/dist/_internal/app/menu/menuFavorites.d.cts +35 -8
- package/dist/_internal/app/menu/menuFavorites.d.ts +35 -8
- package/dist/_internal/app/onboarding/pageTourState.d.cts +75 -22
- package/dist/_internal/app/onboarding/pageTourState.d.ts +75 -22
- package/dist/_internal/app/platform/electronBridge.d.cts +35 -29
- package/dist/_internal/app/platform/electronBridge.d.ts +35 -29
- package/dist/_internal/app/settings/secrets/notificationSecrets.d.cts +8 -4
- package/dist/_internal/app/settings/secrets/notificationSecrets.d.ts +8 -4
- package/dist/_internal/app/windows/window/HostWindowContext.d.cts +8 -14
- package/dist/_internal/app/windows/window/HostWindowContext.d.ts +8 -14
- package/dist/_internal/contract/catalogNotify.d.cts +6 -19
- package/dist/_internal/contract/catalogNotify.d.ts +6 -19
- package/dist/_internal/contract/hostErrorText.d.cts +13 -23
- package/dist/_internal/contract/hostErrorText.d.ts +13 -23
- package/dist/_internal/contract/notificationCatalog.d.cts +16 -5
- package/dist/_internal/contract/notificationCatalog.d.ts +16 -5
- package/dist/_internal/platform/errors/diagnosticReport.d.cts +3 -1
- package/dist/_internal/platform/errors/diagnosticReport.d.ts +3 -1
- package/dist/_internal/platform/logging/consoleLogger.d.cts +7 -0
- package/dist/_internal/platform/logging/consoleLogger.d.ts +7 -0
- package/dist/_internal/platform/settings/registry/defineSettings.d.cts +19 -8
- package/dist/_internal/platform/settings/registry/defineSettings.d.ts +19 -8
- package/dist/_internal/platform/settings/registry/stateDbStore.d.cts +23 -15
- package/dist/_internal/platform/settings/registry/stateDbStore.d.ts +23 -15
- package/dist/_internal/platform/vendorErrors/index.d.cts +7 -17
- package/dist/_internal/platform/vendorErrors/index.d.ts +7 -17
- package/dist/_internal/platform/window/displayOwner.d.cts +35 -14
- package/dist/_internal/platform/window/displayOwner.d.ts +35 -14
- package/dist/a11y/index.cjs +1 -1
- package/dist/a11y/index.js +1 -1
- package/dist/actions-DtaFGwh2.cjs +1 -0
- package/dist/actions-wwAHs3ZU.js +16 -0
- package/dist/{server/appThemeDerivation-BiCyiSuz.js → appThemeDerivation-B7-DjMIM.js} +181 -184
- package/dist/appThemeDerivation-NS3Vws8q.cjs +1 -0
- package/dist/async/createGuardedListLoader.d.cts +3 -0
- package/dist/async/createGuardedListLoader.d.ts +3 -0
- package/dist/charts/index.cjs +1 -1
- package/dist/charts/index.js +1 -1
- package/dist/createDialogShellFocus-BBFu3Z_O.js +282 -0
- package/dist/createDialogShellFocus-CxRqhbRN.cjs +1 -0
- package/dist/createResizableSidebar-CfFxQUny.js +449 -0
- package/dist/createResizableSidebar-q7aC7SAO.cjs +1 -0
- package/dist/{createVirtualScroller-LN-7QFiv.cjs → createVirtualScroller-CL49JE2P.cjs} +1 -1
- package/dist/{server/createVirtualScroller-DBvqT0UW.js → createVirtualScroller-vu-l4rVv.js} +7 -7
- package/dist/defineSettings-D0CSMcyy.cjs +1 -0
- package/dist/defineSettings-Di1sG81q.js +407 -0
- package/dist/descriptor-CaHgh9N_.cjs +1 -0
- package/dist/{descriptor-CrCl515S.js → descriptor-eGtcBtpI.js} +5 -5
- package/dist/desktop/index.cjs +1 -1
- package/dist/desktop/index.js +500 -426
- package/dist/dialogFocusRestore-BrALT8Ew.js +35 -0
- package/dist/dialogFocusRestore-CcEsB50v.cjs +1 -0
- package/dist/electronBridge-BK92fycw.js +235 -0
- package/dist/electronBridge-cT0xww92.cjs +1 -0
- package/dist/errorHandler-BvPGW-Nm.js +373 -0
- package/dist/errorHandler-DoDAPpv2.cjs +3 -0
- package/dist/feedback/Loader.d.cts +6 -1
- package/dist/feedback/Loader.d.ts +6 -1
- package/dist/feedback/createPreference.d.cts +4 -1
- package/dist/feedback/createPreference.d.ts +4 -1
- package/dist/feedback/guidedInstallOutcome.d.cts +15 -2
- package/dist/feedback/guidedInstallOutcome.d.ts +15 -2
- package/dist/feedback/index.cjs +1 -1
- package/dist/feedback/index.js +37 -38
- package/dist/feedback/readFailureText.d.cts +20 -1
- package/dist/feedback/readFailureText.d.ts +20 -1
- package/dist/focusModality-BISb6-yg.cjs +1 -0
- package/dist/focusModality-FoLPWF-_.js +135 -0
- package/dist/forms/index.cjs +1 -1
- package/dist/forms/index.js +9 -9
- package/dist/grid/index.cjs +1 -1
- package/dist/grid/index.js +1 -1
- package/dist/{headerIconOverrides-DY3BTuca.cjs → headerIconOverrides-Bn1QuODq.cjs} +1 -1
- package/dist/{server/headerIconOverrides-B7TQUBmD.js → headerIconOverrides-Dh2PaOcO.js} +1 -1
- package/dist/host/index.cjs +1 -1
- package/dist/host/index.d.cts +14 -16
- package/dist/host/index.d.ts +14 -16
- package/dist/host/index.js +53 -90
- package/dist/host/kitHost.d.cts +42 -0
- package/dist/host/kitHost.d.ts +42 -0
- package/dist/host/window.d.cts +3 -11
- package/dist/host/window.d.ts +3 -11
- package/dist/i18n/index.cjs +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/{server/i18n-D9k9xwuD.js → i18n-DW9kcu0G.js} +180 -178
- package/dist/i18n-DZ0JlZal.cjs +4 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +665 -738
- package/dist/isOneOf-9EXOSYJu.cjs +1 -0
- package/dist/isOneOf-Dtomuazg.js +6 -0
- package/dist/{keys-Bfgdfak_.js → keys-B2nlkpqc.js} +6 -9
- package/dist/keys-GMxY2wcl.cjs +1 -0
- package/dist/layout/createResizableSidebar.d.cts +14 -0
- package/dist/layout/createResizableSidebar.d.ts +14 -0
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.js +3 -3
- package/dist/layout/sidebarWidthClamp.d.cts +1 -1
- package/dist/layout/sidebarWidthClamp.d.ts +1 -1
- package/dist/mainRealmDom-C12lr9lm.js +171 -0
- package/dist/mainRealmDom-S6teqEr4.cjs +1 -0
- package/dist/navigation/index.cjs +1 -1
- package/dist/navigation/index.js +1 -1
- package/dist/notifications/NotificationHost.d.cts +7 -1
- package/dist/notifications/NotificationHost.d.ts +7 -1
- package/dist/notifications/NotificationItem.d.cts +48 -15
- package/dist/notifications/NotificationItem.d.ts +48 -15
- package/dist/notifications/catalogAdapter.d.cts +28 -6
- package/dist/notifications/catalogAdapter.d.ts +28 -6
- package/dist/notifications/createNotificationPreviewRuntime.d.cts +21 -3
- package/dist/notifications/createNotificationPreviewRuntime.d.ts +21 -3
- package/dist/notifications/customSoundCache.d.cts +24 -24
- package/dist/notifications/customSoundCache.d.ts +24 -24
- package/dist/notifications/emailDigest.d.cts +34 -16
- package/dist/notifications/emailDigest.d.ts +34 -16
- package/dist/notifications/errorActionButtons.d.cts +18 -1
- package/dist/notifications/errorActionButtons.d.ts +18 -1
- package/dist/notifications/fireNotification.d.cts +27 -17
- package/dist/notifications/fireNotification.d.ts +27 -17
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.d.cts +6 -12
- package/dist/notifications/index.d.ts +6 -12
- package/dist/notifications/index.js +64 -104
- package/dist/notifications/nativeEngine.d.cts +18 -15
- package/dist/notifications/nativeEngine.d.ts +18 -15
- package/dist/notifications/notificationAnalytics.d.cts +11 -6
- package/dist/notifications/notificationAnalytics.d.ts +11 -6
- package/dist/notifications/notificationAudio.d.cts +30 -23
- package/dist/notifications/notificationAudio.d.ts +30 -23
- package/dist/notifications/notificationCardServices.d.cts +23 -0
- package/dist/notifications/notificationCardServices.d.ts +23 -0
- package/dist/notifications/notificationOverlayChannel.d.cts +4 -4
- package/dist/notifications/notificationOverlayChannel.d.ts +4 -4
- package/dist/notifications/notificationOverlaySync.d.cts +7 -2
- package/dist/notifications/notificationOverlaySync.d.ts +7 -2
- package/dist/notifications/notificationService.d.cts +101 -0
- package/dist/notifications/notificationService.d.ts +101 -0
- package/dist/notifications/notificationTimeline.d.cts +47 -49
- package/dist/notifications/notificationTimeline.d.ts +47 -49
- package/dist/notifications/notifications.notifications.d.cts +0 -4
- package/dist/notifications/notifications.notifications.d.ts +0 -4
- package/dist/notifications/toast.d.cts +24 -28
- package/dist/notifications/toast.d.ts +24 -28
- package/dist/notifications/webhookDelivery.d.cts +12 -17
- package/dist/notifications/webhookDelivery.d.ts +12 -17
- package/dist/overlay/ConfirmDialog.d.cts +0 -8
- package/dist/overlay/ConfirmDialog.d.ts +0 -8
- package/dist/overlay/command-palette/unifiedSearch/databaseObjectSearchContributor.d.cts +15 -14
- package/dist/overlay/command-palette/unifiedSearch/databaseObjectSearchContributor.d.ts +15 -14
- package/dist/overlay/command-palette/unifiedSearch/settingsSearchContributor.d.cts +1 -3
- package/dist/overlay/command-palette/unifiedSearch/settingsSearchContributor.d.ts +1 -3
- package/dist/overlay/command-palette/unifiedSearch/unifiedSearchTypes.d.cts +1 -1
- package/dist/overlay/command-palette/unifiedSearch/unifiedSearchTypes.d.ts +1 -1
- package/dist/overlay/index.cjs +1 -1
- package/dist/overlay/index.d.cts +2 -3
- package/dist/overlay/index.d.ts +2 -3
- package/dist/overlay/index.js +110 -115
- package/dist/pageTourState-BcBF8w89.js +516 -0
- package/dist/pageTourState-CrbEU7QW.cjs +5 -0
- package/dist/server/{AttributeGrid-UJtHTip2.js → AttributeGrid-B2s_rp00.js} +3 -3
- package/dist/server/{AttributeGrid-CyMsR4GC.cjs → AttributeGrid-C7aWbIe5.cjs} +1 -1
- package/dist/server/{Button-BesBg6eW.js → Button-Ck03cbUs.js} +1 -1
- package/dist/server/{Button-PZulLru4.cjs → Button-DWFMF5y0.cjs} +1 -1
- package/dist/server/CommandPalette-2UppyMxU.js +3271 -0
- package/dist/server/CommandPalette-DwpZyhO6.cjs +1 -0
- package/dist/server/{CopyButton-D_sN2Ggp.cjs → CopyButton-BOmAUQD4.cjs} +1 -1
- package/dist/server/{CopyButton-I5xsXV07.js → CopyButton-UvtFwOtA.js} +1 -1
- package/dist/server/DateRangePicker-BJteKzOY.cjs +9 -0
- package/dist/server/{DateRangePicker-DGUl2aE3.js → DateRangePicker-Cr58DczM.js} +158 -143
- package/dist/server/GuidedTour-C4msn-Ag.js +400 -0
- package/dist/server/GuidedTour-Rlsp8rOe.cjs +1 -0
- package/dist/server/HostPortal-B9Tzk_uN.cjs +1 -0
- package/dist/server/HostPortal-X1iw719T.js +33 -0
- package/dist/server/HostWindowContext-B2m0bVra.js +32 -0
- package/dist/server/HostWindowContext-_VZCt7xE.cjs +1 -0
- package/dist/server/{IconPicker-BlD0VBca.cjs → IconPicker-9DfOxql6.cjs} +1 -1
- package/dist/server/{IconPicker-o8hUxjYU.js → IconPicker-N0wub1Aj.js} +4 -4
- package/dist/server/Modal-D__GTo-n.cjs +1 -0
- package/dist/server/{Modal-DmF6CwfY.js → Modal-DeQjfpkG.js} +3 -3
- package/dist/server/{PageSkeleton-BigztY5i.js → PageSkeleton-C41pXOcr.js} +460 -458
- package/dist/server/PageSkeleton-D4i-UcnI.cjs +30 -0
- package/dist/server/{SearchableSelect-Dn-cssWx.js → SearchableSelect-CEcuBnge.js} +2 -2
- package/dist/server/{SearchableSelect-R0Dwz9rz.cjs → SearchableSelect-Ca9g8ztu.cjs} +1 -1
- package/dist/server/StatusBarNotificationBell-BotYny7q.cjs +49 -0
- package/dist/server/StatusBarNotificationBell-DyEQF2W7.js +13968 -0
- package/dist/server/{Stepper-dBm8YaCw.cjs → Stepper--pusyxso.cjs} +1 -1
- package/dist/server/{Stepper-BaQ6Kexj.js → Stepper-B_eL85hK.js} +1 -1
- package/dist/server/{TimeSeriesChart-BbbfDyeA.js → TimeSeriesChart-aSHquoBv.js} +1 -1
- package/dist/server/{TimeSeriesChart-qPgMkkaW.cjs → TimeSeriesChart-nZeB5jtN.cjs} +1 -1
- package/dist/server/ToggleButton-57_0SA-V.cjs +1 -0
- package/dist/server/{ToggleButton-C0_QpslP.js → ToggleButton-DjlWwgLJ.js} +4 -4
- package/dist/server/VpTrash-D49oUUJh.cjs +1 -0
- package/dist/server/VpTrash-Dlq8o6Uv.js +298 -0
- package/dist/server/a11y/index.cjs +1 -1
- package/dist/server/a11y/index.js +1 -1
- package/dist/server/actions-DtaFGwh2.cjs +1 -0
- package/dist/server/actions-wwAHs3ZU.js +16 -0
- package/dist/{appThemeDerivation-BiCyiSuz.js → server/appThemeDerivation-B7-DjMIM.js} +181 -184
- package/dist/server/appThemeDerivation-NS3Vws8q.cjs +1 -0
- package/dist/server/charts/index.cjs +1 -1
- package/dist/server/charts/index.js +1 -1
- package/dist/server/{format-CYCi8g4r.js → createDialogShellFocus-DNjzmcGj.js} +110 -126
- package/dist/server/createDialogShellFocus-PRRfMli-.cjs +1 -0
- package/dist/server/createResizableSidebar-CZtGmUnA.cjs +1 -0
- package/dist/server/createResizableSidebar-DdWdAB9l.js +287 -0
- package/dist/server/{createVirtualScroller-LN-7QFiv.cjs → createVirtualScroller-CL49JE2P.cjs} +1 -1
- package/dist/{createVirtualScroller-DBvqT0UW.js → server/createVirtualScroller-vu-l4rVv.js} +7 -7
- package/dist/server/defineSettings-D0CSMcyy.cjs +1 -0
- package/dist/server/defineSettings-Di1sG81q.js +407 -0
- package/dist/server/descriptor-CEGvvJZh.cjs +1 -0
- package/dist/server/{descriptor-DtZDXBe6.js → descriptor-GLoKPx6x.js} +4 -4
- package/dist/server/desktop/index.cjs +1 -1
- package/dist/server/desktop/index.js +389 -315
- package/dist/server/dialogFocusRestore-BrALT8Ew.js +35 -0
- package/dist/server/dialogFocusRestore-CcEsB50v.cjs +1 -0
- package/dist/server/electronBridge-BK92fycw.js +235 -0
- package/dist/server/electronBridge-cT0xww92.cjs +1 -0
- package/dist/server/errorHandler-BvPGW-Nm.js +373 -0
- package/dist/server/errorHandler-DoDAPpv2.cjs +3 -0
- package/dist/server/feedback/index.cjs +1 -1
- package/dist/server/feedback/index.js +37 -38
- package/dist/server/focusModality-D-nxv8Er.cjs +1 -0
- package/dist/server/{focusModality-BCX5GH0P.js → focusModality-nWNVX3JG.js} +41 -41
- package/dist/server/forms/index.cjs +1 -1
- package/dist/server/forms/index.js +7 -7
- package/dist/server/grid/index.cjs +1 -1
- package/dist/server/grid/index.js +1 -1
- package/dist/server/{headerIconOverrides-DY3BTuca.cjs → headerIconOverrides-Bn1QuODq.cjs} +1 -1
- package/dist/{headerIconOverrides-B7TQUBmD.js → server/headerIconOverrides-Dh2PaOcO.js} +1 -1
- package/dist/server/host/index.cjs +1 -1
- package/dist/server/host/index.js +53 -90
- package/dist/server/i18n/index.cjs +1 -1
- package/dist/server/i18n/index.js +1 -1
- package/dist/{i18n-D9k9xwuD.js → server/i18n-DW9kcu0G.js} +180 -178
- package/dist/server/i18n-DZ0JlZal.cjs +4 -0
- package/dist/server/{index-B4epvfiq.js → index-BNYr6EIW.js} +89 -90
- package/dist/server/index-Cqod09d_.cjs +1 -0
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +810 -883
- package/dist/server/layout/index.cjs +1 -1
- package/dist/server/layout/index.js +3 -3
- package/dist/server/mainRealmDom-DPNaDWtw.js +121 -0
- package/dist/server/mainRealmDom-DwZVMPnO.cjs +1 -0
- package/dist/server/navigation/index.cjs +1 -1
- package/dist/server/navigation/index.js +1 -1
- package/dist/server/notifications/index.cjs +1 -1
- package/dist/server/notifications/index.js +63 -103
- package/dist/server/overlay/index.cjs +1 -1
- package/dist/server/overlay/index.js +104 -109
- package/dist/server/pageTourState-BcBF8w89.js +516 -0
- package/dist/server/pageTourState-CrbEU7QW.cjs +5 -0
- package/dist/server/settings/index.cjs +1 -1
- package/dist/server/settings/index.js +23 -24
- package/dist/server/stateDbStore-CThsVch-.cjs +1 -0
- package/dist/server/stateDbStore-DHZFUIEt.js +57 -0
- package/dist/server/tokens/index.cjs +1 -1
- package/dist/server/tokens/index.js +19 -20
- package/dist/server/tree/index.cjs +1 -1
- package/dist/server/tree/index.js +1 -1
- package/dist/server/useListCommands-BO_XrRHj.js +38 -0
- package/dist/server/useListCommands-Dnm4ktP1.cjs +1 -0
- package/dist/server/useSettingsSubscription-DKjCwmRd.cjs +1 -0
- package/dist/server/{notification-CpDYN_iu.js → useSettingsSubscription-DLEk4k4j.js} +41 -32
- package/dist/server/window-CUK6x8Pj.js +36 -0
- package/dist/server/window-_BfSgFGO.cjs +1 -0
- package/dist/server/windowRegistry-CxXtP-iY.cjs +1 -0
- package/dist/server/windowRegistry-DeGmXt6W.js +20 -0
- package/dist/settings/index.cjs +1 -1
- package/dist/settings/index.d.cts +1 -1
- package/dist/settings/index.d.ts +1 -1
- package/dist/settings/index.js +23 -24
- package/dist/solid/_internal/app/keybindings/context/useFocusClaim.js +3 -10
- package/dist/solid/_internal/app/keybindings/context/useListCommands.js +1 -2
- package/dist/solid/_internal/app/keybindings/panelCommandsRegistry.js +8 -1
- package/dist/solid/_internal/app/menu/menuFavorites.js +45 -40
- package/dist/solid/_internal/app/onboarding/PageTourHost.jsx +22 -22
- package/dist/solid/_internal/app/onboarding/pageTourState.js +94 -92
- package/dist/solid/_internal/app/platform/electronBridge.js +15 -49
- package/dist/solid/_internal/app/settings/secrets/notificationSecrets.js +0 -10
- package/dist/solid/_internal/app/windows/window/HostWindowContext.jsx +4 -13
- package/dist/solid/_internal/contract/catalogNotify.js +1 -24
- package/dist/solid/_internal/contract/hostErrorText.js +1 -14
- package/dist/solid/_internal/contract/notificationCatalog.js +1 -1
- package/dist/solid/_internal/platform/errors/diagnosticReport.js +2 -3
- package/dist/solid/_internal/platform/logging/consoleLogger.js +6 -0
- package/dist/solid/_internal/platform/settings/registry/defineSettings.js +48 -20
- package/dist/solid/_internal/platform/settings/registry/stateDbStore.js +29 -19
- package/dist/solid/_internal/platform/vendorErrors/index.js +4 -17
- package/dist/solid/_internal/platform/window/displayOwner.js +105 -114
- package/dist/solid/a11y/AriaAnnouncer.jsx +2 -3
- package/dist/solid/async/createGuardedListLoader.js +1 -1
- package/dist/solid/desktop/menu/MenuPanel.jsx +7 -7
- package/dist/solid/feedback/ErrorBoundary.jsx +7 -4
- package/dist/solid/feedback/Loader.jsx +1 -2
- package/dist/solid/feedback/createPreference.js +3 -2
- package/dist/solid/feedback/guidedInstallOutcome.js +1 -2
- package/dist/solid/feedback/preference.notifications.js +1 -2
- package/dist/solid/feedback/readFailureText.js +1 -2
- package/dist/solid/host/index.js +8 -16
- package/dist/solid/host/window.js +15 -22
- package/dist/solid/i18n/i18n.js +5 -6
- package/dist/solid/index.js +0 -1
- package/dist/solid/layout/createResizableSidebar.js +15 -23
- package/dist/solid/notifications/NotificationHost.jsx +21 -29
- package/dist/solid/notifications/NotificationItem.jsx +28 -104
- package/dist/solid/notifications/NotificationPanel.jsx +33 -44
- package/dist/solid/notifications/NotificationsCenter.jsx +22 -20
- package/dist/solid/notifications/StatusBarNotificationBell.jsx +4 -3
- package/dist/solid/notifications/catalogAdapter.js +61 -62
- package/dist/solid/notifications/createNotificationPreviewRuntime.js +29 -19
- package/dist/solid/notifications/customSoundCache.js +26 -21
- package/dist/solid/notifications/emailDigest.js +74 -86
- package/dist/solid/notifications/errorActionButtons.js +6 -11
- package/dist/solid/notifications/fireNotification.js +14 -19
- package/dist/solid/notifications/index.js +3 -12
- package/dist/solid/notifications/nativeEngine.js +6 -19
- package/dist/solid/notifications/notificationAnalytics.js +32 -38
- package/dist/solid/notifications/notificationAudio.js +77 -74
- package/dist/solid/notifications/notificationCardServices.js +34 -0
- package/dist/solid/notifications/notificationOverlayChannel.js +3 -3
- package/dist/solid/notifications/notificationOverlaySync.js +18 -23
- package/dist/solid/notifications/notificationService.js +135 -0
- package/dist/solid/notifications/notificationTimeline.js +117 -124
- package/dist/solid/notifications/notifications.notifications.js +3 -22
- package/dist/solid/notifications/toast.js +168 -213
- package/dist/solid/notifications/webhookDelivery.js +27 -53
- package/dist/solid/overlay/ConfirmDialog.jsx +1 -33
- package/dist/solid/overlay/command-palette/CommandPalette.jsx +3 -1
- package/dist/solid/overlay/command-palette/unifiedSearch/databaseObjectSearchContributor.js +26 -25
- package/dist/solid/overlay/command-palette/unifiedSearch/settingsSearchContributor.js +2 -7
- package/dist/solid/overlay/index.js +0 -3
- package/dist/solid/settings/index.js +1 -1
- package/dist/solid/tokens/index.js +1 -1
- package/dist/solid/tokens/palette/themeRegistry.js +20 -22
- package/dist/stateDbStore-CThsVch-.cjs +1 -0
- package/dist/stateDbStore-DHZFUIEt.js +57 -0
- package/dist/style.css +1 -1
- package/dist/tokens/index.cjs +1 -1
- package/dist/tokens/index.d.cts +1 -1
- package/dist/tokens/index.d.ts +1 -1
- package/dist/tokens/index.js +19 -20
- package/dist/tokens/palette/themeRegistry.d.cts +17 -22
- package/dist/tokens/palette/themeRegistry.d.ts +17 -22
- package/dist/{tooltipCoordinator-Zim5pWzk.js → tooltipCoordinator-BzxEyKhA.js} +2 -2
- package/dist/tooltipCoordinator-DslqMlsI.cjs +1 -0
- package/dist/tree/index.cjs +1 -1
- package/dist/tree/index.js +1 -1
- package/dist/ui.css +1 -1
- package/dist/{useFloatingDropdown-CfPEYRut.js → useFloatingDropdown-BN4J092P.js} +1 -1
- package/dist/{useFloatingDropdown-DcU7ozDg.cjs → useFloatingDropdown-D9OvEFAp.cjs} +1 -1
- package/dist/useListCommands-BO_XrRHj.js +38 -0
- package/dist/useListCommands-Dnm4ktP1.cjs +1 -0
- package/dist/useSettingsSubscription-DKjCwmRd.cjs +1 -0
- package/dist/{notification-CpDYN_iu.js → useSettingsSubscription-DLEk4k4j.js} +41 -32
- package/dist/window-CUK6x8Pj.js +36 -0
- package/dist/window-_BfSgFGO.cjs +1 -0
- package/dist/windowRegistry-CxXtP-iY.cjs +1 -0
- package/dist/windowRegistry-DeGmXt6W.js +20 -0
- package/package.json +1 -1
- package/dist/CommandPalette-DeEImZ8D.cjs +0 -2
- package/dist/CommandPalette-yqvM9AuU.js +0 -3897
- package/dist/DateRangePicker-7t4JKCp1.cjs +0 -9
- package/dist/GuidedTour-C_Lxe1t_.cjs +0 -21
- package/dist/GuidedTour-lsljVkPL.js +0 -11216
- package/dist/HostWindowContext-DqDeJmBP.cjs +0 -1
- package/dist/HostWindowContext-KL4U1qUv.js +0 -40
- package/dist/Modal-CJhd27dM.cjs +0 -1
- package/dist/PageSkeleton-SYSL4Adl.cjs +0 -30
- package/dist/Progress-B5YmNeyU.js +0 -56
- package/dist/Progress-BNy0wsJl.cjs +0 -1
- package/dist/StatusBarNotificationBell-B1bvE_SO.js +0 -2140
- package/dist/StatusBarNotificationBell-Cqo6cZbO.cjs +0 -4
- package/dist/ToggleButton-BmwDfsn4.cjs +0 -1
- package/dist/_internal/app/contexts/WorkspaceTabsContext.d.cts +0 -20
- package/dist/_internal/app/contexts/WorkspaceTabsContext.d.ts +0 -20
- package/dist/_internal/app/settings/theme/appThemeChange.d.cts +0 -20
- package/dist/_internal/app/settings/theme/appThemeChange.d.ts +0 -20
- package/dist/_internal/app/settings/ui/shell/openSettingsModal.d.cts +0 -6
- package/dist/_internal/app/settings/ui/shell/openSettingsModal.d.ts +0 -6
- package/dist/_internal/base/listenerDispatch.d.cts +0 -14
- package/dist/_internal/base/listenerDispatch.d.ts +0 -14
- package/dist/_internal/contract/appName.d.cts +0 -10
- package/dist/_internal/contract/appName.d.ts +0 -10
- package/dist/_internal/contract/hostText.d.cts +0 -25
- package/dist/_internal/contract/hostText.d.ts +0 -25
- package/dist/_internal/platform/logging/rendererLogging.d.cts +0 -65
- package/dist/_internal/platform/logging/rendererLogging.d.ts +0 -65
- package/dist/_internal/platform/settings/preferencesCache.d.cts +0 -162
- package/dist/_internal/platform/settings/preferencesCache.d.ts +0 -162
- package/dist/appThemeDerivation-DmKbTiFi.cjs +0 -1
- package/dist/catalogNotify-BcY9oqVy.js +0 -1223
- package/dist/catalogNotify-DacJjC-p.cjs +0 -27
- package/dist/createResizableSidebar-BIhyo5zN.cjs +0 -1
- package/dist/createResizableSidebar-Cqv-1IXG.js +0 -461
- package/dist/defineSettings-CcYXt2Jf.js +0 -391
- package/dist/defineSettings-yHQdUwxI.cjs +0 -1
- package/dist/descriptor-Dmch-3AF.cjs +0 -1
- package/dist/dialogFocusRestore-B4ggeVAM.js +0 -64
- package/dist/dialogFocusRestore-BcMPrbig.cjs +0 -1
- package/dist/displayOwner-eYQHHvjt.cjs +0 -1
- package/dist/displayOwner-mT80Oyi-.js +0 -75
- package/dist/feedback/preference.notifications.samples.d.cts +0 -1
- package/dist/feedback/preference.notifications.samples.d.ts +0 -1
- package/dist/focusModality-BNjYldd9.cjs +0 -1
- package/dist/focusModality-DxudpWPs.js +0 -135
- package/dist/format-BS7oDguE.js +0 -298
- package/dist/format-CuANkXXB.cjs +0 -1
- package/dist/i18n-DXXArz-m.cjs +0 -4
- package/dist/keys-BeeC5_RZ.cjs +0 -1
- package/dist/mainRealmDom-CkoRyNhZ.cjs +0 -1
- package/dist/mainRealmDom-kEStLHIY.js +0 -102
- package/dist/menuFavorites-BmdM_qV5.js +0 -69
- package/dist/menuFavorites-DoDFvtlQ.cjs +0 -1
- package/dist/notification-DygvQB_o.cjs +0 -1
- package/dist/notificationSuppressions-DGfo2QKG.cjs +0 -1
- package/dist/notificationSuppressions-ddyK85cB.js +0 -430
- package/dist/notifications/copyToClipboard.d.cts +0 -6
- package/dist/notifications/copyToClipboard.d.ts +0 -6
- package/dist/notifications/createCopyFlash.d.cts +0 -17
- package/dist/notifications/createCopyFlash.d.ts +0 -17
- package/dist/notifications/notificationDisplayOwner.d.cts +0 -27
- package/dist/notifications/notificationDisplayOwner.d.ts +0 -27
- package/dist/notifications/notificationRepeaterEntryFactory.d.cts +0 -36
- package/dist/notifications/notificationRepeaterEntryFactory.d.ts +0 -36
- package/dist/notifications/notifications.notifications.samples.d.cts +0 -1
- package/dist/notifications/notifications.notifications.samples.d.ts +0 -1
- package/dist/notifications/persistWithRollbackOnFailure.d.cts +0 -18
- package/dist/notifications/persistWithRollbackOnFailure.d.ts +0 -18
- package/dist/notifications/startNotificationSchedulers.d.cts +0 -2
- package/dist/notifications/startNotificationSchedulers.d.ts +0 -2
- package/dist/notifications/startNotificationSettingsReactions.d.cts +0 -46
- package/dist/notifications/startNotificationSettingsReactions.d.ts +0 -46
- package/dist/overlay/ToastHost.d.cts +0 -7
- package/dist/overlay/ToastHost.d.ts +0 -7
- package/dist/pageTourState-CIr8ockR.js +0 -92
- package/dist/pageTourState-D8Uapyft.cjs +0 -1
- package/dist/preferencesCache-Bow6TxP1.js +0 -65
- package/dist/preferencesCache-D7mm43_n.cjs +0 -1
- package/dist/rendererLogging-Dt5FZ8mq.cjs +0 -7
- package/dist/rendererLogging-gAhiHWkA.js +0 -822
- package/dist/server/CommandPalette-C8treS8g.cjs +0 -1
- package/dist/server/CommandPalette-Dslsq5Ez.js +0 -3155
- package/dist/server/DateRangePicker-CDKi9BAf.cjs +0 -9
- package/dist/server/GuidedTour-B3T9rAPX.cjs +0 -20
- package/dist/server/GuidedTour-DSoSZZby.js +0 -10983
- package/dist/server/HostWindowContext-DqDeJmBP.cjs +0 -1
- package/dist/server/HostWindowContext-KL4U1qUv.js +0 -40
- package/dist/server/Modal-CCUwQYso.cjs +0 -1
- package/dist/server/PageSkeleton-DdpXfZoC.cjs +0 -30
- package/dist/server/Progress-CRbj6nEy.cjs +0 -1
- package/dist/server/Progress-nsDy6clG.js +0 -41
- package/dist/server/StatusBarNotificationBell-C64Odn2C.js +0 -1974
- package/dist/server/StatusBarNotificationBell-DY0Q27su.cjs +0 -4
- package/dist/server/ToggleButton-1bNYk35x.cjs +0 -1
- package/dist/server/VpTerminal-Bpw-d9wD.js +0 -186
- package/dist/server/VpTerminal-C-U_dN_x.cjs +0 -1
- package/dist/server/VpTrash-CagiU2Uj.cjs +0 -1
- package/dist/server/VpTrash-DVBfts9_.js +0 -116
- package/dist/server/appThemeDerivation-DmKbTiFi.cjs +0 -1
- package/dist/server/catalogNotify-MCW2sa2e.cjs +0 -27
- package/dist/server/catalogNotify-s3YymAe8.js +0 -1261
- package/dist/server/createResizableSidebar-MIzUlfdd.js +0 -299
- package/dist/server/createResizableSidebar-TdxLuiY8.cjs +0 -1
- package/dist/server/defineSettings-CcYXt2Jf.js +0 -391
- package/dist/server/defineSettings-yHQdUwxI.cjs +0 -1
- package/dist/server/descriptor-DAyyoF-I.cjs +0 -1
- package/dist/server/dialogFocusRestore-B4ggeVAM.js +0 -64
- package/dist/server/dialogFocusRestore-BcMPrbig.cjs +0 -1
- package/dist/server/displayOwner-eYQHHvjt.cjs +0 -1
- package/dist/server/displayOwner-mT80Oyi-.js +0 -75
- package/dist/server/focusModality-BKgJWRlC.cjs +0 -1
- package/dist/server/format-WfZycMBL.cjs +0 -1
- package/dist/server/i18n-DXXArz-m.cjs +0 -4
- package/dist/server/index-DlQYWckZ.cjs +0 -1
- package/dist/server/mainRealmDom-BCL1p_q6.cjs +0 -1
- package/dist/server/mainRealmDom-Dk0xb5Gj.js +0 -67
- package/dist/server/menuFavorites-BmdM_qV5.js +0 -69
- package/dist/server/menuFavorites-DoDFvtlQ.cjs +0 -1
- package/dist/server/notification-DygvQB_o.cjs +0 -1
- package/dist/server/notificationSuppressions-B-LKq9ZU.js +0 -391
- package/dist/server/notificationSuppressions-Dcc2WFBZ.cjs +0 -1
- package/dist/server/pageTourState-CIr8ockR.js +0 -92
- package/dist/server/pageTourState-D8Uapyft.cjs +0 -1
- package/dist/server/preferencesCache-Bow6TxP1.js +0 -65
- package/dist/server/preferencesCache-D7mm43_n.cjs +0 -1
- package/dist/server/rendererLogging-Dt5FZ8mq.cjs +0 -7
- package/dist/server/rendererLogging-gAhiHWkA.js +0 -822
- package/dist/server/settingsSearchContributor-CRZsl2Q_.js +0 -199
- package/dist/server/settingsSearchContributor-DH8UFpp2.cjs +0 -1
- package/dist/server/stateDbStore-Ds3zJ4cd.js +0 -47
- package/dist/server/stateDbStore-THFfFGa0.cjs +0 -1
- package/dist/server/useListCommands-Bf7aOTXZ.js +0 -61
- package/dist/server/useListCommands-ucngC3t4.cjs +0 -1
- package/dist/server/useSettingsSubscription-cu943hND.js +0 -11
- package/dist/server/useSettingsSubscription-vlMrNNH9.cjs +0 -1
- package/dist/server/visibleBrowserRegistry-BTfWUlI1.cjs +0 -1
- package/dist/server/visibleBrowserRegistry-Dw2Y4y_I.js +0 -89
- package/dist/server/windowRegistry-Bk5lXIVd.js +0 -62
- package/dist/server/windowRegistry-CGvOBUsw.cjs +0 -1
- package/dist/settingsSearchContributor-DWP5dwn3.js +0 -199
- package/dist/settingsSearchContributor-Dltbs1j_.cjs +0 -1
- package/dist/solid/_internal/app/contexts/WorkspaceTabsContext.js +0 -10
- package/dist/solid/_internal/app/settings/theme/appThemeChange.js +0 -5
- package/dist/solid/_internal/app/settings/ui/shell/openSettingsModal.js +0 -15
- package/dist/solid/_internal/base/listenerDispatch.js +0 -12
- package/dist/solid/_internal/contract/appName.js +0 -7
- package/dist/solid/_internal/contract/hostText.js +0 -15
- package/dist/solid/_internal/platform/logging/rendererLogging.js +0 -42
- package/dist/solid/_internal/platform/settings/preferencesCache.js +0 -329
- package/dist/solid/feedback/preference.notifications.samples.js +0 -5
- package/dist/solid/notifications/copyToClipboard.js +0 -21
- package/dist/solid/notifications/createCopyFlash.js +0 -26
- package/dist/solid/notifications/notificationDisplayOwner.js +0 -1
- package/dist/solid/notifications/notificationRepeaterEntryFactory.js +0 -20
- package/dist/solid/notifications/notifications.notifications.samples.js +0 -14
- package/dist/solid/notifications/persistWithRollbackOnFailure.js +0 -11
- package/dist/solid/notifications/startNotificationSchedulers.js +0 -8
- package/dist/solid/notifications/startNotificationSettingsReactions.js +0 -22
- package/dist/solid/overlay/ToastHost.jsx +0 -1
- package/dist/stateDbStore-Ds3zJ4cd.js +0 -47
- package/dist/stateDbStore-THFfFGa0.cjs +0 -1
- package/dist/tooltipCoordinator-Causlcgt.cjs +0 -1
- package/dist/useListCommands-Bf7aOTXZ.js +0 -61
- package/dist/useListCommands-ucngC3t4.cjs +0 -1
- package/dist/useSettingsSubscription-cu943hND.js +0 -11
- package/dist/useSettingsSubscription-vlMrNNH9.cjs +0 -1
- package/dist/visibleBrowserRegistry-BTfWUlI1.cjs +0 -1
- package/dist/visibleBrowserRegistry-Dw2Y4y_I.js +0 -89
- package/dist/windowRegistry-Bk5lXIVd.js +0 -62
- package/dist/windowRegistry-CGvOBUsw.cjs +0 -1
|
@@ -11,22 +11,15 @@ import { VpInfo, VpWarning, VpError, VpPass, VpTreeClose, VpGear, VpTreePlug, Vp
|
|
|
11
11
|
import { t } from '../i18n/i18n';
|
|
12
12
|
import { formatDateTime } from '../_internal/platform/intl/format';
|
|
13
13
|
import { relativeAgeLabel } from '../_internal/platform/intl/relativeAgeLabel';
|
|
14
|
-
import { openExternal } from '../_internal/app/platform/electronBridge';
|
|
15
|
-
import { closeNotification, setNotificationFocus, setNotificationHover, toggleNotificationExpanded, isNotificationSticky, resolveNotificationDuration, } from './nativeEngine';
|
|
16
14
|
import { renderNotificationMarkdown } from './markdownRender';
|
|
17
15
|
import { NOTIFICATION_SEVERITY_LABELS } from './notificationSeverityLabels';
|
|
18
|
-
import {
|
|
19
|
-
import { dismissKey, setSourceMuted, isSourceMuted, remindLater, } from './notificationSuppressions';
|
|
20
|
-
import { notificationSettings } from '../_internal/app/settings/descriptors/notification';
|
|
21
|
-
import { useSettingsSubscription } from '../_internal/app/settings/useSettingsSubscription';
|
|
22
|
-
import { getGoogleSearchUrl, resolveVendorError, } from '../_internal/platform/vendorErrors';
|
|
16
|
+
import { getGoogleSearchUrl, } from '../_internal/platform/vendorErrors';
|
|
23
17
|
import { DesktopContextMenuContext } from '../context/DesktopContextMenuContext';
|
|
24
18
|
import { placeMenuAtTrigger } from '../overlay/context-menu/desktopMenuPlacement';
|
|
25
19
|
import { Panel } from '../overlay/Panel';
|
|
26
20
|
import styles from './NotificationItem.module.css.js';
|
|
27
21
|
import { escapeHtml } from '../_internal/platform/security/htmlEscape';
|
|
28
22
|
import iconScale from '../styles/iconScale.module.css.js';
|
|
29
|
-
import { useKitHost } from '../host/kitHost';
|
|
30
23
|
import { isKey } from '../_internal/base/keys';
|
|
31
24
|
const lastGearOpenedFor = new WeakMap();
|
|
32
25
|
function formatRelativeAgo(createdAt, current) {
|
|
@@ -71,40 +64,17 @@ export const NotificationItem = (props) => {
|
|
|
71
64
|
if (isExiting())
|
|
72
65
|
return;
|
|
73
66
|
if (prefersReducedMotion(document)) {
|
|
74
|
-
|
|
75
|
-
props.controller.close(props.item.id);
|
|
76
|
-
else
|
|
77
|
-
closeNotification(props.item.id);
|
|
67
|
+
props.controller.close(props.item.id);
|
|
78
68
|
return;
|
|
79
69
|
}
|
|
80
70
|
setIsExiting(true);
|
|
81
71
|
if (exitTimer !== undefined)
|
|
82
72
|
clearTimeout(exitTimer);
|
|
83
|
-
exitTimer = setTimeout(() =>
|
|
84
|
-
if (props.controller)
|
|
85
|
-
props.controller.close(props.item.id);
|
|
86
|
-
else
|
|
87
|
-
closeNotification(props.item.id);
|
|
88
|
-
}, 180);
|
|
89
|
-
};
|
|
90
|
-
const setFocus = (focused) => {
|
|
91
|
-
if (props.controller)
|
|
92
|
-
props.controller.setFocus(props.item.id, focused);
|
|
93
|
-
else
|
|
94
|
-
setNotificationFocus(props.item.id, focused);
|
|
95
|
-
};
|
|
96
|
-
const setHover = (hovered) => {
|
|
97
|
-
if (props.controller)
|
|
98
|
-
props.controller.setHover(props.item.id, hovered);
|
|
99
|
-
else
|
|
100
|
-
setNotificationHover(props.item.id, hovered);
|
|
101
|
-
};
|
|
102
|
-
const toggleExpanded = () => {
|
|
103
|
-
if (props.controller)
|
|
104
|
-
props.controller.toggleExpanded(props.item.id);
|
|
105
|
-
else
|
|
106
|
-
toggleNotificationExpanded(props.item.id);
|
|
73
|
+
exitTimer = setTimeout(() => props.controller.close(props.item.id), 180);
|
|
107
74
|
};
|
|
75
|
+
const setFocus = (focused) => props.controller.setFocus(props.item.id, focused);
|
|
76
|
+
const setHover = (hovered) => props.controller.setHover(props.item.id, hovered);
|
|
77
|
+
const toggleExpanded = () => props.controller.toggleExpanded(props.item.id);
|
|
108
78
|
const severityIcon = createMemo(() => {
|
|
109
79
|
const customName = props.item.icon;
|
|
110
80
|
if (customName && CUSTOM_ICONS[customName])
|
|
@@ -113,11 +83,8 @@ export const NotificationItem = (props) => {
|
|
|
113
83
|
});
|
|
114
84
|
const relativeAgo = createMemo(() => formatRelativeAgo(props.item.createdAt, now()));
|
|
115
85
|
const exactTimestamp = createMemo(() => formatExactTimestamp(props.item.createdAt));
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
const isSticky = createMemo(() => props.controller?.sticky?.() ??
|
|
119
|
-
isNotificationSticky(props.item, settings()));
|
|
120
|
-
const duration = createMemo(() => resolveNotificationDuration(props.item, settings()));
|
|
86
|
+
const isSticky = createMemo(() => props.controller.isSticky(props.item));
|
|
87
|
+
const duration = createMemo(() => props.controller.duration(props.item));
|
|
121
88
|
const hasTimer = createMemo(() => {
|
|
122
89
|
if (isSticky())
|
|
123
90
|
return false;
|
|
@@ -147,16 +114,15 @@ export const NotificationItem = (props) => {
|
|
|
147
114
|
}
|
|
148
115
|
});
|
|
149
116
|
const fuseKey = createMemo(() => hasTimer() ? `${props.item.id}-${duration()}-${runCounter()}` : null);
|
|
150
|
-
const { announcer } = useKitHost();
|
|
151
117
|
createEffect(() => {
|
|
152
118
|
const title = props.item.title;
|
|
153
119
|
const body = props.item.body;
|
|
154
120
|
const text = body ? `${title}: ${body}` : title;
|
|
155
121
|
if (props.item.severity === 'error') {
|
|
156
|
-
announcer.assertive(text);
|
|
122
|
+
props.controller.announcer.assertive(text);
|
|
157
123
|
}
|
|
158
124
|
else {
|
|
159
|
-
announcer.polite(text);
|
|
125
|
+
props.controller.announcer.polite(text);
|
|
160
126
|
}
|
|
161
127
|
});
|
|
162
128
|
const bodyHtml = createMemo(() => {
|
|
@@ -164,15 +130,10 @@ export const NotificationItem = (props) => {
|
|
|
164
130
|
if (!body)
|
|
165
131
|
return '';
|
|
166
132
|
if (props.item.markdown)
|
|
167
|
-
return renderNotificationMarkdown(body,
|
|
133
|
+
return renderNotificationMarkdown(body, props.shell !== null);
|
|
168
134
|
return escapeHtml(body).replace(/\n/g, '<br>');
|
|
169
135
|
});
|
|
170
|
-
const openLink = (url) =>
|
|
171
|
-
if (props.controller?.onOpenExternal)
|
|
172
|
-
props.controller.onOpenExternal(url);
|
|
173
|
-
else
|
|
174
|
-
openExternal(url);
|
|
175
|
-
};
|
|
136
|
+
const openLink = (url) => props.controller.openExternal(url);
|
|
176
137
|
const handleBodyClick = (event) => {
|
|
177
138
|
const target = event.target;
|
|
178
139
|
const link = target?.closest('a');
|
|
@@ -184,7 +145,8 @@ export const NotificationItem = (props) => {
|
|
|
184
145
|
openLink(href);
|
|
185
146
|
return;
|
|
186
147
|
}
|
|
187
|
-
|
|
148
|
+
const shell = props.shell;
|
|
149
|
+
if (shell === null) {
|
|
188
150
|
event.preventDefault();
|
|
189
151
|
return;
|
|
190
152
|
}
|
|
@@ -192,20 +154,15 @@ export const NotificationItem = (props) => {
|
|
|
192
154
|
if (interactive)
|
|
193
155
|
return;
|
|
194
156
|
const route = props.item.defaultRoute;
|
|
195
|
-
if (
|
|
196
|
-
|
|
197
|
-
if (props.controller?.onNavigate) {
|
|
198
|
-
props.controller.onNavigate();
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
window.dispatchEvent(new CustomEvent('app-notification-navigate', { detail: { route } }));
|
|
157
|
+
if (route)
|
|
158
|
+
shell.navigate(route);
|
|
202
159
|
};
|
|
203
160
|
const handleContextMenu = (event) => {
|
|
204
161
|
if (!desktopMenu)
|
|
205
162
|
return;
|
|
206
163
|
const text = `${props.item.title}${props.item.body ? `\n${props.item.body}` : ''}`.trim();
|
|
207
164
|
const match = props.item.vendorError
|
|
208
|
-
? resolveVendorError(props.item.vendorError)
|
|
165
|
+
? props.controller.resolveVendorError(props.item.vendorError)
|
|
209
166
|
: null;
|
|
210
167
|
event.preventDefault();
|
|
211
168
|
event.stopPropagation();
|
|
@@ -243,7 +200,8 @@ export const NotificationItem = (props) => {
|
|
|
243
200
|
]);
|
|
244
201
|
};
|
|
245
202
|
const openGearMenu = (event) => {
|
|
246
|
-
|
|
203
|
+
const shell = props.shell;
|
|
204
|
+
if (shell === null)
|
|
247
205
|
return;
|
|
248
206
|
if (!desktopMenu)
|
|
249
207
|
return;
|
|
@@ -266,17 +224,12 @@ export const NotificationItem = (props) => {
|
|
|
266
224
|
items.push({
|
|
267
225
|
label: t("Don't show again"),
|
|
268
226
|
onSelect: () => {
|
|
269
|
-
|
|
270
|
-
props.controller.onDismissKey(dontShowKey);
|
|
271
|
-
}
|
|
272
|
-
else {
|
|
273
|
-
void dismissKey(dontShowKey);
|
|
274
|
-
}
|
|
227
|
+
shell.dismissKey(dontShowKey);
|
|
275
228
|
close();
|
|
276
229
|
},
|
|
277
230
|
});
|
|
278
231
|
}
|
|
279
|
-
if (
|
|
232
|
+
if (shell.remindLaterEnabled()) {
|
|
280
233
|
const minute = 60_000;
|
|
281
234
|
const hour = 60 * minute;
|
|
282
235
|
const tomorrow9amMs = () => {
|
|
@@ -288,54 +241,32 @@ export const NotificationItem = (props) => {
|
|
|
288
241
|
items.push({
|
|
289
242
|
label: t('Remind me in 15 minutes'),
|
|
290
243
|
onSelect: () => {
|
|
291
|
-
|
|
292
|
-
props.controller.onRemindLater(remindKey, 15 * minute);
|
|
293
|
-
}
|
|
294
|
-
else {
|
|
295
|
-
void remindLater(remindKey, 15 * minute);
|
|
296
|
-
}
|
|
244
|
+
shell.remindLater(remindKey, 15 * minute);
|
|
297
245
|
close();
|
|
298
246
|
},
|
|
299
247
|
});
|
|
300
248
|
items.push({
|
|
301
249
|
label: t('Remind me in 1 hour'),
|
|
302
250
|
onSelect: () => {
|
|
303
|
-
|
|
304
|
-
props.controller.onRemindLater(remindKey, hour);
|
|
305
|
-
}
|
|
306
|
-
else {
|
|
307
|
-
void remindLater(remindKey, hour);
|
|
308
|
-
}
|
|
251
|
+
shell.remindLater(remindKey, hour);
|
|
309
252
|
close();
|
|
310
253
|
},
|
|
311
254
|
});
|
|
312
255
|
items.push({
|
|
313
256
|
label: t('Remind me tomorrow morning'),
|
|
314
257
|
onSelect: () => {
|
|
315
|
-
|
|
316
|
-
props.controller.onRemindLater(remindKey, tomorrow9amMs());
|
|
317
|
-
}
|
|
318
|
-
else {
|
|
319
|
-
void remindLater(remindKey, tomorrow9amMs());
|
|
320
|
-
}
|
|
258
|
+
shell.remindLater(remindKey, tomorrow9amMs());
|
|
321
259
|
close();
|
|
322
260
|
},
|
|
323
261
|
});
|
|
324
262
|
}
|
|
325
263
|
if (source && source !== 'general') {
|
|
326
|
-
const muted =
|
|
264
|
+
const muted = shell.isSourceMuted(source);
|
|
327
265
|
items.push({
|
|
328
266
|
label: muted
|
|
329
267
|
? t('Unmute notifications from this source')
|
|
330
268
|
: t('Mute notifications from this source'),
|
|
331
|
-
onSelect: () =>
|
|
332
|
-
if (props.controller?.onMuteSource) {
|
|
333
|
-
props.controller.onMuteSource(source, !muted);
|
|
334
|
-
}
|
|
335
|
-
else {
|
|
336
|
-
void setSourceMuted(source, !muted);
|
|
337
|
-
}
|
|
338
|
-
},
|
|
269
|
+
onSelect: () => shell.setSourceMuted(source, !muted),
|
|
339
270
|
});
|
|
340
271
|
}
|
|
341
272
|
const secondary = props.item.secondaryActions;
|
|
@@ -355,14 +286,7 @@ export const NotificationItem = (props) => {
|
|
|
355
286
|
items.push({ type: 'separator' });
|
|
356
287
|
items.push({
|
|
357
288
|
label: t('Notification settings…'),
|
|
358
|
-
onSelect: () =>
|
|
359
|
-
if (props.controller?.onOpenSettings) {
|
|
360
|
-
props.controller.onOpenSettings();
|
|
361
|
-
}
|
|
362
|
-
else {
|
|
363
|
-
openSettingsModal('notification');
|
|
364
|
-
}
|
|
365
|
-
},
|
|
289
|
+
onSelect: () => shell.openSettings(),
|
|
366
290
|
});
|
|
367
291
|
desktopMenu.openWithPlacement(placeMenuAtTrigger(gearTrigger, { vertical: 'auto', horizontal: 'auto' }), items);
|
|
368
292
|
};
|
|
@@ -421,7 +345,7 @@ export const NotificationItem = (props) => {
|
|
|
421
345
|
<VpChevronDown class={`${iconScale.iconMd} ${styles.chevron}`}/>
|
|
422
346
|
</Button>
|
|
423
347
|
</Show>
|
|
424
|
-
<Show when={
|
|
348
|
+
<Show when={props.shell !== null}>
|
|
425
349
|
<Button variant="ghost" size="sm" iconOnly aria-label={t('More actions')} title={t('More actions')} onMouseDown={(event) => event.stopPropagation()} onClick={openGearMenu}>
|
|
426
350
|
<VpGear class={iconScale.iconMd}/>
|
|
427
351
|
</Button>
|
|
@@ -4,21 +4,20 @@ import { PressableSurface } from '../forms/PressableSurface';
|
|
|
4
4
|
import { Badge } from '../feedback/Badge';
|
|
5
5
|
import { VpAdjustments, VpBellOff, VpBellRinging, VpBook, VpCheck, VpCopy, VpDots, VpFilter, VpMailOpened, VpMinus, VpSquareCheck, VpTrash, } from '@vokril/icons';
|
|
6
6
|
import { isNotificationSourceId } from '../_internal/contract/notification';
|
|
7
|
-
import { openSettingsModal } from '../_internal/app/settings/ui/shell/openSettingsModal';
|
|
8
7
|
import { Panel } from '../overlay/Panel';
|
|
9
8
|
import { PageTourHost } from '../_internal/app/onboarding/PageTourHost';
|
|
10
9
|
import { notificationsTour } from './notificationsTour';
|
|
11
|
-
import { notifyFromCatalog } from '../_internal/contract/catalogNotify';
|
|
12
10
|
import { notificationReplayError, notificationReplayInfo, notificationReplaySuccess, notificationReplayWarning, notificationTimelineExportFailed, notificationTimelineExported, } from './notifications.notifications';
|
|
13
|
-
import {
|
|
11
|
+
import { entryVendorMatch, } from './notificationTimeline';
|
|
14
12
|
import { NOTIFICATION_SEVERITY_LABELS } from './notificationSeverityLabels';
|
|
15
13
|
import { groupTimelineEntries } from './timelineGrouping';
|
|
16
14
|
import { exportTimelineAsCsv, exportTimelineAsJson } from './timelineExport';
|
|
17
15
|
import { getGoogleSearchUrl, } from '../_internal/platform/vendorErrors';
|
|
18
16
|
import { resolveNotificationSource } from './notificationSources';
|
|
19
|
-
import { isSourceMuted
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
17
|
+
import { isSourceMuted } from './notificationSuppressions';
|
|
18
|
+
import { openExternalUrl } from '../_internal/app/platform/electronBridge';
|
|
19
|
+
import { useKitHost } from '../host/kitHost';
|
|
20
|
+
import { realmNotificationShell } from './notificationCardServices';
|
|
22
21
|
import { notificationSettings } from '../_internal/app/settings/descriptors/notification';
|
|
23
22
|
import { useSettingsSubscription } from '../_internal/app/settings/useSettingsSubscription';
|
|
24
23
|
import { useDesktopContextMenu } from '../context/DesktopContextMenuContext';
|
|
@@ -34,9 +33,7 @@ import { OverlayScrollArea } from '../overlay/OverlayScrollArea';
|
|
|
34
33
|
import { compileNotificationSearchMatcher, filterNotificationTimeline, } from './notificationTimelineFilter';
|
|
35
34
|
import { toggleInSet } from './setToggleInSet';
|
|
36
35
|
import styles from './NotificationPanel.module.css.js';
|
|
37
|
-
import { getLogger } from '../_internal/platform/logging/rendererLogging';
|
|
38
36
|
import { useHostDocument } from '../_internal/app/windows/window/HostWindowContext';
|
|
39
|
-
const log = getLogger('NotificationPanel');
|
|
40
37
|
function formatNotificationTime(createdAt) {
|
|
41
38
|
return new Intl.DateTimeFormat(systemFormatLocale(), {
|
|
42
39
|
hour: '2-digit',
|
|
@@ -70,6 +67,13 @@ const HEADER_OVERFLOW_BASE = 189;
|
|
|
70
67
|
const HEADER_OVERFLOW_STEP = 27;
|
|
71
68
|
export function NotificationPanel(props) {
|
|
72
69
|
const hostDocument = useHostDocument();
|
|
70
|
+
const host = useKitHost();
|
|
71
|
+
const { notifications } = host;
|
|
72
|
+
const timeline = notifications.timeline;
|
|
73
|
+
const shell = realmNotificationShell(host);
|
|
74
|
+
const log = host.log.withTag('NotificationPanel');
|
|
75
|
+
const openExternal = (url) => openExternalUrl(host.desktop, log, url);
|
|
76
|
+
const vendorMatchOf = (entry) => entryVendorMatch(host.vendorErrors, entry);
|
|
73
77
|
const [copiedEntryId, setCopiedEntryId] = createSignal(null);
|
|
74
78
|
const [unreadCount, setUnreadCount] = createSignal(0);
|
|
75
79
|
const [searchQuery, setSearchQuery] = createSignal('');
|
|
@@ -252,19 +256,14 @@ export function NotificationPanel(props) {
|
|
|
252
256
|
]);
|
|
253
257
|
};
|
|
254
258
|
onMount(() => {
|
|
255
|
-
const unsubscribe =
|
|
259
|
+
const unsubscribe = timeline.subscribeUnread(setUnreadCount);
|
|
256
260
|
onCleanup(unsubscribe);
|
|
257
261
|
});
|
|
258
262
|
const ackUnread = () => {
|
|
259
263
|
if (unreadCount() > 0)
|
|
260
|
-
|
|
261
|
-
};
|
|
262
|
-
const dismissNotification = (id) => {
|
|
263
|
-
const entry = props.notificationTimeline().find((e) => e.id === id);
|
|
264
|
-
if (entry)
|
|
265
|
-
recordDismiss(entry.source);
|
|
266
|
-
dismissNotificationTimelineEntry(id);
|
|
264
|
+
timeline.markSeen();
|
|
267
265
|
};
|
|
266
|
+
const dismissNotification = (id) => notifications.dismissEntry(id);
|
|
268
267
|
const replayEntry = (entry) => {
|
|
269
268
|
const opts = {
|
|
270
269
|
source: isNotificationSourceId(entry.source) ? entry.source : 'general',
|
|
@@ -273,28 +272,28 @@ export function NotificationPanel(props) {
|
|
|
273
272
|
};
|
|
274
273
|
const tone = entry.tone;
|
|
275
274
|
if (tone === 'error')
|
|
276
|
-
|
|
275
|
+
notifications.notify(notificationReplayError, {
|
|
277
276
|
timelineMessage: entry.message,
|
|
278
277
|
options: opts,
|
|
279
278
|
});
|
|
280
279
|
else if (tone === 'warning')
|
|
281
|
-
|
|
280
|
+
notifications.notify(notificationReplayWarning, {
|
|
282
281
|
timelineMessage: entry.message,
|
|
283
282
|
options: opts,
|
|
284
283
|
});
|
|
285
284
|
else if (tone === 'success')
|
|
286
|
-
|
|
285
|
+
notifications.notify(notificationReplaySuccess, {
|
|
287
286
|
timelineMessage: entry.message,
|
|
288
287
|
options: opts,
|
|
289
288
|
});
|
|
290
289
|
else
|
|
291
|
-
|
|
290
|
+
notifications.notify(notificationReplayInfo, {
|
|
292
291
|
timelineMessage: entry.message,
|
|
293
292
|
options: opts,
|
|
294
293
|
});
|
|
295
294
|
};
|
|
296
295
|
const openVendorDocsForEntry = (entry) => {
|
|
297
|
-
const match =
|
|
296
|
+
const match = vendorMatchOf(entry);
|
|
298
297
|
if (!match)
|
|
299
298
|
return;
|
|
300
299
|
openExternal(match.helpers.docsUrl(match.code));
|
|
@@ -302,7 +301,7 @@ export function NotificationPanel(props) {
|
|
|
302
301
|
const showEntryContextMenu = (event, entry) => {
|
|
303
302
|
event.preventDefault();
|
|
304
303
|
event.stopPropagation();
|
|
305
|
-
const match =
|
|
304
|
+
const match = vendorMatchOf(entry);
|
|
306
305
|
const source = resolveNotificationSource(entry.source);
|
|
307
306
|
const sourceMuted = isSourceMuted(entry.source);
|
|
308
307
|
desktopMenu.open(event.clientX, event.clientY, [
|
|
@@ -340,9 +339,7 @@ export function NotificationPanel(props) {
|
|
|
340
339
|
label: sourceMuted
|
|
341
340
|
? t('Unmute "{source}"', { source: source.label })
|
|
342
341
|
: t('Mute "{source}"', { source: source.label }),
|
|
343
|
-
onSelect: () =>
|
|
344
|
-
void setSourceMuted(entry.source, !sourceMuted);
|
|
345
|
-
},
|
|
342
|
+
onSelect: () => shell.setSourceMuted(entry.source, !sourceMuted),
|
|
346
343
|
},
|
|
347
344
|
{ type: 'separator' },
|
|
348
345
|
{
|
|
@@ -353,9 +350,7 @@ export function NotificationPanel(props) {
|
|
|
353
350
|
},
|
|
354
351
|
{
|
|
355
352
|
label: entry.pinned ? t('Unpin notification') : t('Pin notification'),
|
|
356
|
-
onSelect: () =>
|
|
357
|
-
toggleTimelineEntryPin(entry.id);
|
|
358
|
-
},
|
|
353
|
+
onSelect: () => timeline.togglePin(entry.id),
|
|
359
354
|
},
|
|
360
355
|
{
|
|
361
356
|
label: t('Remove notification'),
|
|
@@ -369,17 +364,13 @@ export function NotificationPanel(props) {
|
|
|
369
364
|
{
|
|
370
365
|
label: t('Remove all from "{source}"', { source: source.label }),
|
|
371
366
|
danger: true,
|
|
372
|
-
onSelect: () =>
|
|
373
|
-
dismissNotificationTimelineEntriesBySource(entry.source);
|
|
374
|
-
},
|
|
367
|
+
onSelect: () => timeline.dismissBySource(entry.source),
|
|
375
368
|
},
|
|
376
369
|
]
|
|
377
370
|
: []),
|
|
378
371
|
]);
|
|
379
372
|
};
|
|
380
|
-
const clearAllNotifications = () =>
|
|
381
|
-
clearNotificationTimeline();
|
|
382
|
-
};
|
|
373
|
+
const clearAllNotifications = () => timeline.clear();
|
|
383
374
|
const toggleSelected = (id) => {
|
|
384
375
|
toggleInSet(setSelectedIds, id);
|
|
385
376
|
};
|
|
@@ -405,7 +396,7 @@ export function NotificationPanel(props) {
|
|
|
405
396
|
const ids = visibleSelectedIds();
|
|
406
397
|
if (ids.length === 0)
|
|
407
398
|
return;
|
|
408
|
-
|
|
399
|
+
timeline.dismissMany(ids);
|
|
409
400
|
exitSelectMode();
|
|
410
401
|
};
|
|
411
402
|
const bulkPinSelected = (pin) => {
|
|
@@ -413,14 +404,14 @@ export function NotificationPanel(props) {
|
|
|
413
404
|
const entries = props.notificationTimeline().filter((e) => sel.has(e.id));
|
|
414
405
|
for (const e of entries) {
|
|
415
406
|
if ((e.pinned ?? false) !== pin)
|
|
416
|
-
|
|
407
|
+
timeline.togglePin(e.id);
|
|
417
408
|
}
|
|
418
409
|
};
|
|
419
410
|
const exportTimeline = async (format) => {
|
|
420
411
|
const entries = filteredEntries();
|
|
421
412
|
if (entries.length === 0)
|
|
422
413
|
return;
|
|
423
|
-
const fs =
|
|
414
|
+
const fs = host.desktop.fs;
|
|
424
415
|
const ts = new Date().toISOString().replace(/[:T]/g, '-').slice(0, 19);
|
|
425
416
|
const defaultName = `notifications-${ts}.${format}`;
|
|
426
417
|
const filters = format === 'csv'
|
|
@@ -438,19 +429,17 @@ export function NotificationPanel(props) {
|
|
|
438
429
|
? exportTimelineAsCsv(entries)
|
|
439
430
|
: exportTimelineAsJson(entries);
|
|
440
431
|
await fs.writeFile(dialog.filePath, content);
|
|
441
|
-
|
|
432
|
+
notifications.notify(notificationTimelineExported, {
|
|
442
433
|
entryCount: entries.length,
|
|
443
434
|
});
|
|
444
435
|
}
|
|
445
436
|
catch (err) {
|
|
446
|
-
|
|
437
|
+
notifications.notify(notificationTimelineExportFailed, {
|
|
447
438
|
cause: err,
|
|
448
439
|
});
|
|
449
440
|
}
|
|
450
441
|
};
|
|
451
|
-
const openNotificationSettings = () =>
|
|
452
|
-
openSettingsModal('notification');
|
|
453
|
-
};
|
|
442
|
+
const openNotificationSettings = () => host.openNotificationSettings();
|
|
454
443
|
const openTitleMenu = (event) => {
|
|
455
444
|
event.preventDefault();
|
|
456
445
|
event.stopPropagation();
|
|
@@ -549,7 +538,7 @@ export function NotificationPanel(props) {
|
|
|
549
538
|
icon: () => <VpMailOpened class={styles.notificationActionIcon}/>,
|
|
550
539
|
label: () => t('Mark all as read'),
|
|
551
540
|
disabled: () => unreadCount() === 0,
|
|
552
|
-
onSelect: () =>
|
|
541
|
+
onSelect: () => timeline.markSeen(),
|
|
553
542
|
},
|
|
554
543
|
{
|
|
555
544
|
id: 'clear',
|
|
@@ -692,7 +681,7 @@ export function NotificationPanel(props) {
|
|
|
692
681
|
</section>
|
|
693
682
|
</aside>);
|
|
694
683
|
function renderEntryRow(entry) {
|
|
695
|
-
const vendorMatch = () =>
|
|
684
|
+
const vendorMatch = () => vendorMatchOf(entry);
|
|
696
685
|
return (<article class={`${styles.notificationItem} ${selectMode() && selectedIds().has(entry.id)
|
|
697
686
|
? (styles.notificationItemSelected ?? '')
|
|
698
687
|
: ''}`} onContextMenu={(event) => {
|
|
@@ -2,16 +2,16 @@ import { For, Show, createMemo, createSignal, onCleanup, onMount, } from 'solid-
|
|
|
2
2
|
import { Dynamic } from 'solid-js/web';
|
|
3
3
|
import { VpInfo, VpWarning, VpError, VpPass, VpTreeClose, VpGear, } from '@vokril/icons';
|
|
4
4
|
import { VpBell, VpBellOff, VpChevronDown, VpTrash } from '@vokril/icons';
|
|
5
|
-
import { notifyFromCatalog } from '../_internal/contract/catalogNotify';
|
|
6
5
|
import { notificationSettingsUpdateFailed } from './notifications.notifications';
|
|
7
|
-
import {
|
|
6
|
+
import { entryVendorMatch, } from './notificationTimeline';
|
|
8
7
|
import { notificationSettings } from '../_internal/app/settings/descriptors/notification';
|
|
9
8
|
import { Panel } from '../overlay/Panel';
|
|
10
9
|
import { useSettingsSubscription } from '../_internal/app/settings/useSettingsSubscription';
|
|
11
|
-
import { isSourceMuted
|
|
10
|
+
import { isSourceMuted } from './notificationSuppressions';
|
|
12
11
|
import { resolveNotificationSource } from './notificationSources';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
12
|
+
import { openExternalUrl } from '../_internal/app/platform/electronBridge';
|
|
13
|
+
import { useKitHost } from '../host/kitHost';
|
|
14
|
+
import { realmNotificationShell } from './notificationCardServices';
|
|
15
15
|
import { useDesktopContextMenu } from '../context/DesktopContextMenuContext';
|
|
16
16
|
import { OverlayScrollArea } from '../overlay/OverlayScrollArea';
|
|
17
17
|
import { Button } from '../forms/Button';
|
|
@@ -42,11 +42,16 @@ function formatFullTime(createdAt) {
|
|
|
42
42
|
}).format(new Date(createdAt));
|
|
43
43
|
}
|
|
44
44
|
export function NotificationsCenter(props) {
|
|
45
|
+
const host = useKitHost();
|
|
46
|
+
const { notifications } = host;
|
|
47
|
+
const shell = realmNotificationShell(host);
|
|
48
|
+
const log = host.log.withTag('NotificationsCenter');
|
|
49
|
+
const openExternal = (url) => openExternalUrl(host.desktop, log, url);
|
|
45
50
|
const [entries, setEntries] = createSignal([]);
|
|
46
51
|
const [dnd, setDnd] = createSignal(notificationSettings.get().doNotDisturb);
|
|
47
52
|
const desktopMenu = useDesktopContextMenu();
|
|
48
53
|
onMount(() => {
|
|
49
|
-
const unsubscribe =
|
|
54
|
+
const unsubscribe = notifications.timeline.subscribe(setEntries);
|
|
50
55
|
onCleanup(unsubscribe);
|
|
51
56
|
});
|
|
52
57
|
useSettingsSubscription(notificationSettings, () => {
|
|
@@ -59,19 +64,17 @@ export function NotificationsCenter(props) {
|
|
|
59
64
|
void notificationSettings
|
|
60
65
|
.update({ ...current, doNotDisturb: !current.doNotDisturb })
|
|
61
66
|
.catch((error) => {
|
|
62
|
-
|
|
67
|
+
notifications.notify(notificationSettingsUpdateFailed, {
|
|
63
68
|
cause: error,
|
|
64
69
|
});
|
|
65
70
|
});
|
|
66
71
|
};
|
|
67
|
-
const openNotificationSettings = () =>
|
|
68
|
-
openSettingsModal('notification');
|
|
69
|
-
};
|
|
72
|
+
const openNotificationSettings = () => host.openNotificationSettings();
|
|
70
73
|
const buildEntryActions = (entry) => {
|
|
71
74
|
const list = [
|
|
72
75
|
...(entry.actions ?? []),
|
|
73
76
|
];
|
|
74
|
-
const match = entryVendorMatch(entry);
|
|
77
|
+
const match = entryVendorMatch(host.vendorErrors, entry);
|
|
75
78
|
if (match) {
|
|
76
79
|
const docsUrl = match.helpers.docsUrl(match.code);
|
|
77
80
|
if (docsUrl) {
|
|
@@ -87,7 +90,8 @@ export function NotificationsCenter(props) {
|
|
|
87
90
|
const message = entry.message.trim();
|
|
88
91
|
if (!message)
|
|
89
92
|
return;
|
|
90
|
-
void navigator.clipboard?.writeText(message).catch(() => {
|
|
93
|
+
void navigator.clipboard?.writeText(message).catch((error) => {
|
|
94
|
+
log.warn('notification message could not be copied', error);
|
|
91
95
|
});
|
|
92
96
|
};
|
|
93
97
|
const showCardMenu = (x, y, entry) => {
|
|
@@ -97,7 +101,7 @@ export function NotificationsCenter(props) {
|
|
|
97
101
|
}
|
|
98
102
|
const source = resolveNotificationSource(entry.source);
|
|
99
103
|
const muted = isSourceMuted(source.id);
|
|
100
|
-
const match = entryVendorMatch(entry);
|
|
104
|
+
const match = entryVendorMatch(host.vendorErrors, entry);
|
|
101
105
|
desktopMenu.open(x, y, [
|
|
102
106
|
{ label: t('Copy log message'), onSelect: () => copyMessage(entry) },
|
|
103
107
|
...(match
|
|
@@ -116,20 +120,18 @@ export function NotificationsCenter(props) {
|
|
|
116
120
|
label: muted
|
|
117
121
|
? t('Unmute "{source}"', { source: source.label })
|
|
118
122
|
: t('Mute "{source}"', { source: source.label }),
|
|
119
|
-
onSelect: () =>
|
|
120
|
-
void setSourceMuted(source.id, !muted);
|
|
121
|
-
},
|
|
123
|
+
onSelect: () => shell.setSourceMuted(source.id, !muted),
|
|
122
124
|
},
|
|
123
125
|
{ type: 'separator' },
|
|
124
126
|
{
|
|
125
127
|
label: t('Remove notification'),
|
|
126
128
|
danger: true,
|
|
127
|
-
onSelect: () =>
|
|
129
|
+
onSelect: () => notifications.dismissEntry(entry.id),
|
|
128
130
|
},
|
|
129
131
|
{
|
|
130
132
|
label: t('Remove all from "{source}"', { source: source.label }),
|
|
131
133
|
danger: true,
|
|
132
|
-
onSelect: () =>
|
|
134
|
+
onSelect: () => notifications.timeline.dismissBySource(source.id),
|
|
133
135
|
},
|
|
134
136
|
]);
|
|
135
137
|
};
|
|
@@ -140,7 +142,7 @@ export function NotificationsCenter(props) {
|
|
|
140
142
|
<Show when={ordered().length > 0}>{` (${ordered().length})`}</Show>
|
|
141
143
|
</h3>
|
|
142
144
|
<div class={styles.actions}>
|
|
143
|
-
<Button variant="ghost" size="sm" iconOnly onClick={() =>
|
|
145
|
+
<Button variant="ghost" size="sm" iconOnly onClick={() => notifications.timeline.clear()} disabled={ordered().length === 0} title={t('Clear all notifications')} aria-label={t('Clear all notifications')}>
|
|
144
146
|
<VpTrash class={styles.actionIcon}/>
|
|
145
147
|
</Button>
|
|
146
148
|
<Button variant="ghost" size="sm" iconOnly active={dnd()} onClick={toggleDoNotDisturb} title={dnd() ? t('Disable Do Not Disturb') : t('Enable Do Not Disturb')} aria-label={dnd() ? t('Disable Do Not Disturb') : t('Enable Do Not Disturb')}>
|
|
@@ -196,7 +198,7 @@ export function NotificationsCenter(props) {
|
|
|
196
198
|
}} title={t('More actions')} aria-label={t('More actions')}>
|
|
197
199
|
<VpGear class={styles.actionIcon}/>
|
|
198
200
|
</Button>
|
|
199
|
-
<Button variant="ghost" size="sm" iconOnly onClick={() =>
|
|
201
|
+
<Button variant="ghost" size="sm" iconOnly onClick={() => notifications.dismissEntry(entry.id)} title={t('Remove notification')} aria-label={t('Remove notification')}>
|
|
200
202
|
<VpTreeClose class={styles.actionIcon}/>
|
|
201
203
|
</Button>
|
|
202
204
|
</div>
|
|
@@ -3,18 +3,19 @@ import { PressableSurface } from '../forms/PressableSurface';
|
|
|
3
3
|
import { VpBell, VpBellOff } from '@vokril/icons';
|
|
4
4
|
import { Popover } from '../overlay/popover/Popover';
|
|
5
5
|
import { NotificationsCenter } from './NotificationsCenter';
|
|
6
|
-
import {
|
|
6
|
+
import { useKitHost } from '../host/kitHost';
|
|
7
7
|
import { notificationSettings } from '../_internal/app/settings/descriptors/notification';
|
|
8
8
|
import { useSettingsSubscription } from '../_internal/app/settings/useSettingsSubscription';
|
|
9
9
|
import { t } from '../i18n/i18n';
|
|
10
10
|
import styles from './StatusBarNotificationBell.module.css.js';
|
|
11
11
|
export function StatusBarNotificationBell() {
|
|
12
|
+
const { timeline } = useKitHost().notifications;
|
|
12
13
|
const [open, setOpen] = createSignal(false);
|
|
13
14
|
const [unread, setUnread] = createSignal(0);
|
|
14
15
|
const [dnd, setDnd] = createSignal(notificationSettings.get().doNotDisturb);
|
|
15
16
|
let buttonRef;
|
|
16
17
|
onMount(() => {
|
|
17
|
-
const unsubscribeUnread =
|
|
18
|
+
const unsubscribeUnread = timeline.subscribeUnread(setUnread);
|
|
18
19
|
onCleanup(unsubscribeUnread);
|
|
19
20
|
});
|
|
20
21
|
useSettingsSubscription(notificationSettings, () => {
|
|
@@ -24,7 +25,7 @@ export function StatusBarNotificationBell() {
|
|
|
24
25
|
setOpen((prev) => {
|
|
25
26
|
const next = !prev;
|
|
26
27
|
if (next)
|
|
27
|
-
|
|
28
|
+
timeline.markSeen();
|
|
28
29
|
return next;
|
|
29
30
|
});
|
|
30
31
|
};
|