@axinom/mosaic-ui 0.39.0-rc.0 → 0.39.0-rc.3
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/Accordion/Accordion.d.ts +7 -7
- package/dist/components/Accordion/AccordionItem/AccordionItem.d.ts +2 -2
- package/dist/components/ConfirmDialog/index.d.ts +1 -1
- package/dist/components/ConfirmDialog/index.d.ts.map +1 -1
- package/dist/index.es.js +4 -4
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/components/Accordion/Accordion.tsx +9 -9
- package/src/components/Accordion/AccordionItem/AccordionItem.tsx +2 -2
- package/src/components/ConfirmDialog/index.ts +1 -5
- package/src/components/DynamicDataList/DynamicListDataEntry/DynamicListDataEntry.spec.tsx +6 -6
- package/src/components/DynamicDataList/DynamicListRow/DynamicListRow.spec.tsx +1 -1
- package/src/components/Explorer/Explorer.stories.tsx +2 -5
- package/src/components/FormElements/CustomTags/CustomTags.spec.tsx +2 -2
- package/src/components/List/ListCheckBox/ListCheckBox.spec.tsx +10 -3
- package/src/components/List/ListRow/ListRow.spec.tsx +1 -1
- package/src/components/PageHeader/PageHeader.spec.tsx +2 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axinom/mosaic-ui",
|
|
3
|
-
"version": "0.39.0-rc.
|
|
3
|
+
"version": "0.39.0-rc.3",
|
|
4
4
|
"description": "UI components for building Axinom Mosaic applications",
|
|
5
5
|
"author": "Axinom",
|
|
6
6
|
"license": "PROPRIETARY",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"build-storybook": "storybook build"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@axinom/mosaic-core": "^0.4.12-rc.
|
|
35
|
+
"@axinom/mosaic-core": "^0.4.12-rc.3",
|
|
36
36
|
"@faker-js/faker": "^7.4.0",
|
|
37
|
-
"@popperjs/core": "^2.
|
|
37
|
+
"@popperjs/core": "^2.11.8",
|
|
38
38
|
"clsx": "^1.1.0",
|
|
39
39
|
"lodash": "^4.17.21",
|
|
40
40
|
"luxon": "^3.3.0",
|
|
@@ -104,5 +104,5 @@
|
|
|
104
104
|
"publishConfig": {
|
|
105
105
|
"access": "public"
|
|
106
106
|
},
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "1684458c348c8a75ff16d74ddc9650679413bba7"
|
|
108
108
|
}
|
|
@@ -37,16 +37,16 @@ export interface AccordionProps {
|
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* Renders a component in which each child component of the class AccordionItem can be expanded.
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
42
|
* <Accordion header={<b>Header</b>}>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
* <AccordionItem header={<b>Item 1</b>}>
|
|
44
|
+
* <p>Content 1</p>
|
|
45
|
+
* </AccordionItem>
|
|
46
|
+
* <AccordionItem header={<b>Item 2</b>}>
|
|
47
|
+
* <p>Content 2</p>
|
|
48
|
+
* </AccordionItem>
|
|
49
|
+
* </Accordion>
|
|
50
50
|
*/
|
|
51
51
|
export const Accordion: React.FC<AccordionProps> = ({
|
|
52
52
|
header,
|
|
@@ -27,8 +27,8 @@ export interface AccordionItemProps {
|
|
|
27
27
|
* Renders a single Accordion Item
|
|
28
28
|
* @example
|
|
29
29
|
* <AccordionItem header={<b>Item 2</b>}>
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
* <p>Content 2</p>
|
|
31
|
+
* </AccordionItem>
|
|
32
32
|
*/
|
|
33
33
|
export const AccordionItem: React.FC<AccordionItemProps> = ({
|
|
34
34
|
header,
|
|
@@ -322,7 +322,7 @@ describe('DynamicListDataEntry', () => {
|
|
|
322
322
|
e: 'event',
|
|
323
323
|
};
|
|
324
324
|
|
|
325
|
-
const propertyName = columnWithRenderer[0].propertyName
|
|
325
|
+
const propertyName = columnWithRenderer[0].propertyName!;
|
|
326
326
|
|
|
327
327
|
const wrapper = shallow(
|
|
328
328
|
<DynamicListDataEntry
|
|
@@ -356,7 +356,7 @@ describe('DynamicListDataEntry', () => {
|
|
|
356
356
|
e: 'event',
|
|
357
357
|
};
|
|
358
358
|
const mockNewValue = 'test-value';
|
|
359
|
-
const propertyName = columnWithRenderer[0].propertyName
|
|
359
|
+
const propertyName = columnWithRenderer[0].propertyName!;
|
|
360
360
|
const mockNewPos = 5;
|
|
361
361
|
const mockPosKey = 'id';
|
|
362
362
|
|
|
@@ -399,7 +399,7 @@ describe('DynamicListDataEntry', () => {
|
|
|
399
399
|
e: 'event',
|
|
400
400
|
};
|
|
401
401
|
const mockNewValue = 'test-value';
|
|
402
|
-
const propertyName = columnWithRenderer[0].propertyName
|
|
402
|
+
const propertyName = columnWithRenderer[0].propertyName!;
|
|
403
403
|
const mockNewPos = 5;
|
|
404
404
|
const mockPosKey = 'id';
|
|
405
405
|
|
|
@@ -440,7 +440,7 @@ describe('DynamicListDataEntry', () => {
|
|
|
440
440
|
e: 'event',
|
|
441
441
|
};
|
|
442
442
|
const mockNewValue = 'test-value';
|
|
443
|
-
const propertyName = columnWithRenderer[0].propertyName
|
|
443
|
+
const propertyName = columnWithRenderer[0].propertyName!;
|
|
444
444
|
const mockPosKey = 'id';
|
|
445
445
|
|
|
446
446
|
const wrapper = shallow(
|
|
@@ -481,7 +481,7 @@ describe('DynamicListDataEntry', () => {
|
|
|
481
481
|
e: 'event',
|
|
482
482
|
};
|
|
483
483
|
const mockNewValue = 'test-value';
|
|
484
|
-
const propertyName = columnWithRenderer[0].propertyName
|
|
484
|
+
const propertyName = columnWithRenderer[0].propertyName!;
|
|
485
485
|
const mockPosKey = 'id';
|
|
486
486
|
const mockNewPos = 5;
|
|
487
487
|
|
|
@@ -531,7 +531,7 @@ describe('DynamicListDataEntry', () => {
|
|
|
531
531
|
},
|
|
532
532
|
];
|
|
533
533
|
|
|
534
|
-
const propertyName = mockColumns[0].propertyName
|
|
534
|
+
const propertyName = mockColumns[0].propertyName!;
|
|
535
535
|
|
|
536
536
|
const wrapper = shallow(
|
|
537
537
|
<DynamicListDataEntry
|
|
@@ -245,11 +245,8 @@ initializeUi({
|
|
|
245
245
|
removeIndicator: (args) => {
|
|
246
246
|
action('removeIndicator')(args);
|
|
247
247
|
},
|
|
248
|
-
|
|
249
|
-
action('
|
|
250
|
-
},
|
|
251
|
-
hideSaveIndicator: () => {
|
|
252
|
-
action('hideSaveIndicator')();
|
|
248
|
+
setSaveIndicator: () => {
|
|
249
|
+
action('setSaveIndicator')();
|
|
253
250
|
},
|
|
254
251
|
on: (event, callback) => {
|
|
255
252
|
action('on')(event, callback);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mount, ReactWrapper, shallow
|
|
1
|
+
import { mount, ReactWrapper, shallow } from 'enzyme';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { act } from 'react-dom/test-utils';
|
|
4
4
|
import { config } from 'react-transition-group';
|
|
@@ -12,7 +12,7 @@ describe('CustomTags', () => {
|
|
|
12
12
|
|
|
13
13
|
const getTagsFromDOM = (wrapper: ReactWrapper): string[] =>
|
|
14
14
|
wrapper.find('span > span').map((node) => node.text());
|
|
15
|
-
const getTagsFromShallowDOM = (wrapper:
|
|
15
|
+
const getTagsFromShallowDOM = (wrapper: ReactWrapper): string[] =>
|
|
16
16
|
wrapper.find('span > span').map((node) => node.text());
|
|
17
17
|
|
|
18
18
|
it('renders the component without crashing', () => {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { mount, shallow } from 'enzyme';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Button } from '../../Buttons';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
ButtonContext,
|
|
6
|
+
CommonJsButtonOptions,
|
|
7
|
+
} from '../../Buttons/Button.model';
|
|
5
8
|
import { ListCheckBox } from './ListCheckBox';
|
|
6
9
|
|
|
7
10
|
describe('ListCheckBox', () => {
|
|
@@ -16,7 +19,9 @@ describe('ListCheckBox', () => {
|
|
|
16
19
|
|
|
17
20
|
const button = wrapper.find(Button);
|
|
18
21
|
|
|
19
|
-
expect(button.props().buttonContext).toBe(
|
|
22
|
+
expect((button.props() as CommonJsButtonOptions).buttonContext).toBe(
|
|
23
|
+
ButtonContext.Context,
|
|
24
|
+
);
|
|
20
25
|
});
|
|
21
26
|
|
|
22
27
|
it('sets its state to isChecked prop', () => {
|
|
@@ -24,7 +29,9 @@ describe('ListCheckBox', () => {
|
|
|
24
29
|
|
|
25
30
|
const button = wrapper.find(Button);
|
|
26
31
|
|
|
27
|
-
expect(button.props().buttonContext).toBe(
|
|
32
|
+
expect((button.props() as CommonJsButtonOptions).buttonContext).toBe(
|
|
33
|
+
ButtonContext.Active,
|
|
34
|
+
);
|
|
28
35
|
});
|
|
29
36
|
|
|
30
37
|
it(`raises the onCheckBoxToggled with the inverse of the 'isChecked' prop`, () => {
|
|
@@ -57,7 +57,7 @@ describe('ListRow', () => {
|
|
|
57
57
|
expect(actualColumns).toHaveLength(expectedColumns.length);
|
|
58
58
|
|
|
59
59
|
actualColumns.forEach((column, idx) => {
|
|
60
|
-
const expectedPropertyName = expectedColumns[idx].propertyName
|
|
60
|
+
const expectedPropertyName = expectedColumns[idx].propertyName!;
|
|
61
61
|
expect(column.key()).toEqual(expectedPropertyName);
|
|
62
62
|
|
|
63
63
|
expect(column.text()).toEqual(mockExplorerData[expectedPropertyName]);
|
|
@@ -2,10 +2,8 @@ import { mount, shallow } from 'enzyme';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { noop } from '../../helpers/utils';
|
|
4
4
|
import { PageHeader } from './PageHeader';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
PageHeaderActionProps,
|
|
8
|
-
} from './PageHeaderAction/PageHeaderAction';
|
|
5
|
+
import { PageHeaderAction } from './PageHeaderAction/PageHeaderAction';
|
|
6
|
+
import { PageHeaderActionProps } from './PageHeaderAction/PageHeaderAction.model';
|
|
9
7
|
import { PageHeaderBulkActions } from './PageHeaderBulkActions/PageHeaderBulkActions';
|
|
10
8
|
|
|
11
9
|
const defaultbulkActions: PageHeaderActionProps[] = [
|