@atlaskit/editor-plugin-card 32.0.0 → 32.1.0

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,22 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 32.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`dd269d6b8b56d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/dd269d6b8b56d) -
8
+ Add optional `experimentalConfigurationOptions?: Record<string, boolean>` to `CardOptions` from
9
+ `@atlaskit/editor-common/card/cardOptions`, inherited by `@atlaskit/editor-plugin-card` options.
10
+
11
+ Setting `platform_sl_3p_preauth_value_modal_killswitch` to `false` in these options prevents the
12
+ editor from mounting the pre-auth modal listener. A value of `true`, an omitted key, or omitted
13
+ options preserve existing eligibility and rollout behavior; they do not override the kill switch
14
+ or experiment allocation. Unrelated keys are ignored by this feature.
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+
3
20
  ## 32.0.0
4
21
 
5
22
  ### Patch Changes
@@ -167,6 +167,7 @@ var cardPlugin = exports.cardPlugin = function cardPlugin(_ref2) {
167
167
  return plugins;
168
168
  },
169
169
  contentComponent: function contentComponent(_ref5) {
170
+ var _options$experimental;
170
171
  var editorView = _ref5.editorView,
171
172
  popupsMountPoint = _ref5.popupsMountPoint,
172
173
  popupsScrollableElement = _ref5.popupsScrollableElement,
@@ -176,7 +177,10 @@ var cardPlugin = exports.cardPlugin = function cardPlugin(_ref2) {
176
177
  }
177
178
  editorViewForPasteMenu = editorView;
178
179
  var breakoutEnabled = options.editorAppearance === 'full-page';
179
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (0, _fg.fg)('platform_sl_3p_preauth_value_modal_killswitch') ? /*#__PURE__*/_react.default.createElement(_PreAuthValuePropositionModal.PreAuthValuePropositionModalListener, {
180
+ var isPreAuthModalOptedOut = ((_options$experimental = options.experimentalConfigurationOptions) === null || _options$experimental === void 0 ? void 0 : _options$experimental.platform_sl_3p_preauth_value_modal_killswitch) === false;
181
+ var isPreAuthModalKillswitchEnabled = (0, _fg.fg)('platform_sl_3p_preauth_value_modal_killswitch');
182
+ var shouldRenderPreAuthValuePropositionModal = !isPreAuthModalOptedOut && isPreAuthModalKillswitchEnabled;
183
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, shouldRenderPreAuthValuePropositionModal ? /*#__PURE__*/_react.default.createElement(_PreAuthValuePropositionModal.PreAuthValuePropositionModalListener, {
180
184
  api: api,
181
185
  cardPluginEvents: cardPluginEvents
182
186
  }) : null, shouldRegisterPasteDisplayAsMenu && /*#__PURE__*/_react.default.createElement(PasteMenuSmartCardClientSync, {
@@ -166,12 +166,16 @@ export const cardPlugin = ({
166
166
  popupsScrollableElement,
167
167
  popupsBoundariesElement
168
168
  }) {
169
+ var _options$experimental;
169
170
  if (!editorView) {
170
171
  return null;
171
172
  }
172
173
  editorViewForPasteMenu = editorView;
173
174
  const breakoutEnabled = options.editorAppearance === 'full-page';
174
- return /*#__PURE__*/React.createElement(React.Fragment, null, fg('platform_sl_3p_preauth_value_modal_killswitch') ? /*#__PURE__*/React.createElement(PreAuthValuePropositionModalListener, {
175
+ const isPreAuthModalOptedOut = ((_options$experimental = options.experimentalConfigurationOptions) === null || _options$experimental === void 0 ? void 0 : _options$experimental.platform_sl_3p_preauth_value_modal_killswitch) === false;
176
+ const isPreAuthModalKillswitchEnabled = fg('platform_sl_3p_preauth_value_modal_killswitch');
177
+ const shouldRenderPreAuthValuePropositionModal = !isPreAuthModalOptedOut && isPreAuthModalKillswitchEnabled;
178
+ return /*#__PURE__*/React.createElement(React.Fragment, null, shouldRenderPreAuthValuePropositionModal ? /*#__PURE__*/React.createElement(PreAuthValuePropositionModalListener, {
175
179
  api: api,
176
180
  cardPluginEvents: cardPluginEvents
177
181
  }) : null, shouldRegisterPasteDisplayAsMenu && /*#__PURE__*/React.createElement(PasteMenuSmartCardClientSync, {
@@ -159,6 +159,7 @@ export var cardPlugin = function cardPlugin(_ref2) {
159
159
  return plugins;
160
160
  },
161
161
  contentComponent: function contentComponent(_ref5) {
162
+ var _options$experimental;
162
163
  var editorView = _ref5.editorView,
163
164
  popupsMountPoint = _ref5.popupsMountPoint,
164
165
  popupsScrollableElement = _ref5.popupsScrollableElement,
@@ -168,7 +169,10 @@ export var cardPlugin = function cardPlugin(_ref2) {
168
169
  }
169
170
  editorViewForPasteMenu = editorView;
170
171
  var breakoutEnabled = options.editorAppearance === 'full-page';
171
- return /*#__PURE__*/React.createElement(React.Fragment, null, fg('platform_sl_3p_preauth_value_modal_killswitch') ? /*#__PURE__*/React.createElement(PreAuthValuePropositionModalListener, {
172
+ var isPreAuthModalOptedOut = ((_options$experimental = options.experimentalConfigurationOptions) === null || _options$experimental === void 0 ? void 0 : _options$experimental.platform_sl_3p_preauth_value_modal_killswitch) === false;
173
+ var isPreAuthModalKillswitchEnabled = fg('platform_sl_3p_preauth_value_modal_killswitch');
174
+ var shouldRenderPreAuthValuePropositionModal = !isPreAuthModalOptedOut && isPreAuthModalKillswitchEnabled;
175
+ return /*#__PURE__*/React.createElement(React.Fragment, null, shouldRenderPreAuthValuePropositionModal ? /*#__PURE__*/React.createElement(PreAuthValuePropositionModalListener, {
172
176
  api: api,
173
177
  cardPluginEvents: cardPluginEvents
174
178
  }) : null, shouldRegisterPasteDisplayAsMenu && /*#__PURE__*/React.createElement(PasteMenuSmartCardClientSync, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "32.0.0",
3
+ "version": "32.1.0",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -64,7 +64,7 @@
64
64
  "@atlaskit/primitives": "^22.5.0",
65
65
  "@atlaskit/prosemirror-history": "^1.3.0",
66
66
  "@atlaskit/smart-card": "^46.5.0",
67
- "@atlaskit/tmp-editor-statsig": "^227.0.0",
67
+ "@atlaskit/tmp-editor-statsig": "^228.0.0",
68
68
  "@atlaskit/tokens": "^20.4.0",
69
69
  "@babel/runtime": "^7.0.0",
70
70
  "@emotion/react": "^11.7.1",
@@ -74,7 +74,7 @@
74
74
  "uuid": "^11.1.1"
75
75
  },
76
76
  "peerDependencies": {
77
- "@atlaskit/editor-common": "^130.0.0",
77
+ "@atlaskit/editor-common": "^130.1.0",
78
78
  "@atlaskit/link-provider": "^6.0.0",
79
79
  "react": "^18.2.0 || ^19.2.0",
80
80
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"