angular-formly-templates-ionic
Advanced tools
Comparing version 0.0.1 to 0.1.0
{ | ||
"name": "angular-formly-templates-ionic", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"authors": [ | ||
@@ -5,0 +5,0 @@ "Astrism <astrisms@gmail.com>" |
@@ -43,34 +43,7 @@ angular.module('formlyIonic', ['formly'], ["formlyConfigProvider", function configFormlyIonic(formlyConfigProvider) { | ||
angular.module('formlyIonic').run(['$templateCache', function($templateCache) { | ||
'use strict'; | ||
$templateCache.put('fields/ion-checkbox.html', | ||
"<ion-checkbox ng-model=model[options.key]>{{options.templateOptions.label}}</ion-checkbox>" | ||
); | ||
$templateCache.put('fields/ion-input.html', | ||
"<label class=\"item item-input\"><input ng-model=model[options.key] placeholder={{options.templateOptions.placeholder}} type={{options.templateOptions.type}}></label>" | ||
); | ||
$templateCache.put('fields/ion-radio.html', | ||
"<ion-radio ng-model=model[options.key] ng-value=option.value>{{options.templateOptions.label}}</ion-radio>" | ||
); | ||
$templateCache.put('fields/ion-range.html', | ||
"<div class=\"item range\" ng-class=\"'range-' + options.templateOptions.rangeClass\"><span>{{options.templateOptions.label}}</span> <i class=icon ng-if=options.templateOptions.minIcon ng-class=\" options.templateOptions.minIcon\"></i> <input type=range min={{options.templateOptions.min}} max={{options.templateOptions.max}} step={{options.templateOptions.step}} value={{options.templateOptions.value}} ng-model=model[options.key]> <i class=icon ng-if=options.templateOptions.maxIcon ng-class=options.templateOptions.maxIcon></i></div>" | ||
); | ||
$templateCache.put('fields/ion-textarea.html', | ||
"<label class=\"item item-input\"><textarea placeholder={{options.templateOptions.placeholder}} ng-model=model[options.key]></textarea><label></label></label>" | ||
); | ||
$templateCache.put('fields/ion-toggle.html', | ||
"<ion-toggle ng-model=model[options.key] toggle-class=toggle-{{options.templateOptions.toggleClass}}>{{options.templateOptions.label}}</ion-toggle>" | ||
); | ||
}]); | ||
angular.module("formlyIonic").run(["$templateCache", function($templateCache) {$templateCache.put("ion-checkbox.html","<ion-checkbox ng-model=\"model[options.key]\">\n {{options.templateOptions.label}}\n</ion-checkbox>\n"); | ||
$templateCache.put("ion-input.html","<label class=\"item item-input\">\n <input ng-model=\"model[options.key]\" placeholder=\"{{options.templateOptions.placeholder}}\" type=\"{{options.templateOptions.type}}\">\n</label>\n"); | ||
$templateCache.put("ion-radio.html","<ion-radio ng-repeat=\"item in options.templateOptions.list\" ng-value=\"item.value\" ng-model=\"model[options.key]\" > \n{{ item.text }} \n</ion-radio>\n"); | ||
$templateCache.put("ion-range.html"," <div class=\"item range\"\n ng-class=\"\'range-\' + options.templateOptions.rangeClass\">\n\n <span>\n {{options.templateOptions.label}}\n </span>\n\n <i class=\"icon\"\n ng-if=\"options.templateOptions.minIcon\"\n ng-class=\" options.templateOptions.minIcon\"></i>\n\n <input type=\"range\"\n min=\"{{options.templateOptions.min}}\"\n max=\"{{options.templateOptions.max}}\"\n step=\"{{options.templateOptions.step}}\"\n value=\"{{options.templateOptions.value}}\"\n ng-model=\"model[options.key]\">\n\n <i class=\"icon\"\n ng-if=\"options.templateOptions.maxIcon\"\n ng-class=\"options.templateOptions.maxIcon\">\n </i>\n </div>\n"); | ||
$templateCache.put("ion-textarea.html","<label class=\"item item-input\">\n <textarea placeholder=\"{{options.templateOptions.placeholder}}\" ng-model=\"model[options.key]\"></textarea>\n<label>\n"); | ||
$templateCache.put("ion-toggle.html","<ion-toggle ng-model=\"model[options.key]\" toggle-class=\"toggle-{{options.templateOptions.toggleClass}}\">\n {{options.templateOptions.label}}\n</ion-toggle>\n");}]); |
@@ -1,2 +0,1 @@ | ||
angular.module("formlyIonic",["formly"],["formlyConfigProvider",function(a){"use strict";function b(a){return"fields/ion-"+a+".html"}angular.forEach(["checkbox","input","radio","range","textarea","toggle"],function(c){a.setType({name:c,templateUrl:b(c)})}),a.templateManipulators.preWrapper.push(function(a,b,c){if(b.templateOptions&&angular.isDefined(b.templateOptions.description)&&"radio"!==b.type&&"checkbox"!==b.type){var d=angular.element("<a></a>");d.append(a);var e=angular.element(d[0].querySelectorAll("[ng-model]"));return e?(d.append('<p id="'+c.id+'_description"class="help-block"ng-if="options.templateOptions.description">{{options.templateOptions.description}}</p>'),e.attr("aria-describedby",c.id+"_description"),d.html()):a}return a})}]),angular.module("formlyIonic").run(["$templateCache",function(a){"use strict";a.put("fields/ion-checkbox.html","<ion-checkbox ng-model=model[options.key]>{{options.templateOptions.label}}</ion-checkbox>"),a.put("fields/ion-input.html",'<label class="item item-input"><input ng-model=model[options.key] placeholder={{options.templateOptions.placeholder}} type={{options.templateOptions.type}}></label>'),a.put("fields/ion-radio.html","<ion-radio ng-model=model[options.key] ng-value=option.value>{{options.templateOptions.label}}</ion-radio>"),a.put("fields/ion-range.html",'<div class="item range" ng-class="\'range-\' + options.templateOptions.rangeClass"><span>{{options.templateOptions.label}}</span> <i class=icon ng-if=options.templateOptions.minIcon ng-class=" options.templateOptions.minIcon"></i> <input type=range min={{options.templateOptions.min}} max={{options.templateOptions.max}} step={{options.templateOptions.step}} value={{options.templateOptions.value}} ng-model=model[options.key]> <i class=icon ng-if=options.templateOptions.maxIcon ng-class=options.templateOptions.maxIcon></i></div>'),a.put("fields/ion-textarea.html",'<label class="item item-input"><textarea placeholder={{options.templateOptions.placeholder}} ng-model=model[options.key]></textarea><label></label></label>'),a.put("fields/ion-toggle.html","<ion-toggle ng-model=model[options.key] toggle-class=toggle-{{options.templateOptions.toggleClass}}>{{options.templateOptions.label}}</ion-toggle>")}]); | ||
//# sourceMappingURL=angular-formly-templates-ionic.min.map | ||
angular.module("formlyIonic",["formly"],["formlyConfigProvider",function(n){"use strict";function t(n){return"fields/ion-"+n+".html"}angular.forEach(["checkbox","input","radio","range","textarea","toggle"],function(e){n.setType({name:e,templateUrl:t(e)})}),n.templateManipulators.preWrapper.push(function(n,t,e){if(t.templateOptions&&angular.isDefined(t.templateOptions.description)&&"radio"!==t.type&&"checkbox"!==t.type){var o=angular.element("<a></a>");o.append(n);var i=angular.element(o[0].querySelectorAll("[ng-model]"));return i?(o.append('<p id="'+e.id+'_description"class="help-block"ng-if="options.templateOptions.description">{{options.templateOptions.description}}</p>'),i.attr("aria-describedby",e.id+"_description"),o.html()):n}return n})}]),angular.module("formlyIonic").run(["$templateCache",function(n){n.put("ion-checkbox.html",'<ion-checkbox ng-model="model[options.key]">\n {{options.templateOptions.label}}\n</ion-checkbox>\n'),n.put("ion-input.html",'<label class="item item-input">\n <input ng-model="model[options.key]" placeholder="{{options.templateOptions.placeholder}}" type="{{options.templateOptions.type}}">\n</label>\n'),n.put("ion-radio.html",'<ion-radio ng-repeat="item in options.templateOptions.list" ng-value="item.value" ng-model="model[options.key]" > \n{{ item.text }} \n</ion-radio>\n'),n.put("ion-range.html",' <div class="item range"\n ng-class="\'range-\' + options.templateOptions.rangeClass">\n\n <span>\n {{options.templateOptions.label}}\n </span>\n\n <i class="icon"\n ng-if="options.templateOptions.minIcon"\n ng-class=" options.templateOptions.minIcon"></i>\n\n <input type="range"\n min="{{options.templateOptions.min}}"\n max="{{options.templateOptions.max}}"\n step="{{options.templateOptions.step}}"\n value="{{options.templateOptions.value}}"\n ng-model="model[options.key]">\n\n <i class="icon"\n ng-if="options.templateOptions.maxIcon"\n ng-class="options.templateOptions.maxIcon">\n </i>\n </div>\n'),n.put("ion-textarea.html",'<label class="item item-input">\n <textarea placeholder="{{options.templateOptions.placeholder}}" ng-model="model[options.key]"></textarea>\n<label>\n'),n.put("ion-toggle.html",'<ion-toggle ng-model="model[options.key]" toggle-class="toggle-{{options.templateOptions.toggleClass}}">\n {{options.templateOptions.label}}\n</ion-toggle>\n')}]); |
{ | ||
"name": "angular-formly-templates-ionic", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"author": "Astrism <astrisms@gmail.com>", | ||
@@ -16,6 +16,8 @@ "contributors": [ | ||
"main": "dist/angular-formly-templates-ionic.min.js", | ||
"licenses": [{ | ||
"type": "MIT", | ||
"url": "https://raw.githubusercontent.com/formly-js/angular-formly-templates-ionic/master/LICENSE" | ||
}], | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "https://raw.githubusercontent.com/formly-js/angular-formly-templates-ionic/master/LICENSE" | ||
} | ||
], | ||
"scripts": { | ||
@@ -25,29 +27,19 @@ "build": "./node_modules/.bin/grunt build" | ||
"description": "Angular-Formly plugin which outputs plain html form fields.", | ||
"dependencies": { | ||
"angular": "^1.2.22", | ||
"angular-formly": "^2.0.0" | ||
"peerDependencies": { | ||
"angular": "^1.x", | ||
"angular-formly": ">=3.0.0" | ||
}, | ||
"devDependencies": { | ||
"bower": "1.2.7", | ||
"connect-livereload": "~0.4.0", | ||
"grunt": "~0.4.1", | ||
"grunt-angular-templates": "~0.5.1", | ||
"grunt-bower-task": "~0.3.4", | ||
"grunt-cli": "~0.1.11", | ||
"grunt-contrib-clean": "~0.5.0", | ||
"grunt-contrib-concat": "~0.3.0", | ||
"grunt-contrib-connect": "~0.6.0", | ||
"grunt-contrib-copy": "~0.5.0", | ||
"grunt-contrib-jshint": "^0.10.0", | ||
"grunt-contrib-uglify": "~0.3.2", | ||
"grunt-contrib-watch": "~0.6.1", | ||
"grunt-gh-pages": "~0.9.0", | ||
"grunt-mocha": "^0.4.11", | ||
"grunt-ng-annotate": "^0.3.2", | ||
"grunt-ngmin": "0.0.3", | ||
"grunt-umd": "^2.2.1", | ||
"load-grunt-tasks": "^0.6.0", | ||
"lodash-node": "^2.4.1", | ||
"time-grunt": "^0.4.0" | ||
"bower": "^1.3.3", | ||
"gulp": "^3.5.6", | ||
"gulp-angular-templatecache": "^1.6.0", | ||
"gulp-bump": "^0.3.0", | ||
"gulp-concat": "^2.2.0", | ||
"gulp-filter": "^2.0.2", | ||
"gulp-git": "^1.1.0", | ||
"gulp-ng-annotate": "^0.5.2", | ||
"gulp-rename": "^1.2.0", | ||
"gulp-tag-version": "^1.2.1", | ||
"gulp-uglify": "^1.1.0" | ||
} | ||
} |
@@ -10,5 +10,22 @@ [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/formly-js/angular-formly?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
```bash | ||
$ bower install angular-formly angular-formly-templates-ionic --save | ||
$ bower install api-check angular-formly angular-formly-templates-ionic --save | ||
``` | ||
Reference the files in your `index.html` | ||
```html | ||
<!-- right below ionic.bundle.js --> | ||
<script src="lib/api-check/dist/apiCheck.js"></script> | ||
<script src="lib/angular-formly/dist/formly.js"></script> | ||
<script src="js/angular-formly-templates-ionic.js"></script> | ||
``` | ||
Then import the templates into your project. | ||
```javascript | ||
angular.module('myApp', ['ionic', 'formlyIonic']) | ||
``` | ||
And your're ready! | ||
### ToDos | ||
@@ -18,2 +35,2 @@ | ||
- Move to gulp | ||
- [x] Move to gulp |
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 8 instances in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 4 instances in 1 package
14042056
11
294
224136
35
6
15
17
+ Addedangular-formly@8.4.1(transitive)
+ Addedapi-check@7.5.5(transitive)
- Removedangular@^1.2.22
- Removedangular-formly@^2.0.0
- Removedangular-formly@2.0.0(transitive)