@atlaskit/editor-plugin-synced-block 10.2.12 → 10.2.14

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,23 @@
1
1
  # @atlaskit/editor-plugin-synced-block
2
2
 
3
+ ## 10.2.14
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 10.2.13
10
+
11
+ ### Patch Changes
12
+
13
+ - [`3574c94470487`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3574c94470487) -
14
+ Add `blockTypeMessages.syncedBlockQuickInsertTitle` for noun-form synced block labels, for example
15
+ `formatMessage(blockTypeMessages.syncedBlockQuickInsertTitle)`, and use it in quick insert under
16
+ the activation experiment.
17
+ - [`abf715708f186`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/abf715708f186) -
18
+ Move synced block Delete into an overflow menu for activation experiment users
19
+ - Updated dependencies
20
+
3
21
  ## 10.2.12
4
22
 
5
23
  ### Patch Changes
@@ -56,6 +56,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(stat
56
56
  };
57
57
  };
58
58
  var items = [];
59
+ var isSyncBlockActivationEnabled = (0, _expValEquals.expValEquals)('platform_editor_sync_block_activation', 'isEnabled', true);
59
60
  if (isUnsyncedBlock) {
60
61
  var deleteButton = _objectSpread({
61
62
  type: 'button',
@@ -70,7 +71,6 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(stat
70
71
  // re-framed as the primary "Copy to sync" action: it shows a visible label and
71
72
  // is moved to the first toolbar position (before the synced-location info). See
72
73
  // EDITOR-8060.
73
- var isSyncBlockActivationEnabled = (0, _expValEquals.expValEquals)('platform_editor_sync_block_activation', 'isEnabled', true);
74
74
  var copyButton = _objectSpread({
75
75
  id: 'editor.syncedBlock.copy',
76
76
  type: 'button',
@@ -147,7 +147,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(stat
147
147
  }, hoverDecorationProps(nodeType, _consts.akEditorSelectedNodeClassName));
148
148
  items.push(editSourceButton);
149
149
  }
150
- if ((0, _platformFeatureFlags.fg)('platform_synced_block_patch_13')) {
150
+ if (!isSyncBlockActivationEnabled && (0, _platformFeatureFlags.fg)('platform_synced_block_patch_13')) {
151
151
  var separator = {
152
152
  type: 'separator'
153
153
  };
@@ -15,6 +15,7 @@ var _messages = require("@atlaskit/editor-common/messages");
15
15
  var _quickInsert = require("@atlaskit/editor-common/quick-insert");
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 _editorCommands = require("../editor-commands");
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); }
@@ -25,7 +26,7 @@ var getQuickInsertConfig = exports.getQuickInsertConfig = function getQuickInser
25
26
  if (!(config !== null && config !== void 0 && config.enableSourceCreation)) {
26
27
  return [];
27
28
  }
28
- var syncBlockTitle = _messages.blockTypeMessages.syncBlock;
29
+ var syncBlockTitle = (0, _expValEquals.expValEquals)('platform_editor_sync_block_activation', 'isEnabled', true) ? _messages.blockTypeMessages.syncedBlockQuickInsertTitle : _messages.blockTypeMessages.syncBlock;
29
30
  return [{
30
31
  id: 'syncBlock',
31
32
  title: formatMessage(syncBlockTitle),
@@ -51,6 +51,7 @@ export const getToolbarConfig = (state, intl, api, syncBlockStore) => {
51
51
  onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className)
52
52
  });
53
53
  const items = [];
54
+ const isSyncBlockActivationEnabled = expValEquals('platform_editor_sync_block_activation', 'isEnabled', true);
54
55
  if (isUnsyncedBlock) {
55
56
  const deleteButton = {
56
57
  type: 'button',
@@ -66,7 +67,6 @@ export const getToolbarConfig = (state, intl, api, syncBlockStore) => {
66
67
  // re-framed as the primary "Copy to sync" action: it shows a visible label and
67
68
  // is moved to the first toolbar position (before the synced-location info). See
68
69
  // EDITOR-8060.
69
- const isSyncBlockActivationEnabled = expValEquals('platform_editor_sync_block_activation', 'isEnabled', true);
70
70
  const copyButton = {
71
71
  id: 'editor.syncedBlock.copy',
72
72
  type: 'button',
@@ -143,7 +143,7 @@ export const getToolbarConfig = (state, intl, api, syncBlockStore) => {
143
143
  };
144
144
  items.push(editSourceButton);
145
145
  }
146
- if (fg('platform_synced_block_patch_13')) {
146
+ if (!isSyncBlockActivationEnabled && fg('platform_synced_block_patch_13')) {
147
147
  const separator = {
148
148
  type: 'separator'
149
149
  };
@@ -7,6 +7,7 @@ import { blockTypeMessages } from '@atlaskit/editor-common/messages';
7
7
  import { IconSyncBlock } from '@atlaskit/editor-common/quick-insert';
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 { createSyncedBlock } from '../editor-commands';
11
12
  import { SYNCED_BLOCK_BUTTON_TEST_ID } from '../types';
12
13
  const lozengeWrapperStyles = null;
@@ -17,7 +18,7 @@ export const getQuickInsertConfig = (config, api, syncBlockStore) => {
17
18
  if (!(config !== null && config !== void 0 && config.enableSourceCreation)) {
18
19
  return [];
19
20
  }
20
- const syncBlockTitle = blockTypeMessages.syncBlock;
21
+ const syncBlockTitle = expValEquals('platform_editor_sync_block_activation', 'isEnabled', true) ? blockTypeMessages.syncedBlockQuickInsertTitle : blockTypeMessages.syncBlock;
21
22
  return [{
22
23
  id: 'syncBlock',
23
24
  title: formatMessage(syncBlockTitle),
@@ -47,6 +47,7 @@ export var getToolbarConfig = function getToolbarConfig(state, intl, api, syncBl
47
47
  };
48
48
  };
49
49
  var items = [];
50
+ var isSyncBlockActivationEnabled = expValEquals('platform_editor_sync_block_activation', 'isEnabled', true);
50
51
  if (isUnsyncedBlock) {
51
52
  var deleteButton = _objectSpread({
52
53
  type: 'button',
@@ -61,7 +62,6 @@ export var getToolbarConfig = function getToolbarConfig(state, intl, api, syncBl
61
62
  // re-framed as the primary "Copy to sync" action: it shows a visible label and
62
63
  // is moved to the first toolbar position (before the synced-location info). See
63
64
  // EDITOR-8060.
64
- var isSyncBlockActivationEnabled = expValEquals('platform_editor_sync_block_activation', 'isEnabled', true);
65
65
  var copyButton = _objectSpread({
66
66
  id: 'editor.syncedBlock.copy',
67
67
  type: 'button',
@@ -138,7 +138,7 @@ export var getToolbarConfig = function getToolbarConfig(state, intl, api, syncBl
138
138
  }, hoverDecorationProps(nodeType, akEditorSelectedNodeClassName));
139
139
  items.push(editSourceButton);
140
140
  }
141
- if (fg('platform_synced_block_patch_13')) {
141
+ if (!isSyncBlockActivationEnabled && fg('platform_synced_block_patch_13')) {
142
142
  var separator = {
143
143
  type: 'separator'
144
144
  };
@@ -7,6 +7,7 @@ import { blockTypeMessages } from '@atlaskit/editor-common/messages';
7
7
  import { IconSyncBlock } from '@atlaskit/editor-common/quick-insert';
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 { createSyncedBlock } from '../editor-commands';
11
12
  import { SYNCED_BLOCK_BUTTON_TEST_ID } from '../types';
12
13
  var lozengeWrapperStyles = null;
@@ -16,7 +17,7 @@ export var getQuickInsertConfig = function getQuickInsertConfig(config, api, syn
16
17
  if (!(config !== null && config !== void 0 && config.enableSourceCreation)) {
17
18
  return [];
18
19
  }
19
- var syncBlockTitle = blockTypeMessages.syncBlock;
20
+ var syncBlockTitle = expValEquals('platform_editor_sync_block_activation', 'isEnabled', true) ? blockTypeMessages.syncedBlockQuickInsertTitle : blockTypeMessages.syncBlock;
20
21
  return [{
21
22
  id: 'syncBlock',
22
23
  title: formatMessage(syncBlockTitle),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-synced-block",
3
- "version": "10.2.12",
3
+ "version": "10.2.14",
4
4
  "description": "SyncedBlock plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -21,8 +21,8 @@
21
21
  "atlaskit:src": "src/index.ts",
22
22
  "dependencies": {
23
23
  "@atlaskit/adf-schema": "^56.1.0",
24
- "@atlaskit/button": "24.3.3",
25
- "@atlaskit/dropdown-menu": "17.1.4",
24
+ "@atlaskit/button": "24.3.4",
25
+ "@atlaskit/dropdown-menu": "17.1.5",
26
26
  "@atlaskit/editor-json-transformer": "^9.0.0",
27
27
  "@atlaskit/editor-plugin-analytics": "^12.0.0",
28
28
  "@atlaskit/editor-plugin-block-menu": "^11.1.0",
@@ -36,18 +36,18 @@
36
36
  "@atlaskit/editor-prosemirror": "^8.0.0",
37
37
  "@atlaskit/editor-shared-styles": "^4.0.0",
38
38
  "@atlaskit/editor-synced-block-provider": "^8.6.0",
39
- "@atlaskit/editor-toolbar": "^2.2.0",
39
+ "@atlaskit/editor-toolbar": "^2.3.0",
40
40
  "@atlaskit/flag": "^18.2.0",
41
- "@atlaskit/icon": "37.0.0",
41
+ "@atlaskit/icon": "37.0.1",
42
42
  "@atlaskit/icon-lab": "^7.3.0",
43
43
  "@atlaskit/logo": "^21.4.0",
44
44
  "@atlaskit/lozenge": "^14.1.0",
45
45
  "@atlaskit/modal-dialog": "^16.1.0",
46
46
  "@atlaskit/platform-feature-flags": "^2.0.0",
47
47
  "@atlaskit/primitives": "^21.0.0",
48
- "@atlaskit/spinner": "20.1.0",
49
- "@atlaskit/tmp-editor-statsig": "^126.0.0",
50
- "@atlaskit/tokens": "15.8.0",
48
+ "@atlaskit/spinner": "20.1.1",
49
+ "@atlaskit/tmp-editor-statsig": "^126.1.0",
50
+ "@atlaskit/tokens": "16.0.0",
51
51
  "@atlaskit/tooltip": "^23.1.0",
52
52
  "@atlaskit/visually-hidden": "^4.1.0",
53
53
  "@babel/runtime": "^7.0.0",
@@ -57,7 +57,7 @@
57
57
  "memoize-one": "^6.0.0"
58
58
  },
59
59
  "peerDependencies": {
60
- "@atlaskit/editor-common": "^116.30.0",
60
+ "@atlaskit/editor-common": "^116.32.0",
61
61
  "react": "^18.2.0",
62
62
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
63
63
  },