@atlaskit/editor-common 112.19.1 → 112.19.3
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/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/find-node-by-local-id.js +39 -0
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/utils/find-node-by-local-id.js +19 -0
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/find-node-by-local-id.js +32 -0
- package/dist/types/utils/find-node-by-local-id.d.ts +6 -0
- package/dist/types-ts4.5/utils/find-node-by-local-id.d.ts +6 -0
- package/package.json +2 -2
- package/utils/find-node-by-local-id/package.json +17 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 112.19.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`e0d081a91e31c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e0d081a91e31c) -
|
|
8
|
+
@atlaskit/editor-common Add findNodeByLocalId utility for plain JSON ADF node search.
|
|
9
|
+
@atlaskit/editor-plugin-local-id Export generateShortUUID as a reusable util via the ./utils
|
|
10
|
+
subpath. @atlassian/adf-semantic-toolcalls New package for structure-aware semantic tool calls.
|
|
11
|
+
Adds createEmptyTable with aligned backend contract (localId, command, flat
|
|
12
|
+
headerRow/headerColumn/numberedRows).
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 112.19.2
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`9e290511c0bea`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9e290511c0bea) -
|
|
20
|
+
Clean up stale experiment gate editor_enghealth_hyperlink_toolbar_aria_values, permanently
|
|
21
|
+
enabling the improved aria values behaviour
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 112.19.1
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -913,7 +913,7 @@ var HyperlinkLinkAddToolbar = exports.HyperlinkLinkAddToolbar = /*#__PURE__*/fun
|
|
|
913
913
|
id: screenReaderDescriptionId
|
|
914
914
|
}, formatMessage(messages.searchLinkAriaDescription)), (0, _react2.jsx)(_ui.PanelTextInput, {
|
|
915
915
|
role: "combobox",
|
|
916
|
-
ariaExpanded:
|
|
916
|
+
ariaExpanded: items && items.length > 0 && !isLoading,
|
|
917
917
|
ariaActiveDescendant: ariaActiveDescendant,
|
|
918
918
|
ariaControls: linkSearchListId,
|
|
919
919
|
ariaAutoComplete: true,
|
|
@@ -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 = "112.19.2";
|
|
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 = "112.19.2";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.findNodeByLocalId = findNodeByLocalId;
|
|
8
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
|
+
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; } } }; }
|
|
10
|
+
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; } }
|
|
11
|
+
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; }
|
|
12
|
+
/**
|
|
13
|
+
* Recursively searches an ADF node tree for a node with the given localId.
|
|
14
|
+
* Works with plain JSON ADF (no ProseMirror dependency).
|
|
15
|
+
* Returns the node if found, or undefined if not found.
|
|
16
|
+
*/
|
|
17
|
+
function findNodeByLocalId(node, localId) {
|
|
18
|
+
if (node.attrs && (0, _typeof2.default)(node.attrs) === 'object' && node.attrs.localId === localId) {
|
|
19
|
+
return node;
|
|
20
|
+
}
|
|
21
|
+
if (Array.isArray(node.content)) {
|
|
22
|
+
var _iterator = _createForOfIteratorHelper(node.content),
|
|
23
|
+
_step;
|
|
24
|
+
try {
|
|
25
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
26
|
+
var child = _step.value;
|
|
27
|
+
var found = findNodeByLocalId(child, localId);
|
|
28
|
+
if (found) {
|
|
29
|
+
return found;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
} catch (err) {
|
|
33
|
+
_iterator.e(err);
|
|
34
|
+
} finally {
|
|
35
|
+
_iterator.f();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
@@ -767,7 +767,7 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
|
|
|
767
767
|
id: screenReaderDescriptionId
|
|
768
768
|
}, formatMessage(messages.searchLinkAriaDescription)), jsx(PanelTextInput, {
|
|
769
769
|
role: "combobox",
|
|
770
|
-
ariaExpanded:
|
|
770
|
+
ariaExpanded: items && items.length > 0 && !isLoading,
|
|
771
771
|
ariaActiveDescendant: ariaActiveDescendant,
|
|
772
772
|
ariaControls: linkSearchListId,
|
|
773
773
|
ariaAutoComplete: true,
|
|
@@ -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 = "112.19.2";
|
|
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 = "112.19.2";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recursively searches an ADF node tree for a node with the given localId.
|
|
3
|
+
* Works with plain JSON ADF (no ProseMirror dependency).
|
|
4
|
+
* Returns the node if found, or undefined if not found.
|
|
5
|
+
*/
|
|
6
|
+
export function findNodeByLocalId(node, localId) {
|
|
7
|
+
if (node.attrs && typeof node.attrs === 'object' && node.attrs.localId === localId) {
|
|
8
|
+
return node;
|
|
9
|
+
}
|
|
10
|
+
if (Array.isArray(node.content)) {
|
|
11
|
+
for (const child of node.content) {
|
|
12
|
+
const found = findNodeByLocalId(child, localId);
|
|
13
|
+
if (found) {
|
|
14
|
+
return found;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
@@ -910,7 +910,7 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
910
910
|
id: screenReaderDescriptionId
|
|
911
911
|
}, formatMessage(messages.searchLinkAriaDescription)), jsx(PanelTextInput, {
|
|
912
912
|
role: "combobox",
|
|
913
|
-
ariaExpanded:
|
|
913
|
+
ariaExpanded: items && items.length > 0 && !isLoading,
|
|
914
914
|
ariaActiveDescendant: ariaActiveDescendant,
|
|
915
915
|
ariaControls: linkSearchListId,
|
|
916
916
|
ariaAutoComplete: true,
|
|
@@ -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 = "112.19.2";
|
|
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 = "112.19.2";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
|
+
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; } } }; }
|
|
3
|
+
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; } }
|
|
4
|
+
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; }
|
|
5
|
+
/**
|
|
6
|
+
* Recursively searches an ADF node tree for a node with the given localId.
|
|
7
|
+
* Works with plain JSON ADF (no ProseMirror dependency).
|
|
8
|
+
* Returns the node if found, or undefined if not found.
|
|
9
|
+
*/
|
|
10
|
+
export function findNodeByLocalId(node, localId) {
|
|
11
|
+
if (node.attrs && _typeof(node.attrs) === 'object' && node.attrs.localId === localId) {
|
|
12
|
+
return node;
|
|
13
|
+
}
|
|
14
|
+
if (Array.isArray(node.content)) {
|
|
15
|
+
var _iterator = _createForOfIteratorHelper(node.content),
|
|
16
|
+
_step;
|
|
17
|
+
try {
|
|
18
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
19
|
+
var child = _step.value;
|
|
20
|
+
var found = findNodeByLocalId(child, localId);
|
|
21
|
+
if (found) {
|
|
22
|
+
return found;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
} catch (err) {
|
|
26
|
+
_iterator.e(err);
|
|
27
|
+
} finally {
|
|
28
|
+
_iterator.f();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recursively searches an ADF node tree for a node with the given localId.
|
|
3
|
+
* Works with plain JSON ADF (no ProseMirror dependency).
|
|
4
|
+
* Returns the node if found, or undefined if not found.
|
|
5
|
+
*/
|
|
6
|
+
export declare function findNodeByLocalId(node: Record<string, unknown>, localId: string): Record<string, unknown> | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recursively searches an ADF node tree for a node with the given localId.
|
|
3
|
+
* Works with plain JSON ADF (no ProseMirror dependency).
|
|
4
|
+
* Returns the node if found, or undefined if not found.
|
|
5
|
+
*/
|
|
6
|
+
export declare function findNodeByLocalId(node: Record<string, unknown>, localId: string): Record<string, unknown> | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "112.19.
|
|
3
|
+
"version": "112.19.3",
|
|
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/"
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@atlaskit/spinner": "^19.1.0",
|
|
80
80
|
"@atlaskit/task-decision": "^19.3.0",
|
|
81
81
|
"@atlaskit/textfield": "^8.3.0",
|
|
82
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
82
|
+
"@atlaskit/tmp-editor-statsig": "^58.0.0",
|
|
83
83
|
"@atlaskit/tokens": "^12.0.0",
|
|
84
84
|
"@atlaskit/tooltip": "^21.1.0",
|
|
85
85
|
"@atlaskit/width-detector": "^5.0.0",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-common/utils/find-node-by-local-id",
|
|
3
|
+
"main": "../../dist/cjs/utils/find-node-by-local-id.js",
|
|
4
|
+
"module": "../../dist/esm/utils/find-node-by-local-id.js",
|
|
5
|
+
"module:es2019": "../../dist/es2019/utils/find-node-by-local-id.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../../dist/types/utils/find-node-by-local-id.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../../dist/types-ts4.5/utils/find-node-by-local-id.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|