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