diff --git a/tests/donut-ava2/.codesandbox/Dockerfile b/tests/donut-ava2/.codesandbox/Dockerfile new file mode 100644 index 000000000..adf04bd95 --- /dev/null +++ b/tests/donut-ava2/.codesandbox/Dockerfile @@ -0,0 +1 @@ +FROM node:18 \ No newline at end of file diff --git a/tests/donut-ava2/.codesandbox/tasks.json b/tests/donut-ava2/.codesandbox/tasks.json new file mode 100644 index 000000000..8d92a54cd --- /dev/null +++ b/tests/donut-ava2/.codesandbox/tasks.json @@ -0,0 +1,17 @@ +{ + // These tasks will run in order when initializing your CodeSandbox project. + "setupTasks": [ + { + "name": "Install Dependencies", + "command": "yarn install" + } + ], + // These tasks can be run from CodeSandbox. Running one will open a log in the app. + "tasks": { + "node node_modules/@angular/cli/bin/ng serve -o --disable-host-check": { + "name": "Start Project", + "command": "node node_modules/@angular/cli/bin/ng serve -o --disable-host-check", + "runAtStart": true + } + } +} \ No newline at end of file diff --git a/tests/donut-ava2/.stackblitzrc b/tests/donut-ava2/.stackblitzrc new file mode 100644 index 000000000..dd44ea00f --- /dev/null +++ b/tests/donut-ava2/.stackblitzrc @@ -0,0 +1 @@ +{"installDependencies":true, "startCommand":"npm start"} \ No newline at end of file diff --git a/tests/donut-ava2/angular.json b/tests/donut-ava2/angular.json new file mode 100644 index 000000000..f2ace893e --- /dev/null +++ b/tests/donut-ava2/angular.json @@ -0,0 +1,110 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "example-app": { + "projectType": "application", + "schematics": { + "@schematics/angular:component": { + "style": "scss" + }, + "@schematics/angular:application": { + "strict": true + } + }, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist/example-app", + "index": "src/index.html", + "main": "src/main.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "tsconfig.app.json", + "inlineStyleLanguage": "scss", + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.scss"], + "stylePreprocessorOptions": { + "includePaths": ["node_modules/"] + }, + "scripts": [] + }, + "configurations": { + "production": { + "budgets": [ + { + "type": "initial", + "maximumWarning": "500kb", + "maximumError": "1mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "2kb", + "maximumError": "4kb" + } + ], + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ], + "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": "example-app:build:production" + }, + "development": { + "browserTarget": "example-app:build:development" + } + }, + "defaultConfiguration": "development" + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "browserTarget": "example-app:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "main": "src/test.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "tsconfig.spec.json", + "karmaConfig": "karma.conf.js", + "inlineStyleLanguage": "scss", + "assets": ["src/favicon.ico", "src/assets"], + "stylePreprocessorOptions": { + "includePaths": ["node_modules/"] + }, + "styles": ["src/styles.scss", "src/theme.scss"], + "scripts": [] + } + } + } + } + }, + "defaultProject": "example-app", + "cli": { + "analytics": false + } +} diff --git a/tests/donut-ava2/package.json b/tests/donut-ava2/package.json new file mode 100644 index 000000000..a5a6da9ed --- /dev/null +++ b/tests/donut-ava2/package.json @@ -0,0 +1,30 @@ +{ + "dependencies": { + "@angular/animations": "^17.2.1", + "@angular/common": "^17.2.1", + "@angular/compiler": "^17.2.1", + "@angular/core": "^17.2.1", + "@angular/forms": "^17.2.1", + "@angular/platform-browser": "^17.2.1", + "@angular/platform-browser-dynamic": "^17.2.1", + "@angular/router": "^17.2.1", + "@types/hammerjs": "^2.0.39", + "hammerjs": "^2.0.8", + "igniteui-angular": "17.2.0", + "igniteui-angular-charts": "17.3.1-alpha.0", + "igniteui-angular-core": "17.3.1-alpha.0", + "rxjs": "^7.8.1", + "tslib": "^2.6.1", + "zone.js": "~0.14.4" + }, + "devDependencies": { + "@angular-devkit/build-angular": "17.2.0", + "@angular/cli": "17.2.0", + "@angular/compiler-cli": "17.2.1", + "@angular/language-service": "17.2.1", + "@types/node": "18.17.0", + "jasmine-core": "5.1.1", + "ts-node": "10.9.1", + "typescript": "5.3.3" + } +} \ No newline at end of file diff --git a/tests/donut-ava2/src/EnergyGlobalDemand.ts b/tests/donut-ava2/src/EnergyGlobalDemand.ts new file mode 100644 index 000000000..922fcf7a9 --- /dev/null +++ b/tests/donut-ava2/src/EnergyGlobalDemand.ts @@ -0,0 +1,51 @@ +export class EnergyGlobalDemandItem { + public constructor(init: Partial) { + Object.assign(this, init); + } + + public value: number; + public category: string; + public summary: string; + +} +export class EnergyGlobalDemand extends Array { + public constructor(items: Array | number = -1) { + if (Array.isArray(items)) { + super(...items); + } else { + const newItems = [ + new EnergyGlobalDemandItem( + { + value: 37, + category: `Cooling`, + summary: `Cooling 37%` + }), + new EnergyGlobalDemandItem( + { + value: 25, + category: `Residential`, + summary: `Residential 25%` + }), + new EnergyGlobalDemandItem( + { + value: 12, + category: `Heating`, + summary: `Heating 12%` + }), + new EnergyGlobalDemandItem( + { + value: 11, + category: `Lighting`, + summary: `Lighting 11%` + }), + new EnergyGlobalDemandItem( + { + value: 15, + category: `Other`, + summary: `Other 15%` + }), + ]; + super(...(newItems.slice(0, items))); + } + } +} diff --git a/tests/donut-ava2/src/_app-layout.scss b/tests/donut-ava2/src/_app-layout.scss new file mode 100644 index 000000000..b5329f55b --- /dev/null +++ b/tests/donut-ava2/src/_app-layout.scss @@ -0,0 +1,84 @@ +.sample-wrapper { + width: inherit; + position: relative; + height: 100%; + margin: 0 auto; + background: transparent; +} + +.sample-content { + display: flex; + flex-grow: 1; + flex-flow: row wrap; + justify-content: flex-start; + padding: 0; + -webkit-animation: fade-in .3s cubic-bezier(0.390, 0.575, 0.565, 1.000) both; + -moz-animation: fade-in .3s cubic-bezier(0.390, 0.575, 0.565, 1.000) both; + animation: fade-in .3s cubic-bezier(0.390, 0.575, 0.565, 1.000) both; +} + +.sample-column { + display: flex; + flex-flow: column nowrap; + flex: 1 0 25%; + align-content: flex-start; + margin: 16px; + min-width: 280px; +} + +.sample-title { + color: #0375be; + margin-bottom: 12px; + margin-top: 12px; +} + +.sample-title .light { + font-weight: 400; +} + +.sample-description { + font-size: 14px; + font-weight: normal; + color: #717171; +} + +@-webkit-keyframes color-change-2x { + 0% { + background: #fdf8f0; + } + 100% { + background: #f6e7ec; + } +} + +@keyframes color-change-2x { + 0% { + background: #fdf8f0; + } + 100% { + background: #f6e7ec; + } +} + +@-webkit-keyframes fade-in { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +@keyframes fade-in { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +.headerAlignSyle { + text-align: right !important; +} + diff --git a/tests/donut-ava2/src/_variables.scss b/tests/donut-ava2/src/_variables.scss new file mode 100644 index 000000000..cf9f1048b --- /dev/null +++ b/tests/donut-ava2/src/_variables.scss @@ -0,0 +1,19 @@ +@use 'igniteui-angular/theming' as *; +@forward 'igniteui-angular/theming'; + +$palette: $light-material-palette; +$schema: $light-material-schema; + +$default-palette: $palette; + +$green-palette: palette( + $primary: #09f, + $secondary: #72da67, + $surface: #333, + $info: #1377d5, + $success: #4eb862, + $warn: #fbb13c, + $error: #ff134a, +); + +$gray-btn-color: color($green-palette, 'gray', 800); diff --git a/tests/donut-ava2/src/app.component.html b/tests/donut-ava2/src/app.component.html new file mode 100644 index 000000000..3c78e15c6 --- /dev/null +++ b/tests/donut-ava2/src/app.component.html @@ -0,0 +1,33 @@ +
+
+ Global Electricity Demand by Energy Use +
+
+ + +
+
+ + + + +
+
diff --git a/tests/donut-ava2/src/app.component.scss b/tests/donut-ava2/src/app.component.scss new file mode 100644 index 000000000..cbff781da --- /dev/null +++ b/tests/donut-ava2/src/app.component.scss @@ -0,0 +1,3 @@ +/* styles are loaded the Shared CSS file located at: +https://static.infragistics.com/xplatform/css/samples/ +*/ diff --git a/tests/donut-ava2/src/app.component.ts b/tests/donut-ava2/src/app.component.ts new file mode 100644 index 000000000..d7720aa4b --- /dev/null +++ b/tests/donut-ava2/src/app.component.ts @@ -0,0 +1,39 @@ +import { AfterViewInit, Component, ViewChild, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core'; +import { EnergyGlobalDemandItem, EnergyGlobalDemand } from './EnergyGlobalDemand'; +import { IgxItemLegendComponent, IgxDoughnutChartComponent, IgxRingSeriesComponent } from 'igniteui-angular-charts'; + +@Component({ + selector: "app-root", + styleUrls: ["./app.component.scss"], + templateUrl: "./app.component.html", + changeDetection: ChangeDetectionStrategy.OnPush +}) + +export class AppComponent implements AfterViewInit +{ + + @ViewChild("legend", { static: true } ) + private legend: IgxItemLegendComponent + @ViewChild("chart", { static: true } ) + private chart: IgxDoughnutChartComponent + @ViewChild("series", { static: true } ) + private series: IgxRingSeriesComponent + private _energyGlobalDemand: EnergyGlobalDemand = null; + public get energyGlobalDemand(): EnergyGlobalDemand { + if (this._energyGlobalDemand == null) + { + this._energyGlobalDemand = new EnergyGlobalDemand(); + } + return this._energyGlobalDemand; + } + + public constructor(private _detector: ChangeDetectorRef) + { + } + + public ngAfterViewInit(): void + { + } + +} + diff --git a/tests/donut-ava2/src/app.module.ts b/tests/donut-ava2/src/app.module.ts new file mode 100644 index 000000000..7d4332c43 --- /dev/null +++ b/tests/donut-ava2/src/app.module.ts @@ -0,0 +1,26 @@ +import { NgModule } from "@angular/core"; +import { FormsModule } from "@angular/forms"; +import { CommonModule } from "@angular/common"; +import { BrowserModule } from "@angular/platform-browser"; +import { BrowserAnimationsModule } from "@angular/platform-browser/animations"; +import { AppComponent } from "./app.component"; + +import { IgxItemLegendModule, IgxDoughnutChartModule } from 'igniteui-angular-charts'; + +@NgModule({ + bootstrap: [AppComponent], + declarations: [ + AppComponent +], + imports: [ + BrowserModule, + BrowserAnimationsModule, + CommonModule, + FormsModule, + IgxItemLegendModule, + IgxDoughnutChartModule +], + providers: [], + schemas: [] +}) +export class AppModule {} diff --git a/tests/donut-ava2/src/environments/environment.prod.ts b/tests/donut-ava2/src/environments/environment.prod.ts new file mode 100644 index 000000000..c9669790b --- /dev/null +++ b/tests/donut-ava2/src/environments/environment.prod.ts @@ -0,0 +1,3 @@ +export const environment = { + production: true, +}; diff --git a/tests/donut-ava2/src/environments/environment.ts b/tests/donut-ava2/src/environments/environment.ts new file mode 100644 index 000000000..66998ae9a --- /dev/null +++ b/tests/donut-ava2/src/environments/environment.ts @@ -0,0 +1,16 @@ +// This file can be replaced during build by using the `fileReplacements` array. +// `ng build` replaces `environment.ts` with `environment.prod.ts`. +// The list of file replacements can be found in `angular.json`. + +export const environment = { + production: false, +}; + +/* + * For easier debugging in development mode, you can import the following file + * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. + * + * This import should be commented out in production mode because it will have a negative impact + * on performance if an error is thrown. + */ +// import 'zone.js/plugins/zone-error'; // Included with Angular CLI. diff --git a/tests/donut-ava2/src/index.html b/tests/donut-ava2/src/index.html new file mode 100644 index 000000000..6b7e74a5c --- /dev/null +++ b/tests/donut-ava2/src/index.html @@ -0,0 +1,23 @@ + + + + + + Angular Demos + + + + + + + + + + + + + + + + + diff --git a/tests/donut-ava2/src/main.ts b/tests/donut-ava2/src/main.ts new file mode 100644 index 000000000..4854dcd20 --- /dev/null +++ b/tests/donut-ava2/src/main.ts @@ -0,0 +1,15 @@ +// tslint:disable:no-string-literal +import "./polyfills"; +import { enableProdMode } from '@angular/core'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; +import { AppModule } from './app.module'; + +platformBrowserDynamic().bootstrapModule(AppModule).then(ref => { + // Ensure Angular destroys itself on hot reloads. + if (window['ngRef']) { + window['ngRef'].destroy(); + } + window['ngRef'] = ref; + + // Otherwise, log the boot error +}).catch(err => console.error(err)); diff --git a/tests/donut-ava2/src/polyfills.ts b/tests/donut-ava2/src/polyfills.ts new file mode 100644 index 000000000..665b7dacb --- /dev/null +++ b/tests/donut-ava2/src/polyfills.ts @@ -0,0 +1,58 @@ +/** + * This file includes polyfills needed by Angular and is loaded before the app. + * You can add your own extra polyfills to this file. + * + * This file is divided into 2 sections: + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main + * file. + * + * The current setup is for so-called 'evergreen' browsers; the last versions of browsers that + * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), + * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. + * + * Learn more in https://angular.io/guide/browser-support + */ + +/*************************************************************************************************** +* BROWSER POLYFILLS +*/ + +//import 'core-js/es7/object'; + +//import 'core-js/es7/array'; // for Array.includes() // Run `npm install --save classlist.js`. + +/** IE10 and IE11 requires the following for the Reflect API. */ +//import 'core-js/es6/reflect'; + +/* Evergreen browsers require these. */ +// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. +//import 'core-js/es7/reflect'; // Run `npm install --save web-animations-js`. + +/*************************************************************************************************** + * Zone JS is required by Angular itself. + */ +import 'hammerjs/hammer'; +import 'zone.js'; // Included with Angular CLI. + +/*************************************************************************************************** + * @angular/animations polyfill + */ +// if (!Element.prototype.matches) { +// Element.prototype.matches = (Element.prototype as any).msMatchesSelector; +// } + +/*************************************************************************************************** + * APPLICATION IMPORTS + */ + +/** + * Date, currency, decimal and percent pipes. + * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10 + */ +// import 'intl'; // Run `npm install --save intl`. +// import 'intl/locale-data/jsonp/de'; +/** + * Need to import at least one locale-data with intl. + */ +// import 'intl/locale-data/jsonp/en'; diff --git a/tests/donut-ava2/src/styles.scss b/tests/donut-ava2/src/styles.scss new file mode 100644 index 000000000..5861d836a --- /dev/null +++ b/tests/donut-ava2/src/styles.scss @@ -0,0 +1,58 @@ +/* autoprefixer grid: on */ +html, +body { + height: 100%; + width: 100%; + overflow: hidden; + margin: 0; + box-sizing: border-box; +} + + +// @use 'igniteui-angular/theming' as *; +// @use 'variables' as *; +// @use 'app-layout'; + +// /* autoprefixer grid: on */ +// html, +// body { +// height: 100%; +// overflow: hidden; +// margin: 0; +// } + +// @include core(); +// @include typography(); +// @include theme( +// $palette: $palette, +// $schema: $schema +// ); + +// :root { +// @include palette($palette); +// } + +// .light-theme { +// @include light-theme($palette); +// } + +// .dark-theme { +// background: #333; +// color: #fff; +// @include dark-theme( +// $palette: $green-palette +// ); + +// .grid-chart-contextmenu-wrapper { +// @include fluent-dark-theme($fluent-excel-palette); +// } +// } + +// .fin-dark-theme { +// @include dark-theme($green-palette); +// background: #333; + +// ::-moz-placeholder { +// opacity: 1; +// } +// } diff --git a/tests/donut-ava2/tsconfig.app.json b/tests/donut-ava2/tsconfig.app.json new file mode 100644 index 000000000..ff396d4ce --- /dev/null +++ b/tests/donut-ava2/tsconfig.app.json @@ -0,0 +1,10 @@ +/* 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", "src/polyfills.ts"], + "include": ["src/**/*.d.ts"] +} diff --git a/tests/donut-ava2/tsconfig.json b/tests/donut-ava2/tsconfig.json new file mode 100644 index 000000000..3e90bf364 --- /dev/null +++ b/tests/donut-ava2/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "./", + "outDir": "./dist/out-tsc", + "sourceMap": true, + "declaration": false, + "downlevelIteration": true, + "experimentalDecorators": true, + "module": "esnext", + "moduleResolution": "node", + "importHelpers": true, + "target": "es2015", + "typeRoots": [ + "node_modules/@types" + ], + "lib": [ + "es2018", + "dom" + ] + }, + "angularCompilerOptions": { + "enableIvy": true + } +} \ No newline at end of file