@atlaskit/editor-plugin-card 5.3.2 → 5.3.4
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 +2 -6
- package/dist/cjs/ui/ResizableEmbedCard.js +1 -2
- package/dist/es2019/nodeviews/embedCard.js +2 -6
- package/dist/es2019/ui/ResizableEmbedCard.js +1 -2
- package/dist/esm/nodeviews/embedCard.js +2 -6
- package/dist/esm/ui/ResizableEmbedCard.js +1 -2
- package/package.json +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 5.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 5.3.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#127355](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/127355)
|
|
14
|
+
[`f4e608fc7d405`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f4e608fc7d405) -
|
|
15
|
+
Clean up feature gate platform_fix_embedded_card_re-rendering
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 5.3.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -58,8 +58,7 @@ var CardInner = function CardInner(_ref) {
|
|
|
58
58
|
}
|
|
59
59
|
var lineLength = getLineLength(view, pos, widthStateLineLength);
|
|
60
60
|
var containerWidth = (0, _utils.isRichMediaInsideOfBlockNode)(view, pos) ? lineLength : widthStateWidth;
|
|
61
|
-
|
|
62
|
-
if (!allowResizing || !hasPreview || editorDisabledWhenGateDisabled) {
|
|
61
|
+
if (!allowResizing || !hasPreview) {
|
|
63
62
|
// There are two ways `width` and `height` can be defined here:
|
|
64
63
|
// 1) Either as `heightAlone` as height value and no width
|
|
65
64
|
// 2) or as `1` for height and aspectRation (defined or a default one) as a width
|
|
@@ -104,10 +103,7 @@ var CardInner = function CardInner(_ref) {
|
|
|
104
103
|
containerWidth: containerWidth,
|
|
105
104
|
displayGrid: displayGrid,
|
|
106
105
|
updateSize: updateSize,
|
|
107
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent
|
|
108
|
-
// Ignored via go/ees005
|
|
109
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
110
|
-
}, (0, _platformFeatureFlags.fg)('platform_fix_embedded_card_re-rendering') && {
|
|
106
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
111
107
|
isResizeDisabled: editorDisabledState === null || editorDisabledState === void 0 ? void 0 : editorDisabledState.editorDisabled
|
|
112
108
|
}), smartCard);
|
|
113
109
|
};
|
|
@@ -17,7 +17,6 @@ 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");
|
|
21
20
|
var _smartCard = require("@atlaskit/smart-card");
|
|
22
21
|
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; }
|
|
23
22
|
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; }
|
|
@@ -339,7 +338,7 @@ var ResizableEmbedCard = exports.default = /*#__PURE__*/function (_React$Compone
|
|
|
339
338
|
};
|
|
340
339
|
var enable = {};
|
|
341
340
|
_ui.handleSides.forEach(function (side) {
|
|
342
|
-
if (isResizeDisabled
|
|
341
|
+
if (isResizeDisabled) {
|
|
343
342
|
enable[side] = false;
|
|
344
343
|
return;
|
|
345
344
|
}
|
|
@@ -42,8 +42,7 @@ const CardInner = ({
|
|
|
42
42
|
}
|
|
43
43
|
const lineLength = getLineLength(view, pos, widthStateLineLength);
|
|
44
44
|
const containerWidth = isRichMediaInsideOfBlockNode(view, pos) ? lineLength : widthStateWidth;
|
|
45
|
-
|
|
46
|
-
if (!allowResizing || !hasPreview || editorDisabledWhenGateDisabled) {
|
|
45
|
+
if (!allowResizing || !hasPreview) {
|
|
47
46
|
// There are two ways `width` and `height` can be defined here:
|
|
48
47
|
// 1) Either as `heightAlone` as height value and no width
|
|
49
48
|
// 2) or as `1` for height and aspectRation (defined or a default one) as a width
|
|
@@ -88,10 +87,7 @@ const CardInner = ({
|
|
|
88
87
|
containerWidth: containerWidth,
|
|
89
88
|
displayGrid: displayGrid,
|
|
90
89
|
updateSize: updateSize,
|
|
91
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent
|
|
92
|
-
// Ignored via go/ees005
|
|
93
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
94
|
-
}, fg('platform_fix_embedded_card_re-rendering') && {
|
|
90
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
95
91
|
isResizeDisabled: editorDisabledState === null || editorDisabledState === void 0 ? void 0 : editorDisabledState.editorDisabled
|
|
96
92
|
}), smartCard);
|
|
97
93
|
};
|
|
@@ -11,7 +11,6 @@ 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';
|
|
15
14
|
import { embedHeaderHeight } from '@atlaskit/smart-card';
|
|
16
15
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
17
16
|
export default class ResizableEmbedCard extends React.Component {
|
|
@@ -320,7 +319,7 @@ export default class ResizableEmbedCard extends React.Component {
|
|
|
320
319
|
};
|
|
321
320
|
const enable = {};
|
|
322
321
|
handleSides.forEach(side => {
|
|
323
|
-
if (isResizeDisabled
|
|
322
|
+
if (isResizeDisabled) {
|
|
324
323
|
enable[side] = false;
|
|
325
324
|
return;
|
|
326
325
|
}
|
|
@@ -51,8 +51,7 @@ var CardInner = function CardInner(_ref) {
|
|
|
51
51
|
}
|
|
52
52
|
var lineLength = getLineLength(view, pos, widthStateLineLength);
|
|
53
53
|
var containerWidth = isRichMediaInsideOfBlockNode(view, pos) ? lineLength : widthStateWidth;
|
|
54
|
-
|
|
55
|
-
if (!allowResizing || !hasPreview || editorDisabledWhenGateDisabled) {
|
|
54
|
+
if (!allowResizing || !hasPreview) {
|
|
56
55
|
// There are two ways `width` and `height` can be defined here:
|
|
57
56
|
// 1) Either as `heightAlone` as height value and no width
|
|
58
57
|
// 2) or as `1` for height and aspectRation (defined or a default one) as a width
|
|
@@ -97,10 +96,7 @@ var CardInner = function CardInner(_ref) {
|
|
|
97
96
|
containerWidth: containerWidth,
|
|
98
97
|
displayGrid: displayGrid,
|
|
99
98
|
updateSize: updateSize,
|
|
100
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent
|
|
101
|
-
// Ignored via go/ees005
|
|
102
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
103
|
-
}, fg('platform_fix_embedded_card_re-rendering') && {
|
|
99
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
104
100
|
isResizeDisabled: editorDisabledState === null || editorDisabledState === void 0 ? void 0 : editorDisabledState.editorDisabled
|
|
105
101
|
}), smartCard);
|
|
106
102
|
};
|
|
@@ -20,7 +20,6 @@ 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';
|
|
24
23
|
import { embedHeaderHeight } from '@atlaskit/smart-card';
|
|
25
24
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
26
25
|
var ResizableEmbedCard = /*#__PURE__*/function (_React$Component) {
|
|
@@ -335,7 +334,7 @@ var ResizableEmbedCard = /*#__PURE__*/function (_React$Component) {
|
|
|
335
334
|
};
|
|
336
335
|
var enable = {};
|
|
337
336
|
handleSides.forEach(function (side) {
|
|
338
|
-
if (isResizeDisabled
|
|
337
|
+
if (isResizeDisabled) {
|
|
339
338
|
enable[side] = false;
|
|
340
339
|
return;
|
|
341
340
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.4",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
38
38
|
"@atlaskit/button": "^21.1.0",
|
|
39
39
|
"@atlaskit/custom-steps": "^0.11.0",
|
|
40
|
-
"@atlaskit/editor-common": "^102.
|
|
40
|
+
"@atlaskit/editor-common": "^102.10.0",
|
|
41
41
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
42
42
|
"@atlaskit/editor-plugin-base": "^2.3.0",
|
|
43
43
|
"@atlaskit/editor-plugin-connectivity": "^2.0.0",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"@atlaskit/menu": "^3.1.0",
|
|
61
61
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
62
62
|
"@atlaskit/primitives": "^14.1.0",
|
|
63
|
-
"@atlaskit/smart-card": "^
|
|
63
|
+
"@atlaskit/smart-card": "^36.0.0",
|
|
64
64
|
"@atlaskit/theme": "^18.0.0",
|
|
65
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
65
|
+
"@atlaskit/tmp-editor-statsig": "^4.1.0",
|
|
66
66
|
"@atlaskit/tokens": "^4.5.0",
|
|
67
67
|
"@babel/runtime": "^7.0.0",
|
|
68
68
|
"@emotion/react": "^11.7.1",
|
|
@@ -137,9 +137,6 @@
|
|
|
137
137
|
"platform_editor_fix_card_plugin_state": {
|
|
138
138
|
"type": "boolean"
|
|
139
139
|
},
|
|
140
|
-
"platform_fix_embedded_card_re-rendering": {
|
|
141
|
-
"type": "boolean"
|
|
142
|
-
},
|
|
143
140
|
"platform-editor-plugin-card-icon-migration": {
|
|
144
141
|
"type": "boolean"
|
|
145
142
|
},
|