@atlaskit/editor-plugin-code-block 4.4.7 → 4.4.9

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-code-block
2
2
 
3
+ ## 4.4.9
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 4.4.8
10
+
11
+ ### Patch Changes
12
+
13
+ - [#165113](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/165113)
14
+ [`867bcb05452bf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/867bcb05452bf) -
15
+ Cleaned up platform_editor_controls_patch_analytics and platform_editor_controls_patch_analytics_2
16
+ - Updated dependencies
17
+
3
18
  ## 4.4.7
4
19
 
5
20
  ### Patch Changes
@@ -85,9 +85,9 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig() {
85
85
  supportsViewMode: true,
86
86
  appearance: 'subtle',
87
87
  icon: _copy.default,
88
- // note: copyContentToClipboard contains logic that also removes the
88
+ // note: copyContentToClipboardWithAnalytics contains logic that also removes the
89
89
  // visual feedback for the copy button
90
- onClick: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics_2') ? (0, _editorCommands.copyContentToClipboardWithAnalytics)(editorAnalyticsAPI) : _editorCommands.copyContentToClipboard,
90
+ onClick: (0, _editorCommands.copyContentToClipboardWithAnalytics)(editorAnalyticsAPI),
91
91
  title: formatMessage(codeBlockState.contentCopied ? _messages.codeBlockButtonMessages.copiedCodeToClipboard : _messages.codeBlockButtonMessages.copyCodeToClipboard),
92
92
  onMouseEnter: _codeBlockCopySelectionPlugin.provideVisualFeedbackForCopyButton,
93
93
  // note: resetCopiedState contains logic that also removes the
@@ -109,7 +109,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig() {
109
109
  onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false),
110
110
  onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true),
111
111
  onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false),
112
- onClick: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics_2') ? (0, _editorCommands.removeCodeBlockWithAnalytics)(editorAnalyticsAPI) : _editorCommands.removeCodeBlock,
112
+ onClick: (0, _editorCommands.removeCodeBlockWithAnalytics)(editorAnalyticsAPI),
113
113
  title: formatMessage(_messages.default.remove),
114
114
  tabIndex: null
115
115
  };
@@ -6,7 +6,7 @@ import CopyIcon from '@atlaskit/icon/core/migration/copy';
6
6
  import RemoveIcon from '@atlaskit/icon/core/migration/delete--editor-remove';
7
7
  import TextWrapIcon from '@atlaskit/icon/core/text-wrap';
8
8
  import { fg } from '@atlaskit/platform-feature-flags';
9
- import { changeLanguage, copyContentToClipboard, copyContentToClipboardWithAnalytics, removeCodeBlock, removeCodeBlockWithAnalytics, resetCopiedState, toggleWordWrapStateForCodeBlockNode } from '../editor-commands';
9
+ import { changeLanguage, copyContentToClipboardWithAnalytics, removeCodeBlockWithAnalytics, resetCopiedState, toggleWordWrapStateForCodeBlockNode } from '../editor-commands';
10
10
  import { WrapIcon } from '../ui/icons/WrapIcon';
11
11
  import { provideVisualFeedbackForCopyButton, removeVisualFeedbackForCopyButton } from './codeBlockCopySelectionPlugin';
12
12
  import { createLanguageList, DEFAULT_LANGUAGES, getLanguageIdentifier } from './language-list';
@@ -62,9 +62,9 @@ export const getToolbarConfig = (allowCopyToClipboard = false, api, overrideLang
62
62
  supportsViewMode: true,
63
63
  appearance: 'subtle',
64
64
  icon: CopyIcon,
65
- // note: copyContentToClipboard contains logic that also removes the
65
+ // note: copyContentToClipboardWithAnalytics contains logic that also removes the
66
66
  // visual feedback for the copy button
67
- onClick: fg('platform_editor_controls_patch_analytics_2') ? copyContentToClipboardWithAnalytics(editorAnalyticsAPI) : copyContentToClipboard,
67
+ onClick: copyContentToClipboardWithAnalytics(editorAnalyticsAPI),
68
68
  title: formatMessage(codeBlockState.contentCopied ? codeBlockButtonMessages.copiedCodeToClipboard : codeBlockButtonMessages.copyCodeToClipboard),
69
69
  onMouseEnter: provideVisualFeedbackForCopyButton,
70
70
  // note: resetCopiedState contains logic that also removes the
@@ -86,7 +86,7 @@ export const getToolbarConfig = (allowCopyToClipboard = false, api, overrideLang
86
86
  onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false),
87
87
  onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true),
88
88
  onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false),
89
- onClick: fg('platform_editor_controls_patch_analytics_2') ? removeCodeBlockWithAnalytics(editorAnalyticsAPI) : removeCodeBlock,
89
+ onClick: removeCodeBlockWithAnalytics(editorAnalyticsAPI),
90
90
  title: formatMessage(commonMessages.remove),
91
91
  tabIndex: null
92
92
  };
@@ -9,7 +9,7 @@ import CopyIcon from '@atlaskit/icon/core/migration/copy';
9
9
  import RemoveIcon from '@atlaskit/icon/core/migration/delete--editor-remove';
10
10
  import TextWrapIcon from '@atlaskit/icon/core/text-wrap';
11
11
  import { fg } from '@atlaskit/platform-feature-flags';
12
- import { changeLanguage, copyContentToClipboard, copyContentToClipboardWithAnalytics, removeCodeBlock, removeCodeBlockWithAnalytics, resetCopiedState, toggleWordWrapStateForCodeBlockNode } from '../editor-commands';
12
+ import { changeLanguage, copyContentToClipboardWithAnalytics, removeCodeBlockWithAnalytics, resetCopiedState, toggleWordWrapStateForCodeBlockNode } from '../editor-commands';
13
13
  import { WrapIcon } from '../ui/icons/WrapIcon';
14
14
  import { provideVisualFeedbackForCopyButton, removeVisualFeedbackForCopyButton } from './codeBlockCopySelectionPlugin';
15
15
  import { createLanguageList, DEFAULT_LANGUAGES, getLanguageIdentifier } from './language-list';
@@ -76,9 +76,9 @@ export var getToolbarConfig = function getToolbarConfig() {
76
76
  supportsViewMode: true,
77
77
  appearance: 'subtle',
78
78
  icon: CopyIcon,
79
- // note: copyContentToClipboard contains logic that also removes the
79
+ // note: copyContentToClipboardWithAnalytics contains logic that also removes the
80
80
  // visual feedback for the copy button
81
- onClick: fg('platform_editor_controls_patch_analytics_2') ? copyContentToClipboardWithAnalytics(editorAnalyticsAPI) : copyContentToClipboard,
81
+ onClick: copyContentToClipboardWithAnalytics(editorAnalyticsAPI),
82
82
  title: formatMessage(codeBlockState.contentCopied ? codeBlockButtonMessages.copiedCodeToClipboard : codeBlockButtonMessages.copyCodeToClipboard),
83
83
  onMouseEnter: provideVisualFeedbackForCopyButton,
84
84
  // note: resetCopiedState contains logic that also removes the
@@ -100,7 +100,7 @@ export var getToolbarConfig = function getToolbarConfig() {
100
100
  onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false),
101
101
  onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true),
102
102
  onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false),
103
- onClick: fg('platform_editor_controls_patch_analytics_2') ? removeCodeBlockWithAnalytics(editorAnalyticsAPI) : removeCodeBlock,
103
+ onClick: removeCodeBlockWithAnalytics(editorAnalyticsAPI),
104
104
  title: formatMessage(commonMessages.remove),
105
105
  tabIndex: null
106
106
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-code-block",
3
- "version": "4.4.7",
3
+ "version": "4.4.9",
4
4
  "description": "Code block plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,7 +33,7 @@
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^47.6.0",
35
35
  "@atlaskit/code": "^17.2.0",
36
- "@atlaskit/editor-common": "^106.1.0",
36
+ "@atlaskit/editor-common": "^106.5.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^2.3.0",
38
38
  "@atlaskit/editor-plugin-composition": "^1.3.0",
39
39
  "@atlaskit/editor-plugin-decorations": "^2.0.0",
@@ -43,7 +43,7 @@
43
43
  "@atlaskit/icon": "^26.4.0",
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
45
  "@atlaskit/prosemirror-input-rules": "^3.3.0",
46
- "@atlaskit/tmp-editor-statsig": "^5.7.0",
46
+ "@atlaskit/tmp-editor-statsig": "^6.0.0",
47
47
  "@babel/runtime": "^7.0.0"
48
48
  },
49
49
  "peerDependencies": {
@@ -101,9 +101,6 @@
101
101
  "editor_code_wrapping_perf_improvement_ed-25141": {
102
102
  "type": "boolean"
103
103
  },
104
- "platform_editor_controls_patch_analytics_2": {
105
- "type": "boolean"
106
- },
107
104
  "editor_a11y_remove_unwrap_button": {
108
105
  "type": "boolean"
109
106
  },