@atlaskit/editor-plugin-card 0.5.6 → 0.5.8
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,18 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 0.5.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`94ae084e345`](https://bitbucket.org/atlassian/atlassian-frontend/commits/94ae084e345) - Add `EditorAnalyticsContext` for editor datasource component
|
|
8
|
+
|
|
9
|
+
## 0.5.7
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`43bb8818f18`](https://bitbucket.org/atlassian/atlassian-frontend/commits/43bb8818f18) - Pasting a datasource now only requires a single undo to revert
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 0.5.6
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -22,6 +22,7 @@ var _utils = require("@atlaskit/editor-common/utils");
|
|
|
22
22
|
var _linkDatasource = require("@atlaskit/link-datasource");
|
|
23
23
|
var _datasourceErrorBoundary = require("../datasourceErrorBoundary");
|
|
24
24
|
var _doc = require("../pm-plugins/doc");
|
|
25
|
+
var _EditorAnalyticsContext = require("../ui/EditorAnalyticsContext");
|
|
25
26
|
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; }
|
|
26
27
|
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; }
|
|
27
28
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
@@ -77,6 +78,9 @@ var DatasourceComponent = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
77
78
|
views: views
|
|
78
79
|
})
|
|
79
80
|
}));
|
|
81
|
+
|
|
82
|
+
// Ensures dispatch does not contribute to undo history (otherwise user requires three undo's to revert table)
|
|
83
|
+
tr.setMeta('addToHistory', false);
|
|
80
84
|
tr.setMeta('scrollIntoView', false);
|
|
81
85
|
dispatch(tr);
|
|
82
86
|
});
|
|
@@ -103,14 +107,16 @@ var DatasourceComponent = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
103
107
|
|
|
104
108
|
// [WS-2307]: we only render card wrapped into a Provider when the value is ready
|
|
105
109
|
if (cardContext && cardContext.value) {
|
|
106
|
-
return (0, _react2.jsx)(
|
|
110
|
+
return (0, _react2.jsx)(_EditorAnalyticsContext.EditorAnalyticsContext, {
|
|
111
|
+
editorView: this.props.view
|
|
112
|
+
}, (0, _react2.jsx)(cardContext.Provider, {
|
|
107
113
|
value: cardContext.value
|
|
108
114
|
}, (0, _react2.jsx)(_linkDatasource.DatasourceTableView, {
|
|
109
115
|
datasourceId: datasource.id,
|
|
110
116
|
parameters: datasource.parameters,
|
|
111
117
|
visibleColumnKeys: visibleColumnKeys,
|
|
112
118
|
onVisibleColumnKeysChange: this.handleColumnChange
|
|
113
|
-
}));
|
|
119
|
+
})));
|
|
114
120
|
}
|
|
115
121
|
}
|
|
116
122
|
return null;
|
|
@@ -10,6 +10,7 @@ import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
|
10
10
|
import { DatasourceTableView } from '@atlaskit/link-datasource';
|
|
11
11
|
import { DatasourceErrorBoundary } from '../datasourceErrorBoundary';
|
|
12
12
|
import { getLinkNodeType } from '../pm-plugins/doc';
|
|
13
|
+
import { EditorAnalyticsContext } from '../ui/EditorAnalyticsContext';
|
|
13
14
|
const getPosSafely = pos => {
|
|
14
15
|
if (!pos || typeof pos === 'boolean') {
|
|
15
16
|
return;
|
|
@@ -54,6 +55,9 @@ export class DatasourceComponent extends React.PureComponent {
|
|
|
54
55
|
views
|
|
55
56
|
}
|
|
56
57
|
});
|
|
58
|
+
|
|
59
|
+
// Ensures dispatch does not contribute to undo history (otherwise user requires three undo's to revert table)
|
|
60
|
+
tr.setMeta('addToHistory', false);
|
|
57
61
|
tr.setMeta('scrollIntoView', false);
|
|
58
62
|
dispatch(tr);
|
|
59
63
|
});
|
|
@@ -77,14 +81,16 @@ export class DatasourceComponent extends React.PureComponent {
|
|
|
77
81
|
|
|
78
82
|
// [WS-2307]: we only render card wrapped into a Provider when the value is ready
|
|
79
83
|
if (cardContext && cardContext.value) {
|
|
80
|
-
return jsx(
|
|
84
|
+
return jsx(EditorAnalyticsContext, {
|
|
85
|
+
editorView: this.props.view
|
|
86
|
+
}, jsx(cardContext.Provider, {
|
|
81
87
|
value: cardContext.value
|
|
82
88
|
}, jsx(DatasourceTableView, {
|
|
83
89
|
datasourceId: datasource.id,
|
|
84
90
|
parameters: datasource.parameters,
|
|
85
91
|
visibleColumnKeys: visibleColumnKeys,
|
|
86
92
|
onVisibleColumnKeysChange: this.handleColumnChange
|
|
87
|
-
}));
|
|
93
|
+
})));
|
|
88
94
|
}
|
|
89
95
|
}
|
|
90
96
|
return null;
|
|
@@ -20,6 +20,7 @@ import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
|
20
20
|
import { DatasourceTableView } from '@atlaskit/link-datasource';
|
|
21
21
|
import { DatasourceErrorBoundary } from '../datasourceErrorBoundary';
|
|
22
22
|
import { getLinkNodeType } from '../pm-plugins/doc';
|
|
23
|
+
import { EditorAnalyticsContext } from '../ui/EditorAnalyticsContext';
|
|
23
24
|
var getPosSafely = function getPosSafely(pos) {
|
|
24
25
|
if (!pos || typeof pos === 'boolean') {
|
|
25
26
|
return;
|
|
@@ -71,6 +72,9 @@ export var DatasourceComponent = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
71
72
|
views: views
|
|
72
73
|
})
|
|
73
74
|
}));
|
|
75
|
+
|
|
76
|
+
// Ensures dispatch does not contribute to undo history (otherwise user requires three undo's to revert table)
|
|
77
|
+
tr.setMeta('addToHistory', false);
|
|
74
78
|
tr.setMeta('scrollIntoView', false);
|
|
75
79
|
dispatch(tr);
|
|
76
80
|
});
|
|
@@ -97,14 +101,16 @@ export var DatasourceComponent = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
97
101
|
|
|
98
102
|
// [WS-2307]: we only render card wrapped into a Provider when the value is ready
|
|
99
103
|
if (cardContext && cardContext.value) {
|
|
100
|
-
return jsx(
|
|
104
|
+
return jsx(EditorAnalyticsContext, {
|
|
105
|
+
editorView: this.props.view
|
|
106
|
+
}, jsx(cardContext.Provider, {
|
|
101
107
|
value: cardContext.value
|
|
102
108
|
}, jsx(DatasourceTableView, {
|
|
103
109
|
datasourceId: datasource.id,
|
|
104
110
|
parameters: datasource.parameters,
|
|
105
111
|
visibleColumnKeys: visibleColumnKeys,
|
|
106
112
|
onVisibleColumnKeysChange: this.handleColumnChange
|
|
107
|
-
}));
|
|
113
|
+
})));
|
|
108
114
|
}
|
|
109
115
|
}
|
|
110
116
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "28.1.2",
|
|
35
35
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
36
|
-
"@atlaskit/editor-common": "^74.
|
|
36
|
+
"@atlaskit/editor-common": "^74.58.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^0.2.0",
|
|
38
38
|
"@atlaskit/editor-plugin-decorations": "^0.2.0",
|
|
39
39
|
"@atlaskit/editor-plugin-feature-flags": "^1.0.0",
|