@atlaskit/tmp-editor-statsig 1.3.1 → 1.4.0

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,22 @@
1
1
  # @atlaskit/editor-statsig-tmp
2
2
 
3
+ ## 1.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#135110](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/135110)
8
+ [`48ef3f98124db`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/48ef3f98124db) -
9
+ [ux] [ED-24754] Add 5 template options to quick insert and element browser when
10
+ `platform_editor_element_level_templates` experiment is enabled
11
+
12
+ ## 1.3.2
13
+
14
+ ### Patch Changes
15
+
16
+ - [#133128](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/133128)
17
+ [`5208be528f4e4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5208be528f4e4) -
18
+ EO-2024-44 Improved types and added export
19
+
3
20
  ## 1.3.1
4
21
 
5
22
  ### Patch Changes
@@ -75,5 +75,14 @@ var editorExperimentsConfig = exports.editorExperimentsConfig = {
75
75
  param: 'isEnabled',
76
76
  typeGuard: isBoolean,
77
77
  defaultValue: false
78
+ },
79
+ // Added 2024-08-28
80
+ 'element-level-templates': {
81
+ productKeys: {
82
+ confluence: 'platform_editor_element_level_templates'
83
+ },
84
+ param: 'isEnabled',
85
+ typeGuard: isBoolean,
86
+ defaultValue: false
78
87
  }
79
88
  };
@@ -94,6 +94,7 @@ overrides) {
94
94
  * ```
95
95
  */
96
96
  function editorExperiment(experimentName, expectedExperimentValue) {
97
+ var _experimentConfig$pro;
97
98
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
98
99
  exposure: false
99
100
  };
@@ -108,7 +109,7 @@ function editorExperiment(experimentName, expectedExperimentValue) {
108
109
  }
109
110
 
110
111
  // Typescript is complaining here about accessing the productKeys property
111
- var experimentKey = experimentConfig.productKeys[_product];
112
+ var experimentKey = (_experimentConfig$pro = experimentConfig.productKeys) === null || _experimentConfig$pro === void 0 ? void 0 : _experimentConfig$pro[_product];
112
113
  if (!experimentKey) {
113
114
  // This will be hit in the case of an experiment not being set up for the product
114
115
  return _experimentsConfig.editorExperimentsConfig[experimentName].defaultValue === expectedExperimentValue;
@@ -69,5 +69,14 @@ export const editorExperimentsConfig = {
69
69
  param: 'isEnabled',
70
70
  typeGuard: isBoolean,
71
71
  defaultValue: false
72
+ },
73
+ // Added 2024-08-28
74
+ 'element-level-templates': {
75
+ productKeys: {
76
+ confluence: 'platform_editor_element_level_templates'
77
+ },
78
+ param: 'isEnabled',
79
+ typeGuard: isBoolean,
80
+ defaultValue: false
72
81
  }
73
82
  };
@@ -84,6 +84,7 @@ overrides) {
84
84
  export function editorExperiment(experimentName, expectedExperimentValue, options = {
85
85
  exposure: false
86
86
  }) {
87
+ var _experimentConfig$pro;
87
88
  const experimentConfig = editorExperimentsConfig[experimentName];
88
89
  if (_overrides[experimentName] !== undefined) {
89
90
  // This will be hit in the case of a test setting an override
@@ -95,7 +96,7 @@ export function editorExperiment(experimentName, expectedExperimentValue, option
95
96
  }
96
97
 
97
98
  // Typescript is complaining here about accessing the productKeys property
98
- const experimentKey = experimentConfig.productKeys[_product];
99
+ const experimentKey = (_experimentConfig$pro = experimentConfig.productKeys) === null || _experimentConfig$pro === void 0 ? void 0 : _experimentConfig$pro[_product];
99
100
  if (!experimentKey) {
100
101
  // This will be hit in the case of an experiment not being set up for the product
101
102
  return editorExperimentsConfig[experimentName].defaultValue === expectedExperimentValue;
@@ -69,5 +69,14 @@ export var editorExperimentsConfig = {
69
69
  param: 'isEnabled',
70
70
  typeGuard: isBoolean,
71
71
  defaultValue: false
72
+ },
73
+ // Added 2024-08-28
74
+ 'element-level-templates': {
75
+ productKeys: {
76
+ confluence: 'platform_editor_element_level_templates'
77
+ },
78
+ param: 'isEnabled',
79
+ typeGuard: isBoolean,
80
+ defaultValue: false
72
81
  }
73
82
  };
@@ -86,6 +86,7 @@ overrides) {
86
86
  * ```
87
87
  */
88
88
  export function editorExperiment(experimentName, expectedExperimentValue) {
89
+ var _experimentConfig$pro;
89
90
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
90
91
  exposure: false
91
92
  };
@@ -100,7 +101,7 @@ export function editorExperiment(experimentName, expectedExperimentValue) {
100
101
  }
101
102
 
102
103
  // Typescript is complaining here about accessing the productKeys property
103
- var experimentKey = experimentConfig.productKeys[_product];
104
+ var experimentKey = (_experimentConfig$pro = experimentConfig.productKeys) === null || _experimentConfig$pro === void 0 ? void 0 : _experimentConfig$pro[_product];
104
105
  if (!experimentKey) {
105
106
  // This will be hit in the case of an experiment not being set up for the product
106
107
  return editorExperimentsConfig[experimentName].defaultValue === expectedExperimentValue;
@@ -55,5 +55,13 @@ export declare const editorExperimentsConfig: {
55
55
  typeGuard: typeof isBoolean;
56
56
  defaultValue: boolean;
57
57
  };
58
+ 'element-level-templates': {
59
+ productKeys: {
60
+ confluence: string;
61
+ };
62
+ param: string;
63
+ typeGuard: typeof isBoolean;
64
+ defaultValue: boolean;
65
+ };
58
66
  };
59
67
  export {};
@@ -55,5 +55,13 @@ export declare const editorExperimentsConfig: {
55
55
  typeGuard: typeof isBoolean;
56
56
  defaultValue: boolean;
57
57
  };
58
+ 'element-level-templates': {
59
+ productKeys: {
60
+ confluence: string;
61
+ };
62
+ param: string;
63
+ typeGuard: typeof isBoolean;
64
+ defaultValue: boolean;
65
+ };
58
66
  };
59
67
  export {};
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "@atlaskit/tmp-editor-statsig/experiments-config",
3
+ "main": "../dist/cjs/experiments-config.js",
4
+ "module": "../dist/esm/experiments-config.js",
5
+ "module:es2019": "../dist/es2019/experiments-config.js",
6
+ "types": "../dist/types/experiments-config.d.ts",
7
+ "typesVersions": {
8
+ ">=4.5 <5.4": {
9
+ "*": [
10
+ "../dist/types-ts4.5/experiments-config.d.ts"
11
+ ]
12
+ }
13
+ }
14
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/tmp-editor-statsig",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
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",
@@ -32,6 +32,7 @@
32
32
  "atlaskit:src": "src/index.ts",
33
33
  "af:exports": {
34
34
  "./experiments": "./src/experiments.ts",
35
+ "./experiments-config": "./src/experiments-config.ts",
35
36
  "./test-runner": "./src/test-runner.ts"
36
37
  },
37
38
  "dependencies": {