@pagamio/frontend-commons-lib 0.8.175 → 0.8.183
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/lib/api/client.d.ts +88 -0
- package/lib/api/client.js +339 -0
- package/lib/api/context.d.ts +112 -0
- package/lib/api/context.js +105 -0
- package/lib/api/index.d.ts +4 -0
- package/lib/api/index.js +4 -0
- package/lib/api/swr.d.ts +46 -0
- package/lib/api/swr.js +124 -0
- package/lib/api/types.d.ts +145 -0
- package/lib/api/types.js +10 -0
- package/lib/auth/authenticators/AuthenticatorFactory.d.ts +25 -0
- package/lib/auth/authenticators/AuthenticatorFactory.js +32 -0
- package/lib/auth/authenticators/index.d.ts +7 -0
- package/lib/auth/authenticators/index.js +7 -0
- package/lib/auth/authenticators/processors/DefaultAuthenticatorProcessor.d.ts +21 -0
- package/lib/auth/authenticators/processors/DefaultAuthenticatorProcessor.js +26 -0
- package/lib/auth/authenticators/processors/StrapiAuthenticatorProcessor.d.ts +74 -0
- package/lib/auth/authenticators/processors/StrapiAuthenticatorProcessor.js +99 -0
- package/lib/auth/authenticators/types.d.ts +26 -0
- package/lib/auth/authenticators/types.js +9 -0
- package/lib/auth/components/AppBanner.d.ts +7 -0
- package/lib/auth/components/AppBanner.js +9 -0
- package/lib/auth/components/AuthCard.d.ts +8 -0
- package/lib/auth/components/AuthCard.js +14 -0
- package/lib/auth/components/AuthFormUtils.d.ts +58 -0
- package/lib/auth/components/AuthFormUtils.js +52 -0
- package/lib/auth/components/AuthPageLayout.d.ts +45 -0
- package/lib/auth/components/AuthPageLayout.js +12 -0
- package/lib/auth/components/ChangePasswordPage.d.ts +12 -0
- package/lib/auth/components/ChangePasswordPage.js +59 -0
- package/lib/auth/components/CustomerRegistrationPage.d.ts +50 -0
- package/lib/auth/components/CustomerRegistrationPage.js +140 -0
- package/lib/auth/components/ForgotPasswordPage.d.ts +38 -0
- package/lib/auth/components/ForgotPasswordPage.js +76 -0
- package/lib/auth/components/LoginPage.d.ts +73 -0
- package/lib/auth/components/LoginPage.js +115 -0
- package/lib/auth/components/LogoutButton.d.ts +30 -0
- package/lib/auth/components/LogoutButton.js +47 -0
- package/lib/auth/components/ResetPasswordPage.d.ts +42 -0
- package/lib/auth/components/ResetPasswordPage.js +88 -0
- package/lib/auth/components/hooks/useChangeUserPassword.d.ts +26 -0
- package/lib/auth/components/hooks/useChangeUserPassword.js +63 -0
- package/lib/auth/components/index.d.ts +8 -0
- package/lib/auth/components/index.js +7 -0
- package/lib/auth/context/AuthContext.d.ts +65 -0
- package/lib/auth/context/AuthContext.js +150 -0
- package/lib/auth/context/index.d.ts +1 -0
- package/lib/auth/context/index.js +1 -0
- package/lib/auth/index.d.ts +7 -0
- package/lib/auth/index.js +7 -0
- package/lib/auth/services/AuthService.d.ts +230 -0
- package/lib/auth/services/AuthService.js +475 -0
- package/lib/auth/services/LogoutService.d.ts +27 -0
- package/lib/auth/services/LogoutService.js +98 -0
- package/lib/auth/services/index.d.ts +2 -0
- package/lib/auth/services/index.js +2 -0
- package/lib/auth/shared/index.d.ts +1 -0
- package/lib/auth/shared/index.js +1 -0
- package/lib/auth/shared/layout/AuthPageLayout.d.ts +10 -0
- package/lib/auth/shared/layout/AuthPageLayout.js +16 -0
- package/lib/auth/shared/layout/index.d.ts +1 -0
- package/lib/auth/shared/layout/index.js +1 -0
- package/lib/auth/types/auth.types.d.ts +234 -0
- package/lib/auth/types/auth.types.js +14 -0
- package/lib/auth/types/index.d.ts +1 -0
- package/lib/auth/types/index.js +1 -0
- package/lib/auth/utils/TokenManager.d.ts +43 -0
- package/lib/auth/utils/TokenManager.js +171 -0
- package/lib/auth/utils/Transformers.d.ts +158 -0
- package/lib/auth/utils/Transformers.js +263 -0
- package/lib/auth/utils/errorDetection.d.ts +22 -0
- package/lib/auth/utils/errorDetection.js +190 -0
- package/lib/auth/utils/index.d.ts +3 -0
- package/lib/auth/utils/index.js +3 -0
- package/lib/components/charts/LineGraph.d.ts +15 -0
- package/lib/components/charts/LineGraph.js +131 -0
- package/lib/components/icons/Icon.d.ts +8 -0
- package/lib/components/icons/Icon.js +13 -0
- package/lib/components/icons/index.d.ts +2 -0
- package/lib/components/icons/index.js +2 -0
- package/lib/components/icons/types.d.ts +26 -0
- package/lib/components/icons/types.js +33 -0
- package/lib/components/index.d.ts +3 -0
- package/lib/components/index.js +3 -0
- package/lib/components/layout/AppLayout.d.ts +34 -0
- package/lib/components/layout/AppLayout.js +19 -0
- package/lib/components/layout/AuthPageLayout.d.ts +13 -0
- package/lib/components/layout/AuthPageLayout.js +15 -0
- package/lib/components/layout/BreadcrumbNav.d.ts +2 -0
- package/lib/components/layout/BreadcrumbNav.js +10 -0
- package/lib/components/layout/LayoutContent.d.ts +6 -0
- package/lib/components/layout/LayoutContent.js +10 -0
- package/lib/components/layout/Navbar.d.ts +106 -0
- package/lib/components/layout/Navbar.js +66 -0
- package/lib/components/layout/PageHeader.d.ts +8 -0
- package/lib/components/layout/PageHeader.js +7 -0
- package/lib/components/layout/SessionExpiryModal.d.ts +10 -0
- package/lib/components/layout/SessionExpiryModal.js +9 -0
- package/lib/components/layout/Sidebar.d.ts +6 -0
- package/lib/components/layout/Sidebar.js +87 -0
- package/lib/components/layout/VerticalTabsLayout.d.ts +12 -0
- package/lib/components/layout/VerticalTabsLayout.js +14 -0
- package/lib/components/layout/index.d.ts +9 -0
- package/lib/components/layout/index.js +9 -0
- package/lib/components/ui/Avatar.d.ts +6 -0
- package/lib/components/ui/Avatar.js +11 -0
- package/lib/components/ui/AvatarIcon.d.ts +4 -0
- package/lib/components/ui/AvatarIcon.js +6 -0
- package/lib/components/ui/Button.d.ts +14 -0
- package/lib/components/ui/Button.js +30 -0
- package/lib/components/ui/Calendar.d.ts +9 -0
- package/lib/components/ui/Calendar.js +35 -0
- package/lib/components/ui/Card.d.ts +16 -0
- package/lib/components/ui/Card.js +6 -0
- package/lib/components/ui/Chart.d.ts +2 -0
- package/lib/components/ui/Chart.js +16 -0
- package/lib/components/ui/Checkbox.d.ts +4 -0
- package/lib/components/ui/Checkbox.js +8 -0
- package/lib/components/ui/Command.d.ts +80 -0
- package/lib/components/ui/Command.js +28 -0
- package/lib/components/ui/ContainedTab.d.ts +21 -0
- package/lib/components/ui/ContainedTab.js +37 -0
- package/lib/components/ui/DateFormat.d.ts +6 -0
- package/lib/components/ui/DateFormat.js +8 -0
- package/lib/components/ui/DatePicker.d.ts +14 -0
- package/lib/components/ui/DatePicker.js +91 -0
- package/lib/components/ui/DateRangeModal.d.ts +38 -0
- package/lib/components/ui/DateRangeModal.js +89 -0
- package/lib/components/ui/DetailsCard.d.ts +16 -0
- package/lib/components/ui/DetailsCard.js +14 -0
- package/lib/components/ui/DetailsPage.d.ts +36 -0
- package/lib/components/ui/DetailsPage.js +50 -0
- package/lib/components/ui/Dialog.d.ts +19 -0
- package/lib/components/ui/Dialog.js +22 -0
- package/lib/components/ui/EmptyState.d.ts +6 -0
- package/lib/components/ui/EmptyState.js +6 -0
- package/lib/components/ui/FilterComponent.d.ts +30 -0
- package/lib/components/ui/FilterComponent.js +80 -0
- package/lib/components/ui/FilterList.d.ts +52 -0
- package/lib/components/ui/FilterList.js +62 -0
- package/lib/components/ui/FilterSection.d.ts +31 -0
- package/lib/components/ui/FilterSection.js +21 -0
- package/lib/components/ui/FilterWrapper.d.ts +6 -0
- package/lib/components/ui/FilterWrapper.js +7 -0
- package/lib/components/ui/Form.d.ts +23 -0
- package/lib/components/ui/Form.js +62 -0
- package/lib/components/ui/HoverableValue.d.ts +7 -0
- package/lib/components/ui/HoverableValue.js +8 -0
- package/lib/components/ui/IconButton.d.ts +10 -0
- package/lib/components/ui/IconButton.js +10 -0
- package/lib/components/ui/ImageComponent.d.ts +8 -0
- package/lib/components/ui/ImageComponent.js +5 -0
- package/lib/components/ui/ImageUploader.d.ts +17 -0
- package/lib/components/ui/ImageUploader.js +144 -0
- package/lib/components/ui/Input.d.ts +4 -0
- package/lib/components/ui/Input.js +8 -0
- package/lib/components/ui/Label.d.ts +5 -0
- package/lib/components/ui/Label.js +9 -0
- package/lib/components/ui/Loader.d.ts +10 -0
- package/lib/components/ui/Loader.js +7 -0
- package/lib/components/ui/Modal.d.ts +72 -0
- package/lib/components/ui/Modal.js +31 -0
- package/lib/components/ui/MultiSelect.d.ts +16 -0
- package/lib/components/ui/MultiSelect.js +59 -0
- package/lib/components/ui/NotificationModal.d.ts +18 -0
- package/lib/components/ui/NotificationModal.js +40 -0
- package/lib/components/ui/PhoneInput.d.ts +12 -0
- package/lib/components/ui/PhoneInput.js +58 -0
- package/lib/components/ui/Popover.d.ts +7 -0
- package/lib/components/ui/Popover.js +10 -0
- package/lib/components/ui/Progress.d.ts +7 -0
- package/lib/components/ui/Progress.js +7 -0
- package/lib/components/ui/Radio.d.ts +5 -0
- package/lib/components/ui/Radio.js +14 -0
- package/lib/components/ui/RangeDatePicker.d.ts +78 -0
- package/lib/components/ui/RangeDatePicker.js +68 -0
- package/lib/components/ui/Select.d.ts +13 -0
- package/lib/components/ui/Select.js +57 -0
- package/lib/components/ui/Separator.d.ts +4 -0
- package/lib/components/ui/Separator.js +7 -0
- package/lib/components/ui/Sheet.d.ts +26 -0
- package/lib/components/ui/Sheet.js +37 -0
- package/lib/components/ui/StatusCell.d.ts +9 -0
- package/lib/components/ui/StatusCell.js +6 -0
- package/lib/components/ui/Switch.d.ts +10 -0
- package/lib/components/ui/Switch.js +22 -0
- package/lib/components/ui/Tab.d.ts +15 -0
- package/lib/components/ui/Tab.js +13 -0
- package/lib/components/ui/TableDownload.d.ts +11 -0
- package/lib/components/ui/TableDownload.js +82 -0
- package/lib/components/ui/TailwindIndicator.d.ts +1 -0
- package/lib/components/ui/TailwindIndicator.js +6 -0
- package/lib/components/ui/TextField.d.ts +60 -0
- package/lib/components/ui/TextField.js +42 -0
- package/lib/components/ui/Textarea.d.ts +5 -0
- package/lib/components/ui/Textarea.js +8 -0
- package/lib/components/ui/Toast.d.ts +12 -0
- package/lib/components/ui/Toast.js +25 -0
- package/lib/components/ui/UploadField.d.ts +15 -0
- package/lib/components/ui/UploadField.js +45 -0
- package/lib/components/ui/VerticalTab.d.ts +16 -0
- package/lib/components/ui/VerticalTab.js +13 -0
- package/lib/components/ui/index.d.ts +49 -0
- package/lib/components/ui/index.js +47 -0
- package/lib/context/BreadcrumbContext.d.ts +28 -0
- package/lib/context/BreadcrumbContext.js +238 -0
- package/lib/context/FormEngineDrawerProvider.d.ts +21 -0
- package/lib/context/FormEngineDrawerProvider.js +38 -0
- package/lib/context/MultiFormEngineDrawerProvider.d.ts +25 -0
- package/lib/context/MultiFormEngineDrawerProvider.js +89 -0
- package/lib/context/SidebarContext.d.ts +65 -0
- package/lib/context/SidebarContext.js +47 -0
- package/lib/context/ToastContext.d.ts +17 -0
- package/lib/context/ToastContext.js +29 -0
- package/lib/context/index.d.ts +5 -0
- package/lib/context/index.js +5 -0
- package/lib/dashboard-visuals/components/BaseChart.d.ts +55 -0
- package/lib/dashboard-visuals/components/BaseChart.js +201 -0
- package/lib/dashboard-visuals/components/CardWrapper.d.ts +10 -0
- package/lib/dashboard-visuals/components/CardWrapper.js +13 -0
- package/lib/dashboard-visuals/components/ChartDetailsModal.d.ts +57 -0
- package/lib/dashboard-visuals/components/ChartDetailsModal.js +27 -0
- package/lib/dashboard-visuals/components/ChartDetailsModalWrapper.d.ts +29 -0
- package/lib/dashboard-visuals/components/ChartDetailsModalWrapper.js +4 -0
- package/lib/dashboard-visuals/components/ChartFormatter.d.ts +22 -0
- package/lib/dashboard-visuals/components/ChartFormatter.js +46 -0
- package/lib/dashboard-visuals/components/ChartWrapper.d.ts +11 -0
- package/lib/dashboard-visuals/components/ChartWrapper.js +14 -0
- package/lib/dashboard-visuals/components/DashboardFilter.d.ts +8 -0
- package/lib/dashboard-visuals/components/DashboardFilter.js +17 -0
- package/lib/dashboard-visuals/components/DataTable.d.ts +3 -0
- package/lib/dashboard-visuals/components/DataTable.js +57 -0
- package/lib/dashboard-visuals/components/EmptyState.d.ts +6 -0
- package/lib/dashboard-visuals/components/EmptyState.js +6 -0
- package/lib/dashboard-visuals/components/ErrorState.d.ts +7 -0
- package/lib/dashboard-visuals/components/ErrorState.js +5 -0
- package/lib/dashboard-visuals/components/FilterComponentSkeleton.d.ts +3 -0
- package/lib/dashboard-visuals/components/FilterComponentSkeleton.js +11 -0
- package/lib/dashboard-visuals/components/Pagination.d.ts +10 -0
- package/lib/dashboard-visuals/components/Pagination.js +7 -0
- package/lib/dashboard-visuals/components/Switch.d.ts +8 -0
- package/lib/dashboard-visuals/components/Switch.js +10 -0
- package/lib/dashboard-visuals/components/TileSkeleton.d.ts +2 -0
- package/lib/dashboard-visuals/components/TileSkeleton.js +5 -0
- package/lib/dashboard-visuals/components/molecules/Analytics.d.ts +11 -0
- package/lib/dashboard-visuals/components/molecules/Analytics.js +9 -0
- package/lib/dashboard-visuals/components/molecules/DataGrid.d.ts +15 -0
- package/lib/dashboard-visuals/components/molecules/DataGrid.js +124 -0
- package/lib/dashboard-visuals/components/molecules/NoChartData.d.ts +6 -0
- package/lib/dashboard-visuals/components/molecules/NoChartData.js +6 -0
- package/lib/dashboard-visuals/components/molecules/VisualChart.d.ts +16 -0
- package/lib/dashboard-visuals/components/molecules/VisualChart.js +8 -0
- package/lib/dashboard-visuals/components/types.d.ts +62 -0
- package/lib/dashboard-visuals/components/types.js +1 -0
- package/lib/dashboard-visuals/hooks/useChartData.d.ts +15 -0
- package/lib/dashboard-visuals/hooks/useChartData.js +82 -0
- package/lib/dashboard-visuals/hooks/useTooltipFormatter.d.ts +13 -0
- package/lib/dashboard-visuals/hooks/useTooltipFormatter.js +10 -0
- package/lib/dashboard-visuals/index.d.ts +39 -0
- package/lib/dashboard-visuals/index.js +168 -0
- package/lib/dashboard-visuals/types/index.d.ts +83 -0
- package/lib/dashboard-visuals/types/index.js +1 -0
- package/lib/dashboard-visuals/types/metricDetailData.d.ts +25 -0
- package/lib/dashboard-visuals/types/metricDetailData.js +1 -0
- package/lib/dashboard-visuals/utils/api.d.ts +5 -0
- package/lib/dashboard-visuals/utils/api.js +6 -0
- package/lib/dashboard-visuals/utils/chartOptions.d.ts +481 -0
- package/lib/dashboard-visuals/utils/chartOptions.js +393 -0
- package/lib/dashboard-visuals/utils/chunkArray.d.ts +1 -0
- package/lib/dashboard-visuals/utils/chunkArray.js +7 -0
- package/lib/dashboard-visuals/utils/defaultColors.d.ts +1 -0
- package/lib/dashboard-visuals/utils/defaultColors.js +1 -0
- package/lib/dashboard-visuals/utils/formatUtil.d.ts +203 -0
- package/lib/dashboard-visuals/utils/formatUtil.js +472 -0
- package/lib/dashboard-visuals/utils/gridUtil.d.ts +11 -0
- package/lib/dashboard-visuals/utils/gridUtil.js +32 -0
- package/lib/dashboard-visuals/utils/index.d.ts +6 -0
- package/lib/dashboard-visuals/utils/index.js +6 -0
- package/lib/dashboard-visuals/utils/tooltipUtils.d.ts +11 -0
- package/lib/dashboard-visuals/utils/tooltipUtils.js +180 -0
- package/lib/dashboard-visuals/visualRegistry.d.ts +4 -0
- package/lib/dashboard-visuals/visualRegistry.js +41 -0
- package/lib/dashboard-visuals/visuals/BarChart.d.ts +58 -0
- package/lib/dashboard-visuals/visuals/BarChart.js +95 -0
- package/lib/dashboard-visuals/visuals/BarLineHybridChart.d.ts +33 -0
- package/lib/dashboard-visuals/visuals/BarLineHybridChart.js +60 -0
- package/lib/dashboard-visuals/visuals/BubbleChart.d.ts +25 -0
- package/lib/dashboard-visuals/visuals/BubbleChart.js +101 -0
- package/lib/dashboard-visuals/visuals/DistributionChart.d.ts +11 -0
- package/lib/dashboard-visuals/visuals/DistributionChart.js +48 -0
- package/lib/dashboard-visuals/visuals/DonutChart.d.ts +50 -0
- package/lib/dashboard-visuals/visuals/DonutChart.js +105 -0
- package/lib/dashboard-visuals/visuals/GaugeChart.d.ts +32 -0
- package/lib/dashboard-visuals/visuals/GaugeChart.js +53 -0
- package/lib/dashboard-visuals/visuals/GroupedBarChart.d.ts +47 -0
- package/lib/dashboard-visuals/visuals/GroupedBarChart.js +131 -0
- package/lib/dashboard-visuals/visuals/HeatmapChart.d.ts +79 -0
- package/lib/dashboard-visuals/visuals/HeatmapChart.js +146 -0
- package/lib/dashboard-visuals/visuals/HorizontalBarChart.d.ts +50 -0
- package/lib/dashboard-visuals/visuals/HorizontalBarChart.js +131 -0
- package/lib/dashboard-visuals/visuals/ItemPerformanceCard.d.ts +30 -0
- package/lib/dashboard-visuals/visuals/ItemPerformanceCard.js +31 -0
- package/lib/dashboard-visuals/visuals/LineChart.d.ts +56 -0
- package/lib/dashboard-visuals/visuals/LineChart.js +80 -0
- package/lib/dashboard-visuals/visuals/LineGraph.d.ts +50 -0
- package/lib/dashboard-visuals/visuals/LineGraph.js +189 -0
- package/lib/dashboard-visuals/visuals/MetricSummaryCard.d.ts +14 -0
- package/lib/dashboard-visuals/visuals/MetricSummaryCard.js +8 -0
- package/lib/dashboard-visuals/visuals/MultiGaugeChart.d.ts +39 -0
- package/lib/dashboard-visuals/visuals/MultiGaugeChart.js +119 -0
- package/lib/dashboard-visuals/visuals/PieChart.d.ts +59 -0
- package/lib/dashboard-visuals/visuals/PieChart.js +194 -0
- package/lib/dashboard-visuals/visuals/SelectedEventTile.d.ts +14 -0
- package/lib/dashboard-visuals/visuals/SelectedEventTile.js +35 -0
- package/lib/dashboard-visuals/visuals/SpeedometerChart.d.ts +53 -0
- package/lib/dashboard-visuals/visuals/SpeedometerChart.js +94 -0
- package/lib/dashboard-visuals/visuals/Table.d.ts +26 -0
- package/lib/dashboard-visuals/visuals/Table.js +113 -0
- package/lib/dashboard-visuals/visuals/Tile.d.ts +16 -0
- package/lib/dashboard-visuals/visuals/Tile.js +16 -0
- package/lib/dashboard-visuals/visuals/TreeMap.d.ts +25 -0
- package/lib/dashboard-visuals/visuals/TreeMap.js +45 -0
- package/lib/dashboard-visuals/visuals/WaterfallChart.d.ts +52 -0
- package/lib/dashboard-visuals/visuals/WaterfallChart.js +266 -0
- package/lib/form-engine/Form.d.ts +4 -0
- package/lib/form-engine/Form.js +14 -0
- package/lib/form-engine/FormEngine.d.ts +3 -0
- package/lib/form-engine/FormEngine.js +121 -0
- package/lib/form-engine/components/FieldWrapper.d.ts +18 -0
- package/lib/form-engine/components/FieldWrapper.js +63 -0
- package/lib/form-engine/components/index.d.ts +2 -0
- package/lib/form-engine/components/index.js +2 -0
- package/lib/form-engine/components/inputs/card-expiry-input/CardExpiryInput.d.ts +16 -0
- package/lib/form-engine/components/inputs/card-expiry-input/CardExpiryInput.js +48 -0
- package/lib/form-engine/components/inputs/checkbox-input/CheckboxInput.d.ts +4 -0
- package/lib/form-engine/components/inputs/checkbox-input/CheckboxInput.js +5 -0
- package/lib/form-engine/components/inputs/credit-card-input/CreditCardInput.d.ts +4 -0
- package/lib/form-engine/components/inputs/credit-card-input/CreditCardInput.js +82 -0
- package/lib/form-engine/components/inputs/date-input/DateInput.d.ts +4 -0
- package/lib/form-engine/components/inputs/date-input/DateInput.js +7 -0
- package/lib/form-engine/components/inputs/date-input/index.d.ts +1 -0
- package/lib/form-engine/components/inputs/date-input/index.js +1 -0
- package/lib/form-engine/components/inputs/email-input/EmailInput.d.ts +4 -0
- package/lib/form-engine/components/inputs/email-input/EmailInput.js +5 -0
- package/lib/form-engine/components/inputs/email-input/index.d.ts +1 -0
- package/lib/form-engine/components/inputs/email-input/index.js +1 -0
- package/lib/form-engine/components/inputs/index.d.ts +13 -0
- package/lib/form-engine/components/inputs/index.js +13 -0
- package/lib/form-engine/components/inputs/label-input/LabelInput.d.ts +4 -0
- package/lib/form-engine/components/inputs/label-input/LabelInput.js +7 -0
- package/lib/form-engine/components/inputs/label-input/index.d.ts +1 -0
- package/lib/form-engine/components/inputs/label-input/index.js +1 -0
- package/lib/form-engine/components/inputs/multi-select-input/MultiSelectInput.d.ts +4 -0
- package/lib/form-engine/components/inputs/multi-select-input/MultiSelectInput.js +5 -0
- package/lib/form-engine/components/inputs/number-input/NumberInput.d.ts +4 -0
- package/lib/form-engine/components/inputs/number-input/NumberInput.js +5 -0
- package/lib/form-engine/components/inputs/number-input/index.d.ts +1 -0
- package/lib/form-engine/components/inputs/number-input/index.js +1 -0
- package/lib/form-engine/components/inputs/password-input/PasswordInput.d.ts +4 -0
- package/lib/form-engine/components/inputs/password-input/PasswordInput.js +9 -0
- package/lib/form-engine/components/inputs/password-input/index.d.ts +1 -0
- package/lib/form-engine/components/inputs/password-input/index.js +1 -0
- package/lib/form-engine/components/inputs/radio-button/RadioInput.d.ts +4 -0
- package/lib/form-engine/components/inputs/radio-button/RadioInput.js +6 -0
- package/lib/form-engine/components/inputs/radio-button/index.d.ts +1 -0
- package/lib/form-engine/components/inputs/radio-button/index.js +1 -0
- package/lib/form-engine/components/inputs/select/SelectInput.d.ts +4 -0
- package/lib/form-engine/components/inputs/select/SelectInput.js +6 -0
- package/lib/form-engine/components/inputs/select/index.d.ts +1 -0
- package/lib/form-engine/components/inputs/select/index.js +1 -0
- package/lib/form-engine/components/inputs/textarea-input/TextareaInput.d.ts +4 -0
- package/lib/form-engine/components/inputs/textarea-input/TextareaInput.js +5 -0
- package/lib/form-engine/components/inputs/textarea-input/index.d.ts +1 -0
- package/lib/form-engine/components/inputs/textarea-input/index.js +1 -0
- package/lib/form-engine/components/inputs/time-input/TimeInput.d.ts +4 -0
- package/lib/form-engine/components/inputs/time-input/TimeInput.js +5 -0
- package/lib/form-engine/components/inputs/time-input/index.d.ts +1 -0
- package/lib/form-engine/components/inputs/time-input/index.js +1 -0
- package/lib/form-engine/components/inputs/toggle-switch-input/ToggleSwitchInput.d.ts +4 -0
- package/lib/form-engine/components/inputs/toggle-switch-input/ToggleSwitchInput.js +7 -0
- package/lib/form-engine/components/inputs/toggle-switch-input/index.d.ts +1 -0
- package/lib/form-engine/components/inputs/toggle-switch-input/index.js +1 -0
- package/lib/form-engine/components/inputs/upload-field/UploadFieldForm.d.ts +4 -0
- package/lib/form-engine/components/inputs/upload-field/UploadFieldForm.js +59 -0
- package/lib/form-engine/components/inputs/upload-field/index.d.ts +1 -0
- package/lib/form-engine/components/inputs/upload-field/index.js +1 -0
- package/lib/form-engine/hooks/useFormPersistence.d.ts +11 -0
- package/lib/form-engine/hooks/useFormPersistence.js +46 -0
- package/lib/form-engine/index.d.ts +5 -0
- package/lib/form-engine/index.js +5 -0
- package/lib/form-engine/registry/RegisterComponents.d.ts +1 -0
- package/lib/form-engine/registry/RegisterComponents.js +35 -0
- package/lib/form-engine/registry/Registry.d.ts +5 -0
- package/lib/form-engine/registry/Registry.js +13 -0
- package/lib/form-engine/registry/index.d.ts +2 -0
- package/lib/form-engine/registry/index.js +2 -0
- package/lib/form-engine/types/index.d.ts +311 -0
- package/lib/form-engine/types/index.js +1 -0
- package/lib/helpers/index.d.ts +2 -0
- package/lib/helpers/index.js +2 -0
- package/lib/helpers/utils.d.ts +37 -0
- package/lib/helpers/utils.js +77 -0
- package/lib/helpers/validations.d.ts +80 -0
- package/lib/helpers/validations.js +39 -0
- package/lib/index.d.ts +21 -0
- package/lib/index.js +30 -0
- package/lib/mocks/mockApiRequestsConfig.d.ts +2 -0
- package/lib/mocks/mockApiRequestsConfig.js +343 -0
- package/lib/pagamio-drawer/TopUpWalletDrawer/TopUpWalletContent.d.ts +14 -0
- package/lib/pagamio-drawer/TopUpWalletDrawer/TopUpWalletContent.js +40 -0
- package/lib/pagamio-drawer/TopUpWalletDrawer/index.d.ts +11 -0
- package/lib/pagamio-drawer/TopUpWalletDrawer/index.js +7 -0
- package/lib/pagamio-drawer/components/BaseDrawer.d.ts +11 -0
- package/lib/pagamio-drawer/components/BaseDrawer.js +10 -0
- package/lib/pagamio-drawer/components/DrawerContent.d.ts +27 -0
- package/lib/pagamio-drawer/components/DrawerContent.js +237 -0
- package/lib/pagamio-drawer/index.d.ts +22 -0
- package/lib/pagamio-drawer/index.js +133 -0
- package/lib/pagamio-table/data-table/ExportButton.d.ts +57 -0
- package/lib/pagamio-table/data-table/ExportButton.js +96 -0
- package/lib/pagamio-table/data-table/MantineCoreTable.d.ts +44 -0
- package/lib/pagamio-table/data-table/MantineCoreTable.js +129 -0
- package/lib/pagamio-table/data-table/Pagination.d.ts +10 -0
- package/lib/pagamio-table/data-table/Pagination.js +5 -0
- package/lib/pagamio-table/data-table/TableDownload.d.ts +8 -0
- package/lib/pagamio-table/data-table/TableDownload.js +81 -0
- package/lib/pagamio-table/data-table/TableToolbar.d.ts +3 -0
- package/lib/pagamio-table/data-table/TableToolbar.js +16 -0
- package/lib/pagamio-table/data-table/exportUtils.d.ts +42 -0
- package/lib/pagamio-table/data-table/exportUtils.js +782 -0
- package/lib/pagamio-table/data-table/index.d.ts +5 -0
- package/lib/pagamio-table/data-table/index.js +11 -0
- package/lib/pagamio-table/data-table/pdfExportUtils.d.ts +111 -0
- package/lib/pagamio-table/data-table/pdfExportUtils.js +113 -0
- package/lib/pagamio-table/data-table/types.d.ts +169 -0
- package/lib/pagamio-table/data-table/types.js +1 -0
- package/lib/pagamio-table/index.d.ts +4 -0
- package/lib/pagamio-table/index.js +4 -0
- package/lib/pagamio-table/utils/functionHelper.d.ts +12 -0
- package/lib/pagamio-table/utils/functionHelper.js +24 -0
- package/lib/pagamio-table/utils/index.d.ts +1 -0
- package/lib/pagamio-table/utils/index.js +1 -0
- package/lib/rbac/hooks.d.ts +39 -0
- package/lib/rbac/hooks.js +51 -0
- package/lib/rbac/index.d.ts +8 -0
- package/lib/rbac/index.js +11 -0
- package/lib/rbac/store.d.ts +24 -0
- package/lib/rbac/store.js +37 -0
- package/lib/rbac/types.d.ts +39 -0
- package/lib/rbac/types.js +4 -0
- package/lib/rbac/utils.d.ts +44 -0
- package/lib/rbac/utils.js +117 -0
- package/lib/shared/constants/index.d.ts +2 -0
- package/lib/shared/constants/index.js +2 -0
- package/lib/shared/hooks/index.d.ts +4 -0
- package/lib/shared/hooks/index.js +4 -0
- package/lib/shared/hooks/useAnyDrawerOpen.d.ts +4 -0
- package/lib/shared/hooks/useAnyDrawerOpen.js +18 -0
- package/lib/shared/hooks/useContainerWidth.d.ts +2 -0
- package/lib/shared/hooks/useContainerWidth.js +18 -0
- package/lib/shared/hooks/useImageUpload.d.ts +15 -0
- package/lib/shared/hooks/useImageUpload.js +66 -0
- package/lib/shared/hooks/useMediaQueries.d.ts +5 -0
- package/lib/shared/hooks/useMediaQueries.js +35 -0
- package/lib/shared/hooks/usePagamioTable.d.ts +158 -0
- package/lib/shared/hooks/usePagamioTable.js +475 -0
- package/lib/shared/hooks/useSessionTimer.d.ts +33 -0
- package/lib/shared/hooks/useSessionTimer.js +96 -0
- package/lib/shared/index.d.ts +4 -0
- package/lib/shared/index.js +4 -0
- package/lib/shared/types/index.d.ts +1 -0
- package/lib/shared/types/index.js +1 -0
- package/lib/shared/url/index.d.ts +9 -0
- package/lib/shared/url/index.js +20 -0
- package/lib/shared/utils/filterUtils.d.ts +5 -0
- package/lib/shared/utils/filterUtils.js +31 -0
- package/lib/shared/utils/functionHelper.d.ts +27 -0
- package/lib/shared/utils/functionHelper.js +124 -0
- package/lib/shared/utils/index.d.ts +2 -0
- package/lib/shared/utils/index.js +2 -0
- package/lib/shared/utils/localStorage.d.ts +53 -0
- package/lib/shared/utils/localStorage.js +139 -0
- package/lib/styles.css +6247 -0
- package/lib/translations/components/LocaleSwitcher.d.ts +7 -0
- package/lib/translations/components/LocaleSwitcher.js +18 -0
- package/lib/translations/components/index.d.ts +1 -0
- package/lib/translations/components/index.js +1 -0
- package/lib/translations/context/TranslationContext.d.ts +5 -0
- package/lib/translations/context/TranslationContext.js +151 -0
- package/lib/translations/context/index.d.ts +1 -0
- package/lib/translations/context/index.js +1 -0
- package/lib/translations/hooks/index.d.ts +2 -0
- package/lib/translations/hooks/index.js +2 -0
- package/lib/translations/hooks/useLibTranslations.d.ts +7 -0
- package/lib/translations/hooks/useLibTranslations.js +46 -0
- package/lib/translations/hooks/useTranslation.d.ts +7 -0
- package/lib/translations/hooks/useTranslation.js +11 -0
- package/lib/translations/index.d.ts +91 -0
- package/lib/translations/index.js +11 -0
- package/lib/translations/locales/en.json +21 -0
- package/lib/translations/locales/es.json +21 -0
- package/lib/translations/locales/fr.json +21 -0
- package/lib/translations/locales/pt.json +21 -0
- package/lib/translations/types/index.d.ts +24 -0
- package/lib/translations/types/index.js +1 -0
- package/lib/translations/utils/index.d.ts +6 -0
- package/lib/translations/utils/index.js +25 -0
- package/package.json +9 -1
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import { formatPrice } from '../../helpers';
|
|
3
|
+
const createTooltipContainer = () => `
|
|
4
|
+
<div style="margin-top: 5px; border-top: 1px solid #eee; padding-top: 5px;">
|
|
5
|
+
`;
|
|
6
|
+
const isDateString = (value) => {
|
|
7
|
+
// Check if the string is a valid date format
|
|
8
|
+
return dayjs(value).isValid() && !Number.isNaN(Date.parse(value));
|
|
9
|
+
};
|
|
10
|
+
const formatDisplayName = (name) => {
|
|
11
|
+
if (isDateString(name)) {
|
|
12
|
+
return dayjs(name).format('MMM DD HH:mm');
|
|
13
|
+
}
|
|
14
|
+
return name;
|
|
15
|
+
};
|
|
16
|
+
const formatTooltipValue = (value, format, currency, displaySymbol) => {
|
|
17
|
+
if (format === 'number') {
|
|
18
|
+
return value.toLocaleString();
|
|
19
|
+
}
|
|
20
|
+
const numericValue = Number(value);
|
|
21
|
+
return currency ? formatPrice(numericValue, currency, 2, undefined, displaySymbol) : formatPrice(numericValue);
|
|
22
|
+
};
|
|
23
|
+
const createTooltipRow = (label, value, suffix = '', format = 'number', currency, displaySymbol) => {
|
|
24
|
+
return `
|
|
25
|
+
<div style="font-size: 12px; color: #666; margin-bottom: 3px;">
|
|
26
|
+
<span style="font-weight: 500;">${label}:</span> ${formatTooltipValue(value, format, currency, displaySymbol)}${suffix}
|
|
27
|
+
</div>
|
|
28
|
+
`;
|
|
29
|
+
};
|
|
30
|
+
export const processTooltipFields = (tooltipAdditionalFields) => {
|
|
31
|
+
return tooltipAdditionalFields.map((field) => {
|
|
32
|
+
if (typeof field === 'string') {
|
|
33
|
+
return {
|
|
34
|
+
toolTipkey: field,
|
|
35
|
+
valueKey: field,
|
|
36
|
+
nameKey: field,
|
|
37
|
+
label: field.replace(/([A-Z])/g, ' $1').trim(),
|
|
38
|
+
suffix: '',
|
|
39
|
+
format: 'number',
|
|
40
|
+
formatter: (value, currency) => {
|
|
41
|
+
if (typeof value === 'number') {
|
|
42
|
+
return value.toLocaleString();
|
|
43
|
+
}
|
|
44
|
+
return String(value);
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
toolTipkey: field.toolTipkey,
|
|
50
|
+
valueKey: field.valueKey,
|
|
51
|
+
nameKey: field.nameKey,
|
|
52
|
+
label: field.label ?? field.toolTipkey.replace(/([A-Z])/g, ' $1').trim(),
|
|
53
|
+
suffix: field.suffix ?? '',
|
|
54
|
+
format: field.format ?? 'number',
|
|
55
|
+
formatter: field.formatter ??
|
|
56
|
+
((value, currency, displaySymbol) => {
|
|
57
|
+
if (field.format === 'currency') {
|
|
58
|
+
return formatPrice(Number(value), currency, 2, undefined, displaySymbol);
|
|
59
|
+
}
|
|
60
|
+
if (typeof value === 'number') {
|
|
61
|
+
return value.toLocaleString();
|
|
62
|
+
}
|
|
63
|
+
return String(value);
|
|
64
|
+
}),
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
const processAdditionalFields = (data, processedTooltipFields, currency, displaySymbol) => {
|
|
69
|
+
let content = createTooltipContainer();
|
|
70
|
+
processedTooltipFields.forEach((field) => {
|
|
71
|
+
if (data[field.toolTipkey] !== undefined) {
|
|
72
|
+
const rawValue = data[field.toolTipkey];
|
|
73
|
+
if (field.formatter) {
|
|
74
|
+
// If there's a custom formatter
|
|
75
|
+
const formattedValue = field.formatter(rawValue, currency, displaySymbol);
|
|
76
|
+
content += `
|
|
77
|
+
<div style="font-size: 12px; color: #666; margin-bottom: 3px;">
|
|
78
|
+
<span style="font-weight: 500;">${field.label}:</span> ${formattedValue}${field.suffix}
|
|
79
|
+
</div>
|
|
80
|
+
`;
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
// No custom formatter, let createTooltipRow handle it
|
|
84
|
+
content += createTooltipRow(field.label, rawValue, field.suffix, field.format, currency, displaySymbol);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
return content + '</div>';
|
|
89
|
+
};
|
|
90
|
+
const processLineGraphData = (date) => {
|
|
91
|
+
return createTooltipContainer() + createTooltipRow('Date', date) + '</div>';
|
|
92
|
+
};
|
|
93
|
+
const processMetricData = (processedTooltipFields, metricData, seriesValue, name, currency, displaySymbol) => {
|
|
94
|
+
let content = '';
|
|
95
|
+
processedTooltipFields.forEach((field) => {
|
|
96
|
+
const filteredValue = metricData.find((item) => item[field.valueKey] === seriesValue && item[field.nameKey] === name);
|
|
97
|
+
if (filteredValue) {
|
|
98
|
+
if (!content) {
|
|
99
|
+
content = createTooltipContainer();
|
|
100
|
+
}
|
|
101
|
+
const rawValue = filteredValue[field.toolTipkey];
|
|
102
|
+
if (field.formatter) {
|
|
103
|
+
// If there's a custom formatter,
|
|
104
|
+
const formattedValue = field.formatter(rawValue, currency, displaySymbol);
|
|
105
|
+
content += `
|
|
106
|
+
<div style="font-size: 12px; color: #666; margin-bottom: 3px;">
|
|
107
|
+
<span style="font-weight: 500;">${field.label}:</span> ${formattedValue}${field.suffix}
|
|
108
|
+
</div>
|
|
109
|
+
`;
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
// No custom formatter, let createTooltipRow handle it
|
|
113
|
+
content += createTooltipRow(field.label, rawValue, field.suffix, field.format, currency, displaySymbol);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
return content ? content + '</div>' : '';
|
|
118
|
+
};
|
|
119
|
+
export const createTooltipFormatter = (format, tooltipTitle, tooltipUnit, processedTooltipFields, metricData, currency, displaySymbol) => {
|
|
120
|
+
return (params) => {
|
|
121
|
+
let seriesColor = '#5470c6';
|
|
122
|
+
let seriesValue = 0;
|
|
123
|
+
let isLineGraph = false;
|
|
124
|
+
let date = '';
|
|
125
|
+
const { name, value, color, data, seriesName } = Array.isArray(params) ? params[0] : params;
|
|
126
|
+
if (typeof color === 'string') {
|
|
127
|
+
seriesColor = color;
|
|
128
|
+
}
|
|
129
|
+
else if (color?.colorStops?.[0]?.color) {
|
|
130
|
+
seriesColor = color.colorStops[0].color;
|
|
131
|
+
}
|
|
132
|
+
if (Array.isArray(value)) {
|
|
133
|
+
seriesValue = value[1];
|
|
134
|
+
date = value[0];
|
|
135
|
+
isLineGraph = true;
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
seriesValue = value;
|
|
139
|
+
}
|
|
140
|
+
// Format the main value
|
|
141
|
+
let mainValueFormatted;
|
|
142
|
+
if (format === 'number') {
|
|
143
|
+
mainValueFormatted = `${seriesValue.toLocaleString()} ${tooltipUnit}`;
|
|
144
|
+
}
|
|
145
|
+
else if (displaySymbol) {
|
|
146
|
+
// Use display symbol with explicit currency fallback
|
|
147
|
+
const currencyToUse = currency || 'ZAR';
|
|
148
|
+
mainValueFormatted = formatPrice(seriesValue, currencyToUse, 2, undefined, displaySymbol);
|
|
149
|
+
}
|
|
150
|
+
else if (currency) {
|
|
151
|
+
mainValueFormatted = formatPrice(seriesValue, currency);
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
mainValueFormatted = formatPrice(seriesValue);
|
|
155
|
+
}
|
|
156
|
+
let tooltipContent = `
|
|
157
|
+
<div>
|
|
158
|
+
<div style="font-size: 14px; font-weight: 500; margin-bottom: 8px;"><b>${tooltipTitle}</b></div>
|
|
159
|
+
<div style="display: flex; align-items: center; margin-bottom: 5px;">
|
|
160
|
+
<span style="display: inline-block; width: 10px; height: 10px; border-radius: 50%; background-color: ${seriesColor}; margin-right: 8px;"></span>
|
|
161
|
+
<span style="font-weight: 500;">${formatDisplayName(name === '' ? seriesName : name)}:</span>
|
|
162
|
+
<span style="margin-left: 5px;">${mainValueFormatted}</span>
|
|
163
|
+
</div>
|
|
164
|
+
`;
|
|
165
|
+
// Add additional fields if available
|
|
166
|
+
if (processedTooltipFields.length > 0) {
|
|
167
|
+
const hasAdditionalData = processedTooltipFields.some((field) => data[field.toolTipkey] !== undefined);
|
|
168
|
+
if (hasAdditionalData) {
|
|
169
|
+
tooltipContent += processAdditionalFields(data, processedTooltipFields, currency, displaySymbol);
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
tooltipContent += isLineGraph
|
|
173
|
+
? processLineGraphData(date)
|
|
174
|
+
: processMetricData(processedTooltipFields, metricData, seriesValue, name, currency, displaySymbol);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
tooltipContent += '</div>';
|
|
178
|
+
return tooltipContent;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import BarChart from './visuals/BarChart';
|
|
2
|
+
import BarLineChart from './visuals/BarLineHybridChart';
|
|
3
|
+
import BubbleChart from './visuals/BubbleChart';
|
|
4
|
+
import DonutChart from './visuals/DonutChart';
|
|
5
|
+
import GaugeChart from './visuals/GaugeChart';
|
|
6
|
+
import GroupedBarChart from './visuals/GroupedBarChart';
|
|
7
|
+
import HeatmapChart from './visuals/HeatmapChart';
|
|
8
|
+
import HorizontalBarChart from './visuals/HorizontalBarChart';
|
|
9
|
+
import ItemPerformanceCard from './visuals/ItemPerformanceCard';
|
|
10
|
+
import LineChart from './visuals/LineChart';
|
|
11
|
+
import LineGraph from './visuals/LineGraph';
|
|
12
|
+
import MultiGaugeChart from './visuals/MultiGaugeChart';
|
|
13
|
+
import PieChart from './visuals/PieChart';
|
|
14
|
+
import SelectedEventTile from './visuals/SelectedEventTile';
|
|
15
|
+
import SpeedometerChart from './visuals/SpeedometerChart';
|
|
16
|
+
import Table from './visuals/Table';
|
|
17
|
+
import Tile from './visuals/Tile';
|
|
18
|
+
import TreeMap from './visuals/TreeMap';
|
|
19
|
+
import WaterfallChart from './visuals/WaterfallChart';
|
|
20
|
+
const componentRegistry = {
|
|
21
|
+
BarChart,
|
|
22
|
+
BarLineChart,
|
|
23
|
+
DonutChart,
|
|
24
|
+
GaugeChart,
|
|
25
|
+
HeatmapChart,
|
|
26
|
+
LineChart,
|
|
27
|
+
MultiGaugeChart,
|
|
28
|
+
PieChart,
|
|
29
|
+
SpeedometerChart,
|
|
30
|
+
Table,
|
|
31
|
+
Tile,
|
|
32
|
+
SelectedEventTile,
|
|
33
|
+
TreeMap,
|
|
34
|
+
ItemPerformanceCard,
|
|
35
|
+
HorizontalBarChart,
|
|
36
|
+
BubbleChart,
|
|
37
|
+
WaterfallChart,
|
|
38
|
+
LineGraph,
|
|
39
|
+
GroupedBarChart,
|
|
40
|
+
};
|
|
41
|
+
export default componentRegistry;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { QueryProps } from 'src/shared/types';
|
|
2
|
+
import type { ChartToolTipProps, DistributionChartTooltip, DistributionQueryProps, StatisticsQueryProps, TableColumn, TooltipField } from '../types';
|
|
3
|
+
interface BarChartProps<TData extends {
|
|
4
|
+
id: string | number;
|
|
5
|
+
}> {
|
|
6
|
+
options?: any;
|
|
7
|
+
title?: string;
|
|
8
|
+
stacked?: boolean;
|
|
9
|
+
chartDetails?: {
|
|
10
|
+
columns?: any[];
|
|
11
|
+
data?: any[];
|
|
12
|
+
};
|
|
13
|
+
themeColor?: string;
|
|
14
|
+
colors?: string[];
|
|
15
|
+
url?: string;
|
|
16
|
+
query: QueryProps;
|
|
17
|
+
seriesDataNameKey: string;
|
|
18
|
+
seriesDataValueKey: string;
|
|
19
|
+
xAxisDataValueKey: string;
|
|
20
|
+
chartToolTip?: ChartToolTipProps;
|
|
21
|
+
tooltipValueFormat: string;
|
|
22
|
+
tooltipTitle?: string;
|
|
23
|
+
tooltipUnit?: string;
|
|
24
|
+
tooltipAdditionalFields?: (string | TooltipField)[];
|
|
25
|
+
currencyDisplaySymbol?: string;
|
|
26
|
+
metricDetailData: {
|
|
27
|
+
statisticsUrl?: string;
|
|
28
|
+
title: string;
|
|
29
|
+
topFiveChartTitle: string;
|
|
30
|
+
bottomFiveChartTitle: string;
|
|
31
|
+
itemStatisticsQuery: StatisticsQueryProps;
|
|
32
|
+
yAxisDataNameKey: string;
|
|
33
|
+
xAxisNameKey: string;
|
|
34
|
+
xAxisLabel: string;
|
|
35
|
+
yAxisLabel: string;
|
|
36
|
+
valueMetricsQuery: StatisticsQueryProps;
|
|
37
|
+
averageMetricsQuery: StatisticsQueryProps;
|
|
38
|
+
distributionMetricsQuery: DistributionQueryProps;
|
|
39
|
+
nameKey: string;
|
|
40
|
+
valueKey: string;
|
|
41
|
+
dataGridSearchKey: string;
|
|
42
|
+
dataGridColumns: TableColumn<TData>[];
|
|
43
|
+
dataSearchInputPlaceHolder: string;
|
|
44
|
+
chartToolTip?: ChartToolTipProps;
|
|
45
|
+
detailsTableTitle?: string;
|
|
46
|
+
distributionChartTooltip: DistributionChartTooltip;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
declare const BarChart: <TData extends {
|
|
50
|
+
id: string | number;
|
|
51
|
+
}>({ query, options, title, stacked, url, xAxisDataValueKey, seriesDataNameKey, seriesDataValueKey, chartToolTip, tooltipValueFormat, tooltipTitle, tooltipUnit, tooltipAdditionalFields, currencyDisplaySymbol, metricDetailData, showDetailsModal, xAxisLabelRotate, xAxisLabelMaxLength, xAxisLabelFormatter, yAxisLabelFormatter, ...props }: BarChartProps<TData> & {
|
|
52
|
+
showDetailsModal?: boolean;
|
|
53
|
+
xAxisLabelRotate?: number;
|
|
54
|
+
xAxisLabelMaxLength?: number;
|
|
55
|
+
xAxisLabelFormatter?: (label: string) => string;
|
|
56
|
+
yAxisLabelFormatter?: (value: number) => string;
|
|
57
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
export default BarChart;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback } from 'react';
|
|
3
|
+
import BaseChart from '../components/BaseChart';
|
|
4
|
+
import ChartFormatter from '../components/ChartFormatter';
|
|
5
|
+
import { DashboardPaths, defaultColors, getBarChartData } from '../utils';
|
|
6
|
+
const BarChart = ({ query, options, title, stacked, url = DashboardPaths.QUERY, xAxisDataValueKey, seriesDataNameKey, seriesDataValueKey, chartToolTip, tooltipValueFormat, tooltipTitle = 'Value', tooltipUnit = '', tooltipAdditionalFields = [], currencyDisplaySymbol, metricDetailData, showDetailsModal = true, xAxisLabelRotate = 0, xAxisLabelMaxLength = 12, xAxisLabelFormatter, yAxisLabelFormatter, ...props }) => {
|
|
7
|
+
const createChartOptions = useCallback(() => {
|
|
8
|
+
return {
|
|
9
|
+
tooltip: {
|
|
10
|
+
trigger: 'axis',
|
|
11
|
+
axisPointer: { type: 'shadow' },
|
|
12
|
+
...chartToolTip,
|
|
13
|
+
},
|
|
14
|
+
color: props.colors || defaultColors,
|
|
15
|
+
legend: {
|
|
16
|
+
type: 'scroll',
|
|
17
|
+
top: 0,
|
|
18
|
+
},
|
|
19
|
+
grid: {
|
|
20
|
+
top: 90,
|
|
21
|
+
bottom: 60,
|
|
22
|
+
left: 30,
|
|
23
|
+
right: 10,
|
|
24
|
+
containLabel: true,
|
|
25
|
+
},
|
|
26
|
+
xAxis: {
|
|
27
|
+
type: 'category',
|
|
28
|
+
axisLabel: {
|
|
29
|
+
interval: 0,
|
|
30
|
+
rotate: xAxisLabelRotate,
|
|
31
|
+
formatter: (value) => {
|
|
32
|
+
if (typeof value !== 'string')
|
|
33
|
+
return value;
|
|
34
|
+
if (xAxisLabelFormatter) {
|
|
35
|
+
return xAxisLabelFormatter(value);
|
|
36
|
+
}
|
|
37
|
+
if (value.length > xAxisLabelMaxLength) {
|
|
38
|
+
return value.slice(0, xAxisLabelMaxLength) + '…';
|
|
39
|
+
}
|
|
40
|
+
return value;
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
yAxis: {
|
|
45
|
+
type: 'value',
|
|
46
|
+
splitLine: {
|
|
47
|
+
lineStyle: {
|
|
48
|
+
type: 'dashed',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
...(yAxisLabelFormatter && {
|
|
52
|
+
axisLabel: {
|
|
53
|
+
formatter: yAxisLabelFormatter,
|
|
54
|
+
},
|
|
55
|
+
}),
|
|
56
|
+
},
|
|
57
|
+
...options,
|
|
58
|
+
};
|
|
59
|
+
}, [
|
|
60
|
+
options,
|
|
61
|
+
props.colors,
|
|
62
|
+
chartToolTip,
|
|
63
|
+
xAxisLabelRotate,
|
|
64
|
+
xAxisLabelMaxLength,
|
|
65
|
+
xAxisLabelFormatter,
|
|
66
|
+
yAxisLabelFormatter,
|
|
67
|
+
]);
|
|
68
|
+
const barChartOptions = createChartOptions();
|
|
69
|
+
const getChartOptions = useCallback((data) => {
|
|
70
|
+
const { xAxisValues, seriesData } = getBarChartData(data, xAxisDataValueKey, seriesDataNameKey, seriesDataValueKey);
|
|
71
|
+
const chartSeries = seriesData.map((series) => ({
|
|
72
|
+
...series,
|
|
73
|
+
type: 'bar',
|
|
74
|
+
stack: stacked ? 'stack' : undefined,
|
|
75
|
+
}));
|
|
76
|
+
const chartOptionsData = {
|
|
77
|
+
...barChartOptions,
|
|
78
|
+
xAxis: {
|
|
79
|
+
...barChartOptions.xAxis,
|
|
80
|
+
data: xAxisValues,
|
|
81
|
+
},
|
|
82
|
+
series: chartSeries,
|
|
83
|
+
};
|
|
84
|
+
return chartOptionsData;
|
|
85
|
+
}, [query, xAxisDataValueKey, seriesDataNameKey, seriesDataValueKey]);
|
|
86
|
+
return (_jsx(BaseChart, { title: title, detailsModalTitle: metricDetailData.title, url: url, query: query, chartDetails: props.chartDetails, itemStatisticsQuery: metricDetailData.itemStatisticsQuery, valueMetricsQuery: metricDetailData.valueMetricsQuery, averageMetricsQuery: metricDetailData.averageMetricsQuery, distributionMetricsQuery: metricDetailData.distributionMetricsQuery, nameKey: metricDetailData.nameKey, valueKey: metricDetailData.valueKey, yAxisDataNameKey: metricDetailData.yAxisDataNameKey, xAxisNameKey: metricDetailData.xAxisNameKey, yAxisLabel: metricDetailData.yAxisLabel, xAxisLabel: metricDetailData.xAxisLabel, dataGridSearchKey: metricDetailData.dataGridSearchKey, dataGridColumns: metricDetailData.dataGridColumns, dataSearchInputPlaceHolder: metricDetailData.dataSearchInputPlaceHolder, chartToolTip: metricDetailData.chartToolTip, detailsTableTitle: metricDetailData.detailsTableTitle, getChartOptions: getChartOptions, distributionChartTooltip: metricDetailData.distributionChartTooltip, tooltipValueFormat: tooltipValueFormat, tooltipTitle: tooltipTitle, tooltipUnit: tooltipUnit, tooltipAdditionalFields: tooltipAdditionalFields, topFivePerformingChartTitle: metricDetailData.topFiveChartTitle, bottomFivePerformingChartTitle: metricDetailData.bottomFiveChartTitle, showDetailsModal: showDetailsModal, currencyDisplaySymbol: currencyDisplaySymbol, ...props, children: ({ metricData, tooltipFormatterFn }) => {
|
|
87
|
+
const chartOptions = createChartOptions();
|
|
88
|
+
// Add tooltip formatter from BaseChart
|
|
89
|
+
if (tooltipFormatterFn) {
|
|
90
|
+
chartOptions.tooltip.formatter = tooltipFormatterFn;
|
|
91
|
+
}
|
|
92
|
+
return (_jsx(ChartFormatter, { metricData: metricData, xAxisDataValueKey: xAxisDataValueKey, seriesDataNameKey: seriesDataNameKey, seriesDataValueKey: seriesDataValueKey, chartType: "bar", chartOptions: chartOptions, stacked: stacked, notMerge: true }));
|
|
93
|
+
} }));
|
|
94
|
+
};
|
|
95
|
+
export default BarChart;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ChartToolTipProps, TooltipField } from '../types';
|
|
3
|
+
interface ChartData {
|
|
4
|
+
xAxisData: string[];
|
|
5
|
+
seriesData: Array<{
|
|
6
|
+
name: string;
|
|
7
|
+
type: 'bar' | 'line';
|
|
8
|
+
data: number[];
|
|
9
|
+
yAxisIndex?: number;
|
|
10
|
+
currency?: string;
|
|
11
|
+
}>;
|
|
12
|
+
yAxisNames?: {
|
|
13
|
+
bar: string;
|
|
14
|
+
line: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
interface BarLineChartProps {
|
|
18
|
+
data: ChartData;
|
|
19
|
+
options?: Record<string, any>;
|
|
20
|
+
title?: string;
|
|
21
|
+
colors?: {
|
|
22
|
+
bars: string[];
|
|
23
|
+
line: string;
|
|
24
|
+
};
|
|
25
|
+
tooltipValueFormat?: string;
|
|
26
|
+
tooltipTitle?: string;
|
|
27
|
+
tooltipUnit?: string;
|
|
28
|
+
tooltipAdditionalFields?: (string | TooltipField)[];
|
|
29
|
+
chartToolTip?: ChartToolTipProps;
|
|
30
|
+
showDetailsModal?: boolean;
|
|
31
|
+
}
|
|
32
|
+
declare const BarLineChart: React.FC<BarLineChartProps>;
|
|
33
|
+
export default BarLineChart;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import ReactECharts from 'echarts-for-react';
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
|
+
import Card from '../components/CardWrapper';
|
|
5
|
+
import { defaultColors } from '../utils';
|
|
6
|
+
import { createTooltipFormatter, processTooltipFields } from '../utils/tooltipUtils';
|
|
7
|
+
const BarLineChart = ({ data, options, title, tooltipValueFormat = 'value', tooltipTitle = 'Value', tooltipUnit = '', tooltipAdditionalFields = [], showDetailsModal = true, ...props }) => {
|
|
8
|
+
const barColors = props.colors?.bars ?? defaultColors;
|
|
9
|
+
const lineColor = props.colors?.line ?? defaultColors[0];
|
|
10
|
+
let barSeriesIndex = 0;
|
|
11
|
+
const processedTooltipFields = useMemo(() => processTooltipFields(tooltipAdditionalFields), [tooltipAdditionalFields]);
|
|
12
|
+
const tooltipFormatterFn = useMemo(() => {
|
|
13
|
+
const currency = data?.seriesData?.[0]?.currency;
|
|
14
|
+
return createTooltipFormatter(tooltipValueFormat, tooltipTitle, tooltipUnit, processedTooltipFields, [], currency);
|
|
15
|
+
}, [tooltipValueFormat, tooltipTitle, tooltipUnit, processedTooltipFields, data]);
|
|
16
|
+
const series = data.seriesData.map((series) => {
|
|
17
|
+
let color;
|
|
18
|
+
if (series.type === 'line') {
|
|
19
|
+
color = lineColor;
|
|
20
|
+
}
|
|
21
|
+
else if (series.type === 'bar') {
|
|
22
|
+
color = barColors[barSeriesIndex % barColors.length];
|
|
23
|
+
barSeriesIndex++;
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
...series,
|
|
27
|
+
yAxisIndex: series.type === 'line' ? 1 : 0,
|
|
28
|
+
color,
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
const chartOptions = {
|
|
32
|
+
tooltip: {
|
|
33
|
+
trigger: 'axis',
|
|
34
|
+
axisPointer: { type: 'cross' },
|
|
35
|
+
formatter: tooltipFormatterFn,
|
|
36
|
+
},
|
|
37
|
+
legend: {},
|
|
38
|
+
xAxis: [
|
|
39
|
+
{
|
|
40
|
+
type: 'category',
|
|
41
|
+
data: data.xAxisData,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
yAxis: [
|
|
45
|
+
{
|
|
46
|
+
type: 'value',
|
|
47
|
+
name: data.yAxisNames?.bar ?? 'Bar Value',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: 'value',
|
|
51
|
+
name: data.yAxisNames?.line ?? 'Line Value',
|
|
52
|
+
position: 'right',
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
series,
|
|
56
|
+
...options,
|
|
57
|
+
};
|
|
58
|
+
return (_jsx(Card, { title: title, ...props, children: _jsx("div", { className: "mt-[12px]", children: _jsx(ReactECharts, { option: chartOptions, style: { height: '350px' } }) }) }));
|
|
59
|
+
};
|
|
60
|
+
export default BarLineChart;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { QueryProps } from 'src/shared/types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { ChartToolTipProps, TooltipField } from '../types';
|
|
4
|
+
interface BubbleChartProps {
|
|
5
|
+
title?: string;
|
|
6
|
+
xAxisLabel?: string;
|
|
7
|
+
yAxisLabel?: string;
|
|
8
|
+
colorPalette?: string[];
|
|
9
|
+
themeColor?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
url?: string;
|
|
12
|
+
query: QueryProps;
|
|
13
|
+
xAxisDataKey: string;
|
|
14
|
+
yAxisDataKey: string;
|
|
15
|
+
sizeDataKey: string;
|
|
16
|
+
categoryDataKey: string;
|
|
17
|
+
chartToolTip: ChartToolTipProps;
|
|
18
|
+
tooltipValueFormat: string;
|
|
19
|
+
tooltipTitle?: string;
|
|
20
|
+
tooltipUnit?: string;
|
|
21
|
+
tooltipAdditionalFields?: (string | TooltipField)[];
|
|
22
|
+
showDetailsModal?: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare const BubbleChart: React.FC<BubbleChartProps>;
|
|
25
|
+
export default BubbleChart;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import ReactECharts from 'echarts-for-react';
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
|
+
import Card from '../components/CardWrapper';
|
|
5
|
+
import ChartWrapper from '../components/ChartWrapper';
|
|
6
|
+
import { useChartData } from '../hooks/useChartData';
|
|
7
|
+
import { DashboardPaths, createTooltipFormatter, processTooltipFields } from '../utils';
|
|
8
|
+
const BubbleChart = ({ title, xAxisLabel, yAxisLabel, colorPalette = ['#60A5FA', '#34D399', '#F87171', '#FBBF24', '#A78BFA'], className = '', query, url = DashboardPaths.QUERY, categoryDataKey, xAxisDataKey, yAxisDataKey, sizeDataKey, chartToolTip, tooltipValueFormat, tooltipTitle = 'Value', tooltipUnit = '', tooltipAdditionalFields = [], showDetailsModal = true, ...props }) => {
|
|
9
|
+
const { data: transformedData = [], error, isEmpty, loading, refresh, } = useChartData(url, query, (data) => {
|
|
10
|
+
return data.map((item) => ({
|
|
11
|
+
x: item[xAxisDataKey],
|
|
12
|
+
y: item[yAxisDataKey],
|
|
13
|
+
size: item[sizeDataKey],
|
|
14
|
+
category: item[categoryDataKey],
|
|
15
|
+
}));
|
|
16
|
+
});
|
|
17
|
+
// Get unique categories for legend
|
|
18
|
+
const categories = useMemo(() => Array.from(new Set(transformedData.map((item) => item.category))), [transformedData]);
|
|
19
|
+
const processedTooltipFields = useMemo(() => processTooltipFields(tooltipAdditionalFields), [tooltipAdditionalFields]);
|
|
20
|
+
const tooltipFormatterFn = useMemo(() => {
|
|
21
|
+
const currency = Array.isArray(transformedData) && transformedData.length > 0
|
|
22
|
+
? transformedData[0].currency
|
|
23
|
+
: undefined;
|
|
24
|
+
return createTooltipFormatter(tooltipValueFormat, tooltipTitle, tooltipUnit, processedTooltipFields, [], currency);
|
|
25
|
+
}, [tooltipValueFormat, tooltipTitle, tooltipUnit, processedTooltipFields, transformedData]);
|
|
26
|
+
const chartOptions = useMemo(() => {
|
|
27
|
+
if (!transformedData?.length)
|
|
28
|
+
return {};
|
|
29
|
+
// Calculate size scaling factor based on data
|
|
30
|
+
const maxSize = Math.max(...transformedData.map((item) => item.size));
|
|
31
|
+
const scaleFactor = 50 / maxSize; // Maximum bubble size of 50px
|
|
32
|
+
return {
|
|
33
|
+
tooltip: {
|
|
34
|
+
formatter: tooltipFormatterFn,
|
|
35
|
+
...chartToolTip,
|
|
36
|
+
},
|
|
37
|
+
legend: {
|
|
38
|
+
type: 'scroll',
|
|
39
|
+
orient: 'horizontal',
|
|
40
|
+
top: title ? '30' : '0',
|
|
41
|
+
data: categories,
|
|
42
|
+
},
|
|
43
|
+
grid: {
|
|
44
|
+
left: '5%',
|
|
45
|
+
right: '5%',
|
|
46
|
+
bottom: '10%',
|
|
47
|
+
top: title ? '80' : '60',
|
|
48
|
+
containLabel: true,
|
|
49
|
+
},
|
|
50
|
+
xAxis: {
|
|
51
|
+
type: 'value',
|
|
52
|
+
name: xAxisLabel,
|
|
53
|
+
nameLocation: 'middle',
|
|
54
|
+
nameGap: 30,
|
|
55
|
+
axisLabel: {
|
|
56
|
+
formatter: (value) => value.toLocaleString(),
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
yAxis: {
|
|
60
|
+
type: 'value',
|
|
61
|
+
name: yAxisLabel,
|
|
62
|
+
nameLocation: 'middle',
|
|
63
|
+
nameGap: 45,
|
|
64
|
+
axisLabel: {
|
|
65
|
+
formatter: (value) => value.toLocaleString(),
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
series: categories.map((category, index) => ({
|
|
69
|
+
name: category,
|
|
70
|
+
type: 'scatter',
|
|
71
|
+
data: transformedData
|
|
72
|
+
.filter((item) => item.category === category)
|
|
73
|
+
.map((item) => ({
|
|
74
|
+
value: [item.x, item.y, item.size],
|
|
75
|
+
itemStyle: {
|
|
76
|
+
color: colorPalette[index % colorPalette.length],
|
|
77
|
+
},
|
|
78
|
+
})),
|
|
79
|
+
symbolSize: (data) => {
|
|
80
|
+
return data[2] * scaleFactor;
|
|
81
|
+
},
|
|
82
|
+
emphasis: {
|
|
83
|
+
focus: 'series',
|
|
84
|
+
label: {
|
|
85
|
+
show: true,
|
|
86
|
+
formatter: (params) => params.data.value[2],
|
|
87
|
+
position: 'top',
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
})),
|
|
91
|
+
aria: {
|
|
92
|
+
enabled: true,
|
|
93
|
+
decal: {
|
|
94
|
+
show: false,
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
}, [transformedData, title, xAxisLabel, yAxisLabel, categories, colorPalette, tooltipFormatterFn]);
|
|
99
|
+
return (_jsx(Card, { title: title, ...props, children: _jsx(ChartWrapper, { loading: loading, error: error, isEmpty: isEmpty, onRetry: refresh, children: _jsx("div", { className: "mt-[19px]", children: _jsx(ReactECharts, { option: chartOptions, style: { height: '350px' }, notMerge: true }) }) }) }));
|
|
100
|
+
};
|
|
101
|
+
export default BubbleChart;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ChartToolTipProps } from '../types';
|
|
2
|
+
export interface DataPoint {
|
|
3
|
+
value: number;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
interface DistributionChartProps {
|
|
7
|
+
data: DataPoint[];
|
|
8
|
+
chartToolTip?: ChartToolTipProps;
|
|
9
|
+
}
|
|
10
|
+
declare const DistributionChart: ({ data, chartToolTip }: DistributionChartProps) => JSX.Element;
|
|
11
|
+
export default DistributionChart;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import ReactECharts from 'echarts-for-react';
|
|
3
|
+
const DistributionChart = ({ data, chartToolTip }) => {
|
|
4
|
+
// Chart options
|
|
5
|
+
const option = {
|
|
6
|
+
tooltip: {
|
|
7
|
+
trigger: 'axis',
|
|
8
|
+
axisPointer: {
|
|
9
|
+
type: 'shadow',
|
|
10
|
+
},
|
|
11
|
+
...chartToolTip,
|
|
12
|
+
},
|
|
13
|
+
grid: {
|
|
14
|
+
left: '3%',
|
|
15
|
+
right: '4%',
|
|
16
|
+
bottom: '3%',
|
|
17
|
+
containLabel: true,
|
|
18
|
+
},
|
|
19
|
+
xAxis: {
|
|
20
|
+
type: 'category',
|
|
21
|
+
data: data.map((item) => item.name),
|
|
22
|
+
axisTick: {
|
|
23
|
+
alignWithLabel: true,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
yAxis: {
|
|
27
|
+
type: 'value',
|
|
28
|
+
},
|
|
29
|
+
series: [
|
|
30
|
+
{
|
|
31
|
+
name: 'Distribution',
|
|
32
|
+
type: 'scatter',
|
|
33
|
+
symbolSize: 10,
|
|
34
|
+
data: data.map((item) => item.value),
|
|
35
|
+
itemStyle: {
|
|
36
|
+
color: '#3B82F6',
|
|
37
|
+
},
|
|
38
|
+
emphasis: {
|
|
39
|
+
itemStyle: {
|
|
40
|
+
opacity: 1,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
};
|
|
46
|
+
return (_jsx("div", { className: "w-full overflow-x-auto overflow-y-auto rounded-lg shadow-lg bg-white p-4", children: _jsx("div", { className: "min-w-[600px] w-full h-[400px]", children: _jsx(ReactECharts, { option: option, style: { height: '100%', width: '100%' }, className: "w-full h-full" }) }) }));
|
|
47
|
+
};
|
|
48
|
+
export default DistributionChart;
|