@ossy/calendar
v1.17.0
Published
Calendar feature package — monthly calendar view with workday/holiday highlighting for Ossy apps
Readme
@ossy/calendar
Calendar feature package for the Ossy platform — provides a yearly calendar view with workday/holiday highlighting, auto-discovered by @ossy/app when the package is installed.
What's included
Pages (auto-discovered by @ossy/app)
| File | Page id | Default paths |
|---|---|---|
| home.page.jsx | calendar/home | /calendar (en), /kalender (sv) |
Components
| Export | Description |
|---|---|
| Calendar | 12-month grid with workday/weekend/holiday highlighting |
| CalendarDaySurfaceStyles | Injects CSS for day cell theming |
| DataLoader | Context provider that loads consultancy resources and provides calendar data |
Hooks
| Export | Description |
|---|---|
| useCalendarMonths | Returns the array of months with day-level data |
| useCompany | Returns the CompanyClient instance from context |
| useContracts | Returns contracts from the loaded company data |
| useEmployees | Returns employees from the loaded company data |
| useForecast | Returns fiscal year projections via ForecastClient |
Utilities
| Export | Description |
|---|---|
| CompanyClient | Models a company with fiscal years, employees, and contracts |
| ForecastClient | Projects income, costs, and hours for a fiscal year |
| CalendarClient | Generates date spans; checks workdays/holidays (Sweden locale) |
| Tax | Static Swedish tax rate constants |
| Definition | Module definition object (id, actions, views, statuses) |
Usage
Install the package — @ossy/app discovers the pages automatically:
npm install @ossy/calendar
npm run buildThe calendar page uses DataLoader to pull consultancy resources from the Ossy API (/@ossy/consultancy/). It falls back to static month data when no resources are loaded.
Peer dependencies
| Package | Version |
|---|---|
| @ossy/design-system | >=1.0.0 |
| @ossy/router-react | >=1.0.0 |
| @ossy/sdk-react | >=1.0.0 |
| react | >=19.0.0 <20.0.0 |
Dependencies
| Package | Description |
|---|---|
| date-holidays | Swedish public holiday detection for workday calculation |
