@atlaskit/editor-common 103.1.1 → 103.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 CHANGED
@@ -1,5 +1,28 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 103.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#138373](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/138373)
8
+ [`3a6e2723e498c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3a6e2723e498c) -
9
+ [ux] [A11Y-10137] Add visually hidden alert for when the date picker opens letting screen reader
10
+ users know how to access the date picker popup
11
+ - [#138977](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/138977)
12
+ [`3d812d3a14c39`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3d812d3a14c39) -
13
+ [ux] Revert "Adds a new temporary floating toolbar's config option to hide any toolbars when any
14
+ table's menu is opened."
15
+ - Updated dependencies
16
+
17
+ ## 103.1.2
18
+
19
+ ### Patch Changes
20
+
21
+ - [#137753](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/137753)
22
+ [`fe189a7e249e9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fe189a7e249e9) -
23
+ EDITOR-317 Cleans up feature gate `platform_editor_nested_tables_resizing`
24
+ - Updated dependencies
25
+
3
26
  ## 103.1.1
4
27
 
5
28
  ### Patch Changes
@@ -20,5 +20,10 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
20
20
  id: 'fabric.editor.upDown',
21
21
  defaultMessage: 'On the use of up and down arrow keys into the following input field, the date will update below',
22
22
  description: 'The text for the date input informs the user that using the arrow keys (up and down) will update the date picker below'
23
+ },
24
+ datePickerOpenedAlert: {
25
+ id: 'fabric.editor.datePickerOpenedAlert',
26
+ defaultMessage: 'Date editor popup opened, press Tab to access popup',
27
+ description: 'Screen reader alert when the date picker is opened, letting the user know they can press the Tab button to access the date picker'
23
28
  }
24
29
  });
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "103.1.1";
20
+ var packageVersion = "103.1.3";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // Ignored via go/ees007
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.layoutToWidth = exports.getTableWidthWithNumberColumn = exports.getTableContainerWidth = exports.getParentNodeWidth = void 0;
7
7
  var _utils = require("@atlaskit/editor-prosemirror/utils");
8
8
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
9
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
9
  var _extension = require("../styles/shared/extension");
11
10
  var _layout = require("../styles/shared/layout");
12
11
  var _table = require("../styles/shared/table");
@@ -26,6 +25,7 @@ var layoutToWidth = exports.layoutToWidth = {
26
25
  * If current node selection is not nested will return undefined
27
26
  */
28
27
  var getParentNodeWidth = exports.getParentNodeWidth = function getParentNodeWidth(pos, state, containerWidth, isFullWidthModeEnabled) {
28
+ var _contextPanelPluginKe, _contextPanelPluginKe2;
29
29
  if (!pos) {
30
30
  return;
31
31
  }
@@ -51,40 +51,20 @@ var getParentNodeWidth = exports.getParentNodeWidth = function getParentNodeWidt
51
51
  return state['contextPanelPluginKey$'];
52
52
  }
53
53
  };
54
- if (node.type === schema.nodes.layoutSection && !(0, _platformFeatureFlags.fg)('platform_editor_nested_tables_resizing')) {
55
- var _contextPanelPluginKe, _contextPanelPluginKe2;
56
- parentWidth += _editorSharedStyles.akLayoutGutterOffset * 2; // extra width that gets added to layout
57
-
58
- // Calculate width of parent layout column when
59
- // Parallel layout with viewport greater than 1024px
60
- // OR side panel of an extension is open and change the node width to smaller than containerWidth
61
- if (containerWidth.width > _editorSharedStyles.gridMediumMaxWidth || ((_contextPanelPluginKe = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe === void 0 ? void 0 : _contextPanelPluginKe.contents.length) > 0 && ((_contextPanelPluginKe2 = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe2 === void 0 ? void 0 : _contextPanelPluginKe2.contents[0]) !== undefined) {
62
- parentWidth -= (_layout.LAYOUT_SECTION_MARGIN + 2) * (node.childCount - 1); // margin between sections
63
- var $pos = state.doc.resolve(pos);
64
- var column = (0, _utils.findParentNodeOfTypeClosestToPos)($pos, [state.schema.nodes.layoutColumn]);
65
- if (column && column.node && !isNaN(column.node.attrs.width)) {
66
- // get exact width of parent layout column using node attrs
67
- parentWidth = Math.round(parentWidth * column.node.attrs.width * 0.01);
68
- }
69
- }
70
- }
71
54
  switch (node.type) {
72
55
  case schema.nodes.layoutSection:
73
- if ((0, _platformFeatureFlags.fg)('platform_editor_nested_tables_resizing')) {
74
- var _contextPanelPluginKe3, _contextPanelPluginKe4;
75
- parentWidth += _editorSharedStyles.akLayoutGutterOffset * 2; // extra width that gets added to layout
56
+ parentWidth += _editorSharedStyles.akLayoutGutterOffset * 2; // extra width that gets added to layout
76
57
 
77
- // Calculate width of parent layout column when
78
- // Parallel layout with viewport greater than 1024px
79
- // OR side panel of an extension is open and change the node width to smaller than containerWidth
80
- if (containerWidth.width > _editorSharedStyles.gridMediumMaxWidth || ((_contextPanelPluginKe3 = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe3 === void 0 ? void 0 : _contextPanelPluginKe3.contents.length) > 0 && ((_contextPanelPluginKe4 = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe4 === void 0 ? void 0 : _contextPanelPluginKe4.contents[0]) !== undefined) {
81
- parentWidth -= (_layout.LAYOUT_SECTION_MARGIN + 2) * (node.childCount - 1); // margin between sections
82
- var _$pos = state.doc.resolve(pos);
83
- var _column = (0, _utils.findParentNodeOfTypeClosestToPos)(_$pos, [state.schema.nodes.layoutColumn]);
84
- if (_column && _column.node && !isNaN(_column.node.attrs.width)) {
85
- // get exact width of parent layout column using node attrs
86
- parentWidth = Math.round(parentWidth * _column.node.attrs.width * 0.01);
87
- }
58
+ // Calculate width of parent layout column when
59
+ // Parallel layout with viewport greater than 1024px
60
+ // OR side panel of an extension is open and change the node width to smaller than containerWidth
61
+ if (containerWidth.width > _editorSharedStyles.gridMediumMaxWidth || ((_contextPanelPluginKe = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe === void 0 ? void 0 : _contextPanelPluginKe.contents.length) > 0 && ((_contextPanelPluginKe2 = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe2 === void 0 ? void 0 : _contextPanelPluginKe2.contents[0]) !== undefined) {
62
+ parentWidth -= (_layout.LAYOUT_SECTION_MARGIN + 2) * (node.childCount - 1); // margin between sections
63
+ var $pos = state.doc.resolve(pos);
64
+ var column = (0, _utils.findParentNodeOfTypeClosestToPos)($pos, [state.schema.nodes.layoutColumn]);
65
+ if (column && column.node && !isNaN(column.node.attrs.width)) {
66
+ // get exact width of parent layout column using node attrs
67
+ parentWidth = Math.round(parentWidth * column.node.attrs.width * 0.01);
88
68
  }
89
69
  }
90
70
 
@@ -109,16 +89,14 @@ var getParentNodeWidth = exports.getParentNodeWidth = function getParentNodeWidt
109
89
  break;
110
90
  case schema.nodes.tableCell:
111
91
  case schema.nodes.tableHeader:
112
- if ((0, _platformFeatureFlags.fg)('platform_editor_nested_tables_resizing')) {
113
- // Calculate the available column width
114
- if (Array.isArray(node.attrs.colwidth)) {
115
- parentWidth = node.attrs.colwidth.slice(0, node.attrs.colspan).reduce(function (sum, width) {
116
- return sum + width;
117
- }, 0);
118
- }
119
- // Compensate for padding
120
- parentWidth -= _table.tableCellPadding * 2;
92
+ // Calculate the available column width
93
+ if (Array.isArray(node.attrs.colwidth)) {
94
+ parentWidth = node.attrs.colwidth.slice(0, node.attrs.colspan).reduce(function (sum, width) {
95
+ return sum + width;
96
+ }, 0);
121
97
  }
98
+ // Compensate for padding
99
+ parentWidth -= _table.tableCellPadding * 2;
122
100
  break;
123
101
  }
124
102
  parentWidth -= 2; // border
@@ -130,12 +108,7 @@ var getNestedParentNode = function getNestedParentNode(tablePos, state) {
130
108
  return null;
131
109
  }
132
110
  var $pos = state.doc.resolve(tablePos);
133
- var parent;
134
- if ((0, _platformFeatureFlags.fg)('platform_editor_nested_tables_resizing')) {
135
- parent = (0, _utils.findParentNodeOfTypeClosestToPos)($pos, [state.schema.nodes.bodiedExtension, state.schema.nodes.extensionFrame, state.schema.nodes.layoutSection, state.schema.nodes.expand, state.schema.nodes.tableCell, state.schema.nodes.tableHeader]);
136
- } else {
137
- parent = (0, _utils.findParentNodeOfTypeClosestToPos)($pos, [state.schema.nodes.bodiedExtension, state.schema.nodes.extensionFrame, state.schema.nodes.layoutSection, state.schema.nodes.expand]);
138
- }
111
+ var parent = (0, _utils.findParentNodeOfTypeClosestToPos)($pos, [state.schema.nodes.bodiedExtension, state.schema.nodes.extensionFrame, state.schema.nodes.layoutSection, state.schema.nodes.expand, state.schema.nodes.tableCell, state.schema.nodes.tableHeader]);
139
112
  return parent ? parent.node : null;
140
113
  };
141
114
  var calcBreakoutNodeWidth = function calcBreakoutNodeWidth(layout, containerWidth, isFullWidthModeEnabled) {
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
23
23
  * @jsx jsx
24
24
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
25
  var packageName = "@atlaskit/editor-common";
26
- var packageVersion = "103.1.1";
26
+ var packageVersion = "103.1.3";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -14,5 +14,10 @@ export const messages = defineMessages({
14
14
  id: 'fabric.editor.upDown',
15
15
  defaultMessage: 'On the use of up and down arrow keys into the following input field, the date will update below',
16
16
  description: 'The text for the date input informs the user that using the arrow keys (up and down) will update the date picker below'
17
+ },
18
+ datePickerOpenedAlert: {
19
+ id: 'fabric.editor.datePickerOpenedAlert',
20
+ defaultMessage: 'Date editor popup opened, press Tab to access popup',
21
+ description: 'Screen reader alert when the date picker is opened, letting the user know they can press the Tab button to access the date picker'
17
22
  }
18
23
  });
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "103.1.1";
4
+ const packageVersion = "103.1.3";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -1,6 +1,5 @@
1
1
  import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
2
2
  import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorWideLayoutWidth, akLayoutGutterOffset, gridMediumMaxWidth } from '@atlaskit/editor-shared-styles';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import { BODIED_EXT_PADDING } from '../styles/shared/extension';
5
4
  import { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '../styles/shared/layout';
6
5
  import { tableCellPadding } from '../styles/shared/table';
@@ -20,6 +19,7 @@ export const layoutToWidth = {
20
19
  * If current node selection is not nested will return undefined
21
20
  */
22
21
  export const getParentNodeWidth = (pos, state, containerWidth, isFullWidthModeEnabled) => {
22
+ var _contextPanelPluginKe, _contextPanelPluginKe2;
23
23
  if (!pos) {
24
24
  return;
25
25
  }
@@ -47,40 +47,20 @@ export const getParentNodeWidth = (pos, state, containerWidth, isFullWidthModeEn
47
47
  return state['contextPanelPluginKey$'];
48
48
  }
49
49
  };
50
- if (node.type === schema.nodes.layoutSection && !fg('platform_editor_nested_tables_resizing')) {
51
- var _contextPanelPluginKe, _contextPanelPluginKe2;
52
- parentWidth += akLayoutGutterOffset * 2; // extra width that gets added to layout
53
-
54
- // Calculate width of parent layout column when
55
- // Parallel layout with viewport greater than 1024px
56
- // OR side panel of an extension is open and change the node width to smaller than containerWidth
57
- if (containerWidth.width > gridMediumMaxWidth || ((_contextPanelPluginKe = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe === void 0 ? void 0 : _contextPanelPluginKe.contents.length) > 0 && ((_contextPanelPluginKe2 = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe2 === void 0 ? void 0 : _contextPanelPluginKe2.contents[0]) !== undefined) {
58
- parentWidth -= (LAYOUT_SECTION_MARGIN + 2) * (node.childCount - 1); // margin between sections
59
- const $pos = state.doc.resolve(pos);
60
- const column = findParentNodeOfTypeClosestToPos($pos, [state.schema.nodes.layoutColumn]);
61
- if (column && column.node && !isNaN(column.node.attrs.width)) {
62
- // get exact width of parent layout column using node attrs
63
- parentWidth = Math.round(parentWidth * column.node.attrs.width * 0.01);
64
- }
65
- }
66
- }
67
50
  switch (node.type) {
68
51
  case schema.nodes.layoutSection:
69
- if (fg('platform_editor_nested_tables_resizing')) {
70
- var _contextPanelPluginKe3, _contextPanelPluginKe4;
71
- parentWidth += akLayoutGutterOffset * 2; // extra width that gets added to layout
52
+ parentWidth += akLayoutGutterOffset * 2; // extra width that gets added to layout
72
53
 
73
- // Calculate width of parent layout column when
74
- // Parallel layout with viewport greater than 1024px
75
- // OR side panel of an extension is open and change the node width to smaller than containerWidth
76
- if (containerWidth.width > gridMediumMaxWidth || ((_contextPanelPluginKe3 = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe3 === void 0 ? void 0 : _contextPanelPluginKe3.contents.length) > 0 && ((_contextPanelPluginKe4 = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe4 === void 0 ? void 0 : _contextPanelPluginKe4.contents[0]) !== undefined) {
77
- parentWidth -= (LAYOUT_SECTION_MARGIN + 2) * (node.childCount - 1); // margin between sections
78
- const $pos = state.doc.resolve(pos);
79
- const column = findParentNodeOfTypeClosestToPos($pos, [state.schema.nodes.layoutColumn]);
80
- if (column && column.node && !isNaN(column.node.attrs.width)) {
81
- // get exact width of parent layout column using node attrs
82
- parentWidth = Math.round(parentWidth * column.node.attrs.width * 0.01);
83
- }
54
+ // Calculate width of parent layout column when
55
+ // Parallel layout with viewport greater than 1024px
56
+ // OR side panel of an extension is open and change the node width to smaller than containerWidth
57
+ if (containerWidth.width > gridMediumMaxWidth || ((_contextPanelPluginKe = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe === void 0 ? void 0 : _contextPanelPluginKe.contents.length) > 0 && ((_contextPanelPluginKe2 = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe2 === void 0 ? void 0 : _contextPanelPluginKe2.contents[0]) !== undefined) {
58
+ parentWidth -= (LAYOUT_SECTION_MARGIN + 2) * (node.childCount - 1); // margin between sections
59
+ const $pos = state.doc.resolve(pos);
60
+ const column = findParentNodeOfTypeClosestToPos($pos, [state.schema.nodes.layoutColumn]);
61
+ if (column && column.node && !isNaN(column.node.attrs.width)) {
62
+ // get exact width of parent layout column using node attrs
63
+ parentWidth = Math.round(parentWidth * column.node.attrs.width * 0.01);
84
64
  }
85
65
  }
86
66
 
@@ -105,14 +85,12 @@ export const getParentNodeWidth = (pos, state, containerWidth, isFullWidthModeEn
105
85
  break;
106
86
  case schema.nodes.tableCell:
107
87
  case schema.nodes.tableHeader:
108
- if (fg('platform_editor_nested_tables_resizing')) {
109
- // Calculate the available column width
110
- if (Array.isArray(node.attrs.colwidth)) {
111
- parentWidth = node.attrs.colwidth.slice(0, node.attrs.colspan).reduce((sum, width) => sum + width, 0);
112
- }
113
- // Compensate for padding
114
- parentWidth -= tableCellPadding * 2;
88
+ // Calculate the available column width
89
+ if (Array.isArray(node.attrs.colwidth)) {
90
+ parentWidth = node.attrs.colwidth.slice(0, node.attrs.colspan).reduce((sum, width) => sum + width, 0);
115
91
  }
92
+ // Compensate for padding
93
+ parentWidth -= tableCellPadding * 2;
116
94
  break;
117
95
  }
118
96
  parentWidth -= 2; // border
@@ -124,12 +102,7 @@ const getNestedParentNode = (tablePos, state) => {
124
102
  return null;
125
103
  }
126
104
  const $pos = state.doc.resolve(tablePos);
127
- let parent;
128
- if (fg('platform_editor_nested_tables_resizing')) {
129
- parent = findParentNodeOfTypeClosestToPos($pos, [state.schema.nodes.bodiedExtension, state.schema.nodes.extensionFrame, state.schema.nodes.layoutSection, state.schema.nodes.expand, state.schema.nodes.tableCell, state.schema.nodes.tableHeader]);
130
- } else {
131
- parent = findParentNodeOfTypeClosestToPos($pos, [state.schema.nodes.bodiedExtension, state.schema.nodes.extensionFrame, state.schema.nodes.layoutSection, state.schema.nodes.expand]);
132
- }
105
+ const parent = findParentNodeOfTypeClosestToPos($pos, [state.schema.nodes.bodiedExtension, state.schema.nodes.extensionFrame, state.schema.nodes.layoutSection, state.schema.nodes.expand, state.schema.nodes.tableCell, state.schema.nodes.tableHeader]);
133
106
  return parent ? parent.node : null;
134
107
  };
135
108
  const calcBreakoutNodeWidth = (layout, containerWidth, isFullWidthModeEnabled) => {
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "103.1.1";
16
+ const packageVersion = "103.1.3";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -14,5 +14,10 @@ export var messages = defineMessages({
14
14
  id: 'fabric.editor.upDown',
15
15
  defaultMessage: 'On the use of up and down arrow keys into the following input field, the date will update below',
16
16
  description: 'The text for the date input informs the user that using the arrow keys (up and down) will update the date picker below'
17
+ },
18
+ datePickerOpenedAlert: {
19
+ id: 'fabric.editor.datePickerOpenedAlert',
20
+ defaultMessage: 'Date editor popup opened, press Tab to access popup',
21
+ description: 'Screen reader alert when the date picker is opened, letting the user know they can press the Tab button to access the date picker'
17
22
  }
18
23
  });
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "103.1.1";
10
+ var packageVersion = "103.1.3";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -1,6 +1,5 @@
1
1
  import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
2
2
  import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorWideLayoutWidth, akLayoutGutterOffset, gridMediumMaxWidth } from '@atlaskit/editor-shared-styles';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import { BODIED_EXT_PADDING } from '../styles/shared/extension';
5
4
  import { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '../styles/shared/layout';
6
5
  import { tableCellPadding } from '../styles/shared/table';
@@ -20,6 +19,7 @@ export var layoutToWidth = {
20
19
  * If current node selection is not nested will return undefined
21
20
  */
22
21
  export var getParentNodeWidth = function getParentNodeWidth(pos, state, containerWidth, isFullWidthModeEnabled) {
22
+ var _contextPanelPluginKe, _contextPanelPluginKe2;
23
23
  if (!pos) {
24
24
  return;
25
25
  }
@@ -45,40 +45,20 @@ export var getParentNodeWidth = function getParentNodeWidth(pos, state, containe
45
45
  return state['contextPanelPluginKey$'];
46
46
  }
47
47
  };
48
- if (node.type === schema.nodes.layoutSection && !fg('platform_editor_nested_tables_resizing')) {
49
- var _contextPanelPluginKe, _contextPanelPluginKe2;
50
- parentWidth += akLayoutGutterOffset * 2; // extra width that gets added to layout
51
-
52
- // Calculate width of parent layout column when
53
- // Parallel layout with viewport greater than 1024px
54
- // OR side panel of an extension is open and change the node width to smaller than containerWidth
55
- if (containerWidth.width > gridMediumMaxWidth || ((_contextPanelPluginKe = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe === void 0 ? void 0 : _contextPanelPluginKe.contents.length) > 0 && ((_contextPanelPluginKe2 = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe2 === void 0 ? void 0 : _contextPanelPluginKe2.contents[0]) !== undefined) {
56
- parentWidth -= (LAYOUT_SECTION_MARGIN + 2) * (node.childCount - 1); // margin between sections
57
- var $pos = state.doc.resolve(pos);
58
- var column = findParentNodeOfTypeClosestToPos($pos, [state.schema.nodes.layoutColumn]);
59
- if (column && column.node && !isNaN(column.node.attrs.width)) {
60
- // get exact width of parent layout column using node attrs
61
- parentWidth = Math.round(parentWidth * column.node.attrs.width * 0.01);
62
- }
63
- }
64
- }
65
48
  switch (node.type) {
66
49
  case schema.nodes.layoutSection:
67
- if (fg('platform_editor_nested_tables_resizing')) {
68
- var _contextPanelPluginKe3, _contextPanelPluginKe4;
69
- parentWidth += akLayoutGutterOffset * 2; // extra width that gets added to layout
50
+ parentWidth += akLayoutGutterOffset * 2; // extra width that gets added to layout
70
51
 
71
- // Calculate width of parent layout column when
72
- // Parallel layout with viewport greater than 1024px
73
- // OR side panel of an extension is open and change the node width to smaller than containerWidth
74
- if (containerWidth.width > gridMediumMaxWidth || ((_contextPanelPluginKe3 = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe3 === void 0 ? void 0 : _contextPanelPluginKe3.contents.length) > 0 && ((_contextPanelPluginKe4 = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe4 === void 0 ? void 0 : _contextPanelPluginKe4.contents[0]) !== undefined) {
75
- parentWidth -= (LAYOUT_SECTION_MARGIN + 2) * (node.childCount - 1); // margin between sections
76
- var _$pos = state.doc.resolve(pos);
77
- var _column = findParentNodeOfTypeClosestToPos(_$pos, [state.schema.nodes.layoutColumn]);
78
- if (_column && _column.node && !isNaN(_column.node.attrs.width)) {
79
- // get exact width of parent layout column using node attrs
80
- parentWidth = Math.round(parentWidth * _column.node.attrs.width * 0.01);
81
- }
52
+ // Calculate width of parent layout column when
53
+ // Parallel layout with viewport greater than 1024px
54
+ // OR side panel of an extension is open and change the node width to smaller than containerWidth
55
+ if (containerWidth.width > gridMediumMaxWidth || ((_contextPanelPluginKe = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe === void 0 ? void 0 : _contextPanelPluginKe.contents.length) > 0 && ((_contextPanelPluginKe2 = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe2 === void 0 ? void 0 : _contextPanelPluginKe2.contents[0]) !== undefined) {
56
+ parentWidth -= (LAYOUT_SECTION_MARGIN + 2) * (node.childCount - 1); // margin between sections
57
+ var $pos = state.doc.resolve(pos);
58
+ var column = findParentNodeOfTypeClosestToPos($pos, [state.schema.nodes.layoutColumn]);
59
+ if (column && column.node && !isNaN(column.node.attrs.width)) {
60
+ // get exact width of parent layout column using node attrs
61
+ parentWidth = Math.round(parentWidth * column.node.attrs.width * 0.01);
82
62
  }
83
63
  }
84
64
 
@@ -103,16 +83,14 @@ export var getParentNodeWidth = function getParentNodeWidth(pos, state, containe
103
83
  break;
104
84
  case schema.nodes.tableCell:
105
85
  case schema.nodes.tableHeader:
106
- if (fg('platform_editor_nested_tables_resizing')) {
107
- // Calculate the available column width
108
- if (Array.isArray(node.attrs.colwidth)) {
109
- parentWidth = node.attrs.colwidth.slice(0, node.attrs.colspan).reduce(function (sum, width) {
110
- return sum + width;
111
- }, 0);
112
- }
113
- // Compensate for padding
114
- parentWidth -= tableCellPadding * 2;
86
+ // Calculate the available column width
87
+ if (Array.isArray(node.attrs.colwidth)) {
88
+ parentWidth = node.attrs.colwidth.slice(0, node.attrs.colspan).reduce(function (sum, width) {
89
+ return sum + width;
90
+ }, 0);
115
91
  }
92
+ // Compensate for padding
93
+ parentWidth -= tableCellPadding * 2;
116
94
  break;
117
95
  }
118
96
  parentWidth -= 2; // border
@@ -124,12 +102,7 @@ var getNestedParentNode = function getNestedParentNode(tablePos, state) {
124
102
  return null;
125
103
  }
126
104
  var $pos = state.doc.resolve(tablePos);
127
- var parent;
128
- if (fg('platform_editor_nested_tables_resizing')) {
129
- parent = findParentNodeOfTypeClosestToPos($pos, [state.schema.nodes.bodiedExtension, state.schema.nodes.extensionFrame, state.schema.nodes.layoutSection, state.schema.nodes.expand, state.schema.nodes.tableCell, state.schema.nodes.tableHeader]);
130
- } else {
131
- parent = findParentNodeOfTypeClosestToPos($pos, [state.schema.nodes.bodiedExtension, state.schema.nodes.extensionFrame, state.schema.nodes.layoutSection, state.schema.nodes.expand]);
132
- }
105
+ var parent = findParentNodeOfTypeClosestToPos($pos, [state.schema.nodes.bodiedExtension, state.schema.nodes.extensionFrame, state.schema.nodes.layoutSection, state.schema.nodes.expand, state.schema.nodes.tableCell, state.schema.nodes.tableHeader]);
133
106
  return parent ? parent.node : null;
134
107
  };
135
108
  var calcBreakoutNodeWidth = function calcBreakoutNodeWidth(layout, containerWidth, isFullWidthModeEnabled) {
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
20
20
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import Layer from '../Layer';
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "103.1.1";
23
+ var packageVersion = "103.1.3";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -14,4 +14,9 @@ export declare const messages: {
14
14
  defaultMessage: string;
15
15
  description: string;
16
16
  };
17
+ datePickerOpenedAlert: {
18
+ id: string;
19
+ defaultMessage: string;
20
+ description: string;
21
+ };
17
22
  };
@@ -339,15 +339,6 @@ export interface FloatingToolbarConfig {
339
339
  * @see clean up ticket ED-26803
340
340
  */
341
341
  forceStaticToolbar?: boolean;
342
- /**
343
- * For internal use only, we will be depricating this API soon.
344
- * If any config has __suppressAllToolbars set to true, no floating toolbar will be rendered.
345
- * Use case:
346
- * When a node is nested inside a table and the cursor is inside of the nested node.
347
- * Nested node's toolbar is active. When table's menu opens, we provide table's config with
348
- * __suppressAllToolbars set to true.
349
- */
350
- __suppressAllToolbars?: boolean;
351
342
  }
352
343
  export type FloatingToolbarHandler = (state: EditorState, intl: IntlShape, providerFactory: ProviderFactory, processedConfigs?: Array<FloatingToolbarConfig>) => FloatingToolbarConfig | undefined;
353
344
  export {};
@@ -14,4 +14,9 @@ export declare const messages: {
14
14
  defaultMessage: string;
15
15
  description: string;
16
16
  };
17
+ datePickerOpenedAlert: {
18
+ id: string;
19
+ defaultMessage: string;
20
+ description: string;
21
+ };
17
22
  };
@@ -342,15 +342,6 @@ export interface FloatingToolbarConfig {
342
342
  * @see clean up ticket ED-26803
343
343
  */
344
344
  forceStaticToolbar?: boolean;
345
- /**
346
- * For internal use only, we will be depricating this API soon.
347
- * If any config has __suppressAllToolbars set to true, no floating toolbar will be rendered.
348
- * Use case:
349
- * When a node is nested inside a table and the cursor is inside of the nested node.
350
- * Nested node's toolbar is active. When table's menu opens, we provide table's config with
351
- * __suppressAllToolbars set to true.
352
- */
353
- __suppressAllToolbars?: boolean;
354
345
  }
355
346
  export type FloatingToolbarHandler = (state: EditorState, intl: IntlShape, providerFactory: ProviderFactory, processedConfigs?: Array<FloatingToolbarConfig>) => FloatingToolbarConfig | undefined;
356
347
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "103.1.1",
3
+ "version": "103.1.3",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -153,10 +153,10 @@
153
153
  "@atlaskit/onboarding": "^14.0.0",
154
154
  "@atlaskit/platform-feature-flags": "^1.1.0",
155
155
  "@atlaskit/popper": "^7.0.0",
156
- "@atlaskit/primitives": "^14.3.0",
156
+ "@atlaskit/primitives": "^14.4.0",
157
157
  "@atlaskit/profilecard": "^23.7.0",
158
158
  "@atlaskit/section-message": "^8.2.0",
159
- "@atlaskit/smart-card": "^36.2.0",
159
+ "@atlaskit/smart-card": "^36.4.0",
160
160
  "@atlaskit/smart-user-picker": "^8.0.0",
161
161
  "@atlaskit/spinner": "^18.0.0",
162
162
  "@atlaskit/task-decision": "^19.1.0",
@@ -293,9 +293,6 @@
293
293
  "platform_editor_multi_body_extension_extensibility": {
294
294
  "type": "boolean"
295
295
  },
296
- "platform_editor_nested_tables_resizing": {
297
- "type": "boolean"
298
- },
299
296
  "platform_editor_renderer_table_header_styles": {
300
297
  "type": "boolean"
301
298
  },