@axinom/mosaic-ui 0.33.0 → 0.34.0-rc.1
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.
|
|
3
|
+
"version": "0.34.0-rc.1",
|
|
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.
|
|
35
|
+
"@axinom/mosaic-core": "^0.4.7-rc.1",
|
|
36
36
|
"@faker-js/faker": "^7.4.0",
|
|
37
37
|
"@popperjs/core": "^2.9.2",
|
|
38
38
|
"clsx": "^1.1.0",
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"publishConfig": {
|
|
103
103
|
"access": "public"
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "7da4d7a3fa346df01e570d17d20a816477cdd708"
|
|
106
106
|
}
|
|
@@ -679,7 +679,7 @@ describe('Details', () => {
|
|
|
679
679
|
1,
|
|
680
680
|
IndicatorType.Inactive,
|
|
681
681
|
); // 1. inactive 2. dirty
|
|
682
|
-
expect(setSaveIndicator).toHaveBeenNthCalledWith(
|
|
682
|
+
expect(setSaveIndicator).toHaveBeenNthCalledWith(3, IndicatorType.Dirty); // 1. inactive 2. dirty
|
|
683
683
|
|
|
684
684
|
// submit form
|
|
685
685
|
const actionSelected = wrapper
|
|
@@ -697,7 +697,7 @@ describe('Details', () => {
|
|
|
697
697
|
|
|
698
698
|
wrapper.update();
|
|
699
699
|
|
|
700
|
-
expect(setSaveIndicator).toHaveBeenNthCalledWith(
|
|
700
|
+
expect(setSaveIndicator).toHaveBeenNthCalledWith(4, IndicatorType.Saving);
|
|
701
701
|
|
|
702
702
|
// complete form submission
|
|
703
703
|
await act(async () => {
|
|
@@ -706,7 +706,7 @@ describe('Details', () => {
|
|
|
706
706
|
wrapper.update();
|
|
707
707
|
|
|
708
708
|
expect(setSaveIndicator).toHaveBeenNthCalledWith(
|
|
709
|
-
|
|
709
|
+
5,
|
|
710
710
|
IndicatorType.Inactive,
|
|
711
711
|
);
|
|
712
712
|
|
|
@@ -453,6 +453,12 @@ const FormStationHeader: React.FC<
|
|
|
453
453
|
} else {
|
|
454
454
|
setSaveIndicator(IndicatorType.Inactive);
|
|
455
455
|
}
|
|
456
|
+
return () => {
|
|
457
|
+
// The form is not always considered "not dirty" after the save
|
|
458
|
+
// so this code will make sure that the indicator is set to inactive
|
|
459
|
+
// when the station is left.
|
|
460
|
+
setSaveIndicator(IndicatorType.Inactive);
|
|
461
|
+
};
|
|
456
462
|
}, [dirty]);
|
|
457
463
|
|
|
458
464
|
const history = useHistory();
|