@atlaskit/editor-common 83.4.3 → 83.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/afm-cc/tsconfig.json +3 -0
- package/dist/cjs/card/LinkToolbarButtonGroup.js +2 -2
- package/dist/cjs/element-browser/components/ElementList/EmptyState.js +2 -2
- package/dist/cjs/link/constants.js +2 -1
- package/dist/cjs/link/utils.js +5 -0
- package/dist/cjs/media-single/CommentBadge.js +2 -2
- package/dist/cjs/messages/annotation.js +6 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui-menu/ColorPickerButton/index.js +5 -3
- package/dist/cjs/ui-menu/ToolbarButton/styles.js +2 -1
- package/dist/es2019/card/LinkToolbarButtonGroup.js +1 -1
- package/dist/es2019/element-browser/components/ElementList/EmptyState.js +2 -2
- package/dist/es2019/link/constants.js +1 -0
- package/dist/es2019/link/utils.js +6 -1
- package/dist/es2019/media-single/CommentBadge.js +1 -1
- package/dist/es2019/messages/annotation.js +6 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui-menu/ColorPickerButton/index.js +4 -2
- package/dist/es2019/ui-menu/ToolbarButton/styles.js +2 -1
- package/dist/esm/card/LinkToolbarButtonGroup.js +1 -1
- package/dist/esm/element-browser/components/ElementList/EmptyState.js +2 -2
- package/dist/esm/link/constants.js +1 -0
- package/dist/esm/link/utils.js +6 -1
- package/dist/esm/media-single/CommentBadge.js +1 -1
- package/dist/esm/messages/annotation.js +6 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui-menu/ColorPickerButton/index.js +4 -2
- package/dist/esm/ui-menu/ToolbarButton/styles.js +2 -1
- package/dist/types/link/constants.d.ts +1 -0
- package/dist/types/link/utils.d.ts +1 -2
- package/dist/types/messages/annotation.d.ts +5 -0
- package/dist/types-ts4.5/link/constants.d.ts +1 -0
- package/dist/types-ts4.5/link/utils.d.ts +1 -2
- package/dist/types-ts4.5/messages/annotation.d.ts +5 -0
- package/package.json +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 83.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#116062](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116062)
|
|
8
|
+
[`2662cb99be36f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2662cb99be36f) -
|
|
9
|
+
[ux] ED-23706 - change disabled comment action text
|
|
10
|
+
- [#113441](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/113441)
|
|
11
|
+
[`ea57f8fd294f9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ea57f8fd294f9) -
|
|
12
|
+
Updates getLinkPreferencesURLFromENV utility to leverage `@atlaskit/atlassian-context` pkg in
|
|
13
|
+
order to control user preferences link based on environment/perimeter.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#114548](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/114548)
|
|
18
|
+
[`8b2d47bffb50e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8b2d47bffb50e) -
|
|
19
|
+
bump adf-schema version
|
|
20
|
+
- [#116062](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116062)
|
|
21
|
+
[`1c26d1ee6fb25`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1c26d1ee6fb25) -
|
|
22
|
+
Migrated to new atlaskit Buttons.
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 83.4.3
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -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
|
|
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)(
|
|
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
|
|
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)(
|
|
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",
|
|
@@ -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';
|
package/dist/cjs/link/utils.js
CHANGED
|
@@ -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
|
|
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)(
|
|
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.
|
|
20
|
+
var packageVersion = "83.5.0";
|
|
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.
|
|
23
|
+
var packageVersion = "83.5.0";
|
|
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
|
|
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)(
|
|
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
|
|
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
|
|
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(
|
|
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",
|
|
@@ -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 {
|
|
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
|
|
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
|
+
const packageVersion = "83.5.0";
|
|
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.
|
|
12
|
+
const packageVersion = "83.5.0";
|
|
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
|
|
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
|
|
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(
|
|
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",
|
|
@@ -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';
|
package/dist/esm/link/utils.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
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
|
|
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.
|
|
10
|
+
var packageVersion = "83.5.0";
|
|
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.
|
|
20
|
+
var packageVersion = "83.5.0";
|
|
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: () =>
|
|
4
|
+
export declare const getLinkPreferencesURLFromENV: () => 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: () =>
|
|
4
|
+
export declare const getLinkPreferencesURLFromENV: () => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "83.
|
|
3
|
+
"version": "83.5.0",
|
|
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": "^
|
|
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.
|
|
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
|
}
|