@atlaskit/editor-plugin-panel 4.3.4 → 4.3.6
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 +17 -0
- package/dist/cjs/panelPlugin.js +1 -1
- package/dist/cjs/pm-plugins/utils/utils.js +2 -3
- package/dist/es2019/panelPlugin.js +2 -2
- package/dist/es2019/pm-plugins/utils/utils.js +2 -3
- package/dist/esm/panelPlugin.js +2 -2
- package/dist/esm/pm-plugins/utils/utils.js +2 -3
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-panel
|
|
2
2
|
|
|
3
|
+
## 4.3.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#138959](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/138959)
|
|
8
|
+
[`66b24c95f63de`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/66b24c95f63de) -
|
|
9
|
+
Clean up experiment platform_editor_nested_non_bodied_macros [ED-27183]
|
|
10
|
+
|
|
11
|
+
## 4.3.5
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#133802](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/133802)
|
|
16
|
+
[`f523489c8b68a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f523489c8b68a) -
|
|
17
|
+
[ux] ED-27217 Clean up experiment platform_editor_element_drag_and_drop_nested
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 4.3.4
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/cjs/panelPlugin.js
CHANGED
|
@@ -24,7 +24,7 @@ var panelPlugin = function panelPlugin(_ref) {
|
|
|
24
24
|
return {
|
|
25
25
|
name: 'panel',
|
|
26
26
|
nodes: function nodes() {
|
|
27
|
-
var panelNode = (0,
|
|
27
|
+
var panelNode = (0, _adfSchema.extendedPanel)(!!options.allowCustomPanel);
|
|
28
28
|
return [{
|
|
29
29
|
name: 'panel',
|
|
30
30
|
node: panelNode
|
|
@@ -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,
|
|
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,
|
|
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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { extendedPanel,
|
|
2
|
+
import { extendedPanel, PanelType } from '@atlaskit/adf-schema';
|
|
3
3
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { blockTypeMessages } from '@atlaskit/editor-common/messages';
|
|
5
5
|
import { IconCustomPanel, IconPanel, IconPanelError, IconPanelNote, IconPanelSuccess, IconPanelWarning } from '@atlaskit/editor-common/quick-insert';
|
|
@@ -16,7 +16,7 @@ const panelPlugin = ({
|
|
|
16
16
|
}) => ({
|
|
17
17
|
name: 'panel',
|
|
18
18
|
nodes() {
|
|
19
|
-
const panelNode =
|
|
19
|
+
const panelNode = extendedPanel(!!options.allowCustomPanel);
|
|
20
20
|
return [{
|
|
21
21
|
name: 'panel',
|
|
22
22
|
node: panelNode
|
|
@@ -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 &&
|
|
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 &&
|
|
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
|
package/dist/esm/panelPlugin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { extendedPanel,
|
|
2
|
+
import { extendedPanel, PanelType } from '@atlaskit/adf-schema';
|
|
3
3
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { blockTypeMessages } from '@atlaskit/editor-common/messages';
|
|
5
5
|
import { IconCustomPanel, IconPanel, IconPanelError, IconPanelNote, IconPanelSuccess, IconPanelWarning } from '@atlaskit/editor-common/quick-insert';
|
|
@@ -17,7 +17,7 @@ var panelPlugin = function panelPlugin(_ref) {
|
|
|
17
17
|
return {
|
|
18
18
|
name: 'panel',
|
|
19
19
|
nodes: function nodes() {
|
|
20
|
-
var panelNode =
|
|
20
|
+
var panelNode = extendedPanel(!!options.allowCustomPanel);
|
|
21
21
|
return [{
|
|
22
22
|
name: 'panel',
|
|
23
23
|
node: panelNode
|
|
@@ -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 &&
|
|
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 &&
|
|
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
|
+
"version": "4.3.6",
|
|
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": "^103.
|
|
35
|
+
"@atlaskit/editor-common": "^103.3.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",
|
|
@@ -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
|
},
|