@atlaskit/editor-plugin-expand 18.1.1 → 18.1.3
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 +14 -0
- package/dist/cjs/legacyExpand/nodeviews/index.js +3 -4
- package/dist/cjs/singlePlayerExpand/ui/NodeView.js +3 -5
- package/dist/es2019/legacyExpand/nodeviews/index.js +3 -5
- package/dist/es2019/singlePlayerExpand/ui/NodeView.js +3 -6
- package/dist/esm/legacyExpand/nodeviews/index.js +3 -4
- package/dist/esm/singlePlayerExpand/ui/NodeView.js +3 -5
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-expand
|
|
2
2
|
|
|
3
|
+
## 18.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6322f75743dc1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6322f75743dc1) -
|
|
8
|
+
Clean up experiment platform_editor_expand_content_a11y
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 18.1.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 18.1.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -64,15 +64,14 @@ var toDOM = function toDOM(node, __livePage, intl, titleReadOnly, contentEditabl
|
|
|
64
64
|
placeholder: intl && intl.formatMessage(_ui.expandMessages.expandPlaceholderText) || _ui.expandMessages.expandPlaceholderText.defaultMessage,
|
|
65
65
|
type: 'text',
|
|
66
66
|
readonly: titleReadOnly ? 'true' : undefined
|
|
67
|
-
}]]], ['div',
|
|
67
|
+
}]]], ['div', {
|
|
68
68
|
// prettier-ignore
|
|
69
69
|
class: "".concat(_styles.expandClassNames.content, " ").concat((__livePage ? !node.attrs.__expanded : node.attrs.__expanded) ? '' : _styles.expandClassNames.contentCollapsed),
|
|
70
|
-
contenteditable: contentEditable !== undefined ? contentEditable ? 'true' : 'false' : undefined
|
|
71
|
-
}, (0, _expValEquals.expValEquals)('platform_editor_expand_content_a11y', 'isEnabled', true) && {
|
|
70
|
+
contenteditable: contentEditable !== undefined ? contentEditable ? 'true' : 'false' : undefined,
|
|
72
71
|
role: 'textbox',
|
|
73
72
|
'aria-multiline': 'true',
|
|
74
73
|
'aria-label': intl && intl.formatMessage(_ui.expandMessages.expandBodyAriaLabel) || _ui.expandMessages.expandBodyAriaLabel.defaultMessage
|
|
75
|
-
}
|
|
74
|
+
}, 0]];
|
|
76
75
|
};
|
|
77
76
|
var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
|
|
78
77
|
function ExpandNodeView(_node, view, getPos, getIntl, isMobile, selectNearNode, api, nodeViewPortalProviderAPI) {
|
|
@@ -10,7 +10,6 @@ var _expand = require("@atlaskit/editor-common/expand");
|
|
|
10
10
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
11
11
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
12
12
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
13
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
14
13
|
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
14
|
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
15
|
var buildExpandClassName = exports.buildExpandClassName = function buildExpandClassName(type, expanded) {
|
|
@@ -49,13 +48,12 @@ var toDOM = exports.toDOM = function toDOM(node, __livePage, intl, titleReadOnly
|
|
|
49
48
|
placeholder: intl && typeof intl.formatMessage === 'function' && intl.formatMessage(_ui.expandMessages.expandPlaceholderText) || _ui.expandMessages.expandPlaceholderText.defaultMessage,
|
|
50
49
|
type: 'text',
|
|
51
50
|
readonly: titleReadOnly ? 'true' : undefined
|
|
52
|
-
}]]], ['div',
|
|
51
|
+
}]]], ['div', {
|
|
53
52
|
// prettier-ignore
|
|
54
53
|
class: "".concat(_styles.expandClassNames.content, " ").concat(_expand.expandedState.get(node) ? '' : _styles.expandClassNames.contentCollapsed),
|
|
55
|
-
contenteditable: contentEditable !== undefined ? contentEditable ? 'true' : 'false' : undefined
|
|
56
|
-
}, (0, _expValEquals.expValEquals)('platform_editor_expand_content_a11y', 'isEnabled', true) && {
|
|
54
|
+
contenteditable: contentEditable !== undefined ? contentEditable ? 'true' : 'false' : undefined,
|
|
57
55
|
role: 'textbox',
|
|
58
56
|
'aria-multiline': 'true',
|
|
59
57
|
'aria-label': intl && intl.formatMessage(_ui.expandMessages.expandBodyAriaLabel) || _ui.expandMessages.expandBodyAriaLabel.defaultMessage
|
|
60
|
-
}
|
|
58
|
+
}, 0]];
|
|
61
59
|
};
|
|
@@ -57,11 +57,9 @@ const toDOM = (node, __livePage, intl, titleReadOnly, contentEditable) => ['div'
|
|
|
57
57
|
// prettier-ignore
|
|
58
58
|
class: `${expandClassNames.content} ${(__livePage ? !node.attrs.__expanded : node.attrs.__expanded) ? '' : expandClassNames.contentCollapsed}`,
|
|
59
59
|
contenteditable: contentEditable !== undefined ? contentEditable ? 'true' : 'false' : undefined,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
'aria-label': intl && intl.formatMessage(expandMessages.expandBodyAriaLabel) || expandMessages.expandBodyAriaLabel.defaultMessage
|
|
64
|
-
})
|
|
60
|
+
role: 'textbox',
|
|
61
|
+
'aria-multiline': 'true',
|
|
62
|
+
'aria-label': intl && intl.formatMessage(expandMessages.expandBodyAriaLabel) || expandMessages.expandBodyAriaLabel.defaultMessage
|
|
65
63
|
}, 0]];
|
|
66
64
|
export class ExpandNodeView {
|
|
67
65
|
constructor(_node, view, getPos, getIntl, isMobile, selectNearNode, api, nodeViewPortalProviderAPI, allowInteractiveExpand = true, __livePage = false, cleanUpEditorDisabledOnChange) {
|
|
@@ -2,7 +2,6 @@ import { expandedState } from '@atlaskit/editor-common/expand';
|
|
|
2
2
|
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
3
3
|
import { expandMessages } from '@atlaskit/editor-common/ui';
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
5
|
export const buildExpandClassName = (type, expanded) => {
|
|
7
6
|
return `${expandClassNames.prefix} ${expandClassNames.type(type)} ${expanded ? expandClassNames.expanded : ''}`;
|
|
8
7
|
};
|
|
@@ -44,10 +43,8 @@ export const toDOM = (node, __livePage, intl, titleReadOnly, contentEditable) =>
|
|
|
44
43
|
// prettier-ignore
|
|
45
44
|
class: `${expandClassNames.content} ${expandedState.get(node) ? '' : expandClassNames.contentCollapsed}`,
|
|
46
45
|
contenteditable: contentEditable !== undefined ? contentEditable ? 'true' : 'false' : undefined,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
'aria-label': intl && intl.formatMessage(expandMessages.expandBodyAriaLabel) || expandMessages.expandBodyAriaLabel.defaultMessage
|
|
51
|
-
})
|
|
46
|
+
role: 'textbox',
|
|
47
|
+
'aria-multiline': 'true',
|
|
48
|
+
'aria-label': intl && intl.formatMessage(expandMessages.expandBodyAriaLabel) || expandMessages.expandBodyAriaLabel.defaultMessage
|
|
52
49
|
}, 0]];
|
|
53
50
|
};
|
|
@@ -57,15 +57,14 @@ var toDOM = function toDOM(node, __livePage, intl, titleReadOnly, contentEditabl
|
|
|
57
57
|
placeholder: intl && intl.formatMessage(expandMessages.expandPlaceholderText) || expandMessages.expandPlaceholderText.defaultMessage,
|
|
58
58
|
type: 'text',
|
|
59
59
|
readonly: titleReadOnly ? 'true' : undefined
|
|
60
|
-
}]]], ['div',
|
|
60
|
+
}]]], ['div', {
|
|
61
61
|
// prettier-ignore
|
|
62
62
|
class: "".concat(expandClassNames.content, " ").concat((__livePage ? !node.attrs.__expanded : node.attrs.__expanded) ? '' : expandClassNames.contentCollapsed),
|
|
63
|
-
contenteditable: contentEditable !== undefined ? contentEditable ? 'true' : 'false' : undefined
|
|
64
|
-
}, expValEquals('platform_editor_expand_content_a11y', 'isEnabled', true) && {
|
|
63
|
+
contenteditable: contentEditable !== undefined ? contentEditable ? 'true' : 'false' : undefined,
|
|
65
64
|
role: 'textbox',
|
|
66
65
|
'aria-multiline': 'true',
|
|
67
66
|
'aria-label': intl && intl.formatMessage(expandMessages.expandBodyAriaLabel) || expandMessages.expandBodyAriaLabel.defaultMessage
|
|
68
|
-
}
|
|
67
|
+
}, 0]];
|
|
69
68
|
};
|
|
70
69
|
export var ExpandNodeView = /*#__PURE__*/function () {
|
|
71
70
|
function ExpandNodeView(_node, view, getPos, getIntl, isMobile, selectNearNode, api, nodeViewPortalProviderAPI) {
|
|
@@ -5,7 +5,6 @@ import { expandedState } from '@atlaskit/editor-common/expand';
|
|
|
5
5
|
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
6
6
|
import { expandMessages } from '@atlaskit/editor-common/ui';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
8
|
export var buildExpandClassName = function buildExpandClassName(type, expanded) {
|
|
10
9
|
return "".concat(expandClassNames.prefix, " ").concat(expandClassNames.type(type), " ").concat(expanded ? expandClassNames.expanded : '');
|
|
11
10
|
};
|
|
@@ -42,13 +41,12 @@ export var toDOM = function toDOM(node, __livePage, intl, titleReadOnly, content
|
|
|
42
41
|
placeholder: intl && typeof intl.formatMessage === 'function' && intl.formatMessage(expandMessages.expandPlaceholderText) || expandMessages.expandPlaceholderText.defaultMessage,
|
|
43
42
|
type: 'text',
|
|
44
43
|
readonly: titleReadOnly ? 'true' : undefined
|
|
45
|
-
}]]], ['div',
|
|
44
|
+
}]]], ['div', {
|
|
46
45
|
// prettier-ignore
|
|
47
46
|
class: "".concat(expandClassNames.content, " ").concat(expandedState.get(node) ? '' : expandClassNames.contentCollapsed),
|
|
48
|
-
contenteditable: contentEditable !== undefined ? contentEditable ? 'true' : 'false' : undefined
|
|
49
|
-
}, expValEquals('platform_editor_expand_content_a11y', 'isEnabled', true) && {
|
|
47
|
+
contenteditable: contentEditable !== undefined ? contentEditable ? 'true' : 'false' : undefined,
|
|
50
48
|
role: 'textbox',
|
|
51
49
|
'aria-multiline': 'true',
|
|
52
50
|
'aria-label': intl && intl.formatMessage(expandMessages.expandBodyAriaLabel) || expandMessages.expandBodyAriaLabel.defaultMessage
|
|
53
|
-
}
|
|
51
|
+
}, 0]];
|
|
54
52
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-expand",
|
|
3
|
-
"version": "18.1.
|
|
3
|
+
"version": "18.1.3",
|
|
4
4
|
"description": "Expand plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
45
45
|
"@atlaskit/prosemirror-history": "^1.2.0",
|
|
46
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^182.0.0",
|
|
47
47
|
"@atlaskit/tokens": "^16.11.0",
|
|
48
48
|
"@atlaskit/tooltip": "^24.3.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|