@atlaskit/media-test-helpers 33.0.35 → 33.0.36
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 +1461 -1466
- package/dist/cjs/docs-content-tabs.js +3 -0
- package/dist/cjs/featureFlagsWrapper/dropdown.js +42 -32
- package/dist/cjs/story-list.js +12 -6
- package/dist/cjs/story-styles.js +10 -1
- package/dist/cjs/styled.js +4 -1
- package/dist/es2019/docs-content-tabs.js +2 -0
- package/dist/es2019/featureFlagsWrapper/dropdown.js +38 -29
- package/dist/es2019/story-list.js +12 -6
- package/dist/es2019/story-styles.js +9 -1
- package/dist/es2019/styled.js +3 -1
- package/dist/esm/docs-content-tabs.js +2 -0
- package/dist/esm/featureFlagsWrapper/dropdown.js +41 -32
- package/dist/esm/story-list.js +12 -6
- package/dist/esm/story-styles.js +9 -1
- package/dist/esm/styled.js +3 -1
- package/dist/types/I18nWrapper.d.ts +1 -1
- package/dist/types/authProvider.d.ts +1 -1
- package/dist/types/docs-content-tabs.d.ts +1 -1
- package/dist/types/example-mediaFeatureFlags.d.ts +1 -1
- package/dist/types/exampleMediaItems.d.ts +1 -1
- package/dist/types/fakeMediaClient.d.ts +1 -1
- package/dist/types/featureFlagsWrapper/dropdown.d.ts +1 -1
- package/dist/types/featureFlagsWrapper/helpers.d.ts +1 -1
- package/dist/types/fileReader.d.ts +1 -1
- package/dist/types/fileStateFactory/factory/createFileState.d.ts +1 -1
- package/dist/types/fileStateFactory/factory/factory.d.ts +5 -5
- package/dist/types/fileStateFactory/factory/helpers.d.ts +1 -1
- package/dist/types/fileStateFactory/factory/index.d.ts +1 -1
- package/dist/types/fileStateFactory/fileSimulation/fileSimulation.d.ts +2 -2
- package/dist/types/fileStateFactory/fileSimulation/index.d.ts +1 -1
- package/dist/types/fileStateFactory/fileSimulation/simulations.d.ts +4 -11
- package/dist/types/fileStateFactory/index.d.ts +2 -2
- package/dist/types/index.d.ts +3 -3
- package/dist/types/mediaClientErrors.d.ts +1 -1
- package/dist/types/mediaClientProvider.d.ts +2 -2
- package/dist/types/mediaPickerAuthProvider.d.ts +1 -1
- package/dist/types/mockData/handlers/copyWithToken.d.ts +2 -2
- package/dist/types/mockData/handlers/getFile.d.ts +2 -2
- package/dist/types/mockData/handlers/getFileImage.d.ts +2 -2
- package/dist/types/mockData/handlers/tenantAuth.d.ts +2 -2
- package/dist/types/mockData/handlers/userCollectionFetch.d.ts +2 -2
- package/dist/types/mockData/index.d.ts +4 -4
- package/dist/types/mockData/matchers.d.ts +2 -2
- package/dist/types/mockData/staticCommon.d.ts +1 -1
- package/dist/types/mockData/utils.d.ts +2 -2
- package/dist/types/mocks/database/collection-item.d.ts +1 -1
- package/dist/types/mocks/database/index.d.ts +7 -7
- package/dist/types/mocks/database/upload.d.ts +2 -2
- package/dist/types/mocks/media-mock.d.ts +1 -1
- package/dist/types/mocks/routers/api-router.d.ts +1 -1
- package/dist/types/mocks/routers/media-playground-router.d.ts +1 -1
- package/dist/types/mocks/websockets/remote-upload-server.d.ts +3 -3
- package/dist/types/mountWithIntlContext.d.ts +3 -3
- package/dist/types/renderWithIntl.d.ts +1 -1
- package/dist/types/story-list.d.ts +1 -1
- package/dist/types/ufoLogger.d.ts +1 -1
- package/dist/types/utils/logging.d.ts +2 -2
- package/dist/types-ts4.5/I18nWrapper.d.ts +1 -1
- package/dist/types-ts4.5/authProvider.d.ts +1 -1
- package/dist/types-ts4.5/docs-content-tabs.d.ts +1 -1
- package/dist/types-ts4.5/example-mediaFeatureFlags.d.ts +1 -1
- package/dist/types-ts4.5/exampleMediaItems.d.ts +1 -1
- package/dist/types-ts4.5/fakeMediaClient.d.ts +1 -1
- package/dist/types-ts4.5/featureFlagsWrapper/dropdown.d.ts +1 -1
- package/dist/types-ts4.5/featureFlagsWrapper/helpers.d.ts +1 -1
- package/dist/types-ts4.5/fileReader.d.ts +1 -1
- package/dist/types-ts4.5/fileStateFactory/factory/createFileState.d.ts +1 -1
- package/dist/types-ts4.5/fileStateFactory/factory/factory.d.ts +5 -5
- package/dist/types-ts4.5/fileStateFactory/factory/helpers.d.ts +1 -1
- package/dist/types-ts4.5/fileStateFactory/factory/index.d.ts +1 -1
- package/dist/types-ts4.5/fileStateFactory/fileSimulation/fileSimulation.d.ts +2 -2
- package/dist/types-ts4.5/fileStateFactory/fileSimulation/index.d.ts +1 -1
- package/dist/types-ts4.5/fileStateFactory/fileSimulation/simulations.d.ts +1 -1
- package/dist/types-ts4.5/fileStateFactory/index.d.ts +2 -2
- package/dist/types-ts4.5/index.d.ts +3 -3
- package/dist/types-ts4.5/mediaClientErrors.d.ts +1 -1
- package/dist/types-ts4.5/mediaClientProvider.d.ts +2 -2
- package/dist/types-ts4.5/mediaPickerAuthProvider.d.ts +1 -1
- package/dist/types-ts4.5/mockData/handlers/copyWithToken.d.ts +2 -2
- package/dist/types-ts4.5/mockData/handlers/getFile.d.ts +2 -2
- package/dist/types-ts4.5/mockData/handlers/getFileImage.d.ts +2 -2
- package/dist/types-ts4.5/mockData/handlers/tenantAuth.d.ts +2 -2
- package/dist/types-ts4.5/mockData/handlers/userCollectionFetch.d.ts +2 -2
- package/dist/types-ts4.5/mockData/index.d.ts +4 -4
- package/dist/types-ts4.5/mockData/matchers.d.ts +2 -2
- package/dist/types-ts4.5/mockData/staticCommon.d.ts +1 -1
- package/dist/types-ts4.5/mockData/utils.d.ts +2 -2
- package/dist/types-ts4.5/mocks/database/collection-item.d.ts +1 -1
- package/dist/types-ts4.5/mocks/database/index.d.ts +7 -7
- package/dist/types-ts4.5/mocks/database/upload.d.ts +2 -2
- package/dist/types-ts4.5/mocks/media-mock.d.ts +1 -1
- package/dist/types-ts4.5/mocks/routers/api-router.d.ts +1 -1
- package/dist/types-ts4.5/mocks/routers/media-playground-router.d.ts +1 -1
- package/dist/types-ts4.5/mocks/websockets/remote-upload-server.d.ts +3 -3
- package/dist/types-ts4.5/mountWithIntlContext.d.ts +3 -3
- package/dist/types-ts4.5/renderWithIntl.d.ts +1 -1
- package/dist/types-ts4.5/story-list.d.ts +1 -1
- package/dist/types-ts4.5/ufoLogger.d.ts +1 -1
- package/dist/types-ts4.5/utils/logging.d.ts +2 -2
- package/package.json +89 -91
- package/report.api.md +445 -498
|
@@ -13,7 +13,10 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
13
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
14
|
/** @jsx jsx */
|
|
15
15
|
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
17
|
+
|
|
16
18
|
var panelStyle = (0, _react.css)({
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
17
20
|
'> div': {
|
|
18
21
|
width: '100%'
|
|
19
22
|
}
|
|
@@ -22,10 +22,14 @@ var _checkbox = require("@atlaskit/checkbox");
|
|
|
22
22
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
23
23
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
24
24
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
|
+
|
|
25
27
|
var camelCaseToSentenceCase = function camelCaseToSentenceCase(text) {
|
|
26
28
|
var result = text.replace(/([A-Z])/g, ' $1');
|
|
27
29
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
28
30
|
};
|
|
31
|
+
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
29
33
|
var Container = _styled.default.div({
|
|
30
34
|
display: 'flex',
|
|
31
35
|
flexDirection: 'row',
|
|
@@ -78,37 +82,41 @@ var TextFieldItem = function TextFieldItem(_ref3) {
|
|
|
78
82
|
var FeatureFlagItems = function FeatureFlagItems(_ref4) {
|
|
79
83
|
var onUpdate = _ref4.onUpdate;
|
|
80
84
|
var flagItems = Object.entries((0, _helpers.getMediaFeatureFlags)());
|
|
81
|
-
return
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
85
|
+
return (
|
|
86
|
+
/*#__PURE__*/
|
|
87
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
88
|
+
_react.default.createElement("div", {
|
|
89
|
+
style: {
|
|
90
|
+
maxHeight: '200px',
|
|
91
|
+
padding: '10px 0'
|
|
92
|
+
}
|
|
93
|
+
}, flagItems.length > 0 ? flagItems.map(function (_ref5) {
|
|
94
|
+
var _ref6 = (0, _slicedToArray2.default)(_ref5, 2),
|
|
95
|
+
key = _ref6[0],
|
|
96
|
+
currentValue = _ref6[1];
|
|
97
|
+
var name = key;
|
|
98
|
+
var ffType = (0, _typeof2.default)(currentValue);
|
|
99
|
+
var isNumber = ffType === 'number';
|
|
100
|
+
switch (ffType) {
|
|
101
|
+
case 'boolean':
|
|
102
|
+
return /*#__PURE__*/_react.default.createElement(CheckboxItem, {
|
|
103
|
+
key: "media-feature-flag-item-".concat(name),
|
|
104
|
+
name: name,
|
|
105
|
+
initialValue: currentValue,
|
|
106
|
+
onChange: onUpdate
|
|
107
|
+
});
|
|
108
|
+
case 'number':
|
|
109
|
+
case 'string':
|
|
110
|
+
return /*#__PURE__*/_react.default.createElement(TextFieldItem, {
|
|
111
|
+
key: "media-feature-flag-item-".concat(name),
|
|
112
|
+
name: name,
|
|
113
|
+
value: currentValue,
|
|
114
|
+
onChange: onUpdate,
|
|
115
|
+
isNumber: isNumber
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}) : /*#__PURE__*/_react.default.createElement(ItemWrapper, null, "No flags available"))
|
|
119
|
+
);
|
|
112
120
|
};
|
|
113
121
|
var MediaFeatureFlagsDropdown = function MediaFeatureFlagsDropdown(_ref7) {
|
|
114
122
|
var onFlagChanged = _ref7.onFlagChanged;
|
|
@@ -141,7 +149,9 @@ var MediaFeatureFlagsDropdown = function MediaFeatureFlagsDropdown(_ref7) {
|
|
|
141
149
|
}
|
|
142
150
|
}), /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
143
151
|
content: "Reset all flags"
|
|
144
|
-
}, /*#__PURE__*/_react.default.createElement(_standardButton.default
|
|
152
|
+
}, /*#__PURE__*/_react.default.createElement(_standardButton.default
|
|
153
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
154
|
+
, {
|
|
145
155
|
style: {
|
|
146
156
|
marginLeft: 10
|
|
147
157
|
},
|
package/dist/cjs/story-list.js
CHANGED
|
@@ -81,13 +81,19 @@ var StoryList = exports.StoryList = /*#__PURE__*/function (_Component) {
|
|
|
81
81
|
children = _this$props$children === void 0 ? [] : _this$props$children;
|
|
82
82
|
var listStyles = display === 'column' ? styles.column : styles.row;
|
|
83
83
|
var listContent = children.map(function (child, index) {
|
|
84
|
-
return
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
return (
|
|
85
|
+
/*#__PURE__*/
|
|
86
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
87
|
+
_react.default.createElement("li", {
|
|
88
|
+
style: listStyles.stateItem,
|
|
89
|
+
key: index
|
|
90
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
91
|
+
style: listStyles.stateTitle
|
|
92
|
+
}, child.title), child.content)
|
|
93
|
+
);
|
|
90
94
|
});
|
|
95
|
+
|
|
96
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
91
97
|
return /*#__PURE__*/_react.default.createElement("ul", {
|
|
92
98
|
style: listStyles.statesWrapper
|
|
93
99
|
}, listContent);
|
package/dist/cjs/story-styles.js
CHANGED
|
@@ -6,28 +6,37 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.Matrix = void 0;
|
|
8
8
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
|
-
// eslint-disable-next-line @atlaskit/
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
10
12
|
var Matrix = exports.Matrix = _styled.default.table({
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
11
14
|
thead: {
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
12
16
|
td: {
|
|
13
17
|
textAlign: 'center',
|
|
14
18
|
fontWeight: 'bold',
|
|
15
19
|
fontSize: '20px'
|
|
16
20
|
}
|
|
17
21
|
},
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
18
23
|
tbody: {
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
19
25
|
td: {
|
|
20
26
|
padding: '25px 10px'
|
|
21
27
|
}
|
|
22
28
|
},
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
23
30
|
td: {
|
|
24
31
|
margin: 'auto',
|
|
25
32
|
textAlign: 'center',
|
|
26
33
|
verticalAlign: 'middle',
|
|
34
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
27
35
|
'&:first-child': {
|
|
28
36
|
fontWeight: 'bold',
|
|
29
37
|
fontSize: '20px'
|
|
30
38
|
},
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
31
40
|
'> div': {
|
|
32
41
|
display: 'flex',
|
|
33
42
|
justifyContent: 'center',
|
package/dist/cjs/styled.js
CHANGED
|
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.LocaleSelectorWrapper = void 0;
|
|
8
8
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
|
-
// eslint-disable-next-line @atlaskit/
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
10
12
|
var LocaleSelectorWrapper = exports.LocaleSelectorWrapper = _styled.default.div({
|
|
11
13
|
position: 'fixed',
|
|
12
14
|
right: "var(--ds-space-250, 20px)",
|
|
@@ -17,6 +19,7 @@ var LocaleSelectorWrapper = exports.LocaleSelectorWrapper = _styled.default.div(
|
|
|
17
19
|
padding: '10px',
|
|
18
20
|
borderRadius: '3px',
|
|
19
21
|
backgroundColor: "var(--ds-surface, white)",
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
20
23
|
h2: {
|
|
21
24
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- needs manual remediation
|
|
22
25
|
marginBottom: '10px'
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
5
|
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import Tabs, { Tab, TabList, useTabPanel } from '@atlaskit/tabs';
|
|
6
7
|
const panelStyle = css({
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
7
9
|
'> div': {
|
|
8
10
|
width: '100%'
|
|
9
11
|
}
|
|
@@ -6,6 +6,7 @@ import SelectClearIcon from '@atlaskit/icon/glyph/select-clear';
|
|
|
6
6
|
import HipchatChevronDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-down';
|
|
7
7
|
import Button from '@atlaskit/button/standard-button';
|
|
8
8
|
import Tooltip from '@atlaskit/tooltip';
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
10
|
import styled from '@emotion/styled';
|
|
10
11
|
import Popup from '@atlaskit/popup';
|
|
11
12
|
import { Checkbox } from '@atlaskit/checkbox';
|
|
@@ -14,6 +15,8 @@ const camelCaseToSentenceCase = text => {
|
|
|
14
15
|
var result = text.replace(/([A-Z])/g, ' $1');
|
|
15
16
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
16
17
|
};
|
|
18
|
+
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
17
20
|
const Container = styled.div({
|
|
18
21
|
display: 'flex',
|
|
19
22
|
flexDirection: 'row',
|
|
@@ -64,34 +67,38 @@ const FeatureFlagItems = ({
|
|
|
64
67
|
onUpdate
|
|
65
68
|
}) => {
|
|
66
69
|
const flagItems = Object.entries(getMediaFeatureFlags());
|
|
67
|
-
return
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
70
|
+
return (
|
|
71
|
+
/*#__PURE__*/
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
73
|
+
React.createElement("div", {
|
|
74
|
+
style: {
|
|
75
|
+
maxHeight: '200px',
|
|
76
|
+
padding: '10px 0'
|
|
77
|
+
}
|
|
78
|
+
}, flagItems.length > 0 ? flagItems.map(([key, currentValue]) => {
|
|
79
|
+
const name = key;
|
|
80
|
+
const ffType = typeof currentValue;
|
|
81
|
+
const isNumber = ffType === 'number';
|
|
82
|
+
switch (ffType) {
|
|
83
|
+
case 'boolean':
|
|
84
|
+
return /*#__PURE__*/React.createElement(CheckboxItem, {
|
|
85
|
+
key: `media-feature-flag-item-${name}`,
|
|
86
|
+
name: name,
|
|
87
|
+
initialValue: currentValue,
|
|
88
|
+
onChange: onUpdate
|
|
89
|
+
});
|
|
90
|
+
case 'number':
|
|
91
|
+
case 'string':
|
|
92
|
+
return /*#__PURE__*/React.createElement(TextFieldItem, {
|
|
93
|
+
key: `media-feature-flag-item-${name}`,
|
|
94
|
+
name: name,
|
|
95
|
+
value: currentValue,
|
|
96
|
+
onChange: onUpdate,
|
|
97
|
+
isNumber: isNumber
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}) : /*#__PURE__*/React.createElement(ItemWrapper, null, "No flags available"))
|
|
101
|
+
);
|
|
95
102
|
};
|
|
96
103
|
const MediaFeatureFlagsDropdown = ({
|
|
97
104
|
onFlagChanged
|
|
@@ -114,7 +121,9 @@ const MediaFeatureFlagsDropdown = ({
|
|
|
114
121
|
}), "Media Feature Flags")
|
|
115
122
|
}), /*#__PURE__*/React.createElement(Tooltip, {
|
|
116
123
|
content: "Reset all flags"
|
|
117
|
-
}, /*#__PURE__*/React.createElement(Button
|
|
124
|
+
}, /*#__PURE__*/React.createElement(Button
|
|
125
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
126
|
+
, {
|
|
118
127
|
style: {
|
|
119
128
|
marginLeft: 10
|
|
120
129
|
},
|
|
@@ -57,13 +57,19 @@ export class StoryList extends Component {
|
|
|
57
57
|
} = this.props;
|
|
58
58
|
const listStyles = display === 'column' ? styles.column : styles.row;
|
|
59
59
|
const listContent = children.map((child, index) => {
|
|
60
|
-
return
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
return (
|
|
61
|
+
/*#__PURE__*/
|
|
62
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
63
|
+
React.createElement("li", {
|
|
64
|
+
style: listStyles.stateItem,
|
|
65
|
+
key: index
|
|
66
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
67
|
+
style: listStyles.stateTitle
|
|
68
|
+
}, child.title), child.content)
|
|
69
|
+
);
|
|
66
70
|
});
|
|
71
|
+
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
67
73
|
return /*#__PURE__*/React.createElement("ul", {
|
|
68
74
|
style: listStyles.statesWrapper
|
|
69
75
|
}, listContent);
|
|
@@ -1,27 +1,35 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import styled from '@emotion/styled';
|
|
2
3
|
|
|
3
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
4
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
4
5
|
export const Matrix = styled.table({
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
5
7
|
thead: {
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
6
9
|
td: {
|
|
7
10
|
textAlign: 'center',
|
|
8
11
|
fontWeight: 'bold',
|
|
9
12
|
fontSize: '20px'
|
|
10
13
|
}
|
|
11
14
|
},
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
12
16
|
tbody: {
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
13
18
|
td: {
|
|
14
19
|
padding: '25px 10px'
|
|
15
20
|
}
|
|
16
21
|
},
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
17
23
|
td: {
|
|
18
24
|
margin: 'auto',
|
|
19
25
|
textAlign: 'center',
|
|
20
26
|
verticalAlign: 'middle',
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
21
28
|
'&:first-child': {
|
|
22
29
|
fontWeight: 'bold',
|
|
23
30
|
fontSize: '20px'
|
|
24
31
|
},
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
25
33
|
'> div': {
|
|
26
34
|
display: 'flex',
|
|
27
35
|
justifyContent: 'center',
|
package/dist/es2019/styled.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import styled from '@emotion/styled';
|
|
2
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
3
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
3
4
|
export const LocaleSelectorWrapper = styled.div({
|
|
4
5
|
position: 'fixed',
|
|
5
6
|
right: "var(--ds-space-250, 20px)",
|
|
@@ -10,6 +11,7 @@ export const LocaleSelectorWrapper = styled.div({
|
|
|
10
11
|
padding: '10px',
|
|
11
12
|
borderRadius: '3px',
|
|
12
13
|
backgroundColor: "var(--ds-surface, white)",
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
13
15
|
h2: {
|
|
14
16
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- needs manual remediation
|
|
15
17
|
marginBottom: '10px'
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
5
|
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import Tabs, { Tab, TabList, useTabPanel } from '@atlaskit/tabs';
|
|
6
7
|
var panelStyle = css({
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
7
9
|
'> div': {
|
|
8
10
|
width: '100%'
|
|
9
11
|
}
|
|
@@ -8,6 +8,7 @@ import SelectClearIcon from '@atlaskit/icon/glyph/select-clear';
|
|
|
8
8
|
import HipchatChevronDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-down';
|
|
9
9
|
import Button from '@atlaskit/button/standard-button';
|
|
10
10
|
import Tooltip from '@atlaskit/tooltip';
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
12
|
import styled from '@emotion/styled';
|
|
12
13
|
import Popup from '@atlaskit/popup';
|
|
13
14
|
import { Checkbox } from '@atlaskit/checkbox';
|
|
@@ -16,6 +17,8 @@ var camelCaseToSentenceCase = function camelCaseToSentenceCase(text) {
|
|
|
16
17
|
var result = text.replace(/([A-Z])/g, ' $1');
|
|
17
18
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
18
19
|
};
|
|
20
|
+
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
19
22
|
var Container = styled.div({
|
|
20
23
|
display: 'flex',
|
|
21
24
|
flexDirection: 'row',
|
|
@@ -68,37 +71,41 @@ var TextFieldItem = function TextFieldItem(_ref3) {
|
|
|
68
71
|
var FeatureFlagItems = function FeatureFlagItems(_ref4) {
|
|
69
72
|
var onUpdate = _ref4.onUpdate;
|
|
70
73
|
var flagItems = Object.entries(getMediaFeatureFlags());
|
|
71
|
-
return
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
74
|
+
return (
|
|
75
|
+
/*#__PURE__*/
|
|
76
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
77
|
+
React.createElement("div", {
|
|
78
|
+
style: {
|
|
79
|
+
maxHeight: '200px',
|
|
80
|
+
padding: '10px 0'
|
|
81
|
+
}
|
|
82
|
+
}, flagItems.length > 0 ? flagItems.map(function (_ref5) {
|
|
83
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
|
84
|
+
key = _ref6[0],
|
|
85
|
+
currentValue = _ref6[1];
|
|
86
|
+
var name = key;
|
|
87
|
+
var ffType = _typeof(currentValue);
|
|
88
|
+
var isNumber = ffType === 'number';
|
|
89
|
+
switch (ffType) {
|
|
90
|
+
case 'boolean':
|
|
91
|
+
return /*#__PURE__*/React.createElement(CheckboxItem, {
|
|
92
|
+
key: "media-feature-flag-item-".concat(name),
|
|
93
|
+
name: name,
|
|
94
|
+
initialValue: currentValue,
|
|
95
|
+
onChange: onUpdate
|
|
96
|
+
});
|
|
97
|
+
case 'number':
|
|
98
|
+
case 'string':
|
|
99
|
+
return /*#__PURE__*/React.createElement(TextFieldItem, {
|
|
100
|
+
key: "media-feature-flag-item-".concat(name),
|
|
101
|
+
name: name,
|
|
102
|
+
value: currentValue,
|
|
103
|
+
onChange: onUpdate,
|
|
104
|
+
isNumber: isNumber
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}) : /*#__PURE__*/React.createElement(ItemWrapper, null, "No flags available"))
|
|
108
|
+
);
|
|
102
109
|
};
|
|
103
110
|
var MediaFeatureFlagsDropdown = function MediaFeatureFlagsDropdown(_ref7) {
|
|
104
111
|
var onFlagChanged = _ref7.onFlagChanged;
|
|
@@ -131,7 +138,9 @@ var MediaFeatureFlagsDropdown = function MediaFeatureFlagsDropdown(_ref7) {
|
|
|
131
138
|
}
|
|
132
139
|
}), /*#__PURE__*/React.createElement(Tooltip, {
|
|
133
140
|
content: "Reset all flags"
|
|
134
|
-
}, /*#__PURE__*/React.createElement(Button
|
|
141
|
+
}, /*#__PURE__*/React.createElement(Button
|
|
142
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
143
|
+
, {
|
|
135
144
|
style: {
|
|
136
145
|
marginLeft: 10
|
|
137
146
|
},
|
package/dist/esm/story-list.js
CHANGED
|
@@ -73,13 +73,19 @@ export var StoryList = /*#__PURE__*/function (_Component) {
|
|
|
73
73
|
children = _this$props$children === void 0 ? [] : _this$props$children;
|
|
74
74
|
var listStyles = display === 'column' ? styles.column : styles.row;
|
|
75
75
|
var listContent = children.map(function (child, index) {
|
|
76
|
-
return
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
76
|
+
return (
|
|
77
|
+
/*#__PURE__*/
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
79
|
+
React.createElement("li", {
|
|
80
|
+
style: listStyles.stateItem,
|
|
81
|
+
key: index
|
|
82
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
83
|
+
style: listStyles.stateTitle
|
|
84
|
+
}, child.title), child.content)
|
|
85
|
+
);
|
|
82
86
|
});
|
|
87
|
+
|
|
88
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
83
89
|
return /*#__PURE__*/React.createElement("ul", {
|
|
84
90
|
style: listStyles.statesWrapper
|
|
85
91
|
}, listContent);
|
package/dist/esm/story-styles.js
CHANGED
|
@@ -1,27 +1,35 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import styled from '@emotion/styled';
|
|
2
3
|
|
|
3
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
4
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
4
5
|
export var Matrix = styled.table({
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
5
7
|
thead: {
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
6
9
|
td: {
|
|
7
10
|
textAlign: 'center',
|
|
8
11
|
fontWeight: 'bold',
|
|
9
12
|
fontSize: '20px'
|
|
10
13
|
}
|
|
11
14
|
},
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
12
16
|
tbody: {
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
13
18
|
td: {
|
|
14
19
|
padding: '25px 10px'
|
|
15
20
|
}
|
|
16
21
|
},
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
17
23
|
td: {
|
|
18
24
|
margin: 'auto',
|
|
19
25
|
textAlign: 'center',
|
|
20
26
|
verticalAlign: 'middle',
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
21
28
|
'&:first-child': {
|
|
22
29
|
fontWeight: 'bold',
|
|
23
30
|
fontSize: '20px'
|
|
24
31
|
},
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
25
33
|
'> div': {
|
|
26
34
|
display: 'flex',
|
|
27
35
|
justifyContent: 'center',
|
package/dist/esm/styled.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import styled from '@emotion/styled';
|
|
2
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
3
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
3
4
|
export var LocaleSelectorWrapper = styled.div({
|
|
4
5
|
position: 'fixed',
|
|
5
6
|
right: "var(--ds-space-250, 20px)",
|
|
@@ -10,6 +11,7 @@ export var LocaleSelectorWrapper = styled.div({
|
|
|
10
11
|
padding: '10px',
|
|
11
12
|
borderRadius: '3px',
|
|
12
13
|
backgroundColor: "var(--ds-surface, white)",
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
13
15
|
h2: {
|
|
14
16
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- needs manual remediation
|
|
15
17
|
marginBottom: '10px'
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
1
|
+
import { type MediaFeatureFlags } from '@atlaskit/media-common';
|
|
2
2
|
export declare const exampleMediaFeatureFlags: MediaFeatureFlags;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FileIdentifier, FileDetails, ExternalImageIdentifier, MediaType } from '@atlaskit/media-client';
|
|
1
|
+
import { type FileIdentifier, type FileDetails, type ExternalImageIdentifier, type MediaType } from '@atlaskit/media-client';
|
|
2
2
|
export declare const genericFileId: FileIdentifier;
|
|
3
3
|
export declare const audioFileId: FileIdentifier;
|
|
4
4
|
export declare const audioNoCoverFileId: FileIdentifier;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
1
|
+
import { type MediaClientConfig } from '@atlaskit/media-core';
|
|
2
2
|
import { MediaClient } from '@atlaskit/media-client';
|
|
3
3
|
export declare const getDefaultMediaClientConfig: () => MediaClientConfig;
|
|
4
4
|
export declare const fakeMediaClient: (config?: MediaClientConfig) => MediaClient;
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
export type MediaFeatureFlagsDropdownProps = {
|
|
3
3
|
onFlagChanged: () => void;
|
|
4
4
|
};
|
|
5
|
-
declare const MediaFeatureFlagsDropdown: ({ onFlagChanged
|
|
5
|
+
declare const MediaFeatureFlagsDropdown: ({ onFlagChanged }: MediaFeatureFlagsDropdownProps) => JSX.Element;
|
|
6
6
|
export default MediaFeatureFlagsDropdown;
|