ronds-metadata 1.3.21 → 1.3.23
Sign up to get free protection for your applications and to get access to all the features.
- package/es/comps/MetadataForm/DataCell/Select.js +1 -1
- package/es/comps/MetadataForm/HOC/index.js +1 -1
- package/es/comps/MetadataForm/hooks/index.js +13 -12
- package/es/framework/proto/index.d.ts +1 -3
- package/es/framework/proto/index.js +2 -2
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -2
- package/package.json +1 -1
@@ -37,7 +37,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
37
37
|
/*
|
38
38
|
* @Author:wangxian
|
39
39
|
* @Date: 2021-09-18 14:15:04
|
40
|
-
* @LastEditTime: 2023-
|
40
|
+
* @LastEditTime: 2023-11-27 10:51:07
|
41
41
|
*/
|
42
42
|
import React from 'react';
|
43
43
|
import { MetadataFormContext, MetadataRefContext } from '../interface';
|
@@ -5,7 +5,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
5
|
/*
|
6
6
|
* @Author: wangxian
|
7
7
|
* @Date: 2021-09-18 14:15:04
|
8
|
-
* @LastEditTime: 2023-
|
8
|
+
* @LastEditTime: 2023-11-27 11:19:01
|
9
9
|
*/
|
10
10
|
import React from 'react';
|
11
11
|
import { deepClone } from '../../../utils';
|
@@ -4,7 +4,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
4
|
/*
|
5
5
|
* @Author: your name
|
6
6
|
* @Date: 2021-09-18 14:15:04
|
7
|
-
* @LastEditTime: 2023-11-
|
7
|
+
* @LastEditTime: 2023-11-27 11:26:08
|
8
8
|
*/
|
9
9
|
import { getLocale } from '../../../framework/locale';
|
10
10
|
import moment from 'moment';
|
@@ -59,33 +59,37 @@ export var useWatchDepend = function useWatchDepend(_depends, stream$, name) {
|
|
59
59
|
if (_depends && stream$) {
|
60
60
|
stream$.subscribe(function (p) {
|
61
61
|
if ((p === null || p === void 0 ? void 0 : p.type) === STREAM_EVENT_TYPE.ON_VALUES_CHANGE) {
|
62
|
+
var _p$payload;
|
63
|
+
if ((p === null || p === void 0 ? void 0 : (_p$payload = p.payload) === null || _p$payload === void 0 ? void 0 : _p$payload.trigger) === 'firstLoad') {
|
64
|
+
return;
|
65
|
+
}
|
62
66
|
if (_depends === null || _depends === void 0 ? void 0 : _depends.hidden) {
|
63
|
-
var _p$
|
64
|
-
var _hidden = processDependHiddenOrShow(_depends === null || _depends === void 0 ? void 0 : _depends.hidden, p === null || p === void 0 ? void 0 : (_p$
|
67
|
+
var _p$payload2;
|
68
|
+
var _hidden = processDependHiddenOrShow(_depends === null || _depends === void 0 ? void 0 : _depends.hidden, p === null || p === void 0 ? void 0 : (_p$payload2 = p.payload) === null || _p$payload2 === void 0 ? void 0 : _p$payload2.allVals, stream$, name);
|
65
69
|
var _dr = dependsRef.current;
|
66
70
|
_dr.hidden = _hidden;
|
67
71
|
setDepends(_objectSpread({}, _dr));
|
68
72
|
dependsRef.current = _dr;
|
69
73
|
}
|
70
74
|
if (_depends === null || _depends === void 0 ? void 0 : _depends.show) {
|
71
|
-
var _p$
|
72
|
-
var _show = processDependHiddenOrShow(_depends === null || _depends === void 0 ? void 0 : _depends.show, p === null || p === void 0 ? void 0 : (_p$
|
75
|
+
var _p$payload3;
|
76
|
+
var _show = processDependHiddenOrShow(_depends === null || _depends === void 0 ? void 0 : _depends.show, p === null || p === void 0 ? void 0 : (_p$payload3 = p.payload) === null || _p$payload3 === void 0 ? void 0 : _p$payload3.allVals, stream$, name);
|
73
77
|
var _dr2 = dependsRef.current;
|
74
78
|
_dr2.show = _show;
|
75
79
|
setDepends(_objectSpread({}, _dr2));
|
76
80
|
dependsRef.current = _dr2;
|
77
81
|
}
|
78
82
|
if (_depends === null || _depends === void 0 ? void 0 : _depends.notRequire) {
|
79
|
-
var _p$
|
80
|
-
var _notRequire = processDependHiddenOrShow(_depends === null || _depends === void 0 ? void 0 : _depends.notRequire, p === null || p === void 0 ? void 0 : (_p$
|
83
|
+
var _p$payload4;
|
84
|
+
var _notRequire = processDependHiddenOrShow(_depends === null || _depends === void 0 ? void 0 : _depends.notRequire, p === null || p === void 0 ? void 0 : (_p$payload4 = p.payload) === null || _p$payload4 === void 0 ? void 0 : _p$payload4.allVals, stream$, name);
|
81
85
|
var _dr3 = dependsRef.current;
|
82
86
|
_dr3.notRequire = _notRequire;
|
83
87
|
setDepends(_objectSpread({}, _dr3));
|
84
88
|
dependsRef.current = _dr3;
|
85
89
|
}
|
86
90
|
if (_depends === null || _depends === void 0 ? void 0 : _depends.disabled) {
|
87
|
-
var _p$
|
88
|
-
var _disabled = processDependHiddenOrShow(_depends === null || _depends === void 0 ? void 0 : _depends.disabled, p === null || p === void 0 ? void 0 : (_p$
|
91
|
+
var _p$payload5;
|
92
|
+
var _disabled = processDependHiddenOrShow(_depends === null || _depends === void 0 ? void 0 : _depends.disabled, p === null || p === void 0 ? void 0 : (_p$payload5 = p.payload) === null || _p$payload5 === void 0 ? void 0 : _p$payload5.allVals, stream$, name);
|
89
93
|
var _dr4 = dependsRef.current;
|
90
94
|
_dr4.disabled = _disabled;
|
91
95
|
setDepends(_objectSpread({}, _dr4));
|
@@ -99,9 +103,6 @@ export var useWatchDepend = function useWatchDepend(_depends, stream$, name) {
|
|
99
103
|
};
|
100
104
|
var processDependHiddenOrShow = function processDependHiddenOrShow(depend, changeData, stream$, name) {
|
101
105
|
try {
|
102
|
-
if (depend === "choose.indexOf('1')>-1") {
|
103
|
-
debugger;
|
104
|
-
}
|
105
106
|
// const regex = /\w+(\.\w+)?[=<>!]{1}/g;
|
106
107
|
var regex = /\w+(\.\w+)?[=<>!]{1}|\w+(\.\w+)?(\.indexOf\('.+'\)[=<>!]{1})/g;
|
107
108
|
var keys = depend.trim().replace(/\s/g, '').match(regex);
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/*
|
2
2
|
* @Author: wangxian
|
3
3
|
* @Date: 2023-09-22 11:28:45
|
4
|
-
* @LastEditTime: 2023-11-23 15:
|
4
|
+
* @LastEditTime: 2023-11-23 15:48:09
|
5
5
|
*/
|
6
|
-
|
6
|
+
var protobuf = require('protobufjs');
|
7
7
|
function transBase642byte(base64String) {
|
8
8
|
// 解码 Base64 字符串为原始二进制数据
|
9
9
|
var decodedData = window.atob(base64String);
|
package/es/index.d.ts
CHANGED
@@ -24,3 +24,4 @@ export { registerMetadataAPI } from './framework/metadata/MetadataService';
|
|
24
24
|
export { FormRobot } from './framework/fg/index';
|
25
25
|
export { globalSettingStream } from './config';
|
26
26
|
export { handleMd2Doc } from './utils';
|
27
|
+
export { transProtobuf2Json } from './framework/proto/index';
|
package/es/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* @Author:wangxian
|
3
3
|
* @Date: 2021-09-18 14:15:04
|
4
|
-
* @LastEditTime: 2023-11-23 15:
|
4
|
+
* @LastEditTime: 2023-11-23 15:48:15
|
5
5
|
*/
|
6
6
|
import './theme.less';
|
7
7
|
export { default as MetadataEdit } from './comps/MetadataEdit';
|
@@ -31,4 +31,4 @@ export { registerMetadataAPI } from './framework/metadata/MetadataService';
|
|
31
31
|
export { FormRobot } from './framework/fg/index';
|
32
32
|
export { globalSettingStream } from './config';
|
33
33
|
export { handleMd2Doc } from './utils';
|
34
|
-
|
34
|
+
export { transProtobuf2Json } from './framework/proto/index';
|