@atlaskit/editor-plugin-panel 13.0.1 → 13.0.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,20 @@
1
1
  # @atlaskit/editor-plugin-panel
2
2
 
3
+ ## 13.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 13.0.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`ae8f78f39a5d2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ae8f78f39a5d2) -
14
+ Fix white masking wrapper (from sticky headers) visible when tables are nested inside coloured
15
+ panels
16
+ - Updated dependencies
17
+
3
18
  ## 13.0.1
4
19
 
5
20
  ### Patch Changes
@@ -11,6 +11,7 @@ var _panel = require("@atlaskit/editor-common/panel");
11
11
  var _editorPalette = require("@atlaskit/editor-palette");
12
12
  var _state = require("@atlaskit/editor-prosemirror/state");
13
13
  var _utils = require("@atlaskit/editor-prosemirror/utils");
14
+ var _consts = require("@atlaskit/editor-shared-styles/consts");
14
15
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
16
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
16
17
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -58,7 +59,11 @@ var panelAttrsToDom = exports.panelAttrsToDom = function panelAttrsToDom(attrs,
58
59
  var hasIcon = !isCustomPanel || !!panelIcon || !!panelIconId;
59
60
  var tokenColor = (0, _expValEquals.expValEquals)('platform_editor_stricter_panelcolor_typecheck', 'isEnabled', true) ? typeof panelColor === 'string' && (0, _editorPalette.hexToEditorBackgroundPaletteColor)(panelColor) : panelColor && (0, _editorPalette.hexToEditorBackgroundPaletteColor)(panelColor);
60
61
  var panelBackgroundColor = tokenColor || panelColor;
61
- var style = ["".concat(((0, _expValEquals.expValEquals)('platform_editor_stricter_panelcolor_typecheck', 'isEnabled', true) ? typeof panelColor === 'string' && isCustomPanel : panelColor && isCustomPanel) ? "background-color: ".concat(panelBackgroundColor, ";") : ''), "".concat(!hasIcon && !(0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? "padding-left: 12px;padding-right: 12px;" : '')].join('');
62
+ var isCustomPanelWithColor = (0, _expValEquals.expValEquals)('platform_editor_stricter_panelcolor_typecheck', 'isEnabled', true) ? typeof panelColor === 'string' && isCustomPanel : panelColor && isCustomPanel;
63
+ var style = ["".concat(isCustomPanelWithColor ? "background-color: ".concat(panelBackgroundColor, ";") : ''), // When table-in-panel is enabled, set --table-container-bg so that table
64
+ // masking elements (sticky-header mask, column-controls wrapper) blend with
65
+ // the custom panel background instead of showing opaque white.
66
+ "".concat(isCustomPanelWithColor && (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "".concat(_consts.akEditorTableContainerBg, ": ").concat(panelBackgroundColor, ";") : ''), "".concat(!hasIcon && !(0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? "padding-left: 12px;padding-right: 12px;" : '')].join('');
62
67
  var panelAttrs = {
63
68
  class: "".concat(_panel.PanelSharedCssClassName.prefix).concat(!hasIcon && (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? " ".concat(_panel.PanelSharedCssClassName.noIcon) : ''),
64
69
  'data-panel-type': panelType || _adfSchema.PanelType.INFO,
@@ -3,6 +3,7 @@ import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
3
3
  import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
4
4
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { findParentNode, findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
6
+ import { akEditorTableContainerBg } from '@atlaskit/editor-shared-styles/consts';
6
7
  import { fg } from '@atlaskit/platform-feature-flags';
7
8
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
9
  export const isPanel = nodeName => {
@@ -53,7 +54,12 @@ export const panelAttrsToDom = (attrs, allowCustomPanel) => {
53
54
  const hasIcon = !isCustomPanel || !!panelIcon || !!panelIconId;
54
55
  const tokenColor = expValEquals('platform_editor_stricter_panelcolor_typecheck', 'isEnabled', true) ? typeof panelColor === 'string' && hexToEditorBackgroundPaletteColor(panelColor) : panelColor && hexToEditorBackgroundPaletteColor(panelColor);
55
56
  const panelBackgroundColor = tokenColor || panelColor;
56
- const style = [`${(expValEquals('platform_editor_stricter_panelcolor_typecheck', 'isEnabled', true) ? typeof panelColor === 'string' && isCustomPanel : panelColor && isCustomPanel) ? `background-color: ${panelBackgroundColor};` : ''}`, `${!hasIcon && !fg('platform_editor_nested_dnd_styles_changes') ? `padding-left: 12px;padding-right: 12px;` : ''}`].join('');
57
+ const isCustomPanelWithColor = expValEquals('platform_editor_stricter_panelcolor_typecheck', 'isEnabled', true) ? typeof panelColor === 'string' && isCustomPanel : panelColor && isCustomPanel;
58
+ const style = [`${isCustomPanelWithColor ? `background-color: ${panelBackgroundColor};` : ''}`,
59
+ // When table-in-panel is enabled, set --table-container-bg so that table
60
+ // masking elements (sticky-header mask, column-controls wrapper) blend with
61
+ // the custom panel background instead of showing opaque white.
62
+ `${isCustomPanelWithColor && expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? `${akEditorTableContainerBg}: ${panelBackgroundColor};` : ''}`, `${!hasIcon && !fg('platform_editor_nested_dnd_styles_changes') ? `padding-left: 12px;padding-right: 12px;` : ''}`].join('');
57
63
  let panelAttrs = {
58
64
  class: `${PanelSharedCssClassName.prefix}${!hasIcon && fg('platform_editor_nested_dnd_styles_changes') ? ` ${PanelSharedCssClassName.noIcon}` : ''}`,
59
65
  'data-panel-type': panelType || PanelType.INFO,
@@ -6,6 +6,7 @@ import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
6
6
  import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
7
7
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
8
8
  import { findParentNode, findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
9
+ import { akEditorTableContainerBg } from '@atlaskit/editor-shared-styles/consts';
9
10
  import { fg } from '@atlaskit/platform-feature-flags';
10
11
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
12
  export var isPanel = function isPanel(nodeName) {
@@ -51,7 +52,11 @@ export var panelAttrsToDom = function panelAttrsToDom(attrs, allowCustomPanel) {
51
52
  var hasIcon = !isCustomPanel || !!panelIcon || !!panelIconId;
52
53
  var tokenColor = expValEquals('platform_editor_stricter_panelcolor_typecheck', 'isEnabled', true) ? typeof panelColor === 'string' && hexToEditorBackgroundPaletteColor(panelColor) : panelColor && hexToEditorBackgroundPaletteColor(panelColor);
53
54
  var panelBackgroundColor = tokenColor || panelColor;
54
- var style = ["".concat((expValEquals('platform_editor_stricter_panelcolor_typecheck', 'isEnabled', true) ? typeof panelColor === 'string' && isCustomPanel : panelColor && isCustomPanel) ? "background-color: ".concat(panelBackgroundColor, ";") : ''), "".concat(!hasIcon && !fg('platform_editor_nested_dnd_styles_changes') ? "padding-left: 12px;padding-right: 12px;" : '')].join('');
55
+ var isCustomPanelWithColor = expValEquals('platform_editor_stricter_panelcolor_typecheck', 'isEnabled', true) ? typeof panelColor === 'string' && isCustomPanel : panelColor && isCustomPanel;
56
+ var style = ["".concat(isCustomPanelWithColor ? "background-color: ".concat(panelBackgroundColor, ";") : ''), // When table-in-panel is enabled, set --table-container-bg so that table
57
+ // masking elements (sticky-header mask, column-controls wrapper) blend with
58
+ // the custom panel background instead of showing opaque white.
59
+ "".concat(isCustomPanelWithColor && expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "".concat(akEditorTableContainerBg, ": ").concat(panelBackgroundColor, ";") : ''), "".concat(!hasIcon && !fg('platform_editor_nested_dnd_styles_changes') ? "padding-left: 12px;padding-right: 12px;" : '')].join('');
55
60
  var panelAttrs = {
56
61
  class: "".concat(PanelSharedCssClassName.prefix).concat(!hasIcon && fg('platform_editor_nested_dnd_styles_changes') ? " ".concat(PanelSharedCssClassName.noIcon) : ''),
57
62
  'data-panel-type': panelType || PanelType.INFO,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-panel",
3
- "version": "13.0.1",
3
+ "version": "13.0.3",
4
4
  "description": "Panel plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -38,16 +38,16 @@
38
38
  "@atlaskit/editor-prosemirror": "^7.3.0",
39
39
  "@atlaskit/editor-shared-styles": "^3.11.0",
40
40
  "@atlaskit/editor-toolbar": "^1.10.0",
41
- "@atlaskit/emoji": "^70.15.0",
41
+ "@atlaskit/emoji": "^70.16.0",
42
42
  "@atlaskit/icon": "^35.4.0",
43
43
  "@atlaskit/platform-feature-flags": "^1.1.0",
44
- "@atlaskit/tmp-editor-statsig": "^89.0.0",
45
- "@atlaskit/tokens": "^13.1.0",
44
+ "@atlaskit/tmp-editor-statsig": "^90.0.0",
45
+ "@atlaskit/tokens": "^13.3.0",
46
46
  "@babel/runtime": "^7.0.0",
47
47
  "uuid": "^3.1.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "@atlaskit/editor-common": "^115.2.0",
50
+ "@atlaskit/editor-common": "^115.7.0",
51
51
  "react": "^18.2.0",
52
52
  "react-dom": "^18.2.0",
53
53
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"