Skip to content

Commit 364788d

Browse files
committed
2 parents a0603f0 + 8761ebb commit 364788d

21 files changed

+929
-0
lines changed

accordion/overview/angular.json

+122
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"demo": {
7+
"root": "",
8+
"sourceRoot": "src",
9+
"projectType": "application",
10+
"prefix": "app",
11+
"schematics": {},
12+
"architect": {
13+
"build": {
14+
"builder": "@angular-devkit/build-angular:browser",
15+
"options": {
16+
"outputPath": "dist/demo",
17+
"index": "src/index.html",
18+
"main": "src/main.ts",
19+
"polyfills": "src/polyfills.ts",
20+
"tsConfig": "src/tsconfig.app.json",
21+
"assets": [
22+
"src/assets"
23+
],
24+
"styles": [
25+
"./node_modules/smart-webcomponents-angular/source/styles/smart.default.css"
26+
],
27+
"scripts": []
28+
},
29+
"configurations": {
30+
"production": {
31+
"fileReplacements": [
32+
{
33+
"replace": "src/environments/environment.ts",
34+
"with": "src/environments/environment.prod.ts"
35+
}
36+
],
37+
"optimization": true,
38+
"outputHashing": "all",
39+
"sourceMap": false,
40+
"extractCss": true,
41+
"namedChunks": false,
42+
"aot": true,
43+
"extractLicenses": true,
44+
"vendorChunk": false,
45+
"buildOptimizer": true
46+
}
47+
}
48+
},
49+
"serve": {
50+
"builder": "@angular-devkit/build-angular:dev-server",
51+
"options": {
52+
"browserTarget": "demo:build"
53+
},
54+
"configurations": {
55+
"production": {
56+
"browserTarget": "demo:build:production"
57+
}
58+
}
59+
},
60+
"extract-i18n": {
61+
"builder": "@angular-devkit/build-angular:extract-i18n",
62+
"options": {
63+
"browserTarget": "demo:build"
64+
}
65+
},
66+
"test": {
67+
"builder": "@angular-devkit/build-angular:karma",
68+
"options": {
69+
"main": "src/test.ts",
70+
"polyfills": "src/polyfills.ts",
71+
"tsConfig": "src/tsconfig.spec.json",
72+
"karmaConfig": "src/karma.conf.js",
73+
"styles": [
74+
"styles.css"
75+
],
76+
"scripts": [],
77+
"assets": [
78+
"src/favicon.ico",
79+
"src/assets"
80+
]
81+
}
82+
},
83+
"lint": {
84+
"builder": "@angular-devkit/build-angular:tslint",
85+
"options": {
86+
"tsConfig": [
87+
"src/tsconfig.app.json",
88+
"src/tsconfig.spec.json"
89+
],
90+
"exclude": [
91+
"**/node_modules/**"
92+
]
93+
}
94+
}
95+
}
96+
},
97+
"demo-e2e": {
98+
"root": "e2e/",
99+
"projectType": "application",
100+
"architect": {
101+
"e2e": {
102+
"builder": "@angular-devkit/build-angular:protractor",
103+
"options": {
104+
"protractorConfig": "e2e/protractor.conf.js",
105+
"devServerTarget": "demo:serve"
106+
}
107+
},
108+
"lint": {
109+
"builder": "@angular-devkit/build-angular:tslint",
110+
"options": {
111+
"tsConfig": "e2e/tsconfig.e2e.json",
112+
"exclude": [
113+
"**/node_modules/**"
114+
]
115+
}
116+
}
117+
}
118+
}
119+
},
120+
"defaultProject": "demo"
121+
}
122+

accordion/overview/package.json

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"name": "angular-template",
3+
"description": "",
4+
"homepage": "https://stackblitz.com/edit/e8czwv.run",
5+
"dependencies": {
6+
"@angular/animations": "^7.0.0",
7+
"@angular/common": "7.0.0",
8+
"@angular/compiler": "7.0.0",
9+
"@angular/core": "7.0.0",
10+
"@angular/forms": "7.0.0",
11+
"@angular/http": "^7.0.0",
12+
"@angular/platform-browser": "7.0.0",
13+
"@angular/platform-browser-dynamic": "7.0.0",
14+
"@angular/router": "7.0.0",
15+
"core-js": "2.5.7",
16+
"rxjs": "6.3.3",
17+
"zone.js": "0.8.26",
18+
"moment": "2.22.2",
19+
"smart-webcomponents-angular": "7.1.12"
20+
},
21+
"version": "0.0.0",
22+
"license": "MIT",
23+
"scripts": {
24+
"ng": "ng",
25+
"start": "ng serve",
26+
"build": "ng build",
27+
"test": "ng test",
28+
"lint": "ng lint",
29+
"e2e": "ng e2e"
30+
},
31+
"private": true,
32+
"devDependencies": {
33+
"@angular/cli": "7.0.2",
34+
"@angular/compiler-cli": "^7.0.0",
35+
"@angular/language-service": "^7.0.0",
36+
"@types/jasmine": "~2.8.9",
37+
"@types/jasminewd2": "~2.0.5",
38+
"@types/node": "~10.12.0",
39+
"codelyzer": "~4.5.0",
40+
"jasmine-core": "~3.2.1",
41+
"jasmine-spec-reporter": "~4.2.1",
42+
"karma": "~3.1.0",
43+
"karma-chrome-launcher": "~2.2.0",
44+
"karma-cli": "~1.0.1",
45+
"karma-coverage-istanbul-reporter": "^2.0.4",
46+
"karma-jasmine": "~1.1.2",
47+
"karma-jasmine-html-reporter": "^1.3.1",
48+
"protractor": "~5.4.1",
49+
"ts-node": "~7.0.1",
50+
"tslint": "~5.11.0",
51+
"typescript": "~3.1.3"
52+
}
53+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/* Add application styles & imports to this file! */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<smart-accordion #accordion>
2+
<smart-accordion-item [label]="'First Item'">First Item Content.</smart-accordion-item>
3+
<smart-accordion-item [label]="'Second Item'">Second Item Content.</smart-accordion-item>
4+
<smart-accordion-item [label]="'Third Item'">Third Item Content.</smart-accordion-item>
5+
<smart-accordion-item [label]="'Fourth Item'">Fourth Item Content.</smart-accordion-item>
6+
</smart-accordion>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Component, ViewChild } from '@angular/core';
2+
import { AccordionComponent, AccordionItemComponent, AccordionExpandMode } from 'smart-webcomponents-angular/accordion';
3+
4+
@Component({
5+
selector: 'app-root',
6+
templateUrl: './app.component.html'
7+
})
8+
9+
export class AppComponent {
10+
@ViewChild('accordion', { read: AccordionComponent, static: false }) accordion: AccordionComponent;
11+
12+
ngOnInit(): void {
13+
14+
}
15+
ngAfterViewInit(): void {
16+
this.accordion.expandMode = "multiple";
17+
this.accordion.expand(1);
18+
}
19+
}
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { NgModule } from '@angular/core';
2+
import { BrowserModule } from '@angular/platform-browser';
3+
4+
import { AccordionModule } from 'smart-webcomponents-angular/accordion';
5+
6+
import { AppComponent } from './app.component';
7+
8+
@NgModule({
9+
declarations: [ AppComponent ],
10+
imports: [ BrowserModule, AccordionModule ],
11+
bootstrap: [ AppComponent ],
12+
entryComponents: [ AppComponent ]
13+
})
14+
15+
export class AppModule { }

accordion/overview/src/app/main.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2+
import { enableProdMode } from '@angular/core';
3+
import { AppModule } from './app.module';
4+
5+
enableProdMode();
6+
platformBrowserDynamic().bootstrapModule(AppModule);

accordion/overview/src/index.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>AngularTemplate</title>
6+
<base href="/">
7+
<link rel="stylesheet" href="https://www.htmlelements.com/demos/source/styles/smart.default.css"/>
8+
<meta name="viewport" content="width=device-width, initial-scale=1">
9+
<title>Smart Accordion Angular Overview Demo</title>
10+
</head>
11+
<body>
12+
<app-root>Loading...</app-root>
13+
</body>
14+
</html>

accordion/overview/src/main.ts

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import './polyfills';
2+
3+
import { enableProdMode } from '@angular/core';
4+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
5+
6+
import { AppModule } from './app/app.module';
7+
8+
platformBrowserDynamic().bootstrapModule(AppModule).then(ref => {
9+
// Ensure Angular destroys itself on hot reloads.
10+
if (window['ngRef']) {
11+
window['ngRef'].destroy();
12+
}
13+
window['ngRef'] = ref;
14+
15+
// Otherwise, log the boot error
16+
}).catch(err => console.error(err));

accordion/overview/src/polyfills.ts

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/**
2+
* This file includes polyfills needed by Angular and is loaded before the app.
3+
* You can add your own extra polyfills to this file.
4+
*
5+
* This file is divided into 2 sections:
6+
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
7+
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
8+
* file.
9+
*
10+
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11+
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
12+
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
13+
*
14+
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
15+
*/
16+
17+
/***************************************************************************************************
18+
* BROWSER POLYFILLS
19+
*/
20+
21+
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
22+
// import 'core-js/es6/symbol';
23+
// import 'core-js/es6/object';
24+
// import 'core-js/es6/function';
25+
// import 'core-js/es6/parse-int';
26+
// import 'core-js/es6/parse-float';
27+
// import 'core-js/es6/number';
28+
// import 'core-js/es6/math';
29+
// import 'core-js/es6/string';
30+
// import 'core-js/es6/date';
31+
// import 'core-js/es6/array';
32+
// import 'core-js/es6/regexp';
33+
// import 'core-js/es6/map';
34+
// import 'core-js/es6/weak-map';
35+
// import 'core-js/es6/set';
36+
37+
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
38+
// import 'classlist.js'; // Run `npm install --save classlist.js`.
39+
40+
/** Evergreen browsers require these. **/
41+
import 'core-js/es6/reflect';
42+
import 'core-js/es7/reflect';
43+
44+
45+
/**
46+
* Required to support Web Animations `@angular/animation`.
47+
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
48+
**/
49+
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
50+
51+
52+
53+
/***************************************************************************************************
54+
* Zone JS is required by Angular itself.
55+
*/
56+
import 'zone.js/dist/zone'; // Included with Angular CLI.
57+
58+
59+
60+
/***************************************************************************************************
61+
* APPLICATION IMPORTS
62+
*/
63+
64+
/**
65+
* Date, currency, decimal and percent pipes.
66+
* Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
67+
*/
68+
// import 'intl'; // Run `npm install --save intl`.
69+
/**
70+
* Need to import at least one locale-data with intl.
71+
*/
72+
// import 'intl/locale-data/jsonp/en';

0 commit comments

Comments
 (0)