Skip to content
This repository has been archived by the owner on Jan 22, 2018. It is now read-only.

Commit

Permalink
Merge branch 'release/v0.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Kisiela committed Nov 18, 2015
2 parents 1435a53 + 2cdacac commit 4604fe2
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 10 deletions.
20 changes: 13 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [0.5.0] - 2015-11-18
### Added
- multiple support for select field
- slider field with min, max, step and discrete options

## [0.4.0] - 2015-11-17
### Added
- **md-chip** with placeholder, secondary-placeholder, delete-button-label and delete-hint
Expand Down Expand Up @@ -51,10 +56,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## 0.0.1 - 2015-11-06

[0.4.0]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.0.4...v0.1.0
[0.0.4]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.0.3...v0.0.4
[0.0.3]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.0.2...v0.0.3
[0.0.2]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.0.1...v0.0.2
[0.5.0]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.4.0...v0.5.0
[0.4.0]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.0.4...v0.1.0
[0.0.4]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.0.3...v0.0.4
[0.0.3]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.0.2...v0.0.3
[0.0.2]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.0.1...v0.0.2
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,16 @@ md-theme attribute

**valueProp (string, optional)**

**multiple (boolean, optional)**

```javascript
{
"type": "select",
"key": "name",
"templateOptions": {
"label": "Name",
"theme": "custom",
"multiple": true,
"labelProp": "firstName",
"valueProp": "id",
"options": [
Expand Down Expand Up @@ -215,6 +218,38 @@ delete-hint attribute value
}
```

### slider

**min (number, optional)**

default 1

**max (number, optional)**

default 100

**step (number, optional)**

default 1

**discrete (boolean, optional)**

default false (md-discrete)

```javascript
{
"type": "slider",
"key": "rate",
"templateOptions": {
"theme": "custom",
"min": 1,
"max": 5,
"step": 0.5,
"discrete": true
}
}
```


## Wrappers

Expand All @@ -227,11 +262,12 @@ delete-hint attribute value
- [x] add md-chips
- [x] add md-datepicker
- [ ] add md-icon wrapper
- [x] add md-slider with min, max, step and discrete options
- [x] add md-select
- [x] multiple in md-select
- [ ] add groups to md-select
- [x] add valueProp, labelProp to md-select
- [x] add md-radio with valueProp and labelProp
- [ ] add groupProp to md-radio
- [x] add textarea with cols and rows
- [x] md-theme
- [ ] e2e tests
Expand Down
6 changes: 6 additions & 0 deletions lib/client/types/select/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ SetModule('formlyMaterial')
name: 'select',
templateUrl: formlyMaterialProvider.templateUrl('lib/client/types/select/select.ng.html'),
wrapper: ['label', 'messages', 'inputContainer'],
defaultOptions: {
ngModelAttrs: {
multiple: {bound: 'multiple'}
}
},
apiCheck: (check) => ({
templateOptions: {
options: check.arrayOf(check.object),
multiple: check.bool.optional,
labelProp: check.string.optional,
valueProp: check.string.optional
}
Expand Down
38 changes: 38 additions & 0 deletions lib/client/types/slider/slider.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
var {SetModule} = angular2now;

SetModule('formlyMaterial')
.config((formlyConfigProvider, formlyMaterialProvider) => {

formlyConfigProvider.setType({
name: 'slider',
templateUrl: formlyMaterialProvider.templateUrl('lib/client/types/slider/slider.ng.html'),
defaultOptions: {
ngModelAttrs: {
min: {
bound: 'min',
attribute: 'min'
},
max: {
bound: 'max',
attribute: 'max'
},
step: {
bound: 'step',
attribute: 'step'
},
discrete: {
bound: 'md-discrete'
}
}
},
apiCheck: (check) => ({
templateOptions: {
min: check.number.optional,
max: check.number.optional,
step: check.number.optional,
discrete: check.bool.optional
}
})
});

});
1 change: 1 addition & 0 deletions lib/client/types/slider/slider.ng.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<md-slider ng-model="model[options.key]"></md-slider>
8 changes: 6 additions & 2 deletions package.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var client = 'client';
Package.describe({
name: "wieldo:angular-formly-templates-material",
summary: "Material design templates for angular-formly",
version: "0.4.0",
version: "0.5.0",

documentation: 'README.md',
git: 'https://github.com/wieldo/angular-formly-templates-material.git'
Expand Down Expand Up @@ -92,7 +92,11 @@ Package.onUse(function (api) {

// chips
'lib/client/types/chips/chips.js',
'lib/client/types/chips/chips.ng.html'
'lib/client/types/chips/chips.ng.html',

// slider
'lib/client/types/slider/slider.js',
'lib/client/types/slider/slider.ng.html'

], client);

Expand Down

0 comments on commit 4604fe2

Please sign in to comment.