-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
909a51d
commit 1fbf313
Showing
17 changed files
with
396 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# 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 | ||
ij_typescript_use_double_quotes = false | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
{ | ||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
"version": 1, | ||
"newProjectRoot": "projects", | ||
"projects": { | ||
"myapp": { | ||
"projectType": "application", | ||
"schematics": {}, | ||
"root": "", | ||
"sourceRoot": "src", | ||
"prefix": "app", | ||
"architect": { | ||
"build": { | ||
"builder": "@angular-devkit/build-angular:application", | ||
"options": { | ||
"outputPath": "dist/myapp", | ||
"index": "src/index.html", | ||
"browser": "src/main.ts", | ||
"polyfills": [ | ||
"zone.js" | ||
], | ||
"tsConfig": "tsconfig.app.json", | ||
"assets": [ | ||
{ | ||
"glob": "**/*", | ||
"input": "public" | ||
} | ||
], | ||
"styles": [ | ||
"src/styles.css" | ||
], | ||
"scripts": [] | ||
}, | ||
"configurations": { | ||
"production": { | ||
"budgets": [ | ||
{ | ||
"type": "initial", | ||
"maximumWarning": "500kB", | ||
"maximumError": "1MB" | ||
}, | ||
{ | ||
"type": "anyComponentStyle", | ||
"maximumWarning": "2kB", | ||
"maximumError": "4kB" | ||
} | ||
], | ||
"outputHashing": "all" | ||
}, | ||
"development": { | ||
"optimization": false, | ||
"extractLicenses": false, | ||
"sourceMap": true | ||
} | ||
}, | ||
"defaultConfiguration": "production" | ||
}, | ||
"serve": { | ||
"builder": "@angular-devkit/build-angular:dev-server", | ||
"configurations": { | ||
"production": { | ||
"buildTarget": "myapp:build:production" | ||
}, | ||
"development": { | ||
"buildTarget": "myapp:build:development" | ||
} | ||
}, | ||
"defaultConfiguration": "development" | ||
}, | ||
"extract-i18n": { | ||
"builder": "@angular-devkit/build-angular:extract-i18n" | ||
}, | ||
"test": { | ||
"builder": "@angular-devkit/build-angular:karma", | ||
"options": { | ||
"polyfills": [ | ||
"zone.js", | ||
"zone.js/testing" | ||
], | ||
"tsConfig": "tsconfig.spec.json", | ||
"assets": [ | ||
{ | ||
"glob": "**/*", | ||
"input": "public" | ||
} | ||
], | ||
"styles": [ | ||
"src/styles.css" | ||
], | ||
"scripts": [] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"cli": { | ||
"analytics": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"name": "myapp", | ||
"version": "0.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": "^18.2.0", | ||
"@angular/common": "^18.2.0", | ||
"@angular/compiler": "^18.2.0", | ||
"@angular/core": "^18.2.0", | ||
"@angular/forms": "^18.2.0", | ||
"@angular/platform-browser": "^18.2.0", | ||
"@angular/platform-browser-dynamic": "^18.2.0", | ||
"@angular/router": "^18.2.0", | ||
"@syncfusion/ej2-angular-dropdowns": "^27.2.2", | ||
"rxjs": "~7.8.0", | ||
"tslib": "^2.3.0", | ||
"zone.js": "~0.14.10" | ||
}, | ||
"devDependencies": { | ||
"@angular-devkit/build-angular": "^18.2.12", | ||
"@angular/cli": "^18.2.12", | ||
"@angular/compiler-cli": "^18.2.0", | ||
"@types/jasmine": "~5.1.0", | ||
"jasmine-core": "~5.2.0", | ||
"karma": "~6.4.0", | ||
"karma-chrome-launcher": "~3.2.0", | ||
"karma-coverage": "~2.2.0", | ||
"karma-jasmine": "~5.1.0", | ||
"karma-jasmine-html-reporter": "~2.1.0", | ||
"typescript": "~5.5.2" | ||
} | ||
} |
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div class="wrapper"> | ||
<ejs-combobox #country | ||
[dataSource]="countryData" | ||
[fields]="countryFields" | ||
[placeholder]="countryWatermark" | ||
(change)="countryChange()"> | ||
</ejs-combobox> | ||
<div style="padding-top: 35px;"> | ||
<ejs-combobox #state | ||
[dataSource]="stateData" | ||
[fields]="stateFields" | ||
[placeholder]="stateWatermark" | ||
[enabled]="false"></ejs-combobox> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { TestBed } from '@angular/core/testing'; | ||
import { AppComponent } from './app.component'; | ||
|
||
describe('AppComponent', () => { | ||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [AppComponent], | ||
}).compileComponents(); | ||
}); | ||
|
||
it('should create the app', () => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
const app = fixture.componentInstance; | ||
expect(app).toBeTruthy(); | ||
}); | ||
|
||
it(`should have the 'myapp' title`, () => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
const app = fixture.componentInstance; | ||
expect(app.title).toEqual('myapp'); | ||
}); | ||
|
||
it('should render title', () => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
fixture.detectChanges(); | ||
const compiled = fixture.nativeElement as HTMLElement; | ||
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, myapp'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { ComboBoxModule, ComboBoxComponent } | ||
from '@syncfusion/ej2-angular-dropdowns' | ||
import { Component, ViewChild } from '@angular/core'; | ||
import { Query } from '@syncfusion/ej2-data'; | ||
|
||
@Component({ | ||
imports: [ ComboBoxModule ], | ||
standalone: true, | ||
selector: 'app-root', | ||
templateUrl: `app.component.html` | ||
}) | ||
export class AppComponent { | ||
@ViewChild('country') countryObj?: ComboBoxComponent | any; | ||
@ViewChild('state') stateObj?: ComboBoxComponent | any; | ||
public countryChange(): void { | ||
let childDataQuery: Query = | ||
new Query().where('countryId', 'equal', this.countryObj.value); | ||
this.stateObj.query = childDataQuery; | ||
this.stateObj.enabled = true; | ||
this.stateObj.text = null; | ||
this.stateObj.dataBind(); | ||
}; | ||
public stateWatermark: string = "Select a state"; | ||
|
||
|
||
public stateFields: Object = | ||
{ text: 'stateName', value: 'stateId' }; | ||
|
||
|
||
|
||
public stateData: { [key: string]: Object }[] = [ | ||
{ stateName: 'New York', countryId: '1', stateId: '101' }, | ||
{ stateName: 'Queensland', countryId: '2', stateId: '104' }, | ||
{ stateName: 'Tasmania ', countryId: '2', stateId: '105' }, | ||
{ stateName: 'Victoria', countryId: '2', stateId: '106' }, | ||
{ stateName: 'Virginia ', countryId: '1', stateId: '102' }, | ||
{ stateName: 'Washington', countryId: '1', stateId: '103' } | ||
]; | ||
|
||
|
||
|
||
public countryData: { [key: string]: Object }[] = [ | ||
{ countryName: 'Australia', countryId: '2' }, | ||
{ countryName: 'United States', countryId: '1' } | ||
]; | ||
public countryFields: Object = | ||
{ text: 'countryName', value: 'countryId' }; | ||
public countryWatermark: string = "Select a country"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core'; | ||
import { provideRouter } from '@angular/router'; | ||
|
||
import { routes } from './app.routes'; | ||
|
||
export const appConfig: ApplicationConfig = { | ||
providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes)] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { Routes } from '@angular/router'; | ||
|
||
export const routes: Routes = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Myapp</title> | ||
<base href="/"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="icon" type="image/x-icon" href="favicon.ico"> | ||
</head> | ||
<body> | ||
<app-root></app-root> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { bootstrapApplication } from '@angular/platform-browser'; | ||
import { appConfig } from './app/app.config'; | ||
import { AppComponent } from './app/app.component'; | ||
|
||
bootstrapApplication(AppComponent, appConfig) | ||
.catch((err) => console.error(err)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* You can add global styles to this file, and also import other style files */ | ||
@import '../node_modules/@syncfusion/ej2-base/styles/material.css'; | ||
@import '../node_modules/@syncfusion/ej2-buttons/styles/material.css'; | ||
@import '../node_modules/@syncfusion/ej2-dropdowns/styles/material.css'; | ||
@import '../node_modules/@syncfusion/ej2-inputs/styles/material.css'; | ||
@import '../node_modules/@syncfusion/ej2-popups/styles/material.css'; | ||
@import '../node_modules/@syncfusion/ej2-lists/styles/material.css'; | ||
@import '../node_modules/@syncfusion/ej2-angular-dropdowns/styles/material.css'; | ||
|
||
.wrapper { | ||
width: 250px; | ||
margin: 50px auto; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */ | ||
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "./out-tsc/app", | ||
"types": [] | ||
}, | ||
"files": [ | ||
"src/main.ts" | ||
], | ||
"include": [ | ||
"src/**/*.d.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */ | ||
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */ | ||
{ | ||
"compileOnSave": false, | ||
"compilerOptions": { | ||
"outDir": "./dist/out-tsc", | ||
"strict": true, | ||
"noImplicitOverride": true, | ||
"noPropertyAccessFromIndexSignature": true, | ||
"noImplicitReturns": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"skipLibCheck": true, | ||
"isolatedModules": true, | ||
"esModuleInterop": true, | ||
"sourceMap": true, | ||
"declaration": false, | ||
"experimentalDecorators": true, | ||
"moduleResolution": "bundler", | ||
"importHelpers": true, | ||
"target": "ES2022", | ||
"module": "ES2022", | ||
"lib": [ | ||
"ES2022", | ||
"dom" | ||
] | ||
}, | ||
"angularCompilerOptions": { | ||
"enableI18nLegacyMessageIdFormat": false, | ||
"strictInjectionParameters": true, | ||
"strictInputAccessModifiers": true, | ||
"strictTemplates": true | ||
} | ||
} |
Oops, something went wrong.