@atlaskit/editor-core 190.1.0 → 190.1.2

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,17 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 190.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#61112](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/61112) [`283d290a41e5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/283d290a41e5) - ED-21499: analytics event added for remove child operation in MBE
8
+
9
+ ## 190.1.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#61696](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/61696) [`fcc2b35ad97b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fcc2b35ad97b) - ED-21505: Added better selections and highlights for MBE nodes on Editor
14
+
3
15
  ## 190.1.0
4
16
 
5
17
  ### Minor Changes
@@ -33,6 +33,7 @@ var _default = exports.default = {
33
33
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': '「isMultiple」と「style: radio」を組み合わせることはできません',
34
34
  'fabric.editor.configPanel.formType.addField': 'フィールドを追加',
35
35
  'fabric.editor.configPanel.formType.removeField': 'フィールドを削除',
36
+ 'fabric.editor.configPanel.help': 'お困りですか?',
36
37
  'fabric.editor.configPanel.invalid': '無効なフィールド',
37
38
  'fabric.editor.configPanel.required': '必須フィールド',
38
39
  'fabric.editor.configPanel.submit': '送信',
@@ -51,8 +51,8 @@ var createPlugin = exports.createPlugin = function createPlugin() {
51
51
  }));
52
52
  }
53
53
  /**
54
- * If it's a bodiedExtension, we'll need to keep digging; since we
55
- * can have more extension nodes within the contents of that
54
+ * If it's a multiBodiedExtension or bodiedExtension, we'll need to keep digging;
55
+ * since we can have more extension nodes within the contents of that
56
56
  */
57
57
  if ([multiBodiedExtension, bodiedExtension].includes(node.type)) {
58
58
  return true;
@@ -65,6 +65,16 @@ var isLayoutSupported = function isLayoutSupported(state, selectedExtNode) {
65
65
  }
66
66
  return !!((selectedExtNode.node.type === bodiedExtension || selectedExtNode.node.type === extension && !(0, _utils.hasParentNodeOfType)([bodiedExtension, table, expand].filter(Boolean))(selection)) && !(0, _utils.hasParentNodeOfType)([layoutSection])(selection));
67
67
  };
68
+
69
+ // Edit is not supported for multiBodiedExtension
70
+ var isEditSupported = function isEditSupported(state, selectedExtNode) {
71
+ var _selectedExtNode$node;
72
+ var multiBodiedExtension = state.schema.nodes.multiBodiedExtension;
73
+ if (!selectedExtNode || (selectedExtNode === null || selectedExtNode === void 0 || (_selectedExtNode$node = selectedExtNode.node) === null || _selectedExtNode$node === void 0 ? void 0 : _selectedExtNode$node.type) === multiBodiedExtension) {
74
+ return false;
75
+ }
76
+ return true;
77
+ };
68
78
  var breakoutOptions = function breakoutOptions(state, formatMessage, extensionState, breakoutEnabled) {
69
79
  var nodeWithPos = (0, _utils2.getSelectedExtension)(state, true);
70
80
 
@@ -96,10 +106,15 @@ var breakoutOptions = function breakoutOptions(state, formatMessage, extensionSt
96
106
  }
97
107
  return [];
98
108
  };
99
- var editButton = function editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI) {
109
+ var editButton = function editButton(state, formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI) {
110
+ var nodeWithPos = (0, _utils2.getSelectedExtension)(state, true);
100
111
  if (!extensionState.showEditButton) {
101
112
  return [];
102
113
  }
114
+ // For multiBodiedExtension case, edit is not supported
115
+ if (nodeWithPos && !isEditSupported(state, nodeWithPos)) {
116
+ return [];
117
+ }
103
118
  return [{
104
119
  id: 'editor.extension.edit',
105
120
  type: 'button',
@@ -129,7 +144,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(_ref
129
144
  var extensionState = (0, _main.getPluginState)(state);
130
145
  if (extensionState && !extensionState.showContextPanel && extensionState.element) {
131
146
  var nodeType = [state.schema.nodes.extension, state.schema.nodes.inlineExtension, state.schema.nodes.bodiedExtension, state.schema.nodes.multiBodiedExtension];
132
- var editButtonArray = editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI);
147
+ var editButtonArray = editButton(state, formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI);
133
148
  var breakoutButtonArray = breakoutOptions(state, formatMessage, extensionState, breakoutEnabled);
134
149
  var extensionObj = (0, _utils2.getSelectedExtension)(state, true);
135
150
 
@@ -85,6 +85,9 @@ var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActions(_re
85
85
  var tr = state.tr;
86
86
  tr.deleteRange(startFramePosition, endFramePosition);
87
87
  dispatch(tr);
88
+ if (eventDispatcher) {
89
+ sendMBEAnalyticsEvent(_analytics.ACTION.REMOVE_CHILD, node, eventDispatcher);
90
+ }
88
91
  return true;
89
92
  },
90
93
  updateParameters: function updateParameters(parameters) {
@@ -100,6 +103,9 @@ var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActions(_re
100
103
  })
101
104
  }));
102
105
  dispatch(tr);
106
+ if (eventDispatcher) {
107
+ sendMBEAnalyticsEvent(_analytics.ACTION.UPDATE_PARAMETERS, node, eventDispatcher);
108
+ }
103
109
  return true;
104
110
  },
105
111
  getChildren: function getChildren() {
@@ -110,6 +116,9 @@ var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActions(_re
110
116
  return [];
111
117
  }
112
118
  var children = (_state$doc$nodeAt = state.doc.nodeAt(pos)) === null || _state$doc$nodeAt === void 0 ? void 0 : _state$doc$nodeAt.content;
119
+ if (eventDispatcher) {
120
+ sendMBEAnalyticsEvent(_analytics.ACTION.GET_CHILDERN, node, eventDispatcher);
121
+ }
113
122
  return children ? children.toJSON() : [];
114
123
  }
115
124
  };
@@ -10,4 +10,4 @@ var _react = require("@emotion/react");
10
10
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
11
11
  var _templateObject;
12
12
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
13
- var extensionStyles = exports.extensionStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .multiBodiedExtensionView-content-wrap.", ":not(.danger) {\n ", "\n }\n\n .extensionView-content-wrap,\n .multiBodiedExtensionView-content-wrap,\n .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n &:not(.danger).", " {\n & > span > .extension-container {\n ", "\n }\n }\n\n &.danger > span > .extension-container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n\n &.inline {\n word-wrap: break-all;\n }\n }\n\n .extensionView-content-wrap .extension-container {\n overflow: hidden;\n }\n\n .bodiedExtensionView-content-wrap\n .extensionView-content-wrap\n .extension-container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n\n [data-mark-type='fragment'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n }\n\n &:first-child {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n }\n }\n\n &:nth-last-of-type(-n + 2):not(:first-of-type) {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n }\n }\n }\n"])), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.blockNodesVerticalMargin);
13
+ var extensionStyles = exports.extensionStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .multiBodiedExtensionView-content-wrap.", ":not(.danger) {\n ", "\n }\n\n .multiBodiedExtensionView-content-wrap {\n &.danger > span > .multiBodiedExtension--container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n .multiBodiedExtension--container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n }\n\n .extensionView-content-wrap,\n .multiBodiedExtensionView-content-wrap,\n .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n &:not(.danger).", " {\n & > span > .extension-container {\n ", "\n }\n }\n\n &.danger > span > .extension-container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n\n &.inline {\n word-wrap: break-all;\n }\n }\n\n .extensionView-content-wrap .extension-container {\n overflow: hidden;\n }\n\n .bodiedExtensionView-content-wrap\n .extensionView-content-wrap\n .extension-container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n\n [data-mark-type='fragment'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n }\n\n &:first-child {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n }\n }\n\n &:nth-last-of-type(-n + 2):not(:first-of-type) {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n }\n }\n }\n"])), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.blockNodesVerticalMargin);
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "190.1.0";
8
+ var version = exports.version = "190.1.2";
@@ -27,6 +27,7 @@ export default {
27
27
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': '「isMultiple」と「style: radio」を組み合わせることはできません',
28
28
  'fabric.editor.configPanel.formType.addField': 'フィールドを追加',
29
29
  'fabric.editor.configPanel.formType.removeField': 'フィールドを削除',
30
+ 'fabric.editor.configPanel.help': 'お困りですか?',
30
31
  'fabric.editor.configPanel.invalid': '無効なフィールド',
31
32
  'fabric.editor.configPanel.required': '必須フィールド',
32
33
  'fabric.editor.configPanel.submit': '送信',
@@ -40,8 +40,8 @@ const createPlugin = () => new SafePlugin({
40
40
  });
41
41
  }
42
42
  /**
43
- * If it's a bodiedExtension, we'll need to keep digging; since we
44
- * can have more extension nodes within the contents of that
43
+ * If it's a multiBodiedExtension or bodiedExtension, we'll need to keep digging;
44
+ * since we can have more extension nodes within the contents of that
45
45
  */
46
46
  if ([multiBodiedExtension, bodiedExtension].includes(node.type)) {
47
47
  return true;
@@ -62,6 +62,22 @@ const isLayoutSupported = (state, selectedExtNode) => {
62
62
  }
63
63
  return !!((selectedExtNode.node.type === bodiedExtension || selectedExtNode.node.type === extension && !hasParentNodeOfType([bodiedExtension, table, expand].filter(Boolean))(selection)) && !hasParentNodeOfType([layoutSection])(selection));
64
64
  };
65
+
66
+ // Edit is not supported for multiBodiedExtension
67
+ const isEditSupported = (state, selectedExtNode) => {
68
+ var _selectedExtNode$node;
69
+ const {
70
+ schema: {
71
+ nodes: {
72
+ multiBodiedExtension
73
+ }
74
+ }
75
+ } = state;
76
+ if (!selectedExtNode || (selectedExtNode === null || selectedExtNode === void 0 ? void 0 : (_selectedExtNode$node = selectedExtNode.node) === null || _selectedExtNode$node === void 0 ? void 0 : _selectedExtNode$node.type) === multiBodiedExtension) {
77
+ return false;
78
+ }
79
+ return true;
80
+ };
65
81
  const breakoutOptions = (state, formatMessage, extensionState, breakoutEnabled) => {
66
82
  const nodeWithPos = getSelectedExtension(state, true);
67
83
 
@@ -95,10 +111,15 @@ const breakoutOptions = (state, formatMessage, extensionState, breakoutEnabled)
95
111
  }
96
112
  return [];
97
113
  };
98
- const editButton = (formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI) => {
114
+ const editButton = (state, formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI) => {
115
+ const nodeWithPos = getSelectedExtension(state, true);
99
116
  if (!extensionState.showEditButton) {
100
117
  return [];
101
118
  }
119
+ // For multiBodiedExtension case, edit is not supported
120
+ if (nodeWithPos && !isEditSupported(state, nodeWithPos)) {
121
+ return [];
122
+ }
102
123
  return [{
103
124
  id: 'editor.extension.edit',
104
125
  type: 'button',
@@ -130,7 +151,7 @@ export const getToolbarConfig = ({
130
151
  const extensionState = getPluginState(state);
131
152
  if (extensionState && !extensionState.showContextPanel && extensionState.element) {
132
153
  const nodeType = [state.schema.nodes.extension, state.schema.nodes.inlineExtension, state.schema.nodes.bodiedExtension, state.schema.nodes.multiBodiedExtension];
133
- const editButtonArray = editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI);
154
+ const editButtonArray = editButton(state, formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI);
134
155
  const breakoutButtonArray = breakoutOptions(state, formatMessage, extensionState, breakoutEnabled);
135
156
  const extensionObj = getSelectedExtension(state, true);
136
157
 
@@ -76,6 +76,9 @@ const useMultiBodiedExtensionActions = ({
76
76
  const tr = state.tr;
77
77
  tr.deleteRange(startFramePosition, endFramePosition);
78
78
  dispatch(tr);
79
+ if (eventDispatcher) {
80
+ sendMBEAnalyticsEvent(ACTION.REMOVE_CHILD, node, eventDispatcher);
81
+ }
79
82
  return true;
80
83
  },
81
84
  updateParameters(parameters) {
@@ -95,6 +98,9 @@ const useMultiBodiedExtensionActions = ({
95
98
  }
96
99
  });
97
100
  dispatch(tr);
101
+ if (eventDispatcher) {
102
+ sendMBEAnalyticsEvent(ACTION.UPDATE_PARAMETERS, node, eventDispatcher);
103
+ }
98
104
  return true;
99
105
  },
100
106
  getChildren() {
@@ -107,6 +113,9 @@ const useMultiBodiedExtensionActions = ({
107
113
  return [];
108
114
  }
109
115
  const children = (_state$doc$nodeAt = state.doc.nodeAt(pos)) === null || _state$doc$nodeAt === void 0 ? void 0 : _state$doc$nodeAt.content;
116
+ if (eventDispatcher) {
117
+ sendMBEAnalyticsEvent(ACTION.GET_CHILDERN, node, eventDispatcher);
118
+ }
110
119
  return children ? children.toJSON() : [];
111
120
  }
112
121
  };
@@ -6,6 +6,18 @@ export const extensionStyles = css`
6
6
  ${getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket])}
7
7
  }
8
8
 
9
+ .multiBodiedExtensionView-content-wrap {
10
+ &.danger > span > .multiBodiedExtension--container {
11
+ box-shadow: 0 0 0 ${akEditorSelectedBorderSize}px
12
+ ${`var(--ds-border-danger, ${akEditorDeleteBorder})`};
13
+ background-color: ${`var(--ds-background-danger, ${akEditorDeleteBackground})`};
14
+ }
15
+ .multiBodiedExtension--container {
16
+ width: 100%;
17
+ max-width: 100%; // ensure width can't go over 100%;
18
+ }
19
+ }
20
+
9
21
  .extensionView-content-wrap,
10
22
  .multiBodiedExtensionView-content-wrap,
11
23
  .bodiedExtensionView-content-wrap {
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "190.1.0";
2
+ export const version = "190.1.2";
@@ -27,6 +27,7 @@ export default {
27
27
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': '「isMultiple」と「style: radio」を組み合わせることはできません',
28
28
  'fabric.editor.configPanel.formType.addField': 'フィールドを追加',
29
29
  'fabric.editor.configPanel.formType.removeField': 'フィールドを削除',
30
+ 'fabric.editor.configPanel.help': 'お困りですか?',
30
31
  'fabric.editor.configPanel.invalid': '無効なフィールド',
31
32
  'fabric.editor.configPanel.required': '必須フィールド',
32
33
  'fabric.editor.configPanel.submit': '送信',
@@ -44,8 +44,8 @@ var createPlugin = function createPlugin() {
44
44
  }));
45
45
  }
46
46
  /**
47
- * If it's a bodiedExtension, we'll need to keep digging; since we
48
- * can have more extension nodes within the contents of that
47
+ * If it's a multiBodiedExtension or bodiedExtension, we'll need to keep digging;
48
+ * since we can have more extension nodes within the contents of that
49
49
  */
50
50
  if ([multiBodiedExtension, bodiedExtension].includes(node.type)) {
51
51
  return true;
@@ -58,6 +58,16 @@ var isLayoutSupported = function isLayoutSupported(state, selectedExtNode) {
58
58
  }
59
59
  return !!((selectedExtNode.node.type === bodiedExtension || selectedExtNode.node.type === extension && !hasParentNodeOfType([bodiedExtension, table, expand].filter(Boolean))(selection)) && !hasParentNodeOfType([layoutSection])(selection));
60
60
  };
61
+
62
+ // Edit is not supported for multiBodiedExtension
63
+ var isEditSupported = function isEditSupported(state, selectedExtNode) {
64
+ var _selectedExtNode$node;
65
+ var multiBodiedExtension = state.schema.nodes.multiBodiedExtension;
66
+ if (!selectedExtNode || (selectedExtNode === null || selectedExtNode === void 0 || (_selectedExtNode$node = selectedExtNode.node) === null || _selectedExtNode$node === void 0 ? void 0 : _selectedExtNode$node.type) === multiBodiedExtension) {
67
+ return false;
68
+ }
69
+ return true;
70
+ };
61
71
  var breakoutOptions = function breakoutOptions(state, formatMessage, extensionState, breakoutEnabled) {
62
72
  var nodeWithPos = getSelectedExtension(state, true);
63
73
 
@@ -89,10 +99,15 @@ var breakoutOptions = function breakoutOptions(state, formatMessage, extensionSt
89
99
  }
90
100
  return [];
91
101
  };
92
- var editButton = function editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI) {
102
+ var editButton = function editButton(state, formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI) {
103
+ var nodeWithPos = getSelectedExtension(state, true);
93
104
  if (!extensionState.showEditButton) {
94
105
  return [];
95
106
  }
107
+ // For multiBodiedExtension case, edit is not supported
108
+ if (nodeWithPos && !isEditSupported(state, nodeWithPos)) {
109
+ return [];
110
+ }
96
111
  return [{
97
112
  id: 'editor.extension.edit',
98
113
  type: 'button',
@@ -122,7 +137,7 @@ export var getToolbarConfig = function getToolbarConfig(_ref) {
122
137
  var extensionState = getPluginState(state);
123
138
  if (extensionState && !extensionState.showContextPanel && extensionState.element) {
124
139
  var nodeType = [state.schema.nodes.extension, state.schema.nodes.inlineExtension, state.schema.nodes.bodiedExtension, state.schema.nodes.multiBodiedExtension];
125
- var editButtonArray = editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI);
140
+ var editButtonArray = editButton(state, formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI);
126
141
  var breakoutButtonArray = breakoutOptions(state, formatMessage, extensionState, breakoutEnabled);
127
142
  var extensionObj = getSelectedExtension(state, true);
128
143
 
@@ -77,6 +77,9 @@ var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActions(_re
77
77
  var tr = state.tr;
78
78
  tr.deleteRange(startFramePosition, endFramePosition);
79
79
  dispatch(tr);
80
+ if (eventDispatcher) {
81
+ sendMBEAnalyticsEvent(ACTION.REMOVE_CHILD, node, eventDispatcher);
82
+ }
80
83
  return true;
81
84
  },
82
85
  updateParameters: function updateParameters(parameters) {
@@ -92,6 +95,9 @@ var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActions(_re
92
95
  })
93
96
  }));
94
97
  dispatch(tr);
98
+ if (eventDispatcher) {
99
+ sendMBEAnalyticsEvent(ACTION.UPDATE_PARAMETERS, node, eventDispatcher);
100
+ }
95
101
  return true;
96
102
  },
97
103
  getChildren: function getChildren() {
@@ -102,6 +108,9 @@ var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActions(_re
102
108
  return [];
103
109
  }
104
110
  var children = (_state$doc$nodeAt = state.doc.nodeAt(pos)) === null || _state$doc$nodeAt === void 0 ? void 0 : _state$doc$nodeAt.content;
111
+ if (eventDispatcher) {
112
+ sendMBEAnalyticsEvent(ACTION.GET_CHILDERN, node, eventDispatcher);
113
+ }
105
114
  return children ? children.toJSON() : [];
106
115
  }
107
116
  };
@@ -3,4 +3,4 @@ var _templateObject;
3
3
  import { css } from '@emotion/react';
4
4
  import { blockNodesVerticalMargin, akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackground, SelectionStyle, getSelectionStyles, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
5
5
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
6
- export var extensionStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .multiBodiedExtensionView-content-wrap.", ":not(.danger) {\n ", "\n }\n\n .extensionView-content-wrap,\n .multiBodiedExtensionView-content-wrap,\n .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n &:not(.danger).", " {\n & > span > .extension-container {\n ", "\n }\n }\n\n &.danger > span > .extension-container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n\n &.inline {\n word-wrap: break-all;\n }\n }\n\n .extensionView-content-wrap .extension-container {\n overflow: hidden;\n }\n\n .bodiedExtensionView-content-wrap\n .extensionView-content-wrap\n .extension-container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n\n [data-mark-type='fragment'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n }\n\n &:first-child {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n }\n }\n\n &:nth-last-of-type(-n + 2):not(:first-of-type) {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n }\n }\n }\n"])), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), blockNodesVerticalMargin, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow]), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), blockNodesVerticalMargin, blockNodesVerticalMargin);
6
+ export var extensionStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .multiBodiedExtensionView-content-wrap.", ":not(.danger) {\n ", "\n }\n\n .multiBodiedExtensionView-content-wrap {\n &.danger > span > .multiBodiedExtension--container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n .multiBodiedExtension--container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n }\n\n .extensionView-content-wrap,\n .multiBodiedExtensionView-content-wrap,\n .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n &:not(.danger).", " {\n & > span > .extension-container {\n ", "\n }\n }\n\n &.danger > span > .extension-container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n\n &.inline {\n word-wrap: break-all;\n }\n }\n\n .extensionView-content-wrap .extension-container {\n overflow: hidden;\n }\n\n .bodiedExtensionView-content-wrap\n .extensionView-content-wrap\n .extension-container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n\n [data-mark-type='fragment'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n }\n\n &:first-child {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n }\n }\n\n &:nth-last-of-type(-n + 2):not(:first-of-type) {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n }\n }\n }\n"])), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), blockNodesVerticalMargin, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow]), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), blockNodesVerticalMargin, blockNodesVerticalMargin);
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "190.1.0";
2
+ export var version = "190.1.2";
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "190.1.0",
3
+ "version": "190.1.2",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"