@atlaskit/editor-plugin-panel 1.1.1 → 1.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,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-panel
|
|
2
2
|
|
|
3
|
+
## 1.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#94717](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94717) [`40f38eb0a512`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/40f38eb0a512) - Cleaning up feature flag for inserting nodes in ordered list.
|
|
8
|
+
|
|
9
|
+
Fix bugs for incorrect ordered list order with action & improve selection behaviour on insert
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 1.1.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#93748](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/93748) [`16e695c28843`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/16e695c28843) - ED-22891: Fixed selection weirdness when panel has no icon
|
|
18
|
+
|
|
3
19
|
## 1.1.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -79,6 +79,9 @@ var PanelNodeView = /*#__PURE__*/function () {
|
|
|
79
79
|
key: "ignoreMutation",
|
|
80
80
|
value: function ignoreMutation(mutation) {
|
|
81
81
|
// ignore mutation if it caused by the icon.
|
|
82
|
+
if (!this.icon) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
82
85
|
var isIcon = mutation.target === this.icon || mutation.target.parentNode === this.icon;
|
|
83
86
|
// ignore mutation if it caused by the lazy load emoji inside icon.
|
|
84
87
|
var isInsideIcon = this.icon.contains(mutation.target);
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -10,7 +10,6 @@ var _adfSchema = require("@atlaskit/adf-schema");
|
|
|
10
10
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
11
11
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
12
12
|
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
13
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
|
14
13
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
16
15
|
var _actions = require("./actions");
|
|
@@ -205,11 +204,7 @@ function createPanelAction(_ref4) {
|
|
|
205
204
|
if (!node) {
|
|
206
205
|
return false;
|
|
207
206
|
}
|
|
208
|
-
var tr = state.selection.empty &&
|
|
209
|
-
state: state,
|
|
210
|
-
type: state.schema.nodes.panel,
|
|
211
|
-
nodeAttributes: attributes
|
|
212
|
-
});
|
|
207
|
+
var tr = state.selection.empty && insert(node);
|
|
213
208
|
if (tr) {
|
|
214
209
|
var _api$analytics2;
|
|
215
210
|
api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 || _api$analytics2.actions.attachAnalyticsEvent({
|
|
@@ -71,6 +71,9 @@ class PanelNodeView {
|
|
|
71
71
|
}
|
|
72
72
|
ignoreMutation(mutation) {
|
|
73
73
|
// ignore mutation if it caused by the icon.
|
|
74
|
+
if (!this.icon) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
74
77
|
const isIcon = mutation.target === this.icon || mutation.target.parentNode === this.icon;
|
|
75
78
|
// ignore mutation if it caused by the lazy load emoji inside icon.
|
|
76
79
|
const isInsideIcon = this.icon.contains(mutation.target);
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -3,7 +3,6 @@ import { extendedPanel, panel, 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';
|
|
6
|
-
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
|
|
7
6
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { T50 } from '@atlaskit/theme/colors';
|
|
9
8
|
import { insertPanelWithAnalytics } from './actions';
|
|
@@ -183,11 +182,7 @@ function createPanelAction({
|
|
|
183
182
|
if (!node) {
|
|
184
183
|
return false;
|
|
185
184
|
}
|
|
186
|
-
const tr = state.selection.empty &&
|
|
187
|
-
state,
|
|
188
|
-
type: state.schema.nodes.panel,
|
|
189
|
-
nodeAttributes: attributes
|
|
190
|
-
});
|
|
185
|
+
const tr = state.selection.empty && insert(node);
|
|
191
186
|
if (tr) {
|
|
192
187
|
var _api$analytics2;
|
|
193
188
|
api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions.attachAnalyticsEvent({
|
|
@@ -72,6 +72,9 @@ var PanelNodeView = /*#__PURE__*/function () {
|
|
|
72
72
|
key: "ignoreMutation",
|
|
73
73
|
value: function ignoreMutation(mutation) {
|
|
74
74
|
// ignore mutation if it caused by the icon.
|
|
75
|
+
if (!this.icon) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
75
78
|
var isIcon = mutation.target === this.icon || mutation.target.parentNode === this.icon;
|
|
76
79
|
// ignore mutation if it caused by the lazy load emoji inside icon.
|
|
77
80
|
var isInsideIcon = this.icon.contains(mutation.target);
|
package/dist/esm/plugin.js
CHANGED
|
@@ -3,7 +3,6 @@ import { extendedPanel, panel, 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';
|
|
6
|
-
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
|
|
7
6
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { T50 } from '@atlaskit/theme/colors';
|
|
9
8
|
import { insertPanelWithAnalytics } from './actions';
|
|
@@ -198,11 +197,7 @@ function createPanelAction(_ref4) {
|
|
|
198
197
|
if (!node) {
|
|
199
198
|
return false;
|
|
200
199
|
}
|
|
201
|
-
var tr = state.selection.empty &&
|
|
202
|
-
state: state,
|
|
203
|
-
type: state.schema.nodes.panel,
|
|
204
|
-
nodeAttributes: attributes
|
|
205
|
-
});
|
|
200
|
+
var tr = state.selection.empty && insert(node);
|
|
206
201
|
if (tr) {
|
|
207
202
|
var _api$analytics2;
|
|
208
203
|
api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 || _api$analytics2.actions.attachAnalyticsEvent({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-panel",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Panel plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/adf-schema": "^35.10.0",
|
|
37
|
-
"@atlaskit/editor-common": "^78.
|
|
37
|
+
"@atlaskit/editor-common": "^78.34.0",
|
|
38
38
|
"@atlaskit/editor-palette": "1.5.3",
|
|
39
39
|
"@atlaskit/editor-plugin-analytics": "^1.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-decorations": "^1.1.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "4.0.0",
|
|
42
|
-
"@atlaskit/editor-shared-styles": "^2.
|
|
42
|
+
"@atlaskit/editor-shared-styles": "^2.10.0",
|
|
43
43
|
"@atlaskit/emoji": "^67.6.0",
|
|
44
44
|
"@atlaskit/icon": "^22.1.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
@@ -93,9 +93,6 @@
|
|
|
93
93
|
},
|
|
94
94
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0",
|
|
95
95
|
"platform-feature-flags": {
|
|
96
|
-
"platform.editor.ordered-list-inserting-nodes_bh0vo": {
|
|
97
|
-
"type": "boolean"
|
|
98
|
-
},
|
|
99
96
|
"platform.editor.allow-extended-panel": {
|
|
100
97
|
"type": "boolean"
|
|
101
98
|
},
|