@atlaskit/editor-plugin-extension 29.0.7 → 30.0.1

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,24 @@
1
1
  # @atlaskit/editor-plugin-extension
2
2
 
3
+ ## 30.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`cf556f7194a5f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cf556f7194a5f) -
8
+ Always honor extension copy and delete toolbar options after the flag rollout.
9
+
10
+ ## 30.0.0
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
16
+ ## 29.0.8
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
3
22
  ## 29.0.7
4
23
 
5
24
  ### Patch Changes
@@ -400,12 +400,8 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(_ref
400
400
  // (`copyEnabled`), when the extension's manifest node opts out via
401
401
  // `hideCopyButton` (e.g. redactions), or for the legacy content macro.
402
402
  //
403
- // The host check is deliberately evaluated before the gate, so the gate is
404
- // only read — and so only exposed — for hosts that opted in. Reading it
405
- // unconditionally would report an exposure on every extension toolbar in
406
- // every product, drowning the rollout metric in traffic it cannot affect.
407
- var shouldHideCopyButton = !copyEnabled && (0, _fg.fg)('platform_editor_extension_hide_toolbar_actions') || !extensionState.showCopyButton && (0, _fg.fg)('platform_editor_extension_hide_copy_button') || (extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node.attrs.extensionType) === 'com.atlassian.confluence.migration' && (extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node.attrs.extensionKey) === 'legacy-content';
408
- var shouldHideDeleteButton = !deleteEnabled && (0, _fg.fg)('platform_editor_extension_hide_toolbar_actions');
403
+ var shouldHideCopyButton = !copyEnabled || !extensionState.showCopyButton && (0, _fg.fg)('platform_editor_extension_hide_copy_button') || (extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node.attrs.extensionType) === 'com.atlassian.confluence.migration' && (extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node.attrs.extensionKey) === 'legacy-content';
404
+ var shouldHideDeleteButton = !deleteEnabled;
409
405
  // With both trailing actions gone the toolbar ends after the breakout
410
406
  // options, so the divider that used to introduce them would be an orphan.
411
407
  var hasTrailingActions = !shouldHideCopyButton || !shouldHideDeleteButton;
@@ -399,12 +399,8 @@ export const getToolbarConfig = ({
399
399
  // (`copyEnabled`), when the extension's manifest node opts out via
400
400
  // `hideCopyButton` (e.g. redactions), or for the legacy content macro.
401
401
  //
402
- // The host check is deliberately evaluated before the gate, so the gate is
403
- // only read — and so only exposed — for hosts that opted in. Reading it
404
- // unconditionally would report an exposure on every extension toolbar in
405
- // every product, drowning the rollout metric in traffic it cannot affect.
406
- const shouldHideCopyButton = !copyEnabled && fg('platform_editor_extension_hide_toolbar_actions') || !extensionState.showCopyButton && fg('platform_editor_extension_hide_copy_button') || (extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node.attrs.extensionType) === 'com.atlassian.confluence.migration' && (extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node.attrs.extensionKey) === 'legacy-content';
407
- const shouldHideDeleteButton = !deleteEnabled && fg('platform_editor_extension_hide_toolbar_actions');
402
+ const shouldHideCopyButton = !copyEnabled || !extensionState.showCopyButton && fg('platform_editor_extension_hide_copy_button') || (extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node.attrs.extensionType) === 'com.atlassian.confluence.migration' && (extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node.attrs.extensionKey) === 'legacy-content';
403
+ const shouldHideDeleteButton = !deleteEnabled;
408
404
  // With both trailing actions gone the toolbar ends after the breakout
409
405
  // options, so the divider that used to introduce them would be an orphan.
410
406
  const hasTrailingActions = !shouldHideCopyButton || !shouldHideDeleteButton;
@@ -394,12 +394,8 @@ export var getToolbarConfig = function getToolbarConfig(_ref2) {
394
394
  // (`copyEnabled`), when the extension's manifest node opts out via
395
395
  // `hideCopyButton` (e.g. redactions), or for the legacy content macro.
396
396
  //
397
- // The host check is deliberately evaluated before the gate, so the gate is
398
- // only read — and so only exposed — for hosts that opted in. Reading it
399
- // unconditionally would report an exposure on every extension toolbar in
400
- // every product, drowning the rollout metric in traffic it cannot affect.
401
- var shouldHideCopyButton = !copyEnabled && fg('platform_editor_extension_hide_toolbar_actions') || !extensionState.showCopyButton && fg('platform_editor_extension_hide_copy_button') || (extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node.attrs.extensionType) === 'com.atlassian.confluence.migration' && (extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node.attrs.extensionKey) === 'legacy-content';
402
- var shouldHideDeleteButton = !deleteEnabled && fg('platform_editor_extension_hide_toolbar_actions');
397
+ var shouldHideCopyButton = !copyEnabled || !extensionState.showCopyButton && fg('platform_editor_extension_hide_copy_button') || (extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node.attrs.extensionType) === 'com.atlassian.confluence.migration' && (extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node.attrs.extensionKey) === 'legacy-content';
398
+ var shouldHideDeleteButton = !deleteEnabled;
403
399
  // With both trailing actions gone the toolbar ends after the breakout
404
400
  // options, so the divider that used to introduce them would be an orphan.
405
401
  var hasTrailingActions = !shouldHideCopyButton || !shouldHideDeleteButton;
@@ -72,17 +72,13 @@ export interface ExtensionPluginOptions extends LongPressSelectionPluginOptions
72
72
  * `true`. Set `false` for content whose structure the product fixes, so the
73
73
  * toolbar does not offer an action the document will refuse.
74
74
  *
75
- * Gated on `platform_editor_extension_hide_toolbar_actions`: until that gate
76
- * is on, setting this has no effect.
77
- *
78
75
  * For hiding copy on a single extension type instead, use the manifest node's
79
76
  * `hideCopyButton`, which is not gated on the above.
80
77
  */
81
78
  copyEnabled?: boolean;
82
79
  /**
83
80
  * Whether the extension floating toolbar offers a delete button. Defaults to
84
- * `true`, and gated on `platform_editor_extension_hide_toolbar_actions` the
85
- * same way `copyEnabled` is.
81
+ * `true`. Set `false` to hide the action for content whose structure the product fixes.
86
82
  */
87
83
  deleteEnabled?: boolean;
88
84
  extensionHandlers?: ExtensionHandlers;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-extension",
3
- "version": "29.0.7",
3
+ "version": "30.0.1",
4
4
  "description": "editor-plugin-extension plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,17 +36,17 @@
36
36
  "@atlaskit/code": "^20.0.0",
37
37
  "@atlaskit/datetime-picker": "^19.3.0",
38
38
  "@atlaskit/editor-json-transformer": "^10.0.0",
39
- "@atlaskit/editor-plugin-analytics": "^26.0.0",
40
- "@atlaskit/editor-plugin-block-menu": "^25.1.0",
41
- "@atlaskit/editor-plugin-connectivity": "^26.0.0",
42
- "@atlaskit/editor-plugin-context-identifier": "^26.0.0",
43
- "@atlaskit/editor-plugin-context-panel": "^28.0.0",
44
- "@atlaskit/editor-plugin-copy-button": "^26.0.0",
45
- "@atlaskit/editor-plugin-decorations": "^26.0.0",
46
- "@atlaskit/editor-plugin-feature-flags": "^25.0.0",
47
- "@atlaskit/editor-plugin-mentions": "^28.1.0",
48
- "@atlaskit/editor-plugin-toolbar": "^23.0.0",
49
- "@atlaskit/editor-plugin-width": "^27.0.0",
39
+ "@atlaskit/editor-plugin-analytics": "^27.0.0",
40
+ "@atlaskit/editor-plugin-block-menu": "^26.0.0",
41
+ "@atlaskit/editor-plugin-connectivity": "^27.0.0",
42
+ "@atlaskit/editor-plugin-context-identifier": "^27.0.0",
43
+ "@atlaskit/editor-plugin-context-panel": "^29.0.0",
44
+ "@atlaskit/editor-plugin-copy-button": "^27.0.0",
45
+ "@atlaskit/editor-plugin-decorations": "^27.0.0",
46
+ "@atlaskit/editor-plugin-feature-flags": "^26.0.0",
47
+ "@atlaskit/editor-plugin-mentions": "^29.0.0",
48
+ "@atlaskit/editor-plugin-toolbar": "^24.0.0",
49
+ "@atlaskit/editor-plugin-width": "^28.0.0",
50
50
  "@atlaskit/editor-prosemirror": "^9.0.0",
51
51
  "@atlaskit/editor-shared-styles": "^4.4.0",
52
52
  "@atlaskit/editor-tables": "^3.2.0",
@@ -69,9 +69,9 @@
69
69
  "@atlaskit/tabs": "^21.3.0",
70
70
  "@atlaskit/textarea": "^10.2.0",
71
71
  "@atlaskit/textfield": "^10.2.0",
72
- "@atlaskit/tmp-editor-statsig": "^234.0.0",
72
+ "@atlaskit/tmp-editor-statsig": "^235.0.0",
73
73
  "@atlaskit/toggle": "^17.3.0",
74
- "@atlaskit/tokens": "^20.4.0",
74
+ "@atlaskit/tokens": "^20.5.0",
75
75
  "@atlaskit/tooltip": "^24.4.0",
76
76
  "@atlaskit/user-picker": "^14.2.0",
77
77
  "@babel/runtime": "^7.0.0",
@@ -85,7 +85,7 @@
85
85
  "uuid": "^11.1.1"
86
86
  },
87
87
  "peerDependencies": {
88
- "@atlaskit/editor-common": "^130.5.0",
88
+ "@atlaskit/editor-common": "^131.0.0",
89
89
  "react": "^18.2.0 || ^19.2.0",
90
90
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
91
91
  },
@@ -108,9 +108,6 @@
108
108
  },
109
109
  "platform_editor_extension_hide_copy_button": {
110
110
  "type": "boolean"
111
- },
112
- "platform_editor_extension_hide_toolbar_actions": {
113
- "type": "boolean"
114
111
  }
115
112
  }
116
113
  }