yc-design-vue 1.9.1 → 1.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/Alert/index.vue.js +1 -1
- package/es/Calendar/Calendar.vue.js +1 -1
- package/es/Cascader/CascaderIcon.vue.js +1 -1
- package/es/Checkbox/Checkbox.vue.js +1 -1
- package/es/Collapse/CollapseItem.vue.js +2 -2
- package/es/Drawer/Drawer.vue.js +1 -1
- package/es/Input/Input.vue.js +1 -1
- package/es/Input/InputSuffix.vue.js +1 -1
- package/es/InputTag/index.vue.js +1 -1
- package/es/Menu/SubMenu.vue.js +2 -2
- package/es/Message/Message.vue.js +1 -1
- package/es/Modal/Modal.vue.js +1 -1
- package/es/Notification/Notification.vue.js +1 -1
- package/es/PageHeader/index.vue.js +1 -1
- package/es/Progress/ProgressCircle.vue.js +1 -1
- package/es/Radio/Radio.vue.js +1 -1
- package/es/Select/SelectIcon.vue.js +1 -1
- package/es/Tabs/TabButton.vue.js +1 -1
- package/es/Tag/index.vue.js +1 -1
- package/es/Textarea/index.vue.js +1 -1
- package/es/TimePicker/TimePicker.vue.js +1 -1
- package/es/Transfer/TransferPanel.vue.js +3 -3
- package/es/Trigger/index.vue.js +1 -1
- package/es/Typography/TypographyBase.vue.js +2 -2
- package/es/_shared/components/ExpandTransition.vue3.js +2 -2
- package/es/_shared/icons/IconCopy.vue.js +1 -17
- package/es/_shared/icons/IconCopy.vue2.js +17 -1
- package/es/_shared/icons/IconDelete.vue.js +1 -17
- package/es/_shared/icons/IconDelete.vue2.js +17 -1
- package/es/_shared/icons/IconEdit.vue.js +1 -17
- package/es/_shared/icons/IconEdit.vue2.js +17 -1
- package/es/_shared/icons/IconExclamation.vue.js +1 -28
- package/es/_shared/icons/IconExclamation.vue2.js +28 -1
- package/es/_shared/icons/IconSearch.vue.js +1 -17
- package/es/_shared/icons/IconSearch.vue2.js +17 -1
- package/es/_shared/utils/locale.js +1 -5
- package/es/{_shared/lang → lang-es}/en-us.js +2 -3
- package/es/public/lang-es/zh-cn.js +202 -0
- package/lib/Alert/index.vue.js +1 -1
- package/lib/Calendar/Calendar.vue.js +1 -1
- package/lib/Cascader/CascaderIcon.vue.js +1 -1
- package/lib/Checkbox/Checkbox.vue.js +1 -1
- package/lib/Collapse/CollapseItem.vue.js +1 -1
- package/lib/Drawer/Drawer.vue.js +1 -1
- package/lib/Input/Input.vue.js +1 -1
- package/lib/Input/InputSuffix.vue.js +1 -1
- package/lib/InputTag/index.vue.js +1 -1
- package/lib/Menu/SubMenu.vue.js +1 -1
- package/lib/Message/Message.vue.js +1 -1
- package/lib/Modal/Modal.vue.js +1 -1
- package/lib/Notification/Notification.vue.js +1 -1
- package/lib/PageHeader/index.vue.js +1 -1
- package/lib/Progress/ProgressCircle.vue.js +1 -1
- package/lib/Radio/Radio.vue.js +1 -1
- package/lib/Select/SelectIcon.vue.js +1 -1
- package/lib/Tabs/TabButton.vue.js +1 -1
- package/lib/Tag/index.vue.js +1 -1
- package/lib/Textarea/index.vue.js +1 -1
- package/lib/TimePicker/TimePicker.vue.js +1 -1
- package/lib/Transfer/TransferPanel.vue.js +1 -1
- package/lib/Trigger/index.vue.js +1 -1
- package/lib/Typography/TypographyBase.vue.js +1 -1
- package/lib/_shared/components/ExpandTransition.vue3.js +1 -1
- package/lib/_shared/icons/IconCopy.vue.js +1 -1
- package/lib/_shared/icons/IconCopy.vue2.js +1 -1
- package/lib/_shared/icons/IconDelete.vue.js +1 -1
- package/lib/_shared/icons/IconDelete.vue2.js +1 -1
- package/lib/_shared/icons/IconEdit.vue.js +1 -1
- package/lib/_shared/icons/IconEdit.vue2.js +1 -1
- package/lib/_shared/icons/IconExclamation.vue.js +1 -1
- package/lib/_shared/icons/IconExclamation.vue2.js +1 -1
- package/lib/_shared/icons/IconSearch.vue.js +1 -1
- package/lib/_shared/icons/IconSearch.vue2.js +1 -1
- package/lib/_shared/utils/locale.js +1 -1
- package/lib/lang-es/ar-eg.d.ts +206 -0
- package/lib/lang-es/ar-eg.js +154 -0
- package/lib/lang-es/de-de.d.ts +206 -0
- package/lib/lang-es/de-de.js +154 -0
- package/lib/lang-es/en-us.d.ts +254 -0
- package/lib/lang-es/en-us.js +158 -0
- package/lib/lang-es/es-es.d.ts +206 -0
- package/lib/lang-es/es-es.js +154 -0
- package/lib/lang-es/fr-fr.d.ts +206 -0
- package/lib/lang-es/fr-fr.js +154 -0
- package/lib/lang-es/id-id.d.ts +206 -0
- package/lib/lang-es/id-id.js +154 -0
- package/lib/lang-es/it-it.d.ts +206 -0
- package/lib/lang-es/it-it.js +154 -0
- package/lib/lang-es/ja-jp.d.ts +254 -0
- package/lib/lang-es/ja-jp.js +202 -0
- package/lib/lang-es/km-kh.d.ts +206 -0
- package/lib/lang-es/km-kh.js +154 -0
- package/lib/lang-es/ko-kr.d.ts +206 -0
- package/lib/lang-es/ko-kr.js +154 -0
- package/lib/lang-es/ms-my.d.ts +206 -0
- package/lib/lang-es/ms-my.js +154 -0
- package/lib/lang-es/nl-nl.d.ts +254 -0
- package/lib/lang-es/nl-nl.js +202 -0
- package/lib/lang-es/pt-pt.d.ts +206 -0
- package/lib/lang-es/pt-pt.js +154 -0
- package/lib/lang-es/ru-ru.d.ts +254 -0
- package/lib/lang-es/ru-ru.js +202 -0
- package/lib/lang-es/th-th.d.ts +206 -0
- package/lib/lang-es/th-th.js +154 -0
- package/lib/lang-es/vi-vn.d.ts +206 -0
- package/lib/lang-es/vi-vn.js +154 -0
- package/lib/lang-es/zh-cn.d.ts +254 -0
- package/lib/lang-es/zh-cn.js +202 -0
- package/lib/lang-es/zh-tw.d.ts +254 -0
- package/lib/lang-es/zh-tw.js +202 -0
- package/lib/lang-lib/ar-eg.d.ts +206 -0
- package/lib/lang-lib/ar-eg.js +1 -0
- package/lib/lang-lib/de-de.d.ts +206 -0
- package/lib/lang-lib/de-de.js +1 -0
- package/lib/lang-lib/en-us.d.ts +254 -0
- package/lib/lang-lib/en-us.js +1 -0
- package/lib/lang-lib/es-es.d.ts +206 -0
- package/lib/lang-lib/es-es.js +1 -0
- package/lib/lang-lib/fr-fr.d.ts +206 -0
- package/lib/lang-lib/fr-fr.js +1 -0
- package/lib/lang-lib/id-id.d.ts +206 -0
- package/lib/lang-lib/id-id.js +1 -0
- package/lib/lang-lib/it-it.d.ts +206 -0
- package/lib/lang-lib/it-it.js +1 -0
- package/lib/lang-lib/ja-jp.d.ts +254 -0
- package/lib/lang-lib/ja-jp.js +1 -0
- package/lib/lang-lib/km-kh.d.ts +206 -0
- package/lib/lang-lib/km-kh.js +1 -0
- package/lib/lang-lib/ko-kr.d.ts +206 -0
- package/lib/lang-lib/ko-kr.js +1 -0
- package/lib/lang-lib/ms-my.d.ts +206 -0
- package/lib/lang-lib/ms-my.js +1 -0
- package/lib/lang-lib/nl-nl.d.ts +254 -0
- package/lib/lang-lib/nl-nl.js +1 -0
- package/lib/lang-lib/pt-pt.d.ts +206 -0
- package/lib/lang-lib/pt-pt.js +1 -0
- package/lib/lang-lib/ru-ru.d.ts +254 -0
- package/lib/lang-lib/ru-ru.js +1 -0
- package/lib/lang-lib/th-th.d.ts +206 -0
- package/lib/lang-lib/th-th.js +1 -0
- package/lib/lang-lib/vi-vn.d.ts +206 -0
- package/lib/lang-lib/vi-vn.js +1 -0
- package/lib/lang-lib/zh-cn.d.ts +254 -0
- package/lib/lang-lib/zh-cn.js +1 -0
- package/lib/lang-lib/zh-tw.d.ts +254 -0
- package/lib/lang-lib/zh-tw.js +1 -0
- package/lib/public/lang-es/zh-cn.js +1 -0
- package/package.json +7 -5
- package/es/node_modules/b-validate/es/is.js +0 -27
- package/es/node_modules/b-validate/es/locale/en-US.js +0 -50
- package/es/node_modules/b-validate/es/rules/base.js +0 -86
- package/es/node_modules/b-validate/es/util.js +0 -25
- package/lib/node_modules/b-validate/es/is.js +0 -1
- package/lib/node_modules/b-validate/es/locale/en-US.js +0 -1
- package/lib/node_modules/b-validate/es/rules/base.js +0 -1
- package/lib/node_modules/b-validate/es/util.js +0 -1
- /package/es/_shared/components/{ExpandTransition.vue2.js → ExpandTransition.vue.js} +0 -0
- /package/es/{_shared/lang → lang-es}/ar-eg.d.ts +0 -0
- /package/es/{_shared/lang → lang-es}/ar-eg.js +0 -0
- /package/es/{_shared/lang → lang-es}/de-de.d.ts +0 -0
- /package/es/{_shared/lang → lang-es}/de-de.js +0 -0
- /package/es/{_shared/lang → lang-es}/en-us.d.ts +0 -0
- /package/es/{_shared/lang → lang-es}/es-es.d.ts +0 -0
- /package/es/{_shared/lang → lang-es}/es-es.js +0 -0
- /package/es/{_shared/lang → lang-es}/fr-fr.d.ts +0 -0
- /package/es/{_shared/lang → lang-es}/fr-fr.js +0 -0
- /package/es/{_shared/lang → lang-es}/id-id.d.ts +0 -0
- /package/es/{_shared/lang → lang-es}/id-id.js +0 -0
- /package/es/{_shared/lang → lang-es}/it-it.d.ts +0 -0
- /package/es/{_shared/lang → lang-es}/it-it.js +0 -0
- /package/es/{_shared/lang → lang-es}/ja-jp.d.ts +0 -0
- /package/es/{_shared/lang → lang-es}/ja-jp.js +0 -0
- /package/es/{_shared/lang → lang-es}/km-kh.d.ts +0 -0
- /package/es/{_shared/lang → lang-es}/km-kh.js +0 -0
- /package/es/{_shared/lang → lang-es}/ko-kr.d.ts +0 -0
- /package/es/{_shared/lang → lang-es}/ko-kr.js +0 -0
- /package/es/{_shared/lang → lang-es}/ms-my.d.ts +0 -0
- /package/es/{_shared/lang → lang-es}/ms-my.js +0 -0
- /package/es/{_shared/lang → lang-es}/nl-nl.d.ts +0 -0
- /package/es/{_shared/lang → lang-es}/nl-nl.js +0 -0
- /package/es/{_shared/lang → lang-es}/pt-pt.d.ts +0 -0
- /package/es/{_shared/lang → lang-es}/pt-pt.js +0 -0
- /package/es/{_shared/lang → lang-es}/ru-ru.d.ts +0 -0
- /package/es/{_shared/lang → lang-es}/ru-ru.js +0 -0
- /package/es/{_shared/lang → lang-es}/th-th.d.ts +0 -0
- /package/es/{_shared/lang → lang-es}/th-th.js +0 -0
- /package/es/{_shared/lang → lang-es}/vi-vn.d.ts +0 -0
- /package/es/{_shared/lang → lang-es}/vi-vn.js +0 -0
- /package/es/{_shared/lang → lang-es}/zh-cn.d.ts +0 -0
- /package/es/{_shared/lang → lang-es}/zh-cn.js +0 -0
- /package/es/{_shared/lang → lang-es}/zh-tw.d.ts +0 -0
- /package/es/{_shared/lang → lang-es}/zh-tw.js +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/ar-eg.d.ts +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/ar-eg.js +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/de-de.d.ts +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/de-de.js +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/en-us.d.ts +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/en-us.js +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/es-es.d.ts +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/es-es.js +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/fr-fr.d.ts +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/fr-fr.js +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/id-id.d.ts +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/id-id.js +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/it-it.d.ts +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/it-it.js +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/ja-jp.d.ts +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/ja-jp.js +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/km-kh.d.ts +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/km-kh.js +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/ko-kr.d.ts +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/ko-kr.js +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/ms-my.d.ts +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/ms-my.js +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/nl-nl.d.ts +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/nl-nl.js +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/pt-pt.d.ts +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/pt-pt.js +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/ru-ru.d.ts +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/ru-ru.js +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/th-th.d.ts +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/th-th.js +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/vi-vn.d.ts +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/vi-vn.js +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/zh-cn.d.ts +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/zh-cn.js +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/zh-tw.d.ts +0 -0
- /package/{lib/_shared/lang → es/lang-lib}/zh-tw.js +0 -0
- /package/lib/_shared/components/{ExpandTransition.vue2.js → ExpandTransition.vue.js} +0 -0
@@ -1,86 +0,0 @@
|
|
1
|
-
import { isObject, isFunction, isString, isArray, isEmptyValue, isEmptyArray } from "../is.js";
|
2
|
-
import { getTemplate, mergeTemplate } from "../util.js";
|
3
|
-
import defaultValidateLocale from "../locale/en-US.js";
|
4
|
-
var Base = function Base2(obj, options) {
|
5
|
-
var this$1$1 = this;
|
6
|
-
this.getValidateMsg = function(keyPath, info) {
|
7
|
-
if (info === void 0) info = {};
|
8
|
-
var data = Object.assign(Object.assign({}, info), { value: this$1$1.obj, field: this$1$1.field, type: this$1$1.type });
|
9
|
-
var template = getTemplate(this$1$1.validateMessages, keyPath);
|
10
|
-
if (isFunction(template)) {
|
11
|
-
return template(data);
|
12
|
-
}
|
13
|
-
if (isString(template)) {
|
14
|
-
return template.replace(/\#\{.+?\}/g, function(variable) {
|
15
|
-
var key = variable.slice(2, -1);
|
16
|
-
if (key in data) {
|
17
|
-
if (isObject(data[key]) || isArray(data[key])) {
|
18
|
-
try {
|
19
|
-
return JSON.stringify(data[key]);
|
20
|
-
} catch (_) {
|
21
|
-
return data[key];
|
22
|
-
}
|
23
|
-
}
|
24
|
-
return String(data[key]);
|
25
|
-
}
|
26
|
-
return variable;
|
27
|
-
});
|
28
|
-
}
|
29
|
-
return template;
|
30
|
-
};
|
31
|
-
if (isObject(options) && isString(obj) && options.trim) {
|
32
|
-
this.obj = obj.trim();
|
33
|
-
} else if (isObject(options) && options.ignoreEmptyString && obj === "") {
|
34
|
-
this.obj = void 0;
|
35
|
-
} else {
|
36
|
-
this.obj = obj;
|
37
|
-
}
|
38
|
-
this.message = options.message;
|
39
|
-
this.type = options.type;
|
40
|
-
this.error = null;
|
41
|
-
this.field = options.field || options.type;
|
42
|
-
this.validateMessages = mergeTemplate(defaultValidateLocale, options.validateMessages);
|
43
|
-
};
|
44
|
-
var prototypeAccessors = { not: { configurable: true }, isRequired: { configurable: true }, end: { configurable: true } };
|
45
|
-
prototypeAccessors.not.get = function() {
|
46
|
-
this._not = !this._not;
|
47
|
-
return this;
|
48
|
-
};
|
49
|
-
prototypeAccessors.isRequired.get = function() {
|
50
|
-
if (isEmptyValue(this.obj) || isEmptyArray(this.obj)) {
|
51
|
-
var message = this.getValidateMsg("required");
|
52
|
-
this.error = {
|
53
|
-
value: this.obj,
|
54
|
-
type: this.type,
|
55
|
-
requiredError: true,
|
56
|
-
message: this.message || (isObject(message) ? message : (this._not ? "[NOT MODE]:" : "") + message)
|
57
|
-
};
|
58
|
-
}
|
59
|
-
return this;
|
60
|
-
};
|
61
|
-
prototypeAccessors.end.get = function() {
|
62
|
-
return this.error;
|
63
|
-
};
|
64
|
-
Base.prototype.addError = function addError(message) {
|
65
|
-
if (!this.error && message) {
|
66
|
-
this.error = {
|
67
|
-
value: this.obj,
|
68
|
-
type: this.type,
|
69
|
-
message: this.message || (isObject(message) ? message : (this._not ? "[NOT MODE]:" : "") + message)
|
70
|
-
};
|
71
|
-
}
|
72
|
-
};
|
73
|
-
Base.prototype.validate = function validate(expression, errorMessage) {
|
74
|
-
var _expression = this._not ? expression : !expression;
|
75
|
-
if (_expression) {
|
76
|
-
this.addError(errorMessage);
|
77
|
-
}
|
78
|
-
return this;
|
79
|
-
};
|
80
|
-
Base.prototype.collect = function collect(callback) {
|
81
|
-
callback && callback(this.error);
|
82
|
-
};
|
83
|
-
Object.defineProperties(Base.prototype, prototypeAccessors);
|
84
|
-
export {
|
85
|
-
Base as default
|
86
|
-
};
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import { isObject } from "./is.js";
|
2
|
-
var mergeTemplate = function(defaultValidateMessages, validateMessages) {
|
3
|
-
var result = Object.assign({}, defaultValidateMessages);
|
4
|
-
Object.keys(validateMessages || {}).forEach(function(key) {
|
5
|
-
var defaultValue = result[key];
|
6
|
-
var newValue = validateMessages === null || validateMessages === void 0 ? void 0 : validateMessages[key];
|
7
|
-
result[key] = isObject(defaultValue) ? Object.assign(Object.assign({}, defaultValue), newValue) : newValue || defaultValue;
|
8
|
-
});
|
9
|
-
return result;
|
10
|
-
};
|
11
|
-
var getTemplate = function(validateMessages, keyPath) {
|
12
|
-
var keys = keyPath.split(".");
|
13
|
-
var result = validateMessages;
|
14
|
-
for (var i = 0; i < keys.length; i++) {
|
15
|
-
result = result && result[keys[i]];
|
16
|
-
if (result === void 0) {
|
17
|
-
return result;
|
18
|
-
}
|
19
|
-
}
|
20
|
-
return result;
|
21
|
-
};
|
22
|
-
export {
|
23
|
-
getTemplate,
|
24
|
-
mergeTemplate
|
25
|
-
};
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var t=Object.prototype.toString;function r(r){return"[object Array]"===t.call(r)}exports.isArray=r,exports.isEmptyArray=function(t){return r(t)&&!t.length},exports.isEmptyValue=function(t){return null==t||""===t},exports.isFunction=function(r){return"[object Function]"===t.call(r)},exports.isObject=function(r){return"[object Object]"===t.call(r)},exports.isString=function(r){return"[object String]"===t.call(r)};
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";var e="#{field} is not a #{type} type",t={required:"#{field} is required",type:{ip:e,email:e,url:e,string:e,number:e,array:e,object:e,boolean:e},number:{min:"`#{value}` is not greater than `#{min}`",max:"`#{value}` is not less than `#{max}`",equal:"`#{value}` is not equal to `#{equal}`",range:"`#{value}` is not in range `#{min} ~ #{max}`",positive:"`#{value}` is not a positive number",negative:"`#{value}` is not a negative number"},string:{maxLength:"#{field} cannot be longer than #{maxLength} characters",minLength:"#{field} must be at least #{minLength} characters",length:"#{field} must be exactly #{length} characters",match:"`#{value}` does not match pattern #{pattern}",uppercase:"`#{value}` must be all uppercase",lowercase:"`#{value}` must be all lowercased"},array:{length:"#{field} must be exactly #{length} in length",minLength:"#{field} cannot be less than #{minLength} in length",maxLength:"#{field} cannot be greater than #{maxLength} in length",includes:"#{field} is not includes #{includes}",deepEqual:"#{field} is not deep equal with #{deepEqual}",empty:"#{field} is not an empty array"},object:{deepEqual:"#{field} is not deep equal to expected value",hasKeys:"#{field} does not contain required fields",empty:"#{field} is not an empty object"},boolean:{true:"Expect true but got `#{value}`",false:"Expect false but got `#{value}`"}};module.exports=t;
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";const t=require("../is.js"),e=require("../util.js"),i=require("../locale/en-US.js");var r=function(r,s){var n=this;this.getValidateMsg=function(i,r){void 0===r&&(r={});var s=Object.assign(Object.assign({},r),{value:n.obj,field:n.field,type:n.type}),o=e.getTemplate(n.validateMessages,i);return t.isFunction(o)?o(s):t.isString(o)?o.replace(/\#\{.+?\}/g,function(e){var i=e.slice(2,-1);if(i in s){if(t.isObject(s[i])||t.isArray(s[i]))try{return JSON.stringify(s[i])}catch(r){return s[i]}return String(s[i])}return e}):o},t.isObject(s)&&t.isString(r)&&s.trim?this.obj=r.trim():t.isObject(s)&&s.ignoreEmptyString&&""===r?this.obj=void 0:this.obj=r,this.message=s.message,this.type=s.type,this.error=null,this.field=s.field||s.type,this.validateMessages=e.mergeTemplate(i,s.validateMessages)},s={not:{configurable:!0},isRequired:{configurable:!0},end:{configurable:!0}};s.not.get=function(){return this._not=!this._not,this},s.isRequired.get=function(){if(t.isEmptyValue(this.obj)||t.isEmptyArray(this.obj)){var e=this.getValidateMsg("required");this.error={value:this.obj,type:this.type,requiredError:!0,message:this.message||(t.isObject(e)?e:(this._not?"[NOT MODE]:":"")+e)}}return this},s.end.get=function(){return this.error},r.prototype.addError=function(e){!this.error&&e&&(this.error={value:this.obj,type:this.type,message:this.message||(t.isObject(e)?e:(this._not?"[NOT MODE]:":"")+e)})},r.prototype.validate=function(t,e){return(this._not?t:!t)&&this.addError(e),this},r.prototype.collect=function(t){t&&t(this.error)},Object.defineProperties(r.prototype,s),module.exports=r;
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./is.js");exports.getTemplate=function(e,t){for(var r=t.split("."),n=e,s=0;s<r.length;s++)if(void 0===(n=n&&n[r[s]]))return n;return n},exports.mergeTemplate=function(t,r){var n=Object.assign({},t);return Object.keys(r||{}).forEach(function(t){var s=n[t],i=null==r?void 0:r[t];n[t]=e.isObject(s)?Object.assign(Object.assign({},s),i):i||s}),n};
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|