@axinom/mosaic-ui 0.49.0 → 0.49.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axinom/mosaic-ui",
3
- "version": "0.49.0",
3
+ "version": "0.49.2",
4
4
  "description": "UI components for building Axinom Mosaic applications",
5
5
  "author": "Axinom",
6
6
  "license": "PROPRIETARY",
@@ -105,5 +105,5 @@
105
105
  "publishConfig": {
106
106
  "access": "public"
107
107
  },
108
- "gitHead": "a013c09e64dbd8e829e6da59048ccf7ed56d0eac"
108
+ "gitHead": "c1b5b3e9f204889c7ebaad43ea51f7dfb3556d80"
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: 'Test Bulk Action',
70
- onClick: action('BulkAction.onClick'),
71
- icon: IconName.X,
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 & {
@@ -39,13 +39,18 @@
39
39
 
40
40
  span {
41
41
  padding: 5px 0;
42
- display: grid;
42
+ display: block;
43
+ width: 100%;
43
44
  }
44
45
 
45
46
  &.nowrap {
46
- white-space: nowrap;
47
- text-overflow: ellipsis;
48
47
  overflow: hidden;
48
+
49
+ span {
50
+ white-space: nowrap;
51
+ text-overflow: ellipsis;
52
+ overflow: hidden;
53
+ }
49
54
  }
50
55
  }
51
56
 
@@ -588,9 +588,7 @@ describe('ListRow', () => {
588
588
  />,
589
589
  );
590
590
 
591
- const wrapperDivs = wrapper.findWhere((node) =>
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 { columnData: <span />, tooltip: undefined };
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: <span>{columnData}</span>,
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: <span>{columnData}</span>,
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: <span>{String(value)}</span>,
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
  };
@@ -148,11 +173,11 @@ const renderData = <T extends Data>(
148
173
  export const ListRow = <T extends Data>({
149
174
  columnSizes,
150
175
  columnGap,
151
- rowHeight,
152
176
  actionSize,
153
177
  horizontalTextAlign,
154
178
  verticalTextAlign,
155
179
  textWrap = false,
180
+ rowHeight = textWrap ? undefined : '50px',
156
181
  data,
157
182
  itemSelected = false,
158
183
  isTrigger = false,
@@ -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
@@ -18,7 +18,7 @@ export interface ListRowLoaderProps<T extends Data> {
18
18
  export const ListRowLoader = <T extends Data>({
19
19
  columnSizes,
20
20
  columnGap,
21
- rowHeight,
21
+ rowHeight = '50px',
22
22
  columns,
23
23
  }: PropsWithChildren<ListRowLoaderProps<T>>): JSX.Element => {
24
24
  const textLoaderHeight = 10;