@atlaskit/editor-common 111.8.12 → 111.8.14
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/messages/syncBlock.js +65 -10
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/transforms/index.js +0 -6
- package/dist/cjs/transforms/sync-block.js +1 -47
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/messages/syncBlock.js +65 -10
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/transforms/index.js +1 -1
- package/dist/es2019/transforms/sync-block.js +0 -41
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/messages/syncBlock.js +65 -10
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/transforms/index.js +1 -1
- package/dist/esm/transforms/sync-block.js +0 -44
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/types/block-menu-events.d.ts +6 -4
- package/dist/types/messages/syncBlock.d.ts +56 -1
- package/dist/types/transforms/index.d.ts +1 -1
- package/dist/types/transforms/sync-block.d.ts +0 -7
- package/dist/types/types/index.d.ts +9 -0
- package/dist/types-ts4.5/analytics/types/block-menu-events.d.ts +6 -4
- package/dist/types-ts4.5/messages/syncBlock.d.ts +56 -1
- package/dist/types-ts4.5/transforms/index.d.ts +1 -1
- package/dist/types-ts4.5/transforms/sync-block.d.ts +0 -7
- package/dist/types-ts4.5/types/index.d.ts +9 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 111.8.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9068b92adf796`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9068b92adf796) -
|
|
8
|
+
[ux] EDITOR-4439 Implement option to raise warn flag on paste for unsupported content
|
|
9
|
+
|
|
10
|
+
## 111.8.13
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`41d5a8796f3e1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/41d5a8796f3e1) -
|
|
15
|
+
[EDITOR-4472] Update content copy for sync block
|
|
16
|
+
- [`28434cbe03f1e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/28434cbe03f1e) -
|
|
17
|
+
[ux] [EDITOR-2851]
|
|
18
|
+
- Implement unsync feature for source sync block
|
|
19
|
+
- Update deletion confirmation modal and reference block UI after source deletion
|
|
20
|
+
|
|
3
21
|
## 111.8.12
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -22,8 +22,8 @@ var syncBlockMessages = exports.syncBlockMessages = (0, _reactIntlNext.defineMes
|
|
|
22
22
|
description: 'Button label for editing the source of sync block element'
|
|
23
23
|
},
|
|
24
24
|
editSourceTooltip: {
|
|
25
|
-
id: 'fabric.editor.
|
|
26
|
-
defaultMessage: 'Edit at
|
|
25
|
+
id: 'fabric.editor.editSourceTooltipEnabled',
|
|
26
|
+
defaultMessage: 'Edit synced content at source location',
|
|
27
27
|
description: 'Tooltip for the button to navigate to the source page of the sync block element'
|
|
28
28
|
},
|
|
29
29
|
editSourceTooltipDisabled: {
|
|
@@ -96,10 +96,15 @@ var syncBlockMessages = exports.syncBlockMessages = (0, _reactIntlNext.defineMes
|
|
|
96
96
|
defaultMessage: 'This content is synced. Edit it at the source.',
|
|
97
97
|
description: 'Tooltip that shows when you hover over a task in the destination synced block'
|
|
98
98
|
},
|
|
99
|
-
|
|
100
|
-
id: 'fabric.editor.
|
|
101
|
-
defaultMessage:
|
|
102
|
-
description: 'Title of delete confirmation modal that appears when user tries to delete source synced block'
|
|
99
|
+
deleteConfirmationModalTitleSingle: {
|
|
100
|
+
id: 'fabric.editor.deleteConfirmationModalTitleSingle',
|
|
101
|
+
defaultMessage: 'Delete synced block?',
|
|
102
|
+
description: 'Title of delete confirmation modal that appears when user tries to delete source synced block that has no reference'
|
|
103
|
+
},
|
|
104
|
+
deleteConfirmationModalTitleMultiple: {
|
|
105
|
+
id: 'fabric.editor.deleteConfirmationModalTitleMultiple',
|
|
106
|
+
defaultMessage: 'Delete content in {count} locations?',
|
|
107
|
+
description: 'Title of delete confirmation modal that appears when user tries to delete source synced block that has references'
|
|
103
108
|
},
|
|
104
109
|
deleteConfirmationModalCancelButton: {
|
|
105
110
|
id: 'fabric.editor.deleteConfirmationModalCancelButton',
|
|
@@ -121,6 +126,11 @@ var syncBlockMessages = exports.syncBlockMessages = (0, _reactIntlNext.defineMes
|
|
|
121
126
|
defaultMessage: 'Deleting this content will also remove {syncBlockCount, plural, one {a synced block. References to this block} other {# synced blocks. References to these blocks}} in other locations will show an error. Continue with deletion?',
|
|
122
127
|
description: 'Description of delete confirmation modal that appears when user tries to delete source synced block'
|
|
123
128
|
},
|
|
129
|
+
deleteConfirmationModalDescriptionNoRef: {
|
|
130
|
+
id: 'fabric.editor.deleteConfirmationModalDescriptionNoRef',
|
|
131
|
+
defaultMessage: "You'll no longer be able to reuse this synced block to keep content updated across locations. ",
|
|
132
|
+
description: 'Description of delete confirmation modal that appears when user tries to delete source synced block'
|
|
133
|
+
},
|
|
124
134
|
createSyncBlockLabel: {
|
|
125
135
|
id: 'fabric.editor.createSyncBlockLabel',
|
|
126
136
|
defaultMessage: 'Create synced block',
|
|
@@ -142,8 +152,8 @@ var syncBlockMessages = exports.syncBlockMessages = (0, _reactIntlNext.defineMes
|
|
|
142
152
|
description: 'Description in flag which appears when a sync block cannot be deleted in offline mode'
|
|
143
153
|
},
|
|
144
154
|
cannotDeleteTitle: {
|
|
145
|
-
id: 'fabric.editor.error.title.cannotDelete',
|
|
146
|
-
defaultMessage:
|
|
155
|
+
id: 'fabric.editor.error.flag.title.cannotDelete',
|
|
156
|
+
defaultMessage: 'Failed to delete synced block',
|
|
147
157
|
description: 'Title in flag which appears when a sync block cannot be deleted'
|
|
148
158
|
},
|
|
149
159
|
cannotDeleteDescription: {
|
|
@@ -186,14 +196,24 @@ var syncBlockMessages = exports.syncBlockMessages = (0, _reactIntlNext.defineMes
|
|
|
186
196
|
defaultMessage: 'We’re unable to display this content as its source has been deleted or archived.',
|
|
187
197
|
description: 'Description for error state where the synced block cannot be found'
|
|
188
198
|
},
|
|
199
|
+
sourceUnsyncedDescription: {
|
|
200
|
+
id: 'fabric.editor.syncedBlockSourceUnsyncedDescription.non-final',
|
|
201
|
+
defaultMessage: "We're unable to display this content as it's been unsynced from source document",
|
|
202
|
+
description: 'Description for error state where the synced block has its source unsynced'
|
|
203
|
+
},
|
|
204
|
+
sourceDeletedDescription: {
|
|
205
|
+
id: 'fabric.editor.syncedBlockSourceDeletedDescription.non-final',
|
|
206
|
+
defaultMessage: "We're unable to display this content as it's been deleted from source document.",
|
|
207
|
+
description: 'Description for error state where the synced block has its source unsynced'
|
|
208
|
+
},
|
|
189
209
|
retryButton: {
|
|
190
210
|
id: 'fabric.editor.retrySyncedBlock',
|
|
191
211
|
defaultMessage: 'Try again',
|
|
192
212
|
description: 'Label for button which retries loading the synced block'
|
|
193
213
|
},
|
|
194
214
|
offlineError: {
|
|
195
|
-
id: 'fabric.editor.error.description.offline',
|
|
196
|
-
defaultMessage: "We're unable to display
|
|
215
|
+
id: 'fabric.editor.error.description.reference.offline',
|
|
216
|
+
defaultMessage: "We're unable to display synced blocks when you're offline",
|
|
197
217
|
description: 'Error message which is shown over sync block when the editor is offline'
|
|
198
218
|
},
|
|
199
219
|
syncBlockCopiedTitle: {
|
|
@@ -270,5 +290,40 @@ var syncBlockMessages = exports.syncBlockMessages = (0, _reactIntlNext.defineMes
|
|
|
270
290
|
id: 'fabric.editor.syncedBlock.unsync',
|
|
271
291
|
defaultMessage: 'Unsync',
|
|
272
292
|
description: 'Text on the button which unsyncs the sync block'
|
|
293
|
+
},
|
|
294
|
+
deleteConfirmationModalUnsyncButton: {
|
|
295
|
+
id: 'fabric.editor.deleteConfirmationModalUnsyncButton',
|
|
296
|
+
defaultMessage: 'Unsync',
|
|
297
|
+
description: 'Text on button which confirms unsyncing the sync block when user was trying to unsync source synced block'
|
|
298
|
+
},
|
|
299
|
+
unsyncConfirmationModalTitle: {
|
|
300
|
+
id: 'fabric.editor.unsyncConfirmationModalTitle',
|
|
301
|
+
defaultMessage: 'Unsync this content?',
|
|
302
|
+
description: 'Title of unsync confirmation modal that appears when user tries to unsync source synced block'
|
|
303
|
+
},
|
|
304
|
+
unsyncConfirmationModalDescriptionSingle: {
|
|
305
|
+
id: 'fabric.editor.unsyncConfirmationModalDescriptionSingle',
|
|
306
|
+
defaultMessage: 'Your content will stay here. It will no longer be a synced block.',
|
|
307
|
+
description: 'Description of unsync confirmation modal that appears when user tries to unsync source synced block with no reference'
|
|
308
|
+
},
|
|
309
|
+
unsyncConfirmationModalDescriptionMultiple: {
|
|
310
|
+
id: 'fabric.editor.unsyncConfirmationModalDescriptionMultiple',
|
|
311
|
+
defaultMessage: 'Your content will stay here. In {syncBlockCount} other synced locations it will appear as an “Unsynced block”. ',
|
|
312
|
+
description: 'Description of unsync confirmation modal that appears when user tries to unsync source synced block with multiple references'
|
|
313
|
+
},
|
|
314
|
+
cannotPasteSyncedBlockTitle: {
|
|
315
|
+
id: 'fabric.editor.cannotPasteSyncedBlockTitle',
|
|
316
|
+
defaultMessage: 'Unable to paste',
|
|
317
|
+
description: 'Title in flag which appears when a synced block cannot be pasted'
|
|
318
|
+
},
|
|
319
|
+
cannotPasteSyncedBlockDescription: {
|
|
320
|
+
id: 'fabric.editor.cannotPasteSyncedBlockDescription',
|
|
321
|
+
defaultMessage: 'We’re still building this feature. Currently, you can only paste synced content once your work item has been created. ',
|
|
322
|
+
description: 'Description in flag which appears when a synced block cannot be pasted'
|
|
323
|
+
},
|
|
324
|
+
cannotPasteSyncedBlockAction: {
|
|
325
|
+
id: 'fabric.editor.cannotPasteSyncedBlockAction',
|
|
326
|
+
defaultMessage: 'Learn more',
|
|
327
|
+
description: 'Action in flag which appears when a synced block cannot be pasted to learn more'
|
|
273
328
|
}
|
|
274
329
|
});
|
|
@@ -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
|
|
@@ -159,12 +159,6 @@ Object.defineProperty(exports, "transformSliceToRemoveOpenNestedExpand", {
|
|
|
159
159
|
return _expand.transformSliceToRemoveOpenNestedExpand;
|
|
160
160
|
}
|
|
161
161
|
});
|
|
162
|
-
Object.defineProperty(exports, "transformSyncBlock", {
|
|
163
|
-
enumerable: true,
|
|
164
|
-
get: function get() {
|
|
165
|
-
return _syncBlock.transformSyncBlock;
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
162
|
Object.defineProperty(exports, "transformTaskListToBlockNodes", {
|
|
169
163
|
enumerable: true,
|
|
170
164
|
get: function get() {
|
|
@@ -1,57 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports.
|
|
8
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _adfSchema = require("@atlaskit/adf-schema");
|
|
6
|
+
exports.removeBreakoutFromRendererSyncBlockHTML = void 0;
|
|
11
7
|
var _styles = require("../styles");
|
|
12
8
|
var _syncBlock = require("../sync-block");
|
|
13
|
-
var _slice = require("../utils/slice");
|
|
14
|
-
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; }
|
|
15
|
-
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; }
|
|
16
|
-
var transformSyncBlockNode = function transformSyncBlockNode(node, schema, isFromEditor) {
|
|
17
|
-
// if copying from renderer, flatten out the content and remove the sync block
|
|
18
|
-
if (!isFromEditor) {
|
|
19
|
-
return node.content;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// sync blocks need a unique localId to function correctly
|
|
23
|
-
var newAttrs = _objectSpread(_objectSpread({}, node.attrs), {}, {
|
|
24
|
-
localId: _adfSchema.uuid.generate()
|
|
25
|
-
});
|
|
26
|
-
return schema.nodes.syncBlock.create(newAttrs, null, (0, _toConsumableArray2.default)(node.marks));
|
|
27
|
-
};
|
|
28
|
-
var transformBodiedSyncBlockNode = function transformBodiedSyncBlockNode(node, isFromEditor) {
|
|
29
|
-
// if copying from renderer, flatten out the content and remove the bodied sync block
|
|
30
|
-
if (!isFromEditor) {
|
|
31
|
-
return node.content;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// this is not possible as all bodiedSyncBlocks have already been converted into a syncBlock by now.
|
|
35
|
-
return node;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* If we are copying from editor, transform the copied source or reference sync block to a new reference sync block
|
|
40
|
-
* Otherwise, (e.g. if copying from renderer), flatten out the content and remove the sync block
|
|
41
|
-
*/
|
|
42
|
-
var transformSyncBlock = exports.transformSyncBlock = function transformSyncBlock(slice, schema, pasteSource) {
|
|
43
|
-
var isFromEditor = pasteSource === 'fabric-editor';
|
|
44
|
-
slice = (0, _slice.mapSlice)(slice, function (node) {
|
|
45
|
-
if (node.type === schema.nodes.syncBlock) {
|
|
46
|
-
return transformSyncBlockNode(node, schema, isFromEditor);
|
|
47
|
-
} else if (node.type === schema.nodes.bodiedSyncBlock) {
|
|
48
|
-
return transformBodiedSyncBlockNode(node, isFromEditor);
|
|
49
|
-
}
|
|
50
|
-
return node;
|
|
51
|
-
});
|
|
52
|
-
return slice;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
9
|
/**
|
|
56
10
|
* Remove breakout mark from renderer sync block.
|
|
57
11
|
*
|
|
@@ -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)({
|
|
@@ -16,8 +16,8 @@ export const syncBlockMessages = defineMessages({
|
|
|
16
16
|
description: 'Button label for editing the source of sync block element'
|
|
17
17
|
},
|
|
18
18
|
editSourceTooltip: {
|
|
19
|
-
id: 'fabric.editor.
|
|
20
|
-
defaultMessage: 'Edit at
|
|
19
|
+
id: 'fabric.editor.editSourceTooltipEnabled',
|
|
20
|
+
defaultMessage: 'Edit synced content at source location',
|
|
21
21
|
description: 'Tooltip for the button to navigate to the source page of the sync block element'
|
|
22
22
|
},
|
|
23
23
|
editSourceTooltipDisabled: {
|
|
@@ -90,10 +90,15 @@ export const syncBlockMessages = defineMessages({
|
|
|
90
90
|
defaultMessage: 'This content is synced. Edit it at the source.',
|
|
91
91
|
description: 'Tooltip that shows when you hover over a task in the destination synced block'
|
|
92
92
|
},
|
|
93
|
-
|
|
94
|
-
id: 'fabric.editor.
|
|
95
|
-
defaultMessage:
|
|
96
|
-
description: 'Title of delete confirmation modal that appears when user tries to delete source synced block'
|
|
93
|
+
deleteConfirmationModalTitleSingle: {
|
|
94
|
+
id: 'fabric.editor.deleteConfirmationModalTitleSingle',
|
|
95
|
+
defaultMessage: 'Delete synced block?',
|
|
96
|
+
description: 'Title of delete confirmation modal that appears when user tries to delete source synced block that has no reference'
|
|
97
|
+
},
|
|
98
|
+
deleteConfirmationModalTitleMultiple: {
|
|
99
|
+
id: 'fabric.editor.deleteConfirmationModalTitleMultiple',
|
|
100
|
+
defaultMessage: 'Delete content in {count} locations?',
|
|
101
|
+
description: 'Title of delete confirmation modal that appears when user tries to delete source synced block that has references'
|
|
97
102
|
},
|
|
98
103
|
deleteConfirmationModalCancelButton: {
|
|
99
104
|
id: 'fabric.editor.deleteConfirmationModalCancelButton',
|
|
@@ -115,6 +120,11 @@ export const syncBlockMessages = defineMessages({
|
|
|
115
120
|
defaultMessage: 'Deleting this content will also remove {syncBlockCount, plural, one {a synced block. References to this block} other {# synced blocks. References to these blocks}} in other locations will show an error. Continue with deletion?',
|
|
116
121
|
description: 'Description of delete confirmation modal that appears when user tries to delete source synced block'
|
|
117
122
|
},
|
|
123
|
+
deleteConfirmationModalDescriptionNoRef: {
|
|
124
|
+
id: 'fabric.editor.deleteConfirmationModalDescriptionNoRef',
|
|
125
|
+
defaultMessage: "You'll no longer be able to reuse this synced block to keep content updated across locations. ",
|
|
126
|
+
description: 'Description of delete confirmation modal that appears when user tries to delete source synced block'
|
|
127
|
+
},
|
|
118
128
|
createSyncBlockLabel: {
|
|
119
129
|
id: 'fabric.editor.createSyncBlockLabel',
|
|
120
130
|
defaultMessage: 'Create synced block',
|
|
@@ -136,8 +146,8 @@ export const syncBlockMessages = defineMessages({
|
|
|
136
146
|
description: 'Description in flag which appears when a sync block cannot be deleted in offline mode'
|
|
137
147
|
},
|
|
138
148
|
cannotDeleteTitle: {
|
|
139
|
-
id: 'fabric.editor.error.title.cannotDelete',
|
|
140
|
-
defaultMessage:
|
|
149
|
+
id: 'fabric.editor.error.flag.title.cannotDelete',
|
|
150
|
+
defaultMessage: 'Failed to delete synced block',
|
|
141
151
|
description: 'Title in flag which appears when a sync block cannot be deleted'
|
|
142
152
|
},
|
|
143
153
|
cannotDeleteDescription: {
|
|
@@ -180,14 +190,24 @@ export const syncBlockMessages = defineMessages({
|
|
|
180
190
|
defaultMessage: 'We’re unable to display this content as its source has been deleted or archived.',
|
|
181
191
|
description: 'Description for error state where the synced block cannot be found'
|
|
182
192
|
},
|
|
193
|
+
sourceUnsyncedDescription: {
|
|
194
|
+
id: 'fabric.editor.syncedBlockSourceUnsyncedDescription.non-final',
|
|
195
|
+
defaultMessage: "We're unable to display this content as it's been unsynced from source document",
|
|
196
|
+
description: 'Description for error state where the synced block has its source unsynced'
|
|
197
|
+
},
|
|
198
|
+
sourceDeletedDescription: {
|
|
199
|
+
id: 'fabric.editor.syncedBlockSourceDeletedDescription.non-final',
|
|
200
|
+
defaultMessage: "We're unable to display this content as it's been deleted from source document.",
|
|
201
|
+
description: 'Description for error state where the synced block has its source unsynced'
|
|
202
|
+
},
|
|
183
203
|
retryButton: {
|
|
184
204
|
id: 'fabric.editor.retrySyncedBlock',
|
|
185
205
|
defaultMessage: 'Try again',
|
|
186
206
|
description: 'Label for button which retries loading the synced block'
|
|
187
207
|
},
|
|
188
208
|
offlineError: {
|
|
189
|
-
id: 'fabric.editor.error.description.offline',
|
|
190
|
-
defaultMessage: `We're unable to display
|
|
209
|
+
id: 'fabric.editor.error.description.reference.offline',
|
|
210
|
+
defaultMessage: `We're unable to display synced blocks when you're offline`,
|
|
191
211
|
description: 'Error message which is shown over sync block when the editor is offline'
|
|
192
212
|
},
|
|
193
213
|
syncBlockCopiedTitle: {
|
|
@@ -264,5 +284,40 @@ export const syncBlockMessages = defineMessages({
|
|
|
264
284
|
id: 'fabric.editor.syncedBlock.unsync',
|
|
265
285
|
defaultMessage: 'Unsync',
|
|
266
286
|
description: 'Text on the button which unsyncs the sync block'
|
|
287
|
+
},
|
|
288
|
+
deleteConfirmationModalUnsyncButton: {
|
|
289
|
+
id: 'fabric.editor.deleteConfirmationModalUnsyncButton',
|
|
290
|
+
defaultMessage: 'Unsync',
|
|
291
|
+
description: 'Text on button which confirms unsyncing the sync block when user was trying to unsync source synced block'
|
|
292
|
+
},
|
|
293
|
+
unsyncConfirmationModalTitle: {
|
|
294
|
+
id: 'fabric.editor.unsyncConfirmationModalTitle',
|
|
295
|
+
defaultMessage: 'Unsync this content?',
|
|
296
|
+
description: 'Title of unsync confirmation modal that appears when user tries to unsync source synced block'
|
|
297
|
+
},
|
|
298
|
+
unsyncConfirmationModalDescriptionSingle: {
|
|
299
|
+
id: 'fabric.editor.unsyncConfirmationModalDescriptionSingle',
|
|
300
|
+
defaultMessage: 'Your content will stay here. It will no longer be a synced block.',
|
|
301
|
+
description: 'Description of unsync confirmation modal that appears when user tries to unsync source synced block with no reference'
|
|
302
|
+
},
|
|
303
|
+
unsyncConfirmationModalDescriptionMultiple: {
|
|
304
|
+
id: 'fabric.editor.unsyncConfirmationModalDescriptionMultiple',
|
|
305
|
+
defaultMessage: 'Your content will stay here. In {syncBlockCount} other synced locations it will appear as an “Unsynced block”. ',
|
|
306
|
+
description: 'Description of unsync confirmation modal that appears when user tries to unsync source synced block with multiple references'
|
|
307
|
+
},
|
|
308
|
+
cannotPasteSyncedBlockTitle: {
|
|
309
|
+
id: 'fabric.editor.cannotPasteSyncedBlockTitle',
|
|
310
|
+
defaultMessage: 'Unable to paste',
|
|
311
|
+
description: 'Title in flag which appears when a synced block cannot be pasted'
|
|
312
|
+
},
|
|
313
|
+
cannotPasteSyncedBlockDescription: {
|
|
314
|
+
id: 'fabric.editor.cannotPasteSyncedBlockDescription',
|
|
315
|
+
defaultMessage: 'We’re still building this feature. Currently, you can only paste synced content once your work item has been created. ',
|
|
316
|
+
description: 'Description in flag which appears when a synced block cannot be pasted'
|
|
317
|
+
},
|
|
318
|
+
cannotPasteSyncedBlockAction: {
|
|
319
|
+
id: 'fabric.editor.cannotPasteSyncedBlockAction',
|
|
320
|
+
defaultMessage: 'Learn more',
|
|
321
|
+
description: 'Action in flag which appears when a synced block cannot be pasted to learn more'
|
|
267
322
|
}
|
|
268
323
|
});
|
|
@@ -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
|
|
@@ -8,4 +8,4 @@ export { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToC
|
|
|
8
8
|
export { transformSliceToDecisionList } from './decision-list';
|
|
9
9
|
export { transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode } from './list-transforms';
|
|
10
10
|
export { isBulletOrOrderedList, isTaskList, getSupportedListTypesSet, convertBlockToInlineContent } from './list-utils';
|
|
11
|
-
export {
|
|
11
|
+
export { removeBreakoutFromRendererSyncBlockHTML } from './sync-block';
|
|
@@ -1,46 +1,5 @@
|
|
|
1
|
-
import { uuid } from '@atlaskit/adf-schema';
|
|
2
1
|
import { BreakoutCssClassName } from '../styles';
|
|
3
2
|
import { SyncBlockRendererDataAttributeName } from '../sync-block';
|
|
4
|
-
import { mapSlice } from '../utils/slice';
|
|
5
|
-
const transformSyncBlockNode = (node, schema, isFromEditor) => {
|
|
6
|
-
// if copying from renderer, flatten out the content and remove the sync block
|
|
7
|
-
if (!isFromEditor) {
|
|
8
|
-
return node.content;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
// sync blocks need a unique localId to function correctly
|
|
12
|
-
const newAttrs = {
|
|
13
|
-
...node.attrs,
|
|
14
|
-
localId: uuid.generate()
|
|
15
|
-
};
|
|
16
|
-
return schema.nodes.syncBlock.create(newAttrs, null, [...node.marks]);
|
|
17
|
-
};
|
|
18
|
-
const transformBodiedSyncBlockNode = (node, isFromEditor) => {
|
|
19
|
-
// if copying from renderer, flatten out the content and remove the bodied sync block
|
|
20
|
-
if (!isFromEditor) {
|
|
21
|
-
return node.content;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// this is not possible as all bodiedSyncBlocks have already been converted into a syncBlock by now.
|
|
25
|
-
return node;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* If we are copying from editor, transform the copied source or reference sync block to a new reference sync block
|
|
30
|
-
* Otherwise, (e.g. if copying from renderer), flatten out the content and remove the sync block
|
|
31
|
-
*/
|
|
32
|
-
export const transformSyncBlock = (slice, schema, pasteSource) => {
|
|
33
|
-
const isFromEditor = pasteSource === 'fabric-editor';
|
|
34
|
-
slice = mapSlice(slice, node => {
|
|
35
|
-
if (node.type === schema.nodes.syncBlock) {
|
|
36
|
-
return transformSyncBlockNode(node, schema, isFromEditor);
|
|
37
|
-
} else if (node.type === schema.nodes.bodiedSyncBlock) {
|
|
38
|
-
return transformBodiedSyncBlockNode(node, isFromEditor);
|
|
39
|
-
}
|
|
40
|
-
return node;
|
|
41
|
-
});
|
|
42
|
-
return slice;
|
|
43
|
-
};
|
|
44
3
|
|
|
45
4
|
/**
|
|
46
5
|
* Remove breakout mark from renderer sync block.
|
|
@@ -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({
|
|
@@ -16,8 +16,8 @@ export var syncBlockMessages = defineMessages({
|
|
|
16
16
|
description: 'Button label for editing the source of sync block element'
|
|
17
17
|
},
|
|
18
18
|
editSourceTooltip: {
|
|
19
|
-
id: 'fabric.editor.
|
|
20
|
-
defaultMessage: 'Edit at
|
|
19
|
+
id: 'fabric.editor.editSourceTooltipEnabled',
|
|
20
|
+
defaultMessage: 'Edit synced content at source location',
|
|
21
21
|
description: 'Tooltip for the button to navigate to the source page of the sync block element'
|
|
22
22
|
},
|
|
23
23
|
editSourceTooltipDisabled: {
|
|
@@ -90,10 +90,15 @@ export var syncBlockMessages = defineMessages({
|
|
|
90
90
|
defaultMessage: 'This content is synced. Edit it at the source.',
|
|
91
91
|
description: 'Tooltip that shows when you hover over a task in the destination synced block'
|
|
92
92
|
},
|
|
93
|
-
|
|
94
|
-
id: 'fabric.editor.
|
|
95
|
-
defaultMessage:
|
|
96
|
-
description: 'Title of delete confirmation modal that appears when user tries to delete source synced block'
|
|
93
|
+
deleteConfirmationModalTitleSingle: {
|
|
94
|
+
id: 'fabric.editor.deleteConfirmationModalTitleSingle',
|
|
95
|
+
defaultMessage: 'Delete synced block?',
|
|
96
|
+
description: 'Title of delete confirmation modal that appears when user tries to delete source synced block that has no reference'
|
|
97
|
+
},
|
|
98
|
+
deleteConfirmationModalTitleMultiple: {
|
|
99
|
+
id: 'fabric.editor.deleteConfirmationModalTitleMultiple',
|
|
100
|
+
defaultMessage: 'Delete content in {count} locations?',
|
|
101
|
+
description: 'Title of delete confirmation modal that appears when user tries to delete source synced block that has references'
|
|
97
102
|
},
|
|
98
103
|
deleteConfirmationModalCancelButton: {
|
|
99
104
|
id: 'fabric.editor.deleteConfirmationModalCancelButton',
|
|
@@ -115,6 +120,11 @@ export var syncBlockMessages = defineMessages({
|
|
|
115
120
|
defaultMessage: 'Deleting this content will also remove {syncBlockCount, plural, one {a synced block. References to this block} other {# synced blocks. References to these blocks}} in other locations will show an error. Continue with deletion?',
|
|
116
121
|
description: 'Description of delete confirmation modal that appears when user tries to delete source synced block'
|
|
117
122
|
},
|
|
123
|
+
deleteConfirmationModalDescriptionNoRef: {
|
|
124
|
+
id: 'fabric.editor.deleteConfirmationModalDescriptionNoRef',
|
|
125
|
+
defaultMessage: "You'll no longer be able to reuse this synced block to keep content updated across locations. ",
|
|
126
|
+
description: 'Description of delete confirmation modal that appears when user tries to delete source synced block'
|
|
127
|
+
},
|
|
118
128
|
createSyncBlockLabel: {
|
|
119
129
|
id: 'fabric.editor.createSyncBlockLabel',
|
|
120
130
|
defaultMessage: 'Create synced block',
|
|
@@ -136,8 +146,8 @@ export var syncBlockMessages = defineMessages({
|
|
|
136
146
|
description: 'Description in flag which appears when a sync block cannot be deleted in offline mode'
|
|
137
147
|
},
|
|
138
148
|
cannotDeleteTitle: {
|
|
139
|
-
id: 'fabric.editor.error.title.cannotDelete',
|
|
140
|
-
defaultMessage:
|
|
149
|
+
id: 'fabric.editor.error.flag.title.cannotDelete',
|
|
150
|
+
defaultMessage: 'Failed to delete synced block',
|
|
141
151
|
description: 'Title in flag which appears when a sync block cannot be deleted'
|
|
142
152
|
},
|
|
143
153
|
cannotDeleteDescription: {
|
|
@@ -180,14 +190,24 @@ export var syncBlockMessages = defineMessages({
|
|
|
180
190
|
defaultMessage: 'We’re unable to display this content as its source has been deleted or archived.',
|
|
181
191
|
description: 'Description for error state where the synced block cannot be found'
|
|
182
192
|
},
|
|
193
|
+
sourceUnsyncedDescription: {
|
|
194
|
+
id: 'fabric.editor.syncedBlockSourceUnsyncedDescription.non-final',
|
|
195
|
+
defaultMessage: "We're unable to display this content as it's been unsynced from source document",
|
|
196
|
+
description: 'Description for error state where the synced block has its source unsynced'
|
|
197
|
+
},
|
|
198
|
+
sourceDeletedDescription: {
|
|
199
|
+
id: 'fabric.editor.syncedBlockSourceDeletedDescription.non-final',
|
|
200
|
+
defaultMessage: "We're unable to display this content as it's been deleted from source document.",
|
|
201
|
+
description: 'Description for error state where the synced block has its source unsynced'
|
|
202
|
+
},
|
|
183
203
|
retryButton: {
|
|
184
204
|
id: 'fabric.editor.retrySyncedBlock',
|
|
185
205
|
defaultMessage: 'Try again',
|
|
186
206
|
description: 'Label for button which retries loading the synced block'
|
|
187
207
|
},
|
|
188
208
|
offlineError: {
|
|
189
|
-
id: 'fabric.editor.error.description.offline',
|
|
190
|
-
defaultMessage: "We're unable to display
|
|
209
|
+
id: 'fabric.editor.error.description.reference.offline',
|
|
210
|
+
defaultMessage: "We're unable to display synced blocks when you're offline",
|
|
191
211
|
description: 'Error message which is shown over sync block when the editor is offline'
|
|
192
212
|
},
|
|
193
213
|
syncBlockCopiedTitle: {
|
|
@@ -264,5 +284,40 @@ export var syncBlockMessages = defineMessages({
|
|
|
264
284
|
id: 'fabric.editor.syncedBlock.unsync',
|
|
265
285
|
defaultMessage: 'Unsync',
|
|
266
286
|
description: 'Text on the button which unsyncs the sync block'
|
|
287
|
+
},
|
|
288
|
+
deleteConfirmationModalUnsyncButton: {
|
|
289
|
+
id: 'fabric.editor.deleteConfirmationModalUnsyncButton',
|
|
290
|
+
defaultMessage: 'Unsync',
|
|
291
|
+
description: 'Text on button which confirms unsyncing the sync block when user was trying to unsync source synced block'
|
|
292
|
+
},
|
|
293
|
+
unsyncConfirmationModalTitle: {
|
|
294
|
+
id: 'fabric.editor.unsyncConfirmationModalTitle',
|
|
295
|
+
defaultMessage: 'Unsync this content?',
|
|
296
|
+
description: 'Title of unsync confirmation modal that appears when user tries to unsync source synced block'
|
|
297
|
+
},
|
|
298
|
+
unsyncConfirmationModalDescriptionSingle: {
|
|
299
|
+
id: 'fabric.editor.unsyncConfirmationModalDescriptionSingle',
|
|
300
|
+
defaultMessage: 'Your content will stay here. It will no longer be a synced block.',
|
|
301
|
+
description: 'Description of unsync confirmation modal that appears when user tries to unsync source synced block with no reference'
|
|
302
|
+
},
|
|
303
|
+
unsyncConfirmationModalDescriptionMultiple: {
|
|
304
|
+
id: 'fabric.editor.unsyncConfirmationModalDescriptionMultiple',
|
|
305
|
+
defaultMessage: 'Your content will stay here. In {syncBlockCount} other synced locations it will appear as an “Unsynced block”. ',
|
|
306
|
+
description: 'Description of unsync confirmation modal that appears when user tries to unsync source synced block with multiple references'
|
|
307
|
+
},
|
|
308
|
+
cannotPasteSyncedBlockTitle: {
|
|
309
|
+
id: 'fabric.editor.cannotPasteSyncedBlockTitle',
|
|
310
|
+
defaultMessage: 'Unable to paste',
|
|
311
|
+
description: 'Title in flag which appears when a synced block cannot be pasted'
|
|
312
|
+
},
|
|
313
|
+
cannotPasteSyncedBlockDescription: {
|
|
314
|
+
id: 'fabric.editor.cannotPasteSyncedBlockDescription',
|
|
315
|
+
defaultMessage: 'We’re still building this feature. Currently, you can only paste synced content once your work item has been created. ',
|
|
316
|
+
description: 'Description in flag which appears when a synced block cannot be pasted'
|
|
317
|
+
},
|
|
318
|
+
cannotPasteSyncedBlockAction: {
|
|
319
|
+
id: 'fabric.editor.cannotPasteSyncedBlockAction',
|
|
320
|
+
defaultMessage: 'Learn more',
|
|
321
|
+
description: 'Action in flag which appears when a synced block cannot be pasted to learn more'
|
|
267
322
|
}
|
|
268
323
|
});
|
|
@@ -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
|
|
@@ -8,4 +8,4 @@ export { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToC
|
|
|
8
8
|
export { transformSliceToDecisionList } from './decision-list';
|
|
9
9
|
export { transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode } from './list-transforms';
|
|
10
10
|
export { isBulletOrOrderedList, isTaskList, getSupportedListTypesSet, convertBlockToInlineContent } from './list-utils';
|
|
11
|
-
export {
|
|
11
|
+
export { removeBreakoutFromRendererSyncBlockHTML } from './sync-block';
|
|
@@ -1,49 +1,5 @@
|
|
|
1
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
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; }
|
|
4
|
-
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; }
|
|
5
|
-
import { uuid } from '@atlaskit/adf-schema';
|
|
6
1
|
import { BreakoutCssClassName } from '../styles';
|
|
7
2
|
import { SyncBlockRendererDataAttributeName } from '../sync-block';
|
|
8
|
-
import { mapSlice } from '../utils/slice';
|
|
9
|
-
var transformSyncBlockNode = function transformSyncBlockNode(node, schema, isFromEditor) {
|
|
10
|
-
// if copying from renderer, flatten out the content and remove the sync block
|
|
11
|
-
if (!isFromEditor) {
|
|
12
|
-
return node.content;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// sync blocks need a unique localId to function correctly
|
|
16
|
-
var newAttrs = _objectSpread(_objectSpread({}, node.attrs), {}, {
|
|
17
|
-
localId: uuid.generate()
|
|
18
|
-
});
|
|
19
|
-
return schema.nodes.syncBlock.create(newAttrs, null, _toConsumableArray(node.marks));
|
|
20
|
-
};
|
|
21
|
-
var transformBodiedSyncBlockNode = function transformBodiedSyncBlockNode(node, isFromEditor) {
|
|
22
|
-
// if copying from renderer, flatten out the content and remove the bodied sync block
|
|
23
|
-
if (!isFromEditor) {
|
|
24
|
-
return node.content;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// this is not possible as all bodiedSyncBlocks have already been converted into a syncBlock by now.
|
|
28
|
-
return node;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* If we are copying from editor, transform the copied source or reference sync block to a new reference sync block
|
|
33
|
-
* Otherwise, (e.g. if copying from renderer), flatten out the content and remove the sync block
|
|
34
|
-
*/
|
|
35
|
-
export var transformSyncBlock = function transformSyncBlock(slice, schema, pasteSource) {
|
|
36
|
-
var isFromEditor = pasteSource === 'fabric-editor';
|
|
37
|
-
slice = mapSlice(slice, function (node) {
|
|
38
|
-
if (node.type === schema.nodes.syncBlock) {
|
|
39
|
-
return transformSyncBlockNode(node, schema, isFromEditor);
|
|
40
|
-
} else if (node.type === schema.nodes.bodiedSyncBlock) {
|
|
41
|
-
return transformBodiedSyncBlockNode(node, isFromEditor);
|
|
42
|
-
}
|
|
43
|
-
return node;
|
|
44
|
-
});
|
|
45
|
-
return slice;
|
|
46
|
-
};
|
|
47
3
|
|
|
48
4
|
/**
|
|
49
5
|
* Remove breakout mark from renderer sync block.
|
|
@@ -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({
|
|
@@ -33,15 +33,17 @@ interface ElementTransformErrorAttr {
|
|
|
33
33
|
triggeredFrom: INPUT_METHOD.MOUSE | INPUT_METHOD.KEYBOARD;
|
|
34
34
|
}
|
|
35
35
|
export type ElementTransformErrorAEP = OperationalAEP<ACTION.ERRORED, ACTION_SUBJECT.ELEMENT, ACTION_SUBJECT_ID.TRANSFORM, ElementTransformErrorAttr>;
|
|
36
|
-
interface
|
|
36
|
+
interface ElementTransformAttr {
|
|
37
37
|
duration: number;
|
|
38
|
+
inputMethod: INPUT_METHOD.BLOCK_MENU;
|
|
38
39
|
isList: boolean;
|
|
39
40
|
isNested: boolean;
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
outputNodesCount: number;
|
|
42
|
+
sourceNodesCount: number;
|
|
43
|
+
sourceNodesCountByType: Record<string, number>;
|
|
42
44
|
startTime: number;
|
|
43
45
|
targetNodeType: string;
|
|
44
46
|
}
|
|
45
|
-
export type ElementTransformPerformanceAEP =
|
|
47
|
+
export type ElementTransformPerformanceAEP = TrackAEP<ACTION.TRANSFORMED, ACTION_SUBJECT.ELEMENT, undefined, ElementTransformAttr, undefined>;
|
|
46
48
|
export type BlockMenuEventPayload = BlockMenuOpenedAEP | BlockMenuItemClickedAEP | ElementConvertedAEP | ElementTransformErrorAEP | ElementTransformPerformanceAEP;
|
|
47
49
|
export {};
|
|
@@ -89,7 +89,12 @@ export declare const syncBlockMessages: {
|
|
|
89
89
|
defaultMessage: string;
|
|
90
90
|
description: string;
|
|
91
91
|
};
|
|
92
|
-
|
|
92
|
+
deleteConfirmationModalTitleSingle: {
|
|
93
|
+
id: string;
|
|
94
|
+
defaultMessage: string;
|
|
95
|
+
description: string;
|
|
96
|
+
};
|
|
97
|
+
deleteConfirmationModalTitleMultiple: {
|
|
93
98
|
id: string;
|
|
94
99
|
defaultMessage: string;
|
|
95
100
|
description: string;
|
|
@@ -114,6 +119,11 @@ export declare const syncBlockMessages: {
|
|
|
114
119
|
defaultMessage: string;
|
|
115
120
|
description: string;
|
|
116
121
|
};
|
|
122
|
+
deleteConfirmationModalDescriptionNoRef: {
|
|
123
|
+
id: string;
|
|
124
|
+
defaultMessage: string;
|
|
125
|
+
description: string;
|
|
126
|
+
};
|
|
117
127
|
createSyncBlockLabel: {
|
|
118
128
|
id: string;
|
|
119
129
|
defaultMessage: string;
|
|
@@ -179,6 +189,16 @@ export declare const syncBlockMessages: {
|
|
|
179
189
|
defaultMessage: string;
|
|
180
190
|
description: string;
|
|
181
191
|
};
|
|
192
|
+
sourceUnsyncedDescription: {
|
|
193
|
+
id: string;
|
|
194
|
+
defaultMessage: string;
|
|
195
|
+
description: string;
|
|
196
|
+
};
|
|
197
|
+
sourceDeletedDescription: {
|
|
198
|
+
id: string;
|
|
199
|
+
defaultMessage: string;
|
|
200
|
+
description: string;
|
|
201
|
+
};
|
|
182
202
|
retryButton: {
|
|
183
203
|
id: string;
|
|
184
204
|
defaultMessage: string;
|
|
@@ -264,4 +284,39 @@ export declare const syncBlockMessages: {
|
|
|
264
284
|
defaultMessage: string;
|
|
265
285
|
description: string;
|
|
266
286
|
};
|
|
287
|
+
deleteConfirmationModalUnsyncButton: {
|
|
288
|
+
id: string;
|
|
289
|
+
defaultMessage: string;
|
|
290
|
+
description: string;
|
|
291
|
+
};
|
|
292
|
+
unsyncConfirmationModalTitle: {
|
|
293
|
+
id: string;
|
|
294
|
+
defaultMessage: string;
|
|
295
|
+
description: string;
|
|
296
|
+
};
|
|
297
|
+
unsyncConfirmationModalDescriptionSingle: {
|
|
298
|
+
id: string;
|
|
299
|
+
defaultMessage: string;
|
|
300
|
+
description: string;
|
|
301
|
+
};
|
|
302
|
+
unsyncConfirmationModalDescriptionMultiple: {
|
|
303
|
+
id: string;
|
|
304
|
+
defaultMessage: string;
|
|
305
|
+
description: string;
|
|
306
|
+
};
|
|
307
|
+
cannotPasteSyncedBlockTitle: {
|
|
308
|
+
id: string;
|
|
309
|
+
defaultMessage: string;
|
|
310
|
+
description: string;
|
|
311
|
+
};
|
|
312
|
+
cannotPasteSyncedBlockDescription: {
|
|
313
|
+
id: string;
|
|
314
|
+
defaultMessage: string;
|
|
315
|
+
description: string;
|
|
316
|
+
};
|
|
317
|
+
cannotPasteSyncedBlockAction: {
|
|
318
|
+
id: string;
|
|
319
|
+
defaultMessage: string;
|
|
320
|
+
description: string;
|
|
321
|
+
};
|
|
267
322
|
};
|
|
@@ -5,5 +5,5 @@ export { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToC
|
|
|
5
5
|
export { transformSliceToDecisionList } from './decision-list';
|
|
6
6
|
export { transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode, } from './list-transforms';
|
|
7
7
|
export { isBulletOrOrderedList, isTaskList, getSupportedListTypesSet, convertBlockToInlineContent, } from './list-utils';
|
|
8
|
-
export {
|
|
8
|
+
export { removeBreakoutFromRendererSyncBlockHTML } from './sync-block';
|
|
9
9
|
export type { TransformContext, TransformFunction } from './list-types';
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import type { Schema, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { PasteSource } from '../analytics';
|
|
3
|
-
/**
|
|
4
|
-
* If we are copying from editor, transform the copied source or reference sync block to a new reference sync block
|
|
5
|
-
* Otherwise, (e.g. if copying from renderer), flatten out the content and remove the sync block
|
|
6
|
-
*/
|
|
7
|
-
export declare const transformSyncBlock: (slice: Slice, schema: Schema, pasteSource: PasteSource) => Slice;
|
|
8
1
|
/**
|
|
9
2
|
* Remove breakout mark from renderer sync block.
|
|
10
3
|
*
|
|
@@ -47,6 +47,7 @@ export type { QuickInsertPluginState, QuickInsertPluginStateKeys, QuickInsertOpt
|
|
|
47
47
|
export type { Refs, RefsNode, DocBuilder } from './doc-builder';
|
|
48
48
|
export type { SelectionToolbarGroup, SelectionToolbarHandler } from './selection-toolbar';
|
|
49
49
|
export type { FeedbackInfo } from './feedback-dialog';
|
|
50
|
+
import type { MessageDescriptor } from 'react-intl-next';
|
|
50
51
|
/**
|
|
51
52
|
* @deprecated
|
|
52
53
|
*/
|
|
@@ -59,3 +60,11 @@ import type { EditorPresetBuilder, ExtractPresetAPI } from '../preset';
|
|
|
59
60
|
export type ExtractPublicEditorAPI<T extends EditorPresetBuilder<any, any>> = ExtractPresetAPI<T>;
|
|
60
61
|
export type { UserPreferencesProvider, UserPreferences } from './user-preferences';
|
|
61
62
|
export { DIRECTION } from './block-controls';
|
|
63
|
+
export type PasteWarningOptions = {
|
|
64
|
+
cannotPasteSyncedBlock?: {
|
|
65
|
+
description: MessageDescriptor;
|
|
66
|
+
title: MessageDescriptor;
|
|
67
|
+
urlHref: string;
|
|
68
|
+
urlText: MessageDescriptor;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
@@ -33,15 +33,17 @@ interface ElementTransformErrorAttr {
|
|
|
33
33
|
triggeredFrom: INPUT_METHOD.MOUSE | INPUT_METHOD.KEYBOARD;
|
|
34
34
|
}
|
|
35
35
|
export type ElementTransformErrorAEP = OperationalAEP<ACTION.ERRORED, ACTION_SUBJECT.ELEMENT, ACTION_SUBJECT_ID.TRANSFORM, ElementTransformErrorAttr>;
|
|
36
|
-
interface
|
|
36
|
+
interface ElementTransformAttr {
|
|
37
37
|
duration: number;
|
|
38
|
+
inputMethod: INPUT_METHOD.BLOCK_MENU;
|
|
38
39
|
isList: boolean;
|
|
39
40
|
isNested: boolean;
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
outputNodesCount: number;
|
|
42
|
+
sourceNodesCount: number;
|
|
43
|
+
sourceNodesCountByType: Record<string, number>;
|
|
42
44
|
startTime: number;
|
|
43
45
|
targetNodeType: string;
|
|
44
46
|
}
|
|
45
|
-
export type ElementTransformPerformanceAEP =
|
|
47
|
+
export type ElementTransformPerformanceAEP = TrackAEP<ACTION.TRANSFORMED, ACTION_SUBJECT.ELEMENT, undefined, ElementTransformAttr, undefined>;
|
|
46
48
|
export type BlockMenuEventPayload = BlockMenuOpenedAEP | BlockMenuItemClickedAEP | ElementConvertedAEP | ElementTransformErrorAEP | ElementTransformPerformanceAEP;
|
|
47
49
|
export {};
|
|
@@ -89,7 +89,12 @@ export declare const syncBlockMessages: {
|
|
|
89
89
|
defaultMessage: string;
|
|
90
90
|
description: string;
|
|
91
91
|
};
|
|
92
|
-
|
|
92
|
+
deleteConfirmationModalTitleSingle: {
|
|
93
|
+
id: string;
|
|
94
|
+
defaultMessage: string;
|
|
95
|
+
description: string;
|
|
96
|
+
};
|
|
97
|
+
deleteConfirmationModalTitleMultiple: {
|
|
93
98
|
id: string;
|
|
94
99
|
defaultMessage: string;
|
|
95
100
|
description: string;
|
|
@@ -114,6 +119,11 @@ export declare const syncBlockMessages: {
|
|
|
114
119
|
defaultMessage: string;
|
|
115
120
|
description: string;
|
|
116
121
|
};
|
|
122
|
+
deleteConfirmationModalDescriptionNoRef: {
|
|
123
|
+
id: string;
|
|
124
|
+
defaultMessage: string;
|
|
125
|
+
description: string;
|
|
126
|
+
};
|
|
117
127
|
createSyncBlockLabel: {
|
|
118
128
|
id: string;
|
|
119
129
|
defaultMessage: string;
|
|
@@ -179,6 +189,16 @@ export declare const syncBlockMessages: {
|
|
|
179
189
|
defaultMessage: string;
|
|
180
190
|
description: string;
|
|
181
191
|
};
|
|
192
|
+
sourceUnsyncedDescription: {
|
|
193
|
+
id: string;
|
|
194
|
+
defaultMessage: string;
|
|
195
|
+
description: string;
|
|
196
|
+
};
|
|
197
|
+
sourceDeletedDescription: {
|
|
198
|
+
id: string;
|
|
199
|
+
defaultMessage: string;
|
|
200
|
+
description: string;
|
|
201
|
+
};
|
|
182
202
|
retryButton: {
|
|
183
203
|
id: string;
|
|
184
204
|
defaultMessage: string;
|
|
@@ -264,4 +284,39 @@ export declare const syncBlockMessages: {
|
|
|
264
284
|
defaultMessage: string;
|
|
265
285
|
description: string;
|
|
266
286
|
};
|
|
287
|
+
deleteConfirmationModalUnsyncButton: {
|
|
288
|
+
id: string;
|
|
289
|
+
defaultMessage: string;
|
|
290
|
+
description: string;
|
|
291
|
+
};
|
|
292
|
+
unsyncConfirmationModalTitle: {
|
|
293
|
+
id: string;
|
|
294
|
+
defaultMessage: string;
|
|
295
|
+
description: string;
|
|
296
|
+
};
|
|
297
|
+
unsyncConfirmationModalDescriptionSingle: {
|
|
298
|
+
id: string;
|
|
299
|
+
defaultMessage: string;
|
|
300
|
+
description: string;
|
|
301
|
+
};
|
|
302
|
+
unsyncConfirmationModalDescriptionMultiple: {
|
|
303
|
+
id: string;
|
|
304
|
+
defaultMessage: string;
|
|
305
|
+
description: string;
|
|
306
|
+
};
|
|
307
|
+
cannotPasteSyncedBlockTitle: {
|
|
308
|
+
id: string;
|
|
309
|
+
defaultMessage: string;
|
|
310
|
+
description: string;
|
|
311
|
+
};
|
|
312
|
+
cannotPasteSyncedBlockDescription: {
|
|
313
|
+
id: string;
|
|
314
|
+
defaultMessage: string;
|
|
315
|
+
description: string;
|
|
316
|
+
};
|
|
317
|
+
cannotPasteSyncedBlockAction: {
|
|
318
|
+
id: string;
|
|
319
|
+
defaultMessage: string;
|
|
320
|
+
description: string;
|
|
321
|
+
};
|
|
267
322
|
};
|
|
@@ -5,5 +5,5 @@ export { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToC
|
|
|
5
5
|
export { transformSliceToDecisionList } from './decision-list';
|
|
6
6
|
export { transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode, } from './list-transforms';
|
|
7
7
|
export { isBulletOrOrderedList, isTaskList, getSupportedListTypesSet, convertBlockToInlineContent, } from './list-utils';
|
|
8
|
-
export {
|
|
8
|
+
export { removeBreakoutFromRendererSyncBlockHTML } from './sync-block';
|
|
9
9
|
export type { TransformContext, TransformFunction } from './list-types';
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import type { Schema, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { PasteSource } from '../analytics';
|
|
3
|
-
/**
|
|
4
|
-
* If we are copying from editor, transform the copied source or reference sync block to a new reference sync block
|
|
5
|
-
* Otherwise, (e.g. if copying from renderer), flatten out the content and remove the sync block
|
|
6
|
-
*/
|
|
7
|
-
export declare const transformSyncBlock: (slice: Slice, schema: Schema, pasteSource: PasteSource) => Slice;
|
|
8
1
|
/**
|
|
9
2
|
* Remove breakout mark from renderer sync block.
|
|
10
3
|
*
|
|
@@ -47,6 +47,7 @@ export type { QuickInsertPluginState, QuickInsertPluginStateKeys, QuickInsertOpt
|
|
|
47
47
|
export type { Refs, RefsNode, DocBuilder } from './doc-builder';
|
|
48
48
|
export type { SelectionToolbarGroup, SelectionToolbarHandler } from './selection-toolbar';
|
|
49
49
|
export type { FeedbackInfo } from './feedback-dialog';
|
|
50
|
+
import type { MessageDescriptor } from 'react-intl-next';
|
|
50
51
|
/**
|
|
51
52
|
* @deprecated
|
|
52
53
|
*/
|
|
@@ -59,3 +60,11 @@ import type { EditorPresetBuilder, ExtractPresetAPI } from '../preset';
|
|
|
59
60
|
export type ExtractPublicEditorAPI<T extends EditorPresetBuilder<any, any>> = ExtractPresetAPI<T>;
|
|
60
61
|
export type { UserPreferencesProvider, UserPreferences } from './user-preferences';
|
|
61
62
|
export { DIRECTION } from './block-controls';
|
|
63
|
+
export type PasteWarningOptions = {
|
|
64
|
+
cannotPasteSyncedBlock?: {
|
|
65
|
+
description: MessageDescriptor;
|
|
66
|
+
title: MessageDescriptor;
|
|
67
|
+
urlHref: string;
|
|
68
|
+
urlText: MessageDescriptor;
|
|
69
|
+
};
|
|
70
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "111.8.
|
|
3
|
+
"version": "111.8.14",
|
|
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/"
|
|
@@ -55,14 +55,14 @@
|
|
|
55
55
|
"@atlaskit/link": "^3.3.0",
|
|
56
56
|
"@atlaskit/link-datasource": "^4.32.0",
|
|
57
57
|
"@atlaskit/link-picker": "^4.2.0",
|
|
58
|
-
"@atlaskit/media-card": "^79.
|
|
58
|
+
"@atlaskit/media-card": "^79.15.0",
|
|
59
59
|
"@atlaskit/media-client": "^35.7.0",
|
|
60
60
|
"@atlaskit/media-client-react": "^4.1.0",
|
|
61
61
|
"@atlaskit/media-common": "^12.3.0",
|
|
62
62
|
"@atlaskit/media-file-preview": "^0.15.0",
|
|
63
63
|
"@atlaskit/media-picker": "^70.1.0",
|
|
64
64
|
"@atlaskit/media-ui": "^28.7.0",
|
|
65
|
-
"@atlaskit/media-viewer": "^52.
|
|
65
|
+
"@atlaskit/media-viewer": "^52.7.0",
|
|
66
66
|
"@atlaskit/mention": "^24.4.0",
|
|
67
67
|
"@atlaskit/menu": "^8.4.0",
|
|
68
68
|
"@atlaskit/onboarding": "^14.5.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@atlaskit/task-decision": "^19.2.0",
|
|
82
82
|
"@atlaskit/textfield": "^8.2.0",
|
|
83
83
|
"@atlaskit/theme": "^21.0.0",
|
|
84
|
-
"@atlaskit/tmp-editor-statsig": "^16.
|
|
84
|
+
"@atlaskit/tmp-editor-statsig": "^16.32.0",
|
|
85
85
|
"@atlaskit/tokens": "^10.1.0",
|
|
86
86
|
"@atlaskit/tooltip": "^20.14.0",
|
|
87
87
|
"@atlaskit/width-detector": "^5.0.0",
|