@hkyhy/marsun-components-core 0.1.62 → 0.1.63
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/dist/components/File/FilePreview/FilePreviewContent.js +98 -75
- package/dist/components/File/FilePreview/FilePreviewContent.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +634 -632
- package/dist/utils/user/employeeId.d.ts +10 -2
- package/dist/utils/user/employeeId.js +11 -9
- package/dist/utils/user/employeeId.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,16 @@
|
|
|
1
|
+
/** 工号最大长度(与 SSO / Assets DB VarChar(50) 对齐) */
|
|
2
|
+
export declare const EMPLOYEE_ID_MAX_LENGTH = 50;
|
|
3
|
+
/**
|
|
4
|
+
* 工号:1–50 位,字母/数字/`.` `_` `@` `-`(不再限制「仅 6 位数字」)。
|
|
5
|
+
* 保留旧常量名以免破坏既有 import。
|
|
6
|
+
*/
|
|
7
|
+
export declare const EMPLOYEE_ID_PATTERN: RegExp;
|
|
8
|
+
/** @deprecated 已放宽格式,等同 {@link EMPLOYEE_ID_PATTERN} */
|
|
1
9
|
export declare const EMPLOYEE_ID_SIX_DIGIT_PATTERN: RegExp;
|
|
2
|
-
export declare const EMPLOYEE_ID_FORMAT_MESSAGE = "\u5DE5\u53F7\
|
|
10
|
+
export declare const EMPLOYEE_ID_FORMAT_MESSAGE = "\u5DE5\u53F7\u987B\u4E3A1\u201350\u4F4D\u5B57\u6BCD\u6216\u6570\u5B57\uFF08\u53EF\u542B . _ @ -\uFF09";
|
|
3
11
|
export declare const employeeIdFormatRule: {
|
|
4
12
|
pattern: RegExp;
|
|
5
13
|
message: string;
|
|
6
14
|
};
|
|
7
|
-
/**
|
|
15
|
+
/** 校验工号格式(创建/注册用) */
|
|
8
16
|
export declare function isValidEmployeeIdFormat(employeeId: string): boolean;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
const
|
|
2
|
-
pattern:
|
|
3
|
-
message:
|
|
1
|
+
const e = 50, E = /^[A-Za-z0-9._@-]{1,50}$/, o = E, _ = "工号须为1–50位字母或数字(可含 . _ @ -)", n = {
|
|
2
|
+
pattern: E,
|
|
3
|
+
message: _
|
|
4
4
|
};
|
|
5
|
-
function
|
|
6
|
-
return
|
|
5
|
+
function s(t) {
|
|
6
|
+
return E.test(String(t ?? "").trim());
|
|
7
7
|
}
|
|
8
8
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
_ as EMPLOYEE_ID_FORMAT_MESSAGE,
|
|
10
|
+
e as EMPLOYEE_ID_MAX_LENGTH,
|
|
11
|
+
E as EMPLOYEE_ID_PATTERN,
|
|
12
|
+
o as EMPLOYEE_ID_SIX_DIGIT_PATTERN,
|
|
13
|
+
n as employeeIdFormatRule,
|
|
14
|
+
s as isValidEmployeeIdFormat
|
|
13
15
|
};
|
|
14
16
|
//# sourceMappingURL=employeeId.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"employeeId.js","sources":["../../../src/utils/user/employeeId.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"employeeId.js","sources":["../../../src/utils/user/employeeId.ts"],"sourcesContent":["/** 工号最大长度(与 SSO / Assets DB VarChar(50) 对齐) */\nexport const EMPLOYEE_ID_MAX_LENGTH = 50;\n\n/**\n * 工号:1–50 位,字母/数字/`.` `_` `@` `-`(不再限制「仅 6 位数字」)。\n * 保留旧常量名以免破坏既有 import。\n */\nexport const EMPLOYEE_ID_PATTERN = /^[A-Za-z0-9._@-]{1,50}$/;\n\n/** @deprecated 已放宽格式,等同 {@link EMPLOYEE_ID_PATTERN} */\nexport const EMPLOYEE_ID_SIX_DIGIT_PATTERN = EMPLOYEE_ID_PATTERN;\n\nexport const EMPLOYEE_ID_FORMAT_MESSAGE = '工号须为1–50位字母或数字(可含 . _ @ -)';\n\nexport const employeeIdFormatRule = {\n pattern: EMPLOYEE_ID_PATTERN,\n message: EMPLOYEE_ID_FORMAT_MESSAGE,\n};\n\n/** 校验工号格式(创建/注册用) */\nexport function isValidEmployeeIdFormat(employeeId: string): boolean {\n return EMPLOYEE_ID_PATTERN.test(String(employeeId ?? '').trim());\n}\n"],"names":["EMPLOYEE_ID_MAX_LENGTH","EMPLOYEE_ID_PATTERN","EMPLOYEE_ID_SIX_DIGIT_PATTERN","EMPLOYEE_ID_FORMAT_MESSAGE","employeeIdFormatRule","isValidEmployeeIdFormat","employeeId"],"mappings":"AACO,MAAMA,IAAyB,IAMzBC,IAAsB,2BAGtBC,IAAgCD,GAEhCE,IAA6B,8BAE7BC,IAAuB;AAAA,EAClC,SAASH;AAAA,EACT,SAASE;AACX;AAGO,SAASE,EAAwBC,GAA6B;AACnE,SAAOL,EAAoB,KAAK,OAAOK,KAAc,EAAE,EAAE,MAAM;AACjE;"}
|