@atlaskit/editor-plugin-panel 4.3.3 → 4.3.5

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
+ ## 4.3.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#133802](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/133802)
8
+ [`f523489c8b68a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f523489c8b68a) -
9
+ [ux] ED-27217 Clean up experiment platform_editor_element_drag_and_drop_nested
10
+ - Updated dependencies
11
+
12
+ ## 4.3.4
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
3
18
  ## 4.3.3
4
19
 
5
20
  ### Patch Changes
@@ -12,7 +12,6 @@ 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
14
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
16
15
  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; }
17
16
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18
17
  var findPanel = exports.findPanel = function findPanel(state, selection) {
@@ -29,9 +28,9 @@ var panelAttrsToDom = exports.panelAttrsToDom = function panelAttrsToDom(attrs,
29
28
  var hasIcon = !isCustomPanel || !!panelIcon || !!panelIconId;
30
29
  var tokenColor = panelColor && (0, _editorPalette.hexToEditorBackgroundPaletteColor)(panelColor);
31
30
  var panelBackgroundColor = tokenColor || panelColor;
32
- var style = ["".concat(panelColor && isCustomPanel ? "background-color: ".concat(panelBackgroundColor, ";") : ''), "".concat(!hasIcon && (0, _experiments.editorExperiment)('nested-dnd', false) ? "padding-left: 12px;padding-right: 12px;" : '')].join('');
31
+ var style = ["".concat(panelColor && isCustomPanel ? "background-color: ".concat(panelBackgroundColor, ";") : ''), "".concat(!hasIcon && !(0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? "padding-left: 12px;padding-right: 12px;" : '')].join('');
33
32
  var panelAttrs = {
34
- class: "".concat(_panel.PanelSharedCssClassName.prefix).concat(!hasIcon && (0, _experiments.editorExperiment)('nested-dnd', true) ? " ".concat(_panel.PanelSharedCssClassName.noIcon) : ''),
33
+ class: "".concat(_panel.PanelSharedCssClassName.prefix).concat(!hasIcon && (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? " ".concat(_panel.PanelSharedCssClassName.noIcon) : ''),
35
34
  'data-panel-type': panelType || _adfSchema.PanelType.INFO,
36
35
  'data-testid': 'panel-node-view',
37
36
  style: style
@@ -4,7 +4,6 @@ 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
6
  import { fg } from '@atlaskit/platform-feature-flags';
7
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
8
7
  export const findPanel = (state, selection) => {
9
8
  const {
10
9
  panel
@@ -23,9 +22,9 @@ export const panelAttrsToDom = (attrs, allowCustomPanel) => {
23
22
  const hasIcon = !isCustomPanel || !!panelIcon || !!panelIconId;
24
23
  const tokenColor = panelColor && hexToEditorBackgroundPaletteColor(panelColor);
25
24
  const panelBackgroundColor = tokenColor || panelColor;
26
- const style = [`${panelColor && isCustomPanel ? `background-color: ${panelBackgroundColor};` : ''}`, `${!hasIcon && editorExperiment('nested-dnd', false) ? `padding-left: 12px;padding-right: 12px;` : ''}`].join('');
25
+ const style = [`${panelColor && isCustomPanel ? `background-color: ${panelBackgroundColor};` : ''}`, `${!hasIcon && !fg('platform_editor_nested_dnd_styles_changes') ? `padding-left: 12px;padding-right: 12px;` : ''}`].join('');
27
26
  let panelAttrs = {
28
- class: `${PanelSharedCssClassName.prefix}${!hasIcon && editorExperiment('nested-dnd', true) ? ` ${PanelSharedCssClassName.noIcon}` : ''}`,
27
+ class: `${PanelSharedCssClassName.prefix}${!hasIcon && fg('platform_editor_nested_dnd_styles_changes') ? ` ${PanelSharedCssClassName.noIcon}` : ''}`,
29
28
  'data-panel-type': panelType || PanelType.INFO,
30
29
  'data-testid': 'panel-node-view',
31
30
  style
@@ -7,7 +7,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
9
  import { fg } from '@atlaskit/platform-feature-flags';
10
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
11
10
  export var findPanel = function findPanel(state, selection) {
12
11
  var panel = state.schema.nodes.panel;
13
12
  return findSelectedNodeOfType(panel)(selection || state.selection) || findParentNodeOfType(panel)(selection || state.selection);
@@ -22,9 +21,9 @@ export var panelAttrsToDom = function panelAttrsToDom(attrs, allowCustomPanel) {
22
21
  var hasIcon = !isCustomPanel || !!panelIcon || !!panelIconId;
23
22
  var tokenColor = panelColor && hexToEditorBackgroundPaletteColor(panelColor);
24
23
  var panelBackgroundColor = tokenColor || panelColor;
25
- var style = ["".concat(panelColor && isCustomPanel ? "background-color: ".concat(panelBackgroundColor, ";") : ''), "".concat(!hasIcon && editorExperiment('nested-dnd', false) ? "padding-left: 12px;padding-right: 12px;" : '')].join('');
24
+ var style = ["".concat(panelColor && isCustomPanel ? "background-color: ".concat(panelBackgroundColor, ";") : ''), "".concat(!hasIcon && !fg('platform_editor_nested_dnd_styles_changes') ? "padding-left: 12px;padding-right: 12px;" : '')].join('');
26
25
  var panelAttrs = {
27
- class: "".concat(PanelSharedCssClassName.prefix).concat(!hasIcon && editorExperiment('nested-dnd', true) ? " ".concat(PanelSharedCssClassName.noIcon) : ''),
26
+ class: "".concat(PanelSharedCssClassName.prefix).concat(!hasIcon && fg('platform_editor_nested_dnd_styles_changes') ? " ".concat(PanelSharedCssClassName.noIcon) : ''),
28
27
  'data-panel-type': panelType || PanelType.INFO,
29
28
  'data-testid': 'panel-node-view',
30
29
  style: style
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-panel",
3
- "version": "4.3.3",
3
+ "version": "4.3.5",
4
4
  "description": "Panel plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^47.6.0",
35
- "@atlaskit/editor-common": "^102.18.0",
35
+ "@atlaskit/editor-common": "^103.1.0",
36
36
  "@atlaskit/editor-palette": "^2.1.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^2.2.0",
38
38
  "@atlaskit/editor-plugin-decorations": "^2.0.0",
@@ -44,7 +44,7 @@
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
45
  "@atlaskit/theme": "^18.0.0",
46
46
  "@atlaskit/tmp-editor-statsig": "^4.6.0",
47
- "@atlaskit/tokens": "^4.6.0",
47
+ "@atlaskit/tokens": "^4.7.0",
48
48
  "@babel/runtime": "^7.0.0",
49
49
  "uuid": "^3.1.0"
50
50
  },
@@ -96,6 +96,9 @@
96
96
  "platform_editor_nbm_backspace_fixes": {
97
97
  "type": "boolean"
98
98
  },
99
+ "platform_editor_nested_dnd_styles_changes": {
100
+ "type": "boolean"
101
+ },
99
102
  "platform_editor_controls_patch_1": {
100
103
  "type": "boolean"
101
104
  },