Sets up calendar package with core infrastructure

Adds core calendar package components including:
- Base services for events, resources, and settings
- Calendar app and orchestrator
- Build and bundling configuration
- IndexedDB storage setup

Prepares foundational architecture for calendar functionality
This commit is contained in:
Janus C. H. Knudsen 2026-01-28 15:24:03 +01:00
parent 12e7594f30
commit ceb44446f0
97 changed files with 13858 additions and 1 deletions

23
test-package/build.js Normal file
View file

@ -0,0 +1,23 @@
import esbuild from 'esbuild';
import { NovadiUnplugin } from '@novadi/core/unplugin';
import { copyFileSync, mkdirSync } from 'fs';
// Ensure dist/css directory exists
mkdirSync('dist/css', { recursive: true });
// Copy calendar CSS
copyFileSync(
'node_modules/calendar/dist/css/calendar.css',
'dist/css/calendar.css'
);
await esbuild.build({
entryPoints: ['src/index.ts'],
bundle: true,
outfile: 'dist/bundle.js',
format: 'esm',
platform: 'browser',
plugins: [NovadiUnplugin.esbuild()]
});
console.log('Build complete');

5289
test-package/dist/bundle.js vendored Normal file

File diff suppressed because it is too large Load diff

877
test-package/dist/css/calendar.css vendored Normal file
View file

@ -0,0 +1,877 @@
/* V2 Base - Shared variables */
:root {
/* Grid measurements */
--hour-height: 64px;
--time-axis-width: 60px;
--grid-columns: 7;
--day-column-min-width: 200px;
--day-start-hour: 6;
--day-end-hour: 18;
--header-height: 70px;
/* Colors - UI */
--color-border: #e0e0e0;
--color-surface: #fff;
--color-background: #f5f5f5;
--color-background-hover: #f0f0f0;
--color-background-alt: #fafafa;
--color-text: #333333;
--color-text-secondary: #666;
--color-primary: #1976d2;
--color-team-bg: #e3f2fd;
--color-team-text: #1565c0;
/* Colors - Grid */
--color-hour-line: rgba(0, 0, 0, 0.2);
--color-grid-line-light: rgba(0, 0, 0, 0.05);
--color-unavailable: rgba(0, 0, 0, 0.02);
/* Named color palette for events (fra V1) */
--b-color-red: #e53935;
--b-color-pink: #d81b60;
--b-color-magenta: #c200c2;
--b-color-purple: #8e24aa;
--b-color-violet: #5e35b1;
--b-color-deep-purple: #4527a0;
--b-color-indigo: #3949ab;
--b-color-blue: #1e88e5;
--b-color-light-blue: #03a9f4;
--b-color-cyan: #3bc9db;
--b-color-teal: #00897b;
--b-color-green: #43a047;
--b-color-light-green: #8bc34a;
--b-color-lime: #c0ca33;
--b-color-yellow: #fdd835;
--b-color-amber: #ffb300;
--b-color-orange: #fb8c00;
--b-color-deep-orange: #f4511e;
/* Base mix for color-mix() function */
--b-mix: #fff;
/* Shadows */
--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
--shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
/* Transitions */
--transition-fast: 150ms ease;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: var(--color-background);
}
/* V2 Layout - Calendar structure, grid, navigation */
.calendar-wrapper {
height: 100vh;
display: flex;
flex-direction: column;
}
swp-calendar {
display: grid;
grid-template-rows: auto 1fr;
height: 100%;
background: var(--color-surface);
}
/* Nav */
swp-calendar-nav {
display: flex;
gap: 12px;
padding: 8px 16px;
border-bottom: 1px solid var(--color-border);
align-items: center;
font-size: 13px;
}
/* View switcher - small chips */
swp-view-switcher {
display: flex;
gap: 4px;
background: var(--color-background-alt);
padding: 3px;
border-radius: 6px;
}
.view-chip {
padding: 4px 10px;
border: none;
border-radius: 4px;
cursor: pointer;
background: transparent;
color: var(--color-text-secondary);
font-size: 12px;
font-weight: 500;
transition: all 0.15s ease;
&:hover {
background: var(--color-surface);
color: var(--color-text);
}
&.active {
background: var(--color-surface);
color: var(--color-text);
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
}
/* Workweek dropdown */
.workweek-dropdown {
padding: 4px 8px;
border: 1px solid var(--color-border);
border-radius: 4px;
background: var(--color-surface);
font-size: 12px;
cursor: pointer;
&:hover { border-color: var(--color-text-secondary); }
&:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; }
}
/* Resource selector (picker view) */
swp-resource-selector {
&.hidden { display: none; }
fieldset {
border: 1px solid var(--color-border);
border-radius: 6px;
padding: 6px 12px;
margin: 0;
}
legend {
font-size: 11px;
font-weight: 500;
color: var(--color-text-secondary);
padding: 0 6px;
}
.resource-checkboxes {
display: flex;
flex-wrap: wrap;
gap: 4px 16px;
}
label {
display: flex;
align-items: center;
gap: 4px;
font-size: 12px;
cursor: pointer;
white-space: nowrap;
&:hover { color: var(--color-primary); }
}
input[type="checkbox"] {
width: 14px;
height: 14px;
cursor: pointer;
}
}
/* Navigation group */
swp-nav-group {
display: flex;
gap: 2px;
}
swp-nav-button {
padding: 6px 12px;
border: 1px solid var(--color-border);
border-radius: 4px;
cursor: pointer;
background: var(--color-surface);
font-size: 12px;
&:hover { background: var(--color-background-hover); }
&.btn-small {
padding: 4px 8px;
font-size: 11px;
}
}
swp-week-info {
margin-left: auto;
text-align: right;
swp-week-number {
font-weight: 600;
font-size: 12px;
display: block;
}
swp-date-range {
font-size: 11px;
color: var(--color-text-secondary);
}
}
/* Container */
swp-calendar-container {
display: grid;
grid-template-columns: var(--time-axis-width) 1fr;
grid-template-rows: auto 1fr;
overflow: hidden;
height: 100%;
}
/* Time axis */
swp-time-axis {
grid-column: 1;
grid-row: 1 / 3;
display: grid;
grid-template-rows: auto 1fr;
border-right: 1px solid var(--color-border);
background: var(--color-surface);
overflow: hidden;
user-select: none;
}
swp-header-spacer {
border-bottom: 1px solid var(--color-border);
background: var(--color-surface);
z-index: 1;
}
swp-header-drawer {
display: grid;
grid-template-columns: subgrid;
grid-column: 1 / -1;
grid-row: 2;
overflow: hidden;
background: var(--color-background-alt);
border-bottom: 1px solid var(--color-border);
}
swp-time-axis-content {
display: flex;
flex-direction: column;
position: relative;
}
swp-hour-marker {
height: var(--hour-height);
padding: 4px 8px;
font-size: 11px;
color: var(--color-text-secondary);
text-align: right;
position: relative;
&::after {
content: '';
position: absolute;
top: -1px;
right: 0;
width: 5px;
height: 1px;
background: var(--color-hour-line);
}
&:first-child::after {
display: none;
}
}
/* Grid container */
swp-grid-container {
grid-column: 2;
grid-row: 1 / 3;
display: grid;
grid-template-columns: minmax(0, 1fr);
grid-template-rows: subgrid;
overflow: hidden;
}
/* Viewport/Track for slide animation */
swp-header-viewport {
display: grid;
grid-template-columns: repeat(var(--grid-columns), minmax(var(--day-column-min-width), 1fr));
grid-template-rows: auto auto;
min-width: calc(var(--grid-columns) * var(--day-column-min-width));
overflow-y: scroll;
overflow-x: hidden;
&::-webkit-scrollbar { background: transparent; }
&::-webkit-scrollbar-thumb { background: transparent; }
}
swp-content-viewport {
overflow: hidden;
min-height: 0;
width: 100%;
}
swp-header-track {
display: grid;
grid-template-columns: subgrid;
grid-column: 1 / -1;
grid-row: 1;
}
swp-content-track {
display: flex;
height: 100%;
> swp-scrollable-content {
flex: 0 0 100%;
height: 100%;
}
}
/* Header */
swp-calendar-header {
display: grid;
grid-template-columns: subgrid;
grid-column: 1 / -1;
grid-auto-rows: auto;
background: var(--color-surface);
&[data-levels="date"] > swp-day-header { grid-row: 1; }
&[data-levels="resource date"] {
> swp-resource-header { grid-row: 1; }
> swp-day-header { grid-row: 2; }
}
&[data-levels="team resource date"] {
> swp-team-header { grid-row: 1; }
> swp-resource-header { grid-row: 2; }
> swp-day-header { grid-row: 3; }
}
&[data-levels="department resource date"] {
> swp-department-header { grid-row: 1; }
> swp-resource-header { grid-row: 2; }
> swp-day-header { grid-row: 3; }
}
}
swp-day-header,
swp-resource-header,
swp-team-header,
swp-department-header {
padding: 8px;
text-align: center;
border-right: 1px solid var(--color-border);
border-bottom: 1px solid var(--color-border);
user-select: none;
}
swp-team-header {
background: var(--color-team-bg);
color: var(--color-team-text);
font-weight: 500;
grid-column: span var(--team-cols, 1);
}
swp-department-header {
background: var(--color-team-bg);
color: var(--color-team-text);
font-weight: 500;
grid-column: span var(--department-cols, 1);
}
swp-resource-header {
background: var(--color-background-alt);
font-size: 13px;
}
swp-day-header {
swp-day-name {
display: block;
font-size: 11px;
color: var(--color-text-secondary);
text-transform: uppercase;
}
swp-day-date {
display: block;
font-size: 24px;
font-weight: 300;
}
&[data-hidden="true"] {
display: none;
}
}
/* Scrollable content */
swp-scrollable-content {
display: block;
overflow: auto;
}
swp-time-grid {
display: block;
position: relative;
min-height: calc((var(--day-end-hour) - var(--day-start-hour)) * var(--hour-height));
min-width: calc(var(--grid-columns) * var(--day-column-min-width));
/* Timelinjer */
&::after {
content: '';
position: absolute;
inset: 0;
z-index: 2;
background-image: repeating-linear-gradient(
to bottom,
transparent,
transparent calc(var(--hour-height) - 1px),
var(--color-hour-line) calc(var(--hour-height) - 1px),
var(--color-hour-line) var(--hour-height)
);
pointer-events: none;
}
}
/* Kvarterlinjer - 3 linjer per time (15, 30, 45 min) */
swp-grid-lines {
display: block;
position: absolute;
inset: 0;
z-index: 1;
background-image: repeating-linear-gradient(
to bottom,
transparent 0,
transparent calc(var(--hour-height) / 4 - 1px),
var(--color-grid-line-light) calc(var(--hour-height) / 4 - 1px),
var(--color-grid-line-light) calc(var(--hour-height) / 4),
transparent calc(var(--hour-height) / 4),
transparent calc(var(--hour-height) / 2 - 1px),
var(--color-grid-line-light) calc(var(--hour-height) / 2 - 1px),
var(--color-grid-line-light) calc(var(--hour-height) / 2),
transparent calc(var(--hour-height) / 2),
transparent calc(var(--hour-height) * 3 / 4 - 1px),
var(--color-grid-line-light) calc(var(--hour-height) * 3 / 4 - 1px),
var(--color-grid-line-light) calc(var(--hour-height) * 3 / 4),
transparent calc(var(--hour-height) * 3 / 4),
transparent var(--hour-height)
);
}
swp-day-columns {
position: absolute;
inset: 0;
display: grid;
grid-template-columns: repeat(var(--grid-columns), minmax(var(--day-column-min-width), 1fr));
min-width: calc(var(--grid-columns) * var(--day-column-min-width));
}
swp-day-column {
position: relative;
border-right: 1px solid var(--color-border);
}
swp-events-layer {
position: absolute;
inset: 0;
z-index: 10;
}
/* Unavailable time zones (outside working hours) */
swp-unavailable-layer {
position: absolute;
inset: 0;
z-index: 5;
pointer-events: none;
}
swp-unavailable-zone {
position: absolute;
left: 0;
right: 0;
background: var(--color-unavailable, rgba(0, 0, 0, 0.05));
pointer-events: none;
}
/* V2 Events - Event styling (from V1 calendar-events-css.css) */
/* Event base styles */
swp-day-columns swp-event {
--b-text: var(--color-text);
position: absolute;
border-radius: 3px;
overflow: hidden;
cursor: pointer;
transition: background-color 200ms ease, box-shadow 150ms ease, transform 150ms ease;
z-index: 10;
left: 2px;
right: 2px;
font-size: 12px;
padding: 4px 6px;
user-select: none;
/* Color system using color-mix() */
background-color: color-mix(in srgb, var(--b-primary) 10%, var(--b-mix));
color: var(--b-text);
border-left: 4px solid var(--b-primary);
/* Enable container queries for responsive layout */
container-type: size;
container-name: event;
/* CSS Grid layout for time, title, and description */
display: grid;
grid-template-columns: auto 1fr;
grid-template-rows: auto 1fr;
gap: 2px 4px;
align-items: start;
/* Dragging state */
&.dragging {
position: absolute;
z-index: 999999;
left: 2px;
right: 2px;
width: auto;
cursor: grabbing;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
/* Ghost clone (stays in original position during drag) */
&.drag-ghost {
opacity: 0.3;
pointer-events: none;
}
/* Hover state */
&:hover {
background-color: color-mix(in srgb, var(--b-primary) 15%, var(--b-mix));
}
}
swp-day-columns swp-event:hover {
z-index: 20;
}
/* Resize handle - actual draggable element */
swp-resize-handle {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 15px;
cursor: ns-resize;
z-index: 25;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity 150ms ease;
}
/* Show handle on hover */
swp-day-columns swp-event:hover swp-resize-handle {
opacity: 1;
}
/* Handle visual indicator (grip lines) */
swp-resize-handle::before {
content: '';
width: 30px;
height: 4px;
background: rgba(255, 255, 255, 0.9);
border-radius: 2px;
box-shadow:
0 -2px 0 rgba(255, 255, 255, 0.9),
0 2px 0 rgba(255, 255, 255, 0.9),
0 0 4px rgba(0, 0, 0, 0.2);
}
/* Global resizing state */
.swp--resizing {
user-select: none !important;
cursor: ns-resize !important;
}
.swp--resizing * {
cursor: ns-resize !important;
}
swp-day-columns swp-event-time {
grid-column: 1;
grid-row: 1;
font-size: 0.875rem;
font-weight: 500;
white-space: nowrap;
}
swp-day-columns swp-event-title {
grid-column: 2;
grid-row: 1;
font-size: 0.875rem;
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
swp-day-columns swp-event-description {
grid-column: 1 / -1;
grid-row: 2;
display: block;
font-size: 0.875rem;
opacity: 0.8;
line-height: 1.3;
overflow: hidden;
word-wrap: break-word;
/* Ensure description fills available height for gradient effect */
min-height: 100%;
align-self: stretch;
/* Fade-out effect for long descriptions */
-webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}
/* Container queries for height-based layout */
/* Hide description when event is too short (< 30px) */
@container event (height < 30px) {
swp-day-columns swp-event-description {
display: none;
}
}
/* Full description for tall events (>= 100px) */
@container event (height >= 100px) {
swp-day-columns swp-event-description {
max-height: none;
}
}
/* Multi-day events */
swp-multi-day-event {
position: relative;
height: 28px;
margin: 2px 4px;
padding: 0 8px;
border-radius: 4px;
display: flex;
align-items: center;
font-size: 0.875rem;
font-weight: 500;
cursor: pointer;
transition: all var(--transition-fast);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
user-select: none;
/* Color system using color-mix() */
--b-text: var(--color-text);
background-color: color-mix(in srgb, var(--b-primary) 10%, var(--b-mix));
color: var(--b-text);
border-left: 4px solid var(--b-primary);
&:hover {
background-color: color-mix(in srgb, var(--b-primary) 15%, var(--b-mix));
}
/* Continuation indicators */
&[data-continues-before="true"] {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
margin-left: 0;
padding-left: 20px;
&::before {
content: '\25C0';
position: absolute;
left: 4px;
opacity: 0.6;
font-size: 0.75rem;
}
}
&[data-continues-after="true"] {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
margin-right: 0;
padding-right: 20px;
&::after {
content: '\25B6';
position: absolute;
right: 4px;
opacity: 0.6;
font-size: 0.75rem;
}
}
&:hover {
transform: translateY(-1px);
box-shadow: var(--shadow-sm);
}
}
/* All-day events */
swp-allday-event {
--b-text: var(--color-text);
background-color: color-mix(in srgb, var(--b-primary) 10%, var(--b-mix));
color: var(--b-text);
border-left: 4px solid var(--b-primary);
cursor: pointer;
transition: background-color 200ms ease;
user-select: none;
&:hover {
background-color: color-mix(in srgb, var(--b-primary) 15%, var(--b-mix));
}
}
/* Event creation preview */
swp-event-preview {
position: absolute;
left: 8px;
right: 8px;
background: rgba(33, 150, 243, 0.1);
border: 2px dashed var(--color-primary);
border-radius: 4px;
/* Position via CSS variables */
top: calc(var(--preview-start) * var(--minute-height));
height: calc(var(--preview-duration) * var(--minute-height));
}
/* Event filtering styles */
/* When filter is active, all events are dimmed by default */
swp-events-layer[data-filter-active="true"] swp-event {
opacity: 0.2;
transition: opacity 200ms ease;
}
/* Events that match the filter stay normal */
swp-events-layer[data-filter-active="true"] swp-event[data-matches="true"] {
opacity: 1;
}
/* Event overlap styling */
/* Event group container for column sharing */
swp-event-group {
position: absolute;
display: grid;
gap: 2px;
left: 2px;
right: 2px;
z-index: 10;
}
/* Grid column configurations */
swp-event-group.cols-2 {
grid-template-columns: 1fr 1fr;
}
swp-event-group.cols-3 {
grid-template-columns: 1fr 1fr 1fr;
}
swp-event-group.cols-4 {
grid-template-columns: 1fr 1fr 1fr 1fr;
}
/* Stack levels using margin-left */
swp-event-group.stack-level-0 {
margin-left: 0px;
}
swp-event-group.stack-level-1 {
margin-left: 15px;
}
swp-event-group.stack-level-2 {
margin-left: 30px;
}
swp-event-group.stack-level-3 {
margin-left: 45px;
}
swp-event-group.stack-level-4 {
margin-left: 60px;
}
/* Shadow for stacked events (level 1+) */
swp-event[data-stack-link]:not([data-stack-link*='"stackLevel":0']),
swp-event-group[data-stack-link]:not([data-stack-link*='"stackLevel":0']) swp-event {
box-shadow:
0 -1px 2px rgba(0, 0, 0, 0.1),
0 1px 2px rgba(0, 0, 0, 0.1);
}
/* Child events within grid */
swp-event-group swp-event {
position: relative;
left: 0;
right: 0;
}
/* All-day event transition for smooth repositioning */
swp-allday-container swp-event.transitioning {
transition: grid-area 200ms ease-out, grid-row 200ms ease-out, grid-column 200ms ease-out;
}
/* Color utility classes */
.is-red { --b-primary: var(--b-color-red); }
.is-pink { --b-primary: var(--b-color-pink); }
.is-magenta { --b-primary: var(--b-color-magenta); }
.is-purple { --b-primary: var(--b-color-purple); }
.is-violet { --b-primary: var(--b-color-violet); }
.is-deep-purple { --b-primary: var(--b-color-deep-purple); }
.is-indigo { --b-primary: var(--b-color-indigo); }
.is-blue { --b-primary: var(--b-color-blue); }
.is-light-blue { --b-primary: var(--b-color-light-blue); }
.is-cyan { --b-primary: var(--b-color-cyan); }
.is-teal { --b-primary: var(--b-color-teal); }
.is-green { --b-primary: var(--b-color-green); }
.is-light-green { --b-primary: var(--b-color-light-green); }
.is-lime { --b-primary: var(--b-color-lime); }
.is-yellow { --b-primary: var(--b-color-yellow); }
.is-amber { --b-primary: var(--b-color-amber); }
.is-orange { --b-primary: var(--b-color-orange); }
.is-deep-orange { --b-primary: var(--b-color-deep-orange); }
/* Header drawer items */
swp-header-item {
--b-text: var(--color-text);
/* Positioneres via style.gridArea */
height: 22px;
margin: 1px 4px;
padding: 2px 8px;
border-radius: 3px;
font-size: 0.75rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: flex;
align-items: center;
cursor: pointer;
user-select: none;
transition: background-color 200ms ease;
/* Color system - inverted from swp-event */
background-color: color-mix(in srgb, var(--b-primary) 15%, var(--b-mix));
color: var(--b-text);
&:hover {
background-color: color-mix(in srgb, var(--b-primary) 10%, var(--b-mix));
}
/* Dragging state */
&.dragging {
opacity: 0.7;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
}

41
test-package/index.html Normal file
View file

@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="da">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calendar Package Test</title>
<link rel="stylesheet" href="dist/css/calendar.css">
</head>
<body>
<h1>Calendar Package Test</h1>
<div class="calendar-wrapper">
<swp-calendar-container>
<swp-time-axis>
<swp-header-spacer></swp-header-spacer>
<swp-time-axis-content id="time-axis"></swp-time-axis-content>
</swp-time-axis>
<swp-grid-container>
<swp-header-viewport>
<swp-header-track>
<swp-calendar-header></swp-calendar-header>
</swp-header-track>
<swp-header-drawer></swp-header-drawer>
</swp-header-viewport>
<swp-content-viewport>
<swp-content-track>
<swp-scrollable-content>
<swp-time-grid>
<swp-grid-lines></swp-grid-lines>
<swp-day-columns></swp-day-columns>
</swp-time-grid>
</swp-scrollable-content>
</swp-content-track>
</swp-content-viewport>
</swp-grid-container>
</swp-calendar-container>
</div>
<script type="module" src="dist/bundle.js"></script>
</body>
</html>

654
test-package/package-lock.json generated Normal file
View file

@ -0,0 +1,654 @@
{
"name": "test-package",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "test-package",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"@novadi/core": "^0.6.0",
"calendar": "^0.1.6",
"dayjs": "^1.11.19"
},
"devDependencies": {
"esbuild": "^0.27.2",
"typescript": "^5.9.3"
}
},
"node_modules/@esbuild/aix-ppc64": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.2.tgz",
"integrity": "sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==",
"cpu": [
"ppc64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"aix"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/android-arm": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.2.tgz",
"integrity": "sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA==",
"cpu": [
"arm"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/android-arm64": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.2.tgz",
"integrity": "sha512-pvz8ZZ7ot/RBphf8fv60ljmaoydPU12VuXHImtAs0XhLLw+EXBi2BLe3OYSBslR4rryHvweW5gmkKFwTiFy6KA==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/android-x64": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.2.tgz",
"integrity": "sha512-z8Ank4Byh4TJJOh4wpz8g2vDy75zFL0TlZlkUkEwYXuPSgX8yzep596n6mT7905kA9uHZsf/o2OJZubl2l3M7A==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/darwin-arm64": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.2.tgz",
"integrity": "sha512-davCD2Zc80nzDVRwXTcQP/28fiJbcOwvdolL0sOiOsbwBa72kegmVU0Wrh1MYrbuCL98Omp5dVhQFWRKR2ZAlg==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/darwin-x64": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.2.tgz",
"integrity": "sha512-ZxtijOmlQCBWGwbVmwOF/UCzuGIbUkqB1faQRf5akQmxRJ1ujusWsb3CVfk/9iZKr2L5SMU5wPBi1UWbvL+VQA==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/freebsd-arm64": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.2.tgz",
"integrity": "sha512-lS/9CN+rgqQ9czogxlMcBMGd+l8Q3Nj1MFQwBZJyoEKI50XGxwuzznYdwcav6lpOGv5BqaZXqvBSiB/kJ5op+g==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/freebsd-x64": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.2.tgz",
"integrity": "sha512-tAfqtNYb4YgPnJlEFu4c212HYjQWSO/w/h/lQaBK7RbwGIkBOuNKQI9tqWzx7Wtp7bTPaGC6MJvWI608P3wXYA==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-arm": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.2.tgz",
"integrity": "sha512-vWfq4GaIMP9AIe4yj1ZUW18RDhx6EPQKjwe7n8BbIecFtCQG4CfHGaHuh7fdfq+y3LIA2vGS/o9ZBGVxIDi9hw==",
"cpu": [
"arm"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-arm64": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.2.tgz",
"integrity": "sha512-hYxN8pr66NsCCiRFkHUAsxylNOcAQaxSSkHMMjcpx0si13t1LHFphxJZUiGwojB1a/Hd5OiPIqDdXONia6bhTw==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-ia32": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.2.tgz",
"integrity": "sha512-MJt5BRRSScPDwG2hLelYhAAKh9imjHK5+NE/tvnRLbIqUWa+0E9N4WNMjmp/kXXPHZGqPLxggwVhz7QP8CTR8w==",
"cpu": [
"ia32"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-loong64": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.2.tgz",
"integrity": "sha512-lugyF1atnAT463aO6KPshVCJK5NgRnU4yb3FUumyVz+cGvZbontBgzeGFO1nF+dPueHD367a2ZXe1NtUkAjOtg==",
"cpu": [
"loong64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-mips64el": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.2.tgz",
"integrity": "sha512-nlP2I6ArEBewvJ2gjrrkESEZkB5mIoaTswuqNFRv/WYd+ATtUpe9Y09RnJvgvdag7he0OWgEZWhviS1OTOKixw==",
"cpu": [
"mips64el"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-ppc64": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.2.tgz",
"integrity": "sha512-C92gnpey7tUQONqg1n6dKVbx3vphKtTHJaNG2Ok9lGwbZil6DrfyecMsp9CrmXGQJmZ7iiVXvvZH6Ml5hL6XdQ==",
"cpu": [
"ppc64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-riscv64": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.2.tgz",
"integrity": "sha512-B5BOmojNtUyN8AXlK0QJyvjEZkWwy/FKvakkTDCziX95AowLZKR6aCDhG7LeF7uMCXEJqwa8Bejz5LTPYm8AvA==",
"cpu": [
"riscv64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-s390x": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.2.tgz",
"integrity": "sha512-p4bm9+wsPwup5Z8f4EpfN63qNagQ47Ua2znaqGH6bqLlmJ4bx97Y9JdqxgGZ6Y8xVTixUnEkoKSHcpRlDnNr5w==",
"cpu": [
"s390x"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-x64": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.2.tgz",
"integrity": "sha512-uwp2Tip5aPmH+NRUwTcfLb+W32WXjpFejTIOWZFw/v7/KnpCDKG66u4DLcurQpiYTiYwQ9B7KOeMJvLCu/OvbA==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/netbsd-arm64": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.2.tgz",
"integrity": "sha512-Kj6DiBlwXrPsCRDeRvGAUb/LNrBASrfqAIok+xB0LxK8CHqxZ037viF13ugfsIpePH93mX7xfJp97cyDuTZ3cw==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"netbsd"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/netbsd-x64": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.2.tgz",
"integrity": "sha512-HwGDZ0VLVBY3Y+Nw0JexZy9o/nUAWq9MlV7cahpaXKW6TOzfVno3y3/M8Ga8u8Yr7GldLOov27xiCnqRZf0tCA==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"netbsd"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/openbsd-arm64": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.2.tgz",
"integrity": "sha512-DNIHH2BPQ5551A7oSHD0CKbwIA/Ox7+78/AWkbS5QoRzaqlev2uFayfSxq68EkonB+IKjiuxBFoV8ESJy8bOHA==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"openbsd"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/openbsd-x64": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.2.tgz",
"integrity": "sha512-/it7w9Nb7+0KFIzjalNJVR5bOzA9Vay+yIPLVHfIQYG/j+j9VTH84aNB8ExGKPU4AzfaEvN9/V4HV+F+vo8OEg==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"openbsd"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/openharmony-arm64": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.2.tgz",
"integrity": "sha512-LRBbCmiU51IXfeXk59csuX/aSaToeG7w48nMwA6049Y4J4+VbWALAuXcs+qcD04rHDuSCSRKdmY63sruDS5qag==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"openharmony"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/sunos-x64": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.2.tgz",
"integrity": "sha512-kMtx1yqJHTmqaqHPAzKCAkDaKsffmXkPHThSfRwZGyuqyIeBvf08KSsYXl+abf5HDAPMJIPnbBfXvP2ZC2TfHg==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"sunos"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/win32-arm64": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.2.tgz",
"integrity": "sha512-Yaf78O/B3Kkh+nKABUF++bvJv5Ijoy9AN1ww904rOXZFLWVc5OLOfL56W+C8F9xn5JQZa3UX6m+IktJnIb1Jjg==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/win32-ia32": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.2.tgz",
"integrity": "sha512-Iuws0kxo4yusk7sw70Xa2E2imZU5HoixzxfGCdxwBdhiDgt9vX9VUCBhqcwY7/uh//78A1hMkkROMJq9l27oLQ==",
"cpu": [
"ia32"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/win32-x64": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.2.tgz",
"integrity": "sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@jridgewell/gen-mapping": {
"version": "0.3.13",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
"integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",
"license": "MIT",
"dependencies": {
"@jridgewell/sourcemap-codec": "^1.5.0",
"@jridgewell/trace-mapping": "^0.3.24"
}
},
"node_modules/@jridgewell/remapping": {
"version": "2.3.5",
"resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz",
"integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==",
"license": "MIT",
"dependencies": {
"@jridgewell/gen-mapping": "^0.3.5",
"@jridgewell/trace-mapping": "^0.3.24"
}
},
"node_modules/@jridgewell/resolve-uri": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
"integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
"license": "MIT",
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@jridgewell/sourcemap-codec": {
"version": "1.5.5",
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
"integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
"license": "MIT"
},
"node_modules/@jridgewell/trace-mapping": {
"version": "0.3.31",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz",
"integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==",
"license": "MIT",
"dependencies": {
"@jridgewell/resolve-uri": "^3.1.0",
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
"node_modules/@novadi/core": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/@novadi/core/-/core-0.6.0.tgz",
"integrity": "sha512-CU1134Nd7ULMg9OQbID5oP+FLtrMkNiLJ17+dmy4jjmPDcPK/dVzKTFxvJmbBvEfZEc9WtmkmJjqw11ABU7Jxw==",
"license": "MIT",
"dependencies": {
"unplugin": "^2.3.10"
},
"optionalDependencies": {
"@rollup/rollup-win32-x64-msvc": "^4.52.5"
},
"peerDependencies": {
"typescript": ">=5.0.0"
}
},
"node_modules/@rollup/rollup-win32-x64-msvc": {
"version": "4.56.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.56.0.tgz",
"integrity": "sha512-H8AE9Ur/t0+1VXujj90w0HrSOuv0Nq9r1vSZF2t5km20NTfosQsGGUXDaKdQZzwuLts7IyL1fYT4hM95TI9c4g==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"win32"
]
},
"node_modules/acorn": {
"version": "8.15.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"license": "MIT",
"bin": {
"acorn": "bin/acorn"
},
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/calendar": {
"version": "0.1.6",
"resolved": "http://npm.jarjarbinks:4873/calendar/-/calendar-0.1.6.tgz",
"integrity": "sha512-dZKOg6gHTAexklxsBGnszTWDi0rkV68XXV9epaHxZP6RlMvys155dpitq6q3aWCGbSw8xKeTF7FTHaz5yJoT6A==",
"dependencies": {
"dayjs": "^1.11.0"
},
"peerDependencies": {
"@novadi/core": "^0.6.0"
}
},
"node_modules/dayjs": {
"version": "1.11.19",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz",
"integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==",
"license": "MIT"
},
"node_modules/esbuild": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.2.tgz",
"integrity": "sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
"bin": {
"esbuild": "bin/esbuild"
},
"engines": {
"node": ">=18"
},
"optionalDependencies": {
"@esbuild/aix-ppc64": "0.27.2",
"@esbuild/android-arm": "0.27.2",
"@esbuild/android-arm64": "0.27.2",
"@esbuild/android-x64": "0.27.2",
"@esbuild/darwin-arm64": "0.27.2",
"@esbuild/darwin-x64": "0.27.2",
"@esbuild/freebsd-arm64": "0.27.2",
"@esbuild/freebsd-x64": "0.27.2",
"@esbuild/linux-arm": "0.27.2",
"@esbuild/linux-arm64": "0.27.2",
"@esbuild/linux-ia32": "0.27.2",
"@esbuild/linux-loong64": "0.27.2",
"@esbuild/linux-mips64el": "0.27.2",
"@esbuild/linux-ppc64": "0.27.2",
"@esbuild/linux-riscv64": "0.27.2",
"@esbuild/linux-s390x": "0.27.2",
"@esbuild/linux-x64": "0.27.2",
"@esbuild/netbsd-arm64": "0.27.2",
"@esbuild/netbsd-x64": "0.27.2",
"@esbuild/openbsd-arm64": "0.27.2",
"@esbuild/openbsd-x64": "0.27.2",
"@esbuild/openharmony-arm64": "0.27.2",
"@esbuild/sunos-x64": "0.27.2",
"@esbuild/win32-arm64": "0.27.2",
"@esbuild/win32-ia32": "0.27.2",
"@esbuild/win32-x64": "0.27.2"
}
},
"node_modules/picomatch": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
"license": "MIT",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/typescript": {
"version": "5.9.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=14.17"
}
},
"node_modules/unplugin": {
"version": "2.3.11",
"resolved": "https://registry.npmjs.org/unplugin/-/unplugin-2.3.11.tgz",
"integrity": "sha512-5uKD0nqiYVzlmCRs01Fhs2BdkEgBS3SAVP6ndrBsuK42iC2+JHyxM05Rm9G8+5mkmRtzMZGY8Ct5+mliZxU/Ww==",
"license": "MIT",
"dependencies": {
"@jridgewell/remapping": "^2.3.5",
"acorn": "^8.15.0",
"picomatch": "^4.0.3",
"webpack-virtual-modules": "^0.6.2"
},
"engines": {
"node": ">=18.12.0"
}
},
"node_modules/webpack-virtual-modules": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz",
"integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==",
"license": "MIT"
}
}
}

21
test-package/package.json Normal file
View file

@ -0,0 +1,21 @@
{
"name": "test-package",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"@novadi/core": "^0.6.0",
"calendar": "^0.1.6",
"dayjs": "^1.11.19"
},
"devDependencies": {
"esbuild": "^0.27.2",
"typescript": "^5.9.3"
}
}

139
test-package/src/index.ts Normal file
View file

@ -0,0 +1,139 @@
import { Container } from '@novadi/core';
import {
registerCoreServices,
CalendarApp,
IndexedDBContext,
SettingsService,
ViewConfigService,
EventService,
EventBus,
CalendarEvents,
EventPersistenceManager
} from 'calendar';
import { registerSchedules } from 'calendar/schedules';
async function init() {
// Check if database already exists
const databases = await indexedDB.databases();
const dbExists = databases.some(db => db.name === 'CalendarTestDB');
const container = new Container();
const builder = container.builder();
registerCoreServices(builder, {
dbConfig: { dbName: 'CalendarTestDB', dbVersion: 4 }
});
registerSchedules(builder);
const app = builder.build();
console.log('Container created');
// Initialize IndexedDB
const dbContext = app.resolveType<IndexedDBContext>();
await dbContext.initialize();
console.log('IndexedDB initialized');
const settingsService = app.resolveType<SettingsService>();
const viewConfigService = app.resolveType<ViewConfigService>();
const eventService = app.resolveType<EventService>();
if (dbExists) {
console.log('Database exists, skipping seed');
} else {
console.log('Seeding data...');
await seedData(settingsService, viewConfigService, eventService);
}
// Initialize and render
const calendarApp = app.resolveType<CalendarApp>();
const containerEl = document.querySelector('swp-calendar-container') as HTMLElement;
await calendarApp.init(containerEl);
const eventBus = app.resolveType<EventBus>();
eventBus.emit(CalendarEvents.CMD_RENDER, { viewId: 'simple' });
console.log('Calendar rendered');
// Debug listeners
document.addEventListener('event:drag-end', (e) => {
console.log('event:drag-end:', (e as CustomEvent).detail);
});
document.addEventListener('event:updated', (e) => {
console.log('event:updated:', (e as CustomEvent).detail);
});
const persistenceManager = app.resolveType<EventPersistenceManager>();
console.log('EventPersistenceManager resolved:', persistenceManager);
}
async function seedData(
settingsService: SettingsService,
viewConfigService: ViewConfigService,
eventService: EventService
) {
// Grid settings
await settingsService.save({
id: 'grid',
dayStartHour: 8,
dayEndHour: 17,
workStartHour: 9,
workEndHour: 16,
hourHeight: 64,
snapInterval: 15,
syncStatus: 'synced'
});
// Workweek settings
await settingsService.save({
id: 'workweek',
presets: {
standard: { id: 'standard', label: 'Standard', workDays: [1, 2, 3, 4, 5], periodDays: 7 }
},
defaultPreset: 'standard',
firstDayOfWeek: 1,
syncStatus: 'synced'
});
// Simple view config
await viewConfigService.save({
id: 'simple',
groupings: [{ type: 'date', values: [], idProperty: 'date', derivedFrom: 'start' }],
syncStatus: 'synced'
});
// Add test events
const today = new Date();
today.setHours(0, 0, 0, 0);
console.log('Event date:', today.toISOString());
const start1 = new Date(today);
start1.setHours(9, 0, 0, 0);
const end1 = new Date(today);
end1.setHours(10, 0, 0, 0);
await eventService.save({
id: '1',
title: 'Morgenmøde',
start: start1,
end: end1,
type: 'meeting',
allDay: false,
syncStatus: 'synced'
});
const start2 = new Date(today);
start2.setHours(12, 0, 0, 0);
const end2 = new Date(today);
end2.setHours(13, 0, 0, 0);
await eventService.save({
id: '2',
title: 'Frokost',
start: start2,
end: end2,
type: 'break',
allDay: false,
syncStatus: 'synced'
});
}
init().catch(console.error);

View file

@ -0,0 +1,17 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"outDir": "./dist",
"rootDir": "./src",
"lib": ["ES2024", "DOM", "DOM.Iterable"],
"experimentalDecorators": true,
"emitDecoratorMetadata": true
},
"include": ["src/**/*"]
}