@vef-framework/shared 1.0.98 → 1.0.99
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/color.js +8 -2
- package/es/constants.js +30 -2
- package/es/context.js +33 -2
- package/es/dom.js +20 -2
- package/es/error.js +27 -2
- package/es/event.js +8 -2
- package/es/expression.js +22 -2
- package/es/function.js +13 -2
- package/es/icons.js +128 -2
- package/es/id.js +11 -2
- package/es/index.js +29 -2
- package/es/lib.js +5 -2
- package/es/message.js +281 -2
- package/es/path.js +32 -2
- package/es/pinyin.js +29 -2
- package/es/security.js +23 -2
- package/es/store.js +99 -2
- package/es/styles.js +50 -2
- package/es/temporal.js +22 -2
- package/es/theme-variables.js +351 -2
- package/es/utils.js +102 -2
- package/es/validation.js +150 -2
- package/es/yaml.js +8 -2
- package/lib/color.cjs +12 -2
- package/lib/constants.cjs +40 -2
- package/lib/context.cjs +37 -2
- package/lib/dom.cjs +24 -2
- package/lib/error.cjs +31 -2
- package/lib/event.cjs +12 -2
- package/lib/expression.cjs +28 -2
- package/lib/function.cjs +17 -2
- package/lib/icons.cjs +137 -2
- package/lib/id.cjs +15 -2
- package/lib/index.cjs +316 -2
- package/lib/lib.cjs +221 -2
- package/lib/message.cjs +304 -2
- package/lib/path.cjs +41 -2
- package/lib/pinyin.cjs +34 -2
- package/lib/security.cjs +28 -2
- package/lib/store.cjs +106 -2
- package/lib/styles.cjs +56 -2
- package/lib/temporal.cjs +28 -2
- package/lib/theme-variables.cjs +355 -2
- package/lib/types.cjs +4 -2
- package/lib/utils.cjs +111 -2
- package/lib/validation.cjs +190 -2
- package/lib/yaml.cjs +12 -2
- package/package.json +1 -1
package/lib/validation.cjs
CHANGED
|
@@ -1,3 +1,191 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
|
|
1
|
+
/*! VefFramework version: 1.0.99, build time: 2025-03-07T13:41:55.370Z, made by Venus. */
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const validator = require('validator');
|
|
7
|
+
|
|
8
|
+
function isAlpha(value) {
|
|
9
|
+
return validator.isAlpha(value);
|
|
10
|
+
}
|
|
11
|
+
function isAlphanumeric(value) {
|
|
12
|
+
return validator.isAlphanumeric(value);
|
|
13
|
+
}
|
|
14
|
+
function isAscii(value) {
|
|
15
|
+
return validator.isAscii(value);
|
|
16
|
+
}
|
|
17
|
+
function isNumeric(value) {
|
|
18
|
+
return validator.isNumeric(value);
|
|
19
|
+
}
|
|
20
|
+
function isDecimal(value) {
|
|
21
|
+
return validator.isDecimal(value);
|
|
22
|
+
}
|
|
23
|
+
function isFloat(value, options) {
|
|
24
|
+
return validator.isFloat(value, options);
|
|
25
|
+
}
|
|
26
|
+
function isBoolean(value) {
|
|
27
|
+
return validator.isBoolean(value, {
|
|
28
|
+
loose: false
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function isDate(value) {
|
|
32
|
+
return validator.isDate(value, {
|
|
33
|
+
format: "YYYY-MM-DD",
|
|
34
|
+
strictMode: true
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function isEmpty(value) {
|
|
38
|
+
return validator.isEmpty(value);
|
|
39
|
+
}
|
|
40
|
+
function isBlank(value) {
|
|
41
|
+
return validator.isEmpty(value, {
|
|
42
|
+
ignore_whitespace: true
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function isIdentityCard(value) {
|
|
46
|
+
return validator.isIdentityCard(value, "zh-CN");
|
|
47
|
+
}
|
|
48
|
+
function isAfter(value, date) {
|
|
49
|
+
return validator.isAfter(value, date);
|
|
50
|
+
}
|
|
51
|
+
function isBefore(value, date) {
|
|
52
|
+
return validator.isBefore(value, date);
|
|
53
|
+
}
|
|
54
|
+
function isEmail(value) {
|
|
55
|
+
return validator.isEmail(value);
|
|
56
|
+
}
|
|
57
|
+
function isHexColor(value) {
|
|
58
|
+
return validator.isHexColor(value);
|
|
59
|
+
}
|
|
60
|
+
function isIn(value, values) {
|
|
61
|
+
return validator.isIn(value, values);
|
|
62
|
+
}
|
|
63
|
+
function isInt(value, options) {
|
|
64
|
+
return validator.isInt(value, options);
|
|
65
|
+
}
|
|
66
|
+
function isIp(value, version) {
|
|
67
|
+
return validator.isIP(value, version);
|
|
68
|
+
}
|
|
69
|
+
function isIpRange(value, version) {
|
|
70
|
+
return validator.isIPRange(value, version);
|
|
71
|
+
}
|
|
72
|
+
function isJson(value) {
|
|
73
|
+
return validator.isJSON(value);
|
|
74
|
+
}
|
|
75
|
+
function isJwt(value) {
|
|
76
|
+
return validator.isJWT(value);
|
|
77
|
+
}
|
|
78
|
+
function isLatLong(value) {
|
|
79
|
+
return validator.isLatLong(value);
|
|
80
|
+
}
|
|
81
|
+
function isLength(value, options) {
|
|
82
|
+
return validator.isLength(value, options);
|
|
83
|
+
}
|
|
84
|
+
function isMimeType(value) {
|
|
85
|
+
return validator.isMimeType(value);
|
|
86
|
+
}
|
|
87
|
+
function isMobilePhone(value) {
|
|
88
|
+
return validator.isMobilePhone(value, "zh-CN");
|
|
89
|
+
}
|
|
90
|
+
function isPort(value) {
|
|
91
|
+
return validator.isPort(value);
|
|
92
|
+
}
|
|
93
|
+
function isPostalCode(value) {
|
|
94
|
+
return validator.isPostalCode(value, "CN");
|
|
95
|
+
}
|
|
96
|
+
function isSemVer(value) {
|
|
97
|
+
return validator.isSemVer(value);
|
|
98
|
+
}
|
|
99
|
+
function isSlug(value) {
|
|
100
|
+
return validator.isSlug(value);
|
|
101
|
+
}
|
|
102
|
+
function isStrongPassword(value) {
|
|
103
|
+
return validator.isStrongPassword(value, {
|
|
104
|
+
minLength: 8,
|
|
105
|
+
minLowercase: 1,
|
|
106
|
+
minUppercase: 1,
|
|
107
|
+
minNumbers: 1,
|
|
108
|
+
minSymbols: 1
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
function isTime(value, options) {
|
|
112
|
+
return validator.isTime(value, options);
|
|
113
|
+
}
|
|
114
|
+
function isUrl(value) {
|
|
115
|
+
return validator.isURL(value, {
|
|
116
|
+
protocols: ["http", "https"],
|
|
117
|
+
require_tld: true,
|
|
118
|
+
require_protocol: true,
|
|
119
|
+
require_host: true,
|
|
120
|
+
require_port: false,
|
|
121
|
+
require_valid_protocol: true,
|
|
122
|
+
allow_underscores: true
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function isUri(value) {
|
|
126
|
+
return validator.isURL(value, {
|
|
127
|
+
protocols: [],
|
|
128
|
+
require_tld: false,
|
|
129
|
+
require_protocol: false,
|
|
130
|
+
require_host: false,
|
|
131
|
+
require_port: false,
|
|
132
|
+
require_valid_protocol: false,
|
|
133
|
+
allow_underscores: true,
|
|
134
|
+
allow_fragments: false,
|
|
135
|
+
allow_query_components: false,
|
|
136
|
+
allow_protocol_relative_urls: false
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
function isUuid(value, version) {
|
|
140
|
+
return validator.isUUID(value, version);
|
|
141
|
+
}
|
|
142
|
+
function isDateTime(value) {
|
|
143
|
+
const [date, time] = value.split(" ", 2);
|
|
144
|
+
return isDate(date) && isTime(time);
|
|
145
|
+
}
|
|
146
|
+
function matches(value, pattern, modifiers) {
|
|
147
|
+
return validator.matches(value, pattern, modifiers);
|
|
148
|
+
}
|
|
149
|
+
const chineseNameRegExp = /^[\u4E00-\u9FA5]+\d*$/;
|
|
150
|
+
function isChineseName(value) {
|
|
151
|
+
return chineseNameRegExp.test(value);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
exports.isAfter = isAfter;
|
|
155
|
+
exports.isAlpha = isAlpha;
|
|
156
|
+
exports.isAlphanumeric = isAlphanumeric;
|
|
157
|
+
exports.isAscii = isAscii;
|
|
158
|
+
exports.isBefore = isBefore;
|
|
159
|
+
exports.isBlank = isBlank;
|
|
160
|
+
exports.isBoolean = isBoolean;
|
|
161
|
+
exports.isChineseName = isChineseName;
|
|
162
|
+
exports.isDate = isDate;
|
|
163
|
+
exports.isDateTime = isDateTime;
|
|
164
|
+
exports.isDecimal = isDecimal;
|
|
165
|
+
exports.isEmail = isEmail;
|
|
166
|
+
exports.isEmpty = isEmpty;
|
|
167
|
+
exports.isFloat = isFloat;
|
|
168
|
+
exports.isHexColor = isHexColor;
|
|
169
|
+
exports.isIdentityCard = isIdentityCard;
|
|
170
|
+
exports.isIn = isIn;
|
|
171
|
+
exports.isInt = isInt;
|
|
172
|
+
exports.isIp = isIp;
|
|
173
|
+
exports.isIpRange = isIpRange;
|
|
174
|
+
exports.isJson = isJson;
|
|
175
|
+
exports.isJwt = isJwt;
|
|
176
|
+
exports.isLatLong = isLatLong;
|
|
177
|
+
exports.isLength = isLength;
|
|
178
|
+
exports.isMimeType = isMimeType;
|
|
179
|
+
exports.isMobilePhone = isMobilePhone;
|
|
180
|
+
exports.isNumeric = isNumeric;
|
|
181
|
+
exports.isPort = isPort;
|
|
182
|
+
exports.isPostalCode = isPostalCode;
|
|
183
|
+
exports.isSemVer = isSemVer;
|
|
184
|
+
exports.isSlug = isSlug;
|
|
185
|
+
exports.isStrongPassword = isStrongPassword;
|
|
186
|
+
exports.isTime = isTime;
|
|
187
|
+
exports.isUri = isUri;
|
|
188
|
+
exports.isUrl = isUrl;
|
|
189
|
+
exports.isUuid = isUuid;
|
|
190
|
+
exports.matches = matches;
|
|
3
191
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
package/lib/yaml.cjs
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
|
|
1
|
+
/*! VefFramework version: 1.0.99, build time: 2025-03-07T13:41:55.370Z, made by Venus. */
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const jsYaml = require('js-yaml');
|
|
7
|
+
|
|
8
|
+
function loadYaml(content) {
|
|
9
|
+
return jsYaml.load(content);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
exports.loadYaml = loadYaml;
|
|
3
13
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|