Skip to content

Commit

Permalink
Added the required inputs in selector and make events optional
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek-thesunflowerlab committed Nov 3, 2019
1 parent 46f1b0a commit b31d362
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TimeScheduler
# Angular Time Scheduler
[![GitHub issues](https://img.shields.io/github/issues/abhishekjain12/ngx-time-scheduler.svg)](https://github.com/abhishekjain12/ngx-time-scheduler/issues)
[![GitHub forks](https://img.shields.io/github/forks/abhishekjain12/ngx-time-scheduler.svg)](https://github.com/abhishekjain12/ngx-time-scheduler/network)
[![GitHub stars](https://img.shields.io/github/stars/abhishekjain12/ngx-time-scheduler.svg)](https://github.com/abhishekjain12/ngx-time-scheduler/stargazers)
Expand Down Expand Up @@ -60,8 +60,8 @@ export class AppComponent implements OnInit {
items: Item[];

ngOnInit() {
this.events.SectionClickEvent = (section) => {console.log(section); };
this.events.ItemClicked = (item) => {console.log(item); };
this.events.SectionClickEvent = (section) => { console.log(section); };
this.events.ItemClicked = (item) => { console.log(item); };

this.periods = [
{
Expand Down Expand Up @@ -138,7 +138,7 @@ export class AppComponent implements OnInit {
| periods | Yes | Period[] | `null` | An array of `Period` denoting what periods to display and used to traverse the calendar. |
| sections | Yes | Section[] | `null` | An array of `Section` to fill up the sections of the scheduler. |
| items | Yes | Item[] | `null` | An array of `Item` to fill up the items of the scheduler. |
| events | Yes | Events | `null` | The events that can be hooked into. |
| events | No | Events | `null` | The events that can be hooked into. |
| currentTimeFormat | No | string | `'DD-MMM-YYYY HH:mm'` | The momentjs format to use for concise areas, such as tooltips. |
| showCurrentTime | No | boolean | `true` | Whether the current time should be marked on the scheduler. |
| showGoto | No | boolean | `true` | Whether the Goto button should be displayed. |
Expand Down Expand Up @@ -209,7 +209,7 @@ A selection of events are provided to hook into when creating the scheduler, and


# Credits
This angular time scheduler is based on the work done by [Zallist](https://github.com/Zallist/TimeScheduler).
This time scheduler is based on the work done by [Zallist](https://github.com/Zallist/TimeScheduler).


# License
Expand Down
2 changes: 1 addition & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist-demo/TimeScheduler",
"outputPath": "dist/demo",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"ng:build:demo": "ng build --aot --prod --base-href=https://abhishekjain12.github.io/ngx-time-scheduler/",
"deploy": "npm run ng:build:demo && gh-pages -d dist/demo",
"build_lib": "ng build NgxTimeScheduler",
"copy_license": "cp ./LICENSE ./dist/ngx-time-scheduler",
"copy_readme": "cp ./README.md ./dist/ngx-time-scheduler",
Expand Down Expand Up @@ -41,6 +43,7 @@
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"codelyzer": "~4.5.0",
"gh-pages": "^2.1.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.1.1",
Expand Down
7 changes: 5 additions & 2 deletions projects/ngx-time-scheduler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-time-scheduler",
"version": "1.1.1",
"version": "1.2.1",
"description": "A simple Angular Timeline Scheduler library",
"author": {
"name": "Abhishek Jain",
Expand All @@ -18,9 +18,12 @@
"angular",
"time-scheduler",
"scheduler",
"calender",
"typescript",
"timeline-scheduler",
"timeline"
"calendar-scheduler",
"timeline",
"ngx-time-scheduler"
],
"license": "MIT",
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import * as moment_ from 'moment';
const moment = moment_;

@Component({
selector: 'ngx-ts',
selector: 'ngx-ts[items][periods][sections]',
templateUrl: './ngx-time-scheduler.component.html',
styleUrls: ['./ngx-time-scheduler.component.css']
})
Expand All @@ -38,7 +38,7 @@ export class NgxTimeSchedulerComponent implements OnInit {
@Input() items: Item[];
@Input() sections: Section[];
@Input() periods: Period[];
@Input() events: Events;
@Input() events: Events = new Events();
@Input() start = moment().startOf('day');

end = moment().endOf('day');
Expand Down

0 comments on commit b31d362

Please sign in to comment.