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

us-formly-templates

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

us-formly-templates - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

package.json
{
"name": "us-formly-templates",
"version": "1.0.3",
"version": "1.0.4",
"description": "Extensão com templates para usar formly com bootstrap",

@@ -5,0 +5,0 @@ "scripts": {

@@ -28,3 +28,3 @@ angular.module('usFormlyTemplates', [

extends: 'input',
template: '<input class="form-control" ng-model="model[options.key]" />',
template: '<input class="form-control" model-view-value="true" ng-model="model[options.key]" />',
defaultOptions: {

@@ -52,5 +52,6 @@ ngModelAttrs: {

cpf: {
expression: function(viewValue, modelValue) {
expression: function(viewValue, modelValue, scope) {
var cpf = modelValue || viewValue;
if(cpf){
cpf = cpf.replace(/\.|\-/g, '');
if (cpf.length != 11 ||

@@ -88,3 +89,5 @@ cpf == "00000000000" ||

return true;
}
} else if (!scope.to.required) {
return true;
}
return false;

@@ -104,6 +107,7 @@ },

name: 'rg',
extends: 'maskedInput',
//extends: 'maskedInput',
extends: 'input',
defaultOptions: {
templateOptions: {
mask: '99.999.999-9',
//mask: '99.999.999-9',
}

@@ -120,5 +124,6 @@ }

cnpj: {
expression: function(viewValue, modelValue) {
expression: function(viewValue, modelValue, scope) {
var cnpj = modelValue || viewValue;
if(cnpj){
cnpj = cnpj.replace(/[^\d]+/g,'');
if (cnpj == "00000000000000" ||

@@ -164,3 +169,5 @@ cnpj == "11111111111111" ||

return true;
}
} else if (!scope.to.required) {
return true;
}
return false;

@@ -307,4 +314,2 @@ },

type="text"
id="{{::id}}"
name="{{::id}}"
ng-model="model[options.key]"

@@ -329,4 +334,4 @@ class="form-control"

datepickerOptions: {
format: 'dd.MM.yyyy',
initDate: new Date()
format: 'dd/MM/yyyy',
initDate: new Date()
}

@@ -343,2 +348,9 @@ }

};
// carregamento com abas
$scope.$watch('model.'+$scope.options.key, function(value) {
if (typeof ($scope.model[$scope.options.key]) == 'string') {
$scope.model[$scope.options.key] = new Date($scope.model[$scope.options.key]);
}
});
}]

@@ -345,0 +357,0 @@ });

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