@atlaskit/editor-plugin-synced-block 10.8.1 → 10.8.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
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-synced-block
|
|
2
2
|
|
|
3
|
+
## 10.8.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`2bba789b40ef3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2bba789b40ef3) -
|
|
8
|
+
[EDITOR-8406] Behind the `platform_editor_sync_block_activation` experiment, rename the synced
|
|
9
|
+
block block-menu copy action from "Copy synced block" to "Copy to sync". Existing terminology and
|
|
10
|
+
behaviour remain unchanged outside the experiment.
|
|
11
|
+
|
|
12
|
+
## 10.8.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 10.8.1
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -15,6 +15,7 @@ var _editorPluginConnectivity = require("@atlaskit/editor-plugin-connectivity");
|
|
|
15
15
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
16
16
|
var _lozenge = _interopRequireDefault(require("@atlaskit/lozenge"));
|
|
17
17
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
18
19
|
var _utils = require("../pm-plugins/utils/utils");
|
|
19
20
|
var _types = require("../types");
|
|
20
21
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -131,6 +132,7 @@ var CopySyncedBlockDropdownItem = function CopySyncedBlockDropdownItem(_ref4) {
|
|
|
131
132
|
var lozenge = /*#__PURE__*/_react.default.createElement(SyncedBlockNewLozenge, {
|
|
132
133
|
label: formatMessage(_messages.blockMenuMessages.newLozenge)
|
|
133
134
|
});
|
|
135
|
+
var copyLabel = (0, _expValEquals.expValEquals)('platform_editor_sync_block_activation', 'isEnabled', true) ? _messages.syncBlockMessages.copyToSyncLabel : _messages.blockMenuMessages.copySyncedBlock;
|
|
134
136
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
|
|
135
137
|
elemBefore: /*#__PURE__*/_react.default.createElement(_editorToolbar.SyncBlocksIcon, {
|
|
136
138
|
label: "",
|
|
@@ -139,7 +141,7 @@ var CopySyncedBlockDropdownItem = function CopySyncedBlockDropdownItem(_ref4) {
|
|
|
139
141
|
onClick: onClick,
|
|
140
142
|
isDisabled: (0, _editorPluginConnectivity.isOfflineMode)(mode),
|
|
141
143
|
elemAfterText: lozenge
|
|
142
|
-
}, formatMessage(
|
|
144
|
+
}, formatMessage(copyLabel));
|
|
143
145
|
};
|
|
144
146
|
var CreateOrCopySyncedBlockDropdownItem = exports.CreateOrCopySyncedBlockDropdownItem = function CreateOrCopySyncedBlockDropdownItem(_ref5) {
|
|
145
147
|
var api = _ref5.api,
|
|
@@ -2,11 +2,12 @@ import React, { useMemo } from 'react';
|
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
5
|
-
import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
5
|
+
import { blockMenuMessages, syncBlockMessages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
7
7
|
import { SyncBlocksIcon, ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
8
8
|
import Lozenge from '@atlaskit/lozenge';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
11
|
import { canBeConvertedToSyncBlock } from '../pm-plugins/utils/utils';
|
|
11
12
|
import { SYNCED_BLOCK_BUTTON_TEST_ID } from '../types';
|
|
12
13
|
const SyncedBlockNewLozenge = ({
|
|
@@ -126,6 +127,7 @@ const CopySyncedBlockDropdownItem = ({
|
|
|
126
127
|
const lozenge = /*#__PURE__*/React.createElement(SyncedBlockNewLozenge, {
|
|
127
128
|
label: formatMessage(blockMenuMessages.newLozenge)
|
|
128
129
|
});
|
|
130
|
+
const copyLabel = expValEquals('platform_editor_sync_block_activation', 'isEnabled', true) ? syncBlockMessages.copyToSyncLabel : blockMenuMessages.copySyncedBlock;
|
|
129
131
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
130
132
|
elemBefore: /*#__PURE__*/React.createElement(SyncBlocksIcon, {
|
|
131
133
|
label: "",
|
|
@@ -134,7 +136,7 @@ const CopySyncedBlockDropdownItem = ({
|
|
|
134
136
|
onClick: onClick,
|
|
135
137
|
isDisabled: isOfflineMode(mode),
|
|
136
138
|
elemAfterText: lozenge
|
|
137
|
-
}, formatMessage(
|
|
139
|
+
}, formatMessage(copyLabel));
|
|
138
140
|
};
|
|
139
141
|
export const CreateOrCopySyncedBlockDropdownItem = ({
|
|
140
142
|
api,
|
|
@@ -2,11 +2,12 @@ import React, { useMemo } from 'react';
|
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
5
|
-
import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
5
|
+
import { blockMenuMessages, syncBlockMessages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
7
7
|
import { SyncBlocksIcon, ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
8
8
|
import Lozenge from '@atlaskit/lozenge';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
11
|
import { canBeConvertedToSyncBlock } from '../pm-plugins/utils/utils';
|
|
11
12
|
import { SYNCED_BLOCK_BUTTON_TEST_ID } from '../types';
|
|
12
13
|
var SyncedBlockNewLozenge = function SyncedBlockNewLozenge(_ref) {
|
|
@@ -122,6 +123,7 @@ var CopySyncedBlockDropdownItem = function CopySyncedBlockDropdownItem(_ref4) {
|
|
|
122
123
|
var lozenge = /*#__PURE__*/React.createElement(SyncedBlockNewLozenge, {
|
|
123
124
|
label: formatMessage(blockMenuMessages.newLozenge)
|
|
124
125
|
});
|
|
126
|
+
var copyLabel = expValEquals('platform_editor_sync_block_activation', 'isEnabled', true) ? syncBlockMessages.copyToSyncLabel : blockMenuMessages.copySyncedBlock;
|
|
125
127
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
126
128
|
elemBefore: /*#__PURE__*/React.createElement(SyncBlocksIcon, {
|
|
127
129
|
label: "",
|
|
@@ -130,7 +132,7 @@ var CopySyncedBlockDropdownItem = function CopySyncedBlockDropdownItem(_ref4) {
|
|
|
130
132
|
onClick: onClick,
|
|
131
133
|
isDisabled: isOfflineMode(mode),
|
|
132
134
|
elemAfterText: lozenge
|
|
133
|
-
}, formatMessage(
|
|
135
|
+
}, formatMessage(copyLabel));
|
|
134
136
|
};
|
|
135
137
|
export var CreateOrCopySyncedBlockDropdownItem = function CreateOrCopySyncedBlockDropdownItem(_ref5) {
|
|
136
138
|
var api = _ref5.api,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-synced-block",
|
|
3
|
-
"version": "10.8.
|
|
3
|
+
"version": "10.8.3",
|
|
4
4
|
"description": "SyncedBlock plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"sideEffects": false,
|
|
21
21
|
"atlaskit:src": "src/index.ts",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@atlaskit/adf-schema": "^56.
|
|
23
|
+
"@atlaskit/adf-schema": "^56.5.0",
|
|
24
24
|
"@atlaskit/button": "25.0.0",
|
|
25
25
|
"@atlaskit/dropdown-menu": "17.2.2",
|
|
26
26
|
"@atlaskit/editor-json-transformer": "^9.2.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
47
47
|
"@atlaskit/primitives": "^22.2.0",
|
|
48
48
|
"@atlaskit/spinner": "20.1.1",
|
|
49
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
49
|
+
"@atlaskit/tmp-editor-statsig": "^136.2.0",
|
|
50
50
|
"@atlaskit/tokens": "16.3.0",
|
|
51
51
|
"@atlaskit/tooltip": "^24.0.0",
|
|
52
52
|
"@atlaskit/visually-hidden": "^4.2.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"memoize-one": "^6.0.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@atlaskit/editor-common": "^116.
|
|
61
|
+
"@atlaskit/editor-common": "^116.51.0",
|
|
62
62
|
"react": "^18.2.0 || ^19.2.0",
|
|
63
63
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
64
64
|
},
|