@signalplus/params-about 0.1.14 → 0.1.15
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/lib/es/index.js +5 -13
- package/package.json +1 -1
package/lib/es/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Bundle of @signalplus/params-about
|
|
3
3
|
* Generated: 2022-04-10
|
|
4
|
-
* Version: 0.1.
|
|
4
|
+
* Version: 0.1.15
|
|
5
5
|
* License: MIT
|
|
6
6
|
* Author: 2631541504@qq.com
|
|
7
7
|
*/
|
|
@@ -2081,24 +2081,16 @@ var ParamGroupEditorModal = /*#__PURE__*/function () {
|
|
|
2081
2081
|
|
|
2082
2082
|
_defineProperty(ParamGroupEditorModal, "el", new ReactGlobalComp('param-group-editor-modal', ParamGroupEditorModalEl));
|
|
2083
2083
|
|
|
2084
|
-
function genOptions(props
|
|
2084
|
+
function genOptions(props) {
|
|
2085
2085
|
var filter = function filter(it) {
|
|
2086
2086
|
return it.valueType === ParamType.ParamGroup;
|
|
2087
2087
|
};
|
|
2088
2088
|
|
|
2089
|
-
var paramsAndParent = props.targetParams.flatMap(function (id) {
|
|
2090
|
-
var _paramsMap$id;
|
|
2091
|
-
|
|
2092
|
-
return [id, (_paramsMap$id = paramsMap[id]) === null || _paramsMap$id === void 0 ? void 0 : _paramsMap$id.parentId];
|
|
2093
|
-
}).filter(function (it) {
|
|
2094
|
-
return it !== undefined;
|
|
2095
|
-
}).map(String);
|
|
2096
|
-
|
|
2097
2089
|
var cvt = function cvt(it) {
|
|
2098
2090
|
var _it$children;
|
|
2099
2091
|
|
|
2100
2092
|
return _objectSpread2(_objectSpread2({}, it), {}, {
|
|
2101
|
-
disabled:
|
|
2093
|
+
disabled: props.targetParams.includes(String(it.$paramId)),
|
|
2102
2094
|
children: (_it$children = it.children) === null || _it$children === void 0 ? void 0 : _it$children.filter(filter).map(cvt)
|
|
2103
2095
|
});
|
|
2104
2096
|
};
|
|
@@ -2126,7 +2118,7 @@ function initState(props) {
|
|
|
2126
2118
|
var paramsMap = genParamsMap(props);
|
|
2127
2119
|
return {
|
|
2128
2120
|
preProps: props,
|
|
2129
|
-
options: genOptions(props
|
|
2121
|
+
options: genOptions(props),
|
|
2130
2122
|
paramsMap: paramsMap
|
|
2131
2123
|
};
|
|
2132
2124
|
}
|
|
@@ -2235,7 +2227,7 @@ var ParamMover = /*#__PURE__*/function (_PureComponent) {
|
|
|
2235
2227
|
state.paramsMap = genParamsMap(props);
|
|
2236
2228
|
|
|
2237
2229
|
if (props.targetParams !== state.preProps.targetParams) {
|
|
2238
|
-
state.options = genOptions(props
|
|
2230
|
+
state.options = genOptions(props);
|
|
2239
2231
|
}
|
|
2240
2232
|
}
|
|
2241
2233
|
|