@axinom/mosaic-ui 0.50.0-rc.4 → 0.50.0-rc.6
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/dist/components/EmptyStation/EmptyStation.d.ts +1 -1
- package/dist/components/EmptyStation/EmptyStation.d.ts.map +1 -1
- package/dist/components/List/ListRow/ListRow.d.ts.map +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/EmptyStation/EmptyStation.stories.tsx +12 -21
- package/src/components/EmptyStation/EmptyStation.tsx +1 -1
- package/src/components/List/ListRow/ListRow.spec.tsx +1 -3
- package/src/components/List/ListRow/ListRow.tsx +29 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axinom/mosaic-ui",
|
|
3
|
-
"version": "0.50.0-rc.
|
|
3
|
+
"version": "0.50.0-rc.6",
|
|
4
4
|
"description": "UI components for building Axinom Mosaic applications",
|
|
5
5
|
"author": "Axinom",
|
|
6
6
|
"license": "PROPRIETARY",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"build-storybook": "storybook build"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@axinom/mosaic-core": "^0.4.23-rc.
|
|
35
|
+
"@axinom/mosaic-core": "^0.4.23-rc.6",
|
|
36
36
|
"@faker-js/faker": "^7.4.0",
|
|
37
37
|
"@popperjs/core": "^2.11.8",
|
|
38
38
|
"clsx": "^1.1.0",
|
|
@@ -105,5 +105,5 @@
|
|
|
105
105
|
"publishConfig": {
|
|
106
106
|
"access": "public"
|
|
107
107
|
},
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "b2909974342c3842f2ed167e987a6f8ab6570a4b"
|
|
109
109
|
}
|
|
@@ -15,14 +15,7 @@ const groups = createGroups({
|
|
|
15
15
|
'onBulkActionsToggled',
|
|
16
16
|
'setTabTitle',
|
|
17
17
|
],
|
|
18
|
-
Content: [
|
|
19
|
-
'title',
|
|
20
|
-
'subtitle',
|
|
21
|
-
'children',
|
|
22
|
-
'bulkActions',
|
|
23
|
-
'stationError',
|
|
24
|
-
'actions',
|
|
25
|
-
],
|
|
18
|
+
Content: ['title', 'subtitle', 'children', 'stationError', 'actions'],
|
|
26
19
|
Styling: ['className'],
|
|
27
20
|
});
|
|
28
21
|
|
|
@@ -35,10 +28,6 @@ const meta: Meta<typeof EmptyStation> = {
|
|
|
35
28
|
...groups.actions,
|
|
36
29
|
control: 'boolean',
|
|
37
30
|
},
|
|
38
|
-
bulkActions: {
|
|
39
|
-
...groups.bulkActions,
|
|
40
|
-
control: 'boolean',
|
|
41
|
-
},
|
|
42
31
|
stationError: {
|
|
43
32
|
...groups.stationError,
|
|
44
33
|
control: 'boolean',
|
|
@@ -56,19 +45,21 @@ export const Default: StoryObj<typeof EmptyStation> = {
|
|
|
56
45
|
? [
|
|
57
46
|
{
|
|
58
47
|
label: 'Test Action',
|
|
48
|
+
kind: 'action',
|
|
59
49
|
onClick: action('Action.onClick'),
|
|
60
50
|
icon: IconName.X,
|
|
61
51
|
},
|
|
62
|
-
]
|
|
63
|
-
: undefined
|
|
64
|
-
}
|
|
65
|
-
bulkActions={
|
|
66
|
-
args.bulkActions
|
|
67
|
-
? [
|
|
68
52
|
{
|
|
69
|
-
label: '
|
|
70
|
-
|
|
71
|
-
|
|
53
|
+
label: 'Bulk Actions',
|
|
54
|
+
icon: IconName.Bulk,
|
|
55
|
+
kind: 'group',
|
|
56
|
+
actions: [
|
|
57
|
+
{
|
|
58
|
+
label: 'Test Bulk Action',
|
|
59
|
+
onClick: action('BulkAction.onClick'),
|
|
60
|
+
icon: IconName.X,
|
|
61
|
+
},
|
|
62
|
+
],
|
|
72
63
|
},
|
|
73
64
|
]
|
|
74
65
|
: undefined
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
2
|
import React, { PropsWithChildren } from 'react';
|
|
3
3
|
import { MessageBar, MessageBarProps } from '../MessageBar';
|
|
4
|
-
import { StationError } from '../models';
|
|
5
4
|
import { PageHeader, PageHeaderProps } from '../PageHeader';
|
|
5
|
+
import { StationError } from '../models';
|
|
6
6
|
import classes from './EmptyStation.scss';
|
|
7
7
|
|
|
8
8
|
export type EmptyStationProps = PageHeaderProps & {
|
|
@@ -588,9 +588,7 @@ describe('ListRow', () => {
|
|
|
588
588
|
/>,
|
|
589
589
|
);
|
|
590
590
|
|
|
591
|
-
const wrapperDivs = wrapper.
|
|
592
|
-
node.prop('data-test-id')?.startsWith('list-entry-property'),
|
|
593
|
-
);
|
|
591
|
+
const wrapperDivs = wrapper.find('.cell');
|
|
594
592
|
|
|
595
593
|
wrapperDivs.forEach((node) => {
|
|
596
594
|
const style = node.prop('style');
|
|
@@ -107,13 +107,26 @@ const renderData = <T extends Data>(
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
if (value === null || value === undefined) {
|
|
110
|
-
return {
|
|
110
|
+
return {
|
|
111
|
+
columnData: (
|
|
112
|
+
<span
|
|
113
|
+
data-test-id={`list-entry-property:${column.propertyName as string}`}
|
|
114
|
+
/>
|
|
115
|
+
),
|
|
116
|
+
tooltip: undefined,
|
|
117
|
+
};
|
|
111
118
|
}
|
|
112
119
|
|
|
113
120
|
if (typeof value === 'number') {
|
|
114
121
|
const columnData = numberFormatter.format(value);
|
|
115
122
|
return {
|
|
116
|
-
columnData:
|
|
123
|
+
columnData: (
|
|
124
|
+
<span
|
|
125
|
+
data-test-id={`list-entry-property:${column.propertyName as string}`}
|
|
126
|
+
>
|
|
127
|
+
{columnData}
|
|
128
|
+
</span>
|
|
129
|
+
),
|
|
117
130
|
tooltip: getTooltip(columnData),
|
|
118
131
|
};
|
|
119
132
|
}
|
|
@@ -121,13 +134,25 @@ const renderData = <T extends Data>(
|
|
|
121
134
|
if (value instanceof Date) {
|
|
122
135
|
const columnData = dateFormatter.format(value);
|
|
123
136
|
return {
|
|
124
|
-
columnData:
|
|
137
|
+
columnData: (
|
|
138
|
+
<span
|
|
139
|
+
data-test-id={`list-entry-property:${column.propertyName as string}`}
|
|
140
|
+
>
|
|
141
|
+
{columnData}
|
|
142
|
+
</span>
|
|
143
|
+
),
|
|
125
144
|
tooltip: getTooltip(columnData),
|
|
126
145
|
};
|
|
127
146
|
}
|
|
128
147
|
|
|
129
148
|
return {
|
|
130
|
-
columnData:
|
|
149
|
+
columnData: (
|
|
150
|
+
<span
|
|
151
|
+
data-test-id={`list-entry-property:${column.propertyName as string}`}
|
|
152
|
+
>
|
|
153
|
+
{String(value)}
|
|
154
|
+
</span>
|
|
155
|
+
),
|
|
131
156
|
tooltip: getTooltip(String(value)),
|
|
132
157
|
};
|
|
133
158
|
};
|
|
@@ -234,7 +259,6 @@ export const ListRow = <T extends Data>({
|
|
|
234
259
|
<div
|
|
235
260
|
className={clsx(classes.cell, { [classes.nowrap]: !textWrap })}
|
|
236
261
|
title={tooltip}
|
|
237
|
-
data-test-id={`list-entry-property:${column.propertyName as string}`}
|
|
238
262
|
style={{
|
|
239
263
|
justifySelf: column.horizontalColumnAlign, // Horizontal alignment based on column config
|
|
240
264
|
alignSelf: verticalTextAlign, // Vertical alignment based on props
|