@vokril/ui-solid 0.9.3 → 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 +69 -0
- package/README.md +110 -31
- package/dist/{AttributeGrid-Bnn1w5XX.cjs → AttributeGrid-7cLOWtPn.cjs} +1 -1
- package/dist/{AttributeGrid-DJdW32LQ.js → AttributeGrid-CVyqzT7-.js} +5 -5
- package/dist/{Button-BZWXPn8y.js → Button-BiKPB3cH.js} +2 -2
- package/dist/{Button-X8QR6llv.cjs → Button-Nx7byQZc.cjs} +1 -1
- package/dist/CommandPalette-BFi0_e3t.cjs +2 -0
- package/dist/CommandPalette-CAH08DGN.js +4013 -0
- package/dist/{CopyButton-D3dIRRnn.js → CopyButton-BF7L1TCO.js} +1 -1
- package/dist/{CopyButton-3cX5MHAf.cjs → CopyButton-BtgGbiy9.cjs} +1 -1
- package/dist/DateRangePicker-Ce2tTbJ4.cjs +9 -0
- package/dist/{DateRangePicker-BcqoUao4.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-9tjEtmqt.cjs → IconPicker-4bdAeGxS.cjs} +1 -1
- package/dist/{IconPicker-CXbFmJ3y.js → IconPicker-Df6uIUpJ.js} +4 -4
- package/dist/{Input-BEnk4FCF.cjs → Input-CZruORyy.cjs} +1 -1
- package/dist/{Input-PZ5wRvPx.js → Input-DkPhsdfk.js} +2 -2
- package/dist/Modal-CQG8l4x7.cjs +1 -0
- package/dist/{Modal-CsiV55WW.js → Modal-CUPe98-o.js} +5 -5
- package/dist/PageSkeleton-C3mo6UGh.cjs +30 -0
- package/dist/{PageSkeleton-CyTXvZYm.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-C6KL7e42.js → SearchableSelect-C01brsF0.js} +5 -5
- package/dist/{SearchableSelect-zT8XNpmt.cjs → SearchableSelect-pCaUie2M.cjs} +1 -1
- package/dist/StatusBarNotificationBell-BwqVV09r.js +14266 -0
- package/dist/StatusBarNotificationBell-C5Zc2IvW.cjs +50 -0
- package/dist/{Stepper-BxXwbDq4.js → Stepper-38IAEOyT.js} +3 -3
- package/dist/{Stepper-DoJFCfC7.cjs → Stepper-CtaTpnQu.cjs} +1 -1
- package/dist/{Textarea-BUxibzkR.js → Textarea-B5QqqKnI.js} +1 -1
- package/dist/{Textarea-BunKEY68.cjs → Textarea-CeAGf08O.cjs} +1 -1
- package/dist/{TimeSeriesChart-DBrDzBGE.js → TimeSeriesChart-ByKG4E1G.js} +2 -2
- package/dist/{TimeSeriesChart-CS4jQflv.cjs → TimeSeriesChart-_NOs_Job.cjs} +1 -1
- package/dist/ToggleButton-Bz3zAtec.cjs +1 -0
- package/dist/{ToggleButton-BfjXnp-P.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 +27 -14
- package/dist/_internal/app/settings/secrets/notificationSecrets.d.ts +27 -14
- 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/a11y/announcerService.d.cts +9 -13
- package/dist/_internal/platform/a11y/announcerService.d.ts +9 -13
- 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/settings/settingsTypes.d.cts +0 -5
- package/dist/_internal/platform/settings/settingsTypes.d.ts +0 -5
- 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-B1MaujhY.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-64lFnqTt.cjs → headerIconOverrides-Bn1QuODq.cjs} +1 -1
- package/dist/{server/headerIconOverrides-BCzeaBA1.js → headerIconOverrides-Dh2PaOcO.js} +1 -1
- package/dist/host/index.cjs +1 -1
- package/dist/host/index.d.cts +15 -16
- package/dist/host/index.d.ts +15 -16
- package/dist/host/index.js +56 -90
- package/dist/host/kitHost.d.cts +65 -0
- package/dist/host/kitHost.d.ts +65 -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/{i18n-CYq-dVvv.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 +973 -992
- 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/kitHost-BfJExE1G.cjs +1 -0
- package/dist/kitHost-CVAEi9sF.js +23 -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 +7 -12
- package/dist/notifications/index.d.ts +7 -12
- package/dist/notifications/index.js +64 -98
- 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 +20 -10
- package/dist/overlay/ConfirmDialog.d.ts +20 -10
- package/dist/overlay/DangerousActionDialog.d.cts +2 -2
- package/dist/overlay/DangerousActionDialog.d.ts +2 -2
- 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 +114 -119
- package/dist/pageTourState-BcBF8w89.js +516 -0
- package/dist/pageTourState-CrbEU7QW.cjs +5 -0
- package/dist/server/{AttributeGrid-BCYNwNjw.js → AttributeGrid-B2s_rp00.js} +3 -3
- package/dist/server/{AttributeGrid-BVAQshm3.cjs → AttributeGrid-C7aWbIe5.cjs} +1 -1
- package/dist/server/{Button-BhqhjFpY.js → Button-Ck03cbUs.js} +1 -1
- package/dist/server/{Button-CFOM8pOv.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-C2jzn9tR.cjs → CopyButton-BOmAUQD4.cjs} +1 -1
- package/dist/server/{CopyButton-CChDa2p3.js → CopyButton-UvtFwOtA.js} +1 -1
- package/dist/server/DateRangePicker-BJteKzOY.cjs +9 -0
- package/dist/server/{DateRangePicker-QV6U1adB.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-BEACrT09.cjs → IconPicker-9DfOxql6.cjs} +1 -1
- package/dist/server/{IconPicker-at_coEi6.js → IconPicker-N0wub1Aj.js} +4 -4
- package/dist/server/Modal-D__GTo-n.cjs +1 -0
- package/dist/server/{Modal-usxkqDtK.js → Modal-DeQjfpkG.js} +3 -3
- package/dist/server/{PageSkeleton-Bpgep9QW.js → PageSkeleton-C41pXOcr.js} +457 -455
- package/dist/server/PageSkeleton-D4i-UcnI.cjs +30 -0
- package/dist/server/{SearchableSelect-0dP7bp0a.js → SearchableSelect-CEcuBnge.js} +2 -2
- package/dist/server/{SearchableSelect-nMecJAYS.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-DvoJXLcM.cjs → Stepper--pusyxso.cjs} +1 -1
- package/dist/server/{Stepper-B8hDDujj.js → Stepper-B_eL85hK.js} +1 -1
- package/dist/server/{TimeSeriesChart-C1LbL_xp.js → TimeSeriesChart-aSHquoBv.js} +1 -1
- package/dist/server/{TimeSeriesChart-DtldQrxS.cjs → TimeSeriesChart-nZeB5jtN.cjs} +1 -1
- package/dist/server/ToggleButton-57_0SA-V.cjs +1 -0
- package/dist/server/{ToggleButton--G4HCOTD.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-CW_FVfq2.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-DWkJAggS.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-nWNVX3JG.js +126 -0
- 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-64lFnqTt.cjs → headerIconOverrides-Bn1QuODq.cjs} +1 -1
- package/dist/{headerIconOverrides-BCzeaBA1.js → server/headerIconOverrides-Dh2PaOcO.js} +1 -1
- package/dist/server/host/index.cjs +1 -1
- package/dist/server/host/index.js +56 -90
- package/dist/server/i18n/index.cjs +1 -1
- package/dist/server/i18n/index.js +1 -1
- package/dist/server/{i18n-CYq-dVvv.js → i18n-DW9kcu0G.js} +180 -178
- package/dist/server/i18n-DZ0JlZal.cjs +4 -0
- package/dist/server/{index-BFT4Uh9D.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 +1022 -1041
- package/dist/server/kitHost-BfJExE1G.cjs +1 -0
- package/dist/server/kitHost-CVAEi9sF.js +23 -0
- 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 -97
- package/dist/server/overlay/index.cjs +1 -1
- package/dist/server/overlay/index.js +109 -114
- 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/{notification-DFbp3S_f.js → server/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 +11 -29
- 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/a11y/announcerService.js +0 -24
- 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 +5 -6
- 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 +9 -16
- package/dist/solid/host/kitHost.jsx +15 -0
- 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 -103
- 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 +4 -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 +2 -54
- 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-GV0L9lXH.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/{server/notification-DFbp3S_f.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-DToM9pUp.cjs +0 -2
- package/dist/CommandPalette-ZCFlLqrP.js +0 -3950
- package/dist/DateRangePicker-DHI3SNna.cjs +0 -9
- package/dist/GuidedTour-B-BXe3ul.js +0 -11214
- package/dist/GuidedTour-c7XiyOmE.cjs +0 -21
- package/dist/HostWindowContext-DqDeJmBP.cjs +0 -1
- package/dist/HostWindowContext-KL4U1qUv.js +0 -40
- package/dist/Modal-DpDHzCWT.cjs +0 -1
- package/dist/PageSkeleton-DzKYTuNy.cjs +0 -30
- package/dist/Progress-B5YmNeyU.js +0 -56
- package/dist/Progress-BNy0wsJl.cjs +0 -1
- package/dist/StatusBarNotificationBell-CZmym2gV.js +0 -2140
- package/dist/StatusBarNotificationBell-DG8Pe6R-.cjs +0 -4
- package/dist/ToggleButton-Bjxv8KGH.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/instantiation/common/descriptors.d.cts +0 -9
- package/dist/_internal/platform/instantiation/common/descriptors.d.ts +0 -9
- package/dist/_internal/platform/instantiation/common/instantiation.d.cts +0 -99
- package/dist/_internal/platform/instantiation/common/instantiation.d.ts +0 -99
- package/dist/_internal/platform/instantiation/common/serviceCollection.d.cts +0 -8
- package/dist/_internal/platform/instantiation/common/serviceCollection.d.ts +0 -8
- 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/announcerService-B7yicxvU.js +0 -97
- package/dist/announcerService-D_pFE24a.cjs +0 -1
- package/dist/appThemeDerivation-DmKbTiFi.cjs +0 -1
- package/dist/catalogNotify-C9RzbC6x.cjs +0 -27
- package/dist/catalogNotify-CIhFuJ1b.js +0 -1210
- package/dist/createResizableSidebar-2TgiFZp1.js +0 -461
- package/dist/createResizableSidebar-pDoO-7q9.cjs +0 -1
- package/dist/defineSettings-By5ell8e.js +0 -391
- package/dist/defineSettings-DRv1FRbv.cjs +0 -1
- package/dist/descriptor-lw1fA9mi.cjs +0 -1
- package/dist/dialogFocusRestore-B4ggeVAM.js +0 -64
- package/dist/dialogFocusRestore-BcMPrbig.cjs +0 -1
- package/dist/displayOwner-BNw2Foa_.cjs +0 -1
- package/dist/displayOwner-B_ezJv-O.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-B150daiS.js +0 -133
- package/dist/focusModality-PPfeW05D.cjs +0 -1
- package/dist/format-Dih0q9gm.cjs +0 -1
- package/dist/format-UGlMj0HW.js +0 -298
- package/dist/i18n-B9ccWgcR.cjs +0 -4
- package/dist/keys-BeeC5_RZ.cjs +0 -1
- package/dist/mainRealmDom-COGBiX78.js +0 -102
- package/dist/mainRealmDom-DijAgSXt.cjs +0 -1
- package/dist/menuFavorites-Db1DpHX6.js +0 -69
- package/dist/menuFavorites-EluLLTfi.cjs +0 -1
- package/dist/notification-CrxHMXsk.cjs +0 -1
- package/dist/notificationSuppressions-CBIJ4bC4.js +0 -430
- package/dist/notificationSuppressions-DFbFpayS.cjs +0 -1
- 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-BhUd3K9p.js +0 -65
- package/dist/preferencesCache-DJPCTPYx.cjs +0 -1
- package/dist/rendererLogging-B4XML4_G.cjs +0 -7
- package/dist/rendererLogging-Edo4ALXU.js +0 -822
- package/dist/server/CommandPalette-C3Bw1teR.cjs +0 -1
- package/dist/server/CommandPalette-S7tfmFMb.js +0 -3208
- package/dist/server/DateRangePicker-sX2m4194.cjs +0 -9
- package/dist/server/GuidedTour-BhJGkoPa.js +0 -10981
- package/dist/server/GuidedTour-Dx0endYh.cjs +0 -20
- package/dist/server/HostWindowContext-DqDeJmBP.cjs +0 -1
- package/dist/server/HostWindowContext-KL4U1qUv.js +0 -40
- package/dist/server/Modal-CAVr4DU6.cjs +0 -1
- package/dist/server/PageSkeleton-KwYRrZua.cjs +0 -30
- package/dist/server/Progress-CRbj6nEy.cjs +0 -1
- package/dist/server/Progress-nsDy6clG.js +0 -41
- package/dist/server/StatusBarNotificationBell-BJyGqDCX.cjs +0 -4
- package/dist/server/StatusBarNotificationBell-C9MCuKT6.js +0 -1974
- package/dist/server/ToggleButton-DTI2HB97.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/announcerService-B7yicxvU.js +0 -97
- package/dist/server/announcerService-D_pFE24a.cjs +0 -1
- package/dist/server/appThemeDerivation-DmKbTiFi.cjs +0 -1
- package/dist/server/catalogNotify-BPPTINme.cjs +0 -27
- package/dist/server/catalogNotify-mUcKuUmZ.js +0 -1248
- package/dist/server/createResizableSidebar-CCrAgu_K.js +0 -299
- package/dist/server/createResizableSidebar-DGd-3PrM.cjs +0 -1
- package/dist/server/defineSettings-By5ell8e.js +0 -391
- package/dist/server/defineSettings-DRv1FRbv.cjs +0 -1
- package/dist/server/descriptor-IJq9wdXK.cjs +0 -1
- package/dist/server/dialogFocusRestore-B4ggeVAM.js +0 -64
- package/dist/server/dialogFocusRestore-BcMPrbig.cjs +0 -1
- package/dist/server/displayOwner-BNw2Foa_.cjs +0 -1
- package/dist/server/displayOwner-B_ezJv-O.js +0 -75
- package/dist/server/focusModality-CeTPyRiF.cjs +0 -1
- package/dist/server/focusModality-DmOZptla.js +0 -124
- package/dist/server/format-x-8syaS2.cjs +0 -1
- package/dist/server/i18n-B9ccWgcR.cjs +0 -4
- package/dist/server/index-Xlas73iC.cjs +0 -1
- package/dist/server/mainRealmDom-BCL1p_q6.cjs +0 -1
- package/dist/server/mainRealmDom-Dk0xb5Gj.js +0 -67
- package/dist/server/menuFavorites-Db1DpHX6.js +0 -69
- package/dist/server/menuFavorites-EluLLTfi.cjs +0 -1
- package/dist/server/notification-CrxHMXsk.cjs +0 -1
- package/dist/server/notificationSuppressions-D7FZmJy8.cjs +0 -1
- package/dist/server/notificationSuppressions-DkrUMXHx.js +0 -391
- package/dist/server/pageTourState-CIr8ockR.js +0 -92
- package/dist/server/pageTourState-D8Uapyft.cjs +0 -1
- package/dist/server/preferencesCache-BhUd3K9p.js +0 -65
- package/dist/server/preferencesCache-DJPCTPYx.cjs +0 -1
- package/dist/server/rendererLogging-B4XML4_G.cjs +0 -7
- package/dist/server/rendererLogging-Edo4ALXU.js +0 -822
- package/dist/server/settingsSearchContributor-DZj7Wc8l.cjs +0 -1
- package/dist/server/settingsSearchContributor-DeMn-njw.js +0 -199
- 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-C-UJc7Xc.js +0 -199
- package/dist/settingsSearchContributor-Du0SDpJt.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/instantiation/common/descriptors.js +0 -10
- package/dist/solid/_internal/platform/instantiation/common/instantiation.js +0 -35
- package/dist/solid/_internal/platform/instantiation/common/serviceCollection.js +0 -14
- 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-y5YP3tsJ.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
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { scrubSecrets } from '../_internal/base/scrubSecrets';
|
|
2
|
-
import { osNotify, openExternal } from '../_internal/app/platform/electronBridge';
|
|
3
2
|
import { notificationSettings } from '../_internal/app/settings/descriptors/notification';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { isVendorErrorSourceInstalled, resolveVendorError, } from '../_internal/platform/vendorErrors';
|
|
3
|
+
import { enrichErrorToast } from './toast';
|
|
4
|
+
import { resolveVendorError, } from '../_internal/platform/vendorErrors';
|
|
7
5
|
import { BugIndicatingError } from '../_internal/base/errors/bugIndicatingError';
|
|
8
|
-
import { withErrorActionButtons } from './errorActionButtons';
|
|
6
|
+
import { errorActionButton, withErrorActionButtons } from './errorActionButtons';
|
|
9
7
|
function toToastOptions(definition, payload) {
|
|
10
8
|
return {
|
|
11
9
|
...(definition.severity === 'error' && definition.source === 'general'
|
|
@@ -31,58 +29,59 @@ function toToastOptions(definition, payload) {
|
|
|
31
29
|
...(payload.id !== undefined ? { id: payload.id } : {}),
|
|
32
30
|
};
|
|
33
31
|
}
|
|
34
|
-
function
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
payload
|
|
40
|
-
(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
32
|
+
export function createCatalogDelivery(deps) {
|
|
33
|
+
const toButton = errorActionButton(deps.onActionFailed);
|
|
34
|
+
const withButtons = (built) => withErrorActionButtons(built, deps.errorActions, toButton);
|
|
35
|
+
return {
|
|
36
|
+
notify(definition, built) {
|
|
37
|
+
const payload = withButtons(built);
|
|
38
|
+
if (definition.delivery === 'os-only') {
|
|
39
|
+
const title = payload.title ?? payload.message;
|
|
40
|
+
const body = payload.description ??
|
|
41
|
+
payload.subtitle ??
|
|
42
|
+
(payload.title ? payload.message : undefined);
|
|
43
|
+
deps.osNotify({
|
|
44
|
+
title,
|
|
45
|
+
...(body ? { body } : {}),
|
|
46
|
+
severity: definition.severity,
|
|
47
|
+
urgent: definition.priority === 'urgent',
|
|
48
|
+
onlyWhenUnfocused: false,
|
|
49
|
+
});
|
|
50
|
+
return '';
|
|
51
|
+
}
|
|
52
|
+
const toastOptions = toToastOptions(definition, payload);
|
|
53
|
+
if (definition.kind === 'query-completed') {
|
|
54
|
+
return deps.toast.queryCompleted(payload.message, toastOptions);
|
|
55
|
+
}
|
|
56
|
+
switch (definition.severity) {
|
|
57
|
+
case 'success':
|
|
58
|
+
return deps.toast.success(payload.message, toastOptions);
|
|
59
|
+
case 'error': {
|
|
60
|
+
const errorOptions = {
|
|
61
|
+
...toastOptions,
|
|
62
|
+
...(payload.title ? { title: payload.title } : {}),
|
|
63
|
+
...(payload.vendorError ? { vendorError: payload.vendorError } : {}),
|
|
64
|
+
};
|
|
65
|
+
return deps.toast.error(payload.message, errorOptions);
|
|
66
|
+
}
|
|
67
|
+
case 'warning':
|
|
68
|
+
return deps.toast.warning(payload.message, toastOptions);
|
|
69
|
+
case 'info':
|
|
70
|
+
return deps.toast.info(payload.message, toastOptions);
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
progress(definition, built) {
|
|
74
|
+
const payload = withButtons(built);
|
|
75
|
+
if (definition.delivery !== 'in-app') {
|
|
76
|
+
throw new BugIndicatingError('Progress notifications require an in-app catalog definition.');
|
|
77
|
+
}
|
|
78
|
+
return deps.toast.progress(payload.message, {
|
|
79
|
+
...toToastOptions(definition, payload),
|
|
80
|
+
...(payload.onCancel ? { onCancel: payload.onCancel } : {}),
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
};
|
|
80
84
|
}
|
|
81
|
-
export const catalogNotificationHost = {
|
|
82
|
-
notify,
|
|
83
|
-
progress,
|
|
84
|
-
dismiss: (id) => closeNotification(id),
|
|
85
|
-
};
|
|
86
85
|
export function resolveCatalogPreviewPriority(severity, priority, hasVendorCode, vendorCodesAreUrgent) {
|
|
87
86
|
return severity === 'error' &&
|
|
88
87
|
priority === 'default' &&
|
|
@@ -91,10 +90,10 @@ export function resolveCatalogPreviewPriority(severity, priority, hasVendorCode,
|
|
|
91
90
|
? 'urgent'
|
|
92
91
|
: priority;
|
|
93
92
|
}
|
|
94
|
-
export function showCatalogPreviewToast(definition, payload) {
|
|
95
|
-
const vendorMatch = payload.vendorError === undefined
|
|
93
|
+
export function showCatalogPreviewToast(deps, definition, payload) {
|
|
94
|
+
const vendorMatch = payload.vendorError === undefined
|
|
96
95
|
? null
|
|
97
|
-
: resolveVendorError(payload.vendorError);
|
|
96
|
+
: resolveVendorError(deps.vendorErrors, payload.vendorError);
|
|
98
97
|
const errorEnrichment = definition.severity === 'error'
|
|
99
98
|
? enrichErrorToast(payload.message, {
|
|
100
99
|
...(payload.title ? { title: payload.title } : {}),
|
|
@@ -103,7 +102,7 @@ export function showCatalogPreviewToast(definition, payload) {
|
|
|
103
102
|
? { description: payload.description }
|
|
104
103
|
: {}),
|
|
105
104
|
...(payload.action ? { action: payload.action } : {}),
|
|
106
|
-
}, vendorMatch, openExternal)
|
|
105
|
+
}, vendorMatch, deps.openExternal)
|
|
107
106
|
: null;
|
|
108
107
|
const title = errorEnrichment?.displayText ?? payload.title ?? payload.message;
|
|
109
108
|
const body = errorEnrichment?.bodyText ?? payload.subtitle ?? payload.description;
|
|
@@ -114,7 +113,7 @@ export function showCatalogPreviewToast(definition, payload) {
|
|
|
114
113
|
? 'vendor-error'
|
|
115
114
|
: definition.source;
|
|
116
115
|
const priority = resolveCatalogPreviewPriority(definition.severity, definition.priority, vendorMatch !== null, notificationSettings.get().vendorCodesAreUrgent);
|
|
117
|
-
return
|
|
116
|
+
return deps.engine.notify({
|
|
118
117
|
severity: definition.severity,
|
|
119
118
|
title: scrubSecrets(title),
|
|
120
119
|
...(body ? { body: scrubSecrets(body) } : {}),
|
|
@@ -137,7 +136,7 @@ export function showCatalogPreviewToast(definition, payload) {
|
|
|
137
136
|
label: action.label,
|
|
138
137
|
primary: index === 0,
|
|
139
138
|
onClick: () => {
|
|
140
|
-
|
|
139
|
+
action.onClick();
|
|
141
140
|
},
|
|
142
141
|
})),
|
|
143
142
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { scrubSecrets } from '../_internal/base/scrubSecrets';
|
|
2
|
-
import {
|
|
2
|
+
import { resolveVendorError, } from '../_internal/platform/vendorErrors';
|
|
3
3
|
import { applyNotificationRules } from './notificationRules';
|
|
4
4
|
import { decideFilter, } from './toastFilterPolicy';
|
|
5
5
|
import { DEFAULT_NOTIFICATION_SETTINGS } from '../_internal/app/settings/descriptors/notification';
|
|
6
|
-
import { createNativeNotificationEngine, } from './nativeEngine';
|
|
6
|
+
import { createNativeNotificationEngine, isNotificationSticky, resolveNotificationDuration, } from './nativeEngine';
|
|
7
7
|
import { enrichErrorToast } from './toast';
|
|
8
8
|
import { resolveCatalogPreviewPriority } from './catalogAdapter';
|
|
9
|
-
import { openExternal } from '../_internal/app/platform/electronBridge';
|
|
10
9
|
import { withErrorActionButtons } from './errorActionButtons';
|
|
11
10
|
function progressHandle(handle, payload) {
|
|
12
11
|
return {
|
|
@@ -35,31 +34,31 @@ function progressHandle(handle, payload) {
|
|
|
35
34
|
dismiss: () => handle.close(),
|
|
36
35
|
};
|
|
37
36
|
}
|
|
37
|
+
const inert = () => undefined;
|
|
38
38
|
function inertAction(action) {
|
|
39
39
|
return {
|
|
40
40
|
label: action.label,
|
|
41
|
-
onClick:
|
|
41
|
+
onClick: inert,
|
|
42
42
|
...(action.expireOnAction !== undefined
|
|
43
43
|
? { expireOnAction: action.expireOnAction }
|
|
44
44
|
: {}),
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
function toPreviewPayload(built) {
|
|
48
|
-
const payload = withErrorActionButtons(built);
|
|
47
|
+
function toPreviewPayload(built, errorActions) {
|
|
48
|
+
const payload = withErrorActionButtons(built, errorActions, inertAction);
|
|
49
49
|
return {
|
|
50
50
|
...payload,
|
|
51
51
|
...(payload.action ? { action: inertAction(payload.action) } : {}),
|
|
52
52
|
...(payload.actions ? { actions: payload.actions.map(inertAction) } : {}),
|
|
53
|
-
...(payload.onCancel ? { onCancel:
|
|
53
|
+
...(payload.onCancel ? { onCancel: inert } : {}),
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
-
function previewVendorMatch(payload) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return resolveVendorError(payload.vendorError);
|
|
56
|
+
function previewVendorMatch(vendorErrors, payload) {
|
|
57
|
+
return payload.vendorError === undefined
|
|
58
|
+
? null
|
|
59
|
+
: resolveVendorError(vendorErrors, payload.vendorError);
|
|
61
60
|
}
|
|
62
|
-
export function createNotificationPreviewRuntime() {
|
|
61
|
+
export function createNotificationPreviewRuntime(deps) {
|
|
63
62
|
let settings = { ...DEFAULT_NOTIFICATION_SETTINGS };
|
|
64
63
|
let gates = {
|
|
65
64
|
dismissed: false,
|
|
@@ -71,16 +70,27 @@ export function createNotificationPreviewRuntime() {
|
|
|
71
70
|
const engine = createNativeNotificationEngine({
|
|
72
71
|
getSettings: () => settings,
|
|
73
72
|
recordAutoFade: () => undefined,
|
|
74
|
-
warn: () =>
|
|
73
|
+
warn: (message, error) => deps.log.warn(message, error),
|
|
75
74
|
});
|
|
76
75
|
let activeItems = [];
|
|
77
76
|
const stopTracking = engine.subscribe((items) => {
|
|
78
77
|
activeItems = items;
|
|
79
78
|
});
|
|
79
|
+
const controller = {
|
|
80
|
+
close: (id) => engine.close(id),
|
|
81
|
+
setFocus: (id, focused) => engine.setFocus(id, focused),
|
|
82
|
+
setHover: (id, hovered) => engine.setHover(id, hovered),
|
|
83
|
+
toggleExpanded: (id) => engine.toggleExpanded(id),
|
|
84
|
+
isSticky: (item) => isNotificationSticky(item, settings),
|
|
85
|
+
duration: (item) => resolveNotificationDuration(item, settings),
|
|
86
|
+
resolveVendorError: (ref) => resolveVendorError(deps.vendorErrors, ref),
|
|
87
|
+
openExternal: deps.openExternal,
|
|
88
|
+
announcer: deps.announcer,
|
|
89
|
+
};
|
|
80
90
|
const host = {
|
|
81
91
|
notify(definition, payload) {
|
|
82
|
-
const previewPayload = toPreviewPayload(payload);
|
|
83
|
-
const vendorMatch = previewVendorMatch(previewPayload);
|
|
92
|
+
const previewPayload = toPreviewPayload(payload, deps.errorActions);
|
|
93
|
+
const vendorMatch = previewVendorMatch(deps.vendorErrors, previewPayload);
|
|
84
94
|
const errorEnrichment = definition.severity === 'error'
|
|
85
95
|
? enrichErrorToast(previewPayload.message, {
|
|
86
96
|
...(previewPayload.title
|
|
@@ -95,7 +105,7 @@ export function createNotificationPreviewRuntime() {
|
|
|
95
105
|
...(previewPayload.action
|
|
96
106
|
? { action: previewPayload.action }
|
|
97
107
|
: {}),
|
|
98
|
-
}, vendorMatch, openExternal)
|
|
108
|
+
}, vendorMatch, deps.openExternal)
|
|
99
109
|
: null;
|
|
100
110
|
const source = definition.severity === 'error' &&
|
|
101
111
|
definition.source === 'general' &&
|
|
@@ -184,7 +194,7 @@ export function createNotificationPreviewRuntime() {
|
|
|
184
194
|
return handle.id;
|
|
185
195
|
},
|
|
186
196
|
progress(definition, payload) {
|
|
187
|
-
const previewPayload = toPreviewPayload(payload);
|
|
197
|
+
const previewPayload = toPreviewPayload(payload, deps.errorActions);
|
|
188
198
|
const decision = decideFilter({
|
|
189
199
|
priority: definition.priority,
|
|
190
200
|
recordTimeline: previewPayload.recordTimeline,
|
|
@@ -226,7 +236,7 @@ export function createNotificationPreviewRuntime() {
|
|
|
226
236
|
};
|
|
227
237
|
return {
|
|
228
238
|
host,
|
|
229
|
-
controller
|
|
239
|
+
controller,
|
|
230
240
|
deliveries,
|
|
231
241
|
setBehavior: (behavior) => {
|
|
232
242
|
settings = { ...DEFAULT_NOTIFICATION_SETTINGS };
|
|
@@ -1,23 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
export class CustomSoundCache {
|
|
2
|
+
readAudioAsDataUrl;
|
|
3
|
+
dataUrls = new Map();
|
|
4
|
+
inFlight = new Map();
|
|
5
|
+
constructor(readAudioAsDataUrl) {
|
|
6
|
+
this.readAudioAsDataUrl = readAudioAsDataUrl;
|
|
7
|
+
}
|
|
8
|
+
async load(filePath) {
|
|
9
|
+
const cached = this.dataUrls.get(filePath);
|
|
10
|
+
if (cached)
|
|
11
|
+
return cached;
|
|
12
|
+
let pending = this.inFlight.get(filePath);
|
|
13
|
+
if (!pending) {
|
|
14
|
+
pending = this.readAudioAsDataUrl(filePath).then((url) => {
|
|
15
|
+
this.inFlight.delete(filePath);
|
|
16
|
+
if (url)
|
|
17
|
+
this.dataUrls.set(filePath, url);
|
|
18
|
+
return url;
|
|
19
|
+
});
|
|
20
|
+
this.inFlight.set(filePath, pending);
|
|
21
|
+
}
|
|
22
|
+
return (await pending) ?? undefined;
|
|
23
|
+
}
|
|
24
|
+
invalidate() {
|
|
25
|
+
this.dataUrls.clear();
|
|
26
|
+
this.inFlight.clear();
|
|
17
27
|
}
|
|
18
|
-
return (await pending) ?? undefined;
|
|
19
|
-
}
|
|
20
|
-
export function invalidateCustomSoundCache() {
|
|
21
|
-
dataUrlCache.clear();
|
|
22
|
-
inFlight.clear();
|
|
23
28
|
}
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import { errorText } from '../_internal/contract/hostErrorText';
|
|
2
|
-
import { getAppName } from '../_internal/contract/appName';
|
|
3
1
|
import { notificationSettings } from '../_internal/app/settings/descriptors/notification';
|
|
4
|
-
import { getSmtpPass } from '../_internal/app/settings/secrets/notificationSecrets';
|
|
2
|
+
import { getSmtpPass, } from '../_internal/app/settings/secrets/notificationSecrets';
|
|
5
3
|
import { t } from '../i18n/i18n';
|
|
6
|
-
import { getLogger } from '../_internal/platform/logging/rendererLogging';
|
|
7
|
-
let digestTransport = null;
|
|
8
|
-
export function setEmailDigestTransport(transport) {
|
|
9
|
-
digestTransport = transport;
|
|
10
|
-
}
|
|
11
|
-
const log = getLogger('EmailDigest');
|
|
12
|
-
const queue = [];
|
|
13
4
|
const MAX_QUEUE = 500;
|
|
14
5
|
const SEVERITY_RANK = {
|
|
15
6
|
info: 0,
|
|
@@ -17,19 +8,8 @@ const SEVERITY_RANK = {
|
|
|
17
8
|
warning: 2,
|
|
18
9
|
error: 3,
|
|
19
10
|
};
|
|
20
|
-
export function enqueueForDigest(entry) {
|
|
21
|
-
const s = notificationSettings.get();
|
|
22
|
-
if (!s.emailDigestEnabled)
|
|
23
|
-
return;
|
|
24
|
-
if (SEVERITY_RANK[entry.severity] < SEVERITY_RANK[s.emailDigestMinSeverity])
|
|
25
|
-
return;
|
|
26
|
-
queue.push(entry);
|
|
27
|
-
if (queue.length > MAX_QUEUE)
|
|
28
|
-
queue.splice(0, queue.length - MAX_QUEUE);
|
|
29
|
-
}
|
|
30
11
|
const escape = (s) => s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
|
31
|
-
function formatHtml(entries) {
|
|
32
|
-
const app = getAppName();
|
|
12
|
+
function formatHtml(app, entries) {
|
|
33
13
|
const rows = entries
|
|
34
14
|
.map((e) => {
|
|
35
15
|
const time = new Date(e.at).toISOString().slice(11, 19);
|
|
@@ -64,59 +44,6 @@ function formatText(entries) {
|
|
|
64
44
|
});
|
|
65
45
|
return `${entries.length} notification(s):\n\n${lines.join('\n')}`;
|
|
66
46
|
}
|
|
67
|
-
export function digestNotSentText(reason) {
|
|
68
|
-
switch (reason.kind) {
|
|
69
|
-
case 'disabled':
|
|
70
|
-
return t('Email digest is turned off.');
|
|
71
|
-
case 'smtp-incomplete':
|
|
72
|
-
return t('SMTP host, sender and recipient are required.');
|
|
73
|
-
case 'send-failed':
|
|
74
|
-
return errorText(reason.error, t('The digest could not be sent.'));
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
export async function flushDigest() {
|
|
78
|
-
const s = notificationSettings.get();
|
|
79
|
-
if (!s.emailDigestEnabled) {
|
|
80
|
-
return { kind: 'not-sent', reason: { kind: 'disabled' } };
|
|
81
|
-
}
|
|
82
|
-
if (queue.length === 0)
|
|
83
|
-
return { kind: 'sent', count: 0 };
|
|
84
|
-
if (!s.emailDigestSmtpHost || !s.emailDigestFrom || !s.emailDigestTo) {
|
|
85
|
-
return { kind: 'not-sent', reason: { kind: 'smtp-incomplete' } };
|
|
86
|
-
}
|
|
87
|
-
const batch = queue.splice(0, queue.length);
|
|
88
|
-
const api = {
|
|
89
|
-
sendEmailDigest: (message) => digestTransport
|
|
90
|
-
? digestTransport(message)
|
|
91
|
-
: Promise.reject(new Error('No email digest transport configured')),
|
|
92
|
-
};
|
|
93
|
-
const app = getAppName();
|
|
94
|
-
const subject = `${app ? `[${app}] ` : ''}${batch.length} notification(s)`;
|
|
95
|
-
const pass = (await getSmtpPass()) ?? '';
|
|
96
|
-
try {
|
|
97
|
-
await api.sendEmailDigest({
|
|
98
|
-
smtp: {
|
|
99
|
-
host: s.emailDigestSmtpHost,
|
|
100
|
-
port: s.emailDigestSmtpPort,
|
|
101
|
-
secure: s.emailDigestSmtpSecure,
|
|
102
|
-
user: s.emailDigestSmtpUser,
|
|
103
|
-
pass,
|
|
104
|
-
},
|
|
105
|
-
from: s.emailDigestFrom,
|
|
106
|
-
to: s.emailDigestTo,
|
|
107
|
-
subject,
|
|
108
|
-
html: formatHtml(batch),
|
|
109
|
-
text: formatText(batch),
|
|
110
|
-
});
|
|
111
|
-
return { kind: 'sent', count: batch.length };
|
|
112
|
-
}
|
|
113
|
-
catch (err) {
|
|
114
|
-
queue.unshift(...batch);
|
|
115
|
-
return { kind: 'not-sent', reason: { kind: 'send-failed', error: err } };
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
let lastSent = 0;
|
|
119
|
-
let schedulerInterval = null;
|
|
120
47
|
function isScheduleTriggered(now) {
|
|
121
48
|
const s = notificationSettings.get();
|
|
122
49
|
if (!s.emailDigestEnabled)
|
|
@@ -135,23 +62,84 @@ function isScheduleTriggered(now) {
|
|
|
135
62
|
return dow === 1 && hour === 9 && minute === 0;
|
|
136
63
|
}
|
|
137
64
|
}
|
|
138
|
-
export
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
65
|
+
export class EmailDigest {
|
|
66
|
+
deps;
|
|
67
|
+
queue = [];
|
|
68
|
+
lastSentMinute = 0;
|
|
69
|
+
scheduler;
|
|
70
|
+
constructor(deps) {
|
|
71
|
+
this.deps = deps;
|
|
72
|
+
this.scheduler = setInterval(() => this.tick(), 60_000);
|
|
73
|
+
}
|
|
74
|
+
enqueue(entry) {
|
|
75
|
+
const s = notificationSettings.get();
|
|
76
|
+
if (!s.emailDigestEnabled)
|
|
77
|
+
return;
|
|
78
|
+
if (SEVERITY_RANK[entry.severity] < SEVERITY_RANK[s.emailDigestMinSeverity])
|
|
79
|
+
return;
|
|
80
|
+
this.queue.push(entry);
|
|
81
|
+
if (this.queue.length > MAX_QUEUE)
|
|
82
|
+
this.queue.splice(0, this.queue.length - MAX_QUEUE);
|
|
83
|
+
}
|
|
84
|
+
async flush() {
|
|
85
|
+
const s = notificationSettings.get();
|
|
86
|
+
if (!s.emailDigestEnabled)
|
|
87
|
+
return { kind: 'not-sent', reason: { kind: 'disabled' } };
|
|
88
|
+
if (this.queue.length === 0)
|
|
89
|
+
return { kind: 'sent', count: 0 };
|
|
90
|
+
if (!s.emailDigestSmtpHost || !s.emailDigestFrom || !s.emailDigestTo) {
|
|
91
|
+
return { kind: 'not-sent', reason: { kind: 'smtp-incomplete' } };
|
|
92
|
+
}
|
|
93
|
+
const batch = this.queue.splice(0, this.queue.length);
|
|
94
|
+
const app = this.deps.appName;
|
|
95
|
+
try {
|
|
96
|
+
const pass = (await getSmtpPass(this.deps.secrets)) ?? '';
|
|
97
|
+
await this.deps.send({
|
|
98
|
+
smtp: {
|
|
99
|
+
host: s.emailDigestSmtpHost,
|
|
100
|
+
port: s.emailDigestSmtpPort,
|
|
101
|
+
secure: s.emailDigestSmtpSecure,
|
|
102
|
+
user: s.emailDigestSmtpUser,
|
|
103
|
+
pass,
|
|
104
|
+
},
|
|
105
|
+
from: s.emailDigestFrom,
|
|
106
|
+
to: s.emailDigestTo,
|
|
107
|
+
subject: `${app ? `[${app}] ` : ''}${batch.length} notification(s)`,
|
|
108
|
+
html: formatHtml(app, batch),
|
|
109
|
+
text: formatText(batch),
|
|
110
|
+
});
|
|
111
|
+
return { kind: 'sent', count: batch.length };
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
this.queue.unshift(...batch);
|
|
115
|
+
return { kind: 'not-sent', reason: { kind: 'send-failed', error } };
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
notSentText(reason) {
|
|
119
|
+
switch (reason.kind) {
|
|
120
|
+
case 'disabled':
|
|
121
|
+
return t('Email digest is turned off.');
|
|
122
|
+
case 'smtp-incomplete':
|
|
123
|
+
return t('SMTP host, sender and recipient are required.');
|
|
124
|
+
case 'send-failed':
|
|
125
|
+
return this.deps.errorText(reason.error, t('The digest could not be sent.'));
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
dispose() {
|
|
129
|
+
clearInterval(this.scheduler);
|
|
130
|
+
}
|
|
131
|
+
tick() {
|
|
144
132
|
const now = new Date();
|
|
145
133
|
if (!isScheduleTriggered(now))
|
|
146
134
|
return;
|
|
147
135
|
const minuteKey = Math.floor(now.getTime() / 60_000);
|
|
148
|
-
if (minuteKey ===
|
|
136
|
+
if (minuteKey === this.lastSentMinute)
|
|
149
137
|
return;
|
|
150
|
-
|
|
151
|
-
void
|
|
138
|
+
this.lastSentMinute = minuteKey;
|
|
139
|
+
void this.flush().then((result) => {
|
|
152
140
|
if (result.kind === 'not-sent' && result.reason.kind === 'send-failed') {
|
|
153
|
-
log.warn('scheduled email digest failed', result.reason.error);
|
|
141
|
+
this.deps.log.warn('scheduled email digest failed', result.reason.error);
|
|
154
142
|
}
|
|
155
143
|
});
|
|
156
|
-
}
|
|
144
|
+
}
|
|
157
145
|
}
|
|
@@ -1,24 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
import { errorActions } from '../_internal/contract/hostErrorText';
|
|
3
|
-
import { errorActionFailed } from './notifications.notifications';
|
|
4
|
-
export function withErrorActionButtons(payload) {
|
|
1
|
+
export function withErrorActionButtons(payload, actionsOf, toButton) {
|
|
5
2
|
if (!('cause' in payload))
|
|
6
3
|
return payload;
|
|
7
4
|
const { cause, ...rest } = payload;
|
|
8
|
-
const buttons =
|
|
5
|
+
const buttons = actionsOf(cause).map(toButton);
|
|
9
6
|
return buttons.length === 0
|
|
10
7
|
? rest
|
|
11
8
|
: { ...rest, actions: [...(rest.actions ?? []), ...buttons] };
|
|
12
9
|
}
|
|
13
|
-
function
|
|
14
|
-
return {
|
|
10
|
+
export function errorActionButton(onActionFailed) {
|
|
11
|
+
return (action) => ({
|
|
15
12
|
label: action.label,
|
|
16
13
|
onClick: () => {
|
|
17
14
|
void Promise.resolve()
|
|
18
15
|
.then(() => action.run())
|
|
19
|
-
.catch(
|
|
20
|
-
notifyFromCatalog(errorActionFailed, { cause: failure });
|
|
21
|
-
});
|
|
16
|
+
.catch(onActionFailed);
|
|
22
17
|
},
|
|
23
|
-
};
|
|
18
|
+
});
|
|
24
19
|
}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import { scrubSecrets } from '../_internal/base/scrubSecrets';
|
|
2
2
|
import { notificationSettings } from '../_internal/app/settings/descriptors/notification';
|
|
3
|
-
import { osNotify } from '../_internal/app/platform/electronBridge';
|
|
4
3
|
import { isInQuietHours } from './quietHours';
|
|
5
4
|
import { decideFilter as decideToastFilter, deriveImplicitRemindKey, } from './toastFilterPolicy';
|
|
6
5
|
import { shouldFireOsNative } from './osNativePolicy';
|
|
7
6
|
import { resolveDefaultRoute } from './defaultRoutes';
|
|
8
|
-
import { playSeverityToneIfEnabled } from './notificationAudio';
|
|
9
|
-
import { dispatchToWebhooks } from './webhookDelivery';
|
|
10
|
-
import { enqueueForDigest } from './emailDigest';
|
|
11
|
-
import { recordFire, recordClick } from './notificationAnalytics';
|
|
12
7
|
import { isKeyDismissed, isKeyRemindSuppressed, isSourceMuted, } from './notificationSuppressions';
|
|
13
|
-
import {
|
|
8
|
+
import { isSpamDropHandle, } from './nativeEngine';
|
|
14
9
|
function inQuietHoursNow() {
|
|
15
10
|
return isInQuietHours(notificationSettings.get(), new Date());
|
|
16
11
|
}
|
|
@@ -26,30 +21,30 @@ export function decideFilter(source, title, priority, dontShowAgainKey, recordTi
|
|
|
26
21
|
inQuietHours: inQuietHoursNow(),
|
|
27
22
|
});
|
|
28
23
|
}
|
|
29
|
-
function mapAction(action, handleId, source, primary) {
|
|
24
|
+
function mapAction(sinks, action, handleId, source, primary) {
|
|
30
25
|
return {
|
|
31
26
|
label: action.label,
|
|
32
27
|
primary,
|
|
33
28
|
keepOpen: action.expireOnAction === false,
|
|
34
29
|
onClick: () => {
|
|
35
|
-
recordClick(source);
|
|
30
|
+
sinks.analytics.recordClick(source);
|
|
36
31
|
try {
|
|
37
32
|
action.onClick();
|
|
38
33
|
}
|
|
39
34
|
finally {
|
|
40
35
|
const id = handleId();
|
|
41
36
|
if (action.expireOnAction !== false && id)
|
|
42
|
-
|
|
37
|
+
sinks.engine.close(id);
|
|
43
38
|
}
|
|
44
39
|
},
|
|
45
40
|
};
|
|
46
41
|
}
|
|
47
|
-
export function fire(opts) {
|
|
42
|
+
export function fire(sinks, opts) {
|
|
48
43
|
const fireSource = opts.options.source ?? 'general';
|
|
49
|
-
recordFire(fireSource, opts.decision.showToast, isSourceMuted(fireSource));
|
|
44
|
+
sinks.analytics.recordFire(fireSource, opts.decision.showToast, isSourceMuted(fireSource));
|
|
50
45
|
if (!opts.decision.showToast)
|
|
51
46
|
return null;
|
|
52
|
-
playSeverityToneIfEnabled(opts.severity, inQuietHoursNow());
|
|
47
|
+
sinks.audio.playSeverityToneIfEnabled(opts.severity, inQuietHoursNow());
|
|
53
48
|
const { options } = opts;
|
|
54
49
|
const description = options.subtitle?.trim() || options.description?.trim();
|
|
55
50
|
const id = options.id !== undefined ? String(options.id) : undefined;
|
|
@@ -61,7 +56,7 @@ export function fire(opts) {
|
|
|
61
56
|
];
|
|
62
57
|
const resolvedRoute = resolveDefaultRoute(options.source, options.defaultRoute);
|
|
63
58
|
let resolved = null;
|
|
64
|
-
const handle = notify({
|
|
59
|
+
const handle = sinks.engine.notify({
|
|
65
60
|
severity: opts.severity,
|
|
66
61
|
title: opts.title,
|
|
67
62
|
...(description ? { body: description } : {}),
|
|
@@ -78,7 +73,7 @@ export function fire(opts) {
|
|
|
78
73
|
...(opts.vendorError ? { vendorError: opts.vendorError } : {}),
|
|
79
74
|
...(toastActions.length > 0
|
|
80
75
|
? {
|
|
81
|
-
actions: toastActions.map((action, index) => mapAction(action, () => resolved?.id, fireSource, index === 0)),
|
|
76
|
+
actions: toastActions.map((action, index) => mapAction(sinks, action, () => resolved?.id, fireSource, index === 0)),
|
|
82
77
|
}
|
|
83
78
|
: {}),
|
|
84
79
|
});
|
|
@@ -94,16 +89,16 @@ export function fire(opts) {
|
|
|
94
89
|
priority: options.priority ?? 'default',
|
|
95
90
|
source: options.source ?? 'general',
|
|
96
91
|
};
|
|
97
|
-
maybeFireOsNative(fanoutPayload);
|
|
98
|
-
|
|
99
|
-
|
|
92
|
+
maybeFireOsNative(sinks, fanoutPayload);
|
|
93
|
+
sinks.webhooks.dispatch(fanoutPayload);
|
|
94
|
+
sinks.digest.enqueue({ ...fanoutPayload, at: Date.now() });
|
|
100
95
|
return handle;
|
|
101
96
|
}
|
|
102
|
-
function maybeFireOsNative(payload) {
|
|
97
|
+
function maybeFireOsNative(sinks, payload) {
|
|
103
98
|
const decision = shouldFireOsNative(payload, notificationSettings.get());
|
|
104
99
|
if (!decision.fire)
|
|
105
100
|
return;
|
|
106
|
-
osNotify({
|
|
101
|
+
sinks.osNotify({
|
|
107
102
|
title: payload.title,
|
|
108
103
|
...(payload.body ? { body: payload.body } : {}),
|
|
109
104
|
severity: payload.severity,
|