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

Commit 4604fe2

Browse files
author
Kamil Kisiela
committed
Merge branch 'release/v0.5.0'
2 parents 1435a53 + 2cdacac commit 4604fe2

File tree

6 files changed

+101
-10
lines changed

6 files changed

+101
-10
lines changed

CHANGELOG.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [0.5.0] - 2015-11-18
6+
### Added
7+
- multiple support for select field
8+
- slider field with min, max, step and discrete options
9+
510
## [0.4.0] - 2015-11-17
611
### Added
712
- **md-chip** with placeholder, secondary-placeholder, delete-button-label and delete-hint
@@ -51,10 +56,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
5156

5257
## 0.0.1 - 2015-11-06
5358

54-
[0.4.0]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.3.0...v0.4.0
55-
[0.3.0]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.2.0...v0.3.0
56-
[0.2.0]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.1.0...v0.2.0
57-
[0.1.0]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.0.4...v0.1.0
58-
[0.0.4]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.0.3...v0.0.4
59-
[0.0.3]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.0.2...v0.0.3
60-
[0.0.2]: https://github.com/wieldo/meteor-angular-formly-templates-material/compare/v0.0.1...v0.0.2
59+
[0.5.0]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.4.0...v0.5.0
60+
[0.4.0]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.3.0...v0.4.0
61+
[0.3.0]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.2.0...v0.3.0
62+
[0.2.0]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.1.0...v0.2.0
63+
[0.1.0]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.0.4...v0.1.0
64+
[0.0.4]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.0.3...v0.0.4
65+
[0.0.3]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.0.2...v0.0.3
66+
[0.0.2]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.0.1...v0.0.2

README.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,16 @@ md-theme attribute
103103

104104
**valueProp (string, optional)**
105105

106+
**multiple (boolean, optional)**
107+
106108
```javascript
107109
{
108110
"type": "select",
109111
"key": "name",
110112
"templateOptions": {
111113
"label": "Name",
112114
"theme": "custom",
115+
"multiple": true,
113116
"labelProp": "firstName",
114117
"valueProp": "id",
115118
"options": [
@@ -215,6 +218,38 @@ delete-hint attribute value
215218
}
216219
```
217220

221+
### slider
222+
223+
**min (number, optional)**
224+
225+
default 1
226+
227+
**max (number, optional)**
228+
229+
default 100
230+
231+
**step (number, optional)**
232+
233+
default 1
234+
235+
**discrete (boolean, optional)**
236+
237+
default false (md-discrete)
238+
239+
```javascript
240+
{
241+
"type": "slider",
242+
"key": "rate",
243+
"templateOptions": {
244+
"theme": "custom",
245+
"min": 1,
246+
"max": 5,
247+
"step": 0.5,
248+
"discrete": true
249+
}
250+
}
251+
```
252+
218253

219254
## Wrappers
220255

@@ -227,11 +262,12 @@ delete-hint attribute value
227262
- [x] add md-chips
228263
- [x] add md-datepicker
229264
- [ ] add md-icon wrapper
265+
- [x] add md-slider with min, max, step and discrete options
230266
- [x] add md-select
267+
- [x] multiple in md-select
231268
- [ ] add groups to md-select
232269
- [x] add valueProp, labelProp to md-select
233270
- [x] add md-radio with valueProp and labelProp
234-
- [ ] add groupProp to md-radio
235271
- [x] add textarea with cols and rows
236272
- [x] md-theme
237273
- [ ] e2e tests

lib/client/types/select/select.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,15 @@ SetModule('formlyMaterial')
77
name: 'select',
88
templateUrl: formlyMaterialProvider.templateUrl('lib/client/types/select/select.ng.html'),
99
wrapper: ['label', 'messages', 'inputContainer'],
10+
defaultOptions: {
11+
ngModelAttrs: {
12+
multiple: {bound: 'multiple'}
13+
}
14+
},
1015
apiCheck: (check) => ({
1116
templateOptions: {
1217
options: check.arrayOf(check.object),
18+
multiple: check.bool.optional,
1319
labelProp: check.string.optional,
1420
valueProp: check.string.optional
1521
}

lib/client/types/slider/slider.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
var {SetModule} = angular2now;
2+
3+
SetModule('formlyMaterial')
4+
.config((formlyConfigProvider, formlyMaterialProvider) => {
5+
6+
formlyConfigProvider.setType({
7+
name: 'slider',
8+
templateUrl: formlyMaterialProvider.templateUrl('lib/client/types/slider/slider.ng.html'),
9+
defaultOptions: {
10+
ngModelAttrs: {
11+
min: {
12+
bound: 'min',
13+
attribute: 'min'
14+
},
15+
max: {
16+
bound: 'max',
17+
attribute: 'max'
18+
},
19+
step: {
20+
bound: 'step',
21+
attribute: 'step'
22+
},
23+
discrete: {
24+
bound: 'md-discrete'
25+
}
26+
}
27+
},
28+
apiCheck: (check) => ({
29+
templateOptions: {
30+
min: check.number.optional,
31+
max: check.number.optional,
32+
step: check.number.optional,
33+
discrete: check.bool.optional
34+
}
35+
})
36+
});
37+
38+
});
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<md-slider ng-model="model[options.key]"></md-slider>

package.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var client = 'client';
33
Package.describe({
44
name: "wieldo:angular-formly-templates-material",
55
summary: "Material design templates for angular-formly",
6-
version: "0.4.0",
6+
version: "0.5.0",
77

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

9393
// chips
9494
'lib/client/types/chips/chips.js',
95-
'lib/client/types/chips/chips.ng.html'
95+
'lib/client/types/chips/chips.ng.html',
96+
97+
// slider
98+
'lib/client/types/slider/slider.js',
99+
'lib/client/types/slider/slider.ng.html'
96100

97101
], client);
98102

0 commit comments

Comments
 (0)