angular-formly-material
Advanced tools
Comparing version 0.7.1 to 0.7.2
@@ -9,3 +9,3 @@ { | ||
"license": "MIT", | ||
"homepage": "https://github.com/wieldo/angular-formly-templates-material", | ||
"homepage": "https://github.com/formly-js/angular-formly-templates-material", | ||
"keywords": [ | ||
@@ -12,0 +12,0 @@ "AngularJs", |
@@ -5,2 +5,10 @@ # Change Log | ||
## [0.7.2] - 2015-12-08 | ||
### Added | ||
- Documentation for all fields and wrappers | ||
- Banner with version in dist files | ||
### Changed | ||
- Links to repository after transfer from wieldo to formly-js | ||
## [0.7.1] - 2015-12-01 | ||
@@ -90,2 +98,3 @@ ### Changed | ||
[0.7.2]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.7.1...v0.7.2 | ||
[0.7.1]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.7.0...v0.7.1 | ||
@@ -92,0 +101,0 @@ [0.7.0]: https://github.com/wieldo/angular-formly-templates-material/compare/v0.6.0...v0.7.0 |
@@ -0,1 +1,8 @@ | ||
/*! | ||
* angular-formly-material JavaScript Library v0.7.2 | ||
* | ||
* @license MIT (http://license.angular-formly.com) | ||
* | ||
* built with ♥ by Kamil Kisiela <mys.sterowiec@gmail.com> | ||
*/ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -2,0 +9,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
@@ -0,2 +1,3 @@ | ||
/*! angular-formly-material JavaScript Library v0.7.2 | MIT | built with ♥ by Kamil Kisiela <mys.sterowiec@gmail.com> */ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("angular")):"function"==typeof define&&define.amd?define(["angular"],t):"object"==typeof exports?exports.ngFormlyMaterial=t(require("angular")):e.ngFormlyMaterial=t(e.angular)}(this,function(e){return function(e){function t(o){if(n[o])return n[o].exports;var a=n[o]={exports:{},id:o,loaded:!1};return e[o].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),l=o(a),u=n(2),r=o(u),i=n(4),d=o(i),s=n(11),f=o(s),p="formlyMaterial";l["default"].module(p,["ngMessages","ngMaterial","formly"]).config(["formlyConfigProvider",function(e){var t=[r["default"],d["default"],f["default"]];t.forEach(function(t){for(var n=0;n<t.length;n++)t[n](e)})}]),t["default"]=p,e.exports=t["default"]},function(t,n){t.exports=e},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),l=o(a);t["default"]=[l["default"]],e.exports=t["default"]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){function t(e,t,n){angular.forEach(e,function(e){e.getAttribute(t)||e.setAttribute(t,n)})}function n(e){var t="[ng-model], [data-ng-model]";return e.querySelectorAll(t)}e.templateManipulators.preWrapper.push(function(e,o){if(angular.isDefined(o.templateOptions.theme)){var a=document.createElement("div"),l=o.extras&&o.extras.skipNgModelAttrsManipulator;if(l===!0)return e;a.innerHTML=e;var u=n(a);return u&&u.length?(t(u,"md-theme",o.templateOptions.theme),a.innerHTML):e}return e})},e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),l=o(a),u=n(7),r=o(u),i=n(9),d=o(i);t["default"]=[l["default"],r["default"],d["default"]],e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),l=o(a);t["default"]=function(e){e.setWrapper({name:"inputContainer",template:l["default"]})},e.exports=t["default"]},function(e,t){e.exports="<md-input-container><formly-transclude></formly-transclude></md-input-container>"},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),l=o(a);t["default"]=function(e){e.setWrapper({name:"label",template:l["default"],apiCheck:function(e){return{templateOptions:{label:e.string}}}})},e.exports=t["default"]},function(e,t){e.exports="<label for={{id}}>{{to.label}} {{to.required ? '*' : ''}}</label><formly-transclude></formly-transclude>"},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(10),l=o(a);t["default"]=function(e){e.setWrapper({name:"messages",template:l["default"]})},e.exports=t["default"]},function(e,t){e.exports='<formly-transclude></formly-transclude><div ng-messages=fc.$error><div ng-repeat="(name, message) in ::options.validation.messages" ng-message-exp=name>{{message(fc.$viewValue, fc.$modelValue, this)}}</div></div>'},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(12),l=o(a),u=n(14),r=o(u),i=n(16),d=o(i),s=n(18),f=o(s),p=n(20),c=o(p),m=n(22),b=o(m),_=n(24),g=o(_),v=n(26),x=o(v),y=n(28),M=o(y);t["default"]=[l["default"],r["default"],d["default"],f["default"],c["default"],b["default"],g["default"],x["default"],M["default"]],e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(13),l=o(a);t["default"]=function(e){e.setType({name:"checkbox",template:l["default"]})},e.exports=t["default"]},function(e,t){e.exports="<div><md-checkbox ng-model=model[options.key]>{{to.label}}</md-checkbox></div>"},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(15),l=o(a);t["default"]=function(e){e.setType({name:"chips",template:l["default"],defaultOptions:{defaultValue:[],ngModelAttrs:{placeholder:{attribute:"placeholder"},secondaryPlaceholder:{attribute:"secondary-placeholder"},deleteButtonLabel:{attribute:"delete-button-label"},deleteHint:{attribute:"delete-hint"}}},apiCheck:function(e){return{templateOptions:{placeholder:e.string.optional,secondaryPlaceholder:e.string.optional,deleteButtonLabel:e.string.optional,deleteHint:e.string.optional}}}})},e.exports=t["default"]},function(e,t){e.exports="<md-chips ng-model=model[options.key]></md-chips>"},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(17),l=o(a);t["default"]=function(e){e.setType({name:"datepicker",template:l["default"],wrapper:["messages"],defaultOptions:{ngModelAttrs:{placeholder:{attribute:"md-placeholder"},minDate:{bound:"md-min-date"},maxDate:{bound:"md-max-date"},filterDate:{bound:"md-date-filter"}}},apiCheck:function(e){return{templateOptions:{placeholder:e.string.optional,minDate:e.instanceOf(Date).optional,maxDate:e.instanceOf(Date).optional,filterDate:e.func.optional}}}})},e.exports=t["default"]},function(e,t){e.exports="<div><md-datepicker ng-model=model[options.key]></md-datepicker></div>"},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(19),l=o(a);t["default"]=function(e){e.setType({name:"input",template:l["default"],wrapper:["label","messages","inputContainer"],defaultOptions:{ngModelAttrs:{mdMaxlength:{bound:"md-maxlength"}}}})},e.exports=t["default"]},function(e,t){e.exports="<input ng-model=model[options.key]>"},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(21),l=o(a);t["default"]=function(e){e.setType({name:"radio",template:l["default"],apiCheck:function(e){return{templateOptions:{options:e.arrayOf(e.object),labelProp:e.string.optional,valueProp:e.string.optional}}}})},e.exports=t["default"]},function(e,t){e.exports="<md-radio-group ng-model=model[options.key]><md-radio-button ng-repeat=\"option in to.options\" ng-value=\"option[to.valueProp || 'value']\">{{option[to.labelProp || 'name']}}</md-radio-button></md-radio-group>"},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(23),l=o(a);t["default"]=function(e){e.setType({name:"select",template:l["default"],wrapper:["label","messages","inputContainer"],defaultOptions:{ngModelAttrs:{multiple:{bound:"multiple"}}},apiCheck:function(e){return{templateOptions:{options:e.arrayOf(e.object),multiple:e.bool.optional,labelProp:e.string.optional,valueProp:e.string.optional}}}})},e.exports=t["default"]},function(e,t){e.exports="<md-select ng-model=model[options.key]><md-option ng-repeat=\"option in to.options\" ng-value=\"option[to.valueProp || 'value']\">{{ option[to.labelProp || 'name'] }}</md-option></md-select>"},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(25),l=o(a);t["default"]=function(e){e.setType({name:"slider",template:l["default"],defaultOptions:{ngModelAttrs:{min:{attribute:"min"},max:{attribute:"max"},step:{attribute:"step"},discrete:{bound:"md-discrete"}}},apiCheck:function(e){return{templateOptions:{min:e.number.optional,max:e.number.optional,step:e.number.optional,discrete:e.bool.optional}}}})},e.exports=t["default"]},function(e,t){e.exports="<md-slider ng-model=model[options.key]></md-slider>"},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(27),l=o(a);t["default"]=function(e){e.setType({name:"switch",template:l["default"]})},e.exports=t["default"]},function(e,t){e.exports="<md-switch ng-model=model[options.key]>{{to.label}}</md-switch>"},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(29),l=o(a);t["default"]=function(e){e.setType({name:"textarea",template:l["default"],wrapper:["label","messages","inputContainer"],defaultOptions:{ngModelAttrs:{rows:{attribute:"rows"},cols:{attribute:"cols"}}},apiCheck:function(e){return{templateOptions:{rows:e.number.optional,cols:e.number.optional}}}})},e.exports=t["default"]},function(e,t){e.exports="<textarea ng-model=model[options.key]></textarea>"}])}); | ||
//# sourceMappingURL=formly-material.min.js.map |
@@ -6,6 +6,6 @@ var client = 'client'; | ||
summary: "Material design templates for angular-formly", | ||
version: "0.7.1", | ||
version: "0.7.2", | ||
documentation: 'README.md', | ||
git: 'https://github.com/wieldo/angular-formly-templates-material.git' | ||
git: 'https://github.com/formly-js/angular-formly-templates-material.git' | ||
}); | ||
@@ -12,0 +12,0 @@ |
{ | ||
"name": "angular-formly-material", | ||
"version": "0.7.1", | ||
"version": "0.7.2", | ||
"description": "Material design templates for angular-formly", | ||
@@ -17,3 +17,3 @@ "main": "dist/formly-material.js", | ||
"type": "git", | ||
"url": "git+https://github.com/wieldo/angular-formly-templates-material.git" | ||
"url": "git+https://github.com/formly-js/angular-formly-templates-material.git" | ||
}, | ||
@@ -31,5 +31,5 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/wieldo/angular-formly-templates-material/issues" | ||
"url": "https://github.com/formly-js/angular-formly-templates-material/issues" | ||
}, | ||
"homepage": "https://github.com/wieldo/angular-formly-templates-material#readme", | ||
"homepage": "https://github.com/formly-js/angular-formly-templates-material#readme", | ||
"dependencies": { | ||
@@ -36,0 +36,0 @@ "angular": "^1.4.0", |
256
README.md
FormlyMaterial | ||
========== | ||
[![GitHub version](https://badge.fury.io/gh/wieldo%2Fangular-formly-templates-material.svg)](https://badge.fury.io/gh/wieldo%2Fangular-formly-templates-material) | ||
[![Build Status](https://travis-ci.org/wieldo/angular-formly-templates-material.svg)](https://travis-ci.org/wieldo/angular-formly-templates-material) | ||
[![Coverage Status](https://coveralls.io/repos/wieldo/angular-formly-templates-material/badge.svg?branch=master&service=github)](https://coveralls.io/github/wieldo/angular-formly-templates-material?branch=master) | ||
[![GitHub version](https://badge.fury.io/gh/formly-js%2Fangular-formly-templates-material.svg)](https://badge.fury.io/gh/formly-js%2Fangular-formly-templates-material) | ||
[![Build Status](https://travis-ci.org/formly-js/angular-formly-templates-material.svg)](https://travis-ci.org/formly-js/angular-formly-templates-material) | ||
[![Coverage Status](https://coveralls.io/repos/formly-js/angular-formly-templates-material/badge.svg?branch=master&service=github)](https://coveralls.io/github/formly-js/angular-formly-templates-material?branch=master) | ||
[![Codacy Badge](https://api.codacy.com/project/badge/grade/a2cd4c7c2d74467281e309a65be49e8f)](https://www.codacy.com/app/mys-sterowiec/angular-formly-templates-material) | ||
@@ -48,230 +48,30 @@ | ||
## Common properties | ||
### label (string) | ||
### theme (string) | ||
md-theme attribute | ||
## Fields | ||
### input | ||
* [checkbox][types.checkbox] | ||
* [chips][types.chips] | ||
* [datepicker][types.datepicker] | ||
* [input][types.input] | ||
* [radio][types.radio] | ||
* [select][types.select] | ||
* [slider][types.slider] | ||
* [switch][types.switch] | ||
* [textarea][types.textarea] | ||
```javascript | ||
{ | ||
"type": "input", | ||
"key": "firstName", | ||
"templateOptions": { | ||
"type": "text", | ||
"label": "First name", | ||
"theme": "custom" | ||
} | ||
} | ||
``` | ||
## Wrappers | ||
### textarea | ||
* [input-container][wrappers.input-container] | ||
* [label][wrappers.label] | ||
* [messages][wrappers.messages] | ||
**rows (number, optional)** | ||
## Common settings | ||
```javascript | ||
{ | ||
"type": "textarea", | ||
"key": "bio", | ||
"templateOptions": { | ||
"label": "Biography", | ||
"theme": "custom", | ||
"rows": 5 | ||
} | ||
} | ||
``` | ||
### label (string) | ||
### radio | ||
Text used as a field's label | ||
**options (array, requred)** | ||
### theme (string) | ||
**labelProp (string, optional)** | ||
Value of md-theme used on field | ||
**valueProp (string, optional)** | ||
```javascript | ||
{ | ||
"type": "radio", | ||
"key": "name", | ||
"templateOptions": { | ||
"label": "Name", | ||
"theme": "custom", | ||
"labelProp": "firstName", | ||
"valueProp": "id", | ||
"options": [ | ||
{"firstName": "Sarah", id: 1}, | ||
{"firstName": "Jessica", id: 2}, | ||
{"firstName": "Parker", id: 3} | ||
] | ||
} | ||
} | ||
``` | ||
### select | ||
**options (array, requred)** | ||
**labelProp (string, optional)** | ||
**valueProp (string, optional)** | ||
**multiple (boolean, optional)** | ||
```javascript | ||
{ | ||
"type": "select", | ||
"key": "name", | ||
"templateOptions": { | ||
"label": "Name", | ||
"theme": "custom", | ||
"multiple": true, | ||
"labelProp": "firstName", | ||
"valueProp": "id", | ||
"options": [ | ||
{"firstName": "Sarah", id: 1}, | ||
{"firstName": "Jessica", id: 2}, | ||
{"firstName": "Parker", id: 3} | ||
] | ||
} | ||
} | ||
``` | ||
### checkbox | ||
```javascript | ||
{ | ||
"type": "checkbox", | ||
"key": "terms", | ||
"templateOptions": { | ||
"label": "Terms and Conditions", | ||
"theme": "custom" | ||
} | ||
} | ||
``` | ||
### switch | ||
```javascript | ||
{ | ||
"type": "switch", | ||
"key": "terms", | ||
"templateOptions": { | ||
"label": "Terms and Conditions", | ||
"theme": "custom" | ||
} | ||
} | ||
``` | ||
### datepicker | ||
**placeholder (string, optional)** | ||
md-placeholder | ||
**minDate (Date, optional)** | ||
md-min-date | ||
**maxDate (Date, optional)** | ||
md-max-date | ||
**filterDate (function, optional)** | ||
md-filter-date | ||
```javascript | ||
{ | ||
"type": "datepicker", | ||
"key": "start", | ||
"templateOptions": { | ||
"theme": "custom", | ||
"placeholder": "Start date", | ||
"minDate": minDate, // instance of Date | ||
"maxDate": maxDate, // instance of Date | ||
"filterDate": function(date) { | ||
// only weekends | ||
var day = date.getDay(); | ||
return day === 0 || day === 6; | ||
} | ||
} | ||
} | ||
``` | ||
### 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" | ||
} | ||
} | ||
``` | ||
### 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 | ||
- inputContainer (md-input-container) | ||
- label | ||
- messages (ng-messages) | ||
## Roadmap | ||
@@ -293,1 +93,15 @@ | ||
Requests (?). Post an issue. | ||
[types.checkbox]: docs/types/checkbox.md | ||
[types.chips]: docs/types/chips.md | ||
[types.datepicker]: docs/types/datepicker.md | ||
[types.input]: docs/types/input.md | ||
[types.radio]: docs/types/radio.md | ||
[types.select]: docs/types/select.md | ||
[types.slider]: docs/types/slider.md | ||
[types.switch]: docs/types/switch.md | ||
[types.textarea]: docs/types/textarea.md | ||
[wrappers.input-container]: docs/wrappers/input-container.md | ||
[wrappers.label]: docs/wrappers/label.md | ||
[wrappers.messages]: docs/wrappers/messages.md |
@@ -0,2 +1,4 @@ | ||
var webpack = require('webpack'); | ||
var build = require('./build')('dist'); | ||
var pkg = require('../package.json'); | ||
@@ -8,3 +10,10 @@ module.exports = { | ||
loaders: build.loaders() | ||
} | ||
}, | ||
plugins: [ | ||
new webpack.BannerPlugin(pkg.name + " JavaScript Library v" + pkg.version + "\n" + | ||
"\n" + | ||
"@license MIT (http://license.angular-formly.com)\n" + | ||
"\n" + | ||
"built with ♥ by " + pkg.author) | ||
] | ||
}; |
var webpack = require('webpack'); | ||
var build = require('./build')('prod'); | ||
var pkg = require('../package.json'); | ||
@@ -12,4 +13,5 @@ module.exports = { | ||
plugins: [ | ||
new webpack.optimize.UglifyJsPlugin() | ||
new webpack.optimize.UglifyJsPlugin(), | ||
new webpack.BannerPlugin(pkg.name + " JavaScript Library v" + pkg.version + " | MIT | built with ♥ by " + pkg.author) | ||
] | ||
}; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
120063
59
1032
106