@atlaskit/editor-plugin-expand 9.1.30 → 9.1.31
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 +9 -0
- package/dist/cjs/singlePlayerExpand/node-views/index.js +3 -4
- package/dist/cjs/ui/ExpandBlockMenuItem.js +1 -7
- package/dist/es2019/singlePlayerExpand/node-views/index.js +3 -4
- package/dist/es2019/ui/ExpandBlockMenuItem.js +1 -7
- package/dist/esm/singlePlayerExpand/node-views/index.js +3 -4
- package/dist/esm/ui/ExpandBlockMenuItem.js +1 -7
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-expand
|
|
2
2
|
|
|
3
|
+
## 9.1.31
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`1bd298ad0a152`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1bd298ad0a152) -
|
|
8
|
+
[ux] EDITOR-6280 Clean up platform_editor_block_menu_v2_patch_3 to fix icon and copy in jira block
|
|
9
|
+
menu
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 9.1.30
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -18,7 +18,6 @@ var _styles = require("@atlaskit/editor-common/styles");
|
|
|
18
18
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
19
19
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
20
20
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
21
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
22
21
|
var _prosemirrorHistory = require("@atlaskit/prosemirror-history");
|
|
23
22
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
24
23
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
@@ -490,7 +489,7 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
|
|
|
490
489
|
this.node = _node;
|
|
491
490
|
if ((0, _experiments.editorExperiment)('platform_editor_block_menu', true, {
|
|
492
491
|
exposure: true
|
|
493
|
-
})
|
|
492
|
+
})) {
|
|
494
493
|
var _expandedState$get;
|
|
495
494
|
this.isExpanded.expanded = (_expandedState$get = _expand.expandedState.get(_node)) !== null && _expandedState$get !== void 0 ? _expandedState$get : false;
|
|
496
495
|
this.isExpanded.localId = _node.attrs.localId;
|
|
@@ -601,7 +600,7 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
|
|
|
601
600
|
var currentExpanded = (_expandedState$get2 = _expand.expandedState.get(node)) !== null && _expandedState$get2 !== void 0 ? _expandedState$get2 : false;
|
|
602
601
|
var hasChanged = (0, _experiments.editorExperiment)('platform_editor_block_menu', true, {
|
|
603
602
|
exposure: true
|
|
604
|
-
})
|
|
603
|
+
}) ? this.isExpanded.expanded !== currentExpanded && this.isExpanded.localId === node.attrs.localId : this.isExpanded.expanded !== currentExpanded;
|
|
605
604
|
if (hasChanged) {
|
|
606
605
|
this.updateExpandToggleIcon(node);
|
|
607
606
|
this.updateDisplayStyle(node);
|
|
@@ -636,7 +635,7 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
|
|
|
636
635
|
this.updateExpandBodyContentEditable();
|
|
637
636
|
this.isExpanded = (0, _experiments.editorExperiment)('platform_editor_block_menu', true, {
|
|
638
637
|
exposure: true
|
|
639
|
-
})
|
|
638
|
+
}) ? {
|
|
640
639
|
expanded: expanded !== null && expanded !== void 0 ? expanded : false,
|
|
641
640
|
localId: node.attrs.localId
|
|
642
641
|
} : {
|
|
@@ -11,7 +11,6 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
11
11
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
12
12
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
13
13
|
var _expandElement = _interopRequireDefault(require("@atlaskit/icon-lab/core/expand-element"));
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var NODE_NAME = 'expand';
|
|
16
15
|
var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
|
|
17
16
|
var api = _ref.api;
|
|
@@ -33,16 +32,11 @@ var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
|
|
|
33
32
|
}) : null;
|
|
34
33
|
});
|
|
35
34
|
};
|
|
36
|
-
|
|
37
|
-
// [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
|
|
38
|
-
// Adds size="small" to icons for better visual consistency in block menu.
|
|
39
|
-
// To clean up: remove conditional, keep only size="small" version.
|
|
40
|
-
var iconSize = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
|
|
41
35
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
|
|
42
36
|
onClick: handleClick,
|
|
43
37
|
elemBefore: /*#__PURE__*/_react.default.createElement(_expandElement.default, {
|
|
44
38
|
label: "",
|
|
45
|
-
size:
|
|
39
|
+
size: "small"
|
|
46
40
|
})
|
|
47
41
|
}, formatMessage(_messages.toolbarInsertBlockMessages.expand));
|
|
48
42
|
};
|
|
@@ -9,7 +9,6 @@ import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
|
9
9
|
import { closestElement, isEmptyNode } from '@atlaskit/editor-common/utils';
|
|
10
10
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
11
11
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
12
|
import { redo, undo } from '@atlaskit/prosemirror-history';
|
|
14
13
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
14
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -493,7 +492,7 @@ export class ExpandNodeView {
|
|
|
493
492
|
this.node = _node;
|
|
494
493
|
if (editorExperiment('platform_editor_block_menu', true, {
|
|
495
494
|
exposure: true
|
|
496
|
-
})
|
|
495
|
+
})) {
|
|
497
496
|
var _expandedState$get;
|
|
498
497
|
this.isExpanded.expanded = (_expandedState$get = expandedState.get(_node)) !== null && _expandedState$get !== void 0 ? _expandedState$get : false;
|
|
499
498
|
this.isExpanded.localId = _node.attrs.localId;
|
|
@@ -598,7 +597,7 @@ export class ExpandNodeView {
|
|
|
598
597
|
const currentExpanded = (_expandedState$get2 = expandedState.get(node)) !== null && _expandedState$get2 !== void 0 ? _expandedState$get2 : false;
|
|
599
598
|
const hasChanged = editorExperiment('platform_editor_block_menu', true, {
|
|
600
599
|
exposure: true
|
|
601
|
-
})
|
|
600
|
+
}) ? this.isExpanded.expanded !== currentExpanded && this.isExpanded.localId === node.attrs.localId : this.isExpanded.expanded !== currentExpanded;
|
|
602
601
|
if (hasChanged) {
|
|
603
602
|
this.updateExpandToggleIcon(node);
|
|
604
603
|
this.updateDisplayStyle(node);
|
|
@@ -629,7 +628,7 @@ export class ExpandNodeView {
|
|
|
629
628
|
this.updateExpandBodyContentEditable();
|
|
630
629
|
this.isExpanded = editorExperiment('platform_editor_block_menu', true, {
|
|
631
630
|
exposure: true
|
|
632
|
-
})
|
|
631
|
+
}) ? {
|
|
633
632
|
expanded: expanded !== null && expanded !== void 0 ? expanded : false,
|
|
634
633
|
localId: node.attrs.localId
|
|
635
634
|
} : {
|
|
@@ -4,7 +4,6 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
4
4
|
import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
|
|
5
5
|
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
6
6
|
import ExpandElementIcon from '@atlaskit/icon-lab/core/expand-element';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
const NODE_NAME = 'expand';
|
|
9
8
|
const ExpandBlockMenuItem = ({
|
|
10
9
|
api
|
|
@@ -29,16 +28,11 @@ const ExpandBlockMenuItem = ({
|
|
|
29
28
|
}) : null;
|
|
30
29
|
});
|
|
31
30
|
};
|
|
32
|
-
|
|
33
|
-
// [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
|
|
34
|
-
// Adds size="small" to icons for better visual consistency in block menu.
|
|
35
|
-
// To clean up: remove conditional, keep only size="small" version.
|
|
36
|
-
const iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
|
|
37
31
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
38
32
|
onClick: handleClick,
|
|
39
33
|
elemBefore: /*#__PURE__*/React.createElement(ExpandElementIcon, {
|
|
40
34
|
label: "",
|
|
41
|
-
size:
|
|
35
|
+
size: "small"
|
|
42
36
|
})
|
|
43
37
|
}, formatMessage(toolbarInsertBlockMessages.expand));
|
|
44
38
|
};
|
|
@@ -11,7 +11,6 @@ import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
|
11
11
|
import { closestElement, isEmptyNode } from '@atlaskit/editor-common/utils';
|
|
12
12
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
13
13
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
14
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
14
|
import { redo, undo } from '@atlaskit/prosemirror-history';
|
|
16
15
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
16
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -482,7 +481,7 @@ export var ExpandNodeView = /*#__PURE__*/function () {
|
|
|
482
481
|
this.node = _node;
|
|
483
482
|
if (editorExperiment('platform_editor_block_menu', true, {
|
|
484
483
|
exposure: true
|
|
485
|
-
})
|
|
484
|
+
})) {
|
|
486
485
|
var _expandedState$get;
|
|
487
486
|
this.isExpanded.expanded = (_expandedState$get = expandedState.get(_node)) !== null && _expandedState$get !== void 0 ? _expandedState$get : false;
|
|
488
487
|
this.isExpanded.localId = _node.attrs.localId;
|
|
@@ -593,7 +592,7 @@ export var ExpandNodeView = /*#__PURE__*/function () {
|
|
|
593
592
|
var currentExpanded = (_expandedState$get2 = expandedState.get(node)) !== null && _expandedState$get2 !== void 0 ? _expandedState$get2 : false;
|
|
594
593
|
var hasChanged = editorExperiment('platform_editor_block_menu', true, {
|
|
595
594
|
exposure: true
|
|
596
|
-
})
|
|
595
|
+
}) ? this.isExpanded.expanded !== currentExpanded && this.isExpanded.localId === node.attrs.localId : this.isExpanded.expanded !== currentExpanded;
|
|
597
596
|
if (hasChanged) {
|
|
598
597
|
this.updateExpandToggleIcon(node);
|
|
599
598
|
this.updateDisplayStyle(node);
|
|
@@ -628,7 +627,7 @@ export var ExpandNodeView = /*#__PURE__*/function () {
|
|
|
628
627
|
this.updateExpandBodyContentEditable();
|
|
629
628
|
this.isExpanded = editorExperiment('platform_editor_block_menu', true, {
|
|
630
629
|
exposure: true
|
|
631
|
-
})
|
|
630
|
+
}) ? {
|
|
632
631
|
expanded: expanded !== null && expanded !== void 0 ? expanded : false,
|
|
633
632
|
localId: node.attrs.localId
|
|
634
633
|
} : {
|
|
@@ -4,7 +4,6 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
4
4
|
import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
|
|
5
5
|
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
6
6
|
import ExpandElementIcon from '@atlaskit/icon-lab/core/expand-element';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
var NODE_NAME = 'expand';
|
|
9
8
|
var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
|
|
10
9
|
var api = _ref.api;
|
|
@@ -26,16 +25,11 @@ var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
|
|
|
26
25
|
}) : null;
|
|
27
26
|
});
|
|
28
27
|
};
|
|
29
|
-
|
|
30
|
-
// [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
|
|
31
|
-
// Adds size="small" to icons for better visual consistency in block menu.
|
|
32
|
-
// To clean up: remove conditional, keep only size="small" version.
|
|
33
|
-
var iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
|
|
34
28
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
35
29
|
onClick: handleClick,
|
|
36
30
|
elemBefore: /*#__PURE__*/React.createElement(ExpandElementIcon, {
|
|
37
31
|
label: "",
|
|
38
|
-
size:
|
|
32
|
+
size: "small"
|
|
39
33
|
})
|
|
40
34
|
}, formatMessage(toolbarInsertBlockMessages.expand));
|
|
41
35
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-expand",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.31",
|
|
4
4
|
"description": "Expand plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/icon-lab": "^6.5.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
50
50
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^62.
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^62.2.0",
|
|
52
52
|
"@atlaskit/tokens": "^13.0.0",
|
|
53
53
|
"@atlaskit/tooltip": "^21.1.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|