@atlaskit/media-common 9.0.0 → 9.0.2
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 +65 -53
- package/dist/cjs/analytics/constants.js +1 -2
- package/dist/cjs/analytics/withMediaAnalyticsContext.js +2 -3
- package/dist/cjs/downloadUrl.js +2 -3
- package/dist/cjs/mediaFeatureFlag-local.js +2 -3
- package/dist/cjs/mediaFeatureFlags/mediaFeatureFlags.js +3 -6
- package/dist/cjs/mediaFeatureFlags/productKeys.js +2 -3
- package/dist/cjs/mediaFeatureFlags/types.js +1 -2
- package/dist/cjs/mediaTypeUtils/index.js +2 -3
- package/dist/cjs/mediaTypeUtils/isArchive.js +2 -3
- package/dist/cjs/mediaTypeUtils/isMimeTypeSupportedByBrowser.js +6 -11
- package/dist/cjs/mediaTypeUtils/isMimeTypeSupportedByServer.js +7 -13
- package/dist/cjs/test-helpers/dataURIs/smallImageURI.js +1 -2
- package/dist/cjs/test-helpers/dataURIs/smallTransparentImageURI.js +1 -2
- package/dist/cjs/test-helpers/dataURIs/tallImageURI.js +1 -2
- package/dist/cjs/test-helpers/dataURIs/videoPreviewURI.js +1 -2
- package/dist/cjs/test-helpers/dataURIs/videoURI.js +1 -2
- package/dist/cjs/test-helpers/dataURIs/vr_test_small_image.js +1 -2
- package/dist/cjs/test-helpers/dataURIs/wideImageURI.js +1 -2
- package/dist/cjs/test-helpers/dataURIs/wideTransparentImageURI.js +1 -2
- package/dist/cjs/test-helpers/flushPromises.js +2 -3
- package/dist/cjs/test-helpers/getJest.js +2 -3
- package/dist/cjs/test-helpers/jestHelpers.js +9 -17
- package/dist/cjs/test-helpers/nextTick.js +3 -5
- package/dist/cjs/utils/helpers.js +5 -11
- package/dist/es2019/utils/helpers.js +1 -1
- package/dist/esm/utils/helpers.js +0 -1
- package/dist/types/mediaFeatureFlags/types.d.ts +4 -0
- package/package.json +1 -1
- package/report.api.md +1 -1
- package/dist/types-ts4.5/analytics/constants.d.ts +0 -1
- package/dist/types-ts4.5/analytics/index.d.ts +0 -3
- package/dist/types-ts4.5/analytics/types.d.ts +0 -81
- package/dist/types-ts4.5/analytics/withMediaAnalyticsContext.d.ts +0 -15
- package/dist/types-ts4.5/docs/index.d.ts +0 -3
- package/dist/types-ts4.5/docs/media-use-only.d.ts +0 -5
- package/dist/types-ts4.5/docs/rxjs-notice.d.ts +0 -2
- package/dist/types-ts4.5/docs/singleton-notice.d.ts +0 -2
- package/dist/types-ts4.5/downloadUrl.d.ts +0 -4
- package/dist/types-ts4.5/index.d.ts +0 -19
- package/dist/types-ts4.5/mediaFeatureFlag-local.d.ts +0 -1
- package/dist/types-ts4.5/mediaFeatureFlags/genericFeatureFlag.d.ts +0 -7
- package/dist/types-ts4.5/mediaFeatureFlags/index.d.ts +0 -2
- package/dist/types-ts4.5/mediaFeatureFlags/mediaFeatureFlags.d.ts +0 -30
- package/dist/types-ts4.5/mediaFeatureFlags/productKeys.d.ts +0 -2
- package/dist/types-ts4.5/mediaFeatureFlags/types.d.ts +0 -17
- package/dist/types-ts4.5/mediaTypeUtils/index.d.ts +0 -4
- package/dist/types-ts4.5/mediaTypeUtils/isArchive.d.ts +0 -1
- package/dist/types-ts4.5/mediaTypeUtils/isMimeTypeSupportedByBrowser.d.ts +0 -14
- package/dist/types-ts4.5/mediaTypeUtils/isMimeTypeSupportedByServer.d.ts +0 -6
- package/dist/types-ts4.5/test-helpers/await-error.d.ts +0 -1
- package/dist/types-ts4.5/test-helpers/dataURIs/smallImageURI.d.ts +0 -1
- package/dist/types-ts4.5/test-helpers/dataURIs/smallTransparentImageURI.d.ts +0 -1
- package/dist/types-ts4.5/test-helpers/dataURIs/tallImageURI.d.ts +0 -1
- package/dist/types-ts4.5/test-helpers/dataURIs/videoPreviewURI.d.ts +0 -1
- package/dist/types-ts4.5/test-helpers/dataURIs/videoURI.d.ts +0 -1
- package/dist/types-ts4.5/test-helpers/dataURIs/vr_test_small_image.d.ts +0 -1
- package/dist/types-ts4.5/test-helpers/dataURIs/wideImageURI.d.ts +0 -1
- package/dist/types-ts4.5/test-helpers/dataURIs/wideTransparentImageURI.d.ts +0 -1
- package/dist/types-ts4.5/test-helpers/flushPromises.d.ts +0 -1
- package/dist/types-ts4.5/test-helpers/getJest.d.ts +0 -16
- package/dist/types-ts4.5/test-helpers/index.d.ts +0 -15
- package/dist/types-ts4.5/test-helpers/jestHelpers.d.ts +0 -13
- package/dist/types-ts4.5/test-helpers/nextTick.d.ts +0 -2
- package/dist/types-ts4.5/test-helpers/timeoutPromise.d.ts +0 -1
- package/dist/types-ts4.5/utils/helpers.d.ts +0 -10
- package/tmp/api-report-tmp.d.ts +0 -254
|
@@ -4,9 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.flushPromises = void 0;
|
|
7
|
-
var flushPromises = function flushPromises() {
|
|
7
|
+
var flushPromises = exports.flushPromises = function flushPromises() {
|
|
8
8
|
return new Promise(function (resolve) {
|
|
9
9
|
return setImmediate(resolve);
|
|
10
10
|
});
|
|
11
|
-
};
|
|
12
|
-
exports.flushPromises = flushPromises;
|
|
11
|
+
};
|
|
@@ -32,7 +32,6 @@ var mockJest = function mockJest() {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
// ED-15806 Required as some examples currently use test modules and complain about not having `jest`.
|
|
35
|
-
var getJest = function getJest() {
|
|
35
|
+
var getJest = exports.getJest = function getJest() {
|
|
36
36
|
return typeof jest === 'undefined' ? mockJest() : jest;
|
|
37
|
-
};
|
|
38
|
-
exports.getJest = getJest;
|
|
37
|
+
};
|
|
@@ -6,37 +6,29 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.expectToEqual = exports.expectFunctionToHaveBeenCalledWith = exports.expectConstructorToHaveBeenCalledWith = exports.asMockReturnValue = exports.asMockFunctionReturnValue = exports.asMockFunctionResolvedValue = exports.asMockFunction = exports.asMock = void 0;
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
-
var asMock = function asMock(fn) {
|
|
9
|
+
var asMock = exports.asMock = function asMock(fn) {
|
|
10
10
|
return fn;
|
|
11
11
|
};
|
|
12
|
-
exports.
|
|
13
|
-
var asMockFunction = function asMockFunction(fn) {
|
|
12
|
+
var asMockFunction = exports.asMockFunction = function asMockFunction(fn) {
|
|
14
13
|
return fn;
|
|
15
14
|
};
|
|
16
|
-
exports.
|
|
17
|
-
var asMockReturnValue = function asMockReturnValue(fn, returnValue) {
|
|
15
|
+
var asMockReturnValue = exports.asMockReturnValue = function asMockReturnValue(fn, returnValue) {
|
|
18
16
|
return asMock(fn).mockReturnValue(returnValue);
|
|
19
17
|
};
|
|
20
|
-
exports.
|
|
21
|
-
var asMockFunctionReturnValue = function asMockFunctionReturnValue(fn, returnValue) {
|
|
18
|
+
var asMockFunctionReturnValue = exports.asMockFunctionReturnValue = function asMockFunctionReturnValue(fn, returnValue) {
|
|
22
19
|
return asMockFunction(fn).mockReturnValue(returnValue);
|
|
23
20
|
};
|
|
24
|
-
exports.
|
|
25
|
-
var asMockFunctionResolvedValue = function asMockFunctionResolvedValue(fn, resolveValue) {
|
|
21
|
+
var asMockFunctionResolvedValue = exports.asMockFunctionResolvedValue = function asMockFunctionResolvedValue(fn, resolveValue) {
|
|
26
22
|
return asMockFunction(fn).mockResolvedValue(resolveValue);
|
|
27
23
|
};
|
|
28
|
-
exports.
|
|
29
|
-
var expectToEqual = function expectToEqual(actual, expected) {
|
|
24
|
+
var expectToEqual = exports.expectToEqual = function expectToEqual(actual, expected) {
|
|
30
25
|
return expect(actual).toEqual(expected);
|
|
31
26
|
};
|
|
32
|
-
exports.
|
|
33
|
-
var expectConstructorToHaveBeenCalledWith = function expectConstructorToHaveBeenCalledWith(func, expectedArgs) {
|
|
27
|
+
var expectConstructorToHaveBeenCalledWith = exports.expectConstructorToHaveBeenCalledWith = function expectConstructorToHaveBeenCalledWith(func, expectedArgs) {
|
|
34
28
|
var _expect;
|
|
35
29
|
return (_expect = expect(func)).toHaveBeenCalledWith.apply(_expect, (0, _toConsumableArray2.default)(expectedArgs));
|
|
36
30
|
};
|
|
37
|
-
exports.
|
|
38
|
-
var expectFunctionToHaveBeenCalledWith = function expectFunctionToHaveBeenCalledWith(func, expectedArgs) {
|
|
31
|
+
var expectFunctionToHaveBeenCalledWith = exports.expectFunctionToHaveBeenCalledWith = function expectFunctionToHaveBeenCalledWith(func, expectedArgs) {
|
|
39
32
|
var _expect2;
|
|
40
33
|
return (_expect2 = expect(func)).toHaveBeenCalledWith.apply(_expect2, (0, _toConsumableArray2.default)(expectedArgs));
|
|
41
|
-
};
|
|
42
|
-
exports.expectFunctionToHaveBeenCalledWith = expectFunctionToHaveBeenCalledWith;
|
|
34
|
+
};
|
|
@@ -4,14 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.sleep = exports.nextTick = void 0;
|
|
7
|
-
var nextTick = function nextTick() {
|
|
7
|
+
var nextTick = exports.nextTick = function nextTick() {
|
|
8
8
|
return Promise.resolve();
|
|
9
9
|
};
|
|
10
|
-
exports.
|
|
11
|
-
var sleep = function sleep() {
|
|
10
|
+
var sleep = exports.sleep = function sleep() {
|
|
12
11
|
var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
13
12
|
return new Promise(function (resolve) {
|
|
14
13
|
return window.setTimeout(resolve, time);
|
|
15
14
|
});
|
|
16
|
-
};
|
|
17
|
-
exports.sleep = sleep;
|
|
15
|
+
};
|
|
@@ -9,11 +9,10 @@ exports.getRandomHex = getRandomHex;
|
|
|
9
9
|
exports.pick = exports.omitBy = exports.matches = exports.isUndefined = void 0;
|
|
10
10
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
|
-
var isUndefined = function isUndefined(value) {
|
|
12
|
+
var isUndefined = exports.isUndefined = function isUndefined(value) {
|
|
13
13
|
return value === undefined;
|
|
14
14
|
};
|
|
15
|
-
exports.
|
|
16
|
-
var pick = function pick(obj) {
|
|
15
|
+
var pick = exports.pick = function pick(obj) {
|
|
17
16
|
var keys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
18
17
|
if (obj === undefined) {
|
|
19
18
|
return {};
|
|
@@ -24,17 +23,14 @@ var pick = function pick(obj) {
|
|
|
24
23
|
return keys.includes(k);
|
|
25
24
|
}));
|
|
26
25
|
};
|
|
27
|
-
exports.
|
|
28
|
-
var omitBy = function omitBy(obj, predicate) {
|
|
26
|
+
var omitBy = exports.omitBy = function omitBy(obj, predicate) {
|
|
29
27
|
return Object.fromEntries(Object.entries(obj).filter(function (_ref3) {
|
|
30
28
|
var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
|
|
31
|
-
k = _ref4[0],
|
|
32
29
|
v = _ref4[1];
|
|
33
30
|
return !predicate(v);
|
|
34
31
|
}));
|
|
35
32
|
};
|
|
36
|
-
exports.
|
|
37
|
-
var debounce = function debounce(func, wait) {
|
|
33
|
+
var debounce = exports.debounce = function debounce(func, wait) {
|
|
38
34
|
var timeout;
|
|
39
35
|
return function () {
|
|
40
36
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -46,8 +42,7 @@ var debounce = function debounce(func, wait) {
|
|
|
46
42
|
}, wait);
|
|
47
43
|
};
|
|
48
44
|
};
|
|
49
|
-
exports.
|
|
50
|
-
var matches = function matches(srcObj) {
|
|
45
|
+
var matches = exports.matches = function matches(srcObj) {
|
|
51
46
|
return function (obj) {
|
|
52
47
|
var key;
|
|
53
48
|
for (key in srcObj) {
|
|
@@ -58,7 +53,6 @@ var matches = function matches(srcObj) {
|
|
|
58
53
|
return true;
|
|
59
54
|
};
|
|
60
55
|
};
|
|
61
|
-
exports.matches = matches;
|
|
62
56
|
function getRandomHexValues(byte) {
|
|
63
57
|
return (0, _toConsumableArray2.default)(Array(byte * 2)).map(function () {
|
|
64
58
|
return Math.floor(Math.random() * 16).toString(16);
|
|
@@ -5,7 +5,7 @@ export const pick = (obj, keys = []) => {
|
|
|
5
5
|
}
|
|
6
6
|
return Object.fromEntries(Object.entries(obj).filter(([k]) => keys.includes(k)));
|
|
7
7
|
};
|
|
8
|
-
export const omitBy = (obj, predicate) => Object.fromEntries(Object.entries(obj).filter(([
|
|
8
|
+
export const omitBy = (obj, predicate) => Object.fromEntries(Object.entries(obj).filter(([, v]) => !predicate(v)));
|
|
9
9
|
export const debounce = (func, wait) => {
|
|
10
10
|
let timeout;
|
|
11
11
|
return (...args) => {
|
|
@@ -17,7 +17,6 @@ export var pick = function pick(obj) {
|
|
|
17
17
|
export var omitBy = function omitBy(obj, predicate) {
|
|
18
18
|
return Object.fromEntries(Object.entries(obj).filter(function (_ref3) {
|
|
19
19
|
var _ref4 = _slicedToArray(_ref3, 2),
|
|
20
|
-
k = _ref4[0],
|
|
21
20
|
v = _ref4[1];
|
|
22
21
|
return !predicate(v);
|
|
23
22
|
}));
|
package/package.json
CHANGED
package/report.api.md
CHANGED
|
@@ -142,7 +142,7 @@ export const matches: (srcObj: Object) => (obj: Object) => boolean;
|
|
|
142
142
|
|
|
143
143
|
// @public (undocumented)
|
|
144
144
|
export interface MediaFeatureFlags {
|
|
145
|
-
// (undocumented)
|
|
145
|
+
// @deprecated (undocumented)
|
|
146
146
|
captions?: boolean;
|
|
147
147
|
// (undocumented)
|
|
148
148
|
folderUploads?: boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ANALYTICS_MEDIA_CHANNEL = "media";
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export type { PackageAttributes, WithFileAttributes, FileAttributes, SuccessAttributes, FailureAttributes, OperationalAttributes, OperationalEventPayload, UIAttributes, UIEventPayload, ScreenAttributes, ScreenEventPayload, TrackAttributes, TrackEventPayload, ContextPublicAttributes, ContextStaticProps, } from './types';
|
|
2
|
-
export { withMediaAnalyticsContext } from './withMediaAnalyticsContext';
|
|
3
|
-
export { ANALYTICS_MEDIA_CHANNEL } from './constants';
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { GasCorePayload } from '@atlaskit/analytics-gas-types';
|
|
2
|
-
import { MEDIA_CONTEXT } from '@atlaskit/analytics-namespaced-context/MediaAnalyticsContext';
|
|
3
|
-
import { MediaType, FileStatus, WithMediaFeatureFlags, MediaTraceContext } from '..';
|
|
4
|
-
export type BaseAttributes = {};
|
|
5
|
-
export type PackageAttributes = {
|
|
6
|
-
packageName: string;
|
|
7
|
-
packageVersion: string;
|
|
8
|
-
componentName: string;
|
|
9
|
-
component: string;
|
|
10
|
-
};
|
|
11
|
-
export type BaseEventPayload<Attributes extends BaseAttributes> = Omit<GasCorePayload, 'attributes'> & {
|
|
12
|
-
attributes: Attributes;
|
|
13
|
-
};
|
|
14
|
-
export type FileAttributes = {
|
|
15
|
-
fileId: string;
|
|
16
|
-
fileSize?: number;
|
|
17
|
-
fileMediatype?: MediaType;
|
|
18
|
-
fileMimetype?: string;
|
|
19
|
-
fileSource?: string;
|
|
20
|
-
fileStatus?: FileStatus;
|
|
21
|
-
};
|
|
22
|
-
export type PerformanceAttributes = {
|
|
23
|
-
overall: {
|
|
24
|
-
durationSincePageStart: number;
|
|
25
|
-
durationSinceCommenced?: number;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
export type WithFileAttributes = {
|
|
29
|
-
fileAttributes: FileAttributes;
|
|
30
|
-
};
|
|
31
|
-
export type WithPerformanceAttributes = {
|
|
32
|
-
performanceAttributes?: PerformanceAttributes;
|
|
33
|
-
};
|
|
34
|
-
export type WithTraceContext = {
|
|
35
|
-
traceContext?: MediaTraceContext;
|
|
36
|
-
metadataTraceContext?: MediaTraceContext;
|
|
37
|
-
};
|
|
38
|
-
export type SuccessAttributes = {
|
|
39
|
-
status: 'success';
|
|
40
|
-
fileMediatype?: MediaType;
|
|
41
|
-
};
|
|
42
|
-
export type FailureAttributes = {
|
|
43
|
-
status: 'fail';
|
|
44
|
-
failReason: string;
|
|
45
|
-
error?: string;
|
|
46
|
-
errorDetail?: string;
|
|
47
|
-
};
|
|
48
|
-
export type StatusAttributes = SuccessAttributes | FailureAttributes;
|
|
49
|
-
export type OperationalAttributes = BaseAttributes | (BaseAttributes & WithFileAttributes) | (BaseAttributes & WithFileAttributes & StatusAttributes) | (BaseAttributes & WithFileAttributes & StatusAttributes & WithPerformanceAttributes & WithTraceContext);
|
|
50
|
-
export type OperationalEventPayload<Attributes extends OperationalAttributes, Action extends string, ActionSubject extends string, ActionSubjectId extends string = string> = BaseEventPayload<Attributes> & {
|
|
51
|
-
eventType: 'operational';
|
|
52
|
-
action: Action;
|
|
53
|
-
actionSubject: ActionSubject;
|
|
54
|
-
actionSubjectId?: ActionSubjectId;
|
|
55
|
-
};
|
|
56
|
-
export type UIAttributes = BaseAttributes | (BaseAttributes & WithFileAttributes);
|
|
57
|
-
export type UIEventPayload<Attributes extends UIAttributes, Action extends string, ActionSubject extends string> = BaseEventPayload<Attributes> & {
|
|
58
|
-
eventType: 'ui';
|
|
59
|
-
action: Action;
|
|
60
|
-
actionSubject: ActionSubject;
|
|
61
|
-
actionSubjectId?: string;
|
|
62
|
-
};
|
|
63
|
-
export type ScreenAttributes = BaseAttributes | (BaseAttributes & WithFileAttributes);
|
|
64
|
-
export type ScreenEventPayload<Attributes extends ScreenAttributes, ActionSubject extends string> = BaseEventPayload<Attributes> & {
|
|
65
|
-
eventType: 'screen';
|
|
66
|
-
actionSubject: ActionSubject;
|
|
67
|
-
name: ActionSubject;
|
|
68
|
-
};
|
|
69
|
-
export type TrackAttributes = BaseAttributes | (BaseAttributes & WithFileAttributes);
|
|
70
|
-
export type TrackEventPayload<Attributes extends TrackAttributes, Action extends string, ActionSubject extends string, ActionSubjectId extends string = string> = BaseEventPayload<Attributes> & {
|
|
71
|
-
eventType: 'track';
|
|
72
|
-
action: Action;
|
|
73
|
-
actionSubject: ActionSubject;
|
|
74
|
-
actionSubjectId?: ActionSubjectId;
|
|
75
|
-
};
|
|
76
|
-
export type ContextPublicAttributes = PackageAttributes;
|
|
77
|
-
export type ContextPrivateAttributes = WithMediaFeatureFlags;
|
|
78
|
-
export type ContextStaticProps = WithMediaFeatureFlags;
|
|
79
|
-
export type ContextData = ContextPublicAttributes & {
|
|
80
|
-
[MEDIA_CONTEXT]: ContextPrivateAttributes;
|
|
81
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ContextPublicAttributes } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* HOC for attaching MediaAnalyticsContext to a top-level React Component.
|
|
5
|
-
*
|
|
6
|
-
* Similar than "packages/analytics/analytics-next/src/hocs/withAnalyticsContext.tsx",
|
|
7
|
-
* except that we restrict attributes put in this context using ContextPublicAttributes and ContextPrivateAttributes.
|
|
8
|
-
*
|
|
9
|
-
* As a constraint, the wrapped React Component's props must extend ContextStaticProps.
|
|
10
|
-
*
|
|
11
|
-
* @param {ContextPublicAttributes} attributes public attributes to put in context
|
|
12
|
-
*
|
|
13
|
-
* @see packages/analytics/analytics-next/src/hocs/withAnalyticsContext.tsx
|
|
14
|
-
*/
|
|
15
|
-
export declare const withMediaAnalyticsContext: (contextPublicAttributes: ContextPublicAttributes) => <Props extends import("..").WithMediaFeatureFlags, Component extends React.ComponentType<Props>>(WrappedComponent: React.JSXElementConstructor<Props> & Component) => React.ForwardRefExoticComponent<React.PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Props>> & React.RefAttributes<any>>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export { downloadUrl } from './downloadUrl';
|
|
2
|
-
export type MediaType = 'doc' | 'audio' | 'video' | 'image' | 'archive' | 'unknown';
|
|
3
|
-
export type FileStatus = 'uploading' | 'processing' | 'processed' | 'error' | 'failed-processing';
|
|
4
|
-
export { getMediaFeatureFlag, defaultMediaFeatureFlags, filterFeatureFlagNames, getFeatureFlagKeysAllProducts, } from './mediaFeatureFlags';
|
|
5
|
-
export type { MediaFeatureFlags, WithMediaFeatureFlags, } from './mediaFeatureFlags';
|
|
6
|
-
export interface NumericalCardDimensions {
|
|
7
|
-
width: number;
|
|
8
|
-
height: number;
|
|
9
|
-
}
|
|
10
|
-
export type { PackageAttributes, WithFileAttributes, WithPerformanceAttributes, WithTraceContext, FileAttributes, PerformanceAttributes, SuccessAttributes, FailureAttributes, OperationalAttributes, OperationalEventPayload, UIAttributes, UIEventPayload, ScreenAttributes, ScreenEventPayload, TrackAttributes, TrackEventPayload, ContextPublicAttributes, ContextStaticProps, } from './analytics/types';
|
|
11
|
-
export { withMediaAnalyticsContext } from './analytics/withMediaAnalyticsContext';
|
|
12
|
-
export { ANALYTICS_MEDIA_CHANNEL } from './analytics/constants';
|
|
13
|
-
export { getMediaTypeFromMimeType, isImageMimeTypeSupportedByBrowser, isDocumentMimeTypeSupportedByBrowser, isVideoMimeTypeSupportedByBrowser, isMimeTypeSupportedByBrowser, isImageMimeTypeSupportedByServer, isDocumentMimeTypeSupportedByServer, isAudioMimeTypeSupportedByServer, isVideoMimeTypeSupportedByServer, isUnknownMimeTypeSupportedByServer, isMimeTypeSupportedByServer, } from './mediaTypeUtils';
|
|
14
|
-
export type SSR = 'client' | 'server';
|
|
15
|
-
export { isUndefined, pick, omitBy, debounce, matches, getRandomHex, } from './utils/helpers';
|
|
16
|
-
export type MediaTraceContext = {
|
|
17
|
-
traceId: string;
|
|
18
|
-
spanId?: string;
|
|
19
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getLocalMediaFeatureFlag: (key: string) => string | null;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns the first value for the flagName found in this priority
|
|
3
|
-
* 1: local storage
|
|
4
|
-
* 2: featureFlags parameter
|
|
5
|
-
* 3: defaults parameter
|
|
6
|
-
*/
|
|
7
|
-
export declare function getGenericFeatureFlag<T, K extends string, M extends Record<K, any>>(flagName: K, defaults: M, featureFlags?: Partial<M>): T;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { RequiredMediaFeatureFlags, MediaFeatureFlags } from './types';
|
|
2
|
-
export declare const filterFeatureFlagNames: (flags: RequiredMediaFeatureFlags) => Array<keyof MediaFeatureFlags>;
|
|
3
|
-
/**
|
|
4
|
-
* Takes a record of {Media Feature Flag Names → boolean}.
|
|
5
|
-
* Returns the Launch Darkly Keys from all products for each of the flags set as true in the input record.
|
|
6
|
-
* */
|
|
7
|
-
export declare const getFeatureFlagKeysAllProducts: () => Array<string>;
|
|
8
|
-
/**
|
|
9
|
-
* defaultMediaFeatureFlags set default values used by the getter function getMediaFeatureFlag
|
|
10
|
-
*
|
|
11
|
-
* *************************************
|
|
12
|
-
* ************* IMPORTANT *************
|
|
13
|
-
* *************************************
|
|
14
|
-
* Only in exceptional cases a FF should be 'true' by default.
|
|
15
|
-
* Making a flag default to 'true' can lead to confusing and unexpected scenarios.
|
|
16
|
-
* If you must set a flag default = true, whenever you remove that flag
|
|
17
|
-
* that change should be released as a MAJOR, because it's a breaking change.
|
|
18
|
-
*/
|
|
19
|
-
export declare const defaultMediaFeatureFlags: Required<MediaFeatureFlags>;
|
|
20
|
-
/**
|
|
21
|
-
* Public accessor from components to fallback to defaults if flags not passed,
|
|
22
|
-
* otherwise whatever product has set will be returned.
|
|
23
|
-
*
|
|
24
|
-
* To override locally for testing:
|
|
25
|
-
* - `localStorage[flagName] = true` to enable locally,
|
|
26
|
-
* - `delete localStorage[flagName]` to remove.
|
|
27
|
-
*
|
|
28
|
-
* (you will see a warning in console if override used)
|
|
29
|
-
* */
|
|
30
|
-
export declare function getMediaFeatureFlag<T = boolean>(flagName: keyof MediaFeatureFlags, featureFlags?: MediaFeatureFlags): T;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface MediaFeatureFlags {
|
|
2
|
-
captions?: boolean;
|
|
3
|
-
mediaInline?: boolean;
|
|
4
|
-
folderUploads?: boolean;
|
|
5
|
-
securedClipboard?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export interface WithMediaFeatureFlags {
|
|
8
|
-
featureFlags?: MediaFeatureFlags;
|
|
9
|
-
}
|
|
10
|
-
export type RequiredMediaFeatureFlags = Record<keyof Required<MediaFeatureFlags>, boolean>;
|
|
11
|
-
export type MediaFeatureFlagsMap = Record<keyof Required<MediaFeatureFlags>, string>;
|
|
12
|
-
export declare const supportedProducts: readonly [
|
|
13
|
-
"confluence",
|
|
14
|
-
"jira"
|
|
15
|
-
];
|
|
16
|
-
export type SupportedProduct = (typeof supportedProducts)[number];
|
|
17
|
-
export type ProductKeys = Record<SupportedProduct, MediaFeatureFlagsMap>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { MediaType } from '..';
|
|
2
|
-
export { isImageMimeTypeSupportedByBrowser, isDocumentMimeTypeSupportedByBrowser, isAudioMimeTypeSupportedByBrowser, isVideoMimeTypeSupportedByBrowser, isMimeTypeSupportedByBrowser, } from './isMimeTypeSupportedByBrowser';
|
|
3
|
-
export { isImageMimeTypeSupportedByServer, isDocumentMimeTypeSupportedByServer, isAudioMimeTypeSupportedByServer, isVideoMimeTypeSupportedByServer, isUnknownMimeTypeSupportedByServer, isMimeTypeSupportedByServer, } from './isMimeTypeSupportedByServer';
|
|
4
|
-
export declare const getMediaTypeFromMimeType: (mimeType: string) => MediaType;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isArchive: (mimeType: string) => boolean;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const isImageMimeTypeSupportedByBrowser: (mimeType: string) => boolean;
|
|
2
|
-
export declare const isDocumentMimeTypeSupportedByBrowser: (mimeType: string) => boolean;
|
|
3
|
-
export declare const isAudioMimeTypeSupportedByBrowser: (mimeType: string) => boolean;
|
|
4
|
-
/**
|
|
5
|
-
* For backward compatilbity, we assume MP4/MOV is natively supported.
|
|
6
|
-
* TODO: Improve detection of supported video formats by the browser.
|
|
7
|
-
*
|
|
8
|
-
* See related tickets:
|
|
9
|
-
* - https://product-fabric.atlassian.net/browse/MPT-477
|
|
10
|
-
* - https://product-fabric.atlassian.net/browse/EDM-634
|
|
11
|
-
* - https://product-fabric.atlassian.net/browse/EDM-426
|
|
12
|
-
*/
|
|
13
|
-
export declare const isVideoMimeTypeSupportedByBrowser: (mimeType: string) => boolean;
|
|
14
|
-
export declare const isMimeTypeSupportedByBrowser: (mimeType: string) => boolean;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const isImageMimeTypeSupportedByServer: (mimeType: string) => boolean;
|
|
2
|
-
export declare const isDocumentMimeTypeSupportedByServer: (mimeType: string) => boolean;
|
|
3
|
-
export declare const isAudioMimeTypeSupportedByServer: (mimeType: string) => boolean;
|
|
4
|
-
export declare const isVideoMimeTypeSupportedByServer: (mimeType: string) => boolean;
|
|
5
|
-
export declare const isUnknownMimeTypeSupportedByServer: (mimeType: string) => boolean;
|
|
6
|
-
export declare const isMimeTypeSupportedByServer: (mimeType: string) => boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function awaitError(response: Promise<Error>, expectedMessage: string): Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const smallImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAMAAAAbzM5ZAAAACVBMVEWs3t4AVFpMkZTmA5phAAAAUElEQVQokWNgxAIYGBkwAPUEGRkxBcG2oglC3YIiCHchkiCSu+GCKL4hYOYAC+IIJTRBsE4mIAKxmBB+hyIkmpAgDu0MyIIQi8hxJxZBLAAAEuQA45SJc9sAAAAASUVORK5CYII=";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const smallTransparentImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAABkCAYAAAD0ZHJ6AAALZUlEQVRogc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