@sme.up/ketchup2 2.8.1 → 2.9.0

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 (45) hide show
  1. package/dist/assets/img/calendar.png +0 -0
  2. package/dist/basic-components/file-upload/file-upload-types.d.ts +4 -1
  3. package/dist/basic-components/file-upload/file-upload-types.d.ts.map +1 -1
  4. package/dist/basic-components/file-upload/file-upload.d.ts.map +1 -1
  5. package/dist/basic-components/tree/{tree.types.d.ts → tree-types.d.ts} +1 -1
  6. package/dist/basic-components/tree/{tree.types.d.ts.map → tree-types.d.ts.map} +1 -1
  7. package/dist/basic-components/tree/tree.d.ts +1 -1
  8. package/dist/components/calendar/calendar-types.d.ts +146 -0
  9. package/dist/components/calendar/calendar-types.d.ts.map +1 -0
  10. package/dist/components/calendar/calendar-utils.d.ts +165 -0
  11. package/dist/components/calendar/calendar-utils.d.ts.map +1 -0
  12. package/dist/components/calendar/calendar-utils.test.d.ts +2 -0
  13. package/dist/components/calendar/calendar-utils.test.d.ts.map +1 -0
  14. package/dist/components/calendar/calendar.d.ts +16 -0
  15. package/dist/components/calendar/calendar.d.ts.map +1 -0
  16. package/dist/components/calendar/views/calendar-month-grid.d.ts +49 -0
  17. package/dist/components/calendar/views/calendar-month-grid.d.ts.map +1 -0
  18. package/dist/components/calendar/views/calendar-time-grid.d.ts +44 -0
  19. package/dist/components/calendar/views/calendar-time-grid.d.ts.map +1 -0
  20. package/dist/components/data-table/graphic-cell/graphic-cell-data.d.ts +3 -0
  21. package/dist/components/data-table/graphic-cell/graphic-cell-data.d.ts.map +1 -0
  22. package/dist/components/field/field.d.ts.map +1 -1
  23. package/dist/components/pdf/pdf-types.d.ts +32 -1
  24. package/dist/components/pdf/pdf-types.d.ts.map +1 -1
  25. package/dist/components/pdf/pdf.d.ts.map +1 -1
  26. package/dist/components/toolbar/toolbar.d.ts.map +1 -1
  27. package/dist/functional-components/row/row.d.ts.map +1 -1
  28. package/dist/index.d.ts +5 -2
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/ketchup2.css +1 -1
  31. package/dist/ketchup2.es.js +25218 -24200
  32. package/dist/locale/en/translation.json.d.ts +3 -1
  33. package/dist/locale/it/translation.json.d.ts +3 -1
  34. package/dist/types/data-structures.d.ts +2 -0
  35. package/dist/types/data-structures.d.ts.map +1 -1
  36. package/dist/types/generic.d.ts +1 -0
  37. package/dist/types/generic.d.ts.map +1 -1
  38. package/dist/types/translation.d.ts +3 -1
  39. package/dist/types/translation.d.ts.map +1 -1
  40. package/dist/utils/date.d.ts +6 -2
  41. package/dist/utils/date.d.ts.map +1 -1
  42. package/dist/utils/objects.d.ts.map +1 -1
  43. package/dist/utils/totals/totals-utils.d.ts +3 -1
  44. package/dist/utils/totals/totals-utils.d.ts.map +1 -1
  45. package/package.json +3 -1
Binary file
@@ -30,7 +30,7 @@ export interface FileUploadProps {
30
30
  FupMul?: "1" | "true" | "True" | boolean;
31
31
  /** Maximum number of files allowed */
32
32
  maxFiles?: number;
33
- /** FupSzl - Maximum size (in bytes) for each file */
33
+ /** FupSzl - Maximum size (in KB) for each file. Defaults to 512 MiB when omitted, non-numeric, or negative. */
34
34
  FupSzl?: string;
35
35
  /** Disabled state */
36
36
  disabled?: boolean;
@@ -58,6 +58,8 @@ export interface FileUploadProps {
58
58
  FupShp?: string;
59
59
  /** FupDir - Preferred upload directory on the server (informational) */
60
60
  FupDir?: string;
61
+ /** FupNam - Target file name on the server (informational) */
62
+ FupNam?: string;
61
63
  /** FupDrg - Size of the drop area */
62
64
  FupDrg?: "Big" | "Small";
63
65
  /** Label for the file upload component */
@@ -65,4 +67,5 @@ export interface FileUploadProps {
65
67
  /** If true, the component is in visual-only mode (no uploads allowed) */
66
68
  isVisualOnly?: boolean;
67
69
  }
70
+ export declare const EXTENSION_MIME_MAP: Record<string, string[]>;
68
71
  //# sourceMappingURL=file-upload-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-upload-types.d.ts","sourceR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AM,CAAA;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,GAAG,iBAAiB,EAAE,KAAK,IAAI,CAAA;IAClE;;;OAGG;IACH,eAAe,CAAC,EAAE,aAAa,CAAA;IAC/B,qGAAqG;IACrG,MAAM,CAAC,EAAE,GAAG,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;IACxC,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,wFAAwF;IACxF,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,qCAAqC;IACrC,MAAM,CAAC,EAAE,KAAK,GAAG,OAAO,CAAA;IAExB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,yEAAyE;IACzE,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB"}
1
+ {"version":3,"file":"file-upload-types.d.ts","sourceRoot":"","sources":["../../../src/basic-components/file-upload/file-upload-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAE3D,MAAM,MAAM,QAAQ,GAAG;IACrB,YAAY,EAAE,IAAI,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,gBAAgB,EAAE,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,IA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M,CAAC,EAAE,MAAM,CAAA;IACf,qCAAqC;IACrC,MAAM,CAAC,EAAE,KAAK,GAAG,OAAO,CAAA;IAExB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,yEAAyE;IACzE,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAGD,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAgBvD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"file-upload.d.ts","sourceRoot":"","sources":["../../../src/basic-components/file-upload/file-upload.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAEhF,OAAO,KAAK,EAEV,eAAe,EAGhB,MAAM,qBAAqB,CAAA;AAS5B,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAwkBhD,CAAA;AAED,eAAe,UAAU,CAAA"}
1
+ {"version":3,"file":"file-upload.d.ts","sourceRoot":"","sources":["../../../src/basic-components/file-upload/file-upload.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAEhF,OAAO,EAEL,KAAK,eAAe,EAIrB,MAAM,qBAAqB,CAAA;AAW5B,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAgnBhD,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -9,4 +9,4 @@ export interface TreeProps extends Omit<StringCellBindProps, "bindValue" | "onCl
9
9
  ShowColumns?: BooleanValue;
10
10
  onClick?: (e: React.MouseEvent | React.KeyboardEvent, node: DataNode) => void;
11
11
  }
12
- //# sourceMappingURL=tree.types.d.ts.map
12
+ //# sourceMappingURL=tree-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tree.types.d.ts","sourceRoot":"","sources":["../../../src/basic-components/tree/tree.types.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAExD,MAAM,WAAW,SAAU,SAAQ,IAAI,CACrC,mBAAmB,EACnB,WAAW,GAAG,SAAS,CACxB;IACC;;;OAGG;IACH,WAAW,CAAC,EAAE,YAAY,CAAA;IAC1B,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,aAAa,EAAE,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAA;CAC9E"}
1
+ {"version":3,"file":"tree-types.d.ts","sourceRoot":"","sources":["../../../src/basic-components/tree/tree-types.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAExD,MAAM,WAAW,SAAU,SAAQ,IAAI,CACrC,mBAAmB,EACnB,WAAW,GAAG,SAAS,CACxB;IACC;;;OAGG;IACH,WAAW,CAAC,EAAE,YAAY,CAAA;IAC1B,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,aAAa,EAAE,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAA;CAC9E"}
@@ -1,4 +1,4 @@
1
- import { TreeProps } from './tree.types';
1
+ import { TreeProps } from './tree-types';
2
2
  declare const Tree: React.FC<TreeProps>;
3
3
  export default Tree;
4
4
  //# sourceMappingURL=tree.d.ts.map
@@ -0,0 +1,146 @@
1
+ import { DataCell, DataRow, DataTable } from '../../types/data-structures';
2
+ import { BooleanValue } from '../../types/legacy';
3
+ /** Calendar view mode. */
4
+ export type CalendarView = "month" | "week" | "day";
5
+ /**
6
+ * A single cell in the month/week/day grid.
7
+ */
8
+ export type DayCell = {
9
+ date: Date;
10
+ day: number;
11
+ isCurrentMonth: boolean;
12
+ isToday: boolean;
13
+ isWeekend: boolean;
14
+ dateKey: string;
15
+ };
16
+ /** Range of hours for a timed event, in minutes from midnight. */
17
+ export type TimeRange = {
18
+ /** Start time in minutes from midnight (0–1439), or null for all-day. */
19
+ startMin: number | null;
20
+ /** End time in minutes from midnight (0–1439), or null for all-day. */
21
+ endMin: number | null;
22
+ };
23
+ /** A timed event ready for time-grid rendering. */
24
+ export type TimedEvent = {
25
+ row: DataRow;
26
+ dateKey: string;
27
+ label: string;
28
+ labelStyle?: DataCell["style"];
29
+ icon?: string;
30
+ img?: string;
31
+ /** Time range (null = all-day event). */
32
+ time: TimeRange | null;
33
+ };
34
+ /**
35
+ * Options for the {@link Calendar} component.
36
+ *
37
+ * Mirrors the backend `CalOptions` contract with CapitalizedCamelCase
38
+ * (AS400 legacy convention). Props with `Col` suffix name a column in the
39
+ * input `DataTable`; if omitted, the component tries to auto-detect
40
+ * the correct column from the data.
41
+ */
42
+ export type CalendarOptions = {
43
+ /** Column key in the DataTable holding the event date. Auto-detected if omitted. */
44
+ DatCol?: string;
45
+ /** Enable or disable drag & drop of events between days. @default "No" */
46
+ Drag?: BooleanValue;
47
+ /** Column key holding the end date for multi-day events. */
48
+ FinCol?: string;
49
+ /** Column key holding an icon name to display (top-right of the event). */
50
+ IcoCol?: string;
51
+ /** Column key holding an image URL to display (top-right of the event). */
52
+ ImgCol?: string;
53
+ /** Column key holding the start date for multi-day events. */
54
+ IniCol?: string;
55
+ /** Column key holding the start time for timed events (HHmm or HH:mm format). */
56
+ IniTimCol?: string;
57
+ /** Column key holding the end time for timed events (HHmm or HH:mm format). */
58
+ FinTimCol?: string;
59
+ /** Initial date to position the calendar at (ISO `YYYY-MM-DD` or `YYYYMMDD`). */
60
+ InitialDate?: string;
61
+ /**
62
+ * Maximum number of events shown per day cell before they collapse into an
63
+ * "expand more" toggle. Days always keep the same size; extra events are
64
+ * revealed by clicking the toggle.
65
+ * @default 3
66
+ */
67
+ MaxEvents?: number;
68
+ /** Show or hide the month/week/day navigation buttons. @default "Yes" */
69
+ ShowNavigation?: BooleanValue;
70
+ /** Show or hide the view-switch buttons (month / week / day). @default "No" */
71
+ ShowViewSwitch?: BooleanValue;
72
+ /** Column key pointing to the cell whose style is applied to the event label. */
73
+ StyCol?: string;
74
+ /** Column key holding the event description / title. Auto-detected if omitted. */
75
+ TitCol?: string;
76
+ /** Active view mode (case-insensitive: "month", "week", "day"). @default "month" */
77
+ ShowAs?: CalendarView | string;
78
+ /** Aggregation formula for the daily total, e.g. `SUM(hours)` or `COUNT`. */
79
+ Totals?: string;
80
+ };
81
+ /**
82
+ * Props for the {@link Calendar} component.
83
+ *
84
+ * Extends {@link CalendarOptions} with the data input and event callbacks.
85
+ */
86
+ export type CalendarProps = CalendarOptions & {
87
+ /** The data table containing calendar events. */
88
+ data: DataTable;
89
+ /** Callback fired when an event is clicked. */
90
+ onClick?: (payload: {
91
+ row: DataRow;
92
+ date: string;
93
+ }) => void;
94
+ /** Callback fired when right-clicking an event (context menu). */
95
+ onContextMenu?: (event: React.MouseEvent | MouseEvent, payload: {
96
+ row: DataRow;
97
+ date: string;
98
+ }) => void;
99
+ /** Callback fired when a day cell is clicked (not on an event). */
100
+ onDayClick?: (payload: {
101
+ date: string;
102
+ }) => void;
103
+ /** Callback fired when the displayed period changes (month, week, or day navigation). */
104
+ onPeriodChange?: (payload: {
105
+ fromDate: string;
106
+ toDate: string;
107
+ }) => void;
108
+ /** Callback fired when an event is dragged from one day to another. */
109
+ onDrop?: (payload: {
110
+ row: DataRow;
111
+ fromDate: string;
112
+ toDate: string;
113
+ }) => void;
114
+ };
115
+ /**
116
+ * Internal cell id constants used for `smp-id` test queries.
117
+ */
118
+ export declare enum CalendarCellId {
119
+ ROOT = "calendar",
120
+ GRID = "calendar-grid",
121
+ DAY = "calendar-day",
122
+ DAY_TITLE = "calendar-day-title",
123
+ EVENTS = "calendar-events",
124
+ EVENT = "calendar-event",
125
+ EVENT_MARKER = "calendar-event-marker",
126
+ EVENT_LABEL = "calendar-event-label",
127
+ EVENT_ICON = "calendar-event-icon",
128
+ DAY_TOTAL = "calendar-day-total",
129
+ HEADER = "calendar-header",
130
+ NAV_PREV = "calendar-nav-prev",
131
+ NAV_NEXT = "calendar-nav-next",
132
+ NAV_TODAY = "calendar-nav-today",
133
+ MONTH_LABEL = "calendar-month-label",
134
+ VIEW_SWITCH = "calendar-view-switch",
135
+ TIME_GRID = "calendar-time-grid",
136
+ TIME_COLUMN = "calendar-time-column",
137
+ TIME_SLOT = "calendar-time-slot",
138
+ ALL_DAY_ROW = "calendar-all-day-row",
139
+ ALL_DAY_CELL = "calendar-all-day-cell",
140
+ TIMED_EVENT = "calendar-timed-event",
141
+ EVENTS_MORE = "calendar-events-more",
142
+ WEEKDAYS = "calendar-weekdays",
143
+ WEEKDAYS_TIME = "calendar-weekdays-time",
144
+ FIXED_ROWS = "calendar-fixed-rows"
145
+ }
146
+ //# sourceMappingURL=calendar-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar-types.d.ts","sourceRoot":"","sources":["../../../src/components/calendar/calendar-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEtD,0BAA0B;AAC1B,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAA;AAEnD;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,EAAE,IAAI,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;IACX,cAAc,EAAE,OAAO,CAAA;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,kEAAkE;AAClE,MAAM,MAAM,SAAS,GAAG;IACtB,yEAAyE;I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B,QAAQ,sBAAsB;IAC9B,QAAQ,sBAAsB;IAC9B,SAAS,uBAAuB;IAChC,WAAW,yBAAyB;IACpC,WAAW,yBAAyB;IACpC,SAAS,uBAAuB;IAChC,WAAW,yBAAyB;IACpC,SAAS,uBAAuB;IAChC,WAAW,yBAAyB;IACpC,YAAY,0BAA0B;IACtC,WAAW,yBAAyB;IACpC,WAAW,yBAAyB;IACpC,QAAQ,sBAAsB;IAC9B,aAAa,2BAA2B;IACxC,UAAU,wBAAwB;CACnC"}
@@ -0,0 +1,165 @@
1
+ import { DataColumn, DataCell, DataRow, DataTable } from '../../types/data-structures';
2
+ import { DayCell, TimedEvent, TimeRange, CalendarOptions, CalendarView } from './calendar-types';
3
+ /**
4
+ * Resolve calendar props defaults from the data when explicit props are missing.
5
+ *
6
+ * Adapts the legacy `calendarOptionsToCalendarProps` logic to ketchup2:
7
+ * - DatCol: if not provided or not found in columns, auto-detect a date column
8
+ * using `isObjectDate` (D8/A8 obj type).
9
+ * - TitCol: if not provided or not found in columns, auto-detect the first
10
+ * column whose obj is empty or starts with "**".
11
+ * - FinCol/IniCol: if provided but not found in columns, clear them.
12
+ * - InitialDate: normalize `YYYYMMDD` to `YYYY-MM-DD`. If not provided,
13
+ * use the first row's DatCol value.
14
+ *
15
+ * @returns resolved column config and initial date string.
16
+ */
17
+ export declare function resolveCalendarDefaults(props: CalendarOptions, data: DataTable): CalendarOptions & {
18
+ DatCol: string;
19
+ TitCol: string;
20
+ FinCol: string;
21
+ IniCol: string;
22
+ };
23
+ /**
24
+ * Compute the daily total using the given formula and column.
25
+ *
26
+ * Delegates to `computeGroupTotals` from `totals-utils.ts`.
27
+ *
28
+ * - `SUM(column)`: sum of numeric values
29
+ * - `COUNT`: number of rows
30
+ * - `AVG(column)`: average of numeric values
31
+ * - `MIN(column)`: minimum numeric value
32
+ * - `MAX(column)`: maximum numeric value
33
+ *
34
+ * @returns the computed total, or `null` if there are no rows or the formula is invalid.
35
+ */
36
+ export declare function computeTotal(rows: DataRow[] | undefined, formula: string | undefined): number | null;
37
+ /** Format a Date into a `YYYY-MM-DD` key string using local time. */
38
+ export declare function formatDateKey(date: Date): string;
39
+ /**
40
+ * Parse a date string into a Date at local midnight.
41
+ * Accepts ISO `YYYY-MM-DD` and falls back to `new Date()` parsing.
42
+ * Returns `null` when the value is empty or cannot be parsed.
43
+ */
44
+ export declare function parseDate(value: string | undefined | null): Date | null;
45
+ /**
46
+ * Group data rows by their date column value.
47
+ * Supports multi-day events when `iniCol` and `finCol` are provided:
48
+ * the event appears in every day from `iniCol` to `finCol` inclusive.
49
+ * Falls back to `datCol` when `iniCol`/`finCol` are absent.
50
+ *
51
+ * If `iniCol` or `finCol` point to a column whose obj type is I1 (time),
52
+ * they are treated as time columns, NOT as multi-day date columns.
53
+ *
54
+ * @returns a `Map<string, DataRow[]>` keyed by `YYYY-MM-DD`.
55
+ */
56
+ export declare function groupRowsByDate(rows: DataRow[] | undefined, datCol: string, iniCol?: string, finCol?: string, columns?: DataColumn[]): Map<string, DataRow[]>;
57
+ /** Find the cell that supplies the event label and its presentation style. */
58
+ export declare function getEventLabelCell(row: DataRow, datCol: string, titCol?: string): DataCell | undefined;
59
+ /**
60
+ * Derive a display label for the given row from the TitCol column.
61
+ * Falls back to the first non-date cell value, or an empty string.
62
+ */
63
+ export declare function getEventLabel(row: DataRow, datCol: string, titCol?: string): string;
64
+ export declare function getEventLabelDisplayValue(label: string | null | undefined): string;
65
+ /**
66
+ * Build a 6×7 day-cell matrix for the given month (month view).
67
+ * The grid always has 42 cells with leading/trailing days from adjacent months.
68
+ *
69
+ * @param weekStartDay 0 = Sunday (default), 1 = Monday
70
+ */
71
+ export declare function getMonthMatrix(year: number, month: number, weekStartDay?: number): DayCell[][];
72
+ /**
73
+ * Build a 1×7 day-cell matrix for the week containing the given date.
74
+ */
75
+ export declare function getWeekMatrix(refDate: Date, weekStartDay?: number): DayCell[][];
76
+ /**
77
+ * Build a 1×1 day-cell matrix for the given date (day view).
78
+ */
79
+ export declare function getDayMatrix(refDate: Date): DayCell[][];
80
+ /**
81
+ * Returns the ISO date range (from-date, to-date) for the visible grid.
82
+ * For month view, this includes the 6×7 grid cells (including adjacent-month days).
83
+ */
84
+ export declare function getVisibleRange(matrix: DayCell[][]): {
85
+ fromDate: string;
86
+ toDate: string;
87
+ };
88
+ /**
89
+ * Returns the ISO date range for the actual month being displayed
90
+ * (first day of month to last day of month), excluding adjacent-month days.
91
+ * For week/day views, falls back to getVisibleRange.
92
+ */
93
+ export declare function getPeriodRange(matrix: DayCell[][], view: "month" | "week" | "day"): {
94
+ fromDate: string;
95
+ toDate: string;
96
+ };
97
+ /** Start hour of the time grid (0–23). */
98
+ export declare const TIME_GRID_START_HOUR = 0;
99
+ /** End hour of the time grid (exclusive, 1–24). */
100
+ export declare const TIME_GRID_END_HOUR = 24;
101
+ /** Total minutes in the time grid. */
102
+ export declare const TIME_GRID_TOTAL_MINUTES: number;
103
+ /** Height per hour in pixels (used for positioning timed events). */
104
+ export declare const HOUR_HEIGHT_PX = 48;
105
+ /**
106
+ * Parse a time string into minutes from midnight.
107
+ *
108
+ * Accepts:
109
+ * - `HH:mm` (e.g. "09:30")
110
+ * - `HH:mm:ss` (e.g. "09:30:00")
111
+ *
112
+ * Returns `null` when the value is empty or cannot be parsed.
113
+ */
114
+ export declare function parseTimeToMinutes(value: string | undefined | null): number | null;
115
+ /**
116
+ * Format minutes from midnight into a display string (HH:mm).
117
+ */
118
+ export declare function formatTimeFromMinutes(minutes: number): string;
119
+ /**
120
+ * Extract the time range from a row, using IniTimCol/FinTimCol if provided.
121
+ *
122
+ * Checks the obj type of each cell using `isObjectTime` to determine
123
+ * whether the value is a time (I1) or a date (D8/A8).
124
+ *
125
+ * Returns `null` if no time columns are provided or both values are missing/unparseable.
126
+ */
127
+ export declare function getTimeRange(row: DataRow, iniTimCol?: string, finTimCol?: string): TimeRange | null;
128
+ /**
129
+ * Build a list of timed events for time-grid rendering, grouped by date.
130
+ *
131
+ * Events without time data (no time columns found via obj type check) are
132
+ * classified as all-day events.
133
+ *
134
+ * Uses `isObjectTime` and `isObjectDate` to determine the type of data
135
+ * in each column and cell, interpreting values accordingly.
136
+ *
137
+ * @returns a Map<dateKey, { allDay: TimedEvent[], timed: TimedEvent[] }>
138
+ */
139
+ export declare function buildTimedEvents(rows: DataRow[] | undefined, datCol: string, iniCol?: string, finCol?: string, titCol?: string, icoCol?: string, imgCol?: string, styCol?: string, columns?: DataColumn[]): Map<string, {
140
+ allDay: TimedEvent[];
141
+ timed: TimedEvent[];
142
+ }>;
143
+ /**
144
+ * Calculate the CSS `top` position (in pixels) for a timed event
145
+ * based on its start time relative to the time grid.
146
+ */
147
+ export declare function getEventTopPx(startMin: number): number;
148
+ /**
149
+ * Calculate the CSS `height` (in pixels) for a timed event
150
+ * based on its time range duration. Minimum height is 1.5rem.
151
+ */
152
+ export declare function getEventHeightPx(startMin: number, endMin: number): number;
153
+ /**
154
+ * Generate hour labels for the time grid.
155
+ * Returns an array of { label: string, minutes: number } for each hour slot.
156
+ */
157
+ export declare function getHourSlots(): {
158
+ label: string;
159
+ minutes: number;
160
+ }[];
161
+ /** Labels for the view-switch buttons. */
162
+ export declare const VIEW_LABELS: Record<CalendarView, string>;
163
+ /** Normalize a ShowAs value to a valid CalendarView, case-insensitive. */
164
+ export declare function normalizeView(value: string | undefined): CalendarView;
165
+ //# sourceMappingURL=calendar-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar-utils.d.ts","sourceRoot":"","sources":["../../../src/components/calendar/calendar-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,OAAO,EACP,SAAS,EACV,MAAM,6BAA6B,CAAA;AAapC,OAAO,KAAK,EACV,OAAO,EACP,UAAU,EACV,SAAS,EACT,eAAe,EACf,YAAY,EACb,MAAM,kBAAkB,CAAA;AAezB;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,eAAe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,EAC3B,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,UAAU,EAAE,GACrB,GAAG,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,UAAU,EAAE,CAAC;IAAC,KAAK,EAAE,UAAU,EAAE,CAAA;CAAE,CAAC,CA4D5D;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGtD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAGzE;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,CASnE;AAID,0CAA0C;AAC1C,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAIpD,CAAA;AAED,0EAA0E;AAC1E,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,YAAY,CAKrE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=calendar-utils.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar-utils.test.d.ts","sourceRoot":"","sources":["../../../src/components/calendar/calendar-utils.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ import { CalendarProps } from './calendar-types';
3
+ /**
4
+ * Calendar — monthly/weekly/daily view with events and totals.
5
+ *
6
+ * Data-driven: consumes a `DataTable`, groups rows by configurable date
7
+ * columns (`DatCol` / `IniCol`+`FinCol` for multi-day), and renders a day-cell
8
+ * grid. Each cell shows its events (with optional icon/image) and a daily
9
+ * total computed from the `Totals` formula.
10
+ *
11
+ * When `DatCol` or `TitCol` are not provided, the component auto-detects
12
+ * the correct column from the data: `DatCol` uses `isObjectDate` (D8/A8),
13
+ * `TitCol` uses the first column with empty or `**`-prefixed obj type.
14
+ */
15
+ export declare const Calendar: React.FC<CalendarProps>;
16
+ //# sourceMappingURL=calendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/components/calendar/calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAA;AAYnE,OAAO,EAEL,KAAK,aAAa,EAGnB,MAAM,kBAAkB,CAAA;AAkBzB;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAsY5C,CAAA"}
@@ -0,0 +1,49 @@
1
+ import { default as React } from 'react';
2
+ import { DataRow } from '../../../types/data-structures';
3
+ import { DateMessages } from '../../../types/translation';
4
+ import { DayCell } from '../calendar-types';
5
+ export type MonthGridProps = {
6
+ readonly grid: DayCell[][];
7
+ readonly rowsByDate: Map<string, DataRow[]>;
8
+ readonly weekdays: readonly string[];
9
+ readonly columns: {
10
+ readonly datCol: string;
11
+ readonly titCol?: string;
12
+ readonly icoCol?: string;
13
+ readonly imgCol?: string;
14
+ readonly styCol?: string;
15
+ };
16
+ readonly maxEvents: number;
17
+ readonly totals?: string;
18
+ readonly isDragEnabled: boolean;
19
+ readonly dragDataRef: React.RefObject<{
20
+ row: DataRow;
21
+ fromDate: string;
22
+ } | null>;
23
+ readonly dragOverKey: string | null;
24
+ readonly setDragOverKey: (key: string | null) => void;
25
+ readonly translate: (msg: typeof DateMessages.SHOW_MORE_EVENTS) => string;
26
+ readonly onClick?: (payload: {
27
+ row: DataRow;
28
+ date: string;
29
+ }) => void;
30
+ readonly onContextMenu?: (event: React.MouseEvent | MouseEvent, payload: {
31
+ row: DataRow;
32
+ date: string;
33
+ }) => void;
34
+ readonly onDayClick?: (payload: {
35
+ date: string;
36
+ }) => void;
37
+ readonly onDrop?: (payload: {
38
+ row: DataRow;
39
+ fromDate: string;
40
+ toDate: string;
41
+ }) => void;
42
+ };
43
+ /**
44
+ * Month view: weekday header + 6×7 grid of equal-size day cells.
45
+ * Events beyond `maxEvents` per day collapse into a DropdownButton whose
46
+ * toolbar lists the hidden events as leaf nodes.
47
+ */
48
+ export declare const MonthGrid: React.FC<MonthGridProps>;
49
+ //# sourceMappingURL=calendar-month-grid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar-month-grid.d.ts","sourceRoot":"","sources":["../../../../src/components/calendar/views/calendar-month-grid.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AAG7D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAQzD,OAAO,EAAkB,KAAK,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAGhE,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CAAA;IAC1B,QAAQ,CAAC,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAA;IAC3C,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;IACpC,QAAQ,CAAC,OAAO,EAAE;QAChB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;QACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;QACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;QACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;QACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KACzB,CAAA;IACD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC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
+ import { DateMessages } from '../../../types/translation';
4
+ import { DayCell, TimedEvent } from '../calendar-types';
5
+ export type TimeGridProps = {
6
+ readonly grid: DayCell[][];
7
+ readonly hourSlots: {
8
+ readonly label: string;
9
+ readonly minutes: number;
10
+ }[];
11
+ readonly timedEvents: Map<string, {
12
+ readonly allDay: TimedEvent[];
13
+ readonly timed: TimedEvent[];
14
+ }>;
15
+ readonly translate: (msg: typeof DateMessages.ALL_DAY) => string;
16
+ readonly isDragEnabled: boolean;
17
+ readonly onClick?: (payload: {
18
+ row: DataRow;
19
+ date: string;
20
+ }) => void;
21
+ readonly onContextMenu?: (event: React.MouseEvent | MouseEvent, payload: {
22
+ row: DataRow;
23
+ date: string;
24
+ }) => void;
25
+ readonly onDayClick?: (payload: {
26
+ date: string;
27
+ }) => void;
28
+ readonly onDrop?: (payload: {
29
+ row: DataRow;
30
+ fromDate: string;
31
+ toDate: string;
32
+ }) => void;
33
+ readonly dragDataRef: React.RefObject<{
34
+ row: DataRow;
35
+ fromDate: string;
36
+ } | null>;
37
+ readonly dragOverKey: string | null;
38
+ readonly setDragOverKey: (key: string | null) => void;
39
+ readonly weekdays: readonly string[];
40
+ /** 0 = week starts on Sunday, 1 = Monday (used to map weekday labels). */
41
+ readonly weekStartDay: number;
42
+ };
43
+ export declare const TimeGrid: React.FC<TimeGridProps>;
44
+ //# sourceMappingURL=calendar-time-grid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar-time-grid.d.ts","sourceRoot":"","sources":["../../../../src/components/calendar/views/calendar-time-grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAEhD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,UAAU,EAChB,MAAM,mBAAmB,CAAA;AAQ1B,MAAM,MAAM,aAAa,GAA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,IAAI,CAAC,CAAA;IACT,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,QAAQ,CAAC,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IACrD,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;IACpC,0EAA0E;IAC1E,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;CAC9B,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA8X5C,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { DataTable } from '../../../types/data-structures';
2
+ export declare const graphicCellData: DataTable;
3
+ //# sourceMappingURL=graphic-cell-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphic-cell-data.d.ts","sourceRoot":"","sources":["../../../../src/components/data-table/graphic-cell/graphic-cell-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAE7E,eAAO,MAAM,eAAe,EAAE,SAsS7B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../src/components/field/field.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAgB1C,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CA+HtC,CAAA"}
1
+ {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../src/components/field/field.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAoG1C,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAqJtC,CAAA"}
@@ -1,4 +1,30 @@
1
1
  import { BooleanValue } from '../../types/legacy';
2
+ /**
3
+ * pdfjs-dist runtime configuration used to point the renderer at vendored
4
+ * assets (worker, wasm, standard fonts, CMaps).
5
+ */
6
+ export interface PdfJsConfigs {
7
+ /**
8
+ * Path to the pdfjs worker script.
9
+ */
10
+ workerSrc?: string;
11
+ /**
12
+ * Base URL where the pdfjs wasm files are located (include trailing slash).
13
+ */
14
+ wasmUrl?: string;
15
+ /**
16
+ * Base URL where the pdfjs standard font files are located (include trailing slash).
17
+ */
18
+ standardFontDataUrl?: string;
19
+ /**
20
+ * Base URL where the predefined Adobe CMaps are located (include trailing slash).
21
+ */
22
+ cMapUrl?: string;
23
+ /**
24
+ * Specifies if the Adobe CMaps are binary packed or not.
25
+ */
26
+ cMapPacked?: boolean;
27
+ }
2
28
  export interface PdfProps {
3
29
  /**
4
30
  * Resolved PDF resource
@@ -23,12 +49,17 @@ export interface PdfProps {
23
49
  */
24
50
  onError?: (error: Error) => void;
25
51
  /**
26
- * Callback used to open external content in a new window or tab.
52
+ * Callback used to open external content in a new window or tab.
27
53
  */
28
54
  onWindowOpen?: (url: string, target: string, features?: string) => void;
29
55
  /**
30
56
  * Callback used to handle PDF resource downloads.
31
57
  */
32
58
  onResourceDownload?: (resource: string) => void;
59
+ /**
60
+ * Optional pdfjs-dist runtime configuration pointing at vendored assets
61
+ * (worker, wasm, standard fonts, CMaps).
62
+ */
63
+ pdfjsConfigs?: PdfJsConfigs;
33
64
  }
34
65
  //# sourceMappingURL=pdf-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pdf-types.d.ts","sourceRoot":"","sources":["../../../src/components/pdf/pdf-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,YAAY,CAAA;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,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C,EAAE,YAAY,CAAA;CAC5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"pdf.d.ts","sourceRoot":"","sources":["../../../src/components/pdf/pdf.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,iCAAiC,CAAA;AASxC,eAAO,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAuHlC,CAAA"}
1
+ {"version":3,"file":"pdf.d.ts","sourceRoot":"","sources":["../../../src/components/pdf/pdf.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,iCAAiC,CAAA;AASxC,eAAO,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAuIlC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/toolbar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoC,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAWhF,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA4L1C,CAAA"}
1
+ {"version":3,"file":"toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/toolbar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoC,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAWhF,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAqM1C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"row.d.ts","sourceRoot":"","sources":["../../../src/functional-components/row/row.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAyB,MAAM,aAAa,CAAA;AAK7D,eAAO,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAwPlC,CAAA"}
1
+ {"version":3,"file":"row.d.ts","sourceRoot":"","sources":["../../../src/functional-components/row/row.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAyB,MAAM,aAAa,CAAA;AAK7D,eAAO,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CA0PlC,CAAA"}
package/dist/index.d.ts CHANGED
@@ -25,7 +25,7 @@ export { Breadcrumbs } from './components/breadcrumbs/breadcrumbs';
25
25
  export { type BreadcrumbsProps } from './components/breadcrumbs/breadcrumbs-types';
26
26
  /** Pdf */
27
27
  export { Pdf } from './components/pdf/pdf';
28
- export { type PdfProps } from './components/pdf/pdf-types';
28
+ export { type PdfProps, type PdfJsConfigs } from './components/pdf/pdf-types';
29
29
  /** Mermaid */
30
30
  export { MermaidChart } from './components/mermaid/mermaid';
31
31
  export { type MermaidChartProps } from './components/mermaid/mermaid-types';
@@ -214,7 +214,7 @@ export { type SkeletonProps, type SkeletonVariant, } from './functional-componen
214
214
  export { default as useFloating } from './hooks/useFloating';
215
215
  /** Tree */
216
216
  export { default as Tree } from './basic-components/tree/tree';
217
- export { type TreeProps } from './basic-components/tree/tree.types';
217
+ export { type TreeProps } from './basic-components/tree/tree-types';
218
218
  /** Image */
219
219
  export { Image } from './basic-components/image/image';
220
220
  export { type ImageProps } from './basic-components/image/image-types';
@@ -227,6 +227,9 @@ export { type ActivityTimelineProps } from './components/activity-timeline/activ
227
227
  /** Planner */
228
228
  export { Planner } from './components/planner/planner';
229
229
  export { type PlannerProps } from './components/planner/planner-types';
230
+ /** Calendar */
231
+ export { Calendar } from './components/calendar/calendar';
232
+ export { type CalendarProps } from './components/calendar/calendar-types';
230
233
  /** Contexts */
231
234
  /** ObjMetadataContext */
232
235
  export { ObjMetadataContext } from './context/obj-metadata-context';