@atlaskit/editor-plugin-card 2.15.2 → 2.15.3
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/lazy-block-card.js +2 -2
- package/dist/cjs/nodeviews/lazy-embed-card.js +2 -2
- package/dist/cjs/toDOM-fixes/blockCard.js +2 -2
- package/dist/cjs/toDOM-fixes/embedCard.js +2 -2
- package/dist/es2019/nodeviews/lazy-block-card.js +2 -2
- package/dist/es2019/nodeviews/lazy-embed-card.js +2 -2
- package/dist/es2019/toDOM-fixes/blockCard.js +2 -2
- package/dist/es2019/toDOM-fixes/embedCard.js +2 -2
- package/dist/esm/nodeviews/lazy-block-card.js +2 -2
- package/dist/esm/nodeviews/lazy-embed-card.js +2 -2
- package/dist/esm/toDOM-fixes/blockCard.js +2 -2
- package/dist/esm/toDOM-fixes/embedCard.js +2 -2
- package/package.json +4 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 2.15.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#139034](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/139034)
|
|
8
|
+
[`517cdc0f7ea1a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/517cdc0f7ea1a) -
|
|
9
|
+
Used experiment for lazy node view
|
|
10
|
+
|
|
3
11
|
## 2.15.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -7,12 +7,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.lazyBlockCardView = void 0;
|
|
8
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
9
|
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
10
|
-
var
|
|
10
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
11
11
|
var _blockCard = require("./blockCard");
|
|
12
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
14
|
var lazyBlockCardView = exports.lazyBlockCardView = function lazyBlockCardView(props) {
|
|
15
|
-
if (
|
|
15
|
+
if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false)) {
|
|
16
16
|
return (0, _blockCard.blockCardNodeView)(props);
|
|
17
17
|
}
|
|
18
18
|
return (0, _lazyNodeView.withLazyLoading)({
|
|
@@ -7,12 +7,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.lazyEmbedCardView = void 0;
|
|
8
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
9
|
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
10
|
-
var
|
|
10
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
11
11
|
var _embedCard = require("./embedCard");
|
|
12
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
14
|
var lazyEmbedCardView = exports.lazyEmbedCardView = function lazyEmbedCardView(props) {
|
|
15
|
-
if (
|
|
15
|
+
if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false)) {
|
|
16
16
|
return (0, _embedCard.embedCardNodeView)(props);
|
|
17
17
|
}
|
|
18
18
|
return (0, _lazyNodeView.withLazyLoading)({
|
|
@@ -8,12 +8,12 @@ exports.blockCardSpecWithFixedToDOM = void 0;
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
10
10
|
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
11
|
-
var
|
|
11
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
12
12
|
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; }
|
|
13
13
|
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; }
|
|
14
14
|
// @nodeSpecException:toDOM patch
|
|
15
15
|
var blockCardSpecWithFixedToDOM = exports.blockCardSpecWithFixedToDOM = function blockCardSpecWithFixedToDOM() {
|
|
16
|
-
if (
|
|
16
|
+
if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false)) {
|
|
17
17
|
return _adfSchema.blockCard;
|
|
18
18
|
}
|
|
19
19
|
return _objectSpread(_objectSpread({}, _adfSchema.blockCard), {}, {
|
|
@@ -9,7 +9,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
10
10
|
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
11
11
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
12
|
-
var
|
|
12
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
13
13
|
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; }
|
|
14
14
|
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; } /**
|
|
15
15
|
* Some of these functions and styling are duplicated from their custom node view equivalents
|
|
@@ -61,7 +61,7 @@ var LINE_LENGTH = 760;
|
|
|
61
61
|
|
|
62
62
|
// @nodeSpecException:toDOM patch
|
|
63
63
|
var embedCardSpecWithFixedToDOM = exports.embedCardSpecWithFixedToDOM = function embedCardSpecWithFixedToDOM() {
|
|
64
|
-
if (
|
|
64
|
+
if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false)) {
|
|
65
65
|
return _adfSchema.embedCard;
|
|
66
66
|
}
|
|
67
67
|
return _objectSpread(_objectSpread({}, _adfSchema.embedCard), {}, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
|
-
import {
|
|
2
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
3
|
import { blockCardNodeView } from './blockCard';
|
|
4
4
|
export const lazyBlockCardView = props => {
|
|
5
|
-
if (
|
|
5
|
+
if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
|
|
6
6
|
return blockCardNodeView(props);
|
|
7
7
|
}
|
|
8
8
|
return withLazyLoading({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
|
-
import {
|
|
2
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
3
|
import { embedCardNodeView } from './embedCard';
|
|
4
4
|
export const lazyEmbedCardView = props => {
|
|
5
|
-
if (
|
|
5
|
+
if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
|
|
6
6
|
return embedCardNodeView(props);
|
|
7
7
|
}
|
|
8
8
|
return withLazyLoading({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { blockCard } from '@atlaskit/adf-schema';
|
|
2
2
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
3
|
-
import {
|
|
3
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
4
4
|
// @nodeSpecException:toDOM patch
|
|
5
5
|
export const blockCardSpecWithFixedToDOM = () => {
|
|
6
|
-
if (
|
|
6
|
+
if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
|
|
7
7
|
return blockCard;
|
|
8
8
|
}
|
|
9
9
|
return {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import { embedCard } from '@atlaskit/adf-schema';
|
|
12
12
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
13
13
|
import { DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
|
|
14
|
-
import {
|
|
14
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
15
15
|
// From `packages/editor/editor-common/src/ui/MediaSingle/styled.tsx`
|
|
16
16
|
function calcMargin(layout) {
|
|
17
17
|
switch (layout) {
|
|
@@ -52,7 +52,7 @@ const LINE_LENGTH = 760;
|
|
|
52
52
|
|
|
53
53
|
// @nodeSpecException:toDOM patch
|
|
54
54
|
export const embedCardSpecWithFixedToDOM = () => {
|
|
55
|
-
if (
|
|
55
|
+
if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
|
|
56
56
|
return embedCard;
|
|
57
57
|
}
|
|
58
58
|
return {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
|
-
import {
|
|
2
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
3
|
import { blockCardNodeView } from './blockCard';
|
|
4
4
|
export var lazyBlockCardView = function lazyBlockCardView(props) {
|
|
5
|
-
if (
|
|
5
|
+
if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
|
|
6
6
|
return blockCardNodeView(props);
|
|
7
7
|
}
|
|
8
8
|
return withLazyLoading({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
|
-
import {
|
|
2
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
3
|
import { embedCardNodeView } from './embedCard';
|
|
4
4
|
export var lazyEmbedCardView = function lazyEmbedCardView(props) {
|
|
5
|
-
if (
|
|
5
|
+
if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
|
|
6
6
|
return embedCardNodeView(props);
|
|
7
7
|
}
|
|
8
8
|
return withLazyLoading({
|
|
@@ -3,10 +3,10 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
3
3
|
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) { _defineProperty(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; }
|
|
4
4
|
import { blockCard } from '@atlaskit/adf-schema';
|
|
5
5
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
6
|
-
import {
|
|
6
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
7
|
// @nodeSpecException:toDOM patch
|
|
8
8
|
export var blockCardSpecWithFixedToDOM = function blockCardSpecWithFixedToDOM() {
|
|
9
|
-
if (
|
|
9
|
+
if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
|
|
10
10
|
return blockCard;
|
|
11
11
|
}
|
|
12
12
|
return _objectSpread(_objectSpread({}, blockCard), {}, {
|
|
@@ -14,7 +14,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
14
14
|
import { embedCard } from '@atlaskit/adf-schema';
|
|
15
15
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
16
16
|
import { DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
|
|
17
|
-
import {
|
|
17
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
18
|
// From `packages/editor/editor-common/src/ui/MediaSingle/styled.tsx`
|
|
19
19
|
function calcMargin(layout) {
|
|
20
20
|
switch (layout) {
|
|
@@ -55,7 +55,7 @@ var LINE_LENGTH = 760;
|
|
|
55
55
|
|
|
56
56
|
// @nodeSpecException:toDOM patch
|
|
57
57
|
export var embedCardSpecWithFixedToDOM = function embedCardSpecWithFixedToDOM() {
|
|
58
|
-
if (
|
|
58
|
+
if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
|
|
59
59
|
return embedCard;
|
|
60
60
|
}
|
|
61
61
|
return _objectSpread(_objectSpread({}, embedCard), {}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.3",
|
|
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": "^40.9.0",
|
|
35
35
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
36
36
|
"@atlaskit/custom-steps": "^0.7.0",
|
|
37
|
-
"@atlaskit/editor-common": "^88.
|
|
37
|
+
"@atlaskit/editor-common": "^88.13.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^1.8.0",
|
|
39
39
|
"@atlaskit/editor-plugin-decorations": "^1.3.0",
|
|
40
40
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|
|
@@ -55,8 +55,9 @@
|
|
|
55
55
|
"@atlaskit/menu": "2.12.2",
|
|
56
56
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
57
57
|
"@atlaskit/primitives": "^12.1.0",
|
|
58
|
-
"@atlaskit/smart-card": "^28.
|
|
58
|
+
"@atlaskit/smart-card": "^28.1.0",
|
|
59
59
|
"@atlaskit/theme": "^13.0.0",
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^2.1.8",
|
|
60
61
|
"@atlaskit/tokens": "^1.59.0",
|
|
61
62
|
"@babel/runtime": "^7.0.0",
|
|
62
63
|
"@emotion/react": "^11.7.1",
|
|
@@ -125,9 +126,6 @@
|
|
|
125
126
|
"platform.linking-platform.datasource-enable-toolbar-buttons-for-all-datasources": {
|
|
126
127
|
"type": "boolean"
|
|
127
128
|
},
|
|
128
|
-
"platform_editor_lazy-node-views": {
|
|
129
|
-
"type": "boolean"
|
|
130
|
-
},
|
|
131
129
|
"platform.editor.card.inject-settings-button": {
|
|
132
130
|
"type": "boolean"
|
|
133
131
|
},
|