ngx-resource-scheduler 1.0.1 → 1.0.2

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.
package/src/lib/types.ts DELETED
@@ -1,103 +0,0 @@
1
- /**
2
- * Public types for ngx-resource-scheduler
3
- * Keep this file framework-agnostic (no Angular imports).
4
- */
5
-
6
- /** Which dimension is the top-level column grouping. */
7
- export type PrimaryAxis = 'days' | 'resources';
8
-
9
- /** v1 view modes (future-proofed). */
10
- export type SchedulerView = 'custom-range'; // controlled by startDate + days
11
-
12
- /** Resource shown in the scheduler. */
13
- export interface SchedulerResource {
14
- id: string;
15
- title: string;
16
-
17
- /** Optional arbitrary metadata for the consumer. */
18
- data?: unknown;
19
-
20
- /** Optional CSS class(es) applied to the resource header/cells. */
21
- className?: string | string[];
22
- }
23
-
24
- /** Event rendered in the scheduler. */
25
- export interface SchedulerEvent {
26
- id: string;
27
- title: string;
28
-
29
- /** Inclusive start date-time. */
30
- start: Date;
31
-
32
- /** Exclusive end date-time (recommended). */
33
- end: Date;
34
-
35
- /** Resource column this event belongs to. */
36
- resourceId: string;
37
-
38
- /** Optional styling helpers. */
39
- color?: string;
40
- className?: string | string[];
41
-
42
- /** Optional arbitrary metadata for the consumer. */
43
- data?: unknown;
44
- }
45
-
46
- /** Emitted when the user clicks an empty slot/cell in the scheduler. */
47
- export interface SchedulerSlotClick {
48
- /** Clicked date-time (snapped if snapToSlot is enabled). */
49
- date: Date;
50
-
51
- /** The day bucket for the clicked cell (00:00 local/zone). */
52
- day: Date;
53
-
54
- /** Resource for the clicked cell. */
55
- resourceId: string;
56
-
57
- /** Layout info for consumers building custom UI around the scheduler. */
58
- primaryAxis: PrimaryAxis;
59
-
60
- /**
61
- * Identifies which primary column group was clicked.
62
- * - if primaryAxis === 'days': ISO date string of `day`
63
- * - if primaryAxis === 'resources': `resourceId`
64
- */
65
- primaryKey: string;
66
-
67
- /**
68
- * Identifies which nested column group was clicked.
69
- * - if primaryAxis === 'days': `resourceId`
70
- * - if primaryAxis === 'resources': ISO date string of `day`
71
- */
72
- secondaryKey: string;
73
- }
74
-
75
- /** Emitted when an event element is clicked. */
76
- export interface SchedulerEventClick {
77
- event: SchedulerEvent;
78
- nativeEvent: MouseEvent;
79
- }
80
-
81
- /** Emitted when the visible time range changes (startDate/days/view). */
82
- export interface SchedulerRangeChange {
83
- /** Inclusive start of visible range. */
84
- start: Date;
85
-
86
- /** Exclusive end of visible range. */
87
- end: Date;
88
-
89
- /** Number of visible days (1..7). */
90
- days: number;
91
-
92
- /** The primary axis currently in use. */
93
- primaryAxis: PrimaryAxis;
94
-
95
- /** Current view identifier (v1 uses custom-range). */
96
- view: SchedulerView;
97
- }
98
-
99
- /** Optional simple renderer hooks (string return keeps it light for v1). */
100
- export type EventRenderer = (args: { event: SchedulerEvent }) => string;
101
-
102
- export type HeaderRenderer =
103
- (args: { type: 'day' | 'resource'; day?: Date; resource?: SchedulerResource }) => string;
package/src/public-api.ts DELETED
@@ -1,7 +0,0 @@
1
- /*
2
- * Public API Surface of ngx-resource-scheduler
3
- */
4
-
5
- export * from './lib/ngx-resource-scheduler.component';
6
- export * from './lib/types';
7
- export * from './lib/ngx-resource-scheduler.module';
package/tsconfig.lib.json DELETED
@@ -1,15 +0,0 @@
1
- /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
2
- /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
3
- {
4
- "extends": "../../tsconfig.json",
5
- "compilerOptions": {
6
- "outDir": "../../out-tsc/lib",
7
- "declaration": true,
8
- "declarationMap": true,
9
- "inlineSources": true,
10
- "types": []
11
- },
12
- "exclude": [
13
- "**/*.spec.ts"
14
- ]
15
- }
@@ -1,11 +0,0 @@
1
- /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
2
- /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
3
- {
4
- "extends": "./tsconfig.lib.json",
5
- "compilerOptions": {
6
- "declarationMap": false
7
- },
8
- "angularCompilerOptions": {
9
- "compilationMode": "partial"
10
- }
11
- }
@@ -1,15 +0,0 @@
1
- /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
2
- /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
3
- {
4
- "extends": "../../tsconfig.json",
5
- "compilerOptions": {
6
- "outDir": "../../out-tsc/spec",
7
- "types": [
8
- "jasmine"
9
- ]
10
- },
11
- "include": [
12
- "**/*.spec.ts",
13
- "**/*.d.ts"
14
- ]
15
- }