@atlaskit/editor-plugin-card 10.1.4 → 10.1.5
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/embedCard.js +4 -1
- package/dist/cjs/ui/LinkToolbarAppearanceDropdown.js +4 -2
- package/dist/cjs/ui/toolbar.js +3 -2
- package/dist/es2019/nodeviews/embedCard.js +4 -1
- package/dist/es2019/ui/LinkToolbarAppearanceDropdown.js +4 -2
- package/dist/es2019/ui/toolbar.js +3 -2
- package/dist/esm/nodeviews/embedCard.js +4 -1
- package/dist/esm/ui/LinkToolbarAppearanceDropdown.js +4 -2
- package/dist/esm/ui/toolbar.js +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 10.1.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6b6eca9cee16d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6b6eca9cee16d) -
|
|
8
|
+
Switch to use editorExperiment to use productKey for responsive preview panel changes.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 10.1.4
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -30,6 +30,7 @@ var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react
|
|
|
30
30
|
var _smartCard = require("@atlaskit/smart-card");
|
|
31
31
|
var _ssr = require("@atlaskit/smart-card/ssr");
|
|
32
32
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
33
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
33
34
|
var _actions = require("../pm-plugins/actions");
|
|
34
35
|
var _ResizableEmbedCard = _interopRequireDefault(require("../ui/ResizableEmbedCard"));
|
|
35
36
|
var _blockCard = require("./blockCard");
|
|
@@ -470,7 +471,9 @@ var EmbedOrBlockCardComponent = exports.EmbedOrBlockCardComponent = function Emb
|
|
|
470
471
|
});
|
|
471
472
|
};
|
|
472
473
|
var WrappedEmbedCardWithCondition = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
473
|
-
return (0,
|
|
474
|
+
return (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
|
|
475
|
+
exposure: true
|
|
476
|
+
});
|
|
474
477
|
}, EmbedOrBlockCardComponent, EmbedCardComponent);
|
|
475
478
|
var WrappedEmbedCard = (0, _genericCard.Card)(WrappedEmbedCardWithCondition, _ui.UnsupportedBlock);
|
|
476
479
|
var EmbedCard = exports.EmbedCard = /*#__PURE__*/function (_ReactNodeView) {
|
|
@@ -14,7 +14,7 @@ var _utils = require("@atlaskit/editor-common/utils");
|
|
|
14
14
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
15
15
|
var _linkProvider = require("@atlaskit/link-provider");
|
|
16
16
|
var _menu = require("@atlaskit/menu");
|
|
17
|
-
var
|
|
17
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
18
18
|
var _doc = require("../pm-plugins/doc");
|
|
19
19
|
var _DatasourceDropdownOption = require("./DatasourceDropdownOption");
|
|
20
20
|
var _LinkToolbarAppearance = require("./LinkToolbarAppearance");
|
|
@@ -57,7 +57,9 @@ var LinkAppearanceMenu = exports.LinkAppearanceMenu = function LinkAppearanceMen
|
|
|
57
57
|
testId: 'embed-appearance',
|
|
58
58
|
disabled: !isEmbedCardLinkSupportedInParent,
|
|
59
59
|
tooltip: isEmbedCardLinkSupportedInParent ? undefined : (0, _LinkToolbarAppearance.getUnavailableMessage)(editorState, intl),
|
|
60
|
-
description: (0,
|
|
60
|
+
description: (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
|
|
61
|
+
exposure: true
|
|
62
|
+
}) ? intl.formatMessage(_messages.cardMessages.embedToBlockCardWarning) : undefined
|
|
61
63
|
};
|
|
62
64
|
var blockCardOption = allowBlockCards && {
|
|
63
65
|
appearance: 'block',
|
package/dist/cjs/ui/toolbar.js
CHANGED
|
@@ -32,7 +32,6 @@ var _linkBrokenEditorUnlink = _interopRequireDefault(require("@atlaskit/icon/cor
|
|
|
32
32
|
var _linkExternalShortcut = _interopRequireDefault(require("@atlaskit/icon/core/migration/link-external--shortcut"));
|
|
33
33
|
var _settingsEditorSettings = _interopRequireDefault(require("@atlaskit/icon/core/migration/settings--editor-settings"));
|
|
34
34
|
var _settings = _interopRequireDefault(require("@atlaskit/icon/core/settings"));
|
|
35
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
36
35
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
37
36
|
var _doc = require("../pm-plugins/doc");
|
|
38
37
|
var _pluginKey = require("../pm-plugins/plugin-key");
|
|
@@ -149,7 +148,9 @@ var floatingToolbar = exports.floatingToolbar = function floatingToolbar(cardOpt
|
|
|
149
148
|
// Ignored via go/ees005
|
|
150
149
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
151
150
|
var richMediaElement = element.querySelector(".".concat(_styles.richMediaClassName));
|
|
152
|
-
if (!(0,
|
|
151
|
+
if (!(0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
|
|
152
|
+
exposure: true
|
|
153
|
+
})) {
|
|
153
154
|
return richMediaElement;
|
|
154
155
|
}
|
|
155
156
|
if (richMediaElement) {
|
|
@@ -15,6 +15,7 @@ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
|
15
15
|
import { EmbedResizeMessageListener, Card as SmartCard } from '@atlaskit/smart-card';
|
|
16
16
|
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
17
17
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
19
|
import { registerCard, removeCard } from '../pm-plugins/actions';
|
|
19
20
|
import ResizableEmbedCard from '../ui/ResizableEmbedCard';
|
|
20
21
|
import { BlockCardComponent } from './blockCard';
|
|
@@ -436,7 +437,9 @@ export const EmbedOrBlockCardComponent = props => {
|
|
|
436
437
|
provider: props.provider
|
|
437
438
|
});
|
|
438
439
|
};
|
|
439
|
-
const WrappedEmbedCardWithCondition = componentWithCondition(() =>
|
|
440
|
+
const WrappedEmbedCardWithCondition = componentWithCondition(() => editorExperiment('platform_editor_preview_panel_responsiveness', true, {
|
|
441
|
+
exposure: true
|
|
442
|
+
}), EmbedOrBlockCardComponent, EmbedCardComponent);
|
|
440
443
|
const WrappedEmbedCard = Card(WrappedEmbedCardWithCondition, UnsupportedBlock);
|
|
441
444
|
export class EmbedCard extends ReactNodeView {
|
|
442
445
|
constructor(...args) {
|
|
@@ -6,7 +6,7 @@ import { isSupportedInParent } from '@atlaskit/editor-common/utils';
|
|
|
6
6
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
7
7
|
import { useSmartCardContext } from '@atlaskit/link-provider';
|
|
8
8
|
import { ButtonItem, LinkItem, MenuGroup, Section } from '@atlaskit/menu';
|
|
9
|
-
import {
|
|
9
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
10
10
|
import { changeSelectedCardToLink, setSelectedCardAppearance } from '../pm-plugins/doc';
|
|
11
11
|
import { DatasourceDropdownOption, datasourceDisplayInformation } from './DatasourceDropdownOption';
|
|
12
12
|
import { getUnavailableMessage } from './LinkToolbarAppearance';
|
|
@@ -45,7 +45,9 @@ export const LinkAppearanceMenu = ({
|
|
|
45
45
|
testId: 'embed-appearance',
|
|
46
46
|
disabled: !isEmbedCardLinkSupportedInParent,
|
|
47
47
|
tooltip: isEmbedCardLinkSupportedInParent ? undefined : getUnavailableMessage(editorState, intl),
|
|
48
|
-
description:
|
|
48
|
+
description: editorExperiment('platform_editor_preview_panel_responsiveness', true, {
|
|
49
|
+
exposure: true
|
|
50
|
+
}) ? intl.formatMessage(messages.embedToBlockCardWarning) : undefined
|
|
49
51
|
};
|
|
50
52
|
const blockCardOption = allowBlockCards && {
|
|
51
53
|
appearance: 'block',
|
|
@@ -22,7 +22,6 @@ import UnlinkIcon from '@atlaskit/icon/core/migration/link-broken--editor-unlink
|
|
|
22
22
|
import OpenIcon from '@atlaskit/icon/core/migration/link-external--shortcut';
|
|
23
23
|
import CogIcon from '@atlaskit/icon/core/migration/settings--editor-settings';
|
|
24
24
|
import SettingsIcon from '@atlaskit/icon/core/settings';
|
|
25
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
26
25
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
27
26
|
import { changeSelectedCardToText } from '../pm-plugins/doc';
|
|
28
27
|
import { pluginKey } from '../pm-plugins/plugin-key';
|
|
@@ -143,7 +142,9 @@ export const floatingToolbar = (cardOptions, lpLinkPicker, linkPickerOptions, pl
|
|
|
143
142
|
// Ignored via go/ees005
|
|
144
143
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
145
144
|
const richMediaElement = element.querySelector(`.${richMediaClassName}`);
|
|
146
|
-
if (!
|
|
145
|
+
if (!editorExperiment('platform_editor_preview_panel_responsiveness', true, {
|
|
146
|
+
exposure: true
|
|
147
|
+
})) {
|
|
147
148
|
return richMediaElement;
|
|
148
149
|
}
|
|
149
150
|
if (richMediaElement) {
|
|
@@ -28,6 +28,7 @@ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
|
28
28
|
import { EmbedResizeMessageListener, Card as SmartCard } from '@atlaskit/smart-card';
|
|
29
29
|
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
30
30
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
31
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
31
32
|
import { registerCard, removeCard as _removeCard } from '../pm-plugins/actions';
|
|
32
33
|
import ResizableEmbedCard from '../ui/ResizableEmbedCard';
|
|
33
34
|
import { BlockCardComponent } from './blockCard';
|
|
@@ -463,7 +464,9 @@ export var EmbedOrBlockCardComponent = function EmbedOrBlockCardComponent(props)
|
|
|
463
464
|
});
|
|
464
465
|
};
|
|
465
466
|
var WrappedEmbedCardWithCondition = componentWithCondition(function () {
|
|
466
|
-
return
|
|
467
|
+
return editorExperiment('platform_editor_preview_panel_responsiveness', true, {
|
|
468
|
+
exposure: true
|
|
469
|
+
});
|
|
467
470
|
}, EmbedOrBlockCardComponent, EmbedCardComponent);
|
|
468
471
|
var WrappedEmbedCard = Card(WrappedEmbedCardWithCondition, UnsupportedBlock);
|
|
469
472
|
export var EmbedCard = /*#__PURE__*/function (_ReactNodeView) {
|
|
@@ -9,7 +9,7 @@ import { isSupportedInParent } from '@atlaskit/editor-common/utils';
|
|
|
9
9
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
10
10
|
import { useSmartCardContext } from '@atlaskit/link-provider';
|
|
11
11
|
import { ButtonItem, LinkItem, MenuGroup, Section } from '@atlaskit/menu';
|
|
12
|
-
import {
|
|
12
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
13
13
|
import { changeSelectedCardToLink, setSelectedCardAppearance } from '../pm-plugins/doc';
|
|
14
14
|
import { DatasourceDropdownOption, datasourceDisplayInformation } from './DatasourceDropdownOption';
|
|
15
15
|
import { getUnavailableMessage } from './LinkToolbarAppearance';
|
|
@@ -50,7 +50,9 @@ export var LinkAppearanceMenu = function LinkAppearanceMenu(_ref) {
|
|
|
50
50
|
testId: 'embed-appearance',
|
|
51
51
|
disabled: !isEmbedCardLinkSupportedInParent,
|
|
52
52
|
tooltip: isEmbedCardLinkSupportedInParent ? undefined : getUnavailableMessage(editorState, intl),
|
|
53
|
-
description:
|
|
53
|
+
description: editorExperiment('platform_editor_preview_panel_responsiveness', true, {
|
|
54
|
+
exposure: true
|
|
55
|
+
}) ? intl.formatMessage(messages.embedToBlockCardWarning) : undefined
|
|
54
56
|
};
|
|
55
57
|
var blockCardOption = allowBlockCards && {
|
|
56
58
|
appearance: 'block',
|
package/dist/esm/ui/toolbar.js
CHANGED
|
@@ -26,7 +26,6 @@ import UnlinkIcon from '@atlaskit/icon/core/migration/link-broken--editor-unlink
|
|
|
26
26
|
import OpenIcon from '@atlaskit/icon/core/migration/link-external--shortcut';
|
|
27
27
|
import CogIcon from '@atlaskit/icon/core/migration/settings--editor-settings';
|
|
28
28
|
import SettingsIcon from '@atlaskit/icon/core/settings';
|
|
29
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
30
29
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
31
30
|
import { changeSelectedCardToText } from '../pm-plugins/doc';
|
|
32
31
|
import { pluginKey } from '../pm-plugins/plugin-key';
|
|
@@ -140,7 +139,9 @@ export var floatingToolbar = function floatingToolbar(cardOptions, lpLinkPicker,
|
|
|
140
139
|
// Ignored via go/ees005
|
|
141
140
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
142
141
|
var richMediaElement = element.querySelector(".".concat(richMediaClassName));
|
|
143
|
-
if (!
|
|
142
|
+
if (!editorExperiment('platform_editor_preview_panel_responsiveness', true, {
|
|
143
|
+
exposure: true
|
|
144
|
+
})) {
|
|
144
145
|
return richMediaElement;
|
|
145
146
|
}
|
|
146
147
|
if (richMediaElement) {
|