@atlaskit/editor-common 83.4.3 → 83.5.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/afm-cc/tsconfig.json +3 -0
  3. package/afm-jira/tsconfig.json +3 -0
  4. package/dist/cjs/card/LinkToolbarButtonGroup.js +2 -2
  5. package/dist/cjs/element-browser/components/ElementList/EmptyState.js +2 -2
  6. package/dist/cjs/extensibility/Extension/Lozenge/ExtensionLabel.js +52 -19
  7. package/dist/cjs/link/constants.js +2 -1
  8. package/dist/cjs/link/utils.js +5 -0
  9. package/dist/cjs/media-single/CommentBadge.js +2 -2
  10. package/dist/cjs/messages/annotation.js +6 -0
  11. package/dist/cjs/monitoring/error.js +1 -1
  12. package/dist/cjs/ui/DropList/index.js +1 -1
  13. package/dist/cjs/ui-menu/ColorPickerButton/index.js +5 -3
  14. package/dist/cjs/ui-menu/ToolbarButton/styles.js +2 -1
  15. package/dist/es2019/card/LinkToolbarButtonGroup.js +1 -1
  16. package/dist/es2019/element-browser/components/ElementList/EmptyState.js +2 -2
  17. package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +52 -19
  18. package/dist/es2019/link/constants.js +1 -0
  19. package/dist/es2019/link/utils.js +6 -1
  20. package/dist/es2019/media-single/CommentBadge.js +1 -1
  21. package/dist/es2019/messages/annotation.js +6 -0
  22. package/dist/es2019/monitoring/error.js +1 -1
  23. package/dist/es2019/ui/DropList/index.js +1 -1
  24. package/dist/es2019/ui-menu/ColorPickerButton/index.js +4 -2
  25. package/dist/es2019/ui-menu/ToolbarButton/styles.js +2 -1
  26. package/dist/esm/card/LinkToolbarButtonGroup.js +1 -1
  27. package/dist/esm/element-browser/components/ElementList/EmptyState.js +2 -2
  28. package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +52 -19
  29. package/dist/esm/link/constants.js +1 -0
  30. package/dist/esm/link/utils.js +6 -1
  31. package/dist/esm/media-single/CommentBadge.js +1 -1
  32. package/dist/esm/messages/annotation.js +6 -0
  33. package/dist/esm/monitoring/error.js +1 -1
  34. package/dist/esm/ui/DropList/index.js +1 -1
  35. package/dist/esm/ui-menu/ColorPickerButton/index.js +4 -2
  36. package/dist/esm/ui-menu/ToolbarButton/styles.js +2 -1
  37. package/dist/types/link/constants.d.ts +1 -0
  38. package/dist/types/link/utils.d.ts +1 -2
  39. package/dist/types/messages/annotation.d.ts +5 -0
  40. package/dist/types-ts4.5/link/constants.d.ts +1 -0
  41. package/dist/types-ts4.5/link/utils.d.ts +1 -2
  42. package/dist/types-ts4.5/messages/annotation.d.ts +5 -0
  43. package/package.json +7 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 83.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#116194](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116194)
8
+ [`a6ac14257c10a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a6ac14257c10a) -
9
+ [ux] Update button interactions: non-bodied macros stay flush with macro, bodied macros show
10
+ config icon on hover/select, have default white background, and maintain the indentaion
11
+
12
+ ## 83.5.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#116062](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116062)
17
+ [`2662cb99be36f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2662cb99be36f) -
18
+ [ux] ED-23706 - change disabled comment action text
19
+ - [#113441](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/113441)
20
+ [`ea57f8fd294f9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ea57f8fd294f9) -
21
+ Updates getLinkPreferencesURLFromENV utility to leverage `@atlaskit/atlassian-context` pkg in
22
+ order to control user preferences link based on environment/perimeter.
23
+
24
+ ### Patch Changes
25
+
26
+ - [#114548](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/114548)
27
+ [`8b2d47bffb50e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8b2d47bffb50e) -
28
+ bump adf-schema version
29
+ - [#116062](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116062)
30
+ [`1c26d1ee6fb25`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1c26d1ee6fb25) -
31
+ Migrated to new atlaskit Buttons.
32
+ - Updated dependencies
33
+
3
34
  ## 83.4.3
4
35
 
5
36
  ### Patch Changes
@@ -33,6 +33,9 @@
33
33
  {
34
34
  "path": "../../../analytics/analytics-next/afm-cc/tsconfig.json"
35
35
  },
36
+ {
37
+ "path": "../../../uip/atlassian-context/afm-cc/tsconfig.json"
38
+ },
36
39
  {
37
40
  "path": "../../../design-system/button/afm-cc/tsconfig.json"
38
41
  },
@@ -32,6 +32,9 @@
32
32
  {
33
33
  "path": "../../../analytics/analytics-next/afm-jira/tsconfig.json"
34
34
  },
35
+ {
36
+ "path": "../../../uip/atlassian-context/afm-jira/tsconfig.json"
37
+ },
35
38
  {
36
39
  "path": "../../../design-system/button/afm-jira/tsconfig.json"
37
40
  },
@@ -8,7 +8,7 @@ exports.LinkToolbarButtonGroup = void 0;
8
8
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _react2 = require("@emotion/react");
11
- var _button = require("@atlaskit/button");
11
+ var _buttonGroup = _interopRequireDefault(require("@atlaskit/button/button-group"));
12
12
  var _ui = require("../ui");
13
13
  var _excluded = ["disabled"];
14
14
  /** @jsx jsx */
@@ -40,7 +40,7 @@ var disallowedWrapperStyle = (0, _react2.css)({
40
40
  });
41
41
  var LinkToolbarButtonGroup = exports.LinkToolbarButtonGroup = function LinkToolbarButtonGroup(_ref2) {
42
42
  var options = _ref2.options;
43
- return (0, _react2.jsx)(_button.ButtonGroup, null, options.map(function (_ref3) {
43
+ return (0, _react2.jsx)(_buttonGroup.default, null, options.map(function (_ref3) {
44
44
  var onClick = _ref3.onClick,
45
45
  selected = _ref3.selected,
46
46
  disabled = _ref3.disabled,
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = EmptyState;
8
8
  var _react = require("@emotion/react");
9
9
  var _reactIntlNext = require("react-intl-next");
10
- var _button = _interopRequireDefault(require("@atlaskit/button"));
10
+ var _new = require("@atlaskit/button/new");
11
11
  var _primitives = require("@atlaskit/primitives");
12
12
  var _NotFoundIllustration = _interopRequireDefault(require("./NotFoundIllustration"));
13
13
  /** @jsx jsx */
@@ -32,7 +32,7 @@ function EmptyState(_ref) {
32
32
  description: "Empty state sub-heading"
33
33
  })), (0, _react.jsx)(_primitives.Box, {
34
34
  xcss: externalLinkWrapper
35
- }, (0, _react.jsx)(_button.default, {
35
+ }, (0, _react.jsx)(_new.LinkButton, {
36
36
  appearance: "primary",
37
37
  target: "_blank",
38
38
  href: "https://marketplace.atlassian.com/search?category=Macros&hosting=cloud&product=confluence",
@@ -48,20 +48,38 @@ var sharedLabelStyles = (0, _react2.css)({
48
48
  },
49
49
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
50
50
  '&.inline': {
51
- marginLeft: "var(--ds-space-150, 12px)",
52
51
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
53
52
  top: '-18px'
53
+ },
54
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
55
+ '&.bodied-background': {
56
+ background: "var(--ds-surface, ".concat(_colors.N0, ")")
57
+ },
58
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
59
+ '&.bodied-border': {
60
+ boxShadow: "0 0 0 1px ".concat("var(--ds-border, ".concat(_colors.N30, ")"))
54
61
  }
55
62
  });
56
63
  var buttonLabelStyles = (0, _react2.css)({
64
+ // Need this exact number since this is size with icon
65
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
66
+ minHeight: '26px',
57
67
  alignItems: 'center',
58
68
  borderRadius: "var(--ds-border-radius, 3px)",
59
69
  paddingLeft: "var(--ds-space-050, 4px)",
60
70
  paddingRight: "var(--ds-space-050, 4px)",
61
71
  color: "var(--ds-text-subtle, ".concat(_colors.N800, ")"),
62
- backgroundColor: "var(--ds-background-accent-gray-subtlest, ".concat(_colors.N30, ")")
72
+ backgroundColor: "var(--ds-background-accent-gray-subtlest, ".concat(_colors.N30, ")"),
73
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
74
+ '&.remove-left-margin': {
75
+ marginLeft: "var(--ds-space-negative-150, -12px)"
76
+ },
77
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
78
+ '&.remove-nested-left-margin': {
79
+ marginLeft: 0
80
+ }
63
81
  });
64
- var placeholderStyles = (0, _react2.css)({
82
+ var spacerStyles = (0, _react2.css)({
65
83
  height: "var(--ds-space-150, 12px)"
66
84
  });
67
85
  var textStyles = (0, _react2.css)({
@@ -70,19 +88,22 @@ var textStyles = (0, _react2.css)({
70
88
  padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-050, 4px)")
71
89
  });
72
90
  var originalLabelStyles = (0, _react2.css)({
91
+ background: "var(--ds-background-accent-gray-subtle-pressed, ".concat(_colors.N40, ")"),
73
92
  borderRadius: "var(--ds-border-radius, 3px)".concat(" ", "var(--ds-border-radius, 3px)", " 0 0"),
74
93
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
75
94
  '&.show-label': {
76
- background: "var(--ds-background-accent-gray-subtle-pressed, ".concat(_colors.N40, ")"),
77
95
  color: "var(--ds-text-subtle, ".concat(_colors.N500, ")")
78
96
  },
79
97
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
80
- '&.bodied-background': {
81
- background: "var(--ds-surface, ".concat(_colors.N0, ")")
82
- },
98
+ '&.inline': {
99
+ // need to add margin since we don't get it for free like block ones via the padding to make it flush with editor elements
100
+ marginLeft: "var(--ds-space-150, 12px)"
101
+ }
102
+ });
103
+ var iconStyles = (0, _react2.css)({
83
104
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
84
- '&.bodied-border': {
85
- boxShadow: "0 0 0 1px ".concat("var(--ds-border, ".concat(_colors.N30, ")"))
105
+ '&.hide-icon': {
106
+ display: 'none'
86
107
  }
87
108
  });
88
109
  var i18n = (0, _reactIntlNext.defineMessages)({
@@ -103,17 +124,26 @@ var ExtensionLabel = exports.ExtensionLabel = function ExtensionLabel(_ref) {
103
124
  showMacroButtonUpdates = _ref.showMacroButtonUpdates;
104
125
  var intl = (0, _reactIntlNext.useIntl)();
105
126
  var tooltipText = "".concat(intl.formatMessage(i18n.configure), " ").concat(text);
127
+ var isInlineExtension = extensionName === 'inlineExtension';
106
128
  var containerClassNames = (0, _classnames.default)({
107
129
  bodied: isBodiedMacro
108
130
  });
109
- var labelClassNames = (0, _classnames.default)('extension-label', {
131
+ var sharedLabelClassNames = (0, _classnames.default)('extension-label', {
110
132
  nested: isNodeNested,
111
- inline: extensionName === 'inlineExtension',
133
+ inline: isInlineExtension,
112
134
  bodied: isBodiedMacro,
113
- 'bodied-border': isBodiedMacro && !isNodeHovered && !showMacroButtonUpdates,
114
- 'bodied-background': isBodiedMacro && !isNodeHovered && !showMacroButtonUpdates,
135
+ 'bodied-border': isBodiedMacro && !isNodeHovered,
136
+ 'bodied-background': isBodiedMacro && !isNodeHovered,
115
137
  'show-label': isNodeHovered || isBodiedMacro
116
138
  });
139
+ var newButtonLabelClassNames = (0, _classnames.default)({
140
+ // For new button design, non-bodied macros should have a flush label. Inline macros don't need this since they never had the margin-left applied.
141
+ 'remove-left-margin': !isBodiedMacro && !isInlineExtension && !isNodeNested,
142
+ 'remove-nested-left-margin': isNodeNested && !isBodiedMacro && !isInlineExtension
143
+ });
144
+ var iconClassNames = (0, _classnames.default)({
145
+ 'hide-icon': isBodiedMacro && !isNodeHovered
146
+ });
117
147
  return (0, _react2.jsx)("div", {
118
148
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
119
149
  css: containerStyles
@@ -140,19 +170,22 @@ var ExtensionLabel = exports.ExtensionLabel = function ExtensionLabel(_ref) {
140
170
  css: [sharedLabelStyles, buttonLabelStyles]
141
171
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
142
172
  ,
143
- className: labelClassNames
144
- }), text, " ", (0, _react2.jsx)(_preferences.default, {
173
+ className: "".concat(sharedLabelClassNames, " ").concat(newButtonLabelClassNames)
174
+ }), text, (0, _react2.jsx)("span", {
175
+ css: iconStyles,
176
+ className: iconClassNames,
177
+ "data-testid": "config-icon"
178
+ }, (0, _react2.jsx)(_preferences.default, {
145
179
  label: ""
146
- }));
180
+ })));
147
181
  }), (0, _react2.jsx)("div", {
148
- "data-testid": "placeholder",
149
- css: placeholderStyles
182
+ css: spacerStyles
150
183
  })) : (0, _react2.jsx)("span", {
151
184
  "data-testid": "new-lozenge",
152
185
  css: [sharedLabelStyles, originalLabelStyles]
153
186
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
154
187
  ,
155
- className: labelClassNames
188
+ className: sharedLabelClassNames
156
189
  }, (0, _react2.jsx)("span", {
157
190
  css: textStyles
158
191
  }, text)));
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.stagingLinkPreferencesUrl = exports.productionLinkPreferencesUrl = void 0;
6
+ exports.stagingLinkPreferencesUrl = exports.productionLinkPreferencesUrl = exports.linkPreferencesPath = void 0;
7
+ var linkPreferencesPath = exports.linkPreferencesPath = '/manage-profile/link-preferences';
7
8
  var stagingLinkPreferencesUrl = exports.stagingLinkPreferencesUrl = 'https://id.stg.internal.atlassian.com/manage-profile/link-preferences';
8
9
  var productionLinkPreferencesUrl = exports.productionLinkPreferencesUrl = 'https://id.atlassian.com/manage-profile/link-preferences';
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getLinkPreferencesURLFromENV = void 0;
7
7
  exports.isLinkAtPos = isLinkAtPos;
8
8
  exports.isTextAtPos = isTextAtPos;
9
+ var _atlassianContext = require("@atlaskit/atlassian-context");
10
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
9
11
  var _constants = require("./constants");
10
12
  function isTextAtPos(pos) {
11
13
  return function (state) {
@@ -20,6 +22,9 @@ function isLinkAtPos(pos) {
20
22
  };
21
23
  }
22
24
  var getLinkPreferencesURLFromENV = exports.getLinkPreferencesURLFromENV = function getLinkPreferencesURLFromENV() {
25
+ if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.linking-preferences-url-atlassian-context')) {
26
+ return (0, _atlassianContext.getATLContextUrl)('id') + _constants.linkPreferencesPath;
27
+ }
23
28
  if (process.env.NODE_ENV === 'production' && process.env.CLOUD_ENV === 'staging') {
24
29
  // only a production CLOUD_ENV staging environment has a different link preferences URL
25
30
  return _constants.stagingLinkPreferencesUrl;
@@ -9,7 +9,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
9
9
  var _react = require("react");
10
10
  var _react2 = require("@emotion/react");
11
11
  var _debounce = _interopRequireDefault(require("lodash/debounce"));
12
- var _button = require("@atlaskit/button");
12
+ var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
13
13
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
14
14
  var _comment = _interopRequireDefault(require("@atlaskit/icon/glyph/comment"));
15
15
  var _constants = require("@atlaskit/theme/constants");
@@ -94,7 +94,7 @@ var CommentBadge = exports.CommentBadge = function CommentBadge(_ref) {
94
94
  }, (0, _react2.jsx)(_tooltip.default, {
95
95
  position: "top",
96
96
  content: title
97
- }, (0, _react2.jsx)(_button.CustomThemeButton, {
97
+ }, (0, _react2.jsx)(_customThemeButton.default, {
98
98
  style: {
99
99
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
100
100
  height: badgeDimensions,
@@ -11,11 +11,17 @@ var annotationMessages = exports.annotationMessages = (0, _reactIntlNext.defineM
11
11
  defaultMessage: 'Comment',
12
12
  description: 'Create/add an inline comment based on the users selection'
13
13
  },
14
+ // TODO: Remove this message when the platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz FF is removed
14
15
  createCommentInvalid: {
15
16
  id: 'fabric.editor.createCommentInvalid',
16
17
  defaultMessage: 'You can only comment on text and headings',
17
18
  description: 'Error message to communicate to the user they can only do the current action in certain contexts'
18
19
  },
20
+ createCommentDisabled: {
21
+ id: 'fabric.editor.createCommentDisabled',
22
+ defaultMessage: 'You can only comment on text, headings, emojis, dates, mentions, links, and statuses.',
23
+ description: 'Error message to communicate to the user they can only do the current action in certain contexts'
24
+ },
19
25
  toolbar: {
20
26
  id: 'fabric.editor.annotationToolbar',
21
27
  defaultMessage: 'Annotation toolbar',
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "83.4.3";
20
+ var packageVersion = "83.5.1";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // TODO: Sanitise the URL instead of just removing it
@@ -20,7 +20,7 @@ var _Layer = _interopRequireDefault(require("../Layer"));
20
20
  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); }; }
21
21
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "83.4.3";
23
+ var packageVersion = "83.5.1";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  var DropList = /*#__PURE__*/function (_Component) {
@@ -9,7 +9,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _react2 = require("@emotion/react");
11
11
  var _analyticsNext = require("@atlaskit/analytics-next");
12
- var _button = _interopRequireDefault(require("@atlaskit/button"));
12
+ var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
13
13
  var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-down"));
14
14
  var _colors = require("@atlaskit/theme/colors");
15
15
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
@@ -209,7 +209,7 @@ var ColorPickerButton = function ColorPickerButton(props) {
209
209
  }, (0, _react2.jsx)(_tooltip.default, {
210
210
  content: title,
211
211
  position: "top"
212
- }, (0, _react2.jsx)(_button.default, {
212
+ }, (0, _react2.jsx)(_standardButton.default, {
213
213
  ref: buttonRef,
214
214
  "aria-label": title,
215
215
  "aria-expanded": props.isAriaExpanded ? isPopupOpen : undefined,
@@ -221,7 +221,9 @@ var ColorPickerButton = function ColorPickerButton(props) {
221
221
  togglePopup();
222
222
  setIsOpenedByKeyboard(true);
223
223
  }
224
- },
224
+ }
225
+ // TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
226
+ ,
225
227
  css: buttonStyle,
226
228
  iconAfter: (0, _react2.jsx)("span", {
227
229
  css: colorPickerExpandContainer
@@ -12,10 +12,11 @@ var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-
12
12
  // If you make any change here, copy it to above file as well
13
13
  // and notify about the change in #team-fc-editor-ai-dev channel.
14
14
  var _default = exports.default = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
15
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
16
15
  return /*#__PURE__*/_react.default.createElement(_standardButton.default, (0, _extends2.default)({
17
16
  ref: ref
18
17
  }, props, {
18
+ // TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
19
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
19
20
  style: {
20
21
  alignItems: 'center'
21
22
  }
@@ -3,7 +3,7 @@ import React from 'react';
3
3
 
4
4
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
5
  import { css, jsx } from '@emotion/react';
6
- import { ButtonGroup } from '@atlaskit/button';
6
+ import ButtonGroup from '@atlaskit/button/button-group';
7
7
  import { FloatingToolbarButton as Button } from '../ui';
8
8
 
9
9
  /**
@@ -2,7 +2,7 @@
2
2
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
3
  import { css, jsx } from '@emotion/react';
4
4
  import { FormattedMessage } from 'react-intl-next';
5
- import Button from '@atlaskit/button';
5
+ import { LinkButton } from '@atlaskit/button/new';
6
6
  import { Box, xcss } from '@atlaskit/primitives';
7
7
  import NotFoundIllustration from './NotFoundIllustration';
8
8
  export default function EmptyState({
@@ -25,7 +25,7 @@ export default function EmptyState({
25
25
  description: "Empty state sub-heading"
26
26
  })), jsx(Box, {
27
27
  xcss: externalLinkWrapper
28
- }, jsx(Button, {
28
+ }, jsx(LinkButton, {
29
29
  appearance: "primary",
30
30
  target: "_blank",
31
31
  href: "https://marketplace.atlassian.com/search?category=Macros&hosting=cloud&product=confluence",
@@ -39,20 +39,38 @@ const sharedLabelStyles = css({
39
39
  },
40
40
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
41
41
  '&.inline': {
42
- marginLeft: "var(--ds-space-150, 12px)",
43
42
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
44
43
  top: '-18px'
44
+ },
45
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
46
+ '&.bodied-background': {
47
+ background: `var(--ds-surface, ${N0})`
48
+ },
49
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
50
+ '&.bodied-border': {
51
+ boxShadow: `0 0 0 1px ${`var(--ds-border, ${N30})`}`
45
52
  }
46
53
  });
47
54
  const buttonLabelStyles = css({
55
+ // Need this exact number since this is size with icon
56
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
57
+ minHeight: '26px',
48
58
  alignItems: 'center',
49
59
  borderRadius: "var(--ds-border-radius, 3px)",
50
60
  paddingLeft: "var(--ds-space-050, 4px)",
51
61
  paddingRight: "var(--ds-space-050, 4px)",
52
62
  color: `var(--ds-text-subtle, ${N800})`,
53
- backgroundColor: `var(--ds-background-accent-gray-subtlest, ${N30})`
63
+ backgroundColor: `var(--ds-background-accent-gray-subtlest, ${N30})`,
64
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
65
+ '&.remove-left-margin': {
66
+ marginLeft: "var(--ds-space-negative-150, -12px)"
67
+ },
68
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
69
+ '&.remove-nested-left-margin': {
70
+ marginLeft: 0
71
+ }
54
72
  });
55
- const placeholderStyles = css({
73
+ const spacerStyles = css({
56
74
  height: "var(--ds-space-150, 12px)"
57
75
  });
58
76
  const textStyles = css({
@@ -61,19 +79,22 @@ const textStyles = css({
61
79
  padding: `${"var(--ds-space-025, 2px)"} ${"var(--ds-space-050, 4px)"}`
62
80
  });
63
81
  const originalLabelStyles = css({
82
+ background: `var(--ds-background-accent-gray-subtle-pressed, ${N40})`,
64
83
  borderRadius: `${"var(--ds-border-radius, 3px)"} ${"var(--ds-border-radius, 3px)"} 0 0`,
65
84
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
66
85
  '&.show-label': {
67
- background: `var(--ds-background-accent-gray-subtle-pressed, ${N40})`,
68
86
  color: `var(--ds-text-subtle, ${N500})`
69
87
  },
70
88
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
71
- '&.bodied-background': {
72
- background: `var(--ds-surface, ${N0})`
73
- },
89
+ '&.inline': {
90
+ // need to add margin since we don't get it for free like block ones via the padding to make it flush with editor elements
91
+ marginLeft: "var(--ds-space-150, 12px)"
92
+ }
93
+ });
94
+ const iconStyles = css({
74
95
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
75
- '&.bodied-border': {
76
- boxShadow: `0 0 0 1px ${`var(--ds-border, ${N30})`}`
96
+ '&.hide-icon': {
97
+ display: 'none'
77
98
  }
78
99
  });
79
100
  const i18n = defineMessages({
@@ -95,17 +116,26 @@ export const ExtensionLabel = ({
95
116
  }) => {
96
117
  const intl = useIntl();
97
118
  const tooltipText = `${intl.formatMessage(i18n.configure)} ${text}`;
119
+ const isInlineExtension = extensionName === 'inlineExtension';
98
120
  const containerClassNames = classnames({
99
121
  bodied: isBodiedMacro
100
122
  });
101
- const labelClassNames = classnames('extension-label', {
123
+ const sharedLabelClassNames = classnames('extension-label', {
102
124
  nested: isNodeNested,
103
- inline: extensionName === 'inlineExtension',
125
+ inline: isInlineExtension,
104
126
  bodied: isBodiedMacro,
105
- 'bodied-border': isBodiedMacro && !isNodeHovered && !showMacroButtonUpdates,
106
- 'bodied-background': isBodiedMacro && !isNodeHovered && !showMacroButtonUpdates,
127
+ 'bodied-border': isBodiedMacro && !isNodeHovered,
128
+ 'bodied-background': isBodiedMacro && !isNodeHovered,
107
129
  'show-label': isNodeHovered || isBodiedMacro
108
130
  });
131
+ const newButtonLabelClassNames = classnames({
132
+ // For new button design, non-bodied macros should have a flush label. Inline macros don't need this since they never had the margin-left applied.
133
+ 'remove-left-margin': !isBodiedMacro && !isInlineExtension && !isNodeNested,
134
+ 'remove-nested-left-margin': isNodeNested && !isBodiedMacro && !isInlineExtension
135
+ });
136
+ const iconClassNames = classnames({
137
+ 'hide-icon': isBodiedMacro && !isNodeHovered
138
+ });
109
139
  return jsx("div", {
110
140
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
111
141
  css: containerStyles
@@ -131,18 +161,21 @@ export const ExtensionLabel = ({
131
161
  css: [sharedLabelStyles, buttonLabelStyles]
132
162
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
133
163
  ,
134
- className: labelClassNames
135
- }), text, " ", jsx(PreferencesIcon, {
164
+ className: `${sharedLabelClassNames} ${newButtonLabelClassNames}`
165
+ }), text, jsx("span", {
166
+ css: iconStyles,
167
+ className: iconClassNames,
168
+ "data-testid": "config-icon"
169
+ }, jsx(PreferencesIcon, {
136
170
  label: ""
137
- }))), jsx("div", {
138
- "data-testid": "placeholder",
139
- css: placeholderStyles
171
+ })))), jsx("div", {
172
+ css: spacerStyles
140
173
  })) : jsx("span", {
141
174
  "data-testid": "new-lozenge",
142
175
  css: [sharedLabelStyles, originalLabelStyles]
143
176
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
144
177
  ,
145
- className: labelClassNames
178
+ className: sharedLabelClassNames
146
179
  }, jsx("span", {
147
180
  css: textStyles
148
181
  }, text)));
@@ -1,2 +1,3 @@
1
+ export const linkPreferencesPath = '/manage-profile/link-preferences';
1
2
  export const stagingLinkPreferencesUrl = 'https://id.stg.internal.atlassian.com/manage-profile/link-preferences';
2
3
  export const productionLinkPreferencesUrl = 'https://id.atlassian.com/manage-profile/link-preferences';
@@ -1,4 +1,6 @@
1
- import { productionLinkPreferencesUrl, stagingLinkPreferencesUrl } from './constants';
1
+ import { getATLContextUrl } from '@atlaskit/atlassian-context';
2
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
3
+ import { linkPreferencesPath, productionLinkPreferencesUrl, stagingLinkPreferencesUrl } from './constants';
2
4
  export function isTextAtPos(pos) {
3
5
  return state => {
4
6
  const node = state.doc.nodeAt(pos);
@@ -12,6 +14,9 @@ export function isLinkAtPos(pos) {
12
14
  };
13
15
  }
14
16
  export const getLinkPreferencesURLFromENV = () => {
17
+ if (getBooleanFF('platform.editor.linking-preferences-url-atlassian-context')) {
18
+ return getATLContextUrl('id') + linkPreferencesPath;
19
+ }
15
20
  if (process.env.NODE_ENV === 'production' && process.env.CLOUD_ENV === 'staging') {
16
21
  // only a production CLOUD_ENV staging environment has a different link preferences URL
17
22
  return stagingLinkPreferencesUrl;
@@ -4,7 +4,7 @@ import { useEffect, useMemo, useState } from 'react';
4
4
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
5
  import { css, jsx } from '@emotion/react';
6
6
  import debounce from 'lodash/debounce';
7
- import { CustomThemeButton } from '@atlaskit/button';
7
+ import CustomThemeButton from '@atlaskit/button/custom-theme-button';
8
8
  import { akEditorUnitZIndex } from '@atlaskit/editor-shared-styles';
9
9
  import CommentIcon from '@atlaskit/icon/glyph/comment';
10
10
  import { layers } from '@atlaskit/theme/constants';
@@ -5,11 +5,17 @@ export const annotationMessages = defineMessages({
5
5
  defaultMessage: 'Comment',
6
6
  description: 'Create/add an inline comment based on the users selection'
7
7
  },
8
+ // TODO: Remove this message when the platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz FF is removed
8
9
  createCommentInvalid: {
9
10
  id: 'fabric.editor.createCommentInvalid',
10
11
  defaultMessage: 'You can only comment on text and headings',
11
12
  description: 'Error message to communicate to the user they can only do the current action in certain contexts'
12
13
  },
14
+ createCommentDisabled: {
15
+ id: 'fabric.editor.createCommentDisabled',
16
+ defaultMessage: 'You can only comment on text, headings, emojis, dates, mentions, links, and statuses.',
17
+ description: 'Error message to communicate to the user they can only do the current action in certain contexts'
18
+ },
13
19
  toolbar: {
14
20
  id: 'fabric.editor.annotationToolbar',
15
21
  defaultMessage: 'Annotation toolbar',
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "83.4.3";
4
+ const packageVersion = "83.5.1";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // TODO: Sanitise the URL instead of just removing it
@@ -9,7 +9,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
9
9
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
10
10
  import Layer from '../Layer';
11
11
  const packageName = "@atlaskit/editor-common";
12
- const packageVersion = "83.4.3";
12
+ const packageVersion = "83.5.1";
13
13
  const halfFocusRing = 1;
14
14
  const dropOffset = '0, 8';
15
15
  class DropList extends Component {
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
5
  import { css, jsx } from '@emotion/react';
6
6
  import { withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
7
- import Button from '@atlaskit/button';
7
+ import Button from '@atlaskit/button/standard-button';
8
8
  import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
9
9
  import { N0, N30A, N60A } from '@atlaskit/theme/colors';
10
10
  import Tooltip from '@atlaskit/tooltip';
@@ -201,7 +201,9 @@ const ColorPickerButton = props => {
201
201
  togglePopup();
202
202
  setIsOpenedByKeyboard(true);
203
203
  }
204
- },
204
+ }
205
+ // TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
206
+ ,
205
207
  css: buttonStyle,
206
208
  iconAfter: jsx("span", {
207
209
  css: colorPickerExpandContainer
@@ -5,10 +5,11 @@ import _extends from "@babel/runtime/helpers/extends";
5
5
  import React from 'react';
6
6
  import Button from '@atlaskit/button/standard-button';
7
7
  export default /*#__PURE__*/React.forwardRef((props, ref) => {
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
9
8
  return /*#__PURE__*/React.createElement(Button, _extends({
10
9
  ref: ref
11
10
  }, props, {
11
+ // TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
12
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
12
13
  style: {
13
14
  alignItems: 'center'
14
15
  }
@@ -5,7 +5,7 @@ import React from 'react';
5
5
 
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { css, jsx } from '@emotion/react';
8
- import { ButtonGroup } from '@atlaskit/button';
8
+ import ButtonGroup from '@atlaskit/button/button-group';
9
9
  import { FloatingToolbarButton as Button } from '../ui';
10
10
 
11
11
  /**
@@ -2,7 +2,7 @@
2
2
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
3
  import { css, jsx } from '@emotion/react';
4
4
  import { FormattedMessage } from 'react-intl-next';
5
- import Button from '@atlaskit/button';
5
+ import { LinkButton } from '@atlaskit/button/new';
6
6
  import { Box, xcss } from '@atlaskit/primitives';
7
7
  import NotFoundIllustration from './NotFoundIllustration';
8
8
  export default function EmptyState(_ref) {
@@ -24,7 +24,7 @@ export default function EmptyState(_ref) {
24
24
  description: "Empty state sub-heading"
25
25
  })), jsx(Box, {
26
26
  xcss: externalLinkWrapper
27
- }, jsx(Button, {
27
+ }, jsx(LinkButton, {
28
28
  appearance: "primary",
29
29
  target: "_blank",
30
30
  href: "https://marketplace.atlassian.com/search?category=Macros&hosting=cloud&product=confluence",
@@ -39,20 +39,38 @@ var sharedLabelStyles = css({
39
39
  },
40
40
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
41
41
  '&.inline': {
42
- marginLeft: "var(--ds-space-150, 12px)",
43
42
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
44
43
  top: '-18px'
44
+ },
45
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
46
+ '&.bodied-background': {
47
+ background: "var(--ds-surface, ".concat(N0, ")")
48
+ },
49
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
50
+ '&.bodied-border': {
51
+ boxShadow: "0 0 0 1px ".concat("var(--ds-border, ".concat(N30, ")"))
45
52
  }
46
53
  });
47
54
  var buttonLabelStyles = css({
55
+ // Need this exact number since this is size with icon
56
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
57
+ minHeight: '26px',
48
58
  alignItems: 'center',
49
59
  borderRadius: "var(--ds-border-radius, 3px)",
50
60
  paddingLeft: "var(--ds-space-050, 4px)",
51
61
  paddingRight: "var(--ds-space-050, 4px)",
52
62
  color: "var(--ds-text-subtle, ".concat(N800, ")"),
53
- backgroundColor: "var(--ds-background-accent-gray-subtlest, ".concat(N30, ")")
63
+ backgroundColor: "var(--ds-background-accent-gray-subtlest, ".concat(N30, ")"),
64
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
65
+ '&.remove-left-margin': {
66
+ marginLeft: "var(--ds-space-negative-150, -12px)"
67
+ },
68
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
69
+ '&.remove-nested-left-margin': {
70
+ marginLeft: 0
71
+ }
54
72
  });
55
- var placeholderStyles = css({
73
+ var spacerStyles = css({
56
74
  height: "var(--ds-space-150, 12px)"
57
75
  });
58
76
  var textStyles = css({
@@ -61,19 +79,22 @@ var textStyles = css({
61
79
  padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-050, 4px)")
62
80
  });
63
81
  var originalLabelStyles = css({
82
+ background: "var(--ds-background-accent-gray-subtle-pressed, ".concat(N40, ")"),
64
83
  borderRadius: "var(--ds-border-radius, 3px)".concat(" ", "var(--ds-border-radius, 3px)", " 0 0"),
65
84
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
66
85
  '&.show-label': {
67
- background: "var(--ds-background-accent-gray-subtle-pressed, ".concat(N40, ")"),
68
86
  color: "var(--ds-text-subtle, ".concat(N500, ")")
69
87
  },
70
88
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
71
- '&.bodied-background': {
72
- background: "var(--ds-surface, ".concat(N0, ")")
73
- },
89
+ '&.inline': {
90
+ // need to add margin since we don't get it for free like block ones via the padding to make it flush with editor elements
91
+ marginLeft: "var(--ds-space-150, 12px)"
92
+ }
93
+ });
94
+ var iconStyles = css({
74
95
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
75
- '&.bodied-border': {
76
- boxShadow: "0 0 0 1px ".concat("var(--ds-border, ".concat(N30, ")"))
96
+ '&.hide-icon': {
97
+ display: 'none'
77
98
  }
78
99
  });
79
100
  var i18n = defineMessages({
@@ -94,17 +115,26 @@ export var ExtensionLabel = function ExtensionLabel(_ref) {
94
115
  showMacroButtonUpdates = _ref.showMacroButtonUpdates;
95
116
  var intl = useIntl();
96
117
  var tooltipText = "".concat(intl.formatMessage(i18n.configure), " ").concat(text);
118
+ var isInlineExtension = extensionName === 'inlineExtension';
97
119
  var containerClassNames = classnames({
98
120
  bodied: isBodiedMacro
99
121
  });
100
- var labelClassNames = classnames('extension-label', {
122
+ var sharedLabelClassNames = classnames('extension-label', {
101
123
  nested: isNodeNested,
102
- inline: extensionName === 'inlineExtension',
124
+ inline: isInlineExtension,
103
125
  bodied: isBodiedMacro,
104
- 'bodied-border': isBodiedMacro && !isNodeHovered && !showMacroButtonUpdates,
105
- 'bodied-background': isBodiedMacro && !isNodeHovered && !showMacroButtonUpdates,
126
+ 'bodied-border': isBodiedMacro && !isNodeHovered,
127
+ 'bodied-background': isBodiedMacro && !isNodeHovered,
106
128
  'show-label': isNodeHovered || isBodiedMacro
107
129
  });
130
+ var newButtonLabelClassNames = classnames({
131
+ // For new button design, non-bodied macros should have a flush label. Inline macros don't need this since they never had the margin-left applied.
132
+ 'remove-left-margin': !isBodiedMacro && !isInlineExtension && !isNodeNested,
133
+ 'remove-nested-left-margin': isNodeNested && !isBodiedMacro && !isInlineExtension
134
+ });
135
+ var iconClassNames = classnames({
136
+ 'hide-icon': isBodiedMacro && !isNodeHovered
137
+ });
108
138
  return jsx("div", {
109
139
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
110
140
  css: containerStyles
@@ -131,19 +161,22 @@ export var ExtensionLabel = function ExtensionLabel(_ref) {
131
161
  css: [sharedLabelStyles, buttonLabelStyles]
132
162
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
133
163
  ,
134
- className: labelClassNames
135
- }), text, " ", jsx(PreferencesIcon, {
164
+ className: "".concat(sharedLabelClassNames, " ").concat(newButtonLabelClassNames)
165
+ }), text, jsx("span", {
166
+ css: iconStyles,
167
+ className: iconClassNames,
168
+ "data-testid": "config-icon"
169
+ }, jsx(PreferencesIcon, {
136
170
  label: ""
137
- }));
171
+ })));
138
172
  }), jsx("div", {
139
- "data-testid": "placeholder",
140
- css: placeholderStyles
173
+ css: spacerStyles
141
174
  })) : jsx("span", {
142
175
  "data-testid": "new-lozenge",
143
176
  css: [sharedLabelStyles, originalLabelStyles]
144
177
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
145
178
  ,
146
- className: labelClassNames
179
+ className: sharedLabelClassNames
147
180
  }, jsx("span", {
148
181
  css: textStyles
149
182
  }, text)));
@@ -1,2 +1,3 @@
1
+ export var linkPreferencesPath = '/manage-profile/link-preferences';
1
2
  export var stagingLinkPreferencesUrl = 'https://id.stg.internal.atlassian.com/manage-profile/link-preferences';
2
3
  export var productionLinkPreferencesUrl = 'https://id.atlassian.com/manage-profile/link-preferences';
@@ -1,4 +1,6 @@
1
- import { productionLinkPreferencesUrl, stagingLinkPreferencesUrl } from './constants';
1
+ import { getATLContextUrl } from '@atlaskit/atlassian-context';
2
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
3
+ import { linkPreferencesPath, productionLinkPreferencesUrl, stagingLinkPreferencesUrl } from './constants';
2
4
  export function isTextAtPos(pos) {
3
5
  return function (state) {
4
6
  var node = state.doc.nodeAt(pos);
@@ -12,6 +14,9 @@ export function isLinkAtPos(pos) {
12
14
  };
13
15
  }
14
16
  export var getLinkPreferencesURLFromENV = function getLinkPreferencesURLFromENV() {
17
+ if (getBooleanFF('platform.editor.linking-preferences-url-atlassian-context')) {
18
+ return getATLContextUrl('id') + linkPreferencesPath;
19
+ }
15
20
  if (process.env.NODE_ENV === 'production' && process.env.CLOUD_ENV === 'staging') {
16
21
  // only a production CLOUD_ENV staging environment has a different link preferences URL
17
22
  return stagingLinkPreferencesUrl;
@@ -5,7 +5,7 @@ import { useEffect, useMemo, useState } from 'react';
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
6
  import { css, jsx } from '@emotion/react';
7
7
  import debounce from 'lodash/debounce';
8
- import { CustomThemeButton } from '@atlaskit/button';
8
+ import CustomThemeButton from '@atlaskit/button/custom-theme-button';
9
9
  import { akEditorUnitZIndex } from '@atlaskit/editor-shared-styles';
10
10
  import CommentIcon from '@atlaskit/icon/glyph/comment';
11
11
  import { layers } from '@atlaskit/theme/constants';
@@ -5,11 +5,17 @@ export var annotationMessages = defineMessages({
5
5
  defaultMessage: 'Comment',
6
6
  description: 'Create/add an inline comment based on the users selection'
7
7
  },
8
+ // TODO: Remove this message when the platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz FF is removed
8
9
  createCommentInvalid: {
9
10
  id: 'fabric.editor.createCommentInvalid',
10
11
  defaultMessage: 'You can only comment on text and headings',
11
12
  description: 'Error message to communicate to the user they can only do the current action in certain contexts'
12
13
  },
14
+ createCommentDisabled: {
15
+ id: 'fabric.editor.createCommentDisabled',
16
+ defaultMessage: 'You can only comment on text, headings, emojis, dates, mentions, links, and statuses.',
17
+ description: 'Error message to communicate to the user they can only do the current action in certain contexts'
18
+ },
13
19
  toolbar: {
14
20
  id: 'fabric.editor.annotationToolbar',
15
21
  defaultMessage: 'Annotation toolbar',
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "83.4.3";
10
+ var packageVersion = "83.5.1";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // TODO: Sanitise the URL instead of just removing it
@@ -17,7 +17,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
17
17
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
18
18
  import Layer from '../Layer';
19
19
  var packageName = "@atlaskit/editor-common";
20
- var packageVersion = "83.4.3";
20
+ var packageVersion = "83.5.1";
21
21
  var halfFocusRing = 1;
22
22
  var dropOffset = '0, 8';
23
23
  var DropList = /*#__PURE__*/function (_Component) {
@@ -5,7 +5,7 @@ import React from 'react';
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
6
  import { css, jsx } from '@emotion/react';
7
7
  import { withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
8
- import Button from '@atlaskit/button';
8
+ import Button from '@atlaskit/button/standard-button';
9
9
  import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
10
10
  import { N0, N30A, N60A } from '@atlaskit/theme/colors';
11
11
  import Tooltip from '@atlaskit/tooltip';
@@ -214,7 +214,9 @@ var ColorPickerButton = function ColorPickerButton(props) {
214
214
  togglePopup();
215
215
  setIsOpenedByKeyboard(true);
216
216
  }
217
- },
217
+ }
218
+ // TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
219
+ ,
218
220
  css: buttonStyle,
219
221
  iconAfter: jsx("span", {
220
222
  css: colorPickerExpandContainer
@@ -5,10 +5,11 @@ import _extends from "@babel/runtime/helpers/extends";
5
5
  import React from 'react';
6
6
  import Button from '@atlaskit/button/standard-button';
7
7
  export default /*#__PURE__*/React.forwardRef(function (props, ref) {
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
9
8
  return /*#__PURE__*/React.createElement(Button, _extends({
10
9
  ref: ref
11
10
  }, props, {
11
+ // TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
12
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
12
13
  style: {
13
14
  alignItems: 'center'
14
15
  }
@@ -1,2 +1,3 @@
1
+ export declare const linkPreferencesPath = "/manage-profile/link-preferences";
1
2
  export declare const stagingLinkPreferencesUrl = "https://id.stg.internal.atlassian.com/manage-profile/link-preferences";
2
3
  export declare const productionLinkPreferencesUrl = "https://id.atlassian.com/manage-profile/link-preferences";
@@ -1,5 +1,4 @@
1
1
  import type { Predicate } from '../types';
2
- import { productionLinkPreferencesUrl, stagingLinkPreferencesUrl } from './constants';
3
2
  export declare function isTextAtPos(pos: number): Predicate;
4
3
  export declare function isLinkAtPos(pos: number): Predicate;
5
- export declare const getLinkPreferencesURLFromENV: () => typeof productionLinkPreferencesUrl | typeof stagingLinkPreferencesUrl;
4
+ export declare const getLinkPreferencesURLFromENV: () => string;
@@ -9,6 +9,11 @@ export declare const annotationMessages: {
9
9
  defaultMessage: string;
10
10
  description: string;
11
11
  };
12
+ createCommentDisabled: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
12
17
  toolbar: {
13
18
  id: string;
14
19
  defaultMessage: string;
@@ -1,2 +1,3 @@
1
+ export declare const linkPreferencesPath = "/manage-profile/link-preferences";
1
2
  export declare const stagingLinkPreferencesUrl = "https://id.stg.internal.atlassian.com/manage-profile/link-preferences";
2
3
  export declare const productionLinkPreferencesUrl = "https://id.atlassian.com/manage-profile/link-preferences";
@@ -1,5 +1,4 @@
1
1
  import type { Predicate } from '../types';
2
- import { productionLinkPreferencesUrl, stagingLinkPreferencesUrl } from './constants';
3
2
  export declare function isTextAtPos(pos: number): Predicate;
4
3
  export declare function isLinkAtPos(pos: number): Predicate;
5
- export declare const getLinkPreferencesURLFromENV: () => typeof productionLinkPreferencesUrl | typeof stagingLinkPreferencesUrl;
4
+ export declare const getLinkPreferencesURLFromENV: () => string;
@@ -9,6 +9,11 @@ export declare const annotationMessages: {
9
9
  defaultMessage: string;
10
10
  description: string;
11
11
  };
12
+ createCommentDisabled: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
12
17
  toolbar: {
13
18
  id: string;
14
19
  defaultMessage: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "83.4.3",
3
+ "version": "83.5.1",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -96,12 +96,13 @@
96
96
  },
97
97
  "dependencies": {
98
98
  "@atlaskit/activity-provider": "^2.4.0",
99
- "@atlaskit/adf-schema": "^38.0.0",
99
+ "@atlaskit/adf-schema": "^39.0.3",
100
100
  "@atlaskit/adf-utils": "^19.4.0",
101
101
  "@atlaskit/analytics-listeners": "^8.10.0",
102
102
  "@atlaskit/analytics-namespaced-context": "^6.10.0",
103
103
  "@atlaskit/analytics-next": "^9.3.0",
104
104
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
105
+ "@atlaskit/atlassian-context": "^0.0.0",
105
106
  "@atlaskit/button": "^18.0.0",
106
107
  "@atlaskit/code": "^15.3.0",
107
108
  "@atlaskit/codemod-utils": "^4.2.0",
@@ -123,7 +124,7 @@
123
124
  "@atlaskit/media-file-preview": "^0.5.0",
124
125
  "@atlaskit/media-picker": "^66.4.0",
125
126
  "@atlaskit/media-ui": "^25.10.0",
126
- "@atlaskit/media-viewer": "48.6.9",
127
+ "@atlaskit/media-viewer": "48.6.10",
127
128
  "@atlaskit/mention": "^23.2.0",
128
129
  "@atlaskit/menu": "^2.6.0",
129
130
  "@atlaskit/platform-feature-flags": "^0.3.0",
@@ -271,6 +272,9 @@
271
272
  },
272
273
  "platform.editor.review-text-highlighting-styling": {
273
274
  "type": "boolean"
275
+ },
276
+ "platform.editor.linking-preferences-url-atlassian-context": {
277
+ "type": "boolean"
274
278
  }
275
279
  }
276
280
  }