@atlaskit/editor-plugin-card 4.5.6 → 4.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 +15 -0
- package/dist/cjs/nodeviews/embedCard.js +4 -1
- package/dist/cjs/pm-plugins/main.js +1 -8
- package/dist/cjs/ui/ResizableEmbedCard.js +6 -0
- package/dist/cjs/ui/toolbar.js +3 -3
- package/dist/es2019/nodeviews/embedCard.js +4 -1
- package/dist/es2019/pm-plugins/main.js +0 -1
- package/dist/es2019/ui/ResizableEmbedCard.js +6 -0
- package/dist/es2019/ui/toolbar.js +1 -1
- package/dist/esm/nodeviews/embedCard.js +4 -1
- package/dist/esm/pm-plugins/main.js +0 -1
- package/dist/esm/ui/ResizableEmbedCard.js +6 -0
- package/dist/esm/ui/toolbar.js +1 -1
- package/dist/types/pm-plugins/main.d.ts +0 -1
- package/dist/types/ui/ResizableEmbedCard.d.ts +1 -0
- package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -1
- package/dist/types-ts4.5/ui/ResizableEmbedCard.d.ts +1 -0
- package/package.json +8 -5
- package/dist/cjs/ui/analytics/index.js +0 -19
- package/dist/es2019/ui/analytics/index.js +0 -2
- package/dist/esm/ui/analytics/index.js +0 -2
- package/dist/types/ui/analytics/index.d.ts +0 -2
- package/dist/types-ts4.5/ui/analytics/index.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 4.5.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 4.5.7
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#179137](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/179137)
|
|
14
|
+
[`163478624d145`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/163478624d145) -
|
|
15
|
+
Update embedCard component to avoid rerenderings when editor gets disabled
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 4.5.6
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -57,7 +57,8 @@ var CardInner = function CardInner(_ref) {
|
|
|
57
57
|
}
|
|
58
58
|
var lineLength = getLineLength(view, pos, widthStateLineLength);
|
|
59
59
|
var containerWidth = (0, _utils.isRichMediaInsideOfBlockNode)(view, pos) ? lineLength : widthStateWidth;
|
|
60
|
-
|
|
60
|
+
var editorDisabledWhenGateDisabled = (editorDisabledState === null || editorDisabledState === void 0 ? void 0 : editorDisabledState.editorDisabled) && !(0, _platformFeatureFlags.fg)('platform_fix_embedded_card_re-rendering');
|
|
61
|
+
if (!allowResizing || !hasPreview || editorDisabledWhenGateDisabled) {
|
|
61
62
|
// There are two ways `width` and `height` can be defined here:
|
|
62
63
|
// 1) Either as `heightAlone` as height value and no width
|
|
63
64
|
// 2) or as `1` for height and aspectRation (defined or a default one) as a width
|
|
@@ -97,6 +98,8 @@ var CardInner = function CardInner(_ref) {
|
|
|
97
98
|
displayGrid: displayGrid,
|
|
98
99
|
updateSize: updateSize,
|
|
99
100
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent
|
|
101
|
+
}, (0, _platformFeatureFlags.fg)('platform_fix_embedded_card_re-rendering') && {
|
|
102
|
+
isResizeDisabled: editorDisabledState === null || editorDisabledState === void 0 ? void 0 : editorDisabledState.editorDisabled
|
|
100
103
|
}), smartCard);
|
|
101
104
|
};
|
|
102
105
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
@@ -4,14 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.createPlugin = exports.ALLOW_EVENTS_CLASSNAME = void 0;
|
|
8
|
-
Object.defineProperty(exports, "pluginKey", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function get() {
|
|
11
|
-
return _pluginKey.pluginKey;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
exports.stopEvent = void 0;
|
|
7
|
+
exports.stopEvent = exports.createPlugin = exports.ALLOW_EVENTS_CLASSNAME = void 0;
|
|
15
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
16
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
10
|
var _rafSchd = _interopRequireDefault(require("raf-schd"));
|
|
@@ -17,6 +17,7 @@ var _react2 = require("@emotion/react");
|
|
|
17
17
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
18
18
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
19
19
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
20
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
21
|
var _smartCard = require("@atlaskit/smart-card");
|
|
21
22
|
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; }
|
|
22
23
|
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; }
|
|
@@ -330,6 +331,7 @@ var ResizableEmbedCard = exports.default = /*#__PURE__*/function (_React$Compone
|
|
|
330
331
|
pctWidth = _this$props6.pctWidth,
|
|
331
332
|
containerWidth = _this$props6.containerWidth,
|
|
332
333
|
fullWidthMode = _this$props6.fullWidthMode,
|
|
334
|
+
isResizeDisabled = _this$props6.isResizeDisabled,
|
|
333
335
|
children = _this$props6.children;
|
|
334
336
|
var resizerProps = {
|
|
335
337
|
width: this.calcPxWidth(),
|
|
@@ -337,6 +339,10 @@ var ResizableEmbedCard = exports.default = /*#__PURE__*/function (_React$Compone
|
|
|
337
339
|
};
|
|
338
340
|
var enable = {};
|
|
339
341
|
_ui.handleSides.forEach(function (side) {
|
|
342
|
+
if (isResizeDisabled && (0, _platformFeatureFlags.fg)('platform_fix_embedded_card_re-rendering')) {
|
|
343
|
+
enable[side] = false;
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
340
346
|
var oppositeSide = side === 'left' ? 'right' : 'left';
|
|
341
347
|
enable[side] = ['full-width', 'wide', 'center'].concat("wrap-".concat(oppositeSide)).concat("align-".concat(_ui.imageAlignmentMap[oppositeSide])).indexOf(layout) > -1;
|
|
342
348
|
if (side === 'left' && _this2.insideInlineLike) {
|
package/dist/cjs/ui/toolbar.js
CHANGED
|
@@ -30,7 +30,7 @@ var _unlink = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/unlink
|
|
|
30
30
|
var _shortcut = _interopRequireDefault(require("@atlaskit/icon/glyph/shortcut"));
|
|
31
31
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
32
32
|
var _doc = require("../pm-plugins/doc");
|
|
33
|
-
var
|
|
33
|
+
var _pluginKey = require("../pm-plugins/plugin-key");
|
|
34
34
|
var _utils3 = require("../pm-plugins/utils");
|
|
35
35
|
var _DatasourceAppearanceButton = require("./DatasourceAppearanceButton");
|
|
36
36
|
var _EditLinkToolbar = require("./EditLinkToolbar");
|
|
@@ -113,7 +113,7 @@ var floatingToolbar = exports.floatingToolbar = function floatingToolbar(cardOpt
|
|
|
113
113
|
blockCard = _state$schema$nodes.blockCard,
|
|
114
114
|
embedCard = _state$schema$nodes.embedCard;
|
|
115
115
|
var nodeType = [inlineCard, blockCard, embedCard];
|
|
116
|
-
var pluginState =
|
|
116
|
+
var pluginState = _pluginKey.pluginKey.getState(state);
|
|
117
117
|
if (!(state.selection instanceof _state.NodeSelection)) {
|
|
118
118
|
return;
|
|
119
119
|
}
|
|
@@ -211,7 +211,7 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
|
|
|
211
211
|
var _ref2 = (_pluginInjectionApi$d = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$d2 = pluginInjectionApi.decorations) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.actions) !== null && _pluginInjectionApi$d !== void 0 ? _pluginInjectionApi$d : {},
|
|
212
212
|
hoverDecoration = _ref2.hoverDecoration;
|
|
213
213
|
var isDatasource = (0, _utils3.isDatasourceNode)(node);
|
|
214
|
-
var pluginState =
|
|
214
|
+
var pluginState = _pluginKey.pluginKey.getState(state);
|
|
215
215
|
var annotationApiState = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a2 = pluginInjectionApi.annotation) === null || _pluginInjectionApi$a2 === void 0 ? void 0 : _pluginInjectionApi$a2.sharedState.currentState();
|
|
216
216
|
var activeCommentMark = node.marks.find(function (mark) {
|
|
217
217
|
return mark.type.name === 'annotation' && (annotationApiState === null || annotationApiState === void 0 ? void 0 : annotationApiState.annotations[mark.attrs.id]) === false;
|
|
@@ -41,7 +41,8 @@ const CardInner = ({
|
|
|
41
41
|
}
|
|
42
42
|
const lineLength = getLineLength(view, pos, widthStateLineLength);
|
|
43
43
|
const containerWidth = isRichMediaInsideOfBlockNode(view, pos) ? lineLength : widthStateWidth;
|
|
44
|
-
|
|
44
|
+
const editorDisabledWhenGateDisabled = (editorDisabledState === null || editorDisabledState === void 0 ? void 0 : editorDisabledState.editorDisabled) && !fg('platform_fix_embedded_card_re-rendering');
|
|
45
|
+
if (!allowResizing || !hasPreview || editorDisabledWhenGateDisabled) {
|
|
45
46
|
// There are two ways `width` and `height` can be defined here:
|
|
46
47
|
// 1) Either as `heightAlone` as height value and no width
|
|
47
48
|
// 2) or as `1` for height and aspectRation (defined or a default one) as a width
|
|
@@ -81,6 +82,8 @@ const CardInner = ({
|
|
|
81
82
|
displayGrid: displayGrid,
|
|
82
83
|
updateSize: updateSize,
|
|
83
84
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent
|
|
85
|
+
}, fg('platform_fix_embedded_card_re-rendering') && {
|
|
86
|
+
isResizeDisabled: editorDisabledState === null || editorDisabledState === void 0 ? void 0 : editorDisabledState.editorDisabled
|
|
84
87
|
}), smartCard);
|
|
85
88
|
};
|
|
86
89
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
@@ -19,7 +19,6 @@ import reducer from './reducers';
|
|
|
19
19
|
import { handleProvider, resolveWithProvider } from './util/resolve';
|
|
20
20
|
import { getNewRequests, getPluginState, getPluginStateWithUpdatedPos } from './util/state';
|
|
21
21
|
import { isBlockSupportedAtPosition, isEmbedSupportedAtPosition } from './utils';
|
|
22
|
-
export { pluginKey } from './plugin-key';
|
|
23
22
|
const LOCAL_STORAGE_DISCOVERY_KEY_SMART_LINK = 'smart-link-upgrade-pulse';
|
|
24
23
|
export const ALLOW_EVENTS_CLASSNAME = 'card-plugin-element-allow-events';
|
|
25
24
|
export const stopEvent = event => {
|
|
@@ -11,6 +11,7 @@ import { jsx } from '@emotion/react';
|
|
|
11
11
|
import { calcColumnsFromPx, calcMediaPxWidth, calcPctFromPx, calcPxFromColumns, handleSides, imageAlignmentMap, Resizer, snapTo, wrappedLayouts, wrapperStyle } from '@atlaskit/editor-common/ui';
|
|
12
12
|
import { findParentNodeOfTypeClosestToPos, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
13
13
|
import { akEditorBreakoutPadding, akEditorMediaResizeHandlerPadding, akEditorWideLayoutWidth, breakoutWideScaleRatio, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
|
|
14
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
15
|
import { embedHeaderHeight } from '@atlaskit/smart-card';
|
|
15
16
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
16
17
|
export default class ResizableEmbedCard extends React.Component {
|
|
@@ -310,6 +311,7 @@ export default class ResizableEmbedCard extends React.Component {
|
|
|
310
311
|
pctWidth,
|
|
311
312
|
containerWidth,
|
|
312
313
|
fullWidthMode,
|
|
314
|
+
isResizeDisabled,
|
|
313
315
|
children
|
|
314
316
|
} = this.props;
|
|
315
317
|
const resizerProps = {
|
|
@@ -318,6 +320,10 @@ export default class ResizableEmbedCard extends React.Component {
|
|
|
318
320
|
};
|
|
319
321
|
const enable = {};
|
|
320
322
|
handleSides.forEach(side => {
|
|
323
|
+
if (isResizeDisabled && fg('platform_fix_embedded_card_re-rendering')) {
|
|
324
|
+
enable[side] = false;
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
321
327
|
const oppositeSide = side === 'left' ? 'right' : 'left';
|
|
322
328
|
enable[side] = ['full-width', 'wide', 'center'].concat(`wrap-${oppositeSide}`).concat(`align-${imageAlignmentMap[oppositeSide]}`).indexOf(layout) > -1;
|
|
323
329
|
if (side === 'left' && this.insideInlineLike) {
|
|
@@ -20,7 +20,7 @@ import UnlinkIcon from '@atlaskit/icon/glyph/editor/unlink';
|
|
|
20
20
|
import OpenIcon from '@atlaskit/icon/glyph/shortcut';
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import { changeSelectedCardToText } from '../pm-plugins/doc';
|
|
23
|
-
import { pluginKey } from '../pm-plugins/
|
|
23
|
+
import { pluginKey } from '../pm-plugins/plugin-key';
|
|
24
24
|
import { appearanceForNodeType, displayInfoForCard, findCardInfo, isDatasourceNode, titleUrlPairFromNode } from '../pm-plugins/utils';
|
|
25
25
|
import { DatasourceAppearanceButton } from './DatasourceAppearanceButton';
|
|
26
26
|
import { buildEditLinkToolbar, editLinkToolbarConfig, getEditLinkCallback } from './EditLinkToolbar';
|
|
@@ -50,7 +50,8 @@ var CardInner = function CardInner(_ref) {
|
|
|
50
50
|
}
|
|
51
51
|
var lineLength = getLineLength(view, pos, widthStateLineLength);
|
|
52
52
|
var containerWidth = isRichMediaInsideOfBlockNode(view, pos) ? lineLength : widthStateWidth;
|
|
53
|
-
|
|
53
|
+
var editorDisabledWhenGateDisabled = (editorDisabledState === null || editorDisabledState === void 0 ? void 0 : editorDisabledState.editorDisabled) && !fg('platform_fix_embedded_card_re-rendering');
|
|
54
|
+
if (!allowResizing || !hasPreview || editorDisabledWhenGateDisabled) {
|
|
54
55
|
// There are two ways `width` and `height` can be defined here:
|
|
55
56
|
// 1) Either as `heightAlone` as height value and no width
|
|
56
57
|
// 2) or as `1` for height and aspectRation (defined or a default one) as a width
|
|
@@ -90,6 +91,8 @@ var CardInner = function CardInner(_ref) {
|
|
|
90
91
|
displayGrid: displayGrid,
|
|
91
92
|
updateSize: updateSize,
|
|
92
93
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent
|
|
94
|
+
}, fg('platform_fix_embedded_card_re-rendering') && {
|
|
95
|
+
isResizeDisabled: editorDisabledState === null || editorDisabledState === void 0 ? void 0 : editorDisabledState.editorDisabled
|
|
93
96
|
}), smartCard);
|
|
94
97
|
};
|
|
95
98
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
@@ -23,7 +23,6 @@ import reducer from './reducers';
|
|
|
23
23
|
import { handleProvider, resolveWithProvider } from './util/resolve';
|
|
24
24
|
import { getNewRequests, getPluginState, getPluginStateWithUpdatedPos } from './util/state';
|
|
25
25
|
import { isBlockSupportedAtPosition, isEmbedSupportedAtPosition } from './utils';
|
|
26
|
-
export { pluginKey } from './plugin-key';
|
|
27
26
|
var LOCAL_STORAGE_DISCOVERY_KEY_SMART_LINK = 'smart-link-upgrade-pulse';
|
|
28
27
|
export var ALLOW_EVENTS_CLASSNAME = 'card-plugin-element-allow-events';
|
|
29
28
|
export var stopEvent = function stopEvent(event) {
|
|
@@ -20,6 +20,7 @@ import { jsx } from '@emotion/react';
|
|
|
20
20
|
import { calcColumnsFromPx, calcMediaPxWidth, calcPctFromPx, calcPxFromColumns, handleSides, imageAlignmentMap, Resizer, snapTo, wrappedLayouts, wrapperStyle } from '@atlaskit/editor-common/ui';
|
|
21
21
|
import { findParentNodeOfTypeClosestToPos, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
22
22
|
import { akEditorBreakoutPadding, akEditorMediaResizeHandlerPadding, akEditorWideLayoutWidth, breakoutWideScaleRatio, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
|
|
23
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
23
24
|
import { embedHeaderHeight } from '@atlaskit/smart-card';
|
|
24
25
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
25
26
|
var ResizableEmbedCard = /*#__PURE__*/function (_React$Component) {
|
|
@@ -326,6 +327,7 @@ var ResizableEmbedCard = /*#__PURE__*/function (_React$Component) {
|
|
|
326
327
|
pctWidth = _this$props6.pctWidth,
|
|
327
328
|
containerWidth = _this$props6.containerWidth,
|
|
328
329
|
fullWidthMode = _this$props6.fullWidthMode,
|
|
330
|
+
isResizeDisabled = _this$props6.isResizeDisabled,
|
|
329
331
|
children = _this$props6.children;
|
|
330
332
|
var resizerProps = {
|
|
331
333
|
width: this.calcPxWidth(),
|
|
@@ -333,6 +335,10 @@ var ResizableEmbedCard = /*#__PURE__*/function (_React$Component) {
|
|
|
333
335
|
};
|
|
334
336
|
var enable = {};
|
|
335
337
|
handleSides.forEach(function (side) {
|
|
338
|
+
if (isResizeDisabled && fg('platform_fix_embedded_card_re-rendering')) {
|
|
339
|
+
enable[side] = false;
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
336
342
|
var oppositeSide = side === 'left' ? 'right' : 'left';
|
|
337
343
|
enable[side] = ['full-width', 'wide', 'center'].concat("wrap-".concat(oppositeSide)).concat("align-".concat(imageAlignmentMap[oppositeSide])).indexOf(layout) > -1;
|
|
338
344
|
if (side === 'left' && _this2.insideInlineLike) {
|
package/dist/esm/ui/toolbar.js
CHANGED
|
@@ -24,7 +24,7 @@ import UnlinkIcon from '@atlaskit/icon/glyph/editor/unlink';
|
|
|
24
24
|
import OpenIcon from '@atlaskit/icon/glyph/shortcut';
|
|
25
25
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
26
26
|
import { changeSelectedCardToText } from '../pm-plugins/doc';
|
|
27
|
-
import { pluginKey } from '../pm-plugins/
|
|
27
|
+
import { pluginKey } from '../pm-plugins/plugin-key';
|
|
28
28
|
import { appearanceForNodeType, displayInfoForCard, findCardInfo, isDatasourceNode, titleUrlPairFromNode } from '../pm-plugins/utils';
|
|
29
29
|
import { DatasourceAppearanceButton } from './DatasourceAppearanceButton';
|
|
30
30
|
import { buildEditLinkToolbar, editLinkToolbarConfig, getEditLinkCallback } from './EditLinkToolbar';
|
|
@@ -2,7 +2,6 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
2
2
|
import type { ExtractInjectionAPI, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { cardPlugin } from '../index';
|
|
4
4
|
import type { CardPluginOptions, CardPluginState } from '../types';
|
|
5
|
-
export { pluginKey } from './plugin-key';
|
|
6
5
|
export declare const ALLOW_EVENTS_CLASSNAME = "card-plugin-element-allow-events";
|
|
7
6
|
export declare const stopEvent: (event: Event) => boolean;
|
|
8
7
|
export declare const createPlugin: (options: CardPluginOptions, pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined) => (pmPluginFactoryParams: PMPluginFactoryParams) => SafePlugin<CardPluginState>;
|
|
@@ -14,6 +14,7 @@ export type Props = Omit<ResizerProps, 'height' | 'width'> & {
|
|
|
14
14
|
width?: number;
|
|
15
15
|
height?: number;
|
|
16
16
|
aspectRatio: number;
|
|
17
|
+
isResizeDisabled?: boolean;
|
|
17
18
|
};
|
|
18
19
|
export default class ResizableEmbedCard extends React.Component<Props, State> {
|
|
19
20
|
static defaultProps: {
|
|
@@ -2,7 +2,6 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
2
2
|
import type { ExtractInjectionAPI, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { cardPlugin } from '../index';
|
|
4
4
|
import type { CardPluginOptions, CardPluginState } from '../types';
|
|
5
|
-
export { pluginKey } from './plugin-key';
|
|
6
5
|
export declare const ALLOW_EVENTS_CLASSNAME = "card-plugin-element-allow-events";
|
|
7
6
|
export declare const stopEvent: (event: Event) => boolean;
|
|
8
7
|
export declare const createPlugin: (options: CardPluginOptions, pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined) => (pmPluginFactoryParams: PMPluginFactoryParams) => SafePlugin<CardPluginState>;
|
|
@@ -14,6 +14,7 @@ export type Props = Omit<ResizerProps, 'height' | 'width'> & {
|
|
|
14
14
|
width?: number;
|
|
15
15
|
height?: number;
|
|
16
16
|
aspectRatio: number;
|
|
17
|
+
isResizeDisabled?: boolean;
|
|
17
18
|
};
|
|
18
19
|
export default class ResizableEmbedCard extends React.Component<Props, State> {
|
|
19
20
|
static defaultProps: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.8",
|
|
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": "^46.1.0",
|
|
35
35
|
"@atlaskit/analytics-next": "^10.2.0",
|
|
36
36
|
"@atlaskit/custom-steps": "^0.9.0",
|
|
37
|
-
"@atlaskit/editor-common": "^
|
|
37
|
+
"@atlaskit/editor-common": "^97.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
39
39
|
"@atlaskit/editor-plugin-decorations": "^1.3.0",
|
|
40
40
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|
|
@@ -55,10 +55,10 @@
|
|
|
55
55
|
"@atlaskit/menu": "2.13.7",
|
|
56
56
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
57
57
|
"@atlaskit/primitives": "^13.3.0",
|
|
58
|
-
"@atlaskit/smart-card": "^32.
|
|
58
|
+
"@atlaskit/smart-card": "^32.8.0",
|
|
59
59
|
"@atlaskit/theme": "^14.0.0",
|
|
60
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
61
|
-
"@atlaskit/tokens": "^2.
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^2.29.0",
|
|
61
|
+
"@atlaskit/tokens": "^2.5.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
|
"platform_inline_node_as_valid_annotation_selection": {
|
|
139
139
|
"type": "boolean"
|
|
140
|
+
},
|
|
141
|
+
"platform_fix_embedded_card_re-rendering": {
|
|
142
|
+
"type": "boolean"
|
|
140
143
|
}
|
|
141
144
|
},
|
|
142
145
|
"stricter": {
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "createEventsQueue", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _createEventsQueue.createEventsQueue;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "eventsFromTransaction", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _eventsFromTr.eventsFromTransaction;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
var _createEventsQueue = require("./create-events-queue");
|
|
19
|
-
var _eventsFromTr = require("./events-from-tr");
|