@sneat/extension-contactus
v0.14.13
Published
Readme
@sneat/extension-contactus
Host-facing runtime for the contactus extension: provider wiring, routes,
pages, dialogs, and concrete services. The package is public because host apps
install it, but its root API is intentionally limited to provideContactus(),
contactusRoutes, and membersRoutes. Extension libraries must depend on the
contract or UI package instead.
App bootstrap wiring (required)
Cross-extension consumers (e.g. calendarius) inject the contactus services
through the InjectionTokens defined in @sneat/extension-contactus-contract
(CONTACT_SERVICE, CONTACTUS_SPACE_SERVICE, CONTACT_NAV_SERVICE,
CONTACTUS_NAV_SERVICE, CONTACT_GROUP_SERVICE, CONTACT_ROLE_SERVICE,
INVITE_SERVICE). The concrete implementations live here and are bound to those
tokens by provideContactus().
The application (the sneat-apps super-app, which installs every @sneat/*
as a real package) must call this at bootstrap:
import { provideContactus } from '@sneat/extension-contactus';
bootstrapApplication(AppComponent, {
providers: [
...getStandardSneatProviders(environmentConfig),
...provideContactus(),
// ...other extension providers
],
});Without this, injecting a contactus token resolves to nothing at runtime. In unit tests, provide the token with a mock instead.
The composition root is the app. A library importing this runtime is rejected by both Nx project-boundary rules and the package-pattern ESLint policy.
