@atlaskit/share 4.11.0 → 4.12.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,22 @@
1
1
  # @atlaskit/share
2
2
 
3
+ ## 4.12.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#67206](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67206) [`277421c217ae`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/277421c217ae) - PTC-8511 ENGHEALTH-5595 fix deprecated token
8
+
9
+ ## 4.12.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#68081](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68081) [`196b8c2c77d5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/196b8c2c77d5) - [ux] PTC-8597 Add visual instruction for required field
14
+ - [#67525](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67525) [`835694a1696a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/835694a1696a) - Add third party sources to user invited and access requested event attributes
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+
3
20
  ## 4.11.0
4
21
 
5
22
  ### Minor Changes
@@ -20,10 +20,11 @@ var _react2 = require("@emotion/react");
20
20
  var _reactIntlNext = require("react-intl-next");
21
21
  var _analyticsNext = require("@atlaskit/analytics-next");
22
22
  var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
23
- var _form = _interopRequireDefault(require("@atlaskit/form"));
23
+ var _form = _interopRequireWildcard(require("@atlaskit/form"));
24
24
  var _error = _interopRequireDefault(require("@atlaskit/icon/glyph/error"));
25
25
  var _tabs = _interopRequireWildcard(require("@atlaskit/tabs"));
26
26
  var _colors = require("@atlaskit/theme/colors");
27
+ var _constants = require("@atlaskit/theme/constants");
27
28
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
28
29
  var _i18n = require("../i18n");
29
30
  var _types = require("../types");
@@ -33,7 +34,7 @@ var _CopyLinkButton = _interopRequireDefault(require("./CopyLinkButton"));
33
34
  var _IntegrationForm = require("./IntegrationForm");
34
35
  var _ShareHeader = require("./ShareHeader");
35
36
  var _UserPickerField = require("./UserPickerField");
36
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
37
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
37
38
  /** @jsx jsx */
38
39
  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); }
39
40
  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; }
@@ -48,6 +49,7 @@ var formFooterStyles = exports.formFooterStyles = (0, _react2.css)(_templateObje
48
49
  var formFieldStyles = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: ", ";\n"])), "var(--ds-space-150, 12px)");
49
50
  var integrationWrapperStyles = (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n"])));
50
51
  var integrationIconWrapperStyles = (0, _react2.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: ", ";\n margin-right: 5px;\n"])), "var(--ds-space-negative-075, -6px)");
52
+ var requiredFieldInfoStyles = (0, _react2.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: ", ";\n color: ", ";\n font-size: ", "px;\n"])), "var(--ds-space-200, 16px)", "var(--ds-text-subtle, ".concat(_colors.N300, ")"), (0, _constants.fontSizeSmall)());
51
53
  var integrationTabText = function integrationTabText(integrationName) {
52
54
  return (0, _react2.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _i18n.messages.shareInIntegrationButtonText, {
53
55
  values: {
@@ -104,6 +106,8 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
104
106
  }, (0, _react2.jsx)("form", formProps, showTitle && (0, _react2.jsx)(_ShareHeader.ShareHeader, {
105
107
  title: title
106
108
  }), (0, _react2.jsx)("div", {
109
+ css: requiredFieldInfoStyles
110
+ }, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _i18n.messages.requiredFieldSummary), (0, _react2.jsx)(_form.RequiredAsterisk, null)), (0, _react2.jsx)("div", {
107
111
  css: formFieldStyles
108
112
  }, (0, _react2.jsx)(_UserPickerField.UserPickerField, {
109
113
  onInputChange: onUserInputChange,
@@ -15,7 +15,7 @@ var _templateObject, _templateObject2;
15
15
  /** @jsx jsx */
16
16
  var headerWrapperStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n"])));
17
17
  var getFormHeaderTitleStyles = exports.getFormHeaderTitleStyles = function getFormHeaderTitleStyles(theme) {
18
- return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n line-height: ", ";\n margin-right: ", ";\n margin-top: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n > span {\n font-size: initial;\n }\n"])), (0, _typography.h500)(theme), "var(--ds-font-lineHeight-500, 32px)", "var(--ds-space-400, 32px)", "var(--ds-space-400, 32px)");
18
+ return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n line-height: 32px;\n margin-right: ", ";\n margin-top: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n > span {\n font-size: initial;\n }\n"])), (0, _typography.h500)(theme), "var(--ds-space-400, 32px)", "var(--ds-space-400, 32px)");
19
19
  };
20
20
  var ShareHeader = exports.ShareHeader = function ShareHeader(_ref) {
21
21
  var title = _ref.title;
@@ -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.11.0"
16
+ packageVersion: "4.12.1"
17
17
  }, attributes);
18
18
  };
19
19
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
package/dist/cjs/i18n.js CHANGED
@@ -192,6 +192,11 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
192
192
  defaultMessage: 'Recipients will see the name of the issue and your message',
193
193
  description: 'Message indicating the recipients of the email share will be able to see the Jira issue title and the included message'
194
194
  },
195
+ requiredFieldSummary: {
196
+ id: 'fabric.elements.share.form.required-field.summary',
197
+ defaultMessage: 'Required fields are marked with an asterisk',
198
+ description: 'Summary info of required fields asterisk.'
199
+ },
195
200
  shareFailureIconLabel: {
196
201
  id: 'fabric.elements.share.failure.icon.label',
197
202
  defaultMessage: 'Error icon',
@@ -6,10 +6,11 @@ import { css, jsx } from '@emotion/react';
6
6
  import { FormattedMessage, injectIntl } from 'react-intl-next';
7
7
  import { AnalyticsContext } from '@atlaskit/analytics-next';
8
8
  import Button from '@atlaskit/button/custom-theme-button';
9
- import Form from '@atlaskit/form';
9
+ import Form, { RequiredAsterisk } from '@atlaskit/form';
10
10
  import ErrorIcon from '@atlaskit/icon/glyph/error';
11
11
  import Tabs, { Tab, TabList, TabPanel } from '@atlaskit/tabs';
12
- import { R400 } from '@atlaskit/theme/colors';
12
+ import { N300, R400 } from '@atlaskit/theme/colors';
13
+ import { fontSizeSmall } from '@atlaskit/theme/constants';
13
14
  import Tooltip from '@atlaskit/tooltip';
14
15
  import { messages } from '../i18n';
15
16
  import { TabType } from '../types';
@@ -56,6 +57,11 @@ const integrationIconWrapperStyles = css`
56
57
  margin-bottom: ${"var(--ds-space-negative-075, -6px)"};
57
58
  margin-right: 5px;
58
59
  `;
60
+ const requiredFieldInfoStyles = css`
61
+ margin-bottom: ${"var(--ds-space-200, 16px)"};
62
+ color: ${`var(--ds-text-subtle, ${N300})`};
63
+ font-size: ${fontSizeSmall()}px;
64
+ `;
59
65
  const integrationTabText = integrationName => jsx(FormattedMessage, _extends({}, messages.shareInIntegrationButtonText, {
60
66
  values: {
61
67
  integrationName
@@ -105,6 +111,8 @@ class InternalForm extends React.PureComponent {
105
111
  }, jsx("form", formProps, showTitle && jsx(ShareHeader, {
106
112
  title: title
107
113
  }), jsx("div", {
114
+ css: requiredFieldInfoStyles
115
+ }, jsx(FormattedMessage, messages.requiredFieldSummary), jsx(RequiredAsterisk, null)), jsx("div", {
108
116
  css: formFieldStyles
109
117
  }, jsx(UserPickerField, {
110
118
  onInputChange: onUserInputChange,
@@ -10,7 +10,7 @@ const headerWrapperStyles = css`
10
10
  `;
11
11
  export const getFormHeaderTitleStyles = theme => css`
12
12
  ${h500(theme)}
13
- line-height: ${"var(--ds-font-lineHeight-500, 32px)"};
13
+ line-height: 32px;
14
14
  margin-right: ${"var(--ds-space-400, 32px)"};
15
15
  margin-top: ${"var(--ds-space-400, 32px)"};
16
16
  overflow: hidden;
@@ -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.11.0",
4
+ packageVersion: "4.12.1",
5
5
  ...attributes
6
6
  });
7
7
  const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
@@ -186,6 +186,11 @@ export const messages = defineMessages({
186
186
  defaultMessage: 'Recipients will see the name of the issue and your message',
187
187
  description: 'Message indicating the recipients of the email share will be able to see the Jira issue title and the included message'
188
188
  },
189
+ requiredFieldSummary: {
190
+ id: 'fabric.elements.share.form.required-field.summary',
191
+ defaultMessage: 'Required fields are marked with an asterisk',
192
+ description: 'Summary info of required fields asterisk.'
193
+ },
189
194
  shareFailureIconLabel: {
190
195
  id: 'fabric.elements.share.failure.icon.label',
191
196
  defaultMessage: 'Error icon',
@@ -7,7 +7,7 @@ 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
9
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
10
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
10
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
11
11
  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; }
12
12
  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; }
13
13
  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); }; }
@@ -18,10 +18,11 @@ import { css, jsx } from '@emotion/react';
18
18
  import { FormattedMessage, injectIntl } from 'react-intl-next';
19
19
  import { AnalyticsContext } from '@atlaskit/analytics-next';
20
20
  import Button from '@atlaskit/button/custom-theme-button';
21
- import Form from '@atlaskit/form';
21
+ import Form, { RequiredAsterisk } from '@atlaskit/form';
22
22
  import ErrorIcon from '@atlaskit/icon/glyph/error';
23
23
  import Tabs, { Tab, TabList, TabPanel } from '@atlaskit/tabs';
24
- import { R400 } from '@atlaskit/theme/colors';
24
+ import { N300, R400 } from '@atlaskit/theme/colors';
25
+ import { fontSizeSmall } from '@atlaskit/theme/constants';
25
26
  import Tooltip from '@atlaskit/tooltip';
26
27
  import { messages } from '../i18n';
27
28
  import { TabType } from '../types';
@@ -38,6 +39,7 @@ export var formFooterStyles = css(_templateObject4 || (_templateObject4 = _tagge
38
39
  var formFieldStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n"])), "var(--ds-space-150, 12px)");
39
40
  var integrationWrapperStyles = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
40
41
  var integrationIconWrapperStyles = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n margin-right: 5px;\n"])), "var(--ds-space-negative-075, -6px)");
42
+ var requiredFieldInfoStyles = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n color: ", ";\n font-size: ", "px;\n"])), "var(--ds-space-200, 16px)", "var(--ds-text-subtle, ".concat(N300, ")"), fontSizeSmall());
41
43
  var integrationTabText = function integrationTabText(integrationName) {
42
44
  return jsx(FormattedMessage, _extends({}, messages.shareInIntegrationButtonText, {
43
45
  values: {
@@ -94,6 +96,8 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
94
96
  }, jsx("form", formProps, showTitle && jsx(ShareHeader, {
95
97
  title: title
96
98
  }), jsx("div", {
99
+ css: requiredFieldInfoStyles
100
+ }, jsx(FormattedMessage, messages.requiredFieldSummary), jsx(RequiredAsterisk, null)), jsx("div", {
97
101
  css: formFieldStyles
98
102
  }, jsx(UserPickerField, {
99
103
  onInputChange: onUserInputChange,
@@ -8,7 +8,7 @@ import { h500 } from '@atlaskit/theme/typography';
8
8
  import { messages } from '../i18n';
9
9
  var headerWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n"])));
10
10
  export var getFormHeaderTitleStyles = function getFormHeaderTitleStyles(theme) {
11
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n line-height: ", ";\n margin-right: ", ";\n margin-top: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n > span {\n font-size: initial;\n }\n"])), h500(theme), "var(--ds-font-lineHeight-500, 32px)", "var(--ds-space-400, 32px)", "var(--ds-space-400, 32px)");
11
+ return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n line-height: 32px;\n margin-right: ", ";\n margin-top: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n > span {\n font-size: initial;\n }\n"])), h500(theme), "var(--ds-space-400, 32px)", "var(--ds-space-400, 32px)");
12
12
  };
13
13
  export var ShareHeader = function ShareHeader(_ref) {
14
14
  var title = _ref.title;
@@ -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.11.0"
9
+ packageVersion: "4.12.1"
10
10
  }, attributes);
11
11
  };
12
12
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
package/dist/esm/i18n.js CHANGED
@@ -186,6 +186,11 @@ export var messages = defineMessages({
186
186
  defaultMessage: 'Recipients will see the name of the issue and your message',
187
187
  description: 'Message indicating the recipients of the email share will be able to see the Jira issue title and the included message'
188
188
  },
189
+ requiredFieldSummary: {
190
+ id: 'fabric.elements.share.form.required-field.summary',
191
+ defaultMessage: 'Required fields are marked with an asterisk',
192
+ description: 'Summary info of required fields asterisk.'
193
+ },
189
194
  shareFailureIconLabel: {
190
195
  id: 'fabric.elements.share.failure.icon.label',
191
196
  defaultMessage: 'Error icon',
@@ -179,6 +179,11 @@ export declare const messages: {
179
179
  defaultMessage: string;
180
180
  description: string;
181
181
  };
182
+ requiredFieldSummary: {
183
+ id: string;
184
+ defaultMessage: string;
185
+ description: string;
186
+ };
182
187
  shareFailureIconLabel: {
183
188
  id: string;
184
189
  defaultMessage: string;
@@ -1,9 +1,9 @@
1
1
  export type UserWithId = {
2
- type: 'user' | 'group' | 'team' | 'custom';
2
+ type: 'user' | 'group' | 'team' | 'custom' | 'external_user';
3
3
  id: string;
4
4
  };
5
5
  export type UserWithEmail = {
6
- type: 'user';
6
+ type: 'user' | 'external_user';
7
7
  email: string;
8
8
  };
9
9
  export type User = UserWithId | UserWithEmail;
@@ -179,6 +179,11 @@ export declare const messages: {
179
179
  defaultMessage: string;
180
180
  description: string;
181
181
  };
182
+ requiredFieldSummary: {
183
+ id: string;
184
+ defaultMessage: string;
185
+ description: string;
186
+ };
182
187
  shareFailureIconLabel: {
183
188
  id: string;
184
189
  defaultMessage: string;
@@ -1,9 +1,9 @@
1
1
  export type UserWithId = {
2
- type: 'user' | 'group' | 'team' | 'custom';
2
+ type: 'user' | 'group' | 'team' | 'custom' | 'external_user';
3
3
  id: string;
4
4
  };
5
5
  export type UserWithEmail = {
6
- type: 'user';
6
+ type: 'user' | 'external_user';
7
7
  email: string;
8
8
  };
9
9
  export type User = UserWithId | UserWithEmail;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "4.11.0",
3
+ "version": "4.12.1",
4
4
  "description": "Fabric Share Element",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -51,10 +51,10 @@
51
51
  "@atlaskit/tabs": "^14.0.0",
52
52
  "@atlaskit/textarea": "^5.0.0",
53
53
  "@atlaskit/theme": "^12.6.0",
54
- "@atlaskit/tokens": "^1.33.0",
54
+ "@atlaskit/tokens": "^1.34.0",
55
55
  "@atlaskit/tooltip": "^18.1.0",
56
56
  "@atlaskit/ufo": "^0.2.0",
57
- "@atlaskit/user-picker": "^10.13.0",
57
+ "@atlaskit/user-picker": "^10.14.0",
58
58
  "@atlaskit/util-service-support": "^6.2.0",
59
59
  "@babel/runtime": "^7.0.0",
60
60
  "@emotion/react": "^11.7.1",