@atlaskit/editor-plugin-table 7.0.0 → 7.0.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-plugin-table
2
2
 
3
+ ## 7.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#67831](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67831) [`6027f6646d15`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6027f6646d15) - Fix table scroll when pressing CMD+A to select all
8
+
9
+ ## 7.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#67948](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67948) [`28fcdf6793a4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/28fcdf6793a4) - Expand/collapse for panel and table color pickers
14
+
3
15
  ## 7.0.0
4
16
 
5
17
  ### Major Changes
@@ -485,6 +485,7 @@ var getColorPicker = function getColorPicker(state, menu, _ref5, editorAnalytics
485
485
  id: 'editor.table.colorPicker',
486
486
  title: formatMessage(_messages.tableMessages.cellBackground),
487
487
  type: 'select',
488
+ isAriaExpanded: true,
488
489
  selectType: 'color',
489
490
  defaultValue: defaultPalette,
490
491
  options: _uiColor.cellBackgroundColorPalette,
@@ -27,7 +27,7 @@ var cornerControlHeight = _consts.tableToolbarSize + 1;
27
27
  */
28
28
  var insertColumnButtonOffset = exports.insertColumnButtonOffset = _consts.tableInsertColumnButtonSize / 2;
29
29
  var tableRowHeight = exports.tableRowHeight = 44;
30
- var rangeSelectionStyles = "\n.".concat(_types.TableCssClassName.NODEVIEW_WRAPPER, ".").concat(_editorSharedStyles.akEditorSelectedNodeClassName, " table tbody tr {\n th,td {\n ").concat((0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.Border]), "\n }\n}\n");
30
+ var rangeSelectionStyles = "\n.".concat(_types.TableCssClassName.NODEVIEW_WRAPPER, ".").concat(_editorSharedStyles.akEditorSelectedNodeClassName, " table tbody tr {\n th,td {\n ").concat((0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.Border]), "\n\n // The non-break space /00a0 in :after selector caused a table scroll issue when pressing Cmd+A to select table\n // This line is to override the content of :after selector from the shared getSelectionStyles\n &::after {\n content: '';\n }\n }\n}\n");
31
31
  var sentinelStyles = ".".concat(_types.TableCssClassName.TABLE_CONTAINER, " {\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SENTINEL_TOP, ", > .").concat(_types.TableCssClassName.TABLE_STICKY_SENTINEL_BOTTOM, " {\n position: absolute;\n width: 100%;\n height: 1px;\n margin-top: -1px;\n // need this to avoid sentinel being focused via keyboard\n // this still allows it to be detected by intersection observer\n visibility: hidden;\n }\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SENTINEL_TOP, " {\n top: ").concat(_consts.columnControlsDecorationHeight, "px;\n }\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SENTINEL_BOTTOM, " {\n bottom: ").concat(_consts.tableScrollbarOffset + _consts.stickyRowOffsetTop + _consts.tablePadding * 2 + 23, "px;\n }\n &.").concat(_types.TableCssClassName.WITH_CONTROLS, " {\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SENTINEL_TOP, " {\n top: 0px;\n }\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SENTINEL_BOTTOM, " {\n margin-bottom: ").concat(_consts.columnControlsDecorationHeight, "px;\n }\n }\n}");
32
32
  var stickyScrollbarSentinelStyles = ".".concat(_types.TableCssClassName.TABLE_CONTAINER, " {\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_BOTTOM, ",\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_TOP, " {\n position: absolute;\n width: 100%;\n height: 1px;\n margin-top: -1px;\n // need this to avoid sentinel being focused via keyboard\n // this still allows it to be detected by intersection observer\n visibility: hidden;\n }\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_TOP, " {\n top: ").concat(_consts.columnControlsDecorationHeight + tableRowHeight * 3, "px;\n }\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_BOTTOM, " {\n bottom: ").concat(_editorSharedStyles.MAX_BROWSER_SCROLLBAR_HEIGHT, "px;\n }\n}");
33
33
  var stickyScrollbarContainerStyles = ".".concat(_types.TableCssClassName.TABLE_CONTAINER, " {\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SCROLLBAR_CONTAINER, " {\n width: 100%;\n display: none;\n overflow-x: auto;\n position: sticky;\n bottom: 0;\n z-index: 1;\n }\n}");
@@ -462,6 +462,7 @@ const getColorPicker = (state, menu, {
462
462
  id: 'editor.table.colorPicker',
463
463
  title: formatMessage(messages.cellBackground),
464
464
  type: 'select',
465
+ isAriaExpanded: true,
465
466
  selectType: 'color',
466
467
  defaultValue: defaultPalette,
467
468
  options: cellBackgroundColorPalette,
@@ -22,6 +22,12 @@ const rangeSelectionStyles = `
22
22
  .${ClassName.NODEVIEW_WRAPPER}.${akEditorSelectedNodeClassName} table tbody tr {
23
23
  th,td {
24
24
  ${getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.Border])}
25
+
26
+ // The non-break space /00a0 in :after selector caused a table scroll issue when pressing Cmd+A to select table
27
+ // This line is to override the content of :after selector from the shared getSelectionStyles
28
+ &::after {
29
+ content: '';
30
+ }
25
31
  }
26
32
  }
27
33
  `;
@@ -474,6 +474,7 @@ var getColorPicker = function getColorPicker(state, menu, _ref5, editorAnalytics
474
474
  id: 'editor.table.colorPicker',
475
475
  title: formatMessage(messages.cellBackground),
476
476
  type: 'select',
477
+ isAriaExpanded: true,
477
478
  selectType: 'color',
478
479
  defaultValue: defaultPalette,
479
480
  options: cellBackgroundColorPalette,
@@ -20,7 +20,7 @@ var cornerControlHeight = tableToolbarSize + 1;
20
20
  */
21
21
  export var insertColumnButtonOffset = tableInsertColumnButtonSize / 2;
22
22
  export var tableRowHeight = 44;
23
- var rangeSelectionStyles = "\n.".concat(ClassName.NODEVIEW_WRAPPER, ".").concat(akEditorSelectedNodeClassName, " table tbody tr {\n th,td {\n ").concat(getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.Border]), "\n }\n}\n");
23
+ var rangeSelectionStyles = "\n.".concat(ClassName.NODEVIEW_WRAPPER, ".").concat(akEditorSelectedNodeClassName, " table tbody tr {\n th,td {\n ").concat(getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.Border]), "\n\n // The non-break space /00a0 in :after selector caused a table scroll issue when pressing Cmd+A to select table\n // This line is to override the content of :after selector from the shared getSelectionStyles\n &::after {\n content: '';\n }\n }\n}\n");
24
24
  var sentinelStyles = ".".concat(ClassName.TABLE_CONTAINER, " {\n > .").concat(ClassName.TABLE_STICKY_SENTINEL_TOP, ", > .").concat(ClassName.TABLE_STICKY_SENTINEL_BOTTOM, " {\n position: absolute;\n width: 100%;\n height: 1px;\n margin-top: -1px;\n // need this to avoid sentinel being focused via keyboard\n // this still allows it to be detected by intersection observer\n visibility: hidden;\n }\n > .").concat(ClassName.TABLE_STICKY_SENTINEL_TOP, " {\n top: ").concat(columnControlsDecorationHeight, "px;\n }\n > .").concat(ClassName.TABLE_STICKY_SENTINEL_BOTTOM, " {\n bottom: ").concat(tableScrollbarOffset + stickyRowOffsetTop + tablePadding * 2 + 23, "px;\n }\n &.").concat(ClassName.WITH_CONTROLS, " {\n > .").concat(ClassName.TABLE_STICKY_SENTINEL_TOP, " {\n top: 0px;\n }\n > .").concat(ClassName.TABLE_STICKY_SENTINEL_BOTTOM, " {\n margin-bottom: ").concat(columnControlsDecorationHeight, "px;\n }\n }\n}");
25
25
  var stickyScrollbarSentinelStyles = ".".concat(ClassName.TABLE_CONTAINER, " {\n > .").concat(ClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_BOTTOM, ",\n > .").concat(ClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_TOP, " {\n position: absolute;\n width: 100%;\n height: 1px;\n margin-top: -1px;\n // need this to avoid sentinel being focused via keyboard\n // this still allows it to be detected by intersection observer\n visibility: hidden;\n }\n > .").concat(ClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_TOP, " {\n top: ").concat(columnControlsDecorationHeight + tableRowHeight * 3, "px;\n }\n > .").concat(ClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_BOTTOM, " {\n bottom: ").concat(MAX_BROWSER_SCROLLBAR_HEIGHT, "px;\n }\n}");
26
26
  var stickyScrollbarContainerStyles = ".".concat(ClassName.TABLE_CONTAINER, " {\n > .").concat(ClassName.TABLE_STICKY_SCROLLBAR_CONTAINER, " {\n width: 100%;\n display: none;\n overflow-x: auto;\n position: sticky;\n bottom: 0;\n z-index: 1;\n }\n}");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "7.0.0",
3
+ "version": "7.0.2",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
package/src/toolbar.tsx CHANGED
@@ -727,6 +727,7 @@ const getColorPicker = (
727
727
  id: 'editor.table.colorPicker',
728
728
  title: formatMessage(messages.cellBackground),
729
729
  type: 'select',
730
+ isAriaExpanded: true,
730
731
  selectType: 'color',
731
732
  defaultValue: defaultPalette,
732
733
  options: cellBackgroundColorPalette,
@@ -89,6 +89,12 @@ const rangeSelectionStyles = `
89
89
  .${ClassName.NODEVIEW_WRAPPER}.${akEditorSelectedNodeClassName} table tbody tr {
90
90
  th,td {
91
91
  ${getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.Border])}
92
+
93
+ // The non-break space /00a0 in :after selector caused a table scroll issue when pressing Cmd+A to select table
94
+ // This line is to override the content of :after selector from the shared getSelectionStyles
95
+ &::after {
96
+ content: '';
97
+ }
92
98
  }
93
99
  }
94
100
  `;