@syncfusion/ej2-angular-schedule 31.1.17 → 31.1.20
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/package.json +7 -7
- package/schematics/collection.json +39 -10
- package/schematics/generators/schedule-agenda-views/index.d.ts +3 -0
- package/schematics/generators/schedule-agenda-views/index.js +8 -0
- package/schematics/generators/schedule-agenda-views/index.ts +8 -0
- package/schematics/generators/schedule-agenda-views/sample-details.d.ts +5 -0
- package/schematics/generators/schedule-agenda-views/sample-details.js +7 -0
- package/schematics/generators/schedule-agenda-views/sample-details.ts +5 -0
- package/schematics/generators/schedule-agenda-views/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.css +0 -0
- package/schematics/generators/schedule-agenda-views/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +13 -0
- package/schematics/generators/schedule-agenda-views/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +18 -0
- package/schematics/generators/schedule-agenda-views/samples/__path__/__name@dasherize@if-flat__/assets/datasource.ts +29 -0
- package/schematics/generators/schedule-agenda-views/schema.d.ts +3 -0
- package/schematics/generators/schedule-agenda-views/schema.js +2 -0
- package/schematics/generators/schedule-agenda-views/schema.json +125 -0
- package/schematics/generators/schedule-agenda-views/schema.ts +3 -0
- package/schematics/generators/schedule-calendar-views/index.d.ts +3 -0
- package/schematics/generators/schedule-calendar-views/index.js +8 -0
- package/schematics/generators/schedule-calendar-views/index.ts +8 -0
- package/schematics/generators/schedule-calendar-views/sample-details.d.ts +5 -0
- package/schematics/generators/schedule-calendar-views/sample-details.js +7 -0
- package/schematics/generators/schedule-calendar-views/sample-details.ts +5 -0
- package/schematics/generators/schedule-calendar-views/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.css +0 -0
- package/schematics/generators/schedule-calendar-views/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +11 -0
- package/schematics/generators/schedule-calendar-views/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +18 -0
- package/schematics/generators/schedule-calendar-views/samples/__path__/__name@dasherize@if-flat__/assets/datasource.ts +92 -0
- package/schematics/generators/schedule-calendar-views/schema.d.ts +3 -0
- package/schematics/generators/schedule-calendar-views/schema.js +2 -0
- package/schematics/generators/schedule-calendar-views/schema.json +125 -0
- package/schematics/generators/schedule-calendar-views/schema.ts +3 -0
- package/schematics/generators/schedule-horizontal-grouping/index.d.ts +3 -0
- package/schematics/generators/schedule-horizontal-grouping/index.js +8 -0
- package/schematics/generators/schedule-horizontal-grouping/index.ts +8 -0
- package/schematics/generators/schedule-horizontal-grouping/sample-details.d.ts +5 -0
- package/schematics/generators/schedule-horizontal-grouping/sample-details.js +7 -0
- package/schematics/generators/schedule-horizontal-grouping/sample-details.ts +5 -0
- package/schematics/generators/schedule-horizontal-grouping/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.css +92 -0
- package/schematics/generators/schedule-horizontal-grouping/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +29 -0
- package/schematics/generators/schedule-horizontal-grouping/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +51 -0
- package/schematics/generators/schedule-horizontal-grouping/samples/__path__/__name@dasherize@if-flat__/assets/datasource.ts +25 -0
- package/schematics/generators/schedule-horizontal-grouping/schema.d.ts +3 -0
- package/schematics/generators/schedule-horizontal-grouping/schema.js +2 -0
- package/schematics/generators/schedule-horizontal-grouping/schema.json +125 -0
- package/schematics/generators/schedule-horizontal-grouping/schema.ts +3 -0
- package/schematics/generators/schedule-time-scale/index.d.ts +3 -0
- package/schematics/generators/schedule-time-scale/index.js +8 -0
- package/schematics/generators/schedule-time-scale/index.ts +8 -0
- package/schematics/generators/schedule-time-scale/sample-details.d.ts +5 -0
- package/schematics/generators/schedule-time-scale/sample-details.js +7 -0
- package/schematics/generators/schedule-time-scale/sample-details.ts +5 -0
- package/schematics/generators/schedule-time-scale/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.css +0 -0
- package/schematics/generators/schedule-time-scale/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +13 -0
- package/schematics/generators/schedule-time-scale/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +22 -0
- package/schematics/generators/schedule-time-scale/samples/__path__/__name@dasherize@if-flat__/assets/datasource.ts +62 -0
- package/schematics/generators/schedule-time-scale/schema.d.ts +3 -0
- package/schematics/generators/schedule-time-scale/schema.js +2 -0
- package/schematics/generators/schedule-time-scale/schema.json +125 -0
- package/schematics/generators/schedule-time-scale/schema.ts +3 -0
- package/schematics/generators/schedule-timeline-grouping/index.d.ts +3 -0
- package/schematics/generators/schedule-timeline-grouping/index.js +8 -0
- package/schematics/generators/schedule-timeline-grouping/index.ts +8 -0
- package/schematics/generators/schedule-timeline-grouping/sample-details.d.ts +5 -0
- package/schematics/generators/schedule-timeline-grouping/sample-details.js +7 -0
- package/schematics/generators/schedule-timeline-grouping/sample-details.ts +5 -0
- package/schematics/generators/schedule-timeline-grouping/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.css +6 -0
- package/schematics/generators/schedule-timeline-grouping/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +23 -0
- package/schematics/generators/schedule-timeline-grouping/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +39 -0
- package/schematics/generators/schedule-timeline-grouping/samples/__path__/__name@dasherize@if-flat__/assets/datasource.ts +92 -0
- package/schematics/generators/schedule-timeline-grouping/schema.d.ts +3 -0
- package/schematics/generators/schedule-timeline-grouping/schema.js +2 -0
- package/schematics/generators/schedule-timeline-grouping/schema.json +125 -0
- package/schematics/generators/schedule-timeline-grouping/schema.ts +3 -0
- package/schematics/generators/schedule-timeline-views/index.d.ts +3 -0
- package/schematics/generators/schedule-timeline-views/index.js +8 -0
- package/schematics/generators/schedule-timeline-views/index.ts +8 -0
- package/schematics/generators/schedule-timeline-views/sample-details.d.ts +5 -0
- package/schematics/generators/schedule-timeline-views/sample-details.js +7 -0
- package/schematics/generators/schedule-timeline-views/sample-details.ts +5 -0
- package/schematics/generators/schedule-timeline-views/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.css +0 -0
- package/schematics/generators/schedule-timeline-views/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +14 -0
- package/schematics/generators/schedule-timeline-views/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +18 -0
- package/schematics/generators/schedule-timeline-views/samples/__path__/__name@dasherize@if-flat__/assets/datasource.ts +184 -0
- package/schematics/generators/schedule-timeline-views/schema.d.ts +3 -0
- package/schematics/generators/schedule-timeline-views/schema.js +2 -0
- package/schematics/generators/schedule-timeline-views/schema.json +125 -0
- package/schematics/generators/schedule-timeline-views/schema.ts +3 -0
- package/schematics/ng-add/index.ts +10 -10
- package/schematics/ng-add/schema.json +34 -34
- package/schematics/ng-add/schema.ts +30 -30
- package/schematics/tsconfig.json +25 -25
- package/schematics/utils/lib-details.d.ts +2 -2
- package/schematics/utils/lib-details.js +2 -2
- package/schematics/utils/lib-details.ts +4 -4
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schematics_1 = require("@syncfusion/ej2-angular-base/schematics");
|
|
4
|
+
const sampleDetails = require("./sample-details");
|
|
5
|
+
function default_1(options) {
|
|
6
|
+
return schematics_1.componentBuilder(options, sampleDetails);
|
|
7
|
+
}
|
|
8
|
+
exports.default = default_1;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
+
import { componentBuilder } from "@syncfusion/ej2-angular-base/schematics";
|
|
3
|
+
import { Schema } from './schema';
|
|
4
|
+
import * as sampleDetails from './sample-details';
|
|
5
|
+
|
|
6
|
+
export default function (options: Schema): Rule {
|
|
7
|
+
return componentBuilder(options, sampleDetails);
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.componentName = 'schedule';
|
|
4
|
+
exports.sampleName = 'horizontal-grouping';
|
|
5
|
+
exports.diModules = 'WeekService,MonthService,AgendaService,ResizeService,DragAndDropService';
|
|
6
|
+
exports.packageName = '@syncfusion/ej2-angular-schedule';
|
|
7
|
+
exports.libModules = 'ScheduleModule';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export const componentName: string = 'schedule';
|
|
2
|
+
export const sampleName: string = 'horizontal-grouping';
|
|
3
|
+
export const diModules: string = 'WeekService,MonthService,AgendaService,ResizeService,DragAndDropService';
|
|
4
|
+
export const packageName: string = '@syncfusion/ej2-angular-schedule';
|
|
5
|
+
export const libModules: string = 'ScheduleModule';
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
.schedule-group.e-schedule .template-wrap {
|
|
2
|
+
display: flex;
|
|
3
|
+
text-align: left;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.schedule-group.schedule-demo-heading {
|
|
7
|
+
font-size: 16px;
|
|
8
|
+
padding-bottom: 15px;
|
|
9
|
+
text-align: center;
|
|
10
|
+
font-weight: 500
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.schedule-group.e-schedule .e-agenda-view .template-wrap {
|
|
14
|
+
display: table;
|
|
15
|
+
width: inherit;
|
|
16
|
+
text-align: center;
|
|
17
|
+
padding-top: 10px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.schedule-group.e-schedule:not(.e-device) .e-agenda-view .e-content-wrap table td:first-child {
|
|
21
|
+
width: 110px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.schedule-group.e-schedule .template-wrap .airline-image {
|
|
25
|
+
width: 30px;
|
|
26
|
+
margin-top: 15px;
|
|
27
|
+
background-repeat: no-repeat;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.schedule-group.e-schedule.e-device .template-wrap .airline-image {
|
|
31
|
+
margin-top: 5px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.schedule-group.e-schedule .e-agenda-view .template-wrap .airline-image {
|
|
35
|
+
height: 30px;
|
|
36
|
+
margin-top: 0;
|
|
37
|
+
margin-left: 35%;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.schedule-group.e-schedule .e-vertical-view .e-resource-cells {
|
|
41
|
+
height: 76px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.e-bigger .schedule-group.e-schedule .e-vertical-view .e-resource-cells {
|
|
45
|
+
height: 80px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.schedule-group.e-schedule .template-wrap .airline-details {
|
|
49
|
+
padding-left: 15px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.schedule-group.e-schedule .e-agenda-view .template-wrap .airline-details {
|
|
53
|
+
padding: 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.schedule-group.e-schedule .template-wrap .airline-details .airline-name {
|
|
57
|
+
font-size: 16px;
|
|
58
|
+
font-weight: 500;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.schedule-group.e-schedule.e-device .template-wrap .airline-model,
|
|
62
|
+
.schedule-group.e-schedule.e-device .template-wrap .airline-seats {
|
|
63
|
+
display: none;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.schedule-group.e-schedule.e-device .template-wrap .airline-details .airline-name {
|
|
67
|
+
font-size: inherit;
|
|
68
|
+
font-weight: inherit;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.schedule-group.e-schedule .template-wrap .airline-image.airways-1 {
|
|
72
|
+
background-image: url('https://ej2.syncfusion.com/angular/demos/src/schedule/images/airways-1.svg');
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.schedule-group.e-schedule .template-wrap .airline-image.airways-2 {
|
|
76
|
+
background-image: url('https://ej2.syncfusion.com/angular/demos/src/schedule/images/airways-2.svg');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.schedule-group.e-schedule .template-wrap .airline-image.airways-3 {
|
|
80
|
+
background-image: url('https://ej2.syncfusion.com/angular/demos/src/schedule/images/airways-3.svg');
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.schedule-group.e-schedule .e-agenda-view .template-wrap .airline-model,
|
|
84
|
+
.schedule-group.e-schedule .e-agenda-view .template-wrap .airline-seats {
|
|
85
|
+
display: none;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@media (max-width: 550px) {
|
|
89
|
+
.schedule-demo-heading {
|
|
90
|
+
font-size: 14px;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<div class="control-section">
|
|
2
|
+
<div class='schedule-demo-heading'>
|
|
3
|
+
Flight timings between Barcelona and Los Angeles
|
|
4
|
+
</div>
|
|
5
|
+
<ejs-schedule #scheduleObj cssClass='schedule-group' width='100%' height='550px'
|
|
6
|
+
[group]="group" [selectedDate]="selectedDate" [eventSettings]="eventSettings">
|
|
7
|
+
<ng-template #resourceHeaderTemplate let-data>
|
|
8
|
+
<div class='template-wrap'>
|
|
9
|
+
<div class="airline-image {{getAirlineImage(data)}}"></div>
|
|
10
|
+
<div class="airline-details">
|
|
11
|
+
<div class="airline-name">{{getAirlineName(data)}}</div>
|
|
12
|
+
<div class="airline-model">Model no: {{getAirlineModel(data)}}</div>
|
|
13
|
+
<div class="airline-seats">No.of seats: {{getAirlineSeats(data)}}</div>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</ng-template>
|
|
17
|
+
<e-views>
|
|
18
|
+
<e-view option="Week"></e-view>
|
|
19
|
+
<e-view option="Month"></e-view>
|
|
20
|
+
<e-view option="Agenda"></e-view>
|
|
21
|
+
</e-views>
|
|
22
|
+
<e-resources>
|
|
23
|
+
<e-resource field='AirlineId' title='Airline Name' name='Airlines' [allowMultiple]='allowMultiple' [dataSource]='resourceDataSource'
|
|
24
|
+
textField='AirlineName' idField='AirlineId' colorField='AirlineColor'>
|
|
25
|
+
</e-resource>
|
|
26
|
+
</e-resources>
|
|
27
|
+
</ejs-schedule>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Component, Inject, ViewEncapsulation } from '@angular/core';
|
|
2
|
+
import {
|
|
3
|
+
EventSettingsModel, GroupModel, ResourceDetails
|
|
4
|
+
} from '@syncfusion/ej2-angular-schedule';
|
|
5
|
+
import { generateEvents } from './assets/datasource';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* horizontal grouping sample
|
|
9
|
+
*/
|
|
10
|
+
@Component({
|
|
11
|
+
selector: '<%=dasherize(selector)%>',
|
|
12
|
+
templateUrl: '<%=dasherize(name)%>.component.html',
|
|
13
|
+
styleUrls: ['<%=dasherize(name)%>.component.css'],
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
export class <%= classify(name) %>Component {
|
|
17
|
+
public selectedDate: Date = new Date(2018, 3, 1);
|
|
18
|
+
public resourceDataSource: Object[] = [
|
|
19
|
+
{ AirlineName: 'Airways 1', AirlineId: 1, AirlineColor: '#EA7A57' },
|
|
20
|
+
{ AirlineName: 'Airways 2', AirlineId: 2, AirlineColor: '#357cd2' },
|
|
21
|
+
{ AirlineName: 'Airways 3', AirlineId: 3, AirlineColor: '#7fa900' }
|
|
22
|
+
];
|
|
23
|
+
public group: GroupModel = { resources: ['Airlines'] };
|
|
24
|
+
public allowMultiple: Boolean = true;
|
|
25
|
+
public eventSettings: EventSettingsModel = {
|
|
26
|
+
dataSource: generateEvents(),
|
|
27
|
+
fields: {
|
|
28
|
+
subject: { title: 'Travel Summary', name: 'Subject' },
|
|
29
|
+
location: { title: 'Source', name: 'Location' },
|
|
30
|
+
description: { title: 'Comments', name: 'Description' },
|
|
31
|
+
startTime: { title: 'Departure Time', name: 'StartTime' },
|
|
32
|
+
endTime: { title: 'Arrival Time', name: 'EndTime' }
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
getAirlineName(value: ResourceDetails): string {
|
|
37
|
+
return (value as ResourceDetails).resourceData[(value as ResourceDetails).resource.textField] as string;
|
|
38
|
+
}
|
|
39
|
+
getAirlineImage(value: ResourceDetails): string {
|
|
40
|
+
let airlineName: string = this.getAirlineName(value);
|
|
41
|
+
return airlineName.replace(' ', '-').toLowerCase();
|
|
42
|
+
}
|
|
43
|
+
getAirlineModel(value: ResourceDetails): string {
|
|
44
|
+
let airlineName: string = this.getAirlineName(value);
|
|
45
|
+
return (airlineName === 'Airways 1') ? 'CRJ 700' : (airlineName === 'Airways 2') ? 'Airbus A330' : 'ATR 72-600';
|
|
46
|
+
}
|
|
47
|
+
getAirlineSeats(value: ResourceDetails): number {
|
|
48
|
+
let airlineName: string = this.getAirlineName(value);
|
|
49
|
+
return (airlineName === 'Airways 1') ? 50 : (airlineName === 'Airways 2') ? 75 : 100;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
export function generateEvents(): Object[] {
|
|
3
|
+
let subjectCollection: string[] = ['Barcelona to Los Angeles', 'Los Angeles to Barcelona'];
|
|
4
|
+
let collections: Object[] = [];
|
|
5
|
+
let dataCollections: number[] = [1, 2, 3];
|
|
6
|
+
let id: number = 1;
|
|
7
|
+
for (let data of dataCollections) {
|
|
8
|
+
let startDate: Date = new Date(2018, 3, 1);
|
|
9
|
+
startDate.setMilliseconds(1000 * 60 * 60 * .5 * (data - 1));
|
|
10
|
+
let lastDate: Date = new Date((+startDate) + (1000 * 60 * 60 * 24 * 30));
|
|
11
|
+
for (let date: Date = startDate; date.getTime() < lastDate.getTime(); date = new Date(date.getTime() + (1000 * 60 * 60 * 5))) {
|
|
12
|
+
let strDate: Date = new Date(+date);
|
|
13
|
+
let endDate: Date = new Date((+strDate) + (1000 * 60 * 60 * (2.5 + (0.5 * data))));
|
|
14
|
+
collections.push({
|
|
15
|
+
Id: id,
|
|
16
|
+
Subject: subjectCollection[id % 2],
|
|
17
|
+
StartTime: new Date(+strDate),
|
|
18
|
+
EndTime: new Date(+endDate),
|
|
19
|
+
AirlineId: data
|
|
20
|
+
});
|
|
21
|
+
id += 1;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return collections;
|
|
25
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "EJ2SchemaTemplateID",
|
|
4
|
+
"title": "schedule-horizontal-grouping",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"path": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"format": "path",
|
|
10
|
+
"description": "The path to create the component.",
|
|
11
|
+
"visible": false
|
|
12
|
+
},
|
|
13
|
+
"project": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "The name of the project.",
|
|
16
|
+
"$default": {
|
|
17
|
+
"$source": "projectName"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"name": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "The name of the component.",
|
|
23
|
+
"$default": {
|
|
24
|
+
"$source": "argv",
|
|
25
|
+
"index": 0
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"inlineStyle": {
|
|
29
|
+
"description": "Specifies if the style will be in the ts file.",
|
|
30
|
+
"type": "boolean",
|
|
31
|
+
"default": false,
|
|
32
|
+
"alias": "s"
|
|
33
|
+
},
|
|
34
|
+
"inlineTemplate": {
|
|
35
|
+
"description": "Specifies if the template will be in the ts file.",
|
|
36
|
+
"type": "boolean",
|
|
37
|
+
"default": false,
|
|
38
|
+
"alias": "t"
|
|
39
|
+
},
|
|
40
|
+
"viewEncapsulation": {
|
|
41
|
+
"description": "Specifies the view encapsulation strategy.",
|
|
42
|
+
"enum": [
|
|
43
|
+
"Emulated",
|
|
44
|
+
"Native",
|
|
45
|
+
"None",
|
|
46
|
+
"ShadowDom"
|
|
47
|
+
],
|
|
48
|
+
"type": "string",
|
|
49
|
+
"alias": "v"
|
|
50
|
+
},
|
|
51
|
+
"changeDetection": {
|
|
52
|
+
"description": "Specifies the change detection strategy.",
|
|
53
|
+
"enum": [
|
|
54
|
+
"Default",
|
|
55
|
+
"OnPush"
|
|
56
|
+
],
|
|
57
|
+
"type": "string",
|
|
58
|
+
"default": "Default",
|
|
59
|
+
"alias": "c"
|
|
60
|
+
},
|
|
61
|
+
"prefix": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"description": "The prefix to apply to generated selectors.",
|
|
64
|
+
"alias": "p",
|
|
65
|
+
"oneOf": [
|
|
66
|
+
{
|
|
67
|
+
"maxLength": 0
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"minLength": 1,
|
|
71
|
+
"format": "html-selector"
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
"styleext": {
|
|
76
|
+
"description": "The file extension to be used for style files.",
|
|
77
|
+
"type": "string",
|
|
78
|
+
"default": "css"
|
|
79
|
+
},
|
|
80
|
+
"spec": {
|
|
81
|
+
"type": "boolean",
|
|
82
|
+
"description": "Specifies if a spec file is generated.",
|
|
83
|
+
"default": true
|
|
84
|
+
},
|
|
85
|
+
"flat": {
|
|
86
|
+
"type": "boolean",
|
|
87
|
+
"description": "Flag to indicate if a dir is created.",
|
|
88
|
+
"default": false
|
|
89
|
+
},
|
|
90
|
+
"skipImport": {
|
|
91
|
+
"type": "boolean",
|
|
92
|
+
"description": "Flag to skip the module import.",
|
|
93
|
+
"default": false
|
|
94
|
+
},
|
|
95
|
+
"selector": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"format": "html-selector",
|
|
98
|
+
"description": "The selector to use for the component."
|
|
99
|
+
},
|
|
100
|
+
"module": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"description": "Allows specification of the declaring module.",
|
|
103
|
+
"alias": "m"
|
|
104
|
+
},
|
|
105
|
+
"export": {
|
|
106
|
+
"type": "boolean",
|
|
107
|
+
"default": false,
|
|
108
|
+
"description": "Specifies if declaring module exports the component."
|
|
109
|
+
},
|
|
110
|
+
"entryComponent": {
|
|
111
|
+
"type": "boolean",
|
|
112
|
+
"default": false,
|
|
113
|
+
"description": "Specifies if the component is an entry component of declaring module."
|
|
114
|
+
},
|
|
115
|
+
"lintFix": {
|
|
116
|
+
"type": "boolean",
|
|
117
|
+
"default": false,
|
|
118
|
+
"description": "Specifies whether to apply lint fixes after generating the component."
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"required": [
|
|
122
|
+
"name"
|
|
123
|
+
],
|
|
124
|
+
"id": "schedule-horizontal-grouping"
|
|
125
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schematics_1 = require("@syncfusion/ej2-angular-base/schematics");
|
|
4
|
+
const sampleDetails = require("./sample-details");
|
|
5
|
+
function default_1(options) {
|
|
6
|
+
return schematics_1.componentBuilder(options, sampleDetails);
|
|
7
|
+
}
|
|
8
|
+
exports.default = default_1;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
+
import { componentBuilder } from "@syncfusion/ej2-angular-base/schematics";
|
|
3
|
+
import { Schema } from './schema';
|
|
4
|
+
import * as sampleDetails from './sample-details';
|
|
5
|
+
|
|
6
|
+
export default function (options: Schema): Rule {
|
|
7
|
+
return componentBuilder(options, sampleDetails);
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.componentName = 'schedule';
|
|
4
|
+
exports.sampleName = 'time-scale';
|
|
5
|
+
exports.diModules = 'DayService,WeekService,TimelineViewsService,ResizeService,DragAndDropService';
|
|
6
|
+
exports.packageName = '@syncfusion/ej2-angular-schedule';
|
|
7
|
+
exports.libModules = 'ScheduleModule';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export const componentName: string = 'schedule';
|
|
2
|
+
export const sampleName: string = 'time-scale';
|
|
3
|
+
export const diModules: string = 'DayService,WeekService,TimelineViewsService,ResizeService,DragAndDropService';
|
|
4
|
+
export const packageName: string = '@syncfusion/ej2-angular-schedule';
|
|
5
|
+
export const libModules: string = 'ScheduleModule';
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<div class="control-section">
|
|
2
|
+
<div class="col-lg-9 content-wrapper">
|
|
3
|
+
<ejs-schedule #schedule width='100%' height='650px' [timeScale]="timeScale" [selectedDate]="selectedDate" [eventSettings]="eventSettings"
|
|
4
|
+
[currentView]="currentView">
|
|
5
|
+
<e-views>
|
|
6
|
+
<e-view option="Day"></e-view>
|
|
7
|
+
<e-view option="Week"></e-view>
|
|
8
|
+
<e-view option="TimelineDay"></e-view>
|
|
9
|
+
<e-view option="TimelineWeek"></e-view>
|
|
10
|
+
</e-views>
|
|
11
|
+
</ejs-schedule>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Component, ViewChild } from '@angular/core';
|
|
2
|
+
import {
|
|
3
|
+
ScheduleComponent, View, TimeScaleModel, EventSettingsModel
|
|
4
|
+
} from '@syncfusion/ej2-angular-schedule';
|
|
5
|
+
import { scheduleData } from './assets/datasource';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* time scale sample
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
@Component({
|
|
12
|
+
selector: '<%=dasherize(selector)%>',
|
|
13
|
+
templateUrl: '<%=dasherize(name)%>.component.html',
|
|
14
|
+
styleUrls: ['<%=dasherize(name)%>.component.css'],
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
export class <%= classify(name) %>Component {
|
|
18
|
+
public selectedDate: Date = new Date(2018, 1, 15);
|
|
19
|
+
public timeScale: TimeScaleModel = { enable: true, interval: 60, slotCount: 6 };
|
|
20
|
+
public eventSettings: EventSettingsModel = { dataSource: scheduleData};
|
|
21
|
+
public currentView: View = 'Week';
|
|
22
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export let scheduleData: Object[] = [
|
|
2
|
+
{
|
|
3
|
+
Id: 1,
|
|
4
|
+
Subject: 'Explosion of Betelgeuse Star',
|
|
5
|
+
StartTime: new Date(2018, 1, 11, 9, 30),
|
|
6
|
+
EndTime: new Date(2018, 1, 11, 11, 0),
|
|
7
|
+
CategoryColor: '#1aaa55'
|
|
8
|
+
}, {
|
|
9
|
+
Id: 2,
|
|
10
|
+
Subject: 'Thule Air Crash Report',
|
|
11
|
+
StartTime: new Date(2018, 1, 12, 12, 0),
|
|
12
|
+
EndTime: new Date(2018, 1, 12, 14, 0),
|
|
13
|
+
CategoryColor: '#357cd2'
|
|
14
|
+
}, {
|
|
15
|
+
Id: 3,
|
|
16
|
+
Subject: 'Blue Moon Eclipse',
|
|
17
|
+
StartTime: new Date(2018, 1, 13, 9, 30),
|
|
18
|
+
EndTime: new Date(2018, 1, 13, 11, 0),
|
|
19
|
+
CategoryColor: '#7fa900'
|
|
20
|
+
}, {
|
|
21
|
+
Id: 4,
|
|
22
|
+
Subject: 'Meteor Showers in 2018',
|
|
23
|
+
StartTime: new Date(2018, 1, 14, 13, 0),
|
|
24
|
+
EndTime: new Date(2018, 1, 14, 14, 30),
|
|
25
|
+
CategoryColor: '#ea7a57'
|
|
26
|
+
}, {
|
|
27
|
+
Id: 5,
|
|
28
|
+
Subject: 'Milky Way as Melting pot',
|
|
29
|
+
StartTime: new Date(2018, 1, 15, 12, 0),
|
|
30
|
+
EndTime: new Date(2018, 1, 15, 14, 0),
|
|
31
|
+
CategoryColor: '#00bdae'
|
|
32
|
+
}, {
|
|
33
|
+
Id: 6,
|
|
34
|
+
Subject: 'Mysteries of Bermuda Triangle',
|
|
35
|
+
StartTime: new Date(2018, 1, 15, 9, 30),
|
|
36
|
+
EndTime: new Date(2018, 1, 15, 11, 0),
|
|
37
|
+
CategoryColor: '#f57f17'
|
|
38
|
+
}, {
|
|
39
|
+
Id: 7,
|
|
40
|
+
Subject: 'Glaciers and Snowflakes',
|
|
41
|
+
StartTime: new Date(2018, 1, 16, 11, 0),
|
|
42
|
+
EndTime: new Date(2018, 1, 16, 12, 30),
|
|
43
|
+
CategoryColor: '#1aaa55'
|
|
44
|
+
}, {
|
|
45
|
+
Id: 8,
|
|
46
|
+
Subject: 'Life on Mars',
|
|
47
|
+
StartTime: new Date(2018, 1, 17, 9, 0),
|
|
48
|
+
EndTime: new Date(2018, 1, 17, 10, 0),
|
|
49
|
+
CategoryColor: '#357cd2'
|
|
50
|
+
}, {
|
|
51
|
+
Id: 9,
|
|
52
|
+
Subject: 'Alien Civilization',
|
|
53
|
+
StartTime: new Date(2018, 1, 19, 11, 0),
|
|
54
|
+
EndTime: new Date(2018, 1, 19, 13, 0),
|
|
55
|
+
CategoryColor: '#7fa900'
|
|
56
|
+
}, {
|
|
57
|
+
Id: 10,
|
|
58
|
+
Subject: 'Wildlife Galleries',
|
|
59
|
+
StartTime: new Date(2018, 1, 21, 11, 0),
|
|
60
|
+
EndTime: new Date(2018, 1, 21, 13, 0),
|
|
61
|
+
CategoryColor: '#ea7a57'
|
|
62
|
+
}];
|