@centreon/ui 24.4.1-sync-release-34022.1 → 24.4.1-test-code-coverage.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 +48 -40
- package/src/ActionsList/ActionsList.styles.ts +40 -71
- package/src/Button/Icon/index.stories.tsx +1 -1
- package/src/Button/Icon/index.tsx +1 -1
- package/src/Dashboard/Dashboard.styles.ts +6 -5
- package/src/Dialog/Confirm/index.tsx +10 -2
- package/src/Dialog/UnsavedChanges/index.tsx +21 -20
- package/src/Dialog/UnsavedChanges/translatedLabels.ts +4 -6
- package/src/Dialog/index.tsx +8 -1
- package/src/Form/Inputs/CheckboxGroup.tsx +4 -1
- package/src/Form/Inputs/Text.tsx +3 -1
- package/src/Form/Inputs/models.ts +1 -0
- package/src/Graph/BarStack/BarStack.cypress.spec.tsx +139 -0
- package/src/Graph/BarStack/BarStack.stories.tsx +123 -0
- package/src/Graph/BarStack/BarStack.styles.ts +37 -0
- package/src/Graph/BarStack/BarStack.tsx +14 -0
- package/src/Graph/BarStack/ResponsiveBarStack.tsx +209 -0
- package/src/Graph/BarStack/index.ts +1 -0
- package/src/Graph/BarStack/models.ts +19 -0
- package/src/Graph/BarStack/useResponsiveBarStack.ts +131 -0
- package/src/Graph/Gauge/Gauge.cypress.spec.tsx +102 -0
- package/src/Graph/Gauge/Gauge.tsx +1 -1
- package/src/Graph/HeatMap/HeatMap.cypress.spec.tsx +145 -0
- package/src/Graph/HeatMap/HeatMap.stories.tsx +0 -25
- package/src/Graph/HeatMap/ResponsiveHeatMap.tsx +8 -2
- package/src/Graph/Legend/Legend.tsx +21 -0
- package/src/Graph/Legend/index.ts +1 -0
- package/src/Graph/Legend/models.ts +11 -0
- package/src/Graph/LineChart/BasicComponents/Lines/Threshold/index.tsx +4 -5
- package/src/Graph/LineChart/BasicComponents/ThresholdLine.tsx +3 -1
- package/src/Graph/LineChart/Header/index.tsx +3 -31
- package/src/Graph/LineChart/InteractiveComponents/AnchorPoint/useTickGraph.ts +9 -11
- package/src/Graph/LineChart/InteractiveComponents/Annotations/Annotation/index.tsx +3 -2
- package/src/Graph/LineChart/InteractiveComponents/GraphValueTooltip/GraphValueTooltip.tsx +68 -0
- package/src/Graph/LineChart/InteractiveComponents/GraphValueTooltip/useGraphValueTooltip.ts +27 -0
- package/src/Graph/LineChart/InteractiveComponents/GraphValueTooltip/useGraphValueTooltipStyles.ts +31 -0
- package/src/Graph/LineChart/InteractiveComponents/index.tsx +132 -17
- package/src/Graph/LineChart/InteractiveComponents/interactionWithGraphAtoms.ts +7 -27
- package/src/Graph/LineChart/Legend/Legend.styles.ts +5 -9
- package/src/Graph/LineChart/Legend/LegendHeader.tsx +10 -22
- package/src/Graph/LineChart/Legend/index.tsx +17 -55
- package/src/Graph/LineChart/LineChart.cypress.spec.tsx +91 -0
- package/src/Graph/LineChart/LineChart.styles.ts +8 -0
- package/src/Graph/LineChart/LineChart.tsx +106 -116
- package/src/Graph/LineChart/LoadingSkeleton.tsx +2 -2
- package/src/Graph/LineChart/index.tsx +6 -7
- package/src/Graph/LineChart/mockedData/lastDayWithIncompleteValues.json +1320 -0
- package/src/Graph/LineChart/mockedData/lastDayWithNullValues.json +1314 -0
- package/src/Graph/LineChart/models.ts +12 -1
- package/src/Graph/PieChart/PieChart.cypress.spec.tsx +154 -0
- package/src/Graph/PieChart/PieChart.stories.tsx +194 -0
- package/src/Graph/PieChart/PieChart.styles.ts +39 -0
- package/src/Graph/PieChart/PieChart.tsx +14 -0
- package/src/Graph/PieChart/ResponsivePie.tsx +243 -0
- package/src/Graph/PieChart/index.ts +1 -0
- package/src/Graph/PieChart/models.ts +19 -0
- package/src/Graph/PieChart/useResponsivePie.ts +81 -0
- package/src/Graph/SingleBar/SingleBar.cypress.spec.tsx +121 -0
- package/src/Graph/Text/Text.cypress.spec.tsx +101 -0
- package/src/Graph/Text/Text.styles.ts +12 -1
- package/src/Graph/Text/Text.tsx +17 -12
- package/src/Graph/Tree/DescendantNodes.tsx +89 -0
- package/src/Graph/Tree/Links.tsx +77 -0
- package/src/Graph/Tree/StandaloneTree.tsx +32 -0
- package/src/Graph/Tree/Tree.cypress.spec.tsx +195 -0
- package/src/Graph/Tree/Tree.stories.tsx +160 -0
- package/src/Graph/Tree/Tree.tsx +116 -0
- package/src/Graph/Tree/constants.ts +2 -0
- package/src/Graph/Tree/index.ts +4 -0
- package/src/Graph/Tree/models.ts +55 -0
- package/src/Graph/Tree/stories/contents.tsx +164 -0
- package/src/Graph/Tree/stories/datas.ts +305 -0
- package/src/Graph/Tree/utils.ts +49 -0
- package/src/Graph/common/testUtils.ts +71 -0
- package/src/Graph/common/timeSeries/index.ts +50 -12
- package/src/Graph/common/utils.ts +19 -0
- package/src/Graph/index.ts +4 -0
- package/src/InputField/Number/Number.cypress.spec.tsx +85 -0
- package/src/InputField/Number/Number.stories.tsx +66 -0
- package/src/InputField/Number/Number.tsx +74 -0
- package/src/InputField/Search/index.tsx +2 -2
- package/src/InputField/Select/Autocomplete/Multi/index.tsx +4 -2
- package/src/InputField/Select/Autocomplete/index.tsx +10 -3
- package/src/InputField/Select/IconPopover/index.tsx +1 -1
- package/src/InputField/Select/index.tsx +14 -1
- package/src/InputField/Text/index.tsx +38 -38
- package/src/Listing/ActionBar/index.tsx +10 -10
- package/src/Listing/Cell/DataCell.styles.ts +3 -0
- package/src/Listing/Cell/DataCell.tsx +8 -4
- package/src/Listing/Listing.cypress.spec.tsx +217 -33
- package/src/Listing/Listing.styles.ts +3 -5
- package/src/Listing/Row/Row.tsx +7 -3
- package/src/Listing/index.stories.tsx +25 -2
- package/src/Listing/index.test.tsx +1 -1
- package/src/Listing/index.tsx +202 -143
- package/src/Listing/models.ts +1 -0
- package/src/Listing/useStyleTable.ts +1 -0
- package/src/Panel/index.tsx +1 -1
- package/src/PopoverMenu/index.tsx +6 -5
- package/src/ThemeProvider/index.tsx +3 -0
- package/src/TimePeriods/CustomTimePeriod/CompactCustomTimePeriod.styles.ts +6 -7
- package/src/TimePeriods/ResolutionTimePeriod.cypress.spec.tsx +12 -9
- package/src/Typography/FluidTypography/FluidTypography.cypress.spec.tsx +27 -0
- package/src/Typography/FluidTypography/index.stories.tsx +2 -2
- package/src/Typography/FluidTypography/index.tsx +21 -28
- package/src/api/index.ts +3 -3
- package/src/api/useGraphQuery/index.ts +26 -5
- package/src/api/useGraphQuery/models.ts +5 -0
- package/src/api/useMutationQuery/index.test.ts +4 -4
- package/src/api/useMutationQuery/index.ts +24 -13
- package/src/components/CollapsibleItem/CollapsibleItem.cypress.spec.tsx +76 -0
- package/src/components/CollapsibleItem/CollapsibleItem.stories.tsx +26 -0
- package/src/components/CollapsibleItem/CollapsibleItem.tsx +43 -14
- package/src/components/CollapsibleItem/useCollapsibleItemStyles.ts +24 -1
- package/src/components/DataTable/DataTable.cypress.spec.tsx +14 -33
- package/src/components/DataTable/Item/DataTableItem.tsx +4 -60
- package/src/components/Form/{AccessRightsV2 → AccessRights}/AccessRights.cypress.spec.tsx +36 -13
- package/src/components/Form/{AccessRightsV2 → AccessRights}/ShareInput/ContactSwitch.tsx +11 -3
- package/src/components/Form/{AccessRightsV2 → AccessRights}/ShareInput/ShareInput.styles.ts +8 -0
- package/src/components/Form/{AccessRightsV2 → AccessRights}/ShareInput/ShareInput.tsx +1 -0
- package/src/components/Form/{AccessRightsV2 → AccessRights}/ShareInput/useShareInput.tsx +4 -0
- package/src/components/Form/{AccessRightsV2 → AccessRights}/models.ts +1 -0
- package/src/components/Form/{AccessRightsV2 → AccessRights}/storiesData.ts +23 -22
- package/src/components/Form/Dashboard/DashboardDuplicationForm.tsx +85 -0
- package/src/components/Form/Dashboard/index.ts +1 -0
- package/src/components/Form/FormActions.tsx +7 -2
- package/src/components/Form/index.ts +2 -2
- package/src/components/ItemComposition/Item.tsx +1 -1
- package/src/components/ItemComposition/ItemComposition.cypress.spec.tsx +113 -0
- package/src/components/ItemComposition/ItemComposition.stories.tsx +14 -0
- package/src/components/ItemComposition/ItemComposition.styles.ts +36 -3
- package/src/components/ItemComposition/ItemComposition.tsx +41 -17
- package/src/components/List/Item/ListItem.tsx +3 -3
- package/src/components/Modal/ConfirmationModal/ConfirmationModal.cypress.spec.tsx +168 -0
- package/src/components/Modal/ConfirmationModal/ConfirmationModal.stories.tsx +62 -0
- package/src/components/Modal/ConfirmationModal/ConfirmationModal.tsx +87 -0
- package/src/components/Modal/Modal.styles.ts +8 -3
- package/src/components/Modal/index.ts +2 -0
- package/src/components/Tooltip/ConfirmationTooltip/ConfirmationTooltip.stories.tsx +3 -3
- package/src/components/Tooltip/ConfirmationTooltip/ConfirmationTooltip.tsx +1 -1
- package/src/components/Tooltip/ConfirmationTooltip/models.ts +1 -1
- package/src/components/Zoom/Minimap.tsx +129 -0
- package/src/components/Zoom/Zoom.cypress.spec.tsx +246 -0
- package/src/components/Zoom/Zoom.stories.tsx +115 -0
- package/src/components/Zoom/Zoom.styles.tsx +68 -0
- package/src/components/Zoom/Zoom.tsx +64 -0
- package/src/components/Zoom/ZoomContent.tsx +170 -0
- package/src/components/Zoom/constants.ts +2 -0
- package/src/components/Zoom/localPoint.ts +51 -0
- package/src/components/Zoom/models.ts +25 -0
- package/src/components/Zoom/useMinimap.ts +156 -0
- package/src/components/Zoom/useZoom.ts +70 -0
- package/src/components/Zoom/utils.ts +55 -0
- package/src/components/index.ts +1 -0
- package/src/index.ts +1 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/resourcesStatusURL.ts +166 -0
- package/src/utils/useFullscreen/Fullscreen.cypress.spec.tsx +130 -0
- package/src/utils/useFullscreen/atoms.ts +3 -0
- package/src/utils/useFullscreen/index.ts +2 -0
- package/src/utils/useFullscreen/translatedLabels.ts +1 -0
- package/src/utils/useFullscreen/useFullscreen.ts +73 -0
- package/src/utils/useFullscreen/useFullscreenListener.ts +62 -0
- package/src/utils/useInfiniteScrollListing.ts +4 -1
- package/src/Graph/LineChart/BasicComponents/LoadingProgress.tsx +0 -46
- package/src/Graph/LineChart/InteractiveComponents/AnchorPoint/TooltipAnchorPoint.tsx +0 -96
- package/src/Graph/LineChart/InteractiveComponents/AnchorPoint/useTooltipAnchorPoint.ts +0 -107
- package/src/Graph/LineChart/Legend/InteractiveValue.tsx +0 -22
- package/src/Graph/LineChart/Legend/useInteractiveValues.ts +0 -99
- package/src/Typography/FluidTypography/useFluidResizeObserver.ts +0 -56
- package/src/components/Form/AccessRights/AccessRights.resource.ts +0 -45
- package/src/components/Form/AccessRights/AccessRightsForm.stories.tsx +0 -59
- package/src/components/Form/AccessRights/AccessRightsForm.styles.ts +0 -21
- package/src/components/Form/AccessRights/AccessRightsForm.tsx +0 -67
- package/src/components/Form/AccessRights/AccessRightsFormActions.tsx +0 -80
- package/src/components/Form/AccessRights/Input/AddAction.tsx +0 -31
- package/src/components/Form/AccessRights/Input/ContactAccessRightInput.stories.tsx +0 -54
- package/src/components/Form/AccessRights/Input/ContactAccessRightInput.tsx +0 -72
- package/src/components/Form/AccessRights/Input/ContactAccessRightsInput.styles.ts +0 -22
- package/src/components/Form/AccessRights/Input/ContactInputField.tsx +0 -105
- package/src/components/Form/AccessRights/Input/RoleInputField.tsx +0 -29
- package/src/components/Form/AccessRights/List/ContactAccessRightsList.stories.tsx +0 -97
- package/src/components/Form/AccessRights/List/ContactAccessRightsList.styles.ts +0 -71
- package/src/components/Form/AccessRights/List/ContactAccessRightsList.tsx +0 -51
- package/src/components/Form/AccessRights/List/ContactAccessRightsListItem.stories.tsx +0 -116
- package/src/components/Form/AccessRights/List/ContactAccessRightsListItem.tsx +0 -118
- package/src/components/Form/AccessRights/List/ContactAccessRightsListItemSkeleton.tsx +0 -26
- package/src/components/Form/AccessRights/List/ContactAccessRightsListSkeleton.tsx +0 -28
- package/src/components/Form/AccessRights/Stats/AccessRightsStats.styles.ts +0 -18
- package/src/components/Form/AccessRights/Stats/AccessRightsStats.tsx +0 -41
- package/src/components/Form/AccessRights/__fixtures__/contactAccessRight.mock.ts +0 -54
- package/src/components/Form/AccessRights/common/GroupLabel.styles.ts +0 -18
- package/src/components/Form/AccessRights/common/GroupLabel.tsx +0 -15
- package/src/components/Form/AccessRights/common/Input.styles.ts +0 -48
- package/src/components/Form/AccessRights/common/RoleInputSelect.styles.ts +0 -11
- package/src/components/Form/AccessRights/common/RoleInputSelect.tsx +0 -57
- package/src/components/Form/AccessRights/index.ts +0 -3
- package/src/components/Form/AccessRights/useAccessRightsForm.test.tsx +0 -531
- package/src/components/Form/AccessRights/useAccessRightsForm.tsx +0 -282
- package/src/components/Form/AccessRights/useAccessRightsForm.utils.ts +0 -41
- /package/src/components/Form/{AccessRightsV2 → AccessRights}/AccessRights.stories.tsx +0 -0
- /package/src/components/Form/{AccessRightsV2 → AccessRights}/AccessRights.styles.ts +0 -0
- /package/src/components/Form/{AccessRightsV2 → AccessRights}/AccessRights.tsx +0 -0
- /package/src/components/Form/{AccessRightsV2 → AccessRights}/Actions/Actions.styles.ts +0 -0
- /package/src/components/Form/{AccessRightsV2 → AccessRights}/Actions/Actions.tsx +0 -0
- /package/src/components/Form/{AccessRightsV2 → AccessRights}/Actions/useActions.ts +0 -0
- /package/src/components/Form/{AccessRightsV2 → AccessRights}/List/Item.tsx +0 -0
- /package/src/components/Form/{AccessRightsV2 → AccessRights}/List/List.styles.tsx +0 -0
- /package/src/components/Form/{AccessRightsV2 → AccessRights}/List/List.tsx +0 -0
- /package/src/components/Form/{AccessRightsV2 → AccessRights}/List/ListItemSkeleton.tsx +0 -0
- /package/src/components/Form/{AccessRightsV2 → AccessRights}/List/ListSkeleton.tsx +0 -0
- /package/src/components/Form/{AccessRightsV2 → AccessRights}/List/RemoveAccessRight.tsx +0 -0
- /package/src/components/Form/{AccessRightsV2 → AccessRights}/List/StateChip.tsx +0 -0
- /package/src/components/Form/{AccessRightsV2 → AccessRights}/List/useItem.ts +0 -0
- /package/src/components/Form/{AccessRightsV2 → AccessRights}/Provider.tsx +0 -0
- /package/src/components/Form/{AccessRightsV2 → AccessRights}/Stats/Stats.tsx +0 -0
- /package/src/components/Form/{AccessRightsV2 → AccessRights}/atoms.ts +0 -0
- /package/src/components/Form/{AccessRightsV2 → AccessRights}/common/RoleSelectField.styles.tsx +0 -0
- /package/src/components/Form/{AccessRightsV2 → AccessRights}/common/RoleSelectField.tsx +0 -0
- /package/src/components/Form/{AccessRightsV2 → AccessRights}/useAccessRightsInitValues.ts +0 -0
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@centreon/ui",
|
|
3
|
-
"version": "24.4.1-
|
|
3
|
+
"version": "24.4.1-test-code-coverage.1",
|
|
4
4
|
"description": "Centreon UI Components",
|
|
5
5
|
"scripts": {
|
|
6
|
+
"update:deps": "pnpx npm-check-updates -i --format group",
|
|
6
7
|
"eslint": "eslint ./src --ext .js,.jsx,.ts,.tsx --max-warnings 0",
|
|
7
8
|
"eslint:fix": "pnpm eslint --fix",
|
|
8
9
|
"storybook": "storybook dev -p 9001 -c .storybook",
|
|
@@ -28,6 +29,7 @@
|
|
|
28
29
|
"author": {
|
|
29
30
|
"name": "centreon@centreon.com"
|
|
30
31
|
},
|
|
32
|
+
"baseCodeCoveragePercentage": 60,
|
|
31
33
|
"license": "GPL-2.0",
|
|
32
34
|
"bugs": {
|
|
33
35
|
"url": "https://github.com/centreon/centreon/issues"
|
|
@@ -47,11 +49,11 @@
|
|
|
47
49
|
"test/*"
|
|
48
50
|
],
|
|
49
51
|
"devDependencies": {
|
|
50
|
-
"@cypress/react": "^
|
|
51
|
-
"@cypress/webpack-dev-server": "^3.
|
|
52
|
-
"@faker-js/faker": "^8.
|
|
53
|
-
"@mdx-js/react": "^
|
|
54
|
-
"@simonsmith/cypress-image-snapshot": "^
|
|
52
|
+
"@cypress/react": "^8.0.0",
|
|
53
|
+
"@cypress/webpack-dev-server": "^3.7.4",
|
|
54
|
+
"@faker-js/faker": "^8.4.1",
|
|
55
|
+
"@mdx-js/react": "^3.0.1",
|
|
56
|
+
"@simonsmith/cypress-image-snapshot": "^9.0.1",
|
|
55
57
|
"@storybook/addon-a11y": "^7.0.9",
|
|
56
58
|
"@storybook/addon-docs": "^7.0.9",
|
|
57
59
|
"@storybook/addon-essentials": "^7.0.9",
|
|
@@ -61,27 +63,26 @@
|
|
|
61
63
|
"@storybook/builder-vite": "^7.0.9",
|
|
62
64
|
"@storybook/jest": "^0.1.0",
|
|
63
65
|
"@storybook/manager-api": "^7.0.9",
|
|
64
|
-
"@storybook/mdx2-csf": "^1.
|
|
66
|
+
"@storybook/mdx2-csf": "^1.1.0",
|
|
65
67
|
"@storybook/preview-api": "^7.0.9",
|
|
66
68
|
"@storybook/react": "^7.0.9",
|
|
67
69
|
"@storybook/react-vite": "^7.0.9",
|
|
68
|
-
"@storybook/test-runner": "^0.
|
|
70
|
+
"@storybook/test-runner": "^0.16.0",
|
|
69
71
|
"@storybook/testing-library": "^0.1.0",
|
|
70
72
|
"@storybook/theming": "^7.0.9",
|
|
71
73
|
"@testing-library/cypress": "^8.0.7",
|
|
72
74
|
"@testing-library/jest-dom": "^5.16.5",
|
|
73
75
|
"@testing-library/react": "^13.4.0",
|
|
74
76
|
"@testing-library/react-hooks": "^8.0.1",
|
|
75
|
-
"@types/
|
|
76
|
-
"@types/jest": "^27.5.0",
|
|
77
|
+
"@types/jest": "^29.5.12",
|
|
77
78
|
"@types/mocha": "^10.0.6",
|
|
78
|
-
"@types/ramda": "^0.29.
|
|
79
|
-
"@types/react": "^18.
|
|
80
|
-
"@types/testing-library__jest-dom": "^
|
|
81
|
-
"@vitejs/plugin-react": "^4.
|
|
82
|
-
"@vitejs/plugin-react-swc": "^3.
|
|
83
|
-
"axios-mock-adapter": "^1.
|
|
84
|
-
"cypress": "^13.
|
|
79
|
+
"@types/ramda": "^0.29.9",
|
|
80
|
+
"@types/react": "^18.2.65",
|
|
81
|
+
"@types/testing-library__jest-dom": "^6.0.0",
|
|
82
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
83
|
+
"@vitejs/plugin-react-swc": "^3.6.0",
|
|
84
|
+
"axios-mock-adapter": "^1.22.0",
|
|
85
|
+
"cypress": "^13.7.1",
|
|
85
86
|
"identity-obj-proxy": "^3.0.0",
|
|
86
87
|
"jest-transform-stub": "^2.0.0",
|
|
87
88
|
"mochawesome": "^7.1.3",
|
|
@@ -92,46 +93,53 @@
|
|
|
92
93
|
"react-dom": "^18.2.0",
|
|
93
94
|
"react-test-renderer": "^18.2.0",
|
|
94
95
|
"remark-gfm": "^3.0.1",
|
|
95
|
-
"sass": "^1.62.1",
|
|
96
96
|
"speed-measure-vite-plugin": "^0.1.2",
|
|
97
|
-
"storybook": "^7.
|
|
98
|
-
"storybook-addon-mock": "^4.
|
|
99
|
-
"storybook-dark-mode": "^3.0.
|
|
100
|
-
"style-dictionary": "^3.
|
|
101
|
-
"ts-node": "^10.9.
|
|
97
|
+
"storybook": "^7.6.8",
|
|
98
|
+
"storybook-addon-mock": "^4.3.0",
|
|
99
|
+
"storybook-dark-mode": "^3.0.3",
|
|
100
|
+
"style-dictionary": "^3.9.2",
|
|
101
|
+
"ts-node": "^10.9.2",
|
|
102
102
|
"use-resize-observer": "^9.1.0",
|
|
103
103
|
"vite": "^4.3.5",
|
|
104
104
|
"vite-plugin-istanbul": "^5.0.0",
|
|
105
105
|
"vite-plugin-svgr": "^3.2.0",
|
|
106
|
-
"vite-plugin-turbosnap": "^1.0.
|
|
106
|
+
"vite-plugin-turbosnap": "^1.0.3"
|
|
107
107
|
},
|
|
108
108
|
"dependencies": {
|
|
109
|
-
"@lexical/html": "^0.12.
|
|
110
|
-
"@lexical/link": "^0.12.
|
|
111
|
-
"@lexical/list": "^0.12.
|
|
112
|
-
"@lexical/react": "^0.12.
|
|
113
|
-
"@lexical/rich-text": "^0.12.
|
|
114
|
-
"@lexical/selection": "^0.12.
|
|
115
|
-
"@lexical/utils": "^0.12.
|
|
109
|
+
"@lexical/html": "^0.12.6",
|
|
110
|
+
"@lexical/link": "^0.12.6",
|
|
111
|
+
"@lexical/list": "^0.12.6",
|
|
112
|
+
"@lexical/react": "^0.12.6",
|
|
113
|
+
"@lexical/rich-text": "^0.12.6",
|
|
114
|
+
"@lexical/selection": "^0.12.6",
|
|
115
|
+
"@lexical/utils": "^0.12.6",
|
|
116
116
|
"@react-spring/web": "^9.7.3",
|
|
117
|
+
"@visx/clip-path": "^3.3.0",
|
|
117
118
|
"@visx/curve": "^2.1.0",
|
|
119
|
+
"@visx/event": "^3.3.0",
|
|
118
120
|
"@visx/group": "^3.3.0",
|
|
119
|
-
"@visx/
|
|
120
|
-
"@visx/
|
|
121
|
-
"@visx/
|
|
121
|
+
"@visx/hierarchy": "^3.3.0",
|
|
122
|
+
"@visx/legend": "^3.5.0",
|
|
123
|
+
"@visx/pattern": "^3.3.0",
|
|
124
|
+
"@visx/point": "^3.3.0",
|
|
125
|
+
"@visx/scale": "^3.5.0",
|
|
126
|
+
"@visx/shape": "^2.18.0",
|
|
127
|
+
"@visx/text": "^3.3.0",
|
|
122
128
|
"@visx/threshold": "^2.12.2",
|
|
123
129
|
"@visx/visx": "2.16.0",
|
|
130
|
+
"@visx/zoom": "^3.3.0",
|
|
124
131
|
"anylogger": "^1.0.11",
|
|
125
|
-
"d3-array": "3.2.
|
|
126
|
-
"humanize-duration": "^3.
|
|
127
|
-
"lexical": "^0.12.
|
|
132
|
+
"d3-array": "3.2.4",
|
|
133
|
+
"humanize-duration": "^3.31.0",
|
|
134
|
+
"lexical": "^0.12.6",
|
|
128
135
|
"notistack": "^3.0.1",
|
|
136
|
+
"numeral": "^2.0.6",
|
|
129
137
|
"ramda": "0.29.1",
|
|
130
|
-
"react-grid-layout": "^1.
|
|
138
|
+
"react-grid-layout": "^1.4.4",
|
|
131
139
|
"react-html-parser": "^2.0.2",
|
|
132
140
|
"react-resizable": "^3.0.5",
|
|
133
141
|
"react-transition-group": "^4.4.5",
|
|
134
|
-
"sanitize-html": "^2.
|
|
142
|
+
"sanitize-html": "^2.12.1",
|
|
135
143
|
"ulog": "^2.0.0-beta.19"
|
|
136
144
|
},
|
|
137
145
|
"peerDependencies": {
|
|
@@ -143,7 +151,7 @@
|
|
|
143
151
|
"@mui/material": "5.x",
|
|
144
152
|
"@mui/styles": "5.x",
|
|
145
153
|
"@tanstack/react-query": "5.x",
|
|
146
|
-
"axios": "
|
|
154
|
+
"axios": ">= 1.6.4",
|
|
147
155
|
"dayjs": "1.x",
|
|
148
156
|
"formik": "2.x",
|
|
149
157
|
"jotai": "2.x",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { makeStyles } from 'tss-react/mui';
|
|
2
2
|
import { equals } from 'ramda';
|
|
3
3
|
|
|
4
|
-
import { Theme
|
|
4
|
+
import { Theme } from '@mui/material';
|
|
5
5
|
|
|
6
6
|
interface GetBackgroundAndColorProps {
|
|
7
7
|
status: string;
|
|
@@ -18,96 +18,65 @@ export const useStyles = makeStyles()((theme) => ({
|
|
|
18
18
|
'& .MuiListItemText-secondary': {
|
|
19
19
|
textWrap: 'pretty'
|
|
20
20
|
},
|
|
21
|
-
|
|
21
|
+
|
|
22
|
+
'&:hover': {
|
|
22
23
|
'& .MuiListItemIcon-root': {
|
|
23
|
-
color: getColor({ status: '
|
|
24
|
-
}
|
|
24
|
+
color: getColor({ status: 'info', theme })
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
'&[data-variant="error"]': {
|
|
25
28
|
'&:hover': {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
color: getColor({ status: 'error', theme })
|
|
31
|
-
},
|
|
32
|
-
color: theme.palette.error.main
|
|
29
|
+
'& .MuiListItemIcon-root': {
|
|
30
|
+
color: getColor({ status: 'error', theme })
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
33
|
},
|
|
34
34
|
'&[data-variant="info"]': {
|
|
35
|
-
'& .MuiListItemIcon-root': {
|
|
36
|
-
color: getColor({ status: 'info', theme })
|
|
37
|
-
},
|
|
38
35
|
'&:hover': {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
color: getColor({ status: 'info', theme })
|
|
44
|
-
},
|
|
45
|
-
color: theme.palette.info.main
|
|
36
|
+
'& .MuiListItemIcon-root': {
|
|
37
|
+
color: getColor({ status: 'info', theme })
|
|
38
|
+
}
|
|
39
|
+
}
|
|
46
40
|
},
|
|
41
|
+
|
|
47
42
|
'&[data-variant="pending"]': {
|
|
48
|
-
'& .MuiListItemIcon-root': {
|
|
49
|
-
color: getColor({ status: 'pending', theme })
|
|
50
|
-
},
|
|
51
43
|
'&:hover': {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
color: getColor({ status: 'pending', theme })
|
|
57
|
-
},
|
|
58
|
-
color: theme.palette.pending.main
|
|
44
|
+
'& .MuiListItemIcon-root': {
|
|
45
|
+
color: getColor({ status: 'pending', theme })
|
|
46
|
+
}
|
|
47
|
+
}
|
|
59
48
|
},
|
|
49
|
+
|
|
60
50
|
'&[data-variant="primary"]': {
|
|
61
|
-
'& .MuiListItemIcon-root': {
|
|
62
|
-
color: getColor({ status: 'primary', theme })
|
|
63
|
-
},
|
|
64
51
|
'&:hover': {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
color: getColor({ status: 'primary', theme })
|
|
70
|
-
},
|
|
71
|
-
color: theme.palette.primary.main
|
|
52
|
+
'& .MuiListItemIcon-root': {
|
|
53
|
+
color: getColor({ status: 'primary', theme })
|
|
54
|
+
}
|
|
55
|
+
}
|
|
72
56
|
},
|
|
57
|
+
|
|
73
58
|
'&[data-variant="secondary"]': {
|
|
74
|
-
'& .MuiListItemIcon-root': {
|
|
75
|
-
color: getColor({ status: 'secondary', theme })
|
|
76
|
-
},
|
|
77
59
|
'&:hover': {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
color: getColor({ status: 'secondary', theme })
|
|
83
|
-
},
|
|
84
|
-
color: theme.palette.secondary.main
|
|
60
|
+
'& .MuiListItemIcon-root': {
|
|
61
|
+
color: getColor({ status: 'secondary', theme })
|
|
62
|
+
}
|
|
63
|
+
}
|
|
85
64
|
},
|
|
65
|
+
|
|
86
66
|
'&[data-variant="success"]': {
|
|
87
|
-
'& .MuiListItemIcon-root': {
|
|
88
|
-
color: getColor({ status: 'success', theme })
|
|
89
|
-
},
|
|
90
67
|
'&:hover': {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
color: getColor({ status: 'success', theme })
|
|
96
|
-
},
|
|
97
|
-
color: theme.palette.success.main
|
|
68
|
+
'& .MuiListItemIcon-root': {
|
|
69
|
+
color: getColor({ status: 'success', theme })
|
|
70
|
+
}
|
|
71
|
+
}
|
|
98
72
|
},
|
|
73
|
+
|
|
99
74
|
'&[data-variant="warning"]': {
|
|
100
|
-
'& .MuiListItemIcon-root': {
|
|
101
|
-
color: getColor({ status: 'warning', theme })
|
|
102
|
-
},
|
|
103
75
|
'&:hover': {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
color: getColor({ status: 'warning', theme })
|
|
109
|
-
},
|
|
110
|
-
color: theme.palette.warning.main
|
|
76
|
+
'& .MuiListItemIcon-root': {
|
|
77
|
+
color: getColor({ status: 'warning', theme })
|
|
78
|
+
}
|
|
79
|
+
}
|
|
111
80
|
}
|
|
112
81
|
},
|
|
113
82
|
list: {
|
|
@@ -4,7 +4,7 @@ import { makeStyles } from 'tss-react/mui';
|
|
|
4
4
|
import AccessibilityIcon from '@mui/icons-material/Accessibility';
|
|
5
5
|
import { Theme } from '@mui/material';
|
|
6
6
|
|
|
7
|
-
import IconButton from '.';
|
|
7
|
+
import { IconButton } from '.';
|
|
8
8
|
|
|
9
9
|
const useStyles = makeStyles()((theme: Theme) => ({
|
|
10
10
|
root: {
|
|
@@ -76,11 +76,12 @@ export const useDashboardItemStyles = makeStyles<{ hasHeader: boolean }>()(
|
|
|
76
76
|
border: 'none',
|
|
77
77
|
borderRadius: theme.spacing(1),
|
|
78
78
|
height: '100%',
|
|
79
|
-
paddingBottom: theme.spacing(2),
|
|
80
79
|
width: '100%'
|
|
81
80
|
},
|
|
82
81
|
widgetContent: {
|
|
83
|
-
height:
|
|
82
|
+
height: hasHeader
|
|
83
|
+
? `calc(100% - ${theme.spacing(3.5)} - ${theme.spacing(0.5)})`
|
|
84
|
+
: `calc(100% - ${theme.spacing(3.5)})`
|
|
84
85
|
},
|
|
85
86
|
widgetHeader: {
|
|
86
87
|
'&:hover': {
|
|
@@ -92,17 +93,17 @@ export const useDashboardItemStyles = makeStyles<{ hasHeader: boolean }>()(
|
|
|
92
93
|
'&[data-canMove="true"]': {
|
|
93
94
|
cursor: 'move'
|
|
94
95
|
},
|
|
95
|
-
padding: theme.spacing(0.5
|
|
96
|
+
padding: theme.spacing(0, 1.5),
|
|
96
97
|
position: 'relative'
|
|
97
98
|
},
|
|
98
99
|
widgetHeaderDraggable: {
|
|
99
100
|
height: '100%',
|
|
100
101
|
position: 'absolute',
|
|
101
|
-
width: '
|
|
102
|
+
width: '95%'
|
|
102
103
|
},
|
|
103
104
|
widgetPadding: {
|
|
104
105
|
overflowX: 'auto',
|
|
105
|
-
padding:
|
|
106
|
+
padding: theme.spacing(0.5, 1.5, 1.5)
|
|
106
107
|
}
|
|
107
108
|
})
|
|
108
109
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DialogContentText, Typography } from '@mui/material';
|
|
1
|
+
import { ButtonProps, DialogContentText, Typography } from '@mui/material';
|
|
2
2
|
|
|
3
3
|
import Dialog, { Props as DialogProps } from '..';
|
|
4
4
|
|
|
@@ -6,15 +6,23 @@ type Props = DialogProps & {
|
|
|
6
6
|
children?: JSX.Element;
|
|
7
7
|
labelMessage?: string | null;
|
|
8
8
|
labelSecondMessage?: string | null;
|
|
9
|
+
restCancelButtonProps?: ButtonProps;
|
|
10
|
+
restConfirmButtonProps?: ButtonProps;
|
|
9
11
|
};
|
|
10
12
|
|
|
11
13
|
const Confirm = ({
|
|
12
14
|
labelMessage,
|
|
13
15
|
labelSecondMessage,
|
|
14
16
|
children,
|
|
17
|
+
restCancelButtonProps,
|
|
18
|
+
restConfirmButtonProps,
|
|
15
19
|
...rest
|
|
16
20
|
}: Props): JSX.Element => (
|
|
17
|
-
<Dialog
|
|
21
|
+
<Dialog
|
|
22
|
+
restCancelButtonProps={restCancelButtonProps}
|
|
23
|
+
restConfirmButtonProps={restConfirmButtonProps}
|
|
24
|
+
{...rest}
|
|
25
|
+
>
|
|
18
26
|
<DialogContentText>
|
|
19
27
|
{labelMessage && <Typography>{labelMessage}</Typography>}
|
|
20
28
|
{labelSecondMessage && <Typography>{labelSecondMessage}</Typography>}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { not } from 'ramda';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { Modal } from '../../components/Modal';
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
7
|
labelDiscard,
|
|
8
8
|
labelDoYouWantToQuitWithoutResolving,
|
|
9
|
-
labelDoYouWantToQuitWithoutSaving,
|
|
10
9
|
labelDoYouWantToResolveErrors,
|
|
11
10
|
labelDoYouWantToSaveChanges,
|
|
12
11
|
labelResolve,
|
|
13
12
|
labelSave,
|
|
14
13
|
labelThereAreErrorsInTheForm,
|
|
15
|
-
|
|
14
|
+
labelIfYouClickOnDiscard
|
|
16
15
|
} from './translatedLabels';
|
|
17
16
|
|
|
18
17
|
interface Props {
|
|
@@ -40,30 +39,32 @@ const UnsavedChangesDialog = ({
|
|
|
40
39
|
const labelConfirm = isValidForm ? labelSave : labelResolve;
|
|
41
40
|
|
|
42
41
|
const labelMessage = `${
|
|
43
|
-
isValidForm ?
|
|
44
|
-
}. ${
|
|
45
|
-
isValidForm
|
|
46
|
-
? labelDoYouWantToQuitWithoutSaving
|
|
47
|
-
: labelDoYouWantToQuitWithoutResolving
|
|
48
|
-
}`;
|
|
42
|
+
isValidForm ? labelIfYouClickOnDiscard : labelThereAreErrorsInTheForm
|
|
43
|
+
}. ${isValidForm ? '' : labelDoYouWantToQuitWithoutResolving}`;
|
|
49
44
|
|
|
50
45
|
if (not(dialogOpened)) {
|
|
51
46
|
return null;
|
|
52
47
|
}
|
|
53
48
|
|
|
54
49
|
return (
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
labelCancel={t(labelDiscard)}
|
|
58
|
-
labelConfirm={t(labelConfirm)}
|
|
59
|
-
labelMessage={t(labelMessage)}
|
|
60
|
-
labelTitle={t(labelTitle)}
|
|
50
|
+
<Modal
|
|
51
|
+
hasCloseButton
|
|
61
52
|
open={dialogOpened}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
53
|
+
size="medium"
|
|
54
|
+
onClose={closeDialog}
|
|
55
|
+
>
|
|
56
|
+
<Modal.Header>{t(labelTitle)}</Modal.Header>
|
|
57
|
+
<Modal.Body>{t(labelMessage)}</Modal.Body>
|
|
58
|
+
<Modal.Actions
|
|
59
|
+
disabled={isSubmitting}
|
|
60
|
+
labels={{
|
|
61
|
+
cancel: t(labelDiscard),
|
|
62
|
+
confirm: t(labelConfirm)
|
|
63
|
+
}}
|
|
64
|
+
onCancel={discardChanges}
|
|
65
|
+
onConfirm={isValidForm ? saveChanges : closeDialog}
|
|
66
|
+
/>
|
|
67
|
+
</Modal>
|
|
67
68
|
);
|
|
68
69
|
};
|
|
69
70
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
export const labelDiscard = 'Discard';
|
|
2
2
|
export const labelResolve = 'Resolve';
|
|
3
|
-
export const
|
|
3
|
+
export const labelIfYouClickOnDiscard =
|
|
4
|
+
'If you click on Discard, your changes will not be saved.';
|
|
4
5
|
export const labelThereAreErrorsInTheForm = 'There are errors in the form';
|
|
5
|
-
export const labelDoYouWantToQuitWithoutSaving =
|
|
6
|
-
'Do you want to quit the form without saving the changes?';
|
|
7
6
|
export const labelDoYouWantToQuitWithoutResolving =
|
|
8
7
|
'Do you want to quit the form without resolving the errors?';
|
|
9
8
|
export const labelDoYouWantToSaveChanges = 'Do you want to save the changes?';
|
|
@@ -14,11 +13,10 @@ export const labelSave = 'Save';
|
|
|
14
13
|
export default {
|
|
15
14
|
labelDiscard,
|
|
16
15
|
labelDoYouWantToQuitWithoutResolving,
|
|
17
|
-
labelDoYouWantToQuitWithoutSaving,
|
|
18
16
|
labelDoYouWantToResolveErrors,
|
|
19
17
|
labelDoYouWantToSaveChanges,
|
|
18
|
+
labelIfYouClickOnDiscard,
|
|
20
19
|
labelResolve,
|
|
21
20
|
labelSave,
|
|
22
|
-
labelThereAreErrorsInTheForm
|
|
23
|
-
labelYourFormHasUnsavedChanges
|
|
21
|
+
labelThereAreErrorsInTheForm
|
|
24
22
|
};
|
package/src/Dialog/index.tsx
CHANGED
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
DialogContent,
|
|
10
10
|
DialogActions,
|
|
11
11
|
DialogProps,
|
|
12
|
-
CircularProgress
|
|
12
|
+
CircularProgress,
|
|
13
|
+
ButtonProps
|
|
13
14
|
} from '@mui/material';
|
|
14
15
|
|
|
15
16
|
import { DataTestAttributes } from '../@types/data-attributes';
|
|
@@ -48,6 +49,8 @@ export type Props = {
|
|
|
48
49
|
onClose?: () => void;
|
|
49
50
|
onConfirm: (event, value?) => void;
|
|
50
51
|
open: boolean;
|
|
52
|
+
restCancelButtonProps?: ButtonProps;
|
|
53
|
+
restConfirmButtonProps?: ButtonProps;
|
|
51
54
|
submitting?: boolean;
|
|
52
55
|
} & DialogProps &
|
|
53
56
|
DataTestAttributes;
|
|
@@ -70,6 +73,8 @@ const Dialog = ({
|
|
|
70
73
|
dialogContentClassName,
|
|
71
74
|
dialogActionsClassName,
|
|
72
75
|
dialogConfirmButtonClassName,
|
|
76
|
+
restCancelButtonProps,
|
|
77
|
+
restConfirmButtonProps,
|
|
73
78
|
...rest
|
|
74
79
|
}: Props): JSX.Element => {
|
|
75
80
|
const { classes, cx } = useStyles({ contentWidth });
|
|
@@ -101,6 +106,7 @@ const Dialog = ({
|
|
|
101
106
|
data-testid="Cancel"
|
|
102
107
|
disabled={cancelDisabled}
|
|
103
108
|
onClick={onCancel}
|
|
109
|
+
{...restCancelButtonProps}
|
|
104
110
|
>
|
|
105
111
|
{labelCancel}
|
|
106
112
|
</Button>
|
|
@@ -113,6 +119,7 @@ const Dialog = ({
|
|
|
113
119
|
disabled={confirmDisabled}
|
|
114
120
|
endIcon={submitting && <CircularProgress size={15} />}
|
|
115
121
|
onClick={onConfirm}
|
|
122
|
+
{...restConfirmButtonProps}
|
|
116
123
|
>
|
|
117
124
|
{labelConfirm}
|
|
118
125
|
</Button>
|
package/src/Form/Inputs/Text.tsx
CHANGED
|
@@ -29,7 +29,8 @@ const Text = ({
|
|
|
29
29
|
getRequired,
|
|
30
30
|
change,
|
|
31
31
|
additionalMemoProps,
|
|
32
|
-
text
|
|
32
|
+
text,
|
|
33
|
+
autoFocus
|
|
33
34
|
}: InputPropsWithoutGroup): JSX.Element => {
|
|
34
35
|
const { t } = useTranslation();
|
|
35
36
|
|
|
@@ -109,6 +110,7 @@ const Text = ({
|
|
|
109
110
|
fullWidth
|
|
110
111
|
EndAdornment={EndAdornment}
|
|
111
112
|
ariaLabel={t(label) || ''}
|
|
113
|
+
autoFocus={autoFocus}
|
|
112
114
|
dataTestId={dataTestId || ''}
|
|
113
115
|
disabled={disabled}
|
|
114
116
|
error={error as string | undefined}
|