Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarkov committed Sep 15, 2020
2 parents a0603f0 + 8761ebb commit 364788d
Show file tree
Hide file tree
Showing 21 changed files with 929 additions and 0 deletions.
122 changes: 122 additions & 0 deletions accordion/overview/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"demo": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/demo",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/assets"
],
"styles": [
"./node_modules/smart-webcomponents-angular/source/styles/smart.default.css"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "demo:build"
},
"configurations": {
"production": {
"browserTarget": "demo:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "demo:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"styles.css"
],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"demo-e2e": {
"root": "e2e/",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "demo:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "demo"
}

53 changes: 53 additions & 0 deletions accordion/overview/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"name": "angular-template",
"description": "",
"homepage": "https://stackblitz.com/edit/e8czwv.run",
"dependencies": {
"@angular/animations": "^7.0.0",
"@angular/common": "7.0.0",
"@angular/compiler": "7.0.0",
"@angular/core": "7.0.0",
"@angular/forms": "7.0.0",
"@angular/http": "^7.0.0",
"@angular/platform-browser": "7.0.0",
"@angular/platform-browser-dynamic": "7.0.0",
"@angular/router": "7.0.0",
"core-js": "2.5.7",
"rxjs": "6.3.3",
"zone.js": "0.8.26",
"moment": "2.22.2",
"smart-webcomponents-angular": "7.1.12"
},
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"devDependencies": {
"@angular/cli": "7.0.2",
"@angular/compiler-cli": "^7.0.0",
"@angular/language-service": "^7.0.0",
"@types/jasmine": "~2.8.9",
"@types/jasminewd2": "~2.0.5",
"@types/node": "~10.12.0",
"codelyzer": "~4.5.0",
"jasmine-core": "~3.2.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^2.0.4",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^1.3.1",
"protractor": "~5.4.1",
"ts-node": "~7.0.1",
"tslint": "~5.11.0",
"typescript": "~3.1.3"
}
}
1 change: 1 addition & 0 deletions accordion/overview/src/app/app.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* Add application styles & imports to this file! */
6 changes: 6 additions & 0 deletions accordion/overview/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<smart-accordion #accordion>
<smart-accordion-item [label]="'First Item'">First Item Content.</smart-accordion-item>
<smart-accordion-item [label]="'Second Item'">Second Item Content.</smart-accordion-item>
<smart-accordion-item [label]="'Third Item'">Third Item Content.</smart-accordion-item>
<smart-accordion-item [label]="'Fourth Item'">Fourth Item Content.</smart-accordion-item>
</smart-accordion>
19 changes: 19 additions & 0 deletions accordion/overview/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Component, ViewChild } from '@angular/core';
import { AccordionComponent, AccordionItemComponent, AccordionExpandMode } from 'smart-webcomponents-angular/accordion';

@Component({
selector: 'app-root',
templateUrl: './app.component.html'
})

export class AppComponent {
@ViewChild('accordion', { read: AccordionComponent, static: false }) accordion: AccordionComponent;

ngOnInit(): void {

}
ngAfterViewInit(): void {
this.accordion.expandMode = "multiple";
this.accordion.expand(1);
}
}
15 changes: 15 additions & 0 deletions accordion/overview/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AccordionModule } from 'smart-webcomponents-angular/accordion';

import { AppComponent } from './app.component';

@NgModule({
declarations: [ AppComponent ],
imports: [ BrowserModule, AccordionModule ],
bootstrap: [ AppComponent ],
entryComponents: [ AppComponent ]
})

export class AppModule { }
6 changes: 6 additions & 0 deletions accordion/overview/src/app/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { AppModule } from './app.module';

enableProdMode();
platformBrowserDynamic().bootstrapModule(AppModule);
14 changes: 14 additions & 0 deletions accordion/overview/src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>AngularTemplate</title>
<base href="/">
<link rel="stylesheet" href="https://www.htmlelements.com/demos/source/styles/smart.default.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Smart Accordion Angular Overview Demo</title>
</head>
<body>
<app-root>Loading...</app-root>
</body>
</html>
16 changes: 16 additions & 0 deletions accordion/overview/src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import './polyfills';

import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app/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));
72 changes: 72 additions & 0 deletions accordion/overview/src/polyfills.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/**
* 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/docs/ts/latest/guide/browser-support.html
*/

/***************************************************************************************************
* BROWSER POLYFILLS
*/

/** IE9, IE10 and IE11 requires all of the following polyfills. **/
// import 'core-js/es6/symbol';
// import 'core-js/es6/object';
// import 'core-js/es6/function';
// import 'core-js/es6/parse-int';
// import 'core-js/es6/parse-float';
// import 'core-js/es6/number';
// import 'core-js/es6/math';
// import 'core-js/es6/string';
// import 'core-js/es6/date';
// import 'core-js/es6/array';
// import 'core-js/es6/regexp';
// import 'core-js/es6/map';
// import 'core-js/es6/weak-map';
// import 'core-js/es6/set';

/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.

/** Evergreen browsers require these. **/
import 'core-js/es6/reflect';
import 'core-js/es7/reflect';


/**
* Required to support Web Animations `@angular/animation`.
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
**/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.



/***************************************************************************************************
* Zone JS is required by Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.



/***************************************************************************************************
* 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`.
/**
* Need to import at least one locale-data with intl.
*/
// import 'intl/locale-data/jsonp/en';
Loading

0 comments on commit 364788d

Please sign in to comment.