@atlaskit/editor-common 85.1.0 → 86.0.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 +21 -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/link/constants.js +2 -4
- package/dist/cjs/link/index.js +0 -13
- package/dist/cjs/link/utils.js +1 -12
- 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/link/constants.js +1 -3
- package/dist/es2019/link/index.js +0 -1
- package/dist/es2019/link/utils.js +2 -13
- 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/link/constants.js +1 -3
- package/dist/esm/link/index.js +0 -1
- package/dist/esm/link/utils.js +2 -13
- 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/link/constants.d.ts +0 -2
- package/dist/types/link/index.d.ts +0 -1
- package/dist/types-ts4.5/link/ConfigureLinkOverlay/Dropdown.d.ts +2 -0
- package/dist/types-ts4.5/link/constants.d.ts +0 -2
- package/dist/types-ts4.5/link/index.d.ts +0 -1
- package/package.json +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 86.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#120553](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/120553)
|
|
8
|
+
[`259bed51cbd99`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/259bed51cbd99) -
|
|
9
|
+
Updates getLinkPreferencesURLFromENV to leverage @atlaskit/atlassian-context rather than env
|
|
10
|
+
variables (ff cleanup). Removes link preferences constants exports.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 85.2.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- [#119849](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/119849)
|
|
21
|
+
[`8160c4683046e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8160c4683046e) -
|
|
22
|
+
EDM-10391 Configure button in smart link in live pages on narrow links now selects link
|
|
23
|
+
|
|
3
24
|
## 85.1.0
|
|
4
25
|
|
|
5
26
|
### 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
|
}
|
|
@@ -3,7 +3,5 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
var linkPreferencesPath = exports.linkPreferencesPath = '/manage-profile/link-preferences';
|
|
8
|
-
var stagingLinkPreferencesUrl = exports.stagingLinkPreferencesUrl = 'https://id.stg.internal.atlassian.com/manage-profile/link-preferences';
|
|
9
|
-
var productionLinkPreferencesUrl = exports.productionLinkPreferencesUrl = 'https://id.atlassian.com/manage-profile/link-preferences';
|
|
6
|
+
exports.linkPreferencesPath = void 0;
|
|
7
|
+
var linkPreferencesPath = exports.linkPreferencesPath = '/manage-profile/link-preferences';
|
package/dist/cjs/link/index.js
CHANGED
|
@@ -107,24 +107,12 @@ Object.defineProperty(exports, "isTextAtPos", {
|
|
|
107
107
|
return _utils2.isTextAtPos;
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
|
-
Object.defineProperty(exports, "productionLinkPreferencesUrl", {
|
|
111
|
-
enumerable: true,
|
|
112
|
-
get: function get() {
|
|
113
|
-
return _constants.productionLinkPreferencesUrl;
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
110
|
Object.defineProperty(exports, "sha1", {
|
|
117
111
|
enumerable: true,
|
|
118
112
|
get: function get() {
|
|
119
113
|
return _utils.sha1;
|
|
120
114
|
}
|
|
121
115
|
});
|
|
122
|
-
Object.defineProperty(exports, "stagingLinkPreferencesUrl", {
|
|
123
|
-
enumerable: true,
|
|
124
|
-
get: function get() {
|
|
125
|
-
return _constants.stagingLinkPreferencesUrl;
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
116
|
Object.defineProperty(exports, "transformTimeStamp", {
|
|
129
117
|
enumerable: true,
|
|
130
118
|
get: function get() {
|
|
@@ -142,7 +130,6 @@ var _HyperlinkAddToolbar = require("./LinkPicker/HyperlinkAddToolbar");
|
|
|
142
130
|
var _HyperlinkAddToolbar2 = _interopRequireWildcard(require("./LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar"));
|
|
143
131
|
var _utils = require("./LinkPicker/HyperlinkAddToolbar/utils");
|
|
144
132
|
var _utils2 = require("./utils");
|
|
145
|
-
var _constants = require("./constants");
|
|
146
133
|
var _ConfigureLinkOverlay = require("./ConfigureLinkOverlay");
|
|
147
134
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
148
135
|
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; }
|
package/dist/cjs/link/utils.js
CHANGED
|
@@ -7,7 +7,6 @@ exports.getLinkPreferencesURLFromENV = void 0;
|
|
|
7
7
|
exports.isLinkAtPos = isLinkAtPos;
|
|
8
8
|
exports.isTextAtPos = isTextAtPos;
|
|
9
9
|
var _atlassianContext = require("@atlaskit/atlassian-context");
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
10
|
var _constants = require("./constants");
|
|
12
11
|
function isTextAtPos(pos) {
|
|
13
12
|
return function (state) {
|
|
@@ -22,15 +21,5 @@ function isLinkAtPos(pos) {
|
|
|
22
21
|
};
|
|
23
22
|
}
|
|
24
23
|
var getLinkPreferencesURLFromENV = exports.getLinkPreferencesURLFromENV = function getLinkPreferencesURLFromENV() {
|
|
25
|
-
|
|
26
|
-
return (0, _atlassianContext.getATLContextUrl)('id') + _constants.linkPreferencesPath;
|
|
27
|
-
}
|
|
28
|
-
if (process.env.NODE_ENV === 'production' && process.env.CLOUD_ENV === 'staging') {
|
|
29
|
-
// only a production CLOUD_ENV staging environment has a different link preferences URL
|
|
30
|
-
return _constants.stagingLinkPreferencesUrl;
|
|
31
|
-
} else if (process.env.NODE_ENV === 'production') {
|
|
32
|
-
return _constants.productionLinkPreferencesUrl;
|
|
33
|
-
} else {
|
|
34
|
-
return _constants.stagingLinkPreferencesUrl;
|
|
35
|
-
}
|
|
24
|
+
return (0, _atlassianContext.getATLContextUrl)('id') + _constants.linkPreferencesPath;
|
|
36
25
|
};
|
|
@@ -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 = "
|
|
20
|
+
var packageVersion = "86.0.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 = "
|
|
23
|
+
var packageVersion = "86.0.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,3 +1 @@
|
|
|
1
|
-
export const linkPreferencesPath = '/manage-profile/link-preferences';
|
|
2
|
-
export const stagingLinkPreferencesUrl = 'https://id.stg.internal.atlassian.com/manage-profile/link-preferences';
|
|
3
|
-
export const productionLinkPreferencesUrl = 'https://id.atlassian.com/manage-profile/link-preferences';
|
|
1
|
+
export const linkPreferencesPath = '/manage-profile/link-preferences';
|
|
@@ -9,5 +9,4 @@ export { HyperlinkAddToolbar } from './LinkPicker/HyperlinkAddToolbar';
|
|
|
9
9
|
export { default as HyperlinkLinkAddToolbar, HyperlinkLinkAddToolbarWithIntl, RECENT_SEARCH_LIST_SIZE } from './LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar';
|
|
10
10
|
export { sha1 } from './LinkPicker/HyperlinkAddToolbar/utils';
|
|
11
11
|
export { isLinkAtPos, isTextAtPos, getLinkPreferencesURLFromENV } from './utils';
|
|
12
|
-
export { stagingLinkPreferencesUrl, productionLinkPreferencesUrl } from './constants';
|
|
13
12
|
export { OverlayButton } from './ConfigureLinkOverlay';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { getATLContextUrl } from '@atlaskit/atlassian-context';
|
|
2
|
-
import {
|
|
3
|
-
import { linkPreferencesPath, productionLinkPreferencesUrl, stagingLinkPreferencesUrl } from './constants';
|
|
2
|
+
import { linkPreferencesPath } from './constants';
|
|
4
3
|
export function isTextAtPos(pos) {
|
|
5
4
|
return state => {
|
|
6
5
|
const node = state.doc.nodeAt(pos);
|
|
@@ -14,15 +13,5 @@ export function isLinkAtPos(pos) {
|
|
|
14
13
|
};
|
|
15
14
|
}
|
|
16
15
|
export const getLinkPreferencesURLFromENV = () => {
|
|
17
|
-
|
|
18
|
-
return getATLContextUrl('id') + linkPreferencesPath;
|
|
19
|
-
}
|
|
20
|
-
if (process.env.NODE_ENV === 'production' && process.env.CLOUD_ENV === 'staging') {
|
|
21
|
-
// only a production CLOUD_ENV staging environment has a different link preferences URL
|
|
22
|
-
return stagingLinkPreferencesUrl;
|
|
23
|
-
} else if (process.env.NODE_ENV === 'production') {
|
|
24
|
-
return productionLinkPreferencesUrl;
|
|
25
|
-
} else {
|
|
26
|
-
return stagingLinkPreferencesUrl;
|
|
27
|
-
}
|
|
16
|
+
return getATLContextUrl('id') + linkPreferencesPath;
|
|
28
17
|
};
|
|
@@ -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 = "
|
|
4
|
+
const packageVersion = "86.0.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 = "
|
|
12
|
+
const packageVersion = "86.0.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
|
}
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
export var linkPreferencesPath = '/manage-profile/link-preferences';
|
|
2
|
-
export var stagingLinkPreferencesUrl = 'https://id.stg.internal.atlassian.com/manage-profile/link-preferences';
|
|
3
|
-
export var productionLinkPreferencesUrl = 'https://id.atlassian.com/manage-profile/link-preferences';
|
|
1
|
+
export var linkPreferencesPath = '/manage-profile/link-preferences';
|
package/dist/esm/link/index.js
CHANGED
|
@@ -9,5 +9,4 @@ export { HyperlinkAddToolbar } from './LinkPicker/HyperlinkAddToolbar';
|
|
|
9
9
|
export { default as HyperlinkLinkAddToolbar, HyperlinkLinkAddToolbarWithIntl, RECENT_SEARCH_LIST_SIZE } from './LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar';
|
|
10
10
|
export { sha1 } from './LinkPicker/HyperlinkAddToolbar/utils';
|
|
11
11
|
export { isLinkAtPos, isTextAtPos, getLinkPreferencesURLFromENV } from './utils';
|
|
12
|
-
export { stagingLinkPreferencesUrl, productionLinkPreferencesUrl } from './constants';
|
|
13
12
|
export { OverlayButton } from './ConfigureLinkOverlay';
|
package/dist/esm/link/utils.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { getATLContextUrl } from '@atlaskit/atlassian-context';
|
|
2
|
-
import {
|
|
3
|
-
import { linkPreferencesPath, productionLinkPreferencesUrl, stagingLinkPreferencesUrl } from './constants';
|
|
2
|
+
import { linkPreferencesPath } from './constants';
|
|
4
3
|
export function isTextAtPos(pos) {
|
|
5
4
|
return function (state) {
|
|
6
5
|
var node = state.doc.nodeAt(pos);
|
|
@@ -14,15 +13,5 @@ export function isLinkAtPos(pos) {
|
|
|
14
13
|
};
|
|
15
14
|
}
|
|
16
15
|
export var getLinkPreferencesURLFromENV = function getLinkPreferencesURLFromENV() {
|
|
17
|
-
|
|
18
|
-
return getATLContextUrl('id') + linkPreferencesPath;
|
|
19
|
-
}
|
|
20
|
-
if (process.env.NODE_ENV === 'production' && process.env.CLOUD_ENV === 'staging') {
|
|
21
|
-
// only a production CLOUD_ENV staging environment has a different link preferences URL
|
|
22
|
-
return stagingLinkPreferencesUrl;
|
|
23
|
-
} else if (process.env.NODE_ENV === 'production') {
|
|
24
|
-
return productionLinkPreferencesUrl;
|
|
25
|
-
} else {
|
|
26
|
-
return stagingLinkPreferencesUrl;
|
|
27
|
-
}
|
|
16
|
+
return getATLContextUrl('id') + linkPreferencesPath;
|
|
28
17
|
};
|
|
@@ -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 = "
|
|
10
|
+
var packageVersion = "86.0.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 = "
|
|
20
|
+
var packageVersion = "86.0.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,3 +1 @@
|
|
|
1
1
|
export declare const linkPreferencesPath = "/manage-profile/link-preferences";
|
|
2
|
-
export declare const stagingLinkPreferencesUrl = "https://id.stg.internal.atlassian.com/manage-profile/link-preferences";
|
|
3
|
-
export declare const productionLinkPreferencesUrl = "https://id.atlassian.com/manage-profile/link-preferences";
|
|
@@ -14,6 +14,5 @@ export type { Props as HyperlinkLinkAddToolbarProps } from './LinkPicker/Hyperli
|
|
|
14
14
|
export type { HyperlinkAddToolbarProps } from './LinkPicker/HyperlinkAddToolbar';
|
|
15
15
|
export { sha1 } from './LinkPicker/HyperlinkAddToolbar/utils';
|
|
16
16
|
export { isLinkAtPos, isTextAtPos, getLinkPreferencesURLFromENV } from './utils';
|
|
17
|
-
export { stagingLinkPreferencesUrl, productionLinkPreferencesUrl } from './constants';
|
|
18
17
|
export { OverlayButton } from './ConfigureLinkOverlay';
|
|
19
18
|
export type { OverlayButtonProps } from './ConfigureLinkOverlay';
|
|
@@ -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,3 +1 @@
|
|
|
1
1
|
export declare const linkPreferencesPath = "/manage-profile/link-preferences";
|
|
2
|
-
export declare const stagingLinkPreferencesUrl = "https://id.stg.internal.atlassian.com/manage-profile/link-preferences";
|
|
3
|
-
export declare const productionLinkPreferencesUrl = "https://id.atlassian.com/manage-profile/link-preferences";
|
|
@@ -14,6 +14,5 @@ export type { Props as HyperlinkLinkAddToolbarProps } from './LinkPicker/Hyperli
|
|
|
14
14
|
export type { HyperlinkAddToolbarProps } from './LinkPicker/HyperlinkAddToolbar';
|
|
15
15
|
export { sha1 } from './LinkPicker/HyperlinkAddToolbar/utils';
|
|
16
16
|
export { isLinkAtPos, isTextAtPos, getLinkPreferencesURLFromENV } from './utils';
|
|
17
|
-
export { stagingLinkPreferencesUrl, productionLinkPreferencesUrl } from './constants';
|
|
18
17
|
export { OverlayButton } from './ConfigureLinkOverlay';
|
|
19
18
|
export type { OverlayButtonProps } from './ConfigureLinkOverlay';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "86.0.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/"
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"@atlaskit/task-decision": "^17.10.0",
|
|
138
138
|
"@atlaskit/textfield": "^6.4.0",
|
|
139
139
|
"@atlaskit/theme": "^12.11.0",
|
|
140
|
-
"@atlaskit/tokens": "^1.
|
|
140
|
+
"@atlaskit/tokens": "^1.55.0",
|
|
141
141
|
"@atlaskit/tooltip": "^18.5.0",
|
|
142
142
|
"@atlaskit/ufo": "^0.2.0",
|
|
143
143
|
"@atlaskit/width-detector": "^4.2.0",
|
|
@@ -254,9 +254,6 @@
|
|
|
254
254
|
},
|
|
255
255
|
"platform.editor.review-text-highlighting-styling": {
|
|
256
256
|
"type": "boolean"
|
|
257
|
-
},
|
|
258
|
-
"platform.editor.linking-preferences-url-atlassian-context": {
|
|
259
|
-
"type": "boolean"
|
|
260
257
|
}
|
|
261
258
|
}
|
|
262
259
|
}
|