@atlaskit/collab-provider 39.1.10 → 39.1.12
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 +14 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +5 -5
- package/dist/cjs/feature-flags/index.js +0 -51
- package/dist/cjs/feature-flags/types.js +0 -11
- package/dist/es2019/feature-flags/index.js +0 -31
- package/dist/es2019/feature-flags/types.js +0 -5
- package/dist/esm/feature-flags/index.js +0 -43
- package/dist/esm/feature-flags/types.js +0 -5
- package/dist/types/feature-flags/index.d.ts +0 -9
- package/dist/types/feature-flags/types.d.ts +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/collab-provider
|
|
2
2
|
|
|
3
|
+
## 39.1.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`76a9e522fc180`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/76a9e522fc180) -
|
|
8
|
+
Delete unreachable source files
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 39.1.11
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 39.1.10
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = exports.name = "@atlaskit/collab-provider";
|
|
8
|
-
var version = exports.version = "39.1.
|
|
8
|
+
var version = exports.version = "39.1.11";
|
|
9
9
|
var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
|
|
10
10
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
|
11
11
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/collab-provider",
|
|
3
|
-
"version": "39.1.
|
|
3
|
+
"version": "39.1.12",
|
|
4
4
|
"description": "A provider for collaborative editing.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@atlaskit/adf-utils": "^20.9.0",
|
|
22
22
|
"@atlaskit/analytics-gas-types": "^6.2.0",
|
|
23
23
|
"@atlaskit/analytics-listeners": "^11.4.0",
|
|
24
|
-
"@atlaskit/anonymous-assets": "^2.
|
|
24
|
+
"@atlaskit/anonymous-assets": "^2.13.0",
|
|
25
25
|
"@atlaskit/atlassian-context": "^2.0.0",
|
|
26
26
|
"@atlaskit/editor-json-transformer": "^10.0.0",
|
|
27
27
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
31
31
|
"@atlaskit/prosemirror-collab": "^1.1.0",
|
|
32
32
|
"@atlaskit/react-ufo": "^8.4.0",
|
|
33
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
33
|
+
"@atlaskit/tmp-editor-statsig": "^260.0.0",
|
|
34
34
|
"@atlaskit/ufo": "^2.0.0",
|
|
35
35
|
"@atlaskit/util-service-support": "^7.4.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@atlaskit/adf-schema": "^57.7.0",
|
|
46
|
-
"@atlaskit/editor-common": "^134.
|
|
46
|
+
"@atlaskit/editor-common": "^134.12.0",
|
|
47
47
|
"@atlaskit/editor-test-helpers": "workspace:^",
|
|
48
48
|
"@atlassian/a11y-jest-testing": "^0.17.0",
|
|
49
49
|
"@atlassian/experiment-test-utils": "^0.2.0",
|
|
@@ -69,6 +69,6 @@
|
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
|
-
"@atlaskit/editor-common": "^134.
|
|
72
|
+
"@atlaskit/editor-common": "^134.12.0"
|
|
73
73
|
}
|
|
74
74
|
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.getCollabProviderFeatureFlag = getCollabProviderFeatureFlag;
|
|
8
|
-
exports.getProductSpecificFeatureFlags = void 0;
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
-
var defaultNCSFeatureFlags = {
|
|
11
|
-
testFF: false
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Note that Confluence should have the same FF sets as NCS
|
|
16
|
-
*/
|
|
17
|
-
var productKeys = {
|
|
18
|
-
confluence: {
|
|
19
|
-
testFF: 'confluence.frontend.collab.provider.testFF'
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
var filterFeatureFlagNames = function filterFeatureFlagNames(flags) {
|
|
23
|
-
var pairs = Object.entries(flags);
|
|
24
|
-
return pairs.filter(function (_ref) {
|
|
25
|
-
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
|
26
|
-
_key = _ref2[0],
|
|
27
|
-
value = _ref2[1];
|
|
28
|
-
return !!value;
|
|
29
|
-
}).map(function (_ref3) {
|
|
30
|
-
var _ref4 = (0, _slicedToArray2.default)(_ref3, 1),
|
|
31
|
-
key = _ref4[0];
|
|
32
|
-
return key;
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Takes a record of {NCS Feature Flag Names → boolean} and a supported product name.
|
|
38
|
-
* Returns the corresponding product’s Launch Darkly Keys for each of the flags set as true in the input record.
|
|
39
|
-
* */
|
|
40
|
-
var getProductSpecificFeatureFlags = exports.getProductSpecificFeatureFlags = function getProductSpecificFeatureFlags(flags, product) {
|
|
41
|
-
var ncsFeatureFlags = filterFeatureFlagNames(flags);
|
|
42
|
-
return ncsFeatureFlags.map(function (key) {
|
|
43
|
-
return productKeys[product][key];
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
function getCollabProviderFeatureFlag(flagName, featureFlags) {
|
|
47
|
-
if (featureFlags) {
|
|
48
|
-
return flagName in featureFlags ? featureFlags[flagName] : defaultNCSFeatureFlags[flagName];
|
|
49
|
-
}
|
|
50
|
-
return defaultNCSFeatureFlags[flagName];
|
|
51
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.supportedProducts = void 0;
|
|
7
|
-
// NCS feature flags - type and defaults defined here in one source of truth
|
|
8
|
-
|
|
9
|
-
// With this type we ensure the object will contain all the flags
|
|
10
|
-
|
|
11
|
-
var supportedProducts = exports.supportedProducts = ['confluence'];
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
const defaultNCSFeatureFlags = {
|
|
2
|
-
testFF: false
|
|
3
|
-
};
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Note that Confluence should have the same FF sets as NCS
|
|
7
|
-
*/
|
|
8
|
-
const productKeys = {
|
|
9
|
-
confluence: {
|
|
10
|
-
testFF: 'confluence.frontend.collab.provider.testFF'
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
const filterFeatureFlagNames = flags => {
|
|
14
|
-
const pairs = Object.entries(flags);
|
|
15
|
-
return pairs.filter(([_key, value]) => !!value).map(([key]) => key);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Takes a record of {NCS Feature Flag Names → boolean} and a supported product name.
|
|
20
|
-
* Returns the corresponding product’s Launch Darkly Keys for each of the flags set as true in the input record.
|
|
21
|
-
* */
|
|
22
|
-
export const getProductSpecificFeatureFlags = (flags, product) => {
|
|
23
|
-
const ncsFeatureFlags = filterFeatureFlagNames(flags);
|
|
24
|
-
return ncsFeatureFlags.map(key => productKeys[product][key]);
|
|
25
|
-
};
|
|
26
|
-
export function getCollabProviderFeatureFlag(flagName, featureFlags) {
|
|
27
|
-
if (featureFlags) {
|
|
28
|
-
return flagName in featureFlags ? featureFlags[flagName] : defaultNCSFeatureFlags[flagName];
|
|
29
|
-
}
|
|
30
|
-
return defaultNCSFeatureFlags[flagName];
|
|
31
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
var defaultNCSFeatureFlags = {
|
|
3
|
-
testFF: false
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Note that Confluence should have the same FF sets as NCS
|
|
8
|
-
*/
|
|
9
|
-
var productKeys = {
|
|
10
|
-
confluence: {
|
|
11
|
-
testFF: 'confluence.frontend.collab.provider.testFF'
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
var filterFeatureFlagNames = function filterFeatureFlagNames(flags) {
|
|
15
|
-
var pairs = Object.entries(flags);
|
|
16
|
-
return pairs.filter(function (_ref) {
|
|
17
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
18
|
-
_key = _ref2[0],
|
|
19
|
-
value = _ref2[1];
|
|
20
|
-
return !!value;
|
|
21
|
-
}).map(function (_ref3) {
|
|
22
|
-
var _ref4 = _slicedToArray(_ref3, 1),
|
|
23
|
-
key = _ref4[0];
|
|
24
|
-
return key;
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Takes a record of {NCS Feature Flag Names → boolean} and a supported product name.
|
|
30
|
-
* Returns the corresponding product’s Launch Darkly Keys for each of the flags set as true in the input record.
|
|
31
|
-
* */
|
|
32
|
-
export var getProductSpecificFeatureFlags = function getProductSpecificFeatureFlags(flags, product) {
|
|
33
|
-
var ncsFeatureFlags = filterFeatureFlagNames(flags);
|
|
34
|
-
return ncsFeatureFlags.map(function (key) {
|
|
35
|
-
return productKeys[product][key];
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
export function getCollabProviderFeatureFlag(flagName, featureFlags) {
|
|
39
|
-
if (featureFlags) {
|
|
40
|
-
return flagName in featureFlags ? featureFlags[flagName] : defaultNCSFeatureFlags[flagName];
|
|
41
|
-
}
|
|
42
|
-
return defaultNCSFeatureFlags[flagName];
|
|
43
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { NCSFeatureFlags, RequiredNCSFeatureFlags, SupportedProduct } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Takes a record of {NCS Feature Flag Names → boolean} and a supported product name.
|
|
4
|
-
* Returns the corresponding product’s Launch Darkly Keys for each of the flags set as true in the input record.
|
|
5
|
-
* */
|
|
6
|
-
export declare const getProductSpecificFeatureFlags: (flags: RequiredNCSFeatureFlags, product: SupportedProduct) => Array<string>;
|
|
7
|
-
export declare function getCollabProviderFeatureFlag<T = boolean>(flagName: keyof NCSFeatureFlags, featureFlags?: {
|
|
8
|
-
[key: string]: boolean;
|
|
9
|
-
}): T;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface NCSFeatureFlags {
|
|
2
|
-
testFF?: boolean;
|
|
3
|
-
}
|
|
4
|
-
export interface WithNCSFeatureFlags {
|
|
5
|
-
featureFlags?: NCSFeatureFlags;
|
|
6
|
-
}
|
|
7
|
-
export type RequiredNCSFeatureFlags = Record<keyof Required<NCSFeatureFlags>, boolean>;
|
|
8
|
-
export type NCSFeatureFlagsMap = Record<keyof Required<NCSFeatureFlags>, string>;
|
|
9
|
-
export declare const supportedProducts: readonly ['confluence'];
|
|
10
|
-
export type SupportedProduct = (typeof supportedProducts)[number];
|
|
11
|
-
export type ProductKeys = Record<SupportedProduct, NCSFeatureFlagsMap>;
|