@fayz-ai/admin 0.47.0 → 0.49.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/dist/ImportWizard-SYP3OXZU.js +3 -0
- package/dist/{ImportWizard-7UFB2PPF.js.map → ImportWizard-SYP3OXZU.js.map} +1 -1
- package/dist/PersonTimeline-X7JTPUWJ.js +3 -0
- package/dist/PersonTimeline-X7JTPUWJ.js.map +1 -0
- package/dist/ScheduleEditor-BXWJ7CMI.js +6 -0
- package/dist/{ScheduleEditor-MNHZCQIG.js.map → ScheduleEditor-BXWJ7CMI.js.map} +1 -1
- package/dist/SubscriptionPage-VBDDRSVW.js +8 -0
- package/dist/{SubscriptionPage-JWWS44SE.js.map → SubscriptionPage-VBDDRSVW.js.map} +1 -1
- package/dist/access/ModuleUnavailable.d.ts +14 -0
- package/dist/access/ModuleUnavailable.d.ts.map +1 -0
- package/dist/access/context.d.ts.map +1 -1
- package/dist/access/useModuleAccess.d.ts +11 -0
- package/dist/access/useModuleAccess.d.ts.map +1 -0
- package/dist/app/AdminShell.d.ts +1 -1
- package/dist/app/AdminShell.d.ts.map +1 -1
- package/dist/app/OfflineBoot.d.ts.map +1 -1
- package/dist/app/admin-app.d.ts +1 -1
- package/dist/app/admin-app.d.ts.map +1 -1
- package/dist/app/config.d.ts +3 -3
- package/dist/app/config.d.ts.map +1 -1
- package/dist/app/rail-preset.d.ts.map +1 -1
- package/dist/billing/TrialWidget.d.ts.map +1 -1
- package/dist/billing/ai-usage.d.ts +67 -0
- package/dist/billing/ai-usage.d.ts.map +1 -0
- package/dist/billing/index.d.ts +2 -0
- package/dist/billing/index.d.ts.map +1 -1
- package/dist/billing/index.js +3 -2
- package/dist/billing/module-families.d.ts +25 -0
- package/dist/billing/module-families.d.ts.map +1 -0
- package/dist/billing/module-pricing.d.ts +199 -0
- package/dist/billing/module-pricing.d.ts.map +1 -0
- package/dist/{chunk-IUCDHAAB.js → chunk-2Q6QHTZV.js} +13 -78
- package/dist/chunk-2Q6QHTZV.js.map +1 -0
- package/dist/{chunk-46UABOOC.js → chunk-5GCC7YCE.js} +40 -39
- package/dist/chunk-5GCC7YCE.js.map +1 -0
- package/dist/{chunk-WXNTUCX3.js → chunk-E4MESMNR.js} +10 -4
- package/dist/chunk-E4MESMNR.js.map +1 -0
- package/dist/chunk-F346TYKO.js +1448 -0
- package/dist/chunk-F346TYKO.js.map +1 -0
- package/dist/chunk-GZWX4ZIK.js +111 -0
- package/dist/chunk-GZWX4ZIK.js.map +1 -0
- package/dist/{chunk-OINP2UYL.js → chunk-KVIINVY6.js} +133 -169
- package/dist/chunk-KVIINVY6.js.map +1 -0
- package/dist/chunk-OEY3V6J3.js +581 -0
- package/dist/chunk-OEY3V6J3.js.map +1 -0
- package/dist/{chunk-V2IBAF4O.js → chunk-ZMP52ZHM.js} +23 -83
- package/dist/chunk-ZMP52ZHM.js.map +1 -0
- package/dist/components/RightRail.d.ts.map +1 -1
- package/dist/components/auth/CenteredLogin.d.ts +1 -1
- package/dist/components/auth/CenteredLogin.d.ts.map +1 -1
- package/dist/components/auth/LoginForm.d.ts +1 -1
- package/dist/components/auth/LoginForm.d.ts.map +1 -1
- package/dist/components/auth/LoginPage.d.ts +1 -1
- package/dist/components/auth/LoginPage.d.ts.map +1 -1
- package/dist/components/auth/OAuthButtons.d.ts +1 -1
- package/dist/components/auth/OAuthButtons.d.ts.map +1 -1
- package/dist/components/auth/ProtectedRoute.d.ts +1 -1
- package/dist/components/auth/ProtectedRoute.d.ts.map +1 -1
- package/dist/components/auth/RecoveryForm.d.ts.map +1 -1
- package/dist/components/auth/SignupForm.d.ts.map +1 -1
- package/dist/components/auth/SplitLogin.d.ts +1 -1
- package/dist/components/auth/SplitLogin.d.ts.map +1 -1
- package/dist/components/billing/AiUsageSection.d.ts +16 -0
- package/dist/components/billing/AiUsageSection.d.ts.map +1 -0
- package/dist/components/billing/InvoiceList.d.ts +1 -1
- package/dist/components/billing/InvoiceList.d.ts.map +1 -1
- package/dist/components/billing/PlanCheckoutSheet.d.ts +24 -0
- package/dist/components/billing/PlanCheckoutSheet.d.ts.map +1 -0
- package/dist/components/billing/PlanSelector.d.ts +1 -1
- package/dist/components/billing/PlanSelector.d.ts.map +1 -1
- package/dist/components/billing/PricingOverview.d.ts +20 -0
- package/dist/components/billing/PricingOverview.d.ts.map +1 -0
- package/dist/components/billing/SoftLimitWidget.d.ts.map +1 -1
- package/dist/components/billing/SubscriptionCard.d.ts +1 -1
- package/dist/components/billing/SubscriptionCard.d.ts.map +1 -1
- package/dist/components/billing/SubscriptionPage.d.ts.map +1 -1
- package/dist/components/billing/UpgradePrompt.d.ts.map +1 -1
- package/dist/components/billing/access-contract.d.ts +5 -3
- package/dist/components/billing/access-contract.d.ts.map +1 -1
- package/dist/components/billing/plan-feature.d.ts.map +1 -1
- package/dist/components/chat/AssistantActivityBar.d.ts.map +1 -1
- package/dist/components/chat/AssistantInvite.d.ts.map +1 -1
- package/dist/components/chat/AssistantRecordingView.d.ts.map +1 -1
- package/dist/components/chat/ChatAttachments.d.ts.map +1 -1
- package/dist/components/chat/ChatComposer.d.ts.map +1 -1
- package/dist/components/chat/ChatConversation.d.ts.map +1 -1
- package/dist/components/chat/ChatFab.d.ts.map +1 -1
- package/dist/components/chat/ChatHistory.d.ts.map +1 -1
- package/dist/components/chat/ChatMessages.d.ts.map +1 -1
- package/dist/components/chat/ChatSuggestions.d.ts.map +1 -1
- package/dist/components/chat/ChoiceCard.d.ts.map +1 -1
- package/dist/components/chat/ConfirmActionCard.d.ts.map +1 -1
- package/dist/components/chat/ConnectorSuggestionCard.d.ts.map +1 -1
- package/dist/components/chat/RecordChip.d.ts.map +1 -1
- package/dist/components/chat/TourCoachCard.d.ts.map +1 -1
- package/dist/components/connect/AddConnectorPanel.d.ts.map +1 -1
- package/dist/components/connect/ConnectConsentPage.d.ts.map +1 -1
- package/dist/components/connect/ConnectorDetail.d.ts.map +1 -1
- package/dist/components/connect/ConnectorRow.d.ts.map +1 -1
- package/dist/components/connect/ConnectorSyncActions.d.ts.map +1 -1
- package/dist/components/connect/ConnectorsPanel.d.ts.map +1 -1
- package/dist/components/layout/BottomNav.d.ts.map +1 -1
- package/dist/components/notifications/NotificationInbox.d.ts +1 -1
- package/dist/components/notifications/NotificationInbox.d.ts.map +1 -1
- package/dist/components/notifications/UpdateReady.d.ts.map +1 -1
- package/dist/components/organization/PermissionMatrixEditor.d.ts.map +1 -1
- package/dist/components/organization/PermissionProfilesTab.d.ts.map +1 -1
- package/dist/components/organization/TeamTab.d.ts.map +1 -1
- package/dist/components/plugins/ConnectorsHub.d.ts.map +1 -1
- package/dist/components/plugins/PluginSettingsPanel.d.ts.map +1 -1
- package/dist/components/settings/AddModulesPanel.d.ts.map +1 -1
- package/dist/components/settings/BrandingSettings.d.ts.map +1 -1
- package/dist/components/settings/CompanySettings.d.ts +1 -1
- package/dist/components/settings/CompanySettings.d.ts.map +1 -1
- package/dist/components/settings/ConnectedCompanySettings.d.ts.map +1 -1
- package/dist/components/settings/ConnectedFieldRulesSettings.d.ts.map +1 -1
- package/dist/components/settings/ConnectedModulesSettings.d.ts.map +1 -1
- package/dist/components/settings/ConnectedSecuritySettings.d.ts.map +1 -1
- package/dist/components/settings/FieldRulesEditor.d.ts +12 -0
- package/dist/components/settings/FieldRulesEditor.d.ts.map +1 -0
- package/dist/components/settings/FieldRulesSettings.d.ts.map +1 -1
- package/dist/components/settings/HolidaysSettings.d.ts.map +1 -1
- package/dist/components/settings/ModuleCard.d.ts +18 -3
- package/dist/components/settings/ModuleCard.d.ts.map +1 -1
- package/dist/components/settings/ModuleFamilyBits.d.ts +4 -0
- package/dist/components/settings/ModuleFamilyBits.d.ts.map +1 -0
- package/dist/components/settings/ModulesSettings.d.ts +3 -1
- package/dist/components/settings/ModulesSettings.d.ts.map +1 -1
- package/dist/components/settings/SecuritySettings.d.ts +1 -1
- package/dist/components/settings/SecuritySettings.d.ts.map +1 -1
- package/dist/components/settings/SettingsPage.d.ts +19 -0
- package/dist/components/settings/SettingsPage.d.ts.map +1 -1
- package/dist/components/settings/UserProfile.d.ts +1 -1
- package/dist/components/settings/UserProfile.d.ts.map +1 -1
- package/dist/components/settings/module-links.d.ts +10 -0
- package/dist/components/settings/module-links.d.ts.map +1 -0
- package/dist/components/settings/module-scope.d.ts +28 -0
- package/dist/components/settings/module-scope.d.ts.map +1 -0
- package/dist/components/settings/settings-focus.d.ts +17 -0
- package/dist/components/settings/settings-focus.d.ts.map +1 -0
- package/dist/components/settings/settings-parents.d.ts +11 -0
- package/dist/components/settings/settings-parents.d.ts.map +1 -0
- package/dist/components/settings/settings-sections.d.ts +56 -0
- package/dist/components/settings/settings-sections.d.ts.map +1 -0
- package/dist/components/settings/settings-shortcuts.d.ts +7 -0
- package/dist/components/settings/settings-shortcuts.d.ts.map +1 -0
- package/dist/components/settings/settings-subtabs.d.ts +14 -0
- package/dist/components/settings/settings-subtabs.d.ts.map +1 -0
- package/dist/components/shared/ContactPicker.d.ts.map +1 -1
- package/dist/components/shared/PersonLink.d.ts.map +1 -1
- package/dist/components/shared/RecordPickerModal.d.ts.map +1 -1
- package/dist/components/survey/PublicSurveyPage.d.ts.map +1 -1
- package/dist/crud/CrudDetailPage.d.ts.map +1 -1
- package/dist/crud/CrudFormPage.d.ts.map +1 -1
- package/dist/crud/CrudListView.d.ts.map +1 -1
- package/dist/crud/CrudPage.d.ts.map +1 -1
- package/dist/crud/EntityOverview.d.ts.map +1 -1
- package/dist/crud/ImportWizard.d.ts.map +1 -1
- package/dist/crud/InlineField.d.ts +36 -0
- package/dist/crud/InlineField.d.ts.map +1 -0
- package/dist/crud/LookupCreateInline.d.ts.map +1 -1
- package/dist/crud/RelatedSection.d.ts.map +1 -1
- package/dist/crud/TagsField.d.ts.map +1 -1
- package/dist/crud/archetypes/AccessTab.d.ts.map +1 -1
- package/dist/crud/archetypes/ActiveToggle.d.ts.map +1 -1
- package/dist/crud/archetypes/AddressFormModal.d.ts +34 -0
- package/dist/crud/archetypes/AddressFormModal.d.ts.map +1 -0
- package/dist/crud/archetypes/AddressesTab.d.ts +2 -20
- package/dist/crud/archetypes/AddressesTab.d.ts.map +1 -1
- package/dist/crud/archetypes/ArchetypeStatusBar.d.ts.map +1 -1
- package/dist/crud/archetypes/BlockSettingsPopover.d.ts +1 -1
- package/dist/crud/archetypes/BlockSettingsPopover.d.ts.map +1 -1
- package/dist/crud/archetypes/ClientOrdersTab.d.ts.map +1 -1
- package/dist/crud/archetypes/KanbanBoard.d.ts.map +1 -1
- package/dist/crud/archetypes/LocationFormLayout.d.ts.map +1 -1
- package/dist/crud/archetypes/OrderBoardView.d.ts.map +1 -1
- package/dist/crud/archetypes/OrderCreateScreen.d.ts +3 -1
- package/dist/crud/archetypes/OrderCreateScreen.d.ts.map +1 -1
- package/dist/crud/archetypes/OrderDetailPage.d.ts.map +1 -1
- package/dist/crud/archetypes/OrderDetailRail.d.ts.map +1 -1
- package/dist/crud/archetypes/OrderFormView.d.ts.map +1 -1
- package/dist/crud/archetypes/PayeeAccountsSection.d.ts.map +1 -1
- package/dist/crud/archetypes/PaymentStatusBadge.d.ts.map +1 -1
- package/dist/crud/archetypes/PersonPicker.d.ts.map +1 -1
- package/dist/crud/archetypes/ScheduleDateExceptions.d.ts.map +1 -1
- package/dist/crud/archetypes/ScheduleGridPanel.d.ts.map +1 -1
- package/dist/crud/fieldToColumn.d.ts.map +1 -1
- package/dist/db.cjs +831 -5
- package/dist/db.d.ts +2 -1
- package/dist/db.d.ts.map +1 -1
- package/dist/db.js +1 -1
- package/dist/directory/AppSwitcher.d.ts.map +1 -1
- package/dist/handbook/NotebookPanel.d.ts.map +1 -1
- package/dist/hooks/useAITools.d.ts.map +1 -1
- package/dist/hooks/useAuth.d.ts +3 -3
- package/dist/hooks/useAuth.d.ts.map +1 -1
- package/dist/hooks/useChat.d.ts.map +1 -1
- package/dist/hooks/useFieldRules.d.ts +4 -2
- package/dist/hooks/useFieldRules.d.ts.map +1 -1
- package/dist/hooks/useFormatters.d.ts.map +1 -1
- package/dist/hooks/useGlobalSearch.d.ts.map +1 -1
- package/dist/hooks/useLayout.d.ts.map +1 -1
- package/dist/hooks/useNotifications.d.ts +1 -1
- package/dist/hooks/useNotifications.d.ts.map +1 -1
- package/dist/hooks/useTenant.d.ts +2 -2
- package/dist/hooks/useTenant.d.ts.map +1 -1
- package/dist/hooks/useTenantPlugins.d.ts +1 -1
- package/dist/impersonation/ImpersonationBanner.d.ts.map +1 -1
- package/dist/index.d.ts +51 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4997 -4563
- package/dist/index.js.map +1 -1
- package/dist/lib/core-ai-tools.d.ts.map +1 -1
- package/dist/lib/currency.d.ts +6 -0
- package/dist/lib/currency.d.ts.map +1 -1
- package/dist/lib/field-rules-db.d.ts +36 -0
- package/dist/lib/field-rules-db.d.ts.map +1 -0
- package/dist/lib/report-attachments.d.ts +26 -0
- package/dist/lib/report-attachments.d.ts.map +1 -0
- package/dist/lib/tool-search.d.ts.map +1 -1
- package/dist/onboarding/ActivationProvider.d.ts.map +1 -1
- package/dist/onboarding/activation.store.d.ts +1 -1
- package/dist/onboarding/activation.store.d.ts.map +1 -1
- package/dist/onboarding/checklist.d.ts +1 -1
- package/dist/onboarding/checklist.d.ts.map +1 -1
- package/dist/onboarding/tasks.d.ts +1 -1
- package/dist/onboarding/tasks.d.ts.map +1 -1
- package/dist/org/WorkspaceChooser.d.ts.map +1 -1
- package/dist/org/WorkspaceUnitSheet.d.ts.map +1 -1
- package/dist/org/adapters/supabase.d.ts +1 -0
- package/dist/org/adapters/supabase.d.ts.map +1 -1
- package/dist/org/index.js +2 -2
- package/dist/permissions/v1-catalog.d.ts +16 -0
- package/dist/permissions/v1-catalog.d.ts.map +1 -0
- package/dist/plugins/PluginRegistryManager.d.ts.map +1 -1
- package/dist/plugins/QuickActionsButton.d.ts.map +1 -1
- package/dist/plugins/SettingsGroup.d.ts +12 -4
- package/dist/plugins/SettingsGroup.d.ts.map +1 -1
- package/dist/plugins/WidgetSlot.d.ts.map +1 -1
- package/dist/projects/ProjectsSettings.d.ts.map +1 -1
- package/dist/projects/SeuSiteWidget.d.ts.map +1 -1
- package/dist/settings/MessageTemplateRow.d.ts +16 -0
- package/dist/settings/MessageTemplateRow.d.ts.map +1 -0
- package/dist/settings/SettingsForm.d.ts +60 -0
- package/dist/settings/SettingsForm.d.ts.map +1 -0
- package/dist/settings/UnitScopePicker.d.ts +22 -0
- package/dist/settings/UnitScopePicker.d.ts.map +1 -0
- package/dist/settings/core-v1-tabs.d.ts +8 -0
- package/dist/settings/core-v1-tabs.d.ts.map +1 -0
- package/dist/settings/defineSettingsTab.d.ts +17 -0
- package/dist/settings/defineSettingsTab.d.ts.map +1 -0
- package/dist/settings/registry-parent.d.ts +8 -0
- package/dist/settings/registry-parent.d.ts.map +1 -0
- package/dist/settings/useSettingKeys.d.ts +28 -0
- package/dist/settings/useSettingKeys.d.ts.map +1 -0
- package/dist/stores/auth.store.d.ts +1 -1
- package/dist/stores/auth.store.d.ts.map +1 -1
- package/dist/stores/chat.store.d.ts.map +1 -1
- package/dist/stores/notifications.store.d.ts +1 -1
- package/dist/stores/notifications.store.d.ts.map +1 -1
- package/dist/stores/tenant.store.d.ts +1 -1
- package/dist/stores/tenant.store.d.ts.map +1 -1
- package/dist/tasks/TasksPanel.d.ts +4 -0
- package/dist/tasks/TasksPanel.d.ts.map +1 -0
- package/dist/tasks/TasksRailPanel.d.ts.map +1 -1
- package/dist/tasks/index.d.ts +15 -14
- package/dist/tasks/index.d.ts.map +1 -1
- package/dist/timeline/PersonTimeline.d.ts +1 -0
- package/dist/timeline/PersonTimeline.d.ts.map +1 -1
- package/dist/types/billing.d.ts +2 -0
- package/dist/types/billing.d.ts.map +1 -1
- package/dist/types/plugins.d.ts +2 -0
- package/dist/types/plugins.d.ts.map +1 -1
- package/dist/ui.d.ts +2 -1
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js +1 -1
- package/dist/units/MemberUnitsCell.d.ts.map +1 -1
- package/dist/units/UnitMembersTab.d.ts.map +1 -1
- package/dist/units/UnitSwitcher.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/ImportWizard-7UFB2PPF.js +0 -3
- package/dist/ScheduleEditor-MNHZCQIG.js +0 -6
- package/dist/SubscriptionPage-JWWS44SE.js +0 -9
- package/dist/access/index.d.ts +0 -12
- package/dist/access/index.d.ts.map +0 -1
- package/dist/access/resolver.d.ts +0 -2
- package/dist/access/resolver.d.ts.map +0 -1
- package/dist/app/LoginPage.d.ts +0 -3
- package/dist/app/LoginPage.d.ts.map +0 -1
- package/dist/chunk-46UABOOC.js.map +0 -1
- package/dist/chunk-IUCDHAAB.js.map +0 -1
- package/dist/chunk-OINP2UYL.js.map +0 -1
- package/dist/chunk-QOS6UAQ4.js +0 -54
- package/dist/chunk-QOS6UAQ4.js.map +0 -1
- package/dist/chunk-V2IBAF4O.js.map +0 -1
- package/dist/chunk-VH4LLIMH.js +0 -531
- package/dist/chunk-VH4LLIMH.js.map +0 -1
- package/dist/chunk-WXNTUCX3.js.map +0 -1
- package/dist/components/auth/index.d.ts +0 -7
- package/dist/components/auth/index.d.ts.map +0 -1
- package/dist/components/layout/index.d.ts +0 -6
- package/dist/components/layout/index.d.ts.map +0 -1
- package/dist/components/notifications/index.d.ts +0 -5
- package/dist/components/notifications/index.d.ts.map +0 -1
- package/dist/components/organization/index.d.ts +0 -5
- package/dist/components/organization/index.d.ts.map +0 -1
- package/dist/components/settings/index.d.ts +0 -11
- package/dist/components/settings/index.d.ts.map +0 -1
- package/dist/crud/index.d.ts +0 -18
- package/dist/crud/index.d.ts.map +0 -1
- package/dist/hooks/index.d.ts +0 -20
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/lib/format.d.ts +0 -7
- package/dist/lib/format.d.ts.map +0 -1
- package/dist/lib/plugins.d.ts +0 -2
- package/dist/lib/plugins.d.ts.map +0 -1
- package/dist/stores/billing.store.d.ts +0 -2
- package/dist/stores/billing.store.d.ts.map +0 -1
- package/dist/stores/index.d.ts +0 -13
- package/dist/stores/index.d.ts.map +0 -1
- package/dist/stores/layout.store.d.ts +0 -2
- package/dist/stores/layout.store.d.ts.map +0 -1
- package/dist/stores/permissions.store.d.ts +0 -2
- package/dist/stores/permissions.store.d.ts.map +0 -1
- package/dist/tasks/components/TaskCard.d.ts +0 -11
- package/dist/tasks/components/TaskCard.d.ts.map +0 -1
- package/dist/tasks/components/TaskDetail.d.ts +0 -5
- package/dist/tasks/components/TaskDetail.d.ts.map +0 -1
- package/dist/tasks/components/TaskLabelBadge.d.ts +0 -9
- package/dist/tasks/components/TaskLabelBadge.d.ts.map +0 -1
- package/dist/tasks/components/TaskPriorityBadge.d.ts +0 -7
- package/dist/tasks/components/TaskPriorityBadge.d.ts.map +0 -1
- package/dist/tasks/components/TaskQuickAdd.d.ts +0 -5
- package/dist/tasks/components/TaskQuickAdd.d.ts.map +0 -1
- package/dist/tasks/components/TaskSourceBadge.d.ts +0 -5
- package/dist/tasks/components/TaskSourceBadge.d.ts.map +0 -1
- package/dist/tasks/components/TaskStatusGroup.d.ts +0 -17
- package/dist/tasks/components/TaskStatusGroup.d.ts.map +0 -1
- package/dist/tasks/components/TasksFilterBar.d.ts +0 -3
- package/dist/tasks/components/TasksFilterBar.d.ts.map +0 -1
- package/dist/tasks/components/TasksPanel.d.ts +0 -14
- package/dist/tasks/components/TasksPanel.d.ts.map +0 -1
- package/dist/tasks/data/mock.d.ts +0 -3
- package/dist/tasks/data/mock.d.ts.map +0 -1
- package/dist/tasks/data/supabase.d.ts +0 -3
- package/dist/tasks/data/supabase.d.ts.map +0 -1
- package/dist/tasks/entity.d.ts +0 -11
- package/dist/tasks/entity.d.ts.map +0 -1
- package/dist/tasks/store.d.ts +0 -34
- package/dist/tasks/store.d.ts.map +0 -1
- package/dist/tasks/types.d.ts +0 -89
- package/dist/tasks/types.d.ts.map +0 -1
- package/dist/theme/index.d.ts +0 -8
- package/dist/theme/index.d.ts.map +0 -1
- package/dist/timeline/index.d.ts +0 -7
- package/dist/timeline/index.d.ts.map +0 -1
- package/dist/timeline-LECYQ4IA.js +0 -3
- package/dist/timeline-LECYQ4IA.js.map +0 -1
- package/dist/types/index.d.ts +0 -16
- package/dist/types/index.d.ts.map +0 -1
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { getFayzSupabaseClient } from './chunk-
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { toast, Skeleton, Button, TooltipProvider, Badge, DatePicker, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Input, Modal, ModalContent, ModalHeader, ModalTitle, ModalDescription, ModalBody, ModalFooter, Tabs, TabsList, TabsTrigger, TimePicker, Tooltip, TooltipTrigger, TooltipContent, Card, CardContent, TabsContent, Switch } from '@fayz-ai/ui';
|
|
1
|
+
import { getFayzSupabaseClient, useOrganizationStore } from './chunk-GZWX4ZIK.js';
|
|
2
|
+
import React3, { useState, useCallback, useEffect, useSyncExternalStore, useRef } from 'react';
|
|
3
|
+
import { toast, Skeleton, Button, TooltipProvider, Badge, DatePicker, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Input, Modal, ModalContent, ModalHeader, ModalTitle, ModalDescription, ModalBody, Checkbox, ModalFooter, Tabs, TabsList, TabsTrigger, TimePicker, Tooltip, TooltipTrigger, TooltipContent, Card, CardContent, TabsContent, Switch, Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from '@fayz-ai/ui';
|
|
5
4
|
import { getSupabaseClientOptional, globalCache, stableKey, useTranslation, todayLocal, localDateKey } from '@fayz-ai/core';
|
|
6
5
|
import { Plus, Copy, Users, CalendarOff, Trash2, Check, CalendarPlus, Clock, Save, Settings, CalendarCheck, X, ChevronDown } from 'lucide-react';
|
|
7
|
-
import { createPortal } from 'react-dom';
|
|
8
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
9
7
|
|
|
10
8
|
function parseBlockSettings(metadata) {
|
|
@@ -589,27 +587,6 @@ function BlockSettingsPopover({
|
|
|
589
587
|
onClose
|
|
590
588
|
}) {
|
|
591
589
|
const t = useTranslation();
|
|
592
|
-
const popoverRef = useRef(null);
|
|
593
|
-
const [pos, setPos] = useState({ top: 0, left: 0 });
|
|
594
|
-
useEffect(() => {
|
|
595
|
-
if (!open || !triggerRef.current) return;
|
|
596
|
-
const rect = triggerRef.current.getBoundingClientRect();
|
|
597
|
-
const popW = 280;
|
|
598
|
-
let left = rect.left + rect.width / 2 - popW / 2;
|
|
599
|
-
if (left + popW > window.innerWidth - 12) left = window.innerWidth - popW - 12;
|
|
600
|
-
if (left < 8) left = 8;
|
|
601
|
-
setPos({ top: rect.bottom + 6, left });
|
|
602
|
-
}, [open, triggerRef]);
|
|
603
|
-
useEffect(() => {
|
|
604
|
-
if (!open) return;
|
|
605
|
-
const handler = (e) => {
|
|
606
|
-
if (popoverRef.current?.contains(e.target)) return;
|
|
607
|
-
if (triggerRef.current?.contains(e.target)) return;
|
|
608
|
-
onClose();
|
|
609
|
-
};
|
|
610
|
-
document.addEventListener("mousedown", handler);
|
|
611
|
-
return () => document.removeEventListener("mousedown", handler);
|
|
612
|
-
}, [open, onClose, triggerRef]);
|
|
613
590
|
if (!open) return null;
|
|
614
591
|
const showServices = config.showServices !== false && config.services && config.services.length > 0;
|
|
615
592
|
const showConcurrent = config.showConcurrent !== false;
|
|
@@ -618,17 +595,24 @@ function BlockSettingsPopover({
|
|
|
618
595
|
function update(patch) {
|
|
619
596
|
onChange({ ...settings, ...patch });
|
|
620
597
|
}
|
|
621
|
-
return
|
|
598
|
+
return /* @__PURE__ */ jsxs(Popover, { open: true, onOpenChange: (next) => {
|
|
599
|
+
if (!next) onClose();
|
|
600
|
+
}, children: [
|
|
601
|
+
/* @__PURE__ */ jsx(PopoverAnchor, { virtualRef: triggerRef }),
|
|
622
602
|
/* @__PURE__ */ jsxs(
|
|
623
|
-
|
|
603
|
+
PopoverContent,
|
|
624
604
|
{
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
605
|
+
align: "center",
|
|
606
|
+
sideOffset: 6,
|
|
607
|
+
collisionPadding: 8,
|
|
608
|
+
onInteractOutside: (e) => {
|
|
609
|
+
if (triggerRef.current?.contains(e.target)) e.preventDefault();
|
|
610
|
+
},
|
|
611
|
+
className: "w-[280px] shadow-xl",
|
|
628
612
|
children: [
|
|
629
613
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-3 py-2.5 border-b", children: [
|
|
630
614
|
/* @__PURE__ */ jsx("span", { className: "text-xs font-semibold", children: t("schedule.blockSettings.title") }),
|
|
631
|
-
/* @__PURE__ */ jsx("
|
|
615
|
+
/* @__PURE__ */ jsx(Button, { variant: "bare", size: "bare", type: "button", onClick: onClose, className: "p-0.5 rounded text-muted-foreground hover:text-foreground", children: /* @__PURE__ */ jsx(X, { className: "h-3.5 w-3.5" }) })
|
|
632
616
|
] }),
|
|
633
617
|
/* @__PURE__ */ jsxs("div", { className: "p-3 space-y-3", children: [
|
|
634
618
|
showLocations && /* @__PURE__ */ jsx(
|
|
@@ -651,21 +635,25 @@ function BlockSettingsPopover({
|
|
|
651
635
|
/* @__PURE__ */ jsx("label", { className: "text-[11px] font-medium text-muted-foreground", children: t("schedule.blockSettings.maxConcurrent") }),
|
|
652
636
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mt-1", children: [
|
|
653
637
|
/* @__PURE__ */ jsx(
|
|
654
|
-
|
|
638
|
+
Button,
|
|
655
639
|
{
|
|
640
|
+
variant: "bare",
|
|
641
|
+
size: "bare",
|
|
656
642
|
type: "button",
|
|
657
643
|
onClick: () => update({ maxConcurrent: Math.max(1, (settings.maxConcurrent ?? config.defaults.maxConcurrent) - 1) }),
|
|
658
|
-
className: "flex h-7 w-7 items-center justify-center rounded-md border text-sm hover:bg-muted bg-card shadow-button active:shadow-button-inset transition-colors",
|
|
644
|
+
className: "flex h-7 w-7 items-center justify-center rounded-md border text-sm hover:bg-muted bg-card shadow-button active:shadow-button-inset transition-colors whitespace-normal font-normal",
|
|
659
645
|
children: "-"
|
|
660
646
|
}
|
|
661
647
|
),
|
|
662
648
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium w-6 text-center", children: settings.maxConcurrent ?? config.defaults.maxConcurrent }),
|
|
663
649
|
/* @__PURE__ */ jsx(
|
|
664
|
-
|
|
650
|
+
Button,
|
|
665
651
|
{
|
|
652
|
+
variant: "bare",
|
|
653
|
+
size: "bare",
|
|
666
654
|
type: "button",
|
|
667
655
|
onClick: () => update({ maxConcurrent: (settings.maxConcurrent ?? config.defaults.maxConcurrent) + 1 }),
|
|
668
|
-
className: "flex h-7 w-7 items-center justify-center rounded-md border text-sm hover:bg-muted bg-card shadow-button active:shadow-button-inset transition-colors",
|
|
656
|
+
className: "flex h-7 w-7 items-center justify-center rounded-md border text-sm hover:bg-muted bg-card shadow-button active:shadow-button-inset transition-colors whitespace-normal font-normal",
|
|
669
657
|
children: "+"
|
|
670
658
|
}
|
|
671
659
|
)
|
|
@@ -676,13 +664,14 @@ function BlockSettingsPopover({
|
|
|
676
664
|
/* @__PURE__ */ jsx("label", { className: "text-[11px] font-medium text-muted-foreground", children: t("schedule.blockSettings.minAdvance") }),
|
|
677
665
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 mt-1", children: [
|
|
678
666
|
/* @__PURE__ */ jsx(
|
|
679
|
-
|
|
667
|
+
Input,
|
|
680
668
|
{
|
|
681
669
|
type: "number",
|
|
682
670
|
min: 0,
|
|
683
671
|
value: settings.minAdvanceHours ?? config.defaults.minAdvanceHours,
|
|
684
672
|
onChange: (e) => update({ minAdvanceHours: Number(e.target.value) || 0 }),
|
|
685
|
-
|
|
673
|
+
wrapperClassName: "min-w-0 flex-1",
|
|
674
|
+
className: "h-auto px-2 py-1 text-xs tabular-nums"
|
|
686
675
|
}
|
|
687
676
|
),
|
|
688
677
|
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-muted-foreground shrink-0", children: t("schedule.blockSettings.hrs") })
|
|
@@ -692,13 +681,14 @@ function BlockSettingsPopover({
|
|
|
692
681
|
/* @__PURE__ */ jsx("label", { className: "text-[11px] font-medium text-muted-foreground", children: t("schedule.blockSettings.maxAdvance") }),
|
|
693
682
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 mt-1", children: [
|
|
694
683
|
/* @__PURE__ */ jsx(
|
|
695
|
-
|
|
684
|
+
Input,
|
|
696
685
|
{
|
|
697
686
|
type: "number",
|
|
698
687
|
min: 1,
|
|
699
688
|
value: settings.maxAdvanceDays ?? config.defaults.maxAdvanceDays,
|
|
700
689
|
onChange: (e) => update({ maxAdvanceDays: Number(e.target.value) || 30 }),
|
|
701
|
-
|
|
690
|
+
wrapperClassName: "min-w-0 flex-1",
|
|
691
|
+
className: "h-auto px-2 py-1 text-xs tabular-nums"
|
|
702
692
|
}
|
|
703
693
|
),
|
|
704
694
|
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-muted-foreground shrink-0", children: t("schedule.blockSettings.days") })
|
|
@@ -708,81 +698,37 @@ function BlockSettingsPopover({
|
|
|
708
698
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
709
699
|
/* @__PURE__ */ jsx("label", { className: "text-[11px] font-medium text-muted-foreground", children: t("schedule.blockSettings.label") }),
|
|
710
700
|
/* @__PURE__ */ jsx(
|
|
711
|
-
|
|
701
|
+
Input,
|
|
712
702
|
{
|
|
713
703
|
type: "text",
|
|
714
704
|
value: settings.label ?? "",
|
|
715
705
|
onChange: (e) => update({ label: e.target.value || void 0 }),
|
|
716
706
|
placeholder: t("schedule.blockSettings.labelPlaceholder"),
|
|
717
|
-
className: "mt-1
|
|
707
|
+
className: "mt-1 h-auto px-2 py-1 text-xs placeholder:text-muted-foreground/40"
|
|
718
708
|
}
|
|
719
709
|
)
|
|
720
710
|
] })
|
|
721
711
|
] })
|
|
722
712
|
]
|
|
723
713
|
}
|
|
724
|
-
)
|
|
725
|
-
|
|
726
|
-
);
|
|
714
|
+
)
|
|
715
|
+
] });
|
|
727
716
|
}
|
|
717
|
+
var NO_LOCATION = "__none__";
|
|
728
718
|
function LocationSelect({
|
|
729
719
|
locations,
|
|
730
720
|
value,
|
|
731
721
|
onChange
|
|
732
722
|
}) {
|
|
733
723
|
const t = useTranslation();
|
|
734
|
-
|
|
735
|
-
const ref = useRef(null);
|
|
736
|
-
useEffect(() => {
|
|
737
|
-
if (!open) return;
|
|
738
|
-
const handler = (e) => {
|
|
739
|
-
if (ref.current && !ref.current.contains(e.target)) setOpen(false);
|
|
740
|
-
};
|
|
741
|
-
document.addEventListener("mousedown", handler);
|
|
742
|
-
return () => document.removeEventListener("mousedown", handler);
|
|
743
|
-
}, [open]);
|
|
744
|
-
const current = value ? locations.find((l) => l.id === value) : null;
|
|
745
|
-
const label = current ? current.name : t("schedule.blockSettings.noLocation");
|
|
746
|
-
return /* @__PURE__ */ jsxs("div", { ref, className: "relative", children: [
|
|
724
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
747
725
|
/* @__PURE__ */ jsx("label", { className: "text-[11px] font-medium text-muted-foreground", children: t("schedule.blockSettings.location") }),
|
|
748
|
-
/* @__PURE__ */ jsxs(
|
|
749
|
-
"
|
|
750
|
-
{
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
children: [
|
|
755
|
-
/* @__PURE__ */ jsx("span", { className: current ? "" : "text-muted-foreground", children: label }),
|
|
756
|
-
/* @__PURE__ */ jsx(ChevronDown, { className: "h-3 w-3 text-muted-foreground" })
|
|
757
|
-
]
|
|
758
|
-
}
|
|
759
|
-
),
|
|
760
|
-
open && /* @__PURE__ */ jsxs("div", { className: "fayz-glass-surface absolute top-full left-0 z-10 mt-1 w-full max-h-40 overflow-y-auto rounded-lg border bg-popover shadow-lg py-1", children: [
|
|
761
|
-
/* @__PURE__ */ jsx(
|
|
762
|
-
"button",
|
|
763
|
-
{
|
|
764
|
-
type: "button",
|
|
765
|
-
onClick: () => {
|
|
766
|
-
onChange("");
|
|
767
|
-
setOpen(false);
|
|
768
|
-
},
|
|
769
|
-
className: `block w-full px-2.5 py-1.5 text-xs text-left transition-colors ${!value ? "bg-primary/10 text-primary font-medium" : "hover:bg-muted/50"}`,
|
|
770
|
-
children: t("schedule.blockSettings.noLocation")
|
|
771
|
-
}
|
|
772
|
-
),
|
|
773
|
-
locations.map((l) => /* @__PURE__ */ jsx(
|
|
774
|
-
"button",
|
|
775
|
-
{
|
|
776
|
-
type: "button",
|
|
777
|
-
onClick: () => {
|
|
778
|
-
onChange(l.id);
|
|
779
|
-
setOpen(false);
|
|
780
|
-
},
|
|
781
|
-
className: `block w-full px-2.5 py-1.5 text-xs text-left transition-colors ${l.id === value ? "bg-primary/10 text-primary font-medium" : "hover:bg-muted/50"}`,
|
|
782
|
-
children: l.name
|
|
783
|
-
},
|
|
784
|
-
l.id
|
|
785
|
-
))
|
|
726
|
+
/* @__PURE__ */ jsxs(Select, { value: value || NO_LOCATION, onValueChange: (v) => onChange(v === NO_LOCATION ? "" : v), children: [
|
|
727
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "mt-1 h-auto px-2 py-1.5 text-xs data-[placeholder]:text-muted-foreground", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
|
|
728
|
+
/* @__PURE__ */ jsxs(SelectContent, { children: [
|
|
729
|
+
/* @__PURE__ */ jsx(SelectItem, { value: NO_LOCATION, className: "text-xs text-muted-foreground", children: t("schedule.blockSettings.noLocation") }),
|
|
730
|
+
locations.map((l) => /* @__PURE__ */ jsx(SelectItem, { value: l.id, className: "text-xs", children: l.name }, l.id))
|
|
731
|
+
] })
|
|
786
732
|
] })
|
|
787
733
|
] });
|
|
788
734
|
}
|
|
@@ -792,61 +738,58 @@ function ServiceSelect({
|
|
|
792
738
|
onChange
|
|
793
739
|
}) {
|
|
794
740
|
const t = useTranslation();
|
|
795
|
-
const [open, setOpen] = useState(false);
|
|
796
|
-
const ref = useRef(null);
|
|
797
|
-
useEffect(() => {
|
|
798
|
-
if (!open) return;
|
|
799
|
-
const handler = (e) => {
|
|
800
|
-
if (ref.current && !ref.current.contains(e.target)) setOpen(false);
|
|
801
|
-
};
|
|
802
|
-
document.addEventListener("mousedown", handler);
|
|
803
|
-
return () => document.removeEventListener("mousedown", handler);
|
|
804
|
-
}, [open]);
|
|
805
741
|
const allSelected = selected.length === 0;
|
|
806
742
|
const label = allSelected ? t("schedule.blockSettings.allServices") : selected.length === 1 ? services.find((s) => s.id === selected[0])?.name ?? t("schedule.blockSettings.oneService") : t("schedule.blockSettings.nServices", { count: selected.length });
|
|
807
743
|
function toggle(id) {
|
|
808
744
|
onChange(selected.includes(id) ? selected.filter((s) => s !== id) : [...selected, id]);
|
|
809
745
|
}
|
|
810
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
746
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
811
747
|
/* @__PURE__ */ jsx("label", { className: "text-[11px] font-medium text-muted-foreground", children: t("schedule.blockSettings.allowedServices") }),
|
|
812
|
-
/* @__PURE__ */ jsxs(
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
type: "button",
|
|
816
|
-
onClick: () => setOpen((p) => !p),
|
|
817
|
-
className: "mt-1 flex items-center justify-between w-full rounded-input border border-input bg-card shadow-[inset_0_1px_0_rgb(0_0_0_/0.06)] px-2 py-1.5 text-xs hover:bg-muted/30 transition-colors",
|
|
818
|
-
children: [
|
|
819
|
-
/* @__PURE__ */ jsx("span", { className: allSelected ? "text-muted-foreground" : "", children: label }),
|
|
820
|
-
/* @__PURE__ */ jsx(ChevronDown, { className: "h-3 w-3 text-muted-foreground" })
|
|
821
|
-
]
|
|
822
|
-
}
|
|
823
|
-
),
|
|
824
|
-
open && /* @__PURE__ */ jsxs("div", { className: "fayz-glass-surface absolute top-full left-0 z-10 mt-1 w-full max-h-40 overflow-y-auto rounded-lg border bg-popover shadow-lg py-1", children: [
|
|
825
|
-
/* @__PURE__ */ jsx(
|
|
826
|
-
"button",
|
|
748
|
+
/* @__PURE__ */ jsxs(Popover, { children: [
|
|
749
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
750
|
+
Button,
|
|
827
751
|
{
|
|
752
|
+
variant: "bare",
|
|
753
|
+
size: "bare",
|
|
828
754
|
type: "button",
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
755
|
+
className: "mt-1 flex items-center justify-between w-full rounded-input border border-input bg-card shadow-[inset_0_1px_0_rgb(0_0_0_/0.06)] px-2 py-1.5 text-xs hover:bg-muted/30 transition-colors gap-0 whitespace-normal font-normal",
|
|
756
|
+
children: [
|
|
757
|
+
/* @__PURE__ */ jsx("span", { className: allSelected ? "text-muted-foreground" : "", children: label }),
|
|
758
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "h-3 w-3 text-muted-foreground" })
|
|
759
|
+
]
|
|
832
760
|
}
|
|
833
|
-
),
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
"button",
|
|
761
|
+
) }),
|
|
762
|
+
/* @__PURE__ */ jsxs(PopoverContent, { className: "max-h-40 w-[var(--radix-popover-trigger-width)] overflow-y-auto rounded-lg py-1", children: [
|
|
763
|
+
/* @__PURE__ */ jsx(
|
|
764
|
+
Button,
|
|
838
765
|
{
|
|
766
|
+
variant: "bare",
|
|
767
|
+
size: "bare",
|
|
839
768
|
type: "button",
|
|
840
|
-
onClick: () =>
|
|
841
|
-
className: `
|
|
842
|
-
children:
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
769
|
+
onClick: () => onChange([]),
|
|
770
|
+
className: `whitespace-normal font-normal rounded-none block w-full px-2.5 py-1.5 text-xs text-left transition-colors ${allSelected ? "bg-primary/10 text-primary font-medium" : "hover:bg-muted/50"}`,
|
|
771
|
+
children: t("schedule.blockSettings.allServices")
|
|
772
|
+
}
|
|
773
|
+
),
|
|
774
|
+
services.map((s) => {
|
|
775
|
+
const checked = selected.includes(s.id);
|
|
776
|
+
return /* @__PURE__ */ jsxs(
|
|
777
|
+
Button,
|
|
778
|
+
{
|
|
779
|
+
variant: "bare",
|
|
780
|
+
size: "bare",
|
|
781
|
+
type: "button",
|
|
782
|
+
onClick: () => toggle(s.id),
|
|
783
|
+
className: `justify-start whitespace-normal font-normal rounded-none flex items-center gap-2 w-full px-2.5 py-1.5 text-xs text-left transition-colors ${checked ? "bg-primary/5" : "hover:bg-muted/50"}`,
|
|
784
|
+
children: [
|
|
785
|
+
/* @__PURE__ */ jsx("span", { className: `flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-sm border ${checked ? "border-primary bg-primary text-primary-foreground" : "border-muted-foreground/30"}`, children: checked && /* @__PURE__ */ jsx("svg", { className: "h-2.5 w-2.5", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M2 6l3 3 5-5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) }),
|
|
786
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: s.name })
|
|
787
|
+
]
|
|
788
|
+
},
|
|
789
|
+
s.id
|
|
790
|
+
);
|
|
791
|
+
})
|
|
792
|
+
] })
|
|
850
793
|
] })
|
|
851
794
|
] });
|
|
852
795
|
}
|
|
@@ -940,13 +883,15 @@ function PeriodBox({
|
|
|
940
883
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
941
884
|
blockConfig && /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
942
885
|
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
943
|
-
|
|
886
|
+
Button,
|
|
944
887
|
{
|
|
888
|
+
variant: "bare",
|
|
889
|
+
size: "bare",
|
|
945
890
|
ref: gearRef,
|
|
946
891
|
type: "button",
|
|
947
892
|
onClick: () => setSettingsOpen((v) => !v),
|
|
948
893
|
"aria-label": t("schedule.grid.configure"),
|
|
949
|
-
className: "flex flex-1 items-center gap-1 rounded px-1 py-0.5 text-[11px] transition-colors " + (hasSettings ? "text-primary" : "text-muted-foreground hover:bg-muted hover:text-foreground"),
|
|
894
|
+
className: "flex flex-1 items-center gap-1 rounded px-1 py-0.5 text-[11px] transition-colors justify-start whitespace-normal font-normal" + (hasSettings ? "text-primary" : "text-muted-foreground hover:bg-muted hover:text-foreground"),
|
|
950
895
|
children: [
|
|
951
896
|
/* @__PURE__ */ jsx(Settings, { className: "h-3 w-3 shrink-0" }),
|
|
952
897
|
t("schedule.grid.configure")
|
|
@@ -957,8 +902,10 @@ function PeriodBox({
|
|
|
957
902
|
] }),
|
|
958
903
|
/* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
959
904
|
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
960
|
-
|
|
905
|
+
Button,
|
|
961
906
|
{
|
|
907
|
+
variant: "bare",
|
|
908
|
+
size: "bare",
|
|
962
909
|
type: "button",
|
|
963
910
|
onClick: onCopyToAll,
|
|
964
911
|
"aria-label": t("schedule.editor.copyToAll"),
|
|
@@ -970,11 +917,13 @@ function PeriodBox({
|
|
|
970
917
|
] })
|
|
971
918
|
] }),
|
|
972
919
|
/* @__PURE__ */ jsxs(
|
|
973
|
-
|
|
920
|
+
Button,
|
|
974
921
|
{
|
|
922
|
+
variant: "bare",
|
|
923
|
+
size: "bare",
|
|
975
924
|
type: "button",
|
|
976
925
|
onClick: onRemove,
|
|
977
|
-
className: "flex w-full items-center gap-1 rounded px-1 py-0.5 text-[11px] text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive",
|
|
926
|
+
className: "flex w-full items-center gap-1 rounded px-1 py-0.5 text-[11px] text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive justify-start whitespace-normal font-normal",
|
|
978
927
|
children: [
|
|
979
928
|
/* @__PURE__ */ jsx(Trash2, { className: "h-3 w-3 shrink-0" }),
|
|
980
929
|
t("schedule.grid.removePeriod")
|
|
@@ -1181,11 +1130,13 @@ function ScheduleGridPanel({ assigneeId, kind, onSaved }) {
|
|
|
1181
1130
|
grids.map((g) => {
|
|
1182
1131
|
const active = gridKeyOf(g) === gridKeyOf(draft) && !isNew;
|
|
1183
1132
|
return /* @__PURE__ */ jsxs(
|
|
1184
|
-
|
|
1133
|
+
Button,
|
|
1185
1134
|
{
|
|
1135
|
+
variant: "bare",
|
|
1136
|
+
size: "bare",
|
|
1186
1137
|
type: "button",
|
|
1187
1138
|
onClick: () => selectGrid(g),
|
|
1188
|
-
className: "min-w-[13rem] rounded-lg border px-3 py-2 text-left transition-colors " + (active ? "border-primary bg-primary/5" : "border-border hover:bg-muted/50"),
|
|
1139
|
+
className: "min-w-[13rem] rounded-lg border px-3 py-2 text-left transition-colors inline-block whitespace-normal text-[length:inherit] font-normal" + (active ? "border-primary bg-primary/5" : "border-border hover:bg-muted/50"),
|
|
1189
1140
|
children: [
|
|
1190
1141
|
/* @__PURE__ */ jsxs("span", { className: "block text-sm font-medium tabular-nums", children: [
|
|
1191
1142
|
formatDay(g.validFrom),
|
|
@@ -1206,11 +1157,13 @@ function ScheduleGridPanel({ assigneeId, kind, onSaved }) {
|
|
|
1206
1157
|
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: t("schedule.grid.notSavedYet") })
|
|
1207
1158
|
] }),
|
|
1208
1159
|
/* @__PURE__ */ jsxs(
|
|
1209
|
-
|
|
1160
|
+
Button,
|
|
1210
1161
|
{
|
|
1162
|
+
variant: "bare",
|
|
1163
|
+
size: "bare",
|
|
1211
1164
|
type: "button",
|
|
1212
1165
|
onClick: startNew,
|
|
1213
|
-
className: "flex min-w-[9rem] items-center justify-center gap-1.5 rounded-lg border border-dashed px-3 py-2 text-sm text-muted-foreground transition-colors hover:border-primary hover:text-foreground",
|
|
1166
|
+
className: "flex min-w-[9rem] items-center justify-center gap-1.5 rounded-lg border border-dashed px-3 py-2 text-sm text-muted-foreground transition-colors hover:border-primary hover:text-foreground whitespace-normal font-normal",
|
|
1214
1167
|
children: [
|
|
1215
1168
|
/* @__PURE__ */ jsx(Plus, { className: "h-4 w-4" }),
|
|
1216
1169
|
t("schedule.grid.newGrid")
|
|
@@ -1218,11 +1171,13 @@ function ScheduleGridPanel({ assigneeId, kind, onSaved }) {
|
|
|
1218
1171
|
}
|
|
1219
1172
|
),
|
|
1220
1173
|
/* @__PURE__ */ jsxs(
|
|
1221
|
-
|
|
1174
|
+
Button,
|
|
1222
1175
|
{
|
|
1176
|
+
variant: "bare",
|
|
1177
|
+
size: "bare",
|
|
1223
1178
|
type: "button",
|
|
1224
1179
|
onClick: duplicate,
|
|
1225
|
-
className: "flex min-w-[9rem] items-center justify-center gap-1.5 rounded-lg border border-dashed px-3 py-2 text-sm text-muted-foreground transition-colors hover:border-primary hover:text-foreground",
|
|
1180
|
+
className: "flex min-w-[9rem] items-center justify-center gap-1.5 rounded-lg border border-dashed px-3 py-2 text-sm text-muted-foreground transition-colors hover:border-primary hover:text-foreground whitespace-normal font-normal",
|
|
1226
1181
|
children: [
|
|
1227
1182
|
/* @__PURE__ */ jsx(Copy, { className: "h-4 w-4" }),
|
|
1228
1183
|
t("schedule.grid.duplicate")
|
|
@@ -1230,11 +1185,13 @@ function ScheduleGridPanel({ assigneeId, kind, onSaved }) {
|
|
|
1230
1185
|
}
|
|
1231
1186
|
),
|
|
1232
1187
|
!isNew && /* @__PURE__ */ jsxs(
|
|
1233
|
-
|
|
1188
|
+
Button,
|
|
1234
1189
|
{
|
|
1190
|
+
variant: "bare",
|
|
1191
|
+
size: "bare",
|
|
1235
1192
|
type: "button",
|
|
1236
1193
|
onClick: openCopy,
|
|
1237
|
-
className: "flex min-w-[9rem] items-center justify-center gap-1.5 rounded-lg border border-dashed px-3 py-2 text-sm text-muted-foreground transition-colors hover:border-primary hover:text-foreground",
|
|
1194
|
+
className: "flex min-w-[9rem] items-center justify-center gap-1.5 rounded-lg border border-dashed px-3 py-2 text-sm text-muted-foreground transition-colors hover:border-primary hover:text-foreground whitespace-normal font-normal",
|
|
1238
1195
|
children: [
|
|
1239
1196
|
/* @__PURE__ */ jsx(Users, { className: "h-4 w-4" }),
|
|
1240
1197
|
"Copiar para\u2026"
|
|
@@ -1296,11 +1253,13 @@ function ScheduleGridPanel({ assigneeId, kind, onSaved }) {
|
|
|
1296
1253
|
p.id ?? `novo-${i}`
|
|
1297
1254
|
)) }),
|
|
1298
1255
|
/* @__PURE__ */ jsxs(
|
|
1299
|
-
|
|
1256
|
+
Button,
|
|
1300
1257
|
{
|
|
1258
|
+
variant: "bare",
|
|
1259
|
+
size: "bare",
|
|
1301
1260
|
type: "button",
|
|
1302
1261
|
onClick: () => addPeriod(dow),
|
|
1303
|
-
className: "mt-2 flex w-full items-center justify-center gap-1 rounded-md border border-dashed py-1.5 text-xs text-muted-foreground transition-colors hover:border-primary hover:text-foreground",
|
|
1262
|
+
className: "mt-2 flex w-full items-center justify-center gap-1 rounded-md border border-dashed py-1.5 text-xs text-muted-foreground transition-colors hover:border-primary hover:text-foreground whitespace-normal font-normal",
|
|
1304
1263
|
children: [
|
|
1305
1264
|
/* @__PURE__ */ jsx(Plus, { className: "h-3 w-3" }),
|
|
1306
1265
|
t("schedule.grid.add")
|
|
@@ -1359,9 +1318,8 @@ function ScheduleGridPanel({ assigneeId, kind, onSaved }) {
|
|
|
1359
1318
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-full" })
|
|
1360
1319
|
] }) : people.length === 0 ? /* @__PURE__ */ jsx("p", { className: "py-6 text-center text-sm text-muted-foreground", children: "Nenhuma outra pessoa agend\xE1vel." }) : /* @__PURE__ */ jsx("ul", { className: "max-h-72 space-y-0.5 overflow-y-auto", children: people.filter((pe) => !copyTerm.trim() || pe.name.toLowerCase().includes(copyTerm.trim().toLowerCase())).map((pe) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 rounded-md px-2 py-1.5 text-sm " + (pe.hasGrid ? "opacity-50" : "cursor-pointer hover:bg-muted"), children: [
|
|
1361
1320
|
/* @__PURE__ */ jsx(
|
|
1362
|
-
|
|
1321
|
+
Checkbox,
|
|
1363
1322
|
{
|
|
1364
|
-
type: "checkbox",
|
|
1365
1323
|
disabled: pe.hasGrid,
|
|
1366
1324
|
checked: picked.includes(pe.id),
|
|
1367
1325
|
onChange: () => setPicked((cur) => cur.includes(pe.id) ? cur.filter((x) => x !== pe.id) : [...cur, pe.id])
|
|
@@ -1581,8 +1539,10 @@ function ScheduleDateExceptions({ assigneeId, onChanged }) {
|
|
|
1581
1539
|
),
|
|
1582
1540
|
periods.length > 1 && /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
1583
1541
|
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
1584
|
-
|
|
1542
|
+
Button,
|
|
1585
1543
|
{
|
|
1544
|
+
variant: "bare",
|
|
1545
|
+
size: "bare",
|
|
1586
1546
|
type: "button",
|
|
1587
1547
|
"aria-label": t("schedule.editor.removeInterval"),
|
|
1588
1548
|
onClick: () => setPeriods(periods.filter((_, i) => i !== idx)),
|
|
@@ -1594,10 +1554,12 @@ function ScheduleDateExceptions({ assigneeId, onChanged }) {
|
|
|
1594
1554
|
] })
|
|
1595
1555
|
] }, idx)),
|
|
1596
1556
|
/* @__PURE__ */ jsxs(
|
|
1597
|
-
|
|
1557
|
+
Button,
|
|
1598
1558
|
{
|
|
1559
|
+
variant: "bare",
|
|
1560
|
+
size: "bare",
|
|
1599
1561
|
type: "button",
|
|
1600
|
-
className: "flex items-center gap-1 text-xs text-primary hover:underline",
|
|
1562
|
+
className: "flex items-center gap-1 text-xs text-primary hover:underline font-normal",
|
|
1601
1563
|
onClick: () => {
|
|
1602
1564
|
const last = periods[periods.length - 1];
|
|
1603
1565
|
setPeriods([...periods, { startsAt: last?.endsAt ?? "13:00", endsAt: "18:00" }]);
|
|
@@ -1613,13 +1575,13 @@ function ScheduleDateExceptions({ assigneeId, onChanged }) {
|
|
|
1613
1575
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
1614
1576
|
/* @__PURE__ */ jsx("label", { className: "mb-1.5 block text-xs font-medium text-muted-foreground", children: t("schedule.editor.notes") }),
|
|
1615
1577
|
/* @__PURE__ */ jsx(
|
|
1616
|
-
|
|
1578
|
+
Input,
|
|
1617
1579
|
{
|
|
1618
1580
|
type: "text",
|
|
1619
1581
|
value: notes,
|
|
1620
1582
|
onChange: (e) => setNotes(e.target.value),
|
|
1621
1583
|
placeholder: t("schedule.editor.notesPlaceholder"),
|
|
1622
|
-
className: "
|
|
1584
|
+
className: "placeholder:text-muted-foreground/40"
|
|
1623
1585
|
}
|
|
1624
1586
|
)
|
|
1625
1587
|
] })
|
|
@@ -1651,8 +1613,10 @@ function ScheduleDateExceptions({ assigneeId, onChanged }) {
|
|
|
1651
1613
|
] }),
|
|
1652
1614
|
/* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
1653
1615
|
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
1654
|
-
|
|
1616
|
+
Button,
|
|
1655
1617
|
{
|
|
1618
|
+
variant: "bare",
|
|
1619
|
+
size: "bare",
|
|
1656
1620
|
type: "button",
|
|
1657
1621
|
onClick: () => remove(ex.startDate, ex.endDate),
|
|
1658
1622
|
"aria-label": t("schedule.editor.removeException"),
|
|
@@ -1685,10 +1649,10 @@ async function setPersonBookable(personId, isBookable) {
|
|
|
1685
1649
|
}
|
|
1686
1650
|
function BookableToggle({ personId }) {
|
|
1687
1651
|
const t = useTranslation();
|
|
1688
|
-
const [value, setValue] =
|
|
1689
|
-
const [loading, setLoading] =
|
|
1690
|
-
const [saving, setSaving] =
|
|
1691
|
-
|
|
1652
|
+
const [value, setValue] = React3.useState(null);
|
|
1653
|
+
const [loading, setLoading] = React3.useState(true);
|
|
1654
|
+
const [saving, setSaving] = React3.useState(false);
|
|
1655
|
+
React3.useEffect(() => {
|
|
1692
1656
|
let cancelled = false;
|
|
1693
1657
|
setLoading(true);
|
|
1694
1658
|
getPersonBookable(personId).then((v) => {
|
|
@@ -1751,5 +1715,5 @@ function ScheduleEditor({ assigneeId, onSaved, hideBookable }) {
|
|
|
1751
1715
|
}
|
|
1752
1716
|
|
|
1753
1717
|
export { ScheduleDateExceptions, ScheduleEditor, ScheduleGridPanel, createArchetypeLookup, deleteSchedule, getPersonBookable, getPersonLookup, getScheduleBlockConfig, getSchedules, mergeBlockSettings, parseBlockSettings, registerPersonLookup, replaceWeeklySchedules, saveSchedule, setPersonBookable, setScheduleBlockConfig, subscribeScheduleBlockConfig };
|
|
1754
|
-
//# sourceMappingURL=chunk-
|
|
1755
|
-
//# sourceMappingURL=chunk-
|
|
1718
|
+
//# sourceMappingURL=chunk-KVIINVY6.js.map
|
|
1719
|
+
//# sourceMappingURL=chunk-KVIINVY6.js.map
|