@daypilot/daypilot-lite-angular 3.7.1 → 3.10.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.
- package/README.md +127 -13
- package/esm2020/lib/core/daypilot-core.mjs +519 -297
- package/fesm2015/daypilot-daypilot-lite-angular.mjs +552 -230
- package/fesm2015/daypilot-daypilot-lite-angular.mjs.map +1 -1
- package/fesm2020/daypilot-daypilot-lite-angular.mjs +519 -297
- package/fesm2020/daypilot-daypilot-lite-angular.mjs.map +1 -1
- package/lib/core/daypilot-core.d.ts +104 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,21 +1,135 @@
|
|
|
1
|
-
DayPilot Lite for Angular
|
|
2
|
-
===================================
|
|
1
|
+
# DayPilot Lite for Angular
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
[DayPilot Lite for JavaScript](https://javascript.daypilot.org/open-source/) is a library of JavaScript/HTML5 event calendar/scheduler components that can display day/week/month calendar views. This is the Angular version of DayPilot Lite.
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
--------
|
|
5
|
+
## What's New
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
[Release History](https://javascript.daypilot.org/daypilot-lite-history/)
|
|
8
|
+
|
|
9
|
+
## Online Demo
|
|
10
|
+
|
|
11
|
+
[](https://javascript.daypilot.org/demo/lite/)
|
|
12
|
+
|
|
13
|
+
[Online Demo](https://javascript.daypilot.org/demo/lite/)
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
* Calendar/scheduler views: day, week, work week, month, resource calendar
|
|
12
18
|
* Event creation using drag and drop
|
|
19
|
+
* Drag and drop event moving and resizing
|
|
13
20
|
* Integrated delete icon
|
|
21
|
+
* Event duration bar with customizable color
|
|
22
|
+
* Date picker with free/busy days highlighting, free-hand range selection, day cell customization
|
|
23
|
+
* CSS themes (use theme builder to create your own theme)
|
|
24
|
+
* Event customization (text, HTML, colors...)
|
|
25
|
+
* Built-in XSS protection
|
|
26
|
+
* Localization support
|
|
27
|
+
* TypeScript definitions
|
|
28
|
+
|
|
29
|
+
## Tutorials
|
|
30
|
+
|
|
31
|
+
### Angular Appointment Calendar Tutorial
|
|
32
|
+
|
|
33
|
+
[](https://code.daypilot.org/50175/angular-appointment-calendar-component-typescript)
|
|
34
|
+
|
|
35
|
+
[Open-Source Angular Appointment Calendar Component (TypeScript + PHP/MySQL)](https://code.daypilot.org/50175/angular-appointment-calendar-component-typescript)
|
|
36
|
+
Simple appointment scheduling application built using Angular. The calendar view is created using DayPilot Pro Angular Calendar component. The server-side backend is created using PHP and stores events in a MySQL or SQLite database.
|
|
37
|
+
|
|
38
|
+
### Angular Day/Week/Month Views
|
|
39
|
+
|
|
40
|
+
[](https://code.daypilot.org/30451/angular-calendar-day-week-month-views)
|
|
41
|
+
|
|
42
|
+
[Angular Calendar: Day/Week/Month Views (Open-Source)](https://code.daypilot.org/30451/angular-calendar-day-week-month-views)
|
|
43
|
+
Angular project that displays an event calendar component with day, week and month views that share the same data and can be easily switched. A date picker component is used to switch the current date and highlight busy days.
|
|
44
|
+
|
|
45
|
+
### Angular Resource Calendar Tutorial
|
|
46
|
+
|
|
47
|
+
[](https://code.daypilot.org/42642/angular-resource-calendar-tutorial)
|
|
48
|
+
|
|
49
|
+
[Angular Resource Calendar (Open-Source)](https://code.daypilot.org/42642/angular-resource-calendar-tutorial)
|
|
50
|
+
Angular application that shows how to create a resource calendar Angular component that displays event data in multiple columns. The resource calendar supports drag and drop out of the box.
|
|
51
|
+
|
|
52
|
+
### Angular Date Picker Tutorial
|
|
53
|
+
|
|
54
|
+
[](https://code.daypilot.org/16244/angular-date-picker-with-drag-drop-range-selection)
|
|
55
|
+
|
|
56
|
+
[Angular Date Picker with Drag & Drop Range Selection (Open-Source)](https://code.daypilot.org/16244/angular-date-picker-with-drag-drop-range-selection)
|
|
57
|
+
How to activate the free-hand date range selection mode in the Angular date picker component (Navigator).
|
|
58
|
+
|
|
59
|
+
### Angular Calendar Date Switching Tutorial
|
|
60
|
+
|
|
61
|
+
[](https://code.daypilot.org/78004/angular-calendar-date-switching)
|
|
62
|
+
|
|
63
|
+
[Angular Calendar: Date Switching](https://code.daypilot.org/78004/angular-calendar-date-switching)
|
|
64
|
+
How to integrate Angular event calendar component with a date picker and navigation buttons for changing the visible week.
|
|
65
|
+
|
|
66
|
+
## Example
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
import {Component, ViewChild, AfterViewInit} from "@angular/core";
|
|
70
|
+
import {DayPilot, DayPilotCalendarComponent} from "@daypilot/daypilot-lite-angular";
|
|
71
|
+
import {DataService} from "./data.service";
|
|
72
|
+
|
|
73
|
+
@Component({
|
|
74
|
+
selector: 'calendar-component',
|
|
75
|
+
template: `
|
|
76
|
+
<daypilot-calendar [config]="configCalendar" [events]="events" #calendar></daypilot-calendar>
|
|
77
|
+
`,
|
|
78
|
+
styles: [``]
|
|
79
|
+
})
|
|
80
|
+
export class CalendarComponent implements AfterViewInit {
|
|
81
|
+
|
|
82
|
+
@ViewChild("calendar") calendar!: DayPilotCalendarComponent;
|
|
83
|
+
|
|
84
|
+
events: DayPilot.EventData[] = [];
|
|
85
|
+
|
|
86
|
+
configCalendar: DayPilot.CalendarConfig = {
|
|
87
|
+
viewType: "Week",
|
|
88
|
+
onTimeRangeSelected: async (args) => {
|
|
89
|
+
const modal = await DayPilot.Modal.prompt("Create a new event:", "Event 1");
|
|
90
|
+
const dp = args.control;
|
|
91
|
+
dp.clearSelection();
|
|
92
|
+
if (!modal.result) { return; }
|
|
93
|
+
dp.events.add(new DayPilot.Event({
|
|
94
|
+
start: args.start,
|
|
95
|
+
end: args.end,
|
|
96
|
+
id: DayPilot.guid(),
|
|
97
|
+
text: modal.result
|
|
98
|
+
}));
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
constructor(private ds: DataService) {
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
ngAfterViewInit(): void {
|
|
106
|
+
this.loadEvents();
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
loadEvents(): void {
|
|
110
|
+
const from = this.nav.control.visibleStart();
|
|
111
|
+
const to = this.nav.control.visibleEnd();
|
|
112
|
+
this.ds.getEvents(from, to).subscribe(result => {
|
|
113
|
+
this.events = result;
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Documentation
|
|
121
|
+
|
|
122
|
+
* [Angular weekly calendar](https://doc.daypilot.org/calendar/angular/)
|
|
123
|
+
* [Angular monthly calendar](https://doc.daypilot.org/month/angular/)
|
|
124
|
+
* [Angular date picker](https://doc.daypilot.org/navigator/angular/)
|
|
125
|
+
|
|
126
|
+
## CSS Themes
|
|
127
|
+
|
|
128
|
+
The [Theme Designer](https://themes.daypilot.org/) lets you create and download your own CSS theme using an online visual tool.
|
|
129
|
+
|
|
130
|
+
## License
|
|
14
131
|
|
|
15
|
-
License
|
|
16
|
-
-------
|
|
17
132
|
Apache License 2.0
|
|
18
133
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
https://javascript.daypilot.org/
|
|
134
|
+
|
|
135
|
+
|