@centreon/ui 24.8.6 → 24.8.7
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 +4 -3
- package/src/@types/globals.d.ts +4 -4
- package/src/ActionsList/ActionsList.styles.ts +1 -1
- package/src/ActionsList/index.stories.tsx +1 -1
- package/src/ActionsList/index.tsx +6 -6
- package/src/Button/Icon/index.stories.tsx +1 -1
- package/src/Button/Icon/index.tsx +1 -1
- package/src/Button/Save/StartIcon.tsx +1 -1
- package/src/Checkbox/Checkbox.tsx +2 -2
- package/src/Colors/index.stories.tsx +0 -2
- package/src/Colors/index.tsx +7 -3
- package/src/ContentWithCircularProgress/index.stories.tsx +1 -1
- package/src/Dashboard/Dashboard.styles.ts +111 -111
- package/src/Dashboard/Grid.tsx +2 -2
- package/src/Dashboard/Item.tsx +3 -3
- package/src/Dashboard/Layout.tsx +3 -3
- package/src/Dashboard/index.tsx +9 -9
- package/src/Dialog/Duplicate/index.test.tsx +1 -1
- package/src/Dialog/Duplicate/index.tsx +5 -2
- package/src/Dialog/UnsavedChanges/index.tsx +2 -2
- package/src/Dialog/index.stories.tsx +1 -1
- package/src/Dialog/index.tsx +5 -5
- package/src/FallbackPage/FallbackPage.tsx +4 -4
- package/src/FileDropZone/index.stories.tsx +1 -1
- package/src/FileDropZone/index.tsx +5 -5
- package/src/FileDropZone/useDropzone.test.ts +1 -1
- package/src/FileDropZone/useDropzone.ts +1 -1
- package/src/Form/CollapsibleGroup.tsx +6 -6
- package/src/Form/Form.cypress.spec.tsx +1 -1
- package/src/Form/Form.stories.tsx +3 -3
- package/src/Form/Form.tsx +5 -4
- package/src/Form/FormButtons.tsx +2 -2
- package/src/Form/Inputs/Autocomplete.tsx +3 -3
- package/src/Form/Inputs/Checkbox.tsx +1 -1
- package/src/Form/Inputs/CheckboxGroup.tsx +2 -2
- package/src/Form/Inputs/ConnectedAutocomplete.tsx +1 -1
- package/src/Form/Inputs/FieldsTable/FieldsTable.tsx +15 -15
- package/src/Form/Inputs/FieldsTable/Row.tsx +2 -2
- package/src/Form/Inputs/List/Content.tsx +1 -1
- package/src/Form/Inputs/List/List.tsx +3 -3
- package/src/Form/Inputs/PasswordEndAdornment.tsx +1 -1
- package/src/Form/Inputs/Radio.tsx +3 -3
- package/src/Form/Inputs/Switch.tsx +1 -1
- package/src/Form/Inputs/Text.tsx +4 -4
- package/src/Form/Inputs/index.tsx +81 -72
- package/src/Form/Inputs/models.ts +14 -14
- package/src/Form/storiesData.tsx +26 -30
- package/src/Form/storiesData.tsx-E +481 -0
- package/src/Graph/BarChart/BarChart.stories.tsx +1 -1
- package/src/Graph/BarChart/BarChart.tsx +3 -3
- package/src/Graph/BarChart/BarGroup.tsx +6 -4
- package/src/Graph/BarChart/BarStack.tsx +4 -4
- package/src/Graph/BarChart/ResponsiveBarChart.tsx +10 -10
- package/src/Graph/BarChart/Tooltip/BarChartTooltip.tsx +5 -5
- package/src/Graph/BarChart/useBarStack.ts +2 -2
- package/src/Graph/BarStack/BarStack.cypress.spec.tsx +1 -1
- package/src/Graph/BarStack/BarStack.stories.tsx +1 -1
- package/src/Graph/BarStack/ResponsiveBarStack.tsx +10 -6
- package/src/Graph/BarStack/useResponsiveBarStack.ts +4 -4
- package/src/Graph/Chart/BasicComponents/Lines/RegularLines/index.tsx +1 -1
- package/src/Graph/Chart/BasicComponents/Lines/RegularLines/useRegularLines.ts +1 -1
- package/src/Graph/Chart/BasicComponents/Lines/StackedLines/index.tsx +4 -4
- package/src/Graph/Chart/BasicComponents/Lines/Threshold/ThresholdWithPatternLines.tsx +1 -1
- package/src/Graph/Chart/BasicComponents/Lines/Threshold/index.tsx +1 -1
- package/src/Graph/Chart/BasicComponents/Lines/Threshold/models.ts +1 -1
- package/src/Graph/Chart/BasicComponents/Lines/Threshold/useScaleThreshold.ts +2 -2
- package/src/Graph/Chart/BasicComponents/Lines/index.tsx +7 -7
- package/src/Graph/Chart/BasicComponents/Lines/models.ts +1 -1
- package/src/Graph/Chart/Chart.cypress.spec.tsx +4 -4
- package/src/Graph/Chart/Chart.stories.tsx +6 -6
- package/src/Graph/Chart/Chart.tsx +11 -11
- package/src/Graph/Chart/InteractiveComponents/AnchorPoint/RegularAnchorPoint.tsx +1 -1
- package/src/Graph/Chart/InteractiveComponents/AnchorPoint/useTickGraph.ts +1 -1
- package/src/Graph/Chart/InteractiveComponents/Annotations/Annotation/Area.tsx +1 -1
- package/src/Graph/Chart/InteractiveComponents/Annotations/Annotation/Line.tsx +1 -1
- package/src/Graph/Chart/InteractiveComponents/Annotations/Annotation/index.tsx +3 -3
- package/src/Graph/Chart/InteractiveComponents/Annotations/Area/Downtime.tsx +1 -1
- package/src/Graph/Chart/InteractiveComponents/Annotations/EventAnnotations.tsx +3 -3
- package/src/Graph/Chart/InteractiveComponents/Annotations/Line/Comments.tsx +1 -1
- package/src/Graph/Chart/InteractiveComponents/Annotations/annotationsAtoms.ts +4 -4
- package/src/Graph/Chart/InteractiveComponents/Bar.tsx +1 -1
- package/src/Graph/Chart/InteractiveComponents/GraphValueTooltip/GraphValueTooltip.tsx +1 -1
- package/src/Graph/Chart/InteractiveComponents/GraphValueTooltip/GraphValueTooltipContent.tsx +1 -1
- package/src/Graph/Chart/InteractiveComponents/GraphValueTooltip/useGraphValueTooltip.ts +3 -3
- package/src/Graph/Chart/InteractiveComponents/TimeShiftZones/index.tsx +1 -1
- package/src/Graph/Chart/InteractiveComponents/TimeShiftZones/models.ts +2 -2
- package/src/Graph/Chart/InteractiveComponents/Tooltip/useGraphTooltip.ts +1 -1
- package/src/Graph/Chart/InteractiveComponents/index.tsx +7 -7
- package/src/Graph/Chart/Legend/LegendHeader.tsx +2 -2
- package/src/Graph/Chart/Legend/index.tsx +3 -3
- package/src/Graph/Chart/common/index.ts +5 -5
- package/src/Graph/Chart/helpers/index.ts +5 -5
- package/src/Graph/Chart/index.tsx +2 -2
- package/src/Graph/Chart/models.ts +4 -4
- package/src/Graph/Gauge/AnimatedPie.tsx +1 -1
- package/src/Graph/Gauge/Gauge.cypress.spec.tsx +2 -2
- package/src/Graph/Gauge/PieData.tsx +1 -1
- package/src/Graph/Gauge/ResponsiveGauge.tsx +5 -5
- package/src/Graph/Gauge/models.ts +3 -3
- package/src/Graph/HeatMap/HeatMap.cypress.spec.tsx +3 -3
- package/src/Graph/HeatMap/HeatMapData.json +1 -1
- package/src/Graph/HeatMap/ResponsiveHeatMap.tsx +1 -1
- package/src/Graph/PieChart/PieChart.stories.tsx +1 -1
- package/src/Graph/PieChart/ResponsivePie.tsx +7 -3
- package/src/Graph/SingleBar/ResponsiveSingleBar.tsx +8 -8
- package/src/Graph/SingleBar/SingleBar.cypress.spec.tsx +1 -1
- package/src/Graph/SingleBar/SingleBar.tsx +1 -1
- package/src/Graph/Text/Text.cypress.spec.tsx +2 -2
- package/src/Graph/Tree/DescendantNodes.tsx +1 -1
- package/src/Graph/Tree/Links.tsx +5 -5
- package/src/Graph/Tree/StandaloneTree.tsx +1 -1
- package/src/Graph/Tree/Tree.cypress.spec.tsx +2 -2
- package/src/Graph/Tree/Tree.stories.tsx +2 -2
- package/src/Graph/Tree/Tree.tsx +3 -3
- package/src/Graph/Tree/stories/contents.tsx +2 -2
- package/src/Graph/common/Axes/index.tsx +1 -1
- package/src/Graph/common/Axes/models.ts +1 -1
- package/src/Graph/common/Axes/useAxisY.ts +1 -1
- package/src/Graph/common/BaseChart/BaseChart.tsx +1 -1
- package/src/Graph/common/BaseChart/Header/index.tsx +1 -1
- package/src/Graph/common/Thresholds/Thresholds.tsx +2 -2
- package/src/Graph/common/timeSeries/index.test.ts +57 -45
- package/src/Graph/common/timeSeries/index.test.ts-E +622 -0
- package/src/Graph/common/timeSeries/index.ts +30 -30
- package/src/Graph/common/utils.ts +2 -2
- package/src/Graph/mockedData/annotationData.json +318 -320
- package/src/Graph/mockedData/curvesWithSameColor.json +1 -1
- package/src/Graph/mockedData/exclusionPeriodFirstPeriod.json +366 -586
- package/src/Graph/mockedData/exclusionPeriodSecondPeriod.json +370 -586
- package/src/Graph/mockedData/exclusionPeriodThirdPeriod.json +365 -579
- package/src/Graph/mockedData/lastDay.json +1290 -1324
- package/src/Graph/mockedData/lastDayAreaStack.json +3048 -3104
- package/src/Graph/mockedData/lastDayForward.json +1303 -1336
- package/src/Graph/mockedData/lastDayThreshold.json +2318 -2350
- package/src/Graph/mockedData/lastDayWithIncompleteValues.json +7 -41
- package/src/Graph/mockedData/lastDayWithLotOfUnits.json +1618 -1665
- package/src/Graph/mockedData/lastDayWithNullValues.json +7 -41
- package/src/Graph/mockedData/lastMonth.json +1639 -1672
- package/src/Graph/mockedData/lastWeek.json +2167 -2200
- package/src/Graph/mockedData/pingService.json +4 -12
- package/src/Graph/mockedData/pingServiceLinesBars.json +242 -250
- package/src/Graph/mockedData/pingServiceLinesBarsMixed.json +242 -250
- package/src/Graph/mockedData/pingServiceLinesBarsStacked.json +242 -250
- package/src/Graph/mockedData/pingServiceMixedStacked.json +4 -12
- package/src/Graph/mockedData/pingServiceStacked.json +4 -12
- package/src/Graph/mockedData/zoomPreview.json +370 -740
- package/src/Icon/IconAttach/index.tsx +1 -6
- package/src/Image/Image.tsx +75 -75
- package/src/Image/atoms.ts +3 -3
- package/src/Image/index.stories.tsx +1 -1
- package/src/Image/index.test.tsx +53 -53
- package/src/Image/models.ts +3 -3
- package/src/Image/useLoadImage.ts +49 -49
- package/src/InputField/Number/Number.tsx +2 -2
- package/src/InputField/Search/PersistentTooltip.tsx +2 -2
- package/src/InputField/Search/RegexpHelpTooltip.tsx +1 -1
- package/src/InputField/Search/index.stories.tsx +1 -1
- package/src/InputField/Select/Autocomplete/Connected/Multi/index.test.tsx +1 -1
- package/src/InputField/Select/Autocomplete/Connected/Multi/index.tsx +1 -1
- package/src/InputField/Select/Autocomplete/Connected/index.stories.tsx +4 -4
- package/src/InputField/Select/Autocomplete/Connected/index.test.tsx +6 -6
- package/src/InputField/Select/Autocomplete/Connected/index.tsx +12 -12
- package/src/InputField/Select/Autocomplete/Draggable/MultiConnected.tsx +1 -1
- package/src/InputField/Select/Autocomplete/Draggable/SortableList.tsx +1 -1
- package/src/InputField/Select/Autocomplete/Draggable/SortableListContent.tsx +5 -6
- package/src/InputField/Select/Autocomplete/Draggable/index.stories.tsx +6 -6
- package/src/InputField/Select/Autocomplete/Draggable/index.tsx +15 -16
- package/src/InputField/Select/Autocomplete/Multi/index.tsx +1 -1
- package/src/InputField/Select/Autocomplete/Popover/index.tsx +1 -1
- package/src/InputField/Select/Autocomplete/index.stories.tsx +2 -3
- package/src/InputField/Select/Autocomplete/index.tsx +10 -11
- package/src/InputField/Select/IconPopover/index.tsx +3 -3
- package/src/InputField/Select/Option.tsx +1 -1
- package/src/InputField/Select/index.tsx +6 -6
- package/src/InputField/Text/index.stories.tsx +3 -4
- package/src/InputField/Text/index.tsx +3 -3
- package/src/InputField/Text/useAutoSize.ts +62 -62
- package/src/LicenseMessage/index.tsx +1 -1
- package/src/Listing/ActionBar/ColumnMultiSelect.tsx +4 -4
- package/src/Listing/ActionBar/PaginationActions.tsx +1 -1
- package/src/Listing/ActionBar/index.tsx +6 -6
- package/src/Listing/Cell/DataCell.tsx +2 -2
- package/src/Listing/Cell/EllipsisTypography.tsx +0 -2
- package/src/Listing/Cell/index.tsx +7 -8
- package/src/Listing/Checkbox.tsx +1 -1
- package/src/Listing/EmptyResult/EmptyResult.tsx +0 -2
- package/src/Listing/Header/Cell/ListingHeaderCell.styles.ts +1 -1
- package/src/Listing/Header/Cell/ListingHeaderCell.tsx +1 -3
- package/src/Listing/Header/Cell/SelectActionListingHeaderCell.tsx +3 -5
- package/src/Listing/Header/ListingHeader.tsx +6 -7
- package/src/Listing/Header/_internals/DraggableIconButton.tsx +1 -3
- package/src/Listing/Header/_internals/Label.tsx +2 -3
- package/src/Listing/Listing.cypress.spec.tsx +307 -307
- package/src/Listing/Row/Row.tsx +4 -5
- package/src/Listing/Row/SkeletonLoaderRows.tsx +7 -9
- package/src/Listing/index.stories.tsx +1 -1
- package/src/Listing/index.tsx +32 -27
- package/src/Listing/useResizeObserver.ts +1 -1
- package/src/ListingPage/Filter.tsx +15 -18
- package/src/ListingPage/index.tsx +2 -2
- package/src/Logo/CentreonLogo.tsx +2 -2
- package/src/MenuSkeleton/index.tsx +1 -1
- package/src/Module/LicensedModule/LicenseCheck/index.tsx +1 -1
- package/src/Module/index.tsx +3 -3
- package/src/MultiSelectEntries/index.tsx +1 -1
- package/src/MultiSelectEntries/useHover.ts +1 -1
- package/src/Panel/Section/ExpandableSection.tsx +6 -6
- package/src/Panel/Section/index.test.tsx +1 -1
- package/src/Panel/Section/index.tsx +1 -1
- package/src/Panel/index.tsx +15 -13
- package/src/RichTextEditor/ContentEditable.tsx +195 -195
- package/src/RichTextEditor/RichTextEditor.tsx +244 -244
- package/src/RichTextEditor/index.ts +2 -2
- package/src/RichTextEditor/initialEditorState.json +113 -113
- package/src/RichTextEditor/plugins/AutoLinkPlugin/index.tsx +4 -4
- package/src/RichTextEditor/plugins/FloatingLinkEditorPlugin.tsx +10 -10
- package/src/RichTextEditor/plugins/ToolbarPlugin/AlignPicker.tsx +4 -4
- package/src/RichTextEditor/plugins/ToolbarPlugin/BlockButtons.tsx +7 -7
- package/src/RichTextEditor/plugins/ToolbarPlugin/FormatButtons.tsx +124 -124
- package/src/RichTextEditor/plugins/ToolbarPlugin/LinkButton.tsx +5 -5
- package/src/RichTextEditor/plugins/ToolbarPlugin/ListButton.tsx +2 -2
- package/src/RichTextEditor/plugins/ToolbarPlugin/MacrosButton.tsx +4 -4
- package/src/RichTextEditor/plugins/ToolbarPlugin/UndoRedoButtons.tsx +97 -97
- package/src/RichTextEditor/plugins/ToolbarPlugin/index.tsx +62 -62
- package/src/RichTextEditor/translatedLabels.ts +8 -8
- package/src/Snackbar/SnackbarProvider.tsx +3 -4
- package/src/Snackbar/Transition.tsx +5 -6
- package/src/Snackbar/index.tsx +7 -8
- package/src/SortableItems/Item.tsx +3 -3
- package/src/SortableItems/SortableItem.tsx +1 -1
- package/src/SortableItems/index.stories.tsx +5 -6
- package/src/SortableItems/index.tsx +18 -19
- package/src/StatusChip/index.tsx +1 -1
- package/src/StoryBookThemeProvider/index.tsx +35 -36
- package/src/ThemeProvider/index.tsx +8 -10
- package/src/ThemeProvider/palettes.ts +42 -27
- package/src/TimePeriods/CustomTimePeriod/PopoverCustomTimePeriod/PickersStartEndDate.tsx +1 -1
- package/src/TimePeriods/CustomTimePeriod/PopoverCustomTimePeriod/index.tsx +1 -1
- package/src/TimePeriods/SelectedTimePeriod.tsx +1 -1
- package/src/TimePeriods/TimePeriods.cypress.spec.tsx +3 -3
- package/src/TimePeriods/TimePeriods.tsx +1 -1
- package/src/TimePeriods/helpers/index.ts +1 -1
- package/src/TimePeriods/index.stories.tsx +1 -1
- package/src/TimePeriods/index.tsx +1 -1
- package/src/TimePeriods/models.ts +2 -2
- package/src/TimePeriods/timePeriodsAtoms.ts +1 -1
- package/src/TimePeriods/useTimePeriod.ts +4 -4
- package/src/TopCounterElements/ResourceSubMenu.tsx +1 -4
- package/src/TopCounterElements/StatusCounter.tsx +2 -2
- package/src/Typography/FluidTypography/index.tsx +46 -46
- package/src/Typography/Subtitle.tsx +2 -2
- package/src/Typography/story.utils.tsx +6 -6
- package/src/WallpaperPage/index.tsx +1 -1
- package/src/Wizard/ActionsBar.test.tsx +1 -1
- package/src/Wizard/ActionsBar.tsx +1 -1
- package/src/Wizard/StepIcon.tsx +1 -1
- package/src/Wizard/Stepper.tsx +2 -2
- package/src/Wizard/WizardContent.tsx +1 -1
- package/src/Wizard/index.stories.tsx +2 -2
- package/src/Wizard/index.test.tsx +3 -3
- package/src/Wizard/index.tsx +2 -2
- package/src/Wizard/models.ts +1 -1
- package/src/api/TestQueryProvider.tsx +24 -24
- package/src/api/buildListingDecoder.ts +1 -1
- package/src/api/buildListingEndpoint/getSearchQueryParameterValue.ts +11 -11
- package/src/api/buildListingEndpoint/index.ts +1 -1
- package/src/api/useFetchQuery/index.test.ts +1 -1
- package/src/api/useFetchQuery/index.ts +8 -8
- package/src/api/useGraphQuery/index.ts +1 -1
- package/src/api/useMutationQuery/index.test.ts +1 -1
- package/src/api/useMutationQuery/index.ts +4 -4
- package/src/api/useRequest/index.test.ts +1 -1
- package/src/api/useRequest/index.ts +3 -3
- package/src/base/tokens/source/$metadata.json +2 -4
- package/src/base/tokens/source/base.json +1 -1
- package/src/base/tokens/themes/base.tokens.json +34 -166
- package/src/base/tokens/themes/ui-dark.tokens.json +34 -166
- package/src/base/tokens/themes/ui-light.tokens.json +34 -166
- package/src/components/Button/Icon/IconButton.tsx +1 -1
- package/src/components/CollapsibleItem/CollapsibleItem.tsx +2 -2
- package/src/components/DataTable/DataListing.tsx +1 -1
- package/src/components/DataTable/DataTable.cypress.spec.tsx +1 -1
- package/src/components/DataTable/DataTable.stories.tsx +4 -1
- package/src/components/DataTable/EmptyState/DataTableEmptyState.tsx +1 -1
- package/src/components/DataTable/index.ts +2 -2
- package/src/components/Form/AccessRights/AccessRights.cypress.spec.tsx +11 -11
- package/src/components/Form/AccessRights/Actions/Actions.tsx +1 -1
- package/src/components/Form/AccessRights/List/Item.tsx +5 -5
- package/src/components/Form/AccessRights/List/List.tsx +4 -4
- package/src/components/Form/AccessRights/ShareInput/ContactSwitch.tsx +2 -2
- package/src/components/Form/AccessRights/ShareInput/ShareInput.styles.ts +1 -1
- package/src/components/Form/AccessRights/ShareInput/ShareInput.tsx +3 -3
- package/src/components/Form/AccessRights/ShareInput/useShareInput.tsx +2 -2
- package/src/components/Form/AccessRights/Stats/Stats.tsx +2 -2
- package/src/components/Form/AccessRights/atoms.ts +1 -1
- package/src/components/Form/AccessRights/storiesData.ts +1 -1
- package/src/components/Form/AccessRights/useAccessRightsChange.ts +1 -1
- package/src/components/Form/Dashboard/DashboardDuplicationForm.tsx +3 -3
- package/src/components/Form/Dashboard/DashboardForm.tsx +5 -5
- package/src/components/Form/Dashboard/GlobalRefreshFieldOption.tsx +4 -4
- package/src/components/Header/PageHeader/PageHeader.tsx +1 -1
- package/src/components/Header/PageHeader/PageHeaderActions.tsx +1 -1
- package/src/components/Header/PageHeader/PageHeaderMain.tsx +1 -1
- package/src/components/Header/PageHeader/PageHeaderMenu.tsx +1 -1
- package/src/components/Header/PageHeader/PageHeaderTitle.tsx +1 -1
- package/src/components/Header/PageHeader/index.ts +2 -2
- package/src/components/Inputs/Switch/Switch.tsx +1 -1
- package/src/components/ItemComposition/ItemComposition.stories.tsx +6 -4
- package/src/components/ItemComposition/index.ts +1 -1
- package/src/components/Layout/PageLayout/PageLayout.stories.tsx +1 -1
- package/src/components/Layout/PageLayout/PageQuickAccess.tsx +12 -13
- package/src/components/Layout/PageLayout/index.ts +2 -2
- package/src/components/List/Item/ListItem.tsx +3 -3
- package/src/components/List/Item/index.ts +2 -2
- package/src/components/List/List.stories.tsx +16 -14
- package/src/components/List/List.tsx +2 -2
- package/src/components/List/index.ts +1 -1
- package/src/components/Menu/Button/MenuButton.tsx +1 -1
- package/src/components/Menu/index.ts +2 -2
- package/src/components/Menu/useMenu.tsx +3 -3
- package/src/components/Modal/ConfirmationModal/ConfirmationModal.cypress.spec.tsx +1 -1
- package/src/components/Modal/ConfirmationModal/ConfirmationModal.stories.tsx +1 -1
- package/src/components/Modal/ConfirmationModal/ConfirmationModal.tsx +1 -1
- package/src/components/Modal/Modal.tsx +1 -1
- package/src/components/Modal/ModalBody.tsx +1 -1
- package/src/components/Modal/ModalHeader.tsx +1 -1
- package/src/components/Modal/index.ts +2 -2
- package/src/components/Tooltip/ConfirmationTooltip/ConfirmationTooltip.tsx +2 -2
- package/src/components/Tooltip/ConfirmationTooltip/TooltipContent.tsx +1 -1
- package/src/components/Tooltip/TextOverflowTooltip/TextOverflowTooltip.tsx +1 -1
- package/src/components/Zoom/Minimap.tsx +1 -1
- package/src/components/Zoom/Zoom.stories.tsx +1 -1
- package/src/components/Zoom/ZoomContent.tsx +3 -3
- package/src/components/Zoom/localPoint.ts +4 -4
- package/src/components/Zoom/useMinimap.ts +1 -1
- package/src/queryParameters/index.ts +1 -1
- package/src/styles/tokens/themes/_ui-dark.tokens.json +34 -166
- package/src/styles/tokens/themes/_ui-light.tokens.json +34 -166
- package/src/utils/index.ts +29 -29
- package/src/utils/resourcesStatusURL.ts +2 -2
- package/src/utils/sanitizedHTML.ts +1 -1
- package/src/utils/useCopyToClipboard.ts +1 -1
- package/src/utils/useDebounce.ts +1 -1
- package/src/utils/useFullscreen/useFullscreen.ts +2 -2
- package/src/utils/useInfiniteScrollListing.ts +129 -129
- package/src/utils/useIntersectionObserver.ts +1 -1
- package/src/utils/useKeyObserver.tsx +1 -1
- package/src/utils/useLicenseExpirationWarning.test.tsx +1 -1
- package/src/utils/useLicenseExpirationWarning.ts +1 -1
- package/src/utils/useLocaleDateTimeFormat/index.test.tsx +3 -3
- package/src/utils/useLocaleDateTimeFormat/index.ts +1 -1
- package/src/utils/useLocaleDateTimeFormat/localeFallback.test.tsx +4 -4
- package/src/utils/useLocaleTimezoneDate/LocaleTimezoneDate.cypress.spec.tsx +2 -2
- package/src/utils/useMemoComponent.ts +1 -1
- package/src/utils/usePluralizedTranslation.ts +2 -2
- package/src/utils/useViewportIntersection.ts +1 -1
package/src/Form/storiesData.tsx
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { FormikValues, useFormikContext } from 'formik';
|
|
2
|
-
import * as Yup from 'yup';
|
|
3
2
|
import { equals, prop } from 'ramda';
|
|
4
3
|
|
|
5
|
-
import { Typography } from '@mui/material';
|
|
6
4
|
import HelpOutlineIcon from '@mui/icons-material/HelpOutline';
|
|
7
5
|
import MailIcon from '@mui/icons-material/MailOutline';
|
|
6
|
+
import { Typography } from '@mui/material';
|
|
8
7
|
|
|
9
8
|
import { SelectEntry } from '../InputField/Select';
|
|
10
9
|
import { Listing } from '../api/models';
|
|
11
10
|
|
|
11
|
+
import { array, boolean, number, object, string } from 'yup';
|
|
12
12
|
import {
|
|
13
13
|
Group,
|
|
14
14
|
InputProps,
|
|
@@ -43,46 +43,42 @@ export interface BasicForm {
|
|
|
43
43
|
sports: Array<SelectEntry>;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
const selectEntryValidationSchema =
|
|
47
|
-
id:
|
|
48
|
-
name:
|
|
46
|
+
const selectEntryValidationSchema = object().shape({
|
|
47
|
+
id: number().required('Required'),
|
|
48
|
+
name: string().required('Required')
|
|
49
49
|
});
|
|
50
50
|
|
|
51
|
-
export const basicFormValidationSchema =
|
|
52
|
-
active:
|
|
53
|
-
activeSortableFieldsTable:
|
|
51
|
+
export const basicFormValidationSchema = object().shape({
|
|
52
|
+
active: boolean().required('Active is required'),
|
|
53
|
+
activeSortableFieldsTable: boolean().required(
|
|
54
54
|
'Active Sortable FieldsTable is required'
|
|
55
55
|
),
|
|
56
|
-
animals:
|
|
57
|
-
anotherText:
|
|
58
|
-
certificate:
|
|
56
|
+
animals: array().of(selectEntryValidationSchema.required('Required')),
|
|
57
|
+
anotherText: string(),
|
|
58
|
+
certificate: string(),
|
|
59
59
|
class: selectEntryValidationSchema.nullable().required('Required'),
|
|
60
|
-
custom:
|
|
61
|
-
email:
|
|
60
|
+
custom: string().required('Custom is required'),
|
|
61
|
+
email: string().email('Invalid email').required('Email is required'),
|
|
62
62
|
group: selectEntryValidationSchema.nullable().required('Required'),
|
|
63
|
-
inviteUsers:
|
|
64
|
-
|
|
65
|
-
email:
|
|
66
|
-
.email('Invalid user email')
|
|
67
|
-
.required('Email is required'),
|
|
63
|
+
inviteUsers: array().of(
|
|
64
|
+
object({
|
|
65
|
+
email: string().email('Invalid user email').required('Email is required'),
|
|
68
66
|
role: selectEntryValidationSchema
|
|
69
67
|
})
|
|
70
68
|
),
|
|
71
|
-
inviteUsers2:
|
|
72
|
-
isForced:
|
|
73
|
-
language:
|
|
74
|
-
name:
|
|
75
|
-
password:
|
|
76
|
-
roleMapping:
|
|
77
|
-
|
|
69
|
+
inviteUsers2: array().of(string().email('Invalid user email')),
|
|
70
|
+
isForced: boolean().required('Is forced is required'),
|
|
71
|
+
language: string().required('Language is required'),
|
|
72
|
+
name: string().required('Name is required'),
|
|
73
|
+
password: string().required('Password is required'),
|
|
74
|
+
roleMapping: array().of(
|
|
75
|
+
object({
|
|
78
76
|
role: selectEntryValidationSchema,
|
|
79
|
-
value:
|
|
77
|
+
value: string().required('Role value is required')
|
|
80
78
|
})
|
|
81
79
|
),
|
|
82
|
-
scopes:
|
|
83
|
-
|
|
84
|
-
),
|
|
85
|
-
sports: Yup.array().of(selectEntryValidationSchema.required('Required'))
|
|
80
|
+
scopes: array().of(string().min(3, '3 characters min').required('Required')),
|
|
81
|
+
sports: array().of(selectEntryValidationSchema.required('Required'))
|
|
86
82
|
});
|
|
87
83
|
|
|
88
84
|
const roleEntries: Array<SelectEntry> = [
|
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
import { FormikValues, useFormikContext } from 'formik';
|
|
2
|
+
import { equals, prop } from 'ramda';
|
|
3
|
+
|
|
4
|
+
import HelpOutlineIcon from '@mui/icons-material/HelpOutline';
|
|
5
|
+
import MailIcon from '@mui/icons-material/MailOutline';
|
|
6
|
+
import { Typography } from '@mui/material';
|
|
7
|
+
|
|
8
|
+
import { SelectEntry } from '../InputField/Select';
|
|
9
|
+
import { Listing } from '../api/models';
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
Group,
|
|
13
|
+
InputProps,
|
|
14
|
+
InputPropsWithoutGroup,
|
|
15
|
+
InputType
|
|
16
|
+
} from './Inputs/models';
|
|
17
|
+
import { object } from ';
|
|
18
|
+
|
|
19
|
+
export interface BasicForm {
|
|
20
|
+
active: boolean;
|
|
21
|
+
activeSortableFieldsTable: boolean;
|
|
22
|
+
animals: Array<SelectEntry>;
|
|
23
|
+
anotherText: string;
|
|
24
|
+
certificate: string;
|
|
25
|
+
class: { id: number; name: string } | null;
|
|
26
|
+
custom: string;
|
|
27
|
+
email: string;
|
|
28
|
+
group: { id: number; name: string } | null;
|
|
29
|
+
inviteUsers: Array<{
|
|
30
|
+
role: SelectEntry;
|
|
31
|
+
user: string;
|
|
32
|
+
}>;
|
|
33
|
+
inviteUsers2: Array<string>;
|
|
34
|
+
isForced: boolean;
|
|
35
|
+
language: string;
|
|
36
|
+
name: string;
|
|
37
|
+
password: string;
|
|
38
|
+
roleMapping: Array<{
|
|
39
|
+
role: SelectEntry;
|
|
40
|
+
value: string;
|
|
41
|
+
}>;
|
|
42
|
+
scopes: Array<string>;
|
|
43
|
+
sports: Array<SelectEntry>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const selectEntryValidationSchema = object().shape({
|
|
47
|
+
id: number().required('Required'),
|
|
48
|
+
name: string().required('Required')
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export const basicFormValidationSchema = object().shape({
|
|
52
|
+
active: boolean().required('Active is required'),
|
|
53
|
+
activeSortableFieldsTable: boolean().required(
|
|
54
|
+
'Active Sortable FieldsTable is required'
|
|
55
|
+
),
|
|
56
|
+
animals: array().of(selectEntryValidationSchema.required('Required')),
|
|
57
|
+
anotherText: string(),
|
|
58
|
+
certificate: string(),
|
|
59
|
+
class: selectEntryValidationSchema.nullable().required('Required'),
|
|
60
|
+
custom: string().required('Custom is required'),
|
|
61
|
+
email: string().email('Invalid email').required('Email is required'),
|
|
62
|
+
group: selectEntryValidationSchema.nullable().required('Required'),
|
|
63
|
+
inviteUsers: array().of(
|
|
64
|
+
object({
|
|
65
|
+
email: string()
|
|
66
|
+
.email('Invalid user email')
|
|
67
|
+
.required('Email is required'),
|
|
68
|
+
role: selectEntryValidationSchema
|
|
69
|
+
})
|
|
70
|
+
),
|
|
71
|
+
inviteUsers2: array().of(string().email('Invalid user email')),
|
|
72
|
+
isForced: boolean().required('Is forced is required'),
|
|
73
|
+
language: string().required('Language is required'),
|
|
74
|
+
name: string().required('Name is required'),
|
|
75
|
+
password: string().required('Password is required'),
|
|
76
|
+
roleMapping: array().of(
|
|
77
|
+
object({
|
|
78
|
+
role: selectEntryValidationSchema,
|
|
79
|
+
value: string().required('Role value is required')
|
|
80
|
+
})
|
|
81
|
+
),
|
|
82
|
+
scopes: array().of(
|
|
83
|
+
string().min(3, '3 characters min').required('Required')
|
|
84
|
+
),
|
|
85
|
+
sports: Yup.array().of(selectEntryValidationSchema.required('Required'))
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
const roleEntries: Array<SelectEntry> = [
|
|
89
|
+
{
|
|
90
|
+
id: 1,
|
|
91
|
+
name: 'Administrator'
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: 2,
|
|
95
|
+
name: 'User'
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
id: 3,
|
|
99
|
+
name: 'Editor'
|
|
100
|
+
}
|
|
101
|
+
];
|
|
102
|
+
|
|
103
|
+
export const basicFormInitialValues = {
|
|
104
|
+
active: false,
|
|
105
|
+
activeSortableFieldsTable: false,
|
|
106
|
+
animals: [],
|
|
107
|
+
certificate: '',
|
|
108
|
+
class: { id: 0, name: 'Class 0' },
|
|
109
|
+
custom: '',
|
|
110
|
+
email: '',
|
|
111
|
+
group: null,
|
|
112
|
+
inviteUsers: [],
|
|
113
|
+
inviteUsers2: [],
|
|
114
|
+
isForced: false,
|
|
115
|
+
language: 'French',
|
|
116
|
+
name: '',
|
|
117
|
+
notifications: {
|
|
118
|
+
channels: { Icon: MailIcon, checked: true, label: 'mail' },
|
|
119
|
+
hostevents: ['ok', 'warning'],
|
|
120
|
+
includeServices: { checked: true, label: 'Include services for this host' }
|
|
121
|
+
},
|
|
122
|
+
password: '',
|
|
123
|
+
roleMapping: [
|
|
124
|
+
{
|
|
125
|
+
priority: 0,
|
|
126
|
+
role: roleEntries[0],
|
|
127
|
+
value: 'example'
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
priority: 1,
|
|
131
|
+
role: roleEntries[1],
|
|
132
|
+
value: 'example2'
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
priority: 2,
|
|
136
|
+
role: roleEntries[2],
|
|
137
|
+
value: 'example3'
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
scopes: [],
|
|
141
|
+
sports: []
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export const classOptions = [...Array(10).keys()].map((idx) => ({
|
|
145
|
+
id: idx,
|
|
146
|
+
name: `Class ${idx}`
|
|
147
|
+
}));
|
|
148
|
+
|
|
149
|
+
export const sportOptions = [...Array(10).keys()].map((idx) => ({
|
|
150
|
+
id: idx,
|
|
151
|
+
name: `Sport ${idx}`
|
|
152
|
+
}));
|
|
153
|
+
|
|
154
|
+
export const basicFormGroups: Array<Group> = [
|
|
155
|
+
{
|
|
156
|
+
name: 'First group',
|
|
157
|
+
order: 1
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
EndIcon: () => <HelpOutlineIcon />,
|
|
161
|
+
TooltipContent: (): JSX.Element => <Typography>Tooltip content</Typography>,
|
|
162
|
+
name: 'Second group',
|
|
163
|
+
order: 2
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: 'Third group',
|
|
167
|
+
order: 3
|
|
168
|
+
}
|
|
169
|
+
];
|
|
170
|
+
|
|
171
|
+
export const basicFormInputs: Array<InputProps> = [
|
|
172
|
+
{
|
|
173
|
+
fieldName: 'name',
|
|
174
|
+
group: 'First group',
|
|
175
|
+
label: 'Name',
|
|
176
|
+
type: InputType.Text
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
fieldName: 'email',
|
|
180
|
+
group: 'First group',
|
|
181
|
+
label: 'Email',
|
|
182
|
+
text: {
|
|
183
|
+
endAdornment: <MailIcon />,
|
|
184
|
+
placeholder: 'Your email here'
|
|
185
|
+
},
|
|
186
|
+
type: InputType.Text
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
fieldName: 'active',
|
|
190
|
+
group: 'Second group',
|
|
191
|
+
label: 'Active',
|
|
192
|
+
type: InputType.Switch
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
additionalLabel: 'This a very special label',
|
|
196
|
+
fieldName: 'password',
|
|
197
|
+
group: 'First group',
|
|
198
|
+
hideInput: (values) => values.active,
|
|
199
|
+
label: 'Password',
|
|
200
|
+
type: InputType.Password
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
fieldName: 'language',
|
|
204
|
+
group: 'First group',
|
|
205
|
+
label: 'Language',
|
|
206
|
+
radio: {
|
|
207
|
+
options: [
|
|
208
|
+
{
|
|
209
|
+
label: 'French',
|
|
210
|
+
value: 'French'
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
label: 'English',
|
|
214
|
+
value: 'English'
|
|
215
|
+
}
|
|
216
|
+
]
|
|
217
|
+
},
|
|
218
|
+
type: InputType.Radio
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
additionalLabel: 'Notifications',
|
|
222
|
+
fieldName: '',
|
|
223
|
+
grid: {
|
|
224
|
+
alignItems: 'center',
|
|
225
|
+
columns: [
|
|
226
|
+
{
|
|
227
|
+
checkbox: {
|
|
228
|
+
direction: 'horizontal'
|
|
229
|
+
},
|
|
230
|
+
fieldName: 'notifications.channels',
|
|
231
|
+
label: 'channels',
|
|
232
|
+
type: InputType.Checkbox
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
fieldName: 'notifications.includeServices',
|
|
236
|
+
label: 'Iclude services',
|
|
237
|
+
type: InputType.Checkbox
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
checkbox: {
|
|
241
|
+
direction: 'horizontal',
|
|
242
|
+
labelPlacement: 'top',
|
|
243
|
+
options: ['ok', 'warning', 'critical', 'unknown']
|
|
244
|
+
},
|
|
245
|
+
fieldName: 'notifications.hostevents',
|
|
246
|
+
label: 'host events',
|
|
247
|
+
type: InputType.CheckboxGroup
|
|
248
|
+
}
|
|
249
|
+
]
|
|
250
|
+
},
|
|
251
|
+
group: 'Third group',
|
|
252
|
+
label: 'Notifications',
|
|
253
|
+
type: InputType.Grid
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
fieldName: 'anotherText',
|
|
257
|
+
group: 'First group',
|
|
258
|
+
hideInput: ({ language }) => equals(language, 'French'),
|
|
259
|
+
label: 'Another Text input',
|
|
260
|
+
type: InputType.Text
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
fieldName: 'isForced',
|
|
264
|
+
group: 'First group',
|
|
265
|
+
label: 'Is Forced?',
|
|
266
|
+
radio: {
|
|
267
|
+
options: [
|
|
268
|
+
{
|
|
269
|
+
label: 'Is not forced',
|
|
270
|
+
value: false
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
label: 'Is forced',
|
|
274
|
+
value: true
|
|
275
|
+
}
|
|
276
|
+
]
|
|
277
|
+
},
|
|
278
|
+
type: InputType.Radio
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
fieldName: '',
|
|
282
|
+
grid: {
|
|
283
|
+
columns: [
|
|
284
|
+
{
|
|
285
|
+
autocomplete: {
|
|
286
|
+
options: classOptions
|
|
287
|
+
},
|
|
288
|
+
fieldName: 'class',
|
|
289
|
+
label: 'Class (Single autocomplete)',
|
|
290
|
+
type: InputType.SingleAutocomplete
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
autocomplete: {
|
|
294
|
+
options: sportOptions
|
|
295
|
+
},
|
|
296
|
+
fieldName: 'sports',
|
|
297
|
+
label: 'Sports (Multi autocomplete)',
|
|
298
|
+
type: InputType.MultiAutocomplete
|
|
299
|
+
}
|
|
300
|
+
]
|
|
301
|
+
},
|
|
302
|
+
group: 'First group',
|
|
303
|
+
label: 'autocompletes',
|
|
304
|
+
type: InputType.Grid
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
autocomplete: {
|
|
308
|
+
creatable: true,
|
|
309
|
+
options: []
|
|
310
|
+
},
|
|
311
|
+
fieldName: 'scopes',
|
|
312
|
+
group: 'First group',
|
|
313
|
+
label: 'Scopes (Multi autocomplete that allows value creation)',
|
|
314
|
+
type: InputType.MultiAutocomplete
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
fieldName: '',
|
|
318
|
+
grid: {
|
|
319
|
+
columns: [
|
|
320
|
+
{
|
|
321
|
+
connectedAutocomplete: {
|
|
322
|
+
additionalConditionParameters: [],
|
|
323
|
+
endpoint: 'endpoint'
|
|
324
|
+
},
|
|
325
|
+
fieldName: 'group',
|
|
326
|
+
label: 'Group (Single connected autocomplete)',
|
|
327
|
+
type: InputType.SingleConnectedAutocomplete
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
connectedAutocomplete: {
|
|
331
|
+
additionalConditionParameters: [],
|
|
332
|
+
endpoint: 'endpoint'
|
|
333
|
+
},
|
|
334
|
+
fieldName: 'animals',
|
|
335
|
+
label: 'Animals (Multi connected autocomplete)',
|
|
336
|
+
type: InputType.MultiConnectedAutocomplete
|
|
337
|
+
}
|
|
338
|
+
],
|
|
339
|
+
gridTemplateColumns: '400px 1fr'
|
|
340
|
+
},
|
|
341
|
+
group: 'First group',
|
|
342
|
+
label: 'connected autocompletes',
|
|
343
|
+
type: InputType.Grid
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
custom: {
|
|
347
|
+
Component: ({ label }: InputPropsWithoutGroup): JSX.Element => (
|
|
348
|
+
<Typography>This is a {label} component</Typography>
|
|
349
|
+
)
|
|
350
|
+
},
|
|
351
|
+
fieldName: 'custom',
|
|
352
|
+
group: 'Second group',
|
|
353
|
+
label: 'Custom',
|
|
354
|
+
type: InputType.Custom
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
fieldName: 'inviteUsers',
|
|
358
|
+
fieldsTable: {
|
|
359
|
+
columns: [
|
|
360
|
+
{
|
|
361
|
+
fieldName: 'email',
|
|
362
|
+
label: 'Email',
|
|
363
|
+
required: true,
|
|
364
|
+
type: InputType.Text
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
autocomplete: {
|
|
368
|
+
creatable: false,
|
|
369
|
+
options: roleEntries
|
|
370
|
+
},
|
|
371
|
+
fieldName: 'role',
|
|
372
|
+
label: 'Role',
|
|
373
|
+
type: InputType.SingleAutocomplete
|
|
374
|
+
}
|
|
375
|
+
],
|
|
376
|
+
defaultRowValue: {
|
|
377
|
+
email: 'example@test.fr',
|
|
378
|
+
role: null
|
|
379
|
+
},
|
|
380
|
+
deleteLabel: 'Delete'
|
|
381
|
+
},
|
|
382
|
+
group: 'First group',
|
|
383
|
+
label: 'inviteUsers',
|
|
384
|
+
type: InputType.FieldsTable
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
fieldName: 'inviteUsers2',
|
|
388
|
+
fieldsTable: {
|
|
389
|
+
columns: [
|
|
390
|
+
{
|
|
391
|
+
fieldName: 'email',
|
|
392
|
+
label: 'Email',
|
|
393
|
+
required: true,
|
|
394
|
+
type: InputType.Text
|
|
395
|
+
}
|
|
396
|
+
],
|
|
397
|
+
defaultRowValue: 'example',
|
|
398
|
+
deleteLabel: 'Delete',
|
|
399
|
+
hasSingleValue: true
|
|
400
|
+
},
|
|
401
|
+
group: 'First group',
|
|
402
|
+
label: 'inviteUsers2',
|
|
403
|
+
type: InputType.FieldsTable
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
fieldName: 'activeSortableFieldsTable',
|
|
407
|
+
group: 'First group',
|
|
408
|
+
label: 'Active Sortable Fields Table',
|
|
409
|
+
type: InputType.Switch
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
fieldName: 'roleMapping',
|
|
413
|
+
fieldsTable: {
|
|
414
|
+
columns: [
|
|
415
|
+
{
|
|
416
|
+
fieldName: 'value',
|
|
417
|
+
label: 'RoleValue',
|
|
418
|
+
required: true,
|
|
419
|
+
type: InputType.Text
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
autocomplete: {
|
|
423
|
+
creatable: false,
|
|
424
|
+
options: roleEntries
|
|
425
|
+
},
|
|
426
|
+
fieldName: 'role',
|
|
427
|
+
label: 'RoleAcl',
|
|
428
|
+
type: InputType.SingleAutocomplete
|
|
429
|
+
}
|
|
430
|
+
],
|
|
431
|
+
defaultRowValue: {
|
|
432
|
+
role: null,
|
|
433
|
+
value: ''
|
|
434
|
+
},
|
|
435
|
+
deleteLabel: 'Delete',
|
|
436
|
+
getSortable: (values: FormikValues): boolean =>
|
|
437
|
+
prop('activeSortableFieldsTable', values)
|
|
438
|
+
},
|
|
439
|
+
group: 'First group',
|
|
440
|
+
label: 'roleMapping',
|
|
441
|
+
type: InputType.FieldsTable
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
fieldName: 'certificate',
|
|
445
|
+
group: 'First group',
|
|
446
|
+
label: 'Certificate',
|
|
447
|
+
text: {
|
|
448
|
+
multilineRows: 4
|
|
449
|
+
},
|
|
450
|
+
type: InputType.Text
|
|
451
|
+
}
|
|
452
|
+
];
|
|
453
|
+
|
|
454
|
+
export const CustomButton = (): JSX.Element => {
|
|
455
|
+
const { dirty, isValid } = useFormikContext();
|
|
456
|
+
|
|
457
|
+
return (
|
|
458
|
+
<div>
|
|
459
|
+
<Typography>Has form changed? {JSON.stringify(dirty)}</Typography>
|
|
460
|
+
<Typography>Is valid? {JSON.stringify(isValid)}</Typography>
|
|
461
|
+
</div>
|
|
462
|
+
);
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
const buildEntities = (from): Array<SelectEntry> => {
|
|
466
|
+
return Array(10)
|
|
467
|
+
.fill(0)
|
|
468
|
+
.map((_, index) => ({
|
|
469
|
+
id: from + index,
|
|
470
|
+
name: `Entity ${from + index}`
|
|
471
|
+
}));
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
export const buildResult = (page): Listing<SelectEntry> => ({
|
|
475
|
+
meta: {
|
|
476
|
+
limit: 10,
|
|
477
|
+
page,
|
|
478
|
+
total: 40
|
|
479
|
+
},
|
|
480
|
+
result: buildEntities((page - 1) * 10)
|
|
481
|
+
});
|
|
@@ -3,8 +3,8 @@ import dayjs from 'dayjs';
|
|
|
3
3
|
|
|
4
4
|
import { LineChartData } from '../common/models';
|
|
5
5
|
import dataPingService from '../mockedData/pingService.json';
|
|
6
|
-
import dataPingServiceStacked from '../mockedData/pingServiceStacked.json';
|
|
7
6
|
import dataPingServiceMixedStacked from '../mockedData/pingServiceMixedStacked.json';
|
|
7
|
+
import dataPingServiceStacked from '../mockedData/pingServiceStacked.json';
|
|
8
8
|
|
|
9
9
|
import BarChart from './BarChart';
|
|
10
10
|
|
|
@@ -12,11 +12,11 @@ import { Provider } from 'jotai';
|
|
|
12
12
|
|
|
13
13
|
import { Box } from '@mui/material';
|
|
14
14
|
|
|
15
|
-
import { LineChartProps } from '../Chart/models';
|
|
16
|
-
import { LineChartData, Thresholds } from '../common/models';
|
|
17
15
|
import { ParentSize } from '../../ParentSize';
|
|
18
|
-
import useChartData from '../Chart/useChartData';
|
|
19
16
|
import LoadingSkeleton from '../Chart/LoadingSkeleton';
|
|
17
|
+
import { LineChartProps } from '../Chart/models';
|
|
18
|
+
import useChartData from '../Chart/useChartData';
|
|
19
|
+
import { LineChartData, Thresholds } from '../common/models';
|
|
20
20
|
|
|
21
21
|
import ResponsiveBarChart from './ResponsiveBarChart';
|
|
22
22
|
import { BarStyle } from './models';
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { memo, useMemo } from 'react';
|
|
2
2
|
|
|
3
|
-
import { BarGroupHorizontal, BarGroup as VisxBarGroup } from '@visx/shape';
|
|
4
|
-
import { difference, equals, keys, omit, pick, pluck, uniq } from 'ramda';
|
|
5
|
-
import { scaleBand, scaleOrdinal } from '@visx/scale';
|
|
6
3
|
import { Group } from '@visx/group';
|
|
4
|
+
import { scaleBand, scaleOrdinal } from '@visx/scale';
|
|
5
|
+
import { BarGroupHorizontal, BarGroup as VisxBarGroup } from '@visx/shape';
|
|
7
6
|
import { ScaleLinear } from 'd3-scale';
|
|
7
|
+
import { difference, equals, keys, omit, pick, pluck, uniq } from 'ramda';
|
|
8
8
|
|
|
9
9
|
import { useDeepMemo } from '../../utils';
|
|
10
|
-
import { Line, TimeValue } from '../common/timeSeries/models';
|
|
11
10
|
import {
|
|
12
11
|
getSortedStackedLines,
|
|
13
12
|
getTime,
|
|
14
13
|
getTimeSeriesForLines,
|
|
15
14
|
getUnits
|
|
16
15
|
} from '../common/timeSeries';
|
|
16
|
+
import { Line, TimeValue } from '../common/timeSeries/models';
|
|
17
17
|
|
|
18
18
|
import BarStack from './BarStack';
|
|
19
19
|
import { BarStyle } from './models';
|
|
@@ -175,6 +175,7 @@ const BarGroup = ({
|
|
|
175
175
|
|
|
176
176
|
return isStackedBar ? (
|
|
177
177
|
<BarStack
|
|
178
|
+
key={`bar-${barGroup.index}-${bar.width}-${bar.y}-${bar.height}-${bar.x}`}
|
|
178
179
|
barIndex={barGroup.index}
|
|
179
180
|
barPadding={isHorizontal ? bar.x : bar.y}
|
|
180
181
|
barStyle={barStyle}
|
|
@@ -187,6 +188,7 @@ const BarGroup = ({
|
|
|
187
188
|
/>
|
|
188
189
|
) : (
|
|
189
190
|
<BarStack
|
|
191
|
+
key={`bar-${barGroup.index}-${bar.width}-${bar.y}-${bar.height}-${bar.x}`}
|
|
190
192
|
barIndex={barGroup.index}
|
|
191
193
|
barPadding={isHorizontal ? bar.x : bar.y}
|
|
192
194
|
barStyle={barStyle}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { memo } from 'react';
|
|
2
2
|
|
|
3
3
|
import { scaleBand } from '@visx/scale';
|
|
4
|
-
import { dec, equals, gt, pick } from 'ramda';
|
|
5
4
|
import { BarRounded } from '@visx/shape';
|
|
5
|
+
import { dec, equals, gt, pick } from 'ramda';
|
|
6
6
|
|
|
7
|
-
import { useBarStack, UseBarStackProps } from './useBarStack';
|
|
8
7
|
import { BarStyle } from './models';
|
|
8
|
+
import { UseBarStackProps, useBarStack } from './useBarStack';
|
|
9
9
|
|
|
10
10
|
const xScale = scaleBand<number>({
|
|
11
11
|
domain: [0, 0],
|
|
@@ -64,8 +64,8 @@ const BarStack = ({
|
|
|
64
64
|
const isNegativeValue = gt(0, bar.bar[1]);
|
|
65
65
|
|
|
66
66
|
const barRoundedProps = {
|
|
67
|
-
[isHorizontal ? '
|
|
68
|
-
[isHorizontal ? '
|
|
67
|
+
[isHorizontal ? 'bottom' : 'left']: shouldApplyRadiusOnBottom,
|
|
68
|
+
[isHorizontal ? 'top' : 'right']: shouldApplyRadiusOnTop
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
return (
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { MutableRefObject, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import { equals, flatten, gte, has, isNil, pluck } from 'ramda';
|
|
4
3
|
import { useAtom } from 'jotai';
|
|
4
|
+
import { equals, flatten, gte, has, isNil, pluck } from 'ramda';
|
|
5
5
|
|
|
6
6
|
import { Skeleton } from '@mui/material';
|
|
7
7
|
|
|
8
|
+
import { Tooltip } from '../../components';
|
|
9
|
+
import { useDeepCompare } from '../../utils';
|
|
10
|
+
import { margin } from '../Chart/common';
|
|
8
11
|
import { Data, LineChartProps } from '../Chart/models';
|
|
9
|
-
import { Thresholds as ThresholdsModel } from '../common/models';
|
|
10
12
|
import { useIntersection } from '../Chart/useChartIntersection';
|
|
11
|
-
import
|
|
13
|
+
import BaseChart from '../common/BaseChart/BaseChart';
|
|
14
|
+
import ChartSvgWrapper from '../common/BaseChart/ChartSvgWrapper';
|
|
12
15
|
import { useComputeBaseChartDimensions } from '../common/BaseChart/useComputeBaseChartDimensions';
|
|
16
|
+
import Thresholds from '../common/Thresholds/Thresholds';
|
|
17
|
+
import { Thresholds as ThresholdsModel } from '../common/models';
|
|
13
18
|
import {
|
|
14
19
|
getUnits,
|
|
15
20
|
getXScaleBand,
|
|
16
21
|
getYScalePerUnit
|
|
17
22
|
} from '../common/timeSeries';
|
|
18
|
-
import
|
|
19
|
-
import ChartSvgWrapper from '../common/BaseChart/ChartSvgWrapper';
|
|
23
|
+
import { Line } from '../common/timeSeries/models';
|
|
20
24
|
import { useTooltipStyles } from '../common/useTooltipStyles';
|
|
21
|
-
import { margin } from '../Chart/common';
|
|
22
|
-
import { Tooltip } from '../../components';
|
|
23
|
-
import Thresholds from '../common/Thresholds/Thresholds';
|
|
24
|
-
import { useDeepCompare } from '../../utils';
|
|
25
25
|
|
|
26
26
|
import BarGroup from './BarGroup';
|
|
27
|
-
import { tooltipDataAtom } from './atoms';
|
|
28
27
|
import BarChartTooltip from './Tooltip/BarChartTooltip';
|
|
28
|
+
import { tooltipDataAtom } from './atoms';
|
|
29
29
|
import { BarStyle } from './models';
|
|
30
30
|
|
|
31
31
|
interface Props
|