@atlaskit/tmp-editor-statsig 9.27.0 → 9.29.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 +15 -0
- package/dist/cjs/expVal.js +90 -0
- package/dist/cjs/experiments-config.js +24 -0
- package/dist/es2019/expVal.js +83 -0
- package/dist/es2019/experiments-config.js +24 -0
- package/dist/esm/expVal.js +82 -0
- package/dist/esm/experiments-config.js +24 -0
- package/dist/types/expVal.d.ts +31 -0
- package/dist/types/experiments-config.d.ts +18 -0
- package/dist/types-ts4.5/expVal.d.ts +31 -0
- package/dist/types-ts4.5/experiments-config.d.ts +18 -0
- package/editor-experiments-test-utils/package.json +1 -1
- package/exp-val-equals/package.json +1 -1
- package/exp-val-equals-no-exposure/package.json +1 -1
- package/expVal/package.json +14 -0
- package/experiments/package.json +1 -1
- package/experiments-config/package.json +1 -1
- package/package.json +2 -1
- package/setup/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-statsig-tmp
|
|
2
2
|
|
|
3
|
+
## 9.29.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`01301aa6646c4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/01301aa6646c4) -
|
|
8
|
+
Add advanced codeblocks experiment for jira.
|
|
9
|
+
|
|
10
|
+
## 9.28.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [#200948](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/200948)
|
|
15
|
+
[`8dd9a944113d5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8dd9a944113d5) -
|
|
16
|
+
Introduced throttling for portals
|
|
17
|
+
|
|
3
18
|
## 9.27.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.expVal = expVal;
|
|
8
|
+
exports.expValNoExposure = expValNoExposure;
|
|
9
|
+
var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
|
|
10
|
+
var _experimentsConfig = require("./experiments-config");
|
|
11
|
+
var _setup = require("./setup");
|
|
12
|
+
function expValInternal(_ref) {
|
|
13
|
+
var _experimentConfig$pro;
|
|
14
|
+
var experimentName = _ref.experimentName,
|
|
15
|
+
experimentParam = _ref.experimentParam,
|
|
16
|
+
defaultValue = _ref.defaultValue,
|
|
17
|
+
fireExperimentExposure = _ref.fireExperimentExposure;
|
|
18
|
+
var experimentConfig = _experimentsConfig.editorExperimentsConfig[experimentName];
|
|
19
|
+
if (experimentConfig === undefined) {
|
|
20
|
+
// Warning! If a product is improperly configured (ie. their editor packages are misaligned)
|
|
21
|
+
// it can cause the editor to crash here or if the experiment does not exist.
|
|
22
|
+
// We will definitely crash via any code path later in this function - this just makes the error explicit and clear.
|
|
23
|
+
throw new Error("Editor experiment configuration is not defined ".concat(experimentName, ". Likely the experiment does not exist or editor package versions are misaligned"));
|
|
24
|
+
}
|
|
25
|
+
if (!_setup._product) {
|
|
26
|
+
// This will be hit in the case of a product not having setup the editor experiment tooling
|
|
27
|
+
return defaultValue;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Typescript is complaining here about accessing the productKeys property
|
|
31
|
+
// Ignored via go/ees005
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
33
|
+
var experimentKey = experimentConfig === null || experimentConfig === void 0 || (_experimentConfig$pro = experimentConfig.productKeys) === null || _experimentConfig$pro === void 0 ? void 0 : _experimentConfig$pro[_setup._product];
|
|
34
|
+
if (!experimentKey) {
|
|
35
|
+
// This will be hit in the case of an experiment not being set up for the product
|
|
36
|
+
return defaultValue;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
40
|
+
var experimentValue = _featureGateJsClient.default.getExperimentValue(experimentName, experimentParam, defaultValue, {
|
|
41
|
+
fireExperimentExposure: fireExperimentExposure
|
|
42
|
+
});
|
|
43
|
+
return experimentValue;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Use to check a any param value for an experiment
|
|
48
|
+
*
|
|
49
|
+
* **Note**: this will return the default value when the experiment;
|
|
50
|
+
* - is not being served to the client (ie. pre start)
|
|
51
|
+
* - or is not configured in experiments-config
|
|
52
|
+
*
|
|
53
|
+
* If you need to check a param value without an exposure check see {@link expParamEqualsNoExposure}
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const delay = expParamEquals('experiment-name', 'param-name', defaultValue)
|
|
58
|
+
* await new Promise(res => setTimeout(res, delay)
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
function expVal(experimentName, experimentParam, defaultValue) {
|
|
62
|
+
return expValInternal({
|
|
63
|
+
experimentName: experimentName,
|
|
64
|
+
experimentParam: experimentParam,
|
|
65
|
+
defaultValue: defaultValue,
|
|
66
|
+
fireExperimentExposure: true
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Use to check a any param value for an experiment without firing an exposure event
|
|
72
|
+
*
|
|
73
|
+
* **Note**: this will return the default value when the experiment;
|
|
74
|
+
* - is not being served to the client (ie. pre start)
|
|
75
|
+
* - or is not configured in experiments-config
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* const delay = expParamEqualsNoExposure('experiment-name', 'param-name', defaultValue)
|
|
80
|
+
* await new Promise(res => setTimeout(res, delay)
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
function expValNoExposure(experimentName, experimentParam, defaultValue) {
|
|
84
|
+
return expValInternal({
|
|
85
|
+
experimentName: experimentName,
|
|
86
|
+
experimentParam: experimentParam,
|
|
87
|
+
defaultValue: defaultValue,
|
|
88
|
+
fireExperimentExposure: false
|
|
89
|
+
});
|
|
90
|
+
}
|
|
@@ -359,6 +359,22 @@ var editorExperimentsConfig = exports.editorExperimentsConfig = {
|
|
|
359
359
|
param: 'isEnabled',
|
|
360
360
|
defaultValue: false
|
|
361
361
|
}),
|
|
362
|
+
// Added 2025-07-14
|
|
363
|
+
platform_editor_debounce_portal_provider: (0, _experimentBuilders.createBooleanExperiment)({
|
|
364
|
+
productKeys: {
|
|
365
|
+
confluence: 'platform_editor_debounce_portal_provider'
|
|
366
|
+
},
|
|
367
|
+
param: 'isEnabled',
|
|
368
|
+
defaultValue: false
|
|
369
|
+
}),
|
|
370
|
+
// Added 2025-08-14
|
|
371
|
+
platform_editor_jira_advanced_code_blocks: (0, _experimentBuilders.createBooleanExperiment)({
|
|
372
|
+
productKeys: {
|
|
373
|
+
jira: 'platform_editor_jira_advanced_code_blocks'
|
|
374
|
+
},
|
|
375
|
+
param: 'isEnabled',
|
|
376
|
+
defaultValue: false
|
|
377
|
+
}),
|
|
362
378
|
// Added 2025-07-08 - Jira work sync description comment summary
|
|
363
379
|
'jira-work-sync-desc-comment-summary': (0, _experimentBuilders.createBooleanExperiment)({
|
|
364
380
|
productKeys: {
|
|
@@ -652,6 +668,14 @@ var editorExperimentsConfig = exports.editorExperimentsConfig = {
|
|
|
652
668
|
param: 'isEnabled',
|
|
653
669
|
defaultValue: false
|
|
654
670
|
}),
|
|
671
|
+
// Added 2025-08-06
|
|
672
|
+
cc_editor_limited_mode: (0, _experimentBuilders.createBooleanExperiment)({
|
|
673
|
+
productKeys: {
|
|
674
|
+
confluence: 'cc_editor_limited_mode'
|
|
675
|
+
},
|
|
676
|
+
param: 'isEnabled',
|
|
677
|
+
defaultValue: false
|
|
678
|
+
}),
|
|
655
679
|
// Added 2025-08-05
|
|
656
680
|
platform_editor_tables_scaling_css: (0, _experimentBuilders.createBooleanExperiment)({
|
|
657
681
|
productKeys: {
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
2
|
+
import { editorExperimentsConfig } from './experiments-config';
|
|
3
|
+
import { _product } from './setup';
|
|
4
|
+
function expValInternal({
|
|
5
|
+
experimentName,
|
|
6
|
+
experimentParam,
|
|
7
|
+
defaultValue,
|
|
8
|
+
fireExperimentExposure
|
|
9
|
+
}) {
|
|
10
|
+
var _experimentConfig$pro;
|
|
11
|
+
const experimentConfig = editorExperimentsConfig[experimentName];
|
|
12
|
+
if (experimentConfig === undefined) {
|
|
13
|
+
// Warning! If a product is improperly configured (ie. their editor packages are misaligned)
|
|
14
|
+
// it can cause the editor to crash here or if the experiment does not exist.
|
|
15
|
+
// We will definitely crash via any code path later in this function - this just makes the error explicit and clear.
|
|
16
|
+
throw new Error(`Editor experiment configuration is not defined ${experimentName}. Likely the experiment does not exist or editor package versions are misaligned`);
|
|
17
|
+
}
|
|
18
|
+
if (!_product) {
|
|
19
|
+
// This will be hit in the case of a product not having setup the editor experiment tooling
|
|
20
|
+
return defaultValue;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Typescript is complaining here about accessing the productKeys property
|
|
24
|
+
// Ignored via go/ees005
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
26
|
+
const experimentKey = experimentConfig === null || experimentConfig === void 0 ? void 0 : (_experimentConfig$pro = experimentConfig.productKeys) === null || _experimentConfig$pro === void 0 ? void 0 : _experimentConfig$pro[_product];
|
|
27
|
+
if (!experimentKey) {
|
|
28
|
+
// This will be hit in the case of an experiment not being set up for the product
|
|
29
|
+
return defaultValue;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
33
|
+
const experimentValue = FeatureGates.getExperimentValue(experimentName, experimentParam, defaultValue, {
|
|
34
|
+
fireExperimentExposure: fireExperimentExposure
|
|
35
|
+
});
|
|
36
|
+
return experimentValue;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Use to check a any param value for an experiment
|
|
41
|
+
*
|
|
42
|
+
* **Note**: this will return the default value when the experiment;
|
|
43
|
+
* - is not being served to the client (ie. pre start)
|
|
44
|
+
* - or is not configured in experiments-config
|
|
45
|
+
*
|
|
46
|
+
* If you need to check a param value without an exposure check see {@link expParamEqualsNoExposure}
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const delay = expParamEquals('experiment-name', 'param-name', defaultValue)
|
|
51
|
+
* await new Promise(res => setTimeout(res, delay)
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export function expVal(experimentName, experimentParam, defaultValue) {
|
|
55
|
+
return expValInternal({
|
|
56
|
+
experimentName,
|
|
57
|
+
experimentParam,
|
|
58
|
+
defaultValue,
|
|
59
|
+
fireExperimentExposure: true
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Use to check a any param value for an experiment without firing an exposure event
|
|
65
|
+
*
|
|
66
|
+
* **Note**: this will return the default value when the experiment;
|
|
67
|
+
* - is not being served to the client (ie. pre start)
|
|
68
|
+
* - or is not configured in experiments-config
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* const delay = expParamEqualsNoExposure('experiment-name', 'param-name', defaultValue)
|
|
73
|
+
* await new Promise(res => setTimeout(res, delay)
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
export function expValNoExposure(experimentName, experimentParam, defaultValue) {
|
|
77
|
+
return expValInternal({
|
|
78
|
+
experimentName,
|
|
79
|
+
experimentParam,
|
|
80
|
+
defaultValue,
|
|
81
|
+
fireExperimentExposure: false
|
|
82
|
+
});
|
|
83
|
+
}
|
|
@@ -353,6 +353,22 @@ export const editorExperimentsConfig = {
|
|
|
353
353
|
param: 'isEnabled',
|
|
354
354
|
defaultValue: false
|
|
355
355
|
}),
|
|
356
|
+
// Added 2025-07-14
|
|
357
|
+
platform_editor_debounce_portal_provider: createBooleanExperiment({
|
|
358
|
+
productKeys: {
|
|
359
|
+
confluence: 'platform_editor_debounce_portal_provider'
|
|
360
|
+
},
|
|
361
|
+
param: 'isEnabled',
|
|
362
|
+
defaultValue: false
|
|
363
|
+
}),
|
|
364
|
+
// Added 2025-08-14
|
|
365
|
+
platform_editor_jira_advanced_code_blocks: createBooleanExperiment({
|
|
366
|
+
productKeys: {
|
|
367
|
+
jira: 'platform_editor_jira_advanced_code_blocks'
|
|
368
|
+
},
|
|
369
|
+
param: 'isEnabled',
|
|
370
|
+
defaultValue: false
|
|
371
|
+
}),
|
|
356
372
|
// Added 2025-07-08 - Jira work sync description comment summary
|
|
357
373
|
'jira-work-sync-desc-comment-summary': createBooleanExperiment({
|
|
358
374
|
productKeys: {
|
|
@@ -646,6 +662,14 @@ export const editorExperimentsConfig = {
|
|
|
646
662
|
param: 'isEnabled',
|
|
647
663
|
defaultValue: false
|
|
648
664
|
}),
|
|
665
|
+
// Added 2025-08-06
|
|
666
|
+
cc_editor_limited_mode: createBooleanExperiment({
|
|
667
|
+
productKeys: {
|
|
668
|
+
confluence: 'cc_editor_limited_mode'
|
|
669
|
+
},
|
|
670
|
+
param: 'isEnabled',
|
|
671
|
+
defaultValue: false
|
|
672
|
+
}),
|
|
649
673
|
// Added 2025-08-05
|
|
650
674
|
platform_editor_tables_scaling_css: createBooleanExperiment({
|
|
651
675
|
productKeys: {
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
2
|
+
import { editorExperimentsConfig } from './experiments-config';
|
|
3
|
+
import { _product } from './setup';
|
|
4
|
+
function expValInternal(_ref) {
|
|
5
|
+
var _experimentConfig$pro;
|
|
6
|
+
var experimentName = _ref.experimentName,
|
|
7
|
+
experimentParam = _ref.experimentParam,
|
|
8
|
+
defaultValue = _ref.defaultValue,
|
|
9
|
+
fireExperimentExposure = _ref.fireExperimentExposure;
|
|
10
|
+
var experimentConfig = editorExperimentsConfig[experimentName];
|
|
11
|
+
if (experimentConfig === undefined) {
|
|
12
|
+
// Warning! If a product is improperly configured (ie. their editor packages are misaligned)
|
|
13
|
+
// it can cause the editor to crash here or if the experiment does not exist.
|
|
14
|
+
// We will definitely crash via any code path later in this function - this just makes the error explicit and clear.
|
|
15
|
+
throw new Error("Editor experiment configuration is not defined ".concat(experimentName, ". Likely the experiment does not exist or editor package versions are misaligned"));
|
|
16
|
+
}
|
|
17
|
+
if (!_product) {
|
|
18
|
+
// This will be hit in the case of a product not having setup the editor experiment tooling
|
|
19
|
+
return defaultValue;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Typescript is complaining here about accessing the productKeys property
|
|
23
|
+
// Ignored via go/ees005
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
25
|
+
var experimentKey = experimentConfig === null || experimentConfig === void 0 || (_experimentConfig$pro = experimentConfig.productKeys) === null || _experimentConfig$pro === void 0 ? void 0 : _experimentConfig$pro[_product];
|
|
26
|
+
if (!experimentKey) {
|
|
27
|
+
// This will be hit in the case of an experiment not being set up for the product
|
|
28
|
+
return defaultValue;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
32
|
+
var experimentValue = FeatureGates.getExperimentValue(experimentName, experimentParam, defaultValue, {
|
|
33
|
+
fireExperimentExposure: fireExperimentExposure
|
|
34
|
+
});
|
|
35
|
+
return experimentValue;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Use to check a any param value for an experiment
|
|
40
|
+
*
|
|
41
|
+
* **Note**: this will return the default value when the experiment;
|
|
42
|
+
* - is not being served to the client (ie. pre start)
|
|
43
|
+
* - or is not configured in experiments-config
|
|
44
|
+
*
|
|
45
|
+
* If you need to check a param value without an exposure check see {@link expParamEqualsNoExposure}
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const delay = expParamEquals('experiment-name', 'param-name', defaultValue)
|
|
50
|
+
* await new Promise(res => setTimeout(res, delay)
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export function expVal(experimentName, experimentParam, defaultValue) {
|
|
54
|
+
return expValInternal({
|
|
55
|
+
experimentName: experimentName,
|
|
56
|
+
experimentParam: experimentParam,
|
|
57
|
+
defaultValue: defaultValue,
|
|
58
|
+
fireExperimentExposure: true
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Use to check a any param value for an experiment without firing an exposure event
|
|
64
|
+
*
|
|
65
|
+
* **Note**: this will return the default value when the experiment;
|
|
66
|
+
* - is not being served to the client (ie. pre start)
|
|
67
|
+
* - or is not configured in experiments-config
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* const delay = expParamEqualsNoExposure('experiment-name', 'param-name', defaultValue)
|
|
72
|
+
* await new Promise(res => setTimeout(res, delay)
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
export function expValNoExposure(experimentName, experimentParam, defaultValue) {
|
|
76
|
+
return expValInternal({
|
|
77
|
+
experimentName: experimentName,
|
|
78
|
+
experimentParam: experimentParam,
|
|
79
|
+
defaultValue: defaultValue,
|
|
80
|
+
fireExperimentExposure: false
|
|
81
|
+
});
|
|
82
|
+
}
|
|
@@ -353,6 +353,22 @@ export var editorExperimentsConfig = {
|
|
|
353
353
|
param: 'isEnabled',
|
|
354
354
|
defaultValue: false
|
|
355
355
|
}),
|
|
356
|
+
// Added 2025-07-14
|
|
357
|
+
platform_editor_debounce_portal_provider: createBooleanExperiment({
|
|
358
|
+
productKeys: {
|
|
359
|
+
confluence: 'platform_editor_debounce_portal_provider'
|
|
360
|
+
},
|
|
361
|
+
param: 'isEnabled',
|
|
362
|
+
defaultValue: false
|
|
363
|
+
}),
|
|
364
|
+
// Added 2025-08-14
|
|
365
|
+
platform_editor_jira_advanced_code_blocks: createBooleanExperiment({
|
|
366
|
+
productKeys: {
|
|
367
|
+
jira: 'platform_editor_jira_advanced_code_blocks'
|
|
368
|
+
},
|
|
369
|
+
param: 'isEnabled',
|
|
370
|
+
defaultValue: false
|
|
371
|
+
}),
|
|
356
372
|
// Added 2025-07-08 - Jira work sync description comment summary
|
|
357
373
|
'jira-work-sync-desc-comment-summary': createBooleanExperiment({
|
|
358
374
|
productKeys: {
|
|
@@ -646,6 +662,14 @@ export var editorExperimentsConfig = {
|
|
|
646
662
|
param: 'isEnabled',
|
|
647
663
|
defaultValue: false
|
|
648
664
|
}),
|
|
665
|
+
// Added 2025-08-06
|
|
666
|
+
cc_editor_limited_mode: createBooleanExperiment({
|
|
667
|
+
productKeys: {
|
|
668
|
+
confluence: 'cc_editor_limited_mode'
|
|
669
|
+
},
|
|
670
|
+
param: 'isEnabled',
|
|
671
|
+
defaultValue: false
|
|
672
|
+
}),
|
|
649
673
|
// Added 2025-08-05
|
|
650
674
|
platform_editor_tables_scaling_css: createBooleanExperiment({
|
|
651
675
|
productKeys: {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type EditorExperimentsConfig } from './experiments-config';
|
|
2
|
+
/**
|
|
3
|
+
* Use to check a any param value for an experiment
|
|
4
|
+
*
|
|
5
|
+
* **Note**: this will return the default value when the experiment;
|
|
6
|
+
* - is not being served to the client (ie. pre start)
|
|
7
|
+
* - or is not configured in experiments-config
|
|
8
|
+
*
|
|
9
|
+
* If you need to check a param value without an exposure check see {@link expParamEqualsNoExposure}
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const delay = expParamEquals('experiment-name', 'param-name', defaultValue)
|
|
14
|
+
* await new Promise(res => setTimeout(res, delay)
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function expVal<ExperimentName extends keyof EditorExperimentsConfig, DefaultValue extends string | number | boolean>(experimentName: ExperimentName, experimentParam: string, defaultValue: DefaultValue): DefaultValue;
|
|
18
|
+
/**
|
|
19
|
+
* Use to check a any param value for an experiment without firing an exposure event
|
|
20
|
+
*
|
|
21
|
+
* **Note**: this will return the default value when the experiment;
|
|
22
|
+
* - is not being served to the client (ie. pre start)
|
|
23
|
+
* - or is not configured in experiments-config
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const delay = expParamEqualsNoExposure('experiment-name', 'param-name', defaultValue)
|
|
28
|
+
* await new Promise(res => setTimeout(res, delay)
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function expValNoExposure<ExperimentName extends keyof EditorExperimentsConfig, DefaultValue extends string | number | boolean>(experimentName: ExperimentName, experimentParam: string, defaultValue: DefaultValue): DefaultValue;
|
|
@@ -263,6 +263,18 @@ export declare const editorExperimentsConfig: {
|
|
|
263
263
|
productKeys?: import("./types").ProductKeys;
|
|
264
264
|
param: string;
|
|
265
265
|
};
|
|
266
|
+
platform_editor_debounce_portal_provider: {
|
|
267
|
+
typeGuard: typeof import("./type-guards").isBoolean;
|
|
268
|
+
defaultValue: boolean;
|
|
269
|
+
productKeys?: import("./types").ProductKeys;
|
|
270
|
+
param: string;
|
|
271
|
+
};
|
|
272
|
+
platform_editor_jira_advanced_code_blocks: {
|
|
273
|
+
typeGuard: typeof import("./type-guards").isBoolean;
|
|
274
|
+
defaultValue: boolean;
|
|
275
|
+
productKeys?: import("./types").ProductKeys;
|
|
276
|
+
param: string;
|
|
277
|
+
};
|
|
266
278
|
'jira-work-sync-desc-comment-summary': {
|
|
267
279
|
typeGuard: typeof import("./type-guards").isBoolean;
|
|
268
280
|
defaultValue: boolean;
|
|
@@ -483,6 +495,12 @@ export declare const editorExperimentsConfig: {
|
|
|
483
495
|
productKeys?: import("./types").ProductKeys;
|
|
484
496
|
param: string;
|
|
485
497
|
};
|
|
498
|
+
cc_editor_limited_mode: {
|
|
499
|
+
typeGuard: typeof import("./type-guards").isBoolean;
|
|
500
|
+
defaultValue: boolean;
|
|
501
|
+
productKeys?: import("./types").ProductKeys;
|
|
502
|
+
param: string;
|
|
503
|
+
};
|
|
486
504
|
platform_editor_tables_scaling_css: {
|
|
487
505
|
typeGuard: typeof import("./type-guards").isBoolean;
|
|
488
506
|
defaultValue: boolean;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type EditorExperimentsConfig } from './experiments-config';
|
|
2
|
+
/**
|
|
3
|
+
* Use to check a any param value for an experiment
|
|
4
|
+
*
|
|
5
|
+
* **Note**: this will return the default value when the experiment;
|
|
6
|
+
* - is not being served to the client (ie. pre start)
|
|
7
|
+
* - or is not configured in experiments-config
|
|
8
|
+
*
|
|
9
|
+
* If you need to check a param value without an exposure check see {@link expParamEqualsNoExposure}
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const delay = expParamEquals('experiment-name', 'param-name', defaultValue)
|
|
14
|
+
* await new Promise(res => setTimeout(res, delay)
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function expVal<ExperimentName extends keyof EditorExperimentsConfig, DefaultValue extends string | number | boolean>(experimentName: ExperimentName, experimentParam: string, defaultValue: DefaultValue): DefaultValue;
|
|
18
|
+
/**
|
|
19
|
+
* Use to check a any param value for an experiment without firing an exposure event
|
|
20
|
+
*
|
|
21
|
+
* **Note**: this will return the default value when the experiment;
|
|
22
|
+
* - is not being served to the client (ie. pre start)
|
|
23
|
+
* - or is not configured in experiments-config
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const delay = expParamEqualsNoExposure('experiment-name', 'param-name', defaultValue)
|
|
28
|
+
* await new Promise(res => setTimeout(res, delay)
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function expValNoExposure<ExperimentName extends keyof EditorExperimentsConfig, DefaultValue extends string | number | boolean>(experimentName: ExperimentName, experimentParam: string, defaultValue: DefaultValue): DefaultValue;
|
|
@@ -263,6 +263,18 @@ export declare const editorExperimentsConfig: {
|
|
|
263
263
|
productKeys?: import("./types").ProductKeys;
|
|
264
264
|
param: string;
|
|
265
265
|
};
|
|
266
|
+
platform_editor_debounce_portal_provider: {
|
|
267
|
+
typeGuard: typeof import("./type-guards").isBoolean;
|
|
268
|
+
defaultValue: boolean;
|
|
269
|
+
productKeys?: import("./types").ProductKeys;
|
|
270
|
+
param: string;
|
|
271
|
+
};
|
|
272
|
+
platform_editor_jira_advanced_code_blocks: {
|
|
273
|
+
typeGuard: typeof import("./type-guards").isBoolean;
|
|
274
|
+
defaultValue: boolean;
|
|
275
|
+
productKeys?: import("./types").ProductKeys;
|
|
276
|
+
param: string;
|
|
277
|
+
};
|
|
266
278
|
'jira-work-sync-desc-comment-summary': {
|
|
267
279
|
typeGuard: typeof import("./type-guards").isBoolean;
|
|
268
280
|
defaultValue: boolean;
|
|
@@ -483,6 +495,12 @@ export declare const editorExperimentsConfig: {
|
|
|
483
495
|
productKeys?: import("./types").ProductKeys;
|
|
484
496
|
param: string;
|
|
485
497
|
};
|
|
498
|
+
cc_editor_limited_mode: {
|
|
499
|
+
typeGuard: typeof import("./type-guards").isBoolean;
|
|
500
|
+
defaultValue: boolean;
|
|
501
|
+
productKeys?: import("./types").ProductKeys;
|
|
502
|
+
param: string;
|
|
503
|
+
};
|
|
486
504
|
platform_editor_tables_scaling_css: {
|
|
487
505
|
typeGuard: typeof import("./type-guards").isBoolean;
|
|
488
506
|
defaultValue: boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/tmp-editor-statsig/expVal",
|
|
3
|
+
"main": "../dist/cjs/expVal.js",
|
|
4
|
+
"module": "../dist/esm/expVal.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/expVal.js",
|
|
6
|
+
"types": "../dist/types/expVal.d.ts",
|
|
7
|
+
"typesVersions": {
|
|
8
|
+
">=4.5 <5.9": {
|
|
9
|
+
"*": [
|
|
10
|
+
"../dist/types-ts4.5/expVal.d.ts"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
package/experiments/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/tmp-editor-statsig",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.29.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",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"./experiments": "./src/experiments.ts",
|
|
37
37
|
"./experiments-config": "./src/experiments-config.ts",
|
|
38
38
|
"./editor-experiments-test-utils": "./src/editor-experiments-test-utils.ts",
|
|
39
|
+
"./expVal": "./src/expVal.ts",
|
|
39
40
|
"./exp-val-equals": "./src/exp-val-equals.ts",
|
|
40
41
|
"./exp-val-equals-no-exposure": "./src/exp-val-equals-no-exposure.ts"
|
|
41
42
|
},
|