@blueking/bk-user-selector 0.0.29-beta.2 → 0.0.29-beta.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueking/bk-user-selector",
3
- "version": "0.0.29-beta.2",
3
+ "version": "0.0.29-beta.3",
4
4
  "description": "蓝鲸用户选择器",
5
5
  "license": "MIT",
6
6
  "author": "Tencent BlueKing",
@@ -10695,7 +10695,7 @@ const jsonpRequest = (requestUrl, options = {}) => {
10695
10695
  };
10696
10696
  window[callbackName] = (data2) => {
10697
10697
  cleanup();
10698
- resolve(data2);
10698
+ resolve(data2.data || data2);
10699
10699
  };
10700
10700
  timeoutId = setTimeout(() => {
10701
10701
  cleanup();
@@ -10779,7 +10779,7 @@ const getTenants = async (apiBaseUrl, tenantId) => {
10779
10779
  };
10780
10780
  const searchUsers = async (params) => {
10781
10781
  const { apiBaseUrl, tenantId, keyword, enableMultiTenantMode = true } = params;
10782
- if (enableMultiTenantMode) {
10782
+ if (!enableMultiTenantMode) {
10783
10783
  const userList = await getUserList(apiBaseUrl, {
10784
10784
  keyword,
10785
10785
  pageSize: 100,
@@ -10815,7 +10815,7 @@ const searchUsers = async (params) => {
10815
10815
  const lookupUsers = async (params) => {
10816
10816
  const { apiBaseUrl, tenantId, exactSearchKey = "bk_username", usersList = [], enableMultiTenantMode = true } = params;
10817
10817
  const users = usersList.filter((user) => user).map((user) => user.trim());
10818
- if (enableMultiTenantMode) {
10818
+ if (!enableMultiTenantMode) {
10819
10819
  const userList = await getUserList(apiBaseUrl, {
10820
10820
  userIds: users
10821
10821
  }).catch(() => {
@@ -10856,7 +10856,7 @@ const formatUsers = (users) => {
10856
10856
  }));
10857
10857
  };
10858
10858
  const getUserList = async (url, params) => {
10859
- const { userIds, keyword, pageSize, page, appCode } = params;
10859
+ const { userIds, keyword, pageSize = 20, page, appCode } = params;
10860
10860
  const { data: userList } = await useJSONP(url, {
10861
10861
  params: {
10862
10862
  exact_lookups: (userIds == null ? void 0 : userIds.join(",")) || void 0,
@@ -17320,7 +17320,7 @@ ${$(r2)}`), n2;
17320
17320
  };
17321
17321
  window[callbackName] = (data2) => {
17322
17322
  cleanup();
17323
- resolve2(data2);
17323
+ resolve2(data2.data || data2);
17324
17324
  };
17325
17325
  timeoutId = setTimeout(() => {
17326
17326
  cleanup();
@@ -17404,7 +17404,7 @@ ${$(r2)}`), n2;
17404
17404
  };
17405
17405
  const searchUsers = async (params) => {
17406
17406
  const { apiBaseUrl, tenantId, keyword, enableMultiTenantMode = true } = params;
17407
- if (enableMultiTenantMode) {
17407
+ if (!enableMultiTenantMode) {
17408
17408
  const userList = await getUserList(apiBaseUrl, {
17409
17409
  keyword,
17410
17410
  pageSize: 100,
@@ -17440,7 +17440,7 @@ ${$(r2)}`), n2;
17440
17440
  const lookupUsers = async (params) => {
17441
17441
  const { apiBaseUrl, tenantId, exactSearchKey = "bk_username", usersList = [], enableMultiTenantMode = true } = params;
17442
17442
  const users = usersList.filter((user) => user).map((user) => user.trim());
17443
- if (enableMultiTenantMode) {
17443
+ if (!enableMultiTenantMode) {
17444
17444
  const userList = await getUserList(apiBaseUrl, {
17445
17445
  userIds: users
17446
17446
  }).catch(() => {
@@ -17481,7 +17481,7 @@ ${$(r2)}`), n2;
17481
17481
  }));
17482
17482
  };
17483
17483
  const getUserList = async (url, params) => {
17484
- const { userIds, keyword, pageSize, page, appCode } = params;
17484
+ const { userIds, keyword, pageSize = 20, page, appCode } = params;
17485
17485
  const { data: userList } = await useJSONP(url, {
17486
17486
  params: {
17487
17487
  exact_lookups: (userIds == null ? void 0 : userIds.join(",")) || void 0,
@@ -10717,7 +10717,7 @@ ${$(r2)}`), n2;
10717
10717
  };
10718
10718
  window[callbackName] = (data2) => {
10719
10719
  cleanup();
10720
- resolve(data2);
10720
+ resolve(data2.data || data2);
10721
10721
  };
10722
10722
  timeoutId = setTimeout(() => {
10723
10723
  cleanup();
@@ -10801,7 +10801,7 @@ ${$(r2)}`), n2;
10801
10801
  };
10802
10802
  const searchUsers = async (params) => {
10803
10803
  const { apiBaseUrl, tenantId, keyword, enableMultiTenantMode = true } = params;
10804
- if (enableMultiTenantMode) {
10804
+ if (!enableMultiTenantMode) {
10805
10805
  const userList = await getUserList(apiBaseUrl, {
10806
10806
  keyword,
10807
10807
  pageSize: 100,
@@ -10837,7 +10837,7 @@ ${$(r2)}`), n2;
10837
10837
  const lookupUsers = async (params) => {
10838
10838
  const { apiBaseUrl, tenantId, exactSearchKey = "bk_username", usersList = [], enableMultiTenantMode = true } = params;
10839
10839
  const users = usersList.filter((user) => user).map((user) => user.trim());
10840
- if (enableMultiTenantMode) {
10840
+ if (!enableMultiTenantMode) {
10841
10841
  const userList = await getUserList(apiBaseUrl, {
10842
10842
  userIds: users
10843
10843
  }).catch(() => {
@@ -10878,7 +10878,7 @@ ${$(r2)}`), n2;
10878
10878
  }));
10879
10879
  };
10880
10880
  const getUserList = async (url, params) => {
10881
- const { userIds, keyword, pageSize, page, appCode } = params;
10881
+ const { userIds, keyword, pageSize = 20, page, appCode } = params;
10882
10882
  const { data: userList } = await useJSONP(url, {
10883
10883
  params: {
10884
10884
  exact_lookups: (userIds == null ? void 0 : userIds.join(",")) || void 0,
@@ -25,7 +25,7 @@ const jsonpRequest = (requestUrl, options = {}) => {
25
25
  };
26
26
  window[callbackName] = (data) => {
27
27
  cleanup();
28
- resolve(data);
28
+ resolve(data.data || data);
29
29
  };
30
30
  timeoutId = setTimeout(() => {
31
31
  cleanup();
@@ -109,7 +109,7 @@ const getTenants = async (apiBaseUrl, tenantId) => {
109
109
  };
110
110
  const searchUsers = async (params) => {
111
111
  const { apiBaseUrl, tenantId, keyword, enableMultiTenantMode = true } = params;
112
- if (enableMultiTenantMode) {
112
+ if (!enableMultiTenantMode) {
113
113
  const userList = await getUserList(apiBaseUrl, {
114
114
  keyword,
115
115
  pageSize: 100,
@@ -145,7 +145,7 @@ const searchUsers = async (params) => {
145
145
  const lookupUsers = async (params) => {
146
146
  const { apiBaseUrl, tenantId, exactSearchKey = "bk_username", usersList = [], enableMultiTenantMode = true } = params;
147
147
  const users = usersList.filter((user) => user).map((user) => user.trim());
148
- if (enableMultiTenantMode) {
148
+ if (!enableMultiTenantMode) {
149
149
  const userList = await getUserList(apiBaseUrl, {
150
150
  userIds: users
151
151
  }).catch(() => {
@@ -186,7 +186,7 @@ const formatUsers = (users) => {
186
186
  }));
187
187
  };
188
188
  const getUserList = async (url, params) => {
189
- const { userIds, keyword, pageSize, page, appCode } = params;
189
+ const { userIds, keyword, pageSize = 20, page, appCode } = params;
190
190
  const { data: userList } = await useJSONP(url, {
191
191
  params: {
192
192
  exact_lookups: (userIds == null ? void 0 : userIds.join(",")) || void 0,
@@ -10724,7 +10724,7 @@ ${$(r2)}`), n2;
10724
10724
  };
10725
10725
  window[callbackName] = (data2) => {
10726
10726
  cleanup();
10727
- resolve(data2);
10727
+ resolve(data2.data || data2);
10728
10728
  };
10729
10729
  timeoutId = setTimeout(() => {
10730
10730
  cleanup();
@@ -10808,7 +10808,7 @@ ${$(r2)}`), n2;
10808
10808
  };
10809
10809
  const searchUsers = async (params) => {
10810
10810
  const { apiBaseUrl, tenantId, keyword, enableMultiTenantMode = true } = params;
10811
- if (enableMultiTenantMode) {
10811
+ if (!enableMultiTenantMode) {
10812
10812
  const userList = await getUserList(apiBaseUrl, {
10813
10813
  keyword,
10814
10814
  pageSize: 100,
@@ -10844,7 +10844,7 @@ ${$(r2)}`), n2;
10844
10844
  const lookupUsers = async (params) => {
10845
10845
  const { apiBaseUrl, tenantId, exactSearchKey = "bk_username", usersList = [], enableMultiTenantMode = true } = params;
10846
10846
  const users = usersList.filter((user) => user).map((user) => user.trim());
10847
- if (enableMultiTenantMode) {
10847
+ if (!enableMultiTenantMode) {
10848
10848
  const userList = await getUserList(apiBaseUrl, {
10849
10849
  userIds: users
10850
10850
  }).catch(() => {
@@ -10885,7 +10885,7 @@ ${$(r2)}`), n2;
10885
10885
  }));
10886
10886
  };
10887
10887
  const getUserList = async (url, params) => {
10888
- const { userIds, keyword, pageSize, page, appCode } = params;
10888
+ const { userIds, keyword, pageSize = 20, page, appCode } = params;
10889
10889
  const { data: userList } = await useJSONP(url, {
10890
10890
  params: {
10891
10891
  exact_lookups: (userIds == null ? void 0 : userIds.join(",")) || void 0,
@@ -30,7 +30,7 @@
30
30
  };
31
31
  window[callbackName] = (data) => {
32
32
  cleanup();
33
- resolve(data);
33
+ resolve(data.data || data);
34
34
  };
35
35
  timeoutId = setTimeout(() => {
36
36
  cleanup();
@@ -114,7 +114,7 @@
114
114
  };
115
115
  const searchUsers = async (params) => {
116
116
  const { apiBaseUrl, tenantId, keyword, enableMultiTenantMode = true } = params;
117
- if (enableMultiTenantMode) {
117
+ if (!enableMultiTenantMode) {
118
118
  const userList = await getUserList(apiBaseUrl, {
119
119
  keyword,
120
120
  pageSize: 100,
@@ -150,7 +150,7 @@
150
150
  const lookupUsers = async (params) => {
151
151
  const { apiBaseUrl, tenantId, exactSearchKey = "bk_username", usersList = [], enableMultiTenantMode = true } = params;
152
152
  const users = usersList.filter((user) => user).map((user) => user.trim());
153
- if (enableMultiTenantMode) {
153
+ if (!enableMultiTenantMode) {
154
154
  const userList = await getUserList(apiBaseUrl, {
155
155
  userIds: users
156
156
  }).catch(() => {
@@ -191,7 +191,7 @@
191
191
  }));
192
192
  };
193
193
  const getUserList = async (url, params) => {
194
- const { userIds, keyword, pageSize, page, appCode } = params;
194
+ const { userIds, keyword, pageSize = 20, page, appCode } = params;
195
195
  const { data: userList } = await useJSONP(url, {
196
196
  params: {
197
197
  exact_lookups: (userIds == null ? void 0 : userIds.join(",")) || void 0,