@atlaskit/editor-plugin-card 7.6.0 → 7.7.0
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 +12 -0
- package/dist/cjs/nodeviews/blockCard.js +3 -0
- package/dist/cjs/nodeviews/embedCard.js +4 -4
- package/dist/cjs/nodeviews/inlineCard.js +1 -1
- package/dist/es2019/nodeviews/blockCard.js +3 -0
- package/dist/es2019/nodeviews/embedCard.js +4 -4
- package/dist/es2019/nodeviews/inlineCard.js +1 -1
- package/dist/esm/nodeviews/blockCard.js +3 -0
- package/dist/esm/nodeviews/embedCard.js +4 -4
- package/dist/esm/nodeviews/inlineCard.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 7.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`f1c44645de4a1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f1c44645de4a1) -
|
|
8
|
+
[https://product-fabric.atlassian.net/browse/ED-29133](ED-29133) - editor smart cards hydration
|
|
9
|
+
was improved
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 7.6.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -90,6 +90,9 @@ var BlockCardComponent = exports.BlockCardComponent = /*#__PURE__*/function (_Re
|
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
92
|
_this.scrollContainer = (0, _ui.findOverflowScrollParent)(props.view.dom) || undefined;
|
|
93
|
+
_this.state = {
|
|
94
|
+
isSSRDataAvailable: (0, _expValEquals.expValEquals)('platform_editor_smart_card_otp', 'isEnabled', true) && props.isPageSSRed
|
|
95
|
+
};
|
|
93
96
|
return _this;
|
|
94
97
|
}
|
|
95
98
|
(0, _inherits2.default)(BlockCardComponent, _React$PureComponent);
|
|
@@ -141,10 +141,6 @@ var EmbedCardComponent = exports.EmbedCardComponent = /*#__PURE__*/function (_Re
|
|
|
141
141
|
// Ignored via go/ees005
|
|
142
142
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
143
143
|
(0, _defineProperty2.default)(_this, "embedIframeRef", /*#__PURE__*/_react.default.createRef());
|
|
144
|
-
(0, _defineProperty2.default)(_this, "state", {
|
|
145
|
-
hasPreview: true,
|
|
146
|
-
isSSRDataAvailable: false
|
|
147
|
-
});
|
|
148
144
|
(0, _defineProperty2.default)(_this, "getPosSafely", function () {
|
|
149
145
|
var getPos = _this.props.getPos;
|
|
150
146
|
if (!getPos || typeof getPos === 'boolean') {
|
|
@@ -282,6 +278,10 @@ var EmbedCardComponent = exports.EmbedCardComponent = /*#__PURE__*/function (_Re
|
|
|
282
278
|
});
|
|
283
279
|
(0, _defineProperty2.default)(_this, "removeCardDispatched", false);
|
|
284
280
|
_this.scrollContainer = (0, _ui.findOverflowScrollParent)(props.view.dom) || undefined;
|
|
281
|
+
_this.state = {
|
|
282
|
+
hasPreview: true,
|
|
283
|
+
isSSRDataAvailable: (0, _expValEquals.expValEquals)('platform_editor_smart_card_otp', 'isEnabled', true) && props.isPageSSRed
|
|
284
|
+
};
|
|
285
285
|
return _this;
|
|
286
286
|
}
|
|
287
287
|
(0, _inherits2.default)(EmbedCardComponent, _React$PureComponent);
|
|
@@ -60,7 +60,7 @@ var InlineCard = exports.InlineCard = /*#__PURE__*/(0, _react.memo)(function (_r
|
|
|
60
60
|
view.dispatch(tr);
|
|
61
61
|
};
|
|
62
62
|
}, [getPos, view]);
|
|
63
|
-
var _useState = (0, _react.useState)(
|
|
63
|
+
var _useState = (0, _react.useState)((0, _expValEquals.expValEquals)('platform_editor_smart_card_otp', 'isEnabled', true) && isPageSSRed),
|
|
64
64
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
65
65
|
isSSRDataAvailable = _useState2[0],
|
|
66
66
|
setIsSSRDataAvailable = _useState2[1];
|
|
@@ -72,6 +72,9 @@ export class BlockCardComponent extends React.PureComponent {
|
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
this.scrollContainer = findOverflowScrollParent(props.view.dom) || undefined;
|
|
75
|
+
this.state = {
|
|
76
|
+
isSSRDataAvailable: expValEquals('platform_editor_smart_card_otp', 'isEnabled', true) && props.isPageSSRed
|
|
77
|
+
};
|
|
75
78
|
}
|
|
76
79
|
componentDidMount() {
|
|
77
80
|
if (!expValEquals('platform_editor_smart_card_otp', 'isEnabled', true)) {
|
|
@@ -122,10 +122,6 @@ export class EmbedCardComponent extends React.PureComponent {
|
|
|
122
122
|
// Ignored via go/ees005
|
|
123
123
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
124
124
|
_defineProperty(this, "embedIframeRef", /*#__PURE__*/React.createRef());
|
|
125
|
-
_defineProperty(this, "state", {
|
|
126
|
-
hasPreview: true,
|
|
127
|
-
isSSRDataAvailable: false
|
|
128
|
-
});
|
|
129
125
|
_defineProperty(this, "getPosSafely", () => {
|
|
130
126
|
const {
|
|
131
127
|
getPos
|
|
@@ -275,6 +271,10 @@ export class EmbedCardComponent extends React.PureComponent {
|
|
|
275
271
|
});
|
|
276
272
|
_defineProperty(this, "removeCardDispatched", false);
|
|
277
273
|
this.scrollContainer = findOverflowScrollParent(props.view.dom) || undefined;
|
|
274
|
+
this.state = {
|
|
275
|
+
hasPreview: true,
|
|
276
|
+
isSSRDataAvailable: expValEquals('platform_editor_smart_card_otp', 'isEnabled', true) && props.isPageSSRed
|
|
277
|
+
};
|
|
278
278
|
}
|
|
279
279
|
componentDidMount() {
|
|
280
280
|
if (!expValEquals('platform_editor_smart_card_otp', 'isEnabled', true)) {
|
|
@@ -50,7 +50,7 @@ export const InlineCard = /*#__PURE__*/memo(({
|
|
|
50
50
|
view.dispatch(tr);
|
|
51
51
|
};
|
|
52
52
|
}, [getPos, view]);
|
|
53
|
-
const [isSSRDataAvailable, setIsSSRDataAvailable] = useState(
|
|
53
|
+
const [isSSRDataAvailable, setIsSSRDataAvailable] = useState(expValEquals('platform_editor_smart_card_otp', 'isEnabled', true) && isPageSSRed);
|
|
54
54
|
useEffect(() => {
|
|
55
55
|
if (!expValEquals('platform_editor_smart_card_otp', 'isEnabled', true)) {
|
|
56
56
|
return;
|
|
@@ -83,6 +83,9 @@ export var BlockCardComponent = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
_this.scrollContainer = findOverflowScrollParent(props.view.dom) || undefined;
|
|
86
|
+
_this.state = {
|
|
87
|
+
isSSRDataAvailable: expValEquals('platform_editor_smart_card_otp', 'isEnabled', true) && props.isPageSSRed
|
|
88
|
+
};
|
|
86
89
|
return _this;
|
|
87
90
|
}
|
|
88
91
|
_inherits(BlockCardComponent, _React$PureComponent);
|
|
@@ -134,10 +134,6 @@ export var EmbedCardComponent = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
134
134
|
// Ignored via go/ees005
|
|
135
135
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
136
136
|
_defineProperty(_this, "embedIframeRef", /*#__PURE__*/React.createRef());
|
|
137
|
-
_defineProperty(_this, "state", {
|
|
138
|
-
hasPreview: true,
|
|
139
|
-
isSSRDataAvailable: false
|
|
140
|
-
});
|
|
141
137
|
_defineProperty(_this, "getPosSafely", function () {
|
|
142
138
|
var getPos = _this.props.getPos;
|
|
143
139
|
if (!getPos || typeof getPos === 'boolean') {
|
|
@@ -275,6 +271,10 @@ export var EmbedCardComponent = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
275
271
|
});
|
|
276
272
|
_defineProperty(_this, "removeCardDispatched", false);
|
|
277
273
|
_this.scrollContainer = findOverflowScrollParent(props.view.dom) || undefined;
|
|
274
|
+
_this.state = {
|
|
275
|
+
hasPreview: true,
|
|
276
|
+
isSSRDataAvailable: expValEquals('platform_editor_smart_card_otp', 'isEnabled', true) && props.isPageSSRed
|
|
277
|
+
};
|
|
278
278
|
return _this;
|
|
279
279
|
}
|
|
280
280
|
_inherits(EmbedCardComponent, _React$PureComponent);
|
|
@@ -49,7 +49,7 @@ export var InlineCard = /*#__PURE__*/memo(function (_ref) {
|
|
|
49
49
|
view.dispatch(tr);
|
|
50
50
|
};
|
|
51
51
|
}, [getPos, view]);
|
|
52
|
-
var _useState = useState(
|
|
52
|
+
var _useState = useState(expValEquals('platform_editor_smart_card_otp', 'isEnabled', true) && isPageSSRed),
|
|
53
53
|
_useState2 = _slicedToArray(_useState, 2),
|
|
54
54
|
isSSRDataAvailable = _useState2[0],
|
|
55
55
|
setIsSSRDataAvailable = _useState2[1];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.7.0",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
59
59
|
"@atlaskit/platform-feature-flags-react": "^0.2.0",
|
|
60
60
|
"@atlaskit/primitives": "^14.12.0",
|
|
61
|
-
"@atlaskit/smart-card": "^40.
|
|
61
|
+
"@atlaskit/smart-card": "^40.15.0",
|
|
62
62
|
"@atlaskit/theme": "^20.0.0",
|
|
63
63
|
"@atlaskit/tmp-editor-statsig": "^11.9.0",
|
|
64
64
|
"@atlaskit/tokens": "^6.1.0",
|