From aa78ba3a699ffb87c866206674b5f2c28f8abfba Mon Sep 17 00:00:00 2001 From: VengateshManiraj Date: Thu, 11 May 2023 17:11:57 +0530 Subject: [PATCH 1/2] Committed the sample --- .../.editorconfig | 16 +++ .../.gitignore | 42 ++++++++ .../.vscode/extensions.json | 4 + .../.vscode/launch.json | 20 ++++ .../.vscode/tasks.json | 42 ++++++++ .../README.md | 27 +++++ .../angular.json | 101 ++++++++++++++++++ .../debug.log | 1 + .../package.json | 40 +++++++ .../src/app/app-routing.module.ts | 10 ++ .../src/app/app.component.css | 19 ++++ .../src/app/app.component.html | 1 + .../src/app/app.component.spec.ts | 35 ++++++ .../src/app/app.component.ts | 80 ++++++++++++++ .../src/app/app.module.ts | 26 +++++ .../src/app/crud.service.ts | 57 ++++++++++ .../src/app/data.service.ts | 50 +++++++++ .../src/assets/.gitkeep | 0 .../src/favicon.ico | Bin 0 -> 948 bytes .../src/index.html | 16 +++ .../src/main.ts | 7 ++ .../src/styles.scss | 16 +++ .../tsconfig.app.json | 14 +++ .../tsconfig.json | 34 ++++++ .../tsconfig.spec.json | 14 +++ 25 files changed, 672 insertions(+) create mode 100644 ej2-angular-scheduler-asynchronous-crud/.editorconfig create mode 100644 ej2-angular-scheduler-asynchronous-crud/.gitignore create mode 100644 ej2-angular-scheduler-asynchronous-crud/.vscode/extensions.json create mode 100644 ej2-angular-scheduler-asynchronous-crud/.vscode/launch.json create mode 100644 ej2-angular-scheduler-asynchronous-crud/.vscode/tasks.json create mode 100644 ej2-angular-scheduler-asynchronous-crud/README.md create mode 100644 ej2-angular-scheduler-asynchronous-crud/angular.json create mode 100644 ej2-angular-scheduler-asynchronous-crud/debug.log create mode 100644 ej2-angular-scheduler-asynchronous-crud/package.json create mode 100644 ej2-angular-scheduler-asynchronous-crud/src/app/app-routing.module.ts create mode 100644 ej2-angular-scheduler-asynchronous-crud/src/app/app.component.css create mode 100644 ej2-angular-scheduler-asynchronous-crud/src/app/app.component.html create mode 100644 ej2-angular-scheduler-asynchronous-crud/src/app/app.component.spec.ts create mode 100644 ej2-angular-scheduler-asynchronous-crud/src/app/app.component.ts create mode 100644 ej2-angular-scheduler-asynchronous-crud/src/app/app.module.ts create mode 100644 ej2-angular-scheduler-asynchronous-crud/src/app/crud.service.ts create mode 100644 ej2-angular-scheduler-asynchronous-crud/src/app/data.service.ts create mode 100644 ej2-angular-scheduler-asynchronous-crud/src/assets/.gitkeep create mode 100644 ej2-angular-scheduler-asynchronous-crud/src/favicon.ico create mode 100644 ej2-angular-scheduler-asynchronous-crud/src/index.html create mode 100644 ej2-angular-scheduler-asynchronous-crud/src/main.ts create mode 100644 ej2-angular-scheduler-asynchronous-crud/src/styles.scss create mode 100644 ej2-angular-scheduler-asynchronous-crud/tsconfig.app.json create mode 100644 ej2-angular-scheduler-asynchronous-crud/tsconfig.json create mode 100644 ej2-angular-scheduler-asynchronous-crud/tsconfig.spec.json diff --git a/ej2-angular-scheduler-asynchronous-crud/.editorconfig b/ej2-angular-scheduler-asynchronous-crud/.editorconfig new file mode 100644 index 0000000..59d9a3a --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/.editorconfig @@ -0,0 +1,16 @@ +# Editor configuration, see https://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.ts] +quote_type = single + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/ej2-angular-scheduler-asynchronous-crud/.gitignore b/ej2-angular-scheduler-asynchronous-crud/.gitignore new file mode 100644 index 0000000..0711527 --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/.gitignore @@ -0,0 +1,42 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# Compiled output +/dist +/tmp +/out-tsc +/bazel-out + +# Node +/node_modules +npm-debug.log +yarn-error.log + +# IDEs and editors +.idea/ +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# Visual Studio Code +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history/* + +# Miscellaneous +/.angular/cache +.sass-cache/ +/connect.lock +/coverage +/libpeerconnection.log +testem.log +/typings + +# System files +.DS_Store +Thumbs.db diff --git a/ej2-angular-scheduler-asynchronous-crud/.vscode/extensions.json b/ej2-angular-scheduler-asynchronous-crud/.vscode/extensions.json new file mode 100644 index 0000000..77b3745 --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/.vscode/extensions.json @@ -0,0 +1,4 @@ +{ + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846 + "recommendations": ["angular.ng-template"] +} diff --git a/ej2-angular-scheduler-asynchronous-crud/.vscode/launch.json b/ej2-angular-scheduler-asynchronous-crud/.vscode/launch.json new file mode 100644 index 0000000..740e35a --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/.vscode/launch.json @@ -0,0 +1,20 @@ +{ + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "ng serve", + "type": "pwa-chrome", + "request": "launch", + "preLaunchTask": "npm: start", + "url": "http://localhost:4200/" + }, + { + "name": "ng test", + "type": "chrome", + "request": "launch", + "preLaunchTask": "npm: test", + "url": "http://localhost:9876/debug.html" + } + ] +} diff --git a/ej2-angular-scheduler-asynchronous-crud/.vscode/tasks.json b/ej2-angular-scheduler-asynchronous-crud/.vscode/tasks.json new file mode 100644 index 0000000..a298b5b --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/.vscode/tasks.json @@ -0,0 +1,42 @@ +{ + // For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558 + "version": "2.0.0", + "tasks": [ + { + "type": "npm", + "script": "start", + "isBackground": true, + "problemMatcher": { + "owner": "typescript", + "pattern": "$tsc", + "background": { + "activeOnStart": true, + "beginsPattern": { + "regexp": "(.*?)" + }, + "endsPattern": { + "regexp": "bundle generation complete" + } + } + } + }, + { + "type": "npm", + "script": "test", + "isBackground": true, + "problemMatcher": { + "owner": "typescript", + "pattern": "$tsc", + "background": { + "activeOnStart": true, + "beginsPattern": { + "regexp": "(.*?)" + }, + "endsPattern": { + "regexp": "bundle generation complete" + } + } + } + } + ] +} diff --git a/ej2-angular-scheduler-asynchronous-crud/README.md b/ej2-angular-scheduler-asynchronous-crud/README.md new file mode 100644 index 0000000..a4f758f --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/README.md @@ -0,0 +1,27 @@ +# MyApp + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.2.4. + +## Development server + +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. diff --git a/ej2-angular-scheduler-asynchronous-crud/angular.json b/ej2-angular-scheduler-asynchronous-crud/angular.json new file mode 100644 index 0000000..2f03ed7 --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/angular.json @@ -0,0 +1,101 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "ng-scheduler": { + "projectType": "application", + "schematics": {}, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist/ng-scheduler", + "index": "src/index.html", + "main": "src/main.ts", + "polyfills": [ + "zone.js" + ], + "tsConfig": "tsconfig.app.json", + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.scss" + ], + "scripts": [] + }, + "configurations": { + "production": { + "budgets": [ + { + "type": "initial", + "maximumWarning": "500kb", + "maximumError": "1mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "2kb", + "maximumError": "4kb" + } + ], + "outputHashing": "all" + }, + "development": { + "buildOptimizer": false, + "optimization": false, + "vendorChunk": true, + "extractLicenses": false, + "sourceMap": true, + "namedChunks": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "browserTarget": "ng-scheduler:build:production" + }, + "development": { + "browserTarget": "ng-scheduler:build:development" + } + }, + "defaultConfiguration": "development" + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "browserTarget": "ng-scheduler:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "polyfills": [ + "zone.js", + "zone.js/testing" + ], + "tsConfig": "tsconfig.spec.json", + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.scss" + ], + "scripts": [] + } + } + } + } + }, + "cli": { + "analytics": false + } +} diff --git a/ej2-angular-scheduler-asynchronous-crud/debug.log b/ej2-angular-scheduler-asynchronous-crud/debug.log new file mode 100644 index 0000000..65f602d --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/debug.log @@ -0,0 +1 @@ +[0414/210144.439:ERROR:registration_protocol_win.cc(106)] CreateFile: The system cannot find the file specified. (0x2) diff --git a/ej2-angular-scheduler-asynchronous-crud/package.json b/ej2-angular-scheduler-asynchronous-crud/package.json new file mode 100644 index 0000000..ecdc949 --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/package.json @@ -0,0 +1,40 @@ +{ + "name": "ng-scheduler", + "version": "1.0.0", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "watch": "ng build --watch --configuration development", + "test": "ng test" + }, + "private": true, + "dependencies": { + "@angular/animations": "^15.2.0", + "@angular/common": "^15.2.0", + "@angular/compiler": "^15.2.0", + "@angular/core": "^15.2.0", + "@angular/forms": "^15.2.0", + "@angular/platform-browser": "^15.2.0", + "@angular/platform-browser-dynamic": "^15.2.0", + "@angular/router": "^15.2.0", + "@syncfusion/ej2-angular-schedule": "*", + "angular-in-memory-web-api": "^0.15.0", + "rxjs": "~7.8.0", + "tslib": "^2.3.0", + "zone.js": "~0.12.0" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^15.2.4", + "@angular/cli": "~15.2.4", + "@angular/compiler-cli": "^15.2.0", + "@types/jasmine": "~4.3.0", + "jasmine-core": "~4.5.0", + "karma": "~6.4.0", + "karma-chrome-launcher": "~3.1.0", + "karma-coverage": "~2.2.0", + "karma-jasmine": "~5.1.0", + "karma-jasmine-html-reporter": "~2.0.0", + "typescript": "~4.9.4" + } +} diff --git a/ej2-angular-scheduler-asynchronous-crud/src/app/app-routing.module.ts b/ej2-angular-scheduler-asynchronous-crud/src/app/app-routing.module.ts new file mode 100644 index 0000000..0297262 --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/src/app/app-routing.module.ts @@ -0,0 +1,10 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; + +const routes: Routes = []; + +@NgModule({ + imports: [RouterModule.forRoot(routes)], + exports: [RouterModule] +}) +export class AppRoutingModule { } diff --git a/ej2-angular-scheduler-asynchronous-crud/src/app/app.component.css b/ej2-angular-scheduler-asynchronous-crud/src/app/app.component.css new file mode 100644 index 0000000..8b720f3 --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/src/app/app.component.css @@ -0,0 +1,19 @@ +/* @import '../../node_modules/@syncfusion/ej2-base/styles/material.css'; +@import '../../node_modules/@syncfusion/ej2-buttons/styles/material.css'; +@import '../../node_modules/@syncfusion/ej2-calendars/styles/material.css'; +@import '../../node_modules/@syncfusion/ej2-dropdowns/styles/material.css'; +@import '../../node_modules/@syncfusion/ej2-icons/styles/material.css'; +@import '../../node_modules/@syncfusion/ej2-inputs/styles/material.css'; +@import '../../node_modules/@syncfusion/ej2-navigations/styles/material.css'; +@import '../../node_modules/@syncfusion/ej2-popups/styles/material.css'; +@import '../../node_modules/@syncfusion/ej2-schedule/styles/material.css'; */ + + +/* .custom-event-editor tr:last-child .form-check-input.e-field { + margin-top: 0; + margin-left: 1.25rem; + } + + .e-quick-popup-wrapper .e-event-popup .e-popup-footer { + display: block; + } */ \ No newline at end of file diff --git a/ej2-angular-scheduler-asynchronous-crud/src/app/app.component.html b/ej2-angular-scheduler-asynchronous-crud/src/app/app.component.html new file mode 100644 index 0000000..1e5449d --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/src/app/app.component.html @@ -0,0 +1 @@ + diff --git a/ej2-angular-scheduler-asynchronous-crud/src/app/app.component.spec.ts b/ej2-angular-scheduler-asynchronous-crud/src/app/app.component.spec.ts new file mode 100644 index 0000000..d5e0fd9 --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/src/app/app.component.spec.ts @@ -0,0 +1,35 @@ +import { TestBed } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; +import { AppComponent } from './app.component'; + +describe('AppComponent', () => { + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [ + RouterTestingModule + ], + declarations: [ + AppComponent + ], + }).compileComponents(); + }); + + it('should create the app', () => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.componentInstance; + expect(app).toBeTruthy(); + }); + + it(`should have as title 'my-app'`, () => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.componentInstance; + expect(app.title).toEqual('my-app'); + }); + + it('should render title', () => { + const fixture = TestBed.createComponent(AppComponent); + fixture.detectChanges(); + const compiled = fixture.nativeElement as HTMLElement; + expect(compiled.querySelector('.content span')?.textContent).toContain('my-app app is running!'); + }); +}); diff --git a/ej2-angular-scheduler-asynchronous-crud/src/app/app.component.ts b/ej2-angular-scheduler-asynchronous-crud/src/app/app.component.ts new file mode 100644 index 0000000..5eb2ddf --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/src/app/app.component.ts @@ -0,0 +1,80 @@ +import { Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; +import { DayService, WeekService, WorkWeekService, MonthService, AgendaService, ScheduleComponent, ActionEventArgs, EventSettingsModel, ReturnType } from '@syncfusion/ej2-angular-schedule'; +import { forkJoin, Observable } from 'rxjs'; +import { CrudService, EventData } from './crud.service'; + +@Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['../styles.scss'], + providers: [DayService, WeekService, WorkWeekService, MonthService, AgendaService], + encapsulation: ViewEncapsulation.None +}) +export class AppComponent implements OnInit { + @ViewChild('scheduleObj') scheduleObj: ScheduleComponent; + + public selectedDate: Date = new Date(2023, 4, 1); + public eventSettings: EventSettingsModel = { + fields: { + id: 'id' + } + }; + private $query = { skip: 0, take: 100 }; + private isNavigation: boolean = false; + + constructor(private crudService: CrudService) { } + + ngOnInit(): void { + this.crudService.eventData.subscribe((response: Array) => { + if (this.scheduleObj) { + this.scheduleObj.eventSettings.dataSource = response; + this.scheduleObj.hideSpinner(); + } + }); + } + + onDataBinding(args: ReturnType): void { + if (!(this.scheduleObj?.eventSettings.dataSource as Array>).length || this.isNavigation) { + args.result = []; + this.scheduleObj.showSpinner(); + this.crudService.execute(this.$query); + this.isNavigation = false; + } + } + + onNavigation(): void { + this.isNavigation = true; + } + + onActionBegin(args: ActionEventArgs): void { + if (['eventCreate', 'eventChange', 'eventRemove'].indexOf(args.requestType) > -1) { + args.cancel = true; + const requests: Array> = []; + if (args.addedRecords.length) { + args.addedRecords.forEach((data: any) => { + requests.push(this.crudService.addEvent(data)); + }); + } + if (args.changedRecords.length) { + args.changedRecords.forEach((data: any) => { + requests.push(this.crudService.updateEvent(data)); + }); + } + if (args.deletedRecords.length) { + args.deletedRecords.forEach((data: any) => { + requests.push(this.crudService.deleteEvent(data)); + }); + } + this.scheduleObj.showSpinner(); + forkJoin(requests).subscribe({ + next: () => { + this.crudService.execute(this.$query); + }, + error: (error) => { + this.scheduleObj.hideSpinner(); + console.error(error); + } + }); + } + } +} diff --git a/ej2-angular-scheduler-asynchronous-crud/src/app/app.module.ts b/ej2-angular-scheduler-asynchronous-crud/src/app/app.module.ts new file mode 100644 index 0000000..bbecbc7 --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/src/app/app.module.ts @@ -0,0 +1,26 @@ +import { NgModule } from '@angular/core'; +import { BrowserModule } from '@angular/platform-browser'; +import { AppRoutingModule } from './app-routing.module'; +import { HttpClientModule } from '@angular/common/http'; +import { HttpClientInMemoryWebApiModule, InMemoryWebApiModule } from 'angular-in-memory-web-api'; +import { CrudService } from './crud.service'; +import { ScheduleAllModule } from '@syncfusion/ej2-angular-schedule'; +import { AppComponent } from './app.component'; +import { DataService } from './data.service'; + +@NgModule({ + declarations: [ + AppComponent + ], + imports: [ + BrowserModule, + AppRoutingModule, + ScheduleAllModule, + HttpClientModule, + HttpClientInMemoryWebApiModule.forRoot(DataService), + InMemoryWebApiModule.forRoot(DataService, { delay: 5000 }) + ], + providers: [CrudService], + bootstrap: [AppComponent] +}) +export class AppModule { } diff --git a/ej2-angular-scheduler-asynchronous-crud/src/app/crud.service.ts b/ej2-angular-scheduler-asynchronous-crud/src/app/crud.service.ts new file mode 100644 index 0000000..2b25e7b --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/src/app/crud.service.ts @@ -0,0 +1,57 @@ +import { Injectable } from '@angular/core'; +import { HttpClient, HttpHeaders } from '@angular/common/http'; +import { BehaviorSubject, catchError, map, Observable, throwError } from 'rxjs'; + +export class EventData { + id: number; + Subject: string; + StartTime: Date; + EndTime: Date; + IsAllDay: boolean; +} + +@Injectable({ providedIn: 'root' }) +export class CrudService { + + public eventData: BehaviorSubject> = new BehaviorSubject>([]); + private serverUrl: string = 'api/crudevents'; + private httpOptions = { + headers: new HttpHeaders({ 'Content-Type': 'application/json' }) + }; + + constructor(private http: HttpClient) { } + + public execute($query: Record): void { + this.getAllData($query).subscribe((response: EventData[]) => this.eventData.next(response)); + } + + /** GET: All data from the server */ + public getAllData($query: Record): Observable { + return this.http.get(this.serverUrl) + .pipe(map((response: EventData[]) => ($query.take > 0 ? response.slice(0, $query.take) : response))) + .pipe((data: Observable) => data) + .pipe(catchError(this.handleError)); + } + + /** POST: Add a new data to the server */ + public addEvent(data: EventData): Observable { + return this.http.post(this.serverUrl, data, this.httpOptions).pipe(catchError(this.handleError)); + } + + /** PUT: Update the existing data on the server */ + public updateEvent(data: EventData): Observable { + return this.http.put(`${this.serverUrl}/${data.id}`, data, this.httpOptions).pipe(catchError(this.handleError)); + } + + /** DELETE: Delete the data from the server */ + public deleteEvent(data: EventData): Observable { + return this.http.delete(`${this.serverUrl}/${data.id}`, this.httpOptions).pipe(catchError(this.handleError)); + } + + /** Method to handle errors */ + private handleError(error: Observable): Observable { + return throwError(() => error); + } + +} + diff --git a/ej2-angular-scheduler-asynchronous-crud/src/app/data.service.ts b/ej2-angular-scheduler-asynchronous-crud/src/app/data.service.ts new file mode 100644 index 0000000..3297f71 --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/src/app/data.service.ts @@ -0,0 +1,50 @@ +import { InMemoryDbService } from 'angular-in-memory-web-api'; +import { EventData } from './crud.service'; + +export class DataService implements InMemoryDbService { + + constructor() { } + + createDb() { + const crudevents: Array = [ + { + id: 1, + Subject: 'May Day', + StartTime: new Date(2023, 4, 1, 10), + EndTime: new Date(2023, 4, 1, 12, 30), + IsAllDay: false + }, + { + id: 2, + Subject: 'Bering Sea Gold', + StartTime: new Date(2023, 4, 2, 10), + EndTime: new Date(2023, 4, 2, 12, 30), + IsAllDay: false + }, + { + id: 3, + Subject: 'Annual Conference', + StartTime: new Date(2023, 4, 3, 10), + EndTime: new Date(2023, 4, 3, 12, 30), + IsAllDay: false + }, + { + id: 4, + Subject: 'Final Presentation', + StartTime: new Date(2023, 4, 4, 10), + EndTime: new Date(2023, 4, 4, 12, 30), + IsAllDay: false + }, + { + id: 5, + Subject: 'Sports Day', + StartTime: new Date(2023, 4, 5, 10), + EndTime: new Date(2023, 4, 5, 12, 30), + IsAllDay: false + } + ]; + return { crudevents }; + } + +} + diff --git a/ej2-angular-scheduler-asynchronous-crud/src/assets/.gitkeep b/ej2-angular-scheduler-asynchronous-crud/src/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/ej2-angular-scheduler-asynchronous-crud/src/favicon.ico b/ej2-angular-scheduler-asynchronous-crud/src/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..997406ad22c29aae95893fb3d666c30258a09537 GIT binary patch literal 948 zcmV;l155mgP)CBYU7IjCFmI-B}4sMJt3^s9NVg!P0 z6hDQy(L`XWMkB@zOLgN$4KYz;j0zZxq9KKdpZE#5@k0crP^5f9KO};h)ZDQ%ybhht z%t9#h|nu0K(bJ ztIkhEr!*UyrZWQ1k2+YkGqDi8Z<|mIN&$kzpKl{cNP=OQzXHz>vn+c)F)zO|Bou>E z2|-d_=qY#Y+yOu1a}XI?cU}%04)zz%anD(XZC{#~WreV!a$7k2Ug`?&CUEc0EtrkZ zL49MB)h!_K{H(*l_93D5tO0;BUnvYlo+;yss%n^&qjt6fZOa+}+FDO(~2>G z2dx@=JZ?DHP^;b7*Y1as5^uphBsh*s*z&MBd?e@I>-9kU>63PjP&^#5YTOb&x^6Cf z?674rmSHB5Fk!{Gv7rv!?qX#ei_L(XtwVqLX3L}$MI|kJ*w(rhx~tc&L&xP#?cQow zX_|gx$wMr3pRZIIr_;;O|8fAjd;1`nOeu5K(pCu7>^3E&D2OBBq?sYa(%S?GwG&_0-s%_v$L@R!5H_fc)lOb9ZoOO#p`Nn`KU z3LTTBtjwo`7(HA6 z7gmO$yTR!5L>Bsg!X8616{JUngg_@&85%>W=mChTR;x4`P=?PJ~oPuy5 zU-L`C@_!34D21{fD~Y8NVnR3t;aqZI3fIhmgmx}$oc-dKDC6Ap$Gy>a!`A*x2L1v0 WcZ@i?LyX}70000 + + + + + Angular Scheduler + + + + + + + + + + \ No newline at end of file diff --git a/ej2-angular-scheduler-asynchronous-crud/src/main.ts b/ej2-angular-scheduler-asynchronous-crud/src/main.ts new file mode 100644 index 0000000..c58dc05 --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/src/main.ts @@ -0,0 +1,7 @@ +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + +import { AppModule } from './app/app.module'; + + +platformBrowserDynamic().bootstrapModule(AppModule) + .catch(err => console.error(err)); diff --git a/ej2-angular-scheduler-asynchronous-crud/src/styles.scss b/ej2-angular-scheduler-asynchronous-crud/src/styles.scss new file mode 100644 index 0000000..67a46ec --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/src/styles.scss @@ -0,0 +1,16 @@ +/* You can add global styles to this file, and also import other style files */ + +@import '../node_modules/@syncfusion/ej2-base/styles/tailwind.css'; +@import '../node_modules/@syncfusion/ej2-buttons/styles/tailwind.css'; +@import '../node_modules/@syncfusion/ej2-calendars/styles/tailwind.css'; +@import '../node_modules/@syncfusion/ej2-dropdowns/styles/tailwind.css'; +@import '../node_modules/@syncfusion/ej2-inputs/styles/tailwind.css'; +@import '../node_modules/@syncfusion/ej2-lists/styles/tailwind.css'; +@import '../node_modules/@syncfusion/ej2-popups/styles/tailwind.css'; +@import '../node_modules/@syncfusion/ej2-navigations/styles/tailwind.css'; +@import '../node_modules/@syncfusion/ej2-schedule/styles/tailwind.css'; + +.root { + display: block; + margin-top: 80px; +} \ No newline at end of file diff --git a/ej2-angular-scheduler-asynchronous-crud/tsconfig.app.json b/ej2-angular-scheduler-asynchronous-crud/tsconfig.app.json new file mode 100644 index 0000000..374cc9d --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/tsconfig.app.json @@ -0,0 +1,14 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "types": [] + }, + "files": [ + "src/main.ts" + ], + "include": [ + "src/**/*.d.ts" + ] +} diff --git a/ej2-angular-scheduler-asynchronous-crud/tsconfig.json b/ej2-angular-scheduler-asynchronous-crud/tsconfig.json new file mode 100644 index 0000000..1e88e30 --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/tsconfig.json @@ -0,0 +1,34 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "./", + "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": true, + "strictNullChecks": false, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": false, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "sourceMap": true, + "declaration": false, + "downlevelIteration": true, + "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "target": "ES2022", + "module": "ES2022", + "useDefineForClassFields": false, + "lib": [ + "ES2022", + "dom" + ] + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} diff --git a/ej2-angular-scheduler-asynchronous-crud/tsconfig.spec.json b/ej2-angular-scheduler-asynchronous-crud/tsconfig.spec.json new file mode 100644 index 0000000..be7e9da --- /dev/null +++ b/ej2-angular-scheduler-asynchronous-crud/tsconfig.spec.json @@ -0,0 +1,14 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/spec", + "types": [ + "jasmine" + ] + }, + "include": [ + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} From e5ef52c217f21f646c4902c12b2c83e37aa0e035 Mon Sep 17 00:00:00 2001 From: VengateshManiraj Date: Thu, 11 May 2023 18:40:03 +0530 Subject: [PATCH 2/2] Removed unwanted files --- README.md | 28 ++++++++++++- .../.vscode/extensions.json | 4 -- .../.vscode/launch.json | 20 --------- .../.vscode/tasks.json | 42 ------------------- .../README.md | 27 ------------ .../src/app/app.component.css | 19 --------- .../src/app/app.module.ts | 2 +- 7 files changed, 28 insertions(+), 114 deletions(-) delete mode 100644 ej2-angular-scheduler-asynchronous-crud/.vscode/extensions.json delete mode 100644 ej2-angular-scheduler-asynchronous-crud/.vscode/launch.json delete mode 100644 ej2-angular-scheduler-asynchronous-crud/.vscode/tasks.json delete mode 100644 ej2-angular-scheduler-asynchronous-crud/README.md delete mode 100644 ej2-angular-scheduler-asynchronous-crud/src/app/app.component.css diff --git a/README.md b/README.md index 9ed03c2..b1d1bb3 100644 --- a/README.md +++ b/README.md @@ -1 +1,27 @@ -# ej2-angular-scheduler-asynchronous-crud \ No newline at end of file +# EJ2-Angular-Scheduler-Asychronous-CRUD + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.2.4. + +## Development server + +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. diff --git a/ej2-angular-scheduler-asynchronous-crud/.vscode/extensions.json b/ej2-angular-scheduler-asynchronous-crud/.vscode/extensions.json deleted file mode 100644 index 77b3745..0000000 --- a/ej2-angular-scheduler-asynchronous-crud/.vscode/extensions.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846 - "recommendations": ["angular.ng-template"] -} diff --git a/ej2-angular-scheduler-asynchronous-crud/.vscode/launch.json b/ej2-angular-scheduler-asynchronous-crud/.vscode/launch.json deleted file mode 100644 index 740e35a..0000000 --- a/ej2-angular-scheduler-asynchronous-crud/.vscode/launch.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "ng serve", - "type": "pwa-chrome", - "request": "launch", - "preLaunchTask": "npm: start", - "url": "http://localhost:4200/" - }, - { - "name": "ng test", - "type": "chrome", - "request": "launch", - "preLaunchTask": "npm: test", - "url": "http://localhost:9876/debug.html" - } - ] -} diff --git a/ej2-angular-scheduler-asynchronous-crud/.vscode/tasks.json b/ej2-angular-scheduler-asynchronous-crud/.vscode/tasks.json deleted file mode 100644 index a298b5b..0000000 --- a/ej2-angular-scheduler-asynchronous-crud/.vscode/tasks.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - // For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558 - "version": "2.0.0", - "tasks": [ - { - "type": "npm", - "script": "start", - "isBackground": true, - "problemMatcher": { - "owner": "typescript", - "pattern": "$tsc", - "background": { - "activeOnStart": true, - "beginsPattern": { - "regexp": "(.*?)" - }, - "endsPattern": { - "regexp": "bundle generation complete" - } - } - } - }, - { - "type": "npm", - "script": "test", - "isBackground": true, - "problemMatcher": { - "owner": "typescript", - "pattern": "$tsc", - "background": { - "activeOnStart": true, - "beginsPattern": { - "regexp": "(.*?)" - }, - "endsPattern": { - "regexp": "bundle generation complete" - } - } - } - } - ] -} diff --git a/ej2-angular-scheduler-asynchronous-crud/README.md b/ej2-angular-scheduler-asynchronous-crud/README.md deleted file mode 100644 index a4f758f..0000000 --- a/ej2-angular-scheduler-asynchronous-crud/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# MyApp - -This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.2.4. - -## Development server - -Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. - -## Code scaffolding - -Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. - -## Build - -Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. - -## Running unit tests - -Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). - -## Running end-to-end tests - -Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. - -## Further help - -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. diff --git a/ej2-angular-scheduler-asynchronous-crud/src/app/app.component.css b/ej2-angular-scheduler-asynchronous-crud/src/app/app.component.css deleted file mode 100644 index 8b720f3..0000000 --- a/ej2-angular-scheduler-asynchronous-crud/src/app/app.component.css +++ /dev/null @@ -1,19 +0,0 @@ -/* @import '../../node_modules/@syncfusion/ej2-base/styles/material.css'; -@import '../../node_modules/@syncfusion/ej2-buttons/styles/material.css'; -@import '../../node_modules/@syncfusion/ej2-calendars/styles/material.css'; -@import '../../node_modules/@syncfusion/ej2-dropdowns/styles/material.css'; -@import '../../node_modules/@syncfusion/ej2-icons/styles/material.css'; -@import '../../node_modules/@syncfusion/ej2-inputs/styles/material.css'; -@import '../../node_modules/@syncfusion/ej2-navigations/styles/material.css'; -@import '../../node_modules/@syncfusion/ej2-popups/styles/material.css'; -@import '../../node_modules/@syncfusion/ej2-schedule/styles/material.css'; */ - - -/* .custom-event-editor tr:last-child .form-check-input.e-field { - margin-top: 0; - margin-left: 1.25rem; - } - - .e-quick-popup-wrapper .e-event-popup .e-popup-footer { - display: block; - } */ \ No newline at end of file diff --git a/ej2-angular-scheduler-asynchronous-crud/src/app/app.module.ts b/ej2-angular-scheduler-asynchronous-crud/src/app/app.module.ts index bbecbc7..598f25b 100644 --- a/ej2-angular-scheduler-asynchronous-crud/src/app/app.module.ts +++ b/ej2-angular-scheduler-asynchronous-crud/src/app/app.module.ts @@ -18,7 +18,7 @@ import { DataService } from './data.service'; ScheduleAllModule, HttpClientModule, HttpClientInMemoryWebApiModule.forRoot(DataService), - InMemoryWebApiModule.forRoot(DataService, { delay: 5000 }) + InMemoryWebApiModule.forRoot(DataService, { delay: 1000 }) ], providers: [CrudService], bootstrap: [AppComponent]