@atlaskit/media-table 18.1.10 → 18.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/example-helpers/helpers.tsx +20 -4
- package/example-helpers/styles.tsx +3 -3
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import React, { useState } from 'react';
|
|
8
8
|
import dateFnsFormat from 'date-fns/format';
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
import { type MediaTableItem, NameCell } from '../src';
|
|
22
22
|
import { IntlProvider } from 'react-intl-next';
|
|
23
23
|
|
|
24
|
-
export const createMockFileData = (name: string, mediaType: MediaType) => {
|
|
24
|
+
export const createMockFileData = (name: string, mediaType: MediaType): jsx.JSX.Element => {
|
|
25
25
|
return <NameCell text={name} mediaType={mediaType} endFixedChars={4} />;
|
|
26
26
|
};
|
|
27
27
|
|
|
@@ -29,7 +29,9 @@ const dateformat = (date: number, format = 'E MMM dd yyyy kk:mm:ss') => {
|
|
|
29
29
|
return dateFnsFormat(date, format);
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
export const RenderMediaTableWithFieldRange = (
|
|
32
|
+
export const RenderMediaTableWithFieldRange = (
|
|
33
|
+
MediaTableNode: React.ReactNode,
|
|
34
|
+
): jsx.JSX.Element => {
|
|
33
35
|
const [width, setWidth] = useState(1000);
|
|
34
36
|
|
|
35
37
|
return (
|
|
@@ -104,7 +106,21 @@ export const items: MediaTableItem[] = [
|
|
|
104
106
|
},
|
|
105
107
|
];
|
|
106
108
|
|
|
107
|
-
export const generateItems = (
|
|
109
|
+
export const generateItems = (
|
|
110
|
+
numItems: number,
|
|
111
|
+
): {
|
|
112
|
+
data: {
|
|
113
|
+
file: jsx.JSX.Element;
|
|
114
|
+
size: string;
|
|
115
|
+
date: string;
|
|
116
|
+
};
|
|
117
|
+
identifier: {
|
|
118
|
+
id: string;
|
|
119
|
+
mediaItemType: 'file';
|
|
120
|
+
occurrenceKey?: string;
|
|
121
|
+
collectionName?: string;
|
|
122
|
+
};
|
|
123
|
+
}[] => {
|
|
108
124
|
const items = [];
|
|
109
125
|
for (let i = 1; i <= numItems; i++) {
|
|
110
126
|
items.push({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { token } from '@atlaskit/tokens';
|
|
2
2
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
|
-
import { css } from '@emotion/react';
|
|
3
|
+
import { css, type SerializedStyles } from '@emotion/react';
|
|
4
4
|
// AFP-2532 TODO: Fix automatic suppressions below
|
|
5
5
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
6
6
|
import { colors } from '@atlaskit/theme';
|
|
@@ -9,7 +9,7 @@ export const ROW_HIGHLIGHT_CLASSNAME = 'media-table-row-highlighted';
|
|
|
9
9
|
export const ROW_CLASSNAME = 'media-table-row';
|
|
10
10
|
|
|
11
11
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
12
|
-
export const exampleWrapperStyles = css`
|
|
12
|
+
export const exampleWrapperStyles: SerializedStyles = css`
|
|
13
13
|
display: flex;
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
align-items: center;
|
|
@@ -24,7 +24,7 @@ export const exampleWrapperStyles = css`
|
|
|
24
24
|
`;
|
|
25
25
|
|
|
26
26
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
27
|
-
export const greenOnHoverStyles = css`
|
|
27
|
+
export const greenOnHoverStyles: SerializedStyles = css`
|
|
28
28
|
background-color: ${token('color.background.danger.bold', 'red')};
|
|
29
29
|
height: 8px;
|
|
30
30
|
width: 8px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-table",
|
|
3
|
-
"version": "18.1.
|
|
3
|
+
"version": "18.1.12",
|
|
4
4
|
"description": "Table UI component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
33
33
|
"@atlaskit/button": "^23.10.0",
|
|
34
34
|
"@atlaskit/dynamic-table": "^18.3.0",
|
|
35
|
-
"@atlaskit/icon": "^
|
|
35
|
+
"@atlaskit/icon": "^33.0.0",
|
|
36
36
|
"@atlaskit/media-client": "^36.0.0",
|
|
37
37
|
"@atlaskit/media-client-react": "^5.0.0",
|
|
38
38
|
"@atlaskit/media-ui": "^28.7.0",
|
|
39
39
|
"@atlaskit/media-viewer": "^52.8.0",
|
|
40
40
|
"@atlaskit/theme": "^22.0.0",
|
|
41
|
-
"@atlaskit/tokens": "^11.
|
|
42
|
-
"@atlaskit/tooltip": "^
|
|
41
|
+
"@atlaskit/tokens": "^11.1.0",
|
|
42
|
+
"@atlaskit/tooltip": "^21.0.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
44
44
|
"memoize-one": "^6.0.0"
|
|
45
45
|
},
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@atlaskit/icon-file-type": "^7.0.0",
|
|
55
55
|
"@atlaskit/media-core": "^37.0.0",
|
|
56
56
|
"@atlaskit/media-test-helpers": "^40.0.0",
|
|
57
|
-
"@atlaskit/range": "^
|
|
57
|
+
"@atlaskit/range": "^10.0.0",
|
|
58
58
|
"@emotion/react": "^11.7.1",
|
|
59
59
|
"@testing-library/react": "^16.3.0",
|
|
60
60
|
"@testing-library/user-event": "^14.4.3",
|