angular-formly-templates-ionic-validation
Advanced tools
Comparing version 0.0.0-semantically-released to 0.0.0
@@ -1,2 +0,2 @@ | ||
//! angular-formly-templates-ionic-validation version 0.0.0-semantically-released built with ♥ by Astrism <astrisms@gmail.com>, Kent C. Dodds <kent@doddsfamily.us> (ó ì_í)=óò=(ì_í ò) | ||
//! angular-formly-templates-ionic-validation version 0.0.0 built with ♥ by Astrism <astrisms@gmail.com>, Kent C. Dodds <kent@doddsfamily.us> (ó ì_í)=óò=(ì_í ò) | ||
@@ -84,3 +84,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
})); | ||
ngModule.constant('formlyIonicVersion', ("0.0.0-semantically-released")); | ||
ngModule.constant('formlyIonicVersion', ("0.0.0")); | ||
@@ -1135,3 +1135,4 @@ requireAll(wrappers).forEach(function (wrapperFactory) { | ||
labelProp: check.string.optional, | ||
valueProp: check.string.optional | ||
valueProp: check.string.optional, | ||
icon: check.string.optional | ||
} | ||
@@ -1160,3 +1161,3 @@ }; | ||
var template = '<i class="icon" ng-if="::to.iconLeft" ng-class="::to.iconLeft"></i>\n <input type="range" ng-model="model[options.key]" step="{{to.step}}"/>\n <i class="icon" ng-if="::to.iconRight" ng-class="::to.iconRight"></i>'; | ||
var template = '<i class="icon" ng-if="::to.iconLeft" ng-class="::to.iconLeft"></i>\n <input type="range" ng-model="model[options.key]"/>\n <i class="icon" ng-if="::to.iconRight" ng-class="::to.iconRight"></i>'; | ||
@@ -1163,0 +1164,0 @@ function addInputType(formlyConfigProvider) { |
@@ -1,2 +0,2 @@ | ||
//! angular-formly-templates-ionic-validation version 0.0.0-semantically-released built with ♥ by Astrism <astrisms@gmail.com>, Kent C. Dodds <kent@doddsfamily.us> (ó ì_í)=óò=(ì_í ò) | ||
//! angular-formly-templates-ionic-validation version 0.0.0 built with ♥ by Astrism <astrisms@gmail.com>, Kent C. Dodds <kent@doddsfamily.us> (ó ì_í)=óò=(ì_í ò) | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("angular"),require("api-check"),require("angular-formly")):"function"==typeof define&&define.amd?define(["angular","api-check","angular-formly"],n):"object"==typeof exports?exports.ngFormlyTemplatesIonic=n(require("angular"),require("api-check"),require("angular-formly")):e.ngFormlyTemplatesIonic=n(e.angular,e.apiCheck,e.ngFormly)}(this,function(e,n,t){return function(e){function n(o){if(t[o])return t[o].exports;var i=t[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var t={};return n.m=e,n.c=t,n.p="",n(0)}([function(e,n,t){"use strict";e.exports=t(4)},function(e,n){/** | ||
@@ -7,3 +7,3 @@ * @license AngularJS v1.4.8 | ||
*/ | ||
!function(e,n,t){"use strict";function o(e){function n(e,n){return e?i(e)?e.indexOf(n)>=0:e.hasOwnProperty(n):void 0}return["$animate",function(e){return{restrict:"AE",transclude:"element",terminal:!0,require:"^^ngMessages",link:function(t,o,r,a,s){var l,c=o[0],u=r.ngMessage||r.when,p=r.ngMessageExp||r.whenExp,f=function(e){l=e?i(e)?e:e.split(/[\s,]+/):null,a.reRender()};p?(f(t.$eval(p)),t.$watchCollection(p,f)):f(u);var d,g;a.register(c,g={test:function(e){return n(l,e)},attach:function(){d||s(t,function(n){e.enter(n,null,o),d=n;var t=d.$$attachId=a.getAttachId();d.on("$destroy",function(){d&&d.$$attachId===t&&(a.deregister(c),g.detach())})})},detach:function(){if(d){var n=d;d=null,e.leave(n)}}})}}}]}var i=n.isArray,r=n.forEach,a=n.isString,s=n.element;n.module("ngMessages",[]).directive("ngMessages",["$animate",function(e){function n(e,n){return a(n)&&0===n.length||t(e.$eval(n))}function t(e){return a(e)?e.length:!!e}var o="ng-active",i="ng-inactive";return{require:"ngMessages",restrict:"AE",controller:["$element","$scope","$attrs",function(a,s,l){function c(e,n){for(var t=n,o=[];t&&t!==e;){var i=t.$$ngMessageNode;if(i&&i.length)return h[i];t.childNodes.length&&-1==o.indexOf(t)?(o.push(t),t=t.childNodes[t.childNodes.length-1]):t=t.previousSibling||t.parentNode}}function u(e,n,t){var o=h[t];if(f.head){var i=c(e,n);i?(o.next=i.next,i.next=o):(o.next=f.head,f.head=o)}else f.head=o}function p(e,n,t){var o=h[t],i=c(e,n);i?i.next=o.next:f.head=o.next}var f=this,d=0,g=0;this.getAttachId=function(){return g++};var m,v,h=this.messages={};this.render=function(c){c=c||{},m=!1,v=c;for(var u=n(s,l.ngMessagesMultiple)||n(s,l.multiple),p=[],d={},g=f.head,h=!1,y=0;null!=g;){y++;var x=g.message,b=!1;h||r(c,function(e,n){if(!b&&t(e)&&x.test(n)){if(d[n])return;d[n]=!0,b=!0,x.attach()}}),b?h=!u:p.push(x),g=g.next}r(p,function(e){e.detach()}),p.length!==y?e.setClass(a,o,i):e.setClass(a,i,o)},s.$watchCollection(l.ngMessages||l["for"],f.render),this.reRender=function(){m||(m=!0,s.$evalAsync(function(){m&&v&&f.render(v)}))},this.register=function(e,n){var t=d.toString();h[t]={message:n},u(a[0],e,t),e.$$ngMessageNode=t,d++,f.reRender()},this.deregister=function(e){var n=e.$$ngMessageNode;delete e.$$ngMessageNode,p(a[0],e,n),delete h[n],f.reRender()}}]}}]).directive("ngMessagesInclude",["$templateRequest","$document","$compile",function(e,n,t){return{restrict:"AE",require:"^^ngMessages",link:function(o,i,r){var a=r.ngMessagesInclude||r.src;e(a).then(function(e){t(e)(o,function(e){i.after(e);var t=s(n[0].createComment(" ngMessagesInclude: "+a+" "));i.after(t),i.remove()})})}}}]).directive("ngMessage",o("AE")).directive("ngMessageExp",o("A"))}(window,window.angular)},function(e,n,t){t(1),e.exports="ngMessages"},function(e,n,t){"use strict";var o=t(17);o.version||(o=window.angular),e.exports=o},function(e,n,t){"use strict";function o(e){return e.keys().map(e)}Object.defineProperty(n,"__esModule",{value:!0});var i="formlyIonic",r=t(3),a=r.module(i,[t(19),t(2)]),s=t(16),l=t(15);a.constant("formlyIonicApiCheck",t(18)({output:{prefix:"angular-formly-ionic"}})),a.constant("formlyIonicVersion","0.0.0-semantically-released"),o(s).forEach(function(e){e(a)}),o(l).forEach(function(e){e(a)}),n["default"]=i,e.exports=n["default"]},function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=function(e){function n(e){e.setType({name:"checkbox",template:t,wrapper:["validationMessages"],apiCheck:function(e){return{templateOptions:{label:e.string,checked:e.bool.optional}}}})}e.config(n);var t='<ion-checkbox ng-model="model[options.key]" ng-checked="to.checked">\n {{ to.label }}\n </ion-checkbox>';n.$inject=["formlyConfigProvider"]},e.exports=n["default"]},function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=function(e){function n(e){e.setType({name:"input",template:t,wrapper:["ionInput","validationMessages"],apiCheck:function(e){return{templateOptions:{type:e.string}}}})}e.config(n);var t='<input type="{{::to.type}}" ng-model="model[options.key]">';n.$inject=["formlyConfigProvider"]},e.exports=n["default"]},function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=function(e){function n(e){e.setType({name:"multiCheckbox",template:t,wrapper:["validationMessages"],apiCheck:function(e){return{templateOptions:{options:e.arrayOf(e.object),labelProp:e.string.optional,valueProp:e.string.optional}}},controller:["$scope",function(e){function n(n){var t;e.to.required&&(t=angular.isArray(e.model[i.key])&&e.model[i.key].length>0&&n,e.fc.$setValidity("required",t))}function t(){e.model[i.key]=[],angular.forEach(e.multiCheckbox.checked,function(n,t){n&&e.model[i.key].push(o.options[t][o.valueProp||"value"])}),e.fc.$setTouched(),n(!0)}var o=e.to,i=e.options;if(e.multiCheckbox={checked:[],change:t},e.$watch("model",function(n){var t,r;Object.keys(n).length&&(t=n[i.key],e.$watch("to.options",function(n){if(n&&Array.isArray(n)&&Array.isArray(t)){r=o.valueProp||"value";for(var i=0;i<n.length;i++)e.multiCheckbox.checked[i]=-1!==t.indexOf(n[i][r])}}))},!0),i.expressionProperties&&i.expressionProperties["templateOptions.required"]&&e.$watch(function(){return e.to.required},function(e){n(e)}),e.to.required)var r=e.$watch("fc",function(e){e&&(n(!0),r())})}]})}e.config(n);var t='<ion-list>\n <ion-checkbox ng-repeat="(key, option) in to.options"\n ng-model="multiCheckbox.checked[$index]"\n ng-change="multiCheckbox.change()">\n {{option[to.labelProp || \'name\']}}\n </ion-checkbox>\n </ion-list>';n.$inject=["formlyConfigProvider"]},e.exports=n["default"]},function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=function(e){function n(e){e.setType({name:"radio",template:t,wrapper:["validationMessages"],apiCheck:function(e){return{templateOptions:{options:e.arrayOf(e.object),labelProp:e.string.optional,valueProp:e.string.optional}}}})}e.config(n);var t='<ion-list>\n <ion-radio ng-repeat="(key, option) in ::to.options"\n ng-value="option[to.valueProp || \'value\']"\n ng-model="model[options.key]"\n icon="{{::to.icon}}">\n {{::option.title}}\n </ion-radio>\n </ion-list>';n.$inject=["formlyConfigProvider"]},e.exports=n["default"]},function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=function(e){function n(e){e.setType({name:"range",template:t,wrapper:["ionInput","validationMessages"],apiCheck:function(e){return{templateOptions:{iconLeft:e.string.optional,iconRight:e.string.optional}}}})}e.config(n);var t='<i class="icon" ng-if="::to.iconLeft" ng-class="::to.iconLeft"></i>\n <input type="range" ng-model="model[options.key]" step="{{to.step}}"/>\n <i class="icon" ng-if="::to.iconRight" ng-class="::to.iconRight"></i>';n.$inject=["formlyConfigProvider"]},e.exports=n["default"]},function(e,n){"use strict";function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=function(e){function n(e){e.setType({name:"select",template:o,wrapper:["ionInput","validationMessages"],defaultOptions:function(e){var n=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:t({},n,{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(n);var o='<select ng-model="model[options.key]"></select>';n.$inject=["formlyConfigProvider"]},e.exports=n["default"]},function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=function(e){function n(e){e.setType({name:"textarea",template:t,wrapper:["ionInput","validationMessages"],defaultOptions:{ngModelAttrs:{rows:{attribute:"rows"}}},apiCheck:function(e){return{templateOptions:{rows:e.number.optional,resize:e.bool.optional}}}})}e.config(n);var t='<textarea style="width:100%;" ng-class="::{\'no-resize\': !to.resize}" ng-model="model[options.key]"></textarea>';n.$inject=["formlyConfigProvider"]},e.exports=n["default"]},function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=function(e){function n(e){e.setType({name:"toggle",template:t,defaultOptions:{noFormControl:!1},apiCheck:function(e){return{templateOptions:{label:e.string,theme:e.string.optional}}}})}e.config(n);var t='<ion-toggle ng-model="model[options.key]" toggle-class="\'toggle-\'+{{to.theme}}">{{ ::to.label }}</ion-toggle>';n.$inject=["formlyConfigProvider"]},e.exports=n["default"]},function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=function(e){function n(e){e.setWrapper([{name:"ionInput",template:t,apiCheck:function(e){return{templateOptions:{inputClass:e.string.optional,icon:e.string.optional,label:e.string.optional}}}}])}e.config(n);var t='<ion-input class="item {{ to.inputClass }}"\n ng-class="{ \'has-error\' : options.formControl.$invalid && options.formControl.$touched, \'is-valid\' : options.formControl.$valid && options.formControl.$touched}">\n <i ng-if="::to.icon" class="icon" ng-class="::to.icon"></i>\n <ion-label ng-if="::to.label" ng-bind="::to.label"></ion-label>\n <formly-transclude></formly-transclude>\n </ion-input>';n.$inject=["formlyConfigProvider"]},e.exports=n["default"]},function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=function(e){function n(e){e.setWrapper([{name:"validationMessages",template:t}])}e.config(n);var t='<formly-transclude></formly-transclude>\n <ng-messages for="options.formControl.$error"\n class="formly-ionic-errors"\n ng-if="options.formControl.$touched && to.validation">\n <div ng-if="::to.validation.templateUrl" ng-messages-include="{{ ::to.validation.templateUrl }}"></div>\n <div ng-repeat="(name, message) in ::to.validation.messages"\n ng-message-exp="name"\n ng-if="::to.validation.messages">\n <i class="ion-information-circled"></i>\n {{::message}}\n </div>\n </ng-messages>';n.$inject=["formlyConfigProvider"]},e.exports=n["default"]},function(e,n,t){function o(e){return t(i(e))}function i(e){return r[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var r={"./checkbox.js":5,"./input.js":6,"./multiCheckbox.js":7,"./radio.js":8,"./range.js":9,"./select.js":10,"./textarea.js":11,"./toggle.js":12};o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id=15},function(e,n,t){function o(e){return t(i(e))}function i(e){return r[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var r={"./ionInput.js":13,"./validationMessages.js":14};o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id=16},function(n,t){n.exports=e},function(e,t){e.exports=n},function(e,n){e.exports=t}])}); | ||
!function(e,n,t){"use strict";function o(e){function n(e,n){return e?i(e)?e.indexOf(n)>=0:e.hasOwnProperty(n):void 0}return["$animate",function(e){return{restrict:"AE",transclude:"element",terminal:!0,require:"^^ngMessages",link:function(t,o,r,a,s){var l,c=o[0],u=r.ngMessage||r.when,f=r.ngMessageExp||r.whenExp,p=function(e){l=e?i(e)?e:e.split(/[\s,]+/):null,a.reRender()};f?(p(t.$eval(f)),t.$watchCollection(f,p)):p(u);var d,g;a.register(c,g={test:function(e){return n(l,e)},attach:function(){d||s(t,function(n){e.enter(n,null,o),d=n;var t=d.$$attachId=a.getAttachId();d.on("$destroy",function(){d&&d.$$attachId===t&&(a.deregister(c),g.detach())})})},detach:function(){if(d){var n=d;d=null,e.leave(n)}}})}}}]}var i=n.isArray,r=n.forEach,a=n.isString,s=n.element;n.module("ngMessages",[]).directive("ngMessages",["$animate",function(e){function n(e,n){return a(n)&&0===n.length||t(e.$eval(n))}function t(e){return a(e)?e.length:!!e}var o="ng-active",i="ng-inactive";return{require:"ngMessages",restrict:"AE",controller:["$element","$scope","$attrs",function(a,s,l){function c(e,n){for(var t=n,o=[];t&&t!==e;){var i=t.$$ngMessageNode;if(i&&i.length)return h[i];t.childNodes.length&&-1==o.indexOf(t)?(o.push(t),t=t.childNodes[t.childNodes.length-1]):t=t.previousSibling||t.parentNode}}function u(e,n,t){var o=h[t];if(p.head){var i=c(e,n);i?(o.next=i.next,i.next=o):(o.next=p.head,p.head=o)}else p.head=o}function f(e,n,t){var o=h[t],i=c(e,n);i?i.next=o.next:p.head=o.next}var p=this,d=0,g=0;this.getAttachId=function(){return g++};var m,v,h=this.messages={};this.render=function(c){c=c||{},m=!1,v=c;for(var u=n(s,l.ngMessagesMultiple)||n(s,l.multiple),f=[],d={},g=p.head,h=!1,y=0;null!=g;){y++;var x=g.message,b=!1;h||r(c,function(e,n){if(!b&&t(e)&&x.test(n)){if(d[n])return;d[n]=!0,b=!0,x.attach()}}),b?h=!u:f.push(x),g=g.next}r(f,function(e){e.detach()}),f.length!==y?e.setClass(a,o,i):e.setClass(a,i,o)},s.$watchCollection(l.ngMessages||l["for"],p.render),this.reRender=function(){m||(m=!0,s.$evalAsync(function(){m&&v&&p.render(v)}))},this.register=function(e,n){var t=d.toString();h[t]={message:n},u(a[0],e,t),e.$$ngMessageNode=t,d++,p.reRender()},this.deregister=function(e){var n=e.$$ngMessageNode;delete e.$$ngMessageNode,f(a[0],e,n),delete h[n],p.reRender()}}]}}]).directive("ngMessagesInclude",["$templateRequest","$document","$compile",function(e,n,t){return{restrict:"AE",require:"^^ngMessages",link:function(o,i,r){var a=r.ngMessagesInclude||r.src;e(a).then(function(e){t(e)(o,function(e){i.after(e);var t=s(n[0].createComment(" ngMessagesInclude: "+a+" "));i.after(t),i.remove()})})}}}]).directive("ngMessage",o("AE")).directive("ngMessageExp",o("A"))}(window,window.angular)},function(e,n,t){t(1),e.exports="ngMessages"},function(e,n,t){"use strict";var o=t(17);o.version||(o=window.angular),e.exports=o},function(e,n,t){"use strict";function o(e){return e.keys().map(e)}Object.defineProperty(n,"__esModule",{value:!0});var i="formlyIonic",r=t(3),a=r.module(i,[t(19),t(2)]),s=t(16),l=t(15);a.constant("formlyIonicApiCheck",t(18)({output:{prefix:"angular-formly-ionic"}})),a.constant("formlyIonicVersion","0.0.0"),o(s).forEach(function(e){e(a)}),o(l).forEach(function(e){e(a)}),n["default"]=i,e.exports=n["default"]},function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=function(e){function n(e){e.setType({name:"checkbox",template:t,wrapper:["validationMessages"],apiCheck:function(e){return{templateOptions:{label:e.string,checked:e.bool.optional}}}})}e.config(n);var t='<ion-checkbox ng-model="model[options.key]" ng-checked="to.checked">\n {{ to.label }}\n </ion-checkbox>';n.$inject=["formlyConfigProvider"]},e.exports=n["default"]},function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=function(e){function n(e){e.setType({name:"input",template:t,wrapper:["ionInput","validationMessages"],apiCheck:function(e){return{templateOptions:{type:e.string}}}})}e.config(n);var t='<input type="{{::to.type}}" ng-model="model[options.key]">';n.$inject=["formlyConfigProvider"]},e.exports=n["default"]},function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=function(e){function n(e){e.setType({name:"multiCheckbox",template:t,wrapper:["validationMessages"],apiCheck:function(e){return{templateOptions:{options:e.arrayOf(e.object),labelProp:e.string.optional,valueProp:e.string.optional}}},controller:["$scope",function(e){function n(n){var t;e.to.required&&(t=angular.isArray(e.model[i.key])&&e.model[i.key].length>0&&n,e.fc.$setValidity("required",t))}function t(){e.model[i.key]=[],angular.forEach(e.multiCheckbox.checked,function(n,t){n&&e.model[i.key].push(o.options[t][o.valueProp||"value"])}),e.fc.$setTouched(),n(!0)}var o=e.to,i=e.options;if(e.multiCheckbox={checked:[],change:t},e.$watch("model",function(n){var t,r;Object.keys(n).length&&(t=n[i.key],e.$watch("to.options",function(n){if(n&&Array.isArray(n)&&Array.isArray(t)){r=o.valueProp||"value";for(var i=0;i<n.length;i++)e.multiCheckbox.checked[i]=-1!==t.indexOf(n[i][r])}}))},!0),i.expressionProperties&&i.expressionProperties["templateOptions.required"]&&e.$watch(function(){return e.to.required},function(e){n(e)}),e.to.required)var r=e.$watch("fc",function(e){e&&(n(!0),r())})}]})}e.config(n);var t='<ion-list>\n <ion-checkbox ng-repeat="(key, option) in to.options"\n ng-model="multiCheckbox.checked[$index]"\n ng-change="multiCheckbox.change()">\n {{option[to.labelProp || \'name\']}}\n </ion-checkbox>\n </ion-list>';n.$inject=["formlyConfigProvider"]},e.exports=n["default"]},function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=function(e){function n(e){e.setType({name:"radio",template:t,wrapper:["validationMessages"],apiCheck:function(e){return{templateOptions:{options:e.arrayOf(e.object),labelProp:e.string.optional,valueProp:e.string.optional,icon:e.string.optional}}}})}e.config(n);var t='<ion-list>\n <ion-radio ng-repeat="(key, option) in ::to.options"\n ng-value="option[to.valueProp || \'value\']"\n ng-model="model[options.key]"\n icon="{{::to.icon}}">\n {{::option.title}}\n </ion-radio>\n </ion-list>';n.$inject=["formlyConfigProvider"]},e.exports=n["default"]},function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=function(e){function n(e){e.setType({name:"range",template:t,wrapper:["ionInput","validationMessages"],apiCheck:function(e){return{templateOptions:{iconLeft:e.string.optional,iconRight:e.string.optional}}}})}e.config(n);var t='<i class="icon" ng-if="::to.iconLeft" ng-class="::to.iconLeft"></i>\n <input type="range" ng-model="model[options.key]"/>\n <i class="icon" ng-if="::to.iconRight" ng-class="::to.iconRight"></i>';n.$inject=["formlyConfigProvider"]},e.exports=n["default"]},function(e,n){"use strict";function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=function(e){function n(e){e.setType({name:"select",template:o,wrapper:["ionInput","validationMessages"],defaultOptions:function(e){var n=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:t({},n,{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(n);var o='<select ng-model="model[options.key]"></select>';n.$inject=["formlyConfigProvider"]},e.exports=n["default"]},function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=function(e){function n(e){e.setType({name:"textarea",template:t,wrapper:["ionInput","validationMessages"],defaultOptions:{ngModelAttrs:{rows:{attribute:"rows"}}},apiCheck:function(e){return{templateOptions:{rows:e.number.optional,resize:e.bool.optional}}}})}e.config(n);var t='<textarea style="width:100%;" ng-class="::{\'no-resize\': !to.resize}" ng-model="model[options.key]"></textarea>';n.$inject=["formlyConfigProvider"]},e.exports=n["default"]},function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=function(e){function n(e){e.setType({name:"toggle",template:t,defaultOptions:{noFormControl:!1},apiCheck:function(e){return{templateOptions:{label:e.string,theme:e.string.optional}}}})}e.config(n);var t='<ion-toggle ng-model="model[options.key]" toggle-class="\'toggle-\'+{{to.theme}}">{{ ::to.label }}</ion-toggle>';n.$inject=["formlyConfigProvider"]},e.exports=n["default"]},function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=function(e){function n(e){e.setWrapper([{name:"ionInput",template:t,apiCheck:function(e){return{templateOptions:{inputClass:e.string.optional,icon:e.string.optional,label:e.string.optional}}}}])}e.config(n);var t='<ion-input class="item {{ to.inputClass }}"\n ng-class="{ \'has-error\' : options.formControl.$invalid && options.formControl.$touched, \'is-valid\' : options.formControl.$valid && options.formControl.$touched}">\n <i ng-if="::to.icon" class="icon" ng-class="::to.icon"></i>\n <ion-label ng-if="::to.label" ng-bind="::to.label"></ion-label>\n <formly-transclude></formly-transclude>\n </ion-input>';n.$inject=["formlyConfigProvider"]},e.exports=n["default"]},function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=function(e){function n(e){e.setWrapper([{name:"validationMessages",template:t}])}e.config(n);var t='<formly-transclude></formly-transclude>\n <ng-messages for="options.formControl.$error"\n class="formly-ionic-errors"\n ng-if="options.formControl.$touched && to.validation">\n <div ng-if="::to.validation.templateUrl" ng-messages-include="{{ ::to.validation.templateUrl }}"></div>\n <div ng-repeat="(name, message) in ::to.validation.messages"\n ng-message-exp="name"\n ng-if="::to.validation.messages">\n <i class="ion-information-circled"></i>\n {{::message}}\n </div>\n </ng-messages>';n.$inject=["formlyConfigProvider"]},e.exports=n["default"]},function(e,n,t){function o(e){return t(i(e))}function i(e){return r[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var r={"./checkbox.js":5,"./input.js":6,"./multiCheckbox.js":7,"./radio.js":8,"./range.js":9,"./select.js":10,"./textarea.js":11,"./toggle.js":12};o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id=15},function(e,n,t){function o(e){return t(i(e))}function i(e){return r[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var r={"./ionInput.js":13,"./validationMessages.js":14};o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id=16},function(n,t){n.exports=e},function(e,t){e.exports=n},function(e,n){e.exports=t}])}); | ||
//# sourceMappingURL=angular-formly-templates-ionic.min.js.map |
{ | ||
"name": "angular-formly-templates-ionic-validation", | ||
"version": "0.0.0-semantically-released", | ||
"version": "0.0.0", | ||
"author": "Charles Jacquin <charles.jacquin@ambient-it.net>", | ||
@@ -73,2 +73,2 @@ "contributors": [ | ||
} | ||
} | ||
} |
@@ -22,3 +22,4 @@ export default ngModule => { | ||
labelProp: check.string.optional, | ||
valueProp: check.string.optional | ||
valueProp: check.string.optional, | ||
icon: check.string.optional | ||
} | ||
@@ -25,0 +26,0 @@ }) |
@@ -5,3 +5,3 @@ export default ngModule => { | ||
const template = `<i class="icon" ng-if="::to.iconLeft" ng-class="::to.iconLeft"></i> | ||
<input type="range" ng-model="model[options.key]" step="{{to.step}}"/> | ||
<input type="range" ng-model="model[options.key]"/> | ||
<i class="icon" ng-if="::to.iconRight" ng-class="::to.iconRight"></i>`; | ||
@@ -8,0 +8,0 @@ |
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
1781
199492
0