@atlaskit/editor-plugin-card 2.13.1 → 2.13.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 +16 -0
- package/dist/cjs/nodeviews/datasource.js +25 -0
- package/dist/es2019/nodeviews/datasource.js +21 -0
- package/dist/esm/nodeviews/datasource.js +25 -0
- package/dist/types/nodeviews/datasource.d.ts +12 -0
- package/dist/types/types.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/datasource.d.ts +12 -0
- package/dist/types-ts4.5/types.d.ts +2 -2
- package/package.json +14 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 2.13.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`638f18de80136`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/638f18de80136) -
|
|
8
|
+
Remove unused exports
|
|
9
|
+
|
|
10
|
+
## 2.13.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#132782](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/132782)
|
|
15
|
+
[`1b37050a2f07e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1b37050a2f07e) -
|
|
16
|
+
Fix inline edit inside datasource table replace entire node
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 2.13.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -273,6 +273,31 @@ var Datasource = exports.Datasource = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
273
273
|
domRef.classList.add(_styles.SmartCardSharedCssClassName.DATASOURCE_CONTAINER);
|
|
274
274
|
return domRef;
|
|
275
275
|
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Node views may render interactive elements that should not have their events reach editor
|
|
279
|
+
*
|
|
280
|
+
* We should the stop editor from handling events from following elements:
|
|
281
|
+
* - typing in input
|
|
282
|
+
* - activating buttons via spacebar
|
|
283
|
+
*
|
|
284
|
+
* Can be used to prevent the editor view from trying to handle some or all DOM events that bubble up from the node view.
|
|
285
|
+
* Events for which this returns true are not handled by the editor.
|
|
286
|
+
* @see {@link https://prosemirror.net/docs/ref/#view.NodeView.stopEvent}
|
|
287
|
+
*/
|
|
288
|
+
}, {
|
|
289
|
+
key: "stopEvent",
|
|
290
|
+
value: function stopEvent(event) {
|
|
291
|
+
if ((0, _platformFeatureFlags.fg)('platform-datasources-enable-two-way-sync')) {
|
|
292
|
+
var isFormElement = [HTMLButtonElement, HTMLInputElement].some(function (element) {
|
|
293
|
+
return event.target instanceof element;
|
|
294
|
+
});
|
|
295
|
+
if (isFormElement) {
|
|
296
|
+
return true;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
return false;
|
|
300
|
+
}
|
|
276
301
|
}, {
|
|
277
302
|
key: "render",
|
|
278
303
|
value: function render() {
|
|
@@ -223,6 +223,27 @@ export class Datasource extends ReactNodeView {
|
|
|
223
223
|
domRef.classList.add(SmartCardSharedCssClassName.DATASOURCE_CONTAINER);
|
|
224
224
|
return domRef;
|
|
225
225
|
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Node views may render interactive elements that should not have their events reach editor
|
|
229
|
+
*
|
|
230
|
+
* We should the stop editor from handling events from following elements:
|
|
231
|
+
* - typing in input
|
|
232
|
+
* - activating buttons via spacebar
|
|
233
|
+
*
|
|
234
|
+
* Can be used to prevent the editor view from trying to handle some or all DOM events that bubble up from the node view.
|
|
235
|
+
* Events for which this returns true are not handled by the editor.
|
|
236
|
+
* @see {@link https://prosemirror.net/docs/ref/#view.NodeView.stopEvent}
|
|
237
|
+
*/
|
|
238
|
+
stopEvent(event) {
|
|
239
|
+
if (fg('platform-datasources-enable-two-way-sync')) {
|
|
240
|
+
const isFormElement = [HTMLButtonElement, HTMLInputElement].some(element => event.target instanceof element);
|
|
241
|
+
if (isFormElement) {
|
|
242
|
+
return true;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
return false;
|
|
246
|
+
}
|
|
226
247
|
render() {
|
|
227
248
|
var _attrs$datasource;
|
|
228
249
|
const {
|
|
@@ -269,6 +269,31 @@ export var Datasource = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
269
269
|
domRef.classList.add(SmartCardSharedCssClassName.DATASOURCE_CONTAINER);
|
|
270
270
|
return domRef;
|
|
271
271
|
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Node views may render interactive elements that should not have their events reach editor
|
|
275
|
+
*
|
|
276
|
+
* We should the stop editor from handling events from following elements:
|
|
277
|
+
* - typing in input
|
|
278
|
+
* - activating buttons via spacebar
|
|
279
|
+
*
|
|
280
|
+
* Can be used to prevent the editor view from trying to handle some or all DOM events that bubble up from the node view.
|
|
281
|
+
* Events for which this returns true are not handled by the editor.
|
|
282
|
+
* @see {@link https://prosemirror.net/docs/ref/#view.NodeView.stopEvent}
|
|
283
|
+
*/
|
|
284
|
+
}, {
|
|
285
|
+
key: "stopEvent",
|
|
286
|
+
value: function stopEvent(event) {
|
|
287
|
+
if (fg('platform-datasources-enable-two-way-sync')) {
|
|
288
|
+
var isFormElement = [HTMLButtonElement, HTMLInputElement].some(function (element) {
|
|
289
|
+
return event.target instanceof element;
|
|
290
|
+
});
|
|
291
|
+
if (isFormElement) {
|
|
292
|
+
return true;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
return false;
|
|
296
|
+
}
|
|
272
297
|
}, {
|
|
273
298
|
key: "render",
|
|
274
299
|
value: function render() {
|
|
@@ -49,6 +49,18 @@ export declare class Datasource extends ReactNodeView<DatasourceProps> {
|
|
|
49
49
|
validUpdate(currentNode: PMNode, newNode: PMNode): boolean;
|
|
50
50
|
update(node: PMNode, decorations: ReadonlyArray<Decoration>, _innerDecorations?: DecorationSource, validUpdate?: (currentNode: PMNode, newNode: PMNode) => boolean): boolean;
|
|
51
51
|
createDomRef(): HTMLElement;
|
|
52
|
+
/**
|
|
53
|
+
* Node views may render interactive elements that should not have their events reach editor
|
|
54
|
+
*
|
|
55
|
+
* We should the stop editor from handling events from following elements:
|
|
56
|
+
* - typing in input
|
|
57
|
+
* - activating buttons via spacebar
|
|
58
|
+
*
|
|
59
|
+
* Can be used to prevent the editor view from trying to handle some or all DOM events that bubble up from the node view.
|
|
60
|
+
* Events for which this returns true are not handled by the editor.
|
|
61
|
+
* @see {@link https://prosemirror.net/docs/ref/#view.NodeView.stopEvent}
|
|
62
|
+
*/
|
|
63
|
+
stopEvent(event: Event): boolean;
|
|
52
64
|
render(): jsx.JSX.Element;
|
|
53
65
|
}
|
|
54
66
|
export {};
|
package/dist/types/types.d.ts
CHANGED
|
@@ -154,10 +154,10 @@ export type SetCardLayoutAndDatasourceTableRef = {
|
|
|
154
154
|
layout: DatasourceTableLayout;
|
|
155
155
|
datasourceTableRef?: HTMLElement;
|
|
156
156
|
};
|
|
157
|
-
|
|
157
|
+
type ClearOverlayCandidate = {
|
|
158
158
|
type: 'CLEAR_OVERLAY_CANDIDATE';
|
|
159
159
|
};
|
|
160
|
-
|
|
160
|
+
type RegisterRemoveOverlayOnInsertedLink = {
|
|
161
161
|
type: 'REGISTER_REMOVE_OVERLAY_ON_INSERTED_LINK';
|
|
162
162
|
callback: () => void;
|
|
163
163
|
};
|
|
@@ -49,6 +49,18 @@ export declare class Datasource extends ReactNodeView<DatasourceProps> {
|
|
|
49
49
|
validUpdate(currentNode: PMNode, newNode: PMNode): boolean;
|
|
50
50
|
update(node: PMNode, decorations: ReadonlyArray<Decoration>, _innerDecorations?: DecorationSource, validUpdate?: (currentNode: PMNode, newNode: PMNode) => boolean): boolean;
|
|
51
51
|
createDomRef(): HTMLElement;
|
|
52
|
+
/**
|
|
53
|
+
* Node views may render interactive elements that should not have their events reach editor
|
|
54
|
+
*
|
|
55
|
+
* We should the stop editor from handling events from following elements:
|
|
56
|
+
* - typing in input
|
|
57
|
+
* - activating buttons via spacebar
|
|
58
|
+
*
|
|
59
|
+
* Can be used to prevent the editor view from trying to handle some or all DOM events that bubble up from the node view.
|
|
60
|
+
* Events for which this returns true are not handled by the editor.
|
|
61
|
+
* @see {@link https://prosemirror.net/docs/ref/#view.NodeView.stopEvent}
|
|
62
|
+
*/
|
|
63
|
+
stopEvent(event: Event): boolean;
|
|
52
64
|
render(): jsx.JSX.Element;
|
|
53
65
|
}
|
|
54
66
|
export {};
|
|
@@ -154,10 +154,10 @@ export type SetCardLayoutAndDatasourceTableRef = {
|
|
|
154
154
|
layout: DatasourceTableLayout;
|
|
155
155
|
datasourceTableRef?: HTMLElement;
|
|
156
156
|
};
|
|
157
|
-
|
|
157
|
+
type ClearOverlayCandidate = {
|
|
158
158
|
type: 'CLEAR_OVERLAY_CANDIDATE';
|
|
159
159
|
};
|
|
160
|
-
|
|
160
|
+
type RegisterRemoveOverlayOnInsertedLink = {
|
|
161
161
|
type: 'REGISTER_REMOVE_OVERLAY_ON_INSERTED_LINK';
|
|
162
162
|
callback: () => void;
|
|
163
163
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.3",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,30 +35,30 @@
|
|
|
35
35
|
"@atlaskit/adf-schema": "^40.8.1",
|
|
36
36
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
37
37
|
"@atlaskit/custom-steps": "^0.7.0",
|
|
38
|
-
"@atlaskit/editor-common": "^
|
|
39
|
-
"@atlaskit/editor-plugin-analytics": "^1.
|
|
40
|
-
"@atlaskit/editor-plugin-decorations": "^1.
|
|
41
|
-
"@atlaskit/editor-plugin-editor-disabled": "^1.
|
|
38
|
+
"@atlaskit/editor-common": "^88.1.0",
|
|
39
|
+
"@atlaskit/editor-plugin-analytics": "^1.8.0",
|
|
40
|
+
"@atlaskit/editor-plugin-decorations": "^1.3.0",
|
|
41
|
+
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|
|
42
42
|
"@atlaskit/editor-plugin-editor-viewmode": "^2.1.0",
|
|
43
43
|
"@atlaskit/editor-plugin-feature-flags": "^1.2.0",
|
|
44
|
-
"@atlaskit/editor-plugin-floating-toolbar": "^1.
|
|
44
|
+
"@atlaskit/editor-plugin-floating-toolbar": "^1.11.0",
|
|
45
45
|
"@atlaskit/editor-plugin-grid": "^1.2.0",
|
|
46
|
-
"@atlaskit/editor-plugin-width": "^1.
|
|
46
|
+
"@atlaskit/editor-plugin-width": "^1.3.0",
|
|
47
47
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
48
48
|
"@atlaskit/editor-shared-styles": "^2.13.0",
|
|
49
49
|
"@atlaskit/frontend-utilities": "^2.7.0",
|
|
50
|
-
"@atlaskit/icon": "^22.
|
|
50
|
+
"@atlaskit/icon": "^22.14.0",
|
|
51
51
|
"@atlaskit/link-analytics": "^8.5.0",
|
|
52
52
|
"@atlaskit/link-client-extension": "^2.1.0",
|
|
53
|
-
"@atlaskit/link-datasource": "^2.
|
|
53
|
+
"@atlaskit/link-datasource": "^2.11.0",
|
|
54
54
|
"@atlaskit/linking-common": "^5.11.0",
|
|
55
55
|
"@atlaskit/linking-types": "^9.0.0",
|
|
56
56
|
"@atlaskit/menu": "2.12.2",
|
|
57
57
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
58
58
|
"@atlaskit/primitives": "^12.0.0",
|
|
59
|
-
"@atlaskit/smart-card": "^27.
|
|
59
|
+
"@atlaskit/smart-card": "^27.17.0",
|
|
60
60
|
"@atlaskit/theme": "^13.0.0",
|
|
61
|
-
"@atlaskit/tokens": "^1.
|
|
61
|
+
"@atlaskit/tokens": "^1.59.0",
|
|
62
62
|
"@babel/runtime": "^7.0.0",
|
|
63
63
|
"@emotion/react": "^11.7.1",
|
|
64
64
|
"lodash": "^4.17.21",
|
|
@@ -111,6 +111,9 @@
|
|
|
111
111
|
"enable_datasource_nourl_edit_dropdown_datafetch": {
|
|
112
112
|
"type": "boolean"
|
|
113
113
|
},
|
|
114
|
+
"platform-datasources-enable-two-way-sync": {
|
|
115
|
+
"type": "boolean"
|
|
116
|
+
},
|
|
114
117
|
"platform.linking-platform.enable-datasource-edit-dropdown-toolbar": {
|
|
115
118
|
"type": "boolean"
|
|
116
119
|
},
|