@atlaskit/editor-plugin-expand 9.1.30 → 10.0.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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/editor-plugin-expand
2
2
 
3
+ ## 10.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 9.1.31
10
+
11
+ ### Patch Changes
12
+
13
+ - [`1bd298ad0a152`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1bd298ad0a152) -
14
+ [ux] EDITOR-6280 Clean up platform_editor_block_menu_v2_patch_3 to fix icon and copy in jira block
15
+ menu
16
+ - Updated dependencies
17
+
3
18
  ## 9.1.30
4
19
 
5
20
  ### 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
- }) && (0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_3')) {
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
- }) && (0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_3') ? this.isExpanded.expanded !== currentExpanded && this.isExpanded.localId === node.attrs.localId : this.isExpanded.expanded !== currentExpanded;
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
- }) && (0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_3') ? {
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: iconSize
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
- }) && fg('platform_editor_block_menu_v2_patch_3')) {
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
- }) && fg('platform_editor_block_menu_v2_patch_3') ? this.isExpanded.expanded !== currentExpanded && this.isExpanded.localId === node.attrs.localId : this.isExpanded.expanded !== currentExpanded;
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
- }) && fg('platform_editor_block_menu_v2_patch_3') ? {
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: iconSize
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
- }) && fg('platform_editor_block_menu_v2_patch_3')) {
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
- }) && fg('platform_editor_block_menu_v2_patch_3') ? this.isExpanded.expanded !== currentExpanded && this.isExpanded.localId === node.attrs.localId : this.isExpanded.expanded !== currentExpanded;
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
- }) && fg('platform_editor_block_menu_v2_patch_3') ? {
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: iconSize
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.30",
3
+ "version": "10.0.0",
4
4
  "description": "Expand plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -29,26 +29,26 @@
29
29
  ],
30
30
  "atlaskit:src": "src/index.ts",
31
31
  "dependencies": {
32
- "@atlaskit/adf-schema": "^52.4.0",
32
+ "@atlaskit/adf-schema": "^52.5.0",
33
33
  "@atlaskit/button": "^23.11.0",
34
- "@atlaskit/editor-plugin-analytics": "^8.0.0",
35
- "@atlaskit/editor-plugin-block-controls": "^9.1.0",
36
- "@atlaskit/editor-plugin-block-menu": "^7.0.0",
37
- "@atlaskit/editor-plugin-decorations": "^8.0.0",
38
- "@atlaskit/editor-plugin-editor-disabled": "^8.0.0",
39
- "@atlaskit/editor-plugin-editor-viewmode": "^10.0.0",
40
- "@atlaskit/editor-plugin-local-id": "^6.1.0",
41
- "@atlaskit/editor-plugin-selection": "^8.0.0",
42
- "@atlaskit/editor-plugin-selection-marker": "^8.0.0",
34
+ "@atlaskit/editor-plugin-analytics": "^9.0.0",
35
+ "@atlaskit/editor-plugin-block-controls": "^10.0.0",
36
+ "@atlaskit/editor-plugin-block-menu": "^8.0.0",
37
+ "@atlaskit/editor-plugin-decorations": "^9.0.0",
38
+ "@atlaskit/editor-plugin-editor-disabled": "^9.0.0",
39
+ "@atlaskit/editor-plugin-editor-viewmode": "^11.0.0",
40
+ "@atlaskit/editor-plugin-local-id": "^7.0.0",
41
+ "@atlaskit/editor-plugin-selection": "^9.0.0",
42
+ "@atlaskit/editor-plugin-selection-marker": "^9.0.0",
43
43
  "@atlaskit/editor-prosemirror": "^7.3.0",
44
44
  "@atlaskit/editor-shared-styles": "^3.10.0",
45
45
  "@atlaskit/editor-tables": "^2.9.0",
46
46
  "@atlaskit/editor-toolbar": "^0.20.0",
47
- "@atlaskit/icon": "^34.1.0",
47
+ "@atlaskit/icon": "^34.2.0",
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.0.0",
51
+ "@atlaskit/tmp-editor-statsig": "^62.4.0",
52
52
  "@atlaskit/tokens": "^13.0.0",
53
53
  "@atlaskit/tooltip": "^21.1.0",
54
54
  "@babel/runtime": "^7.0.0",
@@ -57,7 +57,7 @@
57
57
  "w3c-keyname": "^2.1.8"
58
58
  },
59
59
  "peerDependencies": {
60
- "@atlaskit/editor-common": "^112.21.0",
60
+ "@atlaskit/editor-common": "^113.0.0",
61
61
  "react": "^18.2.0",
62
62
  "react-dom": "^18.2.0",
63
63
  "react-intl-next": "npm:react-intl@^5.18.1"