@atlaskit/tmp-editor-statsig 2.0.1 → 2.1.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,24 @@
1
1
  # @atlaskit/editor-statsig-tmp
2
2
 
3
+ ## 2.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#136410](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/136410)
8
+ [`af422227cfb98`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/af422227cfb98) -
9
+ Update eeTest to include experiment overrides
10
+ - [#136410](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/136410)
11
+ [`52083ca79b5dc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/52083ca79b5dc) -
12
+ [ux] ED-24603 Disable dragging nested nodes within table behind FF
13
+
14
+ ## 2.1.0
15
+
16
+ ### Minor Changes
17
+
18
+ - [#136054](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/136054)
19
+ [`9887c32fede77`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9887c32fede77) -
20
+ EDF-1449 Fix floating toolbar experiment
21
+
3
22
  ## 2.0.1
4
23
 
5
24
  ### Patch Changes
@@ -10,8 +10,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
10
10
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
11
  var _setup = require("./setup");
12
12
  var _experimentsConfig = require("./experiments-config");
13
- // This is loosely based on the `ffTest` util from `@atlassian/feature-flags-test-utils` package.
14
-
13
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
14
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // This is loosely based on the `ffTest` util from `@atlassian/feature-flags-test-utils` package.
15
15
  /**
16
16
  * This is a utility function for testing editor experiments.
17
17
  *
@@ -51,7 +51,7 @@ function eeTest(experimentName, cases, otherExperiments) {
51
51
  (0, _setup.setupEditorExperiments)('test', {});
52
52
  describe("eeTest: ".concat(experimentName), function () {
53
53
  afterEach(function () {
54
- (0, _setup.setupEditorExperiments)('test', otherExperiments !== null && otherExperiments !== void 0 ? otherExperiments : {});
54
+ (0, _setup.setupEditorExperiments)('test', {});
55
55
  });
56
56
  var isBooleanExperiment = typeof _experimentsConfig.editorExperimentsConfig[experimentName].defaultValue === 'boolean';
57
57
  if (isBooleanExperiment && Object.keys(cases).length !== 2) {
@@ -65,7 +65,7 @@ function eeTest(experimentName, cases, otherExperiments) {
65
65
  case 0:
66
66
  testCaseKey = value; // For boolean experiments, we need to convert the 'on' and 'off' cases to boolean `true` and `false` values.
67
67
  convertedValue = isBooleanExperiment ? testCaseKey === 'true' ? true : false : testCaseKey;
68
- (0, _setup.setupEditorExperiments)('test', (0, _defineProperty2.default)({}, experimentName, convertedValue));
68
+ (0, _setup.setupEditorExperiments)('test', _objectSpread((0, _defineProperty2.default)({}, experimentName, convertedValue), otherExperiments));
69
69
  testCase = cases[testCaseKey]; // @ts-ignore
70
70
  _context.next = 6;
71
71
  return Promise.resolve(testCase());
@@ -63,9 +63,9 @@ var editorExperimentsConfig = exports.editorExperimentsConfig = {
63
63
  productKeys: {
64
64
  confluence: 'platform_editor_ai_condensed_floating_toobar'
65
65
  },
66
- param: 'isEnabled',
67
- typeGuard: isBoolean,
68
- defaultValue: false
66
+ param: 'cohort',
67
+ typeGuard: oneOf(['control', 'dropdown', 'editor_ai_button']),
68
+ defaultValue: 'control'
69
69
  },
70
70
  // Added 2024-08-27
71
71
  'dnd-input-performance-optimisation': {
@@ -102,5 +102,14 @@ var editorExperimentsConfig = exports.editorExperimentsConfig = {
102
102
  param: 'isEnabled',
103
103
  typeGuard: isBoolean,
104
104
  defaultValue: false
105
+ },
106
+ // Add 2024-08-27
107
+ 'table-nested-dnd': {
108
+ productKeys: {
109
+ confluence: 'platform_editor_elements_dnd_nested_table'
110
+ },
111
+ param: 'isEnabled',
112
+ typeGuard: isBoolean,
113
+ defaultValue: false
105
114
  }
106
115
  };
@@ -42,7 +42,7 @@ export function eeTest(experimentName, cases, otherExperiments) {
42
42
  setupEditorExperiments('test', {});
43
43
  describe(`eeTest: ${experimentName}`, () => {
44
44
  afterEach(() => {
45
- setupEditorExperiments('test', otherExperiments !== null && otherExperiments !== void 0 ? otherExperiments : {});
45
+ setupEditorExperiments('test', {});
46
46
  });
47
47
  const isBooleanExperiment = typeof editorExperimentsConfig[experimentName].defaultValue === 'boolean';
48
48
  if (isBooleanExperiment && Object.keys(cases).length !== 2) {
@@ -54,7 +54,8 @@ export function eeTest(experimentName, cases, otherExperiments) {
54
54
  // For boolean experiments, we need to convert the 'on' and 'off' cases to boolean `true` and `false` values.
55
55
  const convertedValue = isBooleanExperiment ? testCaseKey === 'true' ? true : false : testCaseKey;
56
56
  setupEditorExperiments('test', {
57
- [experimentName]: convertedValue
57
+ [experimentName]: convertedValue,
58
+ ...otherExperiments
58
59
  });
59
60
  const testCase = cases[testCaseKey];
60
61
 
@@ -57,9 +57,9 @@ export const editorExperimentsConfig = {
57
57
  productKeys: {
58
58
  confluence: 'platform_editor_ai_condensed_floating_toobar'
59
59
  },
60
- param: 'isEnabled',
61
- typeGuard: isBoolean,
62
- defaultValue: false
60
+ param: 'cohort',
61
+ typeGuard: oneOf(['control', 'dropdown', 'editor_ai_button']),
62
+ defaultValue: 'control'
63
63
  },
64
64
  // Added 2024-08-27
65
65
  'dnd-input-performance-optimisation': {
@@ -96,5 +96,14 @@ export const editorExperimentsConfig = {
96
96
  param: 'isEnabled',
97
97
  typeGuard: isBoolean,
98
98
  defaultValue: false
99
+ },
100
+ // Add 2024-08-27
101
+ 'table-nested-dnd': {
102
+ productKeys: {
103
+ confluence: 'platform_editor_elements_dnd_nested_table'
104
+ },
105
+ param: 'isEnabled',
106
+ typeGuard: isBoolean,
107
+ defaultValue: false
99
108
  }
100
109
  };
@@ -1,6 +1,8 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
6
  // This is loosely based on the `ffTest` util from `@atlassian/feature-flags-test-utils` package.
5
7
 
6
8
  import { setupEditorExperiments } from './setup';
@@ -45,7 +47,7 @@ export function eeTest(experimentName, cases, otherExperiments) {
45
47
  setupEditorExperiments('test', {});
46
48
  describe("eeTest: ".concat(experimentName), function () {
47
49
  afterEach(function () {
48
- setupEditorExperiments('test', otherExperiments !== null && otherExperiments !== void 0 ? otherExperiments : {});
50
+ setupEditorExperiments('test', {});
49
51
  });
50
52
  var isBooleanExperiment = typeof editorExperimentsConfig[experimentName].defaultValue === 'boolean';
51
53
  if (isBooleanExperiment && Object.keys(cases).length !== 2) {
@@ -59,7 +61,7 @@ export function eeTest(experimentName, cases, otherExperiments) {
59
61
  case 0:
60
62
  testCaseKey = value; // For boolean experiments, we need to convert the 'on' and 'off' cases to boolean `true` and `false` values.
61
63
  convertedValue = isBooleanExperiment ? testCaseKey === 'true' ? true : false : testCaseKey;
62
- setupEditorExperiments('test', _defineProperty({}, experimentName, convertedValue));
64
+ setupEditorExperiments('test', _objectSpread(_defineProperty({}, experimentName, convertedValue), otherExperiments));
63
65
  testCase = cases[testCaseKey]; // @ts-ignore
64
66
  _context.next = 6;
65
67
  return Promise.resolve(testCase());
@@ -57,9 +57,9 @@ export var editorExperimentsConfig = {
57
57
  productKeys: {
58
58
  confluence: 'platform_editor_ai_condensed_floating_toobar'
59
59
  },
60
- param: 'isEnabled',
61
- typeGuard: isBoolean,
62
- defaultValue: false
60
+ param: 'cohort',
61
+ typeGuard: oneOf(['control', 'dropdown', 'editor_ai_button']),
62
+ defaultValue: 'control'
63
63
  },
64
64
  // Added 2024-08-27
65
65
  'dnd-input-performance-optimisation': {
@@ -96,5 +96,14 @@ export var editorExperimentsConfig = {
96
96
  param: 'isEnabled',
97
97
  typeGuard: isBoolean,
98
98
  defaultValue: false
99
+ },
100
+ // Add 2024-08-27
101
+ 'table-nested-dnd': {
102
+ productKeys: {
103
+ confluence: 'platform_editor_elements_dnd_nested_table'
104
+ },
105
+ param: 'isEnabled',
106
+ typeGuard: isBoolean,
107
+ defaultValue: false
99
108
  }
100
109
  };
@@ -44,8 +44,8 @@ export declare const editorExperimentsConfig: {
44
44
  confluence: string;
45
45
  };
46
46
  param: string;
47
- typeGuard: typeof isBoolean;
48
- defaultValue: boolean;
47
+ typeGuard: (value: unknown) => value is "control" | "dropdown" | "editor_ai_button";
48
+ defaultValue: "control" | "dropdown" | "editor_ai_button";
49
49
  };
50
50
  'dnd-input-performance-optimisation': {
51
51
  productKeys: {
@@ -79,5 +79,13 @@ export declare const editorExperimentsConfig: {
79
79
  typeGuard: typeof isBoolean;
80
80
  defaultValue: boolean;
81
81
  };
82
+ 'table-nested-dnd': {
83
+ productKeys: {
84
+ confluence: string;
85
+ };
86
+ param: string;
87
+ typeGuard: typeof isBoolean;
88
+ defaultValue: boolean;
89
+ };
82
90
  };
83
91
  export {};
@@ -7,11 +7,12 @@ export declare let _overrides: Partial<{
7
7
  'example-multivariate': "one" | "two" | "three";
8
8
  'test-new-experiments-package': boolean;
9
9
  'basic-text-transformations': boolean;
10
- 'platform-editor-ai-condensed-floating-toobar': boolean;
10
+ 'platform-editor-ai-condensed-floating-toobar': "control" | "dropdown" | "editor_ai_button";
11
11
  'dnd-input-performance-optimisation': boolean;
12
12
  'element-level-templates': boolean;
13
13
  'nested-dnd': boolean;
14
14
  'insert-menu-in-right-rail': boolean;
15
+ 'table-nested-dnd': boolean;
15
16
  }>;
16
17
  export declare let _product: 'confluence' | 'jira' | 'test' | undefined;
17
18
  /**
@@ -44,8 +44,8 @@ export declare const editorExperimentsConfig: {
44
44
  confluence: string;
45
45
  };
46
46
  param: string;
47
- typeGuard: typeof isBoolean;
48
- defaultValue: boolean;
47
+ typeGuard: (value: unknown) => value is "control" | "dropdown" | "editor_ai_button";
48
+ defaultValue: "control" | "dropdown" | "editor_ai_button";
49
49
  };
50
50
  'dnd-input-performance-optimisation': {
51
51
  productKeys: {
@@ -79,5 +79,13 @@ export declare const editorExperimentsConfig: {
79
79
  typeGuard: typeof isBoolean;
80
80
  defaultValue: boolean;
81
81
  };
82
+ 'table-nested-dnd': {
83
+ productKeys: {
84
+ confluence: string;
85
+ };
86
+ param: string;
87
+ typeGuard: typeof isBoolean;
88
+ defaultValue: boolean;
89
+ };
82
90
  };
83
91
  export {};
@@ -7,11 +7,12 @@ export declare let _overrides: Partial<{
7
7
  'example-multivariate': "one" | "two" | "three";
8
8
  'test-new-experiments-package': boolean;
9
9
  'basic-text-transformations': boolean;
10
- 'platform-editor-ai-condensed-floating-toobar': boolean;
10
+ 'platform-editor-ai-condensed-floating-toobar': "control" | "dropdown" | "editor_ai_button";
11
11
  'dnd-input-performance-optimisation': boolean;
12
12
  'element-level-templates': boolean;
13
13
  'nested-dnd': boolean;
14
14
  'insert-menu-in-right-rail': boolean;
15
+ 'table-nested-dnd': boolean;
15
16
  }>;
16
17
  export declare let _product: 'confluence' | 'jira' | 'test' | undefined;
17
18
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/tmp-editor-statsig",
3
- "version": "2.0.1",
3
+ "version": "2.1.1",
4
4
  "description": "Temp plugin to ease use of statsig feature flags until platform feature flags are available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",