@atlaskit/smart-card 40.15.0 → 40.15.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,14 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 40.15.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`bfec478c9e91b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bfec478c9e91b) -
8
+ Splits platform_editor_preview_panel_linking_exp into one for Jira and one for Confluence and
9
+ switches to editorExperiment util.
10
+ - Updated dependencies
11
+
3
12
  ## 40.15.0
4
13
 
5
14
  ### Minor Changes
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
11
11
  var context = exports.context = {
12
12
  componentName: 'smart-cards',
13
13
  packageName: "@atlaskit/smart-card",
14
- packageVersion: "40.14.1"
14
+ packageVersion: "40.15.0"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -9,7 +9,7 @@ exports.CardWithUrlContent = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _analyticsNext = require("@atlaskit/analytics-next");
11
11
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
12
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
13
13
  var _useAnalyticsEvents2 = require("../../common/analytics/generated/use-analytics-events");
14
14
  var _constants = require("../../constants");
15
15
  var _state = require("../../state");
@@ -117,7 +117,9 @@ function Component(_ref) {
117
117
  }
118
118
  }
119
119
  }
120
- var isDisablePreviewPanel = disablePreviewPanel && (0, _expValEquals.expValEquals)('platform_editor_preview_panel_linking_exp', 'isEnabled', true);
120
+ var isDisablePreviewPanel = disablePreviewPanel && (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true, {
121
+ exposure: true
122
+ });
121
123
 
122
124
  // If preview panel is available and the user clicked on the link,
123
125
  // delegate the click to the preview panel handler
@@ -11,7 +11,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
11
11
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
12
12
  var _react = _interopRequireWildcard(require("react"));
13
13
  var _popup = _interopRequireDefault(require("@atlaskit/popup"));
14
- var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
14
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
15
15
  var _constants = require("../../../constants");
16
16
  var _actions = require("../../../state/actions");
17
17
  var _renderers = require("../../../state/renderers");
@@ -215,7 +215,7 @@ var HoverCardComponent = exports.HoverCardComponent = function HoverCardComponen
215
215
  onClick: onChildClick,
216
216
  onContextMenu: onContextMenuClick,
217
217
  "data-testid": HOVER_CARD_TRIGGER_WRAPPER
218
- }, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_preview_panel_linking_exp', 'isEnabled', true) ? {
218
+ }, (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true) ? {
219
219
  className: HOVER_CARD_TRIGGER_WRAPPER
220
220
  } : {}), children));
221
221
  }, [children, initHideCard, initShowCard, onChildClick, onContextMenuClick, setMousePosition]);
@@ -19,7 +19,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
19
19
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
20
20
  var PACKAGE_DATA = {
21
21
  packageName: "@atlaskit/smart-card",
22
- packageVersion: "40.14.1",
22
+ packageVersion: "40.15.0",
23
23
  componentName: 'linkUrl'
24
24
  };
25
25
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
2
2
  export const context = {
3
3
  componentName: 'smart-cards',
4
4
  packageName: "@atlaskit/smart-card",
5
- packageVersion: "40.14.1"
5
+ packageVersion: "40.15.0"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,7 +1,7 @@
1
1
  import React, { useCallback, useEffect, useMemo } from 'react';
2
2
  import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/analytics-next';
3
3
  import { fg } from '@atlaskit/platform-feature-flags';
4
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
5
5
  import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
6
6
  import { CardDisplay } from '../../constants';
7
7
  import { useSmartLink } from '../../state';
@@ -110,7 +110,9 @@ function Component({
110
110
  }
111
111
  }
112
112
  }
113
- const isDisablePreviewPanel = disablePreviewPanel && expValEquals('platform_editor_preview_panel_linking_exp', 'isEnabled', true);
113
+ const isDisablePreviewPanel = disablePreviewPanel && editorExperiment('platform_editor_preview_panel_linking_exp', true, {
114
+ exposure: true
115
+ });
114
116
 
115
117
  // If preview panel is available and the user clicked on the link,
116
118
  // delegate the click to the preview panel handler
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useCallback, useEffect, useRef } from 'react';
3
3
  import Popup from '@atlaskit/popup';
4
- import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
4
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
5
5
  import { ActionName, CardDisplay } from '../../../constants';
6
6
  import { useSmartCardActions } from '../../../state/actions';
7
7
  import { useSmartLinkRenderers } from '../../../state/renderers';
@@ -192,7 +192,7 @@ export const HoverCardComponent = ({
192
192
  onClick: onChildClick,
193
193
  onContextMenu: onContextMenuClick,
194
194
  "data-testid": HOVER_CARD_TRIGGER_WRAPPER
195
- }, expValEqualsNoExposure('platform_editor_preview_panel_linking_exp', 'isEnabled', true) ? {
195
+ }, editorExperiment('platform_editor_preview_panel_linking_exp', true) ? {
196
196
  className: HOVER_CARD_TRIGGER_WRAPPER
197
197
  } : {}), children)), [children, initHideCard, initShowCard, onChildClick, onContextMenuClick, setMousePosition]);
198
198
  return /*#__PURE__*/React.createElement(Popup, {
@@ -9,7 +9,7 @@ import LinkWarningModal from './LinkWarningModal';
9
9
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
10
10
  const PACKAGE_DATA = {
11
11
  packageName: "@atlaskit/smart-card",
12
- packageVersion: "40.14.1",
12
+ packageVersion: "40.15.0",
13
13
  componentName: 'linkUrl'
14
14
  };
15
15
  const Anchor = withLinkClickedEvent('a');
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
4
4
  export var context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card",
7
- packageVersion: "40.14.1"
7
+ packageVersion: "40.15.0"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,7 +1,7 @@
1
1
  import React, { useCallback, useEffect, useMemo } from 'react';
2
2
  import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/analytics-next';
3
3
  import { fg } from '@atlaskit/platform-feature-flags';
4
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
5
5
  import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
6
6
  import { CardDisplay } from '../../constants';
7
7
  import { useSmartLink } from '../../state';
@@ -108,7 +108,9 @@ function Component(_ref) {
108
108
  }
109
109
  }
110
110
  }
111
- var isDisablePreviewPanel = disablePreviewPanel && expValEquals('platform_editor_preview_panel_linking_exp', 'isEnabled', true);
111
+ var isDisablePreviewPanel = disablePreviewPanel && editorExperiment('platform_editor_preview_panel_linking_exp', true, {
112
+ exposure: true
113
+ });
112
114
 
113
115
  // If preview panel is available and the user clicked on the link,
114
116
  // delegate the click to the preview panel handler
@@ -4,7 +4,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  var _excluded = ["aria-haspopup", "aria-expanded"];
5
5
  import React, { useCallback, useEffect, useRef } from 'react';
6
6
  import Popup from '@atlaskit/popup';
7
- import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
7
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
8
8
  import { ActionName, CardDisplay } from '../../../constants';
9
9
  import { useSmartCardActions } from '../../../state/actions';
10
10
  import { useSmartLinkRenderers } from '../../../state/renderers';
@@ -206,7 +206,7 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
206
206
  onClick: onChildClick,
207
207
  onContextMenu: onContextMenuClick,
208
208
  "data-testid": HOVER_CARD_TRIGGER_WRAPPER
209
- }, expValEqualsNoExposure('platform_editor_preview_panel_linking_exp', 'isEnabled', true) ? {
209
+ }, editorExperiment('platform_editor_preview_panel_linking_exp', true) ? {
210
210
  className: HOVER_CARD_TRIGGER_WRAPPER
211
211
  } : {}), children));
212
212
  }, [children, initHideCard, initShowCard, onChildClick, onContextMenuClick, setMousePosition]);
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
12
12
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
13
13
  var PACKAGE_DATA = {
14
14
  packageName: "@atlaskit/smart-card",
15
- packageVersion: "40.14.1",
15
+ packageVersion: "40.15.0",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  var Anchor = withLinkClickedEvent('a');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "40.15.0",
3
+ "version": "40.15.1",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -68,7 +68,7 @@
68
68
  "@atlaskit/textarea": "^8.0.0",
69
69
  "@atlaskit/textfield": "^8.0.0",
70
70
  "@atlaskit/theme": "^20.0.0",
71
- "@atlaskit/tmp-editor-statsig": "^11.9.0",
71
+ "@atlaskit/tmp-editor-statsig": "^11.10.0",
72
72
  "@atlaskit/tokens": "^6.1.0",
73
73
  "@atlaskit/tooltip": "^20.4.0",
74
74
  "@atlaskit/ufo": "^0.4.0",