@axinom/mosaic-ui 0.55.0-rc.7 → 0.55.0-rc.8
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/DynamicDataList/helpers/useColumnDefs.d.ts +1 -1
- package/dist/components/DynamicDataList/helpers/useColumnDefs.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/DynamicDataList/DynamicDataList.spec.tsx +1 -5
- package/src/components/DynamicDataList/DynamicDataList.tsx +1 -1
- package/src/components/DynamicDataList/helpers/useColumnDefs.ts +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axinom/mosaic-ui",
|
|
3
|
-
"version": "0.55.0-rc.
|
|
3
|
+
"version": "0.55.0-rc.8",
|
|
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.28-rc.
|
|
35
|
+
"@axinom/mosaic-core": "^0.4.28-rc.8",
|
|
36
36
|
"@faker-js/faker": "^7.4.0",
|
|
37
37
|
"@geoffcox/react-splitter": "^2.1.2",
|
|
38
38
|
"@mui/base": "5.0.0-beta.40",
|
|
@@ -107,5 +107,5 @@
|
|
|
107
107
|
"publishConfig": {
|
|
108
108
|
"access": "public"
|
|
109
109
|
},
|
|
110
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "ecc3d56b36e323942ecff8e598c3323edd62bcb6"
|
|
111
111
|
}
|
|
@@ -177,22 +177,18 @@ describe('DynamicDataList', () => {
|
|
|
177
177
|
const wrapper = shallow(<DynamicDataList {...defaultProps} />);
|
|
178
178
|
|
|
179
179
|
const header = wrapper.find(DynamicListHeader);
|
|
180
|
-
const container = wrapper.find('.container');
|
|
181
180
|
|
|
182
181
|
expect(header.exists()).toBe(true);
|
|
183
|
-
expect(container.hasClass('noHeader')).toBe(false);
|
|
184
182
|
});
|
|
185
183
|
|
|
186
|
-
it(`hides header row if 'showHeader' is false
|
|
184
|
+
it(`hides header row if 'showHeader' is false`, () => {
|
|
187
185
|
const wrapper = shallow(
|
|
188
186
|
<DynamicDataList {...defaultProps} showHeader={false} />,
|
|
189
187
|
);
|
|
190
188
|
|
|
191
189
|
const header = wrapper.find(DynamicListHeader);
|
|
192
|
-
const container = wrapper.find('.container');
|
|
193
190
|
|
|
194
191
|
expect(header.exists()).toBe(false);
|
|
195
|
-
expect(container.hasClass('noHeader')).toBe(true);
|
|
196
192
|
});
|
|
197
193
|
|
|
198
194
|
it(`sets 'positionKey' prop for DynamicListRow`, () => {
|
|
@@ -145,6 +145,7 @@ export const DynamicDataList = <T extends Data>({
|
|
|
145
145
|
columns,
|
|
146
146
|
allowReordering,
|
|
147
147
|
allowNewData,
|
|
148
|
+
allowEditing,
|
|
148
149
|
allowRowDragging,
|
|
149
150
|
positionPropertyName,
|
|
150
151
|
!!inlineMenuActions,
|
|
@@ -298,7 +299,6 @@ export const DynamicDataList = <T extends Data>({
|
|
|
298
299
|
<div
|
|
299
300
|
className={clsx(
|
|
300
301
|
classes.container,
|
|
301
|
-
{ [classes.noHeader]: !showHeader },
|
|
302
302
|
'dynamic-data-list-container',
|
|
303
303
|
className,
|
|
304
304
|
)}
|
|
@@ -12,6 +12,7 @@ export const useColumnDefs = function <T extends Data>(
|
|
|
12
12
|
columns: DynamicListColumn<T>[],
|
|
13
13
|
allowReordering: boolean,
|
|
14
14
|
allowNewData: boolean,
|
|
15
|
+
allowEditing: boolean,
|
|
15
16
|
allowRowDragging: boolean,
|
|
16
17
|
positionKey?: keyof T,
|
|
17
18
|
showInlineMenu?: boolean,
|
|
@@ -30,7 +31,7 @@ export const useColumnDefs = function <T extends Data>(
|
|
|
30
31
|
allowReordering,
|
|
31
32
|
allowRowDragging,
|
|
32
33
|
positionKey,
|
|
33
|
-
allowNewData || showInlineMenu,
|
|
34
|
+
allowNewData || showInlineMenu || allowEditing,
|
|
34
35
|
),
|
|
35
36
|
);
|
|
36
37
|
|
|
@@ -43,13 +44,14 @@ export const useColumnDefs = function <T extends Data>(
|
|
|
43
44
|
allowReordering,
|
|
44
45
|
allowRowDragging,
|
|
45
46
|
positionKey,
|
|
46
|
-
allowNewData || showInlineMenu,
|
|
47
|
+
allowNewData || showInlineMenu || allowEditing,
|
|
47
48
|
),
|
|
48
49
|
);
|
|
49
50
|
if (!isResized) {
|
|
50
51
|
setColumnSizes(orgColumnSizes);
|
|
51
52
|
}
|
|
52
53
|
}, [
|
|
54
|
+
allowEditing,
|
|
53
55
|
allowNewData,
|
|
54
56
|
allowReordering,
|
|
55
57
|
allowRowDragging,
|