zy-react-library 1.1.0 → 1.1.2
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/README.md +5 -1
- package/components/Cascader/Area/index.js +11 -11
- package/components/Cascader/Basic/index.js +23 -30
- package/components/Cascader/Dictionary/index.js +42 -42
- package/components/Cascader/Industry/index.js +12 -11
- package/components/Editor/index.js +43 -63
- package/components/FormBuilder/FormBuilder.js +97 -87
- package/components/FormBuilder/FormItemsRenderer.js +579 -581
- package/components/FormBuilder/index.js +5 -3
- package/components/HeaderBack/index.js +39 -32
- package/components/HiddenInfo/gwj/index.js +507 -439
- package/components/Icon/AddIcon/index.js +6 -6
- package/components/Icon/BackIcon/index.js +6 -6
- package/components/Icon/DeleteIcon/index.js +6 -6
- package/components/Icon/DownloadIcon/index.js +6 -6
- package/components/Icon/EditIcon/index.js +6 -6
- package/components/Icon/ExportIcon/index.js +6 -6
- package/components/Icon/ImportIcon/index.js +6 -6
- package/components/Icon/LocationIcon/index.js +6 -6
- package/components/Icon/PrintIcon/index.js +6 -6
- package/components/Icon/ResetIcon/index.js +6 -6
- package/components/Icon/SearchIcon/index.js +6 -6
- package/components/Icon/VideoIcon/index.js +6 -6
- package/components/Icon/ViewIcon/index.js +6 -6
- package/components/ImportFile/index.js +94 -91
- package/components/LeftTree/Area/index.js +15 -15
- package/components/LeftTree/Basic/index.js +54 -65
- package/components/LeftTree/Department/Gwj/index.js +29 -32
- package/components/LeftTree/Dictionary/index.js +42 -42
- package/components/Map/MapSelector.js +280 -254
- package/components/Map/index.js +90 -77
- package/components/Page/index.d.ts +2 -0
- package/components/Page/index.js +44 -34
- package/components/Pdf/index.js +92 -90
- package/components/PreviewImg/index.js +26 -32
- package/components/PreviewPdf/index.js +78 -86
- package/components/Search/index.js +147 -141
- package/components/Select/Basic/index.js +70 -76
- package/components/Select/Dictionary/index.js +42 -42
- package/components/Select/Personnel/Gwj/index.js +45 -49
- package/components/SelectCreate/index.js +33 -40
- package/components/SelectTree/Area/index.js +11 -17
- package/components/SelectTree/Basic/index.js +105 -102
- package/components/SelectTree/Department/Gwj/index.js +40 -46
- package/components/SelectTree/Dictionary/index.js +42 -42
- package/components/SelectTree/HiddenLevel/Gwj/index.js +33 -35
- package/components/SelectTree/HiddenPart/Gwj/index.js +16 -19
- package/components/SelectTree/Industry/index.js +12 -18
- package/components/Signature/index.js +68 -62
- package/components/Table/index.js +77 -73
- package/components/Table/index.less +7 -1
- package/components/TooltipPreviewImg/index.js +28 -27
- package/components/Upload/index.js +229 -275
- package/components/Video/AliPlayer.js +182 -160
- package/components/Video/index.js +71 -90
- package/css/common.less +4 -0
- package/enum/dictionary/index.js +5 -3
- package/enum/formItemRender/index.js +37 -35
- package/enum/hidden/gwj/index.js +65 -26
- package/enum/uploadFile/gwj/index.js +166 -84
- package/hooks/useDeleteFile/index.js +24 -30
- package/hooks/useDictionary/index.js +28 -30
- package/hooks/useDownloadBlob/index.js +78 -77
- package/hooks/useDownloadFile/index.js +76 -79
- package/hooks/useGetFile/index.js +32 -32
- package/hooks/useGetUrlQuery/index.js +1 -2
- package/hooks/useGetUserInfo/index.js +19 -26
- package/hooks/useIdle/index.js +9 -11
- package/hooks/useImportFile/index.js +30 -28
- package/hooks/useIsExistenceDuplicateSelection/index.js +25 -18
- package/hooks/useTable/index.js +49 -38
- package/hooks/useUploadFile/index.js +142 -147
- package/hooks/useUrlQueryCriteria/index.js +20 -13
- package/package.json +14 -1
- package/regular/index.js +34 -39
- package/utils/index.js +515 -511
package/regular/index.js
CHANGED
|
@@ -1,61 +1,56 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 匹配中国手机号码,可包含国家代码86,支持各种运营商号段。
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
*/
|
|
4
|
+
const PHONE = /^(?:(?:\+|00)86)?1(?:3\d|4[5-7|9]|5[0-3|5-9]|6[5-7]|7[0-8]|8\d|9[1|89])\d{8}$/;
|
|
5
|
+
|
|
7
6
|
/**
|
|
8
7
|
* 匹配中国大陆的统一社会信用代码。
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
*/
|
|
9
|
+
const UNIFIED_SOCIAL_CREDIT_CODE = /^[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}$/;
|
|
10
|
+
|
|
13
11
|
/**
|
|
14
12
|
* 匹配中国大陆的身份证号码,包括15位和18位号码,并验证最后一位校验码。
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
*/
|
|
14
|
+
const ID_NUMBER = /^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[12]\d|30|31)\d{3}[\dX]$/i;
|
|
15
|
+
|
|
19
16
|
/**
|
|
20
17
|
* 匹配中国大陆的移动电话号码,不包含国家代码。
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
*/
|
|
19
|
+
const MOBILE_PHONE = /^(13\d|14[579]|15[0-3,5-9]|166|17[0135-8]|18\d|19[89])\d{8}$/;
|
|
20
|
+
|
|
25
21
|
/**
|
|
26
22
|
* 匹配浮点数,允许整数、一位或两位小数,以及零的情况。
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
*/
|
|
24
|
+
const FLOATING_POINT_NUMBER = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^(0)$)|(^\d\.\d(\d)?$)/;
|
|
25
|
+
|
|
31
26
|
/**
|
|
32
27
|
* 两位小数。
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
*/
|
|
29
|
+
const TWO_DECIMAL_PLACES = /^\d+\.\d{2}$/;
|
|
30
|
+
|
|
36
31
|
/**
|
|
37
32
|
* 一位小数(非必须)。
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
*/
|
|
34
|
+
const ONE_DECIMAL_PLACES = /^\d+(\.\d?)?$/;
|
|
35
|
+
|
|
41
36
|
/**
|
|
42
37
|
* 匹配中国大陆的车牌号码。
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
*/
|
|
39
|
+
const LICENSE_PLATE_NUMBER = /^([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z][A-Z][A-Z0-9]{4}[A-Z0-9挂学警港澳])$/;
|
|
40
|
+
|
|
47
41
|
/**
|
|
48
42
|
* 匹配强密码,要求至少8个字符,包含大小写字母、数字和特殊字符。
|
|
49
|
-
*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
43
|
+
*/
|
|
44
|
+
const STRONG_PASSWORD = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z\d]).{8,}$/;
|
|
45
|
+
|
|
53
46
|
/**
|
|
54
47
|
* 匹配完整的HTML标签,包括开始标签和结束标签。
|
|
55
|
-
*/
|
|
56
|
-
|
|
57
|
-
|
|
48
|
+
*/
|
|
49
|
+
const HTML_TAG = /<[^>]*>/g;
|
|
50
|
+
|
|
58
51
|
/**
|
|
59
52
|
* 匹配中国大陆的邮政编码。
|
|
60
|
-
*/
|
|
61
|
-
|
|
53
|
+
*/
|
|
54
|
+
const POSTAL_CODE = /^(0[1-7]|1[0-356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[0-5]|8[013-6])\d{4}$/g;
|
|
55
|
+
|
|
56
|
+
export { FLOATING_POINT_NUMBER, HTML_TAG, ID_NUMBER, LICENSE_PLATE_NUMBER, MOBILE_PHONE, ONE_DECIMAL_PLACES, PHONE, POSTAL_CODE, STRONG_PASSWORD, TWO_DECIMAL_PLACES, UNIFIED_SOCIAL_CREDIT_CODE };
|