@atlaskit/editor-common 112.14.0 → 112.15.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 +20 -0
- package/dist/cjs/analytics/types/enums.js +0 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/transforms/index.js +6 -0
- package/dist/cjs/transforms/list-transforms.js +20 -8
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Popup/index.js +1 -1
- package/dist/es2019/analytics/types/enums.js +0 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/transforms/index.js +1 -1
- package/dist/es2019/transforms/list-transforms.js +19 -6
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Popup/index.js +1 -1
- package/dist/esm/analytics/types/enums.js +0 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/transforms/index.js +1 -1
- package/dist/esm/transforms/list-transforms.js +19 -7
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Popup/index.js +1 -1
- package/dist/types/analytics/types/ai-unified-events.d.ts +8 -0
- package/dist/types/analytics/types/enums.d.ts +1 -2
- package/dist/types/analytics/types/native-embed-events.d.ts +3 -3
- package/dist/types/transforms/index.d.ts +1 -1
- package/dist/types/transforms/list-transforms.d.ts +8 -1
- package/dist/types-ts4.5/analytics/types/ai-unified-events.d.ts +8 -0
- package/dist/types-ts4.5/analytics/types/enums.d.ts +1 -2
- package/dist/types-ts4.5/analytics/types/native-embed-events.d.ts +3 -3
- package/dist/types-ts4.5/transforms/index.d.ts +1 -1
- package/dist/types-ts4.5/transforms/list-transforms.d.ts +8 -1
- package/package.json +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 112.15.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3f10d190b50a6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3f10d190b50a6) -
|
|
8
|
+
Clean up platform_editor_a11y_add_role_to_popup
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 112.15.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`1c4534dc921e6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1c4534dc921e6) -
|
|
16
|
+
Preserve small text formatting when converting selections to task lists across block menu, block
|
|
17
|
+
type, and paste flows
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 112.14.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
|
@@ -579,7 +579,6 @@ var ACTION_SUBJECT_ID = exports.ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTIO
|
|
|
579
579
|
ACTION_SUBJECT_ID["SYNCED_BLOCK_LABEL"] = "syncedBlockLabel";
|
|
580
580
|
ACTION_SUBJECT_ID["SYNCED_BLOCK_SSR_ERROR"] = "syncedBlockSSRError";
|
|
581
581
|
ACTION_SUBJECT_ID["TABLE_STICKY_HEADER"] = "tableStickyHeader";
|
|
582
|
-
ACTION_SUBJECT_ID["NATIVE_EMBED"] = "nativeEmbed";
|
|
583
582
|
return ACTION_SUBJECT_ID;
|
|
584
583
|
}({});
|
|
585
584
|
var FLOATING_CONTROLS_TITLE = exports.FLOATING_CONTROLS_TITLE = /*#__PURE__*/function (FLOATING_CONTROLS_TITLE) {
|
|
@@ -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 = "112.
|
|
22
|
+
var packageVersion = "112.15.0";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -9,6 +9,12 @@ Object.defineProperty(exports, "convertBlockToInlineContent", {
|
|
|
9
9
|
return _listUtils.convertBlockToInlineContent;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "createBlockTaskItem", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _listTransforms.createBlockTaskItem;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
12
18
|
Object.defineProperty(exports, "findCodeBlock", {
|
|
13
19
|
enumerable: true,
|
|
14
20
|
get: function get() {
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.transformToTaskList = exports.transformTaskListToBlockNodes = exports.transformListStructure = exports.transformListRecursively = exports.transformBetweenListTypes = exports.getFormattedNode = void 0;
|
|
7
|
+
exports.transformToTaskList = exports.transformTaskListToBlockNodes = exports.transformListStructure = exports.transformListRecursively = exports.transformBetweenListTypes = exports.getFormattedNode = exports.createBlockTaskItem = void 0;
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
@@ -25,15 +25,18 @@ var getContentSupportChecker = function getContentSupportChecker(targetNodeType)
|
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
-
var
|
|
28
|
+
var createBlockTaskItem = exports.createBlockTaskItem = function createBlockTaskItem(_ref) {
|
|
29
|
+
var attrs = _ref.attrs,
|
|
30
|
+
content = _ref.content,
|
|
31
|
+
marks = _ref.marks,
|
|
32
|
+
schema = _ref.schema;
|
|
29
33
|
var _schema$nodes = schema.nodes,
|
|
30
34
|
blockTaskItem = _schema$nodes.blockTaskItem,
|
|
31
35
|
paragraph = _schema$nodes.paragraph;
|
|
32
|
-
var
|
|
36
|
+
var newParagraph = paragraph.createChecked(null, content, marks === null || marks === void 0 ? void 0 : marks.filter(function (mark) {
|
|
33
37
|
return blockTaskItem.allowsMarkType(mark.type);
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
return blockTaskItem.create(null, newParagraph);
|
|
38
|
+
}));
|
|
39
|
+
return blockTaskItem.create(attrs !== null && attrs !== void 0 ? attrs : null, newParagraph);
|
|
37
40
|
};
|
|
38
41
|
var _transformListRecursively = exports.transformListRecursively = function transformListRecursively(props, onhandleUnsupportedContent) {
|
|
39
42
|
var transformedItems = [];
|
|
@@ -90,7 +93,11 @@ var _transformListRecursively = exports.transformListRecursively = function tran
|
|
|
90
93
|
}
|
|
91
94
|
});
|
|
92
95
|
if (isBlockTaskEnabled && blockMarks.length > 0) {
|
|
93
|
-
transformedItems.push(
|
|
96
|
+
transformedItems.push(createBlockTaskItem({
|
|
97
|
+
content: inlineContent,
|
|
98
|
+
marks: blockMarks,
|
|
99
|
+
schema: schema
|
|
100
|
+
}));
|
|
94
101
|
} else {
|
|
95
102
|
transformedItems.push(taskItem.create(null, inlineContent.length > 0 ? inlineContent : null));
|
|
96
103
|
}
|
|
@@ -263,7 +270,12 @@ var transformToTaskList = exports.transformToTaskList = function transformToTask
|
|
|
263
270
|
var inlineContent = (0, _toConsumableArray2.default)(node.content.content);
|
|
264
271
|
if (inlineContent.length > 0) {
|
|
265
272
|
if (isBlockTaskItemEnabled && node.type === paragraph && node.marks.length > 0) {
|
|
266
|
-
listItems.push(
|
|
273
|
+
listItems.push(createBlockTaskItem({
|
|
274
|
+
attrs: targetAttrs,
|
|
275
|
+
content: inlineContent,
|
|
276
|
+
marks: node.marks,
|
|
277
|
+
schema: tr.doc.type.schema
|
|
278
|
+
}));
|
|
267
279
|
} else {
|
|
268
280
|
listItems.push(taskItem.create(targetAttrs, inlineContent));
|
|
269
281
|
}
|
|
@@ -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 = "112.
|
|
27
|
+
var packageVersion = "112.15.0";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -330,7 +330,7 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
330
330
|
// Provide a valid role only when aria-label is present to satisfy a11y rules, as when aria-label is present, role is required
|
|
331
331
|
// use role = dialog as default role, as dialog role itself is not a parent role that requires specific children to function as some other ARIA roles(menu) do
|
|
332
332
|
// if set default role to menu, tons of integration tests will fail as many of our popup usages do not have children that satisfy menu role requirements
|
|
333
|
-
if (ariaLabel
|
|
333
|
+
if (ariaLabel) {
|
|
334
334
|
return _this3.props.role || 'dialog';
|
|
335
335
|
}
|
|
336
336
|
return undefined;
|
|
@@ -573,7 +573,6 @@ export let ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
|
573
573
|
ACTION_SUBJECT_ID["SYNCED_BLOCK_LABEL"] = "syncedBlockLabel";
|
|
574
574
|
ACTION_SUBJECT_ID["SYNCED_BLOCK_SSR_ERROR"] = "syncedBlockSSRError";
|
|
575
575
|
ACTION_SUBJECT_ID["TABLE_STICKY_HEADER"] = "tableStickyHeader";
|
|
576
|
-
ACTION_SUBJECT_ID["NATIVE_EMBED"] = "nativeEmbed";
|
|
577
576
|
return ACTION_SUBJECT_ID;
|
|
578
577
|
}({});
|
|
579
578
|
export let FLOATING_CONTROLS_TITLE = /*#__PURE__*/function (FLOATING_CONTROLS_TITLE) {
|
|
@@ -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 = "112.
|
|
7
|
+
const packageVersion = "112.15.0";
|
|
8
8
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
9
9
|
// Remove URL as it has UGC
|
|
10
10
|
// Ignored via go/ees007
|
|
@@ -6,6 +6,6 @@ export { findExpand, transformSliceToRemoveOpenExpand, transformSliceToRemoveOpe
|
|
|
6
6
|
export { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenMultiBodiedExtension, transformSliceToRemoveLegacyContentMacro, transformSliceToRemoveMacroId } from './extension';
|
|
7
7
|
export { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark, findCodeBlock } from './code-block';
|
|
8
8
|
export { transformSliceToDecisionList } from './decision-list';
|
|
9
|
-
export { transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode } from './list-transforms';
|
|
9
|
+
export { createBlockTaskItem, transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode } from './list-transforms';
|
|
10
10
|
export { isBulletOrOrderedList, isTaskList, getSupportedListTypesSet, convertBlockToInlineContent } from './list-utils';
|
|
11
11
|
export { removeBreakoutFromRendererSyncBlockHTML } from './sync-block';
|
|
@@ -11,14 +11,18 @@ const getContentSupportChecker = targetNodeType => {
|
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
const
|
|
14
|
+
export const createBlockTaskItem = ({
|
|
15
|
+
attrs,
|
|
16
|
+
content,
|
|
17
|
+
marks,
|
|
18
|
+
schema
|
|
19
|
+
}) => {
|
|
15
20
|
const {
|
|
16
21
|
blockTaskItem,
|
|
17
22
|
paragraph
|
|
18
23
|
} = schema.nodes;
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
return blockTaskItem.create(null, newParagraph);
|
|
24
|
+
const newParagraph = paragraph.createChecked(null, content, marks === null || marks === void 0 ? void 0 : marks.filter(mark => blockTaskItem.allowsMarkType(mark.type)));
|
|
25
|
+
return blockTaskItem.create(attrs !== null && attrs !== void 0 ? attrs : null, newParagraph);
|
|
22
26
|
};
|
|
23
27
|
export const transformListRecursively = (props, onhandleUnsupportedContent) => {
|
|
24
28
|
const transformedItems = [];
|
|
@@ -79,7 +83,11 @@ export const transformListRecursively = (props, onhandleUnsupportedContent) => {
|
|
|
79
83
|
}
|
|
80
84
|
});
|
|
81
85
|
if (isBlockTaskEnabled && blockMarks.length > 0) {
|
|
82
|
-
transformedItems.push(
|
|
86
|
+
transformedItems.push(createBlockTaskItem({
|
|
87
|
+
content: inlineContent,
|
|
88
|
+
marks: blockMarks,
|
|
89
|
+
schema
|
|
90
|
+
}));
|
|
83
91
|
} else {
|
|
84
92
|
transformedItems.push(taskItem.create(null, inlineContent.length > 0 ? inlineContent : null));
|
|
85
93
|
}
|
|
@@ -262,7 +270,12 @@ export const transformToTaskList = (tr, range, targetNodeType, targetAttrs, node
|
|
|
262
270
|
const inlineContent = [...node.content.content];
|
|
263
271
|
if (inlineContent.length > 0) {
|
|
264
272
|
if (isBlockTaskItemEnabled && node.type === paragraph && node.marks.length > 0) {
|
|
265
|
-
listItems.push(
|
|
273
|
+
listItems.push(createBlockTaskItem({
|
|
274
|
+
attrs: targetAttrs,
|
|
275
|
+
content: inlineContent,
|
|
276
|
+
marks: node.marks,
|
|
277
|
+
schema: tr.doc.type.schema
|
|
278
|
+
}));
|
|
266
279
|
} else {
|
|
267
280
|
listItems.push(taskItem.create(targetAttrs, inlineContent));
|
|
268
281
|
}
|
|
@@ -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 = "112.
|
|
17
|
+
const packageVersion = "112.15.0";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -297,7 +297,7 @@ export default class Popup extends React.Component {
|
|
|
297
297
|
// Provide a valid role only when aria-label is present to satisfy a11y rules, as when aria-label is present, role is required
|
|
298
298
|
// use role = dialog as default role, as dialog role itself is not a parent role that requires specific children to function as some other ARIA roles(menu) do
|
|
299
299
|
// if set default role to menu, tons of integration tests will fail as many of our popup usages do not have children that satisfy menu role requirements
|
|
300
|
-
if (ariaLabel
|
|
300
|
+
if (ariaLabel) {
|
|
301
301
|
return this.props.role || 'dialog';
|
|
302
302
|
}
|
|
303
303
|
return undefined;
|
|
@@ -573,7 +573,6 @@ export var ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
|
573
573
|
ACTION_SUBJECT_ID["SYNCED_BLOCK_LABEL"] = "syncedBlockLabel";
|
|
574
574
|
ACTION_SUBJECT_ID["SYNCED_BLOCK_SSR_ERROR"] = "syncedBlockSSRError";
|
|
575
575
|
ACTION_SUBJECT_ID["TABLE_STICKY_HEADER"] = "tableStickyHeader";
|
|
576
|
-
ACTION_SUBJECT_ID["NATIVE_EMBED"] = "nativeEmbed";
|
|
577
576
|
return ACTION_SUBJECT_ID;
|
|
578
577
|
}({});
|
|
579
578
|
export var FLOATING_CONTROLS_TITLE = /*#__PURE__*/function (FLOATING_CONTROLS_TITLE) {
|
|
@@ -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 = "112.
|
|
13
|
+
var packageVersion = "112.15.0";
|
|
14
14
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
15
15
|
// Remove URL as it has UGC
|
|
16
16
|
// Ignored via go/ees007
|
|
@@ -6,6 +6,6 @@ export { findExpand, transformSliceToRemoveOpenExpand, transformSliceToRemoveOpe
|
|
|
6
6
|
export { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenMultiBodiedExtension, transformSliceToRemoveLegacyContentMacro, transformSliceToRemoveMacroId } from './extension';
|
|
7
7
|
export { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark, findCodeBlock } from './code-block';
|
|
8
8
|
export { transformSliceToDecisionList } from './decision-list';
|
|
9
|
-
export { transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode } from './list-transforms';
|
|
9
|
+
export { createBlockTaskItem, transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode } from './list-transforms';
|
|
10
10
|
export { isBulletOrOrderedList, isTaskList, getSupportedListTypesSet, convertBlockToInlineContent } from './list-utils';
|
|
11
11
|
export { removeBreakoutFromRendererSyncBlockHTML } from './sync-block';
|
|
@@ -18,15 +18,18 @@ var getContentSupportChecker = function getContentSupportChecker(targetNodeType)
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
-
var
|
|
21
|
+
export var createBlockTaskItem = function createBlockTaskItem(_ref) {
|
|
22
|
+
var attrs = _ref.attrs,
|
|
23
|
+
content = _ref.content,
|
|
24
|
+
marks = _ref.marks,
|
|
25
|
+
schema = _ref.schema;
|
|
22
26
|
var _schema$nodes = schema.nodes,
|
|
23
27
|
blockTaskItem = _schema$nodes.blockTaskItem,
|
|
24
28
|
paragraph = _schema$nodes.paragraph;
|
|
25
|
-
var
|
|
29
|
+
var newParagraph = paragraph.createChecked(null, content, marks === null || marks === void 0 ? void 0 : marks.filter(function (mark) {
|
|
26
30
|
return blockTaskItem.allowsMarkType(mark.type);
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
return blockTaskItem.create(null, newParagraph);
|
|
31
|
+
}));
|
|
32
|
+
return blockTaskItem.create(attrs !== null && attrs !== void 0 ? attrs : null, newParagraph);
|
|
30
33
|
};
|
|
31
34
|
var _transformListRecursively = function transformListRecursively(props, onhandleUnsupportedContent) {
|
|
32
35
|
var transformedItems = [];
|
|
@@ -83,7 +86,11 @@ var _transformListRecursively = function transformListRecursively(props, onhandl
|
|
|
83
86
|
}
|
|
84
87
|
});
|
|
85
88
|
if (isBlockTaskEnabled && blockMarks.length > 0) {
|
|
86
|
-
transformedItems.push(
|
|
89
|
+
transformedItems.push(createBlockTaskItem({
|
|
90
|
+
content: inlineContent,
|
|
91
|
+
marks: blockMarks,
|
|
92
|
+
schema: schema
|
|
93
|
+
}));
|
|
87
94
|
} else {
|
|
88
95
|
transformedItems.push(taskItem.create(null, inlineContent.length > 0 ? inlineContent : null));
|
|
89
96
|
}
|
|
@@ -257,7 +264,12 @@ export var transformToTaskList = function transformToTaskList(tr, range, targetN
|
|
|
257
264
|
var inlineContent = _toConsumableArray(node.content.content);
|
|
258
265
|
if (inlineContent.length > 0) {
|
|
259
266
|
if (isBlockTaskItemEnabled && node.type === paragraph && node.marks.length > 0) {
|
|
260
|
-
listItems.push(
|
|
267
|
+
listItems.push(createBlockTaskItem({
|
|
268
|
+
attrs: targetAttrs,
|
|
269
|
+
content: inlineContent,
|
|
270
|
+
marks: node.marks,
|
|
271
|
+
schema: tr.doc.type.schema
|
|
272
|
+
}));
|
|
261
273
|
} else {
|
|
262
274
|
listItems.push(taskItem.create(targetAttrs, inlineContent));
|
|
263
275
|
}
|
|
@@ -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 = "112.
|
|
24
|
+
var packageVersion = "112.15.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -323,7 +323,7 @@ var Popup = /*#__PURE__*/function (_React$Component) {
|
|
|
323
323
|
// Provide a valid role only when aria-label is present to satisfy a11y rules, as when aria-label is present, role is required
|
|
324
324
|
// use role = dialog as default role, as dialog role itself is not a parent role that requires specific children to function as some other ARIA roles(menu) do
|
|
325
325
|
// if set default role to menu, tons of integration tests will fail as many of our popup usages do not have children that satisfy menu role requirements
|
|
326
|
-
if (ariaLabel
|
|
326
|
+
if (ariaLabel) {
|
|
327
327
|
return _this3.props.role || 'dialog';
|
|
328
328
|
}
|
|
329
329
|
return undefined;
|
|
@@ -8,6 +8,10 @@ export type AIUnifiedCommonAttributes = {
|
|
|
8
8
|
aiExperienceName?: string;
|
|
9
9
|
aiFeatureName: string;
|
|
10
10
|
aiInteractionID: string;
|
|
11
|
+
/**
|
|
12
|
+
* Whether or not the AI experience is from a 3p product when user invokes AI action from smartlink toolbar.
|
|
13
|
+
*/
|
|
14
|
+
has3pSources?: boolean;
|
|
11
15
|
invokedFrom?: string;
|
|
12
16
|
isAIFeature: 1;
|
|
13
17
|
/**
|
|
@@ -24,6 +28,10 @@ export type AIUnifiedCommonAttributes = {
|
|
|
24
28
|
proactiveAIGenerated: 0 | 1;
|
|
25
29
|
promptVersion?: string;
|
|
26
30
|
singleInstrumentationID: string;
|
|
31
|
+
/**
|
|
32
|
+
* The source 3p product when user invokes AI action from smartlink toolbar.
|
|
33
|
+
*/
|
|
34
|
+
sourceProducts?: string | null;
|
|
27
35
|
traceIds?: string[];
|
|
28
36
|
userGeneratedAI: 0 | 1;
|
|
29
37
|
};
|
|
@@ -563,8 +563,7 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
563
563
|
SYNCED_BLOCK_CLICK_SYNCED_LOCATION = "syncedBlockClickSyncedLocation",
|
|
564
564
|
SYNCED_BLOCK_LABEL = "syncedBlockLabel",
|
|
565
565
|
SYNCED_BLOCK_SSR_ERROR = "syncedBlockSSRError",
|
|
566
|
-
TABLE_STICKY_HEADER = "tableStickyHeader"
|
|
567
|
-
NATIVE_EMBED = "nativeEmbed"
|
|
566
|
+
TABLE_STICKY_HEADER = "tableStickyHeader"
|
|
568
567
|
}
|
|
569
568
|
export declare enum FLOATING_CONTROLS_TITLE {
|
|
570
569
|
CODE_BLOCK = "codeBlockFloatingControls",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { ACTION, ACTION_SUBJECT, INPUT_METHOD } from './enums';
|
|
2
|
+
import type { TrackAEP } from './utils';
|
|
3
3
|
export type InputMethodInsertNativeEmbed = INPUT_METHOD.CLIPBOARD | INPUT_METHOD.AUTO_DETECT | INPUT_METHOD.TYPEAHEAD | INPUT_METHOD.MANUAL | INPUT_METHOD.FORMATTING | INPUT_METHOD.FLOATING_TB;
|
|
4
|
-
export type InsertNativeEmbedAEP =
|
|
4
|
+
export type InsertNativeEmbedAEP = TrackAEP<ACTION.INSERTED, ACTION_SUBJECT.NATIVE_EMBED, undefined, {
|
|
5
5
|
inputMethod: InputMethodInsertNativeEmbed;
|
|
6
6
|
insertedCount: number;
|
|
7
7
|
}, undefined>;
|
|
@@ -3,7 +3,7 @@ export { findExpand, transformSliceToRemoveOpenExpand, transformSliceToRemoveOpe
|
|
|
3
3
|
export { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenMultiBodiedExtension, transformSliceToRemoveLegacyContentMacro, transformSliceToRemoveMacroId, } from './extension';
|
|
4
4
|
export { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark, findCodeBlock, } from './code-block';
|
|
5
5
|
export { transformSliceToDecisionList } from './decision-list';
|
|
6
|
-
export { transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode, } from './list-transforms';
|
|
6
|
+
export { createBlockTaskItem, transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode, } from './list-transforms';
|
|
7
7
|
export { isBulletOrOrderedList, isTaskList, getSupportedListTypesSet, convertBlockToInlineContent, } from './list-utils';
|
|
8
8
|
export { removeBreakoutFromRendererSyncBlockHTML } from './sync-block';
|
|
9
9
|
export type { TransformContext, TransformFunction } from './list-types';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { NodeType, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import type { Mark, NodeType, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
2
3
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
4
|
import type { TransformContext } from './list-types';
|
|
4
5
|
type TransformListRecursivelyProps = {
|
|
@@ -11,6 +12,12 @@ type TransformListRecursivelyProps = {
|
|
|
11
12
|
supportedListTypes: Set<NodeType>;
|
|
12
13
|
targetNodeType: NodeType;
|
|
13
14
|
};
|
|
15
|
+
export declare const createBlockTaskItem: ({ attrs, content, marks, schema, }: {
|
|
16
|
+
attrs?: Record<string, unknown> | null;
|
|
17
|
+
content: PMNode[] | Fragment;
|
|
18
|
+
marks?: readonly Mark[];
|
|
19
|
+
schema: Schema;
|
|
20
|
+
}) => PMNode;
|
|
14
21
|
export declare const transformListRecursively: (props: TransformListRecursivelyProps, onhandleUnsupportedContent?: (content: PMNode) => void) => PMNode;
|
|
15
22
|
/**
|
|
16
23
|
* Transform list structure between different list types
|
|
@@ -8,6 +8,10 @@ export type AIUnifiedCommonAttributes = {
|
|
|
8
8
|
aiExperienceName?: string;
|
|
9
9
|
aiFeatureName: string;
|
|
10
10
|
aiInteractionID: string;
|
|
11
|
+
/**
|
|
12
|
+
* Whether or not the AI experience is from a 3p product when user invokes AI action from smartlink toolbar.
|
|
13
|
+
*/
|
|
14
|
+
has3pSources?: boolean;
|
|
11
15
|
invokedFrom?: string;
|
|
12
16
|
isAIFeature: 1;
|
|
13
17
|
/**
|
|
@@ -24,6 +28,10 @@ export type AIUnifiedCommonAttributes = {
|
|
|
24
28
|
proactiveAIGenerated: 0 | 1;
|
|
25
29
|
promptVersion?: string;
|
|
26
30
|
singleInstrumentationID: string;
|
|
31
|
+
/**
|
|
32
|
+
* The source 3p product when user invokes AI action from smartlink toolbar.
|
|
33
|
+
*/
|
|
34
|
+
sourceProducts?: string | null;
|
|
27
35
|
traceIds?: string[];
|
|
28
36
|
userGeneratedAI: 0 | 1;
|
|
29
37
|
};
|
|
@@ -563,8 +563,7 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
563
563
|
SYNCED_BLOCK_CLICK_SYNCED_LOCATION = "syncedBlockClickSyncedLocation",
|
|
564
564
|
SYNCED_BLOCK_LABEL = "syncedBlockLabel",
|
|
565
565
|
SYNCED_BLOCK_SSR_ERROR = "syncedBlockSSRError",
|
|
566
|
-
TABLE_STICKY_HEADER = "tableStickyHeader"
|
|
567
|
-
NATIVE_EMBED = "nativeEmbed"
|
|
566
|
+
TABLE_STICKY_HEADER = "tableStickyHeader"
|
|
568
567
|
}
|
|
569
568
|
export declare enum FLOATING_CONTROLS_TITLE {
|
|
570
569
|
CODE_BLOCK = "codeBlockFloatingControls",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { ACTION, ACTION_SUBJECT, INPUT_METHOD } from './enums';
|
|
2
|
+
import type { TrackAEP } from './utils';
|
|
3
3
|
export type InputMethodInsertNativeEmbed = INPUT_METHOD.CLIPBOARD | INPUT_METHOD.AUTO_DETECT | INPUT_METHOD.TYPEAHEAD | INPUT_METHOD.MANUAL | INPUT_METHOD.FORMATTING | INPUT_METHOD.FLOATING_TB;
|
|
4
|
-
export type InsertNativeEmbedAEP =
|
|
4
|
+
export type InsertNativeEmbedAEP = TrackAEP<ACTION.INSERTED, ACTION_SUBJECT.NATIVE_EMBED, undefined, {
|
|
5
5
|
inputMethod: InputMethodInsertNativeEmbed;
|
|
6
6
|
insertedCount: number;
|
|
7
7
|
}, undefined>;
|
|
@@ -3,7 +3,7 @@ export { findExpand, transformSliceToRemoveOpenExpand, transformSliceToRemoveOpe
|
|
|
3
3
|
export { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenMultiBodiedExtension, transformSliceToRemoveLegacyContentMacro, transformSliceToRemoveMacroId, } from './extension';
|
|
4
4
|
export { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark, findCodeBlock, } from './code-block';
|
|
5
5
|
export { transformSliceToDecisionList } from './decision-list';
|
|
6
|
-
export { transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode, } from './list-transforms';
|
|
6
|
+
export { createBlockTaskItem, transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode, } from './list-transforms';
|
|
7
7
|
export { isBulletOrOrderedList, isTaskList, getSupportedListTypesSet, convertBlockToInlineContent, } from './list-utils';
|
|
8
8
|
export { removeBreakoutFromRendererSyncBlockHTML } from './sync-block';
|
|
9
9
|
export type { TransformContext, TransformFunction } from './list-types';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { NodeType, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import type { Mark, NodeType, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
2
3
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
4
|
import type { TransformContext } from './list-types';
|
|
4
5
|
type TransformListRecursivelyProps = {
|
|
@@ -11,6 +12,12 @@ type TransformListRecursivelyProps = {
|
|
|
11
12
|
supportedListTypes: Set<NodeType>;
|
|
12
13
|
targetNodeType: NodeType;
|
|
13
14
|
};
|
|
15
|
+
export declare const createBlockTaskItem: ({ attrs, content, marks, schema, }: {
|
|
16
|
+
attrs?: Record<string, unknown> | null;
|
|
17
|
+
content: PMNode[] | Fragment;
|
|
18
|
+
marks?: readonly Mark[];
|
|
19
|
+
schema: Schema;
|
|
20
|
+
}) => PMNode;
|
|
14
21
|
export declare const transformListRecursively: (props: TransformListRecursivelyProps, onhandleUnsupportedContent?: (content: PMNode) => void) => PMNode;
|
|
15
22
|
/**
|
|
16
23
|
* Transform list structure between different list types
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "112.
|
|
3
|
+
"version": "112.15.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/"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@atlaskit/editor-toolbar": "^0.20.0",
|
|
52
52
|
"@atlaskit/editor-toolbar-model": "^0.4.0",
|
|
53
53
|
"@atlaskit/emoji": "^69.10.0",
|
|
54
|
-
"@atlaskit/icon": "^
|
|
54
|
+
"@atlaskit/icon": "^34.0.0",
|
|
55
55
|
"@atlaskit/icon-object": "^7.5.0",
|
|
56
56
|
"@atlaskit/link": "^3.3.0",
|
|
57
57
|
"@atlaskit/link-datasource": "^4.34.0",
|
|
@@ -73,14 +73,14 @@
|
|
|
73
73
|
"@atlaskit/primitives": "^18.1.0",
|
|
74
74
|
"@atlaskit/profilecard": "^24.46.0",
|
|
75
75
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
76
|
-
"@atlaskit/react-ufo": "^5.
|
|
76
|
+
"@atlaskit/react-ufo": "^5.10.0",
|
|
77
77
|
"@atlaskit/section-message": "^8.12.0",
|
|
78
78
|
"@atlaskit/smart-card": "^43.29.0",
|
|
79
79
|
"@atlaskit/smart-user-picker": "^9.2.0",
|
|
80
80
|
"@atlaskit/spinner": "^19.0.0",
|
|
81
81
|
"@atlaskit/task-decision": "^19.3.0",
|
|
82
82
|
"@atlaskit/textfield": "^8.2.0",
|
|
83
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
83
|
+
"@atlaskit/tmp-editor-statsig": "^53.0.0",
|
|
84
84
|
"@atlaskit/tokens": "^11.4.0",
|
|
85
85
|
"@atlaskit/tooltip": "^21.1.0",
|
|
86
86
|
"@atlaskit/width-detector": "^5.0.0",
|
|
@@ -197,9 +197,6 @@
|
|
|
197
197
|
"platform_editor_fix_media_in_renderer": {
|
|
198
198
|
"type": "boolean"
|
|
199
199
|
},
|
|
200
|
-
"platform_editor_a11y_add_role_to_popup": {
|
|
201
|
-
"type": "boolean"
|
|
202
|
-
},
|
|
203
200
|
"cc_comments_log_draft_annotation_ancestor_nodes": {
|
|
204
201
|
"type": "boolean"
|
|
205
202
|
},
|