Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-formly-material

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-formly-material - npm Package Compare versions

Comparing version 0.9.0 to 0.10.0

docs/wrappers/divider.md

7

CHANGELOG.md

@@ -6,2 +6,9 @@ Change Log

[0.10.0](https://github.com/formly-js/angular-formly-templates-material/compare/v0.9.0...v0.10.0)
### Added
- (textarea) **grow** option (equivalent to md-no-autogrow)
- **divider** wrapper ([see documentation](docs/wrappers/divider.md)\)
[0.9.0](https://github.com/formly-js/angular-formly-templates-material/compare/v0.8.0...v0.9.0)

@@ -8,0 +15,0 @@

274

dist/formly-material.js
/*!
* angular-formly-material JavaScript Library v0.9.0
* angular-formly-material JavaScript Library v0.10.0
*

@@ -80,7 +80,7 @@ * @license MIT (http://license.angular-formly.com)

var _wrappers = __webpack_require__(4);
var _wrappers = __webpack_require__(6);
var _wrappers2 = _interopRequireDefault(_wrappers);
var _types = __webpack_require__(11);
var _types = __webpack_require__(15);

@@ -127,3 +127,7 @@ var _types2 = _interopRequireDefault(_types);

exports['default'] = [_mdThemeManipulator2['default']];
var _mdNoAutogrow = __webpack_require__(5);
var _mdNoAutogrow2 = _interopRequireDefault(_mdNoAutogrow);
exports['default'] = [_mdThemeManipulator2['default'], _mdNoAutogrow2['default']];
module.exports = exports['default'];

@@ -133,3 +137,3 @@

/* 3 */
/***/ function(module, exports) {
/***/ function(module, exports, __webpack_require__) {

@@ -139,42 +143,94 @@ 'use strict';

Object.defineProperty(exports, '__esModule', {
value: true
value: true
});
var _helpersIndexJs = __webpack_require__(4);
exports['default'] = function (formlyConfigProvider) {
function addIfNotPresent(nodes, attr, val) {
angular.forEach(nodes, function (node) {
if (!node.getAttribute(attr)) {
node.setAttribute(attr, val);
}
});
formlyConfigProvider.templateManipulators.preWrapper.push(function (template, options) {
if (angular.isDefined(options.templateOptions.theme)) {
return (0, _helpersIndexJs.ngModelAttrsManipulator)(template, options, 'md-theme', options.templateOptions.theme);
}
return template;
});
};
function getNgModelNodes(node) {
var query = "[ng-model], [data-ng-model]";
module.exports = exports['default'];
return node.querySelectorAll(query);
/***/ },
/* 4 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.ngModelAttrsManipulator = ngModelAttrsManipulator;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _angular = __webpack_require__(1);
var _angular2 = _interopRequireDefault(_angular);
function addIfNotPresent(nodes, attr, val) {
_angular2['default'].forEach(nodes, function (node) {
if (!node.getAttribute(attr)) {
node.setAttribute(attr, val);
}
});
}
formlyConfigProvider.templateManipulators.preWrapper.push(function (template, options) {
if (angular.isDefined(options.templateOptions.theme)) {
var node = document.createElement('div');
var skip = options.extras && options.extras.skipNgModelAttrsManipulator;
function getNgModelNodes(node) {
var query = "[ng-model], [data-ng-model]";
if (skip === true) {
return template;
}
node.innerHTML = template;
var modelNodes = getNgModelNodes(node);
return node.querySelectorAll(query);
}
if (!modelNodes || !modelNodes.length) {
return template;
}
function ngModelAttrsManipulator(template, options, attrName, attrValue) {
var node = document.createElement('div');
var skip = options.extras && options.extras.skipNgModelAttrsManipulator;
addIfNotPresent(modelNodes, 'md-theme', options.templateOptions.theme);
if (skip === true) {
return template;
}
node.innerHTML = template;
var modelNodes = getNgModelNodes(node);
return node.innerHTML;
}
return template;
});
if (!modelNodes || !modelNodes.length) {
return template;
}
addIfNotPresent(modelNodes, attrName, attrValue);
return node.innerHTML;
}
/***/ },
/* 5 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _helpersIndexJs = __webpack_require__(4);
exports['default'] = function (formlyConfigProvider) {
formlyConfigProvider.templateManipulators.preWrapper.push(function (template, options) {
if (!angular.isDefined(options.templateOptions.grow)) {
return template;
}
if (options.templateOptions.grow !== false) {
return template;
}
if (!angular.isDefined(options.type) || options.type !== 'textarea') {
return template;
}
return (0, _helpersIndexJs.ngModelAttrsManipulator)(template, options, 'md-no-autogrow');
});
};

@@ -185,3 +241,3 @@

/***/ },
/* 4 */
/* 6 */
/***/ function(module, exports, __webpack_require__) {

@@ -197,19 +253,23 @@

var _inputContainerInputContainer = __webpack_require__(5);
var _inputContainerInputContainer = __webpack_require__(7);
var _inputContainerInputContainer2 = _interopRequireDefault(_inputContainerInputContainer);
var _labelLabel = __webpack_require__(7);
var _labelLabel = __webpack_require__(9);
var _labelLabel2 = _interopRequireDefault(_labelLabel);
var _messagesMessages = __webpack_require__(9);
var _messagesMessages = __webpack_require__(11);
var _messagesMessages2 = _interopRequireDefault(_messagesMessages);
exports['default'] = [_inputContainerInputContainer2['default'], _labelLabel2['default'], _messagesMessages2['default']];
var _dividerDivider = __webpack_require__(13);
var _dividerDivider2 = _interopRequireDefault(_dividerDivider);
exports['default'] = [_inputContainerInputContainer2['default'], _labelLabel2['default'], _messagesMessages2['default'], _dividerDivider2['default']];
module.exports = exports['default'];
/***/ },
/* 5 */
/* 7 */
/***/ function(module, exports, __webpack_require__) {

@@ -225,3 +285,3 @@

var _inputContainerHtml = __webpack_require__(6);
var _inputContainerHtml = __webpack_require__(8);

@@ -240,3 +300,3 @@ var _inputContainerHtml2 = _interopRequireDefault(_inputContainerHtml);

/***/ },
/* 6 */
/* 8 */
/***/ function(module, exports) {

@@ -247,3 +307,3 @@

/***/ },
/* 7 */
/* 9 */
/***/ function(module, exports, __webpack_require__) {

@@ -259,3 +319,3 @@

var _labelHtml = __webpack_require__(8);
var _labelHtml = __webpack_require__(10);

@@ -281,9 +341,9 @@ var _labelHtml2 = _interopRequireDefault(_labelHtml);

/***/ },
/* 8 */
/* 10 */
/***/ function(module, exports) {
module.exports = "<label for=\"{{id}}\">\r\n {{to.label}}\r\n {{to.required ? '*' : ''}}\r\n</label>\r\n<formly-transclude></formly-transclude>\r\n";
module.exports = "<label for=\"{{id}}\">\r\n {{to.label}}\r\n</label>\r\n<formly-transclude></formly-transclude>\r\n";
/***/ },
/* 9 */
/* 11 */
/***/ function(module, exports, __webpack_require__) {

@@ -299,3 +359,3 @@

var _messagesHtml = __webpack_require__(10);
var _messagesHtml = __webpack_require__(12);

@@ -314,3 +374,3 @@ var _messagesHtml2 = _interopRequireDefault(_messagesHtml);

/***/ },
/* 10 */
/* 12 */
/***/ function(module, exports) {

@@ -321,3 +381,3 @@

/***/ },
/* 11 */
/* 13 */
/***/ function(module, exports, __webpack_require__) {

@@ -333,35 +393,73 @@

var _checkboxCheckbox = __webpack_require__(12);
var _dividerHtml = __webpack_require__(14);
var _dividerHtml2 = _interopRequireDefault(_dividerHtml);
exports['default'] = function (formlyConfigProvider) {
formlyConfigProvider.setWrapper({
name: 'divider',
template: _dividerHtml2['default'],
apiCheck: function apiCheck(check) {
return {
templateOptions: {
divider: check.oneOf(['before', 'after']).optional
}
};
}
});
};
module.exports = exports['default'];
/***/ },
/* 14 */
/***/ function(module, exports) {
module.exports = "<md-divider ng-if=\"to.divider === 'before'\"></md-divider>\r\n<formly-transclude></formly-transclude>\r\n<md-divider ng-if=\"to.divider !== 'before'\"></md-divider>\r\n";
/***/ },
/* 15 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _checkboxCheckbox = __webpack_require__(16);
var _checkboxCheckbox2 = _interopRequireDefault(_checkboxCheckbox);
var _chipsChips = __webpack_require__(14);
var _chipsChips = __webpack_require__(18);
var _chipsChips2 = _interopRequireDefault(_chipsChips);
var _datepickerDatepicker = __webpack_require__(16);
var _datepickerDatepicker = __webpack_require__(20);
var _datepickerDatepicker2 = _interopRequireDefault(_datepickerDatepicker);
var _inputInput = __webpack_require__(18);
var _inputInput = __webpack_require__(22);
var _inputInput2 = _interopRequireDefault(_inputInput);
var _radioRadio = __webpack_require__(20);
var _radioRadio = __webpack_require__(24);
var _radioRadio2 = _interopRequireDefault(_radioRadio);
var _selectSelect = __webpack_require__(22);
var _selectSelect = __webpack_require__(26);
var _selectSelect2 = _interopRequireDefault(_selectSelect);
var _sliderSlider = __webpack_require__(24);
var _sliderSlider = __webpack_require__(28);
var _sliderSlider2 = _interopRequireDefault(_sliderSlider);
var _switchSwitch = __webpack_require__(26);
var _switchSwitch = __webpack_require__(30);
var _switchSwitch2 = _interopRequireDefault(_switchSwitch);
var _textareaTextarea = __webpack_require__(28);
var _textareaTextarea = __webpack_require__(32);

@@ -374,3 +472,3 @@ var _textareaTextarea2 = _interopRequireDefault(_textareaTextarea);

/***/ },
/* 12 */
/* 16 */
/***/ function(module, exports, __webpack_require__) {

@@ -386,3 +484,3 @@

var _checkboxHtml = __webpack_require__(13);
var _checkboxHtml = __webpack_require__(17);

@@ -401,3 +499,3 @@ var _checkboxHtml2 = _interopRequireDefault(_checkboxHtml);

/***/ },
/* 13 */
/* 17 */
/***/ function(module, exports) {

@@ -408,3 +506,3 @@

/***/ },
/* 14 */
/* 18 */
/***/ function(module, exports, __webpack_require__) {

@@ -420,3 +518,3 @@

var _chipsHtml = __webpack_require__(15);
var _chipsHtml = __webpack_require__(19);

@@ -454,3 +552,3 @@ var _chipsHtml2 = _interopRequireDefault(_chipsHtml);

/***/ },
/* 15 */
/* 19 */
/***/ function(module, exports) {

@@ -461,3 +559,3 @@

/***/ },
/* 16 */
/* 20 */
/***/ function(module, exports, __webpack_require__) {

@@ -473,3 +571,3 @@

var _datepickerHtml = __webpack_require__(17);
var _datepickerHtml = __webpack_require__(21);

@@ -515,3 +613,3 @@ var _datepickerHtml2 = _interopRequireDefault(_datepickerHtml);

/***/ },
/* 17 */
/* 21 */
/***/ function(module, exports) {

@@ -522,3 +620,3 @@

/***/ },
/* 18 */
/* 22 */
/***/ function(module, exports, __webpack_require__) {

@@ -534,3 +632,3 @@

var _inputHtml = __webpack_require__(19);
var _inputHtml = __webpack_require__(23);

@@ -557,3 +655,3 @@ var _inputHtml2 = _interopRequireDefault(_inputHtml);

/***/ },
/* 19 */
/* 23 */
/***/ function(module, exports) {

@@ -564,3 +662,3 @@

/***/ },
/* 20 */
/* 24 */
/***/ function(module, exports, __webpack_require__) {

@@ -576,3 +674,3 @@

var _radioHtml = __webpack_require__(21);
var _radioHtml = __webpack_require__(25);

@@ -600,3 +698,3 @@ var _radioHtml2 = _interopRequireDefault(_radioHtml);

/***/ },
/* 21 */
/* 25 */
/***/ function(module, exports) {

@@ -607,3 +705,3 @@

/***/ },
/* 22 */
/* 26 */
/***/ function(module, exports, __webpack_require__) {

@@ -619,3 +717,3 @@

var _selectHtml = __webpack_require__(23);
var _selectHtml = __webpack_require__(27);

@@ -654,3 +752,3 @@ var _selectHtml2 = _interopRequireDefault(_selectHtml);

/***/ },
/* 23 */
/* 27 */
/***/ function(module, exports) {

@@ -661,3 +759,3 @@

/***/ },
/* 24 */
/* 28 */
/***/ function(module, exports, __webpack_require__) {

@@ -673,3 +771,3 @@

var _sliderHtml = __webpack_require__(25);
var _sliderHtml = __webpack_require__(29);

@@ -714,3 +812,3 @@ var _sliderHtml2 = _interopRequireDefault(_sliderHtml);

/***/ },
/* 25 */
/* 29 */
/***/ function(module, exports) {

@@ -721,3 +819,3 @@

/***/ },
/* 26 */
/* 30 */
/***/ function(module, exports, __webpack_require__) {

@@ -733,3 +831,3 @@

var _switchHtml = __webpack_require__(27);
var _switchHtml = __webpack_require__(31);

@@ -748,3 +846,3 @@ var _switchHtml2 = _interopRequireDefault(_switchHtml);

/***/ },
/* 27 */
/* 31 */
/***/ function(module, exports) {

@@ -755,3 +853,3 @@

/***/ },
/* 28 */
/* 32 */
/***/ function(module, exports, __webpack_require__) {

@@ -767,3 +865,3 @@

var _textareaHtml = __webpack_require__(29);
var _textareaHtml = __webpack_require__(33);

@@ -781,2 +879,5 @@ var _textareaHtml2 = _interopRequireDefault(_textareaHtml);

cols: { attribute: 'cols' }
},
templateOptions: {
grow: true
}

@@ -788,3 +889,4 @@ },

rows: check.number.optional,
cols: check.number.optional
cols: check.number.optional,
grow: check.bool.optional
}

@@ -799,3 +901,3 @@ };

/***/ },
/* 29 */
/* 33 */
/***/ function(module, exports) {

@@ -802,0 +904,0 @@

@@ -1,3 +0,3 @@

/*! angular-formly-material JavaScript Library v0.9.0 | 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),p=o(s),f="formlyMaterial";l["default"].module(f,["ngMessages","ngMaterial","formly"]).config(["formlyConfigProvider",function(e){var t=[r["default"],d["default"],p["default"]];t.forEach(function(t){for(var n=0;n<t.length;n++)t[n](e)})}]),t["default"]=f,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),p=o(s),f=n(20),c=o(f),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"],p["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"},onClose:{bound:"md-on-close"},onOpen:{bound:"md-on-open"}}},apiCheck:function(e){return{templateOptions:{options:e.arrayOf(e.object),multiple:e.bool.optional,labelProp:e.string.optional,valueProp:e.string.optional,onClose:e.func.optional,onOpen:e.func.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>"}])});
/*! angular-formly-material JavaScript Library v0.10.0 | 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),r=o(a),u=n(2),l=o(u),i=n(6),d=o(i),s=n(15),f=o(s),p="formlyMaterial";r["default"].module(p,["ngMessages","ngMaterial","formly"]).config(["formlyConfigProvider",function(e){var t=[l["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),r=o(a),u=n(5),l=o(u);t["default"]=[r["default"],l["default"]],e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(4);t["default"]=function(e){e.templateManipulators.preWrapper.push(function(e,t){return angular.isDefined(t.templateOptions.theme)?(0,o.ngModelAttrsManipulator)(e,t,"md-theme",t.templateOptions.theme):e})},e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(e,t,n){i["default"].forEach(e,function(e){e.getAttribute(t)||e.setAttribute(t,n)})}function r(e){var t="[ng-model], [data-ng-model]";return e.querySelectorAll(t)}function u(e,t,n,o){var u=document.createElement("div"),l=t.extras&&t.extras.skipNgModelAttrsManipulator;if(l===!0)return e;u.innerHTML=e;var i=r(u);return i&&i.length?(a(i,n,o),u.innerHTML):e}Object.defineProperty(t,"__esModule",{value:!0}),t.ngModelAttrsManipulator=u;var l=n(1),i=o(l)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(4);t["default"]=function(e){e.templateManipulators.preWrapper.push(function(e,t){return angular.isDefined(t.templateOptions.grow)?t.templateOptions.grow!==!1?e:angular.isDefined(t.type)&&"textarea"===t.type?(0,o.ngModelAttrsManipulator)(e,t,"md-no-autogrow"):e: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(7),r=o(a),u=n(9),l=o(u),i=n(11),d=o(i),s=n(13),f=o(s);t["default"]=[r["default"],l["default"],d["default"],f["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(8),r=o(a);t["default"]=function(e){e.setWrapper({name:"inputContainer",template:r["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(10),r=o(a);t["default"]=function(e){e.setWrapper({name:"label",template:r["default"],apiCheck:function(e){return{templateOptions:{label:e.string}}}})},e.exports=t["default"]},function(e,t){e.exports="<label for={{id}}>{{to.label}}</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(12),r=o(a);t["default"]=function(e){e.setWrapper({name:"messages",template:r["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(14),r=o(a);t["default"]=function(e){e.setWrapper({name:"divider",template:r["default"],apiCheck:function(e){return{templateOptions:{divider:e.oneOf(["before","after"]).optional}}}})},e.exports=t["default"]},function(e,t){e.exports="<md-divider ng-if=\"to.divider === 'before'\"></md-divider><formly-transclude></formly-transclude><md-divider ng-if=\"to.divider !== 'before'\"></md-divider>"},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(16),r=o(a),u=n(18),l=o(u),i=n(20),d=o(i),s=n(22),f=o(s),p=n(24),c=o(p),m=n(26),b=o(m),g=n(28),_=o(g),v=n(30),y=o(v),M=n(32),x=o(M);t["default"]=[r["default"],l["default"],d["default"],f["default"],c["default"],b["default"],_["default"],y["default"],x["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(17),r=o(a);t["default"]=function(e){e.setType({name:"checkbox",template:r["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(19),r=o(a);t["default"]=function(e){e.setType({name:"chips",template:r["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(21),r=o(a);t["default"]=function(e){e.setType({name:"datepicker",template:r["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(23),r=o(a);t["default"]=function(e){e.setType({name:"input",template:r["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(25),r=o(a);t["default"]=function(e){e.setType({name:"radio",template:r["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(27),r=o(a);t["default"]=function(e){e.setType({name:"select",template:r["default"],wrapper:["label","messages","inputContainer"],defaultOptions:{ngModelAttrs:{multiple:{bound:"multiple"},onClose:{bound:"md-on-close"},onOpen:{bound:"md-on-open"}}},apiCheck:function(e){return{templateOptions:{options:e.arrayOf(e.object),multiple:e.bool.optional,labelProp:e.string.optional,valueProp:e.string.optional,onClose:e.func.optional,onOpen:e.func.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(29),r=o(a);t["default"]=function(e){e.setType({name:"slider",template:r["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(31),r=o(a);t["default"]=function(e){e.setType({name:"switch",template:r["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(33),r=o(a);t["default"]=function(e){e.setType({name:"textarea",template:r["default"],wrapper:["label","messages","inputContainer"],defaultOptions:{ngModelAttrs:{rows:{attribute:"rows"},cols:{attribute:"cols"}},templateOptions:{grow:!0}},apiCheck:function(e){return{templateOptions:{rows:e.number.optional,cols:e.number.optional,grow:e.bool.optional}}}})},e.exports=t["default"]},function(e,t){e.exports="<textarea ng-model=model[options.key]></textarea>"}])});
//# sourceMappingURL=formly-material.min.js.map

@@ -1,4 +0,7 @@

# textarea
## textarea
textarea
========
textarea
--------
### Example

@@ -8,8 +11,9 @@

{
"type": "textarea",
"key": "bio",
"templateOptions": {
"label": "Biography",
"theme": "custom",
"rows": 5
type: "textarea",
key: "bio",
templateOptions: {
label: "Biography",
theme: "custom",
rows: 5,
grow: false
}

@@ -21,8 +25,14 @@ }

#### templateOptions.label _: string_
#### templateOptions.label *: string*
#### templateOptions.theme _: string_
#### templateOptions.theme *: string*
#### templateOptions.rows _: integer_
#### templateOptions.rows *: integer*
Number of rows
Number of rows
#### templateOptions.grow *: boolean (default true)*
Equivalent to md-no-autogrow
When present, textareas will not grow automatically.

@@ -1,2 +0,5 @@

# input-container
## md-input-container
input-container
===============
md-input-container
------------------

@@ -1,2 +0,7 @@

# label
## label
label
=====
label
-----
### templateOptions.label *{String}*

@@ -1,2 +0,5 @@

# messages
## ng-messages
messages
========
ng-messages
-----------

@@ -7,3 +7,3 @@ // package metadata file for AtmosphereJS

summary: '(official): Material design templates for angular-formly',
version: '0.9.0',
version: '0.10.0',
documentation: 'README.md',

@@ -10,0 +10,0 @@ git: 'https://github.com/formly-js/angular-formly-templates-material.git'

{
"name": "angular-formly-material",
"version": "0.9.0",
"version": "0.10.0",
"description": "Material design templates for angular-formly",

@@ -5,0 +5,0 @@ "main": "dist/formly-material.js",

FormlyMaterial
==============
[![Join the chat at https://gitter.im/formly-js/angular-formly-templates-material](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/formly-js/angular-formly-templates-material?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![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)
[![Join the chat at https://gitter.im/formly-js/angular-formly-templates-material](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/formly-js/angular-formly-templates-material?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![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)
Material Design Templates for [Angular-Formly](http://angular-formly.com). Modern & flexible forms configured easily in a JSON object.

@@ -67,2 +75,3 @@

- [messages](docs/wrappers/messages.md)
- [divider](docs/wrappers/divider.md)

@@ -94,4 +103,7 @@ Common settings

- [x] md-theme
- [x] add md-on-close and md-on-open to md-select
- [x] add divider wrapper (md-divider)
- [x] add md-no-autogrow to textare
- [ ] e2e tests
Requests (?). Post an issue.
import mdThemeManipulator from './md-theme-manipulator';
import mdNoAutogrow from './md-no-autogrow';
export default [mdThemeManipulator];
export default [mdThemeManipulator, mdNoAutogrow];

@@ -0,40 +1,10 @@

import {ngModelAttrsManipulator} from './../helpers/index.js';
export default (formlyConfigProvider) => {
function addIfNotPresent(nodes, attr, val) {
angular.forEach(nodes, (node) => {
if (!node.getAttribute(attr)) {
node.setAttribute(attr, val)
}
});
formlyConfigProvider.templateManipulators.preWrapper.push((template, options) => {
if (angular.isDefined(options.templateOptions.theme)) {
return ngModelAttrsManipulator(template, options, 'md-theme', options.templateOptions.theme);
}
function getNgModelNodes(node) {
const query = "[ng-model], [data-ng-model]";
return node.querySelectorAll(query)
}
formlyConfigProvider.templateManipulators.preWrapper.push((template, options) => {
if (angular.isDefined(options.templateOptions.theme)) {
const node = document.createElement('div');
const skip = options.extras && options.extras.skipNgModelAttrsManipulator;
if (skip === true) {
return template
}
node.innerHTML = template;
const modelNodes = getNgModelNodes(node);
if (!modelNodes || !modelNodes.length) {
return template;
}
addIfNotPresent(modelNodes, 'md-theme', options.templateOptions.theme);
return node.innerHTML;
}
return template;
});
}
return template;
});
};

@@ -12,2 +12,5 @@ import template from './textarea.html';

cols: {attribute: 'cols'}
},
templateOptions: {
grow: true
}

@@ -18,6 +21,7 @@ },

rows: check.number.optional,
cols: check.number.optional
cols: check.number.optional,
grow: check.bool.optional
}
})
});
}
}
import inputContainerWrapper from './input-container/input-container';
import labelWrapper from './label/label';
import messagesWrapper from './messages/messages';
import dividerWrapper from './divider/divider';

@@ -8,3 +9,4 @@ export default [

labelWrapper,
messagesWrapper
];
messagesWrapper,
dividerWrapper
];

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc