@atlaskit/user-picker 9.0.3 → 9.0.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/user-picker
2
2
 
3
+ ## 9.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`1d0b82f07d6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1d0b82f07d6) - Added numberOfResults to clicked and pressed events.
8
+
9
+ ## 9.0.5
10
+
11
+ ### Patch Changes
12
+
13
+ - [`9b66179b615`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9b66179b615) - Removed potential logging of PII in the external user hover analytics event.
14
+
15
+ ## 9.0.4
16
+
17
+ ### Patch Changes
18
+
19
+ - [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
20
+
3
21
  ## 9.0.3
4
22
 
5
23
  ### Patch Changes
@@ -3,5 +3,6 @@
3
3
  "main": "../dist/cjs/analytics.js",
4
4
  "module": "../dist/esm/analytics.js",
5
5
  "module:es2019": "../dist/es2019/analytics.js",
6
+ "sideEffects": false,
6
7
  "types": "../dist/types/analytics.d.ts"
7
8
  }
@@ -23,7 +23,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
23
23
 
24
24
  var UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
25
25
  var UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
26
- var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}/;
26
+ var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
27
27
 
28
28
  var startSession = function startSession() {
29
29
  return {
@@ -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
 
@@ -176,7 +177,8 @@ exports.failedEvent = failedEvent;
176
177
  var userInfoEvent = function userInfoEvent(sources, accountId) {
177
178
  return createEvent('ui', 'displayed', 'userInfo', {
178
179
  sources: sources,
179
- accountId: accountId
180
+ // accountId can be PII if it is an email so check that it's an AAID first
181
+ accountId: checkValidId(accountId) ? accountId : null
180
182
  });
181
183
  };
182
184
 
@@ -240,4 +242,8 @@ function values(state) {
240
242
  return state.value ? Array.isArray(state.value) ? state.value.map(function (option) {
241
243
  return optionData2Analytics(option.data);
242
244
  }) : [optionData2Analytics(state.value.data)] : [];
245
+ }
246
+
247
+ function numberOfResults(state) {
248
+ return (state.options || []).length;
243
249
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "9.0.3",
3
+ "version": "9.0.6",
4
4
  "sideEffects": false
5
5
  }
@@ -4,7 +4,7 @@ import { name as packageName, version as packageVersion } from './version.json';
4
4
  import { isExternalUser } from './components/utils';
5
5
  const UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
6
6
  const UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
7
- const UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}/;
7
+ const UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
8
8
  export const startSession = () => ({
9
9
  id: uuidv4(),
10
10
  start: Date.now(),
@@ -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) => {
@@ -117,7 +118,8 @@ export const failedEvent = (props, _, session, journeyId) => createEvent('operat
117
118
  });
118
119
  export const userInfoEvent = (sources, accountId) => createEvent('ui', 'displayed', 'userInfo', {
119
120
  sources,
120
- accountId
121
+ // accountId can be PII if it is an email so check that it's an AAID first
122
+ accountId: checkValidId(accountId) ? accountId : null
121
123
  });
122
124
 
123
125
  function queryLength(state) {
@@ -174,4 +176,8 @@ function isLoading(props, state) {
174
176
 
175
177
  function values(state) {
176
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;
177
183
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "9.0.3",
3
+ "version": "9.0.6",
4
4
  "sideEffects": false
5
5
  }
@@ -10,7 +10,7 @@ import { name as packageName, version as packageVersion } from './version.json';
10
10
  import { isExternalUser } from './components/utils';
11
11
  var UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
12
12
  var UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
13
- var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}/;
13
+ var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
14
14
  export var startSession = function startSession() {
15
15
  return {
16
16
  id: uuidv4(),
@@ -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) {
@@ -138,7 +139,8 @@ export var failedEvent = function failedEvent(props, _, session, journeyId) {
138
139
  export var userInfoEvent = function userInfoEvent(sources, accountId) {
139
140
  return createEvent('ui', 'displayed', 'userInfo', {
140
141
  sources: sources,
141
- accountId: accountId
142
+ // accountId can be PII if it is an email so check that it's an AAID first
143
+ accountId: checkValidId(accountId) ? accountId : null
142
144
  });
143
145
  };
144
146
 
@@ -200,4 +202,8 @@ function values(state) {
200
202
  return state.value ? Array.isArray(state.value) ? state.value.map(function (option) {
201
203
  return optionData2Analytics(option.data);
202
204
  }) : [optionData2Analytics(state.value.data)] : [];
205
+ }
206
+
207
+ function numberOfResults(state) {
208
+ return (state.options || []).length;
203
209
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "9.0.3",
3
+ "version": "9.0.6",
4
4
  "sideEffects": false
5
5
  }
@@ -9,7 +9,7 @@ export declare type UserPickerSession = {
9
9
  lastKey?: number;
10
10
  };
11
11
  export declare const startSession: () => UserPickerSession;
12
- export declare const createAndFireEventInElementsChannel: (payload: Record<string, any>) => (createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent) => import("@atlaskit/analytics-next").UIAnalyticsEvent;
12
+ export declare const createAndFireEventInElementsChannel: (payload: AnalyticsEventPayload) => (createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent) => import("@atlaskit/analytics-next").UIAnalyticsEvent;
13
13
  export interface EventCreator {
14
14
  (props: UserPickerProps, state: UserPickerState, session?: UserPickerSession): AnalyticsEventPayload;
15
15
  (props: UserPickerProps, state: UserPickerState, session?: UserPickerSession, ...args: any[]): AnalyticsEventPayload;
@@ -51,7 +51,7 @@ export declare class BaseUserPickerWithoutAnalytics extends React.Component<Base
51
51
  private getAppearance;
52
52
  render(): JSX.Element;
53
53
  }
54
- export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Pick<BaseUserPickerProps, "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "SelectComponent" | "pickerProps">, "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isDisabled" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "loadOptions" | "loadUserSource" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "SelectComponent" | "pickerProps"> & Partial<Pick<Pick<BaseUserPickerProps, "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "SelectComponent" | "pickerProps">, "isClearable" | "isMulti" | "textFieldBackgroundColor" | "subtle" | "noBorder">> & Partial<Pick<{
54
+ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<BaseUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isDisabled" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "loadOptions" | "loadUserSource" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "SelectComponent" | "pickerProps"> & Partial<Pick<Omit<BaseUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isClearable" | "isMulti" | "textFieldBackgroundColor" | "subtle" | "noBorder">> & Partial<Pick<{
55
55
  isMulti: boolean;
56
56
  subtle: boolean;
57
57
  noBorder: boolean;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- declare const AsyncExternalUserOption: React.LazyExoticComponent<React.ForwardRefExoticComponent<Pick<import("./main").ExternalUserOptionProps, "user" | "status" | "isSelected"> & React.RefAttributes<any>>>;
2
+ declare const AsyncExternalUserOption: React.LazyExoticComponent<React.ForwardRefExoticComponent<Omit<import("./main").ExternalUserOptionProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any>>>;
3
3
  export default AsyncExternalUserOption;
@@ -9,4 +9,4 @@ export declare type ExternalUserOptionProps = WithAnalyticsEventsProps & {
9
9
  status?: string;
10
10
  isSelected: boolean;
11
11
  };
12
- export declare const ExternalUserOption: React.ForwardRefExoticComponent<Pick<ExternalUserOptionProps, "user" | "status" | "isSelected"> & React.RefAttributes<any>>;
12
+ export declare const ExternalUserOption: React.ForwardRefExoticComponent<Omit<ExternalUserOptionProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
@@ -27,7 +27,7 @@ export declare class PopupUserPickerWithoutAnalytics extends React.Component<Pop
27
27
  };
28
28
  render(): JSX.Element;
29
29
  }
30
- export declare const PopupUserPicker: React.ForwardRefExoticComponent<Pick<Pick<PopupUserPickerProps, "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "offset" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "popupTitle" | "boundariesElement" | "placement" | "rootBoundary" | "shouldFlip">, "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "popupTitle"> & Partial<Pick<Pick<PopupUserPickerProps, "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "offset" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "popupTitle" | "boundariesElement" | "placement" | "rootBoundary" | "shouldFlip">, "isMulti" | "offset" | "width" | "boundariesElement" | "placement" | "rootBoundary" | "shouldFlip">> & Partial<Pick<{
30
+ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Pick<Omit<PopupUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "popupTitle"> & Partial<Pick<Omit<PopupUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isMulti" | "width" | "offset" | "boundariesElement" | "placement" | "rootBoundary" | "shouldFlip">> & Partial<Pick<{
31
31
  boundariesElement: string;
32
32
  width: number;
33
33
  isMulti: boolean;
@@ -10,7 +10,7 @@ export declare class UserPickerWithoutAnalytics extends React.Component<UserPick
10
10
  componentDidMount(): void;
11
11
  render(): JSX.Element;
12
12
  }
13
- export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Pick<UserPickerProps, "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions">, "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions"> & Partial<Pick<Pick<UserPickerProps, "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions">, "isMulti" | "width">> & Partial<Pick<{
13
+ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<UserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions"> & Partial<Pick<Omit<UserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isMulti" | "width">> & Partial<Pick<{
14
14
  width: number;
15
15
  isMulti: boolean;
16
16
  }, never>> & React.RefAttributes<any>>;
@@ -9,7 +9,7 @@ import { PopupControl } from './PopupControl';
9
9
  /**
10
10
  * Memoize getComponents to avoid rerenders.
11
11
  */
12
- export declare const getComponents: import("memoize-one").MemoizedFn<(multi?: boolean | undefined, anchor?: import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined) => {
12
+ export declare const getComponents: import("memoize-one").MemoizedFn<(multi?: boolean | undefined, anchor?: import("react").ComponentType<any> | undefined) => {
13
13
  Control: import("react").ComponentType<any>;
14
14
  Option: import("react").FC<import("./Option").OptionProps>;
15
15
  MultiValue?: undefined;
@@ -1,6 +1,6 @@
1
1
  import { Placement } from '@atlaskit/popper';
2
- import { Target } from '../types';
3
- export declare const getPopupProps: import("memoize-one").MemoizedFn<(width: string | number, target: Target, onFlip: (data: any) => any, boundariesElement?: HTMLElement | "scrollParent" | "window" | "viewport" | undefined, offset?: number[] | undefined, placement?: "auto" | "auto-start" | "auto-end" | "top" | "bottom" | "right" | "left" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined, rootBoundary?: "viewport" | "document" | undefined, shouldFlip?: boolean | undefined, popupTitle?: string | undefined) => {
2
+ import { Target, BoundariesElement, RootBoundary } from '../types';
3
+ export declare const getPopupProps: import("memoize-one").MemoizedFn<(width: string | number, target: Target, onFlip: (data: any) => any, boundariesElement?: BoundariesElement | undefined, offset?: number[] | undefined, placement?: Placement | undefined, rootBoundary?: RootBoundary | undefined, shouldFlip?: boolean | undefined, popupTitle?: string | undefined) => {
4
4
  searchThreshold: number;
5
5
  controlShouldRenderValue: boolean;
6
6
  minMenuWidth: string | number;
@@ -30,8 +30,8 @@ export declare const getPopupProps: import("memoize-one").MemoizedFn<(width: str
30
30
  } | {
31
31
  name: string;
32
32
  options: {
33
- rootBoundary: "viewport" | "document" | undefined;
34
- boundary: HTMLElement | "scrollParent" | "window" | "viewport" | undefined;
33
+ rootBoundary: RootBoundary | undefined;
34
+ boundary: BoundariesElement | undefined;
35
35
  offset?: undefined;
36
36
  };
37
37
  enabled?: undefined;
@@ -18,7 +18,7 @@ export interface OptionToSelectableOptions {
18
18
  }
19
19
  export declare const optionToSelectableOptions: OptionToSelectableOptions;
20
20
  export declare const getAvatarSize: (appearance: string) => 'xsmall' | 'small' | 'medium';
21
- export declare const isChildInput: (child: ReactChild) => child is ReactElement<any, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => import("react").Component<any, any, any>)> | null) | (new (props: any) => import("react").Component<any, any, any>)>;
21
+ export declare const isChildInput: (child: ReactChild) => child is ReactElement<any, string | import("react").JSXElementConstructor<any>>;
22
22
  export declare const isSingleValue: (value?: AtlaskitSelectValue) => value is Option<OptionData>;
23
23
  export declare const hasValue: (value?: string | undefined) => value is string;
24
24
  export declare const callCallback: <U extends any[], R>(callback: ((...U: U) => R) | undefined, ...args: U) => R | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "9.0.3",
3
+ "version": "9.0.6",
4
4
  "description": "Fabric component for display a dropdown to select a user from",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@atlaskit/analytics-viewer": "^0.4.0",
54
- "@atlaskit/button": "^16.2.0",
54
+ "@atlaskit/button": "^16.3.0",
55
55
  "@atlaskit/docs": "*",
56
56
  "@atlaskit/elements-test-helpers": "^0.7.0",
57
57
  "@atlaskit/modal-dialog": "^12.2.0",
@@ -73,7 +73,7 @@
73
73
  "faker": "^4.1.0",
74
74
  "mock-apollo-client": "^0.1.0",
75
75
  "react-intl-next": "npm:react-intl@^5.18.1",
76
- "typescript": "3.9.10"
76
+ "typescript": "4.2.4"
77
77
  },
78
78
  "techstack": {
79
79
  "@repo/internal": {
@@ -3,5 +3,6 @@
3
3
  "main": "../dist/cjs/types.js",
4
4
  "module": "../dist/esm/types.js",
5
5
  "module:es2019": "../dist/es2019/types.js",
6
+ "sideEffects": false,
6
7
  "types": "../dist/types/types.d.ts"
7
8
  }