@atlaskit/editor-plugin-annotation 4.0.3 → 4.0.4

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-annotation
2
2
 
3
+ ## 4.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`db97eb262cc5a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/db97eb262cc5a) -
8
+ replace platform_editor_toolbar_aifc with separate experiements for jira and confluence
9
+ - Updated dependencies
10
+
3
11
  ## 4.0.3
4
12
 
5
13
  ### Patch Changes
@@ -25,7 +25,10 @@ var annotationPlugin = exports.annotationPlugin = function annotationPlugin(_ref
25
25
  var annotationProviders = _ref.config,
26
26
  api = _ref.api;
27
27
  var featureFlags = api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState();
28
- if ((0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc', 'isEnabled', true)) {
28
+ var isToolbarAIFCEnabled = (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true, {
29
+ exposure: true
30
+ });
31
+ if (isToolbarAIFCEnabled) {
29
32
  var _api$toolbar;
30
33
  api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || _api$toolbar.actions.registerComponents((0, _toolbarComponents.getToolbarComponents)(api, annotationProviders));
31
34
  }
@@ -95,7 +98,7 @@ var annotationPlugin = exports.annotationPlugin = function annotationPlugin(_ref
95
98
  }
96
99
  },
97
100
  selectionToolbar: function selectionToolbar(state, intl) {
98
- if ((0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc', 'isEnabled', true)) {
101
+ if (isToolbarAIFCEnabled) {
99
102
  return;
100
103
  }
101
104
  if (!annotationProviders) {
@@ -16,7 +16,10 @@ export const annotationPlugin = ({
16
16
  }) => {
17
17
  var _api$featureFlags, _api$analytics;
18
18
  const featureFlags = api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState();
19
- if (expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true)) {
19
+ const isToolbarAIFCEnabled = editorExperiment('platform_editor_toolbar_aifc', true, {
20
+ exposure: true
21
+ });
22
+ if (isToolbarAIFCEnabled) {
20
23
  var _api$toolbar;
21
24
  api === null || api === void 0 ? void 0 : (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 ? void 0 : _api$toolbar.actions.registerComponents(getToolbarComponents(api, annotationProviders));
22
25
  }
@@ -85,7 +88,7 @@ export const annotationPlugin = ({
85
88
  }
86
89
  },
87
90
  selectionToolbar(state, intl) {
88
- if (expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true)) {
91
+ if (isToolbarAIFCEnabled) {
89
92
  return;
90
93
  }
91
94
  if (!annotationProviders) {
@@ -18,7 +18,10 @@ export var annotationPlugin = function annotationPlugin(_ref) {
18
18
  var annotationProviders = _ref.config,
19
19
  api = _ref.api;
20
20
  var featureFlags = api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState();
21
- if (expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true)) {
21
+ var isToolbarAIFCEnabled = editorExperiment('platform_editor_toolbar_aifc', true, {
22
+ exposure: true
23
+ });
24
+ if (isToolbarAIFCEnabled) {
22
25
  var _api$toolbar;
23
26
  api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || _api$toolbar.actions.registerComponents(getToolbarComponents(api, annotationProviders));
24
27
  }
@@ -88,7 +91,7 @@ export var annotationPlugin = function annotationPlugin(_ref) {
88
91
  }
89
92
  },
90
93
  selectionToolbar: function selectionToolbar(state, intl) {
91
- if (expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true)) {
94
+ if (isToolbarAIFCEnabled) {
92
95
  return;
93
96
  }
94
97
  if (!annotationProviders) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-annotation",
3
- "version": "4.0.3",
3
+ "version": "4.0.4",
4
4
  "description": "Annotation plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -40,12 +40,12 @@
40
40
  "@atlaskit/icon": "^28.1.0",
41
41
  "@atlaskit/onboarding": "^14.4.0",
42
42
  "@atlaskit/platform-feature-flags": "^1.1.0",
43
- "@atlaskit/tmp-editor-statsig": "^12.4.0",
43
+ "@atlaskit/tmp-editor-statsig": "^12.5.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "react-intl-next": "npm:react-intl@^5.18.1"
46
46
  },
47
47
  "peerDependencies": {
48
- "@atlaskit/editor-common": "^108.2.0",
48
+ "@atlaskit/editor-common": "^108.3.0",
49
49
  "react": "^18.2.0",
50
50
  "react-dom": "^18.2.0"
51
51
  },