@atlaskit/media-test-helpers 42.2.8 → 42.3.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 +26 -0
- package/dist/cjs/I18nWrapper.js +2 -2
- package/dist/cjs/clipboardEventMocks.js +0 -1
- package/dist/cjs/docs-content-tabs.js +7 -6
- package/dist/cjs/featureFlagsWrapper/dropdown.js +7 -7
- package/dist/cjs/jestHelpers.js +0 -3
- package/dist/es2019/I18nWrapper.js +1 -1
- package/dist/es2019/clipboardEventMocks.js +0 -1
- package/dist/es2019/docs-content-tabs.js +4 -1
- package/dist/es2019/featureFlagsWrapper/dropdown.js +4 -4
- package/dist/es2019/jestHelpers.js +0 -3
- package/dist/esm/I18nWrapper.js +1 -1
- package/dist/esm/clipboardEventMocks.js +0 -1
- package/dist/esm/docs-content-tabs.js +4 -1
- package/dist/esm/featureFlagsWrapper/dropdown.js +4 -4
- package/dist/esm/jestHelpers.js +0 -3
- package/dist/types/authProvider.d.ts +1 -1
- package/dist/types/fakeMediaClient.d.ts +1 -1
- package/dist/types/fileStateFactory/factory/factory.d.ts +1 -1
- package/dist/types/getMediaAuthProvider.d.ts +1 -1
- package/dist/types/mediaClientProvider.d.ts +1 -1
- package/dist/types/mediaPickerAuthProvider.d.ts +1 -1
- package/dist/types/mockData/index.d.ts +1 -1
- package/dist/types/mocks/database/index.d.ts +1 -1
- package/dist/types/ufoLogger.d.ts +1 -1
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @atlaskit/media-test-helpers
|
|
2
2
|
|
|
3
|
+
## 42.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`d82e6f76528ab`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d82e6f76528ab) -
|
|
8
|
+
Add direct subpath package exports as part of the linking-platform, search, media, and
|
|
9
|
+
design-system barrel-removal (de-barrel) migration.
|
|
10
|
+
|
|
11
|
+
These packages now expose their individual modules via explicit `package.json` `exports` subpaths
|
|
12
|
+
so that consumers can import directly from the leaf module (e.g. `@atlaskit/pkg/thing`) instead of
|
|
13
|
+
the package barrel/index. This adds new public entry points without changing or removing any
|
|
14
|
+
existing exports, so it is a backwards-compatible additive change.
|
|
15
|
+
|
|
16
|
+
No runtime behaviour changes; this is an API-surface (entry-point) addition to support
|
|
17
|
+
tree-shaking and to unblock removal of the barrel index files.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
23
|
+
## 42.2.9
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
3
29
|
## 42.2.8
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/dist/cjs/I18nWrapper.js
CHANGED
|
@@ -13,7 +13,7 @@ var _LocaleSelect = _interopRequireDefault(require("@atlaskit/locale/LocaleSelec
|
|
|
13
13
|
var _defaultLocales = _interopRequireDefault(require("@atlaskit/locale/default-locales"));
|
|
14
14
|
var _locales = require("@atlaskit/media-ui/locales");
|
|
15
15
|
var _primitives = require("@atlaskit/primitives");
|
|
16
|
-
var
|
|
16
|
+
var _default = require("@atlaskit/form/label/default");
|
|
17
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
18
18
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
19
19
|
|
|
@@ -41,7 +41,7 @@ var I18NWrapper = exports.I18NWrapper = function I18NWrapper(_ref) {
|
|
|
41
41
|
var messages = getMessages(locale.value);
|
|
42
42
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
43
43
|
xcss: localeBoxStyles
|
|
44
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
44
|
+
}, /*#__PURE__*/_react.default.createElement(_default.Label, {
|
|
45
45
|
htmlFor: "media-locale-select"
|
|
46
46
|
}, "Language"), /*#__PURE__*/_react.default.createElement(_LocaleSelect.default, {
|
|
47
47
|
id: "media-locale-select",
|
|
@@ -51,7 +51,6 @@ var ClipboardMockFile = exports.ClipboardMockFile = /*#__PURE__*/function () {
|
|
|
51
51
|
value: function arrayBuffer() {
|
|
52
52
|
return Promise.resolve(new ArrayBuffer(0));
|
|
53
53
|
}
|
|
54
|
-
// @ts-ignore: https://github.com/microsoft/TypeScript/issues/52166
|
|
55
54
|
}, {
|
|
56
55
|
key: "stream",
|
|
57
56
|
value: function stream() {
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.DocsContentTabs = void 0;
|
|
9
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
9
|
var _react = require("@emotion/react");
|
|
11
|
-
var _tabs =
|
|
12
|
-
|
|
10
|
+
var _tabs = _interopRequireDefault(require("@atlaskit/tabs/tabs"));
|
|
11
|
+
var _tab = _interopRequireDefault(require("@atlaskit/tabs/tab"));
|
|
12
|
+
var _tabList = _interopRequireDefault(require("@atlaskit/tabs/tab-list"));
|
|
13
|
+
var _useTabPanel = _interopRequireDefault(require("@atlaskit/tabs/use-tab-panel"));
|
|
13
14
|
/**
|
|
14
15
|
* @jsxRuntime classic
|
|
15
16
|
* @jsx jsx
|
|
@@ -25,7 +26,7 @@ var panelStyle = (0, _react.css)({
|
|
|
25
26
|
});
|
|
26
27
|
var CustomTabPanel = function CustomTabPanel(_ref) {
|
|
27
28
|
var children = _ref.children;
|
|
28
|
-
var context = (0,
|
|
29
|
+
var context = (0, _useTabPanel.default)();
|
|
29
30
|
return (0, _react.jsx)("div", (0, _extends2.default)({
|
|
30
31
|
css: panelStyle
|
|
31
32
|
}, context), children);
|
|
@@ -35,9 +36,9 @@ var DocsContentTabs = exports.DocsContentTabs = function DocsContentTabs(_ref2)
|
|
|
35
36
|
tabs = _ref2$tabs === void 0 ? [] : _ref2$tabs;
|
|
36
37
|
return (0, _react.jsx)(_tabs.default, {
|
|
37
38
|
id: "default"
|
|
38
|
-
}, (0, _react.jsx)(
|
|
39
|
+
}, (0, _react.jsx)(_tabList.default, null, tabs.map(function (_ref3, idx) {
|
|
39
40
|
var name = _ref3.name;
|
|
40
|
-
return (0, _react.jsx)(
|
|
41
|
+
return (0, _react.jsx)(_tab.default, {
|
|
41
42
|
key: idx
|
|
42
43
|
}, name);
|
|
43
44
|
})), tabs.map(function (_ref4, idx) {
|
|
@@ -10,16 +10,16 @@ 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
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
var
|
|
13
|
+
var _textField = _interopRequireDefault(require("@atlaskit/textfield/text-field"));
|
|
14
14
|
var _helpers = require("./helpers");
|
|
15
15
|
var _crossCircle = _interopRequireDefault(require("@atlaskit/icon/core/cross-circle"));
|
|
16
16
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-down"));
|
|
17
17
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
18
18
|
var _primitives = require("@atlaskit/primitives");
|
|
19
|
-
var
|
|
19
|
+
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
20
20
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
21
|
-
var _popup =
|
|
22
|
-
var _checkbox = require("@atlaskit/checkbox");
|
|
21
|
+
var _popup = require("@atlaskit/popup/popup");
|
|
22
|
+
var _checkbox = require("@atlaskit/checkbox/checkbox");
|
|
23
23
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
24
24
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
25
25
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
@@ -64,7 +64,7 @@ var TextFieldItem = function TextFieldItem(_ref2) {
|
|
|
64
64
|
}, 500);
|
|
65
65
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("label", {
|
|
66
66
|
htmlFor: "media-feature-flag-text-".concat(name)
|
|
67
|
-
}, camelCaseToSentenceCase(name), ":"), /*#__PURE__*/_react.default.createElement(
|
|
67
|
+
}, camelCaseToSentenceCase(name), ":"), /*#__PURE__*/_react.default.createElement(_textField.default, {
|
|
68
68
|
name: "media-feature-flag-text-".concat(name),
|
|
69
69
|
defaultValue: value,
|
|
70
70
|
onChange: function onChange(e) {
|
|
@@ -120,7 +120,7 @@ var MediaFeatureFlagsDropdown = function MediaFeatureFlagsDropdown(_ref6) {
|
|
|
120
120
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
121
121
|
isOpen = _useState2[0],
|
|
122
122
|
setIsOpen = _useState2[1];
|
|
123
|
-
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_popup.
|
|
123
|
+
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_popup.Popup, {
|
|
124
124
|
isOpen: isOpen,
|
|
125
125
|
onClose: function onClose() {
|
|
126
126
|
return setIsOpen(false);
|
|
@@ -145,7 +145,7 @@ var MediaFeatureFlagsDropdown = function MediaFeatureFlagsDropdown(_ref6) {
|
|
|
145
145
|
}), "Media Feature Flags");
|
|
146
146
|
},
|
|
147
147
|
shouldRenderToParent: true
|
|
148
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
148
|
+
}), /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
149
149
|
content: "Reset all flags"
|
|
150
150
|
}, /*#__PURE__*/_react.default.createElement(_standardButton.default
|
|
151
151
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
package/dist/cjs/jestHelpers.js
CHANGED
|
@@ -23,7 +23,6 @@ var asMockFunctionResolvedValue = exports.asMockFunctionResolvedValue = function
|
|
|
23
23
|
};
|
|
24
24
|
var expectToEqual = exports.expectToEqual = function expectToEqual(actual, expected) {
|
|
25
25
|
return (
|
|
26
|
-
// @ts-ignore TS2339: Property `toEqual` does not exist on `typeAssertion`
|
|
27
26
|
// This was added when enrolling `@atlaskit/media-test-helpers` into JFE local consumption
|
|
28
27
|
expect(actual).toEqual(expected)
|
|
29
28
|
);
|
|
@@ -31,7 +30,6 @@ var expectToEqual = exports.expectToEqual = function expectToEqual(actual, expec
|
|
|
31
30
|
var expectConstructorToHaveBeenCalledWith = exports.expectConstructorToHaveBeenCalledWith = function expectConstructorToHaveBeenCalledWith(func, expectedArgs) {
|
|
32
31
|
var _expect;
|
|
33
32
|
return (
|
|
34
|
-
// @ts-ignore TS2339: Property `toHaveBeenCalledWith` does not exist on `typeAssertion`
|
|
35
33
|
// This was added when enrolling `@atlaskit/media-test-helpers` into JFE local consumption
|
|
36
34
|
(_expect = expect(func)).toHaveBeenCalledWith.apply(_expect, (0, _toConsumableArray2.default)(expectedArgs))
|
|
37
35
|
);
|
|
@@ -39,7 +37,6 @@ var expectConstructorToHaveBeenCalledWith = exports.expectConstructorToHaveBeenC
|
|
|
39
37
|
var expectFunctionToHaveBeenCalledWith = exports.expectFunctionToHaveBeenCalledWith = function expectFunctionToHaveBeenCalledWith(func, expectedArgs) {
|
|
40
38
|
var _expect2;
|
|
41
39
|
return (
|
|
42
|
-
// @ts-ignore TS2339: Property `toHaveBeenCalledWith` does not exist on `typeAssertion`
|
|
43
40
|
// This was added when enrolling `@atlaskit/media-test-helpers` into JFE local consumption
|
|
44
41
|
(_expect2 = expect(func)).toHaveBeenCalledWith.apply(_expect2, (0, _toConsumableArray2.default)(expectedArgs))
|
|
45
42
|
);
|
|
@@ -5,7 +5,7 @@ import defaultLocales from '@atlaskit/locale/default-locales';
|
|
|
5
5
|
import { locales } from '@atlaskit/media-ui/locales';
|
|
6
6
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
7
7
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
8
|
-
import { Label } from '@atlaskit/form';
|
|
8
|
+
import { Label } from '@atlaskit/form/label/default';
|
|
9
9
|
function getMessages(localeValue) {
|
|
10
10
|
const lang = localeValue.substring(0, 2);
|
|
11
11
|
const langWithRegion = localeValue.replace('-', '_');
|
|
@@ -6,7 +6,10 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
|
-
import Tabs
|
|
9
|
+
import Tabs from '@atlaskit/tabs/tabs';
|
|
10
|
+
import Tab from '@atlaskit/tabs/tab';
|
|
11
|
+
import TabList from '@atlaskit/tabs/tab-list';
|
|
12
|
+
import useTabPanel from '@atlaskit/tabs/use-tab-panel';
|
|
10
13
|
const panelStyle = css({
|
|
11
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
12
15
|
'> div': {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
|
-
import Textfield from '@atlaskit/textfield';
|
|
3
|
+
import Textfield from '@atlaskit/textfield/text-field';
|
|
4
4
|
import { getMediaFeatureFlags, clearAllLocalFeatureFlags, setLocalFeatureFlag } from './helpers';
|
|
5
5
|
import SelectClearIcon from '@atlaskit/icon/core/cross-circle';
|
|
6
6
|
import HipchatChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
7
7
|
import Button from '@atlaskit/button/standard-button';
|
|
8
8
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
9
9
|
import { Stack, xcss } from '@atlaskit/primitives';
|
|
10
|
-
import Tooltip from '@atlaskit/tooltip';
|
|
10
|
+
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
11
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
12
|
import styled from '@emotion/styled';
|
|
13
|
-
import Popup from '@atlaskit/popup';
|
|
14
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
13
|
+
import { Popup } from '@atlaskit/popup/popup';
|
|
14
|
+
import { Checkbox } from '@atlaskit/checkbox/checkbox';
|
|
15
15
|
import { debounce } from '@atlaskit/media-common';
|
|
16
16
|
const camelCaseToSentenceCase = text => {
|
|
17
17
|
var result = text.replace(/([A-Z])/g, ' $1');
|
|
@@ -4,14 +4,11 @@ export const asMockReturnValue = (fn, returnValue) => asMock(fn).mockReturnValue
|
|
|
4
4
|
export const asMockFunctionReturnValue = (fn, returnValue) => asMockFunction(fn).mockReturnValue(returnValue);
|
|
5
5
|
export const asMockFunctionResolvedValue = (fn, resolveValue) => asMockFunction(fn).mockResolvedValue(resolveValue);
|
|
6
6
|
export const expectToEqual = (actual, expected) =>
|
|
7
|
-
// @ts-ignore TS2339: Property `toEqual` does not exist on `typeAssertion`
|
|
8
7
|
// This was added when enrolling `@atlaskit/media-test-helpers` into JFE local consumption
|
|
9
8
|
expect(actual).toEqual(expected);
|
|
10
9
|
export const expectConstructorToHaveBeenCalledWith = (func, expectedArgs) =>
|
|
11
|
-
// @ts-ignore TS2339: Property `toHaveBeenCalledWith` does not exist on `typeAssertion`
|
|
12
10
|
// This was added when enrolling `@atlaskit/media-test-helpers` into JFE local consumption
|
|
13
11
|
expect(func).toHaveBeenCalledWith(...expectedArgs);
|
|
14
12
|
export const expectFunctionToHaveBeenCalledWith = (func, expectedArgs) =>
|
|
15
|
-
// @ts-ignore TS2339: Property `toHaveBeenCalledWith` does not exist on `typeAssertion`
|
|
16
13
|
// This was added when enrolling `@atlaskit/media-test-helpers` into JFE local consumption
|
|
17
14
|
expect(func).toHaveBeenCalledWith(...expectedArgs);
|
package/dist/esm/I18nWrapper.js
CHANGED
|
@@ -6,7 +6,7 @@ import defaultLocales from '@atlaskit/locale/default-locales';
|
|
|
6
6
|
import { locales } from '@atlaskit/media-ui/locales';
|
|
7
7
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
8
8
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
9
|
-
import { Label } from '@atlaskit/form';
|
|
9
|
+
import { Label } from '@atlaskit/form/label/default';
|
|
10
10
|
function getMessages(localeValue) {
|
|
11
11
|
var lang = localeValue.substring(0, 2);
|
|
12
12
|
var langWithRegion = localeValue.replace('-', '_');
|
|
@@ -44,7 +44,6 @@ export var ClipboardMockFile = /*#__PURE__*/function () {
|
|
|
44
44
|
value: function arrayBuffer() {
|
|
45
45
|
return Promise.resolve(new ArrayBuffer(0));
|
|
46
46
|
}
|
|
47
|
-
// @ts-ignore: https://github.com/microsoft/TypeScript/issues/52166
|
|
48
47
|
}, {
|
|
49
48
|
key: "stream",
|
|
50
49
|
value: function stream() {
|
|
@@ -6,7 +6,10 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
|
-
import Tabs
|
|
9
|
+
import Tabs from '@atlaskit/tabs/tabs';
|
|
10
|
+
import Tab from '@atlaskit/tabs/tab';
|
|
11
|
+
import TabList from '@atlaskit/tabs/tab-list';
|
|
12
|
+
import useTabPanel from '@atlaskit/tabs/use-tab-panel';
|
|
10
13
|
var panelStyle = css({
|
|
11
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
12
15
|
'> div': {
|
|
@@ -2,18 +2,18 @@ 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
4
|
import React, { useState } from 'react';
|
|
5
|
-
import Textfield from '@atlaskit/textfield';
|
|
5
|
+
import Textfield from '@atlaskit/textfield/text-field';
|
|
6
6
|
import { getMediaFeatureFlags, clearAllLocalFeatureFlags, setLocalFeatureFlag } from './helpers';
|
|
7
7
|
import SelectClearIcon from '@atlaskit/icon/core/cross-circle';
|
|
8
8
|
import HipchatChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
9
9
|
import Button from '@atlaskit/button/standard-button';
|
|
10
10
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
11
11
|
import { Stack, xcss } from '@atlaskit/primitives';
|
|
12
|
-
import Tooltip from '@atlaskit/tooltip';
|
|
12
|
+
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
13
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
14
14
|
import styled from '@emotion/styled';
|
|
15
|
-
import Popup from '@atlaskit/popup';
|
|
16
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
15
|
+
import { Popup } from '@atlaskit/popup/popup';
|
|
16
|
+
import { Checkbox } from '@atlaskit/checkbox/checkbox';
|
|
17
17
|
import { debounce } from '@atlaskit/media-common';
|
|
18
18
|
var camelCaseToSentenceCase = function camelCaseToSentenceCase(text) {
|
|
19
19
|
var result = text.replace(/([A-Z])/g, ' $1');
|
package/dist/esm/jestHelpers.js
CHANGED
|
@@ -16,7 +16,6 @@ export var asMockFunctionResolvedValue = function asMockFunctionResolvedValue(fn
|
|
|
16
16
|
};
|
|
17
17
|
export var expectToEqual = function expectToEqual(actual, expected) {
|
|
18
18
|
return (
|
|
19
|
-
// @ts-ignore TS2339: Property `toEqual` does not exist on `typeAssertion`
|
|
20
19
|
// This was added when enrolling `@atlaskit/media-test-helpers` into JFE local consumption
|
|
21
20
|
expect(actual).toEqual(expected)
|
|
22
21
|
);
|
|
@@ -24,7 +23,6 @@ export var expectToEqual = function expectToEqual(actual, expected) {
|
|
|
24
23
|
export var expectConstructorToHaveBeenCalledWith = function expectConstructorToHaveBeenCalledWith(func, expectedArgs) {
|
|
25
24
|
var _expect;
|
|
26
25
|
return (
|
|
27
|
-
// @ts-ignore TS2339: Property `toHaveBeenCalledWith` does not exist on `typeAssertion`
|
|
28
26
|
// This was added when enrolling `@atlaskit/media-test-helpers` into JFE local consumption
|
|
29
27
|
(_expect = expect(func)).toHaveBeenCalledWith.apply(_expect, _toConsumableArray(expectedArgs))
|
|
30
28
|
);
|
|
@@ -32,7 +30,6 @@ export var expectConstructorToHaveBeenCalledWith = function expectConstructorToH
|
|
|
32
30
|
export var expectFunctionToHaveBeenCalledWith = function expectFunctionToHaveBeenCalledWith(func, expectedArgs) {
|
|
33
31
|
var _expect2;
|
|
34
32
|
return (
|
|
35
|
-
// @ts-ignore TS2339: Property `toHaveBeenCalledWith` does not exist on `typeAssertion`
|
|
36
33
|
// This was added when enrolling `@atlaskit/media-test-helpers` into JFE local consumption
|
|
37
34
|
(_expect2 = expect(func)).toHaveBeenCalledWith.apply(_expect2, _toConsumableArray(expectedArgs))
|
|
38
35
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { MediaClientConfig } from '@atlaskit/media-core/auth';
|
|
2
2
|
import { MediaClient } from '@atlaskit/media-client';
|
|
3
3
|
export declare const getDefaultMediaClientConfig: () => MediaClientConfig;
|
|
4
4
|
export declare const fakeMediaClient: (config?: MediaClientConfig) => MediaClient;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FileIdentifier, type FileState, MediaClient, type FileDetails } from '@atlaskit/media-client';
|
|
2
2
|
import { type ReplaySubject } from 'rxjs/ReplaySubject';
|
|
3
|
-
import {
|
|
3
|
+
import type { MediaClientConfig } from '@atlaskit/media-core/auth';
|
|
4
4
|
import { type MediaFeatureFlags } from '@atlaskit/media-common';
|
|
5
5
|
import { type CreateFileStateOptions, type FileStateStatus } from './createFileState';
|
|
6
6
|
export type MediaClientMockOptions = {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { Auth, AuthContext } from '@atlaskit/media-core';
|
|
1
|
+
import type { Auth, AuthContext } from '@atlaskit/media-core/auth';
|
|
2
2
|
export declare const requestMediaAuthProvider: () => Promise<Auth>;
|
|
3
3
|
export declare const getMediaAuthProvider: (_context?: AuthContext) => Promise<Auth>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MediaClient } from '@atlaskit/media-client';
|
|
2
|
-
import {
|
|
2
|
+
import type { MediaClientConfig } from '@atlaskit/media-core/auth';
|
|
3
3
|
import { type MediaEnv } from './mediaPickerAuthProvider';
|
|
4
4
|
export declare const defaultBaseUrl: 'https://media.staging.atl-paas.net';
|
|
5
5
|
export declare const defaultParams: {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Auth, AuthContext } from '@atlaskit/media-core/auth';
|
|
2
2
|
export type MediaEnv = 'staging';
|
|
3
3
|
export declare const mediaPickerAuthProvider: (authEnvironment?: string, env?: MediaEnv, expiresIn?: number) => (context?: AuthContext) => Promise<Auth>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MockURL } from 'xhr-mock/lib/MockURL';
|
|
2
2
|
import { type MockHeaders } from 'xhr-mock/lib/types';
|
|
3
|
-
import {
|
|
3
|
+
import type { ClientBasedAuth } from '@atlaskit/media-core/auth';
|
|
4
4
|
export { exactMatch, exactMatchBody, exactMatchHeaders, exactMatchUrl, matchMethod, } from './matchers';
|
|
5
5
|
export { dataURItoBlob, fillInResponse } from './utils';
|
|
6
6
|
export { copyWithToken, getFile, getFileImage, userCollectionFetch } from './handlers';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Database } from 'kakapo';
|
|
2
|
-
import {
|
|
2
|
+
import type { ClientBasedAuth } from '@atlaskit/media-core/auth';
|
|
3
3
|
import { type MediaCollection } from './collection';
|
|
4
4
|
import { type CollectionItem } from './collection-item';
|
|
5
5
|
import { type Upload } from './upload';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-test-helpers",
|
|
3
|
-
"version": "42.
|
|
3
|
+
"version": "42.3.0",
|
|
4
4
|
"description": "Collection of test helpers used in media component stories and specs",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -24,23 +24,23 @@
|
|
|
24
24
|
"team": "Media Exif"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@atlaskit/button": "^25.
|
|
28
|
-
"@atlaskit/checkbox": "^19.
|
|
29
|
-
"@atlaskit/form": "^
|
|
30
|
-
"@atlaskit/icon": "^37.
|
|
31
|
-
"@atlaskit/locale": "^5.
|
|
32
|
-
"@atlaskit/media-client": "^37.
|
|
33
|
-
"@atlaskit/media-common": "^14.
|
|
27
|
+
"@atlaskit/button": "^25.2.0",
|
|
28
|
+
"@atlaskit/checkbox": "^19.1.0",
|
|
29
|
+
"@atlaskit/form": "^17.1.0",
|
|
30
|
+
"@atlaskit/icon": "^37.5.0",
|
|
31
|
+
"@atlaskit/locale": "^5.1.0",
|
|
32
|
+
"@atlaskit/media-client": "^37.5.0",
|
|
33
|
+
"@atlaskit/media-common": "^14.5.0",
|
|
34
34
|
"@atlaskit/media-state": "^3.1.0",
|
|
35
|
-
"@atlaskit/media-ui": "^30.
|
|
35
|
+
"@atlaskit/media-ui": "^30.12.0",
|
|
36
36
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
37
|
-
"@atlaskit/popup": "^6.
|
|
38
|
-
"@atlaskit/primitives": "^22.
|
|
37
|
+
"@atlaskit/popup": "^6.2.0",
|
|
38
|
+
"@atlaskit/primitives": "^22.4.0",
|
|
39
39
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
40
|
-
"@atlaskit/tabs": "^21.
|
|
41
|
-
"@atlaskit/textfield": "^10.
|
|
42
|
-
"@atlaskit/tokens": "^16.
|
|
43
|
-
"@atlaskit/tooltip": "^24.
|
|
40
|
+
"@atlaskit/tabs": "^21.1.0",
|
|
41
|
+
"@atlaskit/textfield": "^10.1.0",
|
|
42
|
+
"@atlaskit/tokens": "^16.8.0",
|
|
43
|
+
"@atlaskit/tooltip": "^24.2.0",
|
|
44
44
|
"@atlaskit/ufo": "^1.0.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0",
|
|
46
46
|
"@emotion/react": "^11.7.1",
|