Skip to content

Commit b8458d0

Browse files
Ed MoralesEd Morales
Ed Morales
authored and
Ed Morales
committed
Merge branch 'release/v0.6.0'
2 parents 162059e + 92f1944 commit b8458d0

File tree

92 files changed

+2624
-240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+2624
-240
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![Build Status](https://travis-ci.org/Teradata/covalent.svg?branch=develop)](https://travis-ci.org/Teradata/covalent)
44
[![npm version](https://badge.fury.io/js/%40covalent%2Fcore.svg)](https://badge.fury.io/js/%40covalent%2Fcore)
55
[![Join the chat at https://gitter.im/Teradata/covalent](https://badges.gitter.im/Teradata/covalent.svg)](https://gitter.im/Teradata/covalent?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
6+
[![Dependency Status](https://dependencyci.com/github/Teradata/covalent/badge)](https://dependencyci.com/github/Teradata/covalent)
67

78
<img alt="Covalent" src="https://cdn.rawgit.com/Teradata/covalent/develop/src/app/assets/icons/covalent.svg" width="150">
89

@@ -14,7 +15,7 @@ Covalent is a reusable UI platform from Teradata for building web applications w
1415

1516
* Ensure you have Node 4.4 and NPM 3+ installed.
1617
* Install Angular CLI `npm i -g [email protected]`
17-
* Install TSLint and Typescript `npm install -g tslint typescript`
18+
* Install TSLint and Typescript `npm install -g tslint typescript typings`
1819
* Install Protractor for e2e testing `npm install -g protractor`
1920
* Install Node packages `npm i`
2021
* Update Webdriver `webdriver-manager update` and `./node_modules/.bin/webdriver-manager update`
@@ -25,3 +26,4 @@ Covalent is a reusable UI platform from Teradata for building web applications w
2526
* [Contributing Guidelines](docs/CONTRIBUTING.md)
2627
* [Developer Guide](docs/DEVELOPER_GUIDE.md)
2728
* [Releasing](docs/RELEASE.md)
29+
* [Changelog](docs/CHANGELOG.md)

build.conf.js

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ module.exports = {
2626
'src/**/MaterialIcons-Regular.ttf',
2727
'src/**/MaterialIcons-Regular.woff',
2828
'src/**/MaterialIcons-Regular.woff2',
29+
'src/**/**.scss',
30+
'!src/app/**/**.scss',
2931
'src/**/**.html',
3032
'src/**/**.md',
3133
'src/**/**.js',

config/karma-test-shim.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,16 @@ System.import('system-config.js').then(function() {
3838
System.import('@angular/router'),
3939
System.import('@angular/http'),
4040
System.import('@angular/forms'),
41-
System.import('@angular2-material/icon')
41+
System.import('@angular/core'),
42+
System.import('@angular2-material/icon'),
4243
]).then(function (providers) {
4344
var testing = providers[0];
4445
var testingBrowser = providers[1];
4546
var testingRouter = providers[2];
4647
var testingHttp = providers[3];
4748
var testingForms = providers[4];
48-
var testingIcon = providers[5];
49+
var testingCore = providers[5];
50+
var testingIcon = providers[6];
4951
testing.setBaseTestProviders(testingBrowser.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
5052
testingBrowser.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS
5153
);
@@ -59,6 +61,7 @@ System.import('system-config.js').then(function() {
5961
testingIcon.MdIconRegistry,
6062
{ provide: testingRouter.Router, useValue: {} },
6163
{ provide: testingRouter.ActivatedRoute, useValue: {} },
64+
testingCore.ChangeDetectorRef,
6265
]);
6366
});
6467
});

docs/CHANGELOG.md

+115
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
<a name="0.6.0"></a>
2+
# [0.6.0](https://github.com/Teradata/covalent/tree/v0.6.0) (2016-08-19)
3+
4+
5+
## Bug Fixes
6+
* **docs:** Updated to git clone to correct repo url ([d3f0522d6521d9944eb274fcff62582624fa88ec](https://github.com/Teradata/covalent/commit/d3f0522d6521d9944eb274fcff62582624fa88ec))
7+
* **loading:** Added a max diameter to TdLoadingComponent circle ([a013cd7a3d272f6836eea62fb26e69a8719469c1](https://github.com/Teradata/covalent/commit/a013cd7a3d272f6836eea62fb26e69a8719469c1))
8+
* **loading:** Added NgZone#runOutsideAngular() to attach/detach loading component since it affected e2e tests with protractor. ([a013cd7a3d272f6836eea62fb26e69a8719469c1](https://github.com/Teradata/covalent/commit/a013cd7a3d272f6836eea62fb26e69a8719469c1))
9+
* **loading:** Made loading component instantiation sync, so it can be called in [ngAfterContentInit] without problems when used as a directive. ([a013cd7a3d272f6836eea62fb26e69a8719469c1](https://github.com/Teradata/covalent/commit/a013cd7a3d272f6836eea62fb26e69a8719469c1))
10+
11+
## Code Refactoring
12+
13+
* **core:** Moved RESTService to **http** module ([2093930c45e7183280faea445fd5efd483fe3532](https://github.com/Teradata/covalent/commit/2093930c45e7183280faea445fd5efd483fe3532))
14+
* **loading:** Removed depricated TimerWrapper and ComponentResolver and added usage of ComponentFactoryResolver. ([a013cd7a3d272f6836eea62fb26e69a8719469c1](https://github.com/Teradata/covalent/commit/a013cd7a3d272f6836eea62fb26e69a8719469c1))
15+
* **layouts:** Changing `<list-items>` and `<menu-items>` to use `<md-nav-list list-items>` and `<md-nav-list menu-items>` to be more flexible in layouts. ([1df3f42ead63a946e0c1749e66b06ef584e2dc79](https://github.com/Teradata/covalent/commit/1df3f42ead63a946e0c1749e66b06ef584e2dc79))
16+
* **dependencies:** All modules depend now on @covalent/core.
17+
18+
## Features
19+
20+
* **docs:** Added active icon for menu-items in navigation list.
21+
* **pipes:** Added truncate pipe and docs ([b213c7d0cd48aa544ab27432031ff2b0558bc315](https://github.com/Teradata/covalent/commit/b213c7d0cd48aa544ab27432031ff2b0558bc315))
22+
* **http:** Introduced [http](https://github.com/Teradata/covalent/pull/25) module with abstract RESTService and HttpInterceptorService and docs ([2093930c45e7183280faea445fd5efd483fe3532](https://github.com/Teradata/covalent/commit/2093930c45e7183280faea445fd5efd483fe3532)), closes [#19](https://github.com/Teradata/covalent/issues/19)
23+
* **loading:** Added number of registers/resolves to TdLoadingService register/resolve methods ([a013cd7a3d272f6836eea62fb26e69a8719469c1](https://github.com/Teradata/covalent/commit/a013cd7a3d272f6836eea62fb26e69a8719469c1))
24+
* **docs:** Add scss theming info for covalent-quickstart ([e453a8055ff79b187f311255fe1662623564bb0d](https://github.com/Teradata/covalent/commit/e453a8055ff79b187f311255fe1662623564bb0d))
25+
* **deploy:** Ship scss files in npm release ([d1027c666d919966520bfb32ac8304c4506e504e](https://github.com/Teradata/covalent/commit/d1027c666d919966520bfb32ac8304c4506e504e)), closes [#28](https://github.com/Teradata/covalent/issues/28)
26+
* **steps:** Added toggle/open/close methods to TdStepComponent ([310fd388a8f3effca0aa0ccae534163bdc4ef733](https://github.com/Teradata/covalent/commit/310fd388a8f3effca0aa0ccae534163bdc4ef733))
27+
* **chips:** Introduced [chips](https://github.com/Teradata/covalent/pull/44) module with autocomplete and docs ([095748ee5d0baf614055e892c2c15c3d38084e17](https://github.com/Teradata/covalent/commit/095748ee5d0baf614055e892c2c15c3d38084e17))
28+
* **json-formatter:** Introduced [json-formatter](https://github.com/Teradata/covalent/pull/42) module and docs ([90fba53d8c7bad903dd6e05b280202a86650bd1a](https://github.com/Teradata/covalent/commit/90fba53d8c7bad903dd6e05b280202a86650bd1a))
29+
30+
31+
## Internal
32+
33+
* **badge:** Added dependency badge to README ([147c06965227a481591e09e3d21cb46a413d9990](https://github.com/Teradata/covalent/commit/147c06965227a481591e09e3d21cb46a413d9990))
34+
* **deploy:** Use hash urls for github pages ([92352314187a3592091ac7b6df4c2126e4d76d96](https://github.com/Teradata/covalent/commit/92352314187a3592091ac7b6df4c2126e4d76d96)), closes [#33](https://github.com/Teradata/covalent/issues/33)
35+
36+
37+
## Breaking Changes
38+
39+
* **loading:** There is a need to add `TD_LOADING_ENTRY_COMPONENTS` in the `precompile` array of your main component, so the `TdLoadingComponent` can be resolved by the `ComponentFactoryResolver`.
40+
41+
e.g.
42+
43+
```typescript
44+
import { TD_LOADING_ENTRY_COMPONENTS } from '@covalent/core';
45+
...
46+
precompile: [ TD_LOADING_ENTRY_COMPONENTS ],
47+
})
48+
export class YourMainComponent {}
49+
```
50+
51+
* **td-layout:** `<menu-items>` will need to change to `<md-nav-list menu-items>`
52+
53+
Before:
54+
55+
```html
56+
<td-layout>
57+
<menu-items>
58+
...
59+
</menu-items>
60+
</td-layout>
61+
```
62+
63+
After:
64+
65+
```html
66+
<td-layout>
67+
<md-nav-list menu-items>
68+
...
69+
</md-nav-list>
70+
</td-layout>
71+
```
72+
73+
* **td-layout-nav-list:** `<list-items>` will need to change to `<md-nav-list list-items>`
74+
75+
Before:
76+
77+
```html
78+
<td-layout-nav-list>
79+
<list-items>
80+
...
81+
</list-items>
82+
</td-layout-nav-list>
83+
```
84+
85+
After:
86+
87+
```html
88+
<td-layout-nav-list>
89+
<md-nav-list list-items>
90+
...
91+
</md-nav-list>
92+
</td-layout-nav-list>
93+
```
94+
95+
* **td-layout-manage-list:** `<list-items>` will need to change to `<md-nav-list list-items>`
96+
97+
Before:
98+
99+
```html
100+
<td-layout-manage-list>
101+
<list-items>
102+
...
103+
</list-items>
104+
</td-layout-manage-list>
105+
```
106+
107+
After:
108+
109+
```html
110+
<td-layout-manage-list>
111+
<md-nav-list list-items>
112+
...
113+
</md-nav-list>
114+
</td-layout-manage-list>
115+
```

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "covalent",
3-
"version": "0.5.0",
3+
"version": "0.6.0",
44
"private": true,
55
"description": "Teradata UI Platform built on Angular Material 2",
66
"keywords": [
@@ -16,7 +16,7 @@
1616
"postinstall": "npm run typings && webdriver-manager update",
1717
"webdriver-update": "bash ./node_modules/.bin/webdriver-manager update",
1818
"pretest": "rm -rf ./dist && ng build",
19-
"test": "karma start ./config/karma.conf.js",
19+
"test": "karma start ./config/karma.conf.js --single-run",
2020
"bump-dev": "gulp bump-version",
2121
"bump-patch": "gulp bump-version --ver patch",
2222
"bump-minor": "gulp bump-version --ver minor",

src/app/app.component.html

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<td-layout #layout title="Covalent" logo="app/assets/icons/teradata.svg" displayName="">
2-
<menu-items>
2+
<md-nav-list menu-items>
33
<a *ngFor="let item of routes" md-list-item [routerLink]="[item.route]" (click)="layout.close()"><md-icon>{{item.icon}}</md-icon>{{item.title}}</a>
4-
<md-divider></md-divider>
5-
</menu-items>
4+
</md-nav-list>
65
<router-outlet></router-outlet>
76
</td-layout>

src/app/app.component.scss

+22-1
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,17 @@ $md-warn: #C62828;
5555
.md-input-placeholder.md-focused {
5656
color: $md-primary !important;
5757
}
58-
.md-progress-bar-fill::after,
58+
.md-progress-bar-fill::after {
59+
background-color: $md-primary !important;
60+
}
5961
.md-input-underline .md-input-ripple {
6062
background-color: $md-primary !important;
63+
&.md-accent {
64+
background-color: $md-accent !important;
65+
}
66+
&.md-warn {
67+
background-color: $md-warn !important;
68+
}
6169
}
6270
.md-progress-bar-buffer {
6371
background-color: lighten($md-primary, 40%) !important;
@@ -111,5 +119,18 @@ $md-warn: #C62828;
111119
background-color: $md-accent-opacity;
112120
}
113121
}
122+
&.md-slide-toggle-focused {
123+
.md-ink-ripple {
124+
background-color: $md-accent-opacity;
125+
}
126+
}
127+
}
128+
md-nav-list {
129+
[md-list-item].active {
130+
md-icon {
131+
background-color: $md-accent;
132+
color: white;
133+
}
134+
}
114135
}
115136
}

src/app/app.component.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ROUTER_DIRECTIVES } from '@angular/router';
44
import { MdIcon } from '@angular2-material/icon';
55
import { MD_LIST_DIRECTIVES } from '@angular2-material/list';
66

7-
import { TdLayoutComponent } from '../platform/core';
7+
import { TdLayoutComponent, TD_LOADING_ENTRY_COMPONENTS } from '../platform/core';
88

99
@Component({
1010
directives: [
@@ -17,6 +17,7 @@ import { TdLayoutComponent } from '../platform/core';
1717
selector: 'td-docs-app',
1818
styleUrls: ['app.component.css'],
1919
templateUrl: 'app.component.html',
20+
precompile: [ TD_LOADING_ENTRY_COMPONENTS ],
2021
})
2122
export class DocsAppComponent {
2223

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<md-card>
2+
<md-card-title>Chips &amp; Autocomplete</md-card-title>
3+
<md-card-subtitle>Small blocks for multiple items</md-card-subtitle>
4+
<md-divider></md-divider>
5+
<md-card-content>
6+
<p>Basic Demo</p>
7+
<td-chips placeholder="Enter any string" [readOnly]="readOnly"></td-chips>
8+
<p>Autocomplete Demo</p>
9+
<td-chips [items]="items" placeholder="Enter any string" [readOnly]="readOnly"></td-chips>
10+
<p>Autocomplete and requireMatch Demo</p>
11+
<td-chips [items]="items" [(ngModel)]="itemsRequireMatch" placeholder="Enter autocomplete strings" [readOnly]="readOnly" requireMatch></td-chips>
12+
</md-card-content>
13+
<md-divider></md-divider>
14+
<md-card-actions>
15+
<button md-button color="primary" (click)="toggleReadOnly()">Toggle ReadOnly</button>
16+
</md-card-actions>
17+
</md-card>
18+
<md-card>
19+
<md-card-title>TdChipsComponent</md-card-title>
20+
<md-card-subtitle>How to use this component</md-card-subtitle>
21+
<md-divider></md-divider>
22+
<md-card-content>
23+
<h2><code><![CDATA[<td-chips>]]></code></h2>
24+
<p>Use <code><![CDATA[<td-chips>]]></code> element to generate a list of strings as chips.</p>
25+
<p>Add the [items] attribute to enable the autocomplete with a search list, and [requireMatch] to validate the input against the provided search list.</p>
26+
<p>When used with <a target="_blank" href="https://angular.io/docs/ts/latest/guide/forms.html">forms</a>, you can track change-states [dirty/pristine] and [touched/untouched].</p>
27+
<p>Since <code>[(ngModel)]</code> would be an array, you need to implement a custom validator for [valid/invalid] when its empty.</p>
28+
<h3>Properties:</h3>
29+
<p>The <code><![CDATA[<td-chips>]]></code> component has {{chipsAttrs.length}} properties:</p>
30+
<md-list>
31+
<template let-attr let-last="attr" ngFor [ngForOf]="chipsAttrs">
32+
<a md-list-item layout-align="row">
33+
<h3 md-line> {{attr.name}}: <span>{{attr.type}}</span></h3>
34+
<p md-line> {{attr.description}} </p>
35+
</a>
36+
<md-divider *ngIf="!last"></md-divider>
37+
</template>
38+
</md-list>
39+
<h3>Example:</h3>
40+
<p>HTML:</p>
41+
<td-highlight lang="html">
42+
<![CDATA[
43+
<td-chips placeholder="Enter string" [items]="items" [(ngModel)]="model" readOnly="readOnly" (add)="add($event)" (remove)="remove($event)" requireMatch>
44+
</td-chips>
45+
]]>
46+
</td-highlight>
47+
<p>Typescript:</p>
48+
<td-highlight lang="typescript">
49+
<![CDATA[
50+
import { TdChipsComponent } from '@covalent/chips';
51+
...
52+
directives: [ TdChipsComponent ]
53+
})
54+
export class Demo {
55+
readOnly: boolean: false;
56+
items: string[] = [
57+
'string1',
58+
'string2',
59+
'string3'
60+
];
61+
model: string[] = [];
62+
63+
add(value: string): void {
64+
...
65+
}
66+
remove(value: string): void {
67+
...
68+
}
69+
}
70+
]]>
71+
</td-highlight>
72+
</md-card-content>
73+
</md-card>

src/app/components/components/chips/chips.component.scss

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import {
2+
beforeEach,
3+
addProviders,
4+
describe,
5+
expect,
6+
it,
7+
inject,
8+
} from '@angular/core/testing';
9+
import { ComponentFixture, TestComponentBuilder } from '@angular/compiler/testing';
10+
import { Component, DebugElement } from '@angular/core';
11+
import { By } from '@angular/platform-browser';
12+
import { ChipsDemoComponent } from './chips.component';
13+
14+
describe('Component: ChipsDemo', () => {
15+
let builder: TestComponentBuilder;
16+
17+
beforeEach(() => {
18+
addProviders([
19+
ChipsDemoComponent,
20+
]);
21+
});
22+
23+
beforeEach(inject([TestComponentBuilder], function (tcb: TestComponentBuilder): void {
24+
builder = tcb;
25+
}));
26+
27+
it('should inject the component', inject([ChipsDemoComponent], (component: ChipsDemoComponent) => {
28+
expect(component).toBeTruthy();
29+
}));
30+
31+
it('should create the component', inject([], () => {
32+
return builder.createAsync(ChipsDemoTestControllerComponent)
33+
.then((fixture: ComponentFixture<any>) => {
34+
let query: DebugElement = fixture.debugElement.query(By.directive(ChipsDemoComponent));
35+
expect(query).toBeTruthy();
36+
expect(query.componentInstance).toBeTruthy();
37+
});
38+
}));
39+
});
40+
41+
@Component({
42+
directives: [ChipsDemoComponent],
43+
selector: 'td-test',
44+
template: `
45+
<td-chips-demo></td-chips-demo>
46+
`,
47+
})
48+
class ChipsDemoTestControllerComponent {
49+
}

0 commit comments

Comments
 (0)