@chaoswise/ui 2.3.4 → 2.3.5

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.
@@ -115,7 +115,9 @@ export var filterObj = function filterObj(arr) {
115
115
  export var getNotSelectKeys = function getNotSelectKeys(arr) {
116
116
  var keys = [];
117
117
  arr.map(function (item) {
118
- keys.push(item.key);
118
+ var _ref = item.props || {},
119
+ disabled = _ref.disabled;
120
+ !disabled && keys.push(item.key);
119
121
  if (item.props.children && item.props.children.length > 0) {
120
122
  keys = keys.concat(getNotSelectKeys(item.props.children));
121
123
  }
@@ -125,7 +127,9 @@ export var getNotSelectKeys = function getNotSelectKeys(arr) {
125
127
  export var getKeysAndTitle = function getKeysAndTitle(arr) {
126
128
  var keys = [];
127
129
  arr.map(function (item) {
128
- keys.push({
130
+ var _ref2 = item.props || {},
131
+ disabled = _ref2.disabled;
132
+ !disabled && keys.push({
129
133
  key: item.key,
130
134
  title: item.props.title
131
135
  });
@@ -141,7 +145,9 @@ export var getBottomKey = function getBottomKey(arr) {
141
145
  if (item.props.children && item.props.children.length > 0) {
142
146
  keys = keys.concat(getBottomKey(item.props.children));
143
147
  } else {
144
- keys.push({
148
+ var _ref3 = item.props || {},
149
+ disabled = _ref3.disabled;
150
+ !disabled && keys.push({
145
151
  key: item.key,
146
152
  title: item.props.title,
147
153
  children: item.props.children
@@ -159,7 +165,8 @@ export var renderLeafNodetree = function renderLeafNodetree(targetKeys, dataSour
159
165
  } else {
160
166
  newArr.push({
161
167
  key: item.key,
162
- title: item.title
168
+ title: item.title,
169
+ disabled: item.disabled
163
170
  });
164
171
  }
165
172
  });
@@ -169,6 +176,11 @@ export var renderLeafNodetree = function renderLeafNodetree(targetKeys, dataSour
169
176
  });
170
177
  findValue && finalCheckValue.push(findValue);
171
178
  });
179
+ finalCheckValue = finalCheckValue.filter(function (i) {
180
+ return i.disabled;
181
+ }).concat(finalCheckValue.filter(function (i) {
182
+ return !i.disabled;
183
+ }));
172
184
  // return newArr.filter(item=>targetKeys.includes(item.key))
173
185
  return finalCheckValue;
174
186
  };
@@ -189,6 +201,11 @@ export var renderRelationNode = function renderRelationNode(targetKeys, dataSour
189
201
  });
190
202
  findValue && finalCheckValue.push(findValue);
191
203
  });
204
+ finalCheckValue = finalCheckValue.filter(function (i) {
205
+ return i.disabled;
206
+ }).concat(finalCheckValue.filter(function (i) {
207
+ return !i.disabled;
208
+ }));
192
209
  // return flatdata.filter(item=>targetKeys.includes(item.key));
193
210
  return finalCheckValue;
194
211
  };
@@ -108,13 +108,13 @@ var SearchBar = function SearchBar(props) {
108
108
  showTooltipIcon = _tipTooltipOption$sho === void 0 ? false : _tipTooltipOption$sho,
109
109
  tipTooltipOptionRest = _objectWithoutProperties(tipTooltipOption, _excluded);
110
110
  useEffect(function () {
111
- var _formItemContainer$cu, _formItemContainer$cu2, _formItemContainer$cu3;
111
+ var _formItemContainer$cu;
112
112
  if (!Number.isInteger(maxLine) || maxLine < 1) return;
113
113
  // 只设置一次容器的maxHeight
114
114
  if (maxHeight) return;
115
115
 
116
116
  // 获取最大行数的一个节点的高度。来设置外层容器的maxHeight
117
- var children = (_formItemContainer$cu = formItemContainer.current) === null || _formItemContainer$cu === void 0 ? void 0 : (_formItemContainer$cu2 = _formItemContainer$cu.children) === null || _formItemContainer$cu2 === void 0 ? void 0 : (_formItemContainer$cu3 = _formItemContainer$cu2[0]) === null || _formItemContainer$cu3 === void 0 ? void 0 : _formItemContainer$cu3.children;
117
+ var children = (_formItemContainer$cu = formItemContainer.current) === null || _formItemContainer$cu === void 0 || (_formItemContainer$cu = _formItemContainer$cu.children) === null || _formItemContainer$cu === void 0 || (_formItemContainer$cu = _formItemContainer$cu[0]) === null || _formItemContainer$cu === void 0 ? void 0 : _formItemContainer$cu.children;
118
118
  if (!(children !== null && children !== void 0 && children.length)) return;
119
119
  var containerTop = formItemContainer.current.children[0].getBoundingClientRect().top;
120
120
  if (expandSearchArrange === "inline") {
@@ -80,9 +80,9 @@ var SingleSpa = function SingleSpa(_ref) {
80
80
  _context.prev = 9;
81
81
  _context.next = 12;
82
82
  return importScripts(script).then(function (result) {
83
- var _result$default, _result$default$unmou;
83
+ var _result$default;
84
84
  // 子应用umount周期卸载相关样式(防止样式冲突)
85
- (_result$default = result["default"]) === null || _result$default === void 0 ? void 0 : (_result$default$unmou = _result$default.unmount) === null || _result$default$unmou === void 0 ? void 0 : _result$default$unmou.push(function () {
85
+ (_result$default = result["default"]) === null || _result$default === void 0 || (_result$default = _result$default.unmount) === null || _result$default === void 0 ? void 0 : _result$default.push(function () {
86
86
  unloadApplication(project.id, {
87
87
  waitForUnmount: true
88
88
  }).then(function () {
@@ -10,7 +10,7 @@ export function findCommentNode(comment) {
10
10
  for (var i = 0; i < head.childNodes.length; i++) {
11
11
  var _node$nodeValue;
12
12
  var node = head.childNodes[i];
13
- if (node.nodeType === 8 && (node === null || node === void 0 ? void 0 : (_node$nodeValue = node.nodeValue) === null || _node$nodeValue === void 0 ? void 0 : _node$nodeValue.trim()) === comment) {
13
+ if (node.nodeType === 8 && (node === null || node === void 0 || (_node$nodeValue = node.nodeValue) === null || _node$nodeValue === void 0 ? void 0 : _node$nodeValue.trim()) === comment) {
14
14
  return node;
15
15
  }
16
16
  }
@@ -4340,8 +4340,8 @@ function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function"
4340
4340
  }
4341
4341
  });
4342
4342
  $(document).on('click focusin', function (e) {
4343
- var _e$target, _e$target$className;
4344
- if (tab$focus && e.type == 'focusin' && !(e !== null && e !== void 0 && (_e$target = e.target) !== null && _e$target !== void 0 && (_e$target$className = _e$target.className) !== null && _e$target$className !== void 0 && _e$target$className.includes('w-e-text'))) {
4343
+ var _e$target;
4344
+ if (tab$focus && e.type == 'focusin' && !(e !== null && e !== void 0 && (_e$target = e.target) !== null && _e$target !== void 0 && (_e$target = _e$target.className) !== null && _e$target !== void 0 && _e$target.includes('w-e-text'))) {
4345
4345
  tab$focus = false;
4346
4346
  return;
4347
4347
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chaoswise/ui",
3
- "version": "2.3.4",
3
+ "version": "2.3.5",
4
4
  "description": "公共UI库",
5
5
  "keywords": [
6
6
  "ui",
@@ -140,5 +140,5 @@
140
140
  "access": "public"
141
141
  },
142
142
  "license": "MIT",
143
- "gitHead": "72a624e97dab570b1fe67879de3d4d2f757d19a0"
143
+ "gitHead": "2674d3bab3ac2e373daafc58ff0048ba5338aaba"
144
144
  }