Skip to content

Commit 819522c

Browse files
jalezistefanb
andauthored
Feat/zbornica (#546)
* fix(deploy): update import paths in DataByYearAndAgeGroupCard and utils for consistency * fix(analytics): update import paths for consistency and correct import syntax in various components * refactor(analytics): 🔥 remove examples section from page * fix(analytics): update default 'as' prop from 'article' to 'div' and add optional 'padding' prop type * fix(analytics): add HighchartsReactProps type definition to types.js * feat(analytics): refactor MotionCardHighMap to use HighchartsReactComponent and update Card prop type * fix(analytics): update import paths to use consistent casing for 'Data' directory * fix(analytics): update import paths to use consistent lower-case for 'Data' directory * fix(analytics): update import paths to remove 'data-lower-case' references * fix(analytics): ⚡️ geojson too big use geojson from covid-sledilnik * refactor(analytics): update data handling to use byAgeGroupAndYearMap and byAgeGroupAndMunicipalityMap * fix(analytics): 🚚 wrong file extension .js -> .jsx * fix(analytics): restore export for sloUEMap geojson file * refactor(analytics): update prop types documentation and adjust fakeHeight values for various components I am not sure about fakeHeight * refactor(analytics): remove hardcoded height and boost options from map configuration * refactor(analytics): enhance MotionCardHighMap with improved state management and styling * feat(eslint): add rule for label elements to ensure accessibility compliance * feat(MotionCardHighMap): add accessible label for range input and improve styling * refactor(analytics): improve tooltip styling and set chart background to transparent * refactor(analytics): update order values for availability change sections * refactor(analytics): add desktop sidebar needs cleanup; at least inline styles * refactor(Sidebar): update color and border styles for improved theming * refactor(Scorecard): add transparent border variable and apply to card styles * refactor(Analytics): add PageContent class for consistent layout spacing * refactor(Analytics): separate styles into Analytics.module.css and update layout references * refactor(Analytics): update fakeHeight values and add TODO for height adjustments * refactor(Analytics): replace inline styles with FiltersWrapper class for improved layout consistency Just temporary. * fix(DataByYearAndAgeGroupCard): remove unnecessary inline styles * refactor(Analytics): remove inline styles from figure elements and utilize CSS for layout * refactor(Sidebar): extract sidebar group rendering into a separate function and add active link styling * refactor(create-chart-data-proxy): replace manual slug generation with slugify for improved readability * refactor(DashboardCard): reorganize imports and apply FiltersWrapper class for improved styling * refactor(Sidebar): enhance responsiveness with media queries and clean up modal handling * refactor(HighchartsOptions): add font family style to chart for consistency * fix(RichInfoClick): wrong data * refactor(Analytics): remove fakeHeight hack and improve layout handling for charts * feat(InsuredByDefinitionAndByAgeGroup): add new card for insured data by age group with filtering options * refactor(InsuredByDefinitionAndByAgeGroup): create custom hook to manage charts options * refactor(ChartOptions): update color styles for selected states and series data * refactor(InsuredByDefinitionAndByAgeGroup): pass id prop to component and update section title * refactor(InsuredByDefinitionAndByAgeGroup): move inline styles to css module * feat(InsuredByDefinitionAndByAgeGroup): enhance layout with grid system and add separator component * refactor(FilterForm): replace inline labels with a reusable Label component and move styles to CSS module * feat(FilterForm): implement CustomReactSelect component and refactor form layout with reusable Label component * refactor(Analytics): update section names to 'examples' and enhance layout with CSS adjustments * fix(MotionCard): replace fragment shorthand with Fragment component for better key handling * fix(Analytics): add key prop to chart container for improved rendering * feat(Analytics): add PivotkeD component for enhanced data visualization * feat(Analytics): add TaskA component and update related files for enhanced data analysis * refactor(Analytics): update terminology and schemas for improved clarity and consistency * feat(Analytics): enhance chart tooltip formatting for improved data visualization * feat(Analytics): filter out 'examples' section in production environment for cleaner data display * feat(Analytics): add translations and restructure Task components for improved accessibility and organization * feat(Analytics): add Slovenian translations and update chart titles for TaskA component * feat(Analytics): restructure translations for TaskA and common elements for improved clarity * feat(Analytics): update color scheme for TaskA chart options to enhance visual distinction * feat(Analytics): update background colors in charts and components for improved visual consistency * feat(Analytics): extract useCharts hook for better code organization and reusability * feat(Analytics): update municipality selection to support multiple selections and enhance localization * feat(Analytics): refactor data preparation and chart options handling for improved performance and clarity * feat(Analytics): refactor line chart data transformation and update parameter structure for improved clarity * feat(Analytics): refactor chart data handling and introduce utility functions for improved data transformation and organization * feat(Analytics): add yearly statistics calculation for insured people and update scorecards display * feat(Analytics): add city municipalities button with toggle functionality and update localization * feat(Analytics): enhance chart data display with formatted insured counts and introduce age group constants * feat(Analytics): enhance tooltip display for second chart with structured table format for insured counts * feat(Analytics): simplify button state management and ensure correct state assignment for city municipalities * feat(Analytics): update type imports for TaskA and enhance ref usage for map and button elements * feat(Analytics): refactor chart hooks to improve state management and simplify parameters * feat(Analytics): optimize useEffect dependencies for TaskA component * feat(Analytics): add tooltips for line and map charts with structured data display * feat(Analytics): add color customization options for map chart and update state management * feat(Analytics): update tooltip background color for improved visibility * feat(Analytics): update chart titles for improved clarity and consistency * feat(Analytics): add contract types and update data labels in localization files * feat(Analytics): enhance card structure and localization for improved clarity and functionality * feat(Analytics): add insuredPeopleCountWithoutIOZ to localization and update calculations previously we were shown wrong data. second scorecard should current not previous year. now is correct. the only change is which data is shown for current year * feat(Analytics): add group and groupHeading styles for CustomReactSelect component * feat(Analytics): update localization for doctor types and enhance data grouping in FilterForm * feat(Analytics): update localization for iozRatio and insuredPeopleCount, and add insuredPeopleCountWithoutIOZ calculations * refactor(LineChartComponents): remove console log for options in LineChartTooltip * feat(Analytics): migrate data imports from CSV to JSON and refactor data parsing logic * feat(Analytics): enhance xAxis configuration by dynamically setting tick positions and formatting labels to display only the year * refactor(Analytics): rename nekiOptions to initialChartOptions for clarity in chart configuration * feat(Analytics): create initialChartOptions for line chart configuration and refactor index.jsx to import from chart-options * refactor(Analytics): move data import and parsing logic to parsed-files.js for better organization * feat(Analytics): add FilterForm component for data selection and integrate it into TaskD * feat(Analytics): add yAxis configuration for Task D with titles for capitation, volume, and average * feat(Analytics): update initialChartOptions with background color for chart and tooltip * feat(Analytics): enhance Task D localization and chart configuration with new titles and label formats * feat(Analytics): add betterAccessibility age group constants for improved data representation * feat(Analytics): enhance Task A with all cities button and municipality checkbox functionality * feat(Analytics): add "clear selection" and "all municipalities" buttons with localization support * feat(Analytics): disable button pointer events based on city selection state * feat(Analytics): update iozRatio labels for clarity and adjust MapChartTooltip to reflect changes * feat(Analytics): enhance CustomValueContainer with dynamic className and update styles for clear all functionality * feat(Analytics): update clear all button styles and class name for improved layout * feat(Analytics): enhance CustomValueContainer and styles for improved clear all functionality * feat(Analytics): update CustomValueContainer to conditionally render based on menu state * feat(Analytics): enhance CustomValueContainer with dynamic className and adjust styles for clear indicator * feat(Analytics): update CustomValueContainer to display value count in the clear all indicator * feat(Analytics): refactor color definitions in chart options for consistency and maintainability * feat(Analytics): add TaskSpecial component with filter form and chart integration with dummy data * feat(Analytics): implement TaskSpecial data processing and chart series preparation * fix(Analytics): convert data.keys() to array for proper iteration in transformToChartSeries breaks on iPhone Safari, Chrome * fix(Analytics): iPhone Safari does not know about oklch TODO: fix everywhere * refactor(Analytics): replace oklch color definitions with rgb for improved compatibility * refactor(Analytics): remove unused components and styles for cleaner codebase * refactor(Analytics): rename PivotkeD to TaskD for consistency and clarity * refactor(Analytics): remove example chart data to streamline codebase * refactor(Analytics): remove unused SeriesButtons styles for cleaner codebase * refactor(Analytics): update import paths for createCardDataProxy to improve code organization * refactor(Analytics): remove ChartHeader component and associated styles for cleaner codebase * refactor(Analytics): remove CustomSeriesButtons and SeriesButton components for cleaner codebase * refactor(Analytics): remove HighchartsReactComponent for cleaner codebase * refactor(Analytics): rename CustomReactSelect to Select for improved clarity * refactor(Analytics): rename CustomPopover to Popover for improved clarity * refactor(Analytics): simplify Close button text in Modal component for improved clarity * refactor(Analytics): add localization for Close button in Modal component * refactor(Analytics): add touch device notification with localization support * refactor(Analytics): move TaskA and TaskSpecial components to a new directory structure * refactor(Analytics): remove unused TaskC components and related files * refactor(Analytics): move TaskSpecial components to a new directory structure * refactor(Analytics): remove TaskSpecial components and related files * refactor(Analytics): update import paths for FilterForm and MapAndChart styles * refactor(Analytics): remove IconButton styles and related CSS file * refactor(Analytics): update import paths for layout styles to new directory structure * refactor(locales): remove taskC entries from English and Slovenian locale files * refactor(locales, Analytics): update map settings labels and translations in English and Slovenian locales * refactor(Analytics): remove unused import statement from sections.js * refactor(Analytics, locales): add section titles for analytics in English and Slovenian locales * refactor(Analytics): adjust margin for chart section styling * refactor(Analytics): remove debug console log from sections.js * refactor(Analytics, locales): add sidebar title for charts in English and Slovenian locales * refactor(Analytics, locales): update task titles and chart configurations for English and Slovenian locales * refactor(Analytics): freeze seriesToShow array for immutability * refactor(Analytics): centralize chart background and tooltip colors in constants * refactor(Analytics): implement responsive layout for charts using CSS Grid * fixup c1999d * refactor(Analytics): add plotOptions for series marker radius in chart options * fix(locales): update Slovenian translation for insuredPeopleCount * refactor(Analytics): remove unused plotLines configuration from chart options Vertical red line "opis" was just for example * refactor(Analytics): add global highcharts credits config * feat(locales): add footer translations for doctors in English and Slovenian * fix(locales): update English titles for taskB and taskD in translations * style(Analytics): apply text-wrap balance to Sidebar and card components * refactor(Analytics): move RenderOnViewportEntry to Analytics * fix(Analytics): update fakeHeight value for TaskSpecial component * feat(Analytics): implement new card layout and styles for Task components * refactor(Analytics): remove unused Chart and MapAndChart CSS modules * style(Analytics): use CSS variables for filters background and box shadow in CardWrapper * feat(Analytics): enable props spreading in Task components and improve RenderOnViewportEntry styling * fix(Analytics): change CardTitle element to a div for improved semantics in TaskA component * fix(Analytics): change Sidebar section titles from h3 and h2 to div for improved semantics * fix(Analytics): change mapSettings title from h3 to div for improved semantics in TaskA component * fix(Analytics): update titles and subtitles in Task components for improved localization and accessibility * fix(Analytics): update Slovenian and English localization for gpGlavarinaMean and gpGlavarina titles in Task components * fix(Analytics): refactor filter state management and update year type to number in Task components * feat(Analytics): add public and private series to TaskD and enhance chart options management * feat(Analytics): implement useChart hook for dynamic chart options management in TaskD * feat(Analytics): implement useChart hook for managing chart options and enhance accessibility features in TaskSpecial * feat(Analytics): restructure chart options and localization for TaskD and TaskSpecial components * feat(Analytics): enhance LineChartTooltip with series indicators for improved visualization * feat(Analytics): add utility functions for exporting chart data to CSV and JSON formats * feat(Analytics): add CSV and JSON export functionality to TaskSpecial component * feat(Analytics): add CSV and JSON export buttons to TaskD component * feat(Analytics): add CSV and JSON download functionality to TaskA component * feat(Analytics): add CSV and JSON export buttons to TaskD and TaskSpecial components * feat(Popover): improve positioning and styling for better visibility and responsiveness * feat(Analytics): replace button downloads with Popover for CSV and JSON options in TaskA, TaskD, and TaskSpecial components * feat(Analytics): add CSV and JSON download options for map data in TaskA component * feat(Analytics): enhance Popover trigger styling and add hover effects for better user experience * feat(Analytics): add dropdown menu component with styling and structure for enhanced user interaction * feat(Analytics): replace Popover with DropdownMenu for export options in TaskA, TaskD, and TaskSpecial components * feat(Analytics): add export menu and localization for TaskA, TaskD, and TaskSpecial components * refactor(analytics): 🔥 remove desktop sidebar and bring back white Card background * refactor(Analytics): remove unused settings section and color management from TaskA component * style(Analytics): set IconButton background color to inherit for consistency * style(Analytics): increase font size of SectionTitle for improved readability * feat(Analytics): add TaskATrend component for enhanced data visualization * refactor(Analytics): simplify TaskA component by removing unused code and adjusting layout * refactor(Analytics): update layout of TaskA component by changing grid styles for improved chart display * refactor(Analytics): remove unused CardTitle elements from TaskATrend component * refactor(Analytics): update TaskATrend component to improve translation handling and remove unused code * refactor(Analytics): simplify TaskATrend component by removing unused municipalities data and optimizing chart series calculation * refactor(Analytics): update title translation key for TaskATrend component * refactor(Analytics): integrate Scorecard component into TaskA and remove it from TaskATrend * refactor(Analytics): update chart options and fake height values for TaskA and TaskATrend components * feat(Analytics): add FilterForm component for TaskATrend with custom value container * refactor(Analytics): create constants file for TaskATrend and simplify data handling in index component * fix(Analytics): correct import path for Types in chart-options.js * refactor(Analytics): filter out 'betterAccessibility' from doctorTypes in TaskA and TaskATrend components * feat(Analytics): add overview year sets for different doctor types in overview-data-util.js * feat(Analytics): enhance useChart hook to support notVisibleSeries for better chart visibility control * feat(Analytics): update TaskSpecial chart options to include new yAxis titles and support for iozRatio series * feat(Analytics): add formatting functions for tooltips and value display in TaskSpecial chart options * feat(Analytics): add fullscreen and print options to TaskSpecial chart dropdown menu * feat(Analytics): add fullscreen support check for TaskSpecial chart * feat(Analytics): implement ChartActions component for enhanced chart options including fullscreen and print functionality * feat(Analytics): enable legend visibility after print and fullscreen close events * feat(Analytics): add isSelectedText localization and enhance FilterForm layout * fix(Analytics): correct typo in chartTranslations variable name in useChart hook * feat(Analytics): add accessibility support and refactor chart options handling in TaskATrend * feat(Analytics): migrate chart options from TaskA to TaskATrend and update chart configuration * feat(Analytics): add LineChartTooltip and LineChartYAxisTitle components, update imports, and create Tooltip.module.css * refactor(Analytics): remove CSV and JSON download handlers from TaskATrend and update ChartActions to use props * refactor(Analytics): update chart series identification and streamline chart options handling in TaskATrend * refactor(Analytics): rename prepareDetailLineChartSeries to prepareTaskSpecialSeries for clarity in TaskSpecial data processing * refactor(Analytics): make CSV and JSON download handlers optional in ChartActions propTypes * refactor(Analytics): implement useChart hook for map chart options and translations in TaskA * refactor(Analytics): rename useMapChart to useSelectedPoints for improved clarity in TaskA hooks * feat(Analytics): add CityButtons and MapChart components for enhanced city filtering and map visualization in TaskA * style(Analytics): update button styles for improved aesthetics and hover effects in TaskA * feat(Analytics): add municipality filtering and selection to TaskATrend analysis * feat(Analytics): enhance tooltip styling and formatting for improved readability in charts * feat(Analytics): enhance tooltip formatting and add crosshair option for improved data visualization in TaskD and TaskSpecial * feat(Analytics): enhance tooltip value formatting and add valueType for improved data representation in TaskSpecial * feat(Analytics): integrate zustand for state management and refactor filter state handling in TaskA and TaskATrend * feat(Analytics): enhance tooltip series indicator with custom symbols for better visualization in TaskATrend * feat(Analytics): refactor setFilterState calls for municipalities in CityButtons component * feat(Analytics): refactor CityButtons component to use useCallback for button state management * feat(Analytics): enhance TaskSpecial chart with subtitles and improved color scheme * feat(Analytics): update Slovenian localization and enhance TaskATrend with subtitles and tooltips * feat(Analytics): enhance TaskD with subtitles, improved chart marker size, and additional popup information * feat(Analytics): replace subtitle with CardDescription in TaskATrend component * feat(Analytics): update Task components to use CardTitle for subtitles and enhance card styling * feat(Analytics): enhance TaskA with improved chart titles, subtitles, and additional popup information * feat(Analytics): update accessibility settings for chart titles and subtitles * feat(Analytics): update chart title format in Slovenian locale for better clarity * feat(Analytics): enhance TaskD series preparation with color mapping and update chart colors * feat(Analytics): add percentage formatting for IOZ ratio and enhance tooltip data display * feat(Analytics): add link component and enhance popup descriptions across TaskA, TaskATrend, TaskD, and TaskSpecial * feat(Analytics): add accessibility information for primary healthcare in Slovenia * feat(Analytics): update English and Slovenian localization for primary healthcare accessibility and enhance chart legend titles * feat(Analytics): add team member details to the Slovenian about page * feat(Analytics): update Slovenian legend title for task A trend chart * feat(Analytics): update Slovenian about page and improve localization for task D subtitle * feat(Analytics): enhance chart color scheme and add data classes for improved visualization * translations: minimised diff with master branch * Basic en translations * typo * Fixed facebook link * fix(analytics): 💄 change chart font size on smaller devices * style(tooltip): enhance tooltip styling for better readability on smaller screens * refactor(analytics): 🔥 remove duplicate getIsRequestFullscreenSupported func * refactor(types): update section name types for clarity and consistency * refactor(chart): enhance yAxis label formatting and integrate language support * refactor(analytics): migrate labelsFormatter to utils and update yAxis label formatting --------- Co-authored-by: Štefan Baebler <[email protected]> Co-authored-by: Štefan Baebler <[email protected]>
1 parent a7965b7 commit 819522c

File tree

117 files changed

+617021
-132
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+617021
-132
lines changed

.eslintrc.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,15 @@ module.exports = {
2323
'import/prefer-default-export': 'off',
2424
'react/react-in-jsx-scope': 'off',
2525
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
26-
26+
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
2727
// @TODO: These should be turned "ON" one by one
2828
'react/jsx-props-no-spreading': 'warn',
29+
'jsx-a11y/label-has-associated-control': [
30+
2,
31+
{
32+
labelAttributes: ['label'],
33+
},
34+
],
2935
},
3036
settings: {
3137
'import/resolver': {

package.json

+20-4
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,27 @@
55
"dependencies": {
66
"@emotion/react": "^11.13.3",
77
"@emotion/styled": "^11.13.0",
8-
"@mui/icons-material": "^5.16.7",
9-
"@mui/material": "^5.16.7",
10-
"@mui/system": "^5.16.7",
8+
"@mui/icons-material": "^6.1.7",
9+
"@mui/material": "^6.1.7",
10+
"@mui/system": "^6.1.7",
11+
"@radix-ui/react-dropdown-menu": "^2.1.4",
12+
"@tanstack/react-table": "^8.20.5",
1113
"@testing-library/jest-dom": "^6.5.0",
1214
"@testing-library/react": "^15.0.5",
1315
"@testing-library/user-event": "^14.5.2",
16+
"class-variance-authority": "^0.7.0",
17+
"highcharts": "^11.4.8",
18+
"highcharts-react-official": "^3.2.1",
1419
"i18next": "^23.14.0",
1520
"i18next-browser-languagedetector": "^8.0.0",
1621
"i18next-http-backend": "^2.6.1",
1722
"json2mq": "^0.2.0",
1823
"leaflet": "^1.8.0",
1924
"leaflet.markercluster": "^1.5.3",
25+
"lodash": "^4.17.21",
26+
"lucide-react": "^0.473.0",
2027
"markdown-to-jsx": "^7.5.0",
28+
"papaparse": "^5.4.1",
2129
"prop-types": "^15.8.1",
2230
"react": "^18.3.1",
2331
"react-dom": "^18.3.1",
@@ -30,10 +38,13 @@
3038
"react-router": "^6.22.2",
3139
"react-router-dom": "^6.26.1",
3240
"react-scripts": "^5.0.1",
41+
"react-select": "^5.8.3",
3342
"react-style-proptype": "^3.2.2",
3443
"slugify": "^1.6.6",
3544
"uuid": "^10.0.0",
36-
"web-vitals": "^4.2.3"
45+
"web-vitals": "^4.2.3",
46+
"zod": "^3.24.1",
47+
"zustand": "^5.0.3"
3748
},
3849
"scripts": {
3950
"start": "react-scripts start",
@@ -53,6 +64,7 @@
5364
],
5465
"devDependencies": {
5566
"@playwright/test": "^1.46.1",
67+
"@types/highcharts": "^7.0.0",
5668
"@types/node": "^22.5.0",
5769
"env-cmd": "^10.1.0",
5870
"eslint": "^8.57.0",
@@ -71,6 +83,10 @@
7183
"npm": "please-use-yarn",
7284
"yarn": ">=1.22.0"
7385
},
86+
"peerDependencies": {
87+
"react": "^17.0.0 || ^18.0.0",
88+
"react-dom": "^17.0.0 || ^18.0.0"
89+
},
7490
"jest": {
7591
"collectCoverageFrom": [
7692
"src/tests/unit/**/*.{js,jsx,ts,tsx}",

0 commit comments

Comments
 (0)