3 rader
No EOL
9,6 KiB
JavaScript
3 rader
No EOL
9,6 KiB
JavaScript
//! angular-formly-templates-bootstrap version 0.0.0-semantically-released.0 built with ♥ by Astrism <astrisms@gmail.com>, Kent C. Dodds <kent@doddsfamily.us> (ó ì_í)=óò=(ì_í ò)
|
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("angular"),require("api-check"),require("angular-formly")):"function"==typeof define&&define.amd?define(["angular","api-check","angular-formly"],t):"object"==typeof exports?exports.ngFormlyTemplatesBootstrap=t(require("angular"),require("api-check"),require("angular-formly")):e.ngFormlyTemplatesBootstrap=t(e.angular,e.apiCheck,e.ngFormly)}(this,function(e,t,o){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";e.exports=o(2)},function(e,t,o){"use strict";var n=o(20);n.version||(n=window.angular),e.exports=n},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="formlyBootstrap",r=o(1),i=r.module(n,[o(22)]);i.constant("formlyBootstrapApiCheck",o(21)({output:{prefix:"angular-formly-bootstrap"}})),i.constant("formlyBootstrapVersion","0.0.0-semantically-released.0"),o(13)(i),o(7)(i),o(5)(i),t["default"]=n,e.exports=t["default"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){function t(e,t){var n=o(14),r=t.shape({"class":t.string.optional,text:t.string.optional,onClick:t.func.optional}).strict.optional,i=t.shape({templateOptions:t.shape({addonLeft:r,addonRight:r})});e.templateManipulators.preWrapper.push(function(e,o){return o.templateOptions.addonLeft||o.templateOptions.addonRight?(t.warn([i],[o]),n.replace("<formly-transclude></formly-transclude>",e)):e})}e.run(t),t.$inject=["formlyConfig","formlyBootstrapApiCheck"]},e.exports=t["default"]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){function t(e){e.templateManipulators.preWrapper.push(function(e,t,o){if(angular.isDefined(t.templateOptions.description)){var n=document.createElement("div");n.appendChild(angular.element(e)[0]),n.appendChild(angular.element('<p id="'+o.id+'_description"class="help-block"ng-if="to.description">{{to.description}}</p>')[0]);var r=angular.element(n.querySelectorAll("[ng-model]"));return r&&r.attr("aria-describedby",o.id+"_description"),n.innerHTML}return e})}e.run(t),t.$inject=["formlyConfig"]},e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(3),i=n(r),a=o(4),l=n(a);t["default"]=function(e){i["default"](e),l["default"](e)},e.exports=t["default"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){function t(e){e.setType({name:"checkbox",template:o(15),wrapper:["bootstrapHasError"],apiCheck:function(e){return{templateOptions:{label:e.string}}}})}e.config(t),t.$inject=["formlyConfigProvider"]},e.exports=t["default"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){o(6)(e),o(9)(e),o(8)(e),o(10)(e),o(11)(e),o(12)(e)},e.exports=t["default"]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){function t(e){e.setType({name:"input",template:'<input class="form-control" ng-model="model[options.key]">',wrapper:["bootstrapLabel","bootstrapHasError"]})}e.config(t),t.$inject=["formlyConfigProvider"]},e.exports=t["default"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){function t(e){e.setType({name:"multiCheckbox",template:o(16),wrapper:["bootstrapLabel","bootstrapHasError"],apiCheck:function(e){return{templateOptions:{options:e.arrayOf(e.object),labelProp:e.string.optional,valueProp:e.string.optional}}},defaultOptions:{noFormControl:!1,ngModelAttrs:{required:{attribute:"",bound:""}}},controller:["$scope",function(e){function t(t){var o;e.to.required&&(o=angular.isArray(e.model[r.key])&&e.model[r.key].length>0&&t,e.fc.$setValidity("required",o))}function o(){e.model[r.key]=[],angular.forEach(e.multiCheckbox.checked,function(t,o){t&&e.model[r.key].push(n.options[o][n.valueProp||"value"])}),e.fc.$setTouched(),t(!0),e.to.onChange&&e.to.onChange()}var n=e.to,r=e.options;if(e.multiCheckbox={checked:[],change:o},e.$watch("model",function(t){var o,i;Object.keys(t).length&&(o=t[r.key],e.$watch("to.options",function(t){if(t&&Array.isArray(t)&&Array.isArray(o)){i=n.valueProp||"value";for(var r=0;r<t.length;r++)e.multiCheckbox.checked[r]=-1!==o.indexOf(t[r][i])}}))},!0),r.expressionProperties&&r.expressionProperties["templateOptions.required"]&&e.$watch(function(){return e.to.required},function(e){t(e)}),e.to.required)var i=e.$watch("fc",function(e){e&&(t(!0),i())})}]})}e.config(t),t.$inject=["formlyConfigProvider"]},e.exports=t["default"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){function t(e){e.setType({name:"radio",template:o(17),wrapper:["bootstrapLabel","bootstrapHasError"],defaultOptions:{noFormControl:!1},apiCheck:function(e){return{templateOptions:{options:e.arrayOf(e.object),labelProp:e.string.optional,valueProp:e.string.optional,inline:e.bool.optional}}}})}e.config(t),t.$inject=["formlyConfigProvider"]},e.exports=t["default"]},function(e,t){"use strict";function o(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){function t(e){e.setType({name:"select",template:n,wrapper:["bootstrapLabel","bootstrapHasError"],defaultOptions:function(e){var t=e.templateOptions.ngOptions||"option[to.valueProp || 'value'] as option[to.labelProp || 'name'] group by option[to.groupProp || 'group'] for option in to.options";return{ngModelAttrs:o({},t,{value:e.templateOptions.optionsAttr||"ng-options"})}},apiCheck:function(e){return{templateOptions:{options:e.arrayOf(e.object),optionsAttr:e.string.optional,labelProp:e.string.optional,valueProp:e.string.optional,groupProp:e.string.optional}}}})}e.config(t);var n='<select class="form-control" ng-model="model[options.key]"></select>';t.$inject=["formlyConfigProvider"]},e.exports=t["default"]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){function t(e){e.setType({name:"textarea",template:'<textarea class="form-control" ng-model="model[options.key]"></textarea>',wrapper:["bootstrapLabel","bootstrapHasError"],defaultOptions:{ngModelAttrs:{rows:{attribute:"rows"},cols:{attribute:"cols"}}},apiCheck:function(e){return{templateOptions:{rows:e.number.optional,cols:e.number.optional}}}})}e.config(t),t.$inject=["formlyConfigProvider"]},e.exports=t["default"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){function t(e){e.setWrapper([{name:"bootstrapLabel",template:o(19),apiCheck:function(e){return{templateOptions:{label:e.string.optional,required:e.bool.optional,labelSrOnly:e.bool.optional}}}},{name:"bootstrapHasError",template:o(18)}])}e.config(t),t.$inject=["formlyConfigProvider"]},e.exports=t["default"]},function(e,t){e.exports='<div ng-class="{\'input-group\': to.addonLeft || to.addonRight}">\n <div class="input-group-addon"\n ng-if="to.addonLeft"\n ng-style="{cursor: to.addonLeft.onClick ? \'pointer\' : \'inherit\'}"\n ng-click="to.addonLeft.onClick(options, this, $event)">\n <i class="{{to.addonLeft.class}}" ng-if="to.addonLeft.class"></i>\n <span ng-if="to.addonLeft.text">{{to.addonLeft.text}}</span>\n </div>\n <formly-transclude></formly-transclude>\n <div class="input-group-addon"\n ng-if="to.addonRight"\n ng-style="{cursor: to.addonRight.onClick ? \'pointer\' : \'inherit\'}"\n ng-click="to.addonRight.onClick(options, this, $event)">\n <i class="{{to.addonRight.class}}" ng-if="to.addonRight.class"></i>\n <span ng-if="to.addonRight.text">{{to.addonRight.text}}</span>\n </div>\n</div>\n'},function(e,t){e.exports='<div class="checkbox">\n <label>\n <input type="checkbox"\n class="formly-field-checkbox"\n ng-model="model[options.key]">\n {{to.label}}\n {{to.required ? \'*\' : \'\'}}\n </label>\n</div>\n'},function(e,t){e.exports='<div class="radio-group">\n <div ng-repeat="(key, option) in to.options" class="checkbox">\n <label>\n <input type="checkbox"\n id="{{id + \'_\'+ $index}}"\n ng-model="multiCheckbox.checked[$index]"\n ng-change="multiCheckbox.change()">\n {{option[to.labelProp || \'name\']}}\n </label>\n </div>\n</div>\n'},function(e,t){e.exports='<div class="radio-group">\n <div ng-repeat="(key, option) in to.options" ng-class="{ \'radio\': !to.inline, \'radio-inline\': to.inline }">\n <label>\n <input type="radio"\n id="{{id + \'_\'+ $index}}"\n tabindex="0"\n ng-value="option[to.valueProp || \'value\']"\n ng-model="model[options.key]">\n {{option[to.labelProp || \'name\']}}\n </label>\n </div>\n</div>\n'},function(e,t){e.exports='<div class="form-group" ng-class="{\'has-error\': showError}">\n <formly-transclude></formly-transclude>\n</div>\n'},function(e,t){e.exports="<div>\n <label for=\"{{id}}\" class=\"control-label {{to.labelSrOnly ? 'sr-only' : ''}}\" ng-if=\"to.label\">\n {{to.label}}\n {{to.required ? '*' : ''}}\n </label>\n <formly-transclude></formly-transclude>\n</div>\n"},function(t,o){t.exports=e},function(e,o){e.exports=t},function(e,t){e.exports=o}])});
|
|
//# sourceMappingURL=angular-formly-templates-bootstrap.min.js.map
|