@atlaskit/editor-common 116.8.0 → 116.9.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 +21 -0
- package/dist/cjs/ai-messages/ai-suggestions.js +5 -0
- package/dist/cjs/analytics/types/enums.js +2 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/nesting/transformContainerNodesWhenRequired.js +50 -0
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/ai-messages/ai-suggestions.js +5 -0
- package/dist/es2019/analytics/types/enums.js +2 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/nesting/transformContainerNodesWhenRequired.js +42 -0
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/ai-messages/ai-suggestions.js +5 -0
- package/dist/esm/analytics/types/enums.js +2 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/nesting/transformContainerNodesWhenRequired.js +43 -0
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/ai-messages/ai-suggestions.d.ts +5 -0
- package/dist/types/analytics/types/enums.d.ts +2 -0
- package/dist/types/analytics/types/sync-block-events.d.ts +24 -2
- package/dist/types/nesting/transformContainerNodesWhenRequired.d.ts +13 -0
- package/dist/types/ui-color/index.d.ts +3 -3
- package/nesting/transformContainerNodesWhenRequired/package.json +10 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 116.9.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ce754f0f3613b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ce754f0f3613b) - -
|
|
8
|
+
Insight suggestion card UI
|
|
9
|
+
- Adds i18n copy for the insight suggestion card dismiss action
|
|
10
|
+
- [`47cef9f3ca86b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/47cef9f3ca86b) -
|
|
11
|
+
[ux] EDITOR-7670 add new transformContainerNodesWhenRequired util to support converting panel to
|
|
12
|
+
panel_c1 when panel contains table in block templates
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 116.9.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [`1a60a3ac641f9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1a60a3ac641f9) -
|
|
20
|
+
Add a track analytics event that fires when a synced block reference is pasted into a surface that
|
|
21
|
+
does not support synced blocks, allowing these insertion attempts to be measured directly. The
|
|
22
|
+
event is gated behind the `platform_editor_blocks_patch_2` feature gate.
|
|
23
|
+
|
|
3
24
|
## 116.8.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
|
@@ -156,6 +156,11 @@ var aiSuggestionsMessages = exports.aiSuggestionsMessages = (0, _reactIntl.defin
|
|
|
156
156
|
defaultMessage: 'Uses AI. Verify results.',
|
|
157
157
|
description: 'Disclaimer text shown in the footer of the AI suggestions card'
|
|
158
158
|
},
|
|
159
|
+
cardDismissButtonLabel: {
|
|
160
|
+
id: 'fabric.editor.ai.suggestions.card.dismissButtonLabel.non-final',
|
|
161
|
+
defaultMessage: 'Dismiss',
|
|
162
|
+
description: 'Label for the dismiss button on the AI suggestions card'
|
|
163
|
+
},
|
|
159
164
|
cardMoreOptionsButtonLabel: {
|
|
160
165
|
id: 'fabric.editor.ai.suggestions.card.moreOptionsButtonLabel.non-final',
|
|
161
166
|
defaultMessage: 'More options',
|
|
@@ -88,6 +88,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
88
88
|
ACTION["INPUT_PERF_SAMPLING"] = "inputPerfSampling";
|
|
89
89
|
ACTION["INPUT_PERF_SAMPLING_AVG"] = "inputPerfSamplingAvg";
|
|
90
90
|
ACTION["INSERTED"] = "inserted";
|
|
91
|
+
ACTION["INSERT_ATTEMPTED"] = "insertAttempted";
|
|
91
92
|
ACTION["INVALID_DOCUMENT_ENCOUNTERED"] = "invalidDocumentEncountered";
|
|
92
93
|
ACTION["INVOKED"] = "invoked";
|
|
93
94
|
/** used in @atlassian/editor-referentiality */
|
|
@@ -607,6 +608,7 @@ var ACTION_SUBJECT_ID = exports.ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTIO
|
|
|
607
608
|
ACTION_SUBJECT_ID["SYNCED_BLOCK_SSR_ERROR"] = "syncedBlockSSRError";
|
|
608
609
|
ACTION_SUBJECT_ID["SYNCED_BLOCK_SOURCE_INFO_ORPHANED"] = "syncedBlockSourceInfoOrphaned";
|
|
609
610
|
ACTION_SUBJECT_ID["SYNCED_BLOCK_CACHE_DELETION_FORCED"] = "syncedBlockCacheDeletionForced";
|
|
611
|
+
ACTION_SUBJECT_ID["UNSUPPORTED_SURFACE"] = "unsupportedSurface";
|
|
610
612
|
ACTION_SUBJECT_ID["TABLE_STICKY_HEADER"] = "tableStickyHeader";
|
|
611
613
|
ACTION_SUBJECT_ID["SNIPPET"] = "snippet";
|
|
612
614
|
return ACTION_SUBJECT_ID;
|
|
@@ -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 = "116.
|
|
31
|
+
var packageVersion = "116.9.0";
|
|
32
32
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
33
33
|
// Remove URL as it has UGC
|
|
34
34
|
// Ignored via go/ees007
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.transformContainerNodesWhenRequired = transformContainerNodesWhenRequired;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _traverse = require("@atlaskit/adf-utils/traverse");
|
|
10
|
+
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
11
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
+
/**
|
|
14
|
+
* Promotes `panel` nodes to `panel_c1` wherever their content makes them invalid
|
|
15
|
+
* as a standard `panel` but valid as a `panel_c1` (e.g. when a panel contains a table).
|
|
16
|
+
*
|
|
17
|
+
* Useful for insertion paths where content is being inserted as ADF and we want to
|
|
18
|
+
* use the standard panel type where possible, but upgrade when required by the content.
|
|
19
|
+
*/
|
|
20
|
+
function transformContainerNodesWhenRequired(adf, schema) {
|
|
21
|
+
var isTransformed = false;
|
|
22
|
+
var _schema$nodes = schema.nodes,
|
|
23
|
+
_panel = _schema$nodes.panel,
|
|
24
|
+
panel_c1 = _schema$nodes.panel_c1;
|
|
25
|
+
if (!_panel || !panel_c1) {
|
|
26
|
+
return {
|
|
27
|
+
transformedAdf: adf,
|
|
28
|
+
isTransformed: false
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
var transformedAdf = (0, _traverse.traverse)(adf, {
|
|
32
|
+
panel: function panel(node) {
|
|
33
|
+
if (!node.content) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
var fragment = _model.Fragment.fromJSON(schema, node.content);
|
|
37
|
+
if (!_panel.validContent(fragment) && panel_c1.validContent(fragment)) {
|
|
38
|
+
isTransformed = true;
|
|
39
|
+
return _objectSpread(_objectSpread({}, node), {}, {
|
|
40
|
+
type: 'panel_c1'
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return {
|
|
47
|
+
transformedAdf: transformedAdf,
|
|
48
|
+
isTransformed: isTransformed
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -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 = "116.
|
|
27
|
+
var packageVersion = "116.9.0";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -150,6 +150,11 @@ export const aiSuggestionsMessages = defineMessages({
|
|
|
150
150
|
defaultMessage: 'Uses AI. Verify results.',
|
|
151
151
|
description: 'Disclaimer text shown in the footer of the AI suggestions card'
|
|
152
152
|
},
|
|
153
|
+
cardDismissButtonLabel: {
|
|
154
|
+
id: 'fabric.editor.ai.suggestions.card.dismissButtonLabel.non-final',
|
|
155
|
+
defaultMessage: 'Dismiss',
|
|
156
|
+
description: 'Label for the dismiss button on the AI suggestions card'
|
|
157
|
+
},
|
|
153
158
|
cardMoreOptionsButtonLabel: {
|
|
154
159
|
id: 'fabric.editor.ai.suggestions.card.moreOptionsButtonLabel.non-final',
|
|
155
160
|
defaultMessage: 'More options',
|
|
@@ -84,6 +84,7 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
84
84
|
ACTION["INPUT_PERF_SAMPLING"] = "inputPerfSampling";
|
|
85
85
|
ACTION["INPUT_PERF_SAMPLING_AVG"] = "inputPerfSamplingAvg";
|
|
86
86
|
ACTION["INSERTED"] = "inserted";
|
|
87
|
+
ACTION["INSERT_ATTEMPTED"] = "insertAttempted";
|
|
87
88
|
ACTION["INVALID_DOCUMENT_ENCOUNTERED"] = "invalidDocumentEncountered";
|
|
88
89
|
ACTION["INVOKED"] = "invoked";
|
|
89
90
|
/** used in @atlassian/editor-referentiality */
|
|
@@ -615,6 +616,7 @@ export let ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
|
615
616
|
ACTION_SUBJECT_ID["SYNCED_BLOCK_SSR_ERROR"] = "syncedBlockSSRError";
|
|
616
617
|
ACTION_SUBJECT_ID["SYNCED_BLOCK_SOURCE_INFO_ORPHANED"] = "syncedBlockSourceInfoOrphaned";
|
|
617
618
|
ACTION_SUBJECT_ID["SYNCED_BLOCK_CACHE_DELETION_FORCED"] = "syncedBlockCacheDeletionForced";
|
|
619
|
+
ACTION_SUBJECT_ID["UNSUPPORTED_SURFACE"] = "unsupportedSurface";
|
|
618
620
|
ACTION_SUBJECT_ID["TABLE_STICKY_HEADER"] = "tableStickyHeader";
|
|
619
621
|
ACTION_SUBJECT_ID["SNIPPET"] = "snippet";
|
|
620
622
|
return ACTION_SUBJECT_ID;
|
|
@@ -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 = "116.
|
|
17
|
+
const packageVersion = "116.9.0";
|
|
18
18
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
19
19
|
// Remove URL as it has UGC
|
|
20
20
|
// Ignored via go/ees007
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { traverse } from '@atlaskit/adf-utils/traverse';
|
|
2
|
+
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
/**
|
|
4
|
+
* Promotes `panel` nodes to `panel_c1` wherever their content makes them invalid
|
|
5
|
+
* as a standard `panel` but valid as a `panel_c1` (e.g. when a panel contains a table).
|
|
6
|
+
*
|
|
7
|
+
* Useful for insertion paths where content is being inserted as ADF and we want to
|
|
8
|
+
* use the standard panel type where possible, but upgrade when required by the content.
|
|
9
|
+
*/
|
|
10
|
+
export function transformContainerNodesWhenRequired(adf, schema) {
|
|
11
|
+
let isTransformed = false;
|
|
12
|
+
const {
|
|
13
|
+
panel,
|
|
14
|
+
panel_c1
|
|
15
|
+
} = schema.nodes;
|
|
16
|
+
if (!panel || !panel_c1) {
|
|
17
|
+
return {
|
|
18
|
+
transformedAdf: adf,
|
|
19
|
+
isTransformed: false
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
const transformedAdf = traverse(adf, {
|
|
23
|
+
panel: node => {
|
|
24
|
+
if (!node.content) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const fragment = Fragment.fromJSON(schema, node.content);
|
|
28
|
+
if (!panel.validContent(fragment) && panel_c1.validContent(fragment)) {
|
|
29
|
+
isTransformed = true;
|
|
30
|
+
return {
|
|
31
|
+
...node,
|
|
32
|
+
type: 'panel_c1'
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return {
|
|
39
|
+
transformedAdf,
|
|
40
|
+
isTransformed
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -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 = "116.
|
|
17
|
+
const packageVersion = "116.9.0";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -150,6 +150,11 @@ export var aiSuggestionsMessages = defineMessages({
|
|
|
150
150
|
defaultMessage: 'Uses AI. Verify results.',
|
|
151
151
|
description: 'Disclaimer text shown in the footer of the AI suggestions card'
|
|
152
152
|
},
|
|
153
|
+
cardDismissButtonLabel: {
|
|
154
|
+
id: 'fabric.editor.ai.suggestions.card.dismissButtonLabel.non-final',
|
|
155
|
+
defaultMessage: 'Dismiss',
|
|
156
|
+
description: 'Label for the dismiss button on the AI suggestions card'
|
|
157
|
+
},
|
|
153
158
|
cardMoreOptionsButtonLabel: {
|
|
154
159
|
id: 'fabric.editor.ai.suggestions.card.moreOptionsButtonLabel.non-final',
|
|
155
160
|
defaultMessage: 'More options',
|
|
@@ -84,6 +84,7 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
84
84
|
ACTION["INPUT_PERF_SAMPLING"] = "inputPerfSampling";
|
|
85
85
|
ACTION["INPUT_PERF_SAMPLING_AVG"] = "inputPerfSamplingAvg";
|
|
86
86
|
ACTION["INSERTED"] = "inserted";
|
|
87
|
+
ACTION["INSERT_ATTEMPTED"] = "insertAttempted";
|
|
87
88
|
ACTION["INVALID_DOCUMENT_ENCOUNTERED"] = "invalidDocumentEncountered";
|
|
88
89
|
ACTION["INVOKED"] = "invoked";
|
|
89
90
|
/** used in @atlassian/editor-referentiality */
|
|
@@ -615,6 +616,7 @@ export var ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
|
615
616
|
ACTION_SUBJECT_ID["SYNCED_BLOCK_SSR_ERROR"] = "syncedBlockSSRError";
|
|
616
617
|
ACTION_SUBJECT_ID["SYNCED_BLOCK_SOURCE_INFO_ORPHANED"] = "syncedBlockSourceInfoOrphaned";
|
|
617
618
|
ACTION_SUBJECT_ID["SYNCED_BLOCK_CACHE_DELETION_FORCED"] = "syncedBlockCacheDeletionForced";
|
|
619
|
+
ACTION_SUBJECT_ID["UNSUPPORTED_SURFACE"] = "unsupportedSurface";
|
|
618
620
|
ACTION_SUBJECT_ID["TABLE_STICKY_HEADER"] = "tableStickyHeader";
|
|
619
621
|
ACTION_SUBJECT_ID["SNIPPET"] = "snippet";
|
|
620
622
|
return ACTION_SUBJECT_ID;
|
|
@@ -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 = "116.
|
|
23
|
+
var packageVersion = "116.9.0";
|
|
24
24
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
25
25
|
// Remove URL as it has UGC
|
|
26
26
|
// Ignored via go/ees007
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
import { traverse } from '@atlaskit/adf-utils/traverse';
|
|
5
|
+
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
6
|
+
/**
|
|
7
|
+
* Promotes `panel` nodes to `panel_c1` wherever their content makes them invalid
|
|
8
|
+
* as a standard `panel` but valid as a `panel_c1` (e.g. when a panel contains a table).
|
|
9
|
+
*
|
|
10
|
+
* Useful for insertion paths where content is being inserted as ADF and we want to
|
|
11
|
+
* use the standard panel type where possible, but upgrade when required by the content.
|
|
12
|
+
*/
|
|
13
|
+
export function transformContainerNodesWhenRequired(adf, schema) {
|
|
14
|
+
var isTransformed = false;
|
|
15
|
+
var _schema$nodes = schema.nodes,
|
|
16
|
+
_panel = _schema$nodes.panel,
|
|
17
|
+
panel_c1 = _schema$nodes.panel_c1;
|
|
18
|
+
if (!_panel || !panel_c1) {
|
|
19
|
+
return {
|
|
20
|
+
transformedAdf: adf,
|
|
21
|
+
isTransformed: false
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
var transformedAdf = traverse(adf, {
|
|
25
|
+
panel: function panel(node) {
|
|
26
|
+
if (!node.content) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
var fragment = Fragment.fromJSON(schema, node.content);
|
|
30
|
+
if (!_panel.validContent(fragment) && panel_c1.validContent(fragment)) {
|
|
31
|
+
isTransformed = true;
|
|
32
|
+
return _objectSpread(_objectSpread({}, node), {}, {
|
|
33
|
+
type: 'panel_c1'
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
return {
|
|
40
|
+
transformedAdf: transformedAdf,
|
|
41
|
+
isTransformed: isTransformed
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -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 = "116.
|
|
24
|
+
var packageVersion = "116.9.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -34,6 +34,11 @@ export declare const aiSuggestionsMessages: {
|
|
|
34
34
|
description: string;
|
|
35
35
|
id: string;
|
|
36
36
|
};
|
|
37
|
+
cardDismissButtonLabel: {
|
|
38
|
+
defaultMessage: string;
|
|
39
|
+
description: string;
|
|
40
|
+
id: string;
|
|
41
|
+
};
|
|
37
42
|
cardExpandButtonLabel: {
|
|
38
43
|
defaultMessage: string;
|
|
39
44
|
description: string;
|
|
@@ -81,6 +81,7 @@ export declare enum ACTION {
|
|
|
81
81
|
INPUT_PERF_SAMPLING = "inputPerfSampling",
|
|
82
82
|
INPUT_PERF_SAMPLING_AVG = "inputPerfSamplingAvg",
|
|
83
83
|
INSERTED = "inserted",
|
|
84
|
+
INSERT_ATTEMPTED = "insertAttempted",
|
|
84
85
|
INVALID_DOCUMENT_ENCOUNTERED = "invalidDocumentEncountered",
|
|
85
86
|
INVOKED = "invoked",
|
|
86
87
|
/** used in @atlassian/editor-referentiality */
|
|
@@ -589,6 +590,7 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
589
590
|
SYNCED_BLOCK_SSR_ERROR = "syncedBlockSSRError",
|
|
590
591
|
SYNCED_BLOCK_SOURCE_INFO_ORPHANED = "syncedBlockSourceInfoOrphaned",
|
|
591
592
|
SYNCED_BLOCK_CACHE_DELETION_FORCED = "syncedBlockCacheDeletionForced",
|
|
593
|
+
UNSUPPORTED_SURFACE = "unsupportedSurface",
|
|
592
594
|
TABLE_STICKY_HEADER = "tableStickyHeader",
|
|
593
595
|
SNIPPET = "snippet"
|
|
594
596
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, INPUT_METHOD } from './enums';
|
|
2
2
|
import type { ExperienceEventPayload } from './experience-events';
|
|
3
3
|
import type { InsertSourceSyncedBlockPayload } from './insert-events';
|
|
4
|
-
import type {
|
|
4
|
+
import type { PasteSource } from './paste-events';
|
|
5
|
+
import type { OperationalAEP, TrackAEP } from './utils';
|
|
5
6
|
type SyncedBlockErrorAttributes = {
|
|
6
7
|
error: string;
|
|
7
8
|
resourceId?: string;
|
|
@@ -86,6 +87,27 @@ type SyncedBlockCacheDeletionForcedAttributes = {
|
|
|
86
87
|
* in-flight flag that needs investigation.
|
|
87
88
|
*/
|
|
88
89
|
export type SyncedBlockCacheDeletionForcedAEP = OperationalAEP<ACTION.ERROR, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_CACHE_DELETION_FORCED, SyncedBlockCacheDeletionForcedAttributes>;
|
|
89
|
-
|
|
90
|
+
type SyncedBlockInsertAttemptedUnsupportedSurfaceAttributes = {
|
|
91
|
+
/**
|
|
92
|
+
* The paste mechanism the content arrived through (e.g. `fabric-editor`).
|
|
93
|
+
* Controlled, enumerated value — never user-generated content.
|
|
94
|
+
*/
|
|
95
|
+
pasteSource?: PasteSource;
|
|
96
|
+
/**
|
|
97
|
+
* The product the copied synced block reference originated from, derived from
|
|
98
|
+
* the clipboard `data-resource-id` prefix. Controlled, enumerated value
|
|
99
|
+
* (`confluence-page` | `jira-work-item`) — never user-generated content.
|
|
100
|
+
*/
|
|
101
|
+
sourceProduct?: 'confluence-page' | 'jira-work-item';
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Track event fired when a synced block reference is pasted into a surface that
|
|
105
|
+
* does not support synced blocks (the destination schema dropped the node). This
|
|
106
|
+
* lets us measure insertion attempts into unsupported surfaces (e.g. Bitbucket)
|
|
107
|
+
* directly, rather than inferring them from "copied but never landed". See
|
|
108
|
+
* EDITOR-7749.
|
|
109
|
+
*/
|
|
110
|
+
export type SyncedBlockInsertAttemptedUnsupportedSurfaceAEP = TrackAEP<ACTION.INSERT_ATTEMPTED, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.UNSUPPORTED_SURFACE, SyncedBlockInsertAttemptedUnsupportedSurfaceAttributes, undefined>;
|
|
111
|
+
export type SyncBlockEventPayload = SyncedBlockSourceURLErrorAEP | SyncedBlockUpdateCacheErrorAEP | SyncedBlockUpdateErrorAEP | SyncedBlockUpdateSuccessAEP | SyncedBlockCreateErrorAEP | SyncedBlockCreateSuccessAEP | SyncedBlockDeleteErrorAEP | SyncedBlockDeleteSuccessAEP | SyncedBlockGetSourceInfoErrorAEP | SyncedBlockFetchErrorAEP | SyncedBlockFetchSuccessAEP | ReferenceSyncedBlockUpdateErrorAEP | SyncedBlockFetchReferencesErrorAEP | ExperienceEventPayload | ReferenceSyncedBlockCreateSuccessAEP | ReferenceSyncedBlockDeleteSuccessAEP | SyncedBlockEditSourceAEP | SyncedBlockCopyAEP | SyncedBlockCopyErrorAEP | SyncedLocationClickAEP | SyncedBlockSSRErrorAEP | SyncedBlockSourceInfoOrphanedAEP | SyncedBlockCacheDeletionForcedAEP | SyncedBlockInsertAttemptedUnsupportedSurfaceAEP | InsertSourceSyncedBlockPayload;
|
|
90
112
|
export type RendererSyncBlockEventPayload = SyncedBlockGetSourceInfoErrorAEP | SyncedBlockFetchErrorAEP | SyncedBlockFetchSuccessAEP | ReferenceSyncedBlockUpdateErrorAEP | SyncedBlockSourceInfoOrphanedAEP | SyncedBlockCacheDeletionForcedAEP | ExperienceEventPayload;
|
|
91
113
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
2
|
+
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
/**
|
|
4
|
+
* Promotes `panel` nodes to `panel_c1` wherever their content makes them invalid
|
|
5
|
+
* as a standard `panel` but valid as a `panel_c1` (e.g. when a panel contains a table).
|
|
6
|
+
*
|
|
7
|
+
* Useful for insertion paths where content is being inserted as ADF and we want to
|
|
8
|
+
* use the standard panel type where possible, but upgrade when required by the content.
|
|
9
|
+
*/
|
|
10
|
+
export declare function transformContainerNodesWhenRequired(adf: ADFEntity, schema: Schema): {
|
|
11
|
+
isTransformed: boolean;
|
|
12
|
+
transformedAdf: ADFEntity | false;
|
|
13
|
+
};
|
|
@@ -7,10 +7,10 @@ export { DEFAULT_COLOR_PICKER_COLUMNS, getColorsPerRowFromPalette, getSelectedRo
|
|
|
7
7
|
export { default as cellBackgroundColorPalette } from './ColorPalette/Palettes/cellBackgroundColorPalette';
|
|
8
8
|
export { default as colorPaletteMessages } from './ColorPalette/Palettes/paletteMessages';
|
|
9
9
|
export { panelBackgroundPalette } from './ColorPalette/Palettes/panelBackgroundPalette';
|
|
10
|
-
export { textColorPalette
|
|
11
|
-
export { textColorPaletteNew
|
|
10
|
+
export { textColorPalette } from './ColorPalette/Palettes/textColorPalette';
|
|
11
|
+
export { textColorPaletteNew } from './ColorPalette/Palettes/textColorPaletteNew';
|
|
12
12
|
export { highlightColorPalette, REMOVE_HIGHLIGHT_COLOR, } from './ColorPalette/Palettes/highlightColorPalette';
|
|
13
|
-
export { highlightColorPaletteNew
|
|
13
|
+
export { highlightColorPaletteNew } from './ColorPalette/Palettes/highlightColorPaletteNew';
|
|
14
14
|
export { backgroundPaletteTooltipMessages, borderPaletteTooltipMessages, chartsColorPaletteTooltipMessages, textPaletteTooltipMessages, } from './ColorPalette/Palettes/paletteMessagesTokenModeNames';
|
|
15
15
|
export { DEFAULT_BORDER_COLOR } from './ColorPalette/Palettes/common';
|
|
16
16
|
export type { PaletteColor, PaletteTooltipMessages } from './ColorPalette/Palettes/type';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-common/nesting/transformContainerNodesWhenRequired",
|
|
3
|
+
"main": "../../dist/cjs/nesting/transformContainerNodesWhenRequired.js",
|
|
4
|
+
"module": "../../dist/esm/nesting/transformContainerNodesWhenRequired.js",
|
|
5
|
+
"module:es2019": "../../dist/es2019/nesting/transformContainerNodesWhenRequired.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../../dist/types/nesting/transformContainerNodesWhenRequired.d.ts"
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "116.
|
|
3
|
+
"version": "116.9.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/"
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
"@atlaskit/media-card": "^81.1.0",
|
|
58
58
|
"@atlaskit/media-client": "^37.0.0",
|
|
59
59
|
"@atlaskit/media-client-react": "^6.0.0",
|
|
60
|
-
"@atlaskit/media-common": "^14.
|
|
60
|
+
"@atlaskit/media-common": "^14.1.0",
|
|
61
61
|
"@atlaskit/media-file-preview": "^1.0.0",
|
|
62
62
|
"@atlaskit/media-picker": "^72.0.0",
|
|
63
|
-
"@atlaskit/media-ui": "^30.
|
|
64
|
-
"@atlaskit/media-viewer": "^54.
|
|
63
|
+
"@atlaskit/media-ui": "^30.3.0",
|
|
64
|
+
"@atlaskit/media-viewer": "^54.2.0",
|
|
65
65
|
"@atlaskit/mention": "^27.2.0",
|
|
66
66
|
"@atlaskit/menu": "^9.0.0",
|
|
67
67
|
"@atlaskit/object": "^2.0.0",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@atlaskit/task-decision": "^21.2.0",
|
|
80
80
|
"@atlaskit/teams-app-config": "^2.0.0",
|
|
81
81
|
"@atlaskit/textfield": "^9.0.0",
|
|
82
|
-
"@atlaskit/tmp-editor-statsig": "^109.
|
|
82
|
+
"@atlaskit/tmp-editor-statsig": "^109.2.0",
|
|
83
83
|
"@atlaskit/tokens": "^14.0.0",
|
|
84
84
|
"@atlaskit/tooltip": "^23.0.0",
|
|
85
85
|
"@atlaskit/width-detector": "^6.0.0",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"raf-stub": "^2.0.1",
|
|
135
135
|
"react": "^18.2.0",
|
|
136
136
|
"react-dom": "^18.2.0",
|
|
137
|
-
"react-intl": "^
|
|
137
|
+
"react-intl": "^7.0.0",
|
|
138
138
|
"react-test-renderer": "^18.2.0",
|
|
139
139
|
"sinon": "^2.2.0"
|
|
140
140
|
},
|