@atlaskit/media-test-helpers 36.0.4 → 36.1.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 +14 -0
- package/dist/cjs/I18nWrapper.js +13 -14
- package/dist/cjs/exampleMediaItems.js +6 -1
- package/dist/cjs/featureFlagsWrapper/dropdown.js +7 -4
- package/dist/cjs/flushPromises.js +1 -0
- package/dist/cjs/index.js +6 -0
- package/dist/es2019/I18nWrapper.js +7 -13
- package/dist/es2019/exampleMediaItems.js +5 -0
- package/dist/es2019/featureFlagsWrapper/dropdown.js +7 -4
- package/dist/es2019/flushPromises.js +1 -0
- package/dist/es2019/index.js +1 -1
- package/dist/esm/I18nWrapper.js +13 -14
- package/dist/esm/exampleMediaItems.js +5 -0
- package/dist/esm/featureFlagsWrapper/dropdown.js +7 -4
- package/dist/esm/flushPromises.js +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/types/I18nWrapper.d.ts +2 -1
- package/dist/types/exampleMediaItems.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types-ts4.5/I18nWrapper.d.ts +2 -1
- package/dist/types-ts4.5/exampleMediaItems.d.ts +1 -0
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/package.json +14 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/media-test-helpers
|
|
2
2
|
|
|
3
|
+
## 36.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 36.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#164740](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/164740)
|
|
14
|
+
[`45ff07eba6b7f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/45ff07eba6b7f) -
|
|
15
|
+
Exposed new media item sample Video with Captions - I18Wrapper allows initial Locale as prop
|
|
16
|
+
|
|
3
17
|
## 36.0.4
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/cjs/I18nWrapper.js
CHANGED
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.I18NWrapper = void 0;
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
11
|
var _reactIntlNext = require("react-intl-next");
|
|
13
12
|
var _LocaleSelect = _interopRequireWildcard(require("@atlaskit/locale/LocaleSelect"));
|
|
@@ -20,22 +19,22 @@ function getMessages(localeValue) {
|
|
|
20
19
|
var langWithRegion = localeValue.replace('-', '_');
|
|
21
20
|
return _locales.locales[langWithRegion] || _locales.locales[lang];
|
|
22
21
|
}
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
return
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
}
|
|
22
|
+
var findLocale = function findLocale(initialLocale) {
|
|
23
|
+
return _LocaleSelect.defaultLocales.find(function (locale) {
|
|
24
|
+
return locale.value === initialLocale;
|
|
25
|
+
}) || initialLocale && _LocaleSelect.defaultLocales.find(function (locale) {
|
|
26
|
+
return locale.value.includes(initialLocale);
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
var defaultLocale = _LocaleSelect.defaultLocales[0];
|
|
29
30
|
var I18NWrapper = exports.I18NWrapper = function I18NWrapper(_ref) {
|
|
30
|
-
var children = _ref.children
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
value: 'en'
|
|
34
|
-
}),
|
|
31
|
+
var children = _ref.children,
|
|
32
|
+
initialLocale = _ref.initialLocale;
|
|
33
|
+
var _useState = (0, _react.useState)(findLocale(initialLocale) || defaultLocale),
|
|
35
34
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
36
35
|
locale = _useState2[0],
|
|
37
36
|
setLocale = _useState2[1];
|
|
38
|
-
var lang = locale.value
|
|
37
|
+
var lang = locale.value;
|
|
39
38
|
var messages = getMessages(locale.value);
|
|
40
39
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
41
40
|
xcss: localeBoxStyles
|
|
@@ -44,7 +43,7 @@ var I18NWrapper = exports.I18NWrapper = function I18NWrapper(_ref) {
|
|
|
44
43
|
}, "Language"), /*#__PURE__*/_react.default.createElement(_LocaleSelect.default, {
|
|
45
44
|
id: "media-locale-select",
|
|
46
45
|
onLocaleChange: setLocale,
|
|
47
|
-
|
|
46
|
+
defaultLocale: locale
|
|
48
47
|
})), /*#__PURE__*/_react.default.createElement(_reactIntlNext.IntlProvider, {
|
|
49
48
|
locale: lang,
|
|
50
49
|
messages: messages
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.zipJiraArchiveFileId = exports.zipItemMultipleFoldersAtRootId = exports.zipItemLargeInnerFileId = exports.zipFileWithNestedFolderId = exports.zipFileWithHtmlId = exports.zipFileId = exports.zipEncryptedFileId = exports.wideImageFileId = exports.vrVideoDetails = exports.videoSquareFileId = exports.videoProcessingFailedId = exports.videoLargeFileId = exports.videoHorizontalFileId = exports.videoFileId = exports.videoFileDetails = exports.verticalImageFileId = exports.unknownFileId = exports.unknownFileDetails = exports.smallImageFileId = exports.passwordProtectedPdfFileId = exports.noMetadataFileId = exports.largePdfFileId = exports.largeImageFileId = exports.imageFileId = exports.imageFileDetails = exports.htmlFileId = exports.gifFileId = exports.genericFileId = exports.genericFileDetails = exports.genericDataURI = exports.externalSmallImageIdentifier = exports.externalImageIdentifier = exports.externaBrokenlIdentifier = exports.errorFileId = exports.emptyImageFileId = exports.emailUnsupportedFileId = exports.emailFileId = exports.docFileId = exports.docFileDetails = exports.codeFileId = exports.bigDocFileId = exports.audioNoCoverFileId = exports.audioFileId = exports.audioFileDetails = exports.atlassianLogoUrl = exports.archiveFileId = exports.animatedFileId = void 0;
|
|
6
|
+
exports.zipJiraArchiveFileId = exports.zipItemMultipleFoldersAtRootId = exports.zipItemLargeInnerFileId = exports.zipFileWithNestedFolderId = exports.zipFileWithHtmlId = exports.zipFileId = exports.zipEncryptedFileId = exports.wideImageFileId = exports.vrVideoDetails = exports.videoSquareFileId = exports.videoProcessingFailedId = exports.videoMp4SaganAliensId = exports.videoLargeFileId = exports.videoHorizontalFileId = exports.videoFileId = exports.videoFileDetails = exports.verticalImageFileId = exports.unknownFileId = exports.unknownFileDetails = exports.smallImageFileId = exports.passwordProtectedPdfFileId = exports.noMetadataFileId = exports.largePdfFileId = exports.largeImageFileId = exports.imageFileId = exports.imageFileDetails = exports.htmlFileId = exports.gifFileId = exports.genericFileId = exports.genericFileDetails = exports.genericDataURI = exports.externalSmallImageIdentifier = exports.externalImageIdentifier = exports.externaBrokenlIdentifier = exports.errorFileId = exports.emptyImageFileId = exports.emailUnsupportedFileId = exports.emailFileId = exports.docFileId = exports.docFileDetails = exports.codeFileId = exports.bigDocFileId = exports.audioNoCoverFileId = exports.audioFileId = exports.audioFileDetails = exports.atlassianLogoUrl = exports.archiveFileId = exports.animatedFileId = void 0;
|
|
7
7
|
var _collectionNames = require("./collectionNames");
|
|
8
8
|
var _videoURI = require("./dataURIs/videoURI");
|
|
9
9
|
var _videoPreviewURI = require("./dataURIs/videoPreviewURI");
|
|
@@ -45,6 +45,11 @@ var videoLargeFileId = exports.videoLargeFileId = {
|
|
|
45
45
|
mediaItemType: fileType,
|
|
46
46
|
collectionName: _collectionNames.defaultCollectionName
|
|
47
47
|
};
|
|
48
|
+
var videoMp4SaganAliensId = exports.videoMp4SaganAliensId = {
|
|
49
|
+
id: '6643202c-6d5d-428a-9db1-69f98164f0f6',
|
|
50
|
+
mediaItemType: fileType,
|
|
51
|
+
collectionName: _collectionNames.defaultCollectionName
|
|
52
|
+
};
|
|
48
53
|
var videoSquareFileId = exports.videoSquareFileId = {
|
|
49
54
|
id: 'cdff20d6-2c0a-4d0d-b2a9-22cc728a0368',
|
|
50
55
|
mediaItemType: fileType,
|
|
@@ -9,13 +9,14 @@ exports.default = void 0;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
11
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
|
-
var _primitives = require("@atlaskit/primitives");
|
|
13
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
13
|
var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
15
14
|
var _helpers = require("./helpers");
|
|
16
15
|
var _crossCircleSelectClear = _interopRequireDefault(require("@atlaskit/icon/core/migration/cross-circle--select-clear"));
|
|
17
|
-
var _chevronDownHipchatChevronDown = _interopRequireDefault(require("@atlaskit/icon/
|
|
16
|
+
var _chevronDownHipchatChevronDown = _interopRequireDefault(require("@atlaskit/icon/core/migration/chevron-down--hipchat-chevron-down"));
|
|
18
17
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
18
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
|
+
var _primitives = require("@atlaskit/primitives");
|
|
19
20
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
20
21
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
21
22
|
var _popup = _interopRequireDefault(require("@atlaskit/popup"));
|
|
@@ -138,10 +139,12 @@ var MediaFeatureFlagsDropdown = function MediaFeatureFlagsDropdown(_ref6) {
|
|
|
138
139
|
iconAfter: /*#__PURE__*/_react.default.createElement(_chevronDownHipchatChevronDown.default, {
|
|
139
140
|
color: "currentColor",
|
|
140
141
|
label: "",
|
|
141
|
-
LEGACY_size: "small"
|
|
142
|
+
LEGACY_size: "small",
|
|
143
|
+
size: "small"
|
|
142
144
|
})
|
|
143
145
|
}), "Media Feature Flags");
|
|
144
|
-
}
|
|
146
|
+
},
|
|
147
|
+
shouldRenderToParent: (0, _platformFeatureFlags.fg)('should-render-to-parent-should-be-true-media-exif')
|
|
145
148
|
}), /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
146
149
|
content: "Reset all flags"
|
|
147
150
|
}, /*#__PURE__*/_react.default.createElement(_standardButton.default
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.flushPromises = void 0;
|
|
7
7
|
/** deprecated Use React Testing Library's waitFor like method instead */
|
|
8
|
+
// eslint-disable-next-line @atlaskit/platform/no-set-immediate
|
|
8
9
|
var flushPromises = exports.flushPromises = function flushPromises() {
|
|
9
10
|
return new Promise(function (resolve) {
|
|
10
11
|
return setImmediate(resolve);
|
package/dist/cjs/index.js
CHANGED
|
@@ -773,6 +773,12 @@ Object.defineProperty(exports, "videoLargeFileId", {
|
|
|
773
773
|
return _exampleMediaItems.videoLargeFileId;
|
|
774
774
|
}
|
|
775
775
|
});
|
|
776
|
+
Object.defineProperty(exports, "videoMp4SaganAliensId", {
|
|
777
|
+
enumerable: true,
|
|
778
|
+
get: function get() {
|
|
779
|
+
return _exampleMediaItems.videoMp4SaganAliensId;
|
|
780
|
+
}
|
|
781
|
+
});
|
|
776
782
|
Object.defineProperty(exports, "videoPreviewURI", {
|
|
777
783
|
enumerable: true,
|
|
778
784
|
get: function get() {
|
|
@@ -9,20 +9,14 @@ function getMessages(localeValue) {
|
|
|
9
9
|
const langWithRegion = localeValue.replace('-', '_');
|
|
10
10
|
return locales[langWithRegion] || locales[lang];
|
|
11
11
|
}
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
return result;
|
|
15
|
-
}
|
|
16
|
-
return [...result, locale];
|
|
17
|
-
}, []);
|
|
12
|
+
const findLocale = initialLocale => defaultLocales.find(locale => locale.value === initialLocale) || initialLocale && defaultLocales.find(locale => locale.value.includes(initialLocale));
|
|
13
|
+
const defaultLocale = defaultLocales[0];
|
|
18
14
|
export const I18NWrapper = ({
|
|
19
|
-
children
|
|
15
|
+
children,
|
|
16
|
+
initialLocale
|
|
20
17
|
}) => {
|
|
21
|
-
const [locale, setLocale] = useState(
|
|
22
|
-
|
|
23
|
-
value: 'en'
|
|
24
|
-
});
|
|
25
|
-
const lang = locale.value.substring(0, 2);
|
|
18
|
+
const [locale, setLocale] = useState(findLocale(initialLocale) || defaultLocale);
|
|
19
|
+
const lang = locale.value;
|
|
26
20
|
const messages = getMessages(locale.value);
|
|
27
21
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {
|
|
28
22
|
xcss: localeBoxStyles
|
|
@@ -31,7 +25,7 @@ export const I18NWrapper = ({
|
|
|
31
25
|
}, "Language"), /*#__PURE__*/React.createElement(LocaleSelect, {
|
|
32
26
|
id: "media-locale-select",
|
|
33
27
|
onLocaleChange: setLocale,
|
|
34
|
-
|
|
28
|
+
defaultLocale: locale
|
|
35
29
|
})), /*#__PURE__*/React.createElement(IntlProvider, {
|
|
36
30
|
locale: lang,
|
|
37
31
|
messages: messages
|
|
@@ -39,6 +39,11 @@ export const videoLargeFileId = {
|
|
|
39
39
|
mediaItemType: fileType,
|
|
40
40
|
collectionName
|
|
41
41
|
};
|
|
42
|
+
export const videoMp4SaganAliensId = {
|
|
43
|
+
id: '6643202c-6d5d-428a-9db1-69f98164f0f6',
|
|
44
|
+
mediaItemType: fileType,
|
|
45
|
+
collectionName
|
|
46
|
+
};
|
|
42
47
|
export const videoSquareFileId = {
|
|
43
48
|
id: 'cdff20d6-2c0a-4d0d-b2a9-22cc728a0368',
|
|
44
49
|
mediaItemType: fileType,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import { Stack, xcss } from '@atlaskit/primitives';
|
|
3
2
|
import React, { useState } from 'react';
|
|
4
3
|
import Textfield from '@atlaskit/textfield';
|
|
5
4
|
import { getMediaFeatureFlags, clearAllLocalFeatureFlags, setLocalFeatureFlag } from './helpers';
|
|
6
5
|
import SelectClearIcon from '@atlaskit/icon/core/migration/cross-circle--select-clear';
|
|
7
|
-
import HipchatChevronDownIcon from '@atlaskit/icon/
|
|
6
|
+
import HipchatChevronDownIcon from '@atlaskit/icon/core/migration/chevron-down--hipchat-chevron-down';
|
|
8
7
|
import Button from '@atlaskit/button/standard-button';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
+
import { Stack, xcss } from '@atlaskit/primitives';
|
|
9
10
|
import Tooltip from '@atlaskit/tooltip';
|
|
10
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
12
|
import styled from '@emotion/styled';
|
|
@@ -113,9 +114,11 @@ const MediaFeatureFlagsDropdown = ({
|
|
|
113
114
|
iconAfter: /*#__PURE__*/React.createElement(HipchatChevronDownIcon, {
|
|
114
115
|
color: "currentColor",
|
|
115
116
|
label: "",
|
|
116
|
-
LEGACY_size: "small"
|
|
117
|
+
LEGACY_size: "small",
|
|
118
|
+
size: "small"
|
|
117
119
|
})
|
|
118
|
-
}), "Media Feature Flags")
|
|
120
|
+
}), "Media Feature Flags"),
|
|
121
|
+
shouldRenderToParent: fg('should-render-to-parent-should-be-true-media-exif')
|
|
119
122
|
}), /*#__PURE__*/React.createElement(Tooltip, {
|
|
120
123
|
content: "Reset all flags"
|
|
121
124
|
}, /*#__PURE__*/React.createElement(Button
|
package/dist/es2019/index.js
CHANGED
|
@@ -9,7 +9,7 @@ export { waitUntil } from './waitUntil';
|
|
|
9
9
|
export { flushPromises } from './flushPromises';
|
|
10
10
|
export { Matrix } from './story-styles';
|
|
11
11
|
export { collectionNames, defaultCollectionName, defaultMediaPickerCollectionName, fileCollectionName, onlyAnimatedGifsCollectionName } from './collectionNames';
|
|
12
|
-
export { animatedFileId, archiveFileId, atlassianLogoUrl, audioFileDetails, audioFileId, audioNoCoverFileId, bigDocFileId, docFileDetails, docFileId, emptyImageFileId, errorFileId, externalImageIdentifier, externalSmallImageIdentifier, externaBrokenlIdentifier, genericDataURI, genericFileDetails, genericFileId, gifFileId, imageFileDetails, imageFileId, largeImageFileId, largePdfFileId, noMetadataFileId, passwordProtectedPdfFileId, smallImageFileId, unknownFileDetails, unknownFileId, verticalImageFileId, videoFileDetails, videoFileId, videoHorizontalFileId, videoLargeFileId, videoProcessingFailedId, videoSquareFileId, wideImageFileId, zipFileId, zipFileWithNestedFolderId, zipItemLargeInnerFileId, zipItemMultipleFoldersAtRootId, zipJiraArchiveFileId, zipEncryptedFileId, zipFileWithHtmlId, codeFileId, emailFileId, emailUnsupportedFileId, htmlFileId, vrVideoDetails } from './exampleMediaItems';
|
|
12
|
+
export { animatedFileId, archiveFileId, atlassianLogoUrl, audioFileDetails, audioFileId, audioNoCoverFileId, bigDocFileId, docFileDetails, docFileId, emptyImageFileId, errorFileId, externalImageIdentifier, externalSmallImageIdentifier, externaBrokenlIdentifier, genericDataURI, genericFileDetails, genericFileId, gifFileId, imageFileDetails, imageFileId, largeImageFileId, largePdfFileId, noMetadataFileId, passwordProtectedPdfFileId, smallImageFileId, unknownFileDetails, unknownFileId, verticalImageFileId, videoFileDetails, videoFileId, videoHorizontalFileId, videoLargeFileId, videoProcessingFailedId, videoSquareFileId, wideImageFileId, zipFileId, zipFileWithNestedFolderId, zipItemLargeInnerFileId, zipItemMultipleFoldersAtRootId, zipJiraArchiveFileId, zipEncryptedFileId, zipFileWithHtmlId, codeFileId, emailFileId, emailUnsupportedFileId, htmlFileId, videoMp4SaganAliensId, vrVideoDetails } from './exampleMediaItems';
|
|
13
13
|
export { createMouseEvent } from './createMouseEvent';
|
|
14
14
|
export { createTouchEvent } from './createTouchEvent';
|
|
15
15
|
export const authProviderBaseURL = 'https://media.staging.atl-paas.net/items';
|
package/dist/esm/I18nWrapper.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
2
|
import React, { useState } from 'react';
|
|
4
3
|
import { IntlProvider } from 'react-intl-next';
|
|
5
4
|
import LocaleSelect, { defaultLocales } from '@atlaskit/locale/LocaleSelect';
|
|
@@ -11,22 +10,22 @@ function getMessages(localeValue) {
|
|
|
11
10
|
var langWithRegion = localeValue.replace('-', '_');
|
|
12
11
|
return locales[langWithRegion] || locales[lang];
|
|
13
12
|
}
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
return
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
}
|
|
13
|
+
var findLocale = function findLocale(initialLocale) {
|
|
14
|
+
return defaultLocales.find(function (locale) {
|
|
15
|
+
return locale.value === initialLocale;
|
|
16
|
+
}) || initialLocale && defaultLocales.find(function (locale) {
|
|
17
|
+
return locale.value.includes(initialLocale);
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
var defaultLocale = defaultLocales[0];
|
|
20
21
|
export var I18NWrapper = function I18NWrapper(_ref) {
|
|
21
|
-
var children = _ref.children
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
value: 'en'
|
|
25
|
-
}),
|
|
22
|
+
var children = _ref.children,
|
|
23
|
+
initialLocale = _ref.initialLocale;
|
|
24
|
+
var _useState = useState(findLocale(initialLocale) || defaultLocale),
|
|
26
25
|
_useState2 = _slicedToArray(_useState, 2),
|
|
27
26
|
locale = _useState2[0],
|
|
28
27
|
setLocale = _useState2[1];
|
|
29
|
-
var lang = locale.value
|
|
28
|
+
var lang = locale.value;
|
|
30
29
|
var messages = getMessages(locale.value);
|
|
31
30
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {
|
|
32
31
|
xcss: localeBoxStyles
|
|
@@ -35,7 +34,7 @@ export var I18NWrapper = function I18NWrapper(_ref) {
|
|
|
35
34
|
}, "Language"), /*#__PURE__*/React.createElement(LocaleSelect, {
|
|
36
35
|
id: "media-locale-select",
|
|
37
36
|
onLocaleChange: setLocale,
|
|
38
|
-
|
|
37
|
+
defaultLocale: locale
|
|
39
38
|
})), /*#__PURE__*/React.createElement(IntlProvider, {
|
|
40
39
|
locale: lang,
|
|
41
40
|
messages: messages
|
|
@@ -39,6 +39,11 @@ export var videoLargeFileId = {
|
|
|
39
39
|
mediaItemType: fileType,
|
|
40
40
|
collectionName: collectionName
|
|
41
41
|
};
|
|
42
|
+
export var videoMp4SaganAliensId = {
|
|
43
|
+
id: '6643202c-6d5d-428a-9db1-69f98164f0f6',
|
|
44
|
+
mediaItemType: fileType,
|
|
45
|
+
collectionName: collectionName
|
|
46
|
+
};
|
|
42
47
|
export var videoSquareFileId = {
|
|
43
48
|
id: 'cdff20d6-2c0a-4d0d-b2a9-22cc728a0368',
|
|
44
49
|
mediaItemType: fileType,
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
-
import { Stack, xcss } from '@atlaskit/primitives';
|
|
5
4
|
import React, { useState } from 'react';
|
|
6
5
|
import Textfield from '@atlaskit/textfield';
|
|
7
6
|
import { getMediaFeatureFlags, clearAllLocalFeatureFlags, setLocalFeatureFlag } from './helpers';
|
|
8
7
|
import SelectClearIcon from '@atlaskit/icon/core/migration/cross-circle--select-clear';
|
|
9
|
-
import HipchatChevronDownIcon from '@atlaskit/icon/
|
|
8
|
+
import HipchatChevronDownIcon from '@atlaskit/icon/core/migration/chevron-down--hipchat-chevron-down';
|
|
10
9
|
import Button from '@atlaskit/button/standard-button';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
|
+
import { Stack, xcss } from '@atlaskit/primitives';
|
|
11
12
|
import Tooltip from '@atlaskit/tooltip';
|
|
12
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
14
|
import styled from '@emotion/styled';
|
|
@@ -128,10 +129,12 @@ var MediaFeatureFlagsDropdown = function MediaFeatureFlagsDropdown(_ref6) {
|
|
|
128
129
|
iconAfter: /*#__PURE__*/React.createElement(HipchatChevronDownIcon, {
|
|
129
130
|
color: "currentColor",
|
|
130
131
|
label: "",
|
|
131
|
-
LEGACY_size: "small"
|
|
132
|
+
LEGACY_size: "small",
|
|
133
|
+
size: "small"
|
|
132
134
|
})
|
|
133
135
|
}), "Media Feature Flags");
|
|
134
|
-
}
|
|
136
|
+
},
|
|
137
|
+
shouldRenderToParent: fg('should-render-to-parent-should-be-true-media-exif')
|
|
135
138
|
}), /*#__PURE__*/React.createElement(Tooltip, {
|
|
136
139
|
content: "Reset all flags"
|
|
137
140
|
}, /*#__PURE__*/React.createElement(Button
|
package/dist/esm/index.js
CHANGED
|
@@ -9,7 +9,7 @@ export { waitUntil } from './waitUntil';
|
|
|
9
9
|
export { flushPromises } from './flushPromises';
|
|
10
10
|
export { Matrix } from './story-styles';
|
|
11
11
|
export { collectionNames, defaultCollectionName, defaultMediaPickerCollectionName, fileCollectionName, onlyAnimatedGifsCollectionName } from './collectionNames';
|
|
12
|
-
export { animatedFileId, archiveFileId, atlassianLogoUrl, audioFileDetails, audioFileId, audioNoCoverFileId, bigDocFileId, docFileDetails, docFileId, emptyImageFileId, errorFileId, externalImageIdentifier, externalSmallImageIdentifier, externaBrokenlIdentifier, genericDataURI, genericFileDetails, genericFileId, gifFileId, imageFileDetails, imageFileId, largeImageFileId, largePdfFileId, noMetadataFileId, passwordProtectedPdfFileId, smallImageFileId, unknownFileDetails, unknownFileId, verticalImageFileId, videoFileDetails, videoFileId, videoHorizontalFileId, videoLargeFileId, videoProcessingFailedId, videoSquareFileId, wideImageFileId, zipFileId, zipFileWithNestedFolderId, zipItemLargeInnerFileId, zipItemMultipleFoldersAtRootId, zipJiraArchiveFileId, zipEncryptedFileId, zipFileWithHtmlId, codeFileId, emailFileId, emailUnsupportedFileId, htmlFileId, vrVideoDetails } from './exampleMediaItems';
|
|
12
|
+
export { animatedFileId, archiveFileId, atlassianLogoUrl, audioFileDetails, audioFileId, audioNoCoverFileId, bigDocFileId, docFileDetails, docFileId, emptyImageFileId, errorFileId, externalImageIdentifier, externalSmallImageIdentifier, externaBrokenlIdentifier, genericDataURI, genericFileDetails, genericFileId, gifFileId, imageFileDetails, imageFileId, largeImageFileId, largePdfFileId, noMetadataFileId, passwordProtectedPdfFileId, smallImageFileId, unknownFileDetails, unknownFileId, verticalImageFileId, videoFileDetails, videoFileId, videoHorizontalFileId, videoLargeFileId, videoProcessingFailedId, videoSquareFileId, wideImageFileId, zipFileId, zipFileWithNestedFolderId, zipItemLargeInnerFileId, zipItemMultipleFoldersAtRootId, zipJiraArchiveFileId, zipEncryptedFileId, zipFileWithHtmlId, codeFileId, emailFileId, emailUnsupportedFileId, htmlFileId, videoMp4SaganAliensId, vrVideoDetails } from './exampleMediaItems';
|
|
13
13
|
export { createMouseEvent } from './createMouseEvent';
|
|
14
14
|
export { createTouchEvent } from './createTouchEvent';
|
|
15
15
|
export var authProviderBaseURL = 'https://media.staging.atl-paas.net/items';
|
|
@@ -5,5 +5,6 @@ export interface I18NWrapperState {
|
|
|
5
5
|
}
|
|
6
6
|
export interface I18NWrapperProps {
|
|
7
7
|
children: React.ReactNode;
|
|
8
|
+
initialLocale?: string;
|
|
8
9
|
}
|
|
9
|
-
export declare const I18NWrapper: ({ children }: I18NWrapperProps) => React.JSX.Element;
|
|
10
|
+
export declare const I18NWrapper: ({ children, initialLocale }: I18NWrapperProps) => React.JSX.Element;
|
|
@@ -5,6 +5,7 @@ export declare const audioNoCoverFileId: FileIdentifier;
|
|
|
5
5
|
export declare const videoFileId: FileIdentifier;
|
|
6
6
|
export declare const videoHorizontalFileId: FileIdentifier;
|
|
7
7
|
export declare const videoLargeFileId: FileIdentifier;
|
|
8
|
+
export declare const videoMp4SaganAliensId: FileIdentifier;
|
|
8
9
|
export declare const videoSquareFileId: FileIdentifier;
|
|
9
10
|
export declare const videoProcessingFailedId: FileIdentifier;
|
|
10
11
|
export declare const imageFileId: FileIdentifier;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export { waitUntil } from './waitUntil';
|
|
|
10
10
|
export { flushPromises } from './flushPromises';
|
|
11
11
|
export { Matrix } from './story-styles';
|
|
12
12
|
export { collectionNames, defaultCollectionName, defaultMediaPickerCollectionName, fileCollectionName, onlyAnimatedGifsCollectionName, } from './collectionNames';
|
|
13
|
-
export { animatedFileId, archiveFileId, atlassianLogoUrl, audioFileDetails, audioFileId, audioNoCoverFileId, bigDocFileId, docFileDetails, docFileId, emptyImageFileId, errorFileId, externalImageIdentifier, externalSmallImageIdentifier, externaBrokenlIdentifier, genericDataURI, genericFileDetails, genericFileId, gifFileId, imageFileDetails, imageFileId, largeImageFileId, largePdfFileId, noMetadataFileId, passwordProtectedPdfFileId, smallImageFileId, unknownFileDetails, unknownFileId, verticalImageFileId, videoFileDetails, videoFileId, videoHorizontalFileId, videoLargeFileId, videoProcessingFailedId, videoSquareFileId, wideImageFileId, zipFileId, zipFileWithNestedFolderId, zipItemLargeInnerFileId, zipItemMultipleFoldersAtRootId, zipJiraArchiveFileId, zipEncryptedFileId, zipFileWithHtmlId, codeFileId, emailFileId, emailUnsupportedFileId, htmlFileId, vrVideoDetails, } from './exampleMediaItems';
|
|
13
|
+
export { animatedFileId, archiveFileId, atlassianLogoUrl, audioFileDetails, audioFileId, audioNoCoverFileId, bigDocFileId, docFileDetails, docFileId, emptyImageFileId, errorFileId, externalImageIdentifier, externalSmallImageIdentifier, externaBrokenlIdentifier, genericDataURI, genericFileDetails, genericFileId, gifFileId, imageFileDetails, imageFileId, largeImageFileId, largePdfFileId, noMetadataFileId, passwordProtectedPdfFileId, smallImageFileId, unknownFileDetails, unknownFileId, verticalImageFileId, videoFileDetails, videoFileId, videoHorizontalFileId, videoLargeFileId, videoProcessingFailedId, videoSquareFileId, wideImageFileId, zipFileId, zipFileWithNestedFolderId, zipItemLargeInnerFileId, zipItemMultipleFoldersAtRootId, zipJiraArchiveFileId, zipEncryptedFileId, zipFileWithHtmlId, codeFileId, emailFileId, emailUnsupportedFileId, htmlFileId, videoMp4SaganAliensId, vrVideoDetails, } from './exampleMediaItems';
|
|
14
14
|
export { createMouseEvent } from './createMouseEvent';
|
|
15
15
|
export type { MouseEventProps } from './createMouseEvent';
|
|
16
16
|
export { createTouchEvent } from './createTouchEvent';
|
|
@@ -5,5 +5,6 @@ export interface I18NWrapperState {
|
|
|
5
5
|
}
|
|
6
6
|
export interface I18NWrapperProps {
|
|
7
7
|
children: React.ReactNode;
|
|
8
|
+
initialLocale?: string;
|
|
8
9
|
}
|
|
9
|
-
export declare const I18NWrapper: ({ children }: I18NWrapperProps) => React.JSX.Element;
|
|
10
|
+
export declare const I18NWrapper: ({ children, initialLocale }: I18NWrapperProps) => React.JSX.Element;
|
|
@@ -5,6 +5,7 @@ export declare const audioNoCoverFileId: FileIdentifier;
|
|
|
5
5
|
export declare const videoFileId: FileIdentifier;
|
|
6
6
|
export declare const videoHorizontalFileId: FileIdentifier;
|
|
7
7
|
export declare const videoLargeFileId: FileIdentifier;
|
|
8
|
+
export declare const videoMp4SaganAliensId: FileIdentifier;
|
|
8
9
|
export declare const videoSquareFileId: FileIdentifier;
|
|
9
10
|
export declare const videoProcessingFailedId: FileIdentifier;
|
|
10
11
|
export declare const imageFileId: FileIdentifier;
|
|
@@ -10,7 +10,7 @@ export { waitUntil } from './waitUntil';
|
|
|
10
10
|
export { flushPromises } from './flushPromises';
|
|
11
11
|
export { Matrix } from './story-styles';
|
|
12
12
|
export { collectionNames, defaultCollectionName, defaultMediaPickerCollectionName, fileCollectionName, onlyAnimatedGifsCollectionName, } from './collectionNames';
|
|
13
|
-
export { animatedFileId, archiveFileId, atlassianLogoUrl, audioFileDetails, audioFileId, audioNoCoverFileId, bigDocFileId, docFileDetails, docFileId, emptyImageFileId, errorFileId, externalImageIdentifier, externalSmallImageIdentifier, externaBrokenlIdentifier, genericDataURI, genericFileDetails, genericFileId, gifFileId, imageFileDetails, imageFileId, largeImageFileId, largePdfFileId, noMetadataFileId, passwordProtectedPdfFileId, smallImageFileId, unknownFileDetails, unknownFileId, verticalImageFileId, videoFileDetails, videoFileId, videoHorizontalFileId, videoLargeFileId, videoProcessingFailedId, videoSquareFileId, wideImageFileId, zipFileId, zipFileWithNestedFolderId, zipItemLargeInnerFileId, zipItemMultipleFoldersAtRootId, zipJiraArchiveFileId, zipEncryptedFileId, zipFileWithHtmlId, codeFileId, emailFileId, emailUnsupportedFileId, htmlFileId, vrVideoDetails, } from './exampleMediaItems';
|
|
13
|
+
export { animatedFileId, archiveFileId, atlassianLogoUrl, audioFileDetails, audioFileId, audioNoCoverFileId, bigDocFileId, docFileDetails, docFileId, emptyImageFileId, errorFileId, externalImageIdentifier, externalSmallImageIdentifier, externaBrokenlIdentifier, genericDataURI, genericFileDetails, genericFileId, gifFileId, imageFileDetails, imageFileId, largeImageFileId, largePdfFileId, noMetadataFileId, passwordProtectedPdfFileId, smallImageFileId, unknownFileDetails, unknownFileId, verticalImageFileId, videoFileDetails, videoFileId, videoHorizontalFileId, videoLargeFileId, videoProcessingFailedId, videoSquareFileId, wideImageFileId, zipFileId, zipFileWithNestedFolderId, zipItemLargeInnerFileId, zipItemMultipleFoldersAtRootId, zipJiraArchiveFileId, zipEncryptedFileId, zipFileWithHtmlId, codeFileId, emailFileId, emailUnsupportedFileId, htmlFileId, videoMp4SaganAliensId, vrVideoDetails, } from './exampleMediaItems';
|
|
14
14
|
export { createMouseEvent } from './createMouseEvent';
|
|
15
15
|
export type { MouseEventProps } from './createMouseEvent';
|
|
16
16
|
export { createTouchEvent } from './createTouchEvent';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-test-helpers",
|
|
3
|
-
"version": "36.
|
|
3
|
+
"version": "36.1.1",
|
|
4
4
|
"description": "Collection of test helpers used in media component stories and specs",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -29,17 +29,18 @@
|
|
|
29
29
|
"@atlaskit/button": "^23.2.0",
|
|
30
30
|
"@atlaskit/checkbox": "^17.1.0",
|
|
31
31
|
"@atlaskit/form": "^12.0.0",
|
|
32
|
-
"@atlaskit/icon": "^
|
|
32
|
+
"@atlaskit/icon": "^27.0.0",
|
|
33
33
|
"@atlaskit/locale": "^3.0.0",
|
|
34
|
-
"@atlaskit/media-client": "^33.
|
|
35
|
-
"@atlaskit/media-common": "^12.
|
|
36
|
-
"@atlaskit/media-ui": "^28.
|
|
34
|
+
"@atlaskit/media-client": "^33.4.0",
|
|
35
|
+
"@atlaskit/media-common": "^12.2.0",
|
|
36
|
+
"@atlaskit/media-ui": "^28.3.0",
|
|
37
|
+
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
37
38
|
"@atlaskit/popup": "^4.3.0",
|
|
38
39
|
"@atlaskit/primitives": "^14.8.0",
|
|
39
40
|
"@atlaskit/tabs": "^18.1.0",
|
|
40
41
|
"@atlaskit/textfield": "^8.0.0",
|
|
41
|
-
"@atlaskit/tokens": "^5.
|
|
42
|
-
"@atlaskit/tooltip": "^20.
|
|
42
|
+
"@atlaskit/tokens": "^5.2.0",
|
|
43
|
+
"@atlaskit/tooltip": "^20.3.0",
|
|
43
44
|
"@atlaskit/ufo": "^0.4.0",
|
|
44
45
|
"@babel/runtime": "^7.0.0",
|
|
45
46
|
"@emotion/react": "^11.7.1",
|
|
@@ -91,5 +92,10 @@
|
|
|
91
92
|
},
|
|
92
93
|
"sideEffects": [
|
|
93
94
|
"*.compiled.css"
|
|
94
|
-
]
|
|
95
|
+
],
|
|
96
|
+
"platform-feature-flags": {
|
|
97
|
+
"should-render-to-parent-should-be-true-media-exif": {
|
|
98
|
+
"type": "boolean"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
95
101
|
}
|