@atlaskit/editor-plugin-card 0.5.7 → 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,11 @@
|
|
|
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
|
+
|
|
3
9
|
## 0.5.7
|
|
4
10
|
|
|
5
11
|
### 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); }; }
|
|
@@ -106,14 +107,16 @@ var DatasourceComponent = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
106
107
|
|
|
107
108
|
// [WS-2307]: we only render card wrapped into a Provider when the value is ready
|
|
108
109
|
if (cardContext && cardContext.value) {
|
|
109
|
-
return (0, _react2.jsx)(
|
|
110
|
+
return (0, _react2.jsx)(_EditorAnalyticsContext.EditorAnalyticsContext, {
|
|
111
|
+
editorView: this.props.view
|
|
112
|
+
}, (0, _react2.jsx)(cardContext.Provider, {
|
|
110
113
|
value: cardContext.value
|
|
111
114
|
}, (0, _react2.jsx)(_linkDatasource.DatasourceTableView, {
|
|
112
115
|
datasourceId: datasource.id,
|
|
113
116
|
parameters: datasource.parameters,
|
|
114
117
|
visibleColumnKeys: visibleColumnKeys,
|
|
115
118
|
onVisibleColumnKeysChange: this.handleColumnChange
|
|
116
|
-
}));
|
|
119
|
+
})));
|
|
117
120
|
}
|
|
118
121
|
}
|
|
119
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;
|
|
@@ -80,14 +81,16 @@ export class DatasourceComponent extends React.PureComponent {
|
|
|
80
81
|
|
|
81
82
|
// [WS-2307]: we only render card wrapped into a Provider when the value is ready
|
|
82
83
|
if (cardContext && cardContext.value) {
|
|
83
|
-
return jsx(
|
|
84
|
+
return jsx(EditorAnalyticsContext, {
|
|
85
|
+
editorView: this.props.view
|
|
86
|
+
}, jsx(cardContext.Provider, {
|
|
84
87
|
value: cardContext.value
|
|
85
88
|
}, jsx(DatasourceTableView, {
|
|
86
89
|
datasourceId: datasource.id,
|
|
87
90
|
parameters: datasource.parameters,
|
|
88
91
|
visibleColumnKeys: visibleColumnKeys,
|
|
89
92
|
onVisibleColumnKeysChange: this.handleColumnChange
|
|
90
|
-
}));
|
|
93
|
+
})));
|
|
91
94
|
}
|
|
92
95
|
}
|
|
93
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;
|
|
@@ -100,14 +101,16 @@ export var DatasourceComponent = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
100
101
|
|
|
101
102
|
// [WS-2307]: we only render card wrapped into a Provider when the value is ready
|
|
102
103
|
if (cardContext && cardContext.value) {
|
|
103
|
-
return jsx(
|
|
104
|
+
return jsx(EditorAnalyticsContext, {
|
|
105
|
+
editorView: this.props.view
|
|
106
|
+
}, jsx(cardContext.Provider, {
|
|
104
107
|
value: cardContext.value
|
|
105
108
|
}, jsx(DatasourceTableView, {
|
|
106
109
|
datasourceId: datasource.id,
|
|
107
110
|
parameters: datasource.parameters,
|
|
108
111
|
visibleColumnKeys: visibleColumnKeys,
|
|
109
112
|
onVisibleColumnKeysChange: this.handleColumnChange
|
|
110
|
-
}));
|
|
113
|
+
})));
|
|
111
114
|
}
|
|
112
115
|
}
|
|
113
116
|
return null;
|