@atlaskit/editor-plugin-card 3.0.5 → 3.0.7
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 +16 -0
- package/dist/cjs/pm-plugins/main.js +14 -0
- package/dist/es2019/pm-plugins/main.js +14 -0
- package/dist/esm/pm-plugins/main.js +14 -0
- package/package.json +7 -4
- package/.eslintrc.js +0 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 3.0.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 3.0.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#143055](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/143055)
|
|
14
|
+
[`1580619590f3e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1580619590f3e) -
|
|
15
|
+
[ux] Adds a filterTransaction to the editor-card plugin to ignore bug-causing click transaction
|
|
16
|
+
when inline editing is active and user clicks on scroll gutter of the editor, ignoring the
|
|
17
|
+
transaction coming from editor-core click-area-helper in this edge case.
|
|
18
|
+
|
|
3
19
|
## 3.0.5
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -160,6 +160,20 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pluginI
|
|
|
160
160
|
return newState;
|
|
161
161
|
}
|
|
162
162
|
},
|
|
163
|
+
filterTransaction: function filterTransaction(tr) {
|
|
164
|
+
if ((0, _platformFeatureFlags.fg)('platform_linking_enable_transaction_filtering')) {
|
|
165
|
+
var isOutsideClicked = tr.getMeta('outsideProsemirrorEditorClicked');
|
|
166
|
+
if (isOutsideClicked) {
|
|
167
|
+
var isInlineEditingActive = document.getElementById('sllv-active-inline-edit');
|
|
168
|
+
if (isInlineEditingActive) {
|
|
169
|
+
return false;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return true;
|
|
173
|
+
} else {
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
},
|
|
163
177
|
view: function view(_view) {
|
|
164
178
|
var domAtPos = _view.domAtPos.bind(_view);
|
|
165
179
|
var rafCancellationCallbacks = [];
|
|
@@ -147,6 +147,20 @@ export const createPlugin = (options, pluginInjectionApi) => pmPluginFactoryPara
|
|
|
147
147
|
return newState;
|
|
148
148
|
}
|
|
149
149
|
},
|
|
150
|
+
filterTransaction(tr) {
|
|
151
|
+
if (fg('platform_linking_enable_transaction_filtering')) {
|
|
152
|
+
const isOutsideClicked = tr.getMeta('outsideProsemirrorEditorClicked');
|
|
153
|
+
if (isOutsideClicked) {
|
|
154
|
+
const isInlineEditingActive = document.getElementById('sllv-active-inline-edit');
|
|
155
|
+
if (isInlineEditingActive) {
|
|
156
|
+
return false;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return true;
|
|
160
|
+
} else {
|
|
161
|
+
return true;
|
|
162
|
+
}
|
|
163
|
+
},
|
|
150
164
|
view(view) {
|
|
151
165
|
const domAtPos = view.domAtPos.bind(view);
|
|
152
166
|
const rafCancellationCallbacks = [];
|
|
@@ -147,6 +147,20 @@ export var createPlugin = function createPlugin(options, pluginInjectionApi) {
|
|
|
147
147
|
return newState;
|
|
148
148
|
}
|
|
149
149
|
},
|
|
150
|
+
filterTransaction: function filterTransaction(tr) {
|
|
151
|
+
if (fg('platform_linking_enable_transaction_filtering')) {
|
|
152
|
+
var isOutsideClicked = tr.getMeta('outsideProsemirrorEditorClicked');
|
|
153
|
+
if (isOutsideClicked) {
|
|
154
|
+
var isInlineEditingActive = document.getElementById('sllv-active-inline-edit');
|
|
155
|
+
if (isInlineEditingActive) {
|
|
156
|
+
return false;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return true;
|
|
160
|
+
} else {
|
|
161
|
+
return true;
|
|
162
|
+
}
|
|
163
|
+
},
|
|
150
164
|
view: function view(_view) {
|
|
151
165
|
var domAtPos = _view.domAtPos.bind(_view);
|
|
152
166
|
var rafCancellationCallbacks = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@atlaskit/adf-schema": "^40.9.0",
|
|
35
35
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
36
36
|
"@atlaskit/custom-steps": "^0.7.0",
|
|
37
|
-
"@atlaskit/editor-common": "^
|
|
37
|
+
"@atlaskit/editor-common": "^91.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^1.8.0",
|
|
39
39
|
"@atlaskit/editor-plugin-decorations": "^1.3.0",
|
|
40
40
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
"@atlaskit/linking-types": "^9.0.0",
|
|
55
55
|
"@atlaskit/menu": "2.12.2",
|
|
56
56
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
57
|
-
"@atlaskit/primitives": "^12.
|
|
57
|
+
"@atlaskit/primitives": "^12.2.0",
|
|
58
58
|
"@atlaskit/smart-card": "^28.1.0",
|
|
59
59
|
"@atlaskit/theme": "^13.0.0",
|
|
60
60
|
"@atlaskit/tmp-editor-statsig": "^2.1.8",
|
|
61
|
-
"@atlaskit/tokens": "^1.
|
|
61
|
+
"@atlaskit/tokens": "^1.61.0",
|
|
62
62
|
"@babel/runtime": "^7.0.0",
|
|
63
63
|
"@emotion/react": "^11.7.1",
|
|
64
64
|
"lodash": "^4.17.21",
|
|
@@ -137,6 +137,9 @@
|
|
|
137
137
|
},
|
|
138
138
|
"hardcoded-embeds-only-on-new-line": {
|
|
139
139
|
"type": "boolean"
|
|
140
|
+
},
|
|
141
|
+
"platform_linking_enable_transaction_filtering": {
|
|
142
|
+
"type": "boolean"
|
|
140
143
|
}
|
|
141
144
|
},
|
|
142
145
|
"stricter": {
|
package/.eslintrc.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
rules: {
|
|
3
|
-
'@typescript-eslint/no-duplicate-imports': 'error',
|
|
4
|
-
'@typescript-eslint/no-explicit-any': 'error',
|
|
5
|
-
},
|
|
6
|
-
overrides: [
|
|
7
|
-
{
|
|
8
|
-
files: ['**/__tests__/**/*.{js,ts,tsx}', '**/examples/**/*.{js,ts,tsx}'],
|
|
9
|
-
rules: {
|
|
10
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
],
|
|
14
|
-
};
|