@atlaskit/user-picker 9.0.5 → 9.1.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/user-picker
2
2
 
3
+ ## 9.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`cc40ab95bd4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cc40ab95bd4) - Adds a list of team members under OptionData for Teams
8
+
9
+ ## 9.0.7
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 9.0.6
16
+
17
+ ### Patch Changes
18
+
19
+ - [`1d0b82f07d6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1d0b82f07d6) - Added numberOfResults to clicked and pressed events.
20
+
3
21
  ## 9.0.5
4
22
 
5
23
  ### Patch Changes
@@ -147,7 +147,8 @@ var selectEvent = function selectEvent(props, state, session, journeyId) {
147
147
  spaceInQuery: spaceInQuery(state),
148
148
  upKeyCount: upKeyCount(session),
149
149
  downKeyCount: downKeyCount(session),
150
- result: result(arguments.length <= 4 ? undefined : arguments[4])
150
+ result: result(arguments.length <= 4 ? undefined : arguments[4]),
151
+ numberOfResults: numberOfResults(state)
151
152
  }));
152
153
  };
153
154
 
@@ -241,4 +242,8 @@ function values(state) {
241
242
  return state.value ? Array.isArray(state.value) ? state.value.map(function (option) {
242
243
  return optionData2Analytics(option.data);
243
244
  }) : [optionData2Analytics(state.value.data)] : [];
245
+ }
246
+
247
+ function numberOfResults(state) {
248
+ return (state.options || []).length;
244
249
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "9.0.5",
3
+ "version": "9.1.0",
4
4
  "sideEffects": false
5
5
  }
@@ -99,7 +99,8 @@ export const selectEvent = (props, state, session, journeyId, ...args) => {
99
99
  spaceInQuery: spaceInQuery(state),
100
100
  upKeyCount: upKeyCount(session),
101
101
  downKeyCount: downKeyCount(session),
102
- result: result(args[0])
102
+ result: result(args[0]),
103
+ numberOfResults: numberOfResults(state)
103
104
  });
104
105
  };
105
106
  export const searchedEvent = (props, state, session, journeyId) => {
@@ -175,4 +176,8 @@ function isLoading(props, state) {
175
176
 
176
177
  function values(state) {
177
178
  return state.value ? Array.isArray(state.value) ? state.value.map(option => optionData2Analytics(option.data)) : [optionData2Analytics(state.value.data)] : [];
179
+ }
180
+
181
+ function numberOfResults(state) {
182
+ return (state.options || []).length;
178
183
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "9.0.5",
3
+ "version": "9.1.0",
4
4
  "sideEffects": false
5
5
  }
@@ -118,7 +118,8 @@ export var selectEvent = function selectEvent(props, state, session, journeyId)
118
118
  spaceInQuery: spaceInQuery(state),
119
119
  upKeyCount: upKeyCount(session),
120
120
  downKeyCount: downKeyCount(session),
121
- result: result(arguments.length <= 4 ? undefined : arguments[4])
121
+ result: result(arguments.length <= 4 ? undefined : arguments[4]),
122
+ numberOfResults: numberOfResults(state)
122
123
  }));
123
124
  };
124
125
  export var searchedEvent = function searchedEvent(props, state, session, journeyId) {
@@ -201,4 +202,8 @@ function values(state) {
201
202
  return state.value ? Array.isArray(state.value) ? state.value.map(function (option) {
202
203
  return optionData2Analytics(option.data);
203
204
  }) : [optionData2Analytics(state.value.data)] : [];
205
+ }
206
+
207
+ function numberOfResults(state) {
208
+ return (state.options || []).length;
204
209
  }
@@ -1,5 +1,5 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
 
4
4
  /**
5
5
  * Tries to get the most specific messages bundle for a given locale.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "9.0.5",
3
+ "version": "9.1.0",
4
4
  "sideEffects": false
5
5
  }
@@ -4,4 +4,4 @@ export { UserPicker as default } from './components/UserPicker';
4
4
  export { PopupUserPicker } from './components/PopupUserPicker';
5
5
  export { isEmail, isExternalUser, isTeam, isUser } from './components/utils';
6
6
  export { EmailType, GroupType, TeamType, UserType, } from './types';
7
- export type { ActionTypes, Appearance, AtlasKitSelectChange, AtlaskitSelectValue, DefaultValue, InputActionTypes, LozengeProps, OnChange, OnInputChange, OnOption, OnPicker, Option, OptionData, OptionIdentifier, PopupUserPickerProps, Promisable, Target, UserPickerProps, UserPickerState, Value, Email, Group, GroupHighlight, HighlightRange, LoadOptions, Team, TeamHighlight, User, UserHighlight, ExternalUser, UserSource, } from './types';
7
+ export type { ActionTypes, Appearance, AtlasKitSelectChange, AtlaskitSelectValue, DefaultValue, InputActionTypes, LozengeProps, OnChange, OnInputChange, OnOption, OnPicker, Option, OptionData, OptionIdentifier, PopupUserPickerProps, Promisable, Target, UserPickerProps, UserPickerState, Value, Email, Group, GroupHighlight, HighlightRange, LoadOptions, Team, TeamMember, TeamHighlight, User, UserHighlight, ExternalUser, UserSource, } from './types';
@@ -225,10 +225,15 @@ export interface LozengeProps {
225
225
  isBold?: boolean;
226
226
  }
227
227
  export declare const TeamType = "team";
228
+ export interface TeamMember {
229
+ name: string;
230
+ id: string;
231
+ }
228
232
  export interface Team extends OptionData {
229
233
  avatarUrl?: string;
230
234
  description?: string;
231
235
  memberCount?: number;
236
+ members?: TeamMember[];
232
237
  includesYou?: boolean;
233
238
  highlight?: TeamHighlight;
234
239
  type: 'team';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "9.0.5",
3
+ "version": "9.1.0",
4
4
  "description": "Fabric component for display a dropdown to select a user from",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,13 +29,13 @@
29
29
  "@atlaskit/analytics-next": "^8.2.0",
30
30
  "@atlaskit/avatar": "^20.5.0",
31
31
  "@atlaskit/icon": "^21.10.0",
32
- "@atlaskit/logo": "^13.5.4",
32
+ "@atlaskit/logo": "^13.6.0",
33
33
  "@atlaskit/lozenge": "^11.0.0",
34
34
  "@atlaskit/popper": "^5.0.0",
35
35
  "@atlaskit/select": "^15.2.0",
36
36
  "@atlaskit/spinner": "^15.1.4",
37
37
  "@atlaskit/theme": "^12.1.0",
38
- "@atlaskit/tokens": "^0.9.0",
38
+ "@atlaskit/tokens": "^0.10.0",
39
39
  "@atlaskit/tooltip": "^17.5.0",
40
40
  "@atlaskit/ufo": "^0.1.0",
41
41
  "@babel/runtime": "^7.0.0",