@atlaskit/editor-common 93.2.3 → 93.2.5
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 +15 -0
- package/dist/cjs/keymaps/index.js +2 -2
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/index.js +7 -0
- package/dist/cjs/utils/withFeatureFlaggedComponent.js +20 -0
- package/dist/es2019/keymaps/index.js +2 -2
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/utils/index.js +2 -1
- package/dist/es2019/utils/withFeatureFlaggedComponent.js +14 -0
- package/dist/esm/keymaps/index.js +2 -2
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/index.js +2 -1
- package/dist/esm/utils/withFeatureFlaggedComponent.js +14 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/withFeatureFlaggedComponent.d.ts +9 -0
- package/dist/types-ts4.5/utils/index.d.ts +1 -0
- package/dist/types-ts4.5/utils/withFeatureFlaggedComponent.d.ts +9 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 93.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3bfc9e68e4668`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3bfc9e68e4668) -
|
|
8
|
+
add a helper to switch component based on feature flag value
|
|
9
|
+
|
|
10
|
+
## 93.2.4
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#149764](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/149764)
|
|
15
|
+
[`f6226757e21b9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f6226757e21b9) -
|
|
16
|
+
Change move left/right shortcut for nested nodes
|
|
17
|
+
|
|
3
18
|
## 93.2.3
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -214,8 +214,8 @@ var toggleHighlightPalette = exports.toggleHighlightPalette = makeKeyMapWithComm
|
|
|
214
214
|
var focusToContextMenuTrigger = exports.focusToContextMenuTrigger = makeKeyMapWithCommon('Focus table context menu trigger', 'Shift-F10');
|
|
215
215
|
var dragToMoveUp = exports.dragToMoveUp = makeKeyMapWithCommon('Move node up in the document', 'Ctrl-Shift-ArrowUp');
|
|
216
216
|
var dragToMoveDown = exports.dragToMoveDown = makeKeyMapWithCommon('Move node down in the document', 'Ctrl-Shift-ArrowDown');
|
|
217
|
-
var dragToMoveLeft = exports.dragToMoveLeft = makeKeyMapWithCommon('Move node to the left column in the document', '
|
|
218
|
-
var dragToMoveRight = exports.dragToMoveRight = makeKeyMapWithCommon('Move node to the right column in the document', '
|
|
217
|
+
var dragToMoveLeft = exports.dragToMoveLeft = makeKeyMapWithCommon('Move node to the left column in the document', 'Ctrl-Shift-Alt-ArrowLeft');
|
|
218
|
+
var dragToMoveRight = exports.dragToMoveRight = makeKeyMapWithCommon('Move node to the right column in the document', 'Ctrl-Shift-Alt-ArrowRight');
|
|
219
219
|
var showElementDragHandle = exports.showElementDragHandle = makeKeyMapWithCommon('Show drag handle for editor element', 'Ctrl-Shift-h');
|
|
220
220
|
var continueInRovoChat = exports.continueInRovoChat = makeKeyMapWithCommon('Continue in Rovo chat', 'Alt-Enter');
|
|
221
221
|
var arrowKeysMap = {
|
|
@@ -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 && {}.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 = "93.2.
|
|
20
|
+
var packageVersion = "93.2.5";
|
|
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
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "93.2.
|
|
27
|
+
var packageVersion = "93.2.5";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -1118,6 +1118,12 @@ Object.defineProperty(exports, "walkUpTreeUntil", {
|
|
|
1118
1118
|
return _dom.walkUpTreeUntil;
|
|
1119
1119
|
}
|
|
1120
1120
|
});
|
|
1121
|
+
Object.defineProperty(exports, "withFeatureFlaggedComponent", {
|
|
1122
|
+
enumerable: true,
|
|
1123
|
+
get: function get() {
|
|
1124
|
+
return _withFeatureFlaggedComponent.withFeatureFlaggedComponent;
|
|
1125
|
+
}
|
|
1126
|
+
});
|
|
1121
1127
|
Object.defineProperty(exports, "withImageLoader", {
|
|
1122
1128
|
enumerable: true,
|
|
1123
1129
|
get: function get() {
|
|
@@ -1190,6 +1196,7 @@ var _wrapSelectionIn = require("./wrap-selection-in");
|
|
|
1190
1196
|
var _calculateToolbarPosition = require("./calculate-toolbar-position");
|
|
1191
1197
|
var _nodesByLocalIds = require("./nodes-by-localIds");
|
|
1192
1198
|
var _pageElementCounts = require("./page-element-counts");
|
|
1199
|
+
var _withFeatureFlaggedComponent = require("./withFeatureFlaggedComponent");
|
|
1193
1200
|
/**
|
|
1194
1201
|
* @private
|
|
1195
1202
|
* @deprecated
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.withFeatureFlaggedComponent = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
/**
|
|
10
|
+
* This function is used to switch between two components based on a feature flag
|
|
11
|
+
* @param ComponentOld
|
|
12
|
+
* @param ComponentNext
|
|
13
|
+
* @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('platform_editor_react18_phase2')
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
var withFeatureFlaggedComponent = exports.withFeatureFlaggedComponent = function withFeatureFlaggedComponent(ComponentOld, ComponentNext, featureFlagFn) {
|
|
17
|
+
return function (props) {
|
|
18
|
+
return featureFlagFn() ? /*#__PURE__*/_react.default.createElement(ComponentNext, props) : /*#__PURE__*/_react.default.createElement(ComponentOld, props);
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -100,8 +100,8 @@ export const toggleHighlightPalette = makeKeyMapWithCommon('Toggle Highlight Pal
|
|
|
100
100
|
export const focusToContextMenuTrigger = makeKeyMapWithCommon('Focus table context menu trigger', 'Shift-F10');
|
|
101
101
|
export const dragToMoveUp = makeKeyMapWithCommon('Move node up in the document', 'Ctrl-Shift-ArrowUp');
|
|
102
102
|
export const dragToMoveDown = makeKeyMapWithCommon('Move node down in the document', 'Ctrl-Shift-ArrowDown');
|
|
103
|
-
export const dragToMoveLeft = makeKeyMapWithCommon('Move node to the left column in the document', '
|
|
104
|
-
export const dragToMoveRight = makeKeyMapWithCommon('Move node to the right column in the document', '
|
|
103
|
+
export const dragToMoveLeft = makeKeyMapWithCommon('Move node to the left column in the document', 'Ctrl-Shift-Alt-ArrowLeft');
|
|
104
|
+
export const dragToMoveRight = makeKeyMapWithCommon('Move node to the right column in the document', 'Ctrl-Shift-Alt-ArrowRight');
|
|
105
105
|
export const showElementDragHandle = makeKeyMapWithCommon('Show drag handle for editor element', 'Ctrl-Shift-h');
|
|
106
106
|
export const continueInRovoChat = makeKeyMapWithCommon('Continue in Rovo chat', 'Alt-Enter');
|
|
107
107
|
const arrowKeysMap = {
|
|
@@ -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 = "93.2.
|
|
4
|
+
const packageVersion = "93.2.5";
|
|
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
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "93.2.
|
|
16
|
+
const packageVersion = "93.2.5";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
class DropList extends Component {
|
|
@@ -348,4 +348,5 @@ export { wrapSelectionIn } from './wrap-selection-in';
|
|
|
348
348
|
export { toJSON, nodeToJSON } from './nodes';
|
|
349
349
|
export { calculateToolbarPositionAboveSelection, calculateToolbarPositionTrackHead } from './calculate-toolbar-position';
|
|
350
350
|
export { findNodePosByLocalIds } from './nodes-by-localIds';
|
|
351
|
-
export { getPageElementCounts } from './page-element-counts';
|
|
351
|
+
export { getPageElementCounts } from './page-element-counts';
|
|
352
|
+
export { withFeatureFlaggedComponent } from './withFeatureFlaggedComponent';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This function is used to switch between two components based on a feature flag
|
|
5
|
+
* @param ComponentOld
|
|
6
|
+
* @param ComponentNext
|
|
7
|
+
* @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('platform_editor_react18_phase2')
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export const withFeatureFlaggedComponent = (ComponentOld, ComponentNext, featureFlagFn) => {
|
|
11
|
+
return props => {
|
|
12
|
+
return featureFlagFn() ? /*#__PURE__*/React.createElement(ComponentNext, props) : /*#__PURE__*/React.createElement(ComponentOld, props);
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -101,8 +101,8 @@ export var toggleHighlightPalette = makeKeyMapWithCommon('Toggle Highlight Palet
|
|
|
101
101
|
export var focusToContextMenuTrigger = makeKeyMapWithCommon('Focus table context menu trigger', 'Shift-F10');
|
|
102
102
|
export var dragToMoveUp = makeKeyMapWithCommon('Move node up in the document', 'Ctrl-Shift-ArrowUp');
|
|
103
103
|
export var dragToMoveDown = makeKeyMapWithCommon('Move node down in the document', 'Ctrl-Shift-ArrowDown');
|
|
104
|
-
export var dragToMoveLeft = makeKeyMapWithCommon('Move node to the left column in the document', '
|
|
105
|
-
export var dragToMoveRight = makeKeyMapWithCommon('Move node to the right column in the document', '
|
|
104
|
+
export var dragToMoveLeft = makeKeyMapWithCommon('Move node to the left column in the document', 'Ctrl-Shift-Alt-ArrowLeft');
|
|
105
|
+
export var dragToMoveRight = makeKeyMapWithCommon('Move node to the right column in the document', 'Ctrl-Shift-Alt-ArrowRight');
|
|
106
106
|
export var showElementDragHandle = makeKeyMapWithCommon('Show drag handle for editor element', 'Ctrl-Shift-h');
|
|
107
107
|
export var continueInRovoChat = makeKeyMapWithCommon('Continue in Rovo chat', 'Alt-Enter');
|
|
108
108
|
var arrowKeysMap = {
|
|
@@ -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 = "93.2.
|
|
10
|
+
var packageVersion = "93.2.5";
|
|
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
|
|
@@ -21,7 +21,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
21
21
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "93.2.
|
|
24
|
+
var packageVersion = "93.2.5";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var DropList = /*#__PURE__*/function (_Component) {
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -351,4 +351,5 @@ export { wrapSelectionIn } from './wrap-selection-in';
|
|
|
351
351
|
export { toJSON, nodeToJSON } from './nodes';
|
|
352
352
|
export { calculateToolbarPositionAboveSelection, calculateToolbarPositionTrackHead } from './calculate-toolbar-position';
|
|
353
353
|
export { findNodePosByLocalIds } from './nodes-by-localIds';
|
|
354
|
-
export { getPageElementCounts } from './page-element-counts';
|
|
354
|
+
export { getPageElementCounts } from './page-element-counts';
|
|
355
|
+
export { withFeatureFlaggedComponent } from './withFeatureFlaggedComponent';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This function is used to switch between two components based on a feature flag
|
|
5
|
+
* @param ComponentOld
|
|
6
|
+
* @param ComponentNext
|
|
7
|
+
* @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('platform_editor_react18_phase2')
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export var withFeatureFlaggedComponent = function withFeatureFlaggedComponent(ComponentOld, ComponentNext, featureFlagFn) {
|
|
11
|
+
return function (props) {
|
|
12
|
+
return featureFlagFn() ? /*#__PURE__*/React.createElement(ComponentNext, props) : /*#__PURE__*/React.createElement(ComponentOld, props);
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -214,3 +214,4 @@ export { toJSON, nodeToJSON } from './nodes';
|
|
|
214
214
|
export { calculateToolbarPositionAboveSelection, calculateToolbarPositionTrackHead, } from './calculate-toolbar-position';
|
|
215
215
|
export { findNodePosByLocalIds } from './nodes-by-localIds';
|
|
216
216
|
export { getPageElementCounts } from './page-element-counts';
|
|
217
|
+
export { withFeatureFlaggedComponent } from './withFeatureFlaggedComponent';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* This function is used to switch between two components based on a feature flag
|
|
4
|
+
* @param ComponentOld
|
|
5
|
+
* @param ComponentNext
|
|
6
|
+
* @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('platform_editor_react18_phase2')
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare const withFeatureFlaggedComponent: <P extends object>(ComponentOld: React.ComponentType<P>, ComponentNext: React.ComponentType<P>, featureFlagFn: () => boolean) => (props: P) => JSX.Element;
|
|
@@ -214,3 +214,4 @@ export { toJSON, nodeToJSON } from './nodes';
|
|
|
214
214
|
export { calculateToolbarPositionAboveSelection, calculateToolbarPositionTrackHead, } from './calculate-toolbar-position';
|
|
215
215
|
export { findNodePosByLocalIds } from './nodes-by-localIds';
|
|
216
216
|
export { getPageElementCounts } from './page-element-counts';
|
|
217
|
+
export { withFeatureFlaggedComponent } from './withFeatureFlaggedComponent';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* This function is used to switch between two components based on a feature flag
|
|
4
|
+
* @param ComponentOld
|
|
5
|
+
* @param ComponentNext
|
|
6
|
+
* @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('platform_editor_react18_phase2')
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare const withFeatureFlaggedComponent: <P extends object>(ComponentOld: React.ComponentType<P>, ComponentNext: React.ComponentType<P>, featureFlagFn: () => boolean) => (props: P) => JSX.Element;
|
package/package.json
CHANGED