@atlaskit/editor-common 85.1.0 → 85.2.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 +8 -0
- package/dist/cjs/link/ConfigureLinkOverlay/Dropdown.js +6 -3
- package/dist/cjs/link/ConfigureLinkOverlay/index.js +1 -0
- package/dist/cjs/link/ConfigureLinkOverlay/useLinkOverlayAnalyticsEvents.js +1 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/link/ConfigureLinkOverlay/Dropdown.js +5 -2
- package/dist/es2019/link/ConfigureLinkOverlay/index.js +1 -0
- package/dist/es2019/link/ConfigureLinkOverlay/useLinkOverlayAnalyticsEvents.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/link/ConfigureLinkOverlay/Dropdown.js +6 -3
- package/dist/esm/link/ConfigureLinkOverlay/index.js +1 -0
- package/dist/esm/link/ConfigureLinkOverlay/useLinkOverlayAnalyticsEvents.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/link/ConfigureLinkOverlay/Dropdown.d.ts +2 -0
- package/dist/types-ts4.5/link/ConfigureLinkOverlay/Dropdown.d.ts +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 85.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#119849](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/119849)
|
|
8
|
+
[`8160c4683046e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8160c4683046e) -
|
|
9
|
+
EDM-10391 Configure button in smart link in live pages on narrow links now selects link
|
|
10
|
+
|
|
3
11
|
## 85.1.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -26,7 +26,8 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
26
26
|
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; }
|
|
27
27
|
var SMALL_LINK_TOOLBAR_ANALYTICS_SOURCE = 'smallLinkToolbar';
|
|
28
28
|
var Dropdown = function Dropdown(_ref) {
|
|
29
|
-
var
|
|
29
|
+
var onConfigureClickCallback = _ref.onConfigureClick,
|
|
30
|
+
onDropdownChange = _ref.onDropdownChange,
|
|
30
31
|
testId = _ref.testId;
|
|
31
32
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
32
33
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -48,7 +49,8 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
48
49
|
}, [fireActionClickEvent]);
|
|
49
50
|
var onConfigureClick = (0, _react.useCallback)(function () {
|
|
50
51
|
fireActionClickEvent('configureLink');
|
|
51
|
-
|
|
52
|
+
onConfigureClickCallback === null || onConfigureClickCallback === void 0 || onConfigureClickCallback();
|
|
53
|
+
}, [fireActionClickEvent, onConfigureClickCallback]);
|
|
52
54
|
return (0, _react2.jsx)(_dropdownMenu.default, {
|
|
53
55
|
trigger: function trigger(_ref3) {
|
|
54
56
|
var _onClick = _ref3.onClick,
|
|
@@ -80,7 +82,8 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
80
82
|
label: configureLinkLabel,
|
|
81
83
|
size: 'medium'
|
|
82
84
|
}),
|
|
83
|
-
onClick: onConfigureClick
|
|
85
|
+
onClick: onConfigureClick,
|
|
86
|
+
testId: "".concat(testId, "-dropdown-item-configure")
|
|
84
87
|
}, configureLinkLabel)));
|
|
85
88
|
};
|
|
86
89
|
var _default = exports.default = (0, _analyticsNext.withAnalyticsContext)({
|
|
@@ -94,6 +94,7 @@ var OverlayButton = exports.OverlayButton = (0, _analyticsNext.withAnalyticsCont
|
|
|
94
94
|
"data-testid": testId
|
|
95
95
|
}, showDropdown ? (0, _react2.jsx)(_Dropdown.default, {
|
|
96
96
|
testId: testId,
|
|
97
|
+
onConfigureClick: handleConfigureClick,
|
|
97
98
|
onDropdownChange: onDropdownChange
|
|
98
99
|
}) : (0, _react2.jsx)(_tooltip.default, {
|
|
99
100
|
content: configureLinkLabel,
|
|
@@ -35,7 +35,7 @@ var useLinkOverlayAnalyticsEvents = exports.useLinkOverlayAnalyticsEvents = func
|
|
|
35
35
|
action: _analytics.ACTION.VIEWED,
|
|
36
36
|
actionSubject: _analytics.ACTION_SUBJECT.INLINE_DIALOG,
|
|
37
37
|
actionSubjectId: _analytics.ACTION_SUBJECT_ID.SMART_LINK_TOOLBAR,
|
|
38
|
-
eventType: _analytics.EVENT_TYPE.
|
|
38
|
+
eventType: _analytics.EVENT_TYPE.UI,
|
|
39
39
|
attributes: {
|
|
40
40
|
linkType: 'smallLink'
|
|
41
41
|
}
|
|
@@ -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 = "85.
|
|
20
|
+
var packageVersion = "85.2.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 = "85.
|
|
23
|
+
var packageVersion = "85.2.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -15,6 +15,7 @@ import { StyledButton } from './StyledButton';
|
|
|
15
15
|
import { useLinkOverlayAnalyticsEvents } from './useLinkOverlayAnalyticsEvents';
|
|
16
16
|
const SMALL_LINK_TOOLBAR_ANALYTICS_SOURCE = 'smallLinkToolbar';
|
|
17
17
|
const Dropdown = ({
|
|
18
|
+
onConfigureClick: onConfigureClickCallback,
|
|
18
19
|
onDropdownChange,
|
|
19
20
|
testId
|
|
20
21
|
}) => {
|
|
@@ -41,7 +42,8 @@ const Dropdown = ({
|
|
|
41
42
|
}, [fireActionClickEvent]);
|
|
42
43
|
const onConfigureClick = useCallback(() => {
|
|
43
44
|
fireActionClickEvent('configureLink');
|
|
44
|
-
|
|
45
|
+
onConfigureClickCallback === null || onConfigureClickCallback === void 0 ? void 0 : onConfigureClickCallback();
|
|
46
|
+
}, [fireActionClickEvent, onConfigureClickCallback]);
|
|
45
47
|
return jsx(DropdownMenu, {
|
|
46
48
|
trigger: ({
|
|
47
49
|
onClick,
|
|
@@ -72,7 +74,8 @@ const Dropdown = ({
|
|
|
72
74
|
label: configureLinkLabel,
|
|
73
75
|
size: 'medium'
|
|
74
76
|
}),
|
|
75
|
-
onClick: onConfigureClick
|
|
77
|
+
onClick: onConfigureClick,
|
|
78
|
+
testId: `${testId}-dropdown-item-configure`
|
|
76
79
|
}, configureLinkLabel)));
|
|
77
80
|
};
|
|
78
81
|
export default withAnalyticsContext({
|
|
@@ -85,6 +85,7 @@ export const OverlayButton = withAnalyticsContext()(({
|
|
|
85
85
|
"data-testid": testId
|
|
86
86
|
}, showDropdown ? jsx(Dropdown, {
|
|
87
87
|
testId: testId,
|
|
88
|
+
onConfigureClick: handleConfigureClick,
|
|
88
89
|
onDropdownChange: onDropdownChange
|
|
89
90
|
}) : jsx(Tooltip, {
|
|
90
91
|
content: configureLinkLabel,
|
|
@@ -29,7 +29,7 @@ export const useLinkOverlayAnalyticsEvents = () => {
|
|
|
29
29
|
action: ACTION.VIEWED,
|
|
30
30
|
actionSubject: ACTION_SUBJECT.INLINE_DIALOG,
|
|
31
31
|
actionSubjectId: ACTION_SUBJECT_ID.SMART_LINK_TOOLBAR,
|
|
32
|
-
eventType: EVENT_TYPE.
|
|
32
|
+
eventType: EVENT_TYPE.UI,
|
|
33
33
|
attributes: {
|
|
34
34
|
linkType: 'smallLink'
|
|
35
35
|
}
|
|
@@ -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 = "85.
|
|
4
|
+
const packageVersion = "85.2.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 = "85.
|
|
12
|
+
const packageVersion = "85.2.0";
|
|
13
13
|
const halfFocusRing = 1;
|
|
14
14
|
const dropOffset = '0, 8';
|
|
15
15
|
class DropList extends Component {
|
|
@@ -17,7 +17,8 @@ import { StyledButton } from './StyledButton';
|
|
|
17
17
|
import { useLinkOverlayAnalyticsEvents } from './useLinkOverlayAnalyticsEvents';
|
|
18
18
|
var SMALL_LINK_TOOLBAR_ANALYTICS_SOURCE = 'smallLinkToolbar';
|
|
19
19
|
var Dropdown = function Dropdown(_ref) {
|
|
20
|
-
var
|
|
20
|
+
var onConfigureClickCallback = _ref.onConfigureClick,
|
|
21
|
+
onDropdownChange = _ref.onDropdownChange,
|
|
21
22
|
testId = _ref.testId;
|
|
22
23
|
var _useIntl = useIntl(),
|
|
23
24
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -39,7 +40,8 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
39
40
|
}, [fireActionClickEvent]);
|
|
40
41
|
var onConfigureClick = useCallback(function () {
|
|
41
42
|
fireActionClickEvent('configureLink');
|
|
42
|
-
|
|
43
|
+
onConfigureClickCallback === null || onConfigureClickCallback === void 0 || onConfigureClickCallback();
|
|
44
|
+
}, [fireActionClickEvent, onConfigureClickCallback]);
|
|
43
45
|
return jsx(DropdownMenu, {
|
|
44
46
|
trigger: function trigger(_ref3) {
|
|
45
47
|
var _onClick = _ref3.onClick,
|
|
@@ -71,7 +73,8 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
71
73
|
label: configureLinkLabel,
|
|
72
74
|
size: 'medium'
|
|
73
75
|
}),
|
|
74
|
-
onClick: onConfigureClick
|
|
76
|
+
onClick: onConfigureClick,
|
|
77
|
+
testId: "".concat(testId, "-dropdown-item-configure")
|
|
75
78
|
}, configureLinkLabel)));
|
|
76
79
|
};
|
|
77
80
|
export default withAnalyticsContext({
|
|
@@ -86,6 +86,7 @@ export var OverlayButton = withAnalyticsContext()(function (_ref) {
|
|
|
86
86
|
"data-testid": testId
|
|
87
87
|
}, showDropdown ? jsx(Dropdown, {
|
|
88
88
|
testId: testId,
|
|
89
|
+
onConfigureClick: handleConfigureClick,
|
|
89
90
|
onDropdownChange: onDropdownChange
|
|
90
91
|
}) : jsx(Tooltip, {
|
|
91
92
|
content: configureLinkLabel,
|
|
@@ -29,7 +29,7 @@ export var useLinkOverlayAnalyticsEvents = function useLinkOverlayAnalyticsEvent
|
|
|
29
29
|
action: ACTION.VIEWED,
|
|
30
30
|
actionSubject: ACTION_SUBJECT.INLINE_DIALOG,
|
|
31
31
|
actionSubjectId: ACTION_SUBJECT_ID.SMART_LINK_TOOLBAR,
|
|
32
|
-
eventType: EVENT_TYPE.
|
|
32
|
+
eventType: EVENT_TYPE.UI,
|
|
33
33
|
attributes: {
|
|
34
34
|
linkType: 'smallLink'
|
|
35
35
|
}
|
|
@@ -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 = "85.
|
|
10
|
+
var packageVersion = "85.2.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 = "85.
|
|
20
|
+
var packageVersion = "85.2.0";
|
|
21
21
|
var halfFocusRing = 1;
|
|
22
22
|
var dropOffset = '0, 8';
|
|
23
23
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export type OnDropdownChange = (isOpen: boolean) => void;
|
|
3
3
|
export type DropdownProps = {
|
|
4
|
+
/** Callback fired when the Configure dropdown item is clicked */
|
|
5
|
+
onConfigureClick: () => void;
|
|
4
6
|
/** Callback fired when the dropdown is open or close */
|
|
5
7
|
onDropdownChange?: OnDropdownChange;
|
|
6
8
|
testId: string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export type OnDropdownChange = (isOpen: boolean) => void;
|
|
3
3
|
export type DropdownProps = {
|
|
4
|
+
/** Callback fired when the Configure dropdown item is clicked */
|
|
5
|
+
onConfigureClick: () => void;
|
|
4
6
|
/** Callback fired when the dropdown is open or close */
|
|
5
7
|
onDropdownChange?: OnDropdownChange;
|
|
6
8
|
testId: string;
|
package/package.json
CHANGED