@atlaskit/editor-plugin-block-type 3.14.5 → 3.14.6

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,14 @@
1
1
  # @atlaskit/editor-plugin-block-type
2
2
 
3
+ ## 3.14.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#139784](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/139784)
8
+ [`47d08e6f06b2e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/47d08e6f06b2e) -
9
+ [ux] [ED-24861] Toggle between ProseMirror node based on feature gate instead of existing
10
+ experiment for node nesting media and codeblocks in blockquotes.
11
+
3
12
  ## 3.14.5
4
13
 
5
14
  ### Patch Changes
@@ -102,12 +102,11 @@ var blockquotePluginOptions = function blockquotePluginOptions(_ref2, isAllowed,
102
102
  }];
103
103
  };
104
104
  var blockTypePlugin = exports.blockTypePlugin = function blockTypePlugin(_ref3) {
105
- var _api$featureFlags, _api$primaryToolbar;
105
+ var _api$primaryToolbar;
106
106
  var options = _ref3.config,
107
107
  api = _ref3.api;
108
- // Confluence is injecting the FF through editor props, from an experiment
109
- // Jira is pulling it in through platform feature flags, from a feature gate
110
- var isNestingMediaAndCodeblockInQuoteSupported = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 || (_api$featureFlags = _api$featureFlags.sharedState.currentState()) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.nestMediaAndCodeblockInQuote) || (0, _platformFeatureFlags.fg)('editor_nest_media_and_codeblock_in_quotes_jira');
108
+ // Confluence and Jira is pulling it in through platform feature flags, from a feature gate
109
+ var isNestingInQuoteSchemaChanged = (0, _platformFeatureFlags.fg)('platform_editor_nest_in_quotes_adf_change') || (0, _platformFeatureFlags.fg)('editor_nest_media_and_codeblock_in_quotes_jira');
111
110
  var primaryToolbarComponent = function primaryToolbarComponent(_ref4) {
112
111
  var popupsMountPoint = _ref4.popupsMountPoint,
113
112
  popupsBoundariesElement = _ref4.popupsBoundariesElement,
@@ -139,7 +138,7 @@ var blockTypePlugin = exports.blockTypePlugin = function blockTypePlugin(_ref3)
139
138
  node: _adfSchema.heading
140
139
  }, {
141
140
  name: 'blockquote',
142
- node: isNestingMediaAndCodeblockInQuoteSupported ? _adfSchema.blockquoteWithNestedCodeblockOrMedia : _adfSchema.blockquoteWithList
141
+ node: isNestingInQuoteSchemaChanged ? _adfSchema.blockquoteWithNestedCodeblockOrMedia : _adfSchema.blockquoteWithList
143
142
  }, {
144
143
  name: 'hardBreak',
145
144
  node: _adfSchema.hardBreak
@@ -89,10 +89,9 @@ const blockTypePlugin = ({
89
89
  config: options,
90
90
  api
91
91
  }) => {
92
- var _api$featureFlags, _api$featureFlags$sha, _api$primaryToolbar;
93
- // Confluence is injecting the FF through editor props, from an experiment
94
- // Jira is pulling it in through platform feature flags, from a feature gate
95
- const isNestingMediaAndCodeblockInQuoteSupported = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : (_api$featureFlags$sha = _api$featureFlags.sharedState.currentState()) === null || _api$featureFlags$sha === void 0 ? void 0 : _api$featureFlags$sha.nestMediaAndCodeblockInQuote) || fg('editor_nest_media_and_codeblock_in_quotes_jira');
92
+ var _api$primaryToolbar;
93
+ // Confluence and Jira is pulling it in through platform feature flags, from a feature gate
94
+ const isNestingInQuoteSchemaChanged = fg('platform_editor_nest_in_quotes_adf_change') || fg('editor_nest_media_and_codeblock_in_quotes_jira');
96
95
  const primaryToolbarComponent = ({
97
96
  popupsMountPoint,
98
97
  popupsBoundariesElement,
@@ -125,7 +124,7 @@ const blockTypePlugin = ({
125
124
  node: heading
126
125
  }, {
127
126
  name: 'blockquote',
128
- node: isNestingMediaAndCodeblockInQuoteSupported ? blockquoteWithNestedCodeblockOrMedia : blockquoteWithList
127
+ node: isNestingInQuoteSchemaChanged ? blockquoteWithNestedCodeblockOrMedia : blockquoteWithList
129
128
  }, {
130
129
  name: 'hardBreak',
131
130
  node: hardBreak
@@ -89,12 +89,11 @@ var blockquotePluginOptions = function blockquotePluginOptions(_ref2, isAllowed,
89
89
  }];
90
90
  };
91
91
  var blockTypePlugin = function blockTypePlugin(_ref3) {
92
- var _api$featureFlags, _api$primaryToolbar;
92
+ var _api$primaryToolbar;
93
93
  var options = _ref3.config,
94
94
  api = _ref3.api;
95
- // Confluence is injecting the FF through editor props, from an experiment
96
- // Jira is pulling it in through platform feature flags, from a feature gate
97
- var isNestingMediaAndCodeblockInQuoteSupported = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 || (_api$featureFlags = _api$featureFlags.sharedState.currentState()) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.nestMediaAndCodeblockInQuote) || fg('editor_nest_media_and_codeblock_in_quotes_jira');
95
+ // Confluence and Jira is pulling it in through platform feature flags, from a feature gate
96
+ var isNestingInQuoteSchemaChanged = fg('platform_editor_nest_in_quotes_adf_change') || fg('editor_nest_media_and_codeblock_in_quotes_jira');
98
97
  var primaryToolbarComponent = function primaryToolbarComponent(_ref4) {
99
98
  var popupsMountPoint = _ref4.popupsMountPoint,
100
99
  popupsBoundariesElement = _ref4.popupsBoundariesElement,
@@ -126,7 +125,7 @@ var blockTypePlugin = function blockTypePlugin(_ref3) {
126
125
  node: heading
127
126
  }, {
128
127
  name: 'blockquote',
129
- node: isNestingMediaAndCodeblockInQuoteSupported ? blockquoteWithNestedCodeblockOrMedia : blockquoteWithList
128
+ node: isNestingInQuoteSchemaChanged ? blockquoteWithNestedCodeblockOrMedia : blockquoteWithList
130
129
  }, {
131
130
  name: 'hardBreak',
132
131
  node: hardBreak
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-type",
3
- "version": "3.14.5",
3
+ "version": "3.14.6",
4
4
  "description": "BlockType plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -103,6 +103,9 @@
103
103
  "platform-feature-flags": {
104
104
  "editor_nest_media_and_codeblock_in_quotes_jira": {
105
105
  "type": "boolean"
106
+ },
107
+ "platform_editor_nest_in_quotes_adf_change": {
108
+ "type": "boolean"
106
109
  }
107
110
  }
108
111
  }