@atlaskit/editor-plugin-card 2.3.5 → 2.3.6
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 +8 -0
- package/dist/cjs/nodeviews/datasource.js +3 -3
- package/dist/es2019/nodeviews/datasource.js +4 -4
- package/dist/esm/nodeviews/datasource.js +4 -4
- package/dist/types/nodeviews/datasource.d.ts +1 -1
- package/dist/types/utils.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/datasource.d.ts +1 -1
- package/dist/types-ts4.5/utils.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 2.3.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#117151](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/117151)
|
|
8
|
+
[`94ee9b09a23a0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/94ee9b09a23a0) -
|
|
9
|
+
Fix import statement to @atlaskit/editor-common to use entrypoint
|
|
10
|
+
|
|
3
11
|
## 2.3.5
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -205,7 +205,7 @@ var DatasourceComponent = exports.DatasourceComponent = /*#__PURE__*/function (_
|
|
|
205
205
|
url: attrs === null || attrs === void 0 ? void 0 : attrs.url,
|
|
206
206
|
onColumnResize: this.handleColumnResize,
|
|
207
207
|
columnCustomSizes: columnCustomSizes,
|
|
208
|
-
onWrappedColumnChange: (0, _platformFeatureFlags.
|
|
208
|
+
onWrappedColumnChange: (0, _platformFeatureFlags.fg)('platform.linking-platform.datasource-word_wrap') ? this.handleWrappedColumnChange : undefined,
|
|
209
209
|
wrappedColumnKeys: wrappedColumnKeys
|
|
210
210
|
})));
|
|
211
211
|
}
|
|
@@ -245,7 +245,7 @@ var Datasource = exports.Datasource = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
245
245
|
(0, _createClass2.default)(Datasource, [{
|
|
246
246
|
key: "validUpdate",
|
|
247
247
|
value: function validUpdate(currentNode, newNode) {
|
|
248
|
-
if ((0, _platformFeatureFlags.
|
|
248
|
+
if ((0, _platformFeatureFlags.fg)('platform.linking-platform.enable-datasource-appearance-toolbar')) {
|
|
249
249
|
var _newNode$attrs;
|
|
250
250
|
return !!((_newNode$attrs = newNode.attrs) !== null && _newNode$attrs !== void 0 && _newNode$attrs.datasource);
|
|
251
251
|
}
|
|
@@ -257,7 +257,7 @@ var Datasource = exports.Datasource = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
257
257
|
var validUpdate = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : function () {
|
|
258
258
|
return true;
|
|
259
259
|
};
|
|
260
|
-
if ((0, _platformFeatureFlags.
|
|
260
|
+
if ((0, _platformFeatureFlags.fg)('platform.linking-platform.enable-datasource-appearance-toolbar')) {
|
|
261
261
|
return (0, _get2.default)((0, _getPrototypeOf2.default)(Datasource.prototype), "update", this).call(this, node, decorations, _innerDecorations, this.validUpdate);
|
|
262
262
|
}
|
|
263
263
|
return (0, _get2.default)((0, _getPrototypeOf2.default)(Datasource.prototype), "update", this).call(this, node, decorations, _innerDecorations, validUpdate);
|
|
@@ -11,7 +11,7 @@ import { UnsupportedInline } from '@atlaskit/editor-common/ui';
|
|
|
11
11
|
import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
12
12
|
import { DatasourceTableView } from '@atlaskit/link-datasource';
|
|
13
13
|
import { DATASOURCE_DEFAULT_LAYOUT } from '@atlaskit/linking-common';
|
|
14
|
-
import {
|
|
14
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import { DatasourceErrorBoundary } from '../datasourceErrorBoundary';
|
|
16
16
|
import { EditorAnalyticsContext } from '../ui/EditorAnalyticsContext';
|
|
17
17
|
const getPosSafely = pos => {
|
|
@@ -170,7 +170,7 @@ export class DatasourceComponent extends React.PureComponent {
|
|
|
170
170
|
url: attrs === null || attrs === void 0 ? void 0 : attrs.url,
|
|
171
171
|
onColumnResize: this.handleColumnResize,
|
|
172
172
|
columnCustomSizes: columnCustomSizes,
|
|
173
|
-
onWrappedColumnChange:
|
|
173
|
+
onWrappedColumnChange: fg('platform.linking-platform.datasource-word_wrap') ? this.handleWrappedColumnChange : undefined,
|
|
174
174
|
wrappedColumnKeys: wrappedColumnKeys
|
|
175
175
|
})));
|
|
176
176
|
}
|
|
@@ -202,14 +202,14 @@ export class Datasource extends ReactNodeView {
|
|
|
202
202
|
// If not, we return false so we can get the node to re-render properly as a block node instead.
|
|
203
203
|
// Otherwise, the node view will still consider the node as a Datasource and render a such.
|
|
204
204
|
validUpdate(currentNode, newNode) {
|
|
205
|
-
if (
|
|
205
|
+
if (fg('platform.linking-platform.enable-datasource-appearance-toolbar')) {
|
|
206
206
|
var _newNode$attrs;
|
|
207
207
|
return !!((_newNode$attrs = newNode.attrs) !== null && _newNode$attrs !== void 0 && _newNode$attrs.datasource);
|
|
208
208
|
}
|
|
209
209
|
return true;
|
|
210
210
|
}
|
|
211
211
|
update(node, decorations, _innerDecorations, validUpdate = () => true) {
|
|
212
|
-
if (
|
|
212
|
+
if (fg('platform.linking-platform.enable-datasource-appearance-toolbar')) {
|
|
213
213
|
return super.update(node, decorations, _innerDecorations, this.validUpdate);
|
|
214
214
|
}
|
|
215
215
|
return super.update(node, decorations, _innerDecorations, validUpdate);
|
|
@@ -23,7 +23,7 @@ import { UnsupportedInline } from '@atlaskit/editor-common/ui';
|
|
|
23
23
|
import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
24
24
|
import { DatasourceTableView } from '@atlaskit/link-datasource';
|
|
25
25
|
import { DATASOURCE_DEFAULT_LAYOUT } from '@atlaskit/linking-common';
|
|
26
|
-
import {
|
|
26
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
27
27
|
import { DatasourceErrorBoundary } from '../datasourceErrorBoundary';
|
|
28
28
|
import { EditorAnalyticsContext } from '../ui/EditorAnalyticsContext';
|
|
29
29
|
var getPosSafely = function getPosSafely(pos) {
|
|
@@ -201,7 +201,7 @@ export var DatasourceComponent = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
201
201
|
url: attrs === null || attrs === void 0 ? void 0 : attrs.url,
|
|
202
202
|
onColumnResize: this.handleColumnResize,
|
|
203
203
|
columnCustomSizes: columnCustomSizes,
|
|
204
|
-
onWrappedColumnChange:
|
|
204
|
+
onWrappedColumnChange: fg('platform.linking-platform.datasource-word_wrap') ? this.handleWrappedColumnChange : undefined,
|
|
205
205
|
wrappedColumnKeys: wrappedColumnKeys
|
|
206
206
|
})));
|
|
207
207
|
}
|
|
@@ -241,7 +241,7 @@ export var Datasource = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
241
241
|
_createClass(Datasource, [{
|
|
242
242
|
key: "validUpdate",
|
|
243
243
|
value: function validUpdate(currentNode, newNode) {
|
|
244
|
-
if (
|
|
244
|
+
if (fg('platform.linking-platform.enable-datasource-appearance-toolbar')) {
|
|
245
245
|
var _newNode$attrs;
|
|
246
246
|
return !!((_newNode$attrs = newNode.attrs) !== null && _newNode$attrs !== void 0 && _newNode$attrs.datasource);
|
|
247
247
|
}
|
|
@@ -253,7 +253,7 @@ export var Datasource = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
253
253
|
var validUpdate = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : function () {
|
|
254
254
|
return true;
|
|
255
255
|
};
|
|
256
|
-
if (
|
|
256
|
+
if (fg('platform.linking-platform.enable-datasource-appearance-toolbar')) {
|
|
257
257
|
return _get(_getPrototypeOf(Datasource.prototype), "update", this).call(this, node, decorations, _innerDecorations, this.validUpdate);
|
|
258
258
|
}
|
|
259
259
|
return _get(_getPrototypeOf(Datasource.prototype), "update", this).call(this, node, decorations, _innerDecorations, validUpdate);
|
|
@@ -3,10 +3,10 @@ import React from 'react';
|
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
6
|
+
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
6
7
|
import type { LegacyPortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
7
8
|
import type { getPosHandler, ReactComponentProps } from '@atlaskit/editor-common/react-node-view';
|
|
8
9
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
9
|
-
import { type PortalProviderAPI } from '@atlaskit/editor-common/src/portal';
|
|
10
10
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
11
11
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
12
12
|
import type { Decoration, DecorationSource, EditorView } from '@atlaskit/editor-prosemirror/view';
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
2
|
-
import { type getPosHandler } from '@atlaskit/editor-common/
|
|
2
|
+
import { type getPosHandler } from '@atlaskit/editor-common/react-node-view';
|
|
3
3
|
import type { Node, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -3,10 +3,10 @@ import React from 'react';
|
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
6
|
+
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
6
7
|
import type { LegacyPortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
7
8
|
import type { getPosHandler, ReactComponentProps } from '@atlaskit/editor-common/react-node-view';
|
|
8
9
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
9
|
-
import { type PortalProviderAPI } from '@atlaskit/editor-common/src/portal';
|
|
10
10
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
11
11
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
12
12
|
import type { Decoration, DecorationSource, EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
2
|
-
import { type getPosHandler } from '@atlaskit/editor-common/
|
|
2
|
+
import { type getPosHandler } from '@atlaskit/editor-common/react-node-view';
|
|
3
3
|
import type { Node, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|