@atlaskit/editor-common 107.19.2 → 107.20.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 +25 -0
- package/dist/cjs/ai-messages/ai-config-items.js +10 -0
- package/dist/cjs/floating-toolbar/DropdownMenuItem.js +2 -1
- package/dist/cjs/messages/media-insert.js +5 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui-menu/DropdownMenu/index.js +5 -2
- package/dist/cjs/utils/validator.js +11 -0
- package/dist/es2019/ai-messages/ai-config-items.js +10 -0
- package/dist/es2019/floating-toolbar/DropdownMenuItem.js +2 -1
- package/dist/es2019/messages/media-insert.js +5 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui-menu/DropdownMenu/index.js +5 -2
- package/dist/es2019/utils/validator.js +11 -0
- package/dist/esm/ai-messages/ai-config-items.js +10 -0
- package/dist/esm/floating-toolbar/DropdownMenuItem.js +2 -1
- package/dist/esm/messages/media-insert.js +5 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui-menu/DropdownMenu/index.js +5 -2
- package/dist/esm/utils/validator.js +11 -0
- package/dist/types/ai-messages/ai-config-items.d.ts +10 -0
- package/dist/types/messages/media-insert.d.ts +5 -0
- package/dist/types-ts4.5/ai-messages/ai-config-items.d.ts +10 -0
- package/dist/types-ts4.5/messages/media-insert.d.ts +5 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 107.20.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b13c372cb68dd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b13c372cb68dd) -
|
|
8
|
+
ENGHEALTH-32424 Remove unnecessary aria-disabled and tabIndex attributes and add menuitem to
|
|
9
|
+
dropdown items"
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 107.20.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- [`13a1ad07bb39e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/13a1ad07bb39e) -
|
|
17
|
+
[ux] EDITOR-1146 | EDITOR-1176 Introduce `blockTaskItem` node to Renderer and Editor
|
|
18
|
+
`editor-plugin-tasks-and-decisions` which adopts the same code and functionality as the regular
|
|
19
|
+
`taskItem` except that it allows block content such as extensions to be inserted. This is to
|
|
20
|
+
facilitate TinyMCE migration which requires usage of the Legacy Content Extension.
|
|
21
|
+
- [`b1b6e81334583`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b1b6e81334583) -
|
|
22
|
+
EDITOR-1305 Added polish prompt.
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
|
|
3
28
|
## 107.19.2
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
|
@@ -395,5 +395,15 @@ var aiConfigItemMessages = exports.aiConfigItemMessages = (0, _reactIntlNext.def
|
|
|
395
395
|
id: 'fabric.editor.ai.config.item.summarize.dropdownItem.title',
|
|
396
396
|
defaultMessage: 'Summarize writing',
|
|
397
397
|
description: 'Title for Atlassian Intelligence "Summarize writing" in editor selection floating toolbar'
|
|
398
|
+
},
|
|
399
|
+
addPolishTitle: {
|
|
400
|
+
id: 'fabric.editor.ai.config.item.addPolish.title',
|
|
401
|
+
defaultMessage: 'Add polish',
|
|
402
|
+
description: 'Describes an option to use Atlassian Intelligence to polish the content currently selected by the user'
|
|
403
|
+
},
|
|
404
|
+
addPolishDescription: {
|
|
405
|
+
id: 'fabric.editor.ai.config.item.addPolish.description',
|
|
406
|
+
defaultMessage: 'Polishes the content to make it more polished',
|
|
407
|
+
description: 'Description for the the Atlassian Intelligence "Add polish".'
|
|
398
408
|
}
|
|
399
409
|
});
|
|
@@ -10,6 +10,7 @@ var _react = require("react");
|
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
11
|
var _checkMarkEditorDone = _interopRequireDefault(require("@atlaskit/icon/core/migration/check-mark--editor-done"));
|
|
12
12
|
var _menu = require("@atlaskit/menu");
|
|
13
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
14
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
14
15
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
15
16
|
var _floatingToolbar = require("../floating-toolbar");
|
|
@@ -160,7 +161,7 @@ var DropdownMenuItem = exports.DropdownMenuItem = function DropdownMenuItem(prop
|
|
|
160
161
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
161
162
|
var hasRole = function hasRole(item) {
|
|
162
163
|
var _item$domItemOptions2;
|
|
163
|
-
if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
164
|
+
if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') || (0, _expValEquals.expValEquals)('platform_editor_august_a11y', 'isEnabled', true)) {
|
|
164
165
|
var _item$domItemOptions;
|
|
165
166
|
return ((_item$domItemOptions = item.domItemOptions) === null || _item$domItemOptions === void 0 ? void 0 : _item$domItemOptions.type) === 'item-checkbox' ? 'menuitemcheckbox' : 'menuitem';
|
|
166
167
|
}
|
|
@@ -21,6 +21,11 @@ var mediaInsertMessages = exports.mediaInsertMessages = (0, _reactIntlNext.defin
|
|
|
21
21
|
defaultMessage: 'Paste link to upload',
|
|
22
22
|
description: 'Placeholder text for the input field where a user can paste (as in copy-paste) a URL to upload a media file'
|
|
23
23
|
},
|
|
24
|
+
insertSmartValueHelperMessage: {
|
|
25
|
+
id: 'fabric.editor.media.insert.insertSmartValueHelperMessage',
|
|
26
|
+
defaultMessage: 'Tip: Enter a smart value or replace a URL path with a smart value to make content dynamic.',
|
|
27
|
+
description: 'Helper text for the input field where a user can paste (as in copy-paste) a URL or insert smart value in the url to upload a media file'
|
|
28
|
+
},
|
|
24
29
|
cancel: {
|
|
25
30
|
id: 'fabric.editor.media.insert.cancel',
|
|
26
31
|
defaultMessage: 'Cancel',
|
|
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
16
16
|
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); }
|
|
17
17
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
18
18
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
19
|
-
var packageVersion = "107.
|
|
19
|
+
var packageVersion = "107.20.0";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// Ignored via go/ees007
|
|
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
23
23
|
* @jsx jsx
|
|
24
24
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
25
|
var packageName = "@atlaskit/editor-common";
|
|
26
|
-
var packageVersion = "107.
|
|
26
|
+
var packageVersion = "107.20.0";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -22,6 +22,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
22
22
|
var _react2 = require("@emotion/react");
|
|
23
23
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
24
24
|
var _menu = require("@atlaskit/menu");
|
|
25
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
25
26
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
26
27
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
27
28
|
var _styles = require("../../styles");
|
|
@@ -327,14 +328,16 @@ function DropdownMenuItem(_ref) {
|
|
|
327
328
|
css: function css() {
|
|
328
329
|
return buttonStyles(item.isActive, submenuActive);
|
|
329
330
|
},
|
|
331
|
+
role: (0, _expValEquals.expValEquals)('platform_editor_august_a11y', 'isEnabled', true) ? shouldUseDefaultRole ? undefined : 'menuitem' : undefined,
|
|
330
332
|
tabIndex: tabIndex,
|
|
331
333
|
"aria-disabled": item.isDisabled ? 'true' : 'false',
|
|
334
|
+
"aria-expanded": (0, _expValEquals.expValEquals)('platform_editor_august_a11y', 'isEnabled', true) ? item['aria-expanded'] : undefined,
|
|
332
335
|
onMouseDown: _handleSubmenuActive
|
|
333
336
|
}, (0, _react2.jsx)(_menu.CustomItem, {
|
|
334
337
|
item: item,
|
|
335
338
|
key: (_item$key2 = item.key) !== null && _item$key2 !== void 0 ? _item$key2 : String(item.content),
|
|
336
339
|
testId: testId,
|
|
337
|
-
role: shouldUseDefaultRole ? 'button' : 'menuitem',
|
|
340
|
+
role: shouldUseDefaultRole ? 'button' : (0, _expValEquals.expValEquals)('platform_editor_august_a11y', 'isEnabled', true) ? undefined : 'menuitem',
|
|
338
341
|
iconBefore: item.elemBefore,
|
|
339
342
|
iconAfter: item.elemAfter,
|
|
340
343
|
isDisabled: item.isDisabled,
|
|
@@ -360,7 +363,7 @@ function DropdownMenuItem(_ref) {
|
|
|
360
363
|
item: item
|
|
361
364
|
});
|
|
362
365
|
},
|
|
363
|
-
"aria-expanded": item['aria-expanded']
|
|
366
|
+
"aria-expanded": (0, _expValEquals.expValEquals)('platform_editor_august_a11y', 'isEnabled', true) ? undefined : item['aria-expanded']
|
|
364
367
|
}, item.content));
|
|
365
368
|
if (item.tooltipDescription) {
|
|
366
369
|
var _item$key3;
|
|
@@ -747,6 +747,17 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
|
|
|
747
747
|
}
|
|
748
748
|
};
|
|
749
749
|
}
|
|
750
|
+
case 'blockTaskItem':
|
|
751
|
+
{
|
|
752
|
+
return {
|
|
753
|
+
type: type,
|
|
754
|
+
content: content,
|
|
755
|
+
attrs: {
|
|
756
|
+
localId: attrs && attrs.localId || (0, _adfSchema.generateUuid)(),
|
|
757
|
+
state: attrs && attrs.state || 'TODO'
|
|
758
|
+
}
|
|
759
|
+
};
|
|
760
|
+
}
|
|
750
761
|
case 'table':
|
|
751
762
|
{
|
|
752
763
|
if (Array.isArray(content) && content.length > 0 && !content.some(function (e) {
|
|
@@ -389,5 +389,15 @@ export const aiConfigItemMessages = defineMessages({
|
|
|
389
389
|
id: 'fabric.editor.ai.config.item.summarize.dropdownItem.title',
|
|
390
390
|
defaultMessage: 'Summarize writing',
|
|
391
391
|
description: 'Title for Atlassian Intelligence "Summarize writing" in editor selection floating toolbar'
|
|
392
|
+
},
|
|
393
|
+
addPolishTitle: {
|
|
394
|
+
id: 'fabric.editor.ai.config.item.addPolish.title',
|
|
395
|
+
defaultMessage: 'Add polish',
|
|
396
|
+
description: 'Describes an option to use Atlassian Intelligence to polish the content currently selected by the user'
|
|
397
|
+
},
|
|
398
|
+
addPolishDescription: {
|
|
399
|
+
id: 'fabric.editor.ai.config.item.addPolish.description',
|
|
400
|
+
defaultMessage: 'Polishes the content to make it more polished',
|
|
401
|
+
description: 'Description for the the Atlassian Intelligence "Add polish".'
|
|
392
402
|
}
|
|
393
403
|
});
|
|
@@ -10,6 +10,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
10
10
|
|
|
11
11
|
import EditorDoneIcon from '@atlaskit/icon/core/migration/check-mark--editor-done';
|
|
12
12
|
import { ButtonItem } from '@atlaskit/menu';
|
|
13
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
14
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
14
15
|
import Tooltip from '@atlaskit/tooltip';
|
|
15
16
|
import { messages } from '../floating-toolbar';
|
|
@@ -153,7 +154,7 @@ export const DropdownMenuItem = props => {
|
|
|
153
154
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
154
155
|
const hasRole = item => {
|
|
155
156
|
var _item$domItemOptions2;
|
|
156
|
-
if (editorExperiment('platform_editor_controls', 'variant1')) {
|
|
157
|
+
if (editorExperiment('platform_editor_controls', 'variant1') || expValEquals('platform_editor_august_a11y', 'isEnabled', true)) {
|
|
157
158
|
var _item$domItemOptions;
|
|
158
159
|
return ((_item$domItemOptions = item.domItemOptions) === null || _item$domItemOptions === void 0 ? void 0 : _item$domItemOptions.type) === 'item-checkbox' ? 'menuitemcheckbox' : 'menuitem';
|
|
159
160
|
}
|
|
@@ -15,6 +15,11 @@ export const mediaInsertMessages = defineMessages({
|
|
|
15
15
|
defaultMessage: 'Paste link to upload',
|
|
16
16
|
description: 'Placeholder text for the input field where a user can paste (as in copy-paste) a URL to upload a media file'
|
|
17
17
|
},
|
|
18
|
+
insertSmartValueHelperMessage: {
|
|
19
|
+
id: 'fabric.editor.media.insert.insertSmartValueHelperMessage',
|
|
20
|
+
defaultMessage: 'Tip: Enter a smart value or replace a URL path with a smart value to make content dynamic.',
|
|
21
|
+
description: 'Helper text for the input field where a user can paste (as in copy-paste) a URL or insert smart value in the url to upload a media file'
|
|
22
|
+
},
|
|
18
23
|
cancel: {
|
|
19
24
|
id: 'fabric.editor.media.insert.cancel',
|
|
20
25
|
defaultMessage: 'Cancel',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "107.
|
|
4
|
+
const packageVersion = "107.20.0";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "107.
|
|
16
|
+
const packageVersion = "107.20.0";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -12,6 +12,7 @@ import React, { PureComponent, useContext } from 'react';
|
|
|
12
12
|
import { css, jsx } from '@emotion/react';
|
|
13
13
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
14
14
|
import { CustomItem, MenuGroup, Section } from '@atlaskit/menu';
|
|
15
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
16
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
16
17
|
import Tooltip from '@atlaskit/tooltip';
|
|
17
18
|
import { DropdownMenuSharedCssClassName } from '../../styles';
|
|
@@ -352,14 +353,16 @@ export function DropdownMenuItem({
|
|
|
352
353
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
353
354
|
jsx("div", {
|
|
354
355
|
css: () => buttonStyles(item.isActive, submenuActive),
|
|
356
|
+
role: expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? shouldUseDefaultRole ? undefined : 'menuitem' : undefined,
|
|
355
357
|
tabIndex: tabIndex,
|
|
356
358
|
"aria-disabled": item.isDisabled ? 'true' : 'false',
|
|
359
|
+
"aria-expanded": expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? item['aria-expanded'] : undefined,
|
|
357
360
|
onMouseDown: _handleSubmenuActive
|
|
358
361
|
}, jsx(CustomItem, {
|
|
359
362
|
item: item,
|
|
360
363
|
key: (_item$key2 = item.key) !== null && _item$key2 !== void 0 ? _item$key2 : String(item.content),
|
|
361
364
|
testId: testId,
|
|
362
|
-
role: shouldUseDefaultRole ? 'button' : 'menuitem',
|
|
365
|
+
role: shouldUseDefaultRole ? 'button' : expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? undefined : 'menuitem',
|
|
363
366
|
iconBefore: item.elemBefore,
|
|
364
367
|
iconAfter: item.elemAfter,
|
|
365
368
|
isDisabled: item.isDisabled,
|
|
@@ -379,7 +382,7 @@ export function DropdownMenuItem({
|
|
|
379
382
|
onMouseLeave: () => onMouseLeave && onMouseLeave({
|
|
380
383
|
item
|
|
381
384
|
}),
|
|
382
|
-
"aria-expanded": item['aria-expanded']
|
|
385
|
+
"aria-expanded": expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? undefined : item['aria-expanded']
|
|
383
386
|
}, item.content));
|
|
384
387
|
if (item.tooltipDescription) {
|
|
385
388
|
var _item$key3;
|
|
@@ -741,6 +741,17 @@ export const getValidNode = (originalNode, schema = defaultSchema, adfStage = 'f
|
|
|
741
741
|
}
|
|
742
742
|
};
|
|
743
743
|
}
|
|
744
|
+
case 'blockTaskItem':
|
|
745
|
+
{
|
|
746
|
+
return {
|
|
747
|
+
type,
|
|
748
|
+
content,
|
|
749
|
+
attrs: {
|
|
750
|
+
localId: attrs && attrs.localId || uuid(),
|
|
751
|
+
state: attrs && attrs.state || 'TODO'
|
|
752
|
+
}
|
|
753
|
+
};
|
|
754
|
+
}
|
|
744
755
|
case 'table':
|
|
745
756
|
{
|
|
746
757
|
if (Array.isArray(content) && content.length > 0 && !content.some(e => e.type !== 'tableRow')) {
|
|
@@ -389,5 +389,15 @@ export var aiConfigItemMessages = defineMessages({
|
|
|
389
389
|
id: 'fabric.editor.ai.config.item.summarize.dropdownItem.title',
|
|
390
390
|
defaultMessage: 'Summarize writing',
|
|
391
391
|
description: 'Title for Atlassian Intelligence "Summarize writing" in editor selection floating toolbar'
|
|
392
|
+
},
|
|
393
|
+
addPolishTitle: {
|
|
394
|
+
id: 'fabric.editor.ai.config.item.addPolish.title',
|
|
395
|
+
defaultMessage: 'Add polish',
|
|
396
|
+
description: 'Describes an option to use Atlassian Intelligence to polish the content currently selected by the user'
|
|
397
|
+
},
|
|
398
|
+
addPolishDescription: {
|
|
399
|
+
id: 'fabric.editor.ai.config.item.addPolish.description',
|
|
400
|
+
defaultMessage: 'Polishes the content to make it more polished',
|
|
401
|
+
description: 'Description for the the Atlassian Intelligence "Add polish".'
|
|
392
402
|
}
|
|
393
403
|
});
|
|
@@ -11,6 +11,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
11
11
|
|
|
12
12
|
import EditorDoneIcon from '@atlaskit/icon/core/migration/check-mark--editor-done';
|
|
13
13
|
import { ButtonItem } from '@atlaskit/menu';
|
|
14
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
14
15
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
15
16
|
import Tooltip from '@atlaskit/tooltip';
|
|
16
17
|
import { messages } from '../floating-toolbar';
|
|
@@ -152,7 +153,7 @@ export var DropdownMenuItem = function DropdownMenuItem(props) {
|
|
|
152
153
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
153
154
|
var hasRole = function hasRole(item) {
|
|
154
155
|
var _item$domItemOptions2;
|
|
155
|
-
if (editorExperiment('platform_editor_controls', 'variant1')) {
|
|
156
|
+
if (editorExperiment('platform_editor_controls', 'variant1') || expValEquals('platform_editor_august_a11y', 'isEnabled', true)) {
|
|
156
157
|
var _item$domItemOptions;
|
|
157
158
|
return ((_item$domItemOptions = item.domItemOptions) === null || _item$domItemOptions === void 0 ? void 0 : _item$domItemOptions.type) === 'item-checkbox' ? 'menuitemcheckbox' : 'menuitem';
|
|
158
159
|
}
|
|
@@ -15,6 +15,11 @@ export var mediaInsertMessages = defineMessages({
|
|
|
15
15
|
defaultMessage: 'Paste link to upload',
|
|
16
16
|
description: 'Placeholder text for the input field where a user can paste (as in copy-paste) a URL to upload a media file'
|
|
17
17
|
},
|
|
18
|
+
insertSmartValueHelperMessage: {
|
|
19
|
+
id: 'fabric.editor.media.insert.insertSmartValueHelperMessage',
|
|
20
|
+
defaultMessage: 'Tip: Enter a smart value or replace a URL path with a smart value to make content dynamic.',
|
|
21
|
+
description: 'Helper text for the input field where a user can paste (as in copy-paste) a URL or insert smart value in the url to upload a media file'
|
|
22
|
+
},
|
|
18
23
|
cancel: {
|
|
19
24
|
id: 'fabric.editor.media.insert.cancel',
|
|
20
25
|
defaultMessage: 'Cancel',
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "107.
|
|
10
|
+
var packageVersion = "107.20.0";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
20
20
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "107.
|
|
23
|
+
var packageVersion = "107.20.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -27,6 +27,7 @@ import React, { PureComponent, useContext } from 'react';
|
|
|
27
27
|
import { css, jsx } from '@emotion/react';
|
|
28
28
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
29
29
|
import { CustomItem, MenuGroup, Section } from '@atlaskit/menu';
|
|
30
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
30
31
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
31
32
|
import Tooltip from '@atlaskit/tooltip';
|
|
32
33
|
import { DropdownMenuSharedCssClassName } from '../../styles';
|
|
@@ -320,14 +321,16 @@ export function DropdownMenuItem(_ref) {
|
|
|
320
321
|
css: function css() {
|
|
321
322
|
return buttonStyles(item.isActive, submenuActive);
|
|
322
323
|
},
|
|
324
|
+
role: expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? shouldUseDefaultRole ? undefined : 'menuitem' : undefined,
|
|
323
325
|
tabIndex: tabIndex,
|
|
324
326
|
"aria-disabled": item.isDisabled ? 'true' : 'false',
|
|
327
|
+
"aria-expanded": expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? item['aria-expanded'] : undefined,
|
|
325
328
|
onMouseDown: _handleSubmenuActive
|
|
326
329
|
}, jsx(CustomItem, {
|
|
327
330
|
item: item,
|
|
328
331
|
key: (_item$key2 = item.key) !== null && _item$key2 !== void 0 ? _item$key2 : String(item.content),
|
|
329
332
|
testId: testId,
|
|
330
|
-
role: shouldUseDefaultRole ? 'button' : 'menuitem',
|
|
333
|
+
role: shouldUseDefaultRole ? 'button' : expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? undefined : 'menuitem',
|
|
331
334
|
iconBefore: item.elemBefore,
|
|
332
335
|
iconAfter: item.elemAfter,
|
|
333
336
|
isDisabled: item.isDisabled,
|
|
@@ -353,7 +356,7 @@ export function DropdownMenuItem(_ref) {
|
|
|
353
356
|
item: item
|
|
354
357
|
});
|
|
355
358
|
},
|
|
356
|
-
"aria-expanded": item['aria-expanded']
|
|
359
|
+
"aria-expanded": expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? undefined : item['aria-expanded']
|
|
357
360
|
}, item.content));
|
|
358
361
|
if (item.tooltipDescription) {
|
|
359
362
|
var _item$key3;
|
|
@@ -740,6 +740,17 @@ export var getValidNode = function getValidNode(originalNode) {
|
|
|
740
740
|
}
|
|
741
741
|
};
|
|
742
742
|
}
|
|
743
|
+
case 'blockTaskItem':
|
|
744
|
+
{
|
|
745
|
+
return {
|
|
746
|
+
type: type,
|
|
747
|
+
content: content,
|
|
748
|
+
attrs: {
|
|
749
|
+
localId: attrs && attrs.localId || uuid(),
|
|
750
|
+
state: attrs && attrs.state || 'TODO'
|
|
751
|
+
}
|
|
752
|
+
};
|
|
753
|
+
}
|
|
743
754
|
case 'table':
|
|
744
755
|
{
|
|
745
756
|
if (Array.isArray(content) && content.length > 0 && !content.some(function (e) {
|
|
@@ -369,4 +369,14 @@ export declare const aiConfigItemMessages: {
|
|
|
369
369
|
defaultMessage: string;
|
|
370
370
|
description: string;
|
|
371
371
|
};
|
|
372
|
+
addPolishTitle: {
|
|
373
|
+
id: string;
|
|
374
|
+
defaultMessage: string;
|
|
375
|
+
description: string;
|
|
376
|
+
};
|
|
377
|
+
addPolishDescription: {
|
|
378
|
+
id: string;
|
|
379
|
+
defaultMessage: string;
|
|
380
|
+
description: string;
|
|
381
|
+
};
|
|
372
382
|
};
|
|
@@ -14,6 +14,11 @@ export declare const mediaInsertMessages: {
|
|
|
14
14
|
defaultMessage: string;
|
|
15
15
|
description: string;
|
|
16
16
|
};
|
|
17
|
+
insertSmartValueHelperMessage: {
|
|
18
|
+
id: string;
|
|
19
|
+
defaultMessage: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
17
22
|
cancel: {
|
|
18
23
|
id: string;
|
|
19
24
|
defaultMessage: string;
|
|
@@ -369,4 +369,14 @@ export declare const aiConfigItemMessages: {
|
|
|
369
369
|
defaultMessage: string;
|
|
370
370
|
description: string;
|
|
371
371
|
};
|
|
372
|
+
addPolishTitle: {
|
|
373
|
+
id: string;
|
|
374
|
+
defaultMessage: string;
|
|
375
|
+
description: string;
|
|
376
|
+
};
|
|
377
|
+
addPolishDescription: {
|
|
378
|
+
id: string;
|
|
379
|
+
defaultMessage: string;
|
|
380
|
+
description: string;
|
|
381
|
+
};
|
|
372
382
|
};
|
|
@@ -14,6 +14,11 @@ export declare const mediaInsertMessages: {
|
|
|
14
14
|
defaultMessage: string;
|
|
15
15
|
description: string;
|
|
16
16
|
};
|
|
17
|
+
insertSmartValueHelperMessage: {
|
|
18
|
+
id: string;
|
|
19
|
+
defaultMessage: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
17
22
|
cancel: {
|
|
18
23
|
id: string;
|
|
19
24
|
defaultMessage: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "107.
|
|
3
|
+
"version": "107.20.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/"
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"dependencies": {
|
|
126
126
|
"@atlaskit/activity-provider": "^2.5.0",
|
|
127
127
|
"@atlaskit/adf-schema": "^50.2.0",
|
|
128
|
-
"@atlaskit/adf-utils": "^19.
|
|
128
|
+
"@atlaskit/adf-utils": "^19.21.0",
|
|
129
129
|
"@atlaskit/analytics-listeners": "^9.0.0",
|
|
130
130
|
"@atlaskit/analytics-namespaced-context": "^7.0.0",
|
|
131
131
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"@atlaskit/platform-feature-flags-react": "^0.2.0",
|
|
163
163
|
"@atlaskit/popper": "^7.1.0",
|
|
164
164
|
"@atlaskit/primitives": "^14.11.0",
|
|
165
|
-
"@atlaskit/profilecard": "^24.
|
|
165
|
+
"@atlaskit/profilecard": "^24.3.0",
|
|
166
166
|
"@atlaskit/react-ufo": "^4.2.0",
|
|
167
167
|
"@atlaskit/section-message": "^8.5.0",
|
|
168
168
|
"@atlaskit/smart-card": "^40.7.0",
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
"@atlaskit/task-decision": "^19.2.0",
|
|
173
173
|
"@atlaskit/textfield": "^8.0.0",
|
|
174
174
|
"@atlaskit/theme": "^19.0.0",
|
|
175
|
-
"@atlaskit/tmp-editor-statsig": "^9.
|
|
175
|
+
"@atlaskit/tmp-editor-statsig": "^9.26.0",
|
|
176
176
|
"@atlaskit/tokens": "^6.0.0",
|
|
177
177
|
"@atlaskit/tooltip": "^20.4.0",
|
|
178
178
|
"@atlaskit/width-detector": "^5.0.0",
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
"@af/visual-regression": "workspace:^",
|
|
214
214
|
"@atlaskit/media-core": "^37.0.0",
|
|
215
215
|
"@atlaskit/media-test-helpers": "^37.0.0",
|
|
216
|
-
"@atlaskit/util-data-test": "^18.
|
|
216
|
+
"@atlaskit/util-data-test": "^18.1.0",
|
|
217
217
|
"@atlaskit/visual-regression": "workspace:^",
|
|
218
218
|
"@testing-library/dom": "^10.1.0",
|
|
219
219
|
"@testing-library/jest-dom": "^6.4.5",
|