@atlaskit/editor-common 112.11.3 → 112.12.1
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 +18 -0
- package/dist/cjs/block-menu/scroll-to-block-utils.js +19 -22
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/block-menu/scroll-to-block-utils.js +17 -20
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/block-menu/scroll-to-block-utils.js +19 -19
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/index.d.ts +1 -1
- package/dist/types/analytics/types/ai-unified-events.d.ts +1 -0
- package/dist/types/block-menu/scroll-to-block-utils.d.ts +1 -1
- package/dist/types-ts4.5/analytics/index.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/ai-unified-events.d.ts +1 -0
- package/dist/types-ts4.5/block-menu/scroll-to-block-utils.d.ts +1 -1
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 112.12.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`13ec7df78a017`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/13ec7df78a017) -
|
|
8
|
+
Editor-5664: Fix scroll position for block links
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 112.12.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`ebcd63b75ef4c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ebcd63b75ef4c) -
|
|
16
|
+
Added handling of ACTION_PUBLIC_METADATA stream action type in AI Mate packages. Sending message
|
|
17
|
+
to bridge when action in ACTION_PUBLIC_METADATA. Handled meta data action in editor rovo bridge
|
|
18
|
+
part of ConfluenceUpdatePageCommand. Updated ai streaming orchestrator and editor-plugin-ai to
|
|
19
|
+
send promptVersion received in metadata to analytics events.
|
|
20
|
+
|
|
3
21
|
## 112.11.3
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -8,14 +8,13 @@ exports.expandElement = exports.expandAllParentsThenScroll = exports.SCROLL_TO_B
|
|
|
8
8
|
exports.findNodeWithExpandParents = findNodeWithExpandParents;
|
|
9
9
|
exports.isExpandCollapsed = exports.getLocalIdSelector = exports.findParentExpands = void 0;
|
|
10
10
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
12
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
12
13
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
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
|
+
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; } /**
|
|
15
15
|
* Shared utilities for scrolling to block elements with expand node support.
|
|
16
16
|
* Used by both Confluence's useScrollOnUrlChange and platform renderer's useScrollToBlock.
|
|
17
17
|
*/
|
|
18
|
-
|
|
19
18
|
/**
|
|
20
19
|
* Timing constants for expand animation and DOM update delays.
|
|
21
20
|
* These values are tuned for the expand component's behavior and React's update cycle.
|
|
@@ -195,10 +194,17 @@ var expandElement = exports.expandElement = function expandElement(expandContain
|
|
|
195
194
|
*/
|
|
196
195
|
var _expandAllParentsThenScroll = exports.expandAllParentsThenScroll = function expandAllParentsThenScroll(element) {
|
|
197
196
|
var attempt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
197
|
+
var scrollFn = arguments.length > 2 ? arguments[2] : undefined;
|
|
198
198
|
var MAX_EXPAND_DEPTH = SCROLL_TO_BLOCK_TIMING.MAX_EXPAND_DEPTH,
|
|
199
199
|
MAX_ATTEMPTS = SCROLL_TO_BLOCK_TIMING.MAX_ATTEMPTS,
|
|
200
200
|
DOM_UPDATE_DELAY = SCROLL_TO_BLOCK_TIMING.DOM_UPDATE_DELAY,
|
|
201
201
|
RETRY_DELAY = SCROLL_TO_BLOCK_TIMING.RETRY_DELAY;
|
|
202
|
+
var doScroll = scrollFn !== null && scrollFn !== void 0 ? scrollFn : function (el) {
|
|
203
|
+
return el.scrollIntoView({
|
|
204
|
+
behavior: 'smooth',
|
|
205
|
+
block: 'center'
|
|
206
|
+
});
|
|
207
|
+
};
|
|
202
208
|
|
|
203
209
|
// Store timeout ID and nested cleanup function so they can be cancelled.
|
|
204
210
|
var timeoutId = null;
|
|
@@ -220,10 +226,7 @@ var _expandAllParentsThenScroll = exports.expandAllParentsThenScroll = function
|
|
|
220
226
|
if (attempt >= MAX_ATTEMPTS || !element.isConnected) {
|
|
221
227
|
// Max attempts reached or element disconnected, scroll anyway.
|
|
222
228
|
if (element.isConnected) {
|
|
223
|
-
element
|
|
224
|
-
behavior: 'smooth',
|
|
225
|
-
block: 'center'
|
|
226
|
-
});
|
|
229
|
+
doScroll(element);
|
|
227
230
|
}
|
|
228
231
|
return cleanup;
|
|
229
232
|
}
|
|
@@ -237,10 +240,7 @@ var _expandAllParentsThenScroll = exports.expandAllParentsThenScroll = function
|
|
|
237
240
|
});
|
|
238
241
|
if (collapsedExpands.length === 0) {
|
|
239
242
|
// All expands are open (or there are no expands), scroll to element.
|
|
240
|
-
element
|
|
241
|
-
behavior: 'smooth',
|
|
242
|
-
block: 'center'
|
|
243
|
-
});
|
|
243
|
+
doScroll(element);
|
|
244
244
|
return cleanup;
|
|
245
245
|
}
|
|
246
246
|
|
|
@@ -260,14 +260,11 @@ var _expandAllParentsThenScroll = exports.expandAllParentsThenScroll = function
|
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
// Recurse to handle any nested collapsed expands or retry if still collapsed.
|
|
263
|
-
nestedCleanup = _expandAllParentsThenScroll(element, attempt + 1);
|
|
263
|
+
nestedCleanup = _expandAllParentsThenScroll(element, attempt + 1, scrollFn);
|
|
264
264
|
} catch (_unused) {
|
|
265
265
|
// Fallback to simple scroll on error.
|
|
266
266
|
if (element.isConnected) {
|
|
267
|
-
element
|
|
268
|
-
behavior: 'smooth',
|
|
269
|
-
block: 'center'
|
|
270
|
-
});
|
|
267
|
+
doScroll(element);
|
|
271
268
|
}
|
|
272
269
|
}
|
|
273
270
|
}, DOM_UPDATE_DELAY);
|
|
@@ -275,7 +272,7 @@ var _expandAllParentsThenScroll = exports.expandAllParentsThenScroll = function
|
|
|
275
272
|
// Failed to expand, retry with longer delay.
|
|
276
273
|
timeoutId = setTimeout(function () {
|
|
277
274
|
if (element.isConnected) {
|
|
278
|
-
nestedCleanup = _expandAllParentsThenScroll(element, attempt + 1);
|
|
275
|
+
nestedCleanup = _expandAllParentsThenScroll(element, attempt + 1, scrollFn);
|
|
279
276
|
}
|
|
280
277
|
}, RETRY_DELAY);
|
|
281
278
|
}
|
|
@@ -283,17 +280,14 @@ var _expandAllParentsThenScroll = exports.expandAllParentsThenScroll = function
|
|
|
283
280
|
// Retry on error.
|
|
284
281
|
timeoutId = setTimeout(function () {
|
|
285
282
|
if (element.isConnected) {
|
|
286
|
-
nestedCleanup = _expandAllParentsThenScroll(element, attempt + 1);
|
|
283
|
+
nestedCleanup = _expandAllParentsThenScroll(element, attempt + 1, scrollFn);
|
|
287
284
|
}
|
|
288
285
|
}, RETRY_DELAY);
|
|
289
286
|
}
|
|
290
287
|
} catch (_unused3) {
|
|
291
288
|
// Fallback to simple scroll on error.
|
|
292
289
|
if (element.isConnected) {
|
|
293
|
-
element
|
|
294
|
-
behavior: 'smooth',
|
|
295
|
-
block: 'center'
|
|
296
|
-
});
|
|
290
|
+
doScroll(element);
|
|
297
291
|
}
|
|
298
292
|
}
|
|
299
293
|
return cleanup;
|
|
@@ -318,6 +312,9 @@ var getLocalIdSelector = exports.getLocalIdSelector = function getLocalIdSelecto
|
|
|
318
312
|
// Special case for tables which use data-table-local-id
|
|
319
313
|
element = container.querySelector("[data-table-local-id=\"".concat(localId, "\"]"));
|
|
320
314
|
if (element) {
|
|
315
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_4')) {
|
|
316
|
+
return element.parentElement; // return table wrapper instead of table div, so the height calculation is correct
|
|
317
|
+
}
|
|
321
318
|
return element;
|
|
322
319
|
}
|
|
323
320
|
|
|
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
19
19
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
20
20
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
21
21
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
22
|
-
var packageVersion = "
|
|
22
|
+
var packageVersion = "0.0.0-development";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// 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 = "
|
|
27
|
+
var packageVersion = "0.0.0-development";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* Used by both Confluence's useScrollOnUrlChange and platform renderer's useScrollToBlock.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
|
|
6
8
|
/**
|
|
7
9
|
* Timing constants for expand animation and DOM update delays.
|
|
8
10
|
* These values are tuned for the expand component's behavior and React's update cycle.
|
|
@@ -170,13 +172,17 @@ export const expandElement = expandContainer => {
|
|
|
170
172
|
* @returns A cleanup function that cancels any pending timeouts. Call this when the operation
|
|
171
173
|
* should be aborted (e.g., component unmount, navigation, or new scroll request).
|
|
172
174
|
*/
|
|
173
|
-
export const expandAllParentsThenScroll = (element, attempt = 0) => {
|
|
175
|
+
export const expandAllParentsThenScroll = (element, attempt = 0, scrollFn) => {
|
|
174
176
|
const {
|
|
175
177
|
MAX_EXPAND_DEPTH,
|
|
176
178
|
MAX_ATTEMPTS,
|
|
177
179
|
DOM_UPDATE_DELAY,
|
|
178
180
|
RETRY_DELAY
|
|
179
181
|
} = SCROLL_TO_BLOCK_TIMING;
|
|
182
|
+
const doScroll = scrollFn !== null && scrollFn !== void 0 ? scrollFn : el => el.scrollIntoView({
|
|
183
|
+
behavior: 'smooth',
|
|
184
|
+
block: 'center'
|
|
185
|
+
});
|
|
180
186
|
|
|
181
187
|
// Store timeout ID and nested cleanup function so they can be cancelled.
|
|
182
188
|
let timeoutId = null;
|
|
@@ -198,10 +204,7 @@ export const expandAllParentsThenScroll = (element, attempt = 0) => {
|
|
|
198
204
|
if (attempt >= MAX_ATTEMPTS || !element.isConnected) {
|
|
199
205
|
// Max attempts reached or element disconnected, scroll anyway.
|
|
200
206
|
if (element.isConnected) {
|
|
201
|
-
element
|
|
202
|
-
behavior: 'smooth',
|
|
203
|
-
block: 'center'
|
|
204
|
-
});
|
|
207
|
+
doScroll(element);
|
|
205
208
|
}
|
|
206
209
|
return cleanup;
|
|
207
210
|
}
|
|
@@ -213,10 +216,7 @@ export const expandAllParentsThenScroll = (element, attempt = 0) => {
|
|
|
213
216
|
const collapsedExpands = parentExpands.filter(expandContainer => expandContainer.isConnected && isExpandCollapsed(expandContainer));
|
|
214
217
|
if (collapsedExpands.length === 0) {
|
|
215
218
|
// All expands are open (or there are no expands), scroll to element.
|
|
216
|
-
element
|
|
217
|
-
behavior: 'smooth',
|
|
218
|
-
block: 'center'
|
|
219
|
-
});
|
|
219
|
+
doScroll(element);
|
|
220
220
|
return cleanup;
|
|
221
221
|
}
|
|
222
222
|
|
|
@@ -236,14 +236,11 @@ export const expandAllParentsThenScroll = (element, attempt = 0) => {
|
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
// Recurse to handle any nested collapsed expands or retry if still collapsed.
|
|
239
|
-
nestedCleanup = expandAllParentsThenScroll(element, attempt + 1);
|
|
239
|
+
nestedCleanup = expandAllParentsThenScroll(element, attempt + 1, scrollFn);
|
|
240
240
|
} catch {
|
|
241
241
|
// Fallback to simple scroll on error.
|
|
242
242
|
if (element.isConnected) {
|
|
243
|
-
element
|
|
244
|
-
behavior: 'smooth',
|
|
245
|
-
block: 'center'
|
|
246
|
-
});
|
|
243
|
+
doScroll(element);
|
|
247
244
|
}
|
|
248
245
|
}
|
|
249
246
|
}, DOM_UPDATE_DELAY);
|
|
@@ -251,7 +248,7 @@ export const expandAllParentsThenScroll = (element, attempt = 0) => {
|
|
|
251
248
|
// Failed to expand, retry with longer delay.
|
|
252
249
|
timeoutId = setTimeout(() => {
|
|
253
250
|
if (element.isConnected) {
|
|
254
|
-
nestedCleanup = expandAllParentsThenScroll(element, attempt + 1);
|
|
251
|
+
nestedCleanup = expandAllParentsThenScroll(element, attempt + 1, scrollFn);
|
|
255
252
|
}
|
|
256
253
|
}, RETRY_DELAY);
|
|
257
254
|
}
|
|
@@ -259,17 +256,14 @@ export const expandAllParentsThenScroll = (element, attempt = 0) => {
|
|
|
259
256
|
// Retry on error.
|
|
260
257
|
timeoutId = setTimeout(() => {
|
|
261
258
|
if (element.isConnected) {
|
|
262
|
-
nestedCleanup = expandAllParentsThenScroll(element, attempt + 1);
|
|
259
|
+
nestedCleanup = expandAllParentsThenScroll(element, attempt + 1, scrollFn);
|
|
263
260
|
}
|
|
264
261
|
}, RETRY_DELAY);
|
|
265
262
|
}
|
|
266
263
|
} catch {
|
|
267
264
|
// Fallback to simple scroll on error.
|
|
268
265
|
if (element.isConnected) {
|
|
269
|
-
element
|
|
270
|
-
behavior: 'smooth',
|
|
271
|
-
block: 'center'
|
|
272
|
-
});
|
|
266
|
+
doScroll(element);
|
|
273
267
|
}
|
|
274
268
|
}
|
|
275
269
|
return cleanup;
|
|
@@ -294,6 +288,9 @@ export const getLocalIdSelector = (localId, container) => {
|
|
|
294
288
|
// Special case for tables which use data-table-local-id
|
|
295
289
|
element = container.querySelector(`[data-table-local-id="${localId}"]`);
|
|
296
290
|
if (element) {
|
|
291
|
+
if (fg('platform_editor_block_menu_v2_patch_4')) {
|
|
292
|
+
return element.parentElement; // return table wrapper instead of table div, so the height calculation is correct
|
|
293
|
+
}
|
|
297
294
|
return element;
|
|
298
295
|
}
|
|
299
296
|
|
|
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
|
|
|
4
4
|
import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
|
|
5
5
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
6
6
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
7
|
-
const packageVersion = "
|
|
7
|
+
const packageVersion = "0.0.0-development";
|
|
8
8
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
9
9
|
// Remove URL as it has UGC
|
|
10
10
|
// 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 = "
|
|
17
|
+
const packageVersion = "0.0.0-development";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -7,6 +7,8 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
7
7
|
* Used by both Confluence's useScrollOnUrlChange and platform renderer's useScrollToBlock.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
|
+
|
|
10
12
|
/**
|
|
11
13
|
* Timing constants for expand animation and DOM update delays.
|
|
12
14
|
* These values are tuned for the expand component's behavior and React's update cycle.
|
|
@@ -186,10 +188,17 @@ export var expandElement = function expandElement(expandContainer) {
|
|
|
186
188
|
*/
|
|
187
189
|
var _expandAllParentsThenScroll = function expandAllParentsThenScroll(element) {
|
|
188
190
|
var attempt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
191
|
+
var scrollFn = arguments.length > 2 ? arguments[2] : undefined;
|
|
189
192
|
var MAX_EXPAND_DEPTH = SCROLL_TO_BLOCK_TIMING.MAX_EXPAND_DEPTH,
|
|
190
193
|
MAX_ATTEMPTS = SCROLL_TO_BLOCK_TIMING.MAX_ATTEMPTS,
|
|
191
194
|
DOM_UPDATE_DELAY = SCROLL_TO_BLOCK_TIMING.DOM_UPDATE_DELAY,
|
|
192
195
|
RETRY_DELAY = SCROLL_TO_BLOCK_TIMING.RETRY_DELAY;
|
|
196
|
+
var doScroll = scrollFn !== null && scrollFn !== void 0 ? scrollFn : function (el) {
|
|
197
|
+
return el.scrollIntoView({
|
|
198
|
+
behavior: 'smooth',
|
|
199
|
+
block: 'center'
|
|
200
|
+
});
|
|
201
|
+
};
|
|
193
202
|
|
|
194
203
|
// Store timeout ID and nested cleanup function so they can be cancelled.
|
|
195
204
|
var timeoutId = null;
|
|
@@ -211,10 +220,7 @@ var _expandAllParentsThenScroll = function expandAllParentsThenScroll(element) {
|
|
|
211
220
|
if (attempt >= MAX_ATTEMPTS || !element.isConnected) {
|
|
212
221
|
// Max attempts reached or element disconnected, scroll anyway.
|
|
213
222
|
if (element.isConnected) {
|
|
214
|
-
element
|
|
215
|
-
behavior: 'smooth',
|
|
216
|
-
block: 'center'
|
|
217
|
-
});
|
|
223
|
+
doScroll(element);
|
|
218
224
|
}
|
|
219
225
|
return cleanup;
|
|
220
226
|
}
|
|
@@ -228,10 +234,7 @@ var _expandAllParentsThenScroll = function expandAllParentsThenScroll(element) {
|
|
|
228
234
|
});
|
|
229
235
|
if (collapsedExpands.length === 0) {
|
|
230
236
|
// All expands are open (or there are no expands), scroll to element.
|
|
231
|
-
element
|
|
232
|
-
behavior: 'smooth',
|
|
233
|
-
block: 'center'
|
|
234
|
-
});
|
|
237
|
+
doScroll(element);
|
|
235
238
|
return cleanup;
|
|
236
239
|
}
|
|
237
240
|
|
|
@@ -251,14 +254,11 @@ var _expandAllParentsThenScroll = function expandAllParentsThenScroll(element) {
|
|
|
251
254
|
}
|
|
252
255
|
|
|
253
256
|
// Recurse to handle any nested collapsed expands or retry if still collapsed.
|
|
254
|
-
nestedCleanup = _expandAllParentsThenScroll(element, attempt + 1);
|
|
257
|
+
nestedCleanup = _expandAllParentsThenScroll(element, attempt + 1, scrollFn);
|
|
255
258
|
} catch (_unused) {
|
|
256
259
|
// Fallback to simple scroll on error.
|
|
257
260
|
if (element.isConnected) {
|
|
258
|
-
element
|
|
259
|
-
behavior: 'smooth',
|
|
260
|
-
block: 'center'
|
|
261
|
-
});
|
|
261
|
+
doScroll(element);
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
}, DOM_UPDATE_DELAY);
|
|
@@ -266,7 +266,7 @@ var _expandAllParentsThenScroll = function expandAllParentsThenScroll(element) {
|
|
|
266
266
|
// Failed to expand, retry with longer delay.
|
|
267
267
|
timeoutId = setTimeout(function () {
|
|
268
268
|
if (element.isConnected) {
|
|
269
|
-
nestedCleanup = _expandAllParentsThenScroll(element, attempt + 1);
|
|
269
|
+
nestedCleanup = _expandAllParentsThenScroll(element, attempt + 1, scrollFn);
|
|
270
270
|
}
|
|
271
271
|
}, RETRY_DELAY);
|
|
272
272
|
}
|
|
@@ -274,17 +274,14 @@ var _expandAllParentsThenScroll = function expandAllParentsThenScroll(element) {
|
|
|
274
274
|
// Retry on error.
|
|
275
275
|
timeoutId = setTimeout(function () {
|
|
276
276
|
if (element.isConnected) {
|
|
277
|
-
nestedCleanup = _expandAllParentsThenScroll(element, attempt + 1);
|
|
277
|
+
nestedCleanup = _expandAllParentsThenScroll(element, attempt + 1, scrollFn);
|
|
278
278
|
}
|
|
279
279
|
}, RETRY_DELAY);
|
|
280
280
|
}
|
|
281
281
|
} catch (_unused3) {
|
|
282
282
|
// Fallback to simple scroll on error.
|
|
283
283
|
if (element.isConnected) {
|
|
284
|
-
element
|
|
285
|
-
behavior: 'smooth',
|
|
286
|
-
block: 'center'
|
|
287
|
-
});
|
|
284
|
+
doScroll(element);
|
|
288
285
|
}
|
|
289
286
|
}
|
|
290
287
|
return cleanup;
|
|
@@ -310,6 +307,9 @@ export var getLocalIdSelector = function getLocalIdSelector(localId, container)
|
|
|
310
307
|
// Special case for tables which use data-table-local-id
|
|
311
308
|
element = container.querySelector("[data-table-local-id=\"".concat(localId, "\"]"));
|
|
312
309
|
if (element) {
|
|
310
|
+
if (fg('platform_editor_block_menu_v2_patch_4')) {
|
|
311
|
+
return element.parentElement; // return table wrapper instead of table div, so the height calculation is correct
|
|
312
|
+
}
|
|
313
313
|
return element;
|
|
314
314
|
}
|
|
315
315
|
|
|
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
|
|
|
10
10
|
import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
|
|
11
11
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
12
12
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
13
|
-
var packageVersion = "
|
|
13
|
+
var packageVersion = "0.0.0-development";
|
|
14
14
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
15
15
|
// Remove URL as it has UGC
|
|
16
16
|
// 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 = "
|
|
24
|
+
var packageVersion = "0.0.0-development";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -8,7 +8,7 @@ export { PUNC, SYMBOL } from './types/substitute-events';
|
|
|
8
8
|
export { BROWSER_FREEZE_INTERACTION_TYPE, FULL_WIDTH_MODE, MODE, PLATFORMS, } from './types/general-events';
|
|
9
9
|
export { LINK_REPRESENTATION, LINK_RESOURCE, LINK_STATUS, USER_CONTEXT, } from './types/insert-events';
|
|
10
10
|
export type { InputMethodInsertLink, InputMethodInsertMedia, InsertMediaVia, InsertEventPayload, } from './types/insert-events';
|
|
11
|
-
export type { InputMethodInsertNativeEmbed, InsertNativeEmbedAEP } from './types/native-embed-events';
|
|
11
|
+
export type { InputMethodInsertNativeEmbed, InsertNativeEmbedAEP, } from './types/native-embed-events';
|
|
12
12
|
export { CHANGE_ALIGNMENT_REASON, TABLE_ACTION, TABLE_BREAKOUT, TABLE_OVERFLOW_CHANGE_TRIGGER, TABLE_STATUS, TABLE_DISPLAY_MODE, } from './types/table-events';
|
|
13
13
|
export type { TableEventPayload, OverflowStateInfo } from './types/table-events';
|
|
14
14
|
export { PasteContents, PasteSources, PasteTypes } from './types/paste-events';
|
|
@@ -90,5 +90,5 @@ export declare const expandElement: (expandContainer: HTMLElement) => boolean;
|
|
|
90
90
|
* @returns A cleanup function that cancels any pending timeouts. Call this when the operation
|
|
91
91
|
* should be aborted (e.g., component unmount, navigation, or new scroll request).
|
|
92
92
|
*/
|
|
93
|
-
export declare const expandAllParentsThenScroll: (element: HTMLElement, attempt?: number) => (() => void);
|
|
93
|
+
export declare const expandAllParentsThenScroll: (element: HTMLElement, attempt?: number, scrollFn?: (element: HTMLElement) => void) => (() => void);
|
|
94
94
|
export declare const getLocalIdSelector: (localId: string, container: HTMLElement) => HTMLElement | null;
|
|
@@ -8,7 +8,7 @@ export { PUNC, SYMBOL } from './types/substitute-events';
|
|
|
8
8
|
export { BROWSER_FREEZE_INTERACTION_TYPE, FULL_WIDTH_MODE, MODE, PLATFORMS, } from './types/general-events';
|
|
9
9
|
export { LINK_REPRESENTATION, LINK_RESOURCE, LINK_STATUS, USER_CONTEXT, } from './types/insert-events';
|
|
10
10
|
export type { InputMethodInsertLink, InputMethodInsertMedia, InsertMediaVia, InsertEventPayload, } from './types/insert-events';
|
|
11
|
-
export type { InputMethodInsertNativeEmbed, InsertNativeEmbedAEP } from './types/native-embed-events';
|
|
11
|
+
export type { InputMethodInsertNativeEmbed, InsertNativeEmbedAEP, } from './types/native-embed-events';
|
|
12
12
|
export { CHANGE_ALIGNMENT_REASON, TABLE_ACTION, TABLE_BREAKOUT, TABLE_OVERFLOW_CHANGE_TRIGGER, TABLE_STATUS, TABLE_DISPLAY_MODE, } from './types/table-events';
|
|
13
13
|
export type { TableEventPayload, OverflowStateInfo } from './types/table-events';
|
|
14
14
|
export { PasteContents, PasteSources, PasteTypes } from './types/paste-events';
|
|
@@ -90,5 +90,5 @@ export declare const expandElement: (expandContainer: HTMLElement) => boolean;
|
|
|
90
90
|
* @returns A cleanup function that cancels any pending timeouts. Call this when the operation
|
|
91
91
|
* should be aborted (e.g., component unmount, navigation, or new scroll request).
|
|
92
92
|
*/
|
|
93
|
-
export declare const expandAllParentsThenScroll: (element: HTMLElement, attempt?: number) => (() => void);
|
|
93
|
+
export declare const expandAllParentsThenScroll: (element: HTMLElement, attempt?: number, scrollFn?: (element: HTMLElement) => void) => (() => void);
|
|
94
94
|
export declare const getLocalIdSelector: (localId: string, container: HTMLElement) => HTMLElement | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "112.
|
|
3
|
+
"version": "112.12.1",
|
|
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/"
|
|
@@ -73,16 +73,16 @@
|
|
|
73
73
|
"@atlaskit/primitives": "^18.1.0",
|
|
74
74
|
"@atlaskit/profilecard": "^24.45.0",
|
|
75
75
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
76
|
-
"@atlaskit/react-ufo": "^5.
|
|
76
|
+
"@atlaskit/react-ufo": "^5.6.0",
|
|
77
77
|
"@atlaskit/section-message": "^8.12.0",
|
|
78
78
|
"@atlaskit/smart-card": "^43.28.0",
|
|
79
79
|
"@atlaskit/smart-user-picker": "^9.2.0",
|
|
80
80
|
"@atlaskit/spinner": "^19.0.0",
|
|
81
|
-
"@atlaskit/status": "^3.
|
|
81
|
+
"@atlaskit/status": "^3.2.0",
|
|
82
82
|
"@atlaskit/task-decision": "^19.3.0",
|
|
83
83
|
"@atlaskit/textfield": "^8.2.0",
|
|
84
|
-
"@atlaskit/tmp-editor-statsig": "^48.
|
|
85
|
-
"@atlaskit/tokens": "^11.
|
|
84
|
+
"@atlaskit/tmp-editor-statsig": "^48.2.0",
|
|
85
|
+
"@atlaskit/tokens": "^11.4.0",
|
|
86
86
|
"@atlaskit/tooltip": "^21.0.0",
|
|
87
87
|
"@atlaskit/width-detector": "^5.0.0",
|
|
88
88
|
"@babel/runtime": "^7.0.0",
|
|
@@ -267,6 +267,9 @@
|
|
|
267
267
|
"platform_editor_toolbar_aifc_placement_overridden": {
|
|
268
268
|
"type": "boolean"
|
|
269
269
|
},
|
|
270
|
+
"platform_editor_block_menu_v2_patch_4": {
|
|
271
|
+
"type": "boolean"
|
|
272
|
+
},
|
|
270
273
|
"jim-lower-ranking-in-jira-macro-search": {
|
|
271
274
|
"type": "boolean"
|
|
272
275
|
},
|