@rapidmx/web-client 0.4.0 → 0.6.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 +88 -0
- package/apps/admin/audit-log/index.tsx +35 -8
- package/apps/admin/data-requests/index.tsx +480 -485
- package/apps/admin/distribution-lists/[uid].tsx +19 -1
- package/apps/admin/escrow-scopes/[uid].tsx +348 -237
- package/apps/admin/escrow-scopes/new/index.tsx +8 -2
- package/apps/admin/index.tsx +19 -1
- package/apps/admin/ingest-queue/index.tsx +44 -5
- package/apps/admin/mailboxes/[uid].tsx +211 -184
- package/apps/admin/quarantine/index.tsx +46 -14
- package/apps/admin/transport-rules/[uid].tsx +30 -1
- package/apps/admin/transport-rules/_transportRuleConfig.tsx +38 -2
- package/apps/admin/transport-rules/index.tsx +24 -6
- package/apps/admin/transport-rules/new/index.tsx +30 -1
- package/apps/escrow/_layout.tsx +2 -3
- package/apps/escrow/audit-log/index.tsx +196 -168
- package/apps/escrow/matters/[uid].tsx +621 -521
- package/apps/shared/components/admin/escrowScopes/EscrowScopeKeyAndHoldersFields.tsx +22 -1
- package/apps/shared/components/admin/layout/AdminShell.tsx +28 -9
- package/apps/shared/components/admin/mailboxes/EscrowScopeCard.tsx +152 -0
- package/apps/shared/components/admin/mailboxes/ResourceSettingsCard.tsx +3 -3
- package/apps/shared/components/admin/mailboxes/ShareAccessCard.tsx +55 -11
- package/apps/shared/components/admin/settings/BrandingForm.tsx +15 -4
- package/apps/shared/components/admin/settings/DomainDnsSetup.tsx +18 -7
- package/apps/shared/components/admin/settings/EncryptionPolicyForm.tsx +10 -2
- package/apps/shared/components/admin/settings/MailboxCreateForm.tsx +6 -0
- package/apps/shared/components/admin/settings/MailboxPolicyForm.tsx +45 -12
- package/apps/shared/components/admin/settings/PluginsManager.tsx +1235 -595
- package/apps/shared/components/admin/settings/RetentionPolicyForm.tsx +174 -98
- package/apps/shared/components/admin/setup/EscrowSetupStep.tsx +49 -13
- package/apps/shared/components/admin/setup/SetupWizard.tsx +150 -34
- package/apps/shared/components/admin/signOut.ts +79 -0
- package/apps/shared/components/admin/usePagedList.tsx +129 -0
- package/apps/shared/components/calendar/EventModal.tsx +717 -549
- package/apps/shared/components/calendar/MonthView.tsx +173 -139
- package/apps/shared/components/calendar/RecurrenceEditor.tsx +222 -180
- package/apps/shared/components/calendar/SplitDayView.tsx +143 -137
- package/apps/shared/components/calendar/TimeGridView.tsx +244 -198
- package/apps/shared/components/calendar/allDay.ts +124 -0
- package/apps/shared/components/calendar/layout/CalendarShell.tsx +194 -192
- package/apps/shared/components/contacts/ContactDetailPane.tsx +100 -21
- package/apps/shared/components/contacts/ContactForm.tsx +377 -348
- package/apps/shared/components/contacts/ContactsSidebar.tsx +6 -2
- package/apps/shared/components/contacts/KeyChangeReview.tsx +192 -0
- package/apps/shared/components/contacts/contactKeys.ts +78 -0
- package/apps/shared/components/contacts/layout/ContactsShell.tsx +199 -197
- package/apps/shared/components/escrow/layout/EscrowShell.tsx +148 -134
- package/apps/shared/components/layout/AppShell.tsx +123 -33
- package/apps/shared/components/layout/BrandingChrome.tsx +48 -10
- package/apps/shared/components/layout/KeyEnrollmentGate.tsx +389 -298
- package/apps/shared/components/layout/MailboxProvisioning.tsx +19 -3
- package/apps/shared/components/layout/RecoveryCodeUnlock.tsx +350 -0
- package/apps/shared/components/layout/UnlockPromptProvider.tsx +257 -128
- package/apps/shared/components/mail/ConversationThreadPane.tsx +216 -181
- package/apps/shared/components/mail/MessageDetailPane.tsx +1318 -630
- package/apps/shared/components/mail/compose/ComposeContext.tsx +20 -15
- package/apps/shared/components/mail/compose/ComposeWindow.tsx +854 -132
- package/apps/shared/components/mail/compose/composeFlushRegistry.ts +60 -0
- package/apps/shared/components/mail/layout/MailShell.tsx +420 -408
- package/apps/shared/components/mail/pinnedSigners.ts +124 -0
- package/apps/shared/components/mail/verificationSeals.ts +125 -0
- package/apps/shared/components/mail/writableMailboxes.ts +101 -0
- package/apps/shared/components/rules/RuleBuilder.tsx +311 -276
- package/apps/shared/components/settings/layout/SettingsShell.tsx +23 -9
- package/apps/shared/components/tasks/layout/TasksShell.tsx +201 -199
- package/apps/shared/mail/listAllPages.ts +39 -0
- package/apps/shared/plugins/pluginNav.ts +73 -0
- package/apps/shared/search/LocalIndexLifecycle.tsx +64 -55
- package/apps/shared/search/localIndexBuilder.ts +481 -179
- package/apps/shared/search/localIndexRpcClient.ts +231 -29
- package/apps/shared/search/localIndexSchema.ts +15 -6
- package/apps/shared/search/localIndexStorage.ts +98 -0
- package/apps/shared/search/localIndexVFS.ts +32 -1
- package/apps/shared/search/localIndexWorker.ts +648 -186
- package/apps/www/calendar/index.tsx +438 -417
- package/apps/www/contacts/[uid].tsx +21 -2
- package/apps/www/contacts/index.tsx +116 -12
- package/apps/www/index.tsx +1314 -1041
- package/apps/www/messages/[uid].tsx +18 -6
- package/apps/www/settings/auto-reply/index.tsx +134 -129
- package/apps/www/settings/encryption/index.tsx +739 -216
- package/apps/www/settings/filters/[uid].tsx +171 -155
- package/apps/www/settings/filters/new/index.tsx +8 -1
- package/apps/www/settings/focused-inbox/index.tsx +150 -148
- package/apps/www/settings/privacy/index.tsx +494 -436
- package/apps/www/settings/read-receipts/index.tsx +148 -125
- package/apps/www/settings/sharing/index.tsx +17 -14
- package/apps/www/tasks/index.tsx +638 -579
- package/dist/apps/admin/_404.d.ts +2 -0
- package/dist/apps/admin/_500.d.ts +2 -0
- package/dist/apps/admin/_layout.d.ts +8 -0
- package/dist/apps/admin/audit-log/index.d.ts +11 -0
- package/dist/apps/admin/audit-log/index.js +38 -8
- package/dist/apps/admin/branding/index.d.ts +3 -0
- package/dist/apps/admin/data-requests/index.d.ts +3 -0
- package/dist/apps/admin/data-requests/index.js +52 -72
- package/dist/apps/admin/distribution-lists/[uid].d.ts +7 -0
- package/dist/apps/admin/distribution-lists/[uid].js +1 -1
- package/dist/apps/admin/distribution-lists/index.d.ts +3 -0
- package/dist/apps/admin/distribution-lists/new/index.d.ts +3 -0
- package/dist/apps/admin/domains/[uid].d.ts +7 -0
- package/dist/apps/admin/domains/index.d.ts +3 -0
- package/dist/apps/admin/domains/new/index.d.ts +3 -0
- package/dist/apps/admin/encryption-policy/index.d.ts +3 -0
- package/dist/apps/admin/escrow-scopes/[uid].d.ts +21 -0
- package/dist/apps/admin/escrow-scopes/[uid].js +91 -12
- package/dist/apps/admin/escrow-scopes/index.d.ts +3 -0
- package/dist/apps/admin/escrow-scopes/new/index.d.ts +3 -0
- package/dist/apps/admin/escrow-scopes/new/index.js +8 -3
- package/dist/apps/admin/index.d.ts +3 -0
- package/dist/apps/admin/index.js +4 -1
- package/dist/apps/admin/ingest-queue/index.d.ts +4 -0
- package/dist/apps/admin/ingest-queue/index.js +24 -6
- package/dist/apps/admin/mailbox-policy/index.d.ts +3 -0
- package/dist/apps/admin/mailboxes/[uid].d.ts +7 -0
- package/dist/apps/admin/mailboxes/[uid].js +20 -4
- package/dist/apps/admin/mailboxes/new/index.d.ts +3 -0
- package/dist/apps/admin/plugins/index.d.ts +3 -0
- package/dist/apps/admin/quarantine/index.d.ts +6 -0
- package/dist/apps/admin/quarantine/index.js +20 -11
- package/dist/apps/admin/retention-policy/index.d.ts +3 -0
- package/dist/apps/admin/setup/index.d.ts +3 -0
- package/dist/apps/admin/transport-rules/[uid].d.ts +7 -0
- package/dist/apps/admin/transport-rules/[uid].js +18 -2
- package/dist/apps/admin/transport-rules/_transportRuleConfig.d.ts +21 -0
- package/dist/apps/admin/transport-rules/_transportRuleConfig.js +19 -0
- package/dist/apps/admin/transport-rules/index.d.ts +3 -0
- package/dist/apps/admin/transport-rules/index.js +22 -6
- package/dist/apps/admin/transport-rules/new/index.d.ts +3 -0
- package/dist/apps/admin/transport-rules/new/index.js +18 -2
- package/dist/apps/escrow/_layout.d.ts +10 -0
- package/dist/apps/escrow/_layout.js +3 -3
- package/dist/apps/escrow/audit-log/index.d.ts +9 -0
- package/dist/apps/escrow/audit-log/index.js +26 -1
- package/dist/apps/escrow/index.d.ts +3 -0
- package/dist/apps/escrow/matters/[uid].d.ts +7 -0
- package/dist/apps/escrow/matters/[uid].js +77 -42
- package/dist/apps/escrow/matters/new/index.d.ts +3 -0
- package/dist/apps/shared/components/admin/distributionLists/MemberListCard.d.ts +17 -0
- package/dist/apps/shared/components/admin/escrowScopes/EscrowScopeKeyAndHoldersFields.d.ts +32 -0
- package/dist/apps/shared/components/admin/escrowScopes/EscrowScopeKeyAndHoldersFields.js +11 -2
- package/dist/apps/shared/components/admin/layout/AdminShell.d.ts +32 -0
- package/dist/apps/shared/components/admin/layout/AdminShell.js +15 -6
- package/dist/apps/shared/components/admin/mailboxes/EscrowScopeCard.d.ts +12 -0
- package/dist/apps/shared/components/admin/mailboxes/EscrowScopeCard.js +72 -0
- package/dist/apps/shared/components/admin/mailboxes/MailboxTable.d.ts +6 -0
- package/dist/apps/shared/components/admin/mailboxes/ResourceSettingsCard.d.ts +19 -0
- package/dist/apps/shared/components/admin/mailboxes/ResourceSettingsCard.js +3 -3
- package/dist/apps/shared/components/admin/mailboxes/ShareAccessCard.d.ts +12 -0
- package/dist/apps/shared/components/admin/mailboxes/ShareAccessCard.js +22 -4
- package/dist/apps/shared/components/admin/settings/BrandingForm.d.ts +9 -0
- package/dist/apps/shared/components/admin/settings/BrandingForm.js +15 -4
- package/dist/apps/shared/components/admin/settings/DomainDnsSetup.d.ts +12 -0
- package/dist/apps/shared/components/admin/settings/DomainDnsSetup.js +13 -7
- package/dist/apps/shared/components/admin/settings/EncryptionPolicyForm.d.ts +12 -0
- package/dist/apps/shared/components/admin/settings/EncryptionPolicyForm.js +7 -2
- package/dist/apps/shared/components/admin/settings/LoadedSettingsForm.d.ts +9 -0
- package/dist/apps/shared/components/admin/settings/MailboxCreateForm.d.ts +19 -0
- package/dist/apps/shared/components/admin/settings/MailboxCreateForm.js +6 -0
- package/dist/apps/shared/components/admin/settings/MailboxPolicyForm.d.ts +10 -0
- package/dist/apps/shared/components/admin/settings/MailboxPolicyForm.js +34 -12
- package/dist/apps/shared/components/admin/settings/PluginsManager.d.ts +4 -0
- package/dist/apps/shared/components/admin/settings/PluginsManager.js +390 -78
- package/dist/apps/shared/components/admin/settings/RetentionPolicyForm.d.ts +9 -0
- package/dist/apps/shared/components/admin/settings/RetentionPolicyForm.js +40 -11
- package/dist/apps/shared/components/admin/setup/EscrowSetupStep.d.ts +14 -0
- package/dist/apps/shared/components/admin/setup/EscrowSetupStep.js +29 -13
- package/dist/apps/shared/components/admin/setup/SetupWizard.d.ts +36 -0
- package/dist/apps/shared/components/admin/setup/SetupWizard.js +87 -21
- package/dist/apps/shared/components/admin/signOut.d.ts +23 -0
- package/dist/apps/shared/components/admin/signOut.js +75 -0
- package/dist/apps/shared/components/admin/usePagedList.d.ts +39 -0
- package/dist/apps/shared/components/admin/usePagedList.js +99 -0
- package/dist/apps/shared/components/calendar/CalendarListSidebar.d.ts +26 -0
- package/dist/apps/shared/components/calendar/EventModal.d.ts +46 -0
- package/dist/apps/shared/components/calendar/EventModal.js +142 -21
- package/dist/apps/shared/components/calendar/MonthView.d.ts +15 -0
- package/dist/apps/shared/components/calendar/MonthView.js +12 -5
- package/dist/apps/shared/components/calendar/RecurrenceEditor.d.ts +20 -0
- package/dist/apps/shared/components/calendar/RecurrenceEditor.js +40 -5
- package/dist/apps/shared/components/calendar/ResourcePicker.d.ts +19 -0
- package/dist/apps/shared/components/calendar/SplitDayView.d.ts +28 -0
- package/dist/apps/shared/components/calendar/SplitDayView.js +10 -4
- package/dist/apps/shared/components/calendar/TimeGridView.d.ts +17 -0
- package/dist/apps/shared/components/calendar/TimeGridView.js +23 -7
- package/dist/apps/shared/components/calendar/allDay.d.ts +51 -0
- package/dist/apps/shared/components/calendar/allDay.js +111 -0
- package/dist/apps/shared/components/calendar/layout/CalendarShell.d.ts +40 -0
- package/dist/apps/shared/components/calendar/layout/CalendarShell.js +3 -3
- package/dist/apps/shared/components/contacts/ContactDetailPane.d.ts +23 -0
- package/dist/apps/shared/components/contacts/ContactDetailPane.js +43 -5
- package/dist/apps/shared/components/contacts/ContactForm.d.ts +20 -0
- package/dist/apps/shared/components/contacts/ContactForm.js +32 -10
- package/dist/apps/shared/components/contacts/ContactsSidebar.d.ts +40 -0
- package/dist/apps/shared/components/contacts/ContactsSidebar.js +2 -2
- package/dist/apps/shared/components/contacts/ContactsToolbar.d.ts +25 -0
- package/dist/apps/shared/components/contacts/KeyChangeReview.d.ts +40 -0
- package/dist/apps/shared/components/contacts/KeyChangeReview.js +63 -0
- package/dist/apps/shared/components/contacts/contactKeys.d.ts +29 -0
- package/dist/apps/shared/components/contacts/contactKeys.js +64 -0
- package/dist/apps/shared/components/contacts/layout/ContactsShell.d.ts +21 -0
- package/dist/apps/shared/components/contacts/layout/ContactsShell.js +2 -2
- package/dist/apps/shared/components/escrow/layout/EscrowShell.d.ts +25 -0
- package/dist/apps/shared/components/escrow/layout/EscrowShell.js +24 -5
- package/dist/apps/shared/components/forms/StringListField.d.ts +22 -0
- package/dist/apps/shared/components/layout/AppShell.d.ts +49 -0
- package/dist/apps/shared/components/layout/AppShell.js +97 -26
- package/dist/apps/shared/components/layout/BrandingChrome.d.ts +18 -0
- package/dist/apps/shared/components/layout/BrandingChrome.js +45 -10
- package/dist/apps/shared/components/layout/KeyEnrollmentGate.d.ts +51 -0
- package/dist/apps/shared/components/layout/KeyEnrollmentGate.js +49 -12
- package/dist/apps/shared/components/layout/MailboxProvisioning.d.ts +13 -0
- package/dist/apps/shared/components/layout/MailboxProvisioning.js +10 -2
- package/dist/apps/shared/components/layout/RecoveryCodeUnlock.d.ts +66 -0
- package/dist/apps/shared/components/layout/RecoveryCodeUnlock.js +174 -0
- package/dist/apps/shared/components/layout/UnlockPromptProvider.d.ts +45 -0
- package/dist/apps/shared/components/layout/UnlockPromptProvider.js +73 -14
- package/dist/apps/shared/components/layout/UserMenu.d.ts +23 -0
- package/dist/apps/shared/components/mail/ConversationList.d.ts +11 -0
- package/dist/apps/shared/components/mail/ConversationThreadPane.d.ts +23 -0
- package/dist/apps/shared/components/mail/ConversationThreadPane.js +50 -12
- package/dist/apps/shared/components/mail/MessageDetailPane.d.ts +93 -0
- package/dist/apps/shared/components/mail/MessageDetailPane.js +441 -36
- package/dist/apps/shared/components/mail/compose/ComposeContext.d.ts +58 -0
- package/dist/apps/shared/components/mail/compose/ComposeContext.js +9 -6
- package/dist/apps/shared/components/mail/compose/ComposeToolbar.d.ts +15 -0
- package/dist/apps/shared/components/mail/compose/ComposeWindow.d.ts +37 -0
- package/dist/apps/shared/components/mail/compose/ComposeWindow.js +699 -128
- package/dist/apps/shared/components/mail/compose/EmojiPicker.d.ts +14 -0
- package/dist/apps/shared/components/mail/compose/GifPicker.d.ts +13 -0
- package/dist/apps/shared/components/mail/compose/RichTextEditor.d.ts +34 -0
- package/dist/apps/shared/components/mail/compose/ScheduleSendPicker.d.ts +16 -0
- package/dist/apps/shared/components/mail/compose/composeFlushRegistry.d.ts +27 -0
- package/dist/apps/shared/components/mail/compose/composeFlushRegistry.js +50 -0
- package/dist/apps/shared/components/mail/layout/MailShell.d.ts +57 -0
- package/dist/apps/shared/components/mail/layout/MailShell.js +13 -4
- package/dist/apps/shared/components/mail/pinnedSigners.d.ts +33 -0
- package/dist/apps/shared/components/mail/pinnedSigners.js +98 -0
- package/dist/apps/shared/components/mail/verificationSeals.d.ts +22 -0
- package/dist/apps/shared/components/mail/verificationSeals.js +112 -0
- package/dist/apps/shared/components/mail/writableMailboxes.d.ts +15 -0
- package/dist/apps/shared/components/mail/writableMailboxes.js +87 -0
- package/dist/apps/shared/components/rules/RuleBuilder.d.ts +70 -0
- package/dist/apps/shared/components/rules/RuleBuilder.js +34 -6
- package/dist/apps/shared/components/settings/layout/SettingsShell.d.ts +41 -0
- package/dist/apps/shared/components/settings/layout/SettingsShell.js +19 -9
- package/dist/apps/shared/components/tasks/TasksSidebar.d.ts +41 -0
- package/dist/apps/shared/components/tasks/TasksToolbar.d.ts +14 -0
- package/dist/apps/shared/components/tasks/layout/TasksShell.d.ts +24 -0
- package/dist/apps/shared/components/tasks/layout/TasksShell.js +2 -2
- package/dist/apps/shared/mail/findWellKnownFolderUid.d.ts +5 -0
- package/dist/apps/shared/mail/listAllPages.d.ts +17 -0
- package/dist/apps/shared/mail/listAllPages.js +25 -0
- package/dist/apps/shared/plugins/pluginNav.d.ts +39 -0
- package/dist/apps/shared/plugins/pluginNav.js +33 -0
- package/dist/apps/shared/search/LocalIndexLifecycle.d.ts +13 -0
- package/dist/apps/shared/search/LocalIndexLifecycle.js +58 -54
- package/dist/apps/shared/search/localIndexBlockCipher.d.ts +36 -0
- package/dist/apps/shared/search/localIndexBuilder.d.ts +85 -0
- package/dist/apps/shared/search/localIndexBuilder.js +292 -37
- package/dist/apps/shared/search/localIndexKey.d.ts +4 -0
- package/dist/apps/shared/search/localIndexRpcClient.d.ts +71 -0
- package/dist/apps/shared/search/localIndexRpcClient.js +191 -26
- package/dist/apps/shared/search/localIndexSchema.d.ts +111 -0
- package/dist/apps/shared/search/localIndexSchema.js +12 -6
- package/dist/apps/shared/search/localIndexSizePreference.d.ts +27 -0
- package/dist/apps/shared/search/localIndexStorage.d.ts +28 -0
- package/dist/apps/shared/search/localIndexStorage.js +86 -0
- package/dist/apps/shared/search/localIndexVFS.d.ts +101 -0
- package/dist/apps/shared/search/localIndexVFS.js +68 -40
- package/dist/apps/shared/search/localIndexWorker.d.ts +145 -0
- package/dist/apps/shared/search/localIndexWorker.js +519 -173
- package/dist/apps/shared/search/searchTier2.d.ts +30 -0
- package/dist/apps/www/_404.d.ts +2 -0
- package/dist/apps/www/_500.d.ts +2 -0
- package/dist/apps/www/_layout.d.ts +14 -0
- package/dist/apps/www/calendar/index.d.ts +3 -0
- package/dist/apps/www/calendar/index.js +28 -10
- package/dist/apps/www/contacts/[uid].d.ts +13 -0
- package/dist/apps/www/contacts/[uid].js +13 -2
- package/dist/apps/www/contacts/index.d.ts +3 -0
- package/dist/apps/www/contacts/index.js +80 -10
- package/dist/apps/www/index.d.ts +3 -0
- package/dist/apps/www/index.js +339 -108
- package/dist/apps/www/messages/[uid].d.ts +11 -0
- package/dist/apps/www/messages/[uid].js +18 -6
- package/dist/apps/www/settings/auto-reply/index.d.ts +4 -0
- package/dist/apps/www/settings/auto-reply/index.js +9 -4
- package/dist/apps/www/settings/encryption/index.d.ts +7 -0
- package/dist/apps/www/settings/encryption/index.js +514 -97
- package/dist/apps/www/settings/filters/[uid].d.ts +8 -0
- package/dist/apps/www/settings/filters/[uid].js +22 -7
- package/dist/apps/www/settings/filters/_mailFilterRuleConfig.d.ts +11 -0
- package/dist/apps/www/settings/filters/index.d.ts +4 -0
- package/dist/apps/www/settings/filters/new/index.d.ts +4 -0
- package/dist/apps/www/settings/filters/new/index.js +8 -2
- package/dist/apps/www/settings/focused-inbox/index.d.ts +4 -0
- package/dist/apps/www/settings/focused-inbox/index.js +3 -1
- package/dist/apps/www/settings/labels/index.d.ts +4 -0
- package/dist/apps/www/settings/privacy/index.d.ts +4 -0
- package/dist/apps/www/settings/privacy/index.js +57 -22
- package/dist/apps/www/settings/read-receipts/index.d.ts +4 -0
- package/dist/apps/www/settings/read-receipts/index.js +10 -3
- package/dist/apps/www/settings/sharing/index.d.ts +4 -0
- package/dist/apps/www/settings/sharing/index.js +7 -11
- package/dist/apps/www/settings/signatures/[uid].d.ts +8 -0
- package/dist/apps/www/settings/signatures/index.d.ts +4 -0
- package/dist/apps/www/settings/signatures/new/index.d.ts +4 -0
- package/dist/apps/www/settings/signatures/signatureDefaults.d.ts +10 -0
- package/dist/apps/www/tasks/index.d.ts +3 -0
- package/dist/apps/www/tasks/index.js +50 -10
- package/package.json +3 -3
- package/apps/shared/components/booking/AvailabilityEditor.tsx +0 -118
- package/apps/www/settings/booking-types/[uid].tsx +0 -300
- package/apps/www/settings/booking-types/index.tsx +0 -98
- package/apps/www/settings/booking-types/new/index.tsx +0 -212
- package/dist/apps/shared/components/booking/AvailabilityEditor.js +0 -45
- package/dist/apps/www/settings/booking-types/[uid].js +0 -129
- package/dist/apps/www/settings/booking-types/index.js +0 -29
- package/dist/apps/www/settings/booking-types/new/index.js +0 -86
|
@@ -58,7 +58,25 @@ function DistributionListDetailContent({ uid }: { uid: string }) {
|
|
|
58
58
|
<dt className="text-text-muted">Alias addresses</dt>
|
|
59
59
|
<dd>{list.aliasAddresses && list.aliasAddresses.length > 0 ? list.aliasAddresses.join(", ") : "None"}</dd>
|
|
60
60
|
<dt className="text-text-muted">Restrict senders</dt>
|
|
61
|
-
<dd>
|
|
61
|
+
<dd>
|
|
62
|
+
{list.restrictSenders ? "Only members may send" : "No"}
|
|
63
|
+
{/* restapi accepts a member's message only when the mail server's own trusted Authentication-Results
|
|
64
|
+
(`mail:security:trusted_authserv_id`) report a passing, aligned DKIM signature. That setting is
|
|
65
|
+
empty by default and no API reports it, so this is static text rather than a conditional warning. */}
|
|
66
|
+
{list.restrictSenders ? (
|
|
67
|
+
<p role="status" className="mt-1.5 py-2 px-3 rounded-sm text-xs bg-warning/15 text-text">
|
|
68
|
+
Members are recognized only by a verified (DKIM) signature, which requires the mail server’s
|
|
69
|
+
Authentication-Results configuration (the trusted authserv id,{" "}
|
|
70
|
+
<code>mail:security:trusted_authserv_id</code>). If that isn’t configured, all mail sent to
|
|
71
|
+
this list is dropped.
|
|
72
|
+
</p>
|
|
73
|
+
) : (
|
|
74
|
+
<p className="mt-1 text-xs text-text-muted">
|
|
75
|
+
Restricting senders to members requires the mail server’s Authentication-Results configuration
|
|
76
|
+
(the trusted authserv id); without it, all mail to the list is dropped.
|
|
77
|
+
</p>
|
|
78
|
+
)}
|
|
79
|
+
</dd>
|
|
62
80
|
<dt className="text-text-muted">Created</dt>
|
|
63
81
|
<dd>{new Date(list.dateCreated).toLocaleString()}</dd>
|
|
64
82
|
</dl>
|
|
@@ -1,237 +1,348 @@
|
|
|
1
|
-
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2026 Jean-Philippe Steinmetz
|
|
3
|
-
// SPDX-License-Identifier: MPL-2.0
|
|
4
|
-
///////////////////////////////////////////////////////////////////////////////
|
|
5
|
-
import React, { FormEvent, useEffect, useState } from "react";
|
|
6
|
-
import { ApiRequestError } from "@rapidmx/react-shared/util/api.js";
|
|
7
|
-
import { toDatetimeLocal } from "@rapidmx/react-shared/util/dateInput.js";
|
|
8
|
-
import {
|
|
9
|
-
deleteEscrowScope,
|
|
10
|
-
EscrowScope,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const
|
|
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
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
1
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
// Copyright (C) 2026 Jean-Philippe Steinmetz
|
|
3
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
5
|
+
import React, { FormEvent, useEffect, useState } from "react";
|
|
6
|
+
import { ApiRequestError } from "@rapidmx/react-shared/util/api.js";
|
|
7
|
+
import { toDatetimeLocal } from "@rapidmx/react-shared/util/dateInput.js";
|
|
8
|
+
import {
|
|
9
|
+
deleteEscrowScope,
|
|
10
|
+
EscrowScope,
|
|
11
|
+
EscrowScopePublicKey,
|
|
12
|
+
getEscrowScope,
|
|
13
|
+
updateEscrowScope,
|
|
14
|
+
} from "@rapidmx/react-shared/admin/escrowScopesApi.js";
|
|
15
|
+
import AdminShell, { AdminShellProps } from "../../shared/components/admin/layout/AdminShell.js";
|
|
16
|
+
import EscrowScopeKeyAndHoldersFields, {
|
|
17
|
+
EscrowScopeKeyAndHoldersValue,
|
|
18
|
+
selfAsHolderError,
|
|
19
|
+
} from "../../shared/components/admin/escrowScopes/EscrowScopeKeyAndHoldersFields.js";
|
|
20
|
+
import Alert from "@rapidmx/react-shared/components/feedback/Alert.js";
|
|
21
|
+
import Button from "@rapidmx/react-shared/components/buttons/Button.js";
|
|
22
|
+
import FormField from "@rapidmx/react-shared/components/forms/FormField.js";
|
|
23
|
+
import Modal from "@rapidmx/react-shared/components/overlays/Modal.js";
|
|
24
|
+
|
|
25
|
+
const INPUT_CLASS =
|
|
26
|
+
"w-full text-sm py-2.5 px-3 border border-border rounded-sm bg-surface text-text focus:outline-none focus:border-primary";
|
|
27
|
+
|
|
28
|
+
function toFieldsValue(scope: EscrowScope): EscrowScopeKeyAndHoldersValue {
|
|
29
|
+
return {
|
|
30
|
+
publicKey: scope.publicKey.publicKey,
|
|
31
|
+
keyType: scope.publicKey.type,
|
|
32
|
+
fingerprint: scope.publicKey.fingerprint,
|
|
33
|
+
notBefore: toDatetimeLocal(new Date(scope.publicKey.notBefore).toISOString()),
|
|
34
|
+
notAfter: toDatetimeLocal(new Date(scope.publicKey.notAfter).toISOString()),
|
|
35
|
+
holderUserUids: scope.holderUserUids,
|
|
36
|
+
requiredHolders: scope.requiredHolders,
|
|
37
|
+
notifySubjectOnAccess: scope.notifySubjectOnAccess,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Describes every change to the security-relevant parts of a scope - who holds it, how many holders must approve,
|
|
43
|
+
* and its public key - so the administrator confirms exactly what they're changing before it's saved.
|
|
44
|
+
*/
|
|
45
|
+
export function describeSecurityChanges(original: EscrowScope, next: EscrowScopeKeyAndHoldersValue): string[] {
|
|
46
|
+
const changes: string[] = [];
|
|
47
|
+
const added = next.holderUserUids.filter((holder) => !original.holderUserUids.includes(holder));
|
|
48
|
+
const removed = original.holderUserUids.filter((holder) => !next.holderUserUids.includes(holder));
|
|
49
|
+
if (added.length > 0) {
|
|
50
|
+
changes.push(`Add holders: ${added.join(", ")}`);
|
|
51
|
+
}
|
|
52
|
+
if (removed.length > 0) {
|
|
53
|
+
changes.push(`Remove holders: ${removed.join(", ")}`);
|
|
54
|
+
}
|
|
55
|
+
if (next.requiredHolders !== original.requiredHolders) {
|
|
56
|
+
changes.push(`Required approvals: ${original.requiredHolders} → ${next.requiredHolders}`);
|
|
57
|
+
}
|
|
58
|
+
if (next.notifySubjectOnAccess !== original.notifySubjectOnAccess) {
|
|
59
|
+
const onOff = (value: boolean) => (value ? "on" : "off");
|
|
60
|
+
changes.push(`Notify subject on access: ${onOff(original.notifySubjectOnAccess)} → ${onOff(next.notifySubjectOnAccess)}`);
|
|
61
|
+
}
|
|
62
|
+
const originalKey = toFieldsValue(original);
|
|
63
|
+
if (next.publicKey.trim() !== originalKey.publicKey || next.keyType.trim() !== originalKey.keyType) {
|
|
64
|
+
changes.push("Replace the public key");
|
|
65
|
+
}
|
|
66
|
+
if (next.fingerprint.trim() !== originalKey.fingerprint) {
|
|
67
|
+
changes.push(`Fingerprint: ${originalKey.fingerprint} → ${next.fingerprint.trim()}`);
|
|
68
|
+
}
|
|
69
|
+
if (validityChanged(originalKey, next)) {
|
|
70
|
+
changes.push(`Key validity: ${originalKey.notBefore} – ${originalKey.notAfter} → ${next.notBefore} – ${next.notAfter}`);
|
|
71
|
+
}
|
|
72
|
+
return changes;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function keyMaterialChanged(originalKey: EscrowScopeKeyAndHoldersValue, next: EscrowScopeKeyAndHoldersValue): boolean {
|
|
76
|
+
return (
|
|
77
|
+
next.publicKey.trim() !== originalKey.publicKey ||
|
|
78
|
+
next.keyType.trim() !== originalKey.keyType ||
|
|
79
|
+
next.fingerprint.trim() !== originalKey.fingerprint
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function validityChanged(originalKey: EscrowScopeKeyAndHoldersValue, next: EscrowScopeKeyAndHoldersValue): boolean {
|
|
84
|
+
return next.notBefore !== originalKey.notBefore || next.notAfter !== originalKey.notAfter;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The `publicKey` to send with an update, or `undefined` when the admin didn't touch any key field - the form only
|
|
89
|
+
* shows dates to the minute, so re-sending a rebuilt key would silently truncate the stored validity window. A date
|
|
90
|
+
* field left as loaded keeps its original epoch-ms value. `revokedAt` isn't editable here: it's carried over when
|
|
91
|
+
* only the validity window changed, and dropped when the key material itself is replaced (a new key isn't revoked).
|
|
92
|
+
*/
|
|
93
|
+
export function buildPublicKeyUpdate(original: EscrowScope, next: EscrowScopeKeyAndHoldersValue): EscrowScopePublicKey | undefined {
|
|
94
|
+
const originalKey = toFieldsValue(original);
|
|
95
|
+
const materialChanged = keyMaterialChanged(originalKey, next);
|
|
96
|
+
if (!materialChanged && !validityChanged(originalKey, next)) {
|
|
97
|
+
return undefined;
|
|
98
|
+
}
|
|
99
|
+
const key: EscrowScopePublicKey = {
|
|
100
|
+
publicKey: next.publicKey.trim(),
|
|
101
|
+
type: next.keyType.trim(),
|
|
102
|
+
fingerprint: next.fingerprint.trim(),
|
|
103
|
+
notBefore: next.notBefore === originalKey.notBefore ? original.publicKey.notBefore : new Date(next.notBefore).getTime(),
|
|
104
|
+
notAfter: next.notAfter === originalKey.notAfter ? original.publicKey.notAfter : new Date(next.notAfter).getTime(),
|
|
105
|
+
};
|
|
106
|
+
if (!materialChanged && original.publicKey.revokedAt !== undefined) {
|
|
107
|
+
key.revokedAt = original.publicKey.revokedAt;
|
|
108
|
+
}
|
|
109
|
+
return key;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export default function EscrowScopeDetailPage(props: Omit<AdminShellProps, "active"> & { params: { uid: string } }) {
|
|
113
|
+
return (
|
|
114
|
+
<AdminShell {...props} active="escrowScopes">
|
|
115
|
+
<EscrowScopeDetailContent uid={props.params.uid} adminUid={props.userUid} />
|
|
116
|
+
</AdminShell>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function EscrowScopeDetailContent({ uid, adminUid }: { uid: string; adminUid?: string }) {
|
|
121
|
+
const [original, setOriginal] = useState<EscrowScope | null>(null);
|
|
122
|
+
const [name, setName] = useState("");
|
|
123
|
+
const [description, setDescription] = useState("");
|
|
124
|
+
const [fields, setFields] = useState<EscrowScopeKeyAndHoldersValue | null>(null);
|
|
125
|
+
const [loading, setLoading] = useState(true);
|
|
126
|
+
const [error, setError] = useState<string | null>(null);
|
|
127
|
+
const [saving, setSaving] = useState(false);
|
|
128
|
+
const [saved, setSaved] = useState(false);
|
|
129
|
+
const [confirmingDelete, setConfirmingDelete] = useState(false);
|
|
130
|
+
const [deleting, setDeleting] = useState(false);
|
|
131
|
+
const [deleteError, setDeleteError] = useState<string | null>(null);
|
|
132
|
+
const [pendingChanges, setPendingChanges] = useState<string[] | null>(null);
|
|
133
|
+
|
|
134
|
+
useEffect(() => {
|
|
135
|
+
setLoading(true);
|
|
136
|
+
setError(null);
|
|
137
|
+
getEscrowScope(uid)
|
|
138
|
+
.then((loaded) => {
|
|
139
|
+
setOriginal(loaded);
|
|
140
|
+
if (loaded) {
|
|
141
|
+
setName(loaded.name);
|
|
142
|
+
setDescription(loaded.description ?? "");
|
|
143
|
+
setFields(toFieldsValue(loaded));
|
|
144
|
+
}
|
|
145
|
+
})
|
|
146
|
+
.catch((err) => setError(err instanceof ApiRequestError ? err.message : "Could not load this escrow scope."))
|
|
147
|
+
.finally(() => setLoading(false));
|
|
148
|
+
}, [uid]);
|
|
149
|
+
|
|
150
|
+
// Only ever invoked from the form below, which itself only renders once `original`/`fields` are
|
|
151
|
+
// loaded (the early returns further down cover every other state) — the non-null assertions reflect
|
|
152
|
+
// that real invariant, not an unchecked assumption. Matches `TransportRuleDetailContent.handleSubmit`'s
|
|
153
|
+
// identical pattern.
|
|
154
|
+
async function handleSubmit(e: FormEvent) {
|
|
155
|
+
e.preventDefault();
|
|
156
|
+
setError(null);
|
|
157
|
+
|
|
158
|
+
if (!name.trim()) {
|
|
159
|
+
setError("A name is required.");
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
if (!fields!.publicKey.trim() || !fields!.keyType.trim() || !fields!.fingerprint.trim()) {
|
|
163
|
+
setError("The public key, its type, and its fingerprint are all required.");
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
if (fields!.holderUserUids.length === 0) {
|
|
167
|
+
setError("At least one holder is required.");
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
if (fields!.requiredHolders < 1 || fields!.requiredHolders > fields!.holderUserUids.length) {
|
|
171
|
+
setError("Required holders must be between 1 and the number of holders.");
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
const selfError = selfAsHolderError(fields!.holderUserUids, adminUid, original!.holderUserUids);
|
|
175
|
+
if (selfError) {
|
|
176
|
+
setError(selfError);
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
const changes = describeSecurityChanges(original!, fields!);
|
|
181
|
+
if (changes.length > 0) {
|
|
182
|
+
setPendingChanges(changes);
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
await save();
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
async function save() {
|
|
189
|
+
setPendingChanges(null);
|
|
190
|
+
setSaving(true);
|
|
191
|
+
setSaved(false);
|
|
192
|
+
try {
|
|
193
|
+
const updated = await updateEscrowScope({
|
|
194
|
+
uid: original!.uid,
|
|
195
|
+
version: original!.version,
|
|
196
|
+
name: name.trim(),
|
|
197
|
+
// `null` (not omitted) so clearing the field actually clears the stored description - an update is
|
|
198
|
+
// a merge, and an absent field is left as it was.
|
|
199
|
+
description: (description.trim() || null) as string | undefined,
|
|
200
|
+
publicKey: buildPublicKeyUpdate(original!, fields!),
|
|
201
|
+
holderUserUids: fields!.holderUserUids,
|
|
202
|
+
requiredHolders: fields!.requiredHolders,
|
|
203
|
+
notifySubjectOnAccess: fields!.notifySubjectOnAccess,
|
|
204
|
+
});
|
|
205
|
+
setOriginal(updated);
|
|
206
|
+
setFields(toFieldsValue(updated));
|
|
207
|
+
setSaved(true);
|
|
208
|
+
} catch (err) {
|
|
209
|
+
setError(err instanceof ApiRequestError ? err.message : "Could not save this escrow scope.");
|
|
210
|
+
} finally {
|
|
211
|
+
setSaving(false);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// Ignored while deleting (Escape/Close; Cancel is disabled then too).
|
|
216
|
+
function closeDeleteModal() {
|
|
217
|
+
if (deleting) return;
|
|
218
|
+
setConfirmingDelete(false);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// Only ever invoked from the delete-confirmation modal below, which itself only renders once
|
|
222
|
+
// `original` is resolved — same non-null-assertion precedent as `handleSubmit` above.
|
|
223
|
+
async function handleDelete() {
|
|
224
|
+
setDeleting(true);
|
|
225
|
+
setDeleteError(null);
|
|
226
|
+
try {
|
|
227
|
+
await deleteEscrowScope(original!.uid, original!.version);
|
|
228
|
+
window.location.href = "/admin/escrow-scopes";
|
|
229
|
+
} catch (err) {
|
|
230
|
+
// Most commonly a 409 ("referenced by an existing Matter") — see `deleteEscrowScope()`'s own
|
|
231
|
+
// doc comment - surfaced as-is rather than special-cased.
|
|
232
|
+
setDeleteError(err instanceof ApiRequestError ? err.message : "Could not delete this escrow scope.");
|
|
233
|
+
setDeleting(false);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
if (loading) {
|
|
238
|
+
return <p className="text-sm text-text-muted">Loading…</p>;
|
|
239
|
+
}
|
|
240
|
+
if (error && !original) {
|
|
241
|
+
return <Alert>{error}</Alert>;
|
|
242
|
+
}
|
|
243
|
+
if (!original || !fields) {
|
|
244
|
+
return <Alert>Escrow scope not found.</Alert>;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
return (
|
|
248
|
+
<div className="max-w-3xl">
|
|
249
|
+
<div className="flex items-start justify-between gap-4 mb-1">
|
|
250
|
+
<div>
|
|
251
|
+
<a href="/admin/escrow-scopes" className="text-sm text-primary-dark hover:underline">
|
|
252
|
+
← All escrow scopes
|
|
253
|
+
</a>
|
|
254
|
+
<h1 className="text-xl font-bold tracking-tight mt-1">{original.name}</h1>
|
|
255
|
+
</div>
|
|
256
|
+
<Button
|
|
257
|
+
type="button"
|
|
258
|
+
variant="secondary"
|
|
259
|
+
className="!w-auto shrink-0 !border-danger !text-danger hover:!border-danger hover:!text-danger"
|
|
260
|
+
onClick={() => setConfirmingDelete(true)}
|
|
261
|
+
>
|
|
262
|
+
Delete scope
|
|
263
|
+
</Button>
|
|
264
|
+
</div>
|
|
265
|
+
|
|
266
|
+
{error && <Alert>{error}</Alert>}
|
|
267
|
+
{saved && !error && <div className="mb-4 text-sm text-success font-medium">Saved.</div>}
|
|
268
|
+
|
|
269
|
+
<form onSubmit={handleSubmit} className="flex flex-col gap-5 mt-4">
|
|
270
|
+
<div className="bg-surface border border-border rounded-md p-6">
|
|
271
|
+
<FormField label="Name" htmlFor="name">
|
|
272
|
+
<input
|
|
273
|
+
id="name"
|
|
274
|
+
type="text"
|
|
275
|
+
className={INPUT_CLASS}
|
|
276
|
+
value={name}
|
|
277
|
+
onChange={(e) => setName(e.target.value)}
|
|
278
|
+
/>
|
|
279
|
+
</FormField>
|
|
280
|
+
|
|
281
|
+
<FormField label="Description (optional)" htmlFor="description">
|
|
282
|
+
<input
|
|
283
|
+
id="description"
|
|
284
|
+
type="text"
|
|
285
|
+
className={INPUT_CLASS}
|
|
286
|
+
value={description}
|
|
287
|
+
onChange={(e) => setDescription(e.target.value)}
|
|
288
|
+
/>
|
|
289
|
+
</FormField>
|
|
290
|
+
</div>
|
|
291
|
+
|
|
292
|
+
<EscrowScopeKeyAndHoldersFields value={fields} onChange={setFields} />
|
|
293
|
+
|
|
294
|
+
<div>
|
|
295
|
+
<Button type="submit" loading={saving} disabled={saving} className="!w-auto">
|
|
296
|
+
Save changes
|
|
297
|
+
</Button>
|
|
298
|
+
</div>
|
|
299
|
+
</form>
|
|
300
|
+
|
|
301
|
+
<Modal open={pendingChanges !== null} onClose={() => setPendingChanges(null)} title="Confirm escrow scope changes">
|
|
302
|
+
<p className="text-sm mb-3">
|
|
303
|
+
These changes decide who can recover escrowed mail under <strong>{original.name}</strong>:
|
|
304
|
+
</p>
|
|
305
|
+
<ul className="list-disc pl-5 text-sm flex flex-col gap-1 mb-3">
|
|
306
|
+
{pendingChanges?.map((change) => (
|
|
307
|
+
<li key={change} className="break-all">
|
|
308
|
+
{change}
|
|
309
|
+
</li>
|
|
310
|
+
))}
|
|
311
|
+
</ul>
|
|
312
|
+
<p className="text-xs text-text-muted">
|
|
313
|
+
The server refuses changes while an access request under this scope is still awaiting approval.
|
|
314
|
+
</p>
|
|
315
|
+
<div className="flex gap-3 justify-end mt-5">
|
|
316
|
+
<Button type="button" variant="secondary" className="!w-auto" onClick={() => setPendingChanges(null)}>
|
|
317
|
+
Cancel
|
|
318
|
+
</Button>
|
|
319
|
+
<Button type="button" className="!w-auto" onClick={() => void save()}>
|
|
320
|
+
Confirm and save
|
|
321
|
+
</Button>
|
|
322
|
+
</div>
|
|
323
|
+
</Modal>
|
|
324
|
+
|
|
325
|
+
<Modal open={confirmingDelete} onClose={closeDeleteModal} title="Delete escrow scope">
|
|
326
|
+
<p className="text-sm mb-5">
|
|
327
|
+
Are you sure you want to delete <strong>{original.name}</strong>? This cannot be undone, and fails
|
|
328
|
+
if any Matter still references this scope.
|
|
329
|
+
</p>
|
|
330
|
+
{deleteError && <Alert>{deleteError}</Alert>}
|
|
331
|
+
<div className="flex gap-3 justify-end mt-5">
|
|
332
|
+
<Button type="button" variant="secondary" className="!w-auto" disabled={deleting} onClick={closeDeleteModal}>
|
|
333
|
+
Cancel
|
|
334
|
+
</Button>
|
|
335
|
+
<Button
|
|
336
|
+
type="button"
|
|
337
|
+
className="!w-auto !bg-none !bg-danger !border-danger hover:!bg-danger"
|
|
338
|
+
loading={deleting}
|
|
339
|
+
disabled={deleting}
|
|
340
|
+
onClick={handleDelete}
|
|
341
|
+
>
|
|
342
|
+
Delete
|
|
343
|
+
</Button>
|
|
344
|
+
</div>
|
|
345
|
+
</Modal>
|
|
346
|
+
</div>
|
|
347
|
+
);
|
|
348
|
+
}
|