@atlaskit/share 4.14.1 → 4.15.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,15 @@
1
1
  # @atlaskit/share
2
2
 
3
+ ## 4.15.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#74889](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/74889) [`517e7e939fd6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/517e7e939fd6) - [ux] Added `onFocus` UserPicker Option
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
3
13
  ## 4.14.1
4
14
 
5
15
  ### Patch Changes
@@ -194,7 +194,8 @@ var UserPickerFieldComponent = exports.UserPickerFieldComponent = /*#__PURE__*/f
194
194
  var requiredMessage = getRequiredMessage(product, allowEmail, isBrowseUsersDisabled);
195
195
  var _ref2 = userPickerOptions !== null && userPickerOptions !== void 0 ? userPickerOptions : {},
196
196
  header = _ref2.header,
197
- noOptionsMessageHandler = _ref2.noOptionsMessageHandler;
197
+ noOptionsMessageHandler = _ref2.noOptionsMessageHandler,
198
+ onFocus = _ref2.onFocus;
198
199
  var commonPickerProps = {
199
200
  fieldId: 'share',
200
201
  loadOptions: this.loadOptions,
@@ -206,7 +207,8 @@ var UserPickerFieldComponent = exports.UserPickerFieldComponent = /*#__PURE__*/f
206
207
  onInputChange: onInputChange,
207
208
  maxPickerHeight: _styles.MAX_PICKER_HEIGHT,
208
209
  textFieldBackgroundColor: true,
209
- header: header
210
+ header: header,
211
+ onFocus: onFocus
210
212
  };
211
213
  var UserPickerComponent = enableSmartUserPicker && !isBrowseUsersDisabled ? _smartUserPicker.default : _userPicker.default;
212
214
  var menuPortalTarget = (0, _utils.getMenuPortalTargetCurrentHTML)(selectPortalRef);
@@ -13,7 +13,7 @@ var buildAttributes = function buildAttributes() {
13
13
  var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
14
14
  return _objectSpread({
15
15
  packageName: "@atlaskit/share",
16
- packageVersion: "4.14.1"
16
+ packageVersion: "4.15.0"
17
17
  }, attributes);
18
18
  };
19
19
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
@@ -161,7 +161,8 @@ export class UserPickerFieldComponent extends React.Component {
161
161
  const requiredMessage = getRequiredMessage(product, allowEmail, isBrowseUsersDisabled);
162
162
  const {
163
163
  header,
164
- noOptionsMessageHandler
164
+ noOptionsMessageHandler,
165
+ onFocus
165
166
  } = userPickerOptions !== null && userPickerOptions !== void 0 ? userPickerOptions : {};
166
167
  const commonPickerProps = {
167
168
  fieldId: 'share',
@@ -174,7 +175,8 @@ export class UserPickerFieldComponent extends React.Component {
174
175
  onInputChange: onInputChange,
175
176
  maxPickerHeight: MAX_PICKER_HEIGHT,
176
177
  textFieldBackgroundColor: true,
177
- header
178
+ header,
179
+ onFocus
178
180
  };
179
181
  const UserPickerComponent = enableSmartUserPicker && !isBrowseUsersDisabled ? SmartUserPicker : UserPicker;
180
182
  const menuPortalTarget = getMenuPortalTargetCurrentHTML(selectPortalRef);
@@ -1,7 +1,7 @@
1
1
  import { isEmail, isTeam, isUser } from '@atlaskit/smart-user-picker';
2
2
  const buildAttributes = (attributes = {}) => ({
3
3
  packageName: "@atlaskit/share",
4
- packageVersion: "4.14.1",
4
+ packageVersion: "4.15.0",
5
5
  ...attributes
6
6
  });
7
7
  const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
@@ -184,7 +184,8 @@ export var UserPickerFieldComponent = /*#__PURE__*/function (_React$Component) {
184
184
  var requiredMessage = getRequiredMessage(product, allowEmail, isBrowseUsersDisabled);
185
185
  var _ref2 = userPickerOptions !== null && userPickerOptions !== void 0 ? userPickerOptions : {},
186
186
  header = _ref2.header,
187
- noOptionsMessageHandler = _ref2.noOptionsMessageHandler;
187
+ noOptionsMessageHandler = _ref2.noOptionsMessageHandler,
188
+ onFocus = _ref2.onFocus;
188
189
  var commonPickerProps = {
189
190
  fieldId: 'share',
190
191
  loadOptions: this.loadOptions,
@@ -196,7 +197,8 @@ export var UserPickerFieldComponent = /*#__PURE__*/function (_React$Component) {
196
197
  onInputChange: onInputChange,
197
198
  maxPickerHeight: MAX_PICKER_HEIGHT,
198
199
  textFieldBackgroundColor: true,
199
- header: header
200
+ header: header,
201
+ onFocus: onFocus
200
202
  };
201
203
  var UserPickerComponent = enableSmartUserPicker && !isBrowseUsersDisabled ? SmartUserPicker : UserPicker;
202
204
  var menuPortalTarget = getMenuPortalTargetCurrentHTML(selectPortalRef);
@@ -6,7 +6,7 @@ var buildAttributes = function buildAttributes() {
6
6
  var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7
7
  return _objectSpread({
8
8
  packageName: "@atlaskit/share",
9
- packageVersion: "4.14.1"
9
+ packageVersion: "4.15.0"
10
10
  }, attributes);
11
11
  };
12
12
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- export type UserPickerOptions = {
3
- header?: React.ReactNode;
2
+ import type { UserPickerProps } from '@atlaskit/user-picker';
3
+ export type UserPickerOptions = Pick<UserPickerProps, 'onFocus' | 'header'> & {
4
4
  /** Message to be shown when the menu is open but no options are provided.
5
5
  * If message is null, no message will be displayed.
6
6
  * If message is undefined, default message will be displayed.
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- export type UserPickerOptions = {
3
- header?: React.ReactNode;
2
+ import type { UserPickerProps } from '@atlaskit/user-picker';
3
+ export type UserPickerOptions = Pick<UserPickerProps, 'onFocus' | 'header'> & {
4
4
  /** Message to be shown when the menu is open but no options are provided.
5
5
  * If message is null, no message will be displayed.
6
6
  * If message is undefined, default message will be displayed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "4.14.1",
3
+ "version": "4.15.0",
4
4
  "description": "Fabric Share Element",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -54,10 +54,10 @@
54
54
  "@atlaskit/tabs": "^14.0.0",
55
55
  "@atlaskit/textarea": "^5.0.0",
56
56
  "@atlaskit/theme": "^12.6.0",
57
- "@atlaskit/tokens": "^1.37.0",
57
+ "@atlaskit/tokens": "^1.38.0",
58
58
  "@atlaskit/tooltip": "^18.1.0",
59
59
  "@atlaskit/ufo": "^0.2.0",
60
- "@atlaskit/user-picker": "^10.17.0",
60
+ "@atlaskit/user-picker": "^10.19.0",
61
61
  "@atlaskit/util-service-support": "^6.2.0",
62
62
  "@babel/runtime": "^7.0.0",
63
63
  "@emotion/react": "^11.7.1",