simple-module-events 0.0.16__py3-none-any.whl
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.
- simple_module_events-0.0.16.dist-info/METADATA +266 -0
- simple_module_events-0.0.16.dist-info/RECORD +478 -0
- simple_module_events-0.0.16.dist-info/WHEEL +4 -0
- simple_module_events-0.0.16.dist-info/entry_points.txt +2 -0
- simple_module_events-0.0.16.dist-info/licenses/NOTICE +92 -0
- sm_events/__init__.py +1 -0
- sm_events/calendar/__init__.py +1 -0
- sm_events/calendar/calendars.py +144 -0
- sm_events/calendar/categories.py +85 -0
- sm_events/calendar/expand.py +128 -0
- sm_events/calendar/occurrence.py +86 -0
- sm_events/calendar/occurrences.py +131 -0
- sm_events/calendar/plugins/__init__.py +1 -0
- sm_events/calendar/plugins/extension_types.py +216 -0
- sm_events/calendar/plugins/extensions.py +116 -0
- sm_events/calendar/plugins/plugin_isolation.py +196 -0
- sm_events/calendar/plugins/plugin_runner.py +198 -0
- sm_events/calendar/plugins/plugin_scope.py +86 -0
- sm_events/calendar/plugins/plugin_validate.py +158 -0
- sm_events/calendar/plugins/registration_types.py +83 -0
- sm_events/calendar/plugins/registry.py +209 -0
- sm_events/calendar/plugins/registry_checks.py +157 -0
- sm_events/calendar/plugins/source_entries.py +272 -0
- sm_events/calendar/plugins/source_view.py +78 -0
- sm_events/calendar/rrule.py +216 -0
- sm_events/calendar/rrule_parts.py +157 -0
- sm_events/calendar/rrule_walk.py +207 -0
- sm_events/calendar/slugs.py +145 -0
- sm_events/calendar/sources.py +267 -0
- sm_events/calendar/times.py +162 -0
- sm_events/calendar/window.py +152 -0
- sm_events/content/__init__.py +1 -0
- sm_events/content/_core.py +231 -0
- sm_events/content/bus.py +97 -0
- sm_events/content/calendar_redirects.py +95 -0
- sm_events/content/cards.py +177 -0
- sm_events/content/events_trash.py +60 -0
- sm_events/content/events_write.py +82 -0
- sm_events/content/fields.py +46 -0
- sm_events/content/guard.py +81 -0
- sm_events/content/listing.py +108 -0
- sm_events/content/notices.py +144 -0
- sm_events/content/overrides.py +166 -0
- sm_events/content/public_read.py +157 -0
- sm_events/content/publish_due.py +139 -0
- sm_events/content/redirects.py +64 -0
- sm_events/content/revisions.py +136 -0
- sm_events/content/richtext.py +231 -0
- sm_events/content/richtext_tree.py +87 -0
- sm_events/content/schedule.py +79 -0
- sm_events/content/series_change.py +142 -0
- sm_events/content/texts.py +153 -0
- sm_events/content/types.py +83 -0
- sm_events/content/workflow.py +146 -0
- sm_events/contracts/__init__.py +17 -0
- sm_events/contracts/cards.py +144 -0
- sm_events/contracts/events.py +168 -0
- sm_events/contracts/extensions.py +75 -0
- sm_events/contracts/occurrences.py +86 -0
- sm_events/contracts/registration.py +196 -0
- sm_events/core/__init__.py +1 -0
- sm_events/core/access/__init__.py +174 -0
- sm_events/core/access/events.py +117 -0
- sm_events/core/access/offline.py +159 -0
- sm_events/core/access/public.py +43 -0
- sm_events/core/access/resource_types.py +64 -0
- sm_events/core/access/rights.py +92 -0
- sm_events/core/boot.py +184 -0
- sm_events/core/clock.py +18 -0
- sm_events/core/constants/__init__.py +279 -0
- sm_events/core/constants/extensions.py +105 -0
- sm_events/core/constants/feed_tokens.py +78 -0
- sm_events/core/constants/imports.py +158 -0
- sm_events/core/constants/names.py +5 -0
- sm_events/core/constants/public.py +81 -0
- sm_events/core/constants/registration.py +118 -0
- sm_events/core/constants/reminders.py +84 -0
- sm_events/core/constants/reminders_limits.py +83 -0
- sm_events/core/constants/subscriptions.py +255 -0
- sm_events/core/constants/subscriptions_beat.py +57 -0
- sm_events/core/crypto.py +235 -0
- sm_events/core/errors.py +274 -0
- sm_events/core/errors_extensions.py +57 -0
- sm_events/core/errors_registration.py +75 -0
- sm_events/core/errors_reminders.py +38 -0
- sm_events/core/errors_subscriptions.py +69 -0
- sm_events/core/host_settings.py +28 -0
- sm_events/core/locales.py +48 -0
- sm_events/core/public_prefix.py +42 -0
- sm_events/core/secret.py +47 -0
- sm_events/core/services.py +15 -0
- sm_events/core/settings/__init__.py +93 -0
- sm_events/core/tenancy/__init__.py +268 -0
- sm_events/core/tenancy/_guard.py +100 -0
- sm_events/core/tenancy/_mode.py +273 -0
- sm_events/core/tenancy/request_context.py +50 -0
- sm_events/core/text_safety.py +44 -0
- sm_events/core/timezones.py +36 -0
- sm_events/core/user_ids.py +54 -0
- sm_events/core/web_urls.py +60 -0
- sm_events/core/worker.py +108 -0
- sm_events/feeds/__init__.py +8 -0
- sm_events/feeds/ics_calendar.py +64 -0
- sm_events/feeds/ics_event.py +196 -0
- sm_events/feeds/ics_tz.py +26 -0
- sm_events/feeds/importing/__init__.py +18 -0
- sm_events/feeds/importing/apply.py +89 -0
- sm_events/feeds/importing/fence.py +107 -0
- sm_events/feeds/importing/janitor.py +195 -0
- sm_events/feeds/importing/launch.py +70 -0
- sm_events/feeds/importing/mapper.py +202 -0
- sm_events/feeds/importing/mapper_props.py +128 -0
- sm_events/feeds/importing/mapper_series.py +264 -0
- sm_events/feeds/importing/model.py +44 -0
- sm_events/feeds/importing/policy.py +34 -0
- sm_events/feeds/importing/preview_diff.py +57 -0
- sm_events/feeds/importing/runner.py +284 -0
- sm_events/feeds/importing/scan.py +280 -0
- sm_events/feeds/importing/staging.py +254 -0
- sm_events/feeds/importing/text.py +101 -0
- sm_events/feeds/importing/values.py +262 -0
- sm_events/feeds/importing/verdicts.py +91 -0
- sm_events/feeds/importing/write.py +278 -0
- sm_events/feeds/importing/zones.py +47 -0
- sm_events/feeds/plaintext.py +117 -0
- sm_events/feeds/plugin_items.py +129 -0
- sm_events/feeds/sanitize.py +30 -0
- sm_events/feeds/select.py +226 -0
- sm_events/feeds/subscriptions/__init__.py +14 -0
- sm_events/feeds/subscriptions/attempt.py +299 -0
- sm_events/feeds/subscriptions/client.py +110 -0
- sm_events/feeds/subscriptions/dns.py +114 -0
- sm_events/feeds/subscriptions/errors.py +28 -0
- sm_events/feeds/subscriptions/fetch.py +279 -0
- sm_events/feeds/subscriptions/fetch_signals.py +59 -0
- sm_events/feeds/subscriptions/generation.py +41 -0
- sm_events/feeds/subscriptions/items.py +154 -0
- sm_events/feeds/subscriptions/launch.py +54 -0
- sm_events/feeds/subscriptions/lease.py +105 -0
- sm_events/feeds/subscriptions/netsafe.py +100 -0
- sm_events/feeds/subscriptions/policy.py +274 -0
- sm_events/feeds/subscriptions/refresh.py +279 -0
- sm_events/feeds/subscriptions/rules.py +111 -0
- sm_events/feeds/subscriptions/schedule.py +66 -0
- sm_events/feeds/subscriptions/service.py +252 -0
- sm_events/feeds/subscriptions/shapes.py +81 -0
- sm_events/feeds/subscriptions/source.py +198 -0
- sm_events/feeds/subscriptions/store.py +170 -0
- sm_events/feeds/subscriptions/target_gate.py +109 -0
- sm_events/feeds/subscriptions/url_safety.py +184 -0
- sm_events/feeds/subscriptions/urls.py +67 -0
- sm_events/feeds/subscriptions/validate.py +109 -0
- sm_events/feeds/subscriptions/window.py +94 -0
- sm_events/feeds/tokens/__init__.py +15 -0
- sm_events/feeds/tokens/cleanup.py +150 -0
- sm_events/feeds/tokens/codec.py +33 -0
- sm_events/feeds/tokens/log_redact.py +144 -0
- sm_events/feeds/tokens/resolve.py +153 -0
- sm_events/feeds/tokens/service.py +181 -0
- sm_events/feeds/tokens/throttle.py +89 -0
- sm_events/index.ts +51 -0
- sm_events/integrations/__init__.py +1 -0
- sm_events/integrations/pagebuilder.py +60 -0
- sm_events/locales/de.json +1165 -0
- sm_events/locales/en.json +1165 -0
- sm_events/models/__init__.py +67 -0
- sm_events/models/_base.py +13 -0
- sm_events/models/_cols.py +72 -0
- sm_events/models/calendar.py +43 -0
- sm_events/models/calendar_redirect.py +26 -0
- sm_events/models/category.py +26 -0
- sm_events/models/enums.py +33 -0
- sm_events/models/event.py +83 -0
- sm_events/models/event_text.py +35 -0
- sm_events/models/external_item.py +67 -0
- sm_events/models/feed_token.py +46 -0
- sm_events/models/fetch_target.py +32 -0
- sm_events/models/imports.py +99 -0
- sm_events/models/occurrence_override.py +31 -0
- sm_events/models/redirect.py +27 -0
- sm_events/models/registration.py +60 -0
- sm_events/models/reminders.py +87 -0
- sm_events/models/revision.py +32 -0
- sm_events/models/subscription.py +114 -0
- sm_events/module.py +183 -0
- sm_events/package.json +31 -0
- sm_events/pagebuilder-blocks.ts +49 -0
- sm_events/pages/Calendar.tsx +82 -0
- sm_events/pages/Calendars.tsx +114 -0
- sm_events/pages/Categories.tsx +119 -0
- sm_events/pages/EventEditor.tsx +280 -0
- sm_events/pages/Events.tsx +157 -0
- sm_events/pages/Import.tsx +110 -0
- sm_events/pages/PublicEvent.tsx +125 -0
- sm_events/pages/PublicIndex.tsx +121 -0
- sm_events/pages/PublicNotFound.tsx +58 -0
- sm_events/pages/Reminders.tsx +31 -0
- sm_events/registration/__init__.py +2 -0
- sm_events/registration/access.py +38 -0
- sm_events/registration/args.py +92 -0
- sm_events/registration/availability.py +253 -0
- sm_events/registration/counters.py +101 -0
- sm_events/registration/guards.py +97 -0
- sm_events/registration/occurrence.py +123 -0
- sm_events/registration/provider_call.py +150 -0
- sm_events/registration/release.py +155 -0
- sm_events/registration/seat_reads.py +57 -0
- sm_events/registration/seats.py +164 -0
- sm_events/registration/settings.py +214 -0
- sm_events/registration/summaries.py +87 -0
- sm_events/reminders/__init__.py +11 -0
- sm_events/reminders/access.py +37 -0
- sm_events/reminders/availability.py +51 -0
- sm_events/reminders/candidates.py +284 -0
- sm_events/reminders/claim.py +197 -0
- sm_events/reminders/cleanup.py +172 -0
- sm_events/reminders/due.py +59 -0
- sm_events/reminders/follows.py +275 -0
- sm_events/reminders/formatting.py +77 -0
- sm_events/reminders/leads.py +65 -0
- sm_events/reminders/ledger_keys.py +42 -0
- sm_events/reminders/links.py +100 -0
- sm_events/reminders/message.py +155 -0
- sm_events/reminders/mine.py +171 -0
- sm_events/reminders/recipients.py +110 -0
- sm_events/reminders/runtime.py +86 -0
- sm_events/reminders/send.py +171 -0
- sm_events/reminders/stats.py +61 -0
- sm_events/reminders/strings.py +72 -0
- sm_events/reminders/templates/reminder.html +16 -0
- sm_events/reminders/templates/reminder.txt +9 -0
- sm_events/reminders/tick.py +243 -0
- sm_events/reminders/too_late.py +135 -0
- sm_events/reminders/worker_app.py +228 -0
- sm_events/task_config.py +80 -0
- sm_events/tasks.py +195 -0
- sm_events/ui/blocks/BlockBoundary.tsx +20 -0
- sm_events/ui/blocks/CountField.tsx +60 -0
- sm_events/ui/blocks/EventsCalendarBlock.tsx +87 -0
- sm_events/ui/blocks/EventsCalendarRender.tsx +125 -0
- sm_events/ui/blocks/UpcomingEventsBlock.tsx +118 -0
- sm_events/ui/blocks/UpcomingEventsRender.tsx +175 -0
- sm_events/ui/blocks/api-blocks.ts +55 -0
- sm_events/ui/blocks/calendarField.ts +45 -0
- sm_events/ui/blocks/calendarProps.ts +20 -0
- sm_events/ui/blocks/limits.ts +54 -0
- sm_events/ui/blocks/localizeFields.ts +62 -0
- sm_events/ui/blocks/useContentLocale.ts +21 -0
- sm_events/ui/calendar/Calendar.tsx +277 -0
- sm_events/ui/calendar/DetailPopover.tsx +130 -0
- sm_events/ui/calendar/EventChip.tsx +71 -0
- sm_events/ui/calendar/Filters.tsx +137 -0
- sm_events/ui/calendar/StatusBar.tsx +131 -0
- sm_events/ui/calendar/TimezoneToggle.tsx +42 -0
- sm_events/ui/calendar/Toolbar.tsx +90 -0
- sm_events/ui/calendar/adapter/FullCalendarGrid.tsx +170 -0
- sm_events/ui/calendar/adapter/calendar.css +46 -0
- sm_events/ui/calendar/adapter/mapping.ts +218 -0
- sm_events/ui/calendar/adapter/options.ts +55 -0
- sm_events/ui/calendar/console/ConsoleCalendar.tsx +207 -0
- sm_events/ui/calendar/console/MoveDialog.tsx +208 -0
- sm_events/ui/calendar/console/QuickCreateDialog.tsx +228 -0
- sm_events/ui/calendar/console/ScopePrompt.tsx +72 -0
- sm_events/ui/calendar/console/failure.ts +53 -0
- sm_events/ui/calendar/console/focusReturn.ts +52 -0
- sm_events/ui/calendar/console/quickCreate.ts +95 -0
- sm_events/ui/calendar/console/timeErrors.ts +24 -0
- sm_events/ui/calendar/console/urlState.ts +47 -0
- sm_events/ui/calendar/console/useCalendarWrites.tsx +202 -0
- sm_events/ui/calendar/console/writes.ts +195 -0
- sm_events/ui/calendar/data/cache.ts +44 -0
- sm_events/ui/calendar/data/useOccurrences.ts +101 -0
- sm_events/ui/calendar/lock.ts +17 -0
- sm_events/ui/calendar/time/format.ts +87 -0
- sm_events/ui/calendar/time/range.ts +47 -0
- sm_events/ui/calendar/time/zones.ts +26 -0
- sm_events/ui/calendar/types.ts +167 -0
- sm_events/ui/components/ConfirmDialog.tsx +97 -0
- sm_events/ui/components/CopyButton.tsx +27 -0
- sm_events/ui/components/calendars/CalendarDialog.tsx +268 -0
- sm_events/ui/components/calendars/CalendarRow.tsx +236 -0
- sm_events/ui/components/calendars/JsonSettings.tsx +52 -0
- sm_events/ui/components/calendars/OwnerDialog.tsx +137 -0
- sm_events/ui/components/calendars/ReminderDefaultsField.tsx +57 -0
- sm_events/ui/components/calendars/SourceRow.tsx +141 -0
- sm_events/ui/components/calendars/SourcesDialog.tsx +204 -0
- sm_events/ui/components/calendars/VisibilityMenu.tsx +96 -0
- sm_events/ui/components/calendars/sourceProblems.ts +37 -0
- sm_events/ui/components/categories/CategoryDialog.tsx +228 -0
- sm_events/ui/components/editor/ConflictPanel.tsx +77 -0
- sm_events/ui/components/editor/CustomRule.tsx +46 -0
- sm_events/ui/components/editor/EventForm.tsx +165 -0
- sm_events/ui/components/editor/LeaveDialog.tsx +43 -0
- sm_events/ui/components/editor/OccurrencesPreview.tsx +143 -0
- sm_events/ui/components/editor/OrphanDialog.tsx +61 -0
- sm_events/ui/components/editor/OverrideDialog.tsx +215 -0
- sm_events/ui/components/editor/RecurrenceEditor.tsx +234 -0
- sm_events/ui/components/editor/RecurrenceEnd.tsx +77 -0
- sm_events/ui/components/editor/RegistrationCounts.tsx +71 -0
- sm_events/ui/components/editor/RegistrationSection.tsx +250 -0
- sm_events/ui/components/editor/RejectDialog.tsx +112 -0
- sm_events/ui/components/editor/RevisionHistory.tsx +202 -0
- sm_events/ui/components/editor/RichTextField.tsx +211 -0
- sm_events/ui/components/editor/ScheduleDialog.tsx +149 -0
- sm_events/ui/components/editor/SubEvents.tsx +69 -0
- sm_events/ui/components/editor/TextsTabs.tsx +197 -0
- sm_events/ui/components/editor/TimesFields.tsx +99 -0
- sm_events/ui/components/editor/TypeSection.tsx +110 -0
- sm_events/ui/components/editor/WorkflowBar.tsx +102 -0
- sm_events/ui/components/events/EventFilters.tsx +120 -0
- sm_events/ui/components/events/EventRow.tsx +216 -0
- sm_events/ui/components/feeds/CreateLinkForm.tsx +79 -0
- sm_events/ui/components/feeds/CreatedLink.tsx +38 -0
- sm_events/ui/components/feeds/SubscribeDialog.tsx +141 -0
- sm_events/ui/components/feeds/TokenList.tsx +67 -0
- sm_events/ui/components/import/Announce.tsx +35 -0
- sm_events/ui/components/import/ImportProgress.tsx +24 -0
- sm_events/ui/components/import/ImportResult.tsx +62 -0
- sm_events/ui/components/import/ItemRows.tsx +140 -0
- sm_events/ui/components/import/PreviewTable.tsx +87 -0
- sm_events/ui/components/import/UploadForm.tsx +82 -0
- sm_events/ui/components/reminders/DeliveryCard.tsx +66 -0
- sm_events/ui/components/reminders/EditLeads.tsx +93 -0
- sm_events/ui/components/reminders/MyReminders.tsx +270 -0
- sm_events/ui/components/reminders/UnavailableNotice.tsx +30 -0
- sm_events/ui/components/share/ShareDialog.tsx +216 -0
- sm_events/ui/components/subscriptions/ExternalChip.tsx +23 -0
- sm_events/ui/components/subscriptions/ExternalDetail.tsx +54 -0
- sm_events/ui/components/subscriptions/ExternalPublicDetail.tsx +34 -0
- sm_events/ui/components/subscriptions/SubscriptionForm.tsx +187 -0
- sm_events/ui/components/subscriptions/SubscriptionRow.tsx +150 -0
- sm_events/ui/components/subscriptions/SubscriptionsDialog.tsx +178 -0
- sm_events/ui/extensions/PluginBoundary.tsx +38 -0
- sm_events/ui/extensions/builtins.ts +17 -0
- sm_events/ui/extensions/load.ts +77 -0
- sm_events/ui/extensions/registry.ts +83 -0
- sm_events/ui/extensions/slots.tsx +118 -0
- sm_events/ui/extensions/translateKey.ts +14 -0
- sm_events/ui/extensions/types.ts +99 -0
- sm_events/ui/hooks/useCalendars.ts +38 -0
- sm_events/ui/hooks/useCandidates.ts +72 -0
- sm_events/ui/hooks/useCategories.ts +32 -0
- sm_events/ui/hooks/useDocumentLang.ts +19 -0
- sm_events/ui/hooks/useEvent.ts +141 -0
- sm_events/ui/hooks/useEventActions.ts +277 -0
- sm_events/ui/hooks/useEvents.ts +151 -0
- sm_events/ui/hooks/useFeedTokens.ts +89 -0
- sm_events/ui/hooks/useFormErrors.ts +80 -0
- sm_events/ui/hooks/useImport.ts +161 -0
- sm_events/ui/hooks/useLatestRequest.ts +29 -0
- sm_events/ui/hooks/useLeaveGuard.ts +119 -0
- sm_events/ui/hooks/usePreview.ts +91 -0
- sm_events/ui/hooks/useRegistrationCounts.ts +41 -0
- sm_events/ui/hooks/useRequestScope.ts +53 -0
- sm_events/ui/hooks/useShares.ts +173 -0
- sm_events/ui/hooks/useSubscriptions.ts +84 -0
- sm_events/ui/public/CancelledBanner.tsx +12 -0
- sm_events/ui/public/CategoryFilter.tsx +41 -0
- sm_events/ui/public/EventPlace.tsx +47 -0
- sm_events/ui/public/EventWhen.tsx +41 -0
- sm_events/ui/public/LanguageSwitch.tsx +33 -0
- sm_events/ui/public/PluginDetail.tsx +27 -0
- sm_events/ui/public/PublicCalendarGrid.tsx +94 -0
- sm_events/ui/public/PublicHead.tsx +70 -0
- sm_events/ui/public/RegistrationSlot.tsx +66 -0
- sm_events/ui/public/RichText.tsx +55 -0
- sm_events/ui/public/SubEvents.tsx +20 -0
- sm_events/ui/public/SubscribeBox.tsx +36 -0
- sm_events/ui/public/UpcomingList.tsx +102 -0
- sm_events/ui/public/api-public.ts +17 -0
- sm_events/ui/public/format.ts +29 -0
- sm_events/ui/public/gridZone.ts +24 -0
- sm_events/ui/public/richtext-types.ts +3 -0
- sm_events/ui/public/types.ts +155 -0
- sm_events/ui/reminders/RemindMe.tsx +191 -0
- sm_events/ui/reminders/leadText.ts +26 -0
- sm_events/ui/reminders/reasons.ts +20 -0
- sm_events/ui/reminders/useFollow.ts +111 -0
- sm_events/ui/utils/PageLocale.tsx +96 -0
- sm_events/ui/utils/api-events.ts +68 -0
- sm_events/ui/utils/api-extensions.ts +25 -0
- sm_events/ui/utils/api-feeds.ts +43 -0
- sm_events/ui/utils/api-import.ts +160 -0
- sm_events/ui/utils/api-reminders.ts +97 -0
- sm_events/ui/utils/api-shares.ts +42 -0
- sm_events/ui/utils/api-subscriptions.ts +80 -0
- sm_events/ui/utils/api.ts +220 -0
- sm_events/ui/utils/categories.ts +16 -0
- sm_events/ui/utils/contrast.ts +38 -0
- sm_events/ui/utils/datetime.ts +108 -0
- sm_events/ui/utils/event-diff.ts +113 -0
- sm_events/ui/utils/event-form.ts +268 -0
- sm_events/ui/utils/event-validation.ts +51 -0
- sm_events/ui/utils/field-errors.ts +118 -0
- sm_events/ui/utils/form-merge.ts +40 -0
- sm_events/ui/utils/format.ts +8 -0
- sm_events/ui/utils/i18n.ts +188 -0
- sm_events/ui/utils/isolate.tsx +29 -0
- sm_events/ui/utils/jsonLd.ts +20 -0
- sm_events/ui/utils/language.ts +17 -0
- sm_events/ui/utils/limits.ts +16 -0
- sm_events/ui/utils/pageLocale.ts +10 -0
- sm_events/ui/utils/prefill.ts +32 -0
- sm_events/ui/utils/public-get.ts +25 -0
- sm_events/ui/utils/recurrence.ts +264 -0
- sm_events/ui/utils/registration-form.ts +75 -0
- sm_events/ui/utils/richtext.ts +201 -0
- sm_events/ui/utils/types-events.ts +272 -0
- sm_events/ui/utils/types.ts +62 -0
- sm_events/ui/utils/zones.ts +183 -0
- sm_events/web/__init__.py +1 -0
- sm_events/web/endpoints/__init__.py +50 -0
- sm_events/web/endpoints/calendars_api.py +163 -0
- sm_events/web/endpoints/categories_api.py +49 -0
- sm_events/web/endpoints/deps.py +46 -0
- sm_events/web/endpoints/events_actions_api.py +171 -0
- sm_events/web/endpoints/events_api.py +173 -0
- sm_events/web/endpoints/extensions_api.py +70 -0
- sm_events/web/endpoints/feed_tokens_api.py +87 -0
- sm_events/web/endpoints/imports_api.py +268 -0
- sm_events/web/endpoints/menu.py +70 -0
- sm_events/web/endpoints/occurrences_api.py +34 -0
- sm_events/web/endpoints/prefill.py +61 -0
- sm_events/web/endpoints/public/__init__.py +106 -0
- sm_events/web/endpoints/public/_api.py +182 -0
- sm_events/web/endpoints/public/_blocks_api.py +192 -0
- sm_events/web/endpoints/public/_cache.py +249 -0
- sm_events/web/endpoints/public/_errors.py +77 -0
- sm_events/web/endpoints/public/_event.py +127 -0
- sm_events/web/endpoints/public/_event_context.py +109 -0
- sm_events/web/endpoints/public/_event_props.py +223 -0
- sm_events/web/endpoints/public/_feeds.py +258 -0
- sm_events/web/endpoints/public/_head.py +209 -0
- sm_events/web/endpoints/public/_host_tenant.py +27 -0
- sm_events/web/endpoints/public/_index.py +240 -0
- sm_events/web/endpoints/public/_jsonld.py +115 -0
- sm_events/web/endpoints/public/_listing.py +221 -0
- sm_events/web/endpoints/public/_meta.py +52 -0
- sm_events/web/endpoints/public/_not_found.py +82 -0
- sm_events/web/endpoints/public/_occurrence.py +191 -0
- sm_events/web/endpoints/public/_private_feed.py +245 -0
- sm_events/web/endpoints/public/_registration_prop.py +75 -0
- sm_events/web/endpoints/public/_respond.py +47 -0
- sm_events/web/endpoints/public/_sitemap.py +97 -0
- sm_events/web/endpoints/public/_tenant.py +43 -0
- sm_events/web/endpoints/public/_urls.py +175 -0
- sm_events/web/endpoints/registrations_api.py +80 -0
- sm_events/web/endpoints/reminders_api.py +206 -0
- sm_events/web/endpoints/shares_api.py +75 -0
- sm_events/web/endpoints/subscriptions_api.py +167 -0
- sm_events/web/endpoints/views.py +252 -0
- sm_events/web/no_store.py +40 -0
- sm_events/web/schemas/__init__.py +1 -0
- sm_events/web/schemas/_fields.py +91 -0
- sm_events/web/schemas/calendars.py +113 -0
- sm_events/web/schemas/categories.py +53 -0
- sm_events/web/schemas/events_in.py +114 -0
- sm_events/web/schemas/events_out.py +102 -0
- sm_events/web/schemas/extensions.py +60 -0
- sm_events/web/schemas/feed_tokens.py +43 -0
- sm_events/web/schemas/imports.py +133 -0
- sm_events/web/schemas/occurrences.py +55 -0
- sm_events/web/schemas/overrides.py +119 -0
- sm_events/web/schemas/public.py +230 -0
- sm_events/web/schemas/public_event.py +130 -0
- sm_events/web/schemas/registration.py +80 -0
- sm_events/web/schemas/reminders.py +90 -0
- sm_events/web/schemas/shares.py +11 -0
- sm_events/web/schemas/subscriptions.py +88 -0
- sm_events/web/schemas/texts.py +46 -0
- sm_events/web/schemas/workflow.py +33 -0
- sm_events/web/services/__init__.py +1 -0
- sm_events/web/services/events_out.py +210 -0
- sm_events/web/services/masking.py +68 -0
- sm_events/web/services/members.py +61 -0
- sm_events/web/services/names.py +54 -0
- sm_events/web/services/owners.py +18 -0
- sm_events/web/services/source_viewer.py +27 -0
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: simple_module_events
|
|
3
|
+
Version: 0.0.16
|
|
4
|
+
Summary: Calendars and events for SimpleModule hosts: timezone-aware and recurring events, shareable calendars, public pages and ICS feeds
|
|
5
|
+
Project-URL: Repository, https://github.com/antosubash/smpy_modules
|
|
6
|
+
Author-email: Anto Subash <antosubash@live.com>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
License-File: NOTICE
|
|
9
|
+
Keywords: calendar,events,simple-module
|
|
10
|
+
Requires-Python: >=3.12
|
|
11
|
+
Requires-Dist: anyio<5,>=4
|
|
12
|
+
Requires-Dist: babel<3,>=2.12
|
|
13
|
+
Requires-Dist: cryptography>=42
|
|
14
|
+
Requires-Dist: httpcore<2,>=1
|
|
15
|
+
Requires-Dist: httpx<1,>=0.27
|
|
16
|
+
Requires-Dist: icalendar<8,>=7
|
|
17
|
+
Requires-Dist: idna<4,>=3
|
|
18
|
+
Requires-Dist: jinja2<4,>=3.1
|
|
19
|
+
Requires-Dist: pydantic-settings>=2.0
|
|
20
|
+
Requires-Dist: python-dateutil<4,>=2.9
|
|
21
|
+
Requires-Dist: simple-module-background-tasks<0.1,>=0.0.44
|
|
22
|
+
Requires-Dist: simple-module-core<0.1,>=0.0.44
|
|
23
|
+
Requires-Dist: simple-module-db<0.1,>=0.0.44
|
|
24
|
+
Requires-Dist: simple-module-hosting<0.1,>=0.0.44
|
|
25
|
+
Requires-Dist: simple-module-inertia<0.1,>=0.0.44
|
|
26
|
+
Requires-Dist: simple-module-settings<0.1,>=0.0.44
|
|
27
|
+
Requires-Dist: simple-module-sharing<0.1,>=0.0.44
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
31
|
+
Requires-Dist: simple-module-test<0.1,>=0.0.44; extra == 'dev'
|
|
32
|
+
Provides-Extra: pagebuilder
|
|
33
|
+
Requires-Dist: simple-module-pagebuilder<0.1,>=0.0.16; extra == 'pagebuilder'
|
|
34
|
+
Description-Content-Type: text/markdown
|
|
35
|
+
|
|
36
|
+
# simple_module_events
|
|
37
|
+
|
|
38
|
+
Owned calendars with private, internal or public visibility, calendar sharing,
|
|
39
|
+
multilingual categories, and events for SimpleModule hosts. Events have texts in
|
|
40
|
+
each content language, one-off, all-day and recurring schedules, overrides for
|
|
41
|
+
single occurrences, a review and publishing workflow, and a bounded occurrences
|
|
42
|
+
read, a console calendar, a public site (pages, ICS feeds, JSON-LD and a sitemap), private feed
|
|
43
|
+
links and `.ics` import, pagebuilder blocks, reminders, registration through records and read-only
|
|
44
|
+
subscriptions to external calendars. The module is complete (ten parts). See the
|
|
45
|
+
[guide](docs/index.md), [public pages](docs/public.md), [feeds](docs/feeds.md),
|
|
46
|
+
[import](docs/import.md), [blocks and cards](docs/blocks.md), [reminders](docs/reminders.md),
|
|
47
|
+
[registration](../records/docs/registration.md), [subscriptions](docs/subscriptions.md),
|
|
48
|
+
[operating](docs/operations.md) and the
|
|
49
|
+
[approved design](../../docs/superpowers/specs/2026-11-17-events-module-design.md).
|
|
50
|
+
|
|
51
|
+
## Install
|
|
52
|
+
|
|
53
|
+
Add `simple_module_events` to the consuming host's dependencies:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
pip install simple_module_events
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
The framework's `settings`, `sharing` and `background_tasks` modules must also be
|
|
60
|
+
installed (`background_tasks` runs scheduled publishing). The
|
|
61
|
+
module is discovered through its `simple_module` entry point. In this repo,
|
|
62
|
+
the workspace dependency and host wiring are already present:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
make install
|
|
66
|
+
make migrate
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
For a different host, autogenerate and inspect its own migration:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
make migration msg="add events"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Set `branch_labels = ("events",)` on its first events revision, inspect that
|
|
76
|
+
it creates the seven `events_*` tables without dropping existing data, then
|
|
77
|
+
run `make migrate`. Migrations belong to the host, never to this wheel. The
|
|
78
|
+
label is a named target in the host's shared history; downgrading
|
|
79
|
+
`events@base` does not remove only events' tables.
|
|
80
|
+
|
|
81
|
+
## Pagebuilder blocks
|
|
82
|
+
|
|
83
|
+
With the `pagebuilder` extra, events adds an "Upcoming events" list and a read-only "Events
|
|
84
|
+
calendar" to pagebuilder's palette. They show only published events of public calendars,
|
|
85
|
+
fetched when the page is viewed. `sm_events.contracts.cards` gives newsletter the same public
|
|
86
|
+
projection for its Event card. See [blocks and cards](docs/blocks.md).
|
|
87
|
+
|
|
88
|
+
## Reminders
|
|
89
|
+
|
|
90
|
+
A signed-in user follows a published event ("Remind me") with one or more lead times (15 minutes, 1
|
|
91
|
+
hour, 1 day, 1 week) and gets one email per occurrence and lead, at most once, from the `events.reminders`
|
|
92
|
+
beat. It needs a worker and beat serving the `events` queue, a mail transport that delivers and the host's
|
|
93
|
+
`public_base_url`; the control says why in words when reminders cannot be delivered. The worker grants no
|
|
94
|
+
more access than a request would, so a user whose only right is the tenant membership role is told no mail
|
|
95
|
+
will come (upstream #1005). See [Reminders](docs/reminders.md).
|
|
96
|
+
|
|
97
|
+
## Usage
|
|
98
|
+
|
|
99
|
+
Open `/admin/events/calendars` to create a calendar, edit its metadata, change
|
|
100
|
+
visibility, share it, or move it to Trash and restore it. Calendar slugs may
|
|
101
|
+
be renamed in this release. Creation needs `events.edit` and makes the caller
|
|
102
|
+
the owner. Only `events.manage` holders see **Transfer ownership**; they pick
|
|
103
|
+
an active member of the current tenant. The user picker searches after three
|
|
104
|
+
characters and shows the server's masked email; an exact address search may
|
|
105
|
+
return that address in full.
|
|
106
|
+
|
|
107
|
+
Open `/admin/events/categories` with `events.view` and `events.manage` to enter category names in each configured
|
|
108
|
+
content language. The first language is required. Categories have an optional
|
|
109
|
+
colour and a slug fixed at creation. Deletion leaves events uncategorised.
|
|
110
|
+
|
|
111
|
+
`/admin/events/` (`events.view`) is the calendar: month, week, day and list
|
|
112
|
+
views over every calendar the caller can read, with a filter per calendar and
|
|
113
|
+
category, a toggle between the calendar's time zone and the browser's, and
|
|
114
|
+
live state in the URL (`?view=week&date=2026-03-25&tz=mine&calendar=<id>`). A
|
|
115
|
+
caller who may write events can click or drag-select a slot to create a draft,
|
|
116
|
+
drag an event to another time or day, drag its edge to change the end, or open
|
|
117
|
+
it and choose **Move…**, the keyboard path for both. A drag moves one
|
|
118
|
+
occurrence of a series or the whole series (a prompt asks) and never rewrites
|
|
119
|
+
the repeat rule. See the guide's [The calendar](docs/index.md#the-calendar).
|
|
120
|
+
|
|
121
|
+
Open `/admin/events/list` (`events.view`) for the Events list: filter by
|
|
122
|
+
calendar, status (draft, in review, published, scheduled), category, date range
|
|
123
|
+
and title, page through the results, and move an event to Trash or restore it.
|
|
124
|
+
**New event** opens the editor on a calendar the caller may write in. The editor
|
|
125
|
+
(`/admin/events/edit/{id}`) has the texts per content language with a rich-text
|
|
126
|
+
description, times on the event's own clock (timezone and all-day), place,
|
|
127
|
+
category, sub-events, the repeat rule with a preview of the next occurrences and
|
|
128
|
+
skip, cancel and move for single ones, the workflow bar (submit, withdraw,
|
|
129
|
+
approve now or later, reject with a note, cancel a schedule, unpublish) and the
|
|
130
|
+
revision history. A save that meets a newer revision shows what changed and asks
|
|
131
|
+
whether to load theirs or save yours over it. A published or scheduled event is
|
|
132
|
+
read-only for a caller without `events.publish`, with the reason on screen.
|
|
133
|
+
Scheduled publishing needs the Celery beat (see the guide's
|
|
134
|
+
[Scheduled publishing](docs/index.md#scheduled-publishing-needs-beat)).
|
|
135
|
+
|
|
136
|
+
### API
|
|
137
|
+
|
|
138
|
+
All paths below start with `/api/events`. Writes use the framework's session
|
|
139
|
+
CSRF token (`X-CSRF-Token`); module errors use `{"detail","code"}`. FastAPI
|
|
140
|
+
request-validation errors retain their ordinary 422 shape. Unknown or
|
|
141
|
+
inaccessible calendars return the same 404. Calendars use last-write-wins
|
|
142
|
+
metadata forms and have no `expected_revision`; every event write quotes it
|
|
143
|
+
(409 `stale`).
|
|
144
|
+
|
|
145
|
+
| Method and path | Action / permission |
|
|
146
|
+
| --- | --- |
|
|
147
|
+
| `GET /calendars?trashed=false` | List readable calendars; `events.view` |
|
|
148
|
+
| `POST /calendars` | Create; `events.view` and `events.edit` |
|
|
149
|
+
| `GET /calendars/{id}` | Read through the calendar policy; `events.view` |
|
|
150
|
+
| `PATCH /calendars/{id}` | Edit metadata; owner, edit share or manager |
|
|
151
|
+
| `PUT /calendars/{id}/visibility` | Set private/internal/public; owner or manager |
|
|
152
|
+
| `PUT /calendars/{id}/owner` | Transfer with `{owner_id}`; manager, active tenant member only |
|
|
153
|
+
| `DELETE /calendars/{id}` | Move to trash; owner or manager |
|
|
154
|
+
| `POST /calendars/{id}/restore` | Restore; owner or manager |
|
|
155
|
+
| `GET /calendars/{id}/share-candidates?q=…` | Find active members; owner or manager, three characters minimum |
|
|
156
|
+
| `GET /categories` | List; `events.view` |
|
|
157
|
+
| `POST /categories` | Create; `events.view` and `events.manage` |
|
|
158
|
+
| `PATCH /categories/{id}` | Replace names or colour; `events.view` and `events.manage` |
|
|
159
|
+
| `DELETE /categories/{id}` | Delete; `events.view` and `events.manage` |
|
|
160
|
+
| `GET /events` | List with `calendar`, `status`, `category`, `from`, `to`, `q`, `trashed`, `locale`, `page`, `page_size`; `events.view` |
|
|
161
|
+
| `POST /events` | Create with `calendar_id`, `times`, `texts`; write right on the calendar |
|
|
162
|
+
| `GET /events/{id}` | Read with texts, overrides, sub-events and the caller's rights; `events.view` |
|
|
163
|
+
| `PATCH /events/{id}` | Edit with `expected_revision`; write right, plus `events.publish` when the event is published or scheduled |
|
|
164
|
+
| `DELETE /events/{id}?expected_revision=` | Move to trash; same right as PATCH |
|
|
165
|
+
| `POST /events/{id}/restore` | Restore with `expected_revision`; same right |
|
|
166
|
+
| `POST /events/{id}/{submit,withdraw,approve,reject,unschedule,unpublish}` | Workflow, each with `expected_revision` (see the guide's table) |
|
|
167
|
+
| `GET /events/{id}/revisions`, `/revisions/{number}` | History, newest first; write right |
|
|
168
|
+
| `POST /events/{id}/overrides` | Skip, cancel or move one occurrence; `DELETE /events/{id}/overrides/{override_id}?expected_revision=` restores it |
|
|
169
|
+
| `POST /recurrence/preview` | The next occurrences of a schedule and the overrides it would orphan |
|
|
170
|
+
| `GET /occurrences?start=&end=` | The bounded read for a range (at most 366 days, 2,000 items) |
|
|
171
|
+
|
|
172
|
+
Calendar responses carry `owner_name` (a string or `null`). An owner is named
|
|
173
|
+
only when they are an active member of the bound organisation with a display
|
|
174
|
+
name; anyone else, including an owner whose only label is an email address, is
|
|
175
|
+
`null` and shown as "Unknown user". No address or part of one is shown outside
|
|
176
|
+
the owner/manager-only picker. If the user directory or the membership store fails
|
|
177
|
+
(a failed query included), lists, reads and writes still succeed with `null`
|
|
178
|
+
owner names; the share picker and an ownership transfer still fail
|
|
179
|
+
rather than guess (no directory at all is a 503).
|
|
180
|
+
|
|
181
|
+
A calendar name and every category name are single line: control characters,
|
|
182
|
+
line and paragraph separators and text-direction controls are rejected with a
|
|
183
|
+
422. A description keeps line breaks and tabs and rejects other control
|
|
184
|
+
characters and text-direction controls. A name with no slug-able characters
|
|
185
|
+
gets the slug `calendar-2` (`calendar` is a public route segment, so no calendar
|
|
186
|
+
takes it) or `category` (then `-2`, `-3`, ...).
|
|
187
|
+
|
|
188
|
+
Every calendar API route also needs `events.view`. Grants, lists and revokes
|
|
189
|
+
use the framework's `/api/sharing/shares` with
|
|
190
|
+
`resource_type="events.calendar"`, the calendar UUID as `resource_id`, a user
|
|
191
|
+
`subject_id` and role `view` or `edit`. The framework additionally requires
|
|
192
|
+
`sharing.share`. The picker requires the owner or a manager; an edit share does
|
|
193
|
+
not admit it. Calendar and category lists return at most 500 rows each.
|
|
194
|
+
|
|
195
|
+
### Settings
|
|
196
|
+
|
|
197
|
+
Configure **Events** on the Settings screen or with
|
|
198
|
+
`scripts/set_setting.py`. Both fields are SYSTEM-scope and DB-backed; no
|
|
199
|
+
`SM_EVENTS_*` environment variables are read.
|
|
200
|
+
|
|
201
|
+
| Field | Default | Applies |
|
|
202
|
+
| --- | --- | --- |
|
|
203
|
+
| `default_timezone` | `UTC` | New calendars; unknown stored names fall back to UTC with a warning |
|
|
204
|
+
| `content_locales` | `["en"]` | The languages of category names, event texts and event slugs; restart required |
|
|
205
|
+
|
|
206
|
+
### Permissions and access
|
|
207
|
+
|
|
208
|
+
`events.view` admits console readers; owners and share holders also need it.
|
|
209
|
+
`private` calendars are readable by their owner and shares; `internal` and
|
|
210
|
+
`public` calendars are readable by signed-in members with `events.view`.
|
|
211
|
+
Only owners, edit shares and managers edit calendar metadata. Only owners
|
|
212
|
+
and managers change visibility, share, trash or restore a calendar.
|
|
213
|
+
`events.manage` bypasses calendar visibility within the bound tenant and
|
|
214
|
+
manages categories and ownership. `events.publish`, combined with write access to the
|
|
215
|
+
calendar, approves, schedules and unpublishes events and is needed to change
|
|
216
|
+
an event that is published or scheduled. See the guide's [access table](docs/index.md#access).
|
|
217
|
+
|
|
218
|
+
No anonymous page or API ships yet. A public calendar's visibility prepares it
|
|
219
|
+
for later public, published-event reads; it exposes no anonymous screen today.
|
|
220
|
+
|
|
221
|
+
## Extensions
|
|
222
|
+
|
|
223
|
+
A second package can add dates to a calendar (a source such as records' `records:dates`), add an event type
|
|
224
|
+
with its own validated `extra`, and contribute chips, details, editor and settings sections and toolbar
|
|
225
|
+
items. An admin turns a source on per calendar (Calendars, **Sources**). A plugin call runs on its own
|
|
226
|
+
database connection with a time budget and validated, bounded output, and a failing source is reported in the
|
|
227
|
+
calendar instead of failing it. See [the plugin guide](docs/extensions.md). Events publishes nine bus
|
|
228
|
+
events, also durably through the `background_tasks` outbox. The delivery list is in the [guide](docs/index.md#status).
|
|
229
|
+
|
|
230
|
+
## Public pages
|
|
231
|
+
|
|
232
|
+
Anonymous visitors get a public calendar's published events under `public_prefix` (default
|
|
233
|
+
`/events`, restart-only), with `/{locale}` prefixes:
|
|
234
|
+
|
|
235
|
+
| Route | Serves |
|
|
236
|
+
| --- | --- |
|
|
237
|
+
| `/events/` | Upcoming list and a read-only calendar tab |
|
|
238
|
+
| `/events/c/{calendar}` | One public calendar |
|
|
239
|
+
| `/events/{slug}` (`?date=`) | An event, or one occurrence of a series |
|
|
240
|
+
| `/events/{slug}.ics`, `/events/calendar.ics`, `/events/c/{calendar}.ics` | Event file and subscription feeds |
|
|
241
|
+
| `/events/sitemap.xml` | Every public, indexable event |
|
|
242
|
+
|
|
243
|
+
Everything else (drafts, internal and private calendars, trash, other tenants) answers one
|
|
244
|
+
identical 404. See [Public pages](docs/public.md).
|
|
245
|
+
|
|
246
|
+
### Private feeds and import
|
|
247
|
+
|
|
248
|
+
A private subscription link per user and calendar (`/events/feed/<token>.ics`, shown once,
|
|
249
|
+
revocable) and an `.ics` import screen (`/admin/events/import`). See
|
|
250
|
+
[Private feed links](docs/feeds.md) and [Importing an .ics file](docs/import.md).
|
|
251
|
+
|
|
252
|
+
## Subscriptions
|
|
253
|
+
|
|
254
|
+
A calendar's owner (or an events manager) can subscribe it to an external `.ics` address in the
|
|
255
|
+
Subscriptions dialog on the Calendars screen. The external events show on that calendar, marked
|
|
256
|
+
**External**, read-only and as plain text; they are never re-published in this site's feeds,
|
|
257
|
+
reminders or newsletter cards, and reach the public grid only when the subscription is marked
|
|
258
|
+
public by someone with `events.publish`. The address is stored encrypted and shown only as
|
|
259
|
+
`https://host/…`; it is fetched by a worker through a pinned, size- and time-bounded client that
|
|
260
|
+
checks every resolved address and every redirect.
|
|
261
|
+
|
|
262
|
+
Two settings (Settings screen, never the environment): `subscription_refresh_minutes` (default 60,
|
|
263
|
+
kept between 15 and 1,440) and `allow_private_subscription_urls` (off; it lets a subscription saved
|
|
264
|
+
by someone with `events.manage` use private ranges, plain `http` and any port, never loopback,
|
|
265
|
+
link-local or metadata addresses: trusted networks only). Refreshing needs beat and a worker on
|
|
266
|
+
the `events` queue (`events.refresh_subscriptions`). See [the guide](docs/subscriptions.md).
|