@atlaskit/tmp-editor-statsig 70.6.0 → 71.0.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,19 @@
1
1
  # @atlaskit/editor-statsig-tmp
2
2
 
3
+ ## 71.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`0281a1c2161a9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0281a1c2161a9) -
8
+ [ux] cleanup platform_editor_table_remove_last_cell_decoration
9
+
10
+ ## 71.0.0
11
+
12
+ ### Major Changes
13
+
14
+ - [`c90e53d27bbe9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c90e53d27bbe9) -
15
+ Re-use maui experiment for Jira
16
+
3
17
  ## 70.6.0
4
18
 
5
19
  ### Minor Changes
@@ -7,7 +7,13 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.expValEqualsInternal = expValEqualsInternal;
8
8
  var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
9
9
  var _featureFlagsAccessed = require("@atlaskit/react-ufo/feature-flags-accessed");
10
+ var _experimentsConfig = require("./experiments-config");
10
11
  var _setup = require("./setup");
12
+ // This internal representation doesn't currently support productKeys
13
+ // the way expVal(...) does, this adds temporary support for some keys while
14
+ // we determine our preferred approach forward
15
+ var allowsProductKeys = ['cc-maui-experiment'];
16
+
11
17
  /**
12
18
  * Check the value if an editor experiment.
13
19
  * Internal method that is shared between expValEquals and expValEqualsNoExposure.
@@ -24,6 +30,7 @@ var _setup = require("./setup");
24
30
  * @returns boolean
25
31
  */
26
32
  function expValEqualsInternal(experimentName, experimentParam, experimentExpectedValue, experimentDefaultValue, experimentExposure) {
33
+ var _editorExperimentsCon, _editorExperimentsCon2;
27
34
  // @ts-ignore need to loosen the type here to allow for any experiment name
28
35
  if (_setup._overrides[experimentName] !== undefined) {
29
36
  // This will be hit in the case of a test setting an override
@@ -36,15 +43,19 @@ function expValEqualsInternal(experimentName, experimentParam, experimentExpecte
36
43
  return experimentDefaultValue === experimentExpectedValue;
37
44
  }
38
45
 
46
+ // Typescript is complaining here about accessing the productKeys property
47
+ var experimentKeyName = allowsProductKeys.includes(experimentName) ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
48
+ (_editorExperimentsCon = (_editorExperimentsCon2 = _experimentsConfig.editorExperimentsConfig[experimentName]) === null || _editorExperimentsCon2 === void 0 || (_editorExperimentsCon2 = _editorExperimentsCon2.productKeys) === null || _editorExperimentsCon2 === void 0 ? void 0 : _editorExperimentsCon2[_setup._product]) !== null && _editorExperimentsCon !== void 0 ? _editorExperimentsCon : experimentName : experimentName;
49
+
39
50
  // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
40
- var experimentValue = _featureGateJsClient.default.getExperimentValue(experimentName, experimentParam, experimentDefaultValue, {
51
+ var experimentValue = _featureGateJsClient.default.getExperimentValue(experimentKeyName, experimentParam, experimentDefaultValue, {
41
52
  fireExperimentExposure: experimentExposure
42
53
  });
43
54
  if (
44
55
  // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
45
56
  _featureGateJsClient.default.getExperimentValue('cc_editor_experiments_ufo_gate_reporting', 'isEnabled', false)) {
46
57
  // Duplicated from /confluence/next/packages/feature-experiments/src/index.ts
47
- (0, _featureFlagsAccessed.addFeatureFlagAccessed)("".concat(experimentName, ":").concat(experimentParam), experimentValue);
58
+ (0, _featureFlagsAccessed.addFeatureFlagAccessed)("".concat(experimentKeyName, ":").concat(experimentParam), experimentValue);
48
59
  }
49
60
  return experimentValue === experimentExpectedValue;
50
61
  }
@@ -1368,14 +1368,7 @@ var editorExperimentsConfig = exports.editorExperimentsConfig = {
1368
1368
  // Added 2026-02-23
1369
1369
  'cc-maui-experiment': (0, _experimentBuilders.createBooleanExperiment)({
1370
1370
  productKeys: {
1371
- confluence: 'cc-maui-experiment'
1372
- },
1373
- param: 'isEnabled',
1374
- defaultValue: false
1375
- }),
1376
- // Added 2026-04-15
1377
- jira_maui_remix: (0, _experimentBuilders.createBooleanExperiment)({
1378
- productKeys: {
1371
+ confluence: 'cc-maui-experiment',
1379
1372
  jira: 'jira_maui_remix'
1380
1373
  },
1381
1374
  param: 'isEnabled',
@@ -1619,14 +1612,6 @@ var editorExperimentsConfig = exports.editorExperimentsConfig = {
1619
1612
  param: 'isEnabled',
1620
1613
  defaultValue: false
1621
1614
  }),
1622
- // Added 2026-03-07
1623
- platform_editor_table_remove_last_cell_decoration: (0, _experimentBuilders.createBooleanExperiment)({
1624
- productKeys: {
1625
- confluence: 'platform_editor_table_remove_last_cell_decoration'
1626
- },
1627
- param: 'isEnabled',
1628
- defaultValue: false
1629
- }),
1630
1615
  platform_editor_small_font_size: (0, _experimentBuilders.createBooleanExperiment)({
1631
1616
  productKeys: {
1632
1617
  confluence: 'platform_editor_small_font_size',
@@ -1,6 +1,12 @@
1
1
  import FeatureGates from '@atlaskit/feature-gate-js-client';
2
2
  import { addFeatureFlagAccessed } from '@atlaskit/react-ufo/feature-flags-accessed';
3
- import { _overrides } from './setup';
3
+ import { editorExperimentsConfig } from './experiments-config';
4
+ import { _overrides, _product } from './setup';
5
+
6
+ // This internal representation doesn't currently support productKeys
7
+ // the way expVal(...) does, this adds temporary support for some keys while
8
+ // we determine our preferred approach forward
9
+ const allowsProductKeys = ['cc-maui-experiment'];
4
10
 
5
11
  /**
6
12
  * Check the value if an editor experiment.
@@ -18,6 +24,7 @@ import { _overrides } from './setup';
18
24
  * @returns boolean
19
25
  */
20
26
  export function expValEqualsInternal(experimentName, experimentParam, experimentExpectedValue, experimentDefaultValue, experimentExposure) {
27
+ var _editorExperimentsCon, _editorExperimentsCon2, _editorExperimentsCon3;
21
28
  // @ts-ignore need to loosen the type here to allow for any experiment name
22
29
  if (_overrides[experimentName] !== undefined) {
23
30
  // This will be hit in the case of a test setting an override
@@ -30,15 +37,19 @@ export function expValEqualsInternal(experimentName, experimentParam, experiment
30
37
  return experimentDefaultValue === experimentExpectedValue;
31
38
  }
32
39
 
40
+ // Typescript is complaining here about accessing the productKeys property
41
+ const experimentKeyName = allowsProductKeys.includes(experimentName) ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
42
+ (_editorExperimentsCon = (_editorExperimentsCon2 = editorExperimentsConfig[experimentName]) === null || _editorExperimentsCon2 === void 0 ? void 0 : (_editorExperimentsCon3 = _editorExperimentsCon2.productKeys) === null || _editorExperimentsCon3 === void 0 ? void 0 : _editorExperimentsCon3[_product]) !== null && _editorExperimentsCon !== void 0 ? _editorExperimentsCon : experimentName : experimentName;
43
+
33
44
  // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
34
- const experimentValue = FeatureGates.getExperimentValue(experimentName, experimentParam, experimentDefaultValue, {
45
+ const experimentValue = FeatureGates.getExperimentValue(experimentKeyName, experimentParam, experimentDefaultValue, {
35
46
  fireExperimentExposure: experimentExposure
36
47
  });
37
48
  if (
38
49
  // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
39
50
  FeatureGates.getExperimentValue('cc_editor_experiments_ufo_gate_reporting', 'isEnabled', false)) {
40
51
  // Duplicated from /confluence/next/packages/feature-experiments/src/index.ts
41
- addFeatureFlagAccessed(`${experimentName}:${experimentParam}`, experimentValue);
52
+ addFeatureFlagAccessed(`${experimentKeyName}:${experimentParam}`, experimentValue);
42
53
  }
43
54
  return experimentValue === experimentExpectedValue;
44
55
  }
@@ -1362,14 +1362,7 @@ export const editorExperimentsConfig = {
1362
1362
  // Added 2026-02-23
1363
1363
  'cc-maui-experiment': createBooleanExperiment({
1364
1364
  productKeys: {
1365
- confluence: 'cc-maui-experiment'
1366
- },
1367
- param: 'isEnabled',
1368
- defaultValue: false
1369
- }),
1370
- // Added 2026-04-15
1371
- jira_maui_remix: createBooleanExperiment({
1372
- productKeys: {
1365
+ confluence: 'cc-maui-experiment',
1373
1366
  jira: 'jira_maui_remix'
1374
1367
  },
1375
1368
  param: 'isEnabled',
@@ -1613,14 +1606,6 @@ export const editorExperimentsConfig = {
1613
1606
  param: 'isEnabled',
1614
1607
  defaultValue: false
1615
1608
  }),
1616
- // Added 2026-03-07
1617
- platform_editor_table_remove_last_cell_decoration: createBooleanExperiment({
1618
- productKeys: {
1619
- confluence: 'platform_editor_table_remove_last_cell_decoration'
1620
- },
1621
- param: 'isEnabled',
1622
- defaultValue: false
1623
- }),
1624
1609
  platform_editor_small_font_size: createBooleanExperiment({
1625
1610
  productKeys: {
1626
1611
  confluence: 'platform_editor_small_font_size',
@@ -1,6 +1,12 @@
1
1
  import FeatureGates from '@atlaskit/feature-gate-js-client';
2
2
  import { addFeatureFlagAccessed } from '@atlaskit/react-ufo/feature-flags-accessed';
3
- import { _overrides } from './setup';
3
+ import { editorExperimentsConfig } from './experiments-config';
4
+ import { _overrides, _product } from './setup';
5
+
6
+ // This internal representation doesn't currently support productKeys
7
+ // the way expVal(...) does, this adds temporary support for some keys while
8
+ // we determine our preferred approach forward
9
+ var allowsProductKeys = ['cc-maui-experiment'];
4
10
 
5
11
  /**
6
12
  * Check the value if an editor experiment.
@@ -18,6 +24,7 @@ import { _overrides } from './setup';
18
24
  * @returns boolean
19
25
  */
20
26
  export function expValEqualsInternal(experimentName, experimentParam, experimentExpectedValue, experimentDefaultValue, experimentExposure) {
27
+ var _editorExperimentsCon, _editorExperimentsCon2;
21
28
  // @ts-ignore need to loosen the type here to allow for any experiment name
22
29
  if (_overrides[experimentName] !== undefined) {
23
30
  // This will be hit in the case of a test setting an override
@@ -30,15 +37,19 @@ export function expValEqualsInternal(experimentName, experimentParam, experiment
30
37
  return experimentDefaultValue === experimentExpectedValue;
31
38
  }
32
39
 
40
+ // Typescript is complaining here about accessing the productKeys property
41
+ var experimentKeyName = allowsProductKeys.includes(experimentName) ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
42
+ (_editorExperimentsCon = (_editorExperimentsCon2 = editorExperimentsConfig[experimentName]) === null || _editorExperimentsCon2 === void 0 || (_editorExperimentsCon2 = _editorExperimentsCon2.productKeys) === null || _editorExperimentsCon2 === void 0 ? void 0 : _editorExperimentsCon2[_product]) !== null && _editorExperimentsCon !== void 0 ? _editorExperimentsCon : experimentName : experimentName;
43
+
33
44
  // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
34
- var experimentValue = FeatureGates.getExperimentValue(experimentName, experimentParam, experimentDefaultValue, {
45
+ var experimentValue = FeatureGates.getExperimentValue(experimentKeyName, experimentParam, experimentDefaultValue, {
35
46
  fireExperimentExposure: experimentExposure
36
47
  });
37
48
  if (
38
49
  // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
39
50
  FeatureGates.getExperimentValue('cc_editor_experiments_ufo_gate_reporting', 'isEnabled', false)) {
40
51
  // Duplicated from /confluence/next/packages/feature-experiments/src/index.ts
41
- addFeatureFlagAccessed("".concat(experimentName, ":").concat(experimentParam), experimentValue);
52
+ addFeatureFlagAccessed("".concat(experimentKeyName, ":").concat(experimentParam), experimentValue);
42
53
  }
43
54
  return experimentValue === experimentExpectedValue;
44
55
  }
@@ -1362,14 +1362,7 @@ export var editorExperimentsConfig = {
1362
1362
  // Added 2026-02-23
1363
1363
  'cc-maui-experiment': createBooleanExperiment({
1364
1364
  productKeys: {
1365
- confluence: 'cc-maui-experiment'
1366
- },
1367
- param: 'isEnabled',
1368
- defaultValue: false
1369
- }),
1370
- // Added 2026-04-15
1371
- jira_maui_remix: createBooleanExperiment({
1372
- productKeys: {
1365
+ confluence: 'cc-maui-experiment',
1373
1366
  jira: 'jira_maui_remix'
1374
1367
  },
1375
1368
  param: 'isEnabled',
@@ -1613,14 +1606,6 @@ export var editorExperimentsConfig = {
1613
1606
  param: 'isEnabled',
1614
1607
  defaultValue: false
1615
1608
  }),
1616
- // Added 2026-03-07
1617
- platform_editor_table_remove_last_cell_decoration: createBooleanExperiment({
1618
- productKeys: {
1619
- confluence: 'platform_editor_table_remove_last_cell_decoration'
1620
- },
1621
- param: 'isEnabled',
1622
- defaultValue: false
1623
- }),
1624
1609
  platform_editor_small_font_size: createBooleanExperiment({
1625
1610
  productKeys: {
1626
1611
  confluence: 'platform_editor_small_font_size',
@@ -1,4 +1,4 @@
1
- import type { EditorExperimentsConfig } from './experiments-config';
1
+ import { type EditorExperimentsConfig } from './experiments-config';
2
2
  /**
3
3
  * Check the value if an editor experiment.
4
4
  * Internal method that is shared between expValEquals and expValEqualsNoExposure.
@@ -1224,12 +1224,6 @@ export declare const editorExperimentsConfig: {
1224
1224
  productKeys?: ProductKeys;
1225
1225
  typeGuard: IsBooleanType;
1226
1226
  };
1227
- platform_editor_table_remove_last_cell_decoration: {
1228
- defaultValue: boolean;
1229
- param: string;
1230
- productKeys?: ProductKeys;
1231
- typeGuard: IsBooleanType;
1232
- };
1233
1227
  platform_editor_small_font_size: {
1234
1228
  defaultValue: boolean;
1235
1229
  param: string;
@@ -1434,12 +1428,6 @@ export declare const editorExperimentsConfig: {
1434
1428
  productKeys?: ProductKeys;
1435
1429
  typeGuard: IsBooleanType;
1436
1430
  };
1437
- jira_maui_remix: {
1438
- defaultValue: boolean;
1439
- param: string;
1440
- productKeys?: ProductKeys;
1441
- typeGuard: IsBooleanType;
1442
- };
1443
1431
  platform_editor_drag_handle_keyboard_a11y: {
1444
1432
  defaultValue: boolean;
1445
1433
  param: string;
@@ -1,4 +1,4 @@
1
- import type { EditorExperimentsConfig } from './experiments-config';
1
+ import { type EditorExperimentsConfig } from './experiments-config';
2
2
  /**
3
3
  * Check the value if an editor experiment.
4
4
  * Internal method that is shared between expValEquals and expValEqualsNoExposure.
@@ -1224,12 +1224,6 @@ export declare const editorExperimentsConfig: {
1224
1224
  productKeys?: ProductKeys;
1225
1225
  typeGuard: IsBooleanType;
1226
1226
  };
1227
- platform_editor_table_remove_last_cell_decoration: {
1228
- defaultValue: boolean;
1229
- param: string;
1230
- productKeys?: ProductKeys;
1231
- typeGuard: IsBooleanType;
1232
- };
1233
1227
  platform_editor_small_font_size: {
1234
1228
  defaultValue: boolean;
1235
1229
  param: string;
@@ -1434,12 +1428,6 @@ export declare const editorExperimentsConfig: {
1434
1428
  productKeys?: ProductKeys;
1435
1429
  typeGuard: IsBooleanType;
1436
1430
  };
1437
- jira_maui_remix: {
1438
- defaultValue: boolean;
1439
- param: string;
1440
- productKeys?: ProductKeys;
1441
- typeGuard: IsBooleanType;
1442
- };
1443
1431
  platform_editor_drag_handle_keyboard_a11y: {
1444
1432
  defaultValue: boolean;
1445
1433
  param: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/tmp-editor-statsig",
3
- "version": "70.6.0",
3
+ "version": "71.0.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",