@atlaskit/editor-plugin-breakout 12.1.1 → 12.2.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,16 @@
1
1
  # @atlaskit/editor-plugin-breakout
2
2
 
3
+ ## 12.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`319eb8550d286`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/319eb8550d286) -
8
+ [ux] [EDITOR-7978] add resizing support to the panel_c1 node behind resizer experiment
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
3
14
  ## 12.1.1
4
15
 
5
16
  ### Patch Changes
@@ -51,8 +51,9 @@ var handleKeyDown = exports.handleKeyDown = function handleKeyDown(api) {
51
51
  codeBlock = _view$state$schema$no.codeBlock,
52
52
  layoutSection = _view$state$schema$no.layoutSection,
53
53
  rule = _view$state$schema$no.rule,
54
- panel = _view$state$schema$no.panel;
55
- var breakoutResizableNodes = (0, _experiments.editorExperiment)('platform_synced_block', true) ? (0, _utils.getBreakoutResizableNodeTypes)(view.state.schema, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true)) : (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true) ? new Set([expand, codeBlock, layoutSection, rule, panel]) : new Set([expand, codeBlock, layoutSection]);
54
+ panel = _view$state$schema$no.panel,
55
+ panel_c1 = _view$state$schema$no.panel_c1;
56
+ var breakoutResizableNodes = (0, _experiments.editorExperiment)('platform_synced_block', true) ? (0, _utils.getBreakoutResizableNodeTypes)(view.state.schema, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true)) : (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true) ? new Set([expand, codeBlock, layoutSection, rule, panel, panel_c1]) : new Set([expand, codeBlock, layoutSection]);
56
57
  var result = getAncestorResizableNode(view, breakoutResizableNodes);
57
58
  if (result) {
58
59
  var node = result.node,
@@ -26,7 +26,7 @@ var getNodeName = function getNodeName(nodeName) {
26
26
  return 'layout';
27
27
  } else if (nodeName === 'codeBlock' || nodeName === 'expand') {
28
28
  return nodeName;
29
- } else if ((nodeName === 'rule' || nodeName === 'panel') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true)) {
29
+ } else if ((nodeName === 'rule' || nodeName === 'panel' || nodeName === 'panel_c1') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true)) {
30
30
  return nodeName;
31
31
  } else {
32
32
  return 'node';
@@ -38,6 +38,7 @@ var resizeHandleMessage = exports.resizeHandleMessage = {
38
38
  layout: _messages.breakoutMessages.resizeLayout,
39
39
  rule: _messages.breakoutMessages.resizeRule,
40
40
  panel: _messages.breakoutMessages.resizePanel,
41
+ panel_c1: _messages.breakoutMessages.resizePanel,
41
42
  node: _messages.breakoutMessages.resizeElement
42
43
  };
43
44
  var RailWithTooltip = function RailWithTooltip(_ref) {
@@ -180,7 +180,7 @@ var ResizingMarkView = exports.ResizingMarkView = /*#__PURE__*/function () {
180
180
  var nodeName = (_view$state$doc$nodeA = view.state.doc.nodeAt(pos)) === null || _view$state$doc$nodeA === void 0 ? void 0 : _view$state$doc$nodeA.type.name;
181
181
 
182
182
  // if the node is a panel or a rule, do NOT set up the resizer callbacks
183
- if (nodeName && ['panel', 'rule'].includes(nodeName) || _this2.isResizingInitialised) {
183
+ if (nodeName && ['panel', 'rule', 'panel_c1'].includes(nodeName) || _this2.isResizingInitialised) {
184
184
  return;
185
185
  }
186
186
 
@@ -133,8 +133,9 @@ var createResizingPlugin = exports.createResizingPlugin = function createResizin
133
133
  codeBlock = _newState$schema$node.codeBlock,
134
134
  layoutSection = _newState$schema$node.layoutSection,
135
135
  rule = _newState$schema$node.rule,
136
- panel = _newState$schema$node.panel;
137
- var breakoutResizableNodes = (0, _experiments.editorExperiment)('platform_synced_block', true) ? (0, _utils.getBreakoutResizableNodeTypes)(newState.schema, isRuleAndPanelResizingEnabled) : isRuleAndPanelResizingEnabled ? new Set([expand, codeBlock, layoutSection, rule, panel]) : new Set([expand, codeBlock, layoutSection]);
136
+ panel = _newState$schema$node.panel,
137
+ panel_c1 = _newState$schema$node.panel_c1;
138
+ var breakoutResizableNodes = (0, _experiments.editorExperiment)('platform_synced_block', true) ? (0, _utils.getBreakoutResizableNodeTypes)(newState.schema, isRuleAndPanelResizingEnabled) : isRuleAndPanelResizingEnabled ? new Set([expand, codeBlock, layoutSection, rule, panel, panel_c1]) : new Set([expand, codeBlock, layoutSection]);
138
139
  var isFullWidthEnabled = !((options === null || options === void 0 ? void 0 : options.allowBreakoutButton) === true);
139
140
  if ((0, _document.isReplaceDocOperation)(transactions, oldState)) {
140
141
  newState.doc.forEach(function (node, pos) {
@@ -44,9 +44,10 @@ export const handleKeyDown = api => (view, event) => {
44
44
  codeBlock,
45
45
  layoutSection,
46
46
  rule,
47
- panel
47
+ panel,
48
+ panel_c1
48
49
  } = view.state.schema.nodes;
49
- const breakoutResizableNodes = editorExperiment('platform_synced_block', true) ? getBreakoutResizableNodeTypes(view.state.schema, expValEqualsNoExposure('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true)) : expValEqualsNoExposure('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true) ? new Set([expand, codeBlock, layoutSection, rule, panel]) : new Set([expand, codeBlock, layoutSection]);
50
+ const breakoutResizableNodes = editorExperiment('platform_synced_block', true) ? getBreakoutResizableNodeTypes(view.state.schema, expValEqualsNoExposure('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true)) : expValEqualsNoExposure('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true) ? new Set([expand, codeBlock, layoutSection, rule, panel, panel_c1]) : new Set([expand, codeBlock, layoutSection]);
50
51
  const result = getAncestorResizableNode(view, breakoutResizableNodes);
51
52
  if (result) {
52
53
  const {
@@ -14,7 +14,7 @@ const getNodeName = nodeName => {
14
14
  return 'layout';
15
15
  } else if (nodeName === 'codeBlock' || nodeName === 'expand') {
16
16
  return nodeName;
17
- } else if ((nodeName === 'rule' || nodeName === 'panel') && expValEqualsNoExposure('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true)) {
17
+ } else if ((nodeName === 'rule' || nodeName === 'panel' || nodeName === 'panel_c1') && expValEqualsNoExposure('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true)) {
18
18
  return nodeName;
19
19
  } else {
20
20
  return 'node';
@@ -26,6 +26,7 @@ export const resizeHandleMessage = {
26
26
  layout: messages.resizeLayout,
27
27
  rule: messages.resizeRule,
28
28
  panel: messages.resizePanel,
29
+ panel_c1: messages.resizePanel,
29
30
  node: messages.resizeElement
30
31
  };
31
32
  const RailWithTooltip = ({
@@ -160,7 +160,7 @@ export class ResizingMarkView {
160
160
  const nodeName = (_view$state$doc$nodeA = view.state.doc.nodeAt(pos)) === null || _view$state$doc$nodeA === void 0 ? void 0 : _view$state$doc$nodeA.type.name;
161
161
 
162
162
  // if the node is a panel or a rule, do NOT set up the resizer callbacks
163
- if (nodeName && ['panel', 'rule'].includes(nodeName) || this.isResizingInitialised) {
163
+ if (nodeName && ['panel', 'rule', 'panel_c1'].includes(nodeName) || this.isResizingInitialised) {
164
164
  return;
165
165
  }
166
166
 
@@ -128,9 +128,10 @@ export const createResizingPlugin = (api, getIntl, nodeViewPortalProviderAPI, op
128
128
  codeBlock,
129
129
  layoutSection,
130
130
  rule,
131
- panel
131
+ panel,
132
+ panel_c1
132
133
  } = newState.schema.nodes;
133
- const breakoutResizableNodes = editorExperiment('platform_synced_block', true) ? getBreakoutResizableNodeTypes(newState.schema, isRuleAndPanelResizingEnabled) : isRuleAndPanelResizingEnabled ? new Set([expand, codeBlock, layoutSection, rule, panel]) : new Set([expand, codeBlock, layoutSection]);
134
+ const breakoutResizableNodes = editorExperiment('platform_synced_block', true) ? getBreakoutResizableNodeTypes(newState.schema, isRuleAndPanelResizingEnabled) : isRuleAndPanelResizingEnabled ? new Set([expand, codeBlock, layoutSection, rule, panel, panel_c1]) : new Set([expand, codeBlock, layoutSection]);
134
135
  const isFullWidthEnabled = !((options === null || options === void 0 ? void 0 : options.allowBreakoutButton) === true);
135
136
  if (isReplaceDocOperation(transactions, oldState)) {
136
137
  newState.doc.forEach((node, pos) => {
@@ -45,8 +45,9 @@ export var handleKeyDown = function handleKeyDown(api) {
45
45
  codeBlock = _view$state$schema$no.codeBlock,
46
46
  layoutSection = _view$state$schema$no.layoutSection,
47
47
  rule = _view$state$schema$no.rule,
48
- panel = _view$state$schema$no.panel;
49
- var breakoutResizableNodes = editorExperiment('platform_synced_block', true) ? getBreakoutResizableNodeTypes(view.state.schema, expValEqualsNoExposure('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true)) : expValEqualsNoExposure('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true) ? new Set([expand, codeBlock, layoutSection, rule, panel]) : new Set([expand, codeBlock, layoutSection]);
48
+ panel = _view$state$schema$no.panel,
49
+ panel_c1 = _view$state$schema$no.panel_c1;
50
+ var breakoutResizableNodes = editorExperiment('platform_synced_block', true) ? getBreakoutResizableNodeTypes(view.state.schema, expValEqualsNoExposure('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true)) : expValEqualsNoExposure('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true) ? new Set([expand, codeBlock, layoutSection, rule, panel, panel_c1]) : new Set([expand, codeBlock, layoutSection]);
50
51
  var result = getAncestorResizableNode(view, breakoutResizableNodes);
51
52
  if (result) {
52
53
  var node = result.node,
@@ -16,7 +16,7 @@ var getNodeName = function getNodeName(nodeName) {
16
16
  return 'layout';
17
17
  } else if (nodeName === 'codeBlock' || nodeName === 'expand') {
18
18
  return nodeName;
19
- } else if ((nodeName === 'rule' || nodeName === 'panel') && expValEqualsNoExposure('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true)) {
19
+ } else if ((nodeName === 'rule' || nodeName === 'panel' || nodeName === 'panel_c1') && expValEqualsNoExposure('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true)) {
20
20
  return nodeName;
21
21
  } else {
22
22
  return 'node';
@@ -28,6 +28,7 @@ export var resizeHandleMessage = {
28
28
  layout: messages.resizeLayout,
29
29
  rule: messages.resizeRule,
30
30
  panel: messages.resizePanel,
31
+ panel_c1: messages.resizePanel,
31
32
  node: messages.resizeElement
32
33
  };
33
34
  var RailWithTooltip = function RailWithTooltip(_ref) {
@@ -173,7 +173,7 @@ export var ResizingMarkView = /*#__PURE__*/function () {
173
173
  var nodeName = (_view$state$doc$nodeA = view.state.doc.nodeAt(pos)) === null || _view$state$doc$nodeA === void 0 ? void 0 : _view$state$doc$nodeA.type.name;
174
174
 
175
175
  // if the node is a panel or a rule, do NOT set up the resizer callbacks
176
- if (nodeName && ['panel', 'rule'].includes(nodeName) || _this2.isResizingInitialised) {
176
+ if (nodeName && ['panel', 'rule', 'panel_c1'].includes(nodeName) || _this2.isResizingInitialised) {
177
177
  return;
178
178
  }
179
179
 
@@ -126,8 +126,9 @@ export var createResizingPlugin = function createResizingPlugin(api, getIntl, no
126
126
  codeBlock = _newState$schema$node.codeBlock,
127
127
  layoutSection = _newState$schema$node.layoutSection,
128
128
  rule = _newState$schema$node.rule,
129
- panel = _newState$schema$node.panel;
130
- var breakoutResizableNodes = editorExperiment('platform_synced_block', true) ? getBreakoutResizableNodeTypes(newState.schema, isRuleAndPanelResizingEnabled) : isRuleAndPanelResizingEnabled ? new Set([expand, codeBlock, layoutSection, rule, panel]) : new Set([expand, codeBlock, layoutSection]);
129
+ panel = _newState$schema$node.panel,
130
+ panel_c1 = _newState$schema$node.panel_c1;
131
+ var breakoutResizableNodes = editorExperiment('platform_synced_block', true) ? getBreakoutResizableNodeTypes(newState.schema, isRuleAndPanelResizingEnabled) : isRuleAndPanelResizingEnabled ? new Set([expand, codeBlock, layoutSection, rule, panel, panel_c1]) : new Set([expand, codeBlock, layoutSection]);
131
132
  var isFullWidthEnabled = !((options === null || options === void 0 ? void 0 : options.allowBreakoutButton) === true);
132
133
  if (isReplaceDocOperation(transactions, oldState)) {
133
134
  newState.doc.forEach(function (node, pos) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-breakout",
3
- "version": "12.1.1",
3
+ "version": "12.2.0",
4
4
  "description": "Breakout plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -21,7 +21,7 @@
21
21
  ],
22
22
  "atlaskit:src": "src/index.ts",
23
23
  "dependencies": {
24
- "@atlaskit/adf-schema": "^56.0.0",
24
+ "@atlaskit/adf-schema": "^56.1.0",
25
25
  "@atlaskit/editor-plugin-block-controls": "^13.1.0",
26
26
  "@atlaskit/editor-plugin-editor-disabled": "^12.0.0",
27
27
  "@atlaskit/editor-plugin-editor-viewmode": "^14.0.0",
@@ -35,7 +35,7 @@
35
35
  "@atlaskit/platform-feature-flags": "^2.0.0",
36
36
  "@atlaskit/pragmatic-drag-and-drop": "^2.0.0",
37
37
  "@atlaskit/theme": "^26.1.0",
38
- "@atlaskit/tmp-editor-statsig": "^121.0.0",
38
+ "@atlaskit/tmp-editor-statsig": "^121.1.0",
39
39
  "@atlaskit/tokens": "^15.4.0",
40
40
  "@atlaskit/tooltip": "^23.1.0",
41
41
  "@babel/runtime": "^7.0.0",