@atlaskit/editor-plugin-card 16.0.0 → 16.0.2

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-card
2
2
 
3
+ ## 16.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 16.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`3e5cf48f0f52f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3e5cf48f0f52f) -
14
+ Replace `cc_dnd_smart_link_changeboard_po_template_gate` feature gate with
15
+ `cc_dnd_smart_link_changeboard_po_template` experiment using `expValNoExposure`.
16
+ - Updated dependencies
17
+
3
18
  ## 16.0.0
4
19
 
5
20
  ### Major Changes
@@ -21,6 +21,7 @@ var _smartCard = require("@atlaskit/smart-card");
21
21
  var _ssr = require("@atlaskit/smart-card/ssr");
22
22
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
23
23
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
24
+ var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
24
25
  var _actions = require("../pm-plugins/actions");
25
26
  var _utils = require("../pm-plugins/utils");
26
27
  var _toolbar = require("../ui/toolbar");
@@ -202,7 +203,7 @@ function InlineCardNodeView(props) {
202
203
  isPageSSRed = props.isPageSSRed,
203
204
  provider = props.provider,
204
205
  CompetitorPrompt = props.CompetitorPrompt;
205
- var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(pluginInjectionApi, (0, _platformFeatureFlags.fg)('cc_dnd_smart_link_changeboard_po_template_gate') ? ['editorViewMode', 'card'] : ['editorViewMode'], (0, _platformFeatureFlags.fg)('cc_dnd_smart_link_changeboard_po_template_gate') ? selectorWithCard : selectorWithoutCard),
206
+ var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(pluginInjectionApi, (0, _expVal.expValNoExposure)('cc_dnd_smart_link_changeboard_po_template', 'isEnabled', false) && (0, _platformFeatureFlags.fg)('cc_drag_and_drop_smart_link_from_content_to_tree') ? ['editorViewMode', 'card'] : ['editorViewMode'], (0, _expVal.expValNoExposure)('cc_dnd_smart_link_changeboard_po_template', 'isEnabled', false) && (0, _platformFeatureFlags.fg)('cc_drag_and_drop_smart_link_from_content_to_tree') ? selectorWithCard : selectorWithoutCard),
206
207
  mode = _useSharedPluginState.mode,
207
208
  resolvedInlineSmartLinks = _useSharedPluginState.resolvedInlineSmartLinks;
208
209
  var url = node.attrs.url;
@@ -15,6 +15,7 @@ var _state = require("@atlaskit/editor-prosemirror/state");
15
15
  var _utils = require("@atlaskit/editor-prosemirror/utils");
16
16
  var _linkingCommon = require("@atlaskit/linking-common");
17
17
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
+ var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
18
19
  var _inlineCard = require("../nodeviews/inlineCard");
19
20
  var _lazyBlockCard = require("../nodeviews/lazy-block-card");
20
21
  var _lazyEmbedCard = require("../nodeviews/lazy-embed-card");
@@ -124,7 +125,7 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pluginI
124
125
  var newState = (0, _reducers.default)(pluginStateWithUpdatedPos, meta);
125
126
 
126
127
  // Track the first resolved inline smart link for PO spotlight DOM targeting
127
- if (meta.type === 'RESOLVE' && pluginState !== null && pluginState !== void 0 && (_pluginState$requests = pluginState.requests) !== null && _pluginState$requests !== void 0 && _pluginState$requests.length && (0, _platformFeatureFlags.fg)('cc_dnd_smart_link_changeboard_po_template_gate')) {
128
+ if (meta.type === 'RESOLVE' && pluginState !== null && pluginState !== void 0 && (_pluginState$requests = pluginState.requests) !== null && _pluginState$requests !== void 0 && _pluginState$requests.length && (0, _expVal.expValNoExposure)('cc_dnd_smart_link_changeboard_po_template', 'isEnabled', false) && (0, _platformFeatureFlags.fg)('cc_drag_and_drop_smart_link_from_content_to_tree')) {
128
129
  var resolvedRequest = pluginState.requests.find(function (req) {
129
130
  return req.url === meta.url;
130
131
  });
@@ -12,6 +12,7 @@ import { Card as SmartCard } from '@atlaskit/smart-card';
12
12
  import { CardSSR } from '@atlaskit/smart-card/ssr';
13
13
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
14
14
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
15
+ import { expValNoExposure } from '@atlaskit/tmp-editor-statsig/expVal';
15
16
  import { registerCard, removeCard } from '../pm-plugins/actions';
16
17
  import { getAwarenessProps } from '../pm-plugins/utils';
17
18
  import { visitCardLinkAnalytics } from '../ui/toolbar';
@@ -203,7 +204,7 @@ export function InlineCardNodeView(props) {
203
204
  const {
204
205
  mode,
205
206
  resolvedInlineSmartLinks
206
- } = useSharedPluginStateWithSelector(pluginInjectionApi, fg('cc_dnd_smart_link_changeboard_po_template_gate') ? ['editorViewMode', 'card'] : ['editorViewMode'], fg('cc_dnd_smart_link_changeboard_po_template_gate') ? selectorWithCard : selectorWithoutCard);
207
+ } = useSharedPluginStateWithSelector(pluginInjectionApi, expValNoExposure('cc_dnd_smart_link_changeboard_po_template', 'isEnabled', false) && fg('cc_drag_and_drop_smart_link_from_content_to_tree') ? ['editorViewMode', 'card'] : ['editorViewMode'], expValNoExposure('cc_dnd_smart_link_changeboard_po_template', 'isEnabled', false) && fg('cc_drag_and_drop_smart_link_from_content_to_tree') ? selectorWithCard : selectorWithoutCard);
207
208
  const url = node.attrs.url;
208
209
  const CompetitorPromptComponent = CompetitorPrompt && url ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
209
210
  sourceUrl: url,
@@ -6,6 +6,7 @@ import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
6
6
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
7
7
  import { DATASOURCE_DEFAULT_LAYOUT } from '@atlaskit/linking-common';
8
8
  import { fg } from '@atlaskit/platform-feature-flags';
9
+ import { expValNoExposure } from '@atlaskit/tmp-editor-statsig/expVal';
9
10
  import { InlineCardNodeView } from '../nodeviews/inlineCard';
10
11
  import { lazyBlockCardView } from '../nodeviews/lazy-block-card';
11
12
  import { lazyEmbedCardView } from '../nodeviews/lazy-embed-card';
@@ -115,7 +116,7 @@ export const createPlugin = (options, pluginInjectionApi) => pmPluginFactoryPara
115
116
  const newState = reducer(pluginStateWithUpdatedPos, meta);
116
117
 
117
118
  // Track the first resolved inline smart link for PO spotlight DOM targeting
118
- if (meta.type === 'RESOLVE' && pluginState !== null && pluginState !== void 0 && (_pluginState$requests = pluginState.requests) !== null && _pluginState$requests !== void 0 && _pluginState$requests.length && fg('cc_dnd_smart_link_changeboard_po_template_gate')) {
119
+ if (meta.type === 'RESOLVE' && pluginState !== null && pluginState !== void 0 && (_pluginState$requests = pluginState.requests) !== null && _pluginState$requests !== void 0 && _pluginState$requests.length && expValNoExposure('cc_dnd_smart_link_changeboard_po_template', 'isEnabled', false) && fg('cc_drag_and_drop_smart_link_from_content_to_tree')) {
119
120
  const resolvedRequest = pluginState.requests.find(req => req.url === meta.url);
120
121
  if ((resolvedRequest === null || resolvedRequest === void 0 ? void 0 : resolvedRequest.appearance) === 'inline') {
121
122
  var _newState$resolvedInl, _newState$resolvedInl2;
@@ -12,6 +12,7 @@ import { Card as SmartCard } from '@atlaskit/smart-card';
12
12
  import { CardSSR } from '@atlaskit/smart-card/ssr';
13
13
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
14
14
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
15
+ import { expValNoExposure } from '@atlaskit/tmp-editor-statsig/expVal';
15
16
  import { registerCard, removeCard } from '../pm-plugins/actions';
16
17
  import { getAwarenessProps } from '../pm-plugins/utils';
17
18
  import { visitCardLinkAnalytics } from '../ui/toolbar';
@@ -190,7 +191,7 @@ export function InlineCardNodeView(props) {
190
191
  isPageSSRed = props.isPageSSRed,
191
192
  provider = props.provider,
192
193
  CompetitorPrompt = props.CompetitorPrompt;
193
- var _useSharedPluginState = useSharedPluginStateWithSelector(pluginInjectionApi, fg('cc_dnd_smart_link_changeboard_po_template_gate') ? ['editorViewMode', 'card'] : ['editorViewMode'], fg('cc_dnd_smart_link_changeboard_po_template_gate') ? selectorWithCard : selectorWithoutCard),
194
+ var _useSharedPluginState = useSharedPluginStateWithSelector(pluginInjectionApi, expValNoExposure('cc_dnd_smart_link_changeboard_po_template', 'isEnabled', false) && fg('cc_drag_and_drop_smart_link_from_content_to_tree') ? ['editorViewMode', 'card'] : ['editorViewMode'], expValNoExposure('cc_dnd_smart_link_changeboard_po_template', 'isEnabled', false) && fg('cc_drag_and_drop_smart_link_from_content_to_tree') ? selectorWithCard : selectorWithoutCard),
194
195
  mode = _useSharedPluginState.mode,
195
196
  resolvedInlineSmartLinks = _useSharedPluginState.resolvedInlineSmartLinks;
196
197
  var url = node.attrs.url;
@@ -10,6 +10,7 @@ import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
10
10
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
11
11
  import { DATASOURCE_DEFAULT_LAYOUT } from '@atlaskit/linking-common';
12
12
  import { fg } from '@atlaskit/platform-feature-flags';
13
+ import { expValNoExposure } from '@atlaskit/tmp-editor-statsig/expVal';
13
14
  import { InlineCardNodeView } from '../nodeviews/inlineCard';
14
15
  import { lazyBlockCardView } from '../nodeviews/lazy-block-card';
15
16
  import { lazyEmbedCardView } from '../nodeviews/lazy-embed-card';
@@ -117,7 +118,7 @@ export var createPlugin = function createPlugin(options, pluginInjectionApi) {
117
118
  var newState = reducer(pluginStateWithUpdatedPos, meta);
118
119
 
119
120
  // Track the first resolved inline smart link for PO spotlight DOM targeting
120
- if (meta.type === 'RESOLVE' && pluginState !== null && pluginState !== void 0 && (_pluginState$requests = pluginState.requests) !== null && _pluginState$requests !== void 0 && _pluginState$requests.length && fg('cc_dnd_smart_link_changeboard_po_template_gate')) {
121
+ if (meta.type === 'RESOLVE' && pluginState !== null && pluginState !== void 0 && (_pluginState$requests = pluginState.requests) !== null && _pluginState$requests !== void 0 && _pluginState$requests.length && expValNoExposure('cc_dnd_smart_link_changeboard_po_template', 'isEnabled', false) && fg('cc_drag_and_drop_smart_link_from_content_to_tree')) {
121
122
  var resolvedRequest = pluginState.requests.find(function (req) {
122
123
  return req.url === meta.url;
123
124
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "16.0.0",
3
+ "version": "16.0.2",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -60,8 +60,8 @@
60
60
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
61
61
  "@atlaskit/primitives": "^19.0.0",
62
62
  "@atlaskit/prosemirror-history": "^0.2.0",
63
- "@atlaskit/smart-card": "^44.0.0",
64
- "@atlaskit/tmp-editor-statsig": "^62.4.0",
63
+ "@atlaskit/smart-card": "^44.1.0",
64
+ "@atlaskit/tmp-editor-statsig": "^63.0.0",
65
65
  "@atlaskit/tokens": "^13.0.0",
66
66
  "@babel/runtime": "^7.0.0",
67
67
  "@emotion/react": "^11.7.1",
@@ -71,7 +71,7 @@
71
71
  "uuid": "^3.1.0"
72
72
  },
73
73
  "peerDependencies": {
74
- "@atlaskit/editor-common": "^114.0.0",
74
+ "@atlaskit/editor-common": "^114.2.0",
75
75
  "@atlaskit/link-provider": "^4.3.0",
76
76
  "react": "^18.2.0",
77
77
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
@@ -113,9 +113,6 @@
113
113
  "cc_drag_and_drop_smart_link_from_content_to_tree": {
114
114
  "type": "boolean"
115
115
  },
116
- "cc_dnd_smart_link_changeboard_po_template_gate": {
117
- "type": "boolean"
118
- },
119
116
  "confluence-issue-terminology-refresh": {
120
117
  "type": "boolean"
121
118
  },