Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmajohn committed Dec 5, 2017
2 parents 3438af5 + caf44b3 commit d421277
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 14 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## 0.3.3 (2017-12-05)
- Controls in a title-value-layout are now equally spaced and takes less room when in slim mode
- More examples added to komponentkartan-demo
- Route matching in the menu is now *exact*, disabling partial route matching

### Card component
- Card now supports a single-column layout
- Restructured card with new components, vgr-card-header and vgr-card-column.

### List component
- Added checkbox column, vgr-list-column-checkbox, that adds support for checkboxes in lists
- Added trashcan column, vgr-list-column-trashcan, that adds support for trashcan buttons in lists
- Added support for aligment on vgr-list-column-header. Left, center and right alignment is supported


## 0.3.0 (2017-11-07)

### Description of release
Expand Down
5 changes: 4 additions & 1 deletion Content/partials/_components.list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,12 @@

.list-item {
visibility: visible;
display: block;
display: none;
margin-top: 1px;
box-shadow: none; //Visa uppåt-pil i headern när containern är expanderad
&.list-item--columns-initialized {
display: block;
}
.list-item__header:after {
@extend .bg-image-icon-chevron;
content: "";
Expand Down
17 changes: 8 additions & 9 deletions component-package/controls/list-item/list-item.component.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<div *ngIf="columnInitialized">
<ng-content select=".list-item__header"></ng-content>
<div class="list-item__notification">
<span class="list-item__notification__icon" [ngClass]="
<ng-content select=".list-item__header">
</ng-content>
<div class="list-item__notification">
<span class="list-item__notification__icon" [ngClass]="
{ 'bg-image-icon-ok-check' : notification && notification.icon===NotificationIcons.Ok,
'bg-image-icon-ok-check--green' : notification && notification.icon===NotificationIcons.OkGreen,
'bg-image-icon-exclamation' : notification && notification.icon===NotificationIcons.Exclamation,
'bg-image-icon-exclamation--red' : notification && notification.icon===NotificationIcons.ExclamationRed}">
</span>
<div class="list-item__notification__message">
{{notification? notification.message : ''}}
</div>
</span>
<div class="list-item__notification__message">
{{notification? notification.message : ''}}
</div>
<ng-content select=".list-item__content"></ng-content>
</div>
<ng-content select=".list-item__content"></ng-content>
4 changes: 2 additions & 2 deletions component-package/controls/list-item/list-item.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ import { ListHeaderComponent } from '../list/list-header.component';
export class ListItemComponent implements OnInit {
// För att kunna binda till Enum värde i markup
public NotificationIcons = NotificationIcon;
public columnInitialized: boolean;
readonly showNotificationDurationMs = 1500;
@HostBinding('class.list-item') isContainer = true;
@HostBinding('class.list-item--collapsed') collapsed = true;
@HostBinding('class.list-item--expanded') private _expanded: boolean;
@HostBinding('class.list-item--deleted') deleted: boolean;
@HostBinding('class.list-item--notification-visible') notificationVisible: boolean;
@HostBinding('class.list-item--not-interactable') notInteractable: boolean;
@HostBinding('class.list-item--columns-initialized') columnsInitialized: boolean;

@Input() set expanded(expandedValue: boolean) {
if (expandedValue) {
Expand Down Expand Up @@ -76,7 +76,7 @@ export class ListItemComponent implements OnInit {
this.columns.forEach((column, index) => {
header.applyToColumn(column, index);
});
this.columnInitialized = true;
this.columnsInitialized = true;
}


Expand Down
6 changes: 5 additions & 1 deletion demo-app/list-columns/list-columns.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ export class ListColumnsComponent {
}

getSelectedRows(): number {
return this.peopleRows && this.peopleRows.filter(r => r.previewObject.selected).length;
if (!this.peopleRows) {
return 0;
} else {
return this.peopleRows && this.peopleRows.filter(r => r.previewObject.selected).length;
}
}

onSortChanged(event: SortChangedArgs) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vgr-komponentkartan",
"version": "0.3.3-rc29",
"version": "0.3.3-rc32",
"author": "Västra Götalandsregionen",
"scripts": {
"start": "concurrent \"npm run _watch-ts\" \"npm run _local-webserver\" \"npm run _watch-css\" \"npm run _watch-demo-app-css\"",
Expand Down

0 comments on commit d421277

Please sign in to comment.