@atlaskit/editor-plugin-metrics 4.0.2 → 4.0.3

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,13 @@
1
1
  # @atlaskit/editor-plugin-metrics
2
2
 
3
+ ## 4.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#185723](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/185723)
8
+ [`751aeb4580469`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/751aeb4580469) -
9
+ ED-28315 clean up fg platform_editor_controls_patch_13
10
+
3
11
  ## 4.0.2
4
12
 
5
13
  ### Patch Changes
@@ -61,7 +61,7 @@ var metricsPlugin = exports.metricsPlugin = function metricsPlugin(_ref) {
61
61
  if (pluginState && pluginState.totalActionCount > 0 && pluginState.activeSessionTime > 0) {
62
62
  var _api$analytics;
63
63
  var toolbarDocking;
64
- if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_controls', 'cohort', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_13')) {
64
+ if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_controls', 'cohort', 'variant1')) {
65
65
  var _api$userPreferences, _config$userPreferenc;
66
66
  toolbarDocking = toolbarDocking = (0, _platformFeatureFlags.fg)('platform_editor_use_preferences_plugin') ? api === null || api === void 0 || (_api$userPreferences = api.userPreferences) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.sharedState.currentState()) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.preferences) === null || _api$userPreferences === void 0 ? void 0 : _api$userPreferences.toolbarDockingPosition : config === null || config === void 0 || (_config$userPreferenc = config.userPreferencesProvider) === null || _config$userPreferenc === void 0 ? void 0 : _config$userPreferenc.getPreference('toolbarDockingInitialPosition');
67
67
  }
@@ -9,7 +9,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _bindEventListener = require("bind-event-listener");
10
10
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
11
11
  var _state = require("@atlaskit/editor-prosemirror/state");
12
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
12
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
14
13
  var _activeSessionTimer = require("./utils/active-session-timer");
15
14
  var _analytics = require("./utils/analytics");
@@ -120,7 +119,7 @@ var createPlugin = exports.createPlugin = function createPlugin(api, userPrefere
120
119
  return;
121
120
  }
122
121
  var toolbarDocking;
123
- if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_controls', 'cohort', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_13')) {
122
+ if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_controls', 'cohort', 'variant1')) {
124
123
  toolbarDocking = userPreferencesProvider === null || userPreferencesProvider === void 0 ? void 0 : userPreferencesProvider.getPreference('toolbarDockingInitialPosition');
125
124
  }
126
125
  var payloadToSend = (0, _analytics.getAnalyticsPayload)({
@@ -51,7 +51,7 @@ export const metricsPlugin = ({
51
51
  if (pluginState && pluginState.totalActionCount > 0 && pluginState.activeSessionTime > 0) {
52
52
  var _api$analytics;
53
53
  let toolbarDocking;
54
- if (expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1') && fg('platform_editor_controls_patch_13')) {
54
+ if (expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1')) {
55
55
  var _api$userPreferences, _api$userPreferences$, _api$userPreferences$2, _config$userPreferenc;
56
56
  toolbarDocking = toolbarDocking = fg('platform_editor_use_preferences_plugin') ? api === null || api === void 0 ? void 0 : (_api$userPreferences = api.userPreferences) === null || _api$userPreferences === void 0 ? void 0 : (_api$userPreferences$ = _api$userPreferences.sharedState.currentState()) === null || _api$userPreferences$ === void 0 ? void 0 : (_api$userPreferences$2 = _api$userPreferences$.preferences) === null || _api$userPreferences$2 === void 0 ? void 0 : _api$userPreferences$2.toolbarDockingPosition : config === null || config === void 0 ? void 0 : (_config$userPreferenc = config.userPreferencesProvider) === null || _config$userPreferenc === void 0 ? void 0 : _config$userPreferenc.getPreference('toolbarDockingInitialPosition');
57
57
  }
@@ -1,7 +1,6 @@
1
1
  import { bind } from 'bind-event-listener';
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
4
- import { fg } from '@atlaskit/platform-feature-flags';
5
4
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
6
5
  import { ActiveSessionTimer } from './utils/active-session-timer';
7
6
  import { getAnalyticsPayload } from './utils/analytics';
@@ -115,7 +114,7 @@ export const createPlugin = (api, userPreferencesProvider) => {
115
114
  return;
116
115
  }
117
116
  let toolbarDocking;
118
- if (expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1') && fg('platform_editor_controls_patch_13')) {
117
+ if (expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1')) {
119
118
  toolbarDocking = userPreferencesProvider === null || userPreferencesProvider === void 0 ? void 0 : userPreferencesProvider.getPreference('toolbarDockingInitialPosition');
120
119
  }
121
120
  const payloadToSend = getAnalyticsPayload({
@@ -55,7 +55,7 @@ export var metricsPlugin = function metricsPlugin(_ref) {
55
55
  if (pluginState && pluginState.totalActionCount > 0 && pluginState.activeSessionTime > 0) {
56
56
  var _api$analytics;
57
57
  var toolbarDocking;
58
- if (expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1') && fg('platform_editor_controls_patch_13')) {
58
+ if (expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1')) {
59
59
  var _api$userPreferences, _config$userPreferenc;
60
60
  toolbarDocking = toolbarDocking = fg('platform_editor_use_preferences_plugin') ? api === null || api === void 0 || (_api$userPreferences = api.userPreferences) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.sharedState.currentState()) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.preferences) === null || _api$userPreferences === void 0 ? void 0 : _api$userPreferences.toolbarDockingPosition : config === null || config === void 0 || (_config$userPreferenc = config.userPreferencesProvider) === null || _config$userPreferenc === void 0 ? void 0 : _config$userPreferenc.getPreference('toolbarDockingInitialPosition');
61
61
  }
@@ -4,7 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  import { bind } from 'bind-event-listener';
5
5
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
6
6
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
7
- import { fg } from '@atlaskit/platform-feature-flags';
8
7
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
9
8
  import { ActiveSessionTimer } from './utils/active-session-timer';
10
9
  import { getAnalyticsPayload } from './utils/analytics';
@@ -113,7 +112,7 @@ export var createPlugin = function createPlugin(api, userPreferencesProvider) {
113
112
  return;
114
113
  }
115
114
  var toolbarDocking;
116
- if (expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1') && fg('platform_editor_controls_patch_13')) {
115
+ if (expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1')) {
117
116
  toolbarDocking = userPreferencesProvider === null || userPreferencesProvider === void 0 ? void 0 : userPreferencesProvider.getPreference('toolbarDockingInitialPosition');
118
117
  }
119
118
  var payloadToSend = getAnalyticsPayload({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-metrics",
3
- "version": "4.0.2",
3
+ "version": "4.0.3",
4
4
  "description": "Metrics plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,7 +36,7 @@
36
36
  "@atlaskit/editor-plugin-user-preferences": "^1.1.0",
37
37
  "@atlaskit/editor-prosemirror": "7.0.0",
38
38
  "@atlaskit/platform-feature-flags": "^1.1.0",
39
- "@atlaskit/tmp-editor-statsig": "^9.7.0",
39
+ "@atlaskit/tmp-editor-statsig": "^9.8.0",
40
40
  "@babel/runtime": "^7.0.0",
41
41
  "bind-event-listener": "^3.0.0"
42
42
  },
@@ -85,9 +85,6 @@
85
85
  "platform-feature-flags": {
86
86
  "platform_editor_use_preferences_plugin": {
87
87
  "type": "boolean"
88
- },
89
- "platform_editor_controls_patch_13": {
90
- "type": "boolean"
91
88
  }
92
89
  }
93
90
  }