@aloudata/aloudata-design 2.12.5 → 2.12.6

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.
@@ -31,7 +31,7 @@ var AldCustomConfigProvider = function AldCustomConfigProvider(props) {
31
31
  }
32
32
  }
33
33
  }, props, {
34
- locale: ((_props$locale = props.locale) === null || _props$locale === void 0 ? void 0 : _props$locale.locale) === 'zh-cn' ? antdZhCN : antdEnUS
34
+ locale: ((_props$locale = props.locale) === null || _props$locale === void 0 ? void 0 : _props$locale.locale) === 'en' ? antdEnUS : antdZhCN
35
35
  }), /*#__PURE__*/React.createElement(LocaleContext.Provider, {
36
36
  value: props.locale || defaultLocale
37
37
  }, childNode));
@@ -101,7 +101,20 @@ export var PanelWrapper = function PanelWrapper(_ref) {
101
101
  } else if (isUser(value) || isUserGroup(value)) {
102
102
  setSelectedUserList([value]);
103
103
  } else {
104
- console.error('props error');
104
+ var param = [];
105
+ if (!value) return;
106
+ if (Array.isArray(value) && value.length === 0) {
107
+ setSelectedUserList([]);
108
+ return;
109
+ }
110
+ if (!Array.isArray(value)) {
111
+ param = [value];
112
+ } else {
113
+ param = value;
114
+ }
115
+ queryByIds(param).then(function (result) {
116
+ setSelectedUserList(result);
117
+ });
105
118
  }
106
119
  }, [value, queryByIds]);
107
120
  var onSelectedChange = useCallback(function (users) {
@@ -1,10 +1,10 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
2
  import { EUserType } from "../../ConfigProvider/getUserList";
3
3
  export function isUser(value) {
4
- return value && _typeof(value) === 'object' && value.type === EUserType.USER && (value.nickname || value.name || value.userId);
4
+ return value && _typeof(value) === 'object' && value.type === EUserType.USER && (value.nickname || value.name);
5
5
  }
6
6
  export function isUserGroup(value) {
7
- return value && _typeof(value) === 'object' && value.type === EUserType.USER_GROUP && (value.name || value.groupId);
7
+ return value && _typeof(value) === 'object' && value.type === EUserType.USER_GROUP && value.name;
8
8
  }
9
9
  function getUsersWithUserId(obj) {
10
10
  var users = [];
@@ -9,6 +9,7 @@ export declare const defaultLocale: {
9
9
  };
10
10
  export declare const LocaleContext: import("react").Context<Locale>;
11
11
  export declare function getTranslator(lang?: string): {
12
+ locale: string;
12
13
  Empty: {
13
14
  noContentFound: string;
14
15
  };
@@ -1,4 +1,5 @@
1
1
  declare const localeValues: {
2
+ locale: string;
2
3
  Empty: {
3
4
  noContentFound: string;
4
5
  };
@@ -1,4 +1,5 @@
1
1
  var localeValues = {
2
+ locale: 'en',
2
3
  Empty: {
3
4
  noContentFound: 'No Content Found'
4
5
  },
@@ -1,4 +1,5 @@
1
1
  declare const localeValues: {
2
+ locale: string;
2
3
  Empty: {
3
4
  noContentFound: string;
4
5
  };
@@ -1,4 +1,5 @@
1
1
  var localeValues = {
2
+ locale: 'zh-cn',
2
3
  Empty: {
3
4
  noContentFound: '未找到内容'
4
5
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aloudata/aloudata-design",
3
- "version": "2.12.5",
3
+ "version": "2.12.6",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",