@rapidmx/web-client 0.20.0 → 0.22.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/README.md +415 -381
- package/apps/admin/_layout.tsx +2 -2
- package/apps/admin/audit-log/index.tsx +4 -4
- package/apps/admin/branding/index.tsx +39 -39
- package/apps/admin/data-requests/index.tsx +482 -482
- package/apps/admin/distribution-lists/[uid].tsx +3 -3
- package/apps/admin/distribution-lists/index.tsx +4 -4
- package/apps/admin/distribution-lists/new/index.tsx +5 -5
- package/apps/admin/domains/[uid].tsx +166 -166
- package/apps/admin/domains/index.tsx +4 -4
- package/apps/admin/domains/new/index.tsx +5 -5
- package/apps/admin/encryption-policy/index.tsx +1 -1
- package/apps/admin/escrow-scopes/[uid].tsx +350 -350
- package/apps/admin/escrow-scopes/index.tsx +4 -4
- package/apps/admin/escrow-scopes/new/index.tsx +5 -5
- package/apps/admin/index.tsx +129 -129
- package/apps/admin/ingest-queue/index.tsx +4 -4
- package/apps/admin/mailbox-policy/index.tsx +1 -1
- package/apps/admin/mailboxes/[uid].tsx +271 -271
- package/apps/admin/mailboxes/new/index.tsx +30 -30
- package/apps/admin/plugins/index.tsx +15 -15
- package/apps/admin/quarantine/index.tsx +5 -5
- package/apps/admin/retention-policy/index.tsx +39 -39
- package/apps/admin/signing-certificates/index.tsx +343 -343
- package/apps/admin/transport-rules/[uid].tsx +5 -5
- package/apps/admin/transport-rules/_transportRuleConfig.tsx +3 -3
- package/apps/admin/transport-rules/index.tsx +4 -4
- package/apps/admin/transport-rules/new/index.tsx +5 -5
- package/apps/escrow/_layout.tsx +1 -1
- package/apps/escrow/audit-log/index.tsx +196 -196
- package/apps/escrow/index.tsx +4 -4
- package/apps/escrow/matters/[uid].tsx +621 -621
- package/apps/escrow/matters/new/index.tsx +6 -6
- package/apps/shared/appearance/AppearanceForm.tsx +3 -3
- package/apps/shared/appearance/AppearanceHead.tsx +1 -1
- package/apps/shared/appearance/AppearanceProvider.tsx +3 -3
- package/apps/shared/appearance/appearanceCache.ts +1 -1
- package/apps/shared/appearance/appearanceContext.ts +1 -1
- package/apps/shared/appearance/theme.ts +1 -1
- package/apps/shared/auth/adminAccess.ts +99 -99
- package/apps/shared/calendar/bookingPlugin.ts +1 -1
- package/apps/shared/calendar/calendarLiveUpdates.ts +1 -1
- package/apps/shared/calendar/calendarReminders.ts +1 -1
- package/apps/shared/calendar/useCalendarReminders.ts +1 -1
- package/apps/shared/components/admin/diagnostics/DiagnosticsManager.tsx +1 -1
- package/apps/shared/components/admin/diagnostics/InstalledPlugins.tsx +2 -2
- package/apps/shared/components/admin/diagnostics/LogsPanel.tsx +2 -2
- package/apps/shared/components/admin/diagnostics/PackagesTable.tsx +1 -1
- package/apps/shared/components/admin/diagnostics/RuntimePanel.tsx +1 -1
- package/apps/shared/components/admin/diagnostics/SystemPanel.tsx +2 -2
- package/apps/shared/components/admin/diagnostics/VersionsPanel.tsx +1 -1
- package/apps/shared/components/admin/diagnostics/diagnosticsApi.ts +1 -1
- package/apps/shared/components/admin/diagnostics/format.ts +1 -1
- package/apps/shared/components/admin/diagnostics/logClient.ts +1 -1
- package/apps/shared/components/admin/distributionLists/MemberListCard.tsx +4 -4
- package/apps/shared/components/admin/elevation.ts +1 -1
- package/apps/shared/components/admin/escrowScopes/EscrowScopeKeyAndHoldersFields.tsx +3 -3
- package/apps/shared/components/admin/layout/AdminShell.tsx +384 -384
- package/apps/shared/components/admin/mailboxes/EraseLeftoverDataDialog.tsx +238 -238
- package/apps/shared/components/admin/mailboxes/EscrowScopeCard.tsx +154 -152
- package/apps/shared/components/admin/mailboxes/LeftoverMailboxesSection.tsx +194 -194
- package/apps/shared/components/admin/mailboxes/MailboxTable.tsx +1 -1
- package/apps/shared/components/admin/mailboxes/ResourceSettingsCard.tsx +19 -14
- package/apps/shared/components/admin/mailboxes/ShareAccessCard.tsx +5 -5
- package/apps/shared/components/admin/settings/BrandingForm.tsx +423 -423
- package/apps/shared/components/admin/settings/DomainDnsSetup.tsx +5 -5
- package/apps/shared/components/admin/settings/EncryptionPolicyForm.tsx +119 -119
- package/apps/shared/components/admin/settings/LoadedSettingsForm.tsx +2 -2
- package/apps/shared/components/admin/settings/MailboxCreateForm.tsx +32 -27
- package/apps/shared/components/admin/settings/MailboxPolicyForm.tsx +198 -198
- package/apps/shared/components/admin/settings/PluginsManager.tsx +2093 -2093
- package/apps/shared/components/admin/settings/RetentionPolicyForm.tsx +182 -182
- package/apps/shared/components/admin/setup/EscrowSetupStep.tsx +288 -288
- package/apps/shared/components/admin/setup/SetupWizard.tsx +450 -446
- package/apps/shared/components/admin/signOut.ts +1 -1
- package/apps/shared/components/admin/usePagedList.tsx +129 -129
- package/apps/shared/components/calendar/AppointmentQuickForm.tsx +3 -3
- package/apps/shared/components/calendar/CalendarListSidebar.tsx +3 -3
- package/apps/shared/components/calendar/DescriptionEditor.tsx +1 -1
- package/apps/shared/components/calendar/EventDescriptionView.tsx +1 -1
- package/apps/shared/components/calendar/EventDetails.tsx +16 -14
- package/apps/shared/components/calendar/EventEditor.tsx +54 -39
- package/apps/shared/components/calendar/EventExpandedForm.tsx +3 -3
- package/apps/shared/components/calendar/EventFormParts.tsx +2 -2
- package/apps/shared/components/calendar/EventModal.tsx +206 -206
- package/apps/shared/components/calendar/EventQuickForm.tsx +3 -3
- package/apps/shared/components/calendar/EventShell.tsx +1 -1
- package/apps/shared/components/calendar/FindATime.tsx +6 -4
- package/apps/shared/components/calendar/GuestInput.tsx +2 -2
- package/apps/shared/components/calendar/MonthView.tsx +185 -185
- package/apps/shared/components/calendar/QuickCreateFaces.tsx +1 -1
- package/apps/shared/components/calendar/QuickFaceFrame.tsx +1 -1
- package/apps/shared/components/calendar/RecurrenceEditor.tsx +227 -227
- package/apps/shared/components/calendar/RequestChangeForm.tsx +8 -6
- package/apps/shared/components/calendar/ResourcePicker.tsx +7 -5
- package/apps/shared/components/calendar/SplitDayView.tsx +144 -144
- package/apps/shared/components/calendar/TaskQuickForm.tsx +23 -18
- package/apps/shared/components/calendar/TimeGridView.tsx +246 -246
- package/apps/shared/components/calendar/allDay.ts +124 -124
- package/apps/shared/components/calendar/eventDialogFields.ts +3 -3
- package/apps/shared/components/calendar/eventForm.ts +3 -3
- package/apps/shared/components/calendar/eventFormat.ts +3 -3
- package/apps/shared/components/calendar/findTimeGrid.ts +2 -2
- package/apps/shared/components/calendar/layout/CalendarShell.tsx +11 -9
- package/apps/shared/components/contacts/ContactDetailPane.tsx +4 -4
- package/apps/shared/components/contacts/ContactForm.tsx +393 -383
- package/apps/shared/components/contacts/ContactsSidebar.tsx +7 -5
- package/apps/shared/components/contacts/ContactsToolbar.tsx +103 -103
- package/apps/shared/components/contacts/KeyChangeReview.tsx +5 -5
- package/apps/shared/components/contacts/contactKeys.ts +3 -3
- package/apps/shared/components/contacts/layout/ContactsShell.tsx +9 -7
- package/apps/shared/components/escrow/layout/EscrowShell.tsx +155 -155
- package/apps/shared/components/forms/StringListField.tsx +1 -1
- package/apps/shared/components/layout/AppShell.tsx +465 -461
- package/apps/shared/components/layout/BrandingChrome.tsx +1 -1
- package/apps/shared/components/layout/KeyEnrollmentGate.tsx +398 -398
- package/apps/shared/components/layout/MailboxProvisioning.tsx +170 -168
- package/apps/shared/components/layout/RecoveryCodeUnlock.tsx +9 -9
- package/apps/shared/components/layout/ResponsiveToolbar.tsx +315 -315
- package/apps/shared/components/layout/ThemeSwitch.tsx +84 -84
- package/apps/shared/components/layout/UnlockPromptProvider.tsx +6 -6
- package/apps/shared/components/layout/UserMenu.tsx +441 -439
- package/apps/shared/components/mail/ConversationList.tsx +334 -332
- package/apps/shared/components/mail/ConversationThreadPane.tsx +624 -613
- package/apps/shared/components/mail/InviteCard.tsx +11 -9
- package/apps/shared/components/mail/LazyReadingPane.tsx +2 -2
- package/apps/shared/components/mail/MailAddress.tsx +1 -1
- package/apps/shared/components/mail/MailListToolbar.tsx +2 -2
- package/apps/shared/components/mail/MailSelectionBar.tsx +240 -240
- package/apps/shared/components/mail/MenuButton.tsx +404 -404
- package/apps/shared/components/mail/MessageDetailPane.tsx +1759 -1757
- package/apps/shared/components/mail/MoveToFolderDialog.tsx +8 -6
- package/apps/shared/components/mail/OutboxRowStatus.tsx +1 -1
- package/apps/shared/components/mail/PermanentDeleteDialog.tsx +2 -2
- package/apps/shared/components/mail/compose/ComposeContext.tsx +323 -312
- package/apps/shared/components/mail/compose/ComposeToolbar.tsx +422 -422
- package/apps/shared/components/mail/compose/ComposeWindow.tsx +1709 -1681
- package/apps/shared/components/mail/compose/ComposeWindowPlaceholder.tsx +4 -4
- package/apps/shared/components/mail/compose/EmojiPicker.tsx +2 -2
- package/apps/shared/components/mail/compose/GifPicker.tsx +3 -3
- package/apps/shared/components/mail/compose/RecipientInput.tsx +1 -1
- package/apps/shared/components/mail/compose/RichTextEditor.tsx +147 -147
- package/apps/shared/components/mail/compose/ScheduleSendPicker.tsx +1 -1
- package/apps/shared/components/mail/compose/composeFlushRegistry.ts +60 -60
- package/apps/shared/components/mail/compose/encryptionRequirement.ts +2 -2
- package/apps/shared/components/mail/compose/quotedBody.ts +161 -161
- package/apps/shared/components/mail/compose/recipients.ts +1 -1
- package/apps/shared/components/mail/invite/InviteRowChip.tsx +2 -2
- package/apps/shared/components/mail/invite/InviteRsvpPopover.tsx +9 -7
- package/apps/shared/components/mail/invite/InviteTimeline.tsx +1 -1
- package/apps/shared/components/mail/invite/ProposeTimeForm.tsx +2 -2
- package/apps/shared/components/mail/invite/inviteFormat.ts +2 -2
- package/apps/shared/components/mail/invite/inviteStore.ts +14 -6
- package/apps/shared/components/mail/labelMenu.tsx +9 -7
- package/apps/shared/components/mail/layout/MailShell.tsx +4 -4
- package/apps/shared/components/mail/listPreferences.ts +2 -2
- package/apps/shared/components/mail/pinnedSigners.ts +45 -19
- package/apps/shared/components/mail/reading/EncryptedBody.tsx +2 -2
- package/apps/shared/components/mail/reading/MessageBody.tsx +6 -6
- package/apps/shared/components/mail/reading/MessageCard.tsx +3 -3
- package/apps/shared/components/mail/reading/MessageMoreMenu.tsx +258 -258
- package/apps/shared/components/mail/reading/MessageSourceDialog.tsx +79 -79
- package/apps/shared/components/mail/reading/PendingMessageCard.tsx +1 -1
- package/apps/shared/components/mail/reading/bodyContent.ts +3 -3
- package/apps/shared/components/mail/reading/bodyHtml.ts +1 -1
- package/apps/shared/components/mail/reading/messageExport.ts +59 -59
- package/apps/shared/components/mail/reading/printMessage.ts +99 -99
- package/apps/shared/components/mail/reading/useMessageActions.ts +450 -443
- package/apps/shared/components/mail/unreadStyle.tsx +1 -1
- package/apps/shared/components/mail/verificationSeals.ts +129 -125
- package/apps/shared/components/mail/writableMailboxes.ts +14 -7
- package/apps/shared/components/rules/RuleBuilder.tsx +311 -311
- package/apps/shared/components/settings/SigningCertificateCard.tsx +344 -344
- package/apps/shared/components/settings/layout/SettingsShell.tsx +8 -6
- package/apps/shared/components/sharing/PrincipalListField.tsx +1 -1
- package/apps/shared/components/sharing/PrincipalPicker.tsx +1 -1
- package/apps/shared/components/sharing/PrincipalResolver.tsx +4 -4
- package/apps/shared/components/tasks/TasksSidebar.tsx +7 -5
- package/apps/shared/components/tasks/layout/TasksShell.tsx +9 -7
- package/apps/shared/keyboard/GlobalShortcuts.tsx +51 -51
- package/apps/shared/keyboard/ShortcutProvider.tsx +62 -62
- package/apps/shared/keyboard/ShortcutsDialog.tsx +84 -84
- package/apps/shared/keyboard/dispatch.ts +124 -124
- package/apps/shared/keyboard/format.ts +89 -89
- package/apps/shared/keyboard/keymap.ts +114 -114
- package/apps/shared/keyboard/registry.ts +65 -65
- package/apps/shared/keyboard/targets.ts +79 -79
- package/apps/shared/mail/findWellKnownFolderUid.ts +6 -4
- package/apps/shared/mail/folderCounts.ts +8 -4
- package/apps/shared/mail/folderOfType.ts +51 -49
- package/apps/shared/mail/folderTree.ts +143 -143
- package/apps/shared/mail/listAllPages.ts +39 -39
- package/apps/shared/mail/listSnapshots.ts +2 -2
- package/apps/shared/mail/messageReadState.ts +6 -5
- package/apps/shared/mail/newMailNotifications.ts +171 -171
- package/apps/shared/mail/outbox/composeBridge.ts +2 -2
- package/apps/shared/mail/outbox/outboxState.ts +1 -1
- package/apps/shared/mail/outbox/outgoingReplies.ts +2 -2
- package/apps/shared/mail/outbox/sendDecision.ts +2 -2
- package/apps/shared/mail/outbox/sendJob.ts +450 -445
- package/apps/shared/mail/outbox/sendOutcomes.ts +160 -155
- package/apps/shared/mail/outbox/useOutboxStatus.ts +5 -3
- package/apps/shared/mail/permanentDelete.ts +8 -7
- package/apps/shared/mail/primaryMailbox.ts +1 -1
- package/apps/shared/mail/reportNotices.ts +66 -66
- package/apps/shared/mail/senderBlocking.ts +157 -141
- package/apps/shared/mail/useMailConnection.ts +207 -205
- package/apps/shared/mail/useMailLiveUpdates.ts +277 -277
- package/apps/shared/mail/useMailboxUpdateAccess.ts +84 -60
- package/apps/shared/mail/useMarkMessageRead.ts +54 -47
- package/apps/shared/mail/useNewMailNotifications.ts +178 -178
- package/apps/shared/mail/usePermanentDelete.tsx +5 -3
- package/apps/shared/navigation/pageTitle.ts +1 -1
- package/apps/shared/notifications/NotificationCenter.tsx +1 -1
- package/apps/shared/notifications/NotificationHistoryDialog.tsx +2 -2
- package/apps/shared/notifications/apiErrors.ts +2 -2
- package/apps/shared/notifications/pushStatus.ts +1 -1
- package/apps/shared/notifications/store.ts +560 -560
- package/apps/shared/notifications/systemErrors.ts +1 -1
- package/apps/shared/search/LocalIndexLifecycle.tsx +120 -114
- package/apps/shared/search/crossMailboxSearch.ts +3 -3
- package/apps/shared/search/localIndexBuilder.ts +493 -481
- package/apps/shared/search/localIndexKey.ts +1 -1
- package/apps/shared/search/localIndexRpcClient.ts +150 -30
- package/apps/shared/search/localIndexTransport.ts +84 -0
- package/apps/shared/search/localIndexWorker.ts +1 -1
- package/apps/shared/search/searchTier2.ts +3 -3
- package/apps/shared/signing/enrollmentStorage.ts +33 -33
- package/apps/shared/signing/enrollmentTracker.ts +385 -385
- package/apps/shared/signing/enrollmentView.ts +251 -251
- package/apps/shared/signing/signingInfo.ts +1 -1
- package/apps/shared/signing/useNow.ts +19 -19
- package/apps/shared/signing/useSigningEnrollmentWatcher.ts +92 -90
- package/apps/shared/styles/app.css +387 -396
- package/apps/www/_layout.tsx +2 -2
- package/apps/www/calendar/index.tsx +583 -581
- package/apps/www/contacts/[uid].tsx +114 -112
- package/apps/www/contacts/index.tsx +19 -17
- package/apps/www/index.tsx +3021 -3012
- package/apps/www/messages/[uid].tsx +141 -139
- package/apps/www/settings/auto-reply/index.tsx +138 -136
- package/apps/www/settings/blocked-senders/index.tsx +305 -303
- package/apps/www/settings/encryption/index.tsx +1296 -1290
- package/apps/www/settings/filters/[uid].tsx +184 -179
- package/apps/www/settings/filters/_mailFilterRuleConfig.tsx +2 -2
- package/apps/www/settings/filters/index.tsx +105 -105
- package/apps/www/settings/filters/new/index.tsx +167 -165
- package/apps/www/settings/labels/index.tsx +209 -207
- package/apps/www/settings/privacy/index.tsx +499 -495
- package/apps/www/settings/profile/index.tsx +256 -251
- package/apps/www/settings/read-receipts/index.tsx +155 -150
- package/apps/www/settings/sharing/index.tsx +259 -259
- package/apps/www/settings/signatures/[uid].tsx +175 -175
- package/apps/www/settings/signatures/index.tsx +91 -91
- package/apps/www/settings/signatures/new/index.tsx +138 -138
- package/apps/www/settings/signatures/signatureDefaults.ts +1 -1
- package/apps/www/tasks/index.tsx +659 -654
- package/dist/apps/admin/_layout.d.ts +1 -1
- package/dist/apps/admin/_layout.js +1 -1
- package/dist/apps/admin/audit-log/index.d.ts +1 -1
- package/dist/apps/admin/audit-log/index.js +4 -4
- package/dist/apps/admin/branding/index.js +3 -3
- package/dist/apps/admin/data-requests/index.js +8 -8
- package/dist/apps/admin/distribution-lists/[uid].js +3 -3
- package/dist/apps/admin/distribution-lists/index.js +4 -4
- package/dist/apps/admin/distribution-lists/new/index.js +5 -5
- package/dist/apps/admin/domains/[uid].js +6 -6
- package/dist/apps/admin/domains/index.js +4 -4
- package/dist/apps/admin/domains/new/index.js +5 -5
- package/dist/apps/admin/encryption-policy/index.js +1 -1
- package/dist/apps/admin/escrow-scopes/[uid].d.ts +1 -1
- package/dist/apps/admin/escrow-scopes/[uid].js +7 -7
- package/dist/apps/admin/escrow-scopes/index.js +4 -4
- package/dist/apps/admin/escrow-scopes/new/index.js +5 -5
- package/dist/apps/admin/index.js +6 -6
- package/dist/apps/admin/ingest-queue/index.js +4 -4
- package/dist/apps/admin/mailbox-policy/index.js +1 -1
- package/dist/apps/admin/mailboxes/[uid].js +5 -5
- package/dist/apps/admin/quarantine/index.js +5 -5
- package/dist/apps/admin/retention-policy/index.js +3 -3
- package/dist/apps/admin/signing-certificates/index.js +5 -5
- package/dist/apps/admin/transport-rules/[uid].js +5 -5
- package/dist/apps/admin/transport-rules/_transportRuleConfig.d.ts +1 -1
- package/dist/apps/admin/transport-rules/_transportRuleConfig.js +2 -2
- package/dist/apps/admin/transport-rules/index.js +4 -4
- package/dist/apps/admin/transport-rules/new/index.js +5 -5
- package/dist/apps/escrow/_layout.d.ts +1 -1
- package/dist/apps/escrow/audit-log/index.d.ts +1 -1
- package/dist/apps/escrow/audit-log/index.js +4 -4
- package/dist/apps/escrow/index.js +4 -4
- package/dist/apps/escrow/matters/[uid].js +10 -10
- package/dist/apps/escrow/matters/new/index.js +6 -6
- package/dist/apps/shared/appearance/AppearanceForm.js +3 -3
- package/dist/apps/shared/appearance/AppearanceHead.js +1 -1
- package/dist/apps/shared/appearance/AppearanceProvider.d.ts +1 -1
- package/dist/apps/shared/appearance/AppearanceProvider.js +3 -3
- package/dist/apps/shared/appearance/appearanceCache.d.ts +1 -1
- package/dist/apps/shared/appearance/appearanceCache.js +1 -1
- package/dist/apps/shared/appearance/appearanceContext.d.ts +1 -1
- package/dist/apps/shared/appearance/theme.d.ts +1 -1
- package/dist/apps/shared/auth/adminAccess.js +1 -1
- package/dist/apps/shared/calendar/bookingPlugin.js +1 -1
- package/dist/apps/shared/calendar/calendarLiveUpdates.d.ts +1 -1
- package/dist/apps/shared/calendar/calendarReminders.d.ts +1 -1
- package/dist/apps/shared/calendar/useCalendarReminders.js +1 -1
- package/dist/apps/shared/components/admin/diagnostics/DiagnosticsManager.js +1 -1
- package/dist/apps/shared/components/admin/diagnostics/InstalledPlugins.d.ts +1 -1
- package/dist/apps/shared/components/admin/diagnostics/InstalledPlugins.js +2 -2
- package/dist/apps/shared/components/admin/diagnostics/LogsPanel.js +2 -2
- package/dist/apps/shared/components/admin/diagnostics/PackagesTable.js +1 -1
- package/dist/apps/shared/components/admin/diagnostics/RuntimePanel.js +1 -1
- package/dist/apps/shared/components/admin/diagnostics/SystemPanel.js +2 -2
- package/dist/apps/shared/components/admin/diagnostics/VersionsPanel.js +1 -1
- package/dist/apps/shared/components/admin/diagnostics/diagnosticsApi.js +1 -1
- package/dist/apps/shared/components/admin/diagnostics/format.js +1 -1
- package/dist/apps/shared/components/admin/diagnostics/logClient.js +1 -1
- package/dist/apps/shared/components/admin/distributionLists/MemberListCard.d.ts +1 -1
- package/dist/apps/shared/components/admin/distributionLists/MemberListCard.js +4 -4
- package/dist/apps/shared/components/admin/elevation.js +1 -1
- package/dist/apps/shared/components/admin/escrowScopes/EscrowScopeKeyAndHoldersFields.js +3 -3
- package/dist/apps/shared/components/admin/layout/AdminShell.d.ts +1 -1
- package/dist/apps/shared/components/admin/layout/AdminShell.js +8 -8
- package/dist/apps/shared/components/admin/mailboxes/EraseLeftoverDataDialog.d.ts +1 -1
- package/dist/apps/shared/components/admin/mailboxes/EraseLeftoverDataDialog.js +6 -6
- package/dist/apps/shared/components/admin/mailboxes/EscrowScopeCard.d.ts +1 -1
- package/dist/apps/shared/components/admin/mailboxes/EscrowScopeCard.js +10 -8
- package/dist/apps/shared/components/admin/mailboxes/LeftoverMailboxesSection.js +4 -4
- package/dist/apps/shared/components/admin/mailboxes/MailboxTable.d.ts +1 -1
- package/dist/apps/shared/components/admin/mailboxes/ResourceSettingsCard.d.ts +1 -1
- package/dist/apps/shared/components/admin/mailboxes/ResourceSettingsCard.js +7 -5
- package/dist/apps/shared/components/admin/mailboxes/ShareAccessCard.js +5 -5
- package/dist/apps/shared/components/admin/settings/BrandingForm.d.ts +1 -1
- package/dist/apps/shared/components/admin/settings/BrandingForm.js +8 -8
- package/dist/apps/shared/components/admin/settings/DomainDnsSetup.d.ts +1 -1
- package/dist/apps/shared/components/admin/settings/DomainDnsSetup.js +5 -5
- package/dist/apps/shared/components/admin/settings/EncryptionPolicyForm.d.ts +1 -1
- package/dist/apps/shared/components/admin/settings/EncryptionPolicyForm.js +4 -4
- package/dist/apps/shared/components/admin/settings/LoadedSettingsForm.js +2 -2
- package/dist/apps/shared/components/admin/settings/MailboxCreateForm.d.ts +1 -1
- package/dist/apps/shared/components/admin/settings/MailboxCreateForm.js +14 -12
- package/dist/apps/shared/components/admin/settings/MailboxPolicyForm.d.ts +1 -1
- package/dist/apps/shared/components/admin/settings/MailboxPolicyForm.js +4 -4
- package/dist/apps/shared/components/admin/settings/PluginsManager.js +5 -5
- package/dist/apps/shared/components/admin/settings/RetentionPolicyForm.d.ts +1 -1
- package/dist/apps/shared/components/admin/settings/RetentionPolicyForm.js +5 -5
- package/dist/apps/shared/components/admin/setup/EscrowSetupStep.js +7 -7
- package/dist/apps/shared/components/admin/setup/SetupWizard.js +26 -22
- package/dist/apps/shared/components/admin/signOut.js +1 -1
- package/dist/apps/shared/components/admin/usePagedList.js +2 -2
- package/dist/apps/shared/components/calendar/AppointmentQuickForm.js +3 -3
- package/dist/apps/shared/components/calendar/CalendarListSidebar.d.ts +1 -1
- package/dist/apps/shared/components/calendar/CalendarListSidebar.js +2 -2
- package/dist/apps/shared/components/calendar/DescriptionEditor.js +1 -1
- package/dist/apps/shared/components/calendar/EventDescriptionView.js +1 -1
- package/dist/apps/shared/components/calendar/EventDetails.d.ts +2 -2
- package/dist/apps/shared/components/calendar/EventDetails.js +16 -14
- package/dist/apps/shared/components/calendar/EventEditor.d.ts +2 -2
- package/dist/apps/shared/components/calendar/EventEditor.js +22 -20
- package/dist/apps/shared/components/calendar/EventExpandedForm.js +2 -2
- package/dist/apps/shared/components/calendar/EventFormParts.d.ts +1 -1
- package/dist/apps/shared/components/calendar/EventFormParts.js +1 -1
- package/dist/apps/shared/components/calendar/EventModal.d.ts +2 -2
- package/dist/apps/shared/components/calendar/EventModal.js +3 -3
- package/dist/apps/shared/components/calendar/EventQuickForm.js +3 -3
- package/dist/apps/shared/components/calendar/EventShell.js +1 -1
- package/dist/apps/shared/components/calendar/FindATime.js +6 -4
- package/dist/apps/shared/components/calendar/GuestInput.d.ts +2 -2
- package/dist/apps/shared/components/calendar/MonthView.d.ts +1 -1
- package/dist/apps/shared/components/calendar/MonthView.js +1 -1
- package/dist/apps/shared/components/calendar/QuickCreateFaces.js +1 -1
- package/dist/apps/shared/components/calendar/QuickFaceFrame.js +1 -1
- package/dist/apps/shared/components/calendar/RecurrenceEditor.d.ts +1 -1
- package/dist/apps/shared/components/calendar/RecurrenceEditor.js +1 -1
- package/dist/apps/shared/components/calendar/RequestChangeForm.js +8 -6
- package/dist/apps/shared/components/calendar/ResourcePicker.d.ts +1 -1
- package/dist/apps/shared/components/calendar/ResourcePicker.js +7 -5
- package/dist/apps/shared/components/calendar/SplitDayView.d.ts +1 -1
- package/dist/apps/shared/components/calendar/TaskQuickForm.d.ts +1 -1
- package/dist/apps/shared/components/calendar/TaskQuickForm.js +9 -7
- package/dist/apps/shared/components/calendar/TimeGridView.d.ts +1 -1
- package/dist/apps/shared/components/calendar/TimeGridView.js +1 -1
- package/dist/apps/shared/components/calendar/allDay.d.ts +2 -2
- package/dist/apps/shared/components/calendar/allDay.js +1 -1
- package/dist/apps/shared/components/calendar/eventDialogFields.d.ts +2 -2
- package/dist/apps/shared/components/calendar/eventDialogFields.js +2 -2
- package/dist/apps/shared/components/calendar/eventForm.d.ts +3 -3
- package/dist/apps/shared/components/calendar/eventFormat.d.ts +1 -1
- package/dist/apps/shared/components/calendar/eventFormat.js +2 -2
- package/dist/apps/shared/components/calendar/findTimeGrid.d.ts +1 -1
- package/dist/apps/shared/components/calendar/findTimeGrid.js +1 -1
- package/dist/apps/shared/components/calendar/layout/CalendarShell.d.ts +1 -1
- package/dist/apps/shared/components/calendar/layout/CalendarShell.js +11 -9
- package/dist/apps/shared/components/contacts/ContactDetailPane.d.ts +1 -1
- package/dist/apps/shared/components/contacts/ContactDetailPane.js +2 -2
- package/dist/apps/shared/components/contacts/ContactForm.d.ts +2 -2
- package/dist/apps/shared/components/contacts/ContactForm.js +12 -8
- package/dist/apps/shared/components/contacts/ContactsSidebar.d.ts +1 -1
- package/dist/apps/shared/components/contacts/ContactsSidebar.js +7 -5
- package/dist/apps/shared/components/contacts/KeyChangeReview.d.ts +1 -1
- package/dist/apps/shared/components/contacts/KeyChangeReview.js +5 -5
- package/dist/apps/shared/components/contacts/contactKeys.d.ts +2 -2
- package/dist/apps/shared/components/contacts/contactKeys.js +2 -2
- package/dist/apps/shared/components/contacts/layout/ContactsShell.d.ts +1 -1
- package/dist/apps/shared/components/contacts/layout/ContactsShell.js +9 -7
- package/dist/apps/shared/components/escrow/layout/EscrowShell.js +7 -7
- package/dist/apps/shared/components/forms/StringListField.js +1 -1
- package/dist/apps/shared/components/layout/AppShell.d.ts +2 -2
- package/dist/apps/shared/components/layout/AppShell.js +14 -10
- package/dist/apps/shared/components/layout/BrandingChrome.d.ts +1 -1
- package/dist/apps/shared/components/layout/KeyEnrollmentGate.d.ts +1 -1
- package/dist/apps/shared/components/layout/KeyEnrollmentGate.js +9 -9
- package/dist/apps/shared/components/layout/MailboxProvisioning.js +8 -6
- package/dist/apps/shared/components/layout/RecoveryCodeUnlock.d.ts +1 -1
- package/dist/apps/shared/components/layout/RecoveryCodeUnlock.js +9 -9
- package/dist/apps/shared/components/layout/UnlockPromptProvider.d.ts +2 -2
- package/dist/apps/shared/components/layout/UnlockPromptProvider.js +5 -5
- package/dist/apps/shared/components/layout/UserMenu.js +6 -4
- package/dist/apps/shared/components/mail/ConversationList.d.ts +2 -2
- package/dist/apps/shared/components/mail/ConversationList.js +6 -4
- package/dist/apps/shared/components/mail/ConversationThreadPane.d.ts +3 -3
- package/dist/apps/shared/components/mail/ConversationThreadPane.js +13 -11
- package/dist/apps/shared/components/mail/InviteCard.js +10 -8
- package/dist/apps/shared/components/mail/LazyReadingPane.js +2 -2
- package/dist/apps/shared/components/mail/MailAddress.d.ts +1 -1
- package/dist/apps/shared/components/mail/MailAddress.js +1 -1
- package/dist/apps/shared/components/mail/MailListToolbar.d.ts +2 -2
- package/dist/apps/shared/components/mail/MailSelectionBar.d.ts +2 -2
- package/dist/apps/shared/components/mail/MenuButton.js +1 -1
- package/dist/apps/shared/components/mail/MessageDetailPane.d.ts +3 -3
- package/dist/apps/shared/components/mail/MessageDetailPane.js +30 -28
- package/dist/apps/shared/components/mail/MoveToFolderDialog.d.ts +1 -1
- package/dist/apps/shared/components/mail/MoveToFolderDialog.js +8 -6
- package/dist/apps/shared/components/mail/OutboxRowStatus.d.ts +1 -1
- package/dist/apps/shared/components/mail/PermanentDeleteDialog.js +2 -2
- package/dist/apps/shared/components/mail/compose/ComposeContext.d.ts +10 -1
- package/dist/apps/shared/components/mail/compose/ComposeContext.js +4 -2
- package/dist/apps/shared/components/mail/compose/ComposeWindow.d.ts +7 -1
- package/dist/apps/shared/components/mail/compose/ComposeWindow.js +54 -31
- package/dist/apps/shared/components/mail/compose/ComposeWindowPlaceholder.js +4 -4
- package/dist/apps/shared/components/mail/compose/EmojiPicker.js +2 -2
- package/dist/apps/shared/components/mail/compose/GifPicker.js +3 -3
- package/dist/apps/shared/components/mail/compose/RecipientInput.d.ts +1 -1
- package/dist/apps/shared/components/mail/compose/RecipientInput.js +1 -1
- package/dist/apps/shared/components/mail/compose/ScheduleSendPicker.js +1 -1
- package/dist/apps/shared/components/mail/compose/encryptionRequirement.d.ts +2 -2
- package/dist/apps/shared/components/mail/compose/encryptionRequirement.js +1 -1
- package/dist/apps/shared/components/mail/compose/quotedBody.d.ts +3 -3
- package/dist/apps/shared/components/mail/compose/quotedBody.js +3 -3
- package/dist/apps/shared/components/mail/compose/recipients.d.ts +1 -1
- package/dist/apps/shared/components/mail/invite/InviteRowChip.d.ts +1 -1
- package/dist/apps/shared/components/mail/invite/InviteRsvpPopover.d.ts +1 -1
- package/dist/apps/shared/components/mail/invite/InviteRsvpPopover.js +9 -7
- package/dist/apps/shared/components/mail/invite/InviteTimeline.d.ts +1 -1
- package/dist/apps/shared/components/mail/invite/ProposeTimeForm.d.ts +1 -1
- package/dist/apps/shared/components/mail/invite/ProposeTimeForm.js +1 -1
- package/dist/apps/shared/components/mail/invite/inviteFormat.d.ts +2 -2
- package/dist/apps/shared/components/mail/invite/inviteStore.d.ts +9 -3
- package/dist/apps/shared/components/mail/invite/inviteStore.js +13 -6
- package/dist/apps/shared/components/mail/labelMenu.d.ts +1 -1
- package/dist/apps/shared/components/mail/labelMenu.js +9 -7
- package/dist/apps/shared/components/mail/layout/MailShell.d.ts +1 -1
- package/dist/apps/shared/components/mail/layout/MailShell.js +3 -3
- package/dist/apps/shared/components/mail/listPreferences.d.ts +2 -2
- package/dist/apps/shared/components/mail/listPreferences.js +1 -1
- package/dist/apps/shared/components/mail/pinnedSigners.d.ts +12 -5
- package/dist/apps/shared/components/mail/pinnedSigners.js +37 -18
- package/dist/apps/shared/components/mail/reading/EncryptedBody.js +2 -2
- package/dist/apps/shared/components/mail/reading/MessageBody.d.ts +2 -2
- package/dist/apps/shared/components/mail/reading/MessageBody.js +4 -4
- package/dist/apps/shared/components/mail/reading/MessageCard.d.ts +1 -1
- package/dist/apps/shared/components/mail/reading/MessageCard.js +2 -2
- package/dist/apps/shared/components/mail/reading/MessageSourceDialog.js +3 -3
- package/dist/apps/shared/components/mail/reading/PendingMessageCard.js +1 -1
- package/dist/apps/shared/components/mail/reading/bodyContent.d.ts +2 -2
- package/dist/apps/shared/components/mail/reading/bodyContent.js +2 -2
- package/dist/apps/shared/components/mail/reading/bodyHtml.js +1 -1
- package/dist/apps/shared/components/mail/reading/messageExport.js +1 -1
- package/dist/apps/shared/components/mail/reading/printMessage.d.ts +2 -2
- package/dist/apps/shared/components/mail/reading/printMessage.js +11 -11
- package/dist/apps/shared/components/mail/reading/useMessageActions.d.ts +1 -1
- package/dist/apps/shared/components/mail/reading/useMessageActions.js +18 -16
- package/dist/apps/shared/components/mail/unreadStyle.d.ts +1 -1
- package/dist/apps/shared/components/mail/verificationSeals.d.ts +27 -6
- package/dist/apps/shared/components/mail/verificationSeals.js +15 -11
- package/dist/apps/shared/components/mail/writableMailboxes.d.ts +8 -3
- package/dist/apps/shared/components/mail/writableMailboxes.js +12 -6
- package/dist/apps/shared/components/rules/RuleBuilder.js +1 -1
- package/dist/apps/shared/components/settings/SigningCertificateCard.d.ts +1 -1
- package/dist/apps/shared/components/settings/SigningCertificateCard.js +3 -3
- package/dist/apps/shared/components/settings/layout/SettingsShell.d.ts +1 -1
- package/dist/apps/shared/components/settings/layout/SettingsShell.js +8 -6
- package/dist/apps/shared/components/sharing/PrincipalListField.d.ts +1 -1
- package/dist/apps/shared/components/sharing/PrincipalPicker.d.ts +1 -1
- package/dist/apps/shared/components/sharing/PrincipalPicker.js +1 -1
- package/dist/apps/shared/components/sharing/PrincipalResolver.d.ts +1 -1
- package/dist/apps/shared/components/sharing/PrincipalResolver.js +3 -3
- package/dist/apps/shared/components/tasks/TasksSidebar.d.ts +1 -1
- package/dist/apps/shared/components/tasks/TasksSidebar.js +7 -5
- package/dist/apps/shared/components/tasks/layout/TasksShell.d.ts +1 -1
- package/dist/apps/shared/components/tasks/layout/TasksShell.js +9 -7
- package/dist/apps/shared/keyboard/ShortcutsDialog.js +1 -1
- package/dist/apps/shared/mail/findWellKnownFolderUid.d.ts +5 -3
- package/dist/apps/shared/mail/findWellKnownFolderUid.js +5 -4
- package/dist/apps/shared/mail/folderCounts.d.ts +1 -1
- package/dist/apps/shared/mail/folderCounts.js +6 -4
- package/dist/apps/shared/mail/folderOfType.d.ts +3 -2
- package/dist/apps/shared/mail/folderOfType.js +4 -4
- package/dist/apps/shared/mail/folderTree.d.ts +1 -1
- package/dist/apps/shared/mail/listSnapshots.d.ts +2 -2
- package/dist/apps/shared/mail/messageReadState.d.ts +4 -3
- package/dist/apps/shared/mail/messageReadState.js +5 -5
- package/dist/apps/shared/mail/newMailNotifications.d.ts +1 -1
- package/dist/apps/shared/mail/newMailNotifications.js +1 -1
- package/dist/apps/shared/mail/outbox/composeBridge.d.ts +2 -2
- package/dist/apps/shared/mail/outbox/outboxState.d.ts +1 -1
- package/dist/apps/shared/mail/outbox/outgoingReplies.d.ts +2 -2
- package/dist/apps/shared/mail/outbox/sendDecision.d.ts +2 -2
- package/dist/apps/shared/mail/outbox/sendDecision.js +1 -1
- package/dist/apps/shared/mail/outbox/sendJob.d.ts +10 -6
- package/dist/apps/shared/mail/outbox/sendJob.js +39 -35
- package/dist/apps/shared/mail/outbox/sendOutcomes.d.ts +6 -3
- package/dist/apps/shared/mail/outbox/sendOutcomes.js +19 -15
- package/dist/apps/shared/mail/outbox/useOutboxStatus.js +5 -3
- package/dist/apps/shared/mail/permanentDelete.d.ts +4 -3
- package/dist/apps/shared/mail/permanentDelete.js +8 -8
- package/dist/apps/shared/mail/primaryMailbox.d.ts +1 -1
- package/dist/apps/shared/mail/primaryMailbox.js +1 -1
- package/dist/apps/shared/mail/reportNotices.d.ts +1 -1
- package/dist/apps/shared/mail/senderBlocking.d.ts +5 -4
- package/dist/apps/shared/mail/senderBlocking.js +19 -16
- package/dist/apps/shared/mail/useMailConnection.d.ts +1 -1
- package/dist/apps/shared/mail/useMailConnection.js +12 -10
- package/dist/apps/shared/mail/useMailLiveUpdates.d.ts +2 -2
- package/dist/apps/shared/mail/useMailLiveUpdates.js +2 -2
- package/dist/apps/shared/mail/useMailboxUpdateAccess.d.ts +3 -2
- package/dist/apps/shared/mail/useMailboxUpdateAccess.js +31 -10
- package/dist/apps/shared/mail/useMarkMessageRead.d.ts +1 -1
- package/dist/apps/shared/mail/useMarkMessageRead.js +5 -3
- package/dist/apps/shared/mail/useNewMailNotifications.d.ts +1 -1
- package/dist/apps/shared/mail/usePermanentDelete.d.ts +1 -1
- package/dist/apps/shared/mail/usePermanentDelete.js +4 -2
- package/dist/apps/shared/navigation/pageTitle.d.ts +1 -1
- package/dist/apps/shared/notifications/NotificationCenter.js +1 -1
- package/dist/apps/shared/notifications/NotificationHistoryDialog.js +2 -2
- package/dist/apps/shared/notifications/apiErrors.js +2 -2
- package/dist/apps/shared/notifications/pushStatus.js +1 -1
- package/dist/apps/shared/notifications/systemErrors.js +1 -1
- package/dist/apps/shared/search/LocalIndexLifecycle.d.ts +2 -2
- package/dist/apps/shared/search/LocalIndexLifecycle.js +15 -10
- package/dist/apps/shared/search/crossMailboxSearch.d.ts +1 -1
- package/dist/apps/shared/search/crossMailboxSearch.js +2 -2
- package/dist/apps/shared/search/localIndexBuilder.d.ts +4 -3
- package/dist/apps/shared/search/localIndexBuilder.js +15 -12
- package/dist/apps/shared/search/localIndexKey.js +1 -1
- package/dist/apps/shared/search/localIndexRpcClient.d.ts +43 -31
- package/dist/apps/shared/search/localIndexRpcClient.js +113 -20
- package/dist/apps/shared/search/localIndexTransport.d.ts +77 -0
- package/dist/apps/shared/search/localIndexTransport.js +1 -0
- package/dist/apps/shared/search/localIndexWorker.d.ts +1 -1
- package/dist/apps/shared/search/searchTier2.d.ts +3 -3
- package/dist/apps/shared/signing/enrollmentTracker.d.ts +1 -1
- package/dist/apps/shared/signing/enrollmentTracker.js +3 -3
- package/dist/apps/shared/signing/enrollmentView.d.ts +1 -1
- package/dist/apps/shared/signing/signingInfo.d.ts +1 -1
- package/dist/apps/shared/signing/signingInfo.js +1 -1
- package/dist/apps/shared/signing/useSigningEnrollmentWatcher.d.ts +1 -1
- package/dist/apps/shared/signing/useSigningEnrollmentWatcher.js +5 -3
- package/dist/apps/shared/styles/app.css +387 -396
- package/dist/apps/www/_layout.d.ts +1 -1
- package/dist/apps/www/_layout.js +1 -1
- package/dist/apps/www/calendar/index.d.ts +1 -1
- package/dist/apps/www/calendar/index.js +20 -18
- package/dist/apps/www/contacts/[uid].d.ts +1 -1
- package/dist/apps/www/contacts/[uid].js +8 -6
- package/dist/apps/www/contacts/index.d.ts +1 -1
- package/dist/apps/www/contacts/index.js +19 -17
- package/dist/apps/www/index.d.ts +1 -1
- package/dist/apps/www/index.js +54 -50
- package/dist/apps/www/messages/[uid].d.ts +1 -1
- package/dist/apps/www/messages/[uid].js +11 -9
- package/dist/apps/www/settings/appearance/index.d.ts +1 -1
- package/dist/apps/www/settings/auto-reply/index.d.ts +1 -1
- package/dist/apps/www/settings/auto-reply/index.js +6 -4
- package/dist/apps/www/settings/blocked-senders/index.d.ts +1 -1
- package/dist/apps/www/settings/blocked-senders/index.js +6 -4
- package/dist/apps/www/settings/encryption/index.d.ts +1 -1
- package/dist/apps/www/settings/encryption/index.js +31 -29
- package/dist/apps/www/settings/filters/[uid].d.ts +1 -1
- package/dist/apps/www/settings/filters/[uid].js +11 -9
- package/dist/apps/www/settings/filters/_mailFilterRuleConfig.d.ts +2 -2
- package/dist/apps/www/settings/filters/index.d.ts +1 -1
- package/dist/apps/www/settings/filters/index.js +4 -4
- package/dist/apps/www/settings/filters/new/index.d.ts +1 -1
- package/dist/apps/www/settings/filters/new/index.js +10 -8
- package/dist/apps/www/settings/labels/index.d.ts +1 -1
- package/dist/apps/www/settings/labels/index.js +12 -10
- package/dist/apps/www/settings/privacy/index.d.ts +1 -1
- package/dist/apps/www/settings/privacy/index.js +18 -14
- package/dist/apps/www/settings/profile/index.d.ts +1 -1
- package/dist/apps/www/settings/profile/index.js +7 -5
- package/dist/apps/www/settings/read-receipts/index.d.ts +1 -1
- package/dist/apps/www/settings/read-receipts/index.js +5 -3
- package/dist/apps/www/settings/sharing/index.d.ts +1 -1
- package/dist/apps/www/settings/sharing/index.js +6 -6
- package/dist/apps/www/settings/signatures/[uid].d.ts +1 -1
- package/dist/apps/www/settings/signatures/[uid].js +5 -5
- package/dist/apps/www/settings/signatures/index.d.ts +1 -1
- package/dist/apps/www/settings/signatures/index.js +4 -4
- package/dist/apps/www/settings/signatures/new/index.d.ts +1 -1
- package/dist/apps/www/settings/signatures/new/index.js +4 -4
- package/dist/apps/www/settings/signatures/signatureDefaults.d.ts +1 -1
- package/dist/apps/www/settings/signatures/signatureDefaults.js +1 -1
- package/dist/apps/www/tasks/index.d.ts +1 -1
- package/dist/apps/www/tasks/index.js +17 -15
- package/dist/lib/admin/auditLogApi.d.ts +32 -0
- package/dist/lib/admin/auditLogApi.js +27 -0
- package/dist/lib/admin/distributionListsApi.d.ts +47 -0
- package/dist/lib/admin/distributionListsApi.js +34 -0
- package/dist/lib/admin/domainsApi.d.ts +75 -0
- package/dist/lib/admin/domainsApi.js +44 -0
- package/dist/lib/admin/escrowAccessRequestsApi.d.ts +79 -0
- package/dist/lib/admin/escrowAccessRequestsApi.js +46 -0
- package/dist/lib/admin/escrowAuditLogApi.d.ts +66 -0
- package/dist/lib/admin/escrowAuditLogApi.js +31 -0
- package/dist/lib/admin/escrowScopesApi.d.ts +78 -0
- package/dist/lib/admin/escrowScopesApi.js +50 -0
- package/dist/lib/admin/leftoverMailboxApi.d.ts +73 -0
- package/dist/lib/admin/leftoverMailboxApi.js +67 -0
- package/dist/lib/admin/mailboxPolicyApi.d.ts +27 -0
- package/dist/lib/admin/mailboxPolicyApi.js +21 -0
- package/dist/lib/admin/matterExportApi.d.ts +40 -0
- package/dist/lib/admin/matterExportApi.js +39 -0
- package/dist/lib/admin/matterSearchApi.d.ts +20 -0
- package/dist/lib/admin/matterSearchApi.js +27 -0
- package/dist/lib/admin/mattersApi.d.ts +56 -0
- package/dist/lib/admin/mattersApi.js +40 -0
- package/dist/lib/admin/pluginsApi.d.ts +265 -0
- package/dist/lib/admin/pluginsApi.js +102 -0
- package/dist/lib/admin/retentionPolicyApi.d.ts +32 -0
- package/dist/lib/admin/retentionPolicyApi.js +29 -0
- package/dist/lib/admin/setupApi.d.ts +23 -0
- package/dist/lib/admin/setupApi.js +26 -0
- package/dist/lib/admin/transportRulesApi.d.ts +66 -0
- package/dist/lib/admin/transportRulesApi.js +43 -0
- package/dist/lib/appearance/preferencesApi.d.ts +128 -0
- package/dist/lib/appearance/preferencesApi.js +257 -0
- package/dist/lib/auth/profileApi.d.ts +33 -0
- package/dist/lib/auth/profileApi.js +52 -0
- package/dist/lib/auth/session.d.ts +70 -0
- package/dist/lib/auth/session.js +210 -0
- package/dist/lib/branding/brandingApi.d.ts +47 -0
- package/dist/lib/branding/brandingApi.js +61 -0
- package/dist/lib/branding/useBranding.d.ts +23 -0
- package/dist/lib/branding/useBranding.js +65 -0
- package/dist/lib/calendar/calendarApi.d.ts +230 -0
- package/dist/lib/calendar/calendarApi.js +106 -0
- package/dist/lib/calendar/calendarColors.d.ts +18 -0
- package/dist/lib/calendar/calendarColors.js +39 -0
- package/dist/lib/calendar/calendarDragIds.d.ts +42 -0
- package/dist/lib/calendar/calendarDragIds.js +92 -0
- package/dist/lib/calendar/calendarMutations.d.ts +68 -0
- package/dist/lib/calendar/calendarMutations.js +190 -0
- package/dist/lib/calendar/eventDescription.d.ts +43 -0
- package/dist/lib/calendar/eventDescription.js +195 -0
- package/dist/lib/calendar/freeBusyApi.d.ts +100 -0
- package/dist/lib/calendar/freeBusyApi.js +119 -0
- package/dist/lib/calendar/inviteApi.d.ts +121 -0
- package/dist/lib/calendar/inviteApi.js +54 -0
- package/dist/lib/calendar/recurrence.d.ts +60 -0
- package/dist/lib/calendar/recurrence.js +225 -0
- package/dist/lib/components/avatar/ContactAvatar.d.ts +8 -0
- package/dist/lib/components/avatar/ContactAvatar.js +26 -0
- package/dist/lib/components/buttons/Button.d.ts +9 -0
- package/dist/lib/components/buttons/Button.js +14 -0
- package/dist/lib/components/buttons/CopyButton.d.ts +18 -0
- package/dist/lib/components/buttons/CopyButton.js +14 -0
- package/dist/lib/components/feedback/Alert.d.ts +4 -0
- package/dist/lib/components/feedback/Alert.js +4 -0
- package/dist/lib/components/feedback/Skeleton.d.ts +21 -0
- package/dist/lib/components/feedback/Skeleton.js +14 -0
- package/dist/lib/components/forms/FormField.d.ts +8 -0
- package/dist/lib/components/forms/FormField.js +5 -0
- package/dist/lib/components/navigation/BottomTabBar.d.ts +27 -0
- package/dist/lib/components/navigation/BottomTabBar.js +32 -0
- package/dist/lib/components/overlays/Drawer.d.ts +20 -0
- package/dist/lib/components/overlays/Drawer.js +27 -0
- package/dist/lib/components/overlays/Modal.d.ts +17 -0
- package/dist/lib/components/overlays/Modal.js +25 -0
- package/dist/lib/components/overlays/PopoverPortal.d.ts +23 -0
- package/dist/lib/components/overlays/PopoverPortal.js +53 -0
- package/dist/lib/components/overlays/overlayStack.d.ts +31 -0
- package/dist/lib/components/overlays/overlayStack.js +143 -0
- package/dist/lib/components/pickers/MiniDatePicker.d.ts +13 -0
- package/dist/lib/components/pickers/MiniDatePicker.js +42 -0
- package/dist/lib/contacts/contactsApi.d.ts +174 -0
- package/dist/lib/contacts/contactsApi.js +139 -0
- package/dist/lib/contacts/vcard.d.ts +23 -0
- package/dist/lib/contacts/vcard.js +179 -0
- package/dist/lib/crypto/composeSecurity.d.ts +67 -0
- package/dist/lib/crypto/composeSecurity.js +93 -0
- package/dist/lib/crypto/encoding.d.ts +9 -0
- package/dist/lib/crypto/encoding.js +32 -0
- package/dist/lib/crypto/escrowKeys.d.ts +25 -0
- package/dist/lib/crypto/escrowKeys.js +59 -0
- package/dist/lib/crypto/idleTimeout.d.ts +16 -0
- package/dist/lib/crypto/idleTimeout.js +47 -0
- package/dist/lib/crypto/keySession.d.ts +159 -0
- package/dist/lib/crypto/keySession.js +367 -0
- package/dist/lib/crypto/keys.d.ts +50 -0
- package/dist/lib/crypto/keys.js +89 -0
- package/dist/lib/crypto/keyvaultApi.d.ts +394 -0
- package/dist/lib/crypto/keyvaultApi.js +350 -0
- package/dist/lib/crypto/masterKey.d.ts +59 -0
- package/dist/lib/crypto/masterKey.js +104 -0
- package/dist/lib/crypto/masterKeyWraps.d.ts +108 -0
- package/dist/lib/crypto/masterKeyWraps.js +228 -0
- package/dist/lib/crypto/messageSecurity.d.ts +248 -0
- package/dist/lib/crypto/messageSecurity.js +367 -0
- package/dist/lib/crypto/mime.d.ts +143 -0
- package/dist/lib/crypto/mime.js +504 -0
- package/dist/lib/crypto/passkeyUnlock.d.ts +20 -0
- package/dist/lib/crypto/passkeyUnlock.js +79 -0
- package/dist/lib/crypto/passwordUnlock.d.ts +39 -0
- package/dist/lib/crypto/passwordUnlock.js +73 -0
- package/dist/lib/crypto/recoveryCode.d.ts +28 -0
- package/dist/lib/crypto/recoveryCode.js +86 -0
- package/dist/lib/crypto/signingProviderApi.d.ts +95 -0
- package/dist/lib/crypto/signingProviderApi.js +60 -0
- package/dist/lib/crypto/smime.d.ts +128 -0
- package/dist/lib/crypto/smime.js +402 -0
- package/dist/lib/crypto/smimeMessage.d.ts +132 -0
- package/dist/lib/crypto/smimeMessage.js +341 -0
- package/dist/lib/crypto/useIdleKeyTimeout.d.ts +10 -0
- package/dist/lib/crypto/useIdleKeyTimeout.js +163 -0
- package/dist/lib/crypto/verificationSeal.d.ts +56 -0
- package/dist/lib/crypto/verificationSeal.js +220 -0
- package/dist/lib/mail/compose/composeQuoting.d.ts +88 -0
- package/dist/lib/mail/compose/composeQuoting.js +204 -0
- package/dist/lib/mail/compose/emojiData.d.ts +9 -0
- package/dist/lib/mail/compose/emojiData.js +18 -0
- package/dist/lib/mail/compose/giphyApi.d.ts +17 -0
- package/dist/lib/mail/compose/giphyApi.js +20 -0
- package/dist/lib/mail/conversationsApi.d.ts +80 -0
- package/dist/lib/mail/conversationsApi.js +44 -0
- package/dist/lib/mail/dataExportApi.d.ts +50 -0
- package/dist/lib/mail/dataExportApi.js +40 -0
- package/dist/lib/mail/directoryApi.d.ts +49 -0
- package/dist/lib/mail/directoryApi.js +101 -0
- package/dist/lib/mail/erasureRequestApi.d.ts +45 -0
- package/dist/lib/mail/erasureRequestApi.js +43 -0
- package/dist/lib/mail/flaggedMessages.d.ts +22 -0
- package/dist/lib/mail/flaggedMessages.js +73 -0
- package/dist/lib/mail/focusedInboxOverridesApi.d.ts +37 -0
- package/dist/lib/mail/focusedInboxOverridesApi.js +34 -0
- package/dist/lib/mail/labelsApi.d.ts +47 -0
- package/dist/lib/mail/labelsApi.js +38 -0
- package/dist/lib/mail/mailAddress.d.ts +27 -0
- package/dist/lib/mail/mailAddress.js +54 -0
- package/dist/lib/mail/mailApi.d.ts +850 -0
- package/dist/lib/mail/mailApi.js +602 -0
- package/dist/lib/mail/mailDetailHooks.d.ts +10 -0
- package/dist/lib/mail/mailDetailHooks.js +53 -0
- package/dist/lib/mail/mailFilterRulesApi.d.ts +76 -0
- package/dist/lib/mail/mailFilterRulesApi.js +45 -0
- package/dist/lib/mail/mailSignaturesApi.d.ts +49 -0
- package/dist/lib/mail/mailSignaturesApi.js +42 -0
- package/dist/lib/mail/mailboxAccessApi.d.ts +74 -0
- package/dist/lib/mail/mailboxAccessApi.js +56 -0
- package/dist/lib/mail/mailboxImportApi.d.ts +53 -0
- package/dist/lib/mail/mailboxImportApi.js +51 -0
- package/dist/lib/mail/messageBodySanitizer.d.ts +16 -0
- package/dist/lib/mail/messageBodySanitizer.js +118 -0
- package/dist/lib/mail/pushClient.d.ts +106 -0
- package/dist/lib/mail/pushClient.js +317 -0
- package/dist/lib/mail/sendEvents.d.ts +33 -0
- package/dist/lib/mail/sendEvents.js +44 -0
- package/dist/lib/mail/sendFailure.d.ts +16 -0
- package/dist/lib/mail/sendFailure.js +86 -0
- package/dist/lib/mail/senderListsApi.d.ts +69 -0
- package/dist/lib/mail/senderListsApi.js +126 -0
- package/dist/lib/search/queryGrammar.d.ts +51 -0
- package/dist/lib/search/queryGrammar.js +111 -0
- package/dist/lib/search/searchApi.d.ts +100 -0
- package/dist/lib/search/searchApi.js +107 -0
- package/dist/lib/search/searchScoring.d.ts +34 -0
- package/dist/lib/search/searchScoring.js +44 -0
- package/dist/lib/search/searchTier3.d.ts +64 -0
- package/dist/lib/search/searchTier3.js +335 -0
- package/dist/lib/tasks/tasksApi.d.ts +85 -0
- package/dist/lib/tasks/tasksApi.js +55 -0
- package/dist/lib/util/api.d.ts +160 -0
- package/dist/lib/util/api.js +251 -0
- package/dist/lib/util/apiClientContext.d.ts +7 -0
- package/dist/lib/util/apiClientContext.js +32 -0
- package/dist/lib/util/apiQuery.d.ts +32 -0
- package/dist/lib/util/apiQuery.js +42 -0
- package/dist/lib/util/clipboard.d.ts +7 -0
- package/dist/lib/util/clipboard.js +56 -0
- package/dist/lib/util/dateInput.d.ts +6 -0
- package/dist/lib/util/dateInput.js +14 -0
- package/dist/lib/util/timeZone.d.ts +12 -0
- package/dist/lib/util/timeZone.js +32 -0
- package/dist/lib/util/useCopyToClipboard.d.ts +12 -0
- package/dist/lib/util/useCopyToClipboard.js +34 -0
- package/dist/lib/util/useIsMobile.d.ts +10 -0
- package/dist/lib/util/useIsMobile.js +29 -0
- package/dist/lib/videoconf/videoMeetingsApi.d.ts +116 -0
- package/dist/lib/videoconf/videoMeetingsApi.js +49 -0
- package/lib/admin/auditLogApi.ts +48 -0
- package/lib/admin/distributionListsApi.ts +77 -0
- package/lib/admin/domainsApi.ts +113 -0
- package/lib/admin/escrowAccessRequestsApi.ts +110 -0
- package/lib/admin/escrowAuditLogApi.ts +101 -0
- package/lib/admin/escrowScopesApi.ts +112 -0
- package/lib/admin/leftoverMailboxApi.ts +120 -0
- package/lib/admin/mailboxPolicyApi.ts +38 -0
- package/lib/admin/matterExportApi.ts +62 -0
- package/lib/admin/matterSearchApi.ts +35 -0
- package/lib/admin/mattersApi.ts +86 -0
- package/lib/admin/pluginsApi.ts +339 -0
- package/lib/admin/retentionPolicyApi.ts +46 -0
- package/lib/admin/setupApi.ts +40 -0
- package/lib/admin/transportRulesApi.ts +106 -0
- package/lib/appearance/preferencesApi.ts +335 -0
- package/lib/auth/profileApi.ts +77 -0
- package/lib/auth/session.ts +238 -0
- package/lib/branding/brandingApi.ts +97 -0
- package/lib/branding/useBranding.ts +81 -0
- package/lib/calendar/calendarApi.ts +309 -0
- package/lib/calendar/calendarColors.ts +45 -0
- package/lib/calendar/calendarDragIds.ts +112 -0
- package/lib/calendar/calendarMutations.ts +236 -0
- package/lib/calendar/eventDescription.ts +211 -0
- package/lib/calendar/freeBusyApi.ts +197 -0
- package/lib/calendar/inviteApi.ts +154 -0
- package/lib/calendar/recurrence.ts +285 -0
- package/lib/components/avatar/ContactAvatar.tsx +47 -0
- package/lib/components/buttons/Button.tsx +40 -0
- package/lib/components/buttons/CopyButton.tsx +45 -0
- package/lib/components/feedback/Alert.tsx +13 -0
- package/lib/components/feedback/Skeleton.tsx +38 -0
- package/lib/components/forms/FormField.tsx +23 -0
- package/lib/components/navigation/BottomTabBar.tsx +66 -0
- package/lib/components/overlays/Drawer.tsx +72 -0
- package/lib/components/overlays/Modal.tsx +64 -0
- package/lib/components/overlays/PopoverPortal.tsx +74 -0
- package/lib/components/overlays/overlayStack.ts +165 -0
- package/lib/components/pickers/MiniDatePicker.tsx +90 -0
- package/lib/contacts/contactsApi.ts +289 -0
- package/lib/contacts/vcard.ts +197 -0
- package/lib/crypto/composeSecurity.ts +140 -0
- package/lib/crypto/encoding.ts +36 -0
- package/lib/crypto/escrowKeys.ts +74 -0
- package/lib/crypto/idleTimeout.ts +49 -0
- package/lib/crypto/keySession.ts +483 -0
- package/lib/crypto/keys.ts +105 -0
- package/lib/crypto/keyvaultApi.ts +674 -0
- package/lib/crypto/masterKey.ts +134 -0
- package/lib/crypto/masterKeyWraps.ts +269 -0
- package/lib/crypto/messageSecurity.ts +600 -0
- package/lib/crypto/mime.ts +568 -0
- package/lib/crypto/passkeyUnlock.ts +103 -0
- package/lib/crypto/passwordUnlock.ts +98 -0
- package/lib/crypto/recoveryCode.ts +93 -0
- package/lib/crypto/signingProviderApi.ts +135 -0
- package/lib/crypto/smime.ts +459 -0
- package/lib/crypto/smimeMessage.ts +491 -0
- package/lib/crypto/useIdleKeyTimeout.ts +176 -0
- package/lib/crypto/verificationSeal.ts +288 -0
- package/lib/mail/compose/composeQuoting.ts +243 -0
- package/lib/mail/compose/emojiData.ts +34 -0
- package/lib/mail/compose/giphyApi.ts +31 -0
- package/lib/mail/conversationsApi.ts +123 -0
- package/lib/mail/dataExportApi.ts +73 -0
- package/lib/mail/directoryApi.ts +161 -0
- package/lib/mail/erasureRequestApi.ts +71 -0
- package/lib/mail/flaggedMessages.ts +80 -0
- package/lib/mail/focusedInboxOverridesApi.ts +64 -0
- package/lib/mail/labelsApi.ts +71 -0
- package/lib/mail/mailAddress.ts +76 -0
- package/lib/mail/mailApi.ts +1286 -0
- package/lib/mail/mailDetailHooks.ts +57 -0
- package/lib/mail/mailFilterRulesApi.ts +116 -0
- package/lib/mail/mailSignaturesApi.ts +84 -0
- package/lib/mail/mailboxAccessApi.ts +106 -0
- package/lib/mail/mailboxImportApi.ts +87 -0
- package/lib/mail/messageBodySanitizer.ts +129 -0
- package/lib/mail/pushClient.ts +375 -0
- package/lib/mail/sendEvents.ts +72 -0
- package/lib/mail/sendFailure.ts +98 -0
- package/lib/mail/senderListsApi.ts +161 -0
- package/lib/search/queryGrammar.ts +179 -0
- package/lib/search/searchApi.ts +199 -0
- package/lib/search/searchScoring.ts +46 -0
- package/lib/search/searchTier3.ts +406 -0
- package/lib/tasks/tasksApi.ts +128 -0
- package/lib/util/api.ts +318 -0
- package/lib/util/apiClientContext.ts +35 -0
- package/lib/util/apiQuery.ts +61 -0
- package/lib/util/clipboard.ts +55 -0
- package/lib/util/dateInput.ts +15 -0
- package/lib/util/timeZone.ts +33 -0
- package/lib/util/useCopyToClipboard.ts +48 -0
- package/lib/util/useIsMobile.ts +34 -0
- package/lib/videoconf/videoMeetingsApi.ts +144 -0
- package/package.json +10 -4
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
// Copyright (C) 2026 Jean-Philippe Steinmetz
|
|
3
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
5
|
+
/**
|
|
6
|
+
* Typed wrapper over `@rapidmx/restapi`'s `Branding` route (`BaseBrandingRoute`) — a single, admin-managed,
|
|
7
|
+
* publicly-readable row of product chrome (logo, title/company name, custom stylesheet, header/footer HTML).
|
|
8
|
+
* `GET /system/branding` needs no auth (every viewer, including an anonymous booking-page visitor, can read
|
|
9
|
+
* it); every write is `@RequiresTrustedRole()` on the backend.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { ApiClient, ApiRequestError, apiUrl, withClient, withCsrfHeader } from "../util/api.js";
|
|
13
|
+
|
|
14
|
+
export interface Branding {
|
|
15
|
+
companyName: string;
|
|
16
|
+
title: string;
|
|
17
|
+
/** Already a directly-usable `<img src>` value — either an admin-set external URL, or (once uploaded via
|
|
18
|
+
* `uploadBrandingLogo()`) this server's own resolved asset URL. Never a bare blob key. */
|
|
19
|
+
logoUrl?: string;
|
|
20
|
+
/** The compact mark for navigation headers, independently configurable from `logoUrl`'s full logo -
|
|
21
|
+
* same directly-usable shape as `logoUrl`. Falls back to `logoUrl`, then a built-in default, when unset
|
|
22
|
+
* (see `useBranding()`'s `iconSrc`) - no fallback is applied here. */
|
|
23
|
+
iconUrl?: string;
|
|
24
|
+
/** Same shape as `logoUrl`, directly usable as a `<link href>`. */
|
|
25
|
+
stylesheetUrl?: string;
|
|
26
|
+
headerHtml?: string;
|
|
27
|
+
footerHtml?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** `client`, given by every function below that isn't a raw-bytes upload, is an explicit `ApiClient` from
|
|
31
|
+
* `createApiClient()` (e.g. one account of a multi-account app) to call instead of the default global
|
|
32
|
+
* `apiFetch()` - see `withClient()`'s own doc comment in `util/api.ts`. Omitted (the default), every
|
|
33
|
+
* function here behaves exactly as before. */
|
|
34
|
+
export function getBranding(client?: ApiClient): Promise<Branding> {
|
|
35
|
+
return withClient(client, "/system/branding");
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface UpdateBrandingInput {
|
|
39
|
+
companyName?: string;
|
|
40
|
+
title?: string;
|
|
41
|
+
logoUrl?: string;
|
|
42
|
+
iconUrl?: string;
|
|
43
|
+
stylesheetUrl?: string;
|
|
44
|
+
headerHtml?: string;
|
|
45
|
+
footerHtml?: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function updateBranding(input: UpdateBrandingInput, client?: ApiClient): Promise<Branding> {
|
|
49
|
+
return withClient(client, "/system/branding", {
|
|
50
|
+
method: "PUT",
|
|
51
|
+
body: JSON.stringify(input),
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async function uploadBrandingAsset(path: string, file: File): Promise<Branding> {
|
|
56
|
+
const res = await fetch(apiUrl(path), {
|
|
57
|
+
method: "POST",
|
|
58
|
+
credentials: "include",
|
|
59
|
+
headers: withCsrfHeader({ "Content-Type": file.type || "application/octet-stream" }),
|
|
60
|
+
body: file,
|
|
61
|
+
});
|
|
62
|
+
const contentType = res.headers.get("content-type") ?? "";
|
|
63
|
+
const responseBody = contentType.includes("application/json") ? await res.json().catch(() => undefined) : undefined;
|
|
64
|
+
if (!res.ok) {
|
|
65
|
+
const message = (responseBody && (responseBody.message || responseBody.error)) || res.statusText || "Upload failed.";
|
|
66
|
+
throw new ApiRequestError(message, res.status, responseBody?.code);
|
|
67
|
+
}
|
|
68
|
+
return responseBody as Branding;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Uploads `file` as the logo, self-hosted via `BlobStore` — bypasses `apiFetch` (which always forces
|
|
72
|
+
* `Content-Type: application/json`) the same way `mailApi.ts`'s `uploadAttachment()` does, since
|
|
73
|
+
* `BaseBrandingRoute.uploadLogo()` reads the raw request body directly. */
|
|
74
|
+
export function uploadBrandingLogo(file: File): Promise<Branding> {
|
|
75
|
+
return uploadBrandingAsset("/system/branding/logo", file);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** Uploads `file` as the compact nav-header icon, independently of `uploadBrandingLogo()`'s full logo. */
|
|
79
|
+
export function uploadBrandingIcon(file: File): Promise<Branding> {
|
|
80
|
+
return uploadBrandingAsset("/system/branding/icon", file);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function uploadBrandingStylesheet(file: File): Promise<Branding> {
|
|
84
|
+
return uploadBrandingAsset("/system/branding/stylesheet", file);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function deleteBrandingLogo(client?: ApiClient): Promise<void> {
|
|
88
|
+
return withClient(client, "/system/branding/logo", { method: "DELETE" });
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function deleteBrandingIcon(client?: ApiClient): Promise<void> {
|
|
92
|
+
return withClient(client, "/system/branding/icon", { method: "DELETE" });
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function deleteBrandingStylesheet(client?: ApiClient): Promise<void> {
|
|
96
|
+
return withClient(client, "/system/branding/stylesheet", { method: "DELETE" });
|
|
97
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
// Copyright (C) 2026 Jean-Philippe Steinmetz
|
|
3
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
5
|
+
import { useEffect, useState } from "react";
|
|
6
|
+
import { Branding, getBranding } from "./brandingApi.js";
|
|
7
|
+
|
|
8
|
+
const DEFAULT_LOGO_SRC = "/images/logo.svg";
|
|
9
|
+
|
|
10
|
+
/** `id` of the `<link>` for an uploaded/referenced custom stylesheet — server-rendered directly by
|
|
11
|
+
* `apps/*/_layout.tsx` (with this exact id) when one is configured, and kept live by this hook's
|
|
12
|
+
* background refresh thereafter (matched by this id, rather than always appending a duplicate). */
|
|
13
|
+
export const CUSTOM_STYLESHEET_LINK_ID = "branding-stylesheet";
|
|
14
|
+
|
|
15
|
+
export interface UseBrandingResult {
|
|
16
|
+
branding: Branding | null;
|
|
17
|
+
/** `branding.logoUrl` once loaded, else the built-in default — always a usable `<img src>`. */
|
|
18
|
+
logoSrc: string;
|
|
19
|
+
/** `branding.iconUrl` once loaded, falling back to the full logo and then the built-in default — the
|
|
20
|
+
* compact mark for nav headers (see `Branding.iconUrl`'s doc comment). Always a usable `<img src>`. */
|
|
21
|
+
iconSrc: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Fetches the admin-configured `Branding` singleton once on mount and applies its cosmetic side effects
|
|
26
|
+
* (browser-tab title, injected custom stylesheet `<link>`) directly to `document` — the same "resolve real
|
|
27
|
+
* client state once mounted, no SSR prop threading" convention `useIsMobile`/`MailShell`'s query-param reads
|
|
28
|
+
* already use. `GET /system/branding` needs no auth and never `404`s (see `BaseBrandingRoute.get()`), so a
|
|
29
|
+
* fetch failure here can only be a real network/server problem — swallowed rather than surfaced, since
|
|
30
|
+
* branding is purely decorative and every other part of the shell already depends on the same API being
|
|
31
|
+
* reachable.
|
|
32
|
+
*/
|
|
33
|
+
export default function useBranding(): UseBrandingResult {
|
|
34
|
+
const [branding, setBranding] = useState<Branding | null>(null);
|
|
35
|
+
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
let cancelled = false;
|
|
38
|
+
getBranding()
|
|
39
|
+
.then((result) => {
|
|
40
|
+
if (!cancelled) {
|
|
41
|
+
setBranding(result);
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
.catch(() => {
|
|
45
|
+
// Decorative only — leave `branding` at null, which every consumer already treats as
|
|
46
|
+
// "use the defaults".
|
|
47
|
+
});
|
|
48
|
+
return () => {
|
|
49
|
+
cancelled = true;
|
|
50
|
+
};
|
|
51
|
+
}, []);
|
|
52
|
+
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (branding?.title) {
|
|
55
|
+
document.title = branding.title;
|
|
56
|
+
}
|
|
57
|
+
}, [branding?.title]);
|
|
58
|
+
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
// Reuses an existing `<link>` (server-rendered by `apps/*/_layout.tsx` when a stylesheet is already
|
|
61
|
+
// configured) rather than always appending a duplicate — see `CUSTOM_STYLESHEET_LINK_ID`'s doc comment.
|
|
62
|
+
let link = document.getElementById(CUSTOM_STYLESHEET_LINK_ID) as HTMLLinkElement | null;
|
|
63
|
+
if (!branding?.stylesheetUrl) {
|
|
64
|
+
link?.remove();
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (!link) {
|
|
68
|
+
link = document.createElement("link");
|
|
69
|
+
link.id = CUSTOM_STYLESHEET_LINK_ID;
|
|
70
|
+
link.rel = "stylesheet";
|
|
71
|
+
document.head.appendChild(link);
|
|
72
|
+
}
|
|
73
|
+
link.href = branding.stylesheetUrl;
|
|
74
|
+
}, [branding?.stylesheetUrl]);
|
|
75
|
+
|
|
76
|
+
return {
|
|
77
|
+
branding,
|
|
78
|
+
logoSrc: branding?.logoUrl || DEFAULT_LOGO_SRC,
|
|
79
|
+
iconSrc: branding?.iconUrl || branding?.logoUrl || DEFAULT_LOGO_SRC,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
// Copyright (C) 2026 Jean-Philippe Steinmetz
|
|
3
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
5
|
+
/** Typed wrappers over `@rapidmx/restapi`'s `/mail/calendar-events` REST surface — see `mailApi.ts`'s own
|
|
6
|
+
* header comment for the shared ACL/authorization model every wrapper file here follows. Recurrence
|
|
7
|
+
* expansion happens entirely client-side (see `apps/shared/lib/recurrence.ts`) — the backend stores/returns
|
|
8
|
+
* `RecurrenceRule` as-is and does no RFC5545 expansion of its own. */
|
|
9
|
+
|
|
10
|
+
import { ApiClient, withClient } from "../util/api.js";
|
|
11
|
+
import { ListParams, buildQuery } from "../util/apiQuery.js";
|
|
12
|
+
|
|
13
|
+
export type AttendeeRole = "required" | "optional" | "resource";
|
|
14
|
+
export type AttendeeResponseStatus = "needsAction" | "accepted" | "declined" | "tentative";
|
|
15
|
+
|
|
16
|
+
export interface Attendee {
|
|
17
|
+
address: string;
|
|
18
|
+
displayName?: string;
|
|
19
|
+
role: AttendeeRole;
|
|
20
|
+
responseStatus: AttendeeResponseStatus;
|
|
21
|
+
isOrganizer: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type RecurrenceFrequency = "daily" | "weekly" | "monthly" | "yearly";
|
|
25
|
+
|
|
26
|
+
/** RFC5545 two-letter weekday codes, matching `rrule`'s own `WeekdayStr` type exactly. */
|
|
27
|
+
export type WeekdayCode = "MO" | "TU" | "WE" | "TH" | "FR" | "SA" | "SU";
|
|
28
|
+
|
|
29
|
+
export interface RecurrenceRule {
|
|
30
|
+
freq: RecurrenceFrequency;
|
|
31
|
+
interval: number;
|
|
32
|
+
/** Only meaningful for `freq: "weekly"`. */
|
|
33
|
+
byDay?: WeekdayCode[];
|
|
34
|
+
byMonthDay?: number[];
|
|
35
|
+
byMonth?: number[];
|
|
36
|
+
/** Ends after this many occurrences. Mutually exclusive with `until` — at most one may be set. */
|
|
37
|
+
count?: number;
|
|
38
|
+
/** Ends on this date (inclusive). Mutually exclusive with `count`. */
|
|
39
|
+
until?: string;
|
|
40
|
+
/** Specific occurrence start dates removed from the recurrence set. */
|
|
41
|
+
exceptions: string[];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type CalendarEventStatus = "tentative" | "confirmed" | "cancelled";
|
|
45
|
+
export type BusyStatus = "free" | "busy" | "tentative" | "oof";
|
|
46
|
+
|
|
47
|
+
/** Who may see an event's details (iCalendar `CLASS`). A private or confidential event is shown to a read-only reader of a shared calendar only as a
|
|
48
|
+
* busy block (`CalendarEvent.redacted`). `"default"` is what an event with none says. */
|
|
49
|
+
export type EventVisibility = "default" | "public" | "private" | "confidential";
|
|
50
|
+
|
|
51
|
+
/** What the guests of an event may do (`CalendarEvent.guestsCan*`). */
|
|
52
|
+
export interface GuestPermissions {
|
|
53
|
+
/** A guest may ask the organizer to change the title, location, description or time. */
|
|
54
|
+
guestsCanModify: boolean;
|
|
55
|
+
/** A guest may ask the organizer to add guests. */
|
|
56
|
+
guestsCanInviteOthers: boolean;
|
|
57
|
+
/** A guest sees who else was invited. */
|
|
58
|
+
guestsCanSeeGuestList: boolean;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** The guest permissions an event has when none were chosen (Google Calendar's own defaults). */
|
|
62
|
+
export const DEFAULT_GUEST_PERMISSIONS: GuestPermissions = { guestsCanModify: false, guestsCanInviteOthers: true, guestsCanSeeGuestList: true };
|
|
63
|
+
|
|
64
|
+
/** The guest permissions `source` says, a missing (or `null`) flag reading as its default - an event stored before they existed carries none. */
|
|
65
|
+
export function guestPermissionsOf(source: { [K in keyof GuestPermissions]?: boolean | null }): GuestPermissions {
|
|
66
|
+
return {
|
|
67
|
+
guestsCanModify: source.guestsCanModify ?? DEFAULT_GUEST_PERMISSIONS.guestsCanModify,
|
|
68
|
+
guestsCanInviteOthers: source.guestsCanInviteOthers ?? DEFAULT_GUEST_PERMISSIONS.guestsCanInviteOthers,
|
|
69
|
+
guestsCanSeeGuestList: source.guestsCanSeeGuestList ?? DEFAULT_GUEST_PERMISSIONS.guestsCanSeeGuestList,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** The visibility an event has, `"default"` when it says none. */
|
|
74
|
+
export function visibilityOf(event: { visibility?: EventVisibility | null }): EventVisibility {
|
|
75
|
+
return event.visibility ?? "default";
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The organizer's shape is `@rapidmx/restapi`'s general-purpose `Recipient` type (it's reused from the
|
|
80
|
+
* mail-recipient model), so it requires a `type` field even though a to/cc/bcc distinction is meaningless
|
|
81
|
+
* for an event organizer — this wrapper always sends `type: "to"` as an inert filler value when building one.
|
|
82
|
+
*/
|
|
83
|
+
export interface CalendarOrganizer {
|
|
84
|
+
address: string;
|
|
85
|
+
displayName?: string;
|
|
86
|
+
type: "to";
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface CalendarEvent {
|
|
90
|
+
uid: string;
|
|
91
|
+
version: number;
|
|
92
|
+
dateCreated: string;
|
|
93
|
+
dateModified: string;
|
|
94
|
+
folderUid: string;
|
|
95
|
+
mailboxUid: string;
|
|
96
|
+
title: string;
|
|
97
|
+
location?: string;
|
|
98
|
+
startDate: string;
|
|
99
|
+
endDate: string;
|
|
100
|
+
allDay: boolean;
|
|
101
|
+
timezone: string;
|
|
102
|
+
organizer: CalendarOrganizer;
|
|
103
|
+
attendees: Attendee[];
|
|
104
|
+
recurrenceRule?: RecurrenceRule;
|
|
105
|
+
/** For a single occurrence of a recurring event that has been individually modified, its original start date. */
|
|
106
|
+
recurrenceId?: string;
|
|
107
|
+
status: CalendarEventStatus;
|
|
108
|
+
busyStatus: BusyStatus;
|
|
109
|
+
reminderMinutesBeforeStart?: number;
|
|
110
|
+
icalUid: string;
|
|
111
|
+
sequence: number;
|
|
112
|
+
/** The `sequence` value invites were last sent for (server-internal iTIP tracking) — read-only
|
|
113
|
+
* display, never sent back in a `CalendarEventInput`. */
|
|
114
|
+
inviteSequenceSent?: number;
|
|
115
|
+
/** Set when an iTIP CANCEL was last sent for this event — read-only display, never sent back. */
|
|
116
|
+
cancelNoticeSentAt?: string;
|
|
117
|
+
/** When `true`, this event's own [`startDate`, `endDate`] window independently triggers an
|
|
118
|
+
* automatic-reply period for the mailbox, in addition to (not instead of) the mailbox-level
|
|
119
|
+
* `Mailbox.oofEnabled` toggle — e.g. a "Vacation" event configuring its own out-of-office window
|
|
120
|
+
* without touching the mailbox-wide setting. Takes precedence over `Mailbox.oofEnabled` while both
|
|
121
|
+
* are active (see `@rapidmx/restapi`'s `resolveActiveOof()`). */
|
|
122
|
+
autoReplyEnabled?: boolean;
|
|
123
|
+
/** The automatic-reply body while this event's window is active. Only meaningful when
|
|
124
|
+
* `autoReplyEnabled` is `true`. */
|
|
125
|
+
autoReplyMessage?: string;
|
|
126
|
+
/** The `@rapidmx/meet-plugin` `VideoMeeting` minted for this event, when the organizer turned on
|
|
127
|
+
* video conferencing (see `videoconf/videoMeetingsApi.ts`). Only the link is stored here — each
|
|
128
|
+
* attendee's own personal join URL is substituted into their own copy of the invitation server-side,
|
|
129
|
+
* so this event carries no per-attendee link and the organizer's own link is fetched from the meeting
|
|
130
|
+
* (`getVideoMeeting()`), never read off the event. */
|
|
131
|
+
videoMeetingUid?: string;
|
|
132
|
+
/** The description as plain text (at most 32,000 characters). When `descriptionHtml` is set this is its plain-text form. `null` or absent: none. */
|
|
133
|
+
description?: string | null;
|
|
134
|
+
/** The description as HTML the server has sanitized down to `b`/`strong`, `i`/`em`, `u`, `br`, `p`, `ul`/`ol`/`li` and `a` (`href` of `http`, `https` or
|
|
135
|
+
* `mailto` only). Still to be rendered through `sanitizeEventDescriptionHtml()` (`eventDescription.ts`), never trusted as it stands. `null` or absent:
|
|
136
|
+
* the description, if any, is plain text. */
|
|
137
|
+
descriptionHtml?: string | null;
|
|
138
|
+
/** Who may see the event's details - absent (or `null`, on a row stored before this existed) reads as `"default"`; see `visibilityOf()`. */
|
|
139
|
+
visibility?: EventVisibility | null;
|
|
140
|
+
/** Whether the guests may ask for the event to change (default `false`). Absent or `null` reads as the default; see `guestPermissionsOf()`. */
|
|
141
|
+
guestsCanModify?: boolean | null;
|
|
142
|
+
/** Whether the guests may ask for guests to be added (default `true`). */
|
|
143
|
+
guestsCanInviteOthers?: boolean | null;
|
|
144
|
+
/** Whether a guest sees the other guests (default `true`). When `false` a guest's copy lists only themselves. */
|
|
145
|
+
guestsCanSeeGuestList?: boolean | null;
|
|
146
|
+
/** Response-only. This reader (of a shared calendar, without edit access) sees the event only as a busy block: the title is `"Busy"` and there are no
|
|
147
|
+
* attendees, location, description or guest permissions. Never sent back. A live-update notification for such an event carries it too, and the
|
|
148
|
+
* owner's client refetches by `uid` instead of using the payload. */
|
|
149
|
+
redacted?: boolean;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const LIST_PAGE_SIZE = 500;
|
|
153
|
+
const LIST_CALENDAR_EVENTS_MAX_PAGES = 100;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Lists every event in a folder (same "fetch the flat list, filter client-side" contract as
|
|
157
|
+
* `contactsApi.ts`'s `listContacts`/`tasksApi.ts`'s `listTasks`), for the caller to expand and filter
|
|
158
|
+
* to a visible range itself (see `recurrence.ts`'s `expandAllOccurrences`). This deliberately does
|
|
159
|
+
* *not* push `startDate`/`endDate` range filtering down to the server via `@rapidmx/restapi`'s
|
|
160
|
+
* `field=lte(v)`/`gte(v)` query-operator DSL — confirmed directly against a running instance that
|
|
161
|
+
* `CalendarEventMongo`'s `startDate`/`endDate` are persisted as plain strings despite being typed
|
|
162
|
+
* `Date`, so a Mongo `$lte`/`$gte` comparison against them (a real `Date` operand) matches nothing at
|
|
163
|
+
* all, silently returning zero events for *any* date-bounded query. Client-side filtering sidesteps
|
|
164
|
+
* that entirely and needs no fix to land here.
|
|
165
|
+
*
|
|
166
|
+
* Pages through the whole folder (`limit=500`, the server's own page-size cap) until a short page comes
|
|
167
|
+
* back, so a calendar with more than one page of events isn't silently truncated. A hard cap of
|
|
168
|
+
* `LIST_CALENDAR_EVENTS_MAX_PAGES` pages guards against looping forever should a server ever ignore
|
|
169
|
+
* `page` and keep returning full pages.
|
|
170
|
+
*/
|
|
171
|
+
export async function listCalendarEvents(folderUid: string, client?: ApiClient): Promise<CalendarEvent[]> {
|
|
172
|
+
const events: CalendarEvent[] = [];
|
|
173
|
+
for (let page = 0; page < LIST_CALENDAR_EVENTS_MAX_PAGES; page++) {
|
|
174
|
+
const batch = await withClient<CalendarEvent[]>(
|
|
175
|
+
client,
|
|
176
|
+
`/mail/calendar-events?${buildQuery({ limit: LIST_PAGE_SIZE, page }, { folderUid })}`,
|
|
177
|
+
);
|
|
178
|
+
events.push(...batch);
|
|
179
|
+
if (batch.length < LIST_PAGE_SIZE) {
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return events;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export function getCalendarEvent(uid: string, client?: ApiClient): Promise<CalendarEvent> {
|
|
187
|
+
return withClient(client, `/mail/calendar-events/${encodeURIComponent(uid)}`);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export interface CalendarEventInput {
|
|
191
|
+
mailboxUid: string;
|
|
192
|
+
folderUid: string;
|
|
193
|
+
title: string;
|
|
194
|
+
location?: string;
|
|
195
|
+
startDate: string;
|
|
196
|
+
endDate: string;
|
|
197
|
+
allDay?: boolean;
|
|
198
|
+
timezone: string;
|
|
199
|
+
organizer: CalendarOrganizer;
|
|
200
|
+
attendees?: Attendee[];
|
|
201
|
+
recurrenceRule?: RecurrenceRule;
|
|
202
|
+
status?: CalendarEventStatus;
|
|
203
|
+
busyStatus?: BusyStatus;
|
|
204
|
+
reminderMinutesBeforeStart?: number;
|
|
205
|
+
autoReplyEnabled?: boolean;
|
|
206
|
+
autoReplyMessage?: string;
|
|
207
|
+
/** Set (or, sent as `null` on an update, cleared) when the caller has just minted or cancelled this
|
|
208
|
+
* event's video meeting — see `CalendarEvent.videoMeetingUid`. */
|
|
209
|
+
videoMeetingUid?: string;
|
|
210
|
+
/** Plain-text description (<= 32,000 characters). `null` (or `""`) clears it on an update. Sending only `descriptionHtml` makes the server derive this. */
|
|
211
|
+
description?: string | null;
|
|
212
|
+
/** Description HTML (<= 64,000 characters); the server sanitizes it. `null` (or `""`) clears it. Sending only `description` clears the HTML. */
|
|
213
|
+
descriptionHtml?: string | null;
|
|
214
|
+
visibility?: EventVisibility;
|
|
215
|
+
/** Only the organizer's own copy takes these; on a guest's copy they are ignored. Changing any of them, the description or the visibility re-invites. */
|
|
216
|
+
guestsCanModify?: boolean;
|
|
217
|
+
guestsCanInviteOthers?: boolean;
|
|
218
|
+
guestsCanSeeGuestList?: boolean;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export function createCalendarEvent(input: CalendarEventInput, client?: ApiClient): Promise<CalendarEvent> {
|
|
222
|
+
return withClient(client, "/mail/calendar-events", {
|
|
223
|
+
method: "POST",
|
|
224
|
+
body: JSON.stringify({
|
|
225
|
+
allDay: false,
|
|
226
|
+
attendees: [],
|
|
227
|
+
status: "confirmed",
|
|
228
|
+
busyStatus: "busy",
|
|
229
|
+
icalUid: crypto.randomUUID(),
|
|
230
|
+
sequence: 0,
|
|
231
|
+
...input,
|
|
232
|
+
}),
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export interface UpdateCalendarEventInput extends Partial<CalendarEventInput> {
|
|
237
|
+
uid: string;
|
|
238
|
+
version: number;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export function updateCalendarEvent(input: UpdateCalendarEventInput, client?: ApiClient): Promise<CalendarEvent> {
|
|
242
|
+
return withClient(client, `/mail/calendar-events/${encodeURIComponent(input.uid)}`, {
|
|
243
|
+
method: "PUT",
|
|
244
|
+
body: JSON.stringify(input),
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export function deleteCalendarEvent(uid: string, version: number, client?: ApiClient): Promise<void> {
|
|
249
|
+
return withClient(client, `/mail/calendar-events/${encodeURIComponent(uid)}?version=${version}`, { method: "DELETE" });
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/** The subset of `AttendeeResponseStatus` a caller can actually respond with — `"needsAction"` is only
|
|
253
|
+
* ever a default/initial value, never a valid response. */
|
|
254
|
+
export type AttendeeResponseInput = Exclude<AttendeeResponseStatus, "needsAction">;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Responds to a meeting invite as the calling mailbox's own attendee entry. Synchronous — unlike
|
|
258
|
+
* `recallMessage()` in `mailApi.ts`, this immediately mutates and persists the response (the iTIP
|
|
259
|
+
* REPLY email send is best-effort server-side and never affects this call's outcome). On
|
|
260
|
+
* `"accepted"`/`"tentative"` the whole updated `CalendarEvent` comes back, with only the calling
|
|
261
|
+
* attendee's own `responseStatus` changed. On `"declined"`, the backend instead soft-deletes the
|
|
262
|
+
* mailbox's own copy of the event and returns only `{ uid }` — the caller should treat a decline the
|
|
263
|
+
* same as a delete rather than expecting an updated event back.
|
|
264
|
+
*/
|
|
265
|
+
export function respondToEvent(
|
|
266
|
+
uid: string,
|
|
267
|
+
responseStatus: AttendeeResponseInput,
|
|
268
|
+
client?: ApiClient,
|
|
269
|
+
): Promise<CalendarEvent | { uid: string }> {
|
|
270
|
+
return withClient(client, `/mail/calendar-events/${encodeURIComponent(uid)}/respond`, {
|
|
271
|
+
method: "POST",
|
|
272
|
+
body: JSON.stringify({ responseStatus }),
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/** A change a guest asks the organizer for (`requestEventChange()`): only what is to differ. */
|
|
277
|
+
export interface EventChangeRequest {
|
|
278
|
+
/** Non-empty, at most 1,000 characters. A request can set these, not clear them. */
|
|
279
|
+
title?: string;
|
|
280
|
+
location?: string;
|
|
281
|
+
description?: string;
|
|
282
|
+
descriptionHtml?: string;
|
|
283
|
+
/** ISO 8601 instants. */
|
|
284
|
+
startDate?: string;
|
|
285
|
+
endDate?: string;
|
|
286
|
+
/** Up to 50 guests to add. */
|
|
287
|
+
addAttendees?: { address: string; displayName?: string }[];
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/** What the server made of a change request. */
|
|
291
|
+
export interface EventChangeRequestResult {
|
|
292
|
+
requested: true;
|
|
293
|
+
/** Which fields the request changes (as the server named them, e.g. `title`, `startDate`, `addAttendees`). */
|
|
294
|
+
changes: string[];
|
|
295
|
+
addAttendees: { address: string; displayName?: string }[];
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Asks the organizer to change an event, as a guest (not the organizer) whose copy allows it: the title, location, description or time need
|
|
300
|
+
* `guestsCanModify`, added guests need `guestsCanInviteOthers` (403 otherwise; 400 when nothing differs from what the event has, or a value is invalid).
|
|
301
|
+
* Nothing changes on this mailbox's own copy - the request is mailed to the organizer, and when the change is allowed it is applied there and
|
|
302
|
+
* arrives back later as an ordinary update of the invitation.
|
|
303
|
+
*/
|
|
304
|
+
export function requestEventChange(uid: string, request: EventChangeRequest, client?: ApiClient): Promise<EventChangeRequestResult> {
|
|
305
|
+
return withClient(client, `/mail/calendar-events/${encodeURIComponent(uid)}/request-change`, {
|
|
306
|
+
method: "POST",
|
|
307
|
+
body: JSON.stringify(request),
|
|
308
|
+
});
|
|
309
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
// Copyright (C) 2026 Jean-Philippe Steinmetz
|
|
3
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
5
|
+
/** A fixed client-side color palette for calendars, matching the plan's "no new `Category`-style
|
|
6
|
+
* backend entity" approach already used for Contacts' categories: `Folder.color` just stores one of
|
|
7
|
+
* these hex values (or, in principle, any string — an unrecognized one still works fine as a raw CSS
|
|
8
|
+
* color), the palette itself never needs to round-trip through the backend. */
|
|
9
|
+
|
|
10
|
+
import { Folder } from "../mail/mailApi.js";
|
|
11
|
+
|
|
12
|
+
export const CALENDAR_COLOR_PALETTE: string[] = [
|
|
13
|
+
"#2563eb", // blue
|
|
14
|
+
"#7c3aed", // violet
|
|
15
|
+
"#db2777", // pink
|
|
16
|
+
"#dc2626", // red
|
|
17
|
+
"#ea580c", // orange
|
|
18
|
+
"#ca8a04", // amber
|
|
19
|
+
"#16a34a", // green
|
|
20
|
+
"#0d9488", // teal
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
/** The color a mailbox's original auto-provisioned calendar effectively had before this field
|
|
24
|
+
* existed — kept as the fallback so every pre-existing calendar keeps looking the same. */
|
|
25
|
+
export const DEFAULT_CALENDAR_COLOR = CALENDAR_COLOR_PALETTE[0];
|
|
26
|
+
|
|
27
|
+
/** `fallback` replaces `DEFAULT_CALENDAR_COLOR` for a folder with no color of its own - e.g. a shared
|
|
28
|
+
* mailbox's calendar falling back to that mailbox's `accentColorForMailbox()`, so it doesn't render in
|
|
29
|
+
* the same default blue as the caller's own calendar. An explicit `Folder.color` always wins. */
|
|
30
|
+
export function colorForFolder(folder: Pick<Folder, "color">, fallback: string = DEFAULT_CALENDAR_COLOR): string {
|
|
31
|
+
return folder.color || fallback;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** A stable per-mailbox color for grouping one mailbox's calendars together (sidebar section accent, and
|
|
35
|
+
* the fallback color for its uncolored calendars). Deterministic hash of `mailboxUid` into the palette
|
|
36
|
+
* minus `DEFAULT_CALENDAR_COLOR`, so another mailbox never collides with the default a caller's own
|
|
37
|
+
* calendar already uses. Client-side only - nothing is persisted. */
|
|
38
|
+
export function accentColorForMailbox(mailboxUid: string): string {
|
|
39
|
+
const choices = CALENDAR_COLOR_PALETTE.slice(1);
|
|
40
|
+
let hash = 0;
|
|
41
|
+
for (let i = 0; i < mailboxUid.length; i++) {
|
|
42
|
+
hash = (hash * 31 + mailboxUid.charCodeAt(i)) >>> 0;
|
|
43
|
+
}
|
|
44
|
+
return choices[hash % choices.length];
|
|
45
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
// Copyright (C) 2026 Jean-Philippe Steinmetz
|
|
3
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
5
|
+
/**
|
|
6
|
+
* `@dnd-kit/core` identifies draggables/droppables purely by string id — this module owns the
|
|
7
|
+
* encoding scheme for calendar drag ids and, more importantly, `resolveDragAction()`: a pure
|
|
8
|
+
* function turning a drag-end's (active id, over id) pair into "move this occurrence by N ms" or
|
|
9
|
+
* "resize this occurrence's end to this instant", *without* touching `@dnd-kit` itself. Kept pure and
|
|
10
|
+
* dependency-free from the grid components on purpose: `@dnd-kit`'s pointer-based drag sensors are
|
|
11
|
+
* awkward to drive from jsdom in tests (they need real `PointerEvent`/`getBoundingClientRect`
|
|
12
|
+
* behavior a headless DOM doesn't fully provide), but the *decision* a drag-end makes is ordinary
|
|
13
|
+
* data-in-data-out logic that's trivial to unit test directly — see `calendarDragIds.test.ts`. The
|
|
14
|
+
* grid views (`MonthView`/`TimeGridView`) only need to tag their draggable/droppable elements with
|
|
15
|
+
* these ids correctly; the calendar page's `onDragEnd` calls `resolveDragAction` and then one of
|
|
16
|
+
* `calendarMutations.ts`'s `moveOccurrence`/`resizeOccurrenceEnd`.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { CalendarOccurrence } from "./recurrence.js";
|
|
20
|
+
|
|
21
|
+
const DAY_ID_PREFIX = "day:";
|
|
22
|
+
const SLOT_ID_PREFIX = "slot:";
|
|
23
|
+
const RESIZE_ID_PREFIX = "resize:";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* A month-view day cell's droppable id, for the given day (any time-of-day on that calendar date) —
|
|
27
|
+
* encoded as the runtime's *local* `yyyy-MM-dd`, matching the local-midnight day dates the grid views
|
|
28
|
+
* build via `date-fns`.
|
|
29
|
+
*/
|
|
30
|
+
export function dayDropId(date: Date): string {
|
|
31
|
+
const yyyy = String(date.getFullYear()).padStart(4, "0");
|
|
32
|
+
const mm = String(date.getMonth() + 1).padStart(2, "0");
|
|
33
|
+
const dd = String(date.getDate()).padStart(2, "0");
|
|
34
|
+
return `${DAY_ID_PREFIX}${yyyy}-${mm}-${dd}`;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** A week/day-view time slot's droppable id, rounded to the given date-time instant. */
|
|
38
|
+
export function slotDropId(date: Date): string {
|
|
39
|
+
return `${SLOT_ID_PREFIX}${date.toISOString()}`;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** An event chip/block's draggable id (drag-to-move). */
|
|
43
|
+
export function eventDragId(occurrence: CalendarOccurrence): string {
|
|
44
|
+
return occurrence.occurrenceKey;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** An event block's resize-handle draggable id (drag-to-resize, week/day view only). */
|
|
48
|
+
export function resizeDragId(occurrence: CalendarOccurrence): string {
|
|
49
|
+
return `${RESIZE_ID_PREFIX}${occurrence.occurrenceKey}`;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export type DragAction =
|
|
53
|
+
| { type: "move"; occurrence: CalendarOccurrence; deltaMs: number }
|
|
54
|
+
| { type: "resize"; occurrence: CalendarOccurrence; newEnd: Date };
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Resolves a `@dnd-kit` drag-end's `active`/`over` ids into the action it represents, or `null` if
|
|
58
|
+
* the drop doesn't correspond to anything actionable (dropped outside any droppable, or the dragged
|
|
59
|
+
* id doesn't match any occurrence currently on the grid — e.g. it was removed by an in-flight reload
|
|
60
|
+
* mid-drag).
|
|
61
|
+
*/
|
|
62
|
+
export function resolveDragAction(
|
|
63
|
+
activeId: string,
|
|
64
|
+
overId: string | undefined,
|
|
65
|
+
occurrences: CalendarOccurrence[],
|
|
66
|
+
): DragAction | null {
|
|
67
|
+
if (!overId) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const isResize = activeId.startsWith(RESIZE_ID_PREFIX);
|
|
72
|
+
const occurrenceKey = isResize ? activeId.slice(RESIZE_ID_PREFIX.length) : activeId;
|
|
73
|
+
const occurrence = occurrences.find((o) => o.occurrenceKey === occurrenceKey);
|
|
74
|
+
if (!occurrence) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (isResize) {
|
|
79
|
+
if (!overId.startsWith(SLOT_ID_PREFIX)) {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
return { type: "resize", occurrence, newEnd: new Date(overId.slice(SLOT_ID_PREFIX.length)) };
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (overId.startsWith(DAY_ID_PREFIX)) {
|
|
86
|
+
// Moving a timed event to another day keeps the occurrence's local wall-clock start time, so the delta is
|
|
87
|
+
// "same local time on the target day" minus the original start — a whole number of calendar
|
|
88
|
+
// days, which is not always a multiple of 24h when the move crosses a DST change.
|
|
89
|
+
const [year, month, day] = overId.slice(DAY_ID_PREFIX.length).split("-").map(Number);
|
|
90
|
+
// An all-day event's start is a UTC-midnight date-only value, so its target is that calendar date's
|
|
91
|
+
// UTC midnight - never "the same local time", which west of UTC reads the stored midnight as the
|
|
92
|
+
// previous evening and lands the event a day late.
|
|
93
|
+
const source = new Date(occurrence.startDate);
|
|
94
|
+
const target = new Date(source.getTime());
|
|
95
|
+
if (occurrence.allDay) {
|
|
96
|
+
target.setTime(Date.UTC(year, month - 1, day));
|
|
97
|
+
} else {
|
|
98
|
+
target.setFullYear(year, month - 1, day);
|
|
99
|
+
}
|
|
100
|
+
if (Number.isNaN(target.getTime())) {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
return { type: "move", occurrence, deltaMs: target.getTime() - source.getTime() };
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (overId.startsWith(SLOT_ID_PREFIX)) {
|
|
107
|
+
const targetSlot = new Date(overId.slice(SLOT_ID_PREFIX.length));
|
|
108
|
+
return { type: "move", occurrence, deltaMs: targetSlot.getTime() - new Date(occurrence.startDate).getTime() };
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return null;
|
|
112
|
+
}
|