@atlaskit/editor-common 120.13.2 → 120.14.0
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/ai-messages/ai-suggestions.js +7 -2
- package/dist/cjs/collab/index.js +9 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/ai-messages/ai-suggestions.js +7 -2
- package/dist/es2019/collab/index.js +10 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/ai-messages/ai-suggestions.js +7 -2
- package/dist/esm/collab/index.js +10 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/ai-messages/ai-suggestions.d.ts +5 -0
- package/dist/types/collab/index.d.ts +16 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 120.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`23f2823b17126`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/23f2823b17126) -
|
|
8
|
+
Add a `DOCUMENT_BLOCKED` provider error and map the NCS `ARI_BLACKLISTED` (423) error to it.
|
|
9
|
+
Previously `ARI_BLACKLISTED` had no mapping and was silently dropped by the provider, so products
|
|
10
|
+
could not react to a blocked (blacklisted) document. The new mapping is gated behind
|
|
11
|
+
`platform_editor_blocked_document_ux`; when the gate is off the error is still dropped, preserving
|
|
12
|
+
existing behaviour.
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`7b2aacb6376fe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7b2aacb6376fe) -
|
|
17
|
+
Update the suggestion card with a persistent Details label and the Figma gradient-and-grid
|
|
18
|
+
treatment for its reasoning and sources layout.
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 120.13.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -151,6 +151,11 @@ var aiSuggestionsMessages = exports.aiSuggestionsMessages = (0, _reactIntl.defin
|
|
|
151
151
|
defaultMessage: 'Visible only to you',
|
|
152
152
|
description: 'Tooltip shown on the private indicator icon in the AI suggestions card'
|
|
153
153
|
},
|
|
154
|
+
cardDetailsButtonLabel: {
|
|
155
|
+
id: 'fabric.editor.ai.suggestions.card.detailsButtonLabel.non-final',
|
|
156
|
+
defaultMessage: 'Details',
|
|
157
|
+
description: 'Label for the details toggle button on the AI suggestions card'
|
|
158
|
+
},
|
|
154
159
|
cardSourcesButtonLabel: {
|
|
155
160
|
id: 'fabric.editor.ai.suggestions.card.sourcesButtonLabel.non-final',
|
|
156
161
|
defaultMessage: 'Sources',
|
|
@@ -343,7 +348,7 @@ var aiSuggestionsMessages = exports.aiSuggestionsMessages = (0, _reactIntl.defin
|
|
|
343
348
|
},
|
|
344
349
|
sourceLabel: {
|
|
345
350
|
id: 'fabric.editor.ai.suggestions.sourceLabel.non-final',
|
|
346
|
-
defaultMessage: '
|
|
347
|
-
description: 'Label for the sources section on the AI suggestions card'
|
|
351
|
+
defaultMessage: 'Teamwork Graph',
|
|
352
|
+
description: 'Label for the Teamwork Graph sources section on the AI suggestions card'
|
|
348
353
|
}
|
|
349
354
|
});
|
package/dist/cjs/collab/index.js
CHANGED
|
@@ -26,6 +26,7 @@ var PROVIDER_ERROR_CODE = exports.PROVIDER_ERROR_CODE = /*#__PURE__*/function (P
|
|
|
26
26
|
PROVIDER_ERROR_CODE["INVALID_USER_TOKEN"] = "INVALID_USER_TOKEN";
|
|
27
27
|
PROVIDER_ERROR_CODE["DOCUMENT_NOT_FOUND"] = "DOCUMENT_NOT_FOUND";
|
|
28
28
|
PROVIDER_ERROR_CODE["LOCKED"] = "LOCKED";
|
|
29
|
+
PROVIDER_ERROR_CODE["DOCUMENT_BLOCKED"] = "DOCUMENT_BLOCKED";
|
|
29
30
|
PROVIDER_ERROR_CODE["FAIL_TO_SAVE"] = "FAIL_TO_SAVE";
|
|
30
31
|
PROVIDER_ERROR_CODE["DOCUMENT_RESTORE_ERROR"] = "DOCUMENT_RESTORE_ERROR";
|
|
31
32
|
PROVIDER_ERROR_CODE["INITIALISATION_ERROR"] = "INITIALISATION_ERROR";
|
|
@@ -62,6 +63,14 @@ var PROVIDER_ERROR_CODE = exports.PROVIDER_ERROR_CODE = /*#__PURE__*/function (P
|
|
|
62
63
|
* @message Message returned to editor, i.e. The document is currently not available, please try again later
|
|
63
64
|
* @recoverable It is recoverable, as the provider can try again later.
|
|
64
65
|
*/
|
|
66
|
+
/**
|
|
67
|
+
* This error is thrown when the document has been blocked (blacklisted) by NCS, e.g. via the
|
|
68
|
+
* documentari kill switch. Unlike a temporary Locked namespace, the block is not expected to clear
|
|
69
|
+
* on its own, so editing should be disabled and the user informed the document can't be edited.
|
|
70
|
+
* The error is passed to us by NCS as ARI_BLACKLISTED with a 423 status.
|
|
71
|
+
* @message Message returned to editor, i.e. Document is blocked
|
|
72
|
+
* @recoverable It is not recoverable, as the provider cannot do anything to unblock the document.
|
|
73
|
+
*/
|
|
65
74
|
/**
|
|
66
75
|
* This error is thrown when the provider is unable to save the document.
|
|
67
76
|
* This can happen when the connection to dynamoDB is lost, or when we do not have sufficient permissions (DYNAMO ERROR).
|
|
@@ -27,7 +27,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
27
27
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
28
28
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
29
29
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
30
|
-
var packageVersion = "120.13.
|
|
30
|
+
var packageVersion = "120.13.2";
|
|
31
31
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
32
32
|
// Remove URL as it has UGC
|
|
33
33
|
// Ignored via go/ees007
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "120.13.
|
|
27
|
+
var packageVersion = "120.13.2";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -145,6 +145,11 @@ export const aiSuggestionsMessages = defineMessages({
|
|
|
145
145
|
defaultMessage: 'Visible only to you',
|
|
146
146
|
description: 'Tooltip shown on the private indicator icon in the AI suggestions card'
|
|
147
147
|
},
|
|
148
|
+
cardDetailsButtonLabel: {
|
|
149
|
+
id: 'fabric.editor.ai.suggestions.card.detailsButtonLabel.non-final',
|
|
150
|
+
defaultMessage: 'Details',
|
|
151
|
+
description: 'Label for the details toggle button on the AI suggestions card'
|
|
152
|
+
},
|
|
148
153
|
cardSourcesButtonLabel: {
|
|
149
154
|
id: 'fabric.editor.ai.suggestions.card.sourcesButtonLabel.non-final',
|
|
150
155
|
defaultMessage: 'Sources',
|
|
@@ -337,7 +342,7 @@ export const aiSuggestionsMessages = defineMessages({
|
|
|
337
342
|
},
|
|
338
343
|
sourceLabel: {
|
|
339
344
|
id: 'fabric.editor.ai.suggestions.sourceLabel.non-final',
|
|
340
|
-
defaultMessage: '
|
|
341
|
-
description: 'Label for the sources section on the AI suggestions card'
|
|
345
|
+
defaultMessage: 'Teamwork Graph',
|
|
346
|
+
description: 'Label for the Teamwork Graph sources section on the AI suggestions card'
|
|
342
347
|
}
|
|
343
348
|
});
|
|
@@ -21,6 +21,7 @@ export let PROVIDER_ERROR_CODE = /*#__PURE__*/function (PROVIDER_ERROR_CODE) {
|
|
|
21
21
|
PROVIDER_ERROR_CODE["INVALID_USER_TOKEN"] = "INVALID_USER_TOKEN";
|
|
22
22
|
PROVIDER_ERROR_CODE["DOCUMENT_NOT_FOUND"] = "DOCUMENT_NOT_FOUND";
|
|
23
23
|
PROVIDER_ERROR_CODE["LOCKED"] = "LOCKED";
|
|
24
|
+
PROVIDER_ERROR_CODE["DOCUMENT_BLOCKED"] = "DOCUMENT_BLOCKED";
|
|
24
25
|
PROVIDER_ERROR_CODE["FAIL_TO_SAVE"] = "FAIL_TO_SAVE";
|
|
25
26
|
PROVIDER_ERROR_CODE["DOCUMENT_RESTORE_ERROR"] = "DOCUMENT_RESTORE_ERROR";
|
|
26
27
|
PROVIDER_ERROR_CODE["INITIALISATION_ERROR"] = "INITIALISATION_ERROR";
|
|
@@ -61,6 +62,15 @@ export let PROVIDER_ERROR_CODE = /*#__PURE__*/function (PROVIDER_ERROR_CODE) {
|
|
|
61
62
|
* @recoverable It is recoverable, as the provider can try again later.
|
|
62
63
|
*/
|
|
63
64
|
|
|
65
|
+
/**
|
|
66
|
+
* This error is thrown when the document has been blocked (blacklisted) by NCS, e.g. via the
|
|
67
|
+
* documentari kill switch. Unlike a temporary Locked namespace, the block is not expected to clear
|
|
68
|
+
* on its own, so editing should be disabled and the user informed the document can't be edited.
|
|
69
|
+
* The error is passed to us by NCS as ARI_BLACKLISTED with a 423 status.
|
|
70
|
+
* @message Message returned to editor, i.e. Document is blocked
|
|
71
|
+
* @recoverable It is not recoverable, as the provider cannot do anything to unblock the document.
|
|
72
|
+
*/
|
|
73
|
+
|
|
64
74
|
/**
|
|
65
75
|
* This error is thrown when the provider is unable to save the document.
|
|
66
76
|
* This can happen when the connection to dynamoDB is lost, or when we do not have sufficient permissions (DYNAMO ERROR).
|
|
@@ -13,7 +13,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
13
13
|
const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
14
14
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
15
15
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
16
|
-
const packageVersion = "120.13.
|
|
16
|
+
const packageVersion = "120.13.2";
|
|
17
17
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
18
18
|
// Remove URL as it has UGC
|
|
19
19
|
// Ignored via go/ees007
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "120.13.
|
|
17
|
+
const packageVersion = "120.13.2";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -145,6 +145,11 @@ export var aiSuggestionsMessages = defineMessages({
|
|
|
145
145
|
defaultMessage: 'Visible only to you',
|
|
146
146
|
description: 'Tooltip shown on the private indicator icon in the AI suggestions card'
|
|
147
147
|
},
|
|
148
|
+
cardDetailsButtonLabel: {
|
|
149
|
+
id: 'fabric.editor.ai.suggestions.card.detailsButtonLabel.non-final',
|
|
150
|
+
defaultMessage: 'Details',
|
|
151
|
+
description: 'Label for the details toggle button on the AI suggestions card'
|
|
152
|
+
},
|
|
148
153
|
cardSourcesButtonLabel: {
|
|
149
154
|
id: 'fabric.editor.ai.suggestions.card.sourcesButtonLabel.non-final',
|
|
150
155
|
defaultMessage: 'Sources',
|
|
@@ -337,7 +342,7 @@ export var aiSuggestionsMessages = defineMessages({
|
|
|
337
342
|
},
|
|
338
343
|
sourceLabel: {
|
|
339
344
|
id: 'fabric.editor.ai.suggestions.sourceLabel.non-final',
|
|
340
|
-
defaultMessage: '
|
|
341
|
-
description: 'Label for the sources section on the AI suggestions card'
|
|
345
|
+
defaultMessage: 'Teamwork Graph',
|
|
346
|
+
description: 'Label for the Teamwork Graph sources section on the AI suggestions card'
|
|
342
347
|
}
|
|
343
348
|
});
|
package/dist/esm/collab/index.js
CHANGED
|
@@ -23,6 +23,7 @@ export var PROVIDER_ERROR_CODE = /*#__PURE__*/function (PROVIDER_ERROR_CODE) {
|
|
|
23
23
|
PROVIDER_ERROR_CODE["INVALID_USER_TOKEN"] = "INVALID_USER_TOKEN";
|
|
24
24
|
PROVIDER_ERROR_CODE["DOCUMENT_NOT_FOUND"] = "DOCUMENT_NOT_FOUND";
|
|
25
25
|
PROVIDER_ERROR_CODE["LOCKED"] = "LOCKED";
|
|
26
|
+
PROVIDER_ERROR_CODE["DOCUMENT_BLOCKED"] = "DOCUMENT_BLOCKED";
|
|
26
27
|
PROVIDER_ERROR_CODE["FAIL_TO_SAVE"] = "FAIL_TO_SAVE";
|
|
27
28
|
PROVIDER_ERROR_CODE["DOCUMENT_RESTORE_ERROR"] = "DOCUMENT_RESTORE_ERROR";
|
|
28
29
|
PROVIDER_ERROR_CODE["INITIALISATION_ERROR"] = "INITIALISATION_ERROR";
|
|
@@ -63,6 +64,15 @@ export var PROVIDER_ERROR_CODE = /*#__PURE__*/function (PROVIDER_ERROR_CODE) {
|
|
|
63
64
|
* @recoverable It is recoverable, as the provider can try again later.
|
|
64
65
|
*/
|
|
65
66
|
|
|
67
|
+
/**
|
|
68
|
+
* This error is thrown when the document has been blocked (blacklisted) by NCS, e.g. via the
|
|
69
|
+
* documentari kill switch. Unlike a temporary Locked namespace, the block is not expected to clear
|
|
70
|
+
* on its own, so editing should be disabled and the user informed the document can't be edited.
|
|
71
|
+
* The error is passed to us by NCS as ARI_BLACKLISTED with a 423 status.
|
|
72
|
+
* @message Message returned to editor, i.e. Document is blocked
|
|
73
|
+
* @recoverable It is not recoverable, as the provider cannot do anything to unblock the document.
|
|
74
|
+
*/
|
|
75
|
+
|
|
66
76
|
/**
|
|
67
77
|
* This error is thrown when the provider is unable to save the document.
|
|
68
78
|
* This can happen when the connection to dynamoDB is lost, or when we do not have sufficient permissions (DYNAMO ERROR).
|
|
@@ -19,7 +19,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
19
19
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
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 = "120.13.
|
|
22
|
+
var packageVersion = "120.13.2";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "120.13.
|
|
24
|
+
var packageVersion = "120.13.2";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -29,6 +29,11 @@ export declare const aiSuggestionsMessages: {
|
|
|
29
29
|
description: string;
|
|
30
30
|
id: string;
|
|
31
31
|
};
|
|
32
|
+
cardDetailsButtonLabel: {
|
|
33
|
+
defaultMessage: string;
|
|
34
|
+
description: string;
|
|
35
|
+
id: string;
|
|
36
|
+
};
|
|
32
37
|
cardDiscardButtonLabel: {
|
|
33
38
|
defaultMessage: string;
|
|
34
39
|
description: string;
|
|
@@ -26,6 +26,7 @@ export declare enum PROVIDER_ERROR_CODE {
|
|
|
26
26
|
INVALID_USER_TOKEN = "INVALID_USER_TOKEN",
|
|
27
27
|
DOCUMENT_NOT_FOUND = "DOCUMENT_NOT_FOUND",
|
|
28
28
|
LOCKED = "LOCKED",
|
|
29
|
+
DOCUMENT_BLOCKED = "DOCUMENT_BLOCKED",
|
|
29
30
|
FAIL_TO_SAVE = "FAIL_TO_SAVE",
|
|
30
31
|
DOCUMENT_RESTORE_ERROR = "DOCUMENT_RESTORE_ERROR",
|
|
31
32
|
INITIALISATION_ERROR = "INITIALISATION_ERROR",
|
|
@@ -95,6 +96,20 @@ type Locked = {
|
|
|
95
96
|
recoverable: boolean;
|
|
96
97
|
status?: number;
|
|
97
98
|
};
|
|
99
|
+
/**
|
|
100
|
+
* This error is thrown when the document has been blocked (blacklisted) by NCS, e.g. via the
|
|
101
|
+
* documentari kill switch. Unlike a temporary Locked namespace, the block is not expected to clear
|
|
102
|
+
* on its own, so editing should be disabled and the user informed the document can't be edited.
|
|
103
|
+
* The error is passed to us by NCS as ARI_BLACKLISTED with a 423 status.
|
|
104
|
+
* @message Message returned to editor, i.e. Document is blocked
|
|
105
|
+
* @recoverable It is not recoverable, as the provider cannot do anything to unblock the document.
|
|
106
|
+
*/
|
|
107
|
+
type DocumentBlocked = {
|
|
108
|
+
code: PROVIDER_ERROR_CODE.DOCUMENT_BLOCKED;
|
|
109
|
+
message: string;
|
|
110
|
+
recoverable: boolean;
|
|
111
|
+
status?: number;
|
|
112
|
+
};
|
|
98
113
|
/**
|
|
99
114
|
* This error is thrown when the provider is unable to save the document.
|
|
100
115
|
* This can happen when the connection to dynamoDB is lost, or when we do not have sufficient permissions (DYNAMO ERROR).
|
|
@@ -210,7 +225,7 @@ type ProviderDocumentUpdateError = {
|
|
|
210
225
|
/**
|
|
211
226
|
* A union of all possible provider errors that can be emitted back to the editor.
|
|
212
227
|
*/
|
|
213
|
-
export type ProviderError = InsufficientEditingPermission | InvalidUserToken | DocumentNotFound | Locked | FailToSave | DocumentNotRestore | InitialisationError | NetworkIssue | InvalidProviderConfiguration | InternalServiceError | ProviderDocumentUpdateError;
|
|
228
|
+
export type ProviderError = InsufficientEditingPermission | InvalidUserToken | DocumentNotFound | Locked | DocumentBlocked | FailToSave | DocumentNotRestore | InitialisationError | NetworkIssue | InvalidProviderConfiguration | InternalServiceError | ProviderDocumentUpdateError;
|
|
214
229
|
export interface Metadata {
|
|
215
230
|
[key: string]: string | number | boolean;
|
|
216
231
|
}
|
package/package.json
CHANGED