@giteeteam/apps-team-components 1.0.3 → 1.0.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.
@@ -11,7 +11,7 @@ const DropdownReadView = memo(props => {
11
11
  if (!(value === null || value === void 0 ? void 0 : value.length))
12
12
  return '';
13
13
  const result = value
14
- .map(item => { var _a; return (_a = options.find(opt => opt.value === handleValue(item))) === null || _a === void 0 ? void 0 : _a.label; })
14
+ .map(item => { var _a; return (item === null || item === void 0 ? void 0 : item.label) || ((_a = options.find(opt => opt.value === handleValue(item))) === null || _a === void 0 ? void 0 : _a.label); })
15
15
  .filter(Boolean)
16
16
  .join(',');
17
17
  return result;
@@ -213,7 +213,7 @@ export function checkItemCondition(transition, item) {
213
213
  fieldValue = item.name;
214
214
  }
215
215
  else if (field.key === ItemFieldType.reporter) {
216
- const reporter = item[field.key];
216
+ const reporter = item[field.key] || {};
217
217
  fieldValue = { label: reporter.username, value: reporter.objectId };
218
218
  }
219
219
  else if ([ItemFieldType.itemType, ItemFieldType.workspace, ItemFieldType.status].includes(field.key)) {
@@ -301,7 +301,7 @@ export function checkItemCondition(transition, item) {
301
301
  sourceValue = [sourceValue];
302
302
  }
303
303
  if (SUPPORT_USER_KEYS.includes(field.componentType)) {
304
- sourceValue = sourceValue.map(item => item.value);
304
+ sourceValue = sourceValue.map(item => item.value).filter(Boolean);
305
305
  }
306
306
  targetValue = comparedValue ? comparedValue.map(item => item.value) : [];
307
307
  if (!listToCompare(sourceValue, targetValue, dropDownCompare)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@giteeteam/apps-team-components",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",