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.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Kisiela committed Nov 17, 2015
2 parents 9e0a0ef + c9c32b4 commit 1435a53
Show file tree
Hide file tree
Showing 12 changed files with 110 additions and 18 deletions.
22 changes: 16 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [0.4.0] - 2015-11-17
### Added
- **md-chip** with placeholder, secondary-placeholder, delete-button-label and delete-hint

### Deprecated
- **mdInputContainer** wrapper. Use **inputContainer**
- **mdMessages** wrapper. Use **messages**
- **mdLabel** wrapper. Use **label**

## [0.3.0] - 2015-11-17
### Added
- datepicker with date range and filtering _(currently in angular-material 1.0_RC4)_
Expand Down Expand Up @@ -42,9 +51,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## 0.0.1 - 2015-11-06

[0.3.0]: https://github.com/kamilkisiela/meteor-angular-formly-templates-material/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/kamilkisiela/meteor-angular-formly-templates-material/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/kamilkisiela/meteor-angular-formly-templates-material/compare/v0.0.4...v0.1.0
[0.0.4]: https://github.com/kamilkisiela/meteor-angular-formly-templates-material/compare/v0.0.3...v0.0.4
[0.0.3]: https://github.com/kamilkisiela/meteor-angular-formly-templates-material/compare/v0.0.2...v0.0.3
[0.0.2]: https://github.com/kamilkisiela/meteor-angular-formly-templates-material/compare/v0.0.1...v0.0.2
[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
39 changes: 36 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,48 @@ md-filter-date
}
```

### chips

**placeholder (string, optional)**

placeholder attribute value

**secondaryPlaceholder (string, optional)**

secondary-placeholder attribute value

**deleteButtonLabel (string, optional)**

delete-button-label attribute value

**deleteHint (string, optional)**

delete-hint attribute value

```javascript
{
"type": "chips",
"key": "tags",
"templateOptions": {
"theme": "custom",
"placeholder": "+tags",
"secondaryPlaceholder": "Add tag",
"deleteButtonLabel": "Remove",
"deleteHint": "Remove tag"
}
}
```


## Wrappers

- mdInputContainer
- inputContainer (md-input-container)
- label
- ngMessages
- messages (ng-messages)

## Roadmap

- [ ] add md-chips
- [x] add md-chips
- [x] add md-datepicker
- [ ] add md-icon wrapper
- [x] add md-select
Expand Down
28 changes: 28 additions & 0 deletions lib/client/types/chips/chips.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
var {SetModule} = angular2now;

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

formlyConfigProvider.setType({
name: 'chips',
templateUrl: formlyMaterialProvider.templateUrl('lib/client/types/chips/chips.ng.html'),
defaultOptions: {
defaultValue: [],
ngModelAttrs: {
placeholder: {attribute: 'placeholder'},
secondaryPlaceholder: {attribute: 'secondary-placeholder'},
deleteButtonLabel: {attribute: 'delete-button-label'},
deleteHint: {attribute: 'delete-hint'}
}
},
apiCheck: (check) => ({
templateOptions: {
placeholder: check.string.optional,
secondaryPlaceholder: check.string.optional,
deleteButtonLabel: check.string.optional,
deleteHint: check.string.optional
}
})
});

});
1 change: 1 addition & 0 deletions lib/client/types/chips/chips.ng.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<md-chips ng-model="model[options.key]"></md-chips>
2 changes: 1 addition & 1 deletion lib/client/types/datepicker/datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SetModule('formlyMaterial')
formlyConfigProvider.setType({
name: 'datepicker',
templateUrl: formlyMaterialProvider.templateUrl('lib/client/types/datepicker/datepicker.ng.html'),
wrapper: ['mdMessages'],
wrapper: ['messages'],
defaultOptions: {
ngModelAttrs: {
placeholder: {attribute: 'md-placeholder'}
Expand Down
2 changes: 1 addition & 1 deletion lib/client/types/input/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SetModule('formlyMaterial')
formlyConfigProvider.setType({
name: 'input',
templateUrl: formlyMaterialProvider.templateUrl('lib/client/types/input/input.ng.html'),
wrapper: ['mdLabel', 'mdMessages', 'mdInputContainer'],
wrapper: ['label', 'messages', 'inputContainer'],
defaultOptions: {
ngModelAttrs: {
mdMaxlength: {
Expand Down
2 changes: 1 addition & 1 deletion lib/client/types/select/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SetModule('formlyMaterial')
formlyConfigProvider.setType({
name: 'select',
templateUrl: formlyMaterialProvider.templateUrl('lib/client/types/select/select.ng.html'),
wrapper: ['mdLabel', 'mdMessages', 'mdInputContainer'],
wrapper: ['label', 'messages', 'inputContainer'],
apiCheck: (check) => ({
templateOptions: {
options: check.arrayOf(check.object),
Expand Down
2 changes: 1 addition & 1 deletion lib/client/types/textarea/textarea.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SetModule('formlyMaterial')
formlyConfigProvider.setType({
name: 'textarea',
templateUrl: formlyMaterialProvider.templateUrl('lib/client/types/textarea/textarea.ng.html'),
wrapper: ['mdLabel', 'mdMessages', 'mdInputContainer'],
wrapper: ['label', 'messages', 'inputContainer'],
defaultOptions: {
ngModelAttrs: {
rows: {attribute: 'rows'},
Expand Down
8 changes: 8 additions & 0 deletions lib/client/wrappers/input-container/input-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@ var {SetModule} = angular2now;
SetModule('formlyMaterial')
.config((formlyConfigProvider, formlyMaterialProvider) => {

/**
* @deprecated since version 0.4.0
*/
formlyConfigProvider.setWrapper({
name: 'mdInputContainer',
templateUrl: formlyMaterialProvider.templateUrl('lib/client/wrappers/input-container/input-container.ng.html')
});

formlyConfigProvider.setWrapper({
name: 'inputContainer',
templateUrl: formlyMaterialProvider.templateUrl('lib/client/wrappers/input-container/input-container.ng.html')
});

});
4 changes: 2 additions & 2 deletions lib/client/wrappers/label/label.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SetModule('formlyMaterial')
.config((formlyConfigProvider, formlyMaterialProvider) => {

formlyConfigProvider.setWrapper({
name: 'mdLabel',
name: 'label',
templateUrl: formlyMaterialProvider.templateUrl('lib/client/wrappers/label/label.ng.html'),
apiCheck: (check) => ({
templateOptions: {
Expand All @@ -13,4 +13,4 @@ SetModule('formlyMaterial')
})
});

});
});
8 changes: 8 additions & 0 deletions lib/client/wrappers/messages/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@ var {SetModule} = angular2now;
SetModule('formlyMaterial')
.config((formlyConfigProvider, formlyMaterialProvider) => {

/**
* @deprecated since version 0.4.0
*/
formlyConfigProvider.setWrapper({
name: 'mdMessages',
templateUrl: formlyMaterialProvider.templateUrl('lib/client/wrappers/messages/messages.ng.html')
});

formlyConfigProvider.setWrapper({
name: 'messages',
templateUrl: formlyMaterialProvider.templateUrl('lib/client/wrappers/messages/messages.ng.html')
});

});
10 changes: 7 additions & 3 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.3.0",
version: "0.4.0",

documentation: 'README.md',
git: 'https://github.com/wieldo/angular-formly-templates-material.git'
Expand All @@ -22,7 +22,7 @@ Package.onUse(function (api) {
'angular:[email protected]',
'angular:[email protected]',
'angular:[email protected]',
'wieldo:angular-formly@7.3.2'
'wieldo:angular-formly'
]
};

Expand Down Expand Up @@ -88,7 +88,11 @@ Package.onUse(function (api) {

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

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

], client);

Expand Down

0 comments on commit 1435a53

Please sign in to comment.