chore(validate.js): Replace validatejs Meteor package with direct npm import
This commit is contained in:
parent
4e17ac39eb
commit
ea34f2db83
@ -142,7 +142,6 @@ tracker@1.2.0
|
|||||||
ui@1.0.13
|
ui@1.0.13
|
||||||
underscore@1.0.10
|
underscore@1.0.10
|
||||||
url@1.2.0
|
url@1.2.0
|
||||||
validatejs@0.0.1
|
|
||||||
webapp@1.6.2
|
webapp@1.6.2
|
||||||
webapp-hashing@1.0.9
|
webapp-hashing@1.0.9
|
||||||
zuuk:stale-session@1.0.8
|
zuuk:stale-session@1.0.8
|
||||||
|
|||||||
@ -128,6 +128,5 @@ tracker@1.2.0
|
|||||||
ui@1.0.13
|
ui@1.0.13
|
||||||
underscore@1.0.10
|
underscore@1.0.10
|
||||||
url@1.2.0
|
url@1.2.0
|
||||||
validatejs@0.0.1
|
|
||||||
webapp@1.6.2
|
webapp@1.6.2
|
||||||
webapp-hashing@1.0.9
|
webapp-hashing@1.0.9
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
active-entry
|
active-entry
|
||||||
hipaa-audit-log
|
hipaa-audit-log
|
||||||
meteor-stale-session
|
meteor-stale-session
|
||||||
validatejs
|
|
||||||
orthanc-remote
|
orthanc-remote
|
||||||
ohif-cornerstone
|
ohif-cornerstone
|
||||||
ohif-viewerbase/client/compatibility
|
ohif-viewerbase/client/compatibility
|
||||||
ohif-core/client/lib/third-party/
|
ohif-core/client/lib/third-party/
|
||||||
|
|||||||
78
Packages/validatejs/load.js → Packages/ohif-hanging-protocols/client/lib/validate.js
Executable file → Normal file
78
Packages/validatejs/load.js → Packages/ohif-hanging-protocols/client/lib/validate.js
Executable file → Normal file
@ -1,39 +1,39 @@
|
|||||||
import {validate as v} from './lib/validate.js';
|
import { validate } from 'validate.js';
|
||||||
|
|
||||||
v.validators.equals = function(value, options, key, attributes) {
|
validate.validators.equals = function(value, options, key, attributes) {
|
||||||
if (options && value !== options.value) {
|
if (options && value !== options.value) {
|
||||||
return key + 'must equal ' + options.value;
|
return key + 'must equal ' + options.value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
v.validators.doesNotEqual = function(value, options, key) {
|
validate.validators.doesNotEqual = function(value, options, key) {
|
||||||
if (options && value === options.value) {
|
if (options && value === options.value) {
|
||||||
return key + 'cannot equal ' + options.value;
|
return key + 'cannot equal ' + options.value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
v.validators.contains = function(value, options, key) {
|
validate.validators.contains = function(value, options, key) {
|
||||||
if (options && value.indexOf && value.indexOf(options.value) === -1) {
|
if (options && value.indexOf && value.indexOf(options.value) === -1) {
|
||||||
return key + 'must contain ' + options.value;
|
return key + 'must contain ' + options.value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
v.validators.doesNotContain = function(value, options, key) {
|
validate.validators.doesNotContain = function(value, options, key) {
|
||||||
if (options && value.indexOf && value.indexOf(options.value) !== -1) {
|
if (options && value.indexOf && value.indexOf(options.value) !== -1) {
|
||||||
return key + 'cannot contain ' + options.value;
|
return key + 'cannot contain ' + options.value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
v.validators.startsWith = function(value, options, key) {
|
validate.validators.startsWith = function(value, options, key) {
|
||||||
if (options && value.startsWith && !value.startsWith(options.value)) {
|
if (options && value.startsWith && !value.startsWith(options.value)) {
|
||||||
return key + 'must start with ' + options.value;
|
return key + 'must start with ' + options.value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
v.validators.endsWith = function(value, options, key) {
|
validate.validators.endsWith = function(value, options, key) {
|
||||||
if (options && value.endsWith && !value.endsWith(options.value)) {
|
if (options && value.endsWith && !value.endsWith(options.value)) {
|
||||||
return key + 'must end with ' + options.value;
|
return key + 'must end with ' + options.value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
validate = v;
|
export { validate };
|
||||||
@ -2,6 +2,7 @@
|
|||||||
import { Viewerbase } from 'meteor/ohif:viewerbase';
|
import { Viewerbase } from 'meteor/ohif:viewerbase';
|
||||||
|
|
||||||
// Local imports
|
// Local imports
|
||||||
|
import { validate } from '../lib/validate.js';
|
||||||
import '../customAttributes';
|
import '../customAttributes';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -4,6 +4,10 @@ Package.describe({
|
|||||||
version: '0.0.1'
|
version: '0.0.1'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Npm.depends({
|
||||||
|
'validate.js': '0.9.0'
|
||||||
|
});
|
||||||
|
|
||||||
Package.onUse(function(api) {
|
Package.onUse(function(api) {
|
||||||
api.versionsFrom('1.4');
|
api.versionsFrom('1.4');
|
||||||
|
|
||||||
@ -16,7 +20,6 @@ Package.onUse(function(api) {
|
|||||||
api.use('natestrauser:select2@4.0.1', 'client');
|
api.use('natestrauser:select2@4.0.1', 'client');
|
||||||
api.use('clinical:router@2.0.19');
|
api.use('clinical:router@2.0.19');
|
||||||
api.use('momentjs:moment');
|
api.use('momentjs:moment');
|
||||||
api.use('validatejs');
|
|
||||||
|
|
||||||
// Our custom packages
|
// Our custom packages
|
||||||
api.use('ohif:core');
|
api.use('ohif:core');
|
||||||
|
|||||||
@ -13,8 +13,6 @@ Package.onUse(function(api) {
|
|||||||
api.use('stylus');
|
api.use('stylus');
|
||||||
api.use('random');
|
api.use('random');
|
||||||
|
|
||||||
api.use('validatejs');
|
|
||||||
|
|
||||||
// Template overriding
|
// Template overriding
|
||||||
api.use('aldeed:template-extension@4.0.0');
|
api.use('aldeed:template-extension@4.0.0');
|
||||||
|
|
||||||
|
|||||||
@ -13,7 +13,6 @@ Package.onUse(function(api) {
|
|||||||
'jquery',
|
'jquery',
|
||||||
'stylus',
|
'stylus',
|
||||||
'momentjs:moment',
|
'momentjs:moment',
|
||||||
'validatejs',
|
|
||||||
'cultofcoders:persistent-session'
|
'cultofcoders:persistent-session'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -230,7 +229,6 @@ Package.onTest(function(api) {
|
|||||||
'jquery',
|
'jquery',
|
||||||
'mongo',
|
'mongo',
|
||||||
'momentjs:moment',
|
'momentjs:moment',
|
||||||
'validatejs',
|
|
||||||
'cultofcoders:persistent-session'
|
'cultofcoders:persistent-session'
|
||||||
], 'client');
|
], 'client');
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,16 +0,0 @@
|
|||||||
Package.describe({
|
|
||||||
name: 'validatejs',
|
|
||||||
summary: 'OHIF Validatejs temporary',
|
|
||||||
version: '0.0.1'
|
|
||||||
});
|
|
||||||
|
|
||||||
Package.onUse(function(api) {
|
|
||||||
api.versionsFrom('1.3.5.1');
|
|
||||||
|
|
||||||
api.use('ecmascript');
|
|
||||||
|
|
||||||
api.addFiles('lib/validate.js', 'client');
|
|
||||||
api.addFiles('load.js', 'client');
|
|
||||||
|
|
||||||
api.export('validate', 'client');
|
|
||||||
});
|
|
||||||
@ -127,6 +127,5 @@ tracker@1.2.0
|
|||||||
ui@1.0.13
|
ui@1.0.13
|
||||||
underscore@1.0.10
|
underscore@1.0.10
|
||||||
url@1.2.0
|
url@1.2.0
|
||||||
validatejs@0.0.1
|
|
||||||
webapp@1.6.2
|
webapp@1.6.2
|
||||||
webapp-hashing@1.0.9
|
webapp-hashing@1.0.9
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user