@atlaskit/editor-common 117.0.1 → 117.1.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 +19 -0
- package/dist/cjs/block-menu/getLocalIdSelector.js +2 -5
- package/dist/cjs/extensions/combine-extension-providers.js +30 -2
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/block-menu/getLocalIdSelector.js +2 -5
- package/dist/es2019/extensions/combine-extension-providers.js +14 -3
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/block-menu/getLocalIdSelector.js +2 -5
- package/dist/esm/extensions/combine-extension-providers.js +30 -2
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/extensions/combine-extension-providers.d.ts +7 -2
- package/package.json +6 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 117.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`bf4e41c29b4ea`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bf4e41c29b4ea) -
|
|
8
|
+
Add `migratedFrom` macro aliases for Connect-to-Forge rendering. Forge macro manifests can declare
|
|
9
|
+
`migratedFrom: ['legacy-connect-macro-key']`; consumers can use the new
|
|
10
|
+
`combineExtensionProviders(providers, { resolveExtension, resolvePreloadedExtension })` options to
|
|
11
|
+
resolve that alias before the normal provider lookup.
|
|
12
|
+
|
|
13
|
+
## 117.0.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [`72f7cec91a1d4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/72f7cec91a1d4) -
|
|
18
|
+
Remove the `platform_editor_block_menu_v2_patch_4` feature flag. Block menu local-id lookups now
|
|
19
|
+
always scope the query to the provided container.
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 117.0.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getLocalIdSelector = void 0;
|
|
7
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
7
|
var getLocalIdSelector = exports.getLocalIdSelector = function getLocalIdSelector(localId, container) {
|
|
9
8
|
// Check if the element with data-local-id exists
|
|
10
9
|
var element = container.querySelector("[data-local-id=\"".concat(localId, "\"]"));
|
|
@@ -25,10 +24,8 @@ var getLocalIdSelector = exports.getLocalIdSelector = function getLocalIdSelecto
|
|
|
25
24
|
// Special case for tables which use data-table-local-id
|
|
26
25
|
element = container.querySelector("[data-table-local-id=\"".concat(localId, "\"]"));
|
|
27
26
|
if (element) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
return element;
|
|
27
|
+
// return table wrapper instead of table div, so the height calculation is correct
|
|
28
|
+
return element.parentElement;
|
|
32
29
|
}
|
|
33
30
|
|
|
34
31
|
// Special case for extension, smart cards and media which use lowercase localid
|
|
@@ -13,9 +13,12 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
13
13
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
14
14
|
/**
|
|
15
15
|
* Allow to run methods from the `ExtensionProvider` interface across all providers seamlessly.
|
|
16
|
-
* This handles promise racing and
|
|
16
|
+
* This handles optional explicit resolution, promise racing, and safely discarded rejections.
|
|
17
17
|
*/
|
|
18
18
|
var _default = exports.default = function _default(extensionProviders) {
|
|
19
|
+
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
20
|
+
resolveExtension = _ref.resolveExtension,
|
|
21
|
+
resolvePreloadedExtension = _ref.resolvePreloadedExtension;
|
|
19
22
|
var providersCache = [];
|
|
20
23
|
var _combineProviders = (0, _providerHelpers.combineProviders)(extensionProviders),
|
|
21
24
|
invokeSingle = _combineProviders.invokeSingle,
|
|
@@ -53,6 +56,10 @@ var _default = exports.default = function _default(extensionProviders) {
|
|
|
53
56
|
}))();
|
|
54
57
|
},
|
|
55
58
|
getPreloadedExtension: function getPreloadedExtension(type, key) {
|
|
59
|
+
var resolvedExtension = resolvePreloadedExtension === null || resolvePreloadedExtension === void 0 ? void 0 : resolvePreloadedExtension(type, key);
|
|
60
|
+
if (resolvedExtension) {
|
|
61
|
+
return resolvedExtension;
|
|
62
|
+
}
|
|
56
63
|
if (providersCache.length === 0) {
|
|
57
64
|
// preload() has not been called yet
|
|
58
65
|
return;
|
|
@@ -82,7 +89,28 @@ var _default = exports.default = function _default(extensionProviders) {
|
|
|
82
89
|
}
|
|
83
90
|
},
|
|
84
91
|
getExtension: function getExtension(type, key) {
|
|
85
|
-
return
|
|
92
|
+
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
93
|
+
var resolvedExtension;
|
|
94
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
95
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
96
|
+
case 0:
|
|
97
|
+
_context2.next = 1;
|
|
98
|
+
return resolveExtension === null || resolveExtension === void 0 ? void 0 : resolveExtension(type, key);
|
|
99
|
+
case 1:
|
|
100
|
+
resolvedExtension = _context2.sent;
|
|
101
|
+
if (!resolvedExtension) {
|
|
102
|
+
_context2.next = 2;
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
return _context2.abrupt("return", resolvedExtension);
|
|
106
|
+
case 2:
|
|
107
|
+
return _context2.abrupt("return", invokeSingle('getExtension', [type, key]));
|
|
108
|
+
case 3:
|
|
109
|
+
case "end":
|
|
110
|
+
return _context2.stop();
|
|
111
|
+
}
|
|
112
|
+
}, _callee2);
|
|
113
|
+
}))();
|
|
86
114
|
},
|
|
87
115
|
search: function search(keyword) {
|
|
88
116
|
return invokeList('search', [keyword]);
|
|
@@ -28,7 +28,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
28
28
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
29
29
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
30
30
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
31
|
-
var packageVersion = "117.0.
|
|
31
|
+
var packageVersion = "117.0.2";
|
|
32
32
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
33
33
|
// Remove URL as it has UGC
|
|
34
34
|
// Ignored via go/ees007
|
|
@@ -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 = "117.0.
|
|
27
|
+
var packageVersion = "117.0.2";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
export const getLocalIdSelector = (localId, container) => {
|
|
3
2
|
// Check if the element with data-local-id exists
|
|
4
3
|
let element = container.querySelector(`[data-local-id="${localId}"]`);
|
|
@@ -19,10 +18,8 @@ export const getLocalIdSelector = (localId, container) => {
|
|
|
19
18
|
// Special case for tables which use data-table-local-id
|
|
20
19
|
element = container.querySelector(`[data-table-local-id="${localId}"]`);
|
|
21
20
|
if (element) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
return element;
|
|
21
|
+
// return table wrapper instead of table div, so the height calculation is correct
|
|
22
|
+
return element.parentElement;
|
|
26
23
|
}
|
|
27
24
|
|
|
28
25
|
// Special case for extension, smart cards and media which use lowercase localid
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { combineProviders } from '../provider-helpers';
|
|
2
2
|
/**
|
|
3
3
|
* Allow to run methods from the `ExtensionProvider` interface across all providers seamlessly.
|
|
4
|
-
* This handles promise racing and
|
|
4
|
+
* This handles optional explicit resolution, promise racing, and safely discarded rejections.
|
|
5
5
|
*/
|
|
6
|
-
export default (extensionProviders
|
|
6
|
+
export default ((extensionProviders, {
|
|
7
|
+
resolveExtension,
|
|
8
|
+
resolvePreloadedExtension
|
|
9
|
+
} = {}) => {
|
|
7
10
|
let providersCache = [];
|
|
8
11
|
const {
|
|
9
12
|
invokeSingle,
|
|
@@ -23,6 +26,10 @@ export default (extensionProviders => {
|
|
|
23
26
|
}));
|
|
24
27
|
},
|
|
25
28
|
getPreloadedExtension(type, key) {
|
|
29
|
+
const resolvedExtension = resolvePreloadedExtension === null || resolvePreloadedExtension === void 0 ? void 0 : resolvePreloadedExtension(type, key);
|
|
30
|
+
if (resolvedExtension) {
|
|
31
|
+
return resolvedExtension;
|
|
32
|
+
}
|
|
26
33
|
if (providersCache.length === 0) {
|
|
27
34
|
// preload() has not been called yet
|
|
28
35
|
return;
|
|
@@ -42,7 +49,11 @@ export default (extensionProviders => {
|
|
|
42
49
|
}
|
|
43
50
|
}
|
|
44
51
|
},
|
|
45
|
-
getExtension(type, key) {
|
|
52
|
+
async getExtension(type, key) {
|
|
53
|
+
const resolvedExtension = await (resolveExtension === null || resolveExtension === void 0 ? void 0 : resolveExtension(type, key));
|
|
54
|
+
if (resolvedExtension) {
|
|
55
|
+
return resolvedExtension;
|
|
56
|
+
}
|
|
46
57
|
return invokeSingle('getExtension', [type, key]);
|
|
47
58
|
},
|
|
48
59
|
search(keyword) {
|
|
@@ -14,7 +14,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
14
14
|
const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
15
15
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
16
16
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
17
|
-
const packageVersion = "117.0.
|
|
17
|
+
const packageVersion = "117.0.2";
|
|
18
18
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
19
19
|
// Remove URL as it has UGC
|
|
20
20
|
// Ignored via go/ees007
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "117.0.
|
|
17
|
+
const packageVersion = "117.0.2";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
export var getLocalIdSelector = function getLocalIdSelector(localId, container) {
|
|
3
2
|
// Check if the element with data-local-id exists
|
|
4
3
|
var element = container.querySelector("[data-local-id=\"".concat(localId, "\"]"));
|
|
@@ -19,10 +18,8 @@ export var getLocalIdSelector = function getLocalIdSelector(localId, container)
|
|
|
19
18
|
// Special case for tables which use data-table-local-id
|
|
20
19
|
element = container.querySelector("[data-table-local-id=\"".concat(localId, "\"]"));
|
|
21
20
|
if (element) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
return element;
|
|
21
|
+
// return table wrapper instead of table div, so the height calculation is correct
|
|
22
|
+
return element.parentElement;
|
|
26
23
|
}
|
|
27
24
|
|
|
28
25
|
// Special case for extension, smart cards and media which use lowercase localid
|
|
@@ -6,9 +6,12 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
6
6
|
import { combineProviders } from '../provider-helpers';
|
|
7
7
|
/**
|
|
8
8
|
* Allow to run methods from the `ExtensionProvider` interface across all providers seamlessly.
|
|
9
|
-
* This handles promise racing and
|
|
9
|
+
* This handles optional explicit resolution, promise racing, and safely discarded rejections.
|
|
10
10
|
*/
|
|
11
11
|
export default (function (extensionProviders) {
|
|
12
|
+
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
13
|
+
resolveExtension = _ref.resolveExtension,
|
|
14
|
+
resolvePreloadedExtension = _ref.resolvePreloadedExtension;
|
|
12
15
|
var providersCache = [];
|
|
13
16
|
var _combineProviders = combineProviders(extensionProviders),
|
|
14
17
|
invokeSingle = _combineProviders.invokeSingle,
|
|
@@ -46,6 +49,10 @@ export default (function (extensionProviders) {
|
|
|
46
49
|
}))();
|
|
47
50
|
},
|
|
48
51
|
getPreloadedExtension: function getPreloadedExtension(type, key) {
|
|
52
|
+
var resolvedExtension = resolvePreloadedExtension === null || resolvePreloadedExtension === void 0 ? void 0 : resolvePreloadedExtension(type, key);
|
|
53
|
+
if (resolvedExtension) {
|
|
54
|
+
return resolvedExtension;
|
|
55
|
+
}
|
|
49
56
|
if (providersCache.length === 0) {
|
|
50
57
|
// preload() has not been called yet
|
|
51
58
|
return;
|
|
@@ -75,7 +82,28 @@ export default (function (extensionProviders) {
|
|
|
75
82
|
}
|
|
76
83
|
},
|
|
77
84
|
getExtension: function getExtension(type, key) {
|
|
78
|
-
return
|
|
85
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
86
|
+
var resolvedExtension;
|
|
87
|
+
return _regeneratorRuntime.wrap(function (_context2) {
|
|
88
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
89
|
+
case 0:
|
|
90
|
+
_context2.next = 1;
|
|
91
|
+
return resolveExtension === null || resolveExtension === void 0 ? void 0 : resolveExtension(type, key);
|
|
92
|
+
case 1:
|
|
93
|
+
resolvedExtension = _context2.sent;
|
|
94
|
+
if (!resolvedExtension) {
|
|
95
|
+
_context2.next = 2;
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
return _context2.abrupt("return", resolvedExtension);
|
|
99
|
+
case 2:
|
|
100
|
+
return _context2.abrupt("return", invokeSingle('getExtension', [type, key]));
|
|
101
|
+
case 3:
|
|
102
|
+
case "end":
|
|
103
|
+
return _context2.stop();
|
|
104
|
+
}
|
|
105
|
+
}, _callee2);
|
|
106
|
+
}))();
|
|
79
107
|
},
|
|
80
108
|
search: function search(keyword) {
|
|
81
109
|
return invokeList('search', [keyword]);
|
|
@@ -20,7 +20,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
20
20
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
21
21
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
22
22
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
23
|
-
var packageVersion = "117.0.
|
|
23
|
+
var packageVersion = "117.0.2";
|
|
24
24
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
25
25
|
// Remove URL as it has UGC
|
|
26
26
|
// Ignored via go/ees007
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "117.0.
|
|
24
|
+
var packageVersion = "117.0.2";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import type { ExtensionKey, ExtensionManifest, ExtensionType } from './types/extension-manifest';
|
|
1
2
|
import type { ExtensionProvider } from './types/extension-provider';
|
|
3
|
+
type CombineExtensionProvidersOptions = {
|
|
4
|
+
resolveExtension?: (type: ExtensionType, key: ExtensionKey) => Promise<ExtensionManifest | undefined>;
|
|
5
|
+
resolvePreloadedExtension?: (type: ExtensionType, key: ExtensionKey) => ExtensionManifest | undefined;
|
|
6
|
+
};
|
|
2
7
|
export default _default;
|
|
3
8
|
/**
|
|
4
9
|
* Allow to run methods from the `ExtensionProvider` interface across all providers seamlessly.
|
|
5
|
-
* This handles promise racing and
|
|
10
|
+
* This handles optional explicit resolution, promise racing, and safely discarded rejections.
|
|
6
11
|
*/
|
|
7
|
-
declare function _default(extensionProviders: (ExtensionProvider | Promise<ExtensionProvider>)[]): ExtensionProvider;
|
|
12
|
+
declare function _default(extensionProviders: (ExtensionProvider | Promise<ExtensionProvider>)[], { resolveExtension, resolvePreloadedExtension }?: CombineExtensionProvidersOptions): ExtensionProvider;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "117.0
|
|
3
|
+
"version": "117.1.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/"
|
|
@@ -70,20 +70,20 @@
|
|
|
70
70
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
71
71
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
72
72
|
"@atlaskit/platform-feature-flags-react": "^1.1.0",
|
|
73
|
-
"@atlaskit/popper": "^
|
|
73
|
+
"@atlaskit/popper": "^9.0.0",
|
|
74
74
|
"@atlaskit/primitives": "^22.2.0",
|
|
75
75
|
"@atlaskit/profilecard": "^26.14.0",
|
|
76
76
|
"@atlaskit/prosemirror-history": "^1.1.0",
|
|
77
77
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
78
78
|
"@atlaskit/react-ufo": "^7.3.0",
|
|
79
|
-
"@atlaskit/section-message": "^
|
|
80
|
-
"@atlaskit/smart-card": "^45.
|
|
79
|
+
"@atlaskit/section-message": "^10.0.0",
|
|
80
|
+
"@atlaskit/smart-card": "^45.17.0",
|
|
81
81
|
"@atlaskit/smart-user-picker": "^11.3.0",
|
|
82
82
|
"@atlaskit/spinner": "^20.1.0",
|
|
83
83
|
"@atlaskit/task-decision": "^21.8.0",
|
|
84
84
|
"@atlaskit/teams-app-config": "^2.1.0",
|
|
85
|
-
"@atlaskit/textfield": "^
|
|
86
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
85
|
+
"@atlaskit/textfield": "^10.0.0",
|
|
86
|
+
"@atlaskit/tmp-editor-statsig": "^139.0.0",
|
|
87
87
|
"@atlaskit/tokens": "^16.3.0",
|
|
88
88
|
"@atlaskit/tooltip": "^24.0.0",
|
|
89
89
|
"@atlaskit/width-detector": "^6.2.0",
|
|
@@ -232,9 +232,6 @@
|
|
|
232
232
|
"platform_editor_native_anchor_patch_3": {
|
|
233
233
|
"type": "boolean"
|
|
234
234
|
},
|
|
235
|
-
"platform_editor_block_menu_v2_patch_4": {
|
|
236
|
-
"type": "boolean"
|
|
237
|
-
},
|
|
238
235
|
"jim-lower-ranking-in-jira-macro-search": {
|
|
239
236
|
"type": "boolean"
|
|
240
237
|
},
|