@hzab/form-render 1.6.18 → 1.6.20

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 (60) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +247 -239
  3. package/package.json +57 -57
  4. package/src/common/formily-utils.ts +125 -125
  5. package/src/common/schema-handler.ts +253 -253
  6. package/src/common/schema-merge.ts +68 -68
  7. package/src/components/ArrayBase/index.tsx +349 -349
  8. package/src/components/ArrayBase/style.less +90 -90
  9. package/src/components/ArrayBase/style.ts +2 -2
  10. package/src/components/ArrayCards/index.tsx +149 -149
  11. package/src/components/ArrayCards/style.less +14 -14
  12. package/src/components/ArrayCards/style.ts +4 -4
  13. package/src/components/ArrayTable/index.tsx +411 -411
  14. package/src/components/ArrayTable/style.less +52 -52
  15. package/src/components/ArrayTable/style.ts +7 -7
  16. package/src/components/DatePicker/index.tsx +108 -108
  17. package/src/components/LocationListPicker/assets/icon.js +1 -1
  18. package/src/components/LocationListPicker/components/AddrList/index.less +55 -55
  19. package/src/components/LocationListPicker/components/AddrList/index.tsx +75 -75
  20. package/src/components/LocationListPicker/components/Popup/address.schema.json +21 -21
  21. package/src/components/LocationListPicker/components/Popup/index.less +22 -22
  22. package/src/components/LocationListPicker/components/Popup/index.tsx +92 -92
  23. package/src/components/LocationListPicker/index.less +34 -34
  24. package/src/components/LocationListPicker/index.tsx +521 -520
  25. package/src/components/LocationPicker/Map/AMap/common/loader.ts +58 -58
  26. package/src/components/LocationPicker/Map/AMap/common/utils.ts +431 -431
  27. package/src/components/LocationPicker/Map/AMap/index.jsx +51 -51
  28. package/src/components/LocationPicker/README.md +44 -44
  29. package/src/components/LocationPicker/common/utils.ts +30 -30
  30. package/src/components/LocationPicker/components/ModalContent/index.tsx +387 -387
  31. package/src/components/LocationPicker/components/PickerInfo/index.tsx +109 -109
  32. package/src/components/LocationPicker/components/ResInfo/index.less +38 -38
  33. package/src/components/LocationPicker/components/ResInfo/index.tsx +65 -65
  34. package/src/components/LocationPicker/index.tsx +197 -197
  35. package/src/components/PersonnelSelect/index.less +21 -21
  36. package/src/components/PersonnelSelect/index.module.less +33 -33
  37. package/src/components/PersonnelSelect/type.ts +92 -92
  38. package/src/components/RichEditor/index.less +38 -38
  39. package/src/components/RichEditor/index.tsx +238 -238
  40. package/src/components/TreeCheckbox/components/CheckboxTable/index.tsx +61 -55
  41. package/src/components/TreeCheckbox/components/Render/index.tsx +28 -28
  42. package/src/components/TreeCheckbox/components/TabsRender/index.tsx +61 -58
  43. package/src/components/TreeCheckbox/index.less +18 -12
  44. package/src/components/TreeCheckbox/index.tsx +63 -63
  45. package/src/components/Upload/README.md +64 -64
  46. package/src/components/Upload/common/OfflineUpload.ts +339 -339
  47. package/src/components/Upload/common/customRequest.ts +81 -81
  48. package/src/components/Upload/common/fileName.ts +142 -142
  49. package/src/components/Upload/common/handleIOFileList.ts +393 -393
  50. package/src/components/Upload/common/nanoid.ts +7 -7
  51. package/src/components/Upload/common/ossUpload.js +159 -159
  52. package/src/components/Upload/common/utils.js +194 -194
  53. package/src/components/Upload/components/ItemList/index.tsx +52 -52
  54. package/src/components/Upload/components/PreviewModal/previewRender.tsx +80 -80
  55. package/src/components/Upload/index.tsx +17 -17
  56. package/src/components/Upload/uploader-input.jsx +187 -187
  57. package/src/components/Upload/uploader.jsx +316 -316
  58. package/src/components/UserSelect/index.tsx +123 -123
  59. package/src/components/index.tsx +17 -17
  60. package/src/index.tsx +198 -198
@@ -1,58 +1,58 @@
1
- const defaultVersion = "2.0";
2
- const defaultPlugins = ["AMap.Geocoder", "AMap.AutoComplete", "AMap.PolygonEditor", "AMap.PolylineEditor"];
3
-
4
- if (!window._AMapLoaderTemp) {
5
- window._AMapLoaderTemp = {};
6
- }
7
-
8
- window._AMapLoaderTemp.loading = false;
9
-
10
- function Loader(opt) {
11
- if (!window.AMap) {
12
- window._AMapSecurityConfig = {
13
- securityJsCode: opt.securityJsCode || window._AMapLoaderTemp.securityJsCode,
14
- };
15
- }
16
- const { key, version, plugins } = opt || {};
17
- return new Promise((resolve, reject) => {
18
- // 判断是否有进行中的加载器
19
- if (window._AMapLoaderTemp.loading && window._AMapLoaderTemp.promise) {
20
- window._AMapLoaderTemp.promise.then((AMap) => {
21
- resolve(window.AMap);
22
- });
23
- return;
24
- }
25
- // 判断是否存在 AMap,且入参 plugins 是否改变
26
- if (
27
- (window.AMap && !plugins) ||
28
- (window.AMap && plugins && JSON.stringify(window._AMapLoaderTemp.plugins) === JSON.stringify(plugins))
29
- ) {
30
- resolve(window.AMap);
31
- return;
32
- }
33
-
34
- window._AMapLoaderTemp.plugins = plugins ? [...defaultPlugins, ...(plugins || [])] : defaultPlugins;
35
-
36
- // 不用地图组件时可以不安装 "@amap/amap-jsapi-loader"
37
- const AMapLoader = require("@amap/amap-jsapi-loader");
38
-
39
- window._AMapLoaderTemp.loading = true;
40
- window._AMapLoaderTemp.promise = AMapLoader.load({
41
- key: key || window._AMapLoaderTemp.key, // 申请好的Web端开发者Key,首次调用 load 时必填
42
- version: version || defaultVersion, // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
43
- plugins: window._AMapLoaderTemp.plugins, // 需要使用的的插件列表,如比例尺'AMap.Scale'等
44
- })
45
- .then((AMap) => {
46
- window.AMap = AMap;
47
- resolve(window.AMap);
48
- window._AMapLoaderTemp.loading = false;
49
- return AMap;
50
- })
51
- .catch((e) => {
52
- reject(e);
53
- console.error("AMap loader: ", e);
54
- });
55
- });
56
- }
57
-
58
- export default Loader;
1
+ const defaultVersion = "2.0";
2
+ const defaultPlugins = ["AMap.Geocoder", "AMap.AutoComplete", "AMap.PolygonEditor", "AMap.PolylineEditor"];
3
+
4
+ if (!window._AMapLoaderTemp) {
5
+ window._AMapLoaderTemp = {};
6
+ }
7
+
8
+ window._AMapLoaderTemp.loading = false;
9
+
10
+ function Loader(opt) {
11
+ if (!window.AMap) {
12
+ window._AMapSecurityConfig = {
13
+ securityJsCode: opt.securityJsCode || window._AMapLoaderTemp.securityJsCode,
14
+ };
15
+ }
16
+ const { key, version, plugins } = opt || {};
17
+ return new Promise((resolve, reject) => {
18
+ // 判断是否有进行中的加载器
19
+ if (window._AMapLoaderTemp.loading && window._AMapLoaderTemp.promise) {
20
+ window._AMapLoaderTemp.promise.then((AMap) => {
21
+ resolve(window.AMap);
22
+ });
23
+ return;
24
+ }
25
+ // 判断是否存在 AMap,且入参 plugins 是否改变
26
+ if (
27
+ (window.AMap && !plugins) ||
28
+ (window.AMap && plugins && JSON.stringify(window._AMapLoaderTemp.plugins) === JSON.stringify(plugins))
29
+ ) {
30
+ resolve(window.AMap);
31
+ return;
32
+ }
33
+
34
+ window._AMapLoaderTemp.plugins = plugins ? [...defaultPlugins, ...(plugins || [])] : defaultPlugins;
35
+
36
+ // 不用地图组件时可以不安装 "@amap/amap-jsapi-loader"
37
+ const AMapLoader = require("@amap/amap-jsapi-loader");
38
+
39
+ window._AMapLoaderTemp.loading = true;
40
+ window._AMapLoaderTemp.promise = AMapLoader.load({
41
+ key: key || window._AMapLoaderTemp.key, // 申请好的Web端开发者Key,首次调用 load 时必填
42
+ version: version || defaultVersion, // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
43
+ plugins: window._AMapLoaderTemp.plugins, // 需要使用的的插件列表,如比例尺'AMap.Scale'等
44
+ })
45
+ .then((AMap) => {
46
+ window.AMap = AMap;
47
+ resolve(window.AMap);
48
+ window._AMapLoaderTemp.loading = false;
49
+ return AMap;
50
+ })
51
+ .catch((e) => {
52
+ reject(e);
53
+ console.error("AMap loader: ", e);
54
+ });
55
+ });
56
+ }
57
+
58
+ export default Loader;