@aglyn/plugins-events-calendar 1.0.0-beta.143 → 1.0.0-beta.145

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.
Files changed (2) hide show
  1. package/README.md +72 -6
  2. package/package.json +9 -9
package/README.md CHANGED
@@ -1,7 +1,73 @@
1
- # @aglyn/plugins-ui-events-calendar
1
+ # @aglyn/plugins-events-calendar
2
2
 
3
- The Events Calendar feature plugin (AGL-313) the reference
4
- implementation of the console+UI feature-plugin pair (AGL-277). The
5
- `event-list` component moved here from `plugins-ui-mui`; legacy screen
6
- nodes persisted with pluginId `mui` keep rendering because resolution is
7
- by componentId.
3
+ The Events Calendar plugin for Aglyn: events managed in the console and listed on a published site. Install it if you are running or building on the Aglyn platform and want its events feature.
4
+
5
+ > Beta. Published from the Aglyn monorepo under the `beta` dist-tag; APIs can change between beta releases.
6
+
7
+ ## Install
8
+
9
+ npm install @aglyn/plugins-events-calendar@beta
10
+
11
+ Peer dependencies:
12
+
13
+ - `@mui/material`
14
+ - `firebase`
15
+ - `react`
16
+
17
+ None is optional. The server half additionally relies on `firebase-admin` through `@aglyn/tenant-data-admin`.
18
+
19
+ ## What's in it
20
+
21
+ This package is a first-party Aglyn plugin. It is loaded through Aglyn's plugin manager: the apps read its entry in the monorepo's `plugins.config.json`, import the module each surface names, and call the registrar declared for that surface. It is not a standalone library; installing it on its own loads nothing.
22
+
23
+ ### On a published site
24
+
25
+ - One canvas component, `eventList`: a list of the site's published events, each rendered with `schema.org/Event` JSON-LD. Registered by `registerEventsCalendarPlugin()`.
26
+
27
+ ### In the console
28
+
29
+ `registerEventsCalendarConsole()` registers an **Events** nav item and page at `/events`, behind the `eventCalendar` feature flag, and an "Upcoming events" dashboard card. The page is code-split and loads when opened.
30
+
31
+ ### On the server
32
+
33
+ `registerEventsCalendarApi()` from `@aglyn/plugins-events-calendar/server` (the `tenantApi` surface) registers two site-facing routes:
34
+
35
+ - `events/list`: published events for the Event List component, sorted by start, with a `mode=past` option. Drafts never leave the server.
36
+ - `events/dispatch`: receives a site event whose client-side trigger fired on the page, so that the action's server steps run.
37
+
38
+ Routes are served by the host app's API dispatcher under `/api/`, for example `/api/events/list`. There is no `consoleApi` registrar.
39
+
40
+ ### Entry points
41
+
42
+ | import | contents |
43
+ | -- | -- |
44
+ | `@aglyn/plugins-events-calendar` | `BUNDLE_ID`, `registerEventsCalendarConsole`, and the site half |
45
+ | `@aglyn/plugins-events-calendar/site` | `registerEventsCalendarPlugin` and `EVENTS_CALENDAR_BUNDLE` only, with no console code |
46
+ | `@aglyn/plugins-events-calendar/server` | `registerEventsCalendarApi` |
47
+ | `@aglyn/plugins-events-calendar/*` | any module under `src/lib/` |
48
+
49
+ ## Usage
50
+
51
+ The registrars are normally called by Aglyn's generated plugin loaders. Called directly:
52
+
53
+ ```ts
54
+ // Published site (canvas half only)
55
+ import { registerEventsCalendarPlugin } from '@aglyn/plugins-events-calendar/site'
56
+ registerEventsCalendarPlugin()
57
+
58
+ // Console app
59
+ import { registerEventsCalendarConsole } from '@aglyn/plugins-events-calendar'
60
+ registerEventsCalendarConsole()
61
+
62
+ // Server-only API dispatcher
63
+ import { registerEventsCalendarApi } from '@aglyn/plugins-events-calendar/server'
64
+ registerEventsCalendarApi()
65
+ ```
66
+
67
+ ## How it fits
68
+
69
+ A plugin may import the tenant runtime, the renderer, the Besigner logic, the core and the shared packages. It never imports another plugin, and the core never imports a plugin. Events Calendar depends on `@aglyn/aglyn`, `@aglyn/tenant-runtime`, `@aglyn/tenant-data-admin`, `@aglyn/tenant-feature-instance` and a few `@aglyn/shared-*` packages. It is the smallest plugin with all three halves (site, console, server) and is a reasonable one to read first.
70
+
71
+ ## License
72
+
73
+ Apache-2.0. Source: https://github.com/aglyn/aglyn/tree/main/libs/plugins/events-calendar
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aglyn/plugins-events-calendar",
3
- "version": "1.0.0-beta.143",
3
+ "version": "1.0.0-beta.145",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://aglyn.com",
6
6
  "repository": {
@@ -25,14 +25,14 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@aglyn/aglyn": "1.0.0-beta.143",
29
- "@aglyn/shared-data-mdi": "1.0.0-beta.143",
30
- "@aglyn/shared-ui-jsx": "1.0.0-beta.143",
31
- "@aglyn/shared-ui-snackstack": "1.0.0-beta.143",
32
- "@aglyn/shared-util-timestamp": "1.0.0-beta.143",
33
- "@aglyn/tenant-data-admin": "1.0.0-beta.143",
34
- "@aglyn/tenant-feature-instance": "1.0.0-beta.143",
35
- "@aglyn/tenant-runtime": "1.0.0-beta.143",
28
+ "@aglyn/aglyn": "1.0.0-beta.145",
29
+ "@aglyn/shared-data-mdi": "1.0.0-beta.145",
30
+ "@aglyn/shared-ui-jsx": "1.0.0-beta.145",
31
+ "@aglyn/shared-ui-snackstack": "1.0.0-beta.145",
32
+ "@aglyn/shared-util-timestamp": "1.0.0-beta.145",
33
+ "@aglyn/tenant-data-admin": "1.0.0-beta.145",
34
+ "@aglyn/tenant-feature-instance": "1.0.0-beta.145",
35
+ "@aglyn/tenant-runtime": "1.0.0-beta.145",
36
36
  "@swc/helpers": "0.5.23"
37
37
  },
38
38
  "peerDependencies": {