@atlaskit/share 4.15.0 → 4.16.1

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,18 @@
1
1
  # @atlaskit/share
2
2
 
3
+ ## 4.16.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#76695](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/76695) [`dcde4602dfb8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/dcde4602dfb8) - Track # of non licensed users when submitShare is fired
8
+ - Updated dependencies
9
+
10
+ ## 4.16.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [#75188](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/75188) [`4887bdaf0d92`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4887bdaf0d92) - [ux] Introducing includeNonLicensedUsers to the Share component. Enabling this feature would include Non-licensed user in the Smart User Picker search result. Non-licensed users are users who don't have a license to the product specified in the product prop.
15
+
3
16
  ## 4.15.0
4
17
 
5
18
  ### Minor Changes
@@ -24,6 +24,8 @@ var _styles = require("./styles");
24
24
  var _utils = require("./utils");
25
25
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
26
26
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
28
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
27
29
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
28
30
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
29
31
  var REQUIRED = exports.REQUIRED = 'REQUIRED';
@@ -159,29 +161,20 @@ var UserPickerFieldComponent = exports.UserPickerFieldComponent = /*#__PURE__*/f
159
161
  }
160
162
  return event;
161
163
  });
162
- return _this;
163
- }
164
- (0, _createClass2.default)(UserPickerFieldComponent, [{
165
- key: "render",
166
- value: function render() {
167
- var _this2 = this;
168
- var _this$props2 = this.props,
169
- defaultValue = _this$props2.defaultValue,
170
- enableSmartUserPicker = _this$props2.enableSmartUserPicker,
171
- config = _this$props2.config,
172
- intl = _this$props2.intl,
173
- isLoading = _this$props2.isLoading,
164
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getSmartUserPickerProps", function () {
165
+ var _this$props2 = _this.props,
174
166
  product = _this$props2.product,
175
- onInputChange = _this$props2.onInputChange,
167
+ intl = _this$props2.intl,
176
168
  loggedInAccountId = _this$props2.loggedInAccountId,
177
169
  cloudId = _this$props2.cloudId,
178
- selectPortalRef = _this$props2.selectPortalRef,
179
- isPublicLink = _this$props2.isPublicLink,
180
170
  orgId = _this$props2.orgId,
171
+ enableSmartUserPicker = _this$props2.enableSmartUserPicker,
181
172
  isBrowseUsersDisabled = _this$props2.isBrowseUsersDisabled,
182
- shareError = _this$props2.shareError,
183
173
  userPickerOptions = _this$props2.userPickerOptions;
184
- var smartUserPickerProps = enableSmartUserPicker && !isBrowseUsersDisabled ? {
174
+ if (!enableSmartUserPicker || isBrowseUsersDisabled) {
175
+ return {};
176
+ }
177
+ var baseProps = {
185
178
  productKey: product,
186
179
  principalId: loggedInAccountId,
187
180
  siteId: cloudId || '',
@@ -189,7 +182,43 @@ var UserPickerFieldComponent = exports.UserPickerFieldComponent = /*#__PURE__*/f
189
182
  includeGroups: true,
190
183
  debounceTime: DEBOUNCE_MS,
191
184
  orgId: orgId
192
- } : {};
185
+ };
186
+ var externalUserBylineByProduct = {
187
+ confluence: intl.formatMessage(_i18n.messages.inviteToConfluence),
188
+ jira: intl.formatMessage(_i18n.messages.inviteToJira)
189
+ };
190
+ if (userPickerOptions !== null && userPickerOptions !== void 0 && userPickerOptions.includeNonLicensedUsers) {
191
+ var externalUserByline = externalUserBylineByProduct[product] || '';
192
+ var overrideByline = product === 'confluence' || product === 'jira' ? function (item) {
193
+ return item.isExternal ? externalUserByline : '';
194
+ } : undefined;
195
+ return _objectSpread(_objectSpread({}, baseProps), {}, {
196
+ includeNonLicensedUsers: true,
197
+ overrideByline: overrideByline
198
+ });
199
+ }
200
+ return baseProps;
201
+ });
202
+ return _this;
203
+ }
204
+ (0, _createClass2.default)(UserPickerFieldComponent, [{
205
+ key: "render",
206
+ value: function render() {
207
+ var _this2 = this;
208
+ var _this$props3 = this.props,
209
+ defaultValue = _this$props3.defaultValue,
210
+ enableSmartUserPicker = _this$props3.enableSmartUserPicker,
211
+ config = _this$props3.config,
212
+ intl = _this$props3.intl,
213
+ isLoading = _this$props3.isLoading,
214
+ product = _this$props3.product,
215
+ onInputChange = _this$props3.onInputChange,
216
+ selectPortalRef = _this$props3.selectPortalRef,
217
+ isPublicLink = _this$props3.isPublicLink,
218
+ isBrowseUsersDisabled = _this$props3.isBrowseUsersDisabled,
219
+ shareError = _this$props3.shareError,
220
+ userPickerOptions = _this$props3.userPickerOptions;
221
+ var smartUserPickerProps = this.getSmartUserPickerProps();
193
222
  var allowEmail = (0, _utils.allowEmails)(config);
194
223
  var requiredMessage = getRequiredMessage(product, allowEmail, isBrowseUsersDisabled);
195
224
  var _ref2 = userPickerOptions !== null && userPickerOptions !== void 0 ? userPickerOptions : {},
@@ -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.15.0"
16
+ packageVersion: "4.16.1"
17
17
  }, attributes);
18
18
  };
19
19
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
@@ -106,7 +106,9 @@ var copyLinkButtonClicked = exports.copyLinkButtonClicked = function copyLinkBut
106
106
  contentSubType: shareContentSubType,
107
107
  contentId: shareContentId,
108
108
  isPublicLink: isPublicLink,
109
- ari: ari
109
+ ari: ari,
110
+ // this specific string is needed for marking a successful navigation session
111
+ navdexPointType: 'navigationSessionEnd'
110
112
  }, getOriginTracingAttributes(shareOrigin)));
111
113
  };
112
114
  var formShareSubmitted = exports.formShareSubmitted = function formShareSubmitted(_ref3) {
@@ -119,6 +121,7 @@ var formShareSubmitted = exports.formShareSubmitted = function formShareSubmitte
119
121
  _ref3$isPublicLink = _ref3.isPublicLink,
120
122
  isPublicLink = _ref3$isPublicLink === void 0 ? false : _ref3$isPublicLink;
121
123
  var users = extractIdsByType(data, _smartUserPicker.isUser);
124
+ var externalUsers = extractIdsByType(data, _smartUserPicker.isExternalUser);
122
125
  var teams = extractIdsByType(data, _smartUserPicker.isTeam);
123
126
  var teamUserCounts = extractMemberCountsFromTeams(data, _smartUserPicker.isTeam);
124
127
  var emails = extractIdsByType(data, _smartUserPicker.isEmail);
@@ -130,6 +133,7 @@ var formShareSubmitted = exports.formShareSubmitted = function formShareSubmitte
130
133
  emailCount: emails.length,
131
134
  teamCount: teams.length,
132
135
  userCount: users.length,
136
+ externalUserCount: externalUsers.length,
133
137
  users: users,
134
138
  teams: teams,
135
139
  teamUserCounts: teamUserCounts,
package/dist/cjs/i18n.js CHANGED
@@ -233,5 +233,15 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
233
233
  id: 'fabric.elements.share.main.tab.text.confluence',
234
234
  defaultMessage: 'Share page',
235
235
  description: 'Text for the main share tab for confluence'
236
+ },
237
+ inviteToConfluence: {
238
+ id: 'fabric.elements.share.invite.to.confluence',
239
+ defaultMessage: 'Invite to Confluence',
240
+ description: 'Text for the byline of the non-licensed users'
241
+ },
242
+ inviteToJira: {
243
+ id: 'fabric.elements.share.invite.to.jira',
244
+ defaultMessage: 'Invite to Jira',
245
+ description: 'Text for the byline of the non-licensed users'
236
246
  }
237
247
  });
@@ -129,6 +129,44 @@ export class UserPickerFieldComponent extends React.Component {
129
129
  }
130
130
  return event;
131
131
  });
132
+ _defineProperty(this, "getSmartUserPickerProps", () => {
133
+ const {
134
+ product,
135
+ intl,
136
+ loggedInAccountId,
137
+ cloudId,
138
+ orgId,
139
+ enableSmartUserPicker,
140
+ isBrowseUsersDisabled,
141
+ userPickerOptions
142
+ } = this.props;
143
+ if (!enableSmartUserPicker || isBrowseUsersDisabled) {
144
+ return {};
145
+ }
146
+ const baseProps = {
147
+ productKey: product,
148
+ principalId: loggedInAccountId,
149
+ siteId: cloudId || '',
150
+ includeTeams: true,
151
+ includeGroups: true,
152
+ debounceTime: DEBOUNCE_MS,
153
+ orgId
154
+ };
155
+ const externalUserBylineByProduct = {
156
+ confluence: intl.formatMessage(messages.inviteToConfluence),
157
+ jira: intl.formatMessage(messages.inviteToJira)
158
+ };
159
+ if (userPickerOptions !== null && userPickerOptions !== void 0 && userPickerOptions.includeNonLicensedUsers) {
160
+ const externalUserByline = externalUserBylineByProduct[product] || '';
161
+ const overrideByline = product === 'confluence' || product === 'jira' ? item => item.isExternal ? externalUserByline : '' : undefined;
162
+ return {
163
+ ...baseProps,
164
+ includeNonLicensedUsers: true,
165
+ overrideByline
166
+ };
167
+ }
168
+ return baseProps;
169
+ });
132
170
  }
133
171
  render() {
134
172
  const {
@@ -139,24 +177,13 @@ export class UserPickerFieldComponent extends React.Component {
139
177
  isLoading,
140
178
  product,
141
179
  onInputChange,
142
- loggedInAccountId,
143
- cloudId,
144
180
  selectPortalRef,
145
181
  isPublicLink,
146
- orgId,
147
182
  isBrowseUsersDisabled,
148
183
  shareError,
149
184
  userPickerOptions
150
185
  } = this.props;
151
- const smartUserPickerProps = enableSmartUserPicker && !isBrowseUsersDisabled ? {
152
- productKey: product,
153
- principalId: loggedInAccountId,
154
- siteId: cloudId || '',
155
- includeTeams: true,
156
- includeGroups: true,
157
- debounceTime: DEBOUNCE_MS,
158
- orgId
159
- } : {};
186
+ const smartUserPickerProps = this.getSmartUserPickerProps();
160
187
  const allowEmail = allowEmails(config);
161
188
  const requiredMessage = getRequiredMessage(product, allowEmail, isBrowseUsersDisabled);
162
189
  const {
@@ -1,7 +1,7 @@
1
- import { isEmail, isTeam, isUser } from '@atlaskit/smart-user-picker';
1
+ import { isEmail, isExternalUser, isTeam, isUser } from '@atlaskit/smart-user-picker';
2
2
  const buildAttributes = (attributes = {}) => ({
3
3
  packageName: "@atlaskit/share",
4
- packageVersion: "4.15.0",
4
+ packageVersion: "4.16.1",
5
5
  ...attributes
6
6
  });
7
7
  const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
@@ -69,6 +69,8 @@ export const copyLinkButtonClicked = ({
69
69
  contentId: shareContentId,
70
70
  isPublicLink,
71
71
  ari,
72
+ // this specific string is needed for marking a successful navigation session
73
+ navdexPointType: 'navigationSessionEnd',
72
74
  ...getOriginTracingAttributes(shareOrigin)
73
75
  });
74
76
  export const formShareSubmitted = ({
@@ -81,6 +83,7 @@ export const formShareSubmitted = ({
81
83
  isPublicLink = false
82
84
  }) => {
83
85
  const users = extractIdsByType(data, isUser);
86
+ const externalUsers = extractIdsByType(data, isExternalUser);
84
87
  const teams = extractIdsByType(data, isTeam);
85
88
  const teamUserCounts = extractMemberCountsFromTeams(data, isTeam);
86
89
  const emails = extractIdsByType(data, isEmail);
@@ -93,6 +96,7 @@ export const formShareSubmitted = ({
93
96
  emailCount: emails.length,
94
97
  teamCount: teams.length,
95
98
  userCount: users.length,
99
+ externalUserCount: externalUsers.length,
96
100
  users,
97
101
  teams,
98
102
  teamUserCounts,
@@ -227,5 +227,15 @@ export const messages = defineMessages({
227
227
  id: 'fabric.elements.share.main.tab.text.confluence',
228
228
  defaultMessage: 'Share page',
229
229
  description: 'Text for the main share tab for confluence'
230
+ },
231
+ inviteToConfluence: {
232
+ id: 'fabric.elements.share.invite.to.confluence',
233
+ defaultMessage: 'Invite to Confluence',
234
+ description: 'Text for the byline of the non-licensed users'
235
+ },
236
+ inviteToJira: {
237
+ id: 'fabric.elements.share.invite.to.jira',
238
+ defaultMessage: 'Invite to Jira',
239
+ description: 'Text for the byline of the non-licensed users'
230
240
  }
231
241
  });
@@ -6,6 +6,8 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
8
  import _extends from "@babel/runtime/helpers/extends";
9
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
10
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
9
11
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
10
12
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
11
13
  import React from 'react';
@@ -149,29 +151,20 @@ export var UserPickerFieldComponent = /*#__PURE__*/function (_React$Component) {
149
151
  }
150
152
  return event;
151
153
  });
152
- return _this;
153
- }
154
- _createClass(UserPickerFieldComponent, [{
155
- key: "render",
156
- value: function render() {
157
- var _this2 = this;
158
- var _this$props2 = this.props,
159
- defaultValue = _this$props2.defaultValue,
160
- enableSmartUserPicker = _this$props2.enableSmartUserPicker,
161
- config = _this$props2.config,
162
- intl = _this$props2.intl,
163
- isLoading = _this$props2.isLoading,
154
+ _defineProperty(_assertThisInitialized(_this), "getSmartUserPickerProps", function () {
155
+ var _this$props2 = _this.props,
164
156
  product = _this$props2.product,
165
- onInputChange = _this$props2.onInputChange,
157
+ intl = _this$props2.intl,
166
158
  loggedInAccountId = _this$props2.loggedInAccountId,
167
159
  cloudId = _this$props2.cloudId,
168
- selectPortalRef = _this$props2.selectPortalRef,
169
- isPublicLink = _this$props2.isPublicLink,
170
160
  orgId = _this$props2.orgId,
161
+ enableSmartUserPicker = _this$props2.enableSmartUserPicker,
171
162
  isBrowseUsersDisabled = _this$props2.isBrowseUsersDisabled,
172
- shareError = _this$props2.shareError,
173
163
  userPickerOptions = _this$props2.userPickerOptions;
174
- var smartUserPickerProps = enableSmartUserPicker && !isBrowseUsersDisabled ? {
164
+ if (!enableSmartUserPicker || isBrowseUsersDisabled) {
165
+ return {};
166
+ }
167
+ var baseProps = {
175
168
  productKey: product,
176
169
  principalId: loggedInAccountId,
177
170
  siteId: cloudId || '',
@@ -179,7 +172,43 @@ export var UserPickerFieldComponent = /*#__PURE__*/function (_React$Component) {
179
172
  includeGroups: true,
180
173
  debounceTime: DEBOUNCE_MS,
181
174
  orgId: orgId
182
- } : {};
175
+ };
176
+ var externalUserBylineByProduct = {
177
+ confluence: intl.formatMessage(messages.inviteToConfluence),
178
+ jira: intl.formatMessage(messages.inviteToJira)
179
+ };
180
+ if (userPickerOptions !== null && userPickerOptions !== void 0 && userPickerOptions.includeNonLicensedUsers) {
181
+ var externalUserByline = externalUserBylineByProduct[product] || '';
182
+ var overrideByline = product === 'confluence' || product === 'jira' ? function (item) {
183
+ return item.isExternal ? externalUserByline : '';
184
+ } : undefined;
185
+ return _objectSpread(_objectSpread({}, baseProps), {}, {
186
+ includeNonLicensedUsers: true,
187
+ overrideByline: overrideByline
188
+ });
189
+ }
190
+ return baseProps;
191
+ });
192
+ return _this;
193
+ }
194
+ _createClass(UserPickerFieldComponent, [{
195
+ key: "render",
196
+ value: function render() {
197
+ var _this2 = this;
198
+ var _this$props3 = this.props,
199
+ defaultValue = _this$props3.defaultValue,
200
+ enableSmartUserPicker = _this$props3.enableSmartUserPicker,
201
+ config = _this$props3.config,
202
+ intl = _this$props3.intl,
203
+ isLoading = _this$props3.isLoading,
204
+ product = _this$props3.product,
205
+ onInputChange = _this$props3.onInputChange,
206
+ selectPortalRef = _this$props3.selectPortalRef,
207
+ isPublicLink = _this$props3.isPublicLink,
208
+ isBrowseUsersDisabled = _this$props3.isBrowseUsersDisabled,
209
+ shareError = _this$props3.shareError,
210
+ userPickerOptions = _this$props3.userPickerOptions;
211
+ var smartUserPickerProps = this.getSmartUserPickerProps();
183
212
  var allowEmail = allowEmails(config);
184
213
  var requiredMessage = getRequiredMessage(product, allowEmail, isBrowseUsersDisabled);
185
214
  var _ref2 = userPickerOptions !== null && userPickerOptions !== void 0 ? userPickerOptions : {},
@@ -1,12 +1,12 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
- import { isEmail, isTeam, isUser } from '@atlaskit/smart-user-picker';
4
+ import { isEmail, isExternalUser, isTeam, isUser } from '@atlaskit/smart-user-picker';
5
5
  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.15.0"
9
+ packageVersion: "4.16.1"
10
10
  }, attributes);
11
11
  };
12
12
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
@@ -99,7 +99,9 @@ export var copyLinkButtonClicked = function copyLinkButtonClicked(_ref2) {
99
99
  contentSubType: shareContentSubType,
100
100
  contentId: shareContentId,
101
101
  isPublicLink: isPublicLink,
102
- ari: ari
102
+ ari: ari,
103
+ // this specific string is needed for marking a successful navigation session
104
+ navdexPointType: 'navigationSessionEnd'
103
105
  }, getOriginTracingAttributes(shareOrigin)));
104
106
  };
105
107
  export var formShareSubmitted = function formShareSubmitted(_ref3) {
@@ -112,6 +114,7 @@ export var formShareSubmitted = function formShareSubmitted(_ref3) {
112
114
  _ref3$isPublicLink = _ref3.isPublicLink,
113
115
  isPublicLink = _ref3$isPublicLink === void 0 ? false : _ref3$isPublicLink;
114
116
  var users = extractIdsByType(data, isUser);
117
+ var externalUsers = extractIdsByType(data, isExternalUser);
115
118
  var teams = extractIdsByType(data, isTeam);
116
119
  var teamUserCounts = extractMemberCountsFromTeams(data, isTeam);
117
120
  var emails = extractIdsByType(data, isEmail);
@@ -123,6 +126,7 @@ export var formShareSubmitted = function formShareSubmitted(_ref3) {
123
126
  emailCount: emails.length,
124
127
  teamCount: teams.length,
125
128
  userCount: users.length,
129
+ externalUserCount: externalUsers.length,
126
130
  users: users,
127
131
  teams: teams,
128
132
  teamUserCounts: teamUserCounts,
package/dist/esm/i18n.js CHANGED
@@ -227,5 +227,15 @@ export var messages = defineMessages({
227
227
  id: 'fabric.elements.share.main.tab.text.confluence',
228
228
  defaultMessage: 'Share page',
229
229
  description: 'Text for the main share tab for confluence'
230
+ },
231
+ inviteToConfluence: {
232
+ id: 'fabric.elements.share.invite.to.confluence',
233
+ defaultMessage: 'Invite to Confluence',
234
+ description: 'Text for the byline of the non-licensed users'
235
+ },
236
+ inviteToJira: {
237
+ id: 'fabric.elements.share.invite.to.jira',
238
+ defaultMessage: 'Invite to Jira',
239
+ description: 'Text for the byline of the non-licensed users'
230
240
  }
231
241
  });
@@ -50,7 +50,7 @@ export declare class ShareDialogContainerInternal extends React.Component<WithAn
50
50
  getFormShareLink: () => string;
51
51
  render(): JSX.Element;
52
52
  }
53
- export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "onTriggerButtonClick" | "isAutoOpenDialog" | "shouldCloseOnEscapePress" | "dialogPlacement" | "loadUserOptions" | "onDialogOpen" | "onDialogClose" | "onUserSelectionChange" | "renderCustomTriggerButton" | "shareContentType" | "shareContentSubType" | "shareContentId" | "shareFormTitle" | "shareFormHelperMessage" | "showFlags" | "loggedInAccountId" | "triggerButtonAppearance" | "triggerButtonIcon" | "triggerButtonStyle" | "triggerButtonTooltipPosition" | "triggerButtonTooltipText" | "cloudId" | "bottomMessage" | "customFooter" | "isCopyDisabled" | "isPublicLink" | "integrationMode" | "shareFieldsFooter" | "shareIntegrations" | "shareAri" | "tabIndex" | "copyTooltipText" | "dialogZIndex" | "orgId" | "isBrowseUsersDisabled" | "userPickerOptions" | "shareClient" | "urlShortenerClient" | "shortLinkData" | "formatCopyLink" | "originTracingFactory" | "productId" | "shareLink" | "shareTitle" | "useUrlShortener" | "workspaceAri"> & Partial<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "enableSmartUserPicker" | "product" | "shareeAction">> & Partial<Pick<{
53
+ export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "orgId" | "onTriggerButtonClick" | "isAutoOpenDialog" | "shouldCloseOnEscapePress" | "dialogPlacement" | "loadUserOptions" | "onDialogOpen" | "onDialogClose" | "onUserSelectionChange" | "renderCustomTriggerButton" | "shareContentType" | "shareContentSubType" | "shareContentId" | "shareFormTitle" | "shareFormHelperMessage" | "showFlags" | "loggedInAccountId" | "triggerButtonAppearance" | "triggerButtonIcon" | "triggerButtonStyle" | "triggerButtonTooltipPosition" | "triggerButtonTooltipText" | "cloudId" | "bottomMessage" | "customFooter" | "isCopyDisabled" | "isPublicLink" | "integrationMode" | "shareFieldsFooter" | "shareIntegrations" | "shareAri" | "tabIndex" | "copyTooltipText" | "dialogZIndex" | "isBrowseUsersDisabled" | "userPickerOptions" | "shareClient" | "urlShortenerClient" | "shortLinkData" | "formatCopyLink" | "originTracingFactory" | "productId" | "shareLink" | "shareTitle" | "useUrlShortener" | "workspaceAri"> & Partial<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "enableSmartUserPicker" | "product" | "shareeAction">> & Partial<Pick<{
54
54
  enableSmartUserPicker: boolean;
55
55
  shareeAction: "view" | "edit";
56
56
  product: string;
@@ -26,6 +26,7 @@ export declare class UserPickerFieldComponent extends React.Component<WrappedCom
26
26
  private loadOptions;
27
27
  private getHelperMessageOrDefault;
28
28
  private handleUserPickerTransform;
29
+ private getSmartUserPickerProps;
29
30
  render(): JSX.Element;
30
31
  }
31
32
  export declare const UserPickerField: React.ComponentType<Props>;
@@ -219,4 +219,14 @@ export declare const messages: {
219
219
  defaultMessage: string;
220
220
  description: string;
221
221
  };
222
+ inviteToConfluence: {
223
+ id: string;
224
+ defaultMessage: string;
225
+ description: string;
226
+ };
227
+ inviteToJira: {
228
+ id: string;
229
+ defaultMessage: string;
230
+ description: string;
231
+ };
222
232
  };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import type { UserPickerProps } from '@atlaskit/user-picker';
3
- export type UserPickerOptions = Pick<UserPickerProps, 'onFocus' | 'header'> & {
2
+ import type { Props as SmartUserPickerProps } from '@atlaskit/smart-user-picker';
3
+ export type UserPickerOptions = Pick<SmartUserPickerProps, 'onFocus' | 'header' | 'includeNonLicensedUsers'> & {
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.
@@ -50,7 +50,7 @@ export declare class ShareDialogContainerInternal extends React.Component<WithAn
50
50
  getFormShareLink: () => string;
51
51
  render(): JSX.Element;
52
52
  }
53
- export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "onTriggerButtonClick" | "isAutoOpenDialog" | "shouldCloseOnEscapePress" | "dialogPlacement" | "loadUserOptions" | "onDialogOpen" | "onDialogClose" | "onUserSelectionChange" | "renderCustomTriggerButton" | "shareContentType" | "shareContentSubType" | "shareContentId" | "shareFormTitle" | "shareFormHelperMessage" | "showFlags" | "loggedInAccountId" | "triggerButtonAppearance" | "triggerButtonIcon" | "triggerButtonStyle" | "triggerButtonTooltipPosition" | "triggerButtonTooltipText" | "cloudId" | "bottomMessage" | "customFooter" | "isCopyDisabled" | "isPublicLink" | "integrationMode" | "shareFieldsFooter" | "shareIntegrations" | "shareAri" | "tabIndex" | "copyTooltipText" | "dialogZIndex" | "orgId" | "isBrowseUsersDisabled" | "userPickerOptions" | "shareClient" | "urlShortenerClient" | "shortLinkData" | "formatCopyLink" | "originTracingFactory" | "productId" | "shareLink" | "shareTitle" | "useUrlShortener" | "workspaceAri"> & Partial<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "enableSmartUserPicker" | "product" | "shareeAction">> & Partial<Pick<{
53
+ export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "orgId" | "onTriggerButtonClick" | "isAutoOpenDialog" | "shouldCloseOnEscapePress" | "dialogPlacement" | "loadUserOptions" | "onDialogOpen" | "onDialogClose" | "onUserSelectionChange" | "renderCustomTriggerButton" | "shareContentType" | "shareContentSubType" | "shareContentId" | "shareFormTitle" | "shareFormHelperMessage" | "showFlags" | "loggedInAccountId" | "triggerButtonAppearance" | "triggerButtonIcon" | "triggerButtonStyle" | "triggerButtonTooltipPosition" | "triggerButtonTooltipText" | "cloudId" | "bottomMessage" | "customFooter" | "isCopyDisabled" | "isPublicLink" | "integrationMode" | "shareFieldsFooter" | "shareIntegrations" | "shareAri" | "tabIndex" | "copyTooltipText" | "dialogZIndex" | "isBrowseUsersDisabled" | "userPickerOptions" | "shareClient" | "urlShortenerClient" | "shortLinkData" | "formatCopyLink" | "originTracingFactory" | "productId" | "shareLink" | "shareTitle" | "useUrlShortener" | "workspaceAri"> & Partial<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "enableSmartUserPicker" | "product" | "shareeAction">> & Partial<Pick<{
54
54
  enableSmartUserPicker: boolean;
55
55
  shareeAction: "view" | "edit";
56
56
  product: string;
@@ -26,6 +26,7 @@ export declare class UserPickerFieldComponent extends React.Component<WrappedCom
26
26
  private loadOptions;
27
27
  private getHelperMessageOrDefault;
28
28
  private handleUserPickerTransform;
29
+ private getSmartUserPickerProps;
29
30
  render(): JSX.Element;
30
31
  }
31
32
  export declare const UserPickerField: React.ComponentType<Props>;
@@ -219,4 +219,14 @@ export declare const messages: {
219
219
  defaultMessage: string;
220
220
  description: string;
221
221
  };
222
+ inviteToConfluence: {
223
+ id: string;
224
+ defaultMessage: string;
225
+ description: string;
226
+ };
227
+ inviteToJira: {
228
+ id: string;
229
+ defaultMessage: string;
230
+ description: string;
231
+ };
222
232
  };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import type { UserPickerProps } from '@atlaskit/user-picker';
3
- export type UserPickerOptions = Pick<UserPickerProps, 'onFocus' | 'header'> & {
2
+ import type { Props as SmartUserPickerProps } from '@atlaskit/smart-user-picker';
3
+ export type UserPickerOptions = Pick<SmartUserPickerProps, 'onFocus' | 'header' | 'includeNonLicensedUsers'> & {
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.15.0",
3
+ "version": "4.16.1",
4
4
  "description": "Fabric Share Element",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -42,14 +42,14 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@atlaskit/analytics-next": "^9.2.0",
45
- "@atlaskit/button": "^17.4.0",
45
+ "@atlaskit/button": "^17.6.0",
46
46
  "@atlaskit/dropdown-menu": "^12.5.0",
47
47
  "@atlaskit/form": "^9.0.3",
48
- "@atlaskit/icon": "^22.0.0",
48
+ "@atlaskit/icon": "^22.1.0",
49
49
  "@atlaskit/popper": "^5.5.4",
50
50
  "@atlaskit/popup": "^1.12.0",
51
51
  "@atlaskit/portal": "^4.4.0",
52
- "@atlaskit/smart-user-picker": "^6.8.0",
52
+ "@atlaskit/smart-user-picker": "^6.9.0",
53
53
  "@atlaskit/spinner": "^16.0.0",
54
54
  "@atlaskit/tabs": "^14.0.0",
55
55
  "@atlaskit/textarea": "^5.0.0",