@tsiky/components-r19 1.3.0 → 1.3.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/dist/_commonjsHelpers-BH3jXuIh.cjs +1 -0
- package/dist/_commonjsHelpers-ByX85dGu.js +33 -0
- package/dist/chart.cjs.js +957 -0
- package/{chart.ts → dist/chart.d.ts} +1 -0
- package/dist/chart.d.ts.map +1 -0
- package/dist/chart.js +11754 -0
- package/dist/components-r19.css +1 -0
- package/dist/index.cjs.js +8186 -0
- package/{index.ts → dist/index.d.ts} +36 -35
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36839 -0
- package/dist/src/App.d.ts +4 -0
- package/dist/src/App.d.ts.map +1 -0
- package/dist/src/components/AddItemModal/AddItemModal.d.ts +18 -0
- package/dist/src/components/AddItemModal/AddItemModal.d.ts.map +1 -0
- package/dist/src/components/AddItemModal/index.d.ts +2 -0
- package/dist/src/components/AddItemModal/index.d.ts.map +1 -0
- package/dist/src/components/Alert/Alert.d.ts +25 -0
- package/dist/src/components/Alert/Alert.d.ts.map +1 -0
- package/dist/src/components/Alert/AlertContext.d.ts +32 -0
- package/dist/src/components/Alert/AlertContext.d.ts.map +1 -0
- package/dist/src/components/Alert/AlertModels.d.ts +3 -0
- package/dist/src/components/Alert/AlertModels.d.ts.map +1 -0
- package/{src/components/Alert/index.ts → dist/src/components/Alert/index.d.ts} +1 -0
- package/dist/src/components/Alert/index.d.ts.map +1 -0
- package/dist/src/components/AnnouncementPanel/FlexRowContainer.d.ts +10 -0
- package/dist/src/components/AnnouncementPanel/FlexRowContainer.d.ts.map +1 -0
- package/dist/src/components/AnnouncementPanel/ListBox/CounterListBox.d.ts +22 -0
- package/dist/src/components/AnnouncementPanel/ListBox/CounterListBox.d.ts.map +1 -0
- package/dist/src/components/AnnouncementPanel/ListBox/SimpleListBox.d.ts +22 -0
- package/dist/src/components/AnnouncementPanel/ListBox/SimpleListBox.d.ts.map +1 -0
- package/dist/src/components/AnnouncementPanel/ListBox/TrendListBox.d.ts +26 -0
- package/dist/src/components/AnnouncementPanel/ListBox/TrendListBox.d.ts.map +1 -0
- package/{src/components/AnnouncementPanel/ListBox/index.ts → dist/src/components/AnnouncementPanel/ListBox/index.d.ts} +4 -3
- package/dist/src/components/AnnouncementPanel/ListBox/index.d.ts.map +1 -0
- package/dist/src/components/AnnouncementPanel/ListContentContainer.d.ts +11 -0
- package/dist/src/components/AnnouncementPanel/ListContentContainer.d.ts.map +1 -0
- package/{src/components/AnnouncementPanel/index.ts → dist/src/components/AnnouncementPanel/index.d.ts} +4 -3
- package/dist/src/components/AnnouncementPanel/index.d.ts.map +1 -0
- package/dist/src/components/BandChart/index.d.ts +50 -0
- package/dist/src/components/BandChart/index.d.ts.map +1 -0
- package/dist/src/components/Button/Button.d.ts +9 -0
- package/dist/src/components/Button/Button.d.ts.map +1 -0
- package/{src/components/Button/index.ts → dist/src/components/Button/index.d.ts} +1 -0
- package/dist/src/components/Button/index.d.ts.map +1 -0
- package/dist/src/components/ChartContainer/ChartContainer.d.ts +34 -0
- package/dist/src/components/ChartContainer/ChartContainer.d.ts.map +1 -0
- package/dist/src/components/ChartContainer/index.d.ts +2 -0
- package/dist/src/components/ChartContainer/index.d.ts.map +1 -0
- package/dist/src/components/Charts/area-chart-admission/AreaChartAdmission.d.ts +15 -0
- package/dist/src/components/Charts/area-chart-admission/AreaChartAdmission.d.ts.map +1 -0
- package/dist/src/components/Charts/area-chart-hospitalisation/AreaChartHospitalisation.d.ts +14 -0
- package/dist/src/components/Charts/area-chart-hospitalisation/AreaChartHospitalisation.d.ts.map +1 -0
- package/dist/src/components/Charts/bar-chart/BarChart.d.ts +20 -0
- package/dist/src/components/Charts/bar-chart/BarChart.d.ts.map +1 -0
- package/dist/src/components/Charts/boxplot-chart/BoxPlotChart.d.ts +24 -0
- package/dist/src/components/Charts/boxplot-chart/BoxPlotChart.d.ts.map +1 -0
- package/dist/src/components/Charts/boxplot-chart/boxUtils.d.ts +4 -0
- package/dist/src/components/Charts/boxplot-chart/boxUtils.d.ts.map +1 -0
- package/dist/src/components/Charts/mixed-chart/MixedChart.d.ts +70 -0
- package/dist/src/components/Charts/mixed-chart/MixedChart.d.ts.map +1 -0
- package/dist/src/components/Charts/sankey-adaptation/sankey.d.ts +4 -0
- package/dist/src/components/Charts/sankey-adaptation/sankey.d.ts.map +1 -0
- package/dist/src/components/Charts/sankey-chart/SankeyChart.d.ts +20 -0
- package/dist/src/components/Charts/sankey-chart/SankeyChart.d.ts.map +1 -0
- package/dist/src/components/Charts/stacked-column/StackedColumn.d.ts +55 -0
- package/dist/src/components/Charts/stacked-column/StackedColumn.d.ts.map +1 -0
- package/dist/src/components/Charts/stacked-column-one-hundred-percent/StackedColumnOneHundredPercent.d.ts +13 -0
- package/dist/src/components/Charts/stacked-column-one-hundred-percent/StackedColumnOneHundredPercent.d.ts.map +1 -0
- package/dist/src/components/CircularProgress/CircularProgress.d.ts +17 -0
- package/dist/src/components/CircularProgress/CircularProgress.d.ts.map +1 -0
- package/{src/components/CircularProgress/index.ts → dist/src/components/CircularProgress/index.d.ts} +1 -0
- package/dist/src/components/CircularProgress/index.d.ts.map +1 -0
- package/dist/src/components/Confirmationpopup/ConfirmationPopup.d.ts +13 -0
- package/dist/src/components/Confirmationpopup/ConfirmationPopup.d.ts.map +1 -0
- package/dist/src/components/Confirmationpopup/index.d.ts +16 -0
- package/dist/src/components/Confirmationpopup/index.d.ts.map +1 -0
- package/dist/src/components/Confirmationpopup/useConfirmationPopup.d.ts +9 -0
- package/dist/src/components/Confirmationpopup/useConfirmationPopup.d.ts.map +1 -0
- package/dist/src/components/DayStatCard/DayStatCard.d.ts +20 -0
- package/dist/src/components/DayStatCard/DayStatCard.d.ts.map +1 -0
- package/{src/components/DayStatCard/index.ts → dist/src/components/DayStatCard/index.d.ts} +1 -0
- package/dist/src/components/DayStatCard/index.d.ts.map +1 -0
- package/dist/src/components/DraggableSwitcher/DraggableSwitcherButton.d.ts +16 -0
- package/dist/src/components/DraggableSwitcher/DraggableSwitcherButton.d.ts.map +1 -0
- package/dist/src/components/DraggableSwitcher/context/useDraggableSwitcher.d.ts +11 -0
- package/dist/src/components/DraggableSwitcher/context/useDraggableSwitcher.d.ts.map +1 -0
- package/{src/components/DraggableSwitcher/index.ts → dist/src/components/DraggableSwitcher/index.d.ts} +3 -2
- package/dist/src/components/DraggableSwitcher/index.d.ts.map +1 -0
- package/dist/src/components/DropdownMenu/DropdownMenu.d.ts +23 -0
- package/dist/src/components/DropdownMenu/DropdownMenu.d.ts.map +1 -0
- package/dist/src/components/DropdownMenu/index.d.ts +2 -0
- package/dist/src/components/DropdownMenu/index.d.ts.map +1 -0
- package/dist/src/components/DynamicForm/DynamicForm.d.ts +16 -0
- package/dist/src/components/DynamicForm/DynamicForm.d.ts.map +1 -0
- package/{src/components/DynamicForm/index.ts → dist/src/components/DynamicForm/index.d.ts} +1 -0
- package/dist/src/components/DynamicForm/index.d.ts.map +1 -0
- package/dist/src/components/DynamicForm/tools/form-metadata.d.ts +50 -0
- package/dist/src/components/DynamicForm/tools/form-metadata.d.ts.map +1 -0
- package/dist/src/components/DynamicForm/tools/validation.d.ts +11 -0
- package/dist/src/components/DynamicForm/tools/validation.d.ts.map +1 -0
- package/dist/src/components/DynamicInput/DynamicInput.d.ts +13 -0
- package/dist/src/components/DynamicInput/DynamicInput.d.ts.map +1 -0
- package/{src/components/DynamicInput/index.ts → dist/src/components/DynamicInput/index.d.ts} +1 -0
- package/dist/src/components/DynamicInput/index.d.ts.map +1 -0
- package/dist/src/components/DynamicInput/input/CheckboxInput.d.ts +12 -0
- package/dist/src/components/DynamicInput/input/CheckboxInput.d.ts.map +1 -0
- package/dist/src/components/DynamicInput/input/ColorInput.d.ts +13 -0
- package/dist/src/components/DynamicInput/input/ColorInput.d.ts.map +1 -0
- package/dist/src/components/DynamicInput/input/DateInput.d.ts +13 -0
- package/dist/src/components/DynamicInput/input/DateInput.d.ts.map +1 -0
- package/dist/src/components/DynamicInput/input/FileInput.d.ts +13 -0
- package/dist/src/components/DynamicInput/input/FileInput.d.ts.map +1 -0
- package/dist/src/components/DynamicInput/input/InputWrapper.d.ts +11 -0
- package/dist/src/components/DynamicInput/input/InputWrapper.d.ts.map +1 -0
- package/dist/src/components/DynamicInput/input/RadioInput.d.ts +12 -0
- package/dist/src/components/DynamicInput/input/RadioInput.d.ts.map +1 -0
- package/dist/src/components/DynamicInput/input/RangeInput.d.ts +13 -0
- package/dist/src/components/DynamicInput/input/RangeInput.d.ts.map +1 -0
- package/dist/src/components/DynamicInput/input/SelectInput.d.ts +12 -0
- package/dist/src/components/DynamicInput/input/SelectInput.d.ts.map +1 -0
- package/dist/src/components/DynamicInput/input/TextInput.d.ts +13 -0
- package/dist/src/components/DynamicInput/input/TextInput.d.ts.map +1 -0
- package/dist/src/components/DynamicInput/input/TextareaInput.d.ts +12 -0
- package/dist/src/components/DynamicInput/input/TextareaInput.d.ts.map +1 -0
- package/{src/components/DynamicInput/input/index.ts → dist/src/components/DynamicInput/input/index.d.ts} +1 -0
- package/dist/src/components/DynamicInput/input/index.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/AdvancedFilters.d.ts +18 -0
- package/dist/src/components/DynamicTable/AdvancedFilters.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/ColumnSorter.d.ts +12 -0
- package/dist/src/components/DynamicTable/ColumnSorter.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/Pagination.d.ts +13 -0
- package/dist/src/components/DynamicTable/Pagination.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/TableBody.d.ts +4 -0
- package/dist/src/components/DynamicTable/TableBody.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/TableCell.d.ts +9 -0
- package/dist/src/components/DynamicTable/TableCell.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/TableHeader.d.ts +7 -0
- package/dist/src/components/DynamicTable/TableHeader.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/TableRow.d.ts +16 -0
- package/dist/src/components/DynamicTable/TableRow.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/TableauDynamique.d.ts +17 -0
- package/dist/src/components/DynamicTable/TableauDynamique.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/filters/BooleanFilter.d.ts +13 -0
- package/dist/src/components/DynamicTable/filters/BooleanFilter.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/filters/DateFilter.d.ts +13 -0
- package/dist/src/components/DynamicTable/filters/DateFilter.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/filters/DateRangeFilter.d.ts +17 -0
- package/dist/src/components/DynamicTable/filters/DateRangeFilter.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/filters/FilterRenderer.d.ts +10 -0
- package/dist/src/components/DynamicTable/filters/FilterRenderer.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/filters/MultiSelectFilter.d.ts +11 -0
- package/dist/src/components/DynamicTable/filters/MultiSelectFilter.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/filters/NumberFilter.d.ts +14 -0
- package/dist/src/components/DynamicTable/filters/NumberFilter.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/filters/OperatorFilter.d.ts +16 -0
- package/dist/src/components/DynamicTable/filters/OperatorFilter.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/filters/SelectFilter.d.ts +10 -0
- package/dist/src/components/DynamicTable/filters/SelectFilter.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/filters/TextFilter.d.ts +9 -0
- package/dist/src/components/DynamicTable/filters/TextFilter.d.ts.map +1 -0
- package/{src/components/DynamicTable/filters/index.ts → dist/src/components/DynamicTable/filters/index.d.ts} +1 -0
- package/dist/src/components/DynamicTable/filters/index.d.ts.map +1 -0
- package/{src/components/DynamicTable/hooks/index.ts → dist/src/components/DynamicTable/hooks/index.d.ts} +1 -0
- package/dist/src/components/DynamicTable/hooks/index.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/hooks/useAsyncActions.d.ts +6 -0
- package/dist/src/components/DynamicTable/hooks/useAsyncActions.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/hooks/useFilters.d.ts +19 -0
- package/dist/src/components/DynamicTable/hooks/useFilters.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/hooks/useTableData.d.ts +11 -0
- package/dist/src/components/DynamicTable/hooks/useTableData.d.ts.map +1 -0
- package/{src/components/DynamicTable/index.ts → dist/src/components/DynamicTable/index.d.ts} +1 -0
- package/dist/src/components/DynamicTable/index.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/tools/filterTypes.d.ts +88 -0
- package/dist/src/components/DynamicTable/tools/filterTypes.d.ts.map +1 -0
- package/{src/components/DynamicTable/tools/index.ts → dist/src/components/DynamicTable/tools/index.d.ts} +1 -0
- package/dist/src/components/DynamicTable/tools/index.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/tools/tableConfig.d.ts +13 -0
- package/dist/src/components/DynamicTable/tools/tableConfig.d.ts.map +1 -0
- package/dist/src/components/DynamicTable/tools/tableTypes.d.ts +66 -0
- package/dist/src/components/DynamicTable/tools/tableTypes.d.ts.map +1 -0
- package/dist/src/components/EntryControl/EntryControl.d.ts +7 -0
- package/dist/src/components/EntryControl/EntryControl.d.ts.map +1 -0
- package/{src/components/EntryControl/index.ts → dist/src/components/EntryControl/index.d.ts} +1 -0
- package/dist/src/components/EntryControl/index.d.ts.map +1 -0
- package/dist/src/components/Grid/Grid.d.ts +24 -0
- package/dist/src/components/Grid/Grid.d.ts.map +1 -0
- package/{src/components/Grid/index.ts → dist/src/components/Grid/index.d.ts} +1 -0
- package/dist/src/components/Grid/index.d.ts.map +1 -0
- package/dist/src/components/Header/Header.d.ts +16 -0
- package/dist/src/components/Header/Header.d.ts.map +1 -0
- package/dist/src/components/Header/index.d.ts +2 -0
- package/dist/src/components/Header/index.d.ts.map +1 -0
- package/dist/src/components/IconText/IconText.d.ts +14 -0
- package/dist/src/components/IconText/IconText.d.ts.map +1 -0
- package/dist/src/components/IconText/index.d.ts +2 -0
- package/dist/src/components/IconText/index.d.ts.map +1 -0
- package/dist/src/components/LanguageSelector/LanguageSelector.d.ts +14 -0
- package/dist/src/components/LanguageSelector/LanguageSelector.d.ts.map +1 -0
- package/{src/components/LanguageSelector/index.ts → dist/src/components/LanguageSelector/index.d.ts} +1 -0
- package/dist/src/components/LanguageSelector/index.d.ts.map +1 -0
- package/dist/src/components/Logo/Logo.d.ts +10 -0
- package/dist/src/components/Logo/Logo.d.ts.map +1 -0
- package/{src/components/Logo/index.ts → dist/src/components/Logo/index.d.ts} +1 -0
- package/dist/src/components/Logo/index.d.ts.map +1 -0
- package/dist/src/components/MetricsPanel/MetricsItem.d.ts +12 -0
- package/dist/src/components/MetricsPanel/MetricsItem.d.ts.map +1 -0
- package/dist/src/components/MetricsPanel/MetricsPanel.d.ts +17 -0
- package/dist/src/components/MetricsPanel/MetricsPanel.d.ts.map +1 -0
- package/dist/src/components/MetricsPanel/PanelHeader.d.ts +8 -0
- package/dist/src/components/MetricsPanel/PanelHeader.d.ts.map +1 -0
- package/dist/src/components/MetricsPanel/SummaryCard.d.ts +16 -0
- package/dist/src/components/MetricsPanel/SummaryCard.d.ts.map +1 -0
- package/{src/components/MetricsPanel/index.ts → dist/src/components/MetricsPanel/index.d.ts} +1 -0
- package/dist/src/components/MetricsPanel/index.d.ts.map +1 -0
- package/dist/src/components/MetricsPanel/renderers/CompactRenderer.d.ts +4 -0
- package/dist/src/components/MetricsPanel/renderers/CompactRenderer.d.ts.map +1 -0
- package/dist/src/components/MetricsPanel/renderers/ImageCard.d.ts +7 -0
- package/dist/src/components/MetricsPanel/renderers/ImageCard.d.ts.map +1 -0
- package/dist/src/components/MetricsPanel/renderers/PertinenceCard.d.ts +15 -0
- package/dist/src/components/MetricsPanel/renderers/PertinenceCard.d.ts.map +1 -0
- package/dist/src/components/MetricsPanel/tools/MetricsPanelTypes.d.ts +47 -0
- package/dist/src/components/MetricsPanel/tools/MetricsPanelTypes.d.ts.map +1 -0
- package/dist/src/components/MetricsPanel/tools/chooseDefaultRender.d.ts +7 -0
- package/dist/src/components/MetricsPanel/tools/chooseDefaultRender.d.ts.map +1 -0
- package/dist/src/components/MetricsPanel/tools/colorUtils.d.ts +2 -0
- package/dist/src/components/MetricsPanel/tools/colorUtils.d.ts.map +1 -0
- package/{src/components/MetricsPanel/tools/index.ts → dist/src/components/MetricsPanel/tools/index.d.ts} +1 -0
- package/dist/src/components/MetricsPanel/tools/index.d.ts.map +1 -0
- package/dist/src/components/ModuleHeader/ModuleHeader.d.ts +10 -0
- package/dist/src/components/ModuleHeader/ModuleHeader.d.ts.map +1 -0
- package/dist/src/components/ModuleHeader/index.d.ts +2 -0
- package/dist/src/components/ModuleHeader/index.d.ts.map +1 -0
- package/dist/src/components/ModuleSideBar/ModuleSideBar.d.ts +22 -0
- package/dist/src/components/ModuleSideBar/ModuleSideBar.d.ts.map +1 -0
- package/dist/src/components/ModuleSideBar/index.d.ts +2 -0
- package/dist/src/components/ModuleSideBar/index.d.ts.map +1 -0
- package/dist/src/components/NavBar/NavBar.d.ts +11 -0
- package/dist/src/components/NavBar/NavBar.d.ts.map +1 -0
- package/dist/src/components/NavBar/NavContext.d.ts +14 -0
- package/dist/src/components/NavBar/NavContext.d.ts.map +1 -0
- package/{src/components/NavBar/index.ts → dist/src/components/NavBar/index.d.ts} +1 -0
- package/dist/src/components/NavBar/index.d.ts.map +1 -0
- package/dist/src/components/NavItem/NavItem.d.ts +13 -0
- package/dist/src/components/NavItem/NavItem.d.ts.map +1 -0
- package/dist/src/components/NavItem/index.d.ts +2 -0
- package/dist/src/components/NavItem/index.d.ts.map +1 -0
- package/dist/src/components/Page/Dashboard.d.ts +4 -0
- package/dist/src/components/Page/Dashboard.d.ts.map +1 -0
- package/dist/src/components/Page/Page.d.ts +4 -0
- package/dist/src/components/Page/Page.d.ts.map +1 -0
- package/dist/src/components/PerformanceCard/PerformanceCard.d.ts +22 -0
- package/dist/src/components/PerformanceCard/PerformanceCard.d.ts.map +1 -0
- package/dist/src/components/PerformanceCard/defaultHistogramRenderer.d.ts +10 -0
- package/dist/src/components/PerformanceCard/defaultHistogramRenderer.d.ts.map +1 -0
- package/dist/src/components/PerformanceCard/tools/types.d.ts +44 -0
- package/dist/src/components/PerformanceCard/tools/types.d.ts.map +1 -0
- package/dist/src/components/PerformanceCard/tools/usePerformanceCard.d.ts +28 -0
- package/dist/src/components/PerformanceCard/tools/usePerformanceCard.d.ts.map +1 -0
- package/dist/src/components/PeriodRange/PeriodRange.d.ts +14 -0
- package/dist/src/components/PeriodRange/PeriodRange.d.ts.map +1 -0
- package/dist/src/components/PeriodSelect/PeriodSelect.d.ts +14 -0
- package/dist/src/components/PeriodSelect/PeriodSelect.d.ts.map +1 -0
- package/dist/src/components/PeriodSelect/index.d.ts +2 -0
- package/dist/src/components/PeriodSelect/index.d.ts.map +1 -0
- package/dist/src/components/ScrollableHorizontale/ScrollableHorizontale.d.ts +12 -0
- package/dist/src/components/ScrollableHorizontale/ScrollableHorizontale.d.ts.map +1 -0
- package/{src/components/ScrollableHorizontale/index.ts → dist/src/components/ScrollableHorizontale/index.d.ts} +1 -0
- package/dist/src/components/ScrollableHorizontale/index.d.ts.map +1 -0
- package/dist/src/components/SearchBar/SearchBar.d.ts +10 -0
- package/dist/src/components/SearchBar/SearchBar.d.ts.map +1 -0
- package/dist/src/components/SearchBar/index.d.ts +2 -0
- package/dist/src/components/SearchBar/index.d.ts.map +1 -0
- package/dist/src/components/SectionTitle/SectionTitle.d.ts +9 -0
- package/dist/src/components/SectionTitle/SectionTitle.d.ts.map +1 -0
- package/dist/src/components/SelectFilter/SelectFilter.d.ts +5 -0
- package/dist/src/components/SelectFilter/SelectFilter.d.ts.map +1 -0
- package/{src/components/SelectFilter/index.ts → dist/src/components/SelectFilter/index.d.ts} +3 -2
- package/dist/src/components/SelectFilter/index.d.ts.map +1 -0
- package/dist/src/components/SelectFilter/types.d.ts +19 -0
- package/dist/src/components/SelectFilter/types.d.ts.map +1 -0
- package/dist/src/components/SideComponent/PatientEditor.d.ts +5 -0
- package/dist/src/components/SideComponent/PatientEditor.d.ts.map +1 -0
- package/dist/src/components/SideComponent/SideComponent.d.ts +25 -0
- package/dist/src/components/SideComponent/SideComponent.d.ts.map +1 -0
- package/dist/src/components/SideComponent/hooks/useBodyScrollLock.d.ts +2 -0
- package/dist/src/components/SideComponent/hooks/useBodyScrollLock.d.ts.map +1 -0
- package/{src/components/SideComponent/index.ts → dist/src/components/SideComponent/index.d.ts} +1 -0
- package/dist/src/components/SideComponent/index.d.ts.map +1 -0
- package/dist/src/components/SideComponent/portal.d.ts +3 -0
- package/dist/src/components/SideComponent/portal.d.ts.map +1 -0
- package/dist/src/components/SubNavBar/SubNavBar.d.ts +16 -0
- package/dist/src/components/SubNavBar/SubNavBar.d.ts.map +1 -0
- package/dist/src/components/SubNavBar/index.d.ts +2 -0
- package/dist/src/components/SubNavBar/index.d.ts.map +1 -0
- package/dist/src/components/Switcher/Switcher.d.ts +21 -0
- package/dist/src/components/Switcher/Switcher.d.ts.map +1 -0
- package/dist/src/components/Switcher/index.d.ts +2 -0
- package/dist/src/components/Switcher/index.d.ts.map +1 -0
- package/dist/src/components/Title/Title.d.ts +9 -0
- package/dist/src/components/Title/Title.d.ts.map +1 -0
- package/dist/src/components/Title/index.d.ts +2 -0
- package/dist/src/components/Title/index.d.ts.map +1 -0
- package/dist/src/components/TranslationKey/TranslationKey.d.ts +23 -0
- package/dist/src/components/TranslationKey/TranslationKey.d.ts.map +1 -0
- package/dist/src/components/TranslationKey/index.d.ts +2 -0
- package/dist/src/components/TranslationKey/index.d.ts.map +1 -0
- package/dist/src/components/TrendItem/TrendItem.d.ts +14 -0
- package/dist/src/components/TrendItem/TrendItem.d.ts.map +1 -0
- package/dist/src/components/TrendItem/index.d.ts +2 -0
- package/dist/src/components/TrendItem/index.d.ts.map +1 -0
- package/dist/src/components/TrendList/TrendList.d.ts +17 -0
- package/dist/src/components/TrendList/TrendList.d.ts.map +1 -0
- package/dist/src/components/TrendList/index.d.ts +2 -0
- package/dist/src/components/TrendList/index.d.ts.map +1 -0
- package/dist/src/components/theme/ThemeSwitcherButton.d.ts +18 -0
- package/dist/src/components/theme/ThemeSwitcherButton.d.ts.map +1 -0
- package/dist/src/components/theme/context/ThemeContext.d.ts +13 -0
- package/dist/src/components/theme/context/ThemeContext.d.ts.map +1 -0
- package/{src/components/theme/context/index.ts → dist/src/components/theme/context/index.d.ts} +1 -0
- package/dist/src/components/theme/context/index.d.ts.map +1 -0
- package/dist/src/components/theme/context/useThemeSwitcher.d.ts +5 -0
- package/dist/src/components/theme/context/useThemeSwitcher.d.ts.map +1 -0
- package/dist/src/components/theme/index.d.ts +2 -0
- package/dist/src/components/theme/index.d.ts.map +1 -0
- package/dist/src/main.d.ts +2 -0
- package/dist/src/main.d.ts.map +1 -0
- package/package.json +28 -4
- package/.prettierignore +0 -4
- package/.prettierrc +0 -9
- package/.storybook/main.ts +0 -17
- package/.storybook/preview.ts +0 -21
- package/.storybook/vitest.setup.ts +0 -7
- package/eslint.config.js +0 -40
- package/index.html +0 -13
- package/src/App.css +0 -42
- package/src/App.tsx +0 -12
- package/src/assets/accessibility.png +0 -0
- package/src/assets/accessibility.svg +0 -1
- package/src/assets/addon-library.png +0 -0
- package/src/assets/assets.png +0 -0
- package/src/assets/avif-test-image.avif +0 -0
- package/src/assets/context.png +0 -0
- package/src/assets/discord.svg +0 -1
- package/src/assets/docs.png +0 -0
- package/src/assets/figma-plugin.png +0 -0
- package/src/assets/github.svg +0 -1
- package/src/assets/react.svg +0 -1
- package/src/assets/share.png +0 -0
- package/src/assets/styling.png +0 -0
- package/src/assets/testing.png +0 -0
- package/src/assets/theming.png +0 -0
- package/src/assets/tutorials.svg +0 -1
- package/src/assets/youtube.svg +0 -1
- package/src/components/AddItemModal/AddItemModal.module.css +0 -72
- package/src/components/AddItemModal/AddItemModal.tsx +0 -82
- package/src/components/AddItemModal/index.ts +0 -1
- package/src/components/Alert/Alert.css +0 -54
- package/src/components/Alert/Alert.stories.tsx +0 -82
- package/src/components/Alert/Alert.tsx +0 -85
- package/src/components/Alert/AlertContext.tsx +0 -200
- package/src/components/Alert/AlertModels.ts +0 -34
- package/src/components/AnnouncementPanel/FlexRowContainer.css +0 -17
- package/src/components/AnnouncementPanel/FlexRowContainer.stories.tsx +0 -329
- package/src/components/AnnouncementPanel/FlexRowContainer.tsx +0 -24
- package/src/components/AnnouncementPanel/ListBox/CounterListBox.css +0 -56
- package/src/components/AnnouncementPanel/ListBox/CounterListBox.stories.tsx +0 -292
- package/src/components/AnnouncementPanel/ListBox/CounterListBox.tsx +0 -106
- package/src/components/AnnouncementPanel/ListBox/SimpleListBox.css +0 -57
- package/src/components/AnnouncementPanel/ListBox/SimpleListBox.stories.tsx +0 -189
- package/src/components/AnnouncementPanel/ListBox/SimpleListBox.tsx +0 -138
- package/src/components/AnnouncementPanel/ListBox/TrendListBox.css +0 -61
- package/src/components/AnnouncementPanel/ListBox/TrendListBox.stories.tsx +0 -257
- package/src/components/AnnouncementPanel/ListBox/TrendListBox.tsx +0 -90
- package/src/components/AnnouncementPanel/ListContentContainer.css +0 -23
- package/src/components/AnnouncementPanel/ListContentContainer.stories.tsx +0 -212
- package/src/components/AnnouncementPanel/ListContentContainer.tsx +0 -33
- package/src/components/BandChart/index.tsx +0 -282
- package/src/components/Button/Button.module.css +0 -165
- package/src/components/Button/Button.stories.ts +0 -132
- package/src/components/Button/Button.tsx +0 -55
- package/src/components/Button/button.css +0 -29
- package/src/components/ChartContainer/ChartContainer.css +0 -116
- package/src/components/ChartContainer/ChartContainer.stories.tsx +0 -159
- package/src/components/ChartContainer/ChartContainer.tsx +0 -155
- package/src/components/ChartContainer/index.ts +0 -1
- package/src/components/Charts/area-chart-admission/AreaChartAdmission.stories.tsx +0 -65
- package/src/components/Charts/area-chart-admission/AreaChartAdmission.tsx +0 -129
- package/src/components/Charts/area-chart-admission/content.json +0 -48
- package/src/components/Charts/area-chart-hospitalisation/AreaChartHospitalisation.stories.tsx +0 -141
- package/src/components/Charts/area-chart-hospitalisation/AreaChartHospitalisation.tsx +0 -262
- package/src/components/Charts/area-chart-hospitalisation/content.json +0 -55
- package/src/components/Charts/bar-chart/BarChart.stories.tsx +0 -50
- package/src/components/Charts/bar-chart/BarChart.tsx +0 -171
- package/src/components/Charts/bar-chart/content.json +0 -15
- package/src/components/Charts/boxplot-chart/BoxPlotChart.stories.tsx +0 -63
- package/src/components/Charts/boxplot-chart/BoxPlotChart.tsx +0 -114
- package/src/components/Charts/boxplot-chart/boxUtils.ts +0 -22
- package/src/components/Charts/boxplot-chart/content.json +0 -11
- package/src/components/Charts/mixed-chart/MixedChart.stories.tsx +0 -83
- package/src/components/Charts/mixed-chart/MixedChart.tsx +0 -681
- package/src/components/Charts/mixed-chart/content.json +0 -34
- package/src/components/Charts/sankey-adaptation/sankey.tsx +0 -70
- package/src/components/Charts/sankey-chart/SankeyChart.stories.tsx +0 -69
- package/src/components/Charts/sankey-chart/SankeyChart.tsx +0 -183
- package/src/components/Charts/sankey-chart/content.json +0 -15
- package/src/components/Charts/stacked-column/StackedColumn.stories.tsx +0 -72
- package/src/components/Charts/stacked-column/StackedColumn.tsx +0 -406
- package/src/components/Charts/stacked-column/content.json +0 -37
- package/src/components/Charts/stacked-column-one-hundred-percent/StackedColumnOneHundredPercent.stories.tsx +0 -43
- package/src/components/Charts/stacked-column-one-hundred-percent/StackedColumnOneHundredPercent.tsx +0 -75
- package/src/components/Charts/stacked-column-one-hundred-percent/content.json +0 -6
- package/src/components/CircularProgress/CircularProgress.css +0 -79
- package/src/components/CircularProgress/CircularProgress.stories.tsx +0 -251
- package/src/components/CircularProgress/CircularProgress.tsx +0 -101
- package/src/components/Configure.mdx +0 -369
- package/src/components/Confirmationpopup/ConfirmationPopup.module.css +0 -88
- package/src/components/Confirmationpopup/ConfirmationPopup.stories.tsx +0 -94
- package/src/components/Confirmationpopup/ConfirmationPopup.tsx +0 -47
- package/src/components/Confirmationpopup/index.ts +0 -6
- package/src/components/Confirmationpopup/useConfirmationPopup.ts +0 -48
- package/src/components/DayStatCard/DayStatCard.css +0 -50
- package/src/components/DayStatCard/DayStatCard.stories.tsx +0 -273
- package/src/components/DayStatCard/DayStatCard.tsx +0 -96
- package/src/components/DraggableSwitcher/DraggableSwitcherButton.tsx +0 -58
- package/src/components/DraggableSwitcher/context/useDraggableSwitcher.tsx +0 -45
- package/src/components/DropdownMenu/DropdownMenu.css +0 -100
- package/src/components/DropdownMenu/DropdownMenu.stories.tsx +0 -174
- package/src/components/DropdownMenu/DropdownMenu.tsx +0 -106
- package/src/components/DropdownMenu/index.ts +0 -1
- package/src/components/DynamicForm/DynamicFom.stories.ts +0 -773
- package/src/components/DynamicForm/DynamicForm.module.css +0 -468
- package/src/components/DynamicForm/DynamicForm.tsx +0 -224
- package/src/components/DynamicForm/tools/form-metadata.ts +0 -82
- package/src/components/DynamicForm/tools/validation.ts +0 -168
- package/src/components/DynamicInput/DynamicInput.module.css +0 -125
- package/src/components/DynamicInput/DynamicInput.stories.ts +0 -350
- package/src/components/DynamicInput/DynamicInput.tsx +0 -144
- package/src/components/DynamicInput/input/CheckboxInput.tsx +0 -41
- package/src/components/DynamicInput/input/ColorInput.tsx +0 -46
- package/src/components/DynamicInput/input/DateInput.tsx +0 -57
- package/src/components/DynamicInput/input/FileInput.tsx +0 -174
- package/src/components/DynamicInput/input/InputWrapper.tsx +0 -26
- package/src/components/DynamicInput/input/RadioInput.tsx +0 -46
- package/src/components/DynamicInput/input/RangeInput.tsx +0 -46
- package/src/components/DynamicInput/input/SelectInput.tsx +0 -75
- package/src/components/DynamicInput/input/TextInput.tsx +0 -101
- package/src/components/DynamicInput/input/TextareaInput.tsx +0 -47
- package/src/components/DynamicInput/input/assets/ColorInput.module.css +0 -48
- package/src/components/DynamicInput/input/assets/DateInput.module.css +0 -83
- package/src/components/DynamicInput/input/assets/FileInput.module.css +0 -133
- package/src/components/DynamicInput/input/assets/RangeInput.module.css +0 -169
- package/src/components/DynamicInput/input/assets/SelectInput.module.css +0 -95
- package/src/components/DynamicTable/AdvancedFilters.tsx +0 -196
- package/src/components/DynamicTable/ColumnSorter.tsx +0 -185
- package/src/components/DynamicTable/Pagination.tsx +0 -115
- package/src/components/DynamicTable/TableBody.tsx +0 -42
- package/src/components/DynamicTable/TableCell.tsx +0 -38
- package/src/components/DynamicTable/TableHeader.tsx +0 -39
- package/src/components/DynamicTable/TableRow.tsx +0 -56
- package/src/components/DynamicTable/TableauDynamic.stories.ts +0 -1014
- package/src/components/DynamicTable/TableauDynamique.module.css +0 -1294
- package/src/components/DynamicTable/TableauDynamique.tsx +0 -154
- package/src/components/DynamicTable/filters/BooleanFilter.tsx +0 -30
- package/src/components/DynamicTable/filters/DateFilter.tsx +0 -28
- package/src/components/DynamicTable/filters/DateRangeFilter.tsx +0 -51
- package/src/components/DynamicTable/filters/FilterRenderer.tsx +0 -117
- package/src/components/DynamicTable/filters/MultiSelectFilter.tsx +0 -59
- package/src/components/DynamicTable/filters/NumberFilter.tsx +0 -37
- package/src/components/DynamicTable/filters/OperatorFilter.tsx +0 -64
- package/src/components/DynamicTable/filters/SelectFilter.tsx +0 -69
- package/src/components/DynamicTable/filters/TextFilter.tsx +0 -39
- package/src/components/DynamicTable/hooks/useAsyncActions.ts +0 -36
- package/src/components/DynamicTable/hooks/useFilters.ts +0 -142
- package/src/components/DynamicTable/hooks/useTableData.ts +0 -216
- package/src/components/DynamicTable/tools/filterTypes.ts +0 -118
- package/src/components/DynamicTable/tools/tableConfig.ts +0 -96
- package/src/components/DynamicTable/tools/tableTypes.ts +0 -63
- package/src/components/EntryControl/EntryControl.module.css +0 -218
- package/src/components/EntryControl/EntryControl.stories.tsx +0 -71
- package/src/components/EntryControl/EntryControl.tsx +0 -117
- package/src/components/Grid/Grid.stories.tsx +0 -94
- package/src/components/Grid/Grid.tsx +0 -219
- package/src/components/Grid/grid.css +0 -285
- package/src/components/Header/Header.stories.tsx +0 -164
- package/src/components/Header/Header.tsx +0 -61
- package/src/components/Header/header.css +0 -61
- package/src/components/Header/index.ts +0 -1
- package/src/components/IconText/IconText..stories.tsx +0 -135
- package/src/components/IconText/IconText.css +0 -43
- package/src/components/IconText/IconText.tsx +0 -43
- package/src/components/IconText/index.ts +0 -1
- package/src/components/LanguageSelector/LanguageSelector.css +0 -31
- package/src/components/LanguageSelector/LanguageSelector.stories.tsx +0 -38
- package/src/components/LanguageSelector/LanguageSelector.tsx +0 -37
- package/src/components/Logo/Logo.css +0 -89
- package/src/components/Logo/Logo.stories.tsx +0 -79
- package/src/components/Logo/Logo.tsx +0 -22
- package/src/components/MetricsPanel/MetricsItem.tsx +0 -128
- package/src/components/MetricsPanel/MetricsPanel.module.css +0 -688
- package/src/components/MetricsPanel/MetricsPanel.stories.tsx +0 -692
- package/src/components/MetricsPanel/MetricsPanel.tsx +0 -220
- package/src/components/MetricsPanel/PanelHeader.tsx +0 -19
- package/src/components/MetricsPanel/SummaryCard.tsx +0 -61
- package/src/components/MetricsPanel/renderers/CompactRenderer.tsx +0 -148
- package/src/components/MetricsPanel/renderers/ImageCard.tsx +0 -62
- package/src/components/MetricsPanel/renderers/PertinenceCard.tsx +0 -55
- package/src/components/MetricsPanel/tools/MetricsPanelTypes.ts +0 -62
- package/src/components/MetricsPanel/tools/chooseDefaultRender.ts +0 -50
- package/src/components/MetricsPanel/tools/colorUtils.ts +0 -39
- package/src/components/ModuleHeader/ModuleHeader.css +0 -37
- package/src/components/ModuleHeader/ModuleHeader.stories.tsx +0 -37
- package/src/components/ModuleHeader/ModuleHeader.tsx +0 -42
- package/src/components/ModuleHeader/index.ts +0 -1
- package/src/components/ModuleSideBar/ModuleSideBar.css +0 -227
- package/src/components/ModuleSideBar/ModuleSideBar.stories.tsx +0 -40
- package/src/components/ModuleSideBar/ModuleSideBar.tsx +0 -155
- package/src/components/ModuleSideBar/index.ts +0 -1
- package/src/components/NavBar/NavBar.css +0 -58
- package/src/components/NavBar/NavBar.stories.tsx +0 -169
- package/src/components/NavBar/NavBar.tsx +0 -100
- package/src/components/NavBar/NavContext.tsx +0 -30
- package/src/components/NavItem/NavItem.css +0 -29
- package/src/components/NavItem/NavItem.tsx +0 -58
- package/src/components/NavItem/index.ts +0 -1
- package/src/components/Page/Dashboard.tsx +0 -93
- package/src/components/Page/Page.stories.ts +0 -33
- package/src/components/Page/Page.tsx +0 -73
- package/src/components/Page/page.css +0 -81
- package/src/components/PerformanceCard/PerformanceCard.module.css +0 -232
- package/src/components/PerformanceCard/PerformanceCard.stories.tsx +0 -441
- package/src/components/PerformanceCard/PerformanceCard.tsx +0 -198
- package/src/components/PerformanceCard/defaultHistogramRenderer.tsx +0 -32
- package/src/components/PerformanceCard/tools/types.ts +0 -50
- package/src/components/PerformanceCard/tools/usePerformanceCard.ts +0 -93
- package/src/components/PeriodRange/PeriodRange.module.css +0 -158
- package/src/components/PeriodRange/PeriodRange.stories.tsx +0 -66
- package/src/components/PeriodRange/PeriodRange.tsx +0 -130
- package/src/components/PeriodSelect/PeriodSelect.module.css +0 -64
- package/src/components/PeriodSelect/PeriodSelect.stories.tsx +0 -40
- package/src/components/PeriodSelect/PeriodSelect.tsx +0 -48
- package/src/components/PeriodSelect/index.ts +0 -1
- package/src/components/ScrollableHorizontale/ScrollableHorizontale.css +0 -40
- package/src/components/ScrollableHorizontale/ScrollableHorizontale.stories.tsx +0 -133
- package/src/components/ScrollableHorizontale/ScrollableHorizontale.tsx +0 -29
- package/src/components/SearchBar/SearchBar.css +0 -40
- package/src/components/SearchBar/SearchBar.stories.tsx +0 -36
- package/src/components/SearchBar/SearchBar.tsx +0 -30
- package/src/components/SearchBar/index.ts +0 -1
- package/src/components/SectionTitle/SectionTitle.css +0 -21
- package/src/components/SectionTitle/SectionTitle.stories.tsx +0 -39
- package/src/components/SectionTitle/SectionTitle.tsx +0 -18
- package/src/components/SelectFilter/SelectFilter.module.css +0 -249
- package/src/components/SelectFilter/SelectFilter.stories.tsx +0 -321
- package/src/components/SelectFilter/SelectFilter.tsx +0 -219
- package/src/components/SelectFilter/types.ts +0 -19
- package/src/components/SideComponent/PatientEditor.tsx +0 -64
- package/src/components/SideComponent/SideComponent.css +0 -179
- package/src/components/SideComponent/SideComponent.stories.tsx +0 -547
- package/src/components/SideComponent/SideComponent.tsx +0 -243
- package/src/components/SideComponent/hooks/useBodyScrollLock.ts +0 -15
- package/src/components/SideComponent/portal.ts +0 -11
- package/src/components/SubNavBar/SubNavBar.tsx +0 -41
- package/src/components/SubNavBar/index.ts +0 -1
- package/src/components/Switcher/Switcher.css +0 -65
- package/src/components/Switcher/Switcher.stories.tsx +0 -153
- package/src/components/Switcher/Switcher.tsx +0 -83
- package/src/components/Switcher/index.ts +0 -1
- package/src/components/Title/Title.stories.tsx +0 -18
- package/src/components/Title/Title.tsx +0 -26
- package/src/components/Title/index.ts +0 -1
- package/src/components/TranslationKey/TranslationKey.css +0 -272
- package/src/components/TranslationKey/TranslationKey.stories.tsx +0 -50
- package/src/components/TranslationKey/TranslationKey.tsx +0 -266
- package/src/components/TranslationKey/index.ts +0 -1
- package/src/components/TrendItem/TrendItem.css +0 -36
- package/src/components/TrendItem/TrendItem.stories.tsx +0 -276
- package/src/components/TrendItem/TrendItem.tsx +0 -46
- package/src/components/TrendItem/index.ts +0 -1
- package/src/components/TrendList/TrendList.css +0 -16
- package/src/components/TrendList/TrendList.stories.tsx +0 -337
- package/src/components/TrendList/TrendList.tsx +0 -72
- package/src/components/TrendList/index.ts +0 -1
- package/src/components/theme/ThemeSwitcherButton.tsx +0 -64
- package/src/components/theme/context/ThemeContext.tsx +0 -61
- package/src/components/theme/context/useThemeSwitcher.ts +0 -18
- package/src/components/theme/index.ts +0 -1
- package/src/index.css +0 -68
- package/src/main.tsx +0 -10
- package/src/vite-env.d.ts +0 -1
- package/tsconfig.app.json +0 -27
- package/tsconfig.json +0 -4
- package/tsconfig.node.json +0 -25
- package/vite.config.ts +0 -43
- package/vitest.shims.d.ts +0 -1
- /package/{public → dist}/vite.svg +0 -0
|
@@ -1,681 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import Chart from 'react-apexcharts';
|
|
3
|
-
import type { ApexOptions } from 'apexcharts';
|
|
4
|
-
import { Move } from 'lucide-react';
|
|
5
|
-
|
|
6
|
-
/* ---------- Types ---------- */
|
|
7
|
-
export interface BandChartData {
|
|
8
|
-
labels: string[];
|
|
9
|
-
main: number[];
|
|
10
|
-
upper: number[];
|
|
11
|
-
lower: number[];
|
|
12
|
-
histogram?: number[];
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export type DisplayConditionFn = (data: BandChartData) => boolean;
|
|
16
|
-
|
|
17
|
-
export interface LineConfig {
|
|
18
|
-
id: string;
|
|
19
|
-
key: keyof BandChartData;
|
|
20
|
-
label?: string;
|
|
21
|
-
visible?: boolean;
|
|
22
|
-
color?: string;
|
|
23
|
-
width?: number;
|
|
24
|
-
dash?: number;
|
|
25
|
-
}
|
|
26
|
-
export interface OutlierConfig {
|
|
27
|
-
label?: string;
|
|
28
|
-
color?: string;
|
|
29
|
-
size?: number;
|
|
30
|
-
marker?: { fillColor?: string; strokeColor?: string; opacity?: number; size?: number };
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface BubbleConfig {
|
|
34
|
-
visible?: boolean;
|
|
35
|
-
values?: (number | null)[];
|
|
36
|
-
color?: string;
|
|
37
|
-
size?: number;
|
|
38
|
-
outsideStyle?: { size?: number; fillColor?: string; strokeColor?: string; opacity?: number };
|
|
39
|
-
hideOutside?: boolean;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface BandChartConfig {
|
|
43
|
-
lines?: LineConfig[];
|
|
44
|
-
showHistogram?: boolean;
|
|
45
|
-
histogramKey?: keyof BandChartData;
|
|
46
|
-
histogramColor?: string;
|
|
47
|
-
// OnGoing options
|
|
48
|
-
showOnGoing?: boolean;
|
|
49
|
-
onGoingColor?: string;
|
|
50
|
-
onGoingLabel?: string;
|
|
51
|
-
onGoingIndex?: number | 'last';
|
|
52
|
-
bubble?: BubbleConfig;
|
|
53
|
-
outliers?: { lower?: OutlierConfig; upper?: OutlierConfig };
|
|
54
|
-
displayCondition?: DisplayConditionFn | null;
|
|
55
|
-
responsive?: boolean;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
interface Props {
|
|
59
|
-
data: BandChartData;
|
|
60
|
-
config?: BandChartConfig;
|
|
61
|
-
height?: number;
|
|
62
|
-
useOnGoing?: boolean;
|
|
63
|
-
draggable?: boolean;
|
|
64
|
-
tooltipEnabled?: boolean;
|
|
65
|
-
// zoomEnabled removed as separate prop — zoom/pan follow tooltipEnabled
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/* ---------- Local series item types (compat Apex) ---------- */
|
|
69
|
-
// Note: we allow extra props (like _outside) on point objects
|
|
70
|
-
type LinePoint = { x: string | number; y: number };
|
|
71
|
-
type ColumnPoint = { x: string | number; y: number | null; fillColor?: string };
|
|
72
|
-
type RangePoint = { x: string | number; y: [number, number] };
|
|
73
|
-
type ScatterPoint = { x: string | number; y: number | null; _outside?: boolean };
|
|
74
|
-
|
|
75
|
-
type SeriesItem =
|
|
76
|
-
| { name: string; type?: 'line'; data: LinePoint[] }
|
|
77
|
-
| { name: string; type?: 'column'; data: ColumnPoint[] }
|
|
78
|
-
| { name: string; type?: 'rangeArea'; data: RangePoint[] }
|
|
79
|
-
| { name: string; type?: 'scatter'; data: ScatterPoint[] };
|
|
80
|
-
|
|
81
|
-
type ChartSeries = SeriesItem[];
|
|
82
|
-
|
|
83
|
-
/* markers.discrete local type */
|
|
84
|
-
interface MarkerDiscrete {
|
|
85
|
-
seriesIndex: number;
|
|
86
|
-
dataPointIndex: number;
|
|
87
|
-
fillColor?: string;
|
|
88
|
-
strokeColor?: string;
|
|
89
|
-
size?: number;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/* ---------- default config (local) ---------- */
|
|
93
|
-
const defaultConfig: BandChartConfig = {
|
|
94
|
-
lines: [
|
|
95
|
-
{
|
|
96
|
-
id: 'Upper',
|
|
97
|
-
key: 'upper',
|
|
98
|
-
label: 'Upper',
|
|
99
|
-
visible: true,
|
|
100
|
-
color: 'var(--color-line)',
|
|
101
|
-
width: 1,
|
|
102
|
-
dash: 0,
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
id: 'Main',
|
|
106
|
-
key: 'main',
|
|
107
|
-
label: 'Main',
|
|
108
|
-
visible: true,
|
|
109
|
-
color: 'var(--color-main-line)',
|
|
110
|
-
width: 1.5,
|
|
111
|
-
dash: 6,
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
id: 'Lower',
|
|
115
|
-
key: 'lower',
|
|
116
|
-
label: 'Lower',
|
|
117
|
-
visible: true,
|
|
118
|
-
color: 'var(--color-line)',
|
|
119
|
-
width: 1,
|
|
120
|
-
dash: 0,
|
|
121
|
-
},
|
|
122
|
-
],
|
|
123
|
-
showHistogram: true,
|
|
124
|
-
histogramKey: 'histogram',
|
|
125
|
-
histogramColor: '#6f6f6f',
|
|
126
|
-
showOnGoing: true,
|
|
127
|
-
onGoingColor: 'var(--color-area)',
|
|
128
|
-
onGoingLabel: 'OnGoing',
|
|
129
|
-
onGoingIndex: 'last',
|
|
130
|
-
bubble: {
|
|
131
|
-
visible: true,
|
|
132
|
-
values: [],
|
|
133
|
-
color: '#0b66ff',
|
|
134
|
-
size: 6,
|
|
135
|
-
outsideStyle: { size: 4, fillColor: 'rgba(11,102,255,0)', strokeColor: 'rgba(255,255,255,0)' },
|
|
136
|
-
hideOutside: false,
|
|
137
|
-
},
|
|
138
|
-
displayCondition: null,
|
|
139
|
-
responsive: true,
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
const MixedChart: React.FC<Props> = ({
|
|
143
|
-
data,
|
|
144
|
-
config = defaultConfig,
|
|
145
|
-
height = 350,
|
|
146
|
-
useOnGoing,
|
|
147
|
-
draggable = false,
|
|
148
|
-
tooltipEnabled = true,
|
|
149
|
-
}) => {
|
|
150
|
-
const [renderKey, setRenderKey] = useState(0);
|
|
151
|
-
const [loading, setLoading] = useState(false);
|
|
152
|
-
|
|
153
|
-
// Lorsque draggable passe de true → false, on force remount
|
|
154
|
-
useEffect(() => {
|
|
155
|
-
if (!draggable) {
|
|
156
|
-
setLoading(true);
|
|
157
|
-
const timeout = setTimeout(() => {
|
|
158
|
-
setRenderKey((k) => k + 1); // nouvelle key → remount Chart
|
|
159
|
-
setLoading(false);
|
|
160
|
-
}, 10); // très court délai pour permettre le placeholder
|
|
161
|
-
return () => clearTimeout(timeout);
|
|
162
|
-
}
|
|
163
|
-
}, [draggable]);
|
|
164
|
-
|
|
165
|
-
// merge defaults and provided config
|
|
166
|
-
const merged = { ...defaultConfig, ...config };
|
|
167
|
-
// minimal override: if caller provided useOnGoing boolean, it forces merged.showOnGoing
|
|
168
|
-
if (typeof useOnGoing === 'boolean') {
|
|
169
|
-
merged.showOnGoing = useOnGoing;
|
|
170
|
-
}
|
|
171
|
-
const cfg: BandChartConfig = merged;
|
|
172
|
-
|
|
173
|
-
if (cfg.displayCondition && !cfg.displayCondition(data)) {
|
|
174
|
-
return <div style={{ padding: 12 }}>Chart hidden by displayCondition</div>;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
const labels = data.labels || [];
|
|
178
|
-
const n = labels.length;
|
|
179
|
-
if (!n) return <div style={{ padding: 12 }}>Pas de labels fournis</div>;
|
|
180
|
-
|
|
181
|
-
// resolve onGoing index (last histogram element by default or explicit index)
|
|
182
|
-
let resolvedOnGoingIndex: number | null = null;
|
|
183
|
-
if (cfg.showOnGoing) {
|
|
184
|
-
if (cfg.onGoingIndex === 'last' || typeof cfg.onGoingIndex === 'undefined') {
|
|
185
|
-
const h = data[cfg.histogramKey ?? 'histogram'] as number[] | undefined;
|
|
186
|
-
if (h && h.length > 0) resolvedOnGoingIndex = Math.min(h.length - 1, n - 1);
|
|
187
|
-
} else if (typeof cfg.onGoingIndex === 'number') {
|
|
188
|
-
if (cfg.onGoingIndex >= 0 && cfg.onGoingIndex < n) resolvedOnGoingIndex = cfg.onGoingIndex;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
const series: ChartSeries = [];
|
|
193
|
-
const strokeWidths: number[] = [];
|
|
194
|
-
const strokeDashArray: number[] = [];
|
|
195
|
-
const colors: string[] = [];
|
|
196
|
-
const fillTypes: Array<'solid' | 'gradient'> = [];
|
|
197
|
-
const fillOpacities: number[] = [];
|
|
198
|
-
|
|
199
|
-
/* ---------------- 1) Lines (simple lines only) ---------------- */
|
|
200
|
-
if (cfg.lines) {
|
|
201
|
-
cfg.lines.forEach((ln) => {
|
|
202
|
-
if (!ln.visible) return;
|
|
203
|
-
const arr = data[ln.key] as unknown as number[] | undefined;
|
|
204
|
-
if (!arr) return;
|
|
205
|
-
|
|
206
|
-
// map to category x (labels)
|
|
207
|
-
const pts: LinePoint[] = [];
|
|
208
|
-
for (let i = 0; i < Math.min(arr.length, n); i++) pts.push({ x: labels[i], y: arr[i] });
|
|
209
|
-
|
|
210
|
-
series.push({ name: ln.id, type: 'line', data: pts });
|
|
211
|
-
strokeWidths.push(typeof ln.width === 'number' ? ln.width : 2);
|
|
212
|
-
strokeDashArray.push(typeof ln.dash === 'number' ? ln.dash : 0);
|
|
213
|
-
colors.push(ln.color ?? '#003366');
|
|
214
|
-
fillTypes.push('solid');
|
|
215
|
-
fillOpacities.push(1);
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/* ---------------- 2) OUTLIERS / BUBBLES ---------------- */
|
|
220
|
-
const lowerScatter: ScatterPoint[] = [];
|
|
221
|
-
const correctScatter: ScatterPoint[] = [];
|
|
222
|
-
const upperScatter: ScatterPoint[] = [];
|
|
223
|
-
const markersDiscreteTemp: {
|
|
224
|
-
seriesKey: 'lower' | 'correct' | 'upper';
|
|
225
|
-
dataPointIndex: number;
|
|
226
|
-
outside?: boolean;
|
|
227
|
-
}[] = [];
|
|
228
|
-
|
|
229
|
-
const bvals = cfg.bubble?.values ?? [];
|
|
230
|
-
const upperArr = data.upper as unknown as number[] | undefined;
|
|
231
|
-
const lowerArr = data.lower as unknown as number[] | undefined;
|
|
232
|
-
const mainArr = data.main as unknown as number[] | undefined;
|
|
233
|
-
|
|
234
|
-
const correctColor = cfg.bubble?.color ?? '#0b66ff';
|
|
235
|
-
const correctSize = cfg.bubble?.size ?? 6;
|
|
236
|
-
const outsideStyle = cfg.bubble?.outsideStyle ?? {
|
|
237
|
-
size: Math.max(3, Math.round(correctSize * 0.6)),
|
|
238
|
-
fillColor: 'rgba(11,102,255,0)',
|
|
239
|
-
strokeColor: 'rgba(255,255,255,0)',
|
|
240
|
-
};
|
|
241
|
-
const hideOutside = cfg.bubble?.hideOutside ?? false;
|
|
242
|
-
|
|
243
|
-
const lowerCfgColor =
|
|
244
|
-
(cfg.outliers && cfg.outliers.lower && cfg.outliers.lower.color) ?? '#28a745';
|
|
245
|
-
const upperCfgColor =
|
|
246
|
-
(cfg.outliers && cfg.outliers.upper && cfg.outliers.upper.color) ?? '#ff4d4f';
|
|
247
|
-
const lowerLabel =
|
|
248
|
-
(cfg.outliers && cfg.outliers.lower && cfg.outliers.lower.label) ?? 'Lower Outlier';
|
|
249
|
-
const upperLabel =
|
|
250
|
-
(cfg.outliers && cfg.outliers.upper && cfg.outliers.upper.label) ?? 'Upper Outlier';
|
|
251
|
-
|
|
252
|
-
for (let i = 0; i < n; i++) {
|
|
253
|
-
// exclude bubble at OnGoing index (no bubble should appear on the reserved OnGoing histogram point)
|
|
254
|
-
if (resolvedOnGoingIndex !== null && i === resolvedOnGoingIndex) {
|
|
255
|
-
lowerScatter.push({ x: labels[i], y: null });
|
|
256
|
-
correctScatter.push({ x: labels[i], y: null });
|
|
257
|
-
upperScatter.push({ x: labels[i], y: null });
|
|
258
|
-
continue;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
const b = bvals[i];
|
|
262
|
-
if (typeof b === 'undefined' || b === null) {
|
|
263
|
-
lowerScatter.push({ x: labels[i], y: null });
|
|
264
|
-
correctScatter.push({ x: labels[i], y: null });
|
|
265
|
-
upperScatter.push({ x: labels[i], y: null });
|
|
266
|
-
continue;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
// detect outside relative to lower/upper (for hideOutside/outsideStyle)
|
|
270
|
-
let isOutside = false;
|
|
271
|
-
if (
|
|
272
|
-
Array.isArray(upperArr) &&
|
|
273
|
-
Array.isArray(lowerArr) &&
|
|
274
|
-
typeof upperArr[i] === 'number' &&
|
|
275
|
-
typeof lowerArr[i] === 'number'
|
|
276
|
-
) {
|
|
277
|
-
const up = upperArr[i];
|
|
278
|
-
const lo = lowerArr[i];
|
|
279
|
-
if (b > up || b < lo) isOutside = true;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
if (isOutside && hideOutside) {
|
|
283
|
-
lowerScatter.push({ x: labels[i], y: null });
|
|
284
|
-
correctScatter.push({ x: labels[i], y: null });
|
|
285
|
-
upperScatter.push({ x: labels[i], y: null });
|
|
286
|
-
continue;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
// classification w.r.t main (Lower: lower <= b < main ; Upper: main < b <= upper ; Correct: b === main)
|
|
290
|
-
let classification: 'lower' | 'upper' | 'correct' = 'correct';
|
|
291
|
-
let outsideFlag = false;
|
|
292
|
-
if (Array.isArray(mainArr) && typeof mainArr[i] === 'number') {
|
|
293
|
-
const m = mainArr[i];
|
|
294
|
-
if (
|
|
295
|
-
Array.isArray(upperArr) &&
|
|
296
|
-
Array.isArray(lowerArr) &&
|
|
297
|
-
typeof upperArr[i] === 'number' &&
|
|
298
|
-
typeof lowerArr[i] === 'number'
|
|
299
|
-
) {
|
|
300
|
-
const up = upperArr[i],
|
|
301
|
-
lo = lowerArr[i];
|
|
302
|
-
if (b > m && b <= up) classification = 'upper';
|
|
303
|
-
else if (b < m && b >= lo) classification = 'lower';
|
|
304
|
-
else if (b === m) classification = 'correct';
|
|
305
|
-
else {
|
|
306
|
-
outsideFlag = true;
|
|
307
|
-
classification = b > up ? 'upper' : 'lower';
|
|
308
|
-
}
|
|
309
|
-
} else {
|
|
310
|
-
if (b > m) classification = 'upper';
|
|
311
|
-
else if (b < m) classification = 'lower';
|
|
312
|
-
else classification = 'correct';
|
|
313
|
-
}
|
|
314
|
-
} else classification = 'correct';
|
|
315
|
-
|
|
316
|
-
// IMPORTANT: we add `_outside` flag on point objects so tooltip can hide them if needed
|
|
317
|
-
if (classification === 'lower') {
|
|
318
|
-
lowerScatter.push({ x: labels[i], y: b, _outside: outsideFlag });
|
|
319
|
-
correctScatter.push({ x: labels[i], y: null });
|
|
320
|
-
upperScatter.push({ x: labels[i], y: null });
|
|
321
|
-
markersDiscreteTemp.push({ seriesKey: 'lower', dataPointIndex: i, outside: outsideFlag });
|
|
322
|
-
} else if (classification === 'upper') {
|
|
323
|
-
upperScatter.push({ x: labels[i], y: b, _outside: outsideFlag });
|
|
324
|
-
lowerScatter.push({ x: labels[i], y: null });
|
|
325
|
-
correctScatter.push({ x: labels[i], y: null });
|
|
326
|
-
markersDiscreteTemp.push({ seriesKey: 'upper', dataPointIndex: i, outside: outsideFlag });
|
|
327
|
-
} else {
|
|
328
|
-
correctScatter.push({ x: labels[i], y: b, _outside: false });
|
|
329
|
-
lowerScatter.push({ x: labels[i], y: null });
|
|
330
|
-
upperScatter.push({ x: labels[i], y: null });
|
|
331
|
-
markersDiscreteTemp.push({ seriesKey: 'correct', dataPointIndex: i, outside: false });
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
// append scatter series in this order (affects legend ordering)
|
|
336
|
-
series.push({ name: lowerLabel, type: 'scatter', data: lowerScatter });
|
|
337
|
-
strokeWidths.push(0);
|
|
338
|
-
strokeDashArray.push(0);
|
|
339
|
-
colors.push(lowerCfgColor);
|
|
340
|
-
fillTypes.push('solid');
|
|
341
|
-
fillOpacities.push(1);
|
|
342
|
-
|
|
343
|
-
series.push({ name: 'Correct Predictions', type: 'scatter', data: correctScatter });
|
|
344
|
-
strokeWidths.push(0);
|
|
345
|
-
strokeDashArray.push(0);
|
|
346
|
-
colors.push(correctColor);
|
|
347
|
-
fillTypes.push('solid');
|
|
348
|
-
fillOpacities.push(1);
|
|
349
|
-
|
|
350
|
-
series.push({ name: upperLabel, type: 'scatter', data: upperScatter });
|
|
351
|
-
strokeWidths.push(0);
|
|
352
|
-
strokeDashArray.push(0);
|
|
353
|
-
colors.push(upperCfgColor);
|
|
354
|
-
fillTypes.push('solid');
|
|
355
|
-
fillOpacities.push(1);
|
|
356
|
-
|
|
357
|
-
// discrete markers (assign correct seriesIndex after pushing scatter series)
|
|
358
|
-
const lowerSeriesIndex = series.findIndex((s) => s.type === 'scatter' && s.name === lowerLabel);
|
|
359
|
-
const correctSeriesIndex = series.findIndex(
|
|
360
|
-
(s) => s.type === 'scatter' && s.name === 'Correct Predictions'
|
|
361
|
-
);
|
|
362
|
-
const upperSeriesIndex = series.findIndex((s) => s.type === 'scatter' && s.name === upperLabel);
|
|
363
|
-
|
|
364
|
-
const markersDiscrete: MarkerDiscrete[] = markersDiscreteTemp.map((m) => {
|
|
365
|
-
const seriesIndex =
|
|
366
|
-
m.seriesKey === 'lower'
|
|
367
|
-
? lowerSeriesIndex
|
|
368
|
-
: m.seriesKey === 'upper'
|
|
369
|
-
? upperSeriesIndex
|
|
370
|
-
: correctSeriesIndex;
|
|
371
|
-
if (m.outside) {
|
|
372
|
-
return {
|
|
373
|
-
seriesIndex,
|
|
374
|
-
dataPointIndex: m.dataPointIndex,
|
|
375
|
-
fillColor: outsideStyle.fillColor,
|
|
376
|
-
strokeColor: outsideStyle.strokeColor,
|
|
377
|
-
size: outsideStyle.size,
|
|
378
|
-
};
|
|
379
|
-
}
|
|
380
|
-
if (m.seriesKey === 'lower') {
|
|
381
|
-
return {
|
|
382
|
-
seriesIndex,
|
|
383
|
-
dataPointIndex: m.dataPointIndex,
|
|
384
|
-
fillColor:
|
|
385
|
-
(cfg.outliers &&
|
|
386
|
-
cfg.outliers.lower &&
|
|
387
|
-
cfg.outliers.lower.marker &&
|
|
388
|
-
cfg.outliers.lower.marker.fillColor) ??
|
|
389
|
-
lowerCfgColor,
|
|
390
|
-
strokeColor:
|
|
391
|
-
(cfg.outliers &&
|
|
392
|
-
cfg.outliers.lower &&
|
|
393
|
-
cfg.outliers.lower.marker &&
|
|
394
|
-
cfg.outliers.lower.marker.strokeColor) ??
|
|
395
|
-
'#ffffff',
|
|
396
|
-
size:
|
|
397
|
-
(cfg.outliers &&
|
|
398
|
-
cfg.outliers.lower &&
|
|
399
|
-
cfg.outliers.lower.marker &&
|
|
400
|
-
cfg.outliers.lower.marker.size) ??
|
|
401
|
-
correctSize,
|
|
402
|
-
};
|
|
403
|
-
}
|
|
404
|
-
if (m.seriesKey === 'upper') {
|
|
405
|
-
return {
|
|
406
|
-
seriesIndex,
|
|
407
|
-
dataPointIndex: m.dataPointIndex,
|
|
408
|
-
fillColor:
|
|
409
|
-
(cfg.outliers &&
|
|
410
|
-
cfg.outliers.upper &&
|
|
411
|
-
cfg.outliers.upper.marker &&
|
|
412
|
-
cfg.outliers.upper.marker.fillColor) ??
|
|
413
|
-
upperCfgColor,
|
|
414
|
-
strokeColor:
|
|
415
|
-
(cfg.outliers &&
|
|
416
|
-
cfg.outliers.upper &&
|
|
417
|
-
cfg.outliers.upper.marker &&
|
|
418
|
-
cfg.outliers.upper.marker.strokeColor) ??
|
|
419
|
-
'#ffffff',
|
|
420
|
-
size:
|
|
421
|
-
(cfg.outliers &&
|
|
422
|
-
cfg.outliers.upper &&
|
|
423
|
-
cfg.outliers.upper.marker &&
|
|
424
|
-
cfg.outliers.upper.marker.size) ??
|
|
425
|
-
correctSize,
|
|
426
|
-
};
|
|
427
|
-
}
|
|
428
|
-
return {
|
|
429
|
-
seriesIndex,
|
|
430
|
-
dataPointIndex: m.dataPointIndex,
|
|
431
|
-
fillColor: correctColor,
|
|
432
|
-
strokeColor: '#ffffff',
|
|
433
|
-
size: correctSize,
|
|
434
|
-
};
|
|
435
|
-
});
|
|
436
|
-
|
|
437
|
-
/* ---------------- 3) Histogram (columns) ---------------- */
|
|
438
|
-
if (cfg.showHistogram && cfg.histogramKey) {
|
|
439
|
-
const hArr = data[cfg.histogramKey ?? 'histogram'] as unknown as number[] | undefined;
|
|
440
|
-
if (hArr && Array.isArray(hArr) && hArr.length > 0) {
|
|
441
|
-
const len = Math.min(hArr.length, n);
|
|
442
|
-
const realPoints: ColumnPoint[] = [];
|
|
443
|
-
const onGoingPoints: ColumnPoint[] = [];
|
|
444
|
-
|
|
445
|
-
for (let i = 0; i < len; i++) {
|
|
446
|
-
const hVal = typeof hArr[i] === 'number' ? hArr[i] : null;
|
|
447
|
-
const realY = resolvedOnGoingIndex !== null && i === resolvedOnGoingIndex ? 0 : hVal;
|
|
448
|
-
const onGoingY = resolvedOnGoingIndex !== null && i === resolvedOnGoingIndex ? hVal : 0;
|
|
449
|
-
|
|
450
|
-
// keep x as label to ensure correct placement
|
|
451
|
-
realPoints.push({ x: labels[i], y: realY });
|
|
452
|
-
onGoingPoints.push({ x: labels[i], y: onGoingY });
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
// push Real (columns)
|
|
456
|
-
series.push({ name: 'Real', type: 'column', data: realPoints });
|
|
457
|
-
strokeWidths.push(0);
|
|
458
|
-
strokeDashArray.push(0);
|
|
459
|
-
colors.push(cfg.histogramColor ?? '#888888');
|
|
460
|
-
fillTypes.push('solid');
|
|
461
|
-
fillOpacities.push(0.4);
|
|
462
|
-
|
|
463
|
-
// push OnGoing series (visible separately in legend)
|
|
464
|
-
if (cfg.showOnGoing && resolvedOnGoingIndex !== null) {
|
|
465
|
-
series.push({ name: cfg.onGoingLabel ?? 'OnGoing', type: 'column', data: onGoingPoints });
|
|
466
|
-
strokeWidths.push(0);
|
|
467
|
-
strokeDashArray.push(0);
|
|
468
|
-
colors.push(cfg.onGoingColor ?? 'rgba(11,102,255,0.28)');
|
|
469
|
-
fillTypes.push('solid');
|
|
470
|
-
fillOpacities.push(0.65);
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
const stroke = {
|
|
476
|
-
curve: 'smooth' as const,
|
|
477
|
-
width: strokeWidths,
|
|
478
|
-
dashArray: strokeDashArray,
|
|
479
|
-
};
|
|
480
|
-
|
|
481
|
-
/* ---------------- Apex options (tooltip customisé pour ignorer null/undefined et garder Real/OnGoing séparés) ---------------- */
|
|
482
|
-
|
|
483
|
-
// local shape for series entries we read from w.config.series
|
|
484
|
-
type ApexSeriesLike = { name?: string; type?: string; data?: unknown[] };
|
|
485
|
-
|
|
486
|
-
// define a type for the tooltip args we use
|
|
487
|
-
type TooltipArgs = {
|
|
488
|
-
dataPointIndex: number;
|
|
489
|
-
w: {
|
|
490
|
-
config?: {
|
|
491
|
-
series?: ApexSeriesLike[];
|
|
492
|
-
colors?: string[];
|
|
493
|
-
};
|
|
494
|
-
globals?: {
|
|
495
|
-
colors?: string[];
|
|
496
|
-
};
|
|
497
|
-
};
|
|
498
|
-
};
|
|
499
|
-
|
|
500
|
-
const options: ApexOptions = {
|
|
501
|
-
chart: {
|
|
502
|
-
foreColor: 'var(--color-text)',
|
|
503
|
-
type: 'line',
|
|
504
|
-
toolbar: {
|
|
505
|
-
show: false,
|
|
506
|
-
offsetY: -20,
|
|
507
|
-
autoSelected: 'pan',
|
|
508
|
-
tools: {
|
|
509
|
-
download: false,
|
|
510
|
-
selection: true,
|
|
511
|
-
zoom: true,
|
|
512
|
-
zoomin: true,
|
|
513
|
-
zoomout: true,
|
|
514
|
-
pan: true,
|
|
515
|
-
reset: true,
|
|
516
|
-
},
|
|
517
|
-
},
|
|
518
|
-
width: '100%',
|
|
519
|
-
zoom: {
|
|
520
|
-
enabled: tooltipEnabled,
|
|
521
|
-
type: 'x',
|
|
522
|
-
autoScaleYaxis: true,
|
|
523
|
-
},
|
|
524
|
-
animations: {
|
|
525
|
-
enabled: true,
|
|
526
|
-
animateGradually: { enabled: true, delay: 80 },
|
|
527
|
-
dynamicAnimation: { enabled: false },
|
|
528
|
-
},
|
|
529
|
-
// keep stacked true to allow stacked columns behaviour
|
|
530
|
-
stacked: true,
|
|
531
|
-
},
|
|
532
|
-
plotOptions: {
|
|
533
|
-
bar: {
|
|
534
|
-
columnWidth: '50%',
|
|
535
|
-
},
|
|
536
|
-
},
|
|
537
|
-
stroke,
|
|
538
|
-
colors,
|
|
539
|
-
fill: {
|
|
540
|
-
type: fillTypes,
|
|
541
|
-
opacity: fillOpacities,
|
|
542
|
-
gradient: {
|
|
543
|
-
type: 'vertical',
|
|
544
|
-
gradientToColors: undefined,
|
|
545
|
-
shadeIntensity: 1,
|
|
546
|
-
inverseColors: false,
|
|
547
|
-
opacityFrom: Math.max(...(fillOpacities.length ? fillOpacities : [0.4])),
|
|
548
|
-
opacityTo: Math.min(...(fillOpacities.length ? fillOpacities : [0.4])),
|
|
549
|
-
stops: [0, 100],
|
|
550
|
-
},
|
|
551
|
-
},
|
|
552
|
-
|
|
553
|
-
// markers & discrete
|
|
554
|
-
markers: {
|
|
555
|
-
shape: 'circle',
|
|
556
|
-
size: 0,
|
|
557
|
-
hover: { sizeOffset: 6 },
|
|
558
|
-
discrete: markersDiscrete as unknown as NonNullable<
|
|
559
|
-
NonNullable<ApexOptions['markers']>['discrete']
|
|
560
|
-
>,
|
|
561
|
-
},
|
|
562
|
-
|
|
563
|
-
// CUSTOM TOOLTIP: show only defined values, keep Real and OnGoing separate,
|
|
564
|
-
// skip outlier points flagged _outside, skip column placeholder zeros
|
|
565
|
-
tooltip: {
|
|
566
|
-
enabled: tooltipEnabled,
|
|
567
|
-
shared: true,
|
|
568
|
-
intersect: false,
|
|
569
|
-
followCursor: true,
|
|
570
|
-
custom: (args: TooltipArgs) => {
|
|
571
|
-
const { dataPointIndex, w } = args;
|
|
572
|
-
const cfgSeries = w.config?.series ?? [];
|
|
573
|
-
const rows: { name: string; color: string; value: number }[] = [];
|
|
574
|
-
|
|
575
|
-
for (let i = 0; i < cfgSeries.length; i++) {
|
|
576
|
-
const sObj = cfgSeries[i] as ApexSeriesLike | undefined;
|
|
577
|
-
const sData = Array.isArray(sObj?.data) ? sObj.data : [];
|
|
578
|
-
const point = sData[dataPointIndex] as unknown;
|
|
579
|
-
|
|
580
|
-
let yVal: number | undefined = undefined;
|
|
581
|
-
let pointOutside = false;
|
|
582
|
-
|
|
583
|
-
// handle null/undefined
|
|
584
|
-
if (point === null || typeof point === 'undefined') {
|
|
585
|
-
yVal = undefined;
|
|
586
|
-
} else if (typeof point === 'object' && point !== null && 'y' in point) {
|
|
587
|
-
// point is object with y (ColumnPoint / LinePoint / ScatterPoint)
|
|
588
|
-
const p = point as { y?: unknown; _outside?: unknown };
|
|
589
|
-
const pY = p.y;
|
|
590
|
-
if (typeof pY === 'number') yVal = pY;
|
|
591
|
-
else if (typeof pY === 'string' && pY.trim() !== '') {
|
|
592
|
-
const cast = Number(pY);
|
|
593
|
-
if (!Number.isNaN(cast)) yVal = cast;
|
|
594
|
-
}
|
|
595
|
-
pointOutside = Boolean(p._outside);
|
|
596
|
-
} else if (typeof point === 'number' || typeof point === 'string') {
|
|
597
|
-
const cast = Number(point as number | string);
|
|
598
|
-
if (!Number.isNaN(cast)) yVal = cast;
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
if (typeof yVal === 'undefined' || yVal === null) continue;
|
|
602
|
-
|
|
603
|
-
const name = sObj?.name ? String(sObj.name) : `Series ${i + 1}`;
|
|
604
|
-
// skip outlier points that are flagged _outside
|
|
605
|
-
if ((name === lowerLabel || name === upperLabel) && pointOutside) continue;
|
|
606
|
-
|
|
607
|
-
// For column series: skip placeholder 0 so we don't show OnGoing:0 or Real:0
|
|
608
|
-
const isColumn = sObj?.type === 'column';
|
|
609
|
-
if (isColumn && Number(yVal) === 0) continue;
|
|
610
|
-
|
|
611
|
-
const color =
|
|
612
|
-
(w.config?.colors && w.config.colors[i]) ??
|
|
613
|
-
(w.globals?.colors && w.globals.colors[i]) ??
|
|
614
|
-
'#333';
|
|
615
|
-
rows.push({ name, color, value: Number(yVal) });
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
// build HTML with header showing the category label (e.g., "06h")
|
|
619
|
-
let rowsHtml = '';
|
|
620
|
-
for (const r of rows) {
|
|
621
|
-
rowsHtml += `
|
|
622
|
-
<div style="display:flex;align-items:center;justify-content:space-between;padding:6px 10px;border-bottom:1px solid rgba(0,0,0,0.03)">
|
|
623
|
-
<div style="display:flex;align-items:center;gap:8px;min-width:120px">
|
|
624
|
-
<span style="width:10px;height:10px;border-radius:50%;background:${r.color};display:inline-block;"></span>
|
|
625
|
-
<div style="font-size:13px;color:var(--color-text)">${r.name}</div>
|
|
626
|
-
</div>
|
|
627
|
-
<div style="font-weight:600;color:var(--color-text)">${r.value}</div>
|
|
628
|
-
</div>
|
|
629
|
-
`;
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
return `
|
|
633
|
-
<div style="min-width:200px;background:var(--color-content-background);border-radius:6px;box-shadow:0 6px 24px rgba(0,0,0,0.12);overflow:hidden;">
|
|
634
|
-
${rowsHtml}
|
|
635
|
-
</div>
|
|
636
|
-
`;
|
|
637
|
-
},
|
|
638
|
-
},
|
|
639
|
-
|
|
640
|
-
xaxis: {
|
|
641
|
-
type: 'category',
|
|
642
|
-
categories: labels,
|
|
643
|
-
tickPlacement: 'on',
|
|
644
|
-
tickAmount: Math.min(12, labels.length),
|
|
645
|
-
},
|
|
646
|
-
yaxis: { min: 0, tickAmount: 6 },
|
|
647
|
-
dataLabels: { enabled: false },
|
|
648
|
-
legend: { show: true, position: 'top' },
|
|
649
|
-
grid: { borderColor: 'var(--color-border)' },
|
|
650
|
-
|
|
651
|
-
responsive: cfg.responsive ? [] : undefined,
|
|
652
|
-
};
|
|
653
|
-
|
|
654
|
-
return (
|
|
655
|
-
<div style={{ position: 'relative', width: '100%', height }}>
|
|
656
|
-
{draggable && !loading ? (
|
|
657
|
-
<div
|
|
658
|
-
style={{
|
|
659
|
-
width: '100%',
|
|
660
|
-
height: '100%',
|
|
661
|
-
display: 'flex',
|
|
662
|
-
alignItems: 'center',
|
|
663
|
-
justifyContent: 'center',
|
|
664
|
-
}}
|
|
665
|
-
>
|
|
666
|
-
<Move size={48} strokeWidth={1.5} style={{ opacity: 0.8 }} />
|
|
667
|
-
</div>
|
|
668
|
-
) : (
|
|
669
|
-
<Chart
|
|
670
|
-
key={renderKey} // force remount si besoin
|
|
671
|
-
options={options}
|
|
672
|
-
series={series as unknown as ApexOptions['series']}
|
|
673
|
-
type='line'
|
|
674
|
-
height={height}
|
|
675
|
-
/>
|
|
676
|
-
)}
|
|
677
|
-
</div>
|
|
678
|
-
);
|
|
679
|
-
};
|
|
680
|
-
|
|
681
|
-
export default MixedChart;
|